]> git.sur5r.net Git - openldap/blob - configure
trace overlay: traces overlay execution
[openldap] / configure
1 #! /bin/sh
2 # From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.622 2006/01/09 21:36:31 kurt Exp .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by GNU Autoconf 2.59.
5 #
6 # Copyright 1998-2006 The OpenLDAP Foundation. All rights reserved.
7 # Restrictions apply, see COPYRIGHT and LICENSE files.
8 #
9 # Copyright (C) 2003 Free Software Foundation, Inc.
10 # This configure script is free software; the Free Software Foundation
11 # gives unlimited permission to copy, distribute and modify it.
12 ## --------------------- ##
13 ## M4sh Initialization.  ##
14 ## --------------------- ##
15
16 # Be Bourne compatible
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18   emulate sh
19   NULLCMD=:
20   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21   # is contrary to our usage.  Disable this feature.
22   alias -g '${1+"$@"}'='"$@"'
23 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24   set -o posix
25 fi
26 DUALCASE=1; export DUALCASE # for MKS sh
27
28 # Support unset when possible.
29 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
30   as_unset=unset
31 else
32   as_unset=false
33 fi
34
35
36 # Work around bugs in pre-3.0 UWIN ksh.
37 $as_unset ENV MAIL MAILPATH
38 PS1='$ '
39 PS2='> '
40 PS4='+ '
41
42 # NLS nuisances.
43 for as_var in \
44   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
45   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
46   LC_TELEPHONE LC_TIME
47 do
48   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
49     eval $as_var=C; export $as_var
50   else
51     $as_unset $as_var
52   fi
53 done
54
55 # Required to use basename.
56 if expr a : '\(a\)' >/dev/null 2>&1; then
57   as_expr=expr
58 else
59   as_expr=false
60 fi
61
62 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
63   as_basename=basename
64 else
65   as_basename=false
66 fi
67
68
69 # Name of the executable.
70 as_me=`$as_basename "$0" ||
71 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
72          X"$0" : 'X\(//\)$' \| \
73          X"$0" : 'X\(/\)$' \| \
74          .     : '\(.\)' 2>/dev/null ||
75 echo X/"$0" |
76     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
77           /^X\/\(\/\/\)$/{ s//\1/; q; }
78           /^X\/\(\/\).*/{ s//\1/; q; }
79           s/.*/./; q'`
80
81
82 # PATH needs CR, and LINENO needs CR and PATH.
83 # Avoid depending upon Character Ranges.
84 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
85 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
86 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
87 as_cr_digits='0123456789'
88 as_cr_alnum=$as_cr_Letters$as_cr_digits
89
90 # The user is always right.
91 if test "${PATH_SEPARATOR+set}" != set; then
92   echo "#! /bin/sh" >conf$$.sh
93   echo  "exit 0"   >>conf$$.sh
94   chmod +x conf$$.sh
95   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
96     PATH_SEPARATOR=';'
97   else
98     PATH_SEPARATOR=:
99   fi
100   rm -f conf$$.sh
101 fi
102
103
104   as_lineno_1=$LINENO
105   as_lineno_2=$LINENO
106   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
107   test "x$as_lineno_1" != "x$as_lineno_2" &&
108   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
109   # Find who we are.  Look in the path if we contain no path at all
110   # relative or not.
111   case $0 in
112     *[\\/]* ) as_myself=$0 ;;
113     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
114 for as_dir in $PATH
115 do
116   IFS=$as_save_IFS
117   test -z "$as_dir" && as_dir=.
118   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
119 done
120
121        ;;
122   esac
123   # We did not find ourselves, most probably we were run as `sh COMMAND'
124   # in which case we are not to be found in the path.
125   if test "x$as_myself" = x; then
126     as_myself=$0
127   fi
128   if test ! -f "$as_myself"; then
129     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
130    { (exit 1); exit 1; }; }
131   fi
132   case $CONFIG_SHELL in
133   '')
134     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
135 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
136 do
137   IFS=$as_save_IFS
138   test -z "$as_dir" && as_dir=.
139   for as_base in sh bash ksh sh5; do
140          case $as_dir in
141          /*)
142            if ("$as_dir/$as_base" -c '
143   as_lineno_1=$LINENO
144   as_lineno_2=$LINENO
145   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
146   test "x$as_lineno_1" != "x$as_lineno_2" &&
147   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
148              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
149              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
150              CONFIG_SHELL=$as_dir/$as_base
151              export CONFIG_SHELL
152              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
153            fi;;
154          esac
155        done
156 done
157 ;;
158   esac
159
160   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
161   # uniformly replaced by the line number.  The first 'sed' inserts a
162   # line-number line before each line; the second 'sed' does the real
163   # work.  The second script uses 'N' to pair each line-number line
164   # with the numbered line, and appends trailing '-' during
165   # substitution so that $LINENO is not a special case at line end.
166   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
167   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
168   sed '=' <$as_myself |
169     sed '
170       N
171       s,$,-,
172       : loop
173       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
174       t loop
175       s,-$,,
176       s,^['$as_cr_digits']*\n,,
177     ' >$as_me.lineno &&
178   chmod +x $as_me.lineno ||
179     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
180    { (exit 1); exit 1; }; }
181
182   # Don't try to exec as it changes $[0], causing all sort of problems
183   # (the dirname of $[0] is not the place where we might find the
184   # original and so on.  Autoconf is especially sensible to this).
185   . ./$as_me.lineno
186   # Exit status is that of the last command.
187   exit
188 }
189
190
191 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
192   *c*,-n*) ECHO_N= ECHO_C='
193 ' ECHO_T='      ' ;;
194   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
195   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
196 esac
197
198 if expr a : '\(a\)' >/dev/null 2>&1; then
199   as_expr=expr
200 else
201   as_expr=false
202 fi
203
204 rm -f conf$$ conf$$.exe conf$$.file
205 echo >conf$$.file
206 if ln -s conf$$.file conf$$ 2>/dev/null; then
207   # We could just check for DJGPP; but this test a) works b) is more generic
208   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
209   if test -f conf$$.exe; then
210     # Don't use ln at all; we don't have any links
211     as_ln_s='cp -p'
212   else
213     as_ln_s='ln -s'
214   fi
215 elif ln conf$$.file conf$$ 2>/dev/null; then
216   as_ln_s=ln
217 else
218   as_ln_s='cp -p'
219 fi
220 rm -f conf$$ conf$$.exe conf$$.file
221
222 if mkdir -p . 2>/dev/null; then
223   as_mkdir_p=:
224 else
225   test -d ./-p && rmdir ./-p
226   as_mkdir_p=false
227 fi
228
229 as_executable_p="test -f"
230
231 # Sed expression to map a string onto a valid CPP name.
232 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
233
234 # Sed expression to map a string onto a valid variable name.
235 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
236
237
238 # IFS
239 # We need space, tab and new line, in precisely that order.
240 as_nl='
241 '
242 IFS="   $as_nl"
243
244 # CDPATH.
245 $as_unset CDPATH
246
247
248
249 # Check that we are running under the correct shell.
250 SHELL=${CONFIG_SHELL-/bin/sh}
251
252 case X$ECHO in
253 X*--fallback-echo)
254   # Remove one level of quotation (which was required for Make).
255   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
256   ;;
257 esac
258
259 echo=${ECHO-echo}
260 if test "X$1" = X--no-reexec; then
261   # Discard the --no-reexec flag, and continue.
262   shift
263 elif test "X$1" = X--fallback-echo; then
264   # Avoid inline document here, it may be left over
265   :
266 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
267   # Yippee, $echo works!
268   :
269 else
270   # Restart under the correct shell.
271   exec $SHELL "$0" --no-reexec ${1+"$@"}
272 fi
273
274 if test "X$1" = X--fallback-echo; then
275   # used as fallback echo
276   shift
277   cat <<EOF
278 $*
279 EOF
280   exit 0
281 fi
282
283 # The HP-UX ksh and POSIX shell print the target directory to stdout
284 # if CDPATH is set.
285 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
286
287 if test -z "$ECHO"; then
288 if test "X${echo_test_string+set}" != Xset; then
289 # find a string as large as possible, as long as the shell can cope with it
290   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
291     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
292     if (echo_test_string=`eval $cmd`) 2>/dev/null &&
293        echo_test_string=`eval $cmd` &&
294        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
295     then
296       break
297     fi
298   done
299 fi
300
301 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
302    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
303    test "X$echo_testing_string" = "X$echo_test_string"; then
304   :
305 else
306   # The Solaris, AIX, and Digital Unix default echo programs unquote
307   # backslashes.  This makes it impossible to quote backslashes using
308   #   echo "$something" | sed 's/\\/\\\\/g'
309   #
310   # So, first we look for a working echo in the user's PATH.
311
312   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
313   for dir in $PATH /usr/ucb; do
314     IFS="$lt_save_ifs"
315     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
316        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
317        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
318        test "X$echo_testing_string" = "X$echo_test_string"; then
319       echo="$dir/echo"
320       break
321     fi
322   done
323   IFS="$lt_save_ifs"
324
325   if test "X$echo" = Xecho; then
326     # We didn't find a better echo, so look for alternatives.
327     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
328        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
329        test "X$echo_testing_string" = "X$echo_test_string"; then
330       # This shell has a builtin print -r that does the trick.
331       echo='print -r'
332     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
333          test "X$CONFIG_SHELL" != X/bin/ksh; then
334       # If we have ksh, try running configure again with it.
335       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
336       export ORIGINAL_CONFIG_SHELL
337       CONFIG_SHELL=/bin/ksh
338       export CONFIG_SHELL
339       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
340     else
341       # Try using printf.
342       echo='printf %s\n'
343       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
344          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
345          test "X$echo_testing_string" = "X$echo_test_string"; then
346         # Cool, printf works
347         :
348       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
349            test "X$echo_testing_string" = 'X\t' &&
350            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
351            test "X$echo_testing_string" = "X$echo_test_string"; then
352         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
353         export CONFIG_SHELL
354         SHELL="$CONFIG_SHELL"
355         export SHELL
356         echo="$CONFIG_SHELL $0 --fallback-echo"
357       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
358            test "X$echo_testing_string" = 'X\t' &&
359            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
360            test "X$echo_testing_string" = "X$echo_test_string"; then
361         echo="$CONFIG_SHELL $0 --fallback-echo"
362       else
363         # maybe with a smaller string...
364         prev=:
365
366         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
367           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
368           then
369             break
370           fi
371           prev="$cmd"
372         done
373
374         if test "$prev" != 'sed 50q "$0"'; then
375           echo_test_string=`eval $prev`
376           export echo_test_string
377           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
378         else
379           # Oops.  We lost completely, so just stick with echo.
380           echo=echo
381         fi
382       fi
383     fi
384   fi
385 fi
386 fi
387
388 # Copy echo and quote the copy suitably for passing to libtool from
389 # the Makefile, instead of quoting the original, which is used later.
390 ECHO=$echo
391 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
392    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
393 fi
394
395
396
397
398 # Name of the host.
399 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
400 # so uname gets run too.
401 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
402
403 exec 6>&1
404
405 #
406 # Initializations.
407 #
408 ac_default_prefix=/usr/local
409 ac_config_libobj_dir=.
410 cross_compiling=no
411 subdirs=
412 MFLAGS=
413 MAKEFLAGS=
414 SHELL=${CONFIG_SHELL-/bin/sh}
415
416 # Maximum number of lines to put in a shell here document.
417 # This variable seems obsolete.  It should probably be removed, and
418 # only ac_max_sed_lines should be used.
419 : ${ac_max_here_lines=38}
420
421 # Identity of this package.
422 PACKAGE_NAME=
423 PACKAGE_TARNAME=
424 PACKAGE_VERSION=
425 PACKAGE_STRING=
426 PACKAGE_BUGREPORT=
427
428 ac_unique_file="OpenLDAP"
429 ac_unique_file="build/version.sh"
430 ac_default_prefix=/usr/local
431 # Factoring default headers for most tests.
432 ac_includes_default="\
433 #include <stdio.h>
434 #if HAVE_SYS_TYPES_H
435 # include <sys/types.h>
436 #endif
437 #if HAVE_SYS_STAT_H
438 # include <sys/stat.h>
439 #endif
440 #if STDC_HEADERS
441 # include <stdlib.h>
442 # include <stddef.h>
443 #else
444 # if HAVE_STDLIB_H
445 #  include <stdlib.h>
446 # endif
447 #endif
448 #if HAVE_STRING_H
449 # if !STDC_HEADERS && HAVE_MEMORY_H
450 #  include <memory.h>
451 # endif
452 # include <string.h>
453 #endif
454 #if HAVE_STRINGS_H
455 # include <strings.h>
456 #endif
457 #if HAVE_INTTYPES_H
458 # include <inttypes.h>
459 #else
460 # if HAVE_STDINT_H
461 #  include <stdint.h>
462 # endif
463 #endif
464 #if HAVE_UNISTD_H
465 # include <unistd.h>
466 #endif"
467
468 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar OPENLDAP_LIBRELEASE OPENLDAP_LIBVERSION OPENLDAP_RELEASE_DATE top_builddir ldap_subdir CC AR CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO ac_ct_AR RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CPP LIBTOOL PERLBIN OL_MKDEP OL_MKDEP_FLAGS LTSTATIC LIBOBJS LIBSRCS PLAT WITH_SASL WITH_TLS WITH_MODULES_ENABLED WITH_ACI_ENABLED BUILD_THREAD BUILD_LIBS_DYNAMIC BUILD_SLAPD BUILD_SLAPI SLAPD_SLAPI_DEPEND BUILD_BDB BUILD_DNSSRV BUILD_HDB BUILD_LDAP BUILD_LDBM BUILD_META BUILD_MONITOR BUILD_NULL BUILD_PASSWD BUILD_RELAY BUILD_PERL BUILD_SHELL BUILD_SQL BUILD_ACCESSLOG BUILD_DDS BUILD_DENYOP BUILD_DYNGROUP BUILD_DYNLIST BUILD_LASTMOD BUILD_PPOLICY BUILD_PROXYCACHE BUILD_REFINT BUILD_RETCODE BUILD_RWM BUILD_SYNCPROV BUILD_TRANSLUCENT BUILD_UNIQUE BUILD_VALSORT BUILD_SLURPD LDAP_LIBS SLAPD_LIBS SLURPD_LIBS LDBM_LIBS LTHREAD_LIBS LUTIL_LIBS WRAP_LIBS SLAPD_MODULES_CPPFLAGS SLAPD_MODULES_LDFLAGS SLAPD_NO_STATIC SLAPD_STATIC_BACKENDS SLAPD_DYNAMIC_BACKENDS SLAPD_STATIC_OVERLAYS SLAPD_DYNAMIC_OVERLAYS PERL_CPPFLAGS SLAPD_PERL_LDFLAGS MOD_PERL_LDFLAGS KRB4_LIBS KRB5_LIBS SASL_LIBS TLS_LIBS MODULES_LIBS SLAPI_LIBS LIBSLAPI LIBSLAPITOOLS AUTH_LIBS ICU_LIBS SLAPD_SLP_LIBS SLAPD_GMP_LIBS SLAPD_SQL_LDFLAGS SLAPD_SQL_LIBS SLAPD_SQL_INCLUDES LTLIBOBJS'
469 ac_subst_files=''
470
471 # Initialize some variables set by options.
472 ac_init_help=
473 ac_init_version=false
474 # The variables have the same names as the options, with
475 # dashes changed to underlines.
476 cache_file=/dev/null
477 exec_prefix=NONE
478 no_create=
479 no_recursion=
480 prefix=NONE
481 program_prefix=NONE
482 program_suffix=NONE
483 program_transform_name=s,x,x,
484 silent=
485 site=
486 srcdir=
487 verbose=
488 x_includes=NONE
489 x_libraries=NONE
490
491 # Installation directory options.
492 # These are left unexpanded so users can "make install exec_prefix=/foo"
493 # and all the variables that are supposed to be based on exec_prefix
494 # by default will actually change.
495 # Use braces instead of parens because sh, perl, etc. also accept them.
496 bindir='${exec_prefix}/bin'
497 sbindir='${exec_prefix}/sbin'
498 libexecdir='${exec_prefix}/libexec'
499 datadir='${prefix}/share'
500 sysconfdir='${prefix}/etc'
501 sharedstatedir='${prefix}/com'
502 localstatedir='${prefix}/var'
503 libdir='${exec_prefix}/lib'
504 includedir='${prefix}/include'
505 oldincludedir='/usr/include'
506 infodir='${prefix}/info'
507 mandir='${prefix}/man'
508
509 ac_prev=
510 for ac_option
511 do
512   # If the previous option needs an argument, assign it.
513   if test -n "$ac_prev"; then
514     eval "$ac_prev=\$ac_option"
515     ac_prev=
516     continue
517   fi
518
519   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
520
521   # Accept the important Cygnus configure options, so we can diagnose typos.
522
523   case $ac_option in
524
525   -bindir | --bindir | --bindi | --bind | --bin | --bi)
526     ac_prev=bindir ;;
527   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
528     bindir=$ac_optarg ;;
529
530   -build | --build | --buil | --bui | --bu)
531     ac_prev=build_alias ;;
532   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
533     build_alias=$ac_optarg ;;
534
535   -cache-file | --cache-file | --cache-fil | --cache-fi \
536   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
537     ac_prev=cache_file ;;
538   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
539   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
540     cache_file=$ac_optarg ;;
541
542   --config-cache | -C)
543     cache_file=config.cache ;;
544
545   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
546     ac_prev=datadir ;;
547   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
548   | --da=*)
549     datadir=$ac_optarg ;;
550
551   -disable-* | --disable-*)
552     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
553     # Reject names that are not valid shell variable names.
554     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
555       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
556    { (exit 1); exit 1; }; }
557     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
558     eval "enable_$ac_feature=no" ;;
559
560   -enable-* | --enable-*)
561     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
562     # Reject names that are not valid shell variable names.
563     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
564       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
565    { (exit 1); exit 1; }; }
566     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
567     case $ac_option in
568       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
569       *) ac_optarg=yes ;;
570     esac
571     eval "enable_$ac_feature='$ac_optarg'" ;;
572
573   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
574   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
575   | --exec | --exe | --ex)
576     ac_prev=exec_prefix ;;
577   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
578   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
579   | --exec=* | --exe=* | --ex=*)
580     exec_prefix=$ac_optarg ;;
581
582   -gas | --gas | --ga | --g)
583     # Obsolete; use --with-gas.
584     with_gas=yes ;;
585
586   -help | --help | --hel | --he | -h)
587     ac_init_help=long ;;
588   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
589     ac_init_help=recursive ;;
590   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
591     ac_init_help=short ;;
592
593   -host | --host | --hos | --ho)
594     ac_prev=host_alias ;;
595   -host=* | --host=* | --hos=* | --ho=*)
596     host_alias=$ac_optarg ;;
597
598   -includedir | --includedir | --includedi | --included | --include \
599   | --includ | --inclu | --incl | --inc)
600     ac_prev=includedir ;;
601   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
602   | --includ=* | --inclu=* | --incl=* | --inc=*)
603     includedir=$ac_optarg ;;
604
605   -infodir | --infodir | --infodi | --infod | --info | --inf)
606     ac_prev=infodir ;;
607   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
608     infodir=$ac_optarg ;;
609
610   -libdir | --libdir | --libdi | --libd)
611     ac_prev=libdir ;;
612   -libdir=* | --libdir=* | --libdi=* | --libd=*)
613     libdir=$ac_optarg ;;
614
615   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
616   | --libexe | --libex | --libe)
617     ac_prev=libexecdir ;;
618   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
619   | --libexe=* | --libex=* | --libe=*)
620     libexecdir=$ac_optarg ;;
621
622   -localstatedir | --localstatedir | --localstatedi | --localstated \
623   | --localstate | --localstat | --localsta | --localst \
624   | --locals | --local | --loca | --loc | --lo)
625     ac_prev=localstatedir ;;
626   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
627   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
628   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
629     localstatedir=$ac_optarg ;;
630
631   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
632     ac_prev=mandir ;;
633   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
634     mandir=$ac_optarg ;;
635
636   -nfp | --nfp | --nf)
637     # Obsolete; use --without-fp.
638     with_fp=no ;;
639
640   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
641   | --no-cr | --no-c | -n)
642     no_create=yes ;;
643
644   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
645   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
646     no_recursion=yes ;;
647
648   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
649   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
650   | --oldin | --oldi | --old | --ol | --o)
651     ac_prev=oldincludedir ;;
652   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
653   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
654   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
655     oldincludedir=$ac_optarg ;;
656
657   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
658     ac_prev=prefix ;;
659   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
660     prefix=$ac_optarg ;;
661
662   -program-prefix | --program-prefix | --program-prefi | --program-pref \
663   | --program-pre | --program-pr | --program-p)
664     ac_prev=program_prefix ;;
665   -program-prefix=* | --program-prefix=* | --program-prefi=* \
666   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
667     program_prefix=$ac_optarg ;;
668
669   -program-suffix | --program-suffix | --program-suffi | --program-suff \
670   | --program-suf | --program-su | --program-s)
671     ac_prev=program_suffix ;;
672   -program-suffix=* | --program-suffix=* | --program-suffi=* \
673   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
674     program_suffix=$ac_optarg ;;
675
676   -program-transform-name | --program-transform-name \
677   | --program-transform-nam | --program-transform-na \
678   | --program-transform-n | --program-transform- \
679   | --program-transform | --program-transfor \
680   | --program-transfo | --program-transf \
681   | --program-trans | --program-tran \
682   | --progr-tra | --program-tr | --program-t)
683     ac_prev=program_transform_name ;;
684   -program-transform-name=* | --program-transform-name=* \
685   | --program-transform-nam=* | --program-transform-na=* \
686   | --program-transform-n=* | --program-transform-=* \
687   | --program-transform=* | --program-transfor=* \
688   | --program-transfo=* | --program-transf=* \
689   | --program-trans=* | --program-tran=* \
690   | --progr-tra=* | --program-tr=* | --program-t=*)
691     program_transform_name=$ac_optarg ;;
692
693   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
694   | -silent | --silent | --silen | --sile | --sil)
695     silent=yes ;;
696
697   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
698     ac_prev=sbindir ;;
699   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
700   | --sbi=* | --sb=*)
701     sbindir=$ac_optarg ;;
702
703   -sharedstatedir | --sharedstatedir | --sharedstatedi \
704   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
705   | --sharedst | --shareds | --shared | --share | --shar \
706   | --sha | --sh)
707     ac_prev=sharedstatedir ;;
708   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
709   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
710   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
711   | --sha=* | --sh=*)
712     sharedstatedir=$ac_optarg ;;
713
714   -site | --site | --sit)
715     ac_prev=site ;;
716   -site=* | --site=* | --sit=*)
717     site=$ac_optarg ;;
718
719   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
720     ac_prev=srcdir ;;
721   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
722     srcdir=$ac_optarg ;;
723
724   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
725   | --syscon | --sysco | --sysc | --sys | --sy)
726     ac_prev=sysconfdir ;;
727   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
728   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
729     sysconfdir=$ac_optarg ;;
730
731   -target | --target | --targe | --targ | --tar | --ta | --t)
732     ac_prev=target_alias ;;
733   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
734     target_alias=$ac_optarg ;;
735
736   -v | -verbose | --verbose | --verbos | --verbo | --verb)
737     verbose=yes ;;
738
739   -version | --version | --versio | --versi | --vers | -V)
740     ac_init_version=: ;;
741
742   -with-* | --with-*)
743     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
744     # Reject names that are not valid shell variable names.
745     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
746       { echo "$as_me: error: invalid package name: $ac_package" >&2
747    { (exit 1); exit 1; }; }
748     ac_package=`echo $ac_package| sed 's/-/_/g'`
749     case $ac_option in
750       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
751       *) ac_optarg=yes ;;
752     esac
753     eval "with_$ac_package='$ac_optarg'" ;;
754
755   -without-* | --without-*)
756     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
757     # Reject names that are not valid shell variable names.
758     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
759       { echo "$as_me: error: invalid package name: $ac_package" >&2
760    { (exit 1); exit 1; }; }
761     ac_package=`echo $ac_package | sed 's/-/_/g'`
762     eval "with_$ac_package=no" ;;
763
764   --x)
765     # Obsolete; use --with-x.
766     with_x=yes ;;
767
768   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
769   | --x-incl | --x-inc | --x-in | --x-i)
770     ac_prev=x_includes ;;
771   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
772   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
773     x_includes=$ac_optarg ;;
774
775   -x-libraries | --x-libraries | --x-librarie | --x-librari \
776   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
777     ac_prev=x_libraries ;;
778   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
779   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
780     x_libraries=$ac_optarg ;;
781
782   -*) { echo "$as_me: error: unrecognized option: $ac_option
783 Try \`$0 --help' for more information." >&2
784    { (exit 1); exit 1; }; }
785     ;;
786
787   *=*)
788     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
789     # Reject names that are not valid shell variable names.
790     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
791       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
792    { (exit 1); exit 1; }; }
793     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
794     eval "$ac_envvar='$ac_optarg'"
795     export $ac_envvar ;;
796
797   *)
798     # FIXME: should be removed in autoconf 3.0.
799     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
800     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
801       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
802     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
803     ;;
804
805   esac
806 done
807
808 if test -n "$ac_prev"; then
809   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
810   { echo "$as_me: error: missing argument to $ac_option" >&2
811    { (exit 1); exit 1; }; }
812 fi
813
814 # Be sure to have absolute paths.
815 for ac_var in exec_prefix prefix
816 do
817   eval ac_val=$`echo $ac_var`
818   case $ac_val in
819     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
820     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
821    { (exit 1); exit 1; }; };;
822   esac
823 done
824
825 # Be sure to have absolute paths.
826 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
827               localstatedir libdir includedir oldincludedir infodir mandir
828 do
829   eval ac_val=$`echo $ac_var`
830   case $ac_val in
831     [\\/$]* | ?:[\\/]* ) ;;
832     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
833    { (exit 1); exit 1; }; };;
834   esac
835 done
836
837 # There might be people who depend on the old broken behavior: `$host'
838 # used to hold the argument of --host etc.
839 # FIXME: To remove some day.
840 build=$build_alias
841 host=$host_alias
842 target=$target_alias
843
844 # FIXME: To remove some day.
845 if test "x$host_alias" != x; then
846   if test "x$build_alias" = x; then
847     cross_compiling=maybe
848     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
849     If a cross compiler is detected then cross compile mode will be used." >&2
850   elif test "x$build_alias" != "x$host_alias"; then
851     cross_compiling=yes
852   fi
853 fi
854
855 ac_tool_prefix=
856 test -n "$host_alias" && ac_tool_prefix=$host_alias-
857
858 test "$silent" = yes && exec 6>/dev/null
859
860
861 # Find the source files, if location was not specified.
862 if test -z "$srcdir"; then
863   ac_srcdir_defaulted=yes
864   # Try the directory containing this script, then its parent.
865   ac_confdir=`(dirname "$0") 2>/dev/null ||
866 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
867          X"$0" : 'X\(//\)[^/]' \| \
868          X"$0" : 'X\(//\)$' \| \
869          X"$0" : 'X\(/\)' \| \
870          .     : '\(.\)' 2>/dev/null ||
871 echo X"$0" |
872     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
873           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
874           /^X\(\/\/\)$/{ s//\1/; q; }
875           /^X\(\/\).*/{ s//\1/; q; }
876           s/.*/./; q'`
877   srcdir=$ac_confdir
878   if test ! -r $srcdir/$ac_unique_file; then
879     srcdir=..
880   fi
881 else
882   ac_srcdir_defaulted=no
883 fi
884 if test ! -r $srcdir/$ac_unique_file; then
885   if test "$ac_srcdir_defaulted" = yes; then
886     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
887    { (exit 1); exit 1; }; }
888   else
889     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
890    { (exit 1); exit 1; }; }
891   fi
892 fi
893 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
894   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
895    { (exit 1); exit 1; }; }
896 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
897 ac_env_build_alias_set=${build_alias+set}
898 ac_env_build_alias_value=$build_alias
899 ac_cv_env_build_alias_set=${build_alias+set}
900 ac_cv_env_build_alias_value=$build_alias
901 ac_env_host_alias_set=${host_alias+set}
902 ac_env_host_alias_value=$host_alias
903 ac_cv_env_host_alias_set=${host_alias+set}
904 ac_cv_env_host_alias_value=$host_alias
905 ac_env_target_alias_set=${target_alias+set}
906 ac_env_target_alias_value=$target_alias
907 ac_cv_env_target_alias_set=${target_alias+set}
908 ac_cv_env_target_alias_value=$target_alias
909 ac_env_CC_set=${CC+set}
910 ac_env_CC_value=$CC
911 ac_cv_env_CC_set=${CC+set}
912 ac_cv_env_CC_value=$CC
913 ac_env_CFLAGS_set=${CFLAGS+set}
914 ac_env_CFLAGS_value=$CFLAGS
915 ac_cv_env_CFLAGS_set=${CFLAGS+set}
916 ac_cv_env_CFLAGS_value=$CFLAGS
917 ac_env_LDFLAGS_set=${LDFLAGS+set}
918 ac_env_LDFLAGS_value=$LDFLAGS
919 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
920 ac_cv_env_LDFLAGS_value=$LDFLAGS
921 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
922 ac_env_CPPFLAGS_value=$CPPFLAGS
923 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
924 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
925 ac_env_CPP_set=${CPP+set}
926 ac_env_CPP_value=$CPP
927 ac_cv_env_CPP_set=${CPP+set}
928 ac_cv_env_CPP_value=$CPP
929
930 #
931 # Report the --help message.
932 #
933 if test "$ac_init_help" = "long"; then
934   # Omit some internal or obsolete options to make the list less imposing.
935   # This message is too long to be a string in the A/UX 3.1 sh.
936   cat <<_ACEOF
937 \`configure' configures this package to adapt to many kinds of systems.
938
939 Usage: $0 [OPTION]... [VAR=VALUE]...
940
941 To assign environment variables (e.g., CC, CFLAGS...), specify them as
942 VAR=VALUE.  See below for descriptions of some of the useful variables.
943
944 Defaults for the options are specified in brackets.
945
946 Configuration:
947   -h, --help              display this help and exit
948       --help=short        display options specific to this package
949       --help=recursive    display the short help of all the included packages
950   -V, --version           display version information and exit
951   -q, --quiet, --silent   do not print \`checking...' messages
952       --cache-file=FILE   cache test results in FILE [disabled]
953   -C, --config-cache      alias for \`--cache-file=config.cache'
954   -n, --no-create         do not create output files
955       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
956
957 _ACEOF
958
959   cat <<_ACEOF
960 Installation directories:
961   --prefix=PREFIX         install architecture-independent files in PREFIX
962                           [$ac_default_prefix]
963   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
964                           [PREFIX]
965
966 By default, \`make install' will install all the files in
967 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
968 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
969 for instance \`--prefix=\$HOME'.
970
971 For better control, use the options below.
972
973 Fine tuning of the installation directories:
974   --bindir=DIR           user executables [EPREFIX/bin]
975   --sbindir=DIR          system admin executables [EPREFIX/sbin]
976   --libexecdir=DIR       program executables [EPREFIX/libexec]
977   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
978   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
979   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
980   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
981   --libdir=DIR           object code libraries [EPREFIX/lib]
982   --includedir=DIR       C header files [PREFIX/include]
983   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
984   --infodir=DIR          info documentation [PREFIX/info]
985   --mandir=DIR           man documentation [PREFIX/man]
986 _ACEOF
987
988   cat <<\_ACEOF
989
990 Program names:
991   --program-prefix=PREFIX            prepend PREFIX to installed program names
992   --program-suffix=SUFFIX            append SUFFIX to installed program names
993   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
994
995 System types:
996   --build=BUILD     configure for building on BUILD [guessed]
997   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
998   --target=TARGET   configure for building compilers for TARGET [HOST]
999 _ACEOF
1000 fi
1001
1002 if test -n "$ac_init_help"; then
1003
1004   cat <<\_ACEOF
1005
1006 Optional Features:
1007   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1008   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1009   --enable-debug          enable debugging no|yes|traditional [yes]
1010   --enable-dynamic        enable linking built binaries with dynamic libs [no]
1011   --enable-syslog         enable syslog support [auto]
1012   --enable-proctitle      enable proctitle support [yes]
1013   --enable-ipv6           enable IPv6 support [auto]
1014   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]
1015
1016 SLAPD (Standalone LDAP Daemon) Options:
1017   --enable-slapd          enable building slapd [yes]
1018     --enable-dynacl       enable run-time loadable ACL support (experimental) [no]
1019     --enable-aci          enable per-object ACIs (experimental) no|yes|mod [no]
1020     --enable-cleartext    enable cleartext passwords [yes]
1021     --enable-crypt        enable crypt(3) passwords [no]
1022     --enable-lmpasswd     enable LAN Manager passwords [no]
1023     --enable-spasswd      enable (Cyrus) SASL password verification [no]
1024     --enable-modules      enable dynamic module support [no]
1025     --enable-rewrite      enable DN rewriting in back-ldap and rwm overlay [auto]
1026     --enable-rlookups     enable reverse lookups of client hostnames [no]
1027     --enable-slapi        enable SLAPI support (experimental) [no]
1028     --enable-slp          enable SLPv2 support [no]
1029     --enable-wrappers     enable tcp wrapper support [no]
1030
1031 SLAPD Backend Options:
1032     --enable-backends     enable all available backends no|yes|mod
1033     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]
1034     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]
1035     --enable-hdb          enable Hierarchical DB backend no|yes|mod [yes]
1036     --enable-ldap         enable ldap backend no|yes|mod [no]
1037     --enable-ldbm         enable ldbm backend no|yes|mod [no]
1038       --enable-ldbm-api   use LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]
1039       --enable-ldbm-type  use LDBM type auto|btree|hash [auto]
1040     --enable-meta         enable metadirectory backend no|yes|mod [no]
1041     --enable-monitor      enable monitor backend no|yes|mod [yes]
1042     --enable-null         enable null backend no|yes|mod [no]
1043     --enable-passwd       enable passwd backend no|yes|mod [no]
1044     --enable-perl         enable perl backend no|yes|mod [no]
1045     --enable-relay        enable relay backend no|yes|mod [yes]
1046     --enable-shell        enable shell backend no|yes|mod [no]
1047     --enable-sql          enable sql backend no|yes|mod [no]
1048
1049 SLAPD Overlay Options:
1050     --enable-overlays     enable all available overlays no|yes|mod
1051     --enable-accesslog    In-Directory Access Logging overlay no|yes|mod [no]
1052     --enable-dds          Dynamic Directory Services overlay no|yes|mod [no]
1053     --enable-denyop       Deny Operation overlay no|yes|mod [no]
1054     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]
1055     --enable-dynlist      Dynamic List overlay no|yes|mod [no]
1056     --enable-lastmod      Last Modification overlay no|yes|mod [no]
1057     --enable-ppolicy      Password Policy overlay no|yes|mod [no]
1058     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]
1059     --enable-refint       Referential Integrity overlay no|yes|mod [no]
1060     --enable-retcode      Return Code testing overlay no|yes|mod [no]
1061     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]
1062     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [yes]
1063     --enable-translucent  Translucent Proxy overlay no|yes|mod [no]
1064     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]
1065     --enable-valsort      Value Sorting overlay no|yes|mod [no]
1066
1067 SLURPD (Replication Daemon) Options:
1068   --enable-slurpd         enable building slurpd [auto]
1069
1070 Library Generation & Linking Options
1071   --enable-static[=PKGS]
1072                           build static libraries [default=yes]
1073   --enable-shared[=PKGS]
1074                           build shared libraries [default=yes]
1075   --enable-fast-install[=PKGS]
1076                           optimize for fast installation [default=yes]
1077   --disable-dependency-tracking  speeds up one-time build
1078   --enable-dependency-tracking   do not reject slow dependency extractors
1079   --disable-libtool-lock  avoid locking (might break parallel builds)
1080
1081 Optional Packages:
1082   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1083   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1084   --with-subdir=DIR       change default subdirectory used for installs
1085   --with-cyrus-sasl       with Cyrus SASL support [auto]
1086   --with-fetch            with fetch(3) URL support [auto]
1087   --with-threads          with threads [auto]
1088   --with-tls              with TLS/SSL support [auto]
1089   --with-yielding-select  with implicitly yielding select [auto]
1090   --with-multiple-precision
1091                           multiple precision support for statistics
1092                           auto|bignum|gmp [auto]
1093
1094   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1095   --with-pic              try to use only PIC/non-PIC objects [default=use
1096                           both]
1097   --with-tags[=TAGS]
1098                           include additional configurations [automatic]
1099
1100 See INSTALL file for further details.
1101
1102 Some influential environment variables:
1103   CC          C compiler command
1104   CFLAGS      C compiler flags
1105   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1106               nonstandard directory <lib dir>
1107   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
1108               headers in a nonstandard directory <include dir>
1109   CPP         C preprocessor
1110
1111 Use these variables to override the choices made by `configure' or to help
1112 it to find libraries and programs with nonstandard names/locations.
1113
1114 _ACEOF
1115 fi
1116
1117 if test "$ac_init_help" = "recursive"; then
1118   # If there are subdirs, report their specific --help.
1119   ac_popdir=`pwd`
1120   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1121     test -d $ac_dir || continue
1122     ac_builddir=.
1123
1124 if test "$ac_dir" != .; then
1125   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1126   # A "../" for each directory in $ac_dir_suffix.
1127   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
1128 else
1129   ac_dir_suffix= ac_top_builddir=
1130 fi
1131
1132 case $srcdir in
1133   .)  # No --srcdir option.  We are building in place.
1134     ac_srcdir=.
1135     if test -z "$ac_top_builddir"; then
1136        ac_top_srcdir=.
1137     else
1138        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
1139     fi ;;
1140   [\\/]* | ?:[\\/]* )  # Absolute path.
1141     ac_srcdir=$srcdir$ac_dir_suffix;
1142     ac_top_srcdir=$srcdir ;;
1143   *) # Relative path.
1144     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
1145     ac_top_srcdir=$ac_top_builddir$srcdir ;;
1146 esac
1147
1148 # Do not use `cd foo && pwd` to compute absolute paths, because
1149 # the directories may not exist.
1150 case `pwd` in
1151 .) ac_abs_builddir="$ac_dir";;
1152 *)
1153   case "$ac_dir" in
1154   .) ac_abs_builddir=`pwd`;;
1155   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
1156   *) ac_abs_builddir=`pwd`/"$ac_dir";;
1157   esac;;
1158 esac
1159 case $ac_abs_builddir in
1160 .) ac_abs_top_builddir=${ac_top_builddir}.;;
1161 *)
1162   case ${ac_top_builddir}. in
1163   .) ac_abs_top_builddir=$ac_abs_builddir;;
1164   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
1165   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
1166   esac;;
1167 esac
1168 case $ac_abs_builddir in
1169 .) ac_abs_srcdir=$ac_srcdir;;
1170 *)
1171   case $ac_srcdir in
1172   .) ac_abs_srcdir=$ac_abs_builddir;;
1173   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1174   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1175   esac;;
1176 esac
1177 case $ac_abs_builddir in
1178 .) ac_abs_top_srcdir=$ac_top_srcdir;;
1179 *)
1180   case $ac_top_srcdir in
1181   .) ac_abs_top_srcdir=$ac_abs_builddir;;
1182   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1183   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1184   esac;;
1185 esac
1186
1187     cd $ac_dir
1188     # Check for guested configure; otherwise get Cygnus style configure.
1189     if test -f $ac_srcdir/configure.gnu; then
1190       echo
1191       $SHELL $ac_srcdir/configure.gnu  --help=recursive
1192     elif test -f $ac_srcdir/configure; then
1193       echo
1194       $SHELL $ac_srcdir/configure  --help=recursive
1195     elif test -f $ac_srcdir/configure.ac ||
1196            test -f $ac_srcdir/configure.in; then
1197       echo
1198       $ac_configure --help
1199     else
1200       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1201     fi
1202     cd $ac_popdir
1203   done
1204 fi
1205
1206 test -n "$ac_init_help" && exit 0
1207 if $ac_init_version; then
1208   cat <<\_ACEOF
1209
1210 Copyright (C) 2003 Free Software Foundation, Inc.
1211 This configure script is free software; the Free Software Foundation
1212 gives unlimited permission to copy, distribute and modify it.
1213
1214 Copyright 1998-2006 The OpenLDAP Foundation. All rights reserved.
1215 Restrictions apply, see COPYRIGHT and LICENSE files.
1216 _ACEOF
1217   exit 0
1218 fi
1219 exec 5>config.log
1220 cat >&5 <<_ACEOF
1221 This file contains any messages produced by compilers while
1222 running configure, to aid debugging if configure makes a mistake.
1223
1224 It was created by $as_me, which was
1225 generated by GNU Autoconf 2.59.  Invocation command line was
1226
1227   $ $0 $@
1228
1229 _ACEOF
1230 {
1231 cat <<_ASUNAME
1232 ## --------- ##
1233 ## Platform. ##
1234 ## --------- ##
1235
1236 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1237 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1238 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1239 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1240 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1241
1242 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1243 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1244
1245 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1246 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1247 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1248 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1249 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1250 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1251 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1252
1253 _ASUNAME
1254
1255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1256 for as_dir in $PATH
1257 do
1258   IFS=$as_save_IFS
1259   test -z "$as_dir" && as_dir=.
1260   echo "PATH: $as_dir"
1261 done
1262
1263 } >&5
1264
1265 cat >&5 <<_ACEOF
1266
1267
1268 ## ----------- ##
1269 ## Core tests. ##
1270 ## ----------- ##
1271
1272 _ACEOF
1273
1274
1275 # Keep a trace of the command line.
1276 # Strip out --no-create and --no-recursion so they do not pile up.
1277 # Strip out --silent because we don't want to record it for future runs.
1278 # Also quote any args containing shell meta-characters.
1279 # Make two passes to allow for proper duplicate-argument suppression.
1280 ac_configure_args=
1281 ac_configure_args0=
1282 ac_configure_args1=
1283 ac_sep=
1284 ac_must_keep_next=false
1285 for ac_pass in 1 2
1286 do
1287   for ac_arg
1288   do
1289     case $ac_arg in
1290     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1291     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1292     | -silent | --silent | --silen | --sile | --sil)
1293       continue ;;
1294     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1295       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1296     esac
1297     case $ac_pass in
1298     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1299     2)
1300       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1301       if test $ac_must_keep_next = true; then
1302         ac_must_keep_next=false # Got value, back to normal.
1303       else
1304         case $ac_arg in
1305           *=* | --config-cache | -C | -disable-* | --disable-* \
1306           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1307           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1308           | -with-* | --with-* | -without-* | --without-* | --x)
1309             case "$ac_configure_args0 " in
1310               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1311             esac
1312             ;;
1313           -* ) ac_must_keep_next=true ;;
1314         esac
1315       fi
1316       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1317       # Get rid of the leading space.
1318       ac_sep=" "
1319       ;;
1320     esac
1321   done
1322 done
1323 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1324 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1325
1326 # When interrupted or exit'd, cleanup temporary files, and complete
1327 # config.log.  We remove comments because anyway the quotes in there
1328 # would cause problems or look ugly.
1329 # WARNING: Be sure not to use single quotes in there, as some shells,
1330 # such as our DU 5.0 friend, will then `close' the trap.
1331 trap 'exit_status=$?
1332   # Save into config.log some information that might help in debugging.
1333   {
1334     echo
1335
1336     cat <<\_ASBOX
1337 ## ---------------- ##
1338 ## Cache variables. ##
1339 ## ---------------- ##
1340 _ASBOX
1341     echo
1342     # The following way of writing the cache mishandles newlines in values,
1343 {
1344   (set) 2>&1 |
1345     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1346     *ac_space=\ *)
1347       sed -n \
1348         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1349           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1350       ;;
1351     *)
1352       sed -n \
1353         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1354       ;;
1355     esac;
1356 }
1357     echo
1358
1359     cat <<\_ASBOX
1360 ## ----------------- ##
1361 ## Output variables. ##
1362 ## ----------------- ##
1363 _ASBOX
1364     echo
1365     for ac_var in $ac_subst_vars
1366     do
1367       eval ac_val=$`echo $ac_var`
1368       echo "$ac_var='"'"'$ac_val'"'"'"
1369     done | sort
1370     echo
1371
1372     if test -n "$ac_subst_files"; then
1373       cat <<\_ASBOX
1374 ## ------------- ##
1375 ## Output files. ##
1376 ## ------------- ##
1377 _ASBOX
1378       echo
1379       for ac_var in $ac_subst_files
1380       do
1381         eval ac_val=$`echo $ac_var`
1382         echo "$ac_var='"'"'$ac_val'"'"'"
1383       done | sort
1384       echo
1385     fi
1386
1387     if test -s confdefs.h; then
1388       cat <<\_ASBOX
1389 ## ----------- ##
1390 ## confdefs.h. ##
1391 ## ----------- ##
1392 _ASBOX
1393       echo
1394       sed "/^$/d" confdefs.h | sort
1395       echo
1396     fi
1397     test "$ac_signal" != 0 &&
1398       echo "$as_me: caught signal $ac_signal"
1399     echo "$as_me: exit $exit_status"
1400   } >&5
1401   rm -f core *.core &&
1402   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1403     exit $exit_status
1404      ' 0
1405 for ac_signal in 1 2 13 15; do
1406   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1407 done
1408 ac_signal=0
1409
1410 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1411 rm -rf conftest* confdefs.h
1412 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1413 echo >confdefs.h
1414
1415 # Predefined preprocessor variables.
1416
1417 cat >>confdefs.h <<_ACEOF
1418 #define PACKAGE_NAME "$PACKAGE_NAME"
1419 _ACEOF
1420
1421
1422 cat >>confdefs.h <<_ACEOF
1423 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1424 _ACEOF
1425
1426
1427 cat >>confdefs.h <<_ACEOF
1428 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1429 _ACEOF
1430
1431
1432 cat >>confdefs.h <<_ACEOF
1433 #define PACKAGE_STRING "$PACKAGE_STRING"
1434 _ACEOF
1435
1436
1437 cat >>confdefs.h <<_ACEOF
1438 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1439 _ACEOF
1440
1441
1442 # Let the site file select an alternate cache file if it wants to.
1443 # Prefer explicitly selected file to automatically selected ones.
1444 if test -z "$CONFIG_SITE"; then
1445   if test "x$prefix" != xNONE; then
1446     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1447   else
1448     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1449   fi
1450 fi
1451 for ac_site_file in $CONFIG_SITE; do
1452   if test -r "$ac_site_file"; then
1453     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1454 echo "$as_me: loading site script $ac_site_file" >&6;}
1455     sed 's/^/| /' "$ac_site_file" >&5
1456     . "$ac_site_file"
1457   fi
1458 done
1459
1460
1461 # Check that the precious variables saved in the cache have kept the same
1462 # value.
1463 ac_cache_corrupted=false
1464 for ac_var in `(set) 2>&1 |
1465                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1466   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1467   eval ac_new_set=\$ac_env_${ac_var}_set
1468   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1469   eval ac_new_val="\$ac_env_${ac_var}_value"
1470   case $ac_old_set,$ac_new_set in
1471     set,)
1472       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1473 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1474       ac_cache_corrupted=: ;;
1475     ,set)
1476       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1477 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1478       ac_cache_corrupted=: ;;
1479     ,);;
1480     *)
1481       if test "x$ac_old_val" != "x$ac_new_val"; then
1482         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1483 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1484         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1485 echo "$as_me:   former value:  $ac_old_val" >&2;}
1486         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1487 echo "$as_me:   current value: $ac_new_val" >&2;}
1488         ac_cache_corrupted=:
1489       fi;;
1490   esac
1491   # Pass precious variables to config.status.
1492   if test "$ac_new_set" = set; then
1493     case $ac_new_val in
1494     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1495       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1496     *) ac_arg=$ac_var=$ac_new_val ;;
1497     esac
1498     case " $ac_configure_args " in
1499       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1500       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1501     esac
1502   fi
1503 done
1504 if $ac_cache_corrupted; then
1505   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1506 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1507   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1508 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1509    { (exit 1); exit 1; }; }
1510 fi
1511
1512 ac_ext=c
1513 ac_cpp='$CPP $CPPFLAGS'
1514 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1515 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1516 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560 ac_aux_dir=
1561 for ac_dir in build $srcdir/build; do
1562   if test -f $ac_dir/install-sh; then
1563     ac_aux_dir=$ac_dir
1564     ac_install_sh="$ac_aux_dir/install-sh -c"
1565     break
1566   elif test -f $ac_dir/install.sh; then
1567     ac_aux_dir=$ac_dir
1568     ac_install_sh="$ac_aux_dir/install.sh -c"
1569     break
1570   elif test -f $ac_dir/shtool; then
1571     ac_aux_dir=$ac_dir
1572     ac_install_sh="$ac_aux_dir/shtool install -c"
1573     break
1574   fi
1575 done
1576 if test -z "$ac_aux_dir"; then
1577   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build $srcdir/build" >&5
1578 echo "$as_me: error: cannot find install-sh or install.sh in build $srcdir/build" >&2;}
1579    { (exit 1); exit 1; }; }
1580 fi
1581 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1582 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1583 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1584
1585 eval `$ac_aux_dir/version.sh`
1586 if test -z "$OL_STRING"; then
1587         { { echo "$as_me:$LINENO: error: could not determine version" >&5
1588 echo "$as_me: error: could not determine version" >&2;}
1589    { (exit 1); exit 1; }; }
1590 fi
1591
1592 if test -f "$ac_aux_dir/shtool" && test ! -d $ac_aux_dir/shtool; then
1593         ac_cv_shtool="$ac_aux_dir/shtool"
1594 else
1595         { { echo "$as_me:$LINENO: error: no shtool found in $ac_aux_dir" >&5
1596 echo "$as_me: error: no shtool found in $ac_aux_dir" >&2;}
1597    { (exit 1); exit 1; }; }
1598 fi
1599
1600 SHTOOL="$ac_cv_shtool"
1601
1602 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
1603 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
1604
1605 OPENLDAP_CVS=""
1606 if test -d $ac_aux_dir/CVS; then
1607         OPENLDAP_CVS="(from CVS sources) "
1608 fi
1609
1610 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
1611
1612 # Make sure we can run config.sub.
1613 $ac_config_sub sun4 >/dev/null 2>&1 ||
1614   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1615 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1616    { (exit 1); exit 1; }; }
1617
1618 echo "$as_me:$LINENO: checking build system type" >&5
1619 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1620 if test "${ac_cv_build+set}" = set; then
1621   echo $ECHO_N "(cached) $ECHO_C" >&6
1622 else
1623   ac_cv_build_alias=$build_alias
1624 test -z "$ac_cv_build_alias" &&
1625   ac_cv_build_alias=`$ac_config_guess`
1626 test -z "$ac_cv_build_alias" &&
1627   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1628 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1629    { (exit 1); exit 1; }; }
1630 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1631   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1632 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1633    { (exit 1); exit 1; }; }
1634
1635 fi
1636 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1637 echo "${ECHO_T}$ac_cv_build" >&6
1638 build=$ac_cv_build
1639 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1640 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1641 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1642
1643
1644 echo "$as_me:$LINENO: checking host system type" >&5
1645 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1646 if test "${ac_cv_host+set}" = set; then
1647   echo $ECHO_N "(cached) $ECHO_C" >&6
1648 else
1649   ac_cv_host_alias=$host_alias
1650 test -z "$ac_cv_host_alias" &&
1651   ac_cv_host_alias=$ac_cv_build_alias
1652 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1653   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1654 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1655    { (exit 1); exit 1; }; }
1656
1657 fi
1658 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1659 echo "${ECHO_T}$ac_cv_host" >&6
1660 host=$ac_cv_host
1661 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1662 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1663 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1664
1665
1666 echo "$as_me:$LINENO: checking target system type" >&5
1667 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1668 if test "${ac_cv_target+set}" = set; then
1669   echo $ECHO_N "(cached) $ECHO_C" >&6
1670 else
1671   ac_cv_target_alias=$target_alias
1672 test "x$ac_cv_target_alias" = "x" &&
1673   ac_cv_target_alias=$ac_cv_host_alias
1674 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1675   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1676 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1677    { (exit 1); exit 1; }; }
1678
1679 fi
1680 echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1681 echo "${ECHO_T}$ac_cv_target" >&6
1682 target=$ac_cv_target
1683 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1684 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1685 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1686
1687
1688 # The aliases save the names the user supplied, while $host etc.
1689 # will get canonicalized.
1690 test -n "$target_alias" &&
1691   test "$program_prefix$program_suffix$program_transform_name" = \
1692     NONENONEs,x,x, &&
1693   program_prefix=${target_alias}-
1694
1695 am__api_version="1.9"
1696 # Find a good install program.  We prefer a C program (faster),
1697 # so one script is as good as another.  But avoid the broken or
1698 # incompatible versions:
1699 # SysV /etc/install, /usr/sbin/install
1700 # SunOS /usr/etc/install
1701 # IRIX /sbin/install
1702 # AIX /bin/install
1703 # AmigaOS /C/install, which installs bootblocks on floppy discs
1704 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1705 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1706 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1707 # OS/2's system install, which has a completely different semantic
1708 # ./install, which can be erroneously created by make from ./install.sh.
1709 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
1710 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
1711 if test -z "$INSTALL"; then
1712 if test "${ac_cv_path_install+set}" = set; then
1713   echo $ECHO_N "(cached) $ECHO_C" >&6
1714 else
1715   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1716 for as_dir in $PATH
1717 do
1718   IFS=$as_save_IFS
1719   test -z "$as_dir" && as_dir=.
1720   # Account for people who put trailing slashes in PATH elements.
1721 case $as_dir/ in
1722   ./ | .// | /cC/* | \
1723   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
1724   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
1725   /usr/ucb/* ) ;;
1726   *)
1727     # OSF1 and SCO ODT 3.0 have their own names for install.
1728     # Don't use installbsd from OSF since it installs stuff as root
1729     # by default.
1730     for ac_prog in ginstall scoinst install; do
1731       for ac_exec_ext in '' $ac_executable_extensions; do
1732         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
1733           if test $ac_prog = install &&
1734             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
1735             # AIX install.  It has an incompatible calling convention.
1736             :
1737           elif test $ac_prog = install &&
1738             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
1739             # program-specific install script used by HP pwplus--don't use.
1740             :
1741           else
1742             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
1743             break 3
1744           fi
1745         fi
1746       done
1747     done
1748     ;;
1749 esac
1750 done
1751
1752
1753 fi
1754   if test "${ac_cv_path_install+set}" = set; then
1755     INSTALL=$ac_cv_path_install
1756   else
1757     # As a last resort, use the slow shell script.  We don't cache a
1758     # path for INSTALL within a source directory, because that will
1759     # break other packages using the cache if that directory is
1760     # removed, or if the path is relative.
1761     INSTALL=$ac_install_sh
1762   fi
1763 fi
1764 echo "$as_me:$LINENO: result: $INSTALL" >&5
1765 echo "${ECHO_T}$INSTALL" >&6
1766
1767 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1768 # It thinks the first close brace ends the variable substitution.
1769 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1770
1771 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1772
1773 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1774
1775 echo "$as_me:$LINENO: checking whether build environment is sane" >&5
1776 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
1777 # Just in case
1778 sleep 1
1779 echo timestamp > conftest.file
1780 # Do `set' in a subshell so we don't clobber the current shell's
1781 # arguments.  Must try -L first in case configure is actually a
1782 # symlink; some systems play weird games with the mod time of symlinks
1783 # (eg FreeBSD returns the mod time of the symlink's containing
1784 # directory).
1785 if (
1786    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1787    if test "$*" = "X"; then
1788       # -L didn't work.
1789       set X `ls -t $srcdir/configure conftest.file`
1790    fi
1791    rm -f conftest.file
1792    if test "$*" != "X $srcdir/configure conftest.file" \
1793       && test "$*" != "X conftest.file $srcdir/configure"; then
1794
1795       # If neither matched, then we have a broken ls.  This can happen
1796       # if, for instance, CONFIG_SHELL is bash and it inherits a
1797       # broken ls alias from the environment.  This has actually
1798       # happened.  Such a system could not be considered "sane".
1799       { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
1800 alias in your environment" >&5
1801 echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
1802 alias in your environment" >&2;}
1803    { (exit 1); exit 1; }; }
1804    fi
1805
1806    test "$2" = conftest.file
1807    )
1808 then
1809    # Ok.
1810    :
1811 else
1812    { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
1813 Check your system clock" >&5
1814 echo "$as_me: error: newly created file is older than distributed files!
1815 Check your system clock" >&2;}
1816    { (exit 1); exit 1; }; }
1817 fi
1818 echo "$as_me:$LINENO: result: yes" >&5
1819 echo "${ECHO_T}yes" >&6
1820 test "$program_prefix" != NONE &&
1821   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1822 # Use a double $ so make ignores it.
1823 test "$program_suffix" != NONE &&
1824   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1825 # Double any \ or $.  echo might interpret backslashes.
1826 # By default was `s,x,x', remove it if useless.
1827 cat <<\_ACEOF >conftest.sed
1828 s/[\\$]/&&/g;s/;s,x,x,$//
1829 _ACEOF
1830 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1831 rm conftest.sed
1832
1833 # expand $ac_aux_dir to an absolute path
1834 am_aux_dir=`cd $ac_aux_dir && pwd`
1835
1836 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
1837 # Use eval to expand $SHELL
1838 if eval "$MISSING --run true"; then
1839   am_missing_run="$MISSING --run "
1840 else
1841   am_missing_run=
1842   { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
1843 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
1844 fi
1845
1846 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
1847   # We used to keeping the `.' as first argument, in order to
1848   # allow $(mkdir_p) to be used without argument.  As in
1849   #   $(mkdir_p) $(somedir)
1850   # where $(somedir) is conditionally defined.  However this is wrong
1851   # for two reasons:
1852   #  1. if the package is installed by a user who cannot write `.'
1853   #     make install will fail,
1854   #  2. the above comment should most certainly read
1855   #     $(mkdir_p) $(DESTDIR)$(somedir)
1856   #     so it does not work when $(somedir) is undefined and
1857   #     $(DESTDIR) is not.
1858   #  To support the latter case, we have to write
1859   #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
1860   #  so the `.' trick is pointless.
1861   mkdir_p='mkdir -p --'
1862 else
1863   # On NextStep and OpenStep, the `mkdir' command does not
1864   # recognize any option.  It will interpret all options as
1865   # directories to create, and then abort because `.' already
1866   # exists.
1867   for d in ./-p ./--version;
1868   do
1869     test -d $d && rmdir $d
1870   done
1871   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
1872   if test -f "$ac_aux_dir/mkinstalldirs"; then
1873     mkdir_p='$(mkinstalldirs)'
1874   else
1875     mkdir_p='$(install_sh) -d'
1876   fi
1877 fi
1878
1879 for ac_prog in gawk mawk nawk awk
1880 do
1881   # Extract the first word of "$ac_prog", so it can be a program name with args.
1882 set dummy $ac_prog; ac_word=$2
1883 echo "$as_me:$LINENO: checking for $ac_word" >&5
1884 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1885 if test "${ac_cv_prog_AWK+set}" = set; then
1886   echo $ECHO_N "(cached) $ECHO_C" >&6
1887 else
1888   if test -n "$AWK"; then
1889   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1890 else
1891 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1892 for as_dir in $PATH
1893 do
1894   IFS=$as_save_IFS
1895   test -z "$as_dir" && as_dir=.
1896   for ac_exec_ext in '' $ac_executable_extensions; do
1897   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1898     ac_cv_prog_AWK="$ac_prog"
1899     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1900     break 2
1901   fi
1902 done
1903 done
1904
1905 fi
1906 fi
1907 AWK=$ac_cv_prog_AWK
1908 if test -n "$AWK"; then
1909   echo "$as_me:$LINENO: result: $AWK" >&5
1910 echo "${ECHO_T}$AWK" >&6
1911 else
1912   echo "$as_me:$LINENO: result: no" >&5
1913 echo "${ECHO_T}no" >&6
1914 fi
1915
1916   test -n "$AWK" && break
1917 done
1918
1919 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
1920 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
1921 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
1922 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1923   echo $ECHO_N "(cached) $ECHO_C" >&6
1924 else
1925   cat >conftest.make <<\_ACEOF
1926 all:
1927         @echo 'ac_maketemp="$(MAKE)"'
1928 _ACEOF
1929 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1930 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1931 if test -n "$ac_maketemp"; then
1932   eval ac_cv_prog_make_${ac_make}_set=yes
1933 else
1934   eval ac_cv_prog_make_${ac_make}_set=no
1935 fi
1936 rm -f conftest.make
1937 fi
1938 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1939   echo "$as_me:$LINENO: result: yes" >&5
1940 echo "${ECHO_T}yes" >&6
1941   SET_MAKE=
1942 else
1943   echo "$as_me:$LINENO: result: no" >&5
1944 echo "${ECHO_T}no" >&6
1945   SET_MAKE="MAKE=${MAKE-make}"
1946 fi
1947
1948 rm -rf .tst 2>/dev/null
1949 mkdir .tst 2>/dev/null
1950 if test -d .tst; then
1951   am__leading_dot=.
1952 else
1953   am__leading_dot=_
1954 fi
1955 rmdir .tst 2>/dev/null
1956
1957 # test to see if srcdir already configured
1958 if test "`cd $srcdir && pwd`" != "`pwd`" &&
1959    test -f $srcdir/config.status; then
1960   { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
1961 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
1962    { (exit 1); exit 1; }; }
1963 fi
1964
1965 # test whether we have cygpath
1966 if test -z "$CYGPATH_W"; then
1967   if (cygpath --version) >/dev/null 2>/dev/null; then
1968     CYGPATH_W='cygpath -w'
1969   else
1970     CYGPATH_W=echo
1971   fi
1972 fi
1973
1974
1975 # Define the identity of the package.
1976  PACKAGE=$OL_PACKAGE
1977  VERSION=$OL_VERSION
1978
1979
1980 # Some tools Automake needs.
1981
1982 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
1983
1984
1985 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
1986
1987
1988 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
1989
1990
1991 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
1992
1993
1994 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
1995
1996 install_sh=${install_sh-"$am_aux_dir/install-sh"}
1997
1998 # Installed binaries are usually stripped using `strip' when the user
1999 # run `make install-strip'.  However `strip' might not be the right
2000 # tool to use in cross-compilation environments, therefore Automake
2001 # will honor the `STRIP' environment variable to overrule this program.
2002 if test "$cross_compiling" != no; then
2003   if test -n "$ac_tool_prefix"; then
2004   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2005 set dummy ${ac_tool_prefix}strip; ac_word=$2
2006 echo "$as_me:$LINENO: checking for $ac_word" >&5
2007 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2008 if test "${ac_cv_prog_STRIP+set}" = set; then
2009   echo $ECHO_N "(cached) $ECHO_C" >&6
2010 else
2011   if test -n "$STRIP"; then
2012   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2013 else
2014 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2015 for as_dir in $PATH
2016 do
2017   IFS=$as_save_IFS
2018   test -z "$as_dir" && as_dir=.
2019   for ac_exec_ext in '' $ac_executable_extensions; do
2020   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2021     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2022     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2023     break 2
2024   fi
2025 done
2026 done
2027
2028 fi
2029 fi
2030 STRIP=$ac_cv_prog_STRIP
2031 if test -n "$STRIP"; then
2032   echo "$as_me:$LINENO: result: $STRIP" >&5
2033 echo "${ECHO_T}$STRIP" >&6
2034 else
2035   echo "$as_me:$LINENO: result: no" >&5
2036 echo "${ECHO_T}no" >&6
2037 fi
2038
2039 fi
2040 if test -z "$ac_cv_prog_STRIP"; then
2041   ac_ct_STRIP=$STRIP
2042   # Extract the first word of "strip", so it can be a program name with args.
2043 set dummy strip; ac_word=$2
2044 echo "$as_me:$LINENO: checking for $ac_word" >&5
2045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2046 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
2047   echo $ECHO_N "(cached) $ECHO_C" >&6
2048 else
2049   if test -n "$ac_ct_STRIP"; then
2050   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2051 else
2052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2053 for as_dir in $PATH
2054 do
2055   IFS=$as_save_IFS
2056   test -z "$as_dir" && as_dir=.
2057   for ac_exec_ext in '' $ac_executable_extensions; do
2058   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2059     ac_cv_prog_ac_ct_STRIP="strip"
2060     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2061     break 2
2062   fi
2063 done
2064 done
2065
2066   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
2067 fi
2068 fi
2069 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2070 if test -n "$ac_ct_STRIP"; then
2071   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
2072 echo "${ECHO_T}$ac_ct_STRIP" >&6
2073 else
2074   echo "$as_me:$LINENO: result: no" >&5
2075 echo "${ECHO_T}no" >&6
2076 fi
2077
2078   STRIP=$ac_ct_STRIP
2079 else
2080   STRIP="$ac_cv_prog_STRIP"
2081 fi
2082
2083 fi
2084 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
2085
2086 # We need awk for the "check" target.  The system "awk" is bad on
2087 # some platforms.
2088 # Always define AMTAR for backward compatibility.
2089
2090 AMTAR=${AMTAR-"${am_missing_run}tar"}
2091
2092 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
2093
2094
2095
2096
2097
2098 cat >>confdefs.h <<_ACEOF
2099 #define OPENLDAP_PACKAGE "$PACKAGE"
2100 _ACEOF
2101
2102
2103 cat >>confdefs.h <<_ACEOF
2104 #define OPENLDAP_VERSION "$VERSION"
2105 _ACEOF
2106
2107
2108
2109 cat >>confdefs.h <<_ACEOF
2110 #define LDAP_VENDOR_VERSION $OL_API_INC
2111 _ACEOF
2112
2113
2114 cat >>confdefs.h <<_ACEOF
2115 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
2116 _ACEOF
2117
2118
2119 cat >>confdefs.h <<_ACEOF
2120 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
2121 _ACEOF
2122
2123
2124 cat >>confdefs.h <<_ACEOF
2125 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
2126 _ACEOF
2127
2128
2129 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
2130
2131 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
2132
2133 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
2134
2135
2136
2137
2138
2139
2140
2141           ac_config_headers="$ac_config_headers include/portable.h:include/portable.hin"
2142
2143           ac_config_headers="$ac_config_headers include/ldap_features.h:include/ldap_features.hin"
2144
2145           ac_config_headers="$ac_config_headers include/lber_types.h:include/lber_types.hin"
2146
2147
2148 echo "$as_me:$LINENO: checking configure arguments" >&5
2149 echo $ECHO_N "checking configure arguments... $ECHO_C" >&6
2150
2151
2152 top_builddir=`pwd`
2153
2154 ldap_subdir="/openldap"
2155
2156
2157 # Check whether --with-subdir or --without-subdir was given.
2158 if test "${with_subdir+set}" = set; then
2159   withval="$with_subdir"
2160   case "$withval" in
2161         no) ldap_subdir=""
2162                 ;;
2163         yes)
2164                 ;;
2165         /*|\\*)
2166                 ldap_subdir="$withval"
2167                 ;;
2168         *)
2169                 ldap_subdir="/$withval"
2170                 ;;
2171 esac
2172
2173 fi;
2174
2175 # OpenLDAP --enable-debug
2176
2177         # Check whether --enable-debug or --disable-debug was given.
2178 if test "${enable_debug+set}" = set; then
2179   enableval="$enable_debug"
2180
2181         ol_arg=invalid
2182         for ol_val in no yes traditional ; do
2183                 if test "$enableval" = "$ol_val" ; then
2184                         ol_arg="$ol_val"
2185                 fi
2186         done
2187         if test "$ol_arg" = "invalid" ; then
2188                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-debug" >&5
2189 echo "$as_me: error: bad value $enableval for --enable-debug" >&2;}
2190    { (exit 1); exit 1; }; }
2191         fi
2192         ol_enable_debug="$ol_arg"
2193
2194 else
2195         ol_enable_debug=yes
2196 fi;
2197 # end --enable-debug
2198 # OpenLDAP --enable-dynamic
2199
2200         # Check whether --enable-dynamic or --disable-dynamic was given.
2201 if test "${enable_dynamic+set}" = set; then
2202   enableval="$enable_dynamic"
2203
2204         ol_arg=invalid
2205         for ol_val in auto yes no ; do
2206                 if test "$enableval" = "$ol_val" ; then
2207                         ol_arg="$ol_val"
2208                 fi
2209         done
2210         if test "$ol_arg" = "invalid" ; then
2211                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dynamic" >&5
2212 echo "$as_me: error: bad value $enableval for --enable-dynamic" >&2;}
2213    { (exit 1); exit 1; }; }
2214         fi
2215         ol_enable_dynamic="$ol_arg"
2216
2217 else
2218         ol_enable_dynamic=no
2219 fi;
2220 # end --enable-dynamic
2221 # OpenLDAP --enable-syslog
2222
2223         # Check whether --enable-syslog or --disable-syslog was given.
2224 if test "${enable_syslog+set}" = set; then
2225   enableval="$enable_syslog"
2226
2227         ol_arg=invalid
2228         for ol_val in auto yes no ; do
2229                 if test "$enableval" = "$ol_val" ; then
2230                         ol_arg="$ol_val"
2231                 fi
2232         done
2233         if test "$ol_arg" = "invalid" ; then
2234                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-syslog" >&5
2235 echo "$as_me: error: bad value $enableval for --enable-syslog" >&2;}
2236    { (exit 1); exit 1; }; }
2237         fi
2238         ol_enable_syslog="$ol_arg"
2239
2240 else
2241         ol_enable_syslog=auto
2242 fi;
2243 # end --enable-syslog
2244 # OpenLDAP --enable-proctitle
2245
2246         # Check whether --enable-proctitle or --disable-proctitle was given.
2247 if test "${enable_proctitle+set}" = set; then
2248   enableval="$enable_proctitle"
2249
2250         ol_arg=invalid
2251         for ol_val in auto yes no ; do
2252                 if test "$enableval" = "$ol_val" ; then
2253                         ol_arg="$ol_val"
2254                 fi
2255         done
2256         if test "$ol_arg" = "invalid" ; then
2257                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-proctitle" >&5
2258 echo "$as_me: error: bad value $enableval for --enable-proctitle" >&2;}
2259    { (exit 1); exit 1; }; }
2260         fi
2261         ol_enable_proctitle="$ol_arg"
2262
2263 else
2264         ol_enable_proctitle=yes
2265 fi;
2266 # end --enable-proctitle
2267 ol_enable_referrals=${ol_enable_referrals-no}
2268 ol_enable_kbind=${ol_enable_kbind-no}
2269 # OpenLDAP --enable-ipv6
2270
2271         # Check whether --enable-ipv6 or --disable-ipv6 was given.
2272 if test "${enable_ipv6+set}" = set; then
2273   enableval="$enable_ipv6"
2274
2275         ol_arg=invalid
2276         for ol_val in auto yes no ; do
2277                 if test "$enableval" = "$ol_val" ; then
2278                         ol_arg="$ol_val"
2279                 fi
2280         done
2281         if test "$ol_arg" = "invalid" ; then
2282                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ipv6" >&5
2283 echo "$as_me: error: bad value $enableval for --enable-ipv6" >&2;}
2284    { (exit 1); exit 1; }; }
2285         fi
2286         ol_enable_ipv6="$ol_arg"
2287
2288 else
2289         ol_enable_ipv6=auto
2290 fi;
2291 # end --enable-ipv6
2292 # OpenLDAP --enable-local
2293
2294         # Check whether --enable-local or --disable-local was given.
2295 if test "${enable_local+set}" = set; then
2296   enableval="$enable_local"
2297
2298         ol_arg=invalid
2299         for ol_val in auto yes no ; do
2300                 if test "$enableval" = "$ol_val" ; then
2301                         ol_arg="$ol_val"
2302                 fi
2303         done
2304         if test "$ol_arg" = "invalid" ; then
2305                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-local" >&5
2306 echo "$as_me: error: bad value $enableval for --enable-local" >&2;}
2307    { (exit 1); exit 1; }; }
2308         fi
2309         ol_enable_local="$ol_arg"
2310
2311 else
2312         ol_enable_local=auto
2313 fi;
2314 # end --enable-local
2315
2316 # OpenLDAP --with-cyrus_sasl
2317
2318 # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
2319 if test "${with_cyrus_sasl+set}" = set; then
2320   withval="$with_cyrus_sasl"
2321
2322         ol_arg=invalid
2323         for ol_val in auto yes no  ; do
2324                 if test "$withval" = "$ol_val" ; then
2325                         ol_arg="$ol_val"
2326                 fi
2327         done
2328         if test "$ol_arg" = "invalid" ; then
2329                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-cyrus_sasl" >&5
2330 echo "$as_me: error: bad value $withval for --with-cyrus_sasl" >&2;}
2331    { (exit 1); exit 1; }; }
2332         fi
2333         ol_with_cyrus_sasl="$ol_arg"
2334
2335 else
2336         ol_with_cyrus_sasl="auto"
2337 fi; # end --with-cyrus_sasl
2338
2339 # OpenLDAP --with-fetch
2340
2341 # Check whether --with-fetch or --without-fetch was given.
2342 if test "${with_fetch+set}" = set; then
2343   withval="$with_fetch"
2344
2345         ol_arg=invalid
2346         for ol_val in auto yes no  ; do
2347                 if test "$withval" = "$ol_val" ; then
2348                         ol_arg="$ol_val"
2349                 fi
2350         done
2351         if test "$ol_arg" = "invalid" ; then
2352                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-fetch" >&5
2353 echo "$as_me: error: bad value $withval for --with-fetch" >&2;}
2354    { (exit 1); exit 1; }; }
2355         fi
2356         ol_with_fetch="$ol_arg"
2357
2358 else
2359         ol_with_fetch="auto"
2360 fi; # end --with-fetch
2361
2362 ol_with_kerberos=${ol_with_kerberos-auto}
2363 # OpenLDAP --with-threads
2364
2365 # Check whether --with-threads or --without-threads was given.
2366 if test "${with_threads+set}" = set; then
2367   withval="$with_threads"
2368
2369         ol_arg=invalid
2370         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
2371                 if test "$withval" = "$ol_val" ; then
2372                         ol_arg="$ol_val"
2373                 fi
2374         done
2375         if test "$ol_arg" = "invalid" ; then
2376                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-threads" >&5
2377 echo "$as_me: error: bad value $withval for --with-threads" >&2;}
2378    { (exit 1); exit 1; }; }
2379         fi
2380         ol_with_threads="$ol_arg"
2381
2382 else
2383         ol_with_threads="auto"
2384 fi; # end --with-threads
2385
2386 # OpenLDAP --with-tls
2387
2388 # Check whether --with-tls or --without-tls was given.
2389 if test "${with_tls+set}" = set; then
2390   withval="$with_tls"
2391
2392         ol_arg=invalid
2393         for ol_val in auto openssl yes no  ; do
2394                 if test "$withval" = "$ol_val" ; then
2395                         ol_arg="$ol_val"
2396                 fi
2397         done
2398         if test "$ol_arg" = "invalid" ; then
2399                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-tls" >&5
2400 echo "$as_me: error: bad value $withval for --with-tls" >&2;}
2401    { (exit 1); exit 1; }; }
2402         fi
2403         ol_with_tls="$ol_arg"
2404
2405 else
2406         ol_with_tls="auto"
2407 fi; # end --with-tls
2408
2409 # OpenLDAP --with-yielding_select
2410
2411 # Check whether --with-yielding_select or --without-yielding_select was given.
2412 if test "${with_yielding_select+set}" = set; then
2413   withval="$with_yielding_select"
2414
2415         ol_arg=invalid
2416         for ol_val in auto yes no manual  ; do
2417                 if test "$withval" = "$ol_val" ; then
2418                         ol_arg="$ol_val"
2419                 fi
2420         done
2421         if test "$ol_arg" = "invalid" ; then
2422                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-yielding_select" >&5
2423 echo "$as_me: error: bad value $withval for --with-yielding_select" >&2;}
2424    { (exit 1); exit 1; }; }
2425         fi
2426         ol_with_yielding_select="$ol_arg"
2427
2428 else
2429         ol_with_yielding_select="auto"
2430 fi; # end --with-yielding_select
2431
2432 # OpenLDAP --with-multiple_precision
2433
2434 # Check whether --with-multiple_precision or --without-multiple_precision was given.
2435 if test "${with_multiple_precision+set}" = set; then
2436   withval="$with_multiple_precision"
2437
2438         ol_arg=invalid
2439         for ol_val in auto bignum gmp yes no  ; do
2440                 if test "$withval" = "$ol_val" ; then
2441                         ol_arg="$ol_val"
2442                 fi
2443         done
2444         if test "$ol_arg" = "invalid" ; then
2445                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-multiple_precision" >&5
2446 echo "$as_me: error: bad value $withval for --with-multiple_precision" >&2;}
2447    { (exit 1); exit 1; }; }
2448         fi
2449         ol_with_multiple_precision="$ol_arg"
2450
2451 else
2452         ol_with_multiple_precision="auto"
2453 fi; # end --with-multiple_precision
2454
2455
2456
2457 # Check whether --enable-xxslapdoptions or --disable-xxslapdoptions was given.
2458 if test "${enable_xxslapdoptions+set}" = set; then
2459   enableval="$enable_xxslapdoptions"
2460
2461 fi;
2462 # OpenLDAP --enable-slapd
2463
2464         # Check whether --enable-slapd or --disable-slapd was given.
2465 if test "${enable_slapd+set}" = set; then
2466   enableval="$enable_slapd"
2467
2468         ol_arg=invalid
2469         for ol_val in auto yes no ; do
2470                 if test "$enableval" = "$ol_val" ; then
2471                         ol_arg="$ol_val"
2472                 fi
2473         done
2474         if test "$ol_arg" = "invalid" ; then
2475                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slapd" >&5
2476 echo "$as_me: error: bad value $enableval for --enable-slapd" >&2;}
2477    { (exit 1); exit 1; }; }
2478         fi
2479         ol_enable_slapd="$ol_arg"
2480
2481 else
2482         ol_enable_slapd=yes
2483 fi;
2484 # end --enable-slapd
2485 # OpenLDAP --enable-dynacl
2486
2487         # Check whether --enable-dynacl or --disable-dynacl was given.
2488 if test "${enable_dynacl+set}" = set; then
2489   enableval="$enable_dynacl"
2490
2491         ol_arg=invalid
2492         for ol_val in auto yes no ; do
2493                 if test "$enableval" = "$ol_val" ; then
2494                         ol_arg="$ol_val"
2495                 fi
2496         done
2497         if test "$ol_arg" = "invalid" ; then
2498                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dynacl" >&5
2499 echo "$as_me: error: bad value $enableval for --enable-dynacl" >&2;}
2500    { (exit 1); exit 1; }; }
2501         fi
2502         ol_enable_dynacl="$ol_arg"
2503
2504 else
2505         ol_enable_dynacl=no
2506 fi;
2507 # end --enable-dynacl
2508 # OpenLDAP --enable-aci
2509
2510         # Check whether --enable-aci or --disable-aci was given.
2511 if test "${enable_aci+set}" = set; then
2512   enableval="$enable_aci"
2513
2514         ol_arg=invalid
2515         for ol_val in no yes mod ; do
2516                 if test "$enableval" = "$ol_val" ; then
2517                         ol_arg="$ol_val"
2518                 fi
2519         done
2520         if test "$ol_arg" = "invalid" ; then
2521                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-aci" >&5
2522 echo "$as_me: error: bad value $enableval for --enable-aci" >&2;}
2523    { (exit 1); exit 1; }; }
2524         fi
2525         ol_enable_aci="$ol_arg"
2526
2527 else
2528         ol_enable_aci=no
2529 fi;
2530 # end --enable-aci
2531 # OpenLDAP --enable-cleartext
2532
2533         # Check whether --enable-cleartext or --disable-cleartext was given.
2534 if test "${enable_cleartext+set}" = set; then
2535   enableval="$enable_cleartext"
2536
2537         ol_arg=invalid
2538         for ol_val in auto yes no ; do
2539                 if test "$enableval" = "$ol_val" ; then
2540                         ol_arg="$ol_val"
2541                 fi
2542         done
2543         if test "$ol_arg" = "invalid" ; then
2544                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-cleartext" >&5
2545 echo "$as_me: error: bad value $enableval for --enable-cleartext" >&2;}
2546    { (exit 1); exit 1; }; }
2547         fi
2548         ol_enable_cleartext="$ol_arg"
2549
2550 else
2551         ol_enable_cleartext=yes
2552 fi;
2553 # end --enable-cleartext
2554 # OpenLDAP --enable-crypt
2555
2556         # Check whether --enable-crypt or --disable-crypt was given.
2557 if test "${enable_crypt+set}" = set; then
2558   enableval="$enable_crypt"
2559
2560         ol_arg=invalid
2561         for ol_val in auto yes no ; do
2562                 if test "$enableval" = "$ol_val" ; then
2563                         ol_arg="$ol_val"
2564                 fi
2565         done
2566         if test "$ol_arg" = "invalid" ; then
2567                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-crypt" >&5
2568 echo "$as_me: error: bad value $enableval for --enable-crypt" >&2;}
2569    { (exit 1); exit 1; }; }
2570         fi
2571         ol_enable_crypt="$ol_arg"
2572
2573 else
2574         ol_enable_crypt=no
2575 fi;
2576 # end --enable-crypt
2577 # OpenLDAP --enable-lmpasswd
2578
2579         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
2580 if test "${enable_lmpasswd+set}" = set; then
2581   enableval="$enable_lmpasswd"
2582
2583         ol_arg=invalid
2584         for ol_val in auto yes no ; do
2585                 if test "$enableval" = "$ol_val" ; then
2586                         ol_arg="$ol_val"
2587                 fi
2588         done
2589         if test "$ol_arg" = "invalid" ; then
2590                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-lmpasswd" >&5
2591 echo "$as_me: error: bad value $enableval for --enable-lmpasswd" >&2;}
2592    { (exit 1); exit 1; }; }
2593         fi
2594         ol_enable_lmpasswd="$ol_arg"
2595
2596 else
2597         ol_enable_lmpasswd=no
2598 fi;
2599 # end --enable-lmpasswd
2600 # OpenLDAP --enable-spasswd
2601
2602         # Check whether --enable-spasswd or --disable-spasswd was given.
2603 if test "${enable_spasswd+set}" = set; then
2604   enableval="$enable_spasswd"
2605
2606         ol_arg=invalid
2607         for ol_val in auto yes no ; do
2608                 if test "$enableval" = "$ol_val" ; then
2609                         ol_arg="$ol_val"
2610                 fi
2611         done
2612         if test "$ol_arg" = "invalid" ; then
2613                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-spasswd" >&5
2614 echo "$as_me: error: bad value $enableval for --enable-spasswd" >&2;}
2615    { (exit 1); exit 1; }; }
2616         fi
2617         ol_enable_spasswd="$ol_arg"
2618
2619 else
2620         ol_enable_spasswd=no
2621 fi;
2622 # end --enable-spasswd
2623 # OpenLDAP --enable-modules
2624
2625         # Check whether --enable-modules or --disable-modules was given.
2626 if test "${enable_modules+set}" = set; then
2627   enableval="$enable_modules"
2628
2629         ol_arg=invalid
2630         for ol_val in auto yes no ; do
2631                 if test "$enableval" = "$ol_val" ; then
2632                         ol_arg="$ol_val"
2633                 fi
2634         done
2635         if test "$ol_arg" = "invalid" ; then
2636                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-modules" >&5
2637 echo "$as_me: error: bad value $enableval for --enable-modules" >&2;}
2638    { (exit 1); exit 1; }; }
2639         fi
2640         ol_enable_modules="$ol_arg"
2641
2642 else
2643         ol_enable_modules=no
2644 fi;
2645 # end --enable-modules
2646 ol_enable_multimaster=${ol_enable_multimaster-no}
2647 # OpenLDAP --enable-rewrite
2648
2649         # Check whether --enable-rewrite or --disable-rewrite was given.
2650 if test "${enable_rewrite+set}" = set; then
2651   enableval="$enable_rewrite"
2652
2653         ol_arg=invalid
2654         for ol_val in auto yes no ; do
2655                 if test "$enableval" = "$ol_val" ; then
2656                         ol_arg="$ol_val"
2657                 fi
2658         done
2659         if test "$ol_arg" = "invalid" ; then
2660                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rewrite" >&5
2661 echo "$as_me: error: bad value $enableval for --enable-rewrite" >&2;}
2662    { (exit 1); exit 1; }; }
2663         fi
2664         ol_enable_rewrite="$ol_arg"
2665
2666 else
2667         ol_enable_rewrite=auto
2668 fi;
2669 # end --enable-rewrite
2670 # OpenLDAP --enable-rlookups
2671
2672         # Check whether --enable-rlookups or --disable-rlookups was given.
2673 if test "${enable_rlookups+set}" = set; then
2674   enableval="$enable_rlookups"
2675
2676         ol_arg=invalid
2677         for ol_val in auto yes no ; do
2678                 if test "$enableval" = "$ol_val" ; then
2679                         ol_arg="$ol_val"
2680                 fi
2681         done
2682         if test "$ol_arg" = "invalid" ; then
2683                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rlookups" >&5
2684 echo "$as_me: error: bad value $enableval for --enable-rlookups" >&2;}
2685    { (exit 1); exit 1; }; }
2686         fi
2687         ol_enable_rlookups="$ol_arg"
2688
2689 else
2690         ol_enable_rlookups=no
2691 fi;
2692 # end --enable-rlookups
2693 # OpenLDAP --enable-slapi
2694
2695         # Check whether --enable-slapi or --disable-slapi was given.
2696 if test "${enable_slapi+set}" = set; then
2697   enableval="$enable_slapi"
2698
2699         ol_arg=invalid
2700         for ol_val in auto yes no ; do
2701                 if test "$enableval" = "$ol_val" ; then
2702                         ol_arg="$ol_val"
2703                 fi
2704         done
2705         if test "$ol_arg" = "invalid" ; then
2706                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slapi" >&5
2707 echo "$as_me: error: bad value $enableval for --enable-slapi" >&2;}
2708    { (exit 1); exit 1; }; }
2709         fi
2710         ol_enable_slapi="$ol_arg"
2711
2712 else
2713         ol_enable_slapi=no
2714 fi;
2715 # end --enable-slapi
2716 # OpenLDAP --enable-slp
2717
2718         # Check whether --enable-slp or --disable-slp was given.
2719 if test "${enable_slp+set}" = set; then
2720   enableval="$enable_slp"
2721
2722         ol_arg=invalid
2723         for ol_val in auto yes no ; do
2724                 if test "$enableval" = "$ol_val" ; then
2725                         ol_arg="$ol_val"
2726                 fi
2727         done
2728         if test "$ol_arg" = "invalid" ; then
2729                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slp" >&5
2730 echo "$as_me: error: bad value $enableval for --enable-slp" >&2;}
2731    { (exit 1); exit 1; }; }
2732         fi
2733         ol_enable_slp="$ol_arg"
2734
2735 else
2736         ol_enable_slp=no
2737 fi;
2738 # end --enable-slp
2739 # OpenLDAP --enable-wrappers
2740
2741         # Check whether --enable-wrappers or --disable-wrappers was given.
2742 if test "${enable_wrappers+set}" = set; then
2743   enableval="$enable_wrappers"
2744
2745         ol_arg=invalid
2746         for ol_val in auto yes no ; do
2747                 if test "$enableval" = "$ol_val" ; then
2748                         ol_arg="$ol_val"
2749                 fi
2750         done
2751         if test "$ol_arg" = "invalid" ; then
2752                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-wrappers" >&5
2753 echo "$as_me: error: bad value $enableval for --enable-wrappers" >&2;}
2754    { (exit 1); exit 1; }; }
2755         fi
2756         ol_enable_wrappers="$ol_arg"
2757
2758 else
2759         ol_enable_wrappers=no
2760 fi;
2761 # end --enable-wrappers
2762
2763 Backends="bdb \
2764         dnssrv \
2765         hdb \
2766         ldap \
2767         ldbm \
2768         meta \
2769         monitor \
2770         null \
2771         passwd \
2772         perl \
2773         relay \
2774         shell \
2775         sql"
2776
2777 # Check whether --enable-xxslapbackends or --disable-xxslapbackends was given.
2778 if test "${enable_xxslapbackends+set}" = set; then
2779   enableval="$enable_xxslapbackends"
2780
2781 fi;
2782
2783 # OpenLDAP --enable-backends
2784
2785         # Check whether --enable-backends or --disable-backends was given.
2786 if test "${enable_backends+set}" = set; then
2787   enableval="$enable_backends"
2788
2789         ol_arg=invalid
2790         for ol_val in no yes mod ; do
2791                 if test "$enableval" = "$ol_val" ; then
2792                         ol_arg="$ol_val"
2793                 fi
2794         done
2795         if test "$ol_arg" = "invalid" ; then
2796                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-backends" >&5
2797 echo "$as_me: error: bad value $enableval for --enable-backends" >&2;}
2798    { (exit 1); exit 1; }; }
2799         fi
2800         ol_enable_backends="$ol_arg"
2801
2802 fi;
2803 # end --enable-backends
2804 # OpenLDAP --enable-bdb
2805
2806         # Check whether --enable-bdb or --disable-bdb was given.
2807 if test "${enable_bdb+set}" = set; then
2808   enableval="$enable_bdb"
2809
2810         ol_arg=invalid
2811         for ol_val in no yes mod ; do
2812                 if test "$enableval" = "$ol_val" ; then
2813                         ol_arg="$ol_val"
2814                 fi
2815         done
2816         if test "$ol_arg" = "invalid" ; then
2817                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-bdb" >&5
2818 echo "$as_me: error: bad value $enableval for --enable-bdb" >&2;}
2819    { (exit 1); exit 1; }; }
2820         fi
2821         ol_enable_bdb="$ol_arg"
2822
2823 else
2824         ol_enable_bdb=${ol_enable_backends:-yes}
2825 fi;
2826 # end --enable-bdb
2827 # OpenLDAP --enable-dnssrv
2828
2829         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2830 if test "${enable_dnssrv+set}" = set; then
2831   enableval="$enable_dnssrv"
2832
2833         ol_arg=invalid
2834         for ol_val in no yes mod ; do
2835                 if test "$enableval" = "$ol_val" ; then
2836                         ol_arg="$ol_val"
2837                 fi
2838         done
2839         if test "$ol_arg" = "invalid" ; then
2840                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dnssrv" >&5
2841 echo "$as_me: error: bad value $enableval for --enable-dnssrv" >&2;}
2842    { (exit 1); exit 1; }; }
2843         fi
2844         ol_enable_dnssrv="$ol_arg"
2845
2846 else
2847         ol_enable_dnssrv=${ol_enable_backends:-no}
2848 fi;
2849 # end --enable-dnssrv
2850 # OpenLDAP --enable-hdb
2851
2852         # Check whether --enable-hdb or --disable-hdb was given.
2853 if test "${enable_hdb+set}" = set; then
2854   enableval="$enable_hdb"
2855
2856         ol_arg=invalid
2857         for ol_val in no yes mod ; do
2858                 if test "$enableval" = "$ol_val" ; then
2859                         ol_arg="$ol_val"
2860                 fi
2861         done
2862         if test "$ol_arg" = "invalid" ; then
2863                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-hdb" >&5
2864 echo "$as_me: error: bad value $enableval for --enable-hdb" >&2;}
2865    { (exit 1); exit 1; }; }
2866         fi
2867         ol_enable_hdb="$ol_arg"
2868
2869 else
2870         ol_enable_hdb=${ol_enable_backends:-yes}
2871 fi;
2872 # end --enable-hdb
2873 # OpenLDAP --enable-ldap
2874
2875         # Check whether --enable-ldap or --disable-ldap was given.
2876 if test "${enable_ldap+set}" = set; then
2877   enableval="$enable_ldap"
2878
2879         ol_arg=invalid
2880         for ol_val in no yes mod ; do
2881                 if test "$enableval" = "$ol_val" ; then
2882                         ol_arg="$ol_val"
2883                 fi
2884         done
2885         if test "$ol_arg" = "invalid" ; then
2886                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldap" >&5
2887 echo "$as_me: error: bad value $enableval for --enable-ldap" >&2;}
2888    { (exit 1); exit 1; }; }
2889         fi
2890         ol_enable_ldap="$ol_arg"
2891
2892 else
2893         ol_enable_ldap=${ol_enable_backends:-no}
2894 fi;
2895 # end --enable-ldap
2896 # OpenLDAP --enable-ldbm
2897
2898         # Check whether --enable-ldbm or --disable-ldbm was given.
2899 if test "${enable_ldbm+set}" = set; then
2900   enableval="$enable_ldbm"
2901
2902         ol_arg=invalid
2903         for ol_val in no yes mod ; do
2904                 if test "$enableval" = "$ol_val" ; then
2905                         ol_arg="$ol_val"
2906                 fi
2907         done
2908         if test "$ol_arg" = "invalid" ; then
2909                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldbm" >&5
2910 echo "$as_me: error: bad value $enableval for --enable-ldbm" >&2;}
2911    { (exit 1); exit 1; }; }
2912         fi
2913         ol_enable_ldbm="$ol_arg"
2914
2915 else
2916         ol_enable_ldbm=${ol_enable_backends:-no}
2917 fi;
2918 # end --enable-ldbm
2919
2920 # Check whether --with-ldbm_api or --without-ldbm_api was given.
2921 if test "${with_ldbm_api+set}" = set; then
2922   withval="$with_ldbm_api"
2923
2924         { echo "$as_me:$LINENO: WARNING: Please use --enable-ldbm-api instead of --with-ldbm-api" >&5
2925 echo "$as_me: WARNING: Please use --enable-ldbm-api instead of --with-ldbm-api" >&2;}
2926         enable_ldbm_api="$with_ldbm_api"
2927 fi;
2928 # OpenLDAP --enable-ldbm_api
2929
2930         # Check whether --enable-ldbm_api or --disable-ldbm_api was given.
2931 if test "${enable_ldbm_api+set}" = set; then
2932   enableval="$enable_ldbm_api"
2933
2934         ol_arg=invalid
2935         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2936                 if test "$enableval" = "$ol_val" ; then
2937                         ol_arg="$ol_val"
2938                 fi
2939         done
2940         if test "$ol_arg" = "invalid" ; then
2941                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldbm_api" >&5
2942 echo "$as_me: error: bad value $enableval for --enable-ldbm_api" >&2;}
2943    { (exit 1); exit 1; }; }
2944         fi
2945         ol_enable_ldbm_api="$ol_arg"
2946
2947 else
2948         ol_enable_ldbm_api=auto
2949 fi;
2950 # end --enable-ldbm_api
2951
2952
2953 # Check whether --with-ldbm_type or --without-ldbm_type was given.
2954 if test "${with_ldbm_type+set}" = set; then
2955   withval="$with_ldbm_type"
2956
2957         { echo "$as_me:$LINENO: WARNING: Please use --enable-ldbm-type instead of --with-ldbm-type" >&5
2958 echo "$as_me: WARNING: Please use --enable-ldbm-type instead of --with-ldbm-type" >&2;}
2959         enable_ldbm_type="$with_ldbm_type"
2960 fi;
2961 # OpenLDAP --enable-ldbm_type
2962
2963         # Check whether --enable-ldbm_type or --disable-ldbm_type was given.
2964 if test "${enable_ldbm_type+set}" = set; then
2965   enableval="$enable_ldbm_type"
2966
2967         ol_arg=invalid
2968         for ol_val in auto btree hash ; do
2969                 if test "$enableval" = "$ol_val" ; then
2970                         ol_arg="$ol_val"
2971                 fi
2972         done
2973         if test "$ol_arg" = "invalid" ; then
2974                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldbm_type" >&5
2975 echo "$as_me: error: bad value $enableval for --enable-ldbm_type" >&2;}
2976    { (exit 1); exit 1; }; }
2977         fi
2978         ol_enable_ldbm_type="$ol_arg"
2979
2980 else
2981         ol_enable_ldbm_type=auto
2982 fi;
2983 # end --enable-ldbm_type
2984
2985 # OpenLDAP --enable-meta
2986
2987         # Check whether --enable-meta or --disable-meta was given.
2988 if test "${enable_meta+set}" = set; then
2989   enableval="$enable_meta"
2990
2991         ol_arg=invalid
2992         for ol_val in no yes mod ; do
2993                 if test "$enableval" = "$ol_val" ; then
2994                         ol_arg="$ol_val"
2995                 fi
2996         done
2997         if test "$ol_arg" = "invalid" ; then
2998                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-meta" >&5
2999 echo "$as_me: error: bad value $enableval for --enable-meta" >&2;}
3000    { (exit 1); exit 1; }; }
3001         fi
3002         ol_enable_meta="$ol_arg"
3003
3004 else
3005         ol_enable_meta=${ol_enable_backends:-no}
3006 fi;
3007 # end --enable-meta
3008 # OpenLDAP --enable-monitor
3009
3010         # Check whether --enable-monitor or --disable-monitor was given.
3011 if test "${enable_monitor+set}" = set; then
3012   enableval="$enable_monitor"
3013
3014         ol_arg=invalid
3015         for ol_val in no yes mod ; do
3016                 if test "$enableval" = "$ol_val" ; then
3017                         ol_arg="$ol_val"
3018                 fi
3019         done
3020         if test "$ol_arg" = "invalid" ; then
3021                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-monitor" >&5
3022 echo "$as_me: error: bad value $enableval for --enable-monitor" >&2;}
3023    { (exit 1); exit 1; }; }
3024         fi
3025         ol_enable_monitor="$ol_arg"
3026
3027 else
3028         ol_enable_monitor=${ol_enable_backends:-yes}
3029 fi;
3030 # end --enable-monitor
3031 # OpenLDAP --enable-null
3032
3033         # Check whether --enable-null or --disable-null was given.
3034 if test "${enable_null+set}" = set; then
3035   enableval="$enable_null"
3036
3037         ol_arg=invalid
3038         for ol_val in no yes mod ; do
3039                 if test "$enableval" = "$ol_val" ; then
3040                         ol_arg="$ol_val"
3041                 fi
3042         done
3043         if test "$ol_arg" = "invalid" ; then
3044                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-null" >&5
3045 echo "$as_me: error: bad value $enableval for --enable-null" >&2;}
3046    { (exit 1); exit 1; }; }
3047         fi
3048         ol_enable_null="$ol_arg"
3049
3050 else
3051         ol_enable_null=${ol_enable_backends:-no}
3052 fi;
3053 # end --enable-null
3054 # OpenLDAP --enable-passwd
3055
3056         # Check whether --enable-passwd or --disable-passwd was given.
3057 if test "${enable_passwd+set}" = set; then
3058   enableval="$enable_passwd"
3059
3060         ol_arg=invalid
3061         for ol_val in no yes mod ; do
3062                 if test "$enableval" = "$ol_val" ; then
3063                         ol_arg="$ol_val"
3064                 fi
3065         done
3066         if test "$ol_arg" = "invalid" ; then
3067                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-passwd" >&5
3068 echo "$as_me: error: bad value $enableval for --enable-passwd" >&2;}
3069    { (exit 1); exit 1; }; }
3070         fi
3071         ol_enable_passwd="$ol_arg"
3072
3073 else
3074         ol_enable_passwd=${ol_enable_backends:-no}
3075 fi;
3076 # end --enable-passwd
3077 # OpenLDAP --enable-perl
3078
3079         # Check whether --enable-perl or --disable-perl was given.
3080 if test "${enable_perl+set}" = set; then
3081   enableval="$enable_perl"
3082
3083         ol_arg=invalid
3084         for ol_val in no yes mod ; do
3085                 if test "$enableval" = "$ol_val" ; then
3086                         ol_arg="$ol_val"
3087                 fi
3088         done
3089         if test "$ol_arg" = "invalid" ; then
3090                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-perl" >&5
3091 echo "$as_me: error: bad value $enableval for --enable-perl" >&2;}
3092    { (exit 1); exit 1; }; }
3093         fi
3094         ol_enable_perl="$ol_arg"
3095
3096 else
3097         ol_enable_perl=${ol_enable_backends:-no}
3098 fi;
3099 # end --enable-perl
3100 # OpenLDAP --enable-relay
3101
3102         # Check whether --enable-relay or --disable-relay was given.
3103 if test "${enable_relay+set}" = set; then
3104   enableval="$enable_relay"
3105
3106         ol_arg=invalid
3107         for ol_val in no yes mod ; do
3108                 if test "$enableval" = "$ol_val" ; then
3109                         ol_arg="$ol_val"
3110                 fi
3111         done
3112         if test "$ol_arg" = "invalid" ; then
3113                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-relay" >&5
3114 echo "$as_me: error: bad value $enableval for --enable-relay" >&2;}
3115    { (exit 1); exit 1; }; }
3116         fi
3117         ol_enable_relay="$ol_arg"
3118
3119 else
3120         ol_enable_relay=${ol_enable_backends:-yes}
3121 fi;
3122 # end --enable-relay
3123 # OpenLDAP --enable-shell
3124
3125         # Check whether --enable-shell or --disable-shell was given.
3126 if test "${enable_shell+set}" = set; then
3127   enableval="$enable_shell"
3128
3129         ol_arg=invalid
3130         for ol_val in no yes mod ; do
3131                 if test "$enableval" = "$ol_val" ; then
3132                         ol_arg="$ol_val"
3133                 fi
3134         done
3135         if test "$ol_arg" = "invalid" ; then
3136                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-shell" >&5
3137 echo "$as_me: error: bad value $enableval for --enable-shell" >&2;}
3138    { (exit 1); exit 1; }; }
3139         fi
3140         ol_enable_shell="$ol_arg"
3141
3142 else
3143         ol_enable_shell=${ol_enable_backends:-no}
3144 fi;
3145 # end --enable-shell
3146 # OpenLDAP --enable-sql
3147
3148         # Check whether --enable-sql or --disable-sql was given.
3149 if test "${enable_sql+set}" = set; then
3150   enableval="$enable_sql"
3151
3152         ol_arg=invalid
3153         for ol_val in no yes mod ; do
3154                 if test "$enableval" = "$ol_val" ; then
3155                         ol_arg="$ol_val"
3156                 fi
3157         done
3158         if test "$ol_arg" = "invalid" ; then
3159                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-sql" >&5
3160 echo "$as_me: error: bad value $enableval for --enable-sql" >&2;}
3161    { (exit 1); exit 1; }; }
3162         fi
3163         ol_enable_sql="$ol_arg"
3164
3165 else
3166         ol_enable_sql=${ol_enable_backends:-no}
3167 fi;
3168 # end --enable-sql
3169
3170 Overlays="accesslog \
3171         dds \
3172         denyop \
3173         dyngroup \
3174         dynlist \
3175         lastmod \
3176         ppolicy \
3177         proxycache \
3178         refint \
3179         retcode \
3180         rwm \
3181         syncprov \
3182         translucent \
3183         unique \
3184         valsort"
3185
3186 # Check whether --enable-xxslapoverlays or --disable-xxslapoverlays was given.
3187 if test "${enable_xxslapoverlays+set}" = set; then
3188   enableval="$enable_xxslapoverlays"
3189
3190 fi;
3191
3192 # OpenLDAP --enable-overlays
3193
3194         # Check whether --enable-overlays or --disable-overlays was given.
3195 if test "${enable_overlays+set}" = set; then
3196   enableval="$enable_overlays"
3197
3198         ol_arg=invalid
3199         for ol_val in no yes mod ; do
3200                 if test "$enableval" = "$ol_val" ; then
3201                         ol_arg="$ol_val"
3202                 fi
3203         done
3204         if test "$ol_arg" = "invalid" ; then
3205                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-overlays" >&5
3206 echo "$as_me: error: bad value $enableval for --enable-overlays" >&2;}
3207    { (exit 1); exit 1; }; }
3208         fi
3209         ol_enable_overlays="$ol_arg"
3210
3211 fi;
3212 # end --enable-overlays
3213 # OpenLDAP --enable-accesslog
3214
3215         # Check whether --enable-accesslog or --disable-accesslog was given.
3216 if test "${enable_accesslog+set}" = set; then
3217   enableval="$enable_accesslog"
3218
3219         ol_arg=invalid
3220         for ol_val in no yes mod ; do
3221                 if test "$enableval" = "$ol_val" ; then
3222                         ol_arg="$ol_val"
3223                 fi
3224         done
3225         if test "$ol_arg" = "invalid" ; then
3226                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-accesslog" >&5
3227 echo "$as_me: error: bad value $enableval for --enable-accesslog" >&2;}
3228    { (exit 1); exit 1; }; }
3229         fi
3230         ol_enable_accesslog="$ol_arg"
3231
3232 else
3233         ol_enable_accesslog=${ol_enable_overlays:-no}
3234 fi;
3235 # end --enable-accesslog
3236
3237 # OpenLDAP --enable-dds
3238
3239         # Check whether --enable-dds or --disable-dds was given.
3240 if test "${enable_dds+set}" = set; then
3241   enableval="$enable_dds"
3242
3243         ol_arg=invalid
3244         for ol_val in no yes mod ; do
3245                 if test "$enableval" = "$ol_val" ; then
3246                         ol_arg="$ol_val"
3247                 fi
3248         done
3249         if test "$ol_arg" = "invalid" ; then
3250                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dds" >&5
3251 echo "$as_me: error: bad value $enableval for --enable-dds" >&2;}
3252    { (exit 1); exit 1; }; }
3253         fi
3254         ol_enable_dds="$ol_arg"
3255
3256 else
3257         ol_enable_dds=${ol_enable_overlays:-no}
3258 fi;
3259 # end --enable-dds
3260
3261 # OpenLDAP --enable-denyop
3262
3263         # Check whether --enable-denyop or --disable-denyop was given.
3264 if test "${enable_denyop+set}" = set; then
3265   enableval="$enable_denyop"
3266
3267         ol_arg=invalid
3268         for ol_val in no yes mod ; do
3269                 if test "$enableval" = "$ol_val" ; then
3270                         ol_arg="$ol_val"
3271                 fi
3272         done
3273         if test "$ol_arg" = "invalid" ; then
3274                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-denyop" >&5
3275 echo "$as_me: error: bad value $enableval for --enable-denyop" >&2;}
3276    { (exit 1); exit 1; }; }
3277         fi
3278         ol_enable_denyop="$ol_arg"
3279
3280 else
3281         ol_enable_denyop=${ol_enable_overlays:-no}
3282 fi;
3283 # end --enable-denyop
3284
3285 # OpenLDAP --enable-dyngroup
3286
3287         # Check whether --enable-dyngroup or --disable-dyngroup was given.
3288 if test "${enable_dyngroup+set}" = set; then
3289   enableval="$enable_dyngroup"
3290
3291         ol_arg=invalid
3292         for ol_val in no yes mod ; do
3293                 if test "$enableval" = "$ol_val" ; then
3294                         ol_arg="$ol_val"
3295                 fi
3296         done
3297         if test "$ol_arg" = "invalid" ; then
3298                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dyngroup" >&5
3299 echo "$as_me: error: bad value $enableval for --enable-dyngroup" >&2;}
3300    { (exit 1); exit 1; }; }
3301         fi
3302         ol_enable_dyngroup="$ol_arg"
3303
3304 else
3305         ol_enable_dyngroup=${ol_enable_overlays:-no}
3306 fi;
3307 # end --enable-dyngroup
3308
3309 # OpenLDAP --enable-dynlist
3310
3311         # Check whether --enable-dynlist or --disable-dynlist was given.
3312 if test "${enable_dynlist+set}" = set; then
3313   enableval="$enable_dynlist"
3314
3315         ol_arg=invalid
3316         for ol_val in no yes mod ; do
3317                 if test "$enableval" = "$ol_val" ; then
3318                         ol_arg="$ol_val"
3319                 fi
3320         done
3321         if test "$ol_arg" = "invalid" ; then
3322                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dynlist" >&5
3323 echo "$as_me: error: bad value $enableval for --enable-dynlist" >&2;}
3324    { (exit 1); exit 1; }; }
3325         fi
3326         ol_enable_dynlist="$ol_arg"
3327
3328 else
3329         ol_enable_dynlist=${ol_enable_overlays:-no}
3330 fi;
3331 # end --enable-dynlist
3332
3333 # OpenLDAP --enable-lastmod
3334
3335         # Check whether --enable-lastmod or --disable-lastmod was given.
3336 if test "${enable_lastmod+set}" = set; then
3337   enableval="$enable_lastmod"
3338
3339         ol_arg=invalid
3340         for ol_val in no yes mod ; do
3341                 if test "$enableval" = "$ol_val" ; then
3342                         ol_arg="$ol_val"
3343                 fi
3344         done
3345         if test "$ol_arg" = "invalid" ; then
3346                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-lastmod" >&5
3347 echo "$as_me: error: bad value $enableval for --enable-lastmod" >&2;}
3348    { (exit 1); exit 1; }; }
3349         fi
3350         ol_enable_lastmod="$ol_arg"
3351
3352 else
3353         ol_enable_lastmod=${ol_enable_overlays:-no}
3354 fi;
3355 # end --enable-lastmod
3356
3357 # OpenLDAP --enable-ppolicy
3358
3359         # Check whether --enable-ppolicy or --disable-ppolicy was given.
3360 if test "${enable_ppolicy+set}" = set; then
3361   enableval="$enable_ppolicy"
3362
3363         ol_arg=invalid
3364         for ol_val in no yes mod ; do
3365                 if test "$enableval" = "$ol_val" ; then
3366                         ol_arg="$ol_val"
3367                 fi
3368         done
3369         if test "$ol_arg" = "invalid" ; then
3370                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ppolicy" >&5
3371 echo "$as_me: error: bad value $enableval for --enable-ppolicy" >&2;}
3372    { (exit 1); exit 1; }; }
3373         fi
3374         ol_enable_ppolicy="$ol_arg"
3375
3376 else
3377         ol_enable_ppolicy=${ol_enable_overlays:-no}
3378 fi;
3379 # end --enable-ppolicy
3380
3381 # OpenLDAP --enable-proxycache
3382
3383         # Check whether --enable-proxycache or --disable-proxycache was given.
3384 if test "${enable_proxycache+set}" = set; then
3385   enableval="$enable_proxycache"
3386
3387         ol_arg=invalid
3388         for ol_val in no yes mod ; do
3389                 if test "$enableval" = "$ol_val" ; then
3390                         ol_arg="$ol_val"
3391                 fi
3392         done
3393         if test "$ol_arg" = "invalid" ; then
3394                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-proxycache" >&5
3395 echo "$as_me: error: bad value $enableval for --enable-proxycache" >&2;}
3396    { (exit 1); exit 1; }; }
3397         fi
3398         ol_enable_proxycache="$ol_arg"
3399
3400 else
3401         ol_enable_proxycache=${ol_enable_overlays:-no}
3402 fi;
3403 # end --enable-proxycache
3404
3405 # OpenLDAP --enable-refint
3406
3407         # Check whether --enable-refint or --disable-refint was given.
3408 if test "${enable_refint+set}" = set; then
3409   enableval="$enable_refint"
3410
3411         ol_arg=invalid
3412         for ol_val in no yes mod ; do
3413                 if test "$enableval" = "$ol_val" ; then
3414                         ol_arg="$ol_val"
3415                 fi
3416         done
3417         if test "$ol_arg" = "invalid" ; then
3418                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-refint" >&5
3419 echo "$as_me: error: bad value $enableval for --enable-refint" >&2;}
3420    { (exit 1); exit 1; }; }
3421         fi
3422         ol_enable_refint="$ol_arg"
3423
3424 else
3425         ol_enable_refint=${ol_enable_overlays:-no}
3426 fi;
3427 # end --enable-refint
3428
3429 # OpenLDAP --enable-retcode
3430
3431         # Check whether --enable-retcode or --disable-retcode was given.
3432 if test "${enable_retcode+set}" = set; then
3433   enableval="$enable_retcode"
3434
3435         ol_arg=invalid
3436         for ol_val in no yes mod ; do
3437                 if test "$enableval" = "$ol_val" ; then
3438                         ol_arg="$ol_val"
3439                 fi
3440         done
3441         if test "$ol_arg" = "invalid" ; then
3442                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-retcode" >&5
3443 echo "$as_me: error: bad value $enableval for --enable-retcode" >&2;}
3444    { (exit 1); exit 1; }; }
3445         fi
3446         ol_enable_retcode="$ol_arg"
3447
3448 else
3449         ol_enable_retcode=${ol_enable_overlays:-no}
3450 fi;
3451 # end --enable-retcode
3452
3453 # OpenLDAP --enable-rwm
3454
3455         # Check whether --enable-rwm or --disable-rwm was given.
3456 if test "${enable_rwm+set}" = set; then
3457   enableval="$enable_rwm"
3458
3459         ol_arg=invalid
3460         for ol_val in no yes mod ; do
3461                 if test "$enableval" = "$ol_val" ; then
3462                         ol_arg="$ol_val"
3463                 fi
3464         done
3465         if test "$ol_arg" = "invalid" ; then
3466                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rwm" >&5
3467 echo "$as_me: error: bad value $enableval for --enable-rwm" >&2;}
3468    { (exit 1); exit 1; }; }
3469         fi
3470         ol_enable_rwm="$ol_arg"
3471
3472 else
3473         ol_enable_rwm=${ol_enable_overlays:-no}
3474 fi;
3475 # end --enable-rwm
3476
3477 # OpenLDAP --enable-syncprov
3478
3479         # Check whether --enable-syncprov or --disable-syncprov was given.
3480 if test "${enable_syncprov+set}" = set; then
3481   enableval="$enable_syncprov"
3482
3483         ol_arg=invalid
3484         for ol_val in no yes mod ; do
3485                 if test "$enableval" = "$ol_val" ; then
3486                         ol_arg="$ol_val"
3487                 fi
3488         done
3489         if test "$ol_arg" = "invalid" ; then
3490                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-syncprov" >&5
3491 echo "$as_me: error: bad value $enableval for --enable-syncprov" >&2;}
3492    { (exit 1); exit 1; }; }
3493         fi
3494         ol_enable_syncprov="$ol_arg"
3495
3496 else
3497         ol_enable_syncprov=${ol_enable_overlays:-yes}
3498 fi;
3499 # end --enable-syncprov
3500
3501 # OpenLDAP --enable-translucent
3502
3503         # Check whether --enable-translucent or --disable-translucent was given.
3504 if test "${enable_translucent+set}" = set; then
3505   enableval="$enable_translucent"
3506
3507         ol_arg=invalid
3508         for ol_val in no yes mod ; do
3509                 if test "$enableval" = "$ol_val" ; then
3510                         ol_arg="$ol_val"
3511                 fi
3512         done
3513         if test "$ol_arg" = "invalid" ; then
3514                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-translucent" >&5
3515 echo "$as_me: error: bad value $enableval for --enable-translucent" >&2;}
3516    { (exit 1); exit 1; }; }
3517         fi
3518         ol_enable_translucent="$ol_arg"
3519
3520 else
3521         ol_enable_translucent=${ol_enable_overlays:-no}
3522 fi;
3523 # end --enable-translucent
3524
3525 # OpenLDAP --enable-unique
3526
3527         # Check whether --enable-unique or --disable-unique was given.
3528 if test "${enable_unique+set}" = set; then
3529   enableval="$enable_unique"
3530
3531         ol_arg=invalid
3532         for ol_val in no yes mod ; do
3533                 if test "$enableval" = "$ol_val" ; then
3534                         ol_arg="$ol_val"
3535                 fi
3536         done
3537         if test "$ol_arg" = "invalid" ; then
3538                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-unique" >&5
3539 echo "$as_me: error: bad value $enableval for --enable-unique" >&2;}
3540    { (exit 1); exit 1; }; }
3541         fi
3542         ol_enable_unique="$ol_arg"
3543
3544 else
3545         ol_enable_unique=${ol_enable_overlays:-no}
3546 fi;
3547 # end --enable-unique
3548
3549 # OpenLDAP --enable-valsort
3550
3551         # Check whether --enable-valsort or --disable-valsort was given.
3552 if test "${enable_valsort+set}" = set; then
3553   enableval="$enable_valsort"
3554
3555         ol_arg=invalid
3556         for ol_val in no yes mod ; do
3557                 if test "$enableval" = "$ol_val" ; then
3558                         ol_arg="$ol_val"
3559                 fi
3560         done
3561         if test "$ol_arg" = "invalid" ; then
3562                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-valsort" >&5
3563 echo "$as_me: error: bad value $enableval for --enable-valsort" >&2;}
3564    { (exit 1); exit 1; }; }
3565         fi
3566         ol_enable_valsort="$ol_arg"
3567
3568 else
3569         ol_enable_valsort=${ol_enable_overlays:-no}
3570 fi;
3571 # end --enable-valsort
3572
3573
3574 # Check whether --enable-xxslurpdoptions or --disable-xxslurpdoptions was given.
3575 if test "${enable_xxslurpdoptions+set}" = set; then
3576   enableval="$enable_xxslurpdoptions"
3577
3578 fi;
3579 # OpenLDAP --enable-slurpd
3580
3581         # Check whether --enable-slurpd or --disable-slurpd was given.
3582 if test "${enable_slurpd+set}" = set; then
3583   enableval="$enable_slurpd"
3584
3585         ol_arg=invalid
3586         for ol_val in auto yes no ; do
3587                 if test "$enableval" = "$ol_val" ; then
3588                         ol_arg="$ol_val"
3589                 fi
3590         done
3591         if test "$ol_arg" = "invalid" ; then
3592                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slurpd" >&5
3593 echo "$as_me: error: bad value $enableval for --enable-slurpd" >&2;}
3594    { (exit 1); exit 1; }; }
3595         fi
3596         ol_enable_slurpd="$ol_arg"
3597
3598 else
3599         ol_enable_slurpd=auto
3600 fi;
3601 # end --enable-slurpd
3602
3603 # Check whether --enable-xxliboptions or --disable-xxliboptions was given.
3604 if test "${enable_xxliboptions+set}" = set; then
3605   enableval="$enable_xxliboptions"
3606
3607 fi;
3608 # Check whether --enable-static or --disable-static was given.
3609 if test "${enable_static+set}" = set; then
3610   enableval="$enable_static"
3611   p=${PACKAGE-default}
3612     case $enableval in
3613     yes) enable_static=yes ;;
3614     no) enable_static=no ;;
3615     *)
3616      enable_static=no
3617       # Look at the argument we got.  We use all the common list separators.
3618       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3619       for pkg in $enableval; do
3620         IFS="$lt_save_ifs"
3621         if test "X$pkg" = "X$p"; then
3622           enable_static=yes
3623         fi
3624       done
3625       IFS="$lt_save_ifs"
3626       ;;
3627     esac
3628 else
3629   enable_static=yes
3630 fi;
3631
3632 # Check whether --enable-shared or --disable-shared was given.
3633 if test "${enable_shared+set}" = set; then
3634   enableval="$enable_shared"
3635   p=${PACKAGE-default}
3636     case $enableval in
3637     yes) enable_shared=yes ;;
3638     no) enable_shared=no ;;
3639     *)
3640       enable_shared=no
3641       # Look at the argument we got.  We use all the common list separators.
3642       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3643       for pkg in $enableval; do
3644         IFS="$lt_save_ifs"
3645         if test "X$pkg" = "X$p"; then
3646           enable_shared=yes
3647         fi
3648       done
3649       IFS="$lt_save_ifs"
3650       ;;
3651     esac
3652 else
3653   enable_shared=yes
3654 fi;
3655
3656
3657
3658 # validate options
3659 if test $ol_enable_slapd = no ; then
3660                 if test $ol_enable_slapi = yes ; then
3661                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-slapi argument" >&5
3662 echo "$as_me: WARNING: slapd disabled, ignoring --enable-slapi argument" >&2;}
3663         fi
3664         case "$ol_enable_backends" in yes | mod)
3665                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-backends argument" >&5
3666 echo "$as_me: WARNING: slapd disabled, ignoring --enable-backends argument" >&2;}
3667         esac
3668         for i in $Backends; do
3669                 eval "ol_tmp=\$ol_enable_$i"
3670                 if test $ol_tmp != no ; then
3671                         { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
3672 echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
3673                         eval "ol_enable_$i=no"
3674                 fi
3675         done
3676         if test $ol_enable_modules = yes ; then
3677                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-modules argument" >&5
3678 echo "$as_me: WARNING: slapd disabled, ignoring --enable-modules argument" >&2;}
3679         fi
3680         if test $ol_enable_multimaster = yes ; then
3681                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-multimaster argument" >&5
3682 echo "$as_me: WARNING: slapd disabled, ignoring --enable-multimaster argument" >&2;}
3683         fi
3684         if test $ol_enable_wrappers = yes ; then
3685                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&5
3686 echo "$as_me: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&2;}
3687         fi
3688         if test $ol_enable_rlookups = yes ; then
3689                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&5
3690 echo "$as_me: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&2;}
3691         fi
3692         if test $ol_enable_dynacl = yes ; then
3693                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&5
3694 echo "$as_me: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&2;}
3695         fi
3696         if test $ol_enable_aci != no ; then
3697                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-aci argument" >&5
3698 echo "$as_me: WARNING: slapd disabled, ignoring --enable-aci argument" >&2;}
3699         fi
3700         if test $ol_enable_ldbm_api != auto ; then
3701                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-ldbm-api argument" >&5
3702 echo "$as_me: WARNING: slapd disabled, ignoring --enable-ldbm-api argument" >&2;}
3703         fi
3704         if test $ol_enable_ldbm_type != auto ; then
3705                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-ldbm-type argument" >&5
3706 echo "$as_me: WARNING: slapd disabled, ignoring --enable-ldbm-type argument" >&2;}
3707         fi
3708         if test $ol_enable_slurpd = yes ; then
3709                 { { echo "$as_me:$LINENO: error: slurpd requires slapd" >&5
3710 echo "$as_me: error: slurpd requires slapd" >&2;}
3711    { (exit 1); exit 1; }; }
3712         fi
3713         if test $ol_enable_rewrite = yes ; then
3714                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&5
3715 echo "$as_me: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&2;}
3716         fi
3717                 case "$ol_enable_overlays" in yes | mod)
3718                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-overlays argument" >&5
3719 echo "$as_me: WARNING: slapd disabled, ignoring --enable-overlays argument" >&2;}
3720         esac
3721         for i in $Overlays; do
3722                 eval "ol_tmp=\$ol_enable_$i"
3723                 if test $ol_tmp != no ; then
3724                         { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
3725 echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
3726                         eval "ol_enable_$i=no"
3727                 fi
3728         done
3729
3730         # force settings to no
3731         ol_enable_slapi=no
3732
3733         ol_enable_backends=
3734         ol_enable_overlays=
3735         ol_enable_modules=no
3736         ol_enable_multimaster=no
3737         ol_enable_rlookups=no
3738         ol_enable_dynacl=no
3739         ol_enable_aci=no
3740         ol_enable_wrappers=no
3741
3742         ol_enable_ldbm_api=no
3743         ol_enable_ldbm_type=no
3744
3745         ol_enable_slurpd=no
3746
3747         ol_enable_rewrite=no
3748
3749 elif test $ol_enable_ldbm = no ; then
3750
3751         if test $ol_enable_ldbm_api != auto ; then
3752                 { echo "$as_me:$LINENO: WARNING: LDBM disabled, ignoring --enable-ldbm-api argument" >&5
3753 echo "$as_me: WARNING: LDBM disabled, ignoring --enable-ldbm-api argument" >&2;}
3754         fi
3755
3756         if test $ol_enable_ldbm_type != auto ; then
3757                 { echo "$as_me:$LINENO: WARNING: LDBM disabled, ignoring --enable-ldbm-type argument" >&5
3758 echo "$as_me: WARNING: LDBM disabled, ignoring --enable-ldbm-type argument" >&2;}
3759         fi
3760
3761         if test $ol_enable_modules != yes &&
3762            test $ol_enable_bdb = no &&
3763            test $ol_enable_dnssrv = no &&
3764            test $ol_enable_hdb = no &&
3765            test $ol_enable_ldap = no &&
3766            test $ol_enable_meta = no &&
3767            test $ol_enable_monitor = no &&
3768            test $ol_enable_null = no &&
3769            test $ol_enable_passwd = no &&
3770            test $ol_enable_perl = no &&
3771            test $ol_enable_relay = no &&
3772            test $ol_enable_shell = no &&
3773            test $ol_enable_sql = no ; then
3774
3775                 if test $ol_enable_slapd = yes ; then
3776                         { { echo "$as_me:$LINENO: error: slapd requires a backend" >&5
3777 echo "$as_me: error: slapd requires a backend" >&2;}
3778    { (exit 1); exit 1; }; }
3779                 else
3780                         { echo "$as_me:$LINENO: WARNING: skipping slapd, no backend specified" >&5
3781 echo "$as_me: WARNING: skipping slapd, no backend specified" >&2;}
3782                         ol_enable_slapd=no
3783                 fi
3784         fi
3785
3786         ol_enable_ldbm_api=no
3787         ol_enable_ldbm_type=no
3788
3789         if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
3790                 ol_enable_ldbm_api=berkeley
3791         fi
3792
3793 else
3794                 if test $ol_enable_ldbm_api = gdbm &&
3795            test $ol_enable_ldbm_type = btree ; then
3796                 { { echo "$as_me:$LINENO: error: GDBM only supports LDBM type hash" >&5
3797 echo "$as_me: error: GDBM only supports LDBM type hash" >&2;}
3798    { (exit 1); exit 1; }; }
3799         fi
3800         if test $ol_enable_ldbm_api = mdbm &&
3801            test $ol_enable_ldbm_type = btree ; then
3802                 { { echo "$as_me:$LINENO: error: MDBM only supports LDBM type hash" >&5
3803 echo "$as_me: error: MDBM only supports LDBM type hash" >&2;}
3804    { (exit 1); exit 1; }; }
3805         fi
3806         if test $ol_enable_ldbm_api = ndbm &&
3807            test $ol_enable_ldbm_type = btree ; then
3808                 { { echo "$as_me:$LINENO: error: NDBM only supports LDBM type hash" >&5
3809 echo "$as_me: error: NDBM only supports LDBM type hash" >&2;}
3810    { (exit 1); exit 1; }; }
3811         fi
3812
3813         if test $ol_enable_bdb/$ol_enable_hdb != no/no ; then
3814                 if test $ol_enable_ldbm_api = auto ; then
3815                         ol_enable_ldbm_api=berkeley
3816                 elif test $ol_enable_ldbm_api != berkeley ; then
3817                         { { echo "$as_me:$LINENO: error: LDBM API not compatible with BDB/HDB" >&5
3818 echo "$as_me: error: LDBM API not compatible with BDB/HDB" >&2;}
3819    { (exit 1); exit 1; }; }
3820                 fi
3821         fi
3822 fi
3823
3824 if test $ol_enable_meta/$ol_enable_ldap = yes/no ; then
3825         { { echo "$as_me:$LINENO: error: --enable-meta requires --enable-ldap" >&5
3826 echo "$as_me: error: --enable-meta requires --enable-ldap" >&2;}
3827    { (exit 1); exit 1; }; }
3828 fi
3829
3830 if test $ol_enable_slurpd = yes ; then
3831                 if test $ol_with_threads = no ; then
3832                 { { echo "$as_me:$LINENO: error: slurpd requires threads" >&5
3833 echo "$as_me: error: slurpd requires threads" >&2;}
3834    { (exit 1); exit 1; }; }
3835         fi
3836 fi
3837
3838 if test $ol_enable_lmpasswd = yes ; then
3839         if test $ol_with_tls = no ; then
3840                 { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5
3841 echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;}
3842    { (exit 1); exit 1; }; }
3843         fi
3844 fi
3845
3846 if test $ol_enable_kbind = yes ; then
3847         if test $ol_with_kerberos = no ; then
3848                 { { echo "$as_me:$LINENO: error: options require --with-kerberos" >&5
3849 echo "$as_me: error: options require --with-kerberos" >&2;}
3850    { (exit 1); exit 1; }; }
3851         elif test $ol_with_kerberos = auto ; then
3852                 ol_with_kerberos=yes
3853         fi
3854
3855 elif test $ol_enable_kbind = no ; then
3856         if test $ol_with_kerberos = auto ; then
3857                 ol_with_kerberos=no
3858         elif test $ol_with_kerberos != no ; then
3859                 { echo "$as_me:$LINENO: WARNING: Kerberos detection enabled unnecessarily" >&5
3860 echo "$as_me: WARNING: Kerberos detection enabled unnecessarily" >&2;};
3861                 ol_with_kerberos=no
3862         fi
3863 fi
3864
3865 if test $ol_enable_spasswd = yes ; then
3866         if test $ol_with_cyrus_sasl = no ; then
3867                 { { echo "$as_me:$LINENO: error: options require --with-cyrus-sasl" >&5
3868 echo "$as_me: error: options require --with-cyrus-sasl" >&2;}
3869    { (exit 1); exit 1; }; }
3870         fi
3871         ol_with_cyrus_sasl=yes
3872 fi
3873
3874 echo "$as_me:$LINENO: result: done" >&5
3875 echo "${ECHO_T}done" >&6
3876
3877 LDAP_LIBS=
3878 LDBM_LIBS=
3879 LTHREAD_LIBS=
3880 LUTIL_LIBS=
3881
3882 SLAPD_LIBS=
3883 SLURPD_LIBS=
3884
3885 BUILD_SLAPD=no
3886 BUILD_SLURPD=no
3887
3888 BUILD_THREAD=no
3889
3890 BUILD_SLAPI=no
3891 SLAPD_SLAPI_DEPEND=
3892
3893 BUILD_BDB=no
3894 BUILD_DNSSRV=no
3895 BUILD_HDB=no
3896 BUILD_LDAP=no
3897 BUILD_LDBM=no
3898 BUILD_META=no
3899 BUILD_MONITOR=no
3900 BUILD_NULL=no
3901 BUILD_PASSWD=no
3902 BUILD_PERL=no
3903 BUILD_RELAY=no
3904 BUILD_SHELL=no
3905 BUILD_SQL=no
3906
3907 BUILD_ACCESSLOG=no
3908 BUILD_DDS=no
3909 BUILD_DENYOP=no
3910 BUILD_DYNGROUP=no
3911 BUILD_DYNLIST=no
3912 BUILD_LASTMOD=no
3913 BUILD_PPOLICY=no
3914 BUILD_PROXYCACHE=no
3915 BUILD_REFINT=no
3916 BUILD_RETCODE=no
3917 BUILD_RWM=no
3918 BUILD_SYNCPROV=no
3919 BUILD_TRANSLUCENT=no
3920 BUILD_UNIQUE=no
3921 BUILD_VALSORT=no
3922
3923 SLAPD_STATIC_OVERLAYS=
3924 SLAPD_DYNAMIC_OVERLAYS=
3925
3926 SLAPD_MODULES_LDFLAGS=
3927 SLAPD_MODULES_CPPFLAGS=
3928
3929 SLAPD_STATIC_BACKENDS=back-ldif
3930 SLAPD_DYNAMIC_BACKENDS=
3931
3932 SLAPD_PERL_LDFLAGS=
3933 MOD_PERL_LDFLAGS=
3934 PERL_CPPFLAGS=
3935
3936 SLAPD_SQL_LDFLAGS=
3937 SLAPD_SQL_LIBS=
3938 SLAPD_SQL_INCLUDES=
3939
3940 KRB4_LIBS=
3941 KRB5_LIBS=
3942 SASL_LIBS=
3943 TLS_LIBS=
3944 MODULES_LIBS=
3945 SLAPI_LIBS=
3946 LIBSLAPI=
3947 LIBSLAPITOOLS=
3948 AUTH_LIBS=
3949 ICU_LIBS=
3950
3951 SLAPD_SLP_LIBS=
3952 SLAPD_GMP_LIBS=
3953
3954
3955
3956 cat >>confdefs.h <<\_ACEOF
3957 #define HAVE_MKVERSION 1
3958 _ACEOF
3959
3960
3961
3962
3963 ol_aix_threads=no
3964 case "$target" in
3965 *-*-aix*)       if test -z "$CC" ; then
3966                 case "$ol_with_threads" in
3967                 auto | yes |  posix) ol_aix_threads=yes ;;
3968                 esac
3969         fi
3970 ;;
3971 esac
3972
3973 if test $ol_aix_threads = yes ; then
3974         if test -z "${CC}" ; then
3975                 for ac_prog in cc_r xlc_r cc
3976 do
3977   # Extract the first word of "$ac_prog", so it can be a program name with args.
3978 set dummy $ac_prog; ac_word=$2
3979 echo "$as_me:$LINENO: checking for $ac_word" >&5
3980 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3981 if test "${ac_cv_prog_CC+set}" = set; then
3982   echo $ECHO_N "(cached) $ECHO_C" >&6
3983 else
3984   if test -n "$CC"; then
3985   ac_cv_prog_CC="$CC" # Let the user override the test.
3986 else
3987 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3988 for as_dir in $PATH
3989 do
3990   IFS=$as_save_IFS
3991   test -z "$as_dir" && as_dir=.
3992   for ac_exec_ext in '' $ac_executable_extensions; do
3993   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3994     ac_cv_prog_CC="$ac_prog"
3995     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3996     break 2
3997   fi
3998 done
3999 done
4000
4001 fi
4002 fi
4003 CC=$ac_cv_prog_CC
4004 if test -n "$CC"; then
4005   echo "$as_me:$LINENO: result: $CC" >&5
4006 echo "${ECHO_T}$CC" >&6
4007 else
4008   echo "$as_me:$LINENO: result: no" >&5
4009 echo "${ECHO_T}no" >&6
4010 fi
4011
4012   test -n "$CC" && break
4013 done
4014
4015
4016                 if test "$CC" = cc ; then
4017                                                 if test $ol_with_threads != auto ; then
4018                                 { { echo "$as_me:$LINENO: error: --with-threads requires cc_r (or other suitable compiler) on AIX" >&5
4019 echo "$as_me: error: --with-threads requires cc_r (or other suitable compiler) on AIX" >&2;}
4020    { (exit 1); exit 1; }; }
4021                         else
4022                                 { echo "$as_me:$LINENO: WARNING: disabling threads, no cc_r on AIX" >&5
4023 echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
4024                         fi
4025                         ol_with_threads=no
4026                 fi
4027         fi
4028
4029         case ${CC} in cc_r | xlc_r)
4030                 ol_with_threads=posix
4031                 ol_cv_pthread_create=yes
4032                 ;;
4033         esac
4034 fi
4035
4036 if test -z "${CC}"; then
4037         for ac_prog in cc gcc
4038 do
4039   # Extract the first word of "$ac_prog", so it can be a program name with args.
4040 set dummy $ac_prog; ac_word=$2
4041 echo "$as_me:$LINENO: checking for $ac_word" >&5
4042 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4043 if test "${ac_cv_prog_CC+set}" = set; then
4044   echo $ECHO_N "(cached) $ECHO_C" >&6
4045 else
4046   if test -n "$CC"; then
4047   ac_cv_prog_CC="$CC" # Let the user override the test.
4048 else
4049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4050 for as_dir in $PATH
4051 do
4052   IFS=$as_save_IFS
4053   test -z "$as_dir" && as_dir=.
4054   for ac_exec_ext in '' $ac_executable_extensions; do
4055   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4056     ac_cv_prog_CC="$ac_prog"
4057     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4058     break 2
4059   fi
4060 done
4061 done
4062
4063 fi
4064 fi
4065 CC=$ac_cv_prog_CC
4066 if test -n "$CC"; then
4067   echo "$as_me:$LINENO: result: $CC" >&5
4068 echo "${ECHO_T}$CC" >&6
4069 else
4070   echo "$as_me:$LINENO: result: no" >&5
4071 echo "${ECHO_T}no" >&6
4072 fi
4073
4074   test -n "$CC" && break
4075 done
4076 test -n "$CC" || CC="missing"
4077
4078
4079         if test "${CC}" = "missing" ; then
4080                 { { echo "$as_me:$LINENO: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." >&5
4081 echo "$as_me: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." >&2;}
4082    { (exit 1); exit 1; }; }
4083         fi
4084 fi
4085
4086 if test -z "${AR}"; then
4087         for ac_prog in ar gar
4088 do
4089   # Extract the first word of "$ac_prog", so it can be a program name with args.
4090 set dummy $ac_prog; ac_word=$2
4091 echo "$as_me:$LINENO: checking for $ac_word" >&5
4092 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4093 if test "${ac_cv_prog_AR+set}" = set; then
4094   echo $ECHO_N "(cached) $ECHO_C" >&6
4095 else
4096   if test -n "$AR"; then
4097   ac_cv_prog_AR="$AR" # Let the user override the test.
4098 else
4099 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4100 for as_dir in $PATH
4101 do
4102   IFS=$as_save_IFS
4103   test -z "$as_dir" && as_dir=.
4104   for ac_exec_ext in '' $ac_executable_extensions; do
4105   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4106     ac_cv_prog_AR="$ac_prog"
4107     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4108     break 2
4109   fi
4110 done
4111 done
4112
4113 fi
4114 fi
4115 AR=$ac_cv_prog_AR
4116 if test -n "$AR"; then
4117   echo "$as_me:$LINENO: result: $AR" >&5
4118 echo "${ECHO_T}$AR" >&6
4119 else
4120   echo "$as_me:$LINENO: result: no" >&5
4121 echo "${ECHO_T}no" >&6
4122 fi
4123
4124   test -n "$AR" && break
4125 done
4126 test -n "$AR" || AR="missing"
4127
4128
4129         if test "${AR}" = "missing" ; then
4130                 { { echo "$as_me:$LINENO: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." >&5
4131 echo "$as_me: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." >&2;}
4132    { (exit 1); exit 1; }; }
4133         fi
4134 fi
4135
4136
4137
4138
4139
4140 # Check whether --enable-fast-install or --disable-fast-install was given.
4141 if test "${enable_fast_install+set}" = set; then
4142   enableval="$enable_fast_install"
4143   p=${PACKAGE-default}
4144     case $enableval in
4145     yes) enable_fast_install=yes ;;
4146     no) enable_fast_install=no ;;
4147     *)
4148       enable_fast_install=no
4149       # Look at the argument we got.  We use all the common list separators.
4150       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4151       for pkg in $enableval; do
4152         IFS="$lt_save_ifs"
4153         if test "X$pkg" = "X$p"; then
4154           enable_fast_install=yes
4155         fi
4156       done
4157       IFS="$lt_save_ifs"
4158       ;;
4159     esac
4160 else
4161   enable_fast_install=yes
4162 fi;
4163
4164 DEPDIR="${am__leading_dot}deps"
4165
4166           ac_config_commands="$ac_config_commands depfiles"
4167
4168
4169 am_make=${MAKE-make}
4170 cat > confinc << 'END'
4171 am__doit:
4172         @echo done
4173 .PHONY: am__doit
4174 END
4175 # If we don't find an include directive, just comment out the code.
4176 echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
4177 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
4178 am__include="#"
4179 am__quote=
4180 _am_result=none
4181 # First try GNU make style include.
4182 echo "include confinc" > confmf
4183 # We grep out `Entering directory' and `Leaving directory'
4184 # messages which can occur if `w' ends up in MAKEFLAGS.
4185 # In particular we don't look at `^make:' because GNU make might
4186 # be invoked under some other name (usually "gmake"), in which
4187 # case it prints its new name instead of `make'.
4188 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
4189    am__include=include
4190    am__quote=
4191    _am_result=GNU
4192 fi
4193 # Now try BSD make style include.
4194 if test "$am__include" = "#"; then
4195    echo '.include "confinc"' > confmf
4196    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
4197       am__include=.include
4198       am__quote="\""
4199       _am_result=BSD
4200    fi
4201 fi
4202
4203
4204 echo "$as_me:$LINENO: result: $_am_result" >&5
4205 echo "${ECHO_T}$_am_result" >&6
4206 rm -f confinc confmf
4207
4208 # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
4209 if test "${enable_dependency_tracking+set}" = set; then
4210   enableval="$enable_dependency_tracking"
4211
4212 fi;
4213 if test "x$enable_dependency_tracking" != xno; then
4214   am_depcomp="$ac_aux_dir/depcomp"
4215   AMDEPBACKSLASH='\'
4216 fi
4217
4218
4219 if test "x$enable_dependency_tracking" != xno; then
4220   AMDEP_TRUE=
4221   AMDEP_FALSE='#'
4222 else
4223   AMDEP_TRUE='#'
4224   AMDEP_FALSE=
4225 fi
4226
4227
4228
4229 ac_ext=c
4230 ac_cpp='$CPP $CPPFLAGS'
4231 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4232 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4233 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4234 if test -n "$ac_tool_prefix"; then
4235   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4236 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4237 echo "$as_me:$LINENO: checking for $ac_word" >&5
4238 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4239 if test "${ac_cv_prog_CC+set}" = set; then
4240   echo $ECHO_N "(cached) $ECHO_C" >&6
4241 else
4242   if test -n "$CC"; then
4243   ac_cv_prog_CC="$CC" # Let the user override the test.
4244 else
4245 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4246 for as_dir in $PATH
4247 do
4248   IFS=$as_save_IFS
4249   test -z "$as_dir" && as_dir=.
4250   for ac_exec_ext in '' $ac_executable_extensions; do
4251   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4252     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4253     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4254     break 2
4255   fi
4256 done
4257 done
4258
4259 fi
4260 fi
4261 CC=$ac_cv_prog_CC
4262 if test -n "$CC"; then
4263   echo "$as_me:$LINENO: result: $CC" >&5
4264 echo "${ECHO_T}$CC" >&6
4265 else
4266   echo "$as_me:$LINENO: result: no" >&5
4267 echo "${ECHO_T}no" >&6
4268 fi
4269
4270 fi
4271 if test -z "$ac_cv_prog_CC"; then
4272   ac_ct_CC=$CC
4273   # Extract the first word of "gcc", so it can be a program name with args.
4274 set dummy gcc; ac_word=$2
4275 echo "$as_me:$LINENO: checking for $ac_word" >&5
4276 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4277 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4278   echo $ECHO_N "(cached) $ECHO_C" >&6
4279 else
4280   if test -n "$ac_ct_CC"; then
4281   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4282 else
4283 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4284 for as_dir in $PATH
4285 do
4286   IFS=$as_save_IFS
4287   test -z "$as_dir" && as_dir=.
4288   for ac_exec_ext in '' $ac_executable_extensions; do
4289   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4290     ac_cv_prog_ac_ct_CC="gcc"
4291     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4292     break 2
4293   fi
4294 done
4295 done
4296
4297 fi
4298 fi
4299 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4300 if test -n "$ac_ct_CC"; then
4301   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4302 echo "${ECHO_T}$ac_ct_CC" >&6
4303 else
4304   echo "$as_me:$LINENO: result: no" >&5
4305 echo "${ECHO_T}no" >&6
4306 fi
4307
4308   CC=$ac_ct_CC
4309 else
4310   CC="$ac_cv_prog_CC"
4311 fi
4312
4313 if test -z "$CC"; then
4314   if test -n "$ac_tool_prefix"; then
4315   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4316 set dummy ${ac_tool_prefix}cc; ac_word=$2
4317 echo "$as_me:$LINENO: checking for $ac_word" >&5
4318 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4319 if test "${ac_cv_prog_CC+set}" = set; then
4320   echo $ECHO_N "(cached) $ECHO_C" >&6
4321 else
4322   if test -n "$CC"; then
4323   ac_cv_prog_CC="$CC" # Let the user override the test.
4324 else
4325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4326 for as_dir in $PATH
4327 do
4328   IFS=$as_save_IFS
4329   test -z "$as_dir" && as_dir=.
4330   for ac_exec_ext in '' $ac_executable_extensions; do
4331   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4332     ac_cv_prog_CC="${ac_tool_prefix}cc"
4333     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4334     break 2
4335   fi
4336 done
4337 done
4338
4339 fi
4340 fi
4341 CC=$ac_cv_prog_CC
4342 if test -n "$CC"; then
4343   echo "$as_me:$LINENO: result: $CC" >&5
4344 echo "${ECHO_T}$CC" >&6
4345 else
4346   echo "$as_me:$LINENO: result: no" >&5
4347 echo "${ECHO_T}no" >&6
4348 fi
4349
4350 fi
4351 if test -z "$ac_cv_prog_CC"; then
4352   ac_ct_CC=$CC
4353   # Extract the first word of "cc", so it can be a program name with args.
4354 set dummy cc; ac_word=$2
4355 echo "$as_me:$LINENO: checking for $ac_word" >&5
4356 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4357 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4358   echo $ECHO_N "(cached) $ECHO_C" >&6
4359 else
4360   if test -n "$ac_ct_CC"; then
4361   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4362 else
4363 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4364 for as_dir in $PATH
4365 do
4366   IFS=$as_save_IFS
4367   test -z "$as_dir" && as_dir=.
4368   for ac_exec_ext in '' $ac_executable_extensions; do
4369   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4370     ac_cv_prog_ac_ct_CC="cc"
4371     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4372     break 2
4373   fi
4374 done
4375 done
4376
4377 fi
4378 fi
4379 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4380 if test -n "$ac_ct_CC"; then
4381   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4382 echo "${ECHO_T}$ac_ct_CC" >&6
4383 else
4384   echo "$as_me:$LINENO: result: no" >&5
4385 echo "${ECHO_T}no" >&6
4386 fi
4387
4388   CC=$ac_ct_CC
4389 else
4390   CC="$ac_cv_prog_CC"
4391 fi
4392
4393 fi
4394 if test -z "$CC"; then
4395   # Extract the first word of "cc", so it can be a program name with args.
4396 set dummy cc; ac_word=$2
4397 echo "$as_me:$LINENO: checking for $ac_word" >&5
4398 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4399 if test "${ac_cv_prog_CC+set}" = set; then
4400   echo $ECHO_N "(cached) $ECHO_C" >&6
4401 else
4402   if test -n "$CC"; then
4403   ac_cv_prog_CC="$CC" # Let the user override the test.
4404 else
4405   ac_prog_rejected=no
4406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4407 for as_dir in $PATH
4408 do
4409   IFS=$as_save_IFS
4410   test -z "$as_dir" && as_dir=.
4411   for ac_exec_ext in '' $ac_executable_extensions; do
4412   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4413     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4414        ac_prog_rejected=yes
4415        continue
4416      fi
4417     ac_cv_prog_CC="cc"
4418     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4419     break 2
4420   fi
4421 done
4422 done
4423
4424 if test $ac_prog_rejected = yes; then
4425   # We found a bogon in the path, so make sure we never use it.
4426   set dummy $ac_cv_prog_CC
4427   shift
4428   if test $# != 0; then
4429     # We chose a different compiler from the bogus one.
4430     # However, it has the same basename, so the bogon will be chosen
4431     # first if we set CC to just the basename; use the full file name.
4432     shift
4433     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4434   fi
4435 fi
4436 fi
4437 fi
4438 CC=$ac_cv_prog_CC
4439 if test -n "$CC"; then
4440   echo "$as_me:$LINENO: result: $CC" >&5
4441 echo "${ECHO_T}$CC" >&6
4442 else
4443   echo "$as_me:$LINENO: result: no" >&5
4444 echo "${ECHO_T}no" >&6
4445 fi
4446
4447 fi
4448 if test -z "$CC"; then
4449   if test -n "$ac_tool_prefix"; then
4450   for ac_prog in cl
4451   do
4452     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4453 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4454 echo "$as_me:$LINENO: checking for $ac_word" >&5
4455 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4456 if test "${ac_cv_prog_CC+set}" = set; then
4457   echo $ECHO_N "(cached) $ECHO_C" >&6
4458 else
4459   if test -n "$CC"; then
4460   ac_cv_prog_CC="$CC" # Let the user override the test.
4461 else
4462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4463 for as_dir in $PATH
4464 do
4465   IFS=$as_save_IFS
4466   test -z "$as_dir" && as_dir=.
4467   for ac_exec_ext in '' $ac_executable_extensions; do
4468   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4469     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4470     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4471     break 2
4472   fi
4473 done
4474 done
4475
4476 fi
4477 fi
4478 CC=$ac_cv_prog_CC
4479 if test -n "$CC"; then
4480   echo "$as_me:$LINENO: result: $CC" >&5
4481 echo "${ECHO_T}$CC" >&6
4482 else
4483   echo "$as_me:$LINENO: result: no" >&5
4484 echo "${ECHO_T}no" >&6
4485 fi
4486
4487     test -n "$CC" && break
4488   done
4489 fi
4490 if test -z "$CC"; then
4491   ac_ct_CC=$CC
4492   for ac_prog in cl
4493 do
4494   # Extract the first word of "$ac_prog", so it can be a program name with args.
4495 set dummy $ac_prog; ac_word=$2
4496 echo "$as_me:$LINENO: checking for $ac_word" >&5
4497 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4498 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4499   echo $ECHO_N "(cached) $ECHO_C" >&6
4500 else
4501   if test -n "$ac_ct_CC"; then
4502   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4503 else
4504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4505 for as_dir in $PATH
4506 do
4507   IFS=$as_save_IFS
4508   test -z "$as_dir" && as_dir=.
4509   for ac_exec_ext in '' $ac_executable_extensions; do
4510   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4511     ac_cv_prog_ac_ct_CC="$ac_prog"
4512     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4513     break 2
4514   fi
4515 done
4516 done
4517
4518 fi
4519 fi
4520 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4521 if test -n "$ac_ct_CC"; then
4522   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4523 echo "${ECHO_T}$ac_ct_CC" >&6
4524 else
4525   echo "$as_me:$LINENO: result: no" >&5
4526 echo "${ECHO_T}no" >&6
4527 fi
4528
4529   test -n "$ac_ct_CC" && break
4530 done
4531
4532   CC=$ac_ct_CC
4533 fi
4534
4535 fi
4536
4537
4538 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
4539 See \`config.log' for more details." >&5
4540 echo "$as_me: error: no acceptable C compiler found in \$PATH
4541 See \`config.log' for more details." >&2;}
4542    { (exit 1); exit 1; }; }
4543
4544 # Provide some information about the compiler.
4545 echo "$as_me:$LINENO:" \
4546      "checking for C compiler version" >&5
4547 ac_compiler=`set X $ac_compile; echo $2`
4548 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
4549   (eval $ac_compiler --version </dev/null >&5) 2>&5
4550   ac_status=$?
4551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4552   (exit $ac_status); }
4553 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
4554   (eval $ac_compiler -v </dev/null >&5) 2>&5
4555   ac_status=$?
4556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4557   (exit $ac_status); }
4558 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
4559   (eval $ac_compiler -V </dev/null >&5) 2>&5
4560   ac_status=$?
4561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4562   (exit $ac_status); }
4563
4564 cat >conftest.$ac_ext <<_ACEOF
4565 /* confdefs.h.  */
4566 _ACEOF
4567 cat confdefs.h >>conftest.$ac_ext
4568 cat >>conftest.$ac_ext <<_ACEOF
4569 /* end confdefs.h.  */
4570
4571 int
4572 main ()
4573 {
4574
4575   ;
4576   return 0;
4577 }
4578 _ACEOF
4579 ac_clean_files_save=$ac_clean_files
4580 ac_clean_files="$ac_clean_files a.out a.exe b.out"
4581 # Try to create an executable without -o first, disregard a.out.
4582 # It will help us diagnose broken compilers, and finding out an intuition
4583 # of exeext.
4584 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
4585 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
4586 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4587 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
4588   (eval $ac_link_default) 2>&5
4589   ac_status=$?
4590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4591   (exit $ac_status); }; then
4592   # Find the output, starting from the most likely.  This scheme is
4593 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
4594 # resort.
4595
4596 # Be careful to initialize this variable, since it used to be cached.
4597 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
4598 ac_cv_exeext=
4599 # b.out is created by i960 compilers.
4600 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
4601 do
4602   test -f "$ac_file" || continue
4603   case $ac_file in
4604     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
4605         ;;
4606     conftest.$ac_ext )
4607         # This is the source file.
4608         ;;
4609     [ab].out )
4610         # We found the default executable, but exeext='' is most
4611         # certainly right.
4612         break;;
4613     *.* )
4614         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4615         # FIXME: I believe we export ac_cv_exeext for Libtool,
4616         # but it would be cool to find out if it's true.  Does anybody
4617         # maintain Libtool? --akim.
4618         export ac_cv_exeext
4619         break;;
4620     * )
4621         break;;
4622   esac
4623 done
4624 else
4625   echo "$as_me: failed program was:" >&5
4626 sed 's/^/| /' conftest.$ac_ext >&5
4627
4628 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
4629 See \`config.log' for more details." >&5
4630 echo "$as_me: error: C compiler cannot create executables
4631 See \`config.log' for more details." >&2;}
4632    { (exit 77); exit 77; }; }
4633 fi
4634
4635 ac_exeext=$ac_cv_exeext
4636 echo "$as_me:$LINENO: result: $ac_file" >&5
4637 echo "${ECHO_T}$ac_file" >&6
4638
4639 # Check the compiler produces executables we can run.  If not, either
4640 # the compiler is broken, or we cross compile.
4641 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
4642 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
4643 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
4644 # If not cross compiling, check that we can run a simple program.
4645 if test "$cross_compiling" != yes; then
4646   if { ac_try='./$ac_file'
4647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4648   (eval $ac_try) 2>&5
4649   ac_status=$?
4650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4651   (exit $ac_status); }; }; then
4652     cross_compiling=no
4653   else
4654     if test "$cross_compiling" = maybe; then
4655         cross_compiling=yes
4656     else
4657         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
4658 If you meant to cross compile, use \`--host'.
4659 See \`config.log' for more details." >&5
4660 echo "$as_me: error: cannot run C compiled programs.
4661 If you meant to cross compile, use \`--host'.
4662 See \`config.log' for more details." >&2;}
4663    { (exit 1); exit 1; }; }
4664     fi
4665   fi
4666 fi
4667 echo "$as_me:$LINENO: result: yes" >&5
4668 echo "${ECHO_T}yes" >&6
4669
4670 rm -f a.out a.exe conftest$ac_cv_exeext b.out
4671 ac_clean_files=$ac_clean_files_save
4672 # Check the compiler produces executables we can run.  If not, either
4673 # the compiler is broken, or we cross compile.
4674 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
4675 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
4676 echo "$as_me:$LINENO: result: $cross_compiling" >&5
4677 echo "${ECHO_T}$cross_compiling" >&6
4678
4679 echo "$as_me:$LINENO: checking for suffix of executables" >&5
4680 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
4681 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4682   (eval $ac_link) 2>&5
4683   ac_status=$?
4684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4685   (exit $ac_status); }; then
4686   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4687 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4688 # work properly (i.e., refer to `conftest.exe'), while it won't with
4689 # `rm'.
4690 for ac_file in conftest.exe conftest conftest.*; do
4691   test -f "$ac_file" || continue
4692   case $ac_file in
4693     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
4694     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4695           export ac_cv_exeext
4696           break;;
4697     * ) break;;
4698   esac
4699 done
4700 else
4701   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
4702 See \`config.log' for more details." >&5
4703 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
4704 See \`config.log' for more details." >&2;}
4705    { (exit 1); exit 1; }; }
4706 fi
4707
4708 rm -f conftest$ac_cv_exeext
4709 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
4710 echo "${ECHO_T}$ac_cv_exeext" >&6
4711
4712 rm -f conftest.$ac_ext
4713 EXEEXT=$ac_cv_exeext
4714 ac_exeext=$EXEEXT
4715 echo "$as_me:$LINENO: checking for suffix of object files" >&5
4716 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
4717 if test "${ac_cv_objext+set}" = set; then
4718   echo $ECHO_N "(cached) $ECHO_C" >&6
4719 else
4720   cat >conftest.$ac_ext <<_ACEOF
4721 /* confdefs.h.  */
4722 _ACEOF
4723 cat confdefs.h >>conftest.$ac_ext
4724 cat >>conftest.$ac_ext <<_ACEOF
4725 /* end confdefs.h.  */
4726
4727 int
4728 main ()
4729 {
4730
4731   ;
4732   return 0;
4733 }
4734 _ACEOF
4735 rm -f conftest.o conftest.obj
4736 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4737   (eval $ac_compile) 2>&5
4738   ac_status=$?
4739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4740   (exit $ac_status); }; then
4741   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
4742   case $ac_file in
4743     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
4744     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4745        break;;
4746   esac
4747 done
4748 else
4749   echo "$as_me: failed program was:" >&5
4750 sed 's/^/| /' conftest.$ac_ext >&5
4751
4752 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
4753 See \`config.log' for more details." >&5
4754 echo "$as_me: error: cannot compute suffix of object files: cannot compile
4755 See \`config.log' for more details." >&2;}
4756    { (exit 1); exit 1; }; }
4757 fi
4758
4759 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4760 fi
4761 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
4762 echo "${ECHO_T}$ac_cv_objext" >&6
4763 OBJEXT=$ac_cv_objext
4764 ac_objext=$OBJEXT
4765 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
4766 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
4767 if test "${ac_cv_c_compiler_gnu+set}" = set; then
4768   echo $ECHO_N "(cached) $ECHO_C" >&6
4769 else
4770   cat >conftest.$ac_ext <<_ACEOF
4771 /* confdefs.h.  */
4772 _ACEOF
4773 cat confdefs.h >>conftest.$ac_ext
4774 cat >>conftest.$ac_ext <<_ACEOF
4775 /* end confdefs.h.  */
4776
4777 int
4778 main ()
4779 {
4780 #ifndef __GNUC__
4781        choke me
4782 #endif
4783
4784   ;
4785   return 0;
4786 }
4787 _ACEOF
4788 rm -f conftest.$ac_objext
4789 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4790   (eval $ac_compile) 2>conftest.er1
4791   ac_status=$?
4792   grep -v '^ *+' conftest.er1 >conftest.err
4793   rm -f conftest.er1
4794   cat conftest.err >&5
4795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4796   (exit $ac_status); } &&
4797          { ac_try='test -z "$ac_c_werror_flag"
4798                          || test ! -s conftest.err'
4799   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4800   (eval $ac_try) 2>&5
4801   ac_status=$?
4802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4803   (exit $ac_status); }; } &&
4804          { ac_try='test -s conftest.$ac_objext'
4805   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4806   (eval $ac_try) 2>&5
4807   ac_status=$?
4808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4809   (exit $ac_status); }; }; then
4810   ac_compiler_gnu=yes
4811 else
4812   echo "$as_me: failed program was:" >&5
4813 sed 's/^/| /' conftest.$ac_ext >&5
4814
4815 ac_compiler_gnu=no
4816 fi
4817 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4818 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4819
4820 fi
4821 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
4822 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
4823 GCC=`test $ac_compiler_gnu = yes && echo yes`
4824 ac_test_CFLAGS=${CFLAGS+set}
4825 ac_save_CFLAGS=$CFLAGS
4826 CFLAGS="-g"
4827 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
4828 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
4829 if test "${ac_cv_prog_cc_g+set}" = set; then
4830   echo $ECHO_N "(cached) $ECHO_C" >&6
4831 else
4832   cat >conftest.$ac_ext <<_ACEOF
4833 /* confdefs.h.  */
4834 _ACEOF
4835 cat confdefs.h >>conftest.$ac_ext
4836 cat >>conftest.$ac_ext <<_ACEOF
4837 /* end confdefs.h.  */
4838
4839 int
4840 main ()
4841 {
4842
4843   ;
4844   return 0;
4845 }
4846 _ACEOF
4847 rm -f conftest.$ac_objext
4848 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4849   (eval $ac_compile) 2>conftest.er1
4850   ac_status=$?
4851   grep -v '^ *+' conftest.er1 >conftest.err
4852   rm -f conftest.er1
4853   cat conftest.err >&5
4854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4855   (exit $ac_status); } &&
4856          { ac_try='test -z "$ac_c_werror_flag"
4857                          || test ! -s conftest.err'
4858   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4859   (eval $ac_try) 2>&5
4860   ac_status=$?
4861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4862   (exit $ac_status); }; } &&
4863          { ac_try='test -s conftest.$ac_objext'
4864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4865   (eval $ac_try) 2>&5
4866   ac_status=$?
4867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4868   (exit $ac_status); }; }; then
4869   ac_cv_prog_cc_g=yes
4870 else
4871   echo "$as_me: failed program was:" >&5
4872 sed 's/^/| /' conftest.$ac_ext >&5
4873
4874 ac_cv_prog_cc_g=no
4875 fi
4876 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4877 fi
4878 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
4879 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
4880 if test "$ac_test_CFLAGS" = set; then
4881   CFLAGS=$ac_save_CFLAGS
4882 elif test $ac_cv_prog_cc_g = yes; then
4883   if test "$GCC" = yes; then
4884     CFLAGS="-g -O2"
4885   else
4886     CFLAGS="-g"
4887   fi
4888 else
4889   if test "$GCC" = yes; then
4890     CFLAGS="-O2"
4891   else
4892     CFLAGS=
4893   fi
4894 fi
4895 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
4896 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
4897 if test "${ac_cv_prog_cc_stdc+set}" = set; then
4898   echo $ECHO_N "(cached) $ECHO_C" >&6
4899 else
4900   ac_cv_prog_cc_stdc=no
4901 ac_save_CC=$CC
4902 cat >conftest.$ac_ext <<_ACEOF
4903 /* confdefs.h.  */
4904 _ACEOF
4905 cat confdefs.h >>conftest.$ac_ext
4906 cat >>conftest.$ac_ext <<_ACEOF
4907 /* end confdefs.h.  */
4908 #include <stdarg.h>
4909 #include <stdio.h>
4910 #include <sys/types.h>
4911 #include <sys/stat.h>
4912 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4913 struct buf { int x; };
4914 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4915 static char *e (p, i)
4916      char **p;
4917      int i;
4918 {
4919   return p[i];
4920 }
4921 static char *f (char * (*g) (char **, int), char **p, ...)
4922 {
4923   char *s;
4924   va_list v;
4925   va_start (v,p);
4926   s = g (p, va_arg (v,int));
4927   va_end (v);
4928   return s;
4929 }
4930
4931 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4932    function prototypes and stuff, but not '\xHH' hex character constants.
4933    These don't provoke an error unfortunately, instead are silently treated
4934    as 'x'.  The following induces an error, until -std1 is added to get
4935    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4936    array size at least.  It's necessary to write '\x00'==0 to get something
4937    that's true only with -std1.  */
4938 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4939
4940 int test (int i, double x);
4941 struct s1 {int (*f) (int a);};
4942 struct s2 {int (*f) (double a);};
4943 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4944 int argc;
4945 char **argv;
4946 int
4947 main ()
4948 {
4949 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4950   ;
4951   return 0;
4952 }
4953 _ACEOF
4954 # Don't try gcc -ansi; that turns off useful extensions and
4955 # breaks some systems' header files.
4956 # AIX                   -qlanglvl=ansi
4957 # Ultrix and OSF/1      -std1
4958 # HP-UX 10.20 and later -Ae
4959 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4960 # SVR4                  -Xc -D__EXTENSIONS__
4961 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4962 do
4963   CC="$ac_save_CC $ac_arg"
4964   rm -f conftest.$ac_objext
4965 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4966   (eval $ac_compile) 2>conftest.er1
4967   ac_status=$?
4968   grep -v '^ *+' conftest.er1 >conftest.err
4969   rm -f conftest.er1
4970   cat conftest.err >&5
4971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4972   (exit $ac_status); } &&
4973          { ac_try='test -z "$ac_c_werror_flag"
4974                          || test ! -s conftest.err'
4975   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4976   (eval $ac_try) 2>&5
4977   ac_status=$?
4978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4979   (exit $ac_status); }; } &&
4980          { ac_try='test -s conftest.$ac_objext'
4981   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4982   (eval $ac_try) 2>&5
4983   ac_status=$?
4984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4985   (exit $ac_status); }; }; then
4986   ac_cv_prog_cc_stdc=$ac_arg
4987 break
4988 else
4989   echo "$as_me: failed program was:" >&5
4990 sed 's/^/| /' conftest.$ac_ext >&5
4991
4992 fi
4993 rm -f conftest.err conftest.$ac_objext
4994 done
4995 rm -f conftest.$ac_ext conftest.$ac_objext
4996 CC=$ac_save_CC
4997
4998 fi
4999
5000 case "x$ac_cv_prog_cc_stdc" in
5001   x|xno)
5002     echo "$as_me:$LINENO: result: none needed" >&5
5003 echo "${ECHO_T}none needed" >&6 ;;
5004   *)
5005     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
5006 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
5007     CC="$CC $ac_cv_prog_cc_stdc" ;;
5008 esac
5009
5010 # Some people use a C++ compiler to compile C.  Since we use `exit',
5011 # in C++ we need to declare it.  In case someone uses the same compiler
5012 # for both compiling C and C++ we need to have the C++ compiler decide
5013 # the declaration of exit, since it's the most demanding environment.
5014 cat >conftest.$ac_ext <<_ACEOF
5015 #ifndef __cplusplus
5016   choke me
5017 #endif
5018 _ACEOF
5019 rm -f conftest.$ac_objext
5020 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5021   (eval $ac_compile) 2>conftest.er1
5022   ac_status=$?
5023   grep -v '^ *+' conftest.er1 >conftest.err
5024   rm -f conftest.er1
5025   cat conftest.err >&5
5026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5027   (exit $ac_status); } &&
5028          { ac_try='test -z "$ac_c_werror_flag"
5029                          || test ! -s conftest.err'
5030   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5031   (eval $ac_try) 2>&5
5032   ac_status=$?
5033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5034   (exit $ac_status); }; } &&
5035          { ac_try='test -s conftest.$ac_objext'
5036   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5037   (eval $ac_try) 2>&5
5038   ac_status=$?
5039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5040   (exit $ac_status); }; }; then
5041   for ac_declaration in \
5042    '' \
5043    'extern "C" void std::exit (int) throw (); using std::exit;' \
5044    'extern "C" void std::exit (int); using std::exit;' \
5045    'extern "C" void exit (int) throw ();' \
5046    'extern "C" void exit (int);' \
5047    'void exit (int);'
5048 do
5049   cat >conftest.$ac_ext <<_ACEOF
5050 /* confdefs.h.  */
5051 _ACEOF
5052 cat confdefs.h >>conftest.$ac_ext
5053 cat >>conftest.$ac_ext <<_ACEOF
5054 /* end confdefs.h.  */
5055 $ac_declaration
5056 #include <stdlib.h>
5057 int
5058 main ()
5059 {
5060 exit (42);
5061   ;
5062   return 0;
5063 }
5064 _ACEOF
5065 rm -f conftest.$ac_objext
5066 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5067   (eval $ac_compile) 2>conftest.er1
5068   ac_status=$?
5069   grep -v '^ *+' conftest.er1 >conftest.err
5070   rm -f conftest.er1
5071   cat conftest.err >&5
5072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5073   (exit $ac_status); } &&
5074          { ac_try='test -z "$ac_c_werror_flag"
5075                          || test ! -s conftest.err'
5076   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5077   (eval $ac_try) 2>&5
5078   ac_status=$?
5079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5080   (exit $ac_status); }; } &&
5081          { ac_try='test -s conftest.$ac_objext'
5082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5083   (eval $ac_try) 2>&5
5084   ac_status=$?
5085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5086   (exit $ac_status); }; }; then
5087   :
5088 else
5089   echo "$as_me: failed program was:" >&5
5090 sed 's/^/| /' conftest.$ac_ext >&5
5091
5092 continue
5093 fi
5094 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5095   cat >conftest.$ac_ext <<_ACEOF
5096 /* confdefs.h.  */
5097 _ACEOF
5098 cat confdefs.h >>conftest.$ac_ext
5099 cat >>conftest.$ac_ext <<_ACEOF
5100 /* end confdefs.h.  */
5101 $ac_declaration
5102 int
5103 main ()
5104 {
5105 exit (42);
5106   ;
5107   return 0;
5108 }
5109 _ACEOF
5110 rm -f conftest.$ac_objext
5111 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5112   (eval $ac_compile) 2>conftest.er1
5113   ac_status=$?
5114   grep -v '^ *+' conftest.er1 >conftest.err
5115   rm -f conftest.er1
5116   cat conftest.err >&5
5117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5118   (exit $ac_status); } &&
5119          { ac_try='test -z "$ac_c_werror_flag"
5120                          || test ! -s conftest.err'
5121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5122   (eval $ac_try) 2>&5
5123   ac_status=$?
5124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5125   (exit $ac_status); }; } &&
5126          { ac_try='test -s conftest.$ac_objext'
5127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5128   (eval $ac_try) 2>&5
5129   ac_status=$?
5130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5131   (exit $ac_status); }; }; then
5132   break
5133 else
5134   echo "$as_me: failed program was:" >&5
5135 sed 's/^/| /' conftest.$ac_ext >&5
5136
5137 fi
5138 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5139 done
5140 rm -f conftest*
5141 if test -n "$ac_declaration"; then
5142   echo '#ifdef __cplusplus' >>confdefs.h
5143   echo $ac_declaration      >>confdefs.h
5144   echo '#endif'             >>confdefs.h
5145 fi
5146
5147 else
5148   echo "$as_me: failed program was:" >&5
5149 sed 's/^/| /' conftest.$ac_ext >&5
5150
5151 fi
5152 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5153 ac_ext=c
5154 ac_cpp='$CPP $CPPFLAGS'
5155 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5156 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5157 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5158
5159 depcc="$CC"   am_compiler_list=
5160
5161 echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
5162 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
5163 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
5164   echo $ECHO_N "(cached) $ECHO_C" >&6
5165 else
5166   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5167   # We make a subdir and do the tests there.  Otherwise we can end up
5168   # making bogus files that we don't know about and never remove.  For
5169   # instance it was reported that on HP-UX the gcc test will end up
5170   # making a dummy file named `D' -- because `-MD' means `put the output
5171   # in D'.
5172   mkdir conftest.dir
5173   # Copy depcomp to subdir because otherwise we won't find it if we're
5174   # using a relative directory.
5175   cp "$am_depcomp" conftest.dir
5176   cd conftest.dir
5177   # We will build objects and dependencies in a subdirectory because
5178   # it helps to detect inapplicable dependency modes.  For instance
5179   # both Tru64's cc and ICC support -MD to output dependencies as a
5180   # side effect of compilation, but ICC will put the dependencies in
5181   # the current directory while Tru64 will put them in the object
5182   # directory.
5183   mkdir sub
5184
5185   am_cv_CC_dependencies_compiler_type=none
5186   if test "$am_compiler_list" = ""; then
5187      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5188   fi
5189   for depmode in $am_compiler_list; do
5190     # Setup a source with many dependencies, because some compilers
5191     # like to wrap large dependency lists on column 80 (with \), and
5192     # we should not choose a depcomp mode which is confused by this.
5193     #
5194     # We need to recreate these files for each test, as the compiler may
5195     # overwrite some of them when testing with obscure command lines.
5196     # This happens at least with the AIX C compiler.
5197     : > sub/conftest.c
5198     for i in 1 2 3 4 5 6; do
5199       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5200       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5201       # Solaris 8's {/usr,}/bin/sh.
5202       touch sub/conftst$i.h
5203     done
5204     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5205
5206     case $depmode in
5207     nosideeffect)
5208       # after this tag, mechanisms are not by side-effect, so they'll
5209       # only be used when explicitly requested
5210       if test "x$enable_dependency_tracking" = xyes; then
5211         continue
5212       else
5213         break
5214       fi
5215       ;;
5216     none) break ;;
5217     esac
5218     # We check with `-c' and `-o' for the sake of the "dashmstdout"
5219     # mode.  It turns out that the SunPro C++ compiler does not properly
5220     # handle `-M -o', and we need to detect this.
5221     if depmode=$depmode \
5222        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5223        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5224        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
5225          >/dev/null 2>conftest.err &&
5226        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5227        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
5228        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5229       # icc doesn't choke on unknown options, it will just issue warnings
5230       # or remarks (even with -Werror).  So we grep stderr for any message
5231       # that says an option was ignored or not supported.
5232       # When given -MP, icc 7.0 and 7.1 complain thusly:
5233       #   icc: Command line warning: ignoring option '-M'; no argument required
5234       # The diagnosis changed in icc 8.0:
5235       #   icc: Command line remark: option '-MP' not supported
5236       if (grep 'ignoring option' conftest.err ||
5237           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5238         am_cv_CC_dependencies_compiler_type=$depmode
5239         break
5240       fi
5241     fi
5242   done
5243
5244   cd ..
5245   rm -rf conftest.dir
5246 else
5247   am_cv_CC_dependencies_compiler_type=none
5248 fi
5249
5250 fi
5251 echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
5252 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
5253 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5254
5255
5256
5257 if
5258   test "x$enable_dependency_tracking" != xno \
5259   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5260   am__fastdepCC_TRUE=
5261   am__fastdepCC_FALSE='#'
5262 else
5263   am__fastdepCC_TRUE='#'
5264   am__fastdepCC_FALSE=
5265 fi
5266
5267
5268 echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
5269 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
5270 if test "${lt_cv_path_SED+set}" = set; then
5271   echo $ECHO_N "(cached) $ECHO_C" >&6
5272 else
5273   # Loop through the user's path and test for sed and gsed.
5274 # Then use that list of sed's as ones to test for truncation.
5275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5276 for as_dir in $PATH
5277 do
5278   IFS=$as_save_IFS
5279   test -z "$as_dir" && as_dir=.
5280   for lt_ac_prog in sed gsed; do
5281     for ac_exec_ext in '' $ac_executable_extensions; do
5282       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
5283         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
5284       fi
5285     done
5286   done
5287 done
5288 lt_ac_max=0
5289 lt_ac_count=0
5290 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
5291 # along with /bin/sed that truncates output.
5292 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
5293   test ! -f $lt_ac_sed && continue
5294   cat /dev/null > conftest.in
5295   lt_ac_count=0
5296   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
5297   # Check for GNU sed and select it if it is found.
5298   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
5299     lt_cv_path_SED=$lt_ac_sed
5300     break
5301   fi
5302   while true; do
5303     cat conftest.in conftest.in >conftest.tmp
5304     mv conftest.tmp conftest.in
5305     cp conftest.in conftest.nl
5306     echo >>conftest.nl
5307     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
5308     cmp -s conftest.out conftest.nl || break
5309     # 10000 chars as input seems more than enough
5310     test $lt_ac_count -gt 10 && break
5311     lt_ac_count=`expr $lt_ac_count + 1`
5312     if test $lt_ac_count -gt $lt_ac_max; then
5313       lt_ac_max=$lt_ac_count
5314       lt_cv_path_SED=$lt_ac_sed
5315     fi
5316   done
5317 done
5318
5319 fi
5320
5321 SED=$lt_cv_path_SED
5322 echo "$as_me:$LINENO: result: $SED" >&5
5323 echo "${ECHO_T}$SED" >&6
5324
5325 echo "$as_me:$LINENO: checking for egrep" >&5
5326 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
5327 if test "${ac_cv_prog_egrep+set}" = set; then
5328   echo $ECHO_N "(cached) $ECHO_C" >&6
5329 else
5330   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
5331     then ac_cv_prog_egrep='grep -E'
5332     else ac_cv_prog_egrep='egrep'
5333     fi
5334 fi
5335 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
5336 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
5337  EGREP=$ac_cv_prog_egrep
5338
5339
5340
5341 # Check whether --with-gnu-ld or --without-gnu-ld was given.
5342 if test "${with_gnu_ld+set}" = set; then
5343   withval="$with_gnu_ld"
5344   test "$withval" = no || with_gnu_ld=yes
5345 else
5346   with_gnu_ld=no
5347 fi;
5348 ac_prog=ld
5349 if test "$GCC" = yes; then
5350   # Check if gcc -print-prog-name=ld gives a path.
5351   echo "$as_me:$LINENO: checking for ld used by $CC" >&5
5352 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
5353   case $host in
5354   *-*-mingw*)
5355     # gcc leaves a trailing carriage return which upsets mingw
5356     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5357   *)
5358     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5359   esac
5360   case $ac_prog in
5361     # Accept absolute paths.
5362     [\\/]* | ?:[\\/]*)
5363       re_direlt='/[^/][^/]*/\.\./'
5364       # Canonicalize the pathname of ld
5365       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
5366       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5367         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
5368       done
5369       test -z "$LD" && LD="$ac_prog"
5370       ;;
5371   "")
5372     # If it fails, then pretend we aren't using GCC.
5373     ac_prog=ld
5374     ;;
5375   *)
5376     # If it is relative, then search for the first ld in PATH.
5377     with_gnu_ld=unknown
5378     ;;
5379   esac
5380 elif test "$with_gnu_ld" = yes; then
5381   echo "$as_me:$LINENO: checking for GNU ld" >&5
5382 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
5383 else
5384   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
5385 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
5386 fi
5387 if test "${lt_cv_path_LD+set}" = set; then
5388   echo $ECHO_N "(cached) $ECHO_C" >&6
5389 else
5390   if test -z "$LD"; then
5391   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5392   for ac_dir in $PATH; do
5393     IFS="$lt_save_ifs"
5394     test -z "$ac_dir" && ac_dir=.
5395     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5396       lt_cv_path_LD="$ac_dir/$ac_prog"
5397       # Check to see if the program is GNU ld.  I'd rather use --version,
5398       # but apparently some variants of GNU ld only accept -v.
5399       # Break only if it was the GNU/non-GNU ld that we prefer.
5400       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5401       *GNU* | *'with BFD'*)
5402         test "$with_gnu_ld" != no && break
5403         ;;
5404       *)
5405         test "$with_gnu_ld" != yes && break
5406         ;;
5407       esac
5408     fi
5409   done
5410   IFS="$lt_save_ifs"
5411 else
5412   lt_cv_path_LD="$LD" # Let the user override the test with a path.
5413 fi
5414 fi
5415
5416 LD="$lt_cv_path_LD"
5417 if test -n "$LD"; then
5418   echo "$as_me:$LINENO: result: $LD" >&5
5419 echo "${ECHO_T}$LD" >&6
5420 else
5421   echo "$as_me:$LINENO: result: no" >&5
5422 echo "${ECHO_T}no" >&6
5423 fi
5424 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
5425 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
5426    { (exit 1); exit 1; }; }
5427 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
5428 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
5429 if test "${lt_cv_prog_gnu_ld+set}" = set; then
5430   echo $ECHO_N "(cached) $ECHO_C" >&6
5431 else
5432   # I'd rather use --version here, but apparently some GNU lds only accept -v.
5433 case `$LD -v 2>&1 </dev/null` in
5434 *GNU* | *'with BFD'*)
5435   lt_cv_prog_gnu_ld=yes
5436   ;;
5437 *)
5438   lt_cv_prog_gnu_ld=no
5439   ;;
5440 esac
5441 fi
5442 echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
5443 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
5444 with_gnu_ld=$lt_cv_prog_gnu_ld
5445
5446
5447 echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
5448 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
5449 if test "${lt_cv_ld_reload_flag+set}" = set; then
5450   echo $ECHO_N "(cached) $ECHO_C" >&6
5451 else
5452   lt_cv_ld_reload_flag='-r'
5453 fi
5454 echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
5455 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
5456 reload_flag=$lt_cv_ld_reload_flag
5457 case $reload_flag in
5458 "" | " "*) ;;
5459 *) reload_flag=" $reload_flag" ;;
5460 esac
5461 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5462 case $host_os in
5463   darwin*)
5464     if test "$GCC" = yes; then
5465       reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
5466     else
5467       reload_cmds='$LD$reload_flag -o $output$reload_objs'
5468     fi
5469     ;;
5470 esac
5471
5472 echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
5473 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
5474 if test "${lt_cv_path_NM+set}" = set; then
5475   echo $ECHO_N "(cached) $ECHO_C" >&6
5476 else
5477   if test -n "$NM"; then
5478   # Let the user override the test.
5479   lt_cv_path_NM="$NM"
5480 else
5481   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5482   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
5483     IFS="$lt_save_ifs"
5484     test -z "$ac_dir" && ac_dir=.
5485     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
5486     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5487       # Check to see if the nm accepts a BSD-compat flag.
5488       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5489       #   nm: unknown option "B" ignored
5490       # Tru64's nm complains that /dev/null is an invalid object file
5491       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5492       */dev/null* | *'Invalid file or object type'*)
5493         lt_cv_path_NM="$tmp_nm -B"
5494         break
5495         ;;
5496       *)
5497         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5498         */dev/null*)
5499           lt_cv_path_NM="$tmp_nm -p"
5500           break
5501           ;;
5502         *)
5503           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5504           continue # so that we can try to find one that supports BSD flags
5505           ;;
5506         esac
5507       esac
5508     fi
5509   done
5510   IFS="$lt_save_ifs"
5511   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
5512 fi
5513 fi
5514 echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
5515 echo "${ECHO_T}$lt_cv_path_NM" >&6
5516 NM="$lt_cv_path_NM"
5517
5518 echo "$as_me:$LINENO: checking whether ln -s works" >&5
5519 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
5520 LN_S=$as_ln_s
5521 if test "$LN_S" = "ln -s"; then
5522   echo "$as_me:$LINENO: result: yes" >&5
5523 echo "${ECHO_T}yes" >&6
5524 else
5525   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
5526 echo "${ECHO_T}no, using $LN_S" >&6
5527 fi
5528
5529 echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
5530 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
5531 if test "${lt_cv_deplibs_check_method+set}" = set; then
5532   echo $ECHO_N "(cached) $ECHO_C" >&6
5533 else
5534   lt_cv_file_magic_cmd='$MAGIC_CMD'
5535 lt_cv_file_magic_test_file=
5536 lt_cv_deplibs_check_method='unknown'
5537 # Need to set the preceding variable on all platforms that support
5538 # interlibrary dependencies.
5539 # 'none' -- dependencies not supported.
5540 # `unknown' -- same as none, but documents that we really don't know.
5541 # 'pass_all' -- all dependencies passed with no checks.
5542 # 'test_compile' -- check by making test program.
5543 # 'file_magic [[regex]]' -- check by looking for files in library path
5544 # which responds to the $file_magic_cmd with a given extended regex.
5545 # If you have `file' or equivalent on your system and you're not sure
5546 # whether `pass_all' will *always* work, you probably want this one.
5547
5548 case $host_os in
5549 aix4* | aix5*)
5550   lt_cv_deplibs_check_method=pass_all
5551   ;;
5552
5553 beos*)
5554   lt_cv_deplibs_check_method=pass_all
5555   ;;
5556
5557 bsdi[45]*)
5558   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
5559   lt_cv_file_magic_cmd='/usr/bin/file -L'
5560   lt_cv_file_magic_test_file=/shlib/libc.so
5561   ;;
5562
5563 cygwin*)
5564   # func_win32_libid is a shell function defined in ltmain.sh
5565   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5566   lt_cv_file_magic_cmd='func_win32_libid'
5567   ;;
5568
5569 mingw* | pw32*)
5570   # Base MSYS/MinGW do not provide the 'file' command needed by
5571   # func_win32_libid shell function, so use a weaker test based on 'objdump'.
5572   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
5573   lt_cv_file_magic_cmd='$OBJDUMP -f'
5574   ;;
5575
5576 darwin* | rhapsody*)
5577   lt_cv_deplibs_check_method=pass_all
5578   ;;
5579
5580 freebsd* | kfreebsd*-gnu | dragonfly*)
5581   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5582     case $host_cpu in
5583     i*86 )
5584       # Not sure whether the presence of OpenBSD here was a mistake.
5585       # Let's accept both of them until this is cleared up.
5586       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
5587       lt_cv_file_magic_cmd=/usr/bin/file
5588       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5589       ;;
5590     esac
5591   else
5592     lt_cv_deplibs_check_method=pass_all
5593   fi
5594   ;;
5595
5596 gnu*)
5597   lt_cv_deplibs_check_method=pass_all
5598   ;;
5599
5600 hpux10.20* | hpux11*)
5601   lt_cv_file_magic_cmd=/usr/bin/file
5602   case $host_cpu in
5603   ia64*)
5604     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
5605     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5606     ;;
5607   hppa*64*)
5608     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
5609     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5610     ;;
5611   *)
5612     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
5613     lt_cv_file_magic_test_file=/usr/lib/libc.sl
5614     ;;
5615   esac
5616   ;;
5617
5618 irix5* | irix6* | nonstopux*)
5619   case $LD in
5620   *-32|*"-32 ") libmagic=32-bit;;
5621   *-n32|*"-n32 ") libmagic=N32;;
5622   *-64|*"-64 ") libmagic=64-bit;;
5623   *) libmagic=never-match;;
5624   esac
5625   lt_cv_deplibs_check_method=pass_all
5626   ;;
5627
5628 # This must be Linux ELF.
5629 linux*)
5630   lt_cv_deplibs_check_method=pass_all
5631   ;;
5632
5633 netbsd*)
5634   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5635     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5636   else
5637     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
5638   fi
5639   ;;
5640
5641 newos6*)
5642   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
5643   lt_cv_file_magic_cmd=/usr/bin/file
5644   lt_cv_file_magic_test_file=/usr/lib/libnls.so
5645   ;;
5646
5647 nto-qnx*)
5648   lt_cv_deplibs_check_method=unknown
5649   ;;
5650
5651 openbsd*)
5652   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5653     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
5654   else
5655     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5656   fi
5657   ;;
5658
5659 osf3* | osf4* | osf5*)
5660   lt_cv_deplibs_check_method=pass_all
5661   ;;
5662
5663 sco3.2v5*)
5664   lt_cv_deplibs_check_method=pass_all
5665   ;;
5666
5667 solaris*)
5668   lt_cv_deplibs_check_method=pass_all
5669   ;;
5670
5671 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5672   case $host_vendor in
5673   motorola)
5674     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
5675     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5676     ;;
5677   ncr)
5678     lt_cv_deplibs_check_method=pass_all
5679     ;;
5680   sequent)
5681     lt_cv_file_magic_cmd='/bin/file'
5682     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
5683     ;;
5684   sni)
5685     lt_cv_file_magic_cmd='/bin/file'
5686     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
5687     lt_cv_file_magic_test_file=/lib/libc.so
5688     ;;
5689   siemens)
5690     lt_cv_deplibs_check_method=pass_all
5691     ;;
5692   esac
5693   ;;
5694
5695 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
5696   lt_cv_deplibs_check_method=pass_all
5697   ;;
5698 esac
5699
5700 fi
5701 echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
5702 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
5703 file_magic_cmd=$lt_cv_file_magic_cmd
5704 deplibs_check_method=$lt_cv_deplibs_check_method
5705 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5706
5707
5708
5709
5710 # If no C compiler was specified, use CC.
5711 LTCC=${LTCC-"$CC"}
5712
5713 # Allow CC to be a program name with arguments.
5714 compiler=$CC
5715
5716
5717 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
5718 if test "${enable_libtool_lock+set}" = set; then
5719   enableval="$enable_libtool_lock"
5720
5721 fi;
5722 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5723
5724 # Some flags need to be propagated to the compiler or linker for good
5725 # libtool support.
5726 case $host in
5727 ia64-*-hpux*)
5728   # Find out which ABI we are using.
5729   echo 'int i;' > conftest.$ac_ext
5730   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5731   (eval $ac_compile) 2>&5
5732   ac_status=$?
5733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5734   (exit $ac_status); }; then
5735     case `/usr/bin/file conftest.$ac_objext` in
5736     *ELF-32*)
5737       HPUX_IA64_MODE="32"
5738       ;;
5739     *ELF-64*)
5740       HPUX_IA64_MODE="64"
5741       ;;
5742     esac
5743   fi
5744   rm -rf conftest*
5745   ;;
5746 *-*-irix6*)
5747   # Find out which ABI we are using.
5748   echo '#line 5748 "configure"' > conftest.$ac_ext
5749   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5750   (eval $ac_compile) 2>&5
5751   ac_status=$?
5752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5753   (exit $ac_status); }; then
5754    if test "$lt_cv_prog_gnu_ld" = yes; then
5755     case `/usr/bin/file conftest.$ac_objext` in
5756     *32-bit*)
5757       LD="${LD-ld} -melf32bsmip"
5758       ;;
5759     *N32*)
5760       LD="${LD-ld} -melf32bmipn32"
5761       ;;
5762     *64-bit*)
5763       LD="${LD-ld} -melf64bmip"
5764       ;;
5765     esac
5766    else
5767     case `/usr/bin/file conftest.$ac_objext` in
5768     *32-bit*)
5769       LD="${LD-ld} -32"
5770       ;;
5771     *N32*)
5772       LD="${LD-ld} -n32"
5773       ;;
5774     *64-bit*)
5775       LD="${LD-ld} -64"
5776       ;;
5777     esac
5778    fi
5779   fi
5780   rm -rf conftest*
5781   ;;
5782
5783 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
5784   # Find out which ABI we are using.
5785   echo 'int i;' > conftest.$ac_ext
5786   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5787   (eval $ac_compile) 2>&5
5788   ac_status=$?
5789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5790   (exit $ac_status); }; then
5791     case `/usr/bin/file conftest.o` in
5792     *32-bit*)
5793       case $host in
5794         x86_64-*linux*)
5795           LD="${LD-ld} -m elf_i386"
5796           ;;
5797         ppc64-*linux*|powerpc64-*linux*)
5798           LD="${LD-ld} -m elf32ppclinux"
5799           ;;
5800         s390x-*linux*)
5801           LD="${LD-ld} -m elf_s390"
5802           ;;
5803         sparc64-*linux*)
5804           LD="${LD-ld} -m elf32_sparc"
5805           ;;
5806       esac
5807       ;;
5808     *64-bit*)
5809       case $host in
5810         x86_64-*linux*)
5811           LD="${LD-ld} -m elf_x86_64"
5812           ;;
5813         ppc*-*linux*|powerpc*-*linux*)
5814           LD="${LD-ld} -m elf64ppc"
5815           ;;
5816         s390*-*linux*)
5817           LD="${LD-ld} -m elf64_s390"
5818           ;;
5819         sparc*-*linux*)
5820           LD="${LD-ld} -m elf64_sparc"
5821           ;;
5822       esac
5823       ;;
5824     esac
5825   fi
5826   rm -rf conftest*
5827   ;;
5828
5829 *-*-sco3.2v5*)
5830   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
5831   SAVE_CFLAGS="$CFLAGS"
5832   CFLAGS="$CFLAGS -belf"
5833   echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
5834 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
5835 if test "${lt_cv_cc_needs_belf+set}" = set; then
5836   echo $ECHO_N "(cached) $ECHO_C" >&6
5837 else
5838   ac_ext=c
5839 ac_cpp='$CPP $CPPFLAGS'
5840 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5841 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5842 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5843
5844      cat >conftest.$ac_ext <<_ACEOF
5845 /* confdefs.h.  */
5846 _ACEOF
5847 cat confdefs.h >>conftest.$ac_ext
5848 cat >>conftest.$ac_ext <<_ACEOF
5849 /* end confdefs.h.  */
5850
5851 int
5852 main ()
5853 {
5854
5855   ;
5856   return 0;
5857 }
5858 _ACEOF
5859 rm -f conftest.$ac_objext conftest$ac_exeext
5860 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5861   (eval $ac_link) 2>conftest.er1
5862   ac_status=$?
5863   grep -v '^ *+' conftest.er1 >conftest.err
5864   rm -f conftest.er1
5865   cat conftest.err >&5
5866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5867   (exit $ac_status); } &&
5868          { ac_try='test -z "$ac_c_werror_flag"
5869                          || test ! -s conftest.err'
5870   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5871   (eval $ac_try) 2>&5
5872   ac_status=$?
5873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5874   (exit $ac_status); }; } &&
5875          { ac_try='test -s conftest$ac_exeext'
5876   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5877   (eval $ac_try) 2>&5
5878   ac_status=$?
5879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5880   (exit $ac_status); }; }; then
5881   lt_cv_cc_needs_belf=yes
5882 else
5883   echo "$as_me: failed program was:" >&5
5884 sed 's/^/| /' conftest.$ac_ext >&5
5885
5886 lt_cv_cc_needs_belf=no
5887 fi
5888 rm -f conftest.err conftest.$ac_objext \
5889       conftest$ac_exeext conftest.$ac_ext
5890      ac_ext=c
5891 ac_cpp='$CPP $CPPFLAGS'
5892 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5893 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5894 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5895
5896 fi
5897 echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
5898 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
5899   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5900     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5901     CFLAGS="$SAVE_CFLAGS"
5902   fi
5903   ;;
5904 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
5905   if test -n "$ac_tool_prefix"; then
5906   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5907 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
5908 echo "$as_me:$LINENO: checking for $ac_word" >&5
5909 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5910 if test "${ac_cv_prog_DLLTOOL+set}" = set; then
5911   echo $ECHO_N "(cached) $ECHO_C" >&6
5912 else
5913   if test -n "$DLLTOOL"; then
5914   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
5915 else
5916 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5917 for as_dir in $PATH
5918 do
5919   IFS=$as_save_IFS
5920   test -z "$as_dir" && as_dir=.
5921   for ac_exec_ext in '' $ac_executable_extensions; do
5922   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5923     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
5924     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5925     break 2
5926   fi
5927 done
5928 done
5929
5930 fi
5931 fi
5932 DLLTOOL=$ac_cv_prog_DLLTOOL
5933 if test -n "$DLLTOOL"; then
5934   echo "$as_me:$LINENO: result: $DLLTOOL" >&5
5935 echo "${ECHO_T}$DLLTOOL" >&6
5936 else
5937   echo "$as_me:$LINENO: result: no" >&5
5938 echo "${ECHO_T}no" >&6
5939 fi
5940
5941 fi
5942 if test -z "$ac_cv_prog_DLLTOOL"; then
5943   ac_ct_DLLTOOL=$DLLTOOL
5944   # Extract the first word of "dlltool", so it can be a program name with args.
5945 set dummy dlltool; ac_word=$2
5946 echo "$as_me:$LINENO: checking for $ac_word" >&5
5947 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5948 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
5949   echo $ECHO_N "(cached) $ECHO_C" >&6
5950 else
5951   if test -n "$ac_ct_DLLTOOL"; then
5952   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
5953 else
5954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5955 for as_dir in $PATH
5956 do
5957   IFS=$as_save_IFS
5958   test -z "$as_dir" && as_dir=.
5959   for ac_exec_ext in '' $ac_executable_extensions; do
5960   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5961     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
5962     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5963     break 2
5964   fi
5965 done
5966 done
5967
5968   test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="false"
5969 fi
5970 fi
5971 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
5972 if test -n "$ac_ct_DLLTOOL"; then
5973   echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
5974 echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
5975 else
5976   echo "$as_me:$LINENO: result: no" >&5
5977 echo "${ECHO_T}no" >&6
5978 fi
5979
5980   DLLTOOL=$ac_ct_DLLTOOL
5981 else
5982   DLLTOOL="$ac_cv_prog_DLLTOOL"
5983 fi
5984
5985   if test -n "$ac_tool_prefix"; then
5986   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
5987 set dummy ${ac_tool_prefix}as; ac_word=$2
5988 echo "$as_me:$LINENO: checking for $ac_word" >&5
5989 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5990 if test "${ac_cv_prog_AS+set}" = set; then
5991   echo $ECHO_N "(cached) $ECHO_C" >&6
5992 else
5993   if test -n "$AS"; then
5994   ac_cv_prog_AS="$AS" # Let the user override the test.
5995 else
5996 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5997 for as_dir in $PATH
5998 do
5999   IFS=$as_save_IFS
6000   test -z "$as_dir" && as_dir=.
6001   for ac_exec_ext in '' $ac_executable_extensions; do
6002   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6003     ac_cv_prog_AS="${ac_tool_prefix}as"
6004     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6005     break 2
6006   fi
6007 done
6008 done
6009
6010 fi
6011 fi
6012 AS=$ac_cv_prog_AS
6013 if test -n "$AS"; then
6014   echo "$as_me:$LINENO: result: $AS" >&5
6015 echo "${ECHO_T}$AS" >&6
6016 else
6017   echo "$as_me:$LINENO: result: no" >&5
6018 echo "${ECHO_T}no" >&6
6019 fi
6020
6021 fi
6022 if test -z "$ac_cv_prog_AS"; then
6023   ac_ct_AS=$AS
6024   # Extract the first word of "as", so it can be a program name with args.
6025 set dummy as; ac_word=$2
6026 echo "$as_me:$LINENO: checking for $ac_word" >&5
6027 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6028 if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
6029   echo $ECHO_N "(cached) $ECHO_C" >&6
6030 else
6031   if test -n "$ac_ct_AS"; then
6032   ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
6033 else
6034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6035 for as_dir in $PATH
6036 do
6037   IFS=$as_save_IFS
6038   test -z "$as_dir" && as_dir=.
6039   for ac_exec_ext in '' $ac_executable_extensions; do
6040   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6041     ac_cv_prog_ac_ct_AS="as"
6042     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6043     break 2
6044   fi
6045 done
6046 done
6047
6048   test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="false"
6049 fi
6050 fi
6051 ac_ct_AS=$ac_cv_prog_ac_ct_AS
6052 if test -n "$ac_ct_AS"; then
6053   echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
6054 echo "${ECHO_T}$ac_ct_AS" >&6
6055 else
6056   echo "$as_me:$LINENO: result: no" >&5
6057 echo "${ECHO_T}no" >&6
6058 fi
6059
6060   AS=$ac_ct_AS
6061 else
6062   AS="$ac_cv_prog_AS"
6063 fi
6064
6065   if test -n "$ac_tool_prefix"; then
6066   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
6067 set dummy ${ac_tool_prefix}objdump; ac_word=$2
6068 echo "$as_me:$LINENO: checking for $ac_word" >&5
6069 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6070 if test "${ac_cv_prog_OBJDUMP+set}" = set; then
6071   echo $ECHO_N "(cached) $ECHO_C" >&6
6072 else
6073   if test -n "$OBJDUMP"; then
6074   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
6075 else
6076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6077 for as_dir in $PATH
6078 do
6079   IFS=$as_save_IFS
6080   test -z "$as_dir" && as_dir=.
6081   for ac_exec_ext in '' $ac_executable_extensions; do
6082   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6083     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
6084     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6085     break 2
6086   fi
6087 done
6088 done
6089
6090 fi
6091 fi
6092 OBJDUMP=$ac_cv_prog_OBJDUMP
6093 if test -n "$OBJDUMP"; then
6094   echo "$as_me:$LINENO: result: $OBJDUMP" >&5
6095 echo "${ECHO_T}$OBJDUMP" >&6
6096 else
6097   echo "$as_me:$LINENO: result: no" >&5
6098 echo "${ECHO_T}no" >&6
6099 fi
6100
6101 fi
6102 if test -z "$ac_cv_prog_OBJDUMP"; then
6103   ac_ct_OBJDUMP=$OBJDUMP
6104   # Extract the first word of "objdump", so it can be a program name with args.
6105 set dummy objdump; ac_word=$2
6106 echo "$as_me:$LINENO: checking for $ac_word" >&5
6107 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6108 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
6109   echo $ECHO_N "(cached) $ECHO_C" >&6
6110 else
6111   if test -n "$ac_ct_OBJDUMP"; then
6112   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
6113 else
6114 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6115 for as_dir in $PATH
6116 do
6117   IFS=$as_save_IFS
6118   test -z "$as_dir" && as_dir=.
6119   for ac_exec_ext in '' $ac_executable_extensions; do
6120   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6121     ac_cv_prog_ac_ct_OBJDUMP="objdump"
6122     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6123     break 2
6124   fi
6125 done
6126 done
6127
6128   test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false"
6129 fi
6130 fi
6131 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
6132 if test -n "$ac_ct_OBJDUMP"; then
6133   echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
6134 echo "${ECHO_T}$ac_ct_OBJDUMP" >&6
6135 else
6136   echo "$as_me:$LINENO: result: no" >&5
6137 echo "${ECHO_T}no" >&6
6138 fi
6139
6140   OBJDUMP=$ac_ct_OBJDUMP
6141 else
6142   OBJDUMP="$ac_cv_prog_OBJDUMP"
6143 fi
6144
6145   ;;
6146
6147 esac
6148
6149 need_locks="$enable_libtool_lock"
6150
6151
6152 ac_ext=c
6153 ac_cpp='$CPP $CPPFLAGS'
6154 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6155 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6156 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6157 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
6158 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
6159 # On Suns, sometimes $CPP names a directory.
6160 if test -n "$CPP" && test -d "$CPP"; then
6161   CPP=
6162 fi
6163 if test -z "$CPP"; then
6164   if test "${ac_cv_prog_CPP+set}" = set; then
6165   echo $ECHO_N "(cached) $ECHO_C" >&6
6166 else
6167       # Double quotes because CPP needs to be expanded
6168     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6169     do
6170       ac_preproc_ok=false
6171 for ac_c_preproc_warn_flag in '' yes
6172 do
6173   # Use a header file that comes with gcc, so configuring glibc
6174   # with a fresh cross-compiler works.
6175   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6176   # <limits.h> exists even on freestanding compilers.
6177   # On the NeXT, cc -E runs the code through the compiler's parser,
6178   # not just through cpp. "Syntax error" is here to catch this case.
6179   cat >conftest.$ac_ext <<_ACEOF
6180 /* confdefs.h.  */
6181 _ACEOF
6182 cat confdefs.h >>conftest.$ac_ext
6183 cat >>conftest.$ac_ext <<_ACEOF
6184 /* end confdefs.h.  */
6185 #ifdef __STDC__
6186 # include <limits.h>
6187 #else
6188 # include <assert.h>
6189 #endif
6190                      Syntax error
6191 _ACEOF
6192 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6193   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6194   ac_status=$?
6195   grep -v '^ *+' conftest.er1 >conftest.err
6196   rm -f conftest.er1
6197   cat conftest.err >&5
6198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6199   (exit $ac_status); } >/dev/null; then
6200   if test -s conftest.err; then
6201     ac_cpp_err=$ac_c_preproc_warn_flag
6202     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6203   else
6204     ac_cpp_err=
6205   fi
6206 else
6207   ac_cpp_err=yes
6208 fi
6209 if test -z "$ac_cpp_err"; then
6210   :
6211 else
6212   echo "$as_me: failed program was:" >&5
6213 sed 's/^/| /' conftest.$ac_ext >&5
6214
6215   # Broken: fails on valid input.
6216 continue
6217 fi
6218 rm -f conftest.err conftest.$ac_ext
6219
6220   # OK, works on sane cases.  Now check whether non-existent headers
6221   # can be detected and how.
6222   cat >conftest.$ac_ext <<_ACEOF
6223 /* confdefs.h.  */
6224 _ACEOF
6225 cat confdefs.h >>conftest.$ac_ext
6226 cat >>conftest.$ac_ext <<_ACEOF
6227 /* end confdefs.h.  */
6228 #include <ac_nonexistent.h>
6229 _ACEOF
6230 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6231   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6232   ac_status=$?
6233   grep -v '^ *+' conftest.er1 >conftest.err
6234   rm -f conftest.er1
6235   cat conftest.err >&5
6236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6237   (exit $ac_status); } >/dev/null; then
6238   if test -s conftest.err; then
6239     ac_cpp_err=$ac_c_preproc_warn_flag
6240     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6241   else
6242     ac_cpp_err=
6243   fi
6244 else
6245   ac_cpp_err=yes
6246 fi
6247 if test -z "$ac_cpp_err"; then
6248   # Broken: success on invalid input.
6249 continue
6250 else
6251   echo "$as_me: failed program was:" >&5
6252 sed 's/^/| /' conftest.$ac_ext >&5
6253
6254   # Passes both tests.
6255 ac_preproc_ok=:
6256 break
6257 fi
6258 rm -f conftest.err conftest.$ac_ext
6259
6260 done
6261 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6262 rm -f conftest.err conftest.$ac_ext
6263 if $ac_preproc_ok; then
6264   break
6265 fi
6266
6267     done
6268     ac_cv_prog_CPP=$CPP
6269
6270 fi
6271   CPP=$ac_cv_prog_CPP
6272 else
6273   ac_cv_prog_CPP=$CPP
6274 fi
6275 echo "$as_me:$LINENO: result: $CPP" >&5
6276 echo "${ECHO_T}$CPP" >&6
6277 ac_preproc_ok=false
6278 for ac_c_preproc_warn_flag in '' yes
6279 do
6280   # Use a header file that comes with gcc, so configuring glibc
6281   # with a fresh cross-compiler works.
6282   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6283   # <limits.h> exists even on freestanding compilers.
6284   # On the NeXT, cc -E runs the code through the compiler's parser,
6285   # not just through cpp. "Syntax error" is here to catch this case.
6286   cat >conftest.$ac_ext <<_ACEOF
6287 /* confdefs.h.  */
6288 _ACEOF
6289 cat confdefs.h >>conftest.$ac_ext
6290 cat >>conftest.$ac_ext <<_ACEOF
6291 /* end confdefs.h.  */
6292 #ifdef __STDC__
6293 # include <limits.h>
6294 #else
6295 # include <assert.h>
6296 #endif
6297                      Syntax error
6298 _ACEOF
6299 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6300   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6301   ac_status=$?
6302   grep -v '^ *+' conftest.er1 >conftest.err
6303   rm -f conftest.er1
6304   cat conftest.err >&5
6305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6306   (exit $ac_status); } >/dev/null; then
6307   if test -s conftest.err; then
6308     ac_cpp_err=$ac_c_preproc_warn_flag
6309     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6310   else
6311     ac_cpp_err=
6312   fi
6313 else
6314   ac_cpp_err=yes
6315 fi
6316 if test -z "$ac_cpp_err"; then
6317   :
6318 else
6319   echo "$as_me: failed program was:" >&5
6320 sed 's/^/| /' conftest.$ac_ext >&5
6321
6322   # Broken: fails on valid input.
6323 continue
6324 fi
6325 rm -f conftest.err conftest.$ac_ext
6326
6327   # OK, works on sane cases.  Now check whether non-existent headers
6328   # can be detected and how.
6329   cat >conftest.$ac_ext <<_ACEOF
6330 /* confdefs.h.  */
6331 _ACEOF
6332 cat confdefs.h >>conftest.$ac_ext
6333 cat >>conftest.$ac_ext <<_ACEOF
6334 /* end confdefs.h.  */
6335 #include <ac_nonexistent.h>
6336 _ACEOF
6337 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6338   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6339   ac_status=$?
6340   grep -v '^ *+' conftest.er1 >conftest.err
6341   rm -f conftest.er1
6342   cat conftest.err >&5
6343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6344   (exit $ac_status); } >/dev/null; then
6345   if test -s conftest.err; then
6346     ac_cpp_err=$ac_c_preproc_warn_flag
6347     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6348   else
6349     ac_cpp_err=
6350   fi
6351 else
6352   ac_cpp_err=yes
6353 fi
6354 if test -z "$ac_cpp_err"; then
6355   # Broken: success on invalid input.
6356 continue
6357 else
6358   echo "$as_me: failed program was:" >&5
6359 sed 's/^/| /' conftest.$ac_ext >&5
6360
6361   # Passes both tests.
6362 ac_preproc_ok=:
6363 break
6364 fi
6365 rm -f conftest.err conftest.$ac_ext
6366
6367 done
6368 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6369 rm -f conftest.err conftest.$ac_ext
6370 if $ac_preproc_ok; then
6371   :
6372 else
6373   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
6374 See \`config.log' for more details." >&5
6375 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
6376 See \`config.log' for more details." >&2;}
6377    { (exit 1); exit 1; }; }
6378 fi
6379
6380 ac_ext=c
6381 ac_cpp='$CPP $CPPFLAGS'
6382 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6383 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6384 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6385
6386
6387 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6388 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6389 if test "${ac_cv_header_stdc+set}" = set; then
6390   echo $ECHO_N "(cached) $ECHO_C" >&6
6391 else
6392   cat >conftest.$ac_ext <<_ACEOF
6393 /* confdefs.h.  */
6394 _ACEOF
6395 cat confdefs.h >>conftest.$ac_ext
6396 cat >>conftest.$ac_ext <<_ACEOF
6397 /* end confdefs.h.  */
6398 #include <stdlib.h>
6399 #include <stdarg.h>
6400 #include <string.h>
6401 #include <float.h>
6402
6403 int
6404 main ()
6405 {
6406
6407   ;
6408   return 0;
6409 }
6410 _ACEOF
6411 rm -f conftest.$ac_objext
6412 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6413   (eval $ac_compile) 2>conftest.er1
6414   ac_status=$?
6415   grep -v '^ *+' conftest.er1 >conftest.err
6416   rm -f conftest.er1
6417   cat conftest.err >&5
6418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6419   (exit $ac_status); } &&
6420          { ac_try='test -z "$ac_c_werror_flag"
6421                          || test ! -s conftest.err'
6422   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6423   (eval $ac_try) 2>&5
6424   ac_status=$?
6425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6426   (exit $ac_status); }; } &&
6427          { ac_try='test -s conftest.$ac_objext'
6428   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6429   (eval $ac_try) 2>&5
6430   ac_status=$?
6431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6432   (exit $ac_status); }; }; then
6433   ac_cv_header_stdc=yes
6434 else
6435   echo "$as_me: failed program was:" >&5
6436 sed 's/^/| /' conftest.$ac_ext >&5
6437
6438 ac_cv_header_stdc=no
6439 fi
6440 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6441
6442 if test $ac_cv_header_stdc = yes; then
6443   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6444   cat >conftest.$ac_ext <<_ACEOF
6445 /* confdefs.h.  */
6446 _ACEOF
6447 cat confdefs.h >>conftest.$ac_ext
6448 cat >>conftest.$ac_ext <<_ACEOF
6449 /* end confdefs.h.  */
6450 #include <string.h>
6451
6452 _ACEOF
6453 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6454   $EGREP "memchr" >/dev/null 2>&1; then
6455   :
6456 else
6457   ac_cv_header_stdc=no
6458 fi
6459 rm -f conftest*
6460
6461 fi
6462
6463 if test $ac_cv_header_stdc = yes; then
6464   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6465   cat >conftest.$ac_ext <<_ACEOF
6466 /* confdefs.h.  */
6467 _ACEOF
6468 cat confdefs.h >>conftest.$ac_ext
6469 cat >>conftest.$ac_ext <<_ACEOF
6470 /* end confdefs.h.  */
6471 #include <stdlib.h>
6472
6473 _ACEOF
6474 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6475   $EGREP "free" >/dev/null 2>&1; then
6476   :
6477 else
6478   ac_cv_header_stdc=no
6479 fi
6480 rm -f conftest*
6481
6482 fi
6483
6484 if test $ac_cv_header_stdc = yes; then
6485   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6486   if test "$cross_compiling" = yes; then
6487   :
6488 else
6489   cat >conftest.$ac_ext <<_ACEOF
6490 /* confdefs.h.  */
6491 _ACEOF
6492 cat confdefs.h >>conftest.$ac_ext
6493 cat >>conftest.$ac_ext <<_ACEOF
6494 /* end confdefs.h.  */
6495 #include <ctype.h>
6496 #if ((' ' & 0x0FF) == 0x020)
6497 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6498 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6499 #else
6500 # define ISLOWER(c) \
6501                    (('a' <= (c) && (c) <= 'i') \
6502                      || ('j' <= (c) && (c) <= 'r') \
6503                      || ('s' <= (c) && (c) <= 'z'))
6504 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6505 #endif
6506
6507 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6508 int
6509 main ()
6510 {
6511   int i;
6512   for (i = 0; i < 256; i++)
6513     if (XOR (islower (i), ISLOWER (i))
6514         || toupper (i) != TOUPPER (i))
6515       exit(2);
6516   exit (0);
6517 }
6518 _ACEOF
6519 rm -f conftest$ac_exeext
6520 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6521   (eval $ac_link) 2>&5
6522   ac_status=$?
6523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6524   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6525   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6526   (eval $ac_try) 2>&5
6527   ac_status=$?
6528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6529   (exit $ac_status); }; }; then
6530   :
6531 else
6532   echo "$as_me: program exited with status $ac_status" >&5
6533 echo "$as_me: failed program was:" >&5
6534 sed 's/^/| /' conftest.$ac_ext >&5
6535
6536 ( exit $ac_status )
6537 ac_cv_header_stdc=no
6538 fi
6539 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6540 fi
6541 fi
6542 fi
6543 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6544 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6545 if test $ac_cv_header_stdc = yes; then
6546
6547 cat >>confdefs.h <<\_ACEOF
6548 #define STDC_HEADERS 1
6549 _ACEOF
6550
6551 fi
6552
6553 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6564                   inttypes.h stdint.h unistd.h
6565 do
6566 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6567 echo "$as_me:$LINENO: checking for $ac_header" >&5
6568 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6569 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6570   echo $ECHO_N "(cached) $ECHO_C" >&6
6571 else
6572   cat >conftest.$ac_ext <<_ACEOF
6573 /* confdefs.h.  */
6574 _ACEOF
6575 cat confdefs.h >>conftest.$ac_ext
6576 cat >>conftest.$ac_ext <<_ACEOF
6577 /* end confdefs.h.  */
6578 $ac_includes_default
6579
6580 #include <$ac_header>
6581 _ACEOF
6582 rm -f conftest.$ac_objext
6583 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6584   (eval $ac_compile) 2>conftest.er1
6585   ac_status=$?
6586   grep -v '^ *+' conftest.er1 >conftest.err
6587   rm -f conftest.er1
6588   cat conftest.err >&5
6589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6590   (exit $ac_status); } &&
6591          { ac_try='test -z "$ac_c_werror_flag"
6592                          || test ! -s conftest.err'
6593   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6594   (eval $ac_try) 2>&5
6595   ac_status=$?
6596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6597   (exit $ac_status); }; } &&
6598          { ac_try='test -s conftest.$ac_objext'
6599   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6600   (eval $ac_try) 2>&5
6601   ac_status=$?
6602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6603   (exit $ac_status); }; }; then
6604   eval "$as_ac_Header=yes"
6605 else
6606   echo "$as_me: failed program was:" >&5
6607 sed 's/^/| /' conftest.$ac_ext >&5
6608
6609 eval "$as_ac_Header=no"
6610 fi
6611 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6612 fi
6613 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6614 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6615 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6616   cat >>confdefs.h <<_ACEOF
6617 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6618 _ACEOF
6619
6620 fi
6621
6622 done
6623
6624
6625
6626 for ac_header in dlfcn.h
6627 do
6628 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6629 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6630   echo "$as_me:$LINENO: checking for $ac_header" >&5
6631 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6632 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6633   echo $ECHO_N "(cached) $ECHO_C" >&6
6634 fi
6635 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6636 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6637 else
6638   # Is the header compilable?
6639 echo "$as_me:$LINENO: checking $ac_header usability" >&5
6640 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6641 cat >conftest.$ac_ext <<_ACEOF
6642 /* confdefs.h.  */
6643 _ACEOF
6644 cat confdefs.h >>conftest.$ac_ext
6645 cat >>conftest.$ac_ext <<_ACEOF
6646 /* end confdefs.h.  */
6647 $ac_includes_default
6648 #include <$ac_header>
6649 _ACEOF
6650 rm -f conftest.$ac_objext
6651 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6652   (eval $ac_compile) 2>conftest.er1
6653   ac_status=$?
6654   grep -v '^ *+' conftest.er1 >conftest.err
6655   rm -f conftest.er1
6656   cat conftest.err >&5
6657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6658   (exit $ac_status); } &&
6659          { ac_try='test -z "$ac_c_werror_flag"
6660                          || test ! -s conftest.err'
6661   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6662   (eval $ac_try) 2>&5
6663   ac_status=$?
6664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6665   (exit $ac_status); }; } &&
6666          { ac_try='test -s conftest.$ac_objext'
6667   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6668   (eval $ac_try) 2>&5
6669   ac_status=$?
6670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6671   (exit $ac_status); }; }; then
6672   ac_header_compiler=yes
6673 else
6674   echo "$as_me: failed program was:" >&5
6675 sed 's/^/| /' conftest.$ac_ext >&5
6676
6677 ac_header_compiler=no
6678 fi
6679 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6680 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6681 echo "${ECHO_T}$ac_header_compiler" >&6
6682
6683 # Is the header present?
6684 echo "$as_me:$LINENO: checking $ac_header presence" >&5
6685 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6686 cat >conftest.$ac_ext <<_ACEOF
6687 /* confdefs.h.  */
6688 _ACEOF
6689 cat confdefs.h >>conftest.$ac_ext
6690 cat >>conftest.$ac_ext <<_ACEOF
6691 /* end confdefs.h.  */
6692 #include <$ac_header>
6693 _ACEOF
6694 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6695   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6696   ac_status=$?
6697   grep -v '^ *+' conftest.er1 >conftest.err
6698   rm -f conftest.er1
6699   cat conftest.err >&5
6700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6701   (exit $ac_status); } >/dev/null; then
6702   if test -s conftest.err; then
6703     ac_cpp_err=$ac_c_preproc_warn_flag
6704     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6705   else
6706     ac_cpp_err=
6707   fi
6708 else
6709   ac_cpp_err=yes
6710 fi
6711 if test -z "$ac_cpp_err"; then
6712   ac_header_preproc=yes
6713 else
6714   echo "$as_me: failed program was:" >&5
6715 sed 's/^/| /' conftest.$ac_ext >&5
6716
6717   ac_header_preproc=no
6718 fi
6719 rm -f conftest.err conftest.$ac_ext
6720 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6721 echo "${ECHO_T}$ac_header_preproc" >&6
6722
6723 # So?  What about this header?
6724 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6725   yes:no: )
6726     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6727 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6728     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6729 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6730     ac_header_preproc=yes
6731     ;;
6732   no:yes:* )
6733     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6734 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6735     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6736 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6737     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6738 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6739     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6740 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6741     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6742 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6743     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6744 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6745     (
6746       cat <<\_ASBOX
6747 ## --------------------------------------------- ##
6748 ## Report this to <http://www.openldap.org/its/> ##
6749 ## --------------------------------------------- ##
6750 _ASBOX
6751     ) |
6752       sed "s/^/$as_me: WARNING:     /" >&2
6753     ;;
6754 esac
6755 echo "$as_me:$LINENO: checking for $ac_header" >&5
6756 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6757 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6758   echo $ECHO_N "(cached) $ECHO_C" >&6
6759 else
6760   eval "$as_ac_Header=\$ac_header_preproc"
6761 fi
6762 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6763 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6764
6765 fi
6766 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6767   cat >>confdefs.h <<_ACEOF
6768 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6769 _ACEOF
6770
6771 fi
6772
6773 done
6774
6775
6776 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
6777
6778 # find the maximum length of command line arguments
6779 echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
6780 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
6781 if test "${lt_cv_sys_max_cmd_len+set}" = set; then
6782   echo $ECHO_N "(cached) $ECHO_C" >&6
6783 else
6784     i=0
6785   teststring="ABCD"
6786
6787   case $build_os in
6788   msdosdjgpp*)
6789     # On DJGPP, this test can blow up pretty badly due to problems in libc
6790     # (any single argument exceeding 2000 bytes causes a buffer overrun
6791     # during glob expansion).  Even if it were fixed, the result of this
6792     # check would be larger than it should be.
6793     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
6794     ;;
6795
6796   gnu*)
6797     # Under GNU Hurd, this test is not required because there is
6798     # no limit to the length of command line arguments.
6799     # Libtool will interpret -1 as no limit whatsoever
6800     lt_cv_sys_max_cmd_len=-1;
6801     ;;
6802
6803   cygwin* | mingw*)
6804     # On Win9x/ME, this test blows up -- it succeeds, but takes
6805     # about 5 minutes as the teststring grows exponentially.
6806     # Worse, since 9x/ME are not pre-emptively multitasking,
6807     # you end up with a "frozen" computer, even though with patience
6808     # the test eventually succeeds (with a max line length of 256k).
6809     # Instead, let's just punt: use the minimum linelength reported by
6810     # all of the supported platforms: 8192 (on NT/2K/XP).
6811     lt_cv_sys_max_cmd_len=8192;
6812     ;;
6813
6814   amigaos*)
6815     # On AmigaOS with pdksh, this test takes hours, literally.
6816     # So we just punt and use a minimum line length of 8192.
6817     lt_cv_sys_max_cmd_len=8192;
6818     ;;
6819
6820   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
6821     # This has been around since 386BSD, at least.  Likely further.
6822     if test -x /sbin/sysctl; then
6823       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
6824     elif test -x /usr/sbin/sysctl; then
6825       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
6826     else
6827       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
6828     fi
6829     # And add a safety zone
6830     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6831     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6832     ;;
6833   osf*)
6834     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
6835     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
6836     # nice to cause kernel panics so lets avoid the loop below.
6837     # First set a reasonable default.
6838     lt_cv_sys_max_cmd_len=16384
6839     #
6840     if test -x /sbin/sysconfig; then
6841       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
6842         *1*) lt_cv_sys_max_cmd_len=-1 ;;
6843       esac
6844     fi
6845     ;;
6846   *)
6847     # If test is not a shell built-in, we'll probably end up computing a
6848     # maximum length that is only half of the actual maximum length, but
6849     # we can't tell.
6850     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
6851     while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
6852                = "XX$teststring") >/dev/null 2>&1 &&
6853             new_result=`expr "X$teststring" : ".*" 2>&1` &&
6854             lt_cv_sys_max_cmd_len=$new_result &&
6855             test $i != 17 # 1/2 MB should be enough
6856     do
6857       i=`expr $i + 1`
6858       teststring=$teststring$teststring
6859     done
6860     teststring=
6861     # Add a significant safety factor because C++ compilers can tack on massive
6862     # amounts of additional arguments before passing them to the linker.
6863     # It appears as though 1/2 is a usable value.
6864     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6865     ;;
6866   esac
6867
6868 fi
6869
6870 if test -n $lt_cv_sys_max_cmd_len ; then
6871   echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
6872 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
6873 else
6874   echo "$as_me:$LINENO: result: none" >&5
6875 echo "${ECHO_T}none" >&6
6876 fi
6877
6878
6879
6880
6881 # Check for command to grab the raw symbol name followed by C symbol from nm.
6882 echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
6883 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
6884 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
6885   echo $ECHO_N "(cached) $ECHO_C" >&6
6886 else
6887
6888 # These are sane defaults that work on at least a few old systems.
6889 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
6890
6891 # Character class describing NM global symbol codes.
6892 symcode='[BCDEGRST]'
6893
6894 # Regexp to match symbols that can be accessed directly from C.
6895 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
6896
6897 # Transform an extracted symbol line into a proper C declaration
6898 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6899
6900 # Transform an extracted symbol line into symbol name and symbol address
6901 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
6902
6903 # Define system-specific variables.
6904 case $host_os in
6905 aix*)
6906   symcode='[BCDT]'
6907   ;;
6908 cygwin* | mingw* | pw32*)
6909   symcode='[ABCDGISTW]'
6910   ;;
6911 hpux*) # Its linker distinguishes data from code symbols
6912   if test "$host_cpu" = ia64; then
6913     symcode='[ABCDEGRST]'
6914   fi
6915   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6916   lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
6917   ;;
6918 linux*)
6919   if test "$host_cpu" = ia64; then
6920     symcode='[ABCDGIRSTW]'
6921     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6922     lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
6923   fi
6924   ;;
6925 irix* | nonstopux*)
6926   symcode='[BCDEGRST]'
6927   ;;
6928 osf*)
6929   symcode='[BCDEGQRST]'
6930   ;;
6931 solaris* | sysv5*)
6932   symcode='[BDRT]'
6933   ;;
6934 sysv4)
6935   symcode='[DFNSTU]'
6936   ;;
6937 esac
6938
6939 # Handle CRLF in mingw tool chain
6940 opt_cr=
6941 case $build_os in
6942 mingw*)
6943   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6944   ;;
6945 esac
6946
6947 # If we're using GNU nm, then use its standard symbol codes.
6948 case `$NM -V 2>&1` in
6949 *GNU* | *'with BFD'*)
6950   symcode='[ABCDGIRSTW]' ;;
6951 esac
6952
6953 # Try without a prefix undercore, then with it.
6954 for ac_symprfx in "" "_"; do
6955
6956   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6957   symxfrm="\\1 $ac_symprfx\\2 \\2"
6958
6959   # Write the raw and C identifiers.
6960   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[       ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6961
6962   # Check to see that the pipe works correctly.
6963   pipe_works=no
6964
6965   rm -f conftest*
6966   cat > conftest.$ac_ext <<EOF
6967 #ifdef __cplusplus
6968 extern "C" {
6969 #endif
6970 char nm_test_var;
6971 void nm_test_func(){}
6972 #ifdef __cplusplus
6973 }
6974 #endif
6975 int main(){nm_test_var='a';nm_test_func();return(0);}
6976 EOF
6977
6978   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6979   (eval $ac_compile) 2>&5
6980   ac_status=$?
6981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6982   (exit $ac_status); }; then
6983     # Now try to grab the symbols.
6984     nlist=conftest.nm
6985     if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
6986   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
6987   ac_status=$?
6988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6989   (exit $ac_status); } && test -s "$nlist"; then
6990       # Try sorting and uniquifying the output.
6991       if sort "$nlist" | uniq > "$nlist"T; then
6992         mv -f "$nlist"T "$nlist"
6993       else
6994         rm -f "$nlist"T
6995       fi
6996
6997       # Make sure that we snagged all the symbols we need.
6998       if grep ' nm_test_var$' "$nlist" >/dev/null; then
6999         if grep ' nm_test_func$' "$nlist" >/dev/null; then
7000           cat <<EOF > conftest.$ac_ext
7001 #ifdef __cplusplus
7002 extern "C" {
7003 #endif
7004
7005 EOF
7006           # Now generate the symbol file.
7007           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
7008
7009           cat <<EOF >> conftest.$ac_ext
7010 #if defined (__STDC__) && __STDC__
7011 # define lt_ptr_t void *
7012 #else
7013 # define lt_ptr_t char *
7014 # define const
7015 #endif
7016
7017 /* The mapping between symbol names and symbols. */
7018 const struct {
7019   const char *name;
7020   lt_ptr_t address;
7021 }
7022 lt_preloaded_symbols[] =
7023 {
7024 EOF
7025           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
7026           cat <<\EOF >> conftest.$ac_ext
7027   {0, (lt_ptr_t) 0}
7028 };
7029
7030 #ifdef __cplusplus
7031 }
7032 #endif
7033 EOF
7034           # Now try linking the two files.
7035           mv conftest.$ac_objext conftstm.$ac_objext
7036           lt_save_LIBS="$LIBS"
7037           lt_save_CFLAGS="$CFLAGS"
7038           LIBS="conftstm.$ac_objext"
7039           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7040           if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7041   (eval $ac_link) 2>&5
7042   ac_status=$?
7043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7044   (exit $ac_status); } && test -s conftest${ac_exeext}; then
7045             pipe_works=yes
7046           fi
7047           LIBS="$lt_save_LIBS"
7048           CFLAGS="$lt_save_CFLAGS"
7049         else
7050           echo "cannot find nm_test_func in $nlist" >&5
7051         fi
7052       else
7053         echo "cannot find nm_test_var in $nlist" >&5
7054       fi
7055     else
7056       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7057     fi
7058   else
7059     echo "$progname: failed program was:" >&5
7060     cat conftest.$ac_ext >&5
7061   fi
7062   rm -f conftest* conftst*
7063
7064   # Do not use the global_symbol_pipe unless it works.
7065   if test "$pipe_works" = yes; then
7066     break
7067   else
7068     lt_cv_sys_global_symbol_pipe=
7069   fi
7070 done
7071
7072 fi
7073
7074 if test -z "$lt_cv_sys_global_symbol_pipe"; then
7075   lt_cv_sys_global_symbol_to_cdecl=
7076 fi
7077 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7078   echo "$as_me:$LINENO: result: failed" >&5
7079 echo "${ECHO_T}failed" >&6
7080 else
7081   echo "$as_me:$LINENO: result: ok" >&5
7082 echo "${ECHO_T}ok" >&6
7083 fi
7084
7085 echo "$as_me:$LINENO: checking for objdir" >&5
7086 echo $ECHO_N "checking for objdir... $ECHO_C" >&6
7087 if test "${lt_cv_objdir+set}" = set; then
7088   echo $ECHO_N "(cached) $ECHO_C" >&6
7089 else
7090   rm -f .libs 2>/dev/null
7091 mkdir .libs 2>/dev/null
7092 if test -d .libs; then
7093   lt_cv_objdir=.libs
7094 else
7095   # MS-DOS does not allow filenames that begin with a dot.
7096   lt_cv_objdir=_libs
7097 fi
7098 rmdir .libs 2>/dev/null
7099 fi
7100 echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
7101 echo "${ECHO_T}$lt_cv_objdir" >&6
7102 objdir=$lt_cv_objdir
7103
7104
7105
7106
7107
7108 case $host_os in
7109 aix3*)
7110   # AIX sometimes has problems with the GCC collect2 program.  For some
7111   # reason, if we set the COLLECT_NAMES environment variable, the problems
7112   # vanish in a puff of smoke.
7113   if test "X${COLLECT_NAMES+set}" != Xset; then
7114     COLLECT_NAMES=
7115     export COLLECT_NAMES
7116   fi
7117   ;;
7118 esac
7119
7120 # Sed substitution that helps us do robust quoting.  It backslashifies
7121 # metacharacters that are still active within double-quoted strings.
7122 Xsed='sed -e 1s/^X//'
7123 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
7124
7125 # Same as above, but do not quote variable references.
7126 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
7127
7128 # Sed substitution to delay expansion of an escaped shell variable in a
7129 # double_quote_subst'ed string.
7130 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7131
7132 # Sed substitution to avoid accidental globbing in evaled expressions
7133 no_glob_subst='s/\*/\\\*/g'
7134
7135 # Constants:
7136 rm="rm -f"
7137
7138 # Global variables:
7139 default_ofile=libtool
7140 can_build_shared=yes
7141
7142 # All known linkers require a `.a' archive for static linking (except MSVC,
7143 # which needs '.lib').
7144 libext=a
7145 ltmain="$ac_aux_dir/ltmain.sh"
7146 ofile="$default_ofile"
7147 with_gnu_ld="$lt_cv_prog_gnu_ld"
7148
7149 if test -n "$ac_tool_prefix"; then
7150   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7151 set dummy ${ac_tool_prefix}ar; ac_word=$2
7152 echo "$as_me:$LINENO: checking for $ac_word" >&5
7153 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7154 if test "${ac_cv_prog_AR+set}" = set; then
7155   echo $ECHO_N "(cached) $ECHO_C" >&6
7156 else
7157   if test -n "$AR"; then
7158   ac_cv_prog_AR="$AR" # Let the user override the test.
7159 else
7160 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7161 for as_dir in $PATH
7162 do
7163   IFS=$as_save_IFS
7164   test -z "$as_dir" && as_dir=.
7165   for ac_exec_ext in '' $ac_executable_extensions; do
7166   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7167     ac_cv_prog_AR="${ac_tool_prefix}ar"
7168     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7169     break 2
7170   fi
7171 done
7172 done
7173
7174 fi
7175 fi
7176 AR=$ac_cv_prog_AR
7177 if test -n "$AR"; then
7178   echo "$as_me:$LINENO: result: $AR" >&5
7179 echo "${ECHO_T}$AR" >&6
7180 else
7181   echo "$as_me:$LINENO: result: no" >&5
7182 echo "${ECHO_T}no" >&6
7183 fi
7184
7185 fi
7186 if test -z "$ac_cv_prog_AR"; then
7187   ac_ct_AR=$AR
7188   # Extract the first word of "ar", so it can be a program name with args.
7189 set dummy ar; ac_word=$2
7190 echo "$as_me:$LINENO: checking for $ac_word" >&5
7191 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7192 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
7193   echo $ECHO_N "(cached) $ECHO_C" >&6
7194 else
7195   if test -n "$ac_ct_AR"; then
7196   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7197 else
7198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7199 for as_dir in $PATH
7200 do
7201   IFS=$as_save_IFS
7202   test -z "$as_dir" && as_dir=.
7203   for ac_exec_ext in '' $ac_executable_extensions; do
7204   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7205     ac_cv_prog_ac_ct_AR="ar"
7206     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7207     break 2
7208   fi
7209 done
7210 done
7211
7212   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
7213 fi
7214 fi
7215 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7216 if test -n "$ac_ct_AR"; then
7217   echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
7218 echo "${ECHO_T}$ac_ct_AR" >&6
7219 else
7220   echo "$as_me:$LINENO: result: no" >&5
7221 echo "${ECHO_T}no" >&6
7222 fi
7223
7224   AR=$ac_ct_AR
7225 else
7226   AR="$ac_cv_prog_AR"
7227 fi
7228
7229 if test -n "$ac_tool_prefix"; then
7230   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7231 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7232 echo "$as_me:$LINENO: checking for $ac_word" >&5
7233 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7234 if test "${ac_cv_prog_RANLIB+set}" = set; then
7235   echo $ECHO_N "(cached) $ECHO_C" >&6
7236 else
7237   if test -n "$RANLIB"; then
7238   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7239 else
7240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7241 for as_dir in $PATH
7242 do
7243   IFS=$as_save_IFS
7244   test -z "$as_dir" && as_dir=.
7245   for ac_exec_ext in '' $ac_executable_extensions; do
7246   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7247     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7248     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7249     break 2
7250   fi
7251 done
7252 done
7253
7254 fi
7255 fi
7256 RANLIB=$ac_cv_prog_RANLIB
7257 if test -n "$RANLIB"; then
7258   echo "$as_me:$LINENO: result: $RANLIB" >&5
7259 echo "${ECHO_T}$RANLIB" >&6
7260 else
7261   echo "$as_me:$LINENO: result: no" >&5
7262 echo "${ECHO_T}no" >&6
7263 fi
7264
7265 fi
7266 if test -z "$ac_cv_prog_RANLIB"; then
7267   ac_ct_RANLIB=$RANLIB
7268   # Extract the first word of "ranlib", so it can be a program name with args.
7269 set dummy ranlib; ac_word=$2
7270 echo "$as_me:$LINENO: checking for $ac_word" >&5
7271 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7272 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7273   echo $ECHO_N "(cached) $ECHO_C" >&6
7274 else
7275   if test -n "$ac_ct_RANLIB"; then
7276   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7277 else
7278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7279 for as_dir in $PATH
7280 do
7281   IFS=$as_save_IFS
7282   test -z "$as_dir" && as_dir=.
7283   for ac_exec_ext in '' $ac_executable_extensions; do
7284   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7285     ac_cv_prog_ac_ct_RANLIB="ranlib"
7286     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7287     break 2
7288   fi
7289 done
7290 done
7291
7292   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7293 fi
7294 fi
7295 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7296 if test -n "$ac_ct_RANLIB"; then
7297   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7298 echo "${ECHO_T}$ac_ct_RANLIB" >&6
7299 else
7300   echo "$as_me:$LINENO: result: no" >&5
7301 echo "${ECHO_T}no" >&6
7302 fi
7303
7304   RANLIB=$ac_ct_RANLIB
7305 else
7306   RANLIB="$ac_cv_prog_RANLIB"
7307 fi
7308
7309 if test -n "$ac_tool_prefix"; then
7310   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7311 set dummy ${ac_tool_prefix}strip; ac_word=$2
7312 echo "$as_me:$LINENO: checking for $ac_word" >&5
7313 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7314 if test "${ac_cv_prog_STRIP+set}" = set; then
7315   echo $ECHO_N "(cached) $ECHO_C" >&6
7316 else
7317   if test -n "$STRIP"; then
7318   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7319 else
7320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7321 for as_dir in $PATH
7322 do
7323   IFS=$as_save_IFS
7324   test -z "$as_dir" && as_dir=.
7325   for ac_exec_ext in '' $ac_executable_extensions; do
7326   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7327     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7328     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7329     break 2
7330   fi
7331 done
7332 done
7333
7334 fi
7335 fi
7336 STRIP=$ac_cv_prog_STRIP
7337 if test -n "$STRIP"; then
7338   echo "$as_me:$LINENO: result: $STRIP" >&5
7339 echo "${ECHO_T}$STRIP" >&6
7340 else
7341   echo "$as_me:$LINENO: result: no" >&5
7342 echo "${ECHO_T}no" >&6
7343 fi
7344
7345 fi
7346 if test -z "$ac_cv_prog_STRIP"; then
7347   ac_ct_STRIP=$STRIP
7348   # Extract the first word of "strip", so it can be a program name with args.
7349 set dummy strip; ac_word=$2
7350 echo "$as_me:$LINENO: checking for $ac_word" >&5
7351 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7352 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
7353   echo $ECHO_N "(cached) $ECHO_C" >&6
7354 else
7355   if test -n "$ac_ct_STRIP"; then
7356   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7357 else
7358 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7359 for as_dir in $PATH
7360 do
7361   IFS=$as_save_IFS
7362   test -z "$as_dir" && as_dir=.
7363   for ac_exec_ext in '' $ac_executable_extensions; do
7364   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7365     ac_cv_prog_ac_ct_STRIP="strip"
7366     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7367     break 2
7368   fi
7369 done
7370 done
7371
7372   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
7373 fi
7374 fi
7375 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7376 if test -n "$ac_ct_STRIP"; then
7377   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
7378 echo "${ECHO_T}$ac_ct_STRIP" >&6
7379 else
7380   echo "$as_me:$LINENO: result: no" >&5
7381 echo "${ECHO_T}no" >&6
7382 fi
7383
7384   STRIP=$ac_ct_STRIP
7385 else
7386   STRIP="$ac_cv_prog_STRIP"
7387 fi
7388
7389
7390 old_CC="$CC"
7391 old_CFLAGS="$CFLAGS"
7392
7393 # Set sane defaults for various variables
7394 test -z "$AR" && AR=ar
7395 test -z "$AR_FLAGS" && AR_FLAGS=cru
7396 test -z "$AS" && AS=as
7397 test -z "$CC" && CC=cc
7398 test -z "$LTCC" && LTCC=$CC
7399 test -z "$DLLTOOL" && DLLTOOL=dlltool
7400 test -z "$LD" && LD=ld
7401 test -z "$LN_S" && LN_S="ln -s"
7402 test -z "$MAGIC_CMD" && MAGIC_CMD=file
7403 test -z "$NM" && NM=nm
7404 test -z "$SED" && SED=sed
7405 test -z "$OBJDUMP" && OBJDUMP=objdump
7406 test -z "$RANLIB" && RANLIB=:
7407 test -z "$STRIP" && STRIP=:
7408 test -z "$ac_objext" && ac_objext=o
7409
7410 # Determine commands to create old-style static archives.
7411 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
7412 old_postinstall_cmds='chmod 644 $oldlib'
7413 old_postuninstall_cmds=
7414
7415 if test -n "$RANLIB"; then
7416   case $host_os in
7417   openbsd*)
7418     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
7419     ;;
7420   *)
7421     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
7422     ;;
7423   esac
7424   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
7425 fi
7426
7427 for cc_temp in $compiler""; do
7428   case $cc_temp in
7429     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
7430     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
7431     \-*) ;;
7432     *) break;;
7433   esac
7434 done
7435 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
7436
7437
7438 # Only perform the check for file, if the check method requires it
7439 case $deplibs_check_method in
7440 file_magic*)
7441   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
7442     echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
7443 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
7444 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
7445   echo $ECHO_N "(cached) $ECHO_C" >&6
7446 else
7447   case $MAGIC_CMD in
7448 [\\/*] |  ?:[\\/]*)
7449   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7450   ;;
7451 *)
7452   lt_save_MAGIC_CMD="$MAGIC_CMD"
7453   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7454   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7455   for ac_dir in $ac_dummy; do
7456     IFS="$lt_save_ifs"
7457     test -z "$ac_dir" && ac_dir=.
7458     if test -f $ac_dir/${ac_tool_prefix}file; then
7459       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
7460       if test -n "$file_magic_test_file"; then
7461         case $deplibs_check_method in
7462         "file_magic "*)
7463           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7464           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7465           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7466             $EGREP "$file_magic_regex" > /dev/null; then
7467             :
7468           else
7469             cat <<EOF 1>&2
7470
7471 *** Warning: the command libtool uses to detect shared libraries,
7472 *** $file_magic_cmd, produces output that libtool cannot recognize.
7473 *** The result is that libtool may fail to recognize shared libraries
7474 *** as such.  This will affect the creation of libtool libraries that
7475 *** depend on shared libraries, but programs linked with such libtool
7476 *** libraries will work regardless of this problem.  Nevertheless, you
7477 *** may want to report the problem to your system manager and/or to
7478 *** bug-libtool@gnu.org
7479
7480 EOF
7481           fi ;;
7482         esac
7483       fi
7484       break
7485     fi
7486   done
7487   IFS="$lt_save_ifs"
7488   MAGIC_CMD="$lt_save_MAGIC_CMD"
7489   ;;
7490 esac
7491 fi
7492
7493 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7494 if test -n "$MAGIC_CMD"; then
7495   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
7496 echo "${ECHO_T}$MAGIC_CMD" >&6
7497 else
7498   echo "$as_me:$LINENO: result: no" >&5
7499 echo "${ECHO_T}no" >&6
7500 fi
7501
7502 if test -z "$lt_cv_path_MAGIC_CMD"; then
7503   if test -n "$ac_tool_prefix"; then
7504     echo "$as_me:$LINENO: checking for file" >&5
7505 echo $ECHO_N "checking for file... $ECHO_C" >&6
7506 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
7507   echo $ECHO_N "(cached) $ECHO_C" >&6
7508 else
7509   case $MAGIC_CMD in
7510 [\\/*] |  ?:[\\/]*)
7511   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7512   ;;
7513 *)
7514   lt_save_MAGIC_CMD="$MAGIC_CMD"
7515   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7516   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7517   for ac_dir in $ac_dummy; do
7518     IFS="$lt_save_ifs"
7519     test -z "$ac_dir" && ac_dir=.
7520     if test -f $ac_dir/file; then
7521       lt_cv_path_MAGIC_CMD="$ac_dir/file"
7522       if test -n "$file_magic_test_file"; then
7523         case $deplibs_check_method in
7524         "file_magic "*)
7525           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7526           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7527           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7528             $EGREP "$file_magic_regex" > /dev/null; then
7529             :
7530           else
7531             cat <<EOF 1>&2
7532
7533 *** Warning: the command libtool uses to detect shared libraries,
7534 *** $file_magic_cmd, produces output that libtool cannot recognize.
7535 *** The result is that libtool may fail to recognize shared libraries
7536 *** as such.  This will affect the creation of libtool libraries that
7537 *** depend on shared libraries, but programs linked with such libtool
7538 *** libraries will work regardless of this problem.  Nevertheless, you
7539 *** may want to report the problem to your system manager and/or to
7540 *** bug-libtool@gnu.org
7541
7542 EOF
7543           fi ;;
7544         esac
7545       fi
7546       break
7547     fi
7548   done
7549   IFS="$lt_save_ifs"
7550   MAGIC_CMD="$lt_save_MAGIC_CMD"
7551   ;;
7552 esac
7553 fi
7554
7555 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7556 if test -n "$MAGIC_CMD"; then
7557   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
7558 echo "${ECHO_T}$MAGIC_CMD" >&6
7559 else
7560   echo "$as_me:$LINENO: result: no" >&5
7561 echo "${ECHO_T}no" >&6
7562 fi
7563
7564   else
7565     MAGIC_CMD=:
7566   fi
7567 fi
7568
7569   fi
7570   ;;
7571 esac
7572
7573 enable_dlopen=yes
7574 enable_win32_dll=yes
7575
7576 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
7577 if test "${enable_libtool_lock+set}" = set; then
7578   enableval="$enable_libtool_lock"
7579
7580 fi;
7581 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
7582
7583
7584 # Check whether --with-pic or --without-pic was given.
7585 if test "${with_pic+set}" = set; then
7586   withval="$with_pic"
7587   pic_mode="$withval"
7588 else
7589   pic_mode=default
7590 fi;
7591 test -z "$pic_mode" && pic_mode=default
7592
7593 # Use C for the default configuration in the libtool script
7594 tagname=
7595 lt_save_CC="$CC"
7596 ac_ext=c
7597 ac_cpp='$CPP $CPPFLAGS'
7598 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7599 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7600 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7601
7602
7603 # Source file extension for C test sources.
7604 ac_ext=c
7605
7606 # Object file extension for compiled C test sources.
7607 objext=o
7608 objext=$objext
7609
7610 # Code to be used in simple compile tests
7611 lt_simple_compile_test_code="int some_variable = 0;\n"
7612
7613 # Code to be used in simple link tests
7614 lt_simple_link_test_code='int main(){return(0);}\n'
7615
7616
7617 # If no C compiler was specified, use CC.
7618 LTCC=${LTCC-"$CC"}
7619
7620 # Allow CC to be a program name with arguments.
7621 compiler=$CC
7622
7623
7624 # save warnings/boilerplate of simple test code
7625 ac_outfile=conftest.$ac_objext
7626 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
7627 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
7628 _lt_compiler_boilerplate=`cat conftest.err`
7629 $rm conftest*
7630
7631 ac_outfile=conftest.$ac_objext
7632 printf "$lt_simple_link_test_code" >conftest.$ac_ext
7633 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
7634 _lt_linker_boilerplate=`cat conftest.err`
7635 $rm conftest*
7636
7637
7638 #
7639 # Check for any special shared library compilation flags.
7640 #
7641 lt_prog_cc_shlib=
7642 if test "$GCC" = no; then
7643   case $host_os in
7644   sco3.2v5*)
7645     lt_prog_cc_shlib='-belf'
7646     ;;
7647   esac
7648 fi
7649 if test -n "$lt_prog_cc_shlib"; then
7650   { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
7651 echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
7652   if echo "$old_CC $old_CFLAGS " | grep "[      ]$lt_prog_cc_shlib[     ]" >/dev/null; then :
7653   else
7654     { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
7655 echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
7656     lt_cv_prog_cc_can_build_shared=no
7657   fi
7658 fi
7659
7660
7661 #
7662 # Check to make sure the static flag actually works.
7663 #
7664 echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5
7665 echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6
7666 if test "${lt_prog_compiler_static_works+set}" = set; then
7667   echo $ECHO_N "(cached) $ECHO_C" >&6
7668 else
7669   lt_prog_compiler_static_works=no
7670    save_LDFLAGS="$LDFLAGS"
7671    LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
7672    printf "$lt_simple_link_test_code" > conftest.$ac_ext
7673    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
7674      # The linker can only warn and ignore the option if not recognized
7675      # So say no if there are warnings
7676      if test -s conftest.err; then
7677        # Append any errors to the config.log.
7678        cat conftest.err 1>&5
7679        $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
7680        $SED '/^$/d' conftest.err >conftest.er2
7681        if diff conftest.exp conftest.er2 >/dev/null; then
7682          lt_prog_compiler_static_works=yes
7683        fi
7684      else
7685        lt_prog_compiler_static_works=yes
7686      fi
7687    fi
7688    $rm conftest*
7689    LDFLAGS="$save_LDFLAGS"
7690
7691 fi
7692 echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
7693 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
7694
7695 if test x"$lt_prog_compiler_static_works" = xyes; then
7696     :
7697 else
7698     lt_prog_compiler_static=
7699 fi
7700
7701
7702
7703
7704 lt_prog_compiler_no_builtin_flag=
7705
7706 if test "$GCC" = yes; then
7707   lt_prog_compiler_no_builtin_flag=' -fno-builtin'
7708
7709
7710 echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
7711 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
7712 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
7713   echo $ECHO_N "(cached) $ECHO_C" >&6
7714 else
7715   lt_cv_prog_compiler_rtti_exceptions=no
7716   ac_outfile=conftest.$ac_objext
7717    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7718    lt_compiler_flag="-fno-rtti -fno-exceptions"
7719    # Insert the option either (1) after the last *FLAGS variable, or
7720    # (2) before a word containing "conftest.", or (3) at the end.
7721    # Note that $ac_compile itself does not contain backslashes and begins
7722    # with a dollar sign (not a hyphen), so the echo should work correctly.
7723    # The option is referenced via a variable to avoid confusing sed.
7724    lt_compile=`echo "$ac_compile" | $SED \
7725    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7726    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7727    -e 's:$: $lt_compiler_flag:'`
7728    (eval echo "\"\$as_me:7728: $lt_compile\"" >&5)
7729    (eval "$lt_compile" 2>conftest.err)
7730    ac_status=$?
7731    cat conftest.err >&5
7732    echo "$as_me:7732: \$? = $ac_status" >&5
7733    if (exit $ac_status) && test -s "$ac_outfile"; then
7734      # The compiler can only warn and ignore the option if not recognized
7735      # So say no if there are warnings other than the usual output.
7736      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
7737      $SED '/^$/d' conftest.err >conftest.er2
7738      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
7739        lt_cv_prog_compiler_rtti_exceptions=yes
7740      fi
7741    fi
7742    $rm conftest*
7743
7744 fi
7745 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
7746 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
7747
7748 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
7749     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
7750 else
7751     :
7752 fi
7753
7754 fi
7755
7756 lt_prog_compiler_wl=
7757 lt_prog_compiler_pic=
7758 lt_prog_compiler_static=
7759
7760 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
7761 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
7762
7763   if test "$GCC" = yes; then
7764     lt_prog_compiler_wl='-Wl,'
7765     lt_prog_compiler_static='-static'
7766
7767     case $host_os in
7768       aix*)
7769       # All AIX code is PIC.
7770       if test "$host_cpu" = ia64; then
7771         # AIX 5 now supports IA64 processor
7772         lt_prog_compiler_static='-Bstatic'
7773       fi
7774       ;;
7775
7776     amigaos*)
7777       # FIXME: we need at least 68020 code to build shared libraries, but
7778       # adding the `-m68020' flag to GCC prevents building anything better,
7779       # like `-m68040'.
7780       lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
7781       ;;
7782
7783     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7784       # PIC is the default for these OSes.
7785       ;;
7786
7787     mingw* | pw32* | os2*)
7788       # This hack is so that the source file can tell whether it is being
7789       # built for inclusion in a dll (and should export symbols for example).
7790       lt_prog_compiler_pic='-DDLL_EXPORT'
7791       ;;
7792
7793     darwin* | rhapsody*)
7794       # PIC is the default on this platform
7795       # Common symbols not allowed in MH_DYLIB files
7796       lt_prog_compiler_pic='-fno-common'
7797       ;;
7798
7799     msdosdjgpp*)
7800       # Just because we use GCC doesn't mean we suddenly get shared libraries
7801       # on systems that don't support them.
7802       lt_prog_compiler_can_build_shared=no
7803       enable_shared=no
7804       ;;
7805
7806     sysv4*MP*)
7807       if test -d /usr/nec; then
7808         lt_prog_compiler_pic=-Kconform_pic
7809       fi
7810       ;;
7811
7812     hpux*)
7813       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7814       # not for PA HP-UX.
7815       case $host_cpu in
7816       hppa*64*|ia64*)
7817         # +Z the default
7818         ;;
7819       *)
7820         lt_prog_compiler_pic='-fPIC'
7821         ;;
7822       esac
7823       ;;
7824
7825     *)
7826       lt_prog_compiler_pic='-fPIC'
7827       ;;
7828     esac
7829   else
7830     # PORTME Check for flag to pass linker flags through the system compiler.
7831     case $host_os in
7832     aix*)
7833       lt_prog_compiler_wl='-Wl,'
7834       if test "$host_cpu" = ia64; then
7835         # AIX 5 now supports IA64 processor
7836         lt_prog_compiler_static='-Bstatic'
7837       else
7838         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
7839       fi
7840       ;;
7841       darwin*)
7842         # PIC is the default on this platform
7843         # Common symbols not allowed in MH_DYLIB files
7844        case $cc_basename in
7845          xlc*)
7846          lt_prog_compiler_pic='-qnocommon'
7847          lt_prog_compiler_wl='-Wl,'
7848          ;;
7849        esac
7850        ;;
7851
7852     mingw* | pw32* | os2*)
7853       # This hack is so that the source file can tell whether it is being
7854       # built for inclusion in a dll (and should export symbols for example).
7855       lt_prog_compiler_pic='-DDLL_EXPORT'
7856       ;;
7857
7858     hpux9* | hpux10* | hpux11*)
7859       lt_prog_compiler_wl='-Wl,'
7860       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7861       # not for PA HP-UX.
7862       case $host_cpu in
7863       hppa*64*|ia64*)
7864         # +Z the default
7865         ;;
7866       *)
7867         lt_prog_compiler_pic='+Z'
7868         ;;
7869       esac
7870       # Is there a better lt_prog_compiler_static that works with the bundled CC?
7871       lt_prog_compiler_static='${wl}-a ${wl}archive'
7872       ;;
7873
7874     irix5* | irix6* | nonstopux*)
7875       lt_prog_compiler_wl='-Wl,'
7876       # PIC (with -KPIC) is the default.
7877       lt_prog_compiler_static='-non_shared'
7878       ;;
7879
7880     newsos6)
7881       lt_prog_compiler_pic='-KPIC'
7882       lt_prog_compiler_static='-Bstatic'
7883       ;;
7884
7885     linux*)
7886       case $cc_basename in
7887       icc* | ecc*)
7888         lt_prog_compiler_wl='-Wl,'
7889         lt_prog_compiler_pic='-KPIC'
7890         lt_prog_compiler_static='-static'
7891         ;;
7892       pgcc* | pgf77* | pgf90* | pgf95*)
7893         # Portland Group compilers (*not* the Pentium gcc compiler,
7894         # which looks to be a dead project)
7895         lt_prog_compiler_wl='-Wl,'
7896         lt_prog_compiler_pic='-fpic'
7897         lt_prog_compiler_static='-Bstatic'
7898         ;;
7899       ccc*)
7900         lt_prog_compiler_wl='-Wl,'
7901         # All Alpha code is PIC.
7902         lt_prog_compiler_static='-non_shared'
7903         ;;
7904       esac
7905       ;;
7906
7907     osf3* | osf4* | osf5*)
7908       lt_prog_compiler_wl='-Wl,'
7909       # All OSF/1 code is PIC.
7910       lt_prog_compiler_static='-non_shared'
7911       ;;
7912
7913     sco3.2v5*)
7914       lt_prog_compiler_pic='-Kpic'
7915       lt_prog_compiler_static='-dn'
7916       ;;
7917
7918     solaris*)
7919       lt_prog_compiler_pic='-KPIC'
7920       lt_prog_compiler_static='-Bstatic'
7921       case $cc_basename in
7922       f77* | f90* | f95*)
7923         lt_prog_compiler_wl='-Qoption ld ';;
7924       *)
7925         lt_prog_compiler_wl='-Wl,';;
7926       esac
7927       ;;
7928
7929     sunos4*)
7930       lt_prog_compiler_wl='-Qoption ld '
7931       lt_prog_compiler_pic='-PIC'
7932       lt_prog_compiler_static='-Bstatic'
7933       ;;
7934
7935     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7936       lt_prog_compiler_wl='-Wl,'
7937       lt_prog_compiler_pic='-KPIC'
7938       lt_prog_compiler_static='-Bstatic'
7939       ;;
7940
7941     sysv4*MP*)
7942       if test -d /usr/nec ;then
7943         lt_prog_compiler_pic='-Kconform_pic'
7944         lt_prog_compiler_static='-Bstatic'
7945       fi
7946       ;;
7947
7948     unicos*)
7949       lt_prog_compiler_wl='-Wl,'
7950       lt_prog_compiler_can_build_shared=no
7951       ;;
7952
7953     uts4*)
7954       lt_prog_compiler_pic='-pic'
7955       lt_prog_compiler_static='-Bstatic'
7956       ;;
7957
7958     *)
7959       lt_prog_compiler_can_build_shared=no
7960       ;;
7961     esac
7962   fi
7963
7964 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
7965 echo "${ECHO_T}$lt_prog_compiler_pic" >&6
7966
7967 #
7968 # Check to make sure the PIC flag actually works.
7969 #
7970 if test -n "$lt_prog_compiler_pic"; then
7971
7972 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
7973 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
7974 if test "${lt_prog_compiler_pic_works+set}" = set; then
7975   echo $ECHO_N "(cached) $ECHO_C" >&6
7976 else
7977   lt_prog_compiler_pic_works=no
7978   ac_outfile=conftest.$ac_objext
7979    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7980    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
7981    # Insert the option either (1) after the last *FLAGS variable, or
7982    # (2) before a word containing "conftest.", or (3) at the end.
7983    # Note that $ac_compile itself does not contain backslashes and begins
7984    # with a dollar sign (not a hyphen), so the echo should work correctly.
7985    # The option is referenced via a variable to avoid confusing sed.
7986    lt_compile=`echo "$ac_compile" | $SED \
7987    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7988    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7989    -e 's:$: $lt_compiler_flag:'`
7990    (eval echo "\"\$as_me:7990: $lt_compile\"" >&5)
7991    (eval "$lt_compile" 2>conftest.err)
7992    ac_status=$?
7993    cat conftest.err >&5
7994    echo "$as_me:7994: \$? = $ac_status" >&5
7995    if (exit $ac_status) && test -s "$ac_outfile"; then
7996      # The compiler can only warn and ignore the option if not recognized
7997      # So say no if there are warnings other than the usual output.
7998      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
7999      $SED '/^$/d' conftest.err >conftest.er2
8000      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
8001        lt_prog_compiler_pic_works=yes
8002      fi
8003    fi
8004    $rm conftest*
8005
8006 fi
8007 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
8008 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
8009
8010 if test x"$lt_prog_compiler_pic_works" = xyes; then
8011     case $lt_prog_compiler_pic in
8012      "" | " "*) ;;
8013      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
8014      esac
8015 else
8016     lt_prog_compiler_pic=
8017      lt_prog_compiler_can_build_shared=no
8018 fi
8019
8020 fi
8021 case $host_os in
8022   # For platforms which do not support PIC, -DPIC is meaningless:
8023   *djgpp*)
8024     lt_prog_compiler_pic=
8025     ;;
8026   *)
8027     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
8028     ;;
8029 esac
8030
8031 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
8032 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
8033 if test "${lt_cv_prog_compiler_c_o+set}" = set; then
8034   echo $ECHO_N "(cached) $ECHO_C" >&6
8035 else
8036   lt_cv_prog_compiler_c_o=no
8037    $rm -r conftest 2>/dev/null
8038    mkdir conftest
8039    cd conftest
8040    mkdir out
8041    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8042
8043    lt_compiler_flag="-o out/conftest2.$ac_objext"
8044    # Insert the option either (1) after the last *FLAGS variable, or
8045    # (2) before a word containing "conftest.", or (3) at the end.
8046    # Note that $ac_compile itself does not contain backslashes and begins
8047    # with a dollar sign (not a hyphen), so the echo should work correctly.
8048    lt_compile=`echo "$ac_compile" | $SED \
8049    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8050    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8051    -e 's:$: $lt_compiler_flag:'`
8052    (eval echo "\"\$as_me:8052: $lt_compile\"" >&5)
8053    (eval "$lt_compile" 2>out/conftest.err)
8054    ac_status=$?
8055    cat out/conftest.err >&5
8056    echo "$as_me:8056: \$? = $ac_status" >&5
8057    if (exit $ac_status) && test -s out/conftest2.$ac_objext
8058    then
8059      # The compiler can only warn and ignore the option if not recognized
8060      # So say no if there are warnings
8061      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
8062      $SED '/^$/d' out/conftest.err >out/conftest.er2
8063      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8064        lt_cv_prog_compiler_c_o=yes
8065      fi
8066    fi
8067    chmod u+w . 2>&5
8068    $rm conftest*
8069    # SGI C++ compiler will create directory out/ii_files/ for
8070    # template instantiation
8071    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
8072    $rm out/* && rmdir out
8073    cd ..
8074    rmdir conftest
8075    $rm conftest*
8076
8077 fi
8078 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
8079 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
8080
8081
8082 hard_links="nottested"
8083 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
8084   # do not overwrite the value of need_locks provided by the user
8085   echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
8086 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
8087   hard_links=yes
8088   $rm conftest*
8089   ln conftest.a conftest.b 2>/dev/null && hard_links=no
8090   touch conftest.a
8091   ln conftest.a conftest.b 2>&5 || hard_links=no
8092   ln conftest.a conftest.b 2>/dev/null && hard_links=no
8093   echo "$as_me:$LINENO: result: $hard_links" >&5
8094 echo "${ECHO_T}$hard_links" >&6
8095   if test "$hard_links" = no; then
8096     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
8097 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
8098     need_locks=warn
8099   fi
8100 else
8101   need_locks=no
8102 fi
8103
8104 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
8105 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
8106
8107   runpath_var=
8108   allow_undefined_flag=
8109   enable_shared_with_static_runtimes=no
8110   archive_cmds=
8111   archive_expsym_cmds=
8112   old_archive_From_new_cmds=
8113   old_archive_from_expsyms_cmds=
8114   export_dynamic_flag_spec=
8115   whole_archive_flag_spec=
8116   thread_safe_flag_spec=
8117   hardcode_libdir_flag_spec=
8118   hardcode_libdir_flag_spec_ld=
8119   hardcode_libdir_separator=
8120   hardcode_direct=no
8121   hardcode_minus_L=no
8122   hardcode_shlibpath_var=unsupported
8123   link_all_deplibs=unknown
8124   hardcode_automatic=no
8125   module_cmds=
8126   module_expsym_cmds=
8127   always_export_symbols=no
8128   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8129   # include_expsyms should be a list of space-separated symbols to be *always*
8130   # included in the symbol list
8131   include_expsyms=
8132   # exclude_expsyms can be an extended regexp of symbols to exclude
8133   # it will be wrapped by ` (' and `)$', so one must not match beginning or
8134   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
8135   # as well as any symbol that contains `d'.
8136   exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
8137   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8138   # platforms (ab)use it in PIC code, but their linkers get confused if
8139   # the symbol is explicitly referenced.  Since portable code cannot
8140   # rely on this symbol name, it's probably fine to never include it in
8141   # preloaded symbol tables.
8142   extract_expsyms_cmds=
8143   # Just being paranoid about ensuring that cc_basename is set.
8144   for cc_temp in $compiler""; do
8145   case $cc_temp in
8146     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8147     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8148     \-*) ;;
8149     *) break;;
8150   esac
8151 done
8152 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8153
8154   case $host_os in
8155   cygwin* | mingw* | pw32*)
8156     # FIXME: the MSVC++ port hasn't been tested in a loooong time
8157     # When not using gcc, we currently assume that we are using
8158     # Microsoft Visual C++.
8159     if test "$GCC" != yes; then
8160       with_gnu_ld=no
8161     fi
8162     ;;
8163   openbsd*)
8164     with_gnu_ld=no
8165     ;;
8166   esac
8167
8168   ld_shlibs=yes
8169   if test "$with_gnu_ld" = yes; then
8170     # If archive_cmds runs LD, not CC, wlarc should be empty
8171     wlarc='${wl}'
8172
8173     # Set some defaults for GNU ld with shared library support. These
8174     # are reset later if shared libraries are not supported. Putting them
8175     # here allows them to be overridden if necessary.
8176     runpath_var=LD_RUN_PATH
8177     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
8178     export_dynamic_flag_spec='${wl}--export-dynamic'
8179     # ancient GNU ld didn't support --whole-archive et. al.
8180     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
8181         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8182       else
8183         whole_archive_flag_spec=
8184     fi
8185     supports_anon_versioning=no
8186     case `$LD -v 2>/dev/null` in
8187       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
8188       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8189       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8190       *\ 2.11.*) ;; # other 2.11 versions
8191       *) supports_anon_versioning=yes ;;
8192     esac
8193
8194     # See if GNU ld supports shared libraries.
8195     case $host_os in
8196     aix3* | aix4* | aix5*)
8197       # On AIX/PPC, the GNU linker is very broken
8198       if test "$host_cpu" != ia64; then
8199         ld_shlibs=no
8200         cat <<EOF 1>&2
8201
8202 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
8203 *** to be unable to reliably create shared libraries on AIX.
8204 *** Therefore, libtool is disabling shared libraries support.  If you
8205 *** really care for shared libraries, you may want to modify your PATH
8206 *** so that a non-GNU linker is found, and then restart.
8207
8208 EOF
8209       fi
8210       ;;
8211
8212     amigaos*)
8213       archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
8214       hardcode_libdir_flag_spec='-L$libdir'
8215       hardcode_minus_L=yes
8216
8217       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
8218       # that the semantics of dynamic libraries on AmigaOS, at least up
8219       # to version 4, is to share data among multiple programs linked
8220       # with the same dynamic library.  Since this doesn't match the
8221       # behavior of shared libraries on other platforms, we can't use
8222       # them.
8223       ld_shlibs=no
8224       ;;
8225
8226     beos*)
8227       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8228         allow_undefined_flag=unsupported
8229         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8230         # support --undefined.  This deserves some investigation.  FIXME
8231         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8232       else
8233         ld_shlibs=no
8234       fi
8235       ;;
8236
8237     cygwin* | mingw* | pw32*)
8238       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
8239       # as there is no search path for DLLs.
8240       hardcode_libdir_flag_spec='-L$libdir'
8241       allow_undefined_flag=unsupported
8242       always_export_symbols=no
8243       enable_shared_with_static_runtimes=yes
8244       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
8245
8246       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8247         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8248         # If the export-symbols file already is a .def file (1st line
8249         # is EXPORTS), use it as is; otherwise, prepend...
8250         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8251           cp $export_symbols $output_objdir/$soname.def;
8252         else
8253           echo EXPORTS > $output_objdir/$soname.def;
8254           cat $export_symbols >> $output_objdir/$soname.def;
8255         fi~
8256         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
8257       else
8258         ld_shlibs=no
8259       fi
8260       ;;
8261
8262     linux*)
8263       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8264         tmp_addflag=
8265         case $cc_basename,$host_cpu in
8266         pgcc*)                          # Portland Group C compiler
8267           whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
8268           tmp_addflag=' $pic_flag'
8269           ;;
8270         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
8271           whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
8272           tmp_addflag=' $pic_flag -Mnomain' ;;
8273         ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
8274           tmp_addflag=' -i_dynamic' ;;
8275         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
8276           tmp_addflag=' -i_dynamic -nofor_main' ;;
8277         ifc* | ifort*)                  # Intel Fortran compiler
8278           tmp_addflag=' -nofor_main' ;;
8279         esac
8280         archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8281
8282         if test $supports_anon_versioning = yes; then
8283           archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
8284   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8285   $echo "local: *; };" >> $output_objdir/$libname.ver~
8286           $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8287         fi
8288       else
8289         ld_shlibs=no
8290       fi
8291       ;;
8292
8293     netbsd*)
8294       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8295         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
8296         wlarc=
8297       else
8298         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8299         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8300       fi
8301       ;;
8302
8303     solaris* | sysv5*)
8304       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
8305         ld_shlibs=no
8306         cat <<EOF 1>&2
8307
8308 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
8309 *** create shared libraries on Solaris systems.  Therefore, libtool
8310 *** is disabling shared libraries support.  We urge you to upgrade GNU
8311 *** binutils to release 2.9.1 or newer.  Another option is to modify
8312 *** your PATH or compiler configuration so that the native linker is
8313 *** used, and then restart.
8314
8315 EOF
8316       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8317         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8318         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8319       else
8320         ld_shlibs=no
8321       fi
8322       ;;
8323
8324     sunos4*)
8325       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8326       wlarc=
8327       hardcode_direct=yes
8328       hardcode_shlibpath_var=no
8329       ;;
8330
8331     *)
8332       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8333         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8334         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8335       else
8336         ld_shlibs=no
8337       fi
8338       ;;
8339     esac
8340
8341     if test "$ld_shlibs" = no; then
8342       runpath_var=
8343       hardcode_libdir_flag_spec=
8344       export_dynamic_flag_spec=
8345       whole_archive_flag_spec=
8346     fi
8347   else
8348     # PORTME fill in a description of your system's linker (not GNU ld)
8349     case $host_os in
8350     aix3*)
8351       allow_undefined_flag=unsupported
8352       always_export_symbols=yes
8353       archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
8354       # Note: this linker hardcodes the directories in LIBPATH if there
8355       # are no directories specified by -L.
8356       hardcode_minus_L=yes
8357       if test "$GCC" = yes && test -z "$link_static_flag"; then
8358         # Neither direct hardcoding nor static linking is supported with a
8359         # broken collect2.
8360         hardcode_direct=unsupported
8361       fi
8362       ;;
8363
8364     aix4* | aix5*)
8365       if test "$host_cpu" = ia64; then
8366         # On IA64, the linker does run time linking by default, so we don't
8367         # have to do anything special.
8368         aix_use_runtimelinking=no
8369         exp_sym_flag='-Bexport'
8370         no_entry_flag=""
8371       else
8372         # If we're using GNU nm, then we don't want the "-C" option.
8373         # -C means demangle to AIX nm, but means don't demangle with GNU nm
8374         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
8375           export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
8376         else
8377           export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
8378         fi
8379         aix_use_runtimelinking=no
8380
8381         # Test if we are trying to use run time linking or normal
8382         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8383         # need to do runtime linking.
8384         case $host_os in aix4.[23]|aix4.[23].*|aix5*)
8385           for ld_flag in $LDFLAGS; do
8386           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
8387             aix_use_runtimelinking=yes
8388             break
8389           fi
8390           done
8391         esac
8392
8393         exp_sym_flag='-bexport'
8394         no_entry_flag='-bnoentry'
8395       fi
8396
8397       # When large executables or shared objects are built, AIX ld can
8398       # have problems creating the table of contents.  If linking a library
8399       # or program results in "error TOC overflow" add -mminimal-toc to
8400       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
8401       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8402
8403       archive_cmds=''
8404       hardcode_direct=yes
8405       hardcode_libdir_separator=':'
8406       link_all_deplibs=yes
8407
8408       if test "$GCC" = yes; then
8409         case $host_os in aix4.[012]|aix4.[012].*)
8410         # We only want to do this on AIX 4.2 and lower, the check
8411         # below for broken collect2 doesn't work under 4.3+
8412           collect2name=`${CC} -print-prog-name=collect2`
8413           if test -f "$collect2name" && \
8414            strings "$collect2name" | grep resolve_lib_name >/dev/null
8415           then
8416           # We have reworked collect2
8417           hardcode_direct=yes
8418           else
8419           # We have old collect2
8420           hardcode_direct=unsupported
8421           # It fails to find uninstalled libraries when the uninstalled
8422           # path is not listed in the libpath.  Setting hardcode_minus_L
8423           # to unsupported forces relinking
8424           hardcode_minus_L=yes
8425           hardcode_libdir_flag_spec='-L$libdir'
8426           hardcode_libdir_separator=
8427           fi
8428         esac
8429         shared_flag='-shared'
8430         if test "$aix_use_runtimelinking" = yes; then
8431           shared_flag="$shared_flag "'${wl}-G'
8432         fi
8433       else
8434         # not using gcc
8435         if test "$host_cpu" = ia64; then
8436         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8437         # chokes on -Wl,-G. The following line is correct:
8438           shared_flag='-G'
8439         else
8440         if test "$aix_use_runtimelinking" = yes; then
8441             shared_flag='${wl}-G'
8442           else
8443             shared_flag='${wl}-bM:SRE'
8444         fi
8445         fi
8446       fi
8447
8448       # It seems that -bexpall does not export symbols beginning with
8449       # underscore (_), so it is better to generate a list of symbols to export.
8450       always_export_symbols=yes
8451       if test "$aix_use_runtimelinking" = yes; then
8452         # Warning - without using the other runtime loading flags (-brtl),
8453         # -berok will link without error, but may produce a broken library.
8454         allow_undefined_flag='-berok'
8455        # Determine the default libpath from the value encoded in an empty executable.
8456        cat >conftest.$ac_ext <<_ACEOF
8457 /* confdefs.h.  */
8458 _ACEOF
8459 cat confdefs.h >>conftest.$ac_ext
8460 cat >>conftest.$ac_ext <<_ACEOF
8461 /* end confdefs.h.  */
8462
8463 int
8464 main ()
8465 {
8466
8467   ;
8468   return 0;
8469 }
8470 _ACEOF
8471 rm -f conftest.$ac_objext conftest$ac_exeext
8472 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8473   (eval $ac_link) 2>conftest.er1
8474   ac_status=$?
8475   grep -v '^ *+' conftest.er1 >conftest.err
8476   rm -f conftest.er1
8477   cat conftest.err >&5
8478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8479   (exit $ac_status); } &&
8480          { ac_try='test -z "$ac_c_werror_flag"
8481                          || test ! -s conftest.err'
8482   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8483   (eval $ac_try) 2>&5
8484   ac_status=$?
8485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8486   (exit $ac_status); }; } &&
8487          { ac_try='test -s conftest$ac_exeext'
8488   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8489   (eval $ac_try) 2>&5
8490   ac_status=$?
8491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8492   (exit $ac_status); }; }; then
8493
8494 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
8495 }'`
8496 # Check for a 64-bit object if we didn't find anything.
8497 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
8498 }'`; fi
8499 else
8500   echo "$as_me: failed program was:" >&5
8501 sed 's/^/| /' conftest.$ac_ext >&5
8502
8503 fi
8504 rm -f conftest.err conftest.$ac_objext \
8505       conftest$ac_exeext conftest.$ac_ext
8506 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8507
8508        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8509         archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8510        else
8511         if test "$host_cpu" = ia64; then
8512           hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
8513           allow_undefined_flag="-z nodefs"
8514           archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
8515         else
8516          # Determine the default libpath from the value encoded in an empty executable.
8517          cat >conftest.$ac_ext <<_ACEOF
8518 /* confdefs.h.  */
8519 _ACEOF
8520 cat confdefs.h >>conftest.$ac_ext
8521 cat >>conftest.$ac_ext <<_ACEOF
8522 /* end confdefs.h.  */
8523
8524 int
8525 main ()
8526 {
8527
8528   ;
8529   return 0;
8530 }
8531 _ACEOF
8532 rm -f conftest.$ac_objext conftest$ac_exeext
8533 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8534   (eval $ac_link) 2>conftest.er1
8535   ac_status=$?
8536   grep -v '^ *+' conftest.er1 >conftest.err
8537   rm -f conftest.er1
8538   cat conftest.err >&5
8539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8540   (exit $ac_status); } &&
8541          { ac_try='test -z "$ac_c_werror_flag"
8542                          || test ! -s conftest.err'
8543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8544   (eval $ac_try) 2>&5
8545   ac_status=$?
8546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8547   (exit $ac_status); }; } &&
8548          { ac_try='test -s conftest$ac_exeext'
8549   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8550   (eval $ac_try) 2>&5
8551   ac_status=$?
8552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8553   (exit $ac_status); }; }; then
8554
8555 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
8556 }'`
8557 # Check for a 64-bit object if we didn't find anything.
8558 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
8559 }'`; fi
8560 else
8561   echo "$as_me: failed program was:" >&5
8562 sed 's/^/| /' conftest.$ac_ext >&5
8563
8564 fi
8565 rm -f conftest.err conftest.$ac_objext \
8566       conftest$ac_exeext conftest.$ac_ext
8567 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8568
8569          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8570           # Warning - without using the other run time loading flags,
8571           # -berok will link without error, but may produce a broken library.
8572           no_undefined_flag=' ${wl}-bernotok'
8573           allow_undefined_flag=' ${wl}-berok'
8574           # -bexpall does not export symbols beginning with underscore (_)
8575           always_export_symbols=yes
8576           # Exported symbols can be pulled into shared objects from archives
8577           whole_archive_flag_spec=' '
8578           archive_cmds_need_lc=yes
8579           # This is similar to how AIX traditionally builds its shared libraries.
8580           archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8581         fi
8582       fi
8583       ;;
8584
8585     amigaos*)
8586       archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
8587       hardcode_libdir_flag_spec='-L$libdir'
8588       hardcode_minus_L=yes
8589       # see comment about different semantics on the GNU ld section
8590       ld_shlibs=no
8591       ;;
8592
8593     bsdi[45]*)
8594       export_dynamic_flag_spec=-rdynamic
8595       ;;
8596
8597     cygwin* | mingw* | pw32*)
8598       # When not using gcc, we currently assume that we are using
8599       # Microsoft Visual C++.
8600       # hardcode_libdir_flag_spec is actually meaningless, as there is
8601       # no search path for DLLs.
8602       hardcode_libdir_flag_spec=' '
8603       allow_undefined_flag=unsupported
8604       # Tell ltmain to make .lib files, not .a files.
8605       libext=lib
8606       # Tell ltmain to make .dll files, not .so files.
8607       shrext_cmds=".dll"
8608       # FIXME: Setting linknames here is a bad hack.
8609       archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
8610       # The linker will automatically build a .lib file if we build a DLL.
8611       old_archive_From_new_cmds='true'
8612       # FIXME: Should let the user specify the lib program.
8613       old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
8614       fix_srcfile_path='`cygpath -w "$srcfile"`'
8615       enable_shared_with_static_runtimes=yes
8616       ;;
8617
8618     darwin* | rhapsody*)
8619       case $host_os in
8620         rhapsody* | darwin1.[012])
8621          allow_undefined_flag='${wl}-undefined ${wl}suppress'
8622          ;;
8623        *) # Darwin 1.3 on
8624          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8625            allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8626          else
8627            case ${MACOSX_DEPLOYMENT_TARGET} in
8628              10.[012])
8629                allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8630                ;;
8631              10.*)
8632                allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
8633                ;;
8634            esac
8635          fi
8636          ;;
8637       esac
8638       archive_cmds_need_lc=no
8639       hardcode_direct=no
8640       hardcode_automatic=yes
8641       hardcode_shlibpath_var=unsupported
8642       whole_archive_flag_spec=''
8643       link_all_deplibs=yes
8644     if test "$GCC" = yes ; then
8645         output_verbose_link_cmd='echo'
8646         archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
8647       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8648       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8649       archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8650       module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8651     else
8652       case $cc_basename in
8653         xlc*)
8654          output_verbose_link_cmd='echo'
8655          archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
8656          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8657           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8658          archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8659           module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8660           ;;
8661        *)
8662          ld_shlibs=no
8663           ;;
8664       esac
8665     fi
8666       ;;
8667
8668     dgux*)
8669       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8670       hardcode_libdir_flag_spec='-L$libdir'
8671       hardcode_shlibpath_var=no
8672       ;;
8673
8674     freebsd1*)
8675       ld_shlibs=no
8676       ;;
8677
8678     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8679     # support.  Future versions do this automatically, but an explicit c++rt0.o
8680     # does not break anything, and helps significantly (at the cost of a little
8681     # extra space).
8682     freebsd2.2*)
8683       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
8684       hardcode_libdir_flag_spec='-R$libdir'
8685       hardcode_direct=yes
8686       hardcode_shlibpath_var=no
8687       ;;
8688
8689     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8690     freebsd2*)
8691       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8692       hardcode_direct=yes
8693       hardcode_minus_L=yes
8694       hardcode_shlibpath_var=no
8695       ;;
8696
8697     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
8698     freebsd* | kfreebsd*-gnu | dragonfly*)
8699       archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
8700       hardcode_libdir_flag_spec='-R$libdir'
8701       hardcode_direct=yes
8702       hardcode_shlibpath_var=no
8703       ;;
8704
8705     hpux9*)
8706       if test "$GCC" = yes; then
8707         archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8708       else
8709         archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8710       fi
8711       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8712       hardcode_libdir_separator=:
8713       hardcode_direct=yes
8714
8715       # hardcode_minus_L: Not really in the search PATH,
8716       # but as the default location of the library.
8717       hardcode_minus_L=yes
8718       export_dynamic_flag_spec='${wl}-E'
8719       ;;
8720
8721     hpux10* | hpux11*)
8722       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8723         case $host_cpu in
8724         hppa*64*|ia64*)
8725           archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8726           ;;
8727         *)
8728           archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8729           ;;
8730         esac
8731       else
8732         case $host_cpu in
8733         hppa*64*|ia64*)
8734           archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
8735           ;;
8736         *)
8737           archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
8738           ;;
8739         esac
8740       fi
8741       if test "$with_gnu_ld" = no; then
8742         case $host_cpu in
8743         hppa*64*)
8744           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8745           hardcode_libdir_flag_spec_ld='+b $libdir'
8746           hardcode_libdir_separator=:
8747           hardcode_direct=no
8748           hardcode_shlibpath_var=no
8749           ;;
8750         ia64*)
8751           hardcode_libdir_flag_spec='-L$libdir'
8752           hardcode_direct=no
8753           hardcode_shlibpath_var=no
8754
8755           # hardcode_minus_L: Not really in the search PATH,
8756           # but as the default location of the library.
8757           hardcode_minus_L=yes
8758           ;;
8759         *)
8760           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8761           hardcode_libdir_separator=:
8762           hardcode_direct=yes
8763           export_dynamic_flag_spec='${wl}-E'
8764
8765           # hardcode_minus_L: Not really in the search PATH,
8766           # but as the default location of the library.
8767           hardcode_minus_L=yes
8768           ;;
8769         esac
8770       fi
8771       ;;
8772
8773     irix5* | irix6* | nonstopux*)
8774       if test "$GCC" = yes; then
8775         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8776       else
8777         archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
8778         hardcode_libdir_flag_spec_ld='-rpath $libdir'
8779       fi
8780       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8781       hardcode_libdir_separator=:
8782       link_all_deplibs=yes
8783       ;;
8784
8785     netbsd*)
8786       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8787         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
8788       else
8789         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
8790       fi
8791       hardcode_libdir_flag_spec='-R$libdir'
8792       hardcode_direct=yes
8793       hardcode_shlibpath_var=no
8794       ;;
8795
8796     newsos6)
8797       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8798       hardcode_direct=yes
8799       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8800       hardcode_libdir_separator=:
8801       hardcode_shlibpath_var=no
8802       ;;
8803
8804     openbsd*)
8805       hardcode_direct=yes
8806       hardcode_shlibpath_var=no
8807       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8808         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8809         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
8810         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8811         export_dynamic_flag_spec='${wl}-E'
8812       else
8813        case $host_os in
8814          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
8815            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8816            hardcode_libdir_flag_spec='-R$libdir'
8817            ;;
8818          *)
8819            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8820            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8821            ;;
8822        esac
8823       fi
8824       ;;
8825
8826     os2*)
8827       hardcode_libdir_flag_spec='-L$libdir'
8828       hardcode_minus_L=yes
8829       allow_undefined_flag=unsupported
8830       archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
8831       old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
8832       ;;
8833
8834     osf3*)
8835       if test "$GCC" = yes; then
8836         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8837         archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8838       else
8839         allow_undefined_flag=' -expect_unresolved \*'
8840         archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
8841       fi
8842       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8843       hardcode_libdir_separator=:
8844       ;;
8845
8846     osf4* | osf5*)      # as osf3* with the addition of -msym flag
8847       if test "$GCC" = yes; then
8848         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8849         archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8850         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8851       else
8852         allow_undefined_flag=' -expect_unresolved \*'
8853         archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
8854         archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
8855         $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
8856
8857         # Both c and cxx compiler support -rpath directly
8858         hardcode_libdir_flag_spec='-rpath $libdir'
8859       fi
8860       hardcode_libdir_separator=:
8861       ;;
8862
8863     sco3.2v5*)
8864       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8865       hardcode_shlibpath_var=no
8866       export_dynamic_flag_spec='${wl}-Bexport'
8867       runpath_var=LD_RUN_PATH
8868       hardcode_runpath_var=yes
8869       ;;
8870
8871     solaris*)
8872       no_undefined_flag=' -z text'
8873       if test "$GCC" = yes; then
8874         wlarc='${wl}'
8875         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8876         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8877           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
8878       else
8879         wlarc=''
8880         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8881         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8882         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8883       fi
8884       hardcode_libdir_flag_spec='-R$libdir'
8885       hardcode_shlibpath_var=no
8886       case $host_os in
8887       solaris2.[0-5] | solaris2.[0-5].*) ;;
8888       *)
8889         # The compiler driver will combine linker options so we
8890         # cannot just pass the convience library names through
8891         # without $wl, iff we do not link with $LD.
8892         # Luckily, gcc supports the same syntax we need for Sun Studio.
8893         # Supported since Solaris 2.6 (maybe 2.5.1?)
8894         case $wlarc in
8895         '')
8896           whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
8897         *)
8898           whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
8899         esac ;;
8900       esac
8901       link_all_deplibs=yes
8902       ;;
8903
8904     sunos4*)
8905       if test "x$host_vendor" = xsequent; then
8906         # Use $CC to link under sequent, because it throws in some extra .o
8907         # files that make .init and .fini sections work.
8908         archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
8909       else
8910         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
8911       fi
8912       hardcode_libdir_flag_spec='-L$libdir'
8913       hardcode_direct=yes
8914       hardcode_minus_L=yes
8915       hardcode_shlibpath_var=no
8916       ;;
8917
8918     sysv4)
8919       case $host_vendor in
8920         sni)
8921           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8922           hardcode_direct=yes # is this really true???
8923         ;;
8924         siemens)
8925           ## LD is ld it makes a PLAMLIB
8926           ## CC just makes a GrossModule.
8927           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8928           reload_cmds='$CC -r -o $output$reload_objs'
8929           hardcode_direct=no
8930         ;;
8931         motorola)
8932           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8933           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
8934         ;;
8935       esac
8936       runpath_var='LD_RUN_PATH'
8937       hardcode_shlibpath_var=no
8938       ;;
8939
8940     sysv4.3*)
8941       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8942       hardcode_shlibpath_var=no
8943       export_dynamic_flag_spec='-Bexport'
8944       ;;
8945
8946     sysv4*MP*)
8947       if test -d /usr/nec; then
8948         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8949         hardcode_shlibpath_var=no
8950         runpath_var=LD_RUN_PATH
8951         hardcode_runpath_var=yes
8952         ld_shlibs=yes
8953       fi
8954       ;;
8955
8956     sysv4.2uw2*)
8957       archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8958       hardcode_direct=yes
8959       hardcode_minus_L=no
8960       hardcode_shlibpath_var=no
8961       hardcode_runpath_var=yes
8962       runpath_var=LD_RUN_PATH
8963       ;;
8964
8965    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
8966       no_undefined_flag='${wl}-z ${wl}text'
8967       if test "$GCC" = yes; then
8968         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8969       else
8970         archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8971       fi
8972       runpath_var='LD_RUN_PATH'
8973       hardcode_shlibpath_var=no
8974       ;;
8975
8976     sysv5*)
8977       no_undefined_flag=' -z text'
8978       # $CC -shared without GNU ld will not create a library from C++
8979       # object files and a static libstdc++, better avoid it by now
8980       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8981       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8982                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8983       hardcode_libdir_flag_spec=
8984       hardcode_shlibpath_var=no
8985       runpath_var='LD_RUN_PATH'
8986       ;;
8987
8988     uts4*)
8989       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8990       hardcode_libdir_flag_spec='-L$libdir'
8991       hardcode_shlibpath_var=no
8992       ;;
8993
8994     *)
8995       ld_shlibs=no
8996       ;;
8997     esac
8998   fi
8999
9000 echo "$as_me:$LINENO: result: $ld_shlibs" >&5
9001 echo "${ECHO_T}$ld_shlibs" >&6
9002 test "$ld_shlibs" = no && can_build_shared=no
9003
9004 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
9005 if test "$GCC" = yes; then
9006   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
9007 fi
9008
9009 #
9010 # Do we need to explicitly link libc?
9011 #
9012 case "x$archive_cmds_need_lc" in
9013 x|xyes)
9014   # Assume -lc should be added
9015   archive_cmds_need_lc=yes
9016
9017   if test "$enable_shared" = yes && test "$GCC" = yes; then
9018     case $archive_cmds in
9019     *'~'*)
9020       # FIXME: we may have to deal with multi-command sequences.
9021       ;;
9022     '$CC '*)
9023       # Test whether the compiler implicitly links with -lc since on some
9024       # systems, -lgcc has to come before -lc. If gcc already passes -lc
9025       # to ld, don't add -lc before -lgcc.
9026       echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
9027 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
9028       $rm conftest*
9029       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
9030
9031       if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9032   (eval $ac_compile) 2>&5
9033   ac_status=$?
9034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9035   (exit $ac_status); } 2>conftest.err; then
9036         soname=conftest
9037         lib=conftest
9038         libobjs=conftest.$ac_objext
9039         deplibs=
9040         wl=$lt_prog_compiler_wl
9041         compiler_flags=-v
9042         linker_flags=-v
9043         verstring=
9044         output_objdir=.
9045         libname=conftest
9046         lt_save_allow_undefined_flag=$allow_undefined_flag
9047         allow_undefined_flag=
9048         if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
9049   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
9050   ac_status=$?
9051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9052   (exit $ac_status); }
9053         then
9054           archive_cmds_need_lc=no
9055         else
9056           archive_cmds_need_lc=yes
9057         fi
9058         allow_undefined_flag=$lt_save_allow_undefined_flag
9059       else
9060         cat conftest.err 1>&5
9061       fi
9062       $rm conftest*
9063       echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
9064 echo "${ECHO_T}$archive_cmds_need_lc" >&6
9065       ;;
9066     esac
9067   fi
9068   ;;
9069 esac
9070
9071 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
9072 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
9073 library_names_spec=
9074 libname_spec='lib$name'
9075 soname_spec=
9076 shrext_cmds=".so"
9077 postinstall_cmds=
9078 postuninstall_cmds=
9079 finish_cmds=
9080 finish_eval=
9081 shlibpath_var=
9082 shlibpath_overrides_runpath=unknown
9083 version_type=none
9084 dynamic_linker="$host_os ld.so"
9085 sys_lib_dlsearch_path_spec="/lib /usr/lib"
9086 if test "$GCC" = yes; then
9087   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9088   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
9089     # if the path contains ";" then we assume it to be the separator
9090     # otherwise default to the standard path separator (i.e. ":") - it is
9091     # assumed that no part of a normal pathname contains ";" but that should
9092     # okay in the real world where ";" in dirpaths is itself problematic.
9093     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9094   else
9095     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
9096   fi
9097 else
9098   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
9099 fi
9100 need_lib_prefix=unknown
9101 hardcode_into_libs=no
9102
9103 # when you set need_version to no, make sure it does not cause -set_version
9104 # flags to be left without arguments
9105 need_version=unknown
9106
9107 case $host_os in
9108 aix3*)
9109   version_type=linux
9110   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
9111   shlibpath_var=LIBPATH
9112
9113   # AIX 3 has no versioning support, so we append a major version to the name.
9114   soname_spec='${libname}${release}${shared_ext}$major'
9115   ;;
9116
9117 aix4* | aix5*)
9118   version_type=linux
9119   need_lib_prefix=no
9120   need_version=no
9121   hardcode_into_libs=yes
9122   if test "$host_cpu" = ia64; then
9123     # AIX 5 supports IA64
9124     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
9125     shlibpath_var=LD_LIBRARY_PATH
9126   else
9127     # With GCC up to 2.95.x, collect2 would create an import file
9128     # for dependence libraries.  The import file would start with
9129     # the line `#! .'.  This would cause the generated library to
9130     # depend on `.', always an invalid library.  This was fixed in
9131     # development snapshots of GCC prior to 3.0.
9132     case $host_os in
9133       aix4 | aix4.[01] | aix4.[01].*)
9134       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
9135            echo ' yes '
9136            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
9137         :
9138       else
9139         can_build_shared=no
9140       fi
9141       ;;
9142     esac
9143     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
9144     # soname into executable. Probably we can add versioning support to
9145     # collect2, so additional links can be useful in future.
9146     if test "$aix_use_runtimelinking" = yes; then
9147       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
9148       # instead of lib<name>.a to let people know that these are not
9149       # typical AIX shared libraries.
9150       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9151     else
9152       # We preserve .a as extension for shared libraries through AIX4.2
9153       # and later when we are not doing run time linking.
9154       library_names_spec='${libname}${release}.a $libname.a'
9155       soname_spec='${libname}${release}${shared_ext}$major'
9156     fi
9157     shlibpath_var=LIBPATH
9158   fi
9159   ;;
9160
9161 amigaos*)
9162   library_names_spec='$libname.ixlibrary $libname.a'
9163   # Create ${libname}_ixlibrary.a entries in /sys/libs.
9164   finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
9165   ;;
9166
9167 beos*)
9168   library_names_spec='${libname}${shared_ext}'
9169   dynamic_linker="$host_os ld.so"
9170   shlibpath_var=LIBRARY_PATH
9171   ;;
9172
9173 bsdi[45]*)
9174   version_type=linux
9175   need_version=no
9176   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9177   soname_spec='${libname}${release}${shared_ext}$major'
9178   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
9179   shlibpath_var=LD_LIBRARY_PATH
9180   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
9181   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
9182   # the default ld.so.conf also contains /usr/contrib/lib and
9183   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
9184   # libtool to hard-code these into programs
9185   ;;
9186
9187 cygwin* | mingw* | pw32*)
9188   version_type=windows
9189   shrext_cmds=".dll"
9190   need_version=no
9191   need_lib_prefix=no
9192
9193   case $GCC,$host_os in
9194   yes,cygwin* | yes,mingw* | yes,pw32*)
9195     library_names_spec='$libname.dll.a'
9196     # DLL is installed to $(libdir)/../bin by postinstall_cmds
9197     postinstall_cmds='base_file=`basename \${file}`~
9198       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
9199       dldir=$destdir/`dirname \$dlpath`~
9200       test -d \$dldir || mkdir -p \$dldir~
9201       $install_prog $dir/$dlname \$dldir/$dlname~
9202       chmod a+x \$dldir/$dlname'
9203     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
9204       dlpath=$dir/\$dldll~
9205        $rm \$dlpath'
9206     shlibpath_overrides_runpath=yes
9207
9208     case $host_os in
9209     cygwin*)
9210       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
9211       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9212       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
9213       ;;
9214     mingw*)
9215       # MinGW DLLs use traditional 'lib' prefix
9216       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9217       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9218       if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
9219         # It is most probably a Windows format PATH printed by
9220         # mingw gcc, but we are running on Cygwin. Gcc prints its search
9221         # path with ; separators, and with drive letters. We can handle the
9222         # drive letters (cygwin fileutils understands them), so leave them,
9223         # especially as we might pass files found there to a mingw objdump,
9224         # which wouldn't understand a cygwinified path. Ahh.
9225         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9226       else
9227         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
9228       fi
9229       ;;
9230     pw32*)
9231       # pw32 DLLs use 'pw' prefix rather than 'lib'
9232       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9233       ;;
9234     esac
9235     ;;
9236
9237   *)
9238     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
9239     ;;
9240   esac
9241   dynamic_linker='Win32 ld.exe'
9242   # FIXME: first we should search . and the directory the executable is in
9243   shlibpath_var=PATH
9244   ;;
9245
9246 darwin* | rhapsody*)
9247   dynamic_linker="$host_os dyld"
9248   version_type=darwin
9249   need_lib_prefix=no
9250   need_version=no
9251   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
9252   soname_spec='${libname}${release}${major}$shared_ext'
9253   shlibpath_overrides_runpath=yes
9254   shlibpath_var=DYLD_LIBRARY_PATH
9255   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
9256   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
9257   if test "$GCC" = yes; then
9258     sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
9259   else
9260     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
9261   fi
9262   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
9263   ;;
9264
9265 dgux*)
9266   version_type=linux
9267   need_lib_prefix=no
9268   need_version=no
9269   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
9270   soname_spec='${libname}${release}${shared_ext}$major'
9271   shlibpath_var=LD_LIBRARY_PATH
9272   ;;
9273
9274 freebsd1*)
9275   dynamic_linker=no
9276   ;;
9277
9278 kfreebsd*-gnu)
9279   version_type=linux
9280   need_lib_prefix=no
9281   need_version=no
9282   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9283   soname_spec='${libname}${release}${shared_ext}$major'
9284   shlibpath_var=LD_LIBRARY_PATH
9285   shlibpath_overrides_runpath=no
9286   hardcode_into_libs=yes
9287   dynamic_linker='GNU ld.so'
9288   ;;
9289
9290 freebsd* | dragonfly*)
9291   # DragonFly does not have aout.  When/if they implement a new
9292   # versioning mechanism, adjust this.
9293   if test -x /usr/bin/objformat; then
9294     objformat=`/usr/bin/objformat`
9295   else
9296     case $host_os in
9297     freebsd[123]*) objformat=aout ;;
9298     *) objformat=elf ;;
9299     esac
9300   fi
9301   version_type=freebsd-$objformat
9302   case $version_type in
9303     freebsd-elf*)
9304       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
9305       need_version=no
9306       need_lib_prefix=no
9307       ;;
9308     freebsd-*)
9309       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
9310       need_version=yes
9311       ;;
9312   esac
9313   shlibpath_var=LD_LIBRARY_PATH
9314   case $host_os in
9315   freebsd2*)
9316     shlibpath_overrides_runpath=yes
9317     ;;
9318   freebsd3.[01]* | freebsdelf3.[01]*)
9319     shlibpath_overrides_runpath=yes
9320     hardcode_into_libs=yes
9321     ;;
9322   *) # from 3.2 on
9323     shlibpath_overrides_runpath=no
9324     hardcode_into_libs=yes
9325     ;;
9326   esac
9327   ;;
9328
9329 gnu*)
9330   version_type=linux
9331   need_lib_prefix=no
9332   need_version=no
9333   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
9334   soname_spec='${libname}${release}${shared_ext}$major'
9335   shlibpath_var=LD_LIBRARY_PATH
9336   hardcode_into_libs=yes
9337   ;;
9338
9339 hpux9* | hpux10* | hpux11*)
9340   # Give a soname corresponding to the major version so that dld.sl refuses to
9341   # link against other versions.
9342   version_type=sunos
9343   need_lib_prefix=no
9344   need_version=no
9345   case $host_cpu in
9346   ia64*)
9347     shrext_cmds='.so'
9348     hardcode_into_libs=yes
9349     dynamic_linker="$host_os dld.so"
9350     shlibpath_var=LD_LIBRARY_PATH
9351     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9352     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9353     soname_spec='${libname}${release}${shared_ext}$major'
9354     if test "X$HPUX_IA64_MODE" = X32; then
9355       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
9356     else
9357       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
9358     fi
9359     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9360     ;;
9361    hppa*64*)
9362      shrext_cmds='.sl'
9363      hardcode_into_libs=yes
9364      dynamic_linker="$host_os dld.sl"
9365      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
9366      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9367      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9368      soname_spec='${libname}${release}${shared_ext}$major'
9369      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
9370      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9371      ;;
9372    *)
9373     shrext_cmds='.sl'
9374     dynamic_linker="$host_os dld.sl"
9375     shlibpath_var=SHLIB_PATH
9376     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
9377     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9378     soname_spec='${libname}${release}${shared_ext}$major'
9379     ;;
9380   esac
9381   # HP-UX runs *really* slowly unless shared libraries are mode 555.
9382   postinstall_cmds='chmod 555 $lib'
9383   ;;
9384
9385 irix5* | irix6* | nonstopux*)
9386   case $host_os in
9387     nonstopux*) version_type=nonstopux ;;
9388     *)
9389         if test "$lt_cv_prog_gnu_ld" = yes; then
9390                 version_type=linux
9391         else
9392                 version_type=irix
9393         fi ;;
9394   esac
9395   need_lib_prefix=no
9396   need_version=no
9397   soname_spec='${libname}${release}${shared_ext}$major'
9398   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
9399   case $host_os in
9400   irix5* | nonstopux*)
9401     libsuff= shlibsuff=
9402     ;;
9403   *)
9404     case $LD in # libtool.m4 will add one of these switches to LD
9405     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
9406       libsuff= shlibsuff= libmagic=32-bit;;
9407     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
9408       libsuff=32 shlibsuff=N32 libmagic=N32;;
9409     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
9410       libsuff=64 shlibsuff=64 libmagic=64-bit;;
9411     *) libsuff= shlibsuff= libmagic=never-match;;
9412     esac
9413     ;;
9414   esac
9415   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
9416   shlibpath_overrides_runpath=no
9417   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
9418   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
9419   hardcode_into_libs=yes
9420   ;;
9421
9422 # No shared lib support for Linux oldld, aout, or coff.
9423 linux*oldld* | linux*aout* | linux*coff*)
9424   dynamic_linker=no
9425   ;;
9426
9427 # This must be Linux ELF.
9428 linux*)
9429   version_type=linux
9430   need_lib_prefix=no
9431   need_version=no
9432   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9433   soname_spec='${libname}${release}${shared_ext}$major'
9434   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
9435   shlibpath_var=LD_LIBRARY_PATH
9436   shlibpath_overrides_runpath=no
9437   # This implies no fast_install, which is unacceptable.
9438   # Some rework will be needed to allow for fast_install
9439   # before this can be enabled.
9440   hardcode_into_libs=yes
9441
9442   # Append ld.so.conf contents to the search path
9443   if test -f /etc/ld.so.conf; then
9444     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,        ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
9445     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
9446   fi
9447
9448   # We used to test for /lib/ld.so.1 and disable shared libraries on
9449   # powerpc, because MkLinux only supported shared libraries with the
9450   # GNU dynamic linker.  Since this was broken with cross compilers,
9451   # most powerpc-linux boxes support dynamic linking these days and
9452   # people can always --disable-shared, the test was removed, and we
9453   # assume the GNU/Linux dynamic linker is in use.
9454   dynamic_linker='GNU/Linux ld.so'
9455   ;;
9456
9457 knetbsd*-gnu)
9458   version_type=linux
9459   need_lib_prefix=no
9460   need_version=no
9461   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9462   soname_spec='${libname}${release}${shared_ext}$major'
9463   shlibpath_var=LD_LIBRARY_PATH
9464   shlibpath_overrides_runpath=no
9465   hardcode_into_libs=yes
9466   dynamic_linker='GNU ld.so'
9467   ;;
9468
9469 netbsd*)
9470   version_type=sunos
9471   need_lib_prefix=no
9472   need_version=no
9473   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9474     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9475     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9476     dynamic_linker='NetBSD (a.out) ld.so'
9477   else
9478     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9479     soname_spec='${libname}${release}${shared_ext}$major'
9480     dynamic_linker='NetBSD ld.elf_so'
9481   fi
9482   shlibpath_var=LD_LIBRARY_PATH
9483   shlibpath_overrides_runpath=yes
9484   hardcode_into_libs=yes
9485   ;;
9486
9487 newsos6)
9488   version_type=linux
9489   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9490   shlibpath_var=LD_LIBRARY_PATH
9491   shlibpath_overrides_runpath=yes
9492   ;;
9493
9494 nto-qnx*)
9495   version_type=linux
9496   need_lib_prefix=no
9497   need_version=no
9498   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9499   soname_spec='${libname}${release}${shared_ext}$major'
9500   shlibpath_var=LD_LIBRARY_PATH
9501   shlibpath_overrides_runpath=yes
9502   ;;
9503
9504 openbsd*)
9505   version_type=sunos
9506   need_lib_prefix=no
9507   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
9508   case $host_os in
9509     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
9510     *)                         need_version=no  ;;
9511   esac
9512   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9513   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9514   shlibpath_var=LD_LIBRARY_PATH
9515   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9516     case $host_os in
9517       openbsd2.[89] | openbsd2.[89].*)
9518         shlibpath_overrides_runpath=no
9519         ;;
9520       *)
9521         shlibpath_overrides_runpath=yes
9522         ;;
9523       esac
9524   else
9525     shlibpath_overrides_runpath=yes
9526   fi
9527   ;;
9528
9529 os2*)
9530   libname_spec='$name'
9531   shrext_cmds=".dll"
9532   need_lib_prefix=no
9533   library_names_spec='$libname${shared_ext} $libname.a'
9534   dynamic_linker='OS/2 ld.exe'
9535   shlibpath_var=LIBPATH
9536   ;;
9537
9538 osf3* | osf4* | osf5*)
9539   version_type=osf
9540   need_lib_prefix=no
9541   need_version=no
9542   soname_spec='${libname}${release}${shared_ext}$major'
9543   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9544   shlibpath_var=LD_LIBRARY_PATH
9545   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
9546   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
9547   ;;
9548
9549 sco3.2v5*)
9550   version_type=osf
9551   soname_spec='${libname}${release}${shared_ext}$major'
9552   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9553   shlibpath_var=LD_LIBRARY_PATH
9554   ;;
9555
9556 solaris*)
9557   version_type=linux
9558   need_lib_prefix=no
9559   need_version=no
9560   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9561   soname_spec='${libname}${release}${shared_ext}$major'
9562   shlibpath_var=LD_LIBRARY_PATH
9563   shlibpath_overrides_runpath=yes
9564   hardcode_into_libs=yes
9565   # ldd complains unless libraries are executable
9566   postinstall_cmds='chmod +x $lib'
9567   ;;
9568
9569 sunos4*)
9570   version_type=sunos
9571   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9572   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
9573   shlibpath_var=LD_LIBRARY_PATH
9574   shlibpath_overrides_runpath=yes
9575   if test "$with_gnu_ld" = yes; then
9576     need_lib_prefix=no
9577   fi
9578   need_version=yes
9579   ;;
9580
9581 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9582   version_type=linux
9583   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9584   soname_spec='${libname}${release}${shared_ext}$major'
9585   shlibpath_var=LD_LIBRARY_PATH
9586   case $host_vendor in
9587     sni)
9588       shlibpath_overrides_runpath=no
9589       need_lib_prefix=no
9590       export_dynamic_flag_spec='${wl}-Blargedynsym'
9591       runpath_var=LD_RUN_PATH
9592       ;;
9593     siemens)
9594       need_lib_prefix=no
9595       ;;
9596     motorola)
9597       need_lib_prefix=no
9598       need_version=no
9599       shlibpath_overrides_runpath=no
9600       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
9601       ;;
9602   esac
9603   ;;
9604
9605 sysv4*MP*)
9606   if test -d /usr/nec ;then
9607     version_type=linux
9608     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
9609     soname_spec='$libname${shared_ext}.$major'
9610     shlibpath_var=LD_LIBRARY_PATH
9611   fi
9612   ;;
9613
9614 uts4*)
9615   version_type=linux
9616   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9617   soname_spec='${libname}${release}${shared_ext}$major'
9618   shlibpath_var=LD_LIBRARY_PATH
9619   ;;
9620
9621 *)
9622   dynamic_linker=no
9623   ;;
9624 esac
9625 echo "$as_me:$LINENO: result: $dynamic_linker" >&5
9626 echo "${ECHO_T}$dynamic_linker" >&6
9627 test "$dynamic_linker" = no && can_build_shared=no
9628
9629 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
9630 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
9631 hardcode_action=
9632 if test -n "$hardcode_libdir_flag_spec" || \
9633    test -n "$runpath_var" || \
9634    test "X$hardcode_automatic" = "Xyes" ; then
9635
9636   # We can hardcode non-existant directories.
9637   if test "$hardcode_direct" != no &&
9638      # If the only mechanism to avoid hardcoding is shlibpath_var, we
9639      # have to relink, otherwise we might link with an installed library
9640      # when we should be linking with a yet-to-be-installed one
9641      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
9642      test "$hardcode_minus_L" != no; then
9643     # Linking always hardcodes the temporary library directory.
9644     hardcode_action=relink
9645   else
9646     # We can link without hardcoding, and we can hardcode nonexisting dirs.
9647     hardcode_action=immediate
9648   fi
9649 else
9650   # We cannot hardcode anything, or else we can only hardcode existing
9651   # directories.
9652   hardcode_action=unsupported
9653 fi
9654 echo "$as_me:$LINENO: result: $hardcode_action" >&5
9655 echo "${ECHO_T}$hardcode_action" >&6
9656
9657 if test "$hardcode_action" = relink; then
9658   # Fast installation is not supported
9659   enable_fast_install=no
9660 elif test "$shlibpath_overrides_runpath" = yes ||
9661      test "$enable_shared" = no; then
9662   # Fast installation is not necessary
9663   enable_fast_install=needless
9664 fi
9665
9666 striplib=
9667 old_striplib=
9668 echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
9669 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
9670 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
9671   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
9672   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
9673   echo "$as_me:$LINENO: result: yes" >&5
9674 echo "${ECHO_T}yes" >&6
9675 else
9676 # FIXME - insert some real tests, host_os isn't really good enough
9677   case $host_os in
9678    darwin*)
9679        if test -n "$STRIP" ; then
9680          striplib="$STRIP -x"
9681          echo "$as_me:$LINENO: result: yes" >&5
9682 echo "${ECHO_T}yes" >&6
9683        else
9684   echo "$as_me:$LINENO: result: no" >&5
9685 echo "${ECHO_T}no" >&6
9686 fi
9687        ;;
9688    *)
9689   echo "$as_me:$LINENO: result: no" >&5
9690 echo "${ECHO_T}no" >&6
9691     ;;
9692   esac
9693 fi
9694
9695 if test "x$enable_dlopen" != xyes; then
9696   enable_dlopen=unknown
9697   enable_dlopen_self=unknown
9698   enable_dlopen_self_static=unknown
9699 else
9700   lt_cv_dlopen=no
9701   lt_cv_dlopen_libs=
9702
9703   case $host_os in
9704   beos*)
9705     lt_cv_dlopen="load_add_on"
9706     lt_cv_dlopen_libs=
9707     lt_cv_dlopen_self=yes
9708     ;;
9709
9710   mingw* | pw32*)
9711     lt_cv_dlopen="LoadLibrary"
9712     lt_cv_dlopen_libs=
9713    ;;
9714
9715   cygwin*)
9716     lt_cv_dlopen="dlopen"
9717     lt_cv_dlopen_libs=
9718    ;;
9719
9720   darwin*)
9721   # if libdl is installed we need to link against it
9722     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9723 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9724 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9725   echo $ECHO_N "(cached) $ECHO_C" >&6
9726 else
9727   ac_check_lib_save_LIBS=$LIBS
9728 LIBS="-ldl  $LIBS"
9729 cat >conftest.$ac_ext <<_ACEOF
9730 /* confdefs.h.  */
9731 _ACEOF
9732 cat confdefs.h >>conftest.$ac_ext
9733 cat >>conftest.$ac_ext <<_ACEOF
9734 /* end confdefs.h.  */
9735
9736 /* Override any gcc2 internal prototype to avoid an error.  */
9737 #ifdef __cplusplus
9738 extern "C"
9739 #endif
9740 /* We use char because int might match the return type of a gcc2
9741    builtin and then its argument prototype would still apply.  */
9742 char dlopen ();
9743 int
9744 main ()
9745 {
9746 dlopen ();
9747   ;
9748   return 0;
9749 }
9750 _ACEOF
9751 rm -f conftest.$ac_objext conftest$ac_exeext
9752 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9753   (eval $ac_link) 2>conftest.er1
9754   ac_status=$?
9755   grep -v '^ *+' conftest.er1 >conftest.err
9756   rm -f conftest.er1
9757   cat conftest.err >&5
9758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9759   (exit $ac_status); } &&
9760          { ac_try='test -z "$ac_c_werror_flag"
9761                          || test ! -s conftest.err'
9762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9763   (eval $ac_try) 2>&5
9764   ac_status=$?
9765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9766   (exit $ac_status); }; } &&
9767          { ac_try='test -s conftest$ac_exeext'
9768   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9769   (eval $ac_try) 2>&5
9770   ac_status=$?
9771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9772   (exit $ac_status); }; }; then
9773   ac_cv_lib_dl_dlopen=yes
9774 else
9775   echo "$as_me: failed program was:" >&5
9776 sed 's/^/| /' conftest.$ac_ext >&5
9777
9778 ac_cv_lib_dl_dlopen=no
9779 fi
9780 rm -f conftest.err conftest.$ac_objext \
9781       conftest$ac_exeext conftest.$ac_ext
9782 LIBS=$ac_check_lib_save_LIBS
9783 fi
9784 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9785 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9786 if test $ac_cv_lib_dl_dlopen = yes; then
9787   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
9788 else
9789
9790     lt_cv_dlopen="dyld"
9791     lt_cv_dlopen_libs=
9792     lt_cv_dlopen_self=yes
9793
9794 fi
9795
9796    ;;
9797
9798   *)
9799     echo "$as_me:$LINENO: checking for shl_load" >&5
9800 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
9801 if test "${ac_cv_func_shl_load+set}" = set; then
9802   echo $ECHO_N "(cached) $ECHO_C" >&6
9803 else
9804   cat >conftest.$ac_ext <<_ACEOF
9805 /* confdefs.h.  */
9806 _ACEOF
9807 cat confdefs.h >>conftest.$ac_ext
9808 cat >>conftest.$ac_ext <<_ACEOF
9809 /* end confdefs.h.  */
9810 /* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
9811    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9812 #define shl_load innocuous_shl_load
9813
9814 /* System header to define __stub macros and hopefully few prototypes,
9815     which can conflict with char shl_load (); below.
9816     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9817     <limits.h> exists even on freestanding compilers.  */
9818
9819 #ifdef __STDC__
9820 # include <limits.h>
9821 #else
9822 # include <assert.h>
9823 #endif
9824
9825 #undef shl_load
9826
9827 /* Override any gcc2 internal prototype to avoid an error.  */
9828 #ifdef __cplusplus
9829 extern "C"
9830 {
9831 #endif
9832 /* We use char because int might match the return type of a gcc2
9833    builtin and then its argument prototype would still apply.  */
9834 char shl_load ();
9835 /* The GNU C library defines this for functions which it implements
9836     to always fail with ENOSYS.  Some functions are actually named
9837     something starting with __ and the normal name is an alias.  */
9838 #if defined (__stub_shl_load) || defined (__stub___shl_load)
9839 choke me
9840 #else
9841 char (*f) () = shl_load;
9842 #endif
9843 #ifdef __cplusplus
9844 }
9845 #endif
9846
9847 int
9848 main ()
9849 {
9850 return f != shl_load;
9851   ;
9852   return 0;
9853 }
9854 _ACEOF
9855 rm -f conftest.$ac_objext conftest$ac_exeext
9856 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9857   (eval $ac_link) 2>conftest.er1
9858   ac_status=$?
9859   grep -v '^ *+' conftest.er1 >conftest.err
9860   rm -f conftest.er1
9861   cat conftest.err >&5
9862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9863   (exit $ac_status); } &&
9864          { ac_try='test -z "$ac_c_werror_flag"
9865                          || test ! -s conftest.err'
9866   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9867   (eval $ac_try) 2>&5
9868   ac_status=$?
9869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9870   (exit $ac_status); }; } &&
9871          { ac_try='test -s conftest$ac_exeext'
9872   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9873   (eval $ac_try) 2>&5
9874   ac_status=$?
9875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9876   (exit $ac_status); }; }; then
9877   ac_cv_func_shl_load=yes
9878 else
9879   echo "$as_me: failed program was:" >&5
9880 sed 's/^/| /' conftest.$ac_ext >&5
9881
9882 ac_cv_func_shl_load=no
9883 fi
9884 rm -f conftest.err conftest.$ac_objext \
9885       conftest$ac_exeext conftest.$ac_ext
9886 fi
9887 echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
9888 echo "${ECHO_T}$ac_cv_func_shl_load" >&6
9889 if test $ac_cv_func_shl_load = yes; then
9890   lt_cv_dlopen="shl_load"
9891 else
9892   echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9893 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9894 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9895   echo $ECHO_N "(cached) $ECHO_C" >&6
9896 else
9897   ac_check_lib_save_LIBS=$LIBS
9898 LIBS="-ldld  $LIBS"
9899 cat >conftest.$ac_ext <<_ACEOF
9900 /* confdefs.h.  */
9901 _ACEOF
9902 cat confdefs.h >>conftest.$ac_ext
9903 cat >>conftest.$ac_ext <<_ACEOF
9904 /* end confdefs.h.  */
9905
9906 /* Override any gcc2 internal prototype to avoid an error.  */
9907 #ifdef __cplusplus
9908 extern "C"
9909 #endif
9910 /* We use char because int might match the return type of a gcc2
9911    builtin and then its argument prototype would still apply.  */
9912 char shl_load ();
9913 int
9914 main ()
9915 {
9916 shl_load ();
9917   ;
9918   return 0;
9919 }
9920 _ACEOF
9921 rm -f conftest.$ac_objext conftest$ac_exeext
9922 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9923   (eval $ac_link) 2>conftest.er1
9924   ac_status=$?
9925   grep -v '^ *+' conftest.er1 >conftest.err
9926   rm -f conftest.er1
9927   cat conftest.err >&5
9928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9929   (exit $ac_status); } &&
9930          { ac_try='test -z "$ac_c_werror_flag"
9931                          || test ! -s conftest.err'
9932   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9933   (eval $ac_try) 2>&5
9934   ac_status=$?
9935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9936   (exit $ac_status); }; } &&
9937          { ac_try='test -s conftest$ac_exeext'
9938   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9939   (eval $ac_try) 2>&5
9940   ac_status=$?
9941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9942   (exit $ac_status); }; }; then
9943   ac_cv_lib_dld_shl_load=yes
9944 else
9945   echo "$as_me: failed program was:" >&5
9946 sed 's/^/| /' conftest.$ac_ext >&5
9947
9948 ac_cv_lib_dld_shl_load=no
9949 fi
9950 rm -f conftest.err conftest.$ac_objext \
9951       conftest$ac_exeext conftest.$ac_ext
9952 LIBS=$ac_check_lib_save_LIBS
9953 fi
9954 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9955 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9956 if test $ac_cv_lib_dld_shl_load = yes; then
9957   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
9958 else
9959   echo "$as_me:$LINENO: checking for dlopen" >&5
9960 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
9961 if test "${ac_cv_func_dlopen+set}" = set; then
9962   echo $ECHO_N "(cached) $ECHO_C" >&6
9963 else
9964   cat >conftest.$ac_ext <<_ACEOF
9965 /* confdefs.h.  */
9966 _ACEOF
9967 cat confdefs.h >>conftest.$ac_ext
9968 cat >>conftest.$ac_ext <<_ACEOF
9969 /* end confdefs.h.  */
9970 /* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
9971    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9972 #define dlopen innocuous_dlopen
9973
9974 /* System header to define __stub macros and hopefully few prototypes,
9975     which can conflict with char dlopen (); below.
9976     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9977     <limits.h> exists even on freestanding compilers.  */
9978
9979 #ifdef __STDC__
9980 # include <limits.h>
9981 #else
9982 # include <assert.h>
9983 #endif
9984
9985 #undef dlopen
9986
9987 /* Override any gcc2 internal prototype to avoid an error.  */
9988 #ifdef __cplusplus
9989 extern "C"
9990 {
9991 #endif
9992 /* We use char because int might match the return type of a gcc2
9993    builtin and then its argument prototype would still apply.  */
9994 char dlopen ();
9995 /* The GNU C library defines this for functions which it implements
9996     to always fail with ENOSYS.  Some functions are actually named
9997     something starting with __ and the normal name is an alias.  */
9998 #if defined (__stub_dlopen) || defined (__stub___dlopen)
9999 choke me
10000 #else
10001 char (*f) () = dlopen;
10002 #endif
10003 #ifdef __cplusplus
10004 }
10005 #endif
10006
10007 int
10008 main ()
10009 {
10010 return f != dlopen;
10011   ;
10012   return 0;
10013 }
10014 _ACEOF
10015 rm -f conftest.$ac_objext conftest$ac_exeext
10016 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10017   (eval $ac_link) 2>conftest.er1
10018   ac_status=$?
10019   grep -v '^ *+' conftest.er1 >conftest.err
10020   rm -f conftest.er1
10021   cat conftest.err >&5
10022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10023   (exit $ac_status); } &&
10024          { ac_try='test -z "$ac_c_werror_flag"
10025                          || test ! -s conftest.err'
10026   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10027   (eval $ac_try) 2>&5
10028   ac_status=$?
10029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10030   (exit $ac_status); }; } &&
10031          { ac_try='test -s conftest$ac_exeext'
10032   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10033   (eval $ac_try) 2>&5
10034   ac_status=$?
10035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10036   (exit $ac_status); }; }; then
10037   ac_cv_func_dlopen=yes
10038 else
10039   echo "$as_me: failed program was:" >&5
10040 sed 's/^/| /' conftest.$ac_ext >&5
10041
10042 ac_cv_func_dlopen=no
10043 fi
10044 rm -f conftest.err conftest.$ac_objext \
10045       conftest$ac_exeext conftest.$ac_ext
10046 fi
10047 echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
10048 echo "${ECHO_T}$ac_cv_func_dlopen" >&6
10049 if test $ac_cv_func_dlopen = yes; then
10050   lt_cv_dlopen="dlopen"
10051 else
10052   echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10053 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10054 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10055   echo $ECHO_N "(cached) $ECHO_C" >&6
10056 else
10057   ac_check_lib_save_LIBS=$LIBS
10058 LIBS="-ldl  $LIBS"
10059 cat >conftest.$ac_ext <<_ACEOF
10060 /* confdefs.h.  */
10061 _ACEOF
10062 cat confdefs.h >>conftest.$ac_ext
10063 cat >>conftest.$ac_ext <<_ACEOF
10064 /* end confdefs.h.  */
10065
10066 /* Override any gcc2 internal prototype to avoid an error.  */
10067 #ifdef __cplusplus
10068 extern "C"
10069 #endif
10070 /* We use char because int might match the return type of a gcc2
10071    builtin and then its argument prototype would still apply.  */
10072 char dlopen ();
10073 int
10074 main ()
10075 {
10076 dlopen ();
10077   ;
10078   return 0;
10079 }
10080 _ACEOF
10081 rm -f conftest.$ac_objext conftest$ac_exeext
10082 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10083   (eval $ac_link) 2>conftest.er1
10084   ac_status=$?
10085   grep -v '^ *+' conftest.er1 >conftest.err
10086   rm -f conftest.er1
10087   cat conftest.err >&5
10088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10089   (exit $ac_status); } &&
10090          { ac_try='test -z "$ac_c_werror_flag"
10091                          || test ! -s conftest.err'
10092   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10093   (eval $ac_try) 2>&5
10094   ac_status=$?
10095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10096   (exit $ac_status); }; } &&
10097          { ac_try='test -s conftest$ac_exeext'
10098   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10099   (eval $ac_try) 2>&5
10100   ac_status=$?
10101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10102   (exit $ac_status); }; }; then
10103   ac_cv_lib_dl_dlopen=yes
10104 else
10105   echo "$as_me: failed program was:" >&5
10106 sed 's/^/| /' conftest.$ac_ext >&5
10107
10108 ac_cv_lib_dl_dlopen=no
10109 fi
10110 rm -f conftest.err conftest.$ac_objext \
10111       conftest$ac_exeext conftest.$ac_ext
10112 LIBS=$ac_check_lib_save_LIBS
10113 fi
10114 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10115 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10116 if test $ac_cv_lib_dl_dlopen = yes; then
10117   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10118 else
10119   echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
10120 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
10121 if test "${ac_cv_lib_svld_dlopen+set}" = set; then
10122   echo $ECHO_N "(cached) $ECHO_C" >&6
10123 else
10124   ac_check_lib_save_LIBS=$LIBS
10125 LIBS="-lsvld  $LIBS"
10126 cat >conftest.$ac_ext <<_ACEOF
10127 /* confdefs.h.  */
10128 _ACEOF
10129 cat confdefs.h >>conftest.$ac_ext
10130 cat >>conftest.$ac_ext <<_ACEOF
10131 /* end confdefs.h.  */
10132
10133 /* Override any gcc2 internal prototype to avoid an error.  */
10134 #ifdef __cplusplus
10135 extern "C"
10136 #endif
10137 /* We use char because int might match the return type of a gcc2
10138    builtin and then its argument prototype would still apply.  */
10139 char dlopen ();
10140 int
10141 main ()
10142 {
10143 dlopen ();
10144   ;
10145   return 0;
10146 }
10147 _ACEOF
10148 rm -f conftest.$ac_objext conftest$ac_exeext
10149 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10150   (eval $ac_link) 2>conftest.er1
10151   ac_status=$?
10152   grep -v '^ *+' conftest.er1 >conftest.err
10153   rm -f conftest.er1
10154   cat conftest.err >&5
10155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10156   (exit $ac_status); } &&
10157          { ac_try='test -z "$ac_c_werror_flag"
10158                          || test ! -s conftest.err'
10159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10160   (eval $ac_try) 2>&5
10161   ac_status=$?
10162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10163   (exit $ac_status); }; } &&
10164          { ac_try='test -s conftest$ac_exeext'
10165   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10166   (eval $ac_try) 2>&5
10167   ac_status=$?
10168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10169   (exit $ac_status); }; }; then
10170   ac_cv_lib_svld_dlopen=yes
10171 else
10172   echo "$as_me: failed program was:" >&5
10173 sed 's/^/| /' conftest.$ac_ext >&5
10174
10175 ac_cv_lib_svld_dlopen=no
10176 fi
10177 rm -f conftest.err conftest.$ac_objext \
10178       conftest$ac_exeext conftest.$ac_ext
10179 LIBS=$ac_check_lib_save_LIBS
10180 fi
10181 echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
10182 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
10183 if test $ac_cv_lib_svld_dlopen = yes; then
10184   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
10185 else
10186   echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
10187 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
10188 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
10189   echo $ECHO_N "(cached) $ECHO_C" >&6
10190 else
10191   ac_check_lib_save_LIBS=$LIBS
10192 LIBS="-ldld  $LIBS"
10193 cat >conftest.$ac_ext <<_ACEOF
10194 /* confdefs.h.  */
10195 _ACEOF
10196 cat confdefs.h >>conftest.$ac_ext
10197 cat >>conftest.$ac_ext <<_ACEOF
10198 /* end confdefs.h.  */
10199
10200 /* Override any gcc2 internal prototype to avoid an error.  */
10201 #ifdef __cplusplus
10202 extern "C"
10203 #endif
10204 /* We use char because int might match the return type of a gcc2
10205    builtin and then its argument prototype would still apply.  */
10206 char dld_link ();
10207 int
10208 main ()
10209 {
10210 dld_link ();
10211   ;
10212   return 0;
10213 }
10214 _ACEOF
10215 rm -f conftest.$ac_objext conftest$ac_exeext
10216 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10217   (eval $ac_link) 2>conftest.er1
10218   ac_status=$?
10219   grep -v '^ *+' conftest.er1 >conftest.err
10220   rm -f conftest.er1
10221   cat conftest.err >&5
10222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10223   (exit $ac_status); } &&
10224          { ac_try='test -z "$ac_c_werror_flag"
10225                          || test ! -s conftest.err'
10226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10227   (eval $ac_try) 2>&5
10228   ac_status=$?
10229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10230   (exit $ac_status); }; } &&
10231          { ac_try='test -s conftest$ac_exeext'
10232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10233   (eval $ac_try) 2>&5
10234   ac_status=$?
10235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10236   (exit $ac_status); }; }; then
10237   ac_cv_lib_dld_dld_link=yes
10238 else
10239   echo "$as_me: failed program was:" >&5
10240 sed 's/^/| /' conftest.$ac_ext >&5
10241
10242 ac_cv_lib_dld_dld_link=no
10243 fi
10244 rm -f conftest.err conftest.$ac_objext \
10245       conftest$ac_exeext conftest.$ac_ext
10246 LIBS=$ac_check_lib_save_LIBS
10247 fi
10248 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
10249 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
10250 if test $ac_cv_lib_dld_dld_link = yes; then
10251   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
10252 fi
10253
10254
10255 fi
10256
10257
10258 fi
10259
10260
10261 fi
10262
10263
10264 fi
10265
10266
10267 fi
10268
10269     ;;
10270   esac
10271
10272   if test "x$lt_cv_dlopen" != xno; then
10273     enable_dlopen=yes
10274   else
10275     enable_dlopen=no
10276   fi
10277
10278   case $lt_cv_dlopen in
10279   dlopen)
10280     save_CPPFLAGS="$CPPFLAGS"
10281     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
10282
10283     save_LDFLAGS="$LDFLAGS"
10284     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
10285
10286     save_LIBS="$LIBS"
10287     LIBS="$lt_cv_dlopen_libs $LIBS"
10288
10289     echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
10290 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
10291 if test "${lt_cv_dlopen_self+set}" = set; then
10292   echo $ECHO_N "(cached) $ECHO_C" >&6
10293 else
10294           if test "$cross_compiling" = yes; then :
10295   lt_cv_dlopen_self=cross
10296 else
10297   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10298   lt_status=$lt_dlunknown
10299   cat > conftest.$ac_ext <<EOF
10300 #line 10300 "configure"
10301 #include "confdefs.h"
10302
10303 #if HAVE_DLFCN_H
10304 #include <dlfcn.h>
10305 #endif
10306
10307 #include <stdio.h>
10308
10309 #ifdef RTLD_GLOBAL
10310 #  define LT_DLGLOBAL           RTLD_GLOBAL
10311 #else
10312 #  ifdef DL_GLOBAL
10313 #    define LT_DLGLOBAL         DL_GLOBAL
10314 #  else
10315 #    define LT_DLGLOBAL         0
10316 #  endif
10317 #endif
10318
10319 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10320    find out it does not work in some platform. */
10321 #ifndef LT_DLLAZY_OR_NOW
10322 #  ifdef RTLD_LAZY
10323 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10324 #  else
10325 #    ifdef DL_LAZY
10326 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10327 #    else
10328 #      ifdef RTLD_NOW
10329 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10330 #      else
10331 #        ifdef DL_NOW
10332 #          define LT_DLLAZY_OR_NOW      DL_NOW
10333 #        else
10334 #          define LT_DLLAZY_OR_NOW      0
10335 #        endif
10336 #      endif
10337 #    endif
10338 #  endif
10339 #endif
10340
10341 #ifdef __cplusplus
10342 extern "C" void exit (int);
10343 #endif
10344
10345 void fnord() { int i=42;}
10346 int main ()
10347 {
10348   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10349   int status = $lt_dlunknown;
10350
10351   if (self)
10352     {
10353       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10354       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10355       /* dlclose (self); */
10356     }
10357
10358     exit (status);
10359 }
10360 EOF
10361   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10362   (eval $ac_link) 2>&5
10363   ac_status=$?
10364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10365   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
10366     (./conftest; exit; ) >&5 2>/dev/null
10367     lt_status=$?
10368     case x$lt_status in
10369       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
10370       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
10371       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
10372     esac
10373   else :
10374     # compilation failed
10375     lt_cv_dlopen_self=no
10376   fi
10377 fi
10378 rm -fr conftest*
10379
10380
10381 fi
10382 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
10383 echo "${ECHO_T}$lt_cv_dlopen_self" >&6
10384
10385     if test "x$lt_cv_dlopen_self" = xyes; then
10386       LDFLAGS="$LDFLAGS $link_static_flag"
10387       echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
10388 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
10389 if test "${lt_cv_dlopen_self_static+set}" = set; then
10390   echo $ECHO_N "(cached) $ECHO_C" >&6
10391 else
10392           if test "$cross_compiling" = yes; then :
10393   lt_cv_dlopen_self_static=cross
10394 else
10395   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10396   lt_status=$lt_dlunknown
10397   cat > conftest.$ac_ext <<EOF
10398 #line 10398 "configure"
10399 #include "confdefs.h"
10400
10401 #if HAVE_DLFCN_H
10402 #include <dlfcn.h>
10403 #endif
10404
10405 #include <stdio.h>
10406
10407 #ifdef RTLD_GLOBAL
10408 #  define LT_DLGLOBAL           RTLD_GLOBAL
10409 #else
10410 #  ifdef DL_GLOBAL
10411 #    define LT_DLGLOBAL         DL_GLOBAL
10412 #  else
10413 #    define LT_DLGLOBAL         0
10414 #  endif
10415 #endif
10416
10417 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10418    find out it does not work in some platform. */
10419 #ifndef LT_DLLAZY_OR_NOW
10420 #  ifdef RTLD_LAZY
10421 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10422 #  else
10423 #    ifdef DL_LAZY
10424 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10425 #    else
10426 #      ifdef RTLD_NOW
10427 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10428 #      else
10429 #        ifdef DL_NOW
10430 #          define LT_DLLAZY_OR_NOW      DL_NOW
10431 #        else
10432 #          define LT_DLLAZY_OR_NOW      0
10433 #        endif
10434 #      endif
10435 #    endif
10436 #  endif
10437 #endif
10438
10439 #ifdef __cplusplus
10440 extern "C" void exit (int);
10441 #endif
10442
10443 void fnord() { int i=42;}
10444 int main ()
10445 {
10446   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10447   int status = $lt_dlunknown;
10448
10449   if (self)
10450     {
10451       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10452       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10453       /* dlclose (self); */
10454     }
10455
10456     exit (status);
10457 }
10458 EOF
10459   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10460   (eval $ac_link) 2>&5
10461   ac_status=$?
10462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10463   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
10464     (./conftest; exit; ) >&5 2>/dev/null
10465     lt_status=$?
10466     case x$lt_status in
10467       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
10468       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
10469       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
10470     esac
10471   else :
10472     # compilation failed
10473     lt_cv_dlopen_self_static=no
10474   fi
10475 fi
10476 rm -fr conftest*
10477
10478
10479 fi
10480 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
10481 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
10482     fi
10483
10484     CPPFLAGS="$save_CPPFLAGS"
10485     LDFLAGS="$save_LDFLAGS"
10486     LIBS="$save_LIBS"
10487     ;;
10488   esac
10489
10490   case $lt_cv_dlopen_self in
10491   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
10492   *) enable_dlopen_self=unknown ;;
10493   esac
10494
10495   case $lt_cv_dlopen_self_static in
10496   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
10497   *) enable_dlopen_self_static=unknown ;;
10498   esac
10499 fi
10500
10501
10502 # Report which librarie types wil actually be built
10503 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
10504 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
10505 echo "$as_me:$LINENO: result: $can_build_shared" >&5
10506 echo "${ECHO_T}$can_build_shared" >&6
10507
10508 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
10509 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
10510 test "$can_build_shared" = "no" && enable_shared=no
10511
10512 # On AIX, shared libraries and static libraries use the same namespace, and
10513 # are all built from PIC.
10514 case $host_os in
10515 aix3*)
10516   test "$enable_shared" = yes && enable_static=no
10517   if test -n "$RANLIB"; then
10518     archive_cmds="$archive_cmds~\$RANLIB \$lib"
10519     postinstall_cmds='$RANLIB $lib'
10520   fi
10521   ;;
10522
10523 aix4* | aix5*)
10524   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
10525     test "$enable_shared" = yes && enable_static=no
10526   fi
10527     ;;
10528 esac
10529 echo "$as_me:$LINENO: result: $enable_shared" >&5
10530 echo "${ECHO_T}$enable_shared" >&6
10531
10532 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
10533 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
10534 # Make sure either enable_shared or enable_static is yes.
10535 test "$enable_shared" = yes || enable_static=yes
10536 echo "$as_me:$LINENO: result: $enable_static" >&5
10537 echo "${ECHO_T}$enable_static" >&6
10538
10539 # The else clause should only fire when bootstrapping the
10540 # libtool distribution, otherwise you forgot to ship ltmain.sh
10541 # with your package, and you will get complaints that there are
10542 # no rules to generate ltmain.sh.
10543 if test -f "$ltmain"; then
10544   # See if we are running on zsh, and set the options which allow our commands through
10545   # without removal of \ escapes.
10546   if test -n "${ZSH_VERSION+set}" ; then
10547     setopt NO_GLOB_SUBST
10548   fi
10549   # Now quote all the things that may contain metacharacters while being
10550   # careful not to overquote the AC_SUBSTed values.  We take copies of the
10551   # variables and quote the copies for generation of the libtool script.
10552   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
10553     SED SHELL STRIP \
10554     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
10555     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
10556     deplibs_check_method reload_flag reload_cmds need_locks \
10557     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
10558     lt_cv_sys_global_symbol_to_c_name_address \
10559     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
10560     old_postinstall_cmds old_postuninstall_cmds \
10561     compiler \
10562     CC \
10563     LD \
10564     lt_prog_compiler_wl \
10565     lt_prog_compiler_pic \
10566     lt_prog_compiler_static \
10567     lt_prog_compiler_no_builtin_flag \
10568     export_dynamic_flag_spec \
10569     thread_safe_flag_spec \
10570     whole_archive_flag_spec \
10571     enable_shared_with_static_runtimes \
10572     old_archive_cmds \
10573     old_archive_from_new_cmds \
10574     predep_objects \
10575     postdep_objects \
10576     predeps \
10577     postdeps \
10578     compiler_lib_search_path \
10579     archive_cmds \
10580     archive_expsym_cmds \
10581     postinstall_cmds \
10582     postuninstall_cmds \
10583     old_archive_from_expsyms_cmds \
10584     allow_undefined_flag \
10585     no_undefined_flag \
10586     export_symbols_cmds \
10587     hardcode_libdir_flag_spec \
10588     hardcode_libdir_flag_spec_ld \
10589     hardcode_libdir_separator \
10590     hardcode_automatic \
10591     module_cmds \
10592     module_expsym_cmds \
10593     lt_cv_prog_compiler_c_o \
10594     exclude_expsyms \
10595     include_expsyms; do
10596
10597     case $var in
10598     old_archive_cmds | \
10599     old_archive_from_new_cmds | \
10600     archive_cmds | \
10601     archive_expsym_cmds | \
10602     module_cmds | \
10603     module_expsym_cmds | \
10604     old_archive_from_expsyms_cmds | \
10605     export_symbols_cmds | \
10606     extract_expsyms_cmds | reload_cmds | finish_cmds | \
10607     postinstall_cmds | postuninstall_cmds | \
10608     old_postinstall_cmds | old_postuninstall_cmds | \
10609     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
10610       # Double-quote double-evaled strings.
10611       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
10612       ;;
10613     *)
10614       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
10615       ;;
10616     esac
10617   done
10618
10619   case $lt_echo in
10620   *'\$0 --fallback-echo"')
10621     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
10622     ;;
10623   esac
10624
10625 cfgfile="${ofile}T"
10626   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
10627   $rm -f "$cfgfile"
10628   { echo "$as_me:$LINENO: creating $ofile" >&5
10629 echo "$as_me: creating $ofile" >&6;}
10630
10631   cat <<__EOF__ >> "$cfgfile"
10632 #! $SHELL
10633
10634 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
10635 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
10636 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
10637 #
10638 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
10639 # Free Software Foundation, Inc.
10640 #
10641 # This file is part of GNU Libtool:
10642 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
10643 #
10644 # This program is free software; you can redistribute it and/or modify
10645 # it under the terms of the GNU General Public License as published by
10646 # the Free Software Foundation; either version 2 of the License, or
10647 # (at your option) any later version.
10648 #
10649 # This program is distributed in the hope that it will be useful, but
10650 # WITHOUT ANY WARRANTY; without even the implied warranty of
10651 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10652 # General Public License for more details.
10653 #
10654 # You should have received a copy of the GNU General Public License
10655 # along with this program; if not, write to the Free Software
10656 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
10657 #
10658 # As a special exception to the GNU General Public License, if you
10659 # distribute this file as part of a program that contains a
10660 # configuration script generated by Autoconf, you may include it under
10661 # the same distribution terms that you use for the rest of that program.
10662
10663 # A sed program that does not truncate output.
10664 SED=$lt_SED
10665
10666 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
10667 Xsed="$SED -e 1s/^X//"
10668
10669 # The HP-UX ksh and POSIX shell print the target directory to stdout
10670 # if CDPATH is set.
10671 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
10672
10673 # The names of the tagged configurations supported by this script.
10674 available_tags=
10675
10676 # ### BEGIN LIBTOOL CONFIG
10677
10678 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10679
10680 # Shell to use when invoking shell scripts.
10681 SHELL=$lt_SHELL
10682
10683 # Whether or not to build shared libraries.
10684 build_libtool_libs=$enable_shared
10685
10686 # Whether or not to build static libraries.
10687 build_old_libs=$enable_static
10688
10689 # Whether or not to add -lc for building shared libraries.
10690 build_libtool_need_lc=$archive_cmds_need_lc
10691
10692 # Whether or not to disallow shared libs when runtime libs are static
10693 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
10694
10695 # Whether or not to optimize for fast installation.
10696 fast_install=$enable_fast_install
10697
10698 # The host system.
10699 host_alias=$host_alias
10700 host=$host
10701 host_os=$host_os
10702
10703 # The build system.
10704 build_alias=$build_alias
10705 build=$build
10706 build_os=$build_os
10707
10708 # An echo program that does not interpret backslashes.
10709 echo=$lt_echo
10710
10711 # The archiver.
10712 AR=$lt_AR
10713 AR_FLAGS=$lt_AR_FLAGS
10714
10715 # A C compiler.
10716 LTCC=$lt_LTCC
10717
10718 # A language-specific compiler.
10719 CC=$lt_compiler
10720
10721 # Is the compiler the GNU C compiler?
10722 with_gcc=$GCC
10723
10724 # An ERE matcher.
10725 EGREP=$lt_EGREP
10726
10727 # The linker used to build libraries.
10728 LD=$lt_LD
10729
10730 # Whether we need hard or soft links.
10731 LN_S=$lt_LN_S
10732
10733 # A BSD-compatible nm program.
10734 NM=$lt_NM
10735
10736 # A symbol stripping program
10737 STRIP=$lt_STRIP
10738
10739 # Used to examine libraries when file_magic_cmd begins "file"
10740 MAGIC_CMD=$MAGIC_CMD
10741
10742 # Used on cygwin: DLL creation program.
10743 DLLTOOL="$DLLTOOL"
10744
10745 # Used on cygwin: object dumper.
10746 OBJDUMP="$OBJDUMP"
10747
10748 # Used on cygwin: assembler.
10749 AS="$AS"
10750
10751 # The name of the directory that contains temporary libtool files.
10752 objdir=$objdir
10753
10754 # How to create reloadable object files.
10755 reload_flag=$lt_reload_flag
10756 reload_cmds=$lt_reload_cmds
10757
10758 # How to pass a linker flag through the compiler.
10759 wl=$lt_lt_prog_compiler_wl
10760
10761 # Object file suffix (normally "o").
10762 objext="$ac_objext"
10763
10764 # Old archive suffix (normally "a").
10765 libext="$libext"
10766
10767 # Shared library suffix (normally ".so").
10768 shrext_cmds='$shrext_cmds'
10769
10770 # Executable file suffix (normally "").
10771 exeext="$exeext"
10772
10773 # Additional compiler flags for building library objects.
10774 pic_flag=$lt_lt_prog_compiler_pic
10775 pic_mode=$pic_mode
10776
10777 # What is the maximum length of a command?
10778 max_cmd_len=$lt_cv_sys_max_cmd_len
10779
10780 # Does compiler simultaneously support -c and -o options?
10781 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
10782
10783 # Must we lock files when doing compilation?
10784 need_locks=$lt_need_locks
10785
10786 # Do we need the lib prefix for modules?
10787 need_lib_prefix=$need_lib_prefix
10788
10789 # Do we need a version for libraries?
10790 need_version=$need_version
10791
10792 # Whether dlopen is supported.
10793 dlopen_support=$enable_dlopen
10794
10795 # Whether dlopen of programs is supported.
10796 dlopen_self=$enable_dlopen_self
10797
10798 # Whether dlopen of statically linked programs is supported.
10799 dlopen_self_static=$enable_dlopen_self_static
10800
10801 # Compiler flag to prevent dynamic linking.
10802 link_static_flag=$lt_lt_prog_compiler_static
10803
10804 # Compiler flag to turn off builtin functions.
10805 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
10806
10807 # Compiler flag to allow reflexive dlopens.
10808 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
10809
10810 # Compiler flag to generate shared objects directly from archives.
10811 whole_archive_flag_spec=$lt_whole_archive_flag_spec
10812
10813 # Compiler flag to generate thread-safe objects.
10814 thread_safe_flag_spec=$lt_thread_safe_flag_spec
10815
10816 # Library versioning type.
10817 version_type=$version_type
10818
10819 # Format of library name prefix.
10820 libname_spec=$lt_libname_spec
10821
10822 # List of archive names.  First name is the real one, the rest are links.
10823 # The last name is the one that the linker finds with -lNAME.
10824 library_names_spec=$lt_library_names_spec
10825
10826 # The coded name of the library, if different from the real name.
10827 soname_spec=$lt_soname_spec
10828
10829 # Commands used to build and install an old-style archive.
10830 RANLIB=$lt_RANLIB
10831 old_archive_cmds=$lt_old_archive_cmds
10832 old_postinstall_cmds=$lt_old_postinstall_cmds
10833 old_postuninstall_cmds=$lt_old_postuninstall_cmds
10834
10835 # Create an old-style archive from a shared archive.
10836 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
10837
10838 # Create a temporary old-style archive to link instead of a shared archive.
10839 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
10840
10841 # Commands used to build and install a shared archive.
10842 archive_cmds=$lt_archive_cmds
10843 archive_expsym_cmds=$lt_archive_expsym_cmds
10844 postinstall_cmds=$lt_postinstall_cmds
10845 postuninstall_cmds=$lt_postuninstall_cmds
10846
10847 # Commands used to build a loadable module (assumed same as above if empty)
10848 module_cmds=$lt_module_cmds
10849 module_expsym_cmds=$lt_module_expsym_cmds
10850
10851 # Commands to strip libraries.
10852 old_striplib=$lt_old_striplib
10853 striplib=$lt_striplib
10854
10855 # Dependencies to place before the objects being linked to create a
10856 # shared library.
10857 predep_objects=$lt_predep_objects
10858
10859 # Dependencies to place after the objects being linked to create a
10860 # shared library.
10861 postdep_objects=$lt_postdep_objects
10862
10863 # Dependencies to place before the objects being linked to create a
10864 # shared library.
10865 predeps=$lt_predeps
10866
10867 # Dependencies to place after the objects being linked to create a
10868 # shared library.
10869 postdeps=$lt_postdeps
10870
10871 # The library search path used internally by the compiler when linking
10872 # a shared library.
10873 compiler_lib_search_path=$lt_compiler_lib_search_path
10874
10875 # Method to check whether dependent libraries are shared objects.
10876 deplibs_check_method=$lt_deplibs_check_method
10877
10878 # Command to use when deplibs_check_method == file_magic.
10879 file_magic_cmd=$lt_file_magic_cmd
10880
10881 # Flag that allows shared libraries with undefined symbols to be built.
10882 allow_undefined_flag=$lt_allow_undefined_flag
10883
10884 # Flag that forces no undefined symbols.
10885 no_undefined_flag=$lt_no_undefined_flag
10886
10887 # Commands used to finish a libtool library installation in a directory.
10888 finish_cmds=$lt_finish_cmds
10889
10890 # Same as above, but a single script fragment to be evaled but not shown.
10891 finish_eval=$lt_finish_eval
10892
10893 # Take the output of nm and produce a listing of raw symbols and C names.
10894 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
10895
10896 # Transform the output of nm in a proper C declaration
10897 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
10898
10899 # Transform the output of nm in a C name address pair
10900 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
10901
10902 # This is the shared library runtime path variable.
10903 runpath_var=$runpath_var
10904
10905 # This is the shared library path variable.
10906 shlibpath_var=$shlibpath_var
10907
10908 # Is shlibpath searched before the hard-coded library search path?
10909 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
10910
10911 # How to hardcode a shared library path into an executable.
10912 hardcode_action=$hardcode_action
10913
10914 # Whether we should hardcode library paths into libraries.
10915 hardcode_into_libs=$hardcode_into_libs
10916
10917 # Flag to hardcode \$libdir into a binary during linking.
10918 # This must work even if \$libdir does not exist.
10919 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
10920
10921 # If ld is used when linking, flag to hardcode \$libdir into
10922 # a binary during linking. This must work even if \$libdir does
10923 # not exist.
10924 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
10925
10926 # Whether we need a single -rpath flag with a separated argument.
10927 hardcode_libdir_separator=$lt_hardcode_libdir_separator
10928
10929 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
10930 # resulting binary.
10931 hardcode_direct=$hardcode_direct
10932
10933 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
10934 # resulting binary.
10935 hardcode_minus_L=$hardcode_minus_L
10936
10937 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
10938 # the resulting binary.
10939 hardcode_shlibpath_var=$hardcode_shlibpath_var
10940
10941 # Set to yes if building a shared library automatically hardcodes DIR into the library
10942 # and all subsequent libraries and executables linked against it.
10943 hardcode_automatic=$hardcode_automatic
10944
10945 # Variables whose values should be saved in libtool wrapper scripts and
10946 # restored at relink time.
10947 variables_saved_for_relink="$variables_saved_for_relink"
10948
10949 # Whether libtool must link a program against all its dependency libraries.
10950 link_all_deplibs=$link_all_deplibs
10951
10952 # Compile-time system search path for libraries
10953 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
10954
10955 # Run-time system search path for libraries
10956 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
10957
10958 # Fix the shell variable \$srcfile for the compiler.
10959 fix_srcfile_path="$fix_srcfile_path"
10960
10961 # Set to yes if exported symbols are required.
10962 always_export_symbols=$always_export_symbols
10963
10964 # The commands to list exported symbols.
10965 export_symbols_cmds=$lt_export_symbols_cmds
10966
10967 # The commands to extract the exported symbol list from a shared archive.
10968 extract_expsyms_cmds=$lt_extract_expsyms_cmds
10969
10970 # Symbols that should not be listed in the preloaded symbols.
10971 exclude_expsyms=$lt_exclude_expsyms
10972
10973 # Symbols that must always be exported.
10974 include_expsyms=$lt_include_expsyms
10975
10976 # ### END LIBTOOL CONFIG
10977
10978 __EOF__
10979
10980
10981   case $host_os in
10982   aix3*)
10983     cat <<\EOF >> "$cfgfile"
10984
10985 # AIX sometimes has problems with the GCC collect2 program.  For some
10986 # reason, if we set the COLLECT_NAMES environment variable, the problems
10987 # vanish in a puff of smoke.
10988 if test "X${COLLECT_NAMES+set}" != Xset; then
10989   COLLECT_NAMES=
10990   export COLLECT_NAMES
10991 fi
10992 EOF
10993     ;;
10994   esac
10995
10996   # We use sed instead of cat because bash on DJGPP gets confused if
10997   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
10998   # text mode, it properly converts lines to CR/LF.  This bash problem
10999   # is reportedly fixed, but why not run on old versions too?
11000   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
11001
11002   mv -f "$cfgfile" "$ofile" || \
11003     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
11004   chmod +x "$ofile"
11005
11006 else
11007   # If there is no Makefile yet, we rely on a make rule to execute
11008   # `config.status --recheck' to rerun these tests and create the
11009   # libtool script then.
11010   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
11011   if test -f "$ltmain_in"; then
11012     test -f Makefile && make "$ltmain"
11013   fi
11014 fi
11015
11016
11017 ac_ext=c
11018 ac_cpp='$CPP $CPPFLAGS'
11019 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11020 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11021 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11022
11023 CC="$lt_save_CC"
11024
11025
11026 # Check whether --with-tags or --without-tags was given.
11027 if test "${with_tags+set}" = set; then
11028   withval="$with_tags"
11029   tagnames="$withval"
11030 fi;
11031
11032 if test -f "$ltmain" && test -n "$tagnames"; then
11033   if test ! -f "${ofile}"; then
11034     { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
11035 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
11036   fi
11037
11038   if test -z "$LTCC"; then
11039     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
11040     if test -z "$LTCC"; then
11041       { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
11042 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
11043     else
11044       { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
11045 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
11046     fi
11047   fi
11048
11049   # Extract list of available tagged configurations in $ofile.
11050   # Note that this assumes the entire list is on one line.
11051   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
11052
11053   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
11054   for tagname in $tagnames; do
11055     IFS="$lt_save_ifs"
11056     # Check whether tagname contains only valid characters
11057     case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
11058     "") ;;
11059     *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
11060 echo "$as_me: error: invalid tag name: $tagname" >&2;}
11061    { (exit 1); exit 1; }; }
11062         ;;
11063     esac
11064
11065     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
11066     then
11067       { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
11068 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
11069    { (exit 1); exit 1; }; }
11070     fi
11071
11072     # Update the list of available tags.
11073     if test -n "$tagname"; then
11074       echo appending configuration tag \"$tagname\" to $ofile
11075
11076       case $tagname in
11077       CXX)
11078         if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
11079             ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
11080             (test "X$CXX" != "Xg++"))) ; then
11081           :
11082         else
11083           tagname=""
11084         fi
11085         ;;
11086
11087       F77)
11088         if test -n "$F77" && test "X$F77" != "Xno"; then
11089           :
11090         else
11091           tagname=""
11092         fi
11093         ;;
11094
11095       GCJ)
11096         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
11097           :
11098         else
11099           tagname=""
11100         fi
11101         ;;
11102
11103       RC)
11104
11105
11106
11107 # Source file extension for RC test sources.
11108 ac_ext=rc
11109
11110 # Object file extension for compiled RC test sources.
11111 objext=o
11112 objext_RC=$objext
11113
11114 # Code to be used in simple compile tests
11115 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
11116
11117 # Code to be used in simple link tests
11118 lt_simple_link_test_code="$lt_simple_compile_test_code"
11119
11120 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11121
11122 # If no C compiler was specified, use CC.
11123 LTCC=${LTCC-"$CC"}
11124
11125 # Allow CC to be a program name with arguments.
11126 compiler=$CC
11127
11128
11129 # save warnings/boilerplate of simple test code
11130 ac_outfile=conftest.$ac_objext
11131 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
11132 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11133 _lt_compiler_boilerplate=`cat conftest.err`
11134 $rm conftest*
11135
11136 ac_outfile=conftest.$ac_objext
11137 printf "$lt_simple_link_test_code" >conftest.$ac_ext
11138 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11139 _lt_linker_boilerplate=`cat conftest.err`
11140 $rm conftest*
11141
11142
11143 # Allow CC to be a program name with arguments.
11144 lt_save_CC="$CC"
11145 CC=${RC-"windres"}
11146 compiler=$CC
11147 compiler_RC=$CC
11148 for cc_temp in $compiler""; do
11149   case $cc_temp in
11150     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
11151     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
11152     \-*) ;;
11153     *) break;;
11154   esac
11155 done
11156 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
11157
11158 lt_cv_prog_compiler_c_o_RC=yes
11159
11160 # The else clause should only fire when bootstrapping the
11161 # libtool distribution, otherwise you forgot to ship ltmain.sh
11162 # with your package, and you will get complaints that there are
11163 # no rules to generate ltmain.sh.
11164 if test -f "$ltmain"; then
11165   # See if we are running on zsh, and set the options which allow our commands through
11166   # without removal of \ escapes.
11167   if test -n "${ZSH_VERSION+set}" ; then
11168     setopt NO_GLOB_SUBST
11169   fi
11170   # Now quote all the things that may contain metacharacters while being
11171   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11172   # variables and quote the copies for generation of the libtool script.
11173   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11174     SED SHELL STRIP \
11175     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11176     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11177     deplibs_check_method reload_flag reload_cmds need_locks \
11178     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11179     lt_cv_sys_global_symbol_to_c_name_address \
11180     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11181     old_postinstall_cmds old_postuninstall_cmds \
11182     compiler_RC \
11183     CC_RC \
11184     LD_RC \
11185     lt_prog_compiler_wl_RC \
11186     lt_prog_compiler_pic_RC \
11187     lt_prog_compiler_static_RC \
11188     lt_prog_compiler_no_builtin_flag_RC \
11189     export_dynamic_flag_spec_RC \
11190     thread_safe_flag_spec_RC \
11191     whole_archive_flag_spec_RC \
11192     enable_shared_with_static_runtimes_RC \
11193     old_archive_cmds_RC \
11194     old_archive_from_new_cmds_RC \
11195     predep_objects_RC \
11196     postdep_objects_RC \
11197     predeps_RC \
11198     postdeps_RC \
11199     compiler_lib_search_path_RC \
11200     archive_cmds_RC \
11201     archive_expsym_cmds_RC \
11202     postinstall_cmds_RC \
11203     postuninstall_cmds_RC \
11204     old_archive_from_expsyms_cmds_RC \
11205     allow_undefined_flag_RC \
11206     no_undefined_flag_RC \
11207     export_symbols_cmds_RC \
11208     hardcode_libdir_flag_spec_RC \
11209     hardcode_libdir_flag_spec_ld_RC \
11210     hardcode_libdir_separator_RC \
11211     hardcode_automatic_RC \
11212     module_cmds_RC \
11213     module_expsym_cmds_RC \
11214     lt_cv_prog_compiler_c_o_RC \
11215     exclude_expsyms_RC \
11216     include_expsyms_RC; do
11217
11218     case $var in
11219     old_archive_cmds_RC | \
11220     old_archive_from_new_cmds_RC | \
11221     archive_cmds_RC | \
11222     archive_expsym_cmds_RC | \
11223     module_cmds_RC | \
11224     module_expsym_cmds_RC | \
11225     old_archive_from_expsyms_cmds_RC | \
11226     export_symbols_cmds_RC | \
11227     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11228     postinstall_cmds | postuninstall_cmds | \
11229     old_postinstall_cmds | old_postuninstall_cmds | \
11230     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11231       # Double-quote double-evaled strings.
11232       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11233       ;;
11234     *)
11235       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11236       ;;
11237     esac
11238   done
11239
11240   case $lt_echo in
11241   *'\$0 --fallback-echo"')
11242     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11243     ;;
11244   esac
11245
11246 cfgfile="$ofile"
11247
11248   cat <<__EOF__ >> "$cfgfile"
11249 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
11250
11251 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11252
11253 # Shell to use when invoking shell scripts.
11254 SHELL=$lt_SHELL
11255
11256 # Whether or not to build shared libraries.
11257 build_libtool_libs=$enable_shared
11258
11259 # Whether or not to build static libraries.
11260 build_old_libs=$enable_static
11261
11262 # Whether or not to add -lc for building shared libraries.
11263 build_libtool_need_lc=$archive_cmds_need_lc_RC
11264
11265 # Whether or not to disallow shared libs when runtime libs are static
11266 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
11267
11268 # Whether or not to optimize for fast installation.
11269 fast_install=$enable_fast_install
11270
11271 # The host system.
11272 host_alias=$host_alias
11273 host=$host
11274 host_os=$host_os
11275
11276 # The build system.
11277 build_alias=$build_alias
11278 build=$build
11279 build_os=$build_os
11280
11281 # An echo program that does not interpret backslashes.
11282 echo=$lt_echo
11283
11284 # The archiver.
11285 AR=$lt_AR
11286 AR_FLAGS=$lt_AR_FLAGS
11287
11288 # A C compiler.
11289 LTCC=$lt_LTCC
11290
11291 # A language-specific compiler.
11292 CC=$lt_compiler_RC
11293
11294 # Is the compiler the GNU C compiler?
11295 with_gcc=$GCC_RC
11296
11297 # An ERE matcher.
11298 EGREP=$lt_EGREP
11299
11300 # The linker used to build libraries.
11301 LD=$lt_LD_RC
11302
11303 # Whether we need hard or soft links.
11304 LN_S=$lt_LN_S
11305
11306 # A BSD-compatible nm program.
11307 NM=$lt_NM
11308
11309 # A symbol stripping program
11310 STRIP=$lt_STRIP
11311
11312 # Used to examine libraries when file_magic_cmd begins "file"
11313 MAGIC_CMD=$MAGIC_CMD
11314
11315 # Used on cygwin: DLL creation program.
11316 DLLTOOL="$DLLTOOL"
11317
11318 # Used on cygwin: object dumper.
11319 OBJDUMP="$OBJDUMP"
11320
11321 # Used on cygwin: assembler.
11322 AS="$AS"
11323
11324 # The name of the directory that contains temporary libtool files.
11325 objdir=$objdir
11326
11327 # How to create reloadable object files.
11328 reload_flag=$lt_reload_flag
11329 reload_cmds=$lt_reload_cmds
11330
11331 # How to pass a linker flag through the compiler.
11332 wl=$lt_lt_prog_compiler_wl_RC
11333
11334 # Object file suffix (normally "o").
11335 objext="$ac_objext"
11336
11337 # Old archive suffix (normally "a").
11338 libext="$libext"
11339
11340 # Shared library suffix (normally ".so").
11341 shrext_cmds='$shrext_cmds'
11342
11343 # Executable file suffix (normally "").
11344 exeext="$exeext"
11345
11346 # Additional compiler flags for building library objects.
11347 pic_flag=$lt_lt_prog_compiler_pic_RC
11348 pic_mode=$pic_mode
11349
11350 # What is the maximum length of a command?
11351 max_cmd_len=$lt_cv_sys_max_cmd_len
11352
11353 # Does compiler simultaneously support -c and -o options?
11354 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
11355
11356 # Must we lock files when doing compilation?
11357 need_locks=$lt_need_locks
11358
11359 # Do we need the lib prefix for modules?
11360 need_lib_prefix=$need_lib_prefix
11361
11362 # Do we need a version for libraries?
11363 need_version=$need_version
11364
11365 # Whether dlopen is supported.
11366 dlopen_support=$enable_dlopen
11367
11368 # Whether dlopen of programs is supported.
11369 dlopen_self=$enable_dlopen_self
11370
11371 # Whether dlopen of statically linked programs is supported.
11372 dlopen_self_static=$enable_dlopen_self_static
11373
11374 # Compiler flag to prevent dynamic linking.
11375 link_static_flag=$lt_lt_prog_compiler_static_RC
11376
11377 # Compiler flag to turn off builtin functions.
11378 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
11379
11380 # Compiler flag to allow reflexive dlopens.
11381 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
11382
11383 # Compiler flag to generate shared objects directly from archives.
11384 whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
11385
11386 # Compiler flag to generate thread-safe objects.
11387 thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
11388
11389 # Library versioning type.
11390 version_type=$version_type
11391
11392 # Format of library name prefix.
11393 libname_spec=$lt_libname_spec
11394
11395 # List of archive names.  First name is the real one, the rest are links.
11396 # The last name is the one that the linker finds with -lNAME.
11397 library_names_spec=$lt_library_names_spec
11398
11399 # The coded name of the library, if different from the real name.
11400 soname_spec=$lt_soname_spec
11401
11402 # Commands used to build and install an old-style archive.
11403 RANLIB=$lt_RANLIB
11404 old_archive_cmds=$lt_old_archive_cmds_RC
11405 old_postinstall_cmds=$lt_old_postinstall_cmds
11406 old_postuninstall_cmds=$lt_old_postuninstall_cmds
11407
11408 # Create an old-style archive from a shared archive.
11409 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
11410
11411 # Create a temporary old-style archive to link instead of a shared archive.
11412 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
11413
11414 # Commands used to build and install a shared archive.
11415 archive_cmds=$lt_archive_cmds_RC
11416 archive_expsym_cmds=$lt_archive_expsym_cmds_RC
11417 postinstall_cmds=$lt_postinstall_cmds
11418 postuninstall_cmds=$lt_postuninstall_cmds
11419
11420 # Commands used to build a loadable module (assumed same as above if empty)
11421 module_cmds=$lt_module_cmds_RC
11422 module_expsym_cmds=$lt_module_expsym_cmds_RC
11423
11424 # Commands to strip libraries.
11425 old_striplib=$lt_old_striplib
11426 striplib=$lt_striplib
11427
11428 # Dependencies to place before the objects being linked to create a
11429 # shared library.
11430 predep_objects=$lt_predep_objects_RC
11431
11432 # Dependencies to place after the objects being linked to create a
11433 # shared library.
11434 postdep_objects=$lt_postdep_objects_RC
11435
11436 # Dependencies to place before the objects being linked to create a
11437 # shared library.
11438 predeps=$lt_predeps_RC
11439
11440 # Dependencies to place after the objects being linked to create a
11441 # shared library.
11442 postdeps=$lt_postdeps_RC
11443
11444 # The library search path used internally by the compiler when linking
11445 # a shared library.
11446 compiler_lib_search_path=$lt_compiler_lib_search_path_RC
11447
11448 # Method to check whether dependent libraries are shared objects.
11449 deplibs_check_method=$lt_deplibs_check_method
11450
11451 # Command to use when deplibs_check_method == file_magic.
11452 file_magic_cmd=$lt_file_magic_cmd
11453
11454 # Flag that allows shared libraries with undefined symbols to be built.
11455 allow_undefined_flag=$lt_allow_undefined_flag_RC
11456
11457 # Flag that forces no undefined symbols.
11458 no_undefined_flag=$lt_no_undefined_flag_RC
11459
11460 # Commands used to finish a libtool library installation in a directory.
11461 finish_cmds=$lt_finish_cmds
11462
11463 # Same as above, but a single script fragment to be evaled but not shown.
11464 finish_eval=$lt_finish_eval
11465
11466 # Take the output of nm and produce a listing of raw symbols and C names.
11467 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
11468
11469 # Transform the output of nm in a proper C declaration
11470 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
11471
11472 # Transform the output of nm in a C name address pair
11473 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
11474
11475 # This is the shared library runtime path variable.
11476 runpath_var=$runpath_var
11477
11478 # This is the shared library path variable.
11479 shlibpath_var=$shlibpath_var
11480
11481 # Is shlibpath searched before the hard-coded library search path?
11482 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
11483
11484 # How to hardcode a shared library path into an executable.
11485 hardcode_action=$hardcode_action_RC
11486
11487 # Whether we should hardcode library paths into libraries.
11488 hardcode_into_libs=$hardcode_into_libs
11489
11490 # Flag to hardcode \$libdir into a binary during linking.
11491 # This must work even if \$libdir does not exist.
11492 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
11493
11494 # If ld is used when linking, flag to hardcode \$libdir into
11495 # a binary during linking. This must work even if \$libdir does
11496 # not exist.
11497 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
11498
11499 # Whether we need a single -rpath flag with a separated argument.
11500 hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
11501
11502 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
11503 # resulting binary.
11504 hardcode_direct=$hardcode_direct_RC
11505
11506 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
11507 # resulting binary.
11508 hardcode_minus_L=$hardcode_minus_L_RC
11509
11510 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
11511 # the resulting binary.
11512 hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
11513
11514 # Set to yes if building a shared library automatically hardcodes DIR into the library
11515 # and all subsequent libraries and executables linked against it.
11516 hardcode_automatic=$hardcode_automatic_RC
11517
11518 # Variables whose values should be saved in libtool wrapper scripts and
11519 # restored at relink time.
11520 variables_saved_for_relink="$variables_saved_for_relink"
11521
11522 # Whether libtool must link a program against all its dependency libraries.
11523 link_all_deplibs=$link_all_deplibs_RC
11524
11525 # Compile-time system search path for libraries
11526 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
11527
11528 # Run-time system search path for libraries
11529 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
11530
11531 # Fix the shell variable \$srcfile for the compiler.
11532 fix_srcfile_path="$fix_srcfile_path_RC"
11533
11534 # Set to yes if exported symbols are required.
11535 always_export_symbols=$always_export_symbols_RC
11536
11537 # The commands to list exported symbols.
11538 export_symbols_cmds=$lt_export_symbols_cmds_RC
11539
11540 # The commands to extract the exported symbol list from a shared archive.
11541 extract_expsyms_cmds=$lt_extract_expsyms_cmds
11542
11543 # Symbols that should not be listed in the preloaded symbols.
11544 exclude_expsyms=$lt_exclude_expsyms_RC
11545
11546 # Symbols that must always be exported.
11547 include_expsyms=$lt_include_expsyms_RC
11548
11549 # ### END LIBTOOL TAG CONFIG: $tagname
11550
11551 __EOF__
11552
11553
11554 else
11555   # If there is no Makefile yet, we rely on a make rule to execute
11556   # `config.status --recheck' to rerun these tests and create the
11557   # libtool script then.
11558   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
11559   if test -f "$ltmain_in"; then
11560     test -f Makefile && make "$ltmain"
11561   fi
11562 fi
11563
11564
11565 ac_ext=c
11566 ac_cpp='$CPP $CPPFLAGS'
11567 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11568 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11569 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11570
11571 CC="$lt_save_CC"
11572
11573         ;;
11574
11575       *)
11576         { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
11577 echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
11578    { (exit 1); exit 1; }; }
11579         ;;
11580       esac
11581
11582       # Append the new tag name to the list of available tags.
11583       if test -n "$tagname" ; then
11584       available_tags="$available_tags $tagname"
11585     fi
11586     fi
11587   done
11588   IFS="$lt_save_ifs"
11589
11590   # Now substitute the updated list of available tags.
11591   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
11592     mv "${ofile}T" "$ofile"
11593     chmod +x "$ofile"
11594   else
11595     rm -f "${ofile}T"
11596     { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
11597 echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
11598    { (exit 1); exit 1; }; }
11599   fi
11600 fi
11601
11602
11603
11604 # This can be used to rebuild libtool when needed
11605 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
11606
11607 # Always use our own libtool.
11608 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
11609
11610 # Prevent multiple expansion
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621 ol_link_perl=no
11622 if test $ol_enable_perl != no ; then
11623         # Extract the first word of "perl", so it can be a program name with args.
11624 set dummy perl; ac_word=$2
11625 echo "$as_me:$LINENO: checking for $ac_word" >&5
11626 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11627 if test "${ac_cv_path_PERLBIN+set}" = set; then
11628   echo $ECHO_N "(cached) $ECHO_C" >&6
11629 else
11630   case $PERLBIN in
11631   [\\/]* | ?:[\\/]*)
11632   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
11633   ;;
11634   *)
11635   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11636 for as_dir in $PATH
11637 do
11638   IFS=$as_save_IFS
11639   test -z "$as_dir" && as_dir=.
11640   for ac_exec_ext in '' $ac_executable_extensions; do
11641   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11642     ac_cv_path_PERLBIN="$as_dir/$ac_word$ac_exec_ext"
11643     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11644     break 2
11645   fi
11646 done
11647 done
11648
11649   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
11650   ;;
11651 esac
11652 fi
11653 PERLBIN=$ac_cv_path_PERLBIN
11654
11655 if test -n "$PERLBIN"; then
11656   echo "$as_me:$LINENO: result: $PERLBIN" >&5
11657 echo "${ECHO_T}$PERLBIN" >&6
11658 else
11659   echo "$as_me:$LINENO: result: no" >&5
11660 echo "${ECHO_T}no" >&6
11661 fi
11662
11663
11664         if test "no$PERLBIN" = "no" ; then
11665                 if test $ol_enable_perl = yes ; then
11666                         { { echo "$as_me:$LINENO: error: could not locate perl" >&5
11667 echo "$as_me: error: could not locate perl" >&2;}
11668    { (exit 1); exit 1; }; }
11669                 fi
11670
11671         else
11672                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
11673                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
11674
11675                 if test x"$ol_enable_perl" = "xyes" ; then
11676                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
11677                 else
11678                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
11679                 fi
11680                                 ol_link_perl=yes
11681         fi
11682 fi
11683
11684 ac_ext=c
11685 ac_cpp='$CPP $CPPFLAGS'
11686 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11687 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11688 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11689 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
11690 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
11691 # On Suns, sometimes $CPP names a directory.
11692 if test -n "$CPP" && test -d "$CPP"; then
11693   CPP=
11694 fi
11695 if test -z "$CPP"; then
11696   if test "${ac_cv_prog_CPP+set}" = set; then
11697   echo $ECHO_N "(cached) $ECHO_C" >&6
11698 else
11699       # Double quotes because CPP needs to be expanded
11700     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
11701     do
11702       ac_preproc_ok=false
11703 for ac_c_preproc_warn_flag in '' yes
11704 do
11705   # Use a header file that comes with gcc, so configuring glibc
11706   # with a fresh cross-compiler works.
11707   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11708   # <limits.h> exists even on freestanding compilers.
11709   # On the NeXT, cc -E runs the code through the compiler's parser,
11710   # not just through cpp. "Syntax error" is here to catch this case.
11711   cat >conftest.$ac_ext <<_ACEOF
11712 /* confdefs.h.  */
11713 _ACEOF
11714 cat confdefs.h >>conftest.$ac_ext
11715 cat >>conftest.$ac_ext <<_ACEOF
11716 /* end confdefs.h.  */
11717 #ifdef __STDC__
11718 # include <limits.h>
11719 #else
11720 # include <assert.h>
11721 #endif
11722                      Syntax error
11723 _ACEOF
11724 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11725   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11726   ac_status=$?
11727   grep -v '^ *+' conftest.er1 >conftest.err
11728   rm -f conftest.er1
11729   cat conftest.err >&5
11730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11731   (exit $ac_status); } >/dev/null; then
11732   if test -s conftest.err; then
11733     ac_cpp_err=$ac_c_preproc_warn_flag
11734     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11735   else
11736     ac_cpp_err=
11737   fi
11738 else
11739   ac_cpp_err=yes
11740 fi
11741 if test -z "$ac_cpp_err"; then
11742   :
11743 else
11744   echo "$as_me: failed program was:" >&5
11745 sed 's/^/| /' conftest.$ac_ext >&5
11746
11747   # Broken: fails on valid input.
11748 continue
11749 fi
11750 rm -f conftest.err conftest.$ac_ext
11751
11752   # OK, works on sane cases.  Now check whether non-existent headers
11753   # can be detected and how.
11754   cat >conftest.$ac_ext <<_ACEOF
11755 /* confdefs.h.  */
11756 _ACEOF
11757 cat confdefs.h >>conftest.$ac_ext
11758 cat >>conftest.$ac_ext <<_ACEOF
11759 /* end confdefs.h.  */
11760 #include <ac_nonexistent.h>
11761 _ACEOF
11762 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11763   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11764   ac_status=$?
11765   grep -v '^ *+' conftest.er1 >conftest.err
11766   rm -f conftest.er1
11767   cat conftest.err >&5
11768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11769   (exit $ac_status); } >/dev/null; then
11770   if test -s conftest.err; then
11771     ac_cpp_err=$ac_c_preproc_warn_flag
11772     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11773   else
11774     ac_cpp_err=
11775   fi
11776 else
11777   ac_cpp_err=yes
11778 fi
11779 if test -z "$ac_cpp_err"; then
11780   # Broken: success on invalid input.
11781 continue
11782 else
11783   echo "$as_me: failed program was:" >&5
11784 sed 's/^/| /' conftest.$ac_ext >&5
11785
11786   # Passes both tests.
11787 ac_preproc_ok=:
11788 break
11789 fi
11790 rm -f conftest.err conftest.$ac_ext
11791
11792 done
11793 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
11794 rm -f conftest.err conftest.$ac_ext
11795 if $ac_preproc_ok; then
11796   break
11797 fi
11798
11799     done
11800     ac_cv_prog_CPP=$CPP
11801
11802 fi
11803   CPP=$ac_cv_prog_CPP
11804 else
11805   ac_cv_prog_CPP=$CPP
11806 fi
11807 echo "$as_me:$LINENO: result: $CPP" >&5
11808 echo "${ECHO_T}$CPP" >&6
11809 ac_preproc_ok=false
11810 for ac_c_preproc_warn_flag in '' yes
11811 do
11812   # Use a header file that comes with gcc, so configuring glibc
11813   # with a fresh cross-compiler works.
11814   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11815   # <limits.h> exists even on freestanding compilers.
11816   # On the NeXT, cc -E runs the code through the compiler's parser,
11817   # not just through cpp. "Syntax error" is here to catch this case.
11818   cat >conftest.$ac_ext <<_ACEOF
11819 /* confdefs.h.  */
11820 _ACEOF
11821 cat confdefs.h >>conftest.$ac_ext
11822 cat >>conftest.$ac_ext <<_ACEOF
11823 /* end confdefs.h.  */
11824 #ifdef __STDC__
11825 # include <limits.h>
11826 #else
11827 # include <assert.h>
11828 #endif
11829                      Syntax error
11830 _ACEOF
11831 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11832   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11833   ac_status=$?
11834   grep -v '^ *+' conftest.er1 >conftest.err
11835   rm -f conftest.er1
11836   cat conftest.err >&5
11837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11838   (exit $ac_status); } >/dev/null; then
11839   if test -s conftest.err; then
11840     ac_cpp_err=$ac_c_preproc_warn_flag
11841     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11842   else
11843     ac_cpp_err=
11844   fi
11845 else
11846   ac_cpp_err=yes
11847 fi
11848 if test -z "$ac_cpp_err"; then
11849   :
11850 else
11851   echo "$as_me: failed program was:" >&5
11852 sed 's/^/| /' conftest.$ac_ext >&5
11853
11854   # Broken: fails on valid input.
11855 continue
11856 fi
11857 rm -f conftest.err conftest.$ac_ext
11858
11859   # OK, works on sane cases.  Now check whether non-existent headers
11860   # can be detected and how.
11861   cat >conftest.$ac_ext <<_ACEOF
11862 /* confdefs.h.  */
11863 _ACEOF
11864 cat confdefs.h >>conftest.$ac_ext
11865 cat >>conftest.$ac_ext <<_ACEOF
11866 /* end confdefs.h.  */
11867 #include <ac_nonexistent.h>
11868 _ACEOF
11869 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11870   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11871   ac_status=$?
11872   grep -v '^ *+' conftest.er1 >conftest.err
11873   rm -f conftest.er1
11874   cat conftest.err >&5
11875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11876   (exit $ac_status); } >/dev/null; then
11877   if test -s conftest.err; then
11878     ac_cpp_err=$ac_c_preproc_warn_flag
11879     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11880   else
11881     ac_cpp_err=
11882   fi
11883 else
11884   ac_cpp_err=yes
11885 fi
11886 if test -z "$ac_cpp_err"; then
11887   # Broken: success on invalid input.
11888 continue
11889 else
11890   echo "$as_me: failed program was:" >&5
11891 sed 's/^/| /' conftest.$ac_ext >&5
11892
11893   # Passes both tests.
11894 ac_preproc_ok=:
11895 break
11896 fi
11897 rm -f conftest.err conftest.$ac_ext
11898
11899 done
11900 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
11901 rm -f conftest.err conftest.$ac_ext
11902 if $ac_preproc_ok; then
11903   :
11904 else
11905   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
11906 See \`config.log' for more details." >&5
11907 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
11908 See \`config.log' for more details." >&2;}
11909    { (exit 1); exit 1; }; }
11910 fi
11911
11912 ac_ext=c
11913 ac_cpp='$CPP $CPPFLAGS'
11914 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11915 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11916 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11917
11918
11919 case $host_os in
11920   *mingw32* ) ac_cv_mingw32=yes ;;
11921   *cygwin* ) ac_cv_cygwin=yes ;;
11922 esac
11923
11924
11925
11926
11927 cat >>confdefs.h <<_ACEOF
11928 #define EXEEXT "${EXEEXT}"
11929 _ACEOF
11930
11931
11932 echo "$as_me:$LINENO: checking for be_app in -lbe" >&5
11933 echo $ECHO_N "checking for be_app in -lbe... $ECHO_C" >&6
11934 if test "${ac_cv_lib_be_be_app+set}" = set; then
11935   echo $ECHO_N "(cached) $ECHO_C" >&6
11936 else
11937   ac_check_lib_save_LIBS=$LIBS
11938 LIBS="-lbe -lroot -lnet $LIBS"
11939 cat >conftest.$ac_ext <<_ACEOF
11940 /* confdefs.h.  */
11941 _ACEOF
11942 cat confdefs.h >>conftest.$ac_ext
11943 cat >>conftest.$ac_ext <<_ACEOF
11944 /* end confdefs.h.  */
11945
11946 /* Override any gcc2 internal prototype to avoid an error.  */
11947 #ifdef __cplusplus
11948 extern "C"
11949 #endif
11950 /* We use char because int might match the return type of a gcc2
11951    builtin and then its argument prototype would still apply.  */
11952 char be_app ();
11953 int
11954 main ()
11955 {
11956 be_app ();
11957   ;
11958   return 0;
11959 }
11960 _ACEOF
11961 rm -f conftest.$ac_objext conftest$ac_exeext
11962 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11963   (eval $ac_link) 2>conftest.er1
11964   ac_status=$?
11965   grep -v '^ *+' conftest.er1 >conftest.err
11966   rm -f conftest.er1
11967   cat conftest.err >&5
11968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11969   (exit $ac_status); } &&
11970          { ac_try='test -z "$ac_c_werror_flag"
11971                          || test ! -s conftest.err'
11972   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11973   (eval $ac_try) 2>&5
11974   ac_status=$?
11975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11976   (exit $ac_status); }; } &&
11977          { ac_try='test -s conftest$ac_exeext'
11978   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11979   (eval $ac_try) 2>&5
11980   ac_status=$?
11981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11982   (exit $ac_status); }; }; then
11983   ac_cv_lib_be_be_app=yes
11984 else
11985   echo "$as_me: failed program was:" >&5
11986 sed 's/^/| /' conftest.$ac_ext >&5
11987
11988 ac_cv_lib_be_be_app=no
11989 fi
11990 rm -f conftest.err conftest.$ac_objext \
11991       conftest$ac_exeext conftest.$ac_ext
11992 LIBS=$ac_check_lib_save_LIBS
11993 fi
11994 echo "$as_me:$LINENO: result: $ac_cv_lib_be_be_app" >&5
11995 echo "${ECHO_T}$ac_cv_lib_be_be_app" >&6
11996 if test $ac_cv_lib_be_be_app = yes; then
11997   LIBS="$LIBS -lbe -lroot -lnet"
11998 else
11999   :
12000 fi
12001
12002
12003 ac_ext=c
12004 ac_cpp='$CPP $CPPFLAGS'
12005 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12006 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12007 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12008 if test -n "$ac_tool_prefix"; then
12009   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
12010 set dummy ${ac_tool_prefix}gcc; ac_word=$2
12011 echo "$as_me:$LINENO: checking for $ac_word" >&5
12012 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12013 if test "${ac_cv_prog_CC+set}" = set; then
12014   echo $ECHO_N "(cached) $ECHO_C" >&6
12015 else
12016   if test -n "$CC"; then
12017   ac_cv_prog_CC="$CC" # Let the user override the test.
12018 else
12019 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12020 for as_dir in $PATH
12021 do
12022   IFS=$as_save_IFS
12023   test -z "$as_dir" && as_dir=.
12024   for ac_exec_ext in '' $ac_executable_extensions; do
12025   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12026     ac_cv_prog_CC="${ac_tool_prefix}gcc"
12027     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12028     break 2
12029   fi
12030 done
12031 done
12032
12033 fi
12034 fi
12035 CC=$ac_cv_prog_CC
12036 if test -n "$CC"; then
12037   echo "$as_me:$LINENO: result: $CC" >&5
12038 echo "${ECHO_T}$CC" >&6
12039 else
12040   echo "$as_me:$LINENO: result: no" >&5
12041 echo "${ECHO_T}no" >&6
12042 fi
12043
12044 fi
12045 if test -z "$ac_cv_prog_CC"; then
12046   ac_ct_CC=$CC
12047   # Extract the first word of "gcc", so it can be a program name with args.
12048 set dummy gcc; ac_word=$2
12049 echo "$as_me:$LINENO: checking for $ac_word" >&5
12050 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12051 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
12052   echo $ECHO_N "(cached) $ECHO_C" >&6
12053 else
12054   if test -n "$ac_ct_CC"; then
12055   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12056 else
12057 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12058 for as_dir in $PATH
12059 do
12060   IFS=$as_save_IFS
12061   test -z "$as_dir" && as_dir=.
12062   for ac_exec_ext in '' $ac_executable_extensions; do
12063   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12064     ac_cv_prog_ac_ct_CC="gcc"
12065     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12066     break 2
12067   fi
12068 done
12069 done
12070
12071 fi
12072 fi
12073 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12074 if test -n "$ac_ct_CC"; then
12075   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
12076 echo "${ECHO_T}$ac_ct_CC" >&6
12077 else
12078   echo "$as_me:$LINENO: result: no" >&5
12079 echo "${ECHO_T}no" >&6
12080 fi
12081
12082   CC=$ac_ct_CC
12083 else
12084   CC="$ac_cv_prog_CC"
12085 fi
12086
12087 if test -z "$CC"; then
12088   if test -n "$ac_tool_prefix"; then
12089   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
12090 set dummy ${ac_tool_prefix}cc; ac_word=$2
12091 echo "$as_me:$LINENO: checking for $ac_word" >&5
12092 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12093 if test "${ac_cv_prog_CC+set}" = set; then
12094   echo $ECHO_N "(cached) $ECHO_C" >&6
12095 else
12096   if test -n "$CC"; then
12097   ac_cv_prog_CC="$CC" # Let the user override the test.
12098 else
12099 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12100 for as_dir in $PATH
12101 do
12102   IFS=$as_save_IFS
12103   test -z "$as_dir" && as_dir=.
12104   for ac_exec_ext in '' $ac_executable_extensions; do
12105   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12106     ac_cv_prog_CC="${ac_tool_prefix}cc"
12107     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12108     break 2
12109   fi
12110 done
12111 done
12112
12113 fi
12114 fi
12115 CC=$ac_cv_prog_CC
12116 if test -n "$CC"; then
12117   echo "$as_me:$LINENO: result: $CC" >&5
12118 echo "${ECHO_T}$CC" >&6
12119 else
12120   echo "$as_me:$LINENO: result: no" >&5
12121 echo "${ECHO_T}no" >&6
12122 fi
12123
12124 fi
12125 if test -z "$ac_cv_prog_CC"; then
12126   ac_ct_CC=$CC
12127   # Extract the first word of "cc", so it can be a program name with args.
12128 set dummy cc; ac_word=$2
12129 echo "$as_me:$LINENO: checking for $ac_word" >&5
12130 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12131 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
12132   echo $ECHO_N "(cached) $ECHO_C" >&6
12133 else
12134   if test -n "$ac_ct_CC"; then
12135   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12136 else
12137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12138 for as_dir in $PATH
12139 do
12140   IFS=$as_save_IFS
12141   test -z "$as_dir" && as_dir=.
12142   for ac_exec_ext in '' $ac_executable_extensions; do
12143   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12144     ac_cv_prog_ac_ct_CC="cc"
12145     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12146     break 2
12147   fi
12148 done
12149 done
12150
12151 fi
12152 fi
12153 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12154 if test -n "$ac_ct_CC"; then
12155   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
12156 echo "${ECHO_T}$ac_ct_CC" >&6
12157 else
12158   echo "$as_me:$LINENO: result: no" >&5
12159 echo "${ECHO_T}no" >&6
12160 fi
12161
12162   CC=$ac_ct_CC
12163 else
12164   CC="$ac_cv_prog_CC"
12165 fi
12166
12167 fi
12168 if test -z "$CC"; then
12169   # Extract the first word of "cc", so it can be a program name with args.
12170 set dummy cc; ac_word=$2
12171 echo "$as_me:$LINENO: checking for $ac_word" >&5
12172 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12173 if test "${ac_cv_prog_CC+set}" = set; then
12174   echo $ECHO_N "(cached) $ECHO_C" >&6
12175 else
12176   if test -n "$CC"; then
12177   ac_cv_prog_CC="$CC" # Let the user override the test.
12178 else
12179   ac_prog_rejected=no
12180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12181 for as_dir in $PATH
12182 do
12183   IFS=$as_save_IFS
12184   test -z "$as_dir" && as_dir=.
12185   for ac_exec_ext in '' $ac_executable_extensions; do
12186   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12187     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
12188        ac_prog_rejected=yes
12189        continue
12190      fi
12191     ac_cv_prog_CC="cc"
12192     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12193     break 2
12194   fi
12195 done
12196 done
12197
12198 if test $ac_prog_rejected = yes; then
12199   # We found a bogon in the path, so make sure we never use it.
12200   set dummy $ac_cv_prog_CC
12201   shift
12202   if test $# != 0; then
12203     # We chose a different compiler from the bogus one.
12204     # However, it has the same basename, so the bogon will be chosen
12205     # first if we set CC to just the basename; use the full file name.
12206     shift
12207     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
12208   fi
12209 fi
12210 fi
12211 fi
12212 CC=$ac_cv_prog_CC
12213 if test -n "$CC"; then
12214   echo "$as_me:$LINENO: result: $CC" >&5
12215 echo "${ECHO_T}$CC" >&6
12216 else
12217   echo "$as_me:$LINENO: result: no" >&5
12218 echo "${ECHO_T}no" >&6
12219 fi
12220
12221 fi
12222 if test -z "$CC"; then
12223   if test -n "$ac_tool_prefix"; then
12224   for ac_prog in cl
12225   do
12226     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12227 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12228 echo "$as_me:$LINENO: checking for $ac_word" >&5
12229 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12230 if test "${ac_cv_prog_CC+set}" = set; then
12231   echo $ECHO_N "(cached) $ECHO_C" >&6
12232 else
12233   if test -n "$CC"; then
12234   ac_cv_prog_CC="$CC" # Let the user override the test.
12235 else
12236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12237 for as_dir in $PATH
12238 do
12239   IFS=$as_save_IFS
12240   test -z "$as_dir" && as_dir=.
12241   for ac_exec_ext in '' $ac_executable_extensions; do
12242   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12243     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
12244     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12245     break 2
12246   fi
12247 done
12248 done
12249
12250 fi
12251 fi
12252 CC=$ac_cv_prog_CC
12253 if test -n "$CC"; then
12254   echo "$as_me:$LINENO: result: $CC" >&5
12255 echo "${ECHO_T}$CC" >&6
12256 else
12257   echo "$as_me:$LINENO: result: no" >&5
12258 echo "${ECHO_T}no" >&6
12259 fi
12260
12261     test -n "$CC" && break
12262   done
12263 fi
12264 if test -z "$CC"; then
12265   ac_ct_CC=$CC
12266   for ac_prog in cl
12267 do
12268   # Extract the first word of "$ac_prog", so it can be a program name with args.
12269 set dummy $ac_prog; ac_word=$2
12270 echo "$as_me:$LINENO: checking for $ac_word" >&5
12271 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12272 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
12273   echo $ECHO_N "(cached) $ECHO_C" >&6
12274 else
12275   if test -n "$ac_ct_CC"; then
12276   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12277 else
12278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12279 for as_dir in $PATH
12280 do
12281   IFS=$as_save_IFS
12282   test -z "$as_dir" && as_dir=.
12283   for ac_exec_ext in '' $ac_executable_extensions; do
12284   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12285     ac_cv_prog_ac_ct_CC="$ac_prog"
12286     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12287     break 2
12288   fi
12289 done
12290 done
12291
12292 fi
12293 fi
12294 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12295 if test -n "$ac_ct_CC"; then
12296   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
12297 echo "${ECHO_T}$ac_ct_CC" >&6
12298 else
12299   echo "$as_me:$LINENO: result: no" >&5
12300 echo "${ECHO_T}no" >&6
12301 fi
12302
12303   test -n "$ac_ct_CC" && break
12304 done
12305
12306   CC=$ac_ct_CC
12307 fi
12308
12309 fi
12310
12311
12312 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
12313 See \`config.log' for more details." >&5
12314 echo "$as_me: error: no acceptable C compiler found in \$PATH
12315 See \`config.log' for more details." >&2;}
12316    { (exit 1); exit 1; }; }
12317
12318 # Provide some information about the compiler.
12319 echo "$as_me:$LINENO:" \
12320      "checking for C compiler version" >&5
12321 ac_compiler=`set X $ac_compile; echo $2`
12322 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
12323   (eval $ac_compiler --version </dev/null >&5) 2>&5
12324   ac_status=$?
12325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12326   (exit $ac_status); }
12327 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
12328   (eval $ac_compiler -v </dev/null >&5) 2>&5
12329   ac_status=$?
12330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12331   (exit $ac_status); }
12332 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
12333   (eval $ac_compiler -V </dev/null >&5) 2>&5
12334   ac_status=$?
12335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12336   (exit $ac_status); }
12337
12338 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
12339 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
12340 if test "${ac_cv_c_compiler_gnu+set}" = set; then
12341   echo $ECHO_N "(cached) $ECHO_C" >&6
12342 else
12343   cat >conftest.$ac_ext <<_ACEOF
12344 /* confdefs.h.  */
12345 _ACEOF
12346 cat confdefs.h >>conftest.$ac_ext
12347 cat >>conftest.$ac_ext <<_ACEOF
12348 /* end confdefs.h.  */
12349
12350 int
12351 main ()
12352 {
12353 #ifndef __GNUC__
12354        choke me
12355 #endif
12356
12357   ;
12358   return 0;
12359 }
12360 _ACEOF
12361 rm -f conftest.$ac_objext
12362 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12363   (eval $ac_compile) 2>conftest.er1
12364   ac_status=$?
12365   grep -v '^ *+' conftest.er1 >conftest.err
12366   rm -f conftest.er1
12367   cat conftest.err >&5
12368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12369   (exit $ac_status); } &&
12370          { ac_try='test -z "$ac_c_werror_flag"
12371                          || test ! -s conftest.err'
12372   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12373   (eval $ac_try) 2>&5
12374   ac_status=$?
12375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12376   (exit $ac_status); }; } &&
12377          { ac_try='test -s conftest.$ac_objext'
12378   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12379   (eval $ac_try) 2>&5
12380   ac_status=$?
12381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12382   (exit $ac_status); }; }; then
12383   ac_compiler_gnu=yes
12384 else
12385   echo "$as_me: failed program was:" >&5
12386 sed 's/^/| /' conftest.$ac_ext >&5
12387
12388 ac_compiler_gnu=no
12389 fi
12390 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12391 ac_cv_c_compiler_gnu=$ac_compiler_gnu
12392
12393 fi
12394 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
12395 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
12396 GCC=`test $ac_compiler_gnu = yes && echo yes`
12397 ac_test_CFLAGS=${CFLAGS+set}
12398 ac_save_CFLAGS=$CFLAGS
12399 CFLAGS="-g"
12400 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
12401 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
12402 if test "${ac_cv_prog_cc_g+set}" = set; then
12403   echo $ECHO_N "(cached) $ECHO_C" >&6
12404 else
12405   cat >conftest.$ac_ext <<_ACEOF
12406 /* confdefs.h.  */
12407 _ACEOF
12408 cat confdefs.h >>conftest.$ac_ext
12409 cat >>conftest.$ac_ext <<_ACEOF
12410 /* end confdefs.h.  */
12411
12412 int
12413 main ()
12414 {
12415
12416   ;
12417   return 0;
12418 }
12419 _ACEOF
12420 rm -f conftest.$ac_objext
12421 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12422   (eval $ac_compile) 2>conftest.er1
12423   ac_status=$?
12424   grep -v '^ *+' conftest.er1 >conftest.err
12425   rm -f conftest.er1
12426   cat conftest.err >&5
12427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12428   (exit $ac_status); } &&
12429          { ac_try='test -z "$ac_c_werror_flag"
12430                          || test ! -s conftest.err'
12431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12432   (eval $ac_try) 2>&5
12433   ac_status=$?
12434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12435   (exit $ac_status); }; } &&
12436          { ac_try='test -s conftest.$ac_objext'
12437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12438   (eval $ac_try) 2>&5
12439   ac_status=$?
12440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12441   (exit $ac_status); }; }; then
12442   ac_cv_prog_cc_g=yes
12443 else
12444   echo "$as_me: failed program was:" >&5
12445 sed 's/^/| /' conftest.$ac_ext >&5
12446
12447 ac_cv_prog_cc_g=no
12448 fi
12449 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12450 fi
12451 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
12452 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
12453 if test "$ac_test_CFLAGS" = set; then
12454   CFLAGS=$ac_save_CFLAGS
12455 elif test $ac_cv_prog_cc_g = yes; then
12456   if test "$GCC" = yes; then
12457     CFLAGS="-g -O2"
12458   else
12459     CFLAGS="-g"
12460   fi
12461 else
12462   if test "$GCC" = yes; then
12463     CFLAGS="-O2"
12464   else
12465     CFLAGS=
12466   fi
12467 fi
12468 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
12469 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
12470 if test "${ac_cv_prog_cc_stdc+set}" = set; then
12471   echo $ECHO_N "(cached) $ECHO_C" >&6
12472 else
12473   ac_cv_prog_cc_stdc=no
12474 ac_save_CC=$CC
12475 cat >conftest.$ac_ext <<_ACEOF
12476 /* confdefs.h.  */
12477 _ACEOF
12478 cat confdefs.h >>conftest.$ac_ext
12479 cat >>conftest.$ac_ext <<_ACEOF
12480 /* end confdefs.h.  */
12481 #include <stdarg.h>
12482 #include <stdio.h>
12483 #include <sys/types.h>
12484 #include <sys/stat.h>
12485 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12486 struct buf { int x; };
12487 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12488 static char *e (p, i)
12489      char **p;
12490      int i;
12491 {
12492   return p[i];
12493 }
12494 static char *f (char * (*g) (char **, int), char **p, ...)
12495 {
12496   char *s;
12497   va_list v;
12498   va_start (v,p);
12499   s = g (p, va_arg (v,int));
12500   va_end (v);
12501   return s;
12502 }
12503
12504 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
12505    function prototypes and stuff, but not '\xHH' hex character constants.
12506    These don't provoke an error unfortunately, instead are silently treated
12507    as 'x'.  The following induces an error, until -std1 is added to get
12508    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
12509    array size at least.  It's necessary to write '\x00'==0 to get something
12510    that's true only with -std1.  */
12511 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
12512
12513 int test (int i, double x);
12514 struct s1 {int (*f) (int a);};
12515 struct s2 {int (*f) (double a);};
12516 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12517 int argc;
12518 char **argv;
12519 int
12520 main ()
12521 {
12522 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12523   ;
12524   return 0;
12525 }
12526 _ACEOF
12527 # Don't try gcc -ansi; that turns off useful extensions and
12528 # breaks some systems' header files.
12529 # AIX                   -qlanglvl=ansi
12530 # Ultrix and OSF/1      -std1
12531 # HP-UX 10.20 and later -Ae
12532 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12533 # SVR4                  -Xc -D__EXTENSIONS__
12534 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12535 do
12536   CC="$ac_save_CC $ac_arg"
12537   rm -f conftest.$ac_objext
12538 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12539   (eval $ac_compile) 2>conftest.er1
12540   ac_status=$?
12541   grep -v '^ *+' conftest.er1 >conftest.err
12542   rm -f conftest.er1
12543   cat conftest.err >&5
12544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12545   (exit $ac_status); } &&
12546          { ac_try='test -z "$ac_c_werror_flag"
12547                          || test ! -s conftest.err'
12548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12549   (eval $ac_try) 2>&5
12550   ac_status=$?
12551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12552   (exit $ac_status); }; } &&
12553          { ac_try='test -s conftest.$ac_objext'
12554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12555   (eval $ac_try) 2>&5
12556   ac_status=$?
12557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12558   (exit $ac_status); }; }; then
12559   ac_cv_prog_cc_stdc=$ac_arg
12560 break
12561 else
12562   echo "$as_me: failed program was:" >&5
12563 sed 's/^/| /' conftest.$ac_ext >&5
12564
12565 fi
12566 rm -f conftest.err conftest.$ac_objext
12567 done
12568 rm -f conftest.$ac_ext conftest.$ac_objext
12569 CC=$ac_save_CC
12570
12571 fi
12572
12573 case "x$ac_cv_prog_cc_stdc" in
12574   x|xno)
12575     echo "$as_me:$LINENO: result: none needed" >&5
12576 echo "${ECHO_T}none needed" >&6 ;;
12577   *)
12578     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
12579 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12580     CC="$CC $ac_cv_prog_cc_stdc" ;;
12581 esac
12582
12583 # Some people use a C++ compiler to compile C.  Since we use `exit',
12584 # in C++ we need to declare it.  In case someone uses the same compiler
12585 # for both compiling C and C++ we need to have the C++ compiler decide
12586 # the declaration of exit, since it's the most demanding environment.
12587 cat >conftest.$ac_ext <<_ACEOF
12588 #ifndef __cplusplus
12589   choke me
12590 #endif
12591 _ACEOF
12592 rm -f conftest.$ac_objext
12593 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12594   (eval $ac_compile) 2>conftest.er1
12595   ac_status=$?
12596   grep -v '^ *+' conftest.er1 >conftest.err
12597   rm -f conftest.er1
12598   cat conftest.err >&5
12599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12600   (exit $ac_status); } &&
12601          { ac_try='test -z "$ac_c_werror_flag"
12602                          || test ! -s conftest.err'
12603   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12604   (eval $ac_try) 2>&5
12605   ac_status=$?
12606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12607   (exit $ac_status); }; } &&
12608          { ac_try='test -s conftest.$ac_objext'
12609   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12610   (eval $ac_try) 2>&5
12611   ac_status=$?
12612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12613   (exit $ac_status); }; }; then
12614   for ac_declaration in \
12615    '' \
12616    'extern "C" void std::exit (int) throw (); using std::exit;' \
12617    'extern "C" void std::exit (int); using std::exit;' \
12618    'extern "C" void exit (int) throw ();' \
12619    'extern "C" void exit (int);' \
12620    'void exit (int);'
12621 do
12622   cat >conftest.$ac_ext <<_ACEOF
12623 /* confdefs.h.  */
12624 _ACEOF
12625 cat confdefs.h >>conftest.$ac_ext
12626 cat >>conftest.$ac_ext <<_ACEOF
12627 /* end confdefs.h.  */
12628 $ac_declaration
12629 #include <stdlib.h>
12630 int
12631 main ()
12632 {
12633 exit (42);
12634   ;
12635   return 0;
12636 }
12637 _ACEOF
12638 rm -f conftest.$ac_objext
12639 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12640   (eval $ac_compile) 2>conftest.er1
12641   ac_status=$?
12642   grep -v '^ *+' conftest.er1 >conftest.err
12643   rm -f conftest.er1
12644   cat conftest.err >&5
12645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12646   (exit $ac_status); } &&
12647          { ac_try='test -z "$ac_c_werror_flag"
12648                          || test ! -s conftest.err'
12649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12650   (eval $ac_try) 2>&5
12651   ac_status=$?
12652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12653   (exit $ac_status); }; } &&
12654          { ac_try='test -s conftest.$ac_objext'
12655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12656   (eval $ac_try) 2>&5
12657   ac_status=$?
12658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12659   (exit $ac_status); }; }; then
12660   :
12661 else
12662   echo "$as_me: failed program was:" >&5
12663 sed 's/^/| /' conftest.$ac_ext >&5
12664
12665 continue
12666 fi
12667 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12668   cat >conftest.$ac_ext <<_ACEOF
12669 /* confdefs.h.  */
12670 _ACEOF
12671 cat confdefs.h >>conftest.$ac_ext
12672 cat >>conftest.$ac_ext <<_ACEOF
12673 /* end confdefs.h.  */
12674 $ac_declaration
12675 int
12676 main ()
12677 {
12678 exit (42);
12679   ;
12680   return 0;
12681 }
12682 _ACEOF
12683 rm -f conftest.$ac_objext
12684 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12685   (eval $ac_compile) 2>conftest.er1
12686   ac_status=$?
12687   grep -v '^ *+' conftest.er1 >conftest.err
12688   rm -f conftest.er1
12689   cat conftest.err >&5
12690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12691   (exit $ac_status); } &&
12692          { ac_try='test -z "$ac_c_werror_flag"
12693                          || test ! -s conftest.err'
12694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12695   (eval $ac_try) 2>&5
12696   ac_status=$?
12697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12698   (exit $ac_status); }; } &&
12699          { ac_try='test -s conftest.$ac_objext'
12700   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12701   (eval $ac_try) 2>&5
12702   ac_status=$?
12703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12704   (exit $ac_status); }; }; then
12705   break
12706 else
12707   echo "$as_me: failed program was:" >&5
12708 sed 's/^/| /' conftest.$ac_ext >&5
12709
12710 fi
12711 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12712 done
12713 rm -f conftest*
12714 if test -n "$ac_declaration"; then
12715   echo '#ifdef __cplusplus' >>confdefs.h
12716   echo $ac_declaration      >>confdefs.h
12717   echo '#endif'             >>confdefs.h
12718 fi
12719
12720 else
12721   echo "$as_me: failed program was:" >&5
12722 sed 's/^/| /' conftest.$ac_ext >&5
12723
12724 fi
12725 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12726 ac_ext=c
12727 ac_cpp='$CPP $CPPFLAGS'
12728 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12729 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12730 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12731
12732 depcc="$CC"   am_compiler_list=
12733
12734 echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
12735 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
12736 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
12737   echo $ECHO_N "(cached) $ECHO_C" >&6
12738 else
12739   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
12740   # We make a subdir and do the tests there.  Otherwise we can end up
12741   # making bogus files that we don't know about and never remove.  For
12742   # instance it was reported that on HP-UX the gcc test will end up
12743   # making a dummy file named `D' -- because `-MD' means `put the output
12744   # in D'.
12745   mkdir conftest.dir
12746   # Copy depcomp to subdir because otherwise we won't find it if we're
12747   # using a relative directory.
12748   cp "$am_depcomp" conftest.dir
12749   cd conftest.dir
12750   # We will build objects and dependencies in a subdirectory because
12751   # it helps to detect inapplicable dependency modes.  For instance
12752   # both Tru64's cc and ICC support -MD to output dependencies as a
12753   # side effect of compilation, but ICC will put the dependencies in
12754   # the current directory while Tru64 will put them in the object
12755   # directory.
12756   mkdir sub
12757
12758   am_cv_CC_dependencies_compiler_type=none
12759   if test "$am_compiler_list" = ""; then
12760      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
12761   fi
12762   for depmode in $am_compiler_list; do
12763     # Setup a source with many dependencies, because some compilers
12764     # like to wrap large dependency lists on column 80 (with \), and
12765     # we should not choose a depcomp mode which is confused by this.
12766     #
12767     # We need to recreate these files for each test, as the compiler may
12768     # overwrite some of them when testing with obscure command lines.
12769     # This happens at least with the AIX C compiler.
12770     : > sub/conftest.c
12771     for i in 1 2 3 4 5 6; do
12772       echo '#include "conftst'$i'.h"' >> sub/conftest.c
12773       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
12774       # Solaris 8's {/usr,}/bin/sh.
12775       touch sub/conftst$i.h
12776     done
12777     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
12778
12779     case $depmode in
12780     nosideeffect)
12781       # after this tag, mechanisms are not by side-effect, so they'll
12782       # only be used when explicitly requested
12783       if test "x$enable_dependency_tracking" = xyes; then
12784         continue
12785       else
12786         break
12787       fi
12788       ;;
12789     none) break ;;
12790     esac
12791     # We check with `-c' and `-o' for the sake of the "dashmstdout"
12792     # mode.  It turns out that the SunPro C++ compiler does not properly
12793     # handle `-M -o', and we need to detect this.
12794     if depmode=$depmode \
12795        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
12796        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
12797        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
12798          >/dev/null 2>conftest.err &&
12799        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
12800        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
12801        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
12802       # icc doesn't choke on unknown options, it will just issue warnings
12803       # or remarks (even with -Werror).  So we grep stderr for any message
12804       # that says an option was ignored or not supported.
12805       # When given -MP, icc 7.0 and 7.1 complain thusly:
12806       #   icc: Command line warning: ignoring option '-M'; no argument required
12807       # The diagnosis changed in icc 8.0:
12808       #   icc: Command line remark: option '-MP' not supported
12809       if (grep 'ignoring option' conftest.err ||
12810           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
12811         am_cv_CC_dependencies_compiler_type=$depmode
12812         break
12813       fi
12814     fi
12815   done
12816
12817   cd ..
12818   rm -rf conftest.dir
12819 else
12820   am_cv_CC_dependencies_compiler_type=none
12821 fi
12822
12823 fi
12824 echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
12825 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
12826 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
12827
12828
12829
12830 if
12831   test "x$enable_dependency_tracking" != xno \
12832   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
12833   am__fastdepCC_TRUE=
12834   am__fastdepCC_FALSE='#'
12835 else
12836   am__fastdepCC_TRUE='#'
12837   am__fastdepCC_FALSE=
12838 fi
12839
12840
12841 if test "X${ac_cv_prog_cc_stdc}" = "Xno" ; then
12842         { { echo "$as_me:$LINENO: error: OpenLDAP requires compiler to support STDC constructs." >&5
12843 echo "$as_me: error: OpenLDAP requires compiler to support STDC constructs." >&2;}
12844    { (exit 1); exit 1; }; }
12845 fi
12846
12847 # test for make depend flag
12848 OL_MKDEP=
12849 OL_MKDEP_FLAGS=
12850 if test -z "${MKDEP}"; then
12851         OL_MKDEP="${CC-cc}"
12852         if test -z "${MKDEP_FLAGS}"; then
12853                 echo "$as_me:$LINENO: checking for ${OL_MKDEP} depend flag" >&5
12854 echo $ECHO_N "checking for ${OL_MKDEP} depend flag... $ECHO_C" >&6
12855 if test "${ol_cv_mkdep+set}" = set; then
12856   echo $ECHO_N "(cached) $ECHO_C" >&6
12857 else
12858
12859                         ol_cv_mkdep=no
12860                         for flag in "-M" "-xM"; do
12861                                 cat > conftest.c <<EOF
12862  noCode;
12863 EOF
12864                                 if { ac_try='$OL_MKDEP $flag conftest.c'
12865   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12866   (eval $ac_try) 2>&5
12867   ac_status=$?
12868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12869   (exit $ac_status); }; } \
12870                                         | grep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
12871                                 then
12872                                         if test ! -f conftest."${ac_object}" ; then
12873                                                 ol_cv_mkdep=$flag
12874                                                 OL_MKDEP_FLAGS="$flag"
12875                                                 break
12876                                         fi
12877                                 fi
12878                         done
12879                         rm -f conftest*
12880
12881 fi
12882 echo "$as_me:$LINENO: result: $ol_cv_mkdep" >&5
12883 echo "${ECHO_T}$ol_cv_mkdep" >&6
12884         else
12885                 cc_cv_mkdep=yes
12886                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
12887         fi
12888 else
12889         cc_cv_mkdep=yes
12890         OL_MKDEP="${MKDEP}"
12891         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
12892 fi
12893
12894
12895
12896 if test "${ol_cv_mkdep}" = no ; then
12897         # this will soon become an error
12898         { echo "$as_me:$LINENO: WARNING: do not know how to generate dependencies" >&5
12899 echo "$as_me: WARNING: do not know how to generate dependencies" >&2;}
12900 fi
12901
12902 echo "$as_me:$LINENO: checking for afopen in -ls" >&5
12903 echo $ECHO_N "checking for afopen in -ls... $ECHO_C" >&6
12904 if test "${ac_cv_lib_s_afopen+set}" = set; then
12905   echo $ECHO_N "(cached) $ECHO_C" >&6
12906 else
12907   ac_check_lib_save_LIBS=$LIBS
12908 LIBS="-ls  $LIBS"
12909 cat >conftest.$ac_ext <<_ACEOF
12910 /* confdefs.h.  */
12911 _ACEOF
12912 cat confdefs.h >>conftest.$ac_ext
12913 cat >>conftest.$ac_ext <<_ACEOF
12914 /* end confdefs.h.  */
12915
12916 /* Override any gcc2 internal prototype to avoid an error.  */
12917 #ifdef __cplusplus
12918 extern "C"
12919 #endif
12920 /* We use char because int might match the return type of a gcc2
12921    builtin and then its argument prototype would still apply.  */
12922 char afopen ();
12923 int
12924 main ()
12925 {
12926 afopen ();
12927   ;
12928   return 0;
12929 }
12930 _ACEOF
12931 rm -f conftest.$ac_objext conftest$ac_exeext
12932 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12933   (eval $ac_link) 2>conftest.er1
12934   ac_status=$?
12935   grep -v '^ *+' conftest.er1 >conftest.err
12936   rm -f conftest.er1
12937   cat conftest.err >&5
12938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12939   (exit $ac_status); } &&
12940          { ac_try='test -z "$ac_c_werror_flag"
12941                          || test ! -s conftest.err'
12942   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12943   (eval $ac_try) 2>&5
12944   ac_status=$?
12945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12946   (exit $ac_status); }; } &&
12947          { ac_try='test -s conftest$ac_exeext'
12948   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12949   (eval $ac_try) 2>&5
12950   ac_status=$?
12951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12952   (exit $ac_status); }; }; then
12953   ac_cv_lib_s_afopen=yes
12954 else
12955   echo "$as_me: failed program was:" >&5
12956 sed 's/^/| /' conftest.$ac_ext >&5
12957
12958 ac_cv_lib_s_afopen=no
12959 fi
12960 rm -f conftest.err conftest.$ac_objext \
12961       conftest$ac_exeext conftest.$ac_ext
12962 LIBS=$ac_check_lib_save_LIBS
12963 fi
12964 echo "$as_me:$LINENO: result: $ac_cv_lib_s_afopen" >&5
12965 echo "${ECHO_T}$ac_cv_lib_s_afopen" >&6
12966 if test $ac_cv_lib_s_afopen = yes; then
12967
12968         AUTH_LIBS=-ls
12969
12970 cat >>confdefs.h <<\_ACEOF
12971 #define HAVE_AIX_SECURITY 1
12972 _ACEOF
12973
12974
12975 fi
12976
12977
12978 case "$target" in
12979 *-ibm-openedition)
12980         ac_cv_func_getopt=no
12981
12982 cat >>confdefs.h <<\_ACEOF
12983 #define BOTH_STRINGS_H 1
12984 _ACEOF
12985
12986         ;;
12987 esac
12988
12989 ol_link_modules=no
12990 WITH_MODULES_ENABLED=no
12991 if test $ol_enable_modules != no ; then
12992
12993 for ac_header in ltdl.h
12994 do
12995 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12996 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12997   echo "$as_me:$LINENO: checking for $ac_header" >&5
12998 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12999 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13000   echo $ECHO_N "(cached) $ECHO_C" >&6
13001 fi
13002 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13003 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13004 else
13005   # Is the header compilable?
13006 echo "$as_me:$LINENO: checking $ac_header usability" >&5
13007 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13008 cat >conftest.$ac_ext <<_ACEOF
13009 /* confdefs.h.  */
13010 _ACEOF
13011 cat confdefs.h >>conftest.$ac_ext
13012 cat >>conftest.$ac_ext <<_ACEOF
13013 /* end confdefs.h.  */
13014 $ac_includes_default
13015 #include <$ac_header>
13016 _ACEOF
13017 rm -f conftest.$ac_objext
13018 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13019   (eval $ac_compile) 2>conftest.er1
13020   ac_status=$?
13021   grep -v '^ *+' conftest.er1 >conftest.err
13022   rm -f conftest.er1
13023   cat conftest.err >&5
13024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13025   (exit $ac_status); } &&
13026          { ac_try='test -z "$ac_c_werror_flag"
13027                          || test ! -s conftest.err'
13028   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13029   (eval $ac_try) 2>&5
13030   ac_status=$?
13031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13032   (exit $ac_status); }; } &&
13033          { ac_try='test -s conftest.$ac_objext'
13034   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13035   (eval $ac_try) 2>&5
13036   ac_status=$?
13037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13038   (exit $ac_status); }; }; then
13039   ac_header_compiler=yes
13040 else
13041   echo "$as_me: failed program was:" >&5
13042 sed 's/^/| /' conftest.$ac_ext >&5
13043
13044 ac_header_compiler=no
13045 fi
13046 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13047 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13048 echo "${ECHO_T}$ac_header_compiler" >&6
13049
13050 # Is the header present?
13051 echo "$as_me:$LINENO: checking $ac_header presence" >&5
13052 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13053 cat >conftest.$ac_ext <<_ACEOF
13054 /* confdefs.h.  */
13055 _ACEOF
13056 cat confdefs.h >>conftest.$ac_ext
13057 cat >>conftest.$ac_ext <<_ACEOF
13058 /* end confdefs.h.  */
13059 #include <$ac_header>
13060 _ACEOF
13061 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13062   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13063   ac_status=$?
13064   grep -v '^ *+' conftest.er1 >conftest.err
13065   rm -f conftest.er1
13066   cat conftest.err >&5
13067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13068   (exit $ac_status); } >/dev/null; then
13069   if test -s conftest.err; then
13070     ac_cpp_err=$ac_c_preproc_warn_flag
13071     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13072   else
13073     ac_cpp_err=
13074   fi
13075 else
13076   ac_cpp_err=yes
13077 fi
13078 if test -z "$ac_cpp_err"; then
13079   ac_header_preproc=yes
13080 else
13081   echo "$as_me: failed program was:" >&5
13082 sed 's/^/| /' conftest.$ac_ext >&5
13083
13084   ac_header_preproc=no
13085 fi
13086 rm -f conftest.err conftest.$ac_ext
13087 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13088 echo "${ECHO_T}$ac_header_preproc" >&6
13089
13090 # So?  What about this header?
13091 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13092   yes:no: )
13093     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13094 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13095     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13096 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13097     ac_header_preproc=yes
13098     ;;
13099   no:yes:* )
13100     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13101 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13102     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13103 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13104     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13105 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13106     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13107 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13108     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13109 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13110     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13111 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13112     (
13113       cat <<\_ASBOX
13114 ## --------------------------------------------- ##
13115 ## Report this to <http://www.openldap.org/its/> ##
13116 ## --------------------------------------------- ##
13117 _ASBOX
13118     ) |
13119       sed "s/^/$as_me: WARNING:     /" >&2
13120     ;;
13121 esac
13122 echo "$as_me:$LINENO: checking for $ac_header" >&5
13123 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13124 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13125   echo $ECHO_N "(cached) $ECHO_C" >&6
13126 else
13127   eval "$as_ac_Header=\$ac_header_preproc"
13128 fi
13129 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13130 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13131
13132 fi
13133 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13134   cat >>confdefs.h <<_ACEOF
13135 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13136 _ACEOF
13137
13138 fi
13139
13140 done
13141
13142
13143         if test $ac_cv_header_ltdl_h = no ; then
13144                 { { echo "$as_me:$LINENO: error: could not locate libtool ltdl.h" >&5
13145 echo "$as_me: error: could not locate libtool ltdl.h" >&2;}
13146    { (exit 1); exit 1; }; }
13147         fi
13148
13149         echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
13150 echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6
13151 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
13152   echo $ECHO_N "(cached) $ECHO_C" >&6
13153 else
13154   ac_check_lib_save_LIBS=$LIBS
13155 LIBS="-lltdl  $LIBS"
13156 cat >conftest.$ac_ext <<_ACEOF
13157 /* confdefs.h.  */
13158 _ACEOF
13159 cat confdefs.h >>conftest.$ac_ext
13160 cat >>conftest.$ac_ext <<_ACEOF
13161 /* end confdefs.h.  */
13162
13163 /* Override any gcc2 internal prototype to avoid an error.  */
13164 #ifdef __cplusplus
13165 extern "C"
13166 #endif
13167 /* We use char because int might match the return type of a gcc2
13168    builtin and then its argument prototype would still apply.  */
13169 char lt_dlinit ();
13170 int
13171 main ()
13172 {
13173 lt_dlinit ();
13174   ;
13175   return 0;
13176 }
13177 _ACEOF
13178 rm -f conftest.$ac_objext conftest$ac_exeext
13179 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13180   (eval $ac_link) 2>conftest.er1
13181   ac_status=$?
13182   grep -v '^ *+' conftest.er1 >conftest.err
13183   rm -f conftest.er1
13184   cat conftest.err >&5
13185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13186   (exit $ac_status); } &&
13187          { ac_try='test -z "$ac_c_werror_flag"
13188                          || test ! -s conftest.err'
13189   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13190   (eval $ac_try) 2>&5
13191   ac_status=$?
13192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13193   (exit $ac_status); }; } &&
13194          { ac_try='test -s conftest$ac_exeext'
13195   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13196   (eval $ac_try) 2>&5
13197   ac_status=$?
13198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13199   (exit $ac_status); }; }; then
13200   ac_cv_lib_ltdl_lt_dlinit=yes
13201 else
13202   echo "$as_me: failed program was:" >&5
13203 sed 's/^/| /' conftest.$ac_ext >&5
13204
13205 ac_cv_lib_ltdl_lt_dlinit=no
13206 fi
13207 rm -f conftest.err conftest.$ac_objext \
13208       conftest$ac_exeext conftest.$ac_ext
13209 LIBS=$ac_check_lib_save_LIBS
13210 fi
13211 echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
13212 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6
13213 if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
13214
13215                 MODULES_LIBS=-lltdl
13216
13217 cat >>confdefs.h <<\_ACEOF
13218 #define HAVE_LIBLTDL 1
13219 _ACEOF
13220
13221
13222 fi
13223
13224
13225         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
13226                 { { echo "$as_me:$LINENO: error: could not locate libtool -lltdl" >&5
13227 echo "$as_me: error: could not locate libtool -lltdl" >&2;}
13228    { (exit 1); exit 1; }; }
13229         fi
13230         ol_link_modules=yes
13231         WITH_MODULES_ENABLED=yes
13232
13233 else
13234         for i in $Backends; do
13235                 eval "ol_tmp=\$ol_enable_$i"
13236                 if test $ol_tmp = mod ; then
13237                         { echo "$as_me:$LINENO: WARNING: building static $i backend" >&5
13238 echo "$as_me: WARNING: building static $i backend" >&2;}
13239                         eval "ol_enable_$i=yes"
13240                 fi
13241         done
13242         for i in $Overlays; do
13243                 eval "ol_tmp=\$ol_enable_$i"
13244                 if test $ol_tmp = mod ; then
13245                         { echo "$as_me:$LINENO: WARNING: building static $i overlay" >&5
13246 echo "$as_me: WARNING: building static $i overlay" >&2;}
13247                         eval "ol_enable_$i=yes"
13248                 fi
13249         done
13250 fi
13251
13252 # test for EBCDIC
13253 echo "$as_me:$LINENO: checking for EBCDIC" >&5
13254 echo $ECHO_N "checking for EBCDIC... $ECHO_C" >&6
13255 if test "${ol_cv_cpp_ebcdic+set}" = set; then
13256   echo $ECHO_N "(cached) $ECHO_C" >&6
13257 else
13258
13259         cat >conftest.$ac_ext <<_ACEOF
13260 /* confdefs.h.  */
13261 _ACEOF
13262 cat confdefs.h >>conftest.$ac_ext
13263 cat >>conftest.$ac_ext <<_ACEOF
13264 /* end confdefs.h.  */
13265
13266 #if !('M' == 0xd4)
13267 #include <__ASCII__/generate_error.h>
13268 #endif
13269
13270 _ACEOF
13271 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13272   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13273   ac_status=$?
13274   grep -v '^ *+' conftest.er1 >conftest.err
13275   rm -f conftest.er1
13276   cat conftest.err >&5
13277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13278   (exit $ac_status); } >/dev/null; then
13279   if test -s conftest.err; then
13280     ac_cpp_err=$ac_c_preproc_warn_flag
13281     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13282   else
13283     ac_cpp_err=
13284   fi
13285 else
13286   ac_cpp_err=yes
13287 fi
13288 if test -z "$ac_cpp_err"; then
13289   ol_cv_cpp_ebcdic=yes
13290 else
13291   echo "$as_me: failed program was:" >&5
13292 sed 's/^/| /' conftest.$ac_ext >&5
13293
13294   ol_cv_cpp_ebcdic=no
13295 fi
13296 rm -f conftest.err conftest.$ac_ext
13297 fi
13298 echo "$as_me:$LINENO: result: $ol_cv_cpp_ebcdic" >&5
13299 echo "${ECHO_T}$ol_cv_cpp_ebcdic" >&6
13300 if test $ol_cv_cpp_ebcdic = yes ; then
13301
13302 cat >>confdefs.h <<\_ACEOF
13303 #define HAVE_EBCDIC 1
13304 _ACEOF
13305
13306 fi
13307
13308 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
13309 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13310 if test "${ol_cv_header_stdc+set}" = set; then
13311   echo $ECHO_N "(cached) $ECHO_C" >&6
13312 else
13313   cat >conftest.$ac_ext <<_ACEOF
13314 /* confdefs.h.  */
13315 _ACEOF
13316 cat confdefs.h >>conftest.$ac_ext
13317 cat >>conftest.$ac_ext <<_ACEOF
13318 /* end confdefs.h.  */
13319 #include <stdlib.h>
13320 #include <stdarg.h>
13321 #include <string.h>
13322 #include <float.h>
13323 _ACEOF
13324 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13325   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13326   ac_status=$?
13327   grep -v '^ *+' conftest.er1 >conftest.err
13328   rm -f conftest.er1
13329   cat conftest.err >&5
13330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13331   (exit $ac_status); } >/dev/null; then
13332   if test -s conftest.err; then
13333     ac_cpp_err=$ac_c_preproc_warn_flag
13334     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13335   else
13336     ac_cpp_err=
13337   fi
13338 else
13339   ac_cpp_err=yes
13340 fi
13341 if test -z "$ac_cpp_err"; then
13342   ol_cv_header_stdc=yes
13343 else
13344   echo "$as_me: failed program was:" >&5
13345 sed 's/^/| /' conftest.$ac_ext >&5
13346
13347   ol_cv_header_stdc=no
13348 fi
13349 rm -f conftest.err conftest.$ac_ext
13350
13351 if test $ol_cv_header_stdc = yes; then
13352   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13353 cat >conftest.$ac_ext <<_ACEOF
13354 /* confdefs.h.  */
13355 _ACEOF
13356 cat confdefs.h >>conftest.$ac_ext
13357 cat >>conftest.$ac_ext <<_ACEOF
13358 /* end confdefs.h.  */
13359 #include <string.h>
13360
13361 _ACEOF
13362 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13363   $EGREP "memchr" >/dev/null 2>&1; then
13364   :
13365 else
13366   ol_cv_header_stdc=no
13367 fi
13368 rm -f conftest*
13369
13370 fi
13371
13372 if test $ol_cv_header_stdc = yes; then
13373   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13374 cat >conftest.$ac_ext <<_ACEOF
13375 /* confdefs.h.  */
13376 _ACEOF
13377 cat confdefs.h >>conftest.$ac_ext
13378 cat >>conftest.$ac_ext <<_ACEOF
13379 /* end confdefs.h.  */
13380 #include <stdlib.h>
13381
13382 _ACEOF
13383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13384   $EGREP "free" >/dev/null 2>&1; then
13385   :
13386 else
13387   ol_cv_header_stdc=no
13388 fi
13389 rm -f conftest*
13390
13391 fi
13392
13393 if test $ol_cv_header_stdc = yes; then
13394   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13395 if test "$cross_compiling" = yes; then
13396   :
13397 else
13398   cat >conftest.$ac_ext <<_ACEOF
13399 /* confdefs.h.  */
13400 _ACEOF
13401 cat confdefs.h >>conftest.$ac_ext
13402 cat >>conftest.$ac_ext <<_ACEOF
13403 /* end confdefs.h.  */
13404 #include <ctype.h>
13405 #ifndef HAVE_EBCDIC
13406 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13407 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13408 #else
13409 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13410                 || ('j' <= (c) && (c) <= 'r') \
13411                 || ('s' <= (c) && (c) <= 'z'))
13412 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
13413 #endif
13414 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13415 int main () { int i; for (i = 0; i < 256; i++)
13416 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13417 exit (0); }
13418
13419 _ACEOF
13420 rm -f conftest$ac_exeext
13421 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13422   (eval $ac_link) 2>&5
13423   ac_status=$?
13424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13425   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13426   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13427   (eval $ac_try) 2>&5
13428   ac_status=$?
13429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13430   (exit $ac_status); }; }; then
13431   :
13432 else
13433   echo "$as_me: program exited with status $ac_status" >&5
13434 echo "$as_me: failed program was:" >&5
13435 sed 's/^/| /' conftest.$ac_ext >&5
13436
13437 ( exit $ac_status )
13438 ol_cv_header_stdc=no
13439 fi
13440 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13441 fi
13442 fi
13443 fi
13444 echo "$as_me:$LINENO: result: $ol_cv_header_stdc" >&5
13445 echo "${ECHO_T}$ol_cv_header_stdc" >&6
13446 if test $ol_cv_header_stdc = yes; then
13447   cat >>confdefs.h <<\_ACEOF
13448 #define STDC_HEADERS 1
13449 _ACEOF
13450
13451 fi
13452 ac_cv_header_stdc=disable
13453
13454
13455 if test $ol_cv_header_stdc != yes; then
13456         { echo "$as_me:$LINENO: WARNING: could not locate Standard C compliant headers" >&5
13457 echo "$as_me: WARNING: could not locate Standard C compliant headers" >&2;}
13458 fi
13459
13460
13461
13462
13463
13464
13465 ac_header_dirent=no
13466 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13467   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13468 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
13469 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13470 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13471   echo $ECHO_N "(cached) $ECHO_C" >&6
13472 else
13473   cat >conftest.$ac_ext <<_ACEOF
13474 /* confdefs.h.  */
13475 _ACEOF
13476 cat confdefs.h >>conftest.$ac_ext
13477 cat >>conftest.$ac_ext <<_ACEOF
13478 /* end confdefs.h.  */
13479 #include <sys/types.h>
13480 #include <$ac_hdr>
13481
13482 int
13483 main ()
13484 {
13485 if ((DIR *) 0)
13486 return 0;
13487   ;
13488   return 0;
13489 }
13490 _ACEOF
13491 rm -f conftest.$ac_objext
13492 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13493   (eval $ac_compile) 2>conftest.er1
13494   ac_status=$?
13495   grep -v '^ *+' conftest.er1 >conftest.err
13496   rm -f conftest.er1
13497   cat conftest.err >&5
13498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13499   (exit $ac_status); } &&
13500          { ac_try='test -z "$ac_c_werror_flag"
13501                          || test ! -s conftest.err'
13502   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13503   (eval $ac_try) 2>&5
13504   ac_status=$?
13505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13506   (exit $ac_status); }; } &&
13507          { ac_try='test -s conftest.$ac_objext'
13508   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13509   (eval $ac_try) 2>&5
13510   ac_status=$?
13511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13512   (exit $ac_status); }; }; then
13513   eval "$as_ac_Header=yes"
13514 else
13515   echo "$as_me: failed program was:" >&5
13516 sed 's/^/| /' conftest.$ac_ext >&5
13517
13518 eval "$as_ac_Header=no"
13519 fi
13520 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13521 fi
13522 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13523 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13524 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13525   cat >>confdefs.h <<_ACEOF
13526 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13527 _ACEOF
13528
13529 ac_header_dirent=$ac_hdr; break
13530 fi
13531
13532 done
13533 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13534 if test $ac_header_dirent = dirent.h; then
13535   echo "$as_me:$LINENO: checking for library containing opendir" >&5
13536 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
13537 if test "${ac_cv_search_opendir+set}" = set; then
13538   echo $ECHO_N "(cached) $ECHO_C" >&6
13539 else
13540   ac_func_search_save_LIBS=$LIBS
13541 ac_cv_search_opendir=no
13542 cat >conftest.$ac_ext <<_ACEOF
13543 /* confdefs.h.  */
13544 _ACEOF
13545 cat confdefs.h >>conftest.$ac_ext
13546 cat >>conftest.$ac_ext <<_ACEOF
13547 /* end confdefs.h.  */
13548
13549 /* Override any gcc2 internal prototype to avoid an error.  */
13550 #ifdef __cplusplus
13551 extern "C"
13552 #endif
13553 /* We use char because int might match the return type of a gcc2
13554    builtin and then its argument prototype would still apply.  */
13555 char opendir ();
13556 int
13557 main ()
13558 {
13559 opendir ();
13560   ;
13561   return 0;
13562 }
13563 _ACEOF
13564 rm -f conftest.$ac_objext conftest$ac_exeext
13565 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13566   (eval $ac_link) 2>conftest.er1
13567   ac_status=$?
13568   grep -v '^ *+' conftest.er1 >conftest.err
13569   rm -f conftest.er1
13570   cat conftest.err >&5
13571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13572   (exit $ac_status); } &&
13573          { ac_try='test -z "$ac_c_werror_flag"
13574                          || test ! -s conftest.err'
13575   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13576   (eval $ac_try) 2>&5
13577   ac_status=$?
13578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13579   (exit $ac_status); }; } &&
13580          { ac_try='test -s conftest$ac_exeext'
13581   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13582   (eval $ac_try) 2>&5
13583   ac_status=$?
13584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13585   (exit $ac_status); }; }; then
13586   ac_cv_search_opendir="none required"
13587 else
13588   echo "$as_me: failed program was:" >&5
13589 sed 's/^/| /' conftest.$ac_ext >&5
13590
13591 fi
13592 rm -f conftest.err conftest.$ac_objext \
13593       conftest$ac_exeext conftest.$ac_ext
13594 if test "$ac_cv_search_opendir" = no; then
13595   for ac_lib in dir; do
13596     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13597     cat >conftest.$ac_ext <<_ACEOF
13598 /* confdefs.h.  */
13599 _ACEOF
13600 cat confdefs.h >>conftest.$ac_ext
13601 cat >>conftest.$ac_ext <<_ACEOF
13602 /* end confdefs.h.  */
13603
13604 /* Override any gcc2 internal prototype to avoid an error.  */
13605 #ifdef __cplusplus
13606 extern "C"
13607 #endif
13608 /* We use char because int might match the return type of a gcc2
13609    builtin and then its argument prototype would still apply.  */
13610 char opendir ();
13611 int
13612 main ()
13613 {
13614 opendir ();
13615   ;
13616   return 0;
13617 }
13618 _ACEOF
13619 rm -f conftest.$ac_objext conftest$ac_exeext
13620 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13621   (eval $ac_link) 2>conftest.er1
13622   ac_status=$?
13623   grep -v '^ *+' conftest.er1 >conftest.err
13624   rm -f conftest.er1
13625   cat conftest.err >&5
13626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13627   (exit $ac_status); } &&
13628          { ac_try='test -z "$ac_c_werror_flag"
13629                          || test ! -s conftest.err'
13630   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13631   (eval $ac_try) 2>&5
13632   ac_status=$?
13633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13634   (exit $ac_status); }; } &&
13635          { ac_try='test -s conftest$ac_exeext'
13636   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13637   (eval $ac_try) 2>&5
13638   ac_status=$?
13639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13640   (exit $ac_status); }; }; then
13641   ac_cv_search_opendir="-l$ac_lib"
13642 break
13643 else
13644   echo "$as_me: failed program was:" >&5
13645 sed 's/^/| /' conftest.$ac_ext >&5
13646
13647 fi
13648 rm -f conftest.err conftest.$ac_objext \
13649       conftest$ac_exeext conftest.$ac_ext
13650   done
13651 fi
13652 LIBS=$ac_func_search_save_LIBS
13653 fi
13654 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
13655 echo "${ECHO_T}$ac_cv_search_opendir" >&6
13656 if test "$ac_cv_search_opendir" != no; then
13657   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
13658
13659 fi
13660
13661 else
13662   echo "$as_me:$LINENO: checking for library containing opendir" >&5
13663 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
13664 if test "${ac_cv_search_opendir+set}" = set; then
13665   echo $ECHO_N "(cached) $ECHO_C" >&6
13666 else
13667   ac_func_search_save_LIBS=$LIBS
13668 ac_cv_search_opendir=no
13669 cat >conftest.$ac_ext <<_ACEOF
13670 /* confdefs.h.  */
13671 _ACEOF
13672 cat confdefs.h >>conftest.$ac_ext
13673 cat >>conftest.$ac_ext <<_ACEOF
13674 /* end confdefs.h.  */
13675
13676 /* Override any gcc2 internal prototype to avoid an error.  */
13677 #ifdef __cplusplus
13678 extern "C"
13679 #endif
13680 /* We use char because int might match the return type of a gcc2
13681    builtin and then its argument prototype would still apply.  */
13682 char opendir ();
13683 int
13684 main ()
13685 {
13686 opendir ();
13687   ;
13688   return 0;
13689 }
13690 _ACEOF
13691 rm -f conftest.$ac_objext conftest$ac_exeext
13692 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13693   (eval $ac_link) 2>conftest.er1
13694   ac_status=$?
13695   grep -v '^ *+' conftest.er1 >conftest.err
13696   rm -f conftest.er1
13697   cat conftest.err >&5
13698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13699   (exit $ac_status); } &&
13700          { ac_try='test -z "$ac_c_werror_flag"
13701                          || test ! -s conftest.err'
13702   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13703   (eval $ac_try) 2>&5
13704   ac_status=$?
13705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13706   (exit $ac_status); }; } &&
13707          { ac_try='test -s conftest$ac_exeext'
13708   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13709   (eval $ac_try) 2>&5
13710   ac_status=$?
13711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13712   (exit $ac_status); }; }; then
13713   ac_cv_search_opendir="none required"
13714 else
13715   echo "$as_me: failed program was:" >&5
13716 sed 's/^/| /' conftest.$ac_ext >&5
13717
13718 fi
13719 rm -f conftest.err conftest.$ac_objext \
13720       conftest$ac_exeext conftest.$ac_ext
13721 if test "$ac_cv_search_opendir" = no; then
13722   for ac_lib in x; do
13723     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13724     cat >conftest.$ac_ext <<_ACEOF
13725 /* confdefs.h.  */
13726 _ACEOF
13727 cat confdefs.h >>conftest.$ac_ext
13728 cat >>conftest.$ac_ext <<_ACEOF
13729 /* end confdefs.h.  */
13730
13731 /* Override any gcc2 internal prototype to avoid an error.  */
13732 #ifdef __cplusplus
13733 extern "C"
13734 #endif
13735 /* We use char because int might match the return type of a gcc2
13736    builtin and then its argument prototype would still apply.  */
13737 char opendir ();
13738 int
13739 main ()
13740 {
13741 opendir ();
13742   ;
13743   return 0;
13744 }
13745 _ACEOF
13746 rm -f conftest.$ac_objext conftest$ac_exeext
13747 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13748   (eval $ac_link) 2>conftest.er1
13749   ac_status=$?
13750   grep -v '^ *+' conftest.er1 >conftest.err
13751   rm -f conftest.er1
13752   cat conftest.err >&5
13753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13754   (exit $ac_status); } &&
13755          { ac_try='test -z "$ac_c_werror_flag"
13756                          || test ! -s conftest.err'
13757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13758   (eval $ac_try) 2>&5
13759   ac_status=$?
13760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13761   (exit $ac_status); }; } &&
13762          { ac_try='test -s conftest$ac_exeext'
13763   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13764   (eval $ac_try) 2>&5
13765   ac_status=$?
13766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13767   (exit $ac_status); }; }; then
13768   ac_cv_search_opendir="-l$ac_lib"
13769 break
13770 else
13771   echo "$as_me: failed program was:" >&5
13772 sed 's/^/| /' conftest.$ac_ext >&5
13773
13774 fi
13775 rm -f conftest.err conftest.$ac_objext \
13776       conftest$ac_exeext conftest.$ac_ext
13777   done
13778 fi
13779 LIBS=$ac_func_search_save_LIBS
13780 fi
13781 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
13782 echo "${ECHO_T}$ac_cv_search_opendir" >&6
13783 if test "$ac_cv_search_opendir" != no; then
13784   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
13785
13786 fi
13787
13788 fi
13789
13790 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
13791 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
13792 if test "${ac_cv_header_sys_wait_h+set}" = set; then
13793   echo $ECHO_N "(cached) $ECHO_C" >&6
13794 else
13795   cat >conftest.$ac_ext <<_ACEOF
13796 /* confdefs.h.  */
13797 _ACEOF
13798 cat confdefs.h >>conftest.$ac_ext
13799 cat >>conftest.$ac_ext <<_ACEOF
13800 /* end confdefs.h.  */
13801 #include <sys/types.h>
13802 #include <sys/wait.h>
13803 #ifndef WEXITSTATUS
13804 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
13805 #endif
13806 #ifndef WIFEXITED
13807 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
13808 #endif
13809
13810 int
13811 main ()
13812 {
13813   int s;
13814   wait (&s);
13815   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
13816   ;
13817   return 0;
13818 }
13819 _ACEOF
13820 rm -f conftest.$ac_objext
13821 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13822   (eval $ac_compile) 2>conftest.er1
13823   ac_status=$?
13824   grep -v '^ *+' conftest.er1 >conftest.err
13825   rm -f conftest.er1
13826   cat conftest.err >&5
13827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13828   (exit $ac_status); } &&
13829          { ac_try='test -z "$ac_c_werror_flag"
13830                          || test ! -s conftest.err'
13831   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13832   (eval $ac_try) 2>&5
13833   ac_status=$?
13834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13835   (exit $ac_status); }; } &&
13836          { ac_try='test -s conftest.$ac_objext'
13837   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13838   (eval $ac_try) 2>&5
13839   ac_status=$?
13840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13841   (exit $ac_status); }; }; then
13842   ac_cv_header_sys_wait_h=yes
13843 else
13844   echo "$as_me: failed program was:" >&5
13845 sed 's/^/| /' conftest.$ac_ext >&5
13846
13847 ac_cv_header_sys_wait_h=no
13848 fi
13849 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13850 fi
13851 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
13852 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
13853 if test $ac_cv_header_sys_wait_h = yes; then
13854
13855 cat >>confdefs.h <<\_ACEOF
13856 #define HAVE_SYS_WAIT_H 1
13857 _ACEOF
13858
13859 fi
13860
13861 echo "$as_me:$LINENO: checking whether termios.h defines TIOCGWINSZ" >&5
13862 echo $ECHO_N "checking whether termios.h defines TIOCGWINSZ... $ECHO_C" >&6
13863 if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then
13864   echo $ECHO_N "(cached) $ECHO_C" >&6
13865 else
13866   cat >conftest.$ac_ext <<_ACEOF
13867 /* confdefs.h.  */
13868 _ACEOF
13869 cat confdefs.h >>conftest.$ac_ext
13870 cat >>conftest.$ac_ext <<_ACEOF
13871 /* end confdefs.h.  */
13872 #include <sys/types.h>
13873 #include <termios.h>
13874 #ifdef TIOCGWINSZ
13875   yes
13876 #endif
13877
13878 _ACEOF
13879 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13880   $EGREP "yes" >/dev/null 2>&1; then
13881   ac_cv_sys_tiocgwinsz_in_termios_h=yes
13882 else
13883   ac_cv_sys_tiocgwinsz_in_termios_h=no
13884 fi
13885 rm -f conftest*
13886
13887 fi
13888 echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
13889 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_termios_h" >&6
13890
13891 if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
13892   echo "$as_me:$LINENO: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
13893 echo $ECHO_N "checking whether sys/ioctl.h defines TIOCGWINSZ... $ECHO_C" >&6
13894 if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then
13895   echo $ECHO_N "(cached) $ECHO_C" >&6
13896 else
13897   cat >conftest.$ac_ext <<_ACEOF
13898 /* confdefs.h.  */
13899 _ACEOF
13900 cat confdefs.h >>conftest.$ac_ext
13901 cat >>conftest.$ac_ext <<_ACEOF
13902 /* end confdefs.h.  */
13903 #include <sys/types.h>
13904 #include <sys/ioctl.h>
13905 #ifdef TIOCGWINSZ
13906   yes
13907 #endif
13908
13909 _ACEOF
13910 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13911   $EGREP "yes" >/dev/null 2>&1; then
13912   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
13913 else
13914   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
13915 fi
13916 rm -f conftest*
13917
13918 fi
13919 echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
13920 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6
13921
13922   if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
13923
13924 cat >>confdefs.h <<\_ACEOF
13925 #define GWINSZ_IN_SYS_IOCTL 1
13926 _ACEOF
13927
13928   fi
13929 fi
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978 for ac_header in \
13979         arpa/inet.h             \
13980         arpa/nameser.h  \
13981         assert.h                \
13982         bits/types.h    \
13983         conio.h                 \
13984         crypt.h                 \
13985         direct.h                \
13986         errno.h                 \
13987         fcntl.h                 \
13988         filio.h                 \
13989         getopt.h                \
13990         grp.h                   \
13991         io.h                    \
13992         libutil.h               \
13993         limits.h                \
13994         locale.h                \
13995         malloc.h                \
13996         memory.h                \
13997         psap.h                  \
13998         pwd.h                   \
13999         process.h               \
14000         sgtty.h                 \
14001         shadow.h                \
14002         stddef.h                \
14003         string.h                \
14004         strings.h               \
14005         sysexits.h              \
14006         sys/file.h              \
14007         sys/filio.h             \
14008         sys/errno.h             \
14009         sys/ioctl.h             \
14010         sys/param.h             \
14011         sys/resource.h  \
14012         sys/select.h    \
14013         sys/socket.h    \
14014         sys/stat.h              \
14015         sys/syslog.h    \
14016         sys/time.h              \
14017         sys/types.h             \
14018         sys/uio.h               \
14019         syslog.h                \
14020         termios.h               \
14021         unistd.h                \
14022         utime.h                 \
14023         winsock.h               \
14024         winsock2.h              \
14025
14026 do
14027 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14028 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14029   echo "$as_me:$LINENO: checking for $ac_header" >&5
14030 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14031 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14032   echo $ECHO_N "(cached) $ECHO_C" >&6
14033 fi
14034 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14035 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14036 else
14037   # Is the header compilable?
14038 echo "$as_me:$LINENO: checking $ac_header usability" >&5
14039 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14040 cat >conftest.$ac_ext <<_ACEOF
14041 /* confdefs.h.  */
14042 _ACEOF
14043 cat confdefs.h >>conftest.$ac_ext
14044 cat >>conftest.$ac_ext <<_ACEOF
14045 /* end confdefs.h.  */
14046 $ac_includes_default
14047 #include <$ac_header>
14048 _ACEOF
14049 rm -f conftest.$ac_objext
14050 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14051   (eval $ac_compile) 2>conftest.er1
14052   ac_status=$?
14053   grep -v '^ *+' conftest.er1 >conftest.err
14054   rm -f conftest.er1
14055   cat conftest.err >&5
14056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14057   (exit $ac_status); } &&
14058          { ac_try='test -z "$ac_c_werror_flag"
14059                          || test ! -s conftest.err'
14060   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14061   (eval $ac_try) 2>&5
14062   ac_status=$?
14063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14064   (exit $ac_status); }; } &&
14065          { ac_try='test -s conftest.$ac_objext'
14066   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14067   (eval $ac_try) 2>&5
14068   ac_status=$?
14069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14070   (exit $ac_status); }; }; then
14071   ac_header_compiler=yes
14072 else
14073   echo "$as_me: failed program was:" >&5
14074 sed 's/^/| /' conftest.$ac_ext >&5
14075
14076 ac_header_compiler=no
14077 fi
14078 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14079 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14080 echo "${ECHO_T}$ac_header_compiler" >&6
14081
14082 # Is the header present?
14083 echo "$as_me:$LINENO: checking $ac_header presence" >&5
14084 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14085 cat >conftest.$ac_ext <<_ACEOF
14086 /* confdefs.h.  */
14087 _ACEOF
14088 cat confdefs.h >>conftest.$ac_ext
14089 cat >>conftest.$ac_ext <<_ACEOF
14090 /* end confdefs.h.  */
14091 #include <$ac_header>
14092 _ACEOF
14093 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14094   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14095   ac_status=$?
14096   grep -v '^ *+' conftest.er1 >conftest.err
14097   rm -f conftest.er1
14098   cat conftest.err >&5
14099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14100   (exit $ac_status); } >/dev/null; then
14101   if test -s conftest.err; then
14102     ac_cpp_err=$ac_c_preproc_warn_flag
14103     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
14104   else
14105     ac_cpp_err=
14106   fi
14107 else
14108   ac_cpp_err=yes
14109 fi
14110 if test -z "$ac_cpp_err"; then
14111   ac_header_preproc=yes
14112 else
14113   echo "$as_me: failed program was:" >&5
14114 sed 's/^/| /' conftest.$ac_ext >&5
14115
14116   ac_header_preproc=no
14117 fi
14118 rm -f conftest.err conftest.$ac_ext
14119 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14120 echo "${ECHO_T}$ac_header_preproc" >&6
14121
14122 # So?  What about this header?
14123 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14124   yes:no: )
14125     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14126 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14127     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14128 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14129     ac_header_preproc=yes
14130     ;;
14131   no:yes:* )
14132     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14133 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14134     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
14135 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
14136     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14137 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14138     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
14139 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
14140     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14141 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14142     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14143 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14144     (
14145       cat <<\_ASBOX
14146 ## --------------------------------------------- ##
14147 ## Report this to <http://www.openldap.org/its/> ##
14148 ## --------------------------------------------- ##
14149 _ASBOX
14150     ) |
14151       sed "s/^/$as_me: WARNING:     /" >&2
14152     ;;
14153 esac
14154 echo "$as_me:$LINENO: checking for $ac_header" >&5
14155 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14156 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14157   echo $ECHO_N "(cached) $ECHO_C" >&6
14158 else
14159   eval "$as_ac_Header=\$ac_header_preproc"
14160 fi
14161 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14162 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14163
14164 fi
14165 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14166   cat >>confdefs.h <<_ACEOF
14167 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14168 _ACEOF
14169
14170 fi
14171
14172 done
14173
14174
14175
14176 for ac_header in resolv.h
14177 do
14178 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14179 echo "$as_me:$LINENO: checking for $ac_header" >&5
14180 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14181 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14182   echo $ECHO_N "(cached) $ECHO_C" >&6
14183 else
14184   cat >conftest.$ac_ext <<_ACEOF
14185 /* confdefs.h.  */
14186 _ACEOF
14187 cat confdefs.h >>conftest.$ac_ext
14188 cat >>conftest.$ac_ext <<_ACEOF
14189 /* end confdefs.h.  */
14190 $ac_includes_default
14191 #include <netinet/in.h>
14192
14193
14194 #include <$ac_header>
14195 _ACEOF
14196 rm -f conftest.$ac_objext
14197 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14198   (eval $ac_compile) 2>conftest.er1
14199   ac_status=$?
14200   grep -v '^ *+' conftest.er1 >conftest.err
14201   rm -f conftest.er1
14202   cat conftest.err >&5
14203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14204   (exit $ac_status); } &&
14205          { ac_try='test -z "$ac_c_werror_flag"
14206                          || test ! -s conftest.err'
14207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14208   (eval $ac_try) 2>&5
14209   ac_status=$?
14210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14211   (exit $ac_status); }; } &&
14212          { ac_try='test -s conftest.$ac_objext'
14213   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14214   (eval $ac_try) 2>&5
14215   ac_status=$?
14216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14217   (exit $ac_status); }; }; then
14218   eval "$as_ac_Header=yes"
14219 else
14220   echo "$as_me: failed program was:" >&5
14221 sed 's/^/| /' conftest.$ac_ext >&5
14222
14223 eval "$as_ac_Header=no"
14224 fi
14225 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14226 fi
14227 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14228 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14229 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14230   cat >>confdefs.h <<_ACEOF
14231 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14232 _ACEOF
14233
14234 fi
14235
14236 done
14237
14238
14239
14240 for ac_header in netinet/tcp.h
14241 do
14242 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14243 echo "$as_me:$LINENO: checking for $ac_header" >&5
14244 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14245 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14246   echo $ECHO_N "(cached) $ECHO_C" >&6
14247 else
14248   cat >conftest.$ac_ext <<_ACEOF
14249 /* confdefs.h.  */
14250 _ACEOF
14251 cat confdefs.h >>conftest.$ac_ext
14252 cat >>conftest.$ac_ext <<_ACEOF
14253 /* end confdefs.h.  */
14254 $ac_includes_default
14255 #include <netinet/in.h>
14256
14257
14258 #include <$ac_header>
14259 _ACEOF
14260 rm -f conftest.$ac_objext
14261 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14262   (eval $ac_compile) 2>conftest.er1
14263   ac_status=$?
14264   grep -v '^ *+' conftest.er1 >conftest.err
14265   rm -f conftest.er1
14266   cat conftest.err >&5
14267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14268   (exit $ac_status); } &&
14269          { ac_try='test -z "$ac_c_werror_flag"
14270                          || test ! -s conftest.err'
14271   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14272   (eval $ac_try) 2>&5
14273   ac_status=$?
14274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14275   (exit $ac_status); }; } &&
14276          { ac_try='test -s conftest.$ac_objext'
14277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14278   (eval $ac_try) 2>&5
14279   ac_status=$?
14280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14281   (exit $ac_status); }; }; then
14282   eval "$as_ac_Header=yes"
14283 else
14284   echo "$as_me: failed program was:" >&5
14285 sed 's/^/| /' conftest.$ac_ext >&5
14286
14287 eval "$as_ac_Header=no"
14288 fi
14289 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14290 fi
14291 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14292 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14293 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14294   cat >>confdefs.h <<_ACEOF
14295 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14296 _ACEOF
14297
14298 fi
14299
14300 done
14301
14302
14303
14304 for ac_header in sys/ucred.h
14305 do
14306 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14307 echo "$as_me:$LINENO: checking for $ac_header" >&5
14308 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14309 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14310   echo $ECHO_N "(cached) $ECHO_C" >&6
14311 else
14312   cat >conftest.$ac_ext <<_ACEOF
14313 /* confdefs.h.  */
14314 _ACEOF
14315 cat confdefs.h >>conftest.$ac_ext
14316 cat >>conftest.$ac_ext <<_ACEOF
14317 /* end confdefs.h.  */
14318 $ac_includes_default
14319 #ifdef HAVE_SYS_PARAM_H
14320 #include <sys/param.h>
14321 #endif
14322
14323
14324 #include <$ac_header>
14325 _ACEOF
14326 rm -f conftest.$ac_objext
14327 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14328   (eval $ac_compile) 2>conftest.er1
14329   ac_status=$?
14330   grep -v '^ *+' conftest.er1 >conftest.err
14331   rm -f conftest.er1
14332   cat conftest.err >&5
14333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14334   (exit $ac_status); } &&
14335          { ac_try='test -z "$ac_c_werror_flag"
14336                          || test ! -s conftest.err'
14337   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14338   (eval $ac_try) 2>&5
14339   ac_status=$?
14340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14341   (exit $ac_status); }; } &&
14342          { ac_try='test -s conftest.$ac_objext'
14343   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14344   (eval $ac_try) 2>&5
14345   ac_status=$?
14346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14347   (exit $ac_status); }; }; then
14348   eval "$as_ac_Header=yes"
14349 else
14350   echo "$as_me: failed program was:" >&5
14351 sed 's/^/| /' conftest.$ac_ext >&5
14352
14353 eval "$as_ac_Header=no"
14354 fi
14355 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14356 fi
14357 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14358 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14359 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14360   cat >>confdefs.h <<_ACEOF
14361 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14362 _ACEOF
14363
14364 fi
14365
14366 done
14367
14368
14369
14370
14371
14372 for ac_func in sigaction sigset
14373 do
14374 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14375 echo "$as_me:$LINENO: checking for $ac_func" >&5
14376 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14377 if eval "test \"\${$as_ac_var+set}\" = set"; then
14378   echo $ECHO_N "(cached) $ECHO_C" >&6
14379 else
14380   cat >conftest.$ac_ext <<_ACEOF
14381 /* confdefs.h.  */
14382 _ACEOF
14383 cat confdefs.h >>conftest.$ac_ext
14384 cat >>conftest.$ac_ext <<_ACEOF
14385 /* end confdefs.h.  */
14386 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14387    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14388 #define $ac_func innocuous_$ac_func
14389
14390 /* System header to define __stub macros and hopefully few prototypes,
14391     which can conflict with char $ac_func (); below.
14392     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14393     <limits.h> exists even on freestanding compilers.  */
14394
14395 #ifdef __STDC__
14396 # include <limits.h>
14397 #else
14398 # include <assert.h>
14399 #endif
14400
14401 #undef $ac_func
14402
14403 /* Override any gcc2 internal prototype to avoid an error.  */
14404 #ifdef __cplusplus
14405 extern "C"
14406 {
14407 #endif
14408 /* We use char because int might match the return type of a gcc2
14409    builtin and then its argument prototype would still apply.  */
14410 char $ac_func ();
14411 /* The GNU C library defines this for functions which it implements
14412     to always fail with ENOSYS.  Some functions are actually named
14413     something starting with __ and the normal name is an alias.  */
14414 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14415 choke me
14416 #else
14417 char (*f) () = $ac_func;
14418 #endif
14419 #ifdef __cplusplus
14420 }
14421 #endif
14422
14423 int
14424 main ()
14425 {
14426 return f != $ac_func;
14427   ;
14428   return 0;
14429 }
14430 _ACEOF
14431 rm -f conftest.$ac_objext conftest$ac_exeext
14432 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14433   (eval $ac_link) 2>conftest.er1
14434   ac_status=$?
14435   grep -v '^ *+' conftest.er1 >conftest.err
14436   rm -f conftest.er1
14437   cat conftest.err >&5
14438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14439   (exit $ac_status); } &&
14440          { ac_try='test -z "$ac_c_werror_flag"
14441                          || test ! -s conftest.err'
14442   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14443   (eval $ac_try) 2>&5
14444   ac_status=$?
14445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14446   (exit $ac_status); }; } &&
14447          { ac_try='test -s conftest$ac_exeext'
14448   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14449   (eval $ac_try) 2>&5
14450   ac_status=$?
14451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14452   (exit $ac_status); }; }; then
14453   eval "$as_ac_var=yes"
14454 else
14455   echo "$as_me: failed program was:" >&5
14456 sed 's/^/| /' conftest.$ac_ext >&5
14457
14458 eval "$as_ac_var=no"
14459 fi
14460 rm -f conftest.err conftest.$ac_objext \
14461       conftest$ac_exeext conftest.$ac_ext
14462 fi
14463 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14464 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14465 if test `eval echo '${'$as_ac_var'}'` = yes; then
14466   cat >>confdefs.h <<_ACEOF
14467 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14468 _ACEOF
14469
14470 fi
14471 done
14472
14473
14474 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
14475
14476 echo "$as_me:$LINENO: checking for sigset in -lV3" >&5
14477 echo $ECHO_N "checking for sigset in -lV3... $ECHO_C" >&6
14478 if test "${ac_cv_lib_V3_sigset+set}" = set; then
14479   echo $ECHO_N "(cached) $ECHO_C" >&6
14480 else
14481   ac_check_lib_save_LIBS=$LIBS
14482 LIBS="-lV3  $LIBS"
14483 cat >conftest.$ac_ext <<_ACEOF
14484 /* confdefs.h.  */
14485 _ACEOF
14486 cat confdefs.h >>conftest.$ac_ext
14487 cat >>conftest.$ac_ext <<_ACEOF
14488 /* end confdefs.h.  */
14489
14490 /* Override any gcc2 internal prototype to avoid an error.  */
14491 #ifdef __cplusplus
14492 extern "C"
14493 #endif
14494 /* We use char because int might match the return type of a gcc2
14495    builtin and then its argument prototype would still apply.  */
14496 char sigset ();
14497 int
14498 main ()
14499 {
14500 sigset ();
14501   ;
14502   return 0;
14503 }
14504 _ACEOF
14505 rm -f conftest.$ac_objext conftest$ac_exeext
14506 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14507   (eval $ac_link) 2>conftest.er1
14508   ac_status=$?
14509   grep -v '^ *+' conftest.er1 >conftest.err
14510   rm -f conftest.er1
14511   cat conftest.err >&5
14512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14513   (exit $ac_status); } &&
14514          { ac_try='test -z "$ac_c_werror_flag"
14515                          || test ! -s conftest.err'
14516   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14517   (eval $ac_try) 2>&5
14518   ac_status=$?
14519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14520   (exit $ac_status); }; } &&
14521          { ac_try='test -s conftest$ac_exeext'
14522   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14523   (eval $ac_try) 2>&5
14524   ac_status=$?
14525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14526   (exit $ac_status); }; }; then
14527   ac_cv_lib_V3_sigset=yes
14528 else
14529   echo "$as_me: failed program was:" >&5
14530 sed 's/^/| /' conftest.$ac_ext >&5
14531
14532 ac_cv_lib_V3_sigset=no
14533 fi
14534 rm -f conftest.err conftest.$ac_objext \
14535       conftest$ac_exeext conftest.$ac_ext
14536 LIBS=$ac_check_lib_save_LIBS
14537 fi
14538 echo "$as_me:$LINENO: result: $ac_cv_lib_V3_sigset" >&5
14539 echo "${ECHO_T}$ac_cv_lib_V3_sigset" >&6
14540 if test $ac_cv_lib_V3_sigset = yes; then
14541   cat >>confdefs.h <<_ACEOF
14542 #define HAVE_LIBV3 1
14543 _ACEOF
14544
14545   LIBS="-lV3 $LIBS"
14546
14547 fi
14548
14549 fi
14550
14551 if test "$ac_cv_cygwin" != yes && test "$ac_cv_header_winsock_h" = yes; then
14552 echo "$as_me:$LINENO: checking for winsock" >&5
14553 echo $ECHO_N "checking for winsock... $ECHO_C" >&6
14554 if test "${ol_cv_winsock+set}" = set; then
14555   echo $ECHO_N "(cached) $ECHO_C" >&6
14556 else
14557   save_LIBS="$LIBS"
14558 for curlib in ws2_32 wsock32; do
14559         LIBS="$LIBS -l$curlib"
14560         cat >conftest.$ac_ext <<_ACEOF
14561 /* confdefs.h.  */
14562 _ACEOF
14563 cat confdefs.h >>conftest.$ac_ext
14564 cat >>conftest.$ac_ext <<_ACEOF
14565 /* end confdefs.h.  */
14566 #include <winsock.h>
14567
14568 int
14569 main ()
14570 {
14571
14572                         socket(0,0,0);
14573                         select(0,NULL,NULL,NULL,NULL);
14574                         closesocket(0);
14575                         gethostname(NULL,0);
14576
14577   ;
14578   return 0;
14579 }
14580 _ACEOF
14581 rm -f conftest.$ac_objext conftest$ac_exeext
14582 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14583   (eval $ac_link) 2>conftest.er1
14584   ac_status=$?
14585   grep -v '^ *+' conftest.er1 >conftest.err
14586   rm -f conftest.er1
14587   cat conftest.err >&5
14588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14589   (exit $ac_status); } &&
14590          { ac_try='test -z "$ac_c_werror_flag"
14591                          || test ! -s conftest.err'
14592   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14593   (eval $ac_try) 2>&5
14594   ac_status=$?
14595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14596   (exit $ac_status); }; } &&
14597          { ac_try='test -s conftest$ac_exeext'
14598   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14599   (eval $ac_try) 2>&5
14600   ac_status=$?
14601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14602   (exit $ac_status); }; }; then
14603   ol_cv_winsock=yes
14604 else
14605   echo "$as_me: failed program was:" >&5
14606 sed 's/^/| /' conftest.$ac_ext >&5
14607
14608 ol_cv_winsock=no
14609 fi
14610 rm -f conftest.err conftest.$ac_objext \
14611       conftest$ac_exeext conftest.$ac_ext
14612
14613         if test $ol_cv_winsock = yes; then
14614
14615 cat >>confdefs.h <<\_ACEOF
14616 #define HAVE_WINSOCK 1
14617 _ACEOF
14618
14619                 ac_cv_func_socket=yes
14620                 ac_cv_func_select=yes
14621                 ac_cv_func_closesocket=yes
14622                 ac_cv_func_gethostname=yes
14623                 if test $curlib = ws2_32; then
14624                         ol_cv_winsock=winsock2
14625
14626 cat >>confdefs.h <<\_ACEOF
14627 #define HAVE_WINSOCK2 1
14628 _ACEOF
14629
14630                 fi
14631                 break
14632         fi
14633         LIBS="$save_LIBS"
14634 done
14635 fi
14636 echo "$as_me:$LINENO: result: $ol_cv_winsock" >&5
14637 echo "${ECHO_T}$ol_cv_winsock" >&6
14638 fi
14639
14640
14641 echo "$as_me:$LINENO: checking for socket" >&5
14642 echo $ECHO_N "checking for socket... $ECHO_C" >&6
14643 if test "${ac_cv_func_socket+set}" = set; then
14644   echo $ECHO_N "(cached) $ECHO_C" >&6
14645 else
14646   cat >conftest.$ac_ext <<_ACEOF
14647 /* confdefs.h.  */
14648 _ACEOF
14649 cat confdefs.h >>conftest.$ac_ext
14650 cat >>conftest.$ac_ext <<_ACEOF
14651 /* end confdefs.h.  */
14652 /* Define socket to an innocuous variant, in case <limits.h> declares socket.
14653    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14654 #define socket innocuous_socket
14655
14656 /* System header to define __stub macros and hopefully few prototypes,
14657     which can conflict with char socket (); below.
14658     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14659     <limits.h> exists even on freestanding compilers.  */
14660
14661 #ifdef __STDC__
14662 # include <limits.h>
14663 #else
14664 # include <assert.h>
14665 #endif
14666
14667 #undef socket
14668
14669 /* Override any gcc2 internal prototype to avoid an error.  */
14670 #ifdef __cplusplus
14671 extern "C"
14672 {
14673 #endif
14674 /* We use char because int might match the return type of a gcc2
14675    builtin and then its argument prototype would still apply.  */
14676 char socket ();
14677 /* The GNU C library defines this for functions which it implements
14678     to always fail with ENOSYS.  Some functions are actually named
14679     something starting with __ and the normal name is an alias.  */
14680 #if defined (__stub_socket) || defined (__stub___socket)
14681 choke me
14682 #else
14683 char (*f) () = socket;
14684 #endif
14685 #ifdef __cplusplus
14686 }
14687 #endif
14688
14689 int
14690 main ()
14691 {
14692 return f != socket;
14693   ;
14694   return 0;
14695 }
14696 _ACEOF
14697 rm -f conftest.$ac_objext conftest$ac_exeext
14698 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14699   (eval $ac_link) 2>conftest.er1
14700   ac_status=$?
14701   grep -v '^ *+' conftest.er1 >conftest.err
14702   rm -f conftest.er1
14703   cat conftest.err >&5
14704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14705   (exit $ac_status); } &&
14706          { ac_try='test -z "$ac_c_werror_flag"
14707                          || test ! -s conftest.err'
14708   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14709   (eval $ac_try) 2>&5
14710   ac_status=$?
14711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14712   (exit $ac_status); }; } &&
14713          { ac_try='test -s conftest$ac_exeext'
14714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14715   (eval $ac_try) 2>&5
14716   ac_status=$?
14717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14718   (exit $ac_status); }; }; then
14719   ac_cv_func_socket=yes
14720 else
14721   echo "$as_me: failed program was:" >&5
14722 sed 's/^/| /' conftest.$ac_ext >&5
14723
14724 ac_cv_func_socket=no
14725 fi
14726 rm -f conftest.err conftest.$ac_objext \
14727       conftest$ac_exeext conftest.$ac_ext
14728 fi
14729 echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
14730 echo "${ECHO_T}$ac_cv_func_socket" >&6
14731 if test $ac_cv_func_socket = yes; then
14732   :
14733 else
14734
14735
14736 echo "$as_me:$LINENO: checking for main in -lsocket" >&5
14737 echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
14738 if test "${ac_cv_lib_socket_main+set}" = set; then
14739   echo $ECHO_N "(cached) $ECHO_C" >&6
14740 else
14741   ac_check_lib_save_LIBS=$LIBS
14742 LIBS="-lsocket  $LIBS"
14743 cat >conftest.$ac_ext <<_ACEOF
14744 /* confdefs.h.  */
14745 _ACEOF
14746 cat confdefs.h >>conftest.$ac_ext
14747 cat >>conftest.$ac_ext <<_ACEOF
14748 /* end confdefs.h.  */
14749
14750
14751 int
14752 main ()
14753 {
14754 main ();
14755   ;
14756   return 0;
14757 }
14758 _ACEOF
14759 rm -f conftest.$ac_objext conftest$ac_exeext
14760 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14761   (eval $ac_link) 2>conftest.er1
14762   ac_status=$?
14763   grep -v '^ *+' conftest.er1 >conftest.err
14764   rm -f conftest.er1
14765   cat conftest.err >&5
14766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14767   (exit $ac_status); } &&
14768          { ac_try='test -z "$ac_c_werror_flag"
14769                          || test ! -s conftest.err'
14770   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14771   (eval $ac_try) 2>&5
14772   ac_status=$?
14773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14774   (exit $ac_status); }; } &&
14775          { ac_try='test -s conftest$ac_exeext'
14776   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14777   (eval $ac_try) 2>&5
14778   ac_status=$?
14779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14780   (exit $ac_status); }; }; then
14781   ac_cv_lib_socket_main=yes
14782 else
14783   echo "$as_me: failed program was:" >&5
14784 sed 's/^/| /' conftest.$ac_ext >&5
14785
14786 ac_cv_lib_socket_main=no
14787 fi
14788 rm -f conftest.err conftest.$ac_objext \
14789       conftest$ac_exeext conftest.$ac_ext
14790 LIBS=$ac_check_lib_save_LIBS
14791 fi
14792 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
14793 echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
14794 if test $ac_cv_lib_socket_main = yes; then
14795   cat >>confdefs.h <<_ACEOF
14796 #define HAVE_LIBSOCKET 1
14797 _ACEOF
14798
14799   LIBS="-lsocket $LIBS"
14800
14801 fi
14802
14803
14804 echo "$as_me:$LINENO: checking for main in -lnet" >&5
14805 echo $ECHO_N "checking for main in -lnet... $ECHO_C" >&6
14806 if test "${ac_cv_lib_net_main+set}" = set; then
14807   echo $ECHO_N "(cached) $ECHO_C" >&6
14808 else
14809   ac_check_lib_save_LIBS=$LIBS
14810 LIBS="-lnet  $LIBS"
14811 cat >conftest.$ac_ext <<_ACEOF
14812 /* confdefs.h.  */
14813 _ACEOF
14814 cat confdefs.h >>conftest.$ac_ext
14815 cat >>conftest.$ac_ext <<_ACEOF
14816 /* end confdefs.h.  */
14817
14818
14819 int
14820 main ()
14821 {
14822 main ();
14823   ;
14824   return 0;
14825 }
14826 _ACEOF
14827 rm -f conftest.$ac_objext conftest$ac_exeext
14828 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14829   (eval $ac_link) 2>conftest.er1
14830   ac_status=$?
14831   grep -v '^ *+' conftest.er1 >conftest.err
14832   rm -f conftest.er1
14833   cat conftest.err >&5
14834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14835   (exit $ac_status); } &&
14836          { ac_try='test -z "$ac_c_werror_flag"
14837                          || test ! -s conftest.err'
14838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14839   (eval $ac_try) 2>&5
14840   ac_status=$?
14841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14842   (exit $ac_status); }; } &&
14843          { ac_try='test -s conftest$ac_exeext'
14844   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14845   (eval $ac_try) 2>&5
14846   ac_status=$?
14847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14848   (exit $ac_status); }; }; then
14849   ac_cv_lib_net_main=yes
14850 else
14851   echo "$as_me: failed program was:" >&5
14852 sed 's/^/| /' conftest.$ac_ext >&5
14853
14854 ac_cv_lib_net_main=no
14855 fi
14856 rm -f conftest.err conftest.$ac_objext \
14857       conftest$ac_exeext conftest.$ac_ext
14858 LIBS=$ac_check_lib_save_LIBS
14859 fi
14860 echo "$as_me:$LINENO: result: $ac_cv_lib_net_main" >&5
14861 echo "${ECHO_T}$ac_cv_lib_net_main" >&6
14862 if test $ac_cv_lib_net_main = yes; then
14863   cat >>confdefs.h <<_ACEOF
14864 #define HAVE_LIBNET 1
14865 _ACEOF
14866
14867   LIBS="-lnet $LIBS"
14868
14869 fi
14870
14871
14872 echo "$as_me:$LINENO: checking for main in -lnsl_s" >&5
14873 echo $ECHO_N "checking for main in -lnsl_s... $ECHO_C" >&6
14874 if test "${ac_cv_lib_nsl_s_main+set}" = set; then
14875   echo $ECHO_N "(cached) $ECHO_C" >&6
14876 else
14877   ac_check_lib_save_LIBS=$LIBS
14878 LIBS="-lnsl_s  $LIBS"
14879 cat >conftest.$ac_ext <<_ACEOF
14880 /* confdefs.h.  */
14881 _ACEOF
14882 cat confdefs.h >>conftest.$ac_ext
14883 cat >>conftest.$ac_ext <<_ACEOF
14884 /* end confdefs.h.  */
14885
14886
14887 int
14888 main ()
14889 {
14890 main ();
14891   ;
14892   return 0;
14893 }
14894 _ACEOF
14895 rm -f conftest.$ac_objext conftest$ac_exeext
14896 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14897   (eval $ac_link) 2>conftest.er1
14898   ac_status=$?
14899   grep -v '^ *+' conftest.er1 >conftest.err
14900   rm -f conftest.er1
14901   cat conftest.err >&5
14902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14903   (exit $ac_status); } &&
14904          { ac_try='test -z "$ac_c_werror_flag"
14905                          || test ! -s conftest.err'
14906   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14907   (eval $ac_try) 2>&5
14908   ac_status=$?
14909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14910   (exit $ac_status); }; } &&
14911          { ac_try='test -s conftest$ac_exeext'
14912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14913   (eval $ac_try) 2>&5
14914   ac_status=$?
14915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14916   (exit $ac_status); }; }; then
14917   ac_cv_lib_nsl_s_main=yes
14918 else
14919   echo "$as_me: failed program was:" >&5
14920 sed 's/^/| /' conftest.$ac_ext >&5
14921
14922 ac_cv_lib_nsl_s_main=no
14923 fi
14924 rm -f conftest.err conftest.$ac_objext \
14925       conftest$ac_exeext conftest.$ac_ext
14926 LIBS=$ac_check_lib_save_LIBS
14927 fi
14928 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_s_main" >&5
14929 echo "${ECHO_T}$ac_cv_lib_nsl_s_main" >&6
14930 if test $ac_cv_lib_nsl_s_main = yes; then
14931   cat >>confdefs.h <<_ACEOF
14932 #define HAVE_LIBNSL_S 1
14933 _ACEOF
14934
14935   LIBS="-lnsl_s $LIBS"
14936
14937 fi
14938
14939
14940 echo "$as_me:$LINENO: checking for main in -lnsl" >&5
14941 echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
14942 if test "${ac_cv_lib_nsl_main+set}" = set; then
14943   echo $ECHO_N "(cached) $ECHO_C" >&6
14944 else
14945   ac_check_lib_save_LIBS=$LIBS
14946 LIBS="-lnsl  $LIBS"
14947 cat >conftest.$ac_ext <<_ACEOF
14948 /* confdefs.h.  */
14949 _ACEOF
14950 cat confdefs.h >>conftest.$ac_ext
14951 cat >>conftest.$ac_ext <<_ACEOF
14952 /* end confdefs.h.  */
14953
14954
14955 int
14956 main ()
14957 {
14958 main ();
14959   ;
14960   return 0;
14961 }
14962 _ACEOF
14963 rm -f conftest.$ac_objext conftest$ac_exeext
14964 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14965   (eval $ac_link) 2>conftest.er1
14966   ac_status=$?
14967   grep -v '^ *+' conftest.er1 >conftest.err
14968   rm -f conftest.er1
14969   cat conftest.err >&5
14970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14971   (exit $ac_status); } &&
14972          { ac_try='test -z "$ac_c_werror_flag"
14973                          || test ! -s conftest.err'
14974   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14975   (eval $ac_try) 2>&5
14976   ac_status=$?
14977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14978   (exit $ac_status); }; } &&
14979          { ac_try='test -s conftest$ac_exeext'
14980   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14981   (eval $ac_try) 2>&5
14982   ac_status=$?
14983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14984   (exit $ac_status); }; }; then
14985   ac_cv_lib_nsl_main=yes
14986 else
14987   echo "$as_me: failed program was:" >&5
14988 sed 's/^/| /' conftest.$ac_ext >&5
14989
14990 ac_cv_lib_nsl_main=no
14991 fi
14992 rm -f conftest.err conftest.$ac_objext \
14993       conftest$ac_exeext conftest.$ac_ext
14994 LIBS=$ac_check_lib_save_LIBS
14995 fi
14996 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
14997 echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
14998 if test $ac_cv_lib_nsl_main = yes; then
14999   cat >>confdefs.h <<_ACEOF
15000 #define HAVE_LIBNSL 1
15001 _ACEOF
15002
15003   LIBS="-lnsl $LIBS"
15004
15005 fi
15006
15007
15008 echo "$as_me:$LINENO: checking for socket in -linet" >&5
15009 echo $ECHO_N "checking for socket in -linet... $ECHO_C" >&6
15010 if test "${ac_cv_lib_inet_socket+set}" = set; then
15011   echo $ECHO_N "(cached) $ECHO_C" >&6
15012 else
15013   ac_check_lib_save_LIBS=$LIBS
15014 LIBS="-linet  $LIBS"
15015 cat >conftest.$ac_ext <<_ACEOF
15016 /* confdefs.h.  */
15017 _ACEOF
15018 cat confdefs.h >>conftest.$ac_ext
15019 cat >>conftest.$ac_ext <<_ACEOF
15020 /* end confdefs.h.  */
15021
15022 /* Override any gcc2 internal prototype to avoid an error.  */
15023 #ifdef __cplusplus
15024 extern "C"
15025 #endif
15026 /* We use char because int might match the return type of a gcc2
15027    builtin and then its argument prototype would still apply.  */
15028 char socket ();
15029 int
15030 main ()
15031 {
15032 socket ();
15033   ;
15034   return 0;
15035 }
15036 _ACEOF
15037 rm -f conftest.$ac_objext conftest$ac_exeext
15038 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15039   (eval $ac_link) 2>conftest.er1
15040   ac_status=$?
15041   grep -v '^ *+' conftest.er1 >conftest.err
15042   rm -f conftest.er1
15043   cat conftest.err >&5
15044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15045   (exit $ac_status); } &&
15046          { ac_try='test -z "$ac_c_werror_flag"
15047                          || test ! -s conftest.err'
15048   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15049   (eval $ac_try) 2>&5
15050   ac_status=$?
15051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15052   (exit $ac_status); }; } &&
15053          { ac_try='test -s conftest$ac_exeext'
15054   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15055   (eval $ac_try) 2>&5
15056   ac_status=$?
15057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15058   (exit $ac_status); }; }; then
15059   ac_cv_lib_inet_socket=yes
15060 else
15061   echo "$as_me: failed program was:" >&5
15062 sed 's/^/| /' conftest.$ac_ext >&5
15063
15064 ac_cv_lib_inet_socket=no
15065 fi
15066 rm -f conftest.err conftest.$ac_objext \
15067       conftest$ac_exeext conftest.$ac_ext
15068 LIBS=$ac_check_lib_save_LIBS
15069 fi
15070 echo "$as_me:$LINENO: result: $ac_cv_lib_inet_socket" >&5
15071 echo "${ECHO_T}$ac_cv_lib_inet_socket" >&6
15072 if test $ac_cv_lib_inet_socket = yes; then
15073   cat >>confdefs.h <<_ACEOF
15074 #define HAVE_LIBINET 1
15075 _ACEOF
15076
15077   LIBS="-linet $LIBS"
15078
15079 fi
15080
15081
15082 echo "$as_me:$LINENO: checking for main in -lgen" >&5
15083 echo $ECHO_N "checking for main in -lgen... $ECHO_C" >&6
15084 if test "${ac_cv_lib_gen_main+set}" = set; then
15085   echo $ECHO_N "(cached) $ECHO_C" >&6
15086 else
15087   ac_check_lib_save_LIBS=$LIBS
15088 LIBS="-lgen  $LIBS"
15089 cat >conftest.$ac_ext <<_ACEOF
15090 /* confdefs.h.  */
15091 _ACEOF
15092 cat confdefs.h >>conftest.$ac_ext
15093 cat >>conftest.$ac_ext <<_ACEOF
15094 /* end confdefs.h.  */
15095
15096
15097 int
15098 main ()
15099 {
15100 main ();
15101   ;
15102   return 0;
15103 }
15104 _ACEOF
15105 rm -f conftest.$ac_objext conftest$ac_exeext
15106 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15107   (eval $ac_link) 2>conftest.er1
15108   ac_status=$?
15109   grep -v '^ *+' conftest.er1 >conftest.err
15110   rm -f conftest.er1
15111   cat conftest.err >&5
15112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15113   (exit $ac_status); } &&
15114          { ac_try='test -z "$ac_c_werror_flag"
15115                          || test ! -s conftest.err'
15116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15117   (eval $ac_try) 2>&5
15118   ac_status=$?
15119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15120   (exit $ac_status); }; } &&
15121          { ac_try='test -s conftest$ac_exeext'
15122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15123   (eval $ac_try) 2>&5
15124   ac_status=$?
15125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15126   (exit $ac_status); }; }; then
15127   ac_cv_lib_gen_main=yes
15128 else
15129   echo "$as_me: failed program was:" >&5
15130 sed 's/^/| /' conftest.$ac_ext >&5
15131
15132 ac_cv_lib_gen_main=no
15133 fi
15134 rm -f conftest.err conftest.$ac_objext \
15135       conftest$ac_exeext conftest.$ac_ext
15136 LIBS=$ac_check_lib_save_LIBS
15137 fi
15138 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_main" >&5
15139 echo "${ECHO_T}$ac_cv_lib_gen_main" >&6
15140 if test $ac_cv_lib_gen_main = yes; then
15141   cat >>confdefs.h <<_ACEOF
15142 #define HAVE_LIBGEN 1
15143 _ACEOF
15144
15145   LIBS="-lgen $LIBS"
15146
15147 fi
15148
15149
15150 fi
15151
15152
15153 echo "$as_me:$LINENO: checking for select" >&5
15154 echo $ECHO_N "checking for select... $ECHO_C" >&6
15155 if test "${ac_cv_func_select+set}" = set; then
15156   echo $ECHO_N "(cached) $ECHO_C" >&6
15157 else
15158   cat >conftest.$ac_ext <<_ACEOF
15159 /* confdefs.h.  */
15160 _ACEOF
15161 cat confdefs.h >>conftest.$ac_ext
15162 cat >>conftest.$ac_ext <<_ACEOF
15163 /* end confdefs.h.  */
15164 /* Define select to an innocuous variant, in case <limits.h> declares select.
15165    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15166 #define select innocuous_select
15167
15168 /* System header to define __stub macros and hopefully few prototypes,
15169     which can conflict with char select (); below.
15170     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15171     <limits.h> exists even on freestanding compilers.  */
15172
15173 #ifdef __STDC__
15174 # include <limits.h>
15175 #else
15176 # include <assert.h>
15177 #endif
15178
15179 #undef select
15180
15181 /* Override any gcc2 internal prototype to avoid an error.  */
15182 #ifdef __cplusplus
15183 extern "C"
15184 {
15185 #endif
15186 /* We use char because int might match the return type of a gcc2
15187    builtin and then its argument prototype would still apply.  */
15188 char select ();
15189 /* The GNU C library defines this for functions which it implements
15190     to always fail with ENOSYS.  Some functions are actually named
15191     something starting with __ and the normal name is an alias.  */
15192 #if defined (__stub_select) || defined (__stub___select)
15193 choke me
15194 #else
15195 char (*f) () = select;
15196 #endif
15197 #ifdef __cplusplus
15198 }
15199 #endif
15200
15201 int
15202 main ()
15203 {
15204 return f != select;
15205   ;
15206   return 0;
15207 }
15208 _ACEOF
15209 rm -f conftest.$ac_objext conftest$ac_exeext
15210 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15211   (eval $ac_link) 2>conftest.er1
15212   ac_status=$?
15213   grep -v '^ *+' conftest.er1 >conftest.err
15214   rm -f conftest.er1
15215   cat conftest.err >&5
15216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15217   (exit $ac_status); } &&
15218          { ac_try='test -z "$ac_c_werror_flag"
15219                          || test ! -s conftest.err'
15220   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15221   (eval $ac_try) 2>&5
15222   ac_status=$?
15223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15224   (exit $ac_status); }; } &&
15225          { ac_try='test -s conftest$ac_exeext'
15226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15227   (eval $ac_try) 2>&5
15228   ac_status=$?
15229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15230   (exit $ac_status); }; }; then
15231   ac_cv_func_select=yes
15232 else
15233   echo "$as_me: failed program was:" >&5
15234 sed 's/^/| /' conftest.$ac_ext >&5
15235
15236 ac_cv_func_select=no
15237 fi
15238 rm -f conftest.err conftest.$ac_objext \
15239       conftest$ac_exeext conftest.$ac_ext
15240 fi
15241 echo "$as_me:$LINENO: result: $ac_cv_func_select" >&5
15242 echo "${ECHO_T}$ac_cv_func_select" >&6
15243 if test $ac_cv_func_select = yes; then
15244   :
15245 else
15246   { { echo "$as_me:$LINENO: error: select() required." >&5
15247 echo "$as_me: error: select() required." >&2;}
15248    { (exit 1); exit 1; }; }
15249 fi
15250
15251
15252 if test "${ac_cv_header_winsock_h}" != yes; then
15253
15254
15255 for ac_header in sys/select.h sys/socket.h
15256 do
15257 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15258 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15259   echo "$as_me:$LINENO: checking for $ac_header" >&5
15260 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15261 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15262   echo $ECHO_N "(cached) $ECHO_C" >&6
15263 fi
15264 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15265 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15266 else
15267   # Is the header compilable?
15268 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15269 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15270 cat >conftest.$ac_ext <<_ACEOF
15271 /* confdefs.h.  */
15272 _ACEOF
15273 cat confdefs.h >>conftest.$ac_ext
15274 cat >>conftest.$ac_ext <<_ACEOF
15275 /* end confdefs.h.  */
15276 $ac_includes_default
15277 #include <$ac_header>
15278 _ACEOF
15279 rm -f conftest.$ac_objext
15280 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15281   (eval $ac_compile) 2>conftest.er1
15282   ac_status=$?
15283   grep -v '^ *+' conftest.er1 >conftest.err
15284   rm -f conftest.er1
15285   cat conftest.err >&5
15286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15287   (exit $ac_status); } &&
15288          { ac_try='test -z "$ac_c_werror_flag"
15289                          || test ! -s conftest.err'
15290   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15291   (eval $ac_try) 2>&5
15292   ac_status=$?
15293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15294   (exit $ac_status); }; } &&
15295          { ac_try='test -s conftest.$ac_objext'
15296   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15297   (eval $ac_try) 2>&5
15298   ac_status=$?
15299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15300   (exit $ac_status); }; }; then
15301   ac_header_compiler=yes
15302 else
15303   echo "$as_me: failed program was:" >&5
15304 sed 's/^/| /' conftest.$ac_ext >&5
15305
15306 ac_header_compiler=no
15307 fi
15308 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15309 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15310 echo "${ECHO_T}$ac_header_compiler" >&6
15311
15312 # Is the header present?
15313 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15314 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15315 cat >conftest.$ac_ext <<_ACEOF
15316 /* confdefs.h.  */
15317 _ACEOF
15318 cat confdefs.h >>conftest.$ac_ext
15319 cat >>conftest.$ac_ext <<_ACEOF
15320 /* end confdefs.h.  */
15321 #include <$ac_header>
15322 _ACEOF
15323 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15324   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15325   ac_status=$?
15326   grep -v '^ *+' conftest.er1 >conftest.err
15327   rm -f conftest.er1
15328   cat conftest.err >&5
15329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15330   (exit $ac_status); } >/dev/null; then
15331   if test -s conftest.err; then
15332     ac_cpp_err=$ac_c_preproc_warn_flag
15333     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15334   else
15335     ac_cpp_err=
15336   fi
15337 else
15338   ac_cpp_err=yes
15339 fi
15340 if test -z "$ac_cpp_err"; then
15341   ac_header_preproc=yes
15342 else
15343   echo "$as_me: failed program was:" >&5
15344 sed 's/^/| /' conftest.$ac_ext >&5
15345
15346   ac_header_preproc=no
15347 fi
15348 rm -f conftest.err conftest.$ac_ext
15349 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15350 echo "${ECHO_T}$ac_header_preproc" >&6
15351
15352 # So?  What about this header?
15353 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15354   yes:no: )
15355     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15356 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15357     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15358 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15359     ac_header_preproc=yes
15360     ;;
15361   no:yes:* )
15362     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15363 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15364     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15365 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15366     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15367 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15368     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15369 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15370     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15371 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15372     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15373 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15374     (
15375       cat <<\_ASBOX
15376 ## --------------------------------------------- ##
15377 ## Report this to <http://www.openldap.org/its/> ##
15378 ## --------------------------------------------- ##
15379 _ASBOX
15380     ) |
15381       sed "s/^/$as_me: WARNING:     /" >&2
15382     ;;
15383 esac
15384 echo "$as_me:$LINENO: checking for $ac_header" >&5
15385 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15386 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15387   echo $ECHO_N "(cached) $ECHO_C" >&6
15388 else
15389   eval "$as_ac_Header=\$ac_header_preproc"
15390 fi
15391 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15392 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15393
15394 fi
15395 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15396   cat >>confdefs.h <<_ACEOF
15397 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15398 _ACEOF
15399
15400 fi
15401
15402 done
15403
15404 echo "$as_me:$LINENO: checking types of arguments for select" >&5
15405 echo $ECHO_N "checking types of arguments for select... $ECHO_C" >&6
15406 if test "${ac_cv_func_select_args+set}" = set; then
15407   echo $ECHO_N "(cached) $ECHO_C" >&6
15408 else
15409   for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
15410  for ac_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
15411   for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
15412    cat >conftest.$ac_ext <<_ACEOF
15413 /* confdefs.h.  */
15414 _ACEOF
15415 cat confdefs.h >>conftest.$ac_ext
15416 cat >>conftest.$ac_ext <<_ACEOF
15417 /* end confdefs.h.  */
15418 $ac_includes_default
15419 #if HAVE_SYS_SELECT_H
15420 # include <sys/select.h>
15421 #endif
15422 #if HAVE_SYS_SOCKET_H
15423 # include <sys/socket.h>
15424 #endif
15425
15426 int
15427 main ()
15428 {
15429 extern int select ($ac_arg1,
15430                                             $ac_arg234, $ac_arg234, $ac_arg234,
15431                                             $ac_arg5);
15432   ;
15433   return 0;
15434 }
15435 _ACEOF
15436 rm -f conftest.$ac_objext
15437 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15438   (eval $ac_compile) 2>conftest.er1
15439   ac_status=$?
15440   grep -v '^ *+' conftest.er1 >conftest.err
15441   rm -f conftest.er1
15442   cat conftest.err >&5
15443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15444   (exit $ac_status); } &&
15445          { ac_try='test -z "$ac_c_werror_flag"
15446                          || test ! -s conftest.err'
15447   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15448   (eval $ac_try) 2>&5
15449   ac_status=$?
15450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15451   (exit $ac_status); }; } &&
15452          { ac_try='test -s conftest.$ac_objext'
15453   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15454   (eval $ac_try) 2>&5
15455   ac_status=$?
15456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15457   (exit $ac_status); }; }; then
15458   ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
15459 else
15460   echo "$as_me: failed program was:" >&5
15461 sed 's/^/| /' conftest.$ac_ext >&5
15462
15463 fi
15464 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15465   done
15466  done
15467 done
15468 # Provide a safe default value.
15469 : ${ac_cv_func_select_args='int,int *,struct timeval *'}
15470
15471 fi
15472 echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5
15473 echo "${ECHO_T}$ac_cv_func_select_args" >&6
15474 ac_save_IFS=$IFS; IFS=','
15475 set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
15476 IFS=$ac_save_IFS
15477 shift
15478
15479 cat >>confdefs.h <<_ACEOF
15480 #define SELECT_TYPE_ARG1 $1
15481 _ACEOF
15482
15483
15484 cat >>confdefs.h <<_ACEOF
15485 #define SELECT_TYPE_ARG234 ($2)
15486 _ACEOF
15487
15488
15489 cat >>confdefs.h <<_ACEOF
15490 #define SELECT_TYPE_ARG5 ($3)
15491 _ACEOF
15492
15493 rm -f conftest*
15494
15495 fi
15496
15497
15498
15499 for ac_func in poll
15500 do
15501 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15502 echo "$as_me:$LINENO: checking for $ac_func" >&5
15503 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15504 if eval "test \"\${$as_ac_var+set}\" = set"; then
15505   echo $ECHO_N "(cached) $ECHO_C" >&6
15506 else
15507   cat >conftest.$ac_ext <<_ACEOF
15508 /* confdefs.h.  */
15509 _ACEOF
15510 cat confdefs.h >>conftest.$ac_ext
15511 cat >>conftest.$ac_ext <<_ACEOF
15512 /* end confdefs.h.  */
15513 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15514    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15515 #define $ac_func innocuous_$ac_func
15516
15517 /* System header to define __stub macros and hopefully few prototypes,
15518     which can conflict with char $ac_func (); below.
15519     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15520     <limits.h> exists even on freestanding compilers.  */
15521
15522 #ifdef __STDC__
15523 # include <limits.h>
15524 #else
15525 # include <assert.h>
15526 #endif
15527
15528 #undef $ac_func
15529
15530 /* Override any gcc2 internal prototype to avoid an error.  */
15531 #ifdef __cplusplus
15532 extern "C"
15533 {
15534 #endif
15535 /* We use char because int might match the return type of a gcc2
15536    builtin and then its argument prototype would still apply.  */
15537 char $ac_func ();
15538 /* The GNU C library defines this for functions which it implements
15539     to always fail with ENOSYS.  Some functions are actually named
15540     something starting with __ and the normal name is an alias.  */
15541 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15542 choke me
15543 #else
15544 char (*f) () = $ac_func;
15545 #endif
15546 #ifdef __cplusplus
15547 }
15548 #endif
15549
15550 int
15551 main ()
15552 {
15553 return f != $ac_func;
15554   ;
15555   return 0;
15556 }
15557 _ACEOF
15558 rm -f conftest.$ac_objext conftest$ac_exeext
15559 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15560   (eval $ac_link) 2>conftest.er1
15561   ac_status=$?
15562   grep -v '^ *+' conftest.er1 >conftest.err
15563   rm -f conftest.er1
15564   cat conftest.err >&5
15565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15566   (exit $ac_status); } &&
15567          { ac_try='test -z "$ac_c_werror_flag"
15568                          || test ! -s conftest.err'
15569   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15570   (eval $ac_try) 2>&5
15571   ac_status=$?
15572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15573   (exit $ac_status); }; } &&
15574          { ac_try='test -s conftest$ac_exeext'
15575   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15576   (eval $ac_try) 2>&5
15577   ac_status=$?
15578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15579   (exit $ac_status); }; }; then
15580   eval "$as_ac_var=yes"
15581 else
15582   echo "$as_me: failed program was:" >&5
15583 sed 's/^/| /' conftest.$ac_ext >&5
15584
15585 eval "$as_ac_var=no"
15586 fi
15587 rm -f conftest.err conftest.$ac_objext \
15588       conftest$ac_exeext conftest.$ac_ext
15589 fi
15590 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15591 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15592 if test `eval echo '${'$as_ac_var'}'` = yes; then
15593   cat >>confdefs.h <<_ACEOF
15594 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15595 _ACEOF
15596
15597 fi
15598 done
15599
15600
15601 for ac_header in poll.h
15602 do
15603 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15604 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15605   echo "$as_me:$LINENO: checking for $ac_header" >&5
15606 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15607 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15608   echo $ECHO_N "(cached) $ECHO_C" >&6
15609 fi
15610 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15611 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15612 else
15613   # Is the header compilable?
15614 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15615 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15616 cat >conftest.$ac_ext <<_ACEOF
15617 /* confdefs.h.  */
15618 _ACEOF
15619 cat confdefs.h >>conftest.$ac_ext
15620 cat >>conftest.$ac_ext <<_ACEOF
15621 /* end confdefs.h.  */
15622 $ac_includes_default
15623 #include <$ac_header>
15624 _ACEOF
15625 rm -f conftest.$ac_objext
15626 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15627   (eval $ac_compile) 2>conftest.er1
15628   ac_status=$?
15629   grep -v '^ *+' conftest.er1 >conftest.err
15630   rm -f conftest.er1
15631   cat conftest.err >&5
15632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15633   (exit $ac_status); } &&
15634          { ac_try='test -z "$ac_c_werror_flag"
15635                          || test ! -s conftest.err'
15636   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15637   (eval $ac_try) 2>&5
15638   ac_status=$?
15639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15640   (exit $ac_status); }; } &&
15641          { ac_try='test -s conftest.$ac_objext'
15642   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15643   (eval $ac_try) 2>&5
15644   ac_status=$?
15645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15646   (exit $ac_status); }; }; then
15647   ac_header_compiler=yes
15648 else
15649   echo "$as_me: failed program was:" >&5
15650 sed 's/^/| /' conftest.$ac_ext >&5
15651
15652 ac_header_compiler=no
15653 fi
15654 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15655 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15656 echo "${ECHO_T}$ac_header_compiler" >&6
15657
15658 # Is the header present?
15659 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15660 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15661 cat >conftest.$ac_ext <<_ACEOF
15662 /* confdefs.h.  */
15663 _ACEOF
15664 cat confdefs.h >>conftest.$ac_ext
15665 cat >>conftest.$ac_ext <<_ACEOF
15666 /* end confdefs.h.  */
15667 #include <$ac_header>
15668 _ACEOF
15669 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15670   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15671   ac_status=$?
15672   grep -v '^ *+' conftest.er1 >conftest.err
15673   rm -f conftest.er1
15674   cat conftest.err >&5
15675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15676   (exit $ac_status); } >/dev/null; then
15677   if test -s conftest.err; then
15678     ac_cpp_err=$ac_c_preproc_warn_flag
15679     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15680   else
15681     ac_cpp_err=
15682   fi
15683 else
15684   ac_cpp_err=yes
15685 fi
15686 if test -z "$ac_cpp_err"; then
15687   ac_header_preproc=yes
15688 else
15689   echo "$as_me: failed program was:" >&5
15690 sed 's/^/| /' conftest.$ac_ext >&5
15691
15692   ac_header_preproc=no
15693 fi
15694 rm -f conftest.err conftest.$ac_ext
15695 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15696 echo "${ECHO_T}$ac_header_preproc" >&6
15697
15698 # So?  What about this header?
15699 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15700   yes:no: )
15701     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15702 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15703     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15704 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15705     ac_header_preproc=yes
15706     ;;
15707   no:yes:* )
15708     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15709 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15710     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15711 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15712     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15713 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15714     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15715 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15716     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15717 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15718     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15719 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15720     (
15721       cat <<\_ASBOX
15722 ## --------------------------------------------- ##
15723 ## Report this to <http://www.openldap.org/its/> ##
15724 ## --------------------------------------------- ##
15725 _ASBOX
15726     ) |
15727       sed "s/^/$as_me: WARNING:     /" >&2
15728     ;;
15729 esac
15730 echo "$as_me:$LINENO: checking for $ac_header" >&5
15731 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15732 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15733   echo $ECHO_N "(cached) $ECHO_C" >&6
15734 else
15735   eval "$as_ac_Header=\$ac_header_preproc"
15736 fi
15737 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15738 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15739
15740 fi
15741 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15742   cat >>confdefs.h <<_ACEOF
15743 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15744 _ACEOF
15745
15746 fi
15747
15748 done
15749
15750
15751
15752 for ac_header in sys/epoll.h
15753 do
15754 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15755 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15756   echo "$as_me:$LINENO: checking for $ac_header" >&5
15757 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15758 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15759   echo $ECHO_N "(cached) $ECHO_C" >&6
15760 fi
15761 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15762 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15763 else
15764   # Is the header compilable?
15765 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15766 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15767 cat >conftest.$ac_ext <<_ACEOF
15768 /* confdefs.h.  */
15769 _ACEOF
15770 cat confdefs.h >>conftest.$ac_ext
15771 cat >>conftest.$ac_ext <<_ACEOF
15772 /* end confdefs.h.  */
15773 $ac_includes_default
15774 #include <$ac_header>
15775 _ACEOF
15776 rm -f conftest.$ac_objext
15777 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15778   (eval $ac_compile) 2>conftest.er1
15779   ac_status=$?
15780   grep -v '^ *+' conftest.er1 >conftest.err
15781   rm -f conftest.er1
15782   cat conftest.err >&5
15783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15784   (exit $ac_status); } &&
15785          { ac_try='test -z "$ac_c_werror_flag"
15786                          || test ! -s conftest.err'
15787   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15788   (eval $ac_try) 2>&5
15789   ac_status=$?
15790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15791   (exit $ac_status); }; } &&
15792          { ac_try='test -s conftest.$ac_objext'
15793   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15794   (eval $ac_try) 2>&5
15795   ac_status=$?
15796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15797   (exit $ac_status); }; }; then
15798   ac_header_compiler=yes
15799 else
15800   echo "$as_me: failed program was:" >&5
15801 sed 's/^/| /' conftest.$ac_ext >&5
15802
15803 ac_header_compiler=no
15804 fi
15805 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15806 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15807 echo "${ECHO_T}$ac_header_compiler" >&6
15808
15809 # Is the header present?
15810 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15811 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15812 cat >conftest.$ac_ext <<_ACEOF
15813 /* confdefs.h.  */
15814 _ACEOF
15815 cat confdefs.h >>conftest.$ac_ext
15816 cat >>conftest.$ac_ext <<_ACEOF
15817 /* end confdefs.h.  */
15818 #include <$ac_header>
15819 _ACEOF
15820 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15821   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15822   ac_status=$?
15823   grep -v '^ *+' conftest.er1 >conftest.err
15824   rm -f conftest.er1
15825   cat conftest.err >&5
15826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15827   (exit $ac_status); } >/dev/null; then
15828   if test -s conftest.err; then
15829     ac_cpp_err=$ac_c_preproc_warn_flag
15830     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15831   else
15832     ac_cpp_err=
15833   fi
15834 else
15835   ac_cpp_err=yes
15836 fi
15837 if test -z "$ac_cpp_err"; then
15838   ac_header_preproc=yes
15839 else
15840   echo "$as_me: failed program was:" >&5
15841 sed 's/^/| /' conftest.$ac_ext >&5
15842
15843   ac_header_preproc=no
15844 fi
15845 rm -f conftest.err conftest.$ac_ext
15846 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15847 echo "${ECHO_T}$ac_header_preproc" >&6
15848
15849 # So?  What about this header?
15850 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15851   yes:no: )
15852     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15853 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15854     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15855 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15856     ac_header_preproc=yes
15857     ;;
15858   no:yes:* )
15859     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15860 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15861     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15862 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15863     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15864 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15865     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15866 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15867     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15868 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15869     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15870 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15871     (
15872       cat <<\_ASBOX
15873 ## --------------------------------------------- ##
15874 ## Report this to <http://www.openldap.org/its/> ##
15875 ## --------------------------------------------- ##
15876 _ASBOX
15877     ) |
15878       sed "s/^/$as_me: WARNING:     /" >&2
15879     ;;
15880 esac
15881 echo "$as_me:$LINENO: checking for $ac_header" >&5
15882 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15883 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15884   echo $ECHO_N "(cached) $ECHO_C" >&6
15885 else
15886   eval "$as_ac_Header=\$ac_header_preproc"
15887 fi
15888 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15889 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15890
15891 fi
15892 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15893   cat >>confdefs.h <<_ACEOF
15894 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15895 _ACEOF
15896
15897 fi
15898
15899 done
15900
15901 if test "${ac_cv_header_sys_epoll_h}" = yes; then
15902 echo "$as_me:$LINENO: checking for epoll system call" >&5
15903 echo $ECHO_N "checking for epoll system call... $ECHO_C" >&6
15904 if test "$cross_compiling" = yes; then
15905   echo "$as_me:$LINENO: result: no" >&5
15906 echo "${ECHO_T}no" >&6
15907 else
15908   cat >conftest.$ac_ext <<_ACEOF
15909 /* confdefs.h.  */
15910 _ACEOF
15911 cat confdefs.h >>conftest.$ac_ext
15912 cat >>conftest.$ac_ext <<_ACEOF
15913 /* end confdefs.h.  */
15914 int main(int argc, char *argv)
15915 {
15916         int epfd = epoll_create(256);
15917         exit (epfd == -1 ? 1 : 0);
15918 }
15919 _ACEOF
15920 rm -f conftest$ac_exeext
15921 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15922   (eval $ac_link) 2>&5
15923   ac_status=$?
15924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15925   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15926   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15927   (eval $ac_try) 2>&5
15928   ac_status=$?
15929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15930   (exit $ac_status); }; }; then
15931   echo "$as_me:$LINENO: result: yes" >&5
15932 echo "${ECHO_T}yes" >&6
15933
15934 cat >>confdefs.h <<\_ACEOF
15935 #define HAVE_EPOLL 1
15936 _ACEOF
15937
15938 else
15939   echo "$as_me: program exited with status $ac_status" >&5
15940 echo "$as_me: failed program was:" >&5
15941 sed 's/^/| /' conftest.$ac_ext >&5
15942
15943 ( exit $ac_status )
15944 echo "$as_me:$LINENO: result: no" >&5
15945 echo "${ECHO_T}no" >&6
15946 fi
15947 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15948 fi
15949 fi
15950
15951 # strerror checks
15952 echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5
15953 echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6
15954 if test "${ol_cv_dcl_sys_errlist+set}" = set; then
15955   echo $ECHO_N "(cached) $ECHO_C" >&6
15956 else
15957
15958         cat >conftest.$ac_ext <<_ACEOF
15959 /* confdefs.h.  */
15960 _ACEOF
15961 cat confdefs.h >>conftest.$ac_ext
15962 cat >>conftest.$ac_ext <<_ACEOF
15963 /* end confdefs.h.  */
15964
15965 #include <stdio.h>
15966 #include <sys/types.h>
15967 #include <errno.h>
15968 #ifdef WINNT
15969 #include <stdlib.h>
15970 #endif
15971 int
15972 main ()
15973 {
15974 char *c = (char *) *sys_errlist
15975   ;
15976   return 0;
15977 }
15978 _ACEOF
15979 rm -f conftest.$ac_objext
15980 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15981   (eval $ac_compile) 2>conftest.er1
15982   ac_status=$?
15983   grep -v '^ *+' conftest.er1 >conftest.err
15984   rm -f conftest.er1
15985   cat conftest.err >&5
15986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15987   (exit $ac_status); } &&
15988          { ac_try='test -z "$ac_c_werror_flag"
15989                          || test ! -s conftest.err'
15990   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15991   (eval $ac_try) 2>&5
15992   ac_status=$?
15993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15994   (exit $ac_status); }; } &&
15995          { ac_try='test -s conftest.$ac_objext'
15996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15997   (eval $ac_try) 2>&5
15998   ac_status=$?
15999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16000   (exit $ac_status); }; }; then
16001   ol_cv_dcl_sys_errlist=yes
16002         ol_cv_have_sys_errlist=yes
16003 else
16004   echo "$as_me: failed program was:" >&5
16005 sed 's/^/| /' conftest.$ac_ext >&5
16006
16007 ol_cv_dcl_sys_errlist=no
16008 fi
16009 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16010 fi
16011 echo "$as_me:$LINENO: result: $ol_cv_dcl_sys_errlist" >&5
16012 echo "${ECHO_T}$ol_cv_dcl_sys_errlist" >&6
16013 #
16014 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16015 if test $ol_cv_dcl_sys_errlist = no ; then
16016
16017 cat >>confdefs.h <<\_ACEOF
16018 #define DECL_SYS_ERRLIST 1
16019 _ACEOF
16020
16021
16022         echo "$as_me:$LINENO: checking existence of sys_errlist" >&5
16023 echo $ECHO_N "checking existence of sys_errlist... $ECHO_C" >&6
16024 if test "${ol_cv_have_sys_errlist+set}" = set; then
16025   echo $ECHO_N "(cached) $ECHO_C" >&6
16026 else
16027
16028                 cat >conftest.$ac_ext <<_ACEOF
16029 /* confdefs.h.  */
16030 _ACEOF
16031 cat confdefs.h >>conftest.$ac_ext
16032 cat >>conftest.$ac_ext <<_ACEOF
16033 /* end confdefs.h.  */
16034 #include <errno.h>
16035 int
16036 main ()
16037 {
16038 char *c = (char *) *sys_errlist
16039   ;
16040   return 0;
16041 }
16042 _ACEOF
16043 rm -f conftest.$ac_objext conftest$ac_exeext
16044 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16045   (eval $ac_link) 2>conftest.er1
16046   ac_status=$?
16047   grep -v '^ *+' conftest.er1 >conftest.err
16048   rm -f conftest.er1
16049   cat conftest.err >&5
16050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16051   (exit $ac_status); } &&
16052          { ac_try='test -z "$ac_c_werror_flag"
16053                          || test ! -s conftest.err'
16054   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16055   (eval $ac_try) 2>&5
16056   ac_status=$?
16057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16058   (exit $ac_status); }; } &&
16059          { ac_try='test -s conftest$ac_exeext'
16060   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16061   (eval $ac_try) 2>&5
16062   ac_status=$?
16063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16064   (exit $ac_status); }; }; then
16065   ol_cv_have_sys_errlist=yes
16066 else
16067   echo "$as_me: failed program was:" >&5
16068 sed 's/^/| /' conftest.$ac_ext >&5
16069
16070 ol_cv_have_sys_errlist=no
16071 fi
16072 rm -f conftest.err conftest.$ac_objext \
16073       conftest$ac_exeext conftest.$ac_ext
16074 fi
16075 echo "$as_me:$LINENO: result: $ol_cv_have_sys_errlist" >&5
16076 echo "${ECHO_T}$ol_cv_have_sys_errlist" >&6
16077 fi
16078 if test $ol_cv_have_sys_errlist = yes ; then
16079
16080 cat >>confdefs.h <<\_ACEOF
16081 #define HAVE_SYS_ERRLIST 1
16082 _ACEOF
16083
16084 fi
16085
16086
16087 for ac_func in strerror strerror_r
16088 do
16089 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16090 echo "$as_me:$LINENO: checking for $ac_func" >&5
16091 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16092 if eval "test \"\${$as_ac_var+set}\" = set"; then
16093   echo $ECHO_N "(cached) $ECHO_C" >&6
16094 else
16095   cat >conftest.$ac_ext <<_ACEOF
16096 /* confdefs.h.  */
16097 _ACEOF
16098 cat confdefs.h >>conftest.$ac_ext
16099 cat >>conftest.$ac_ext <<_ACEOF
16100 /* end confdefs.h.  */
16101 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16102    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16103 #define $ac_func innocuous_$ac_func
16104
16105 /* System header to define __stub macros and hopefully few prototypes,
16106     which can conflict with char $ac_func (); below.
16107     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16108     <limits.h> exists even on freestanding compilers.  */
16109
16110 #ifdef __STDC__
16111 # include <limits.h>
16112 #else
16113 # include <assert.h>
16114 #endif
16115
16116 #undef $ac_func
16117
16118 /* Override any gcc2 internal prototype to avoid an error.  */
16119 #ifdef __cplusplus
16120 extern "C"
16121 {
16122 #endif
16123 /* We use char because int might match the return type of a gcc2
16124    builtin and then its argument prototype would still apply.  */
16125 char $ac_func ();
16126 /* The GNU C library defines this for functions which it implements
16127     to always fail with ENOSYS.  Some functions are actually named
16128     something starting with __ and the normal name is an alias.  */
16129 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16130 choke me
16131 #else
16132 char (*f) () = $ac_func;
16133 #endif
16134 #ifdef __cplusplus
16135 }
16136 #endif
16137
16138 int
16139 main ()
16140 {
16141 return f != $ac_func;
16142   ;
16143   return 0;
16144 }
16145 _ACEOF
16146 rm -f conftest.$ac_objext conftest$ac_exeext
16147 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16148   (eval $ac_link) 2>conftest.er1
16149   ac_status=$?
16150   grep -v '^ *+' conftest.er1 >conftest.err
16151   rm -f conftest.er1
16152   cat conftest.err >&5
16153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16154   (exit $ac_status); } &&
16155          { ac_try='test -z "$ac_c_werror_flag"
16156                          || test ! -s conftest.err'
16157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16158   (eval $ac_try) 2>&5
16159   ac_status=$?
16160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16161   (exit $ac_status); }; } &&
16162          { ac_try='test -s conftest$ac_exeext'
16163   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16164   (eval $ac_try) 2>&5
16165   ac_status=$?
16166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16167   (exit $ac_status); }; }; then
16168   eval "$as_ac_var=yes"
16169 else
16170   echo "$as_me: failed program was:" >&5
16171 sed 's/^/| /' conftest.$ac_ext >&5
16172
16173 eval "$as_ac_var=no"
16174 fi
16175 rm -f conftest.err conftest.$ac_objext \
16176       conftest$ac_exeext conftest.$ac_ext
16177 fi
16178 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16179 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16180 if test `eval echo '${'$as_ac_var'}'` = yes; then
16181   cat >>confdefs.h <<_ACEOF
16182 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16183 _ACEOF
16184
16185 fi
16186 done
16187
16188 ol_cv_func_strerror_r=no
16189 if test "${ac_cv_func_strerror_r}" = yes ; then
16190         echo "$as_me:$LINENO: checking non-posix strerror_r" >&5
16191 echo $ECHO_N "checking non-posix strerror_r... $ECHO_C" >&6
16192 if test "${ol_cv_nonposix_strerror_r+set}" = set; then
16193   echo $ECHO_N "(cached) $ECHO_C" >&6
16194 else
16195
16196         cat >conftest.$ac_ext <<_ACEOF
16197 /* confdefs.h.  */
16198 _ACEOF
16199 cat confdefs.h >>conftest.$ac_ext
16200 cat >>conftest.$ac_ext <<_ACEOF
16201 /* end confdefs.h.  */
16202 #include <string.h>
16203 _ACEOF
16204 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16205   $EGREP "strerror_r" >/dev/null 2>&1; then
16206   ol_decl_strerror_r=yes
16207 else
16208   ol_decl_strerror_r=no
16209 fi
16210 rm -f conftest*
16211
16212         if test $ol_decl_strerror_r = yes ; then
16213                 cat >conftest.$ac_ext <<_ACEOF
16214 /* confdefs.h.  */
16215 _ACEOF
16216 cat confdefs.h >>conftest.$ac_ext
16217 cat >>conftest.$ac_ext <<_ACEOF
16218 /* end confdefs.h.  */
16219 #include <string.h>
16220 int
16221 main ()
16222 {
16223    /* from autoconf 2.59 */
16224                                 char buf[100];
16225                                 char x = *strerror_r (0, buf, sizeof buf);
16226                                 char *p = strerror_r (0, buf, sizeof buf);
16227
16228   ;
16229   return 0;
16230 }
16231 _ACEOF
16232 rm -f conftest.$ac_objext
16233 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16234   (eval $ac_compile) 2>conftest.er1
16235   ac_status=$?
16236   grep -v '^ *+' conftest.er1 >conftest.err
16237   rm -f conftest.er1
16238   cat conftest.err >&5
16239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16240   (exit $ac_status); } &&
16241          { ac_try='test -z "$ac_c_werror_flag"
16242                          || test ! -s conftest.err'
16243   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16244   (eval $ac_try) 2>&5
16245   ac_status=$?
16246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16247   (exit $ac_status); }; } &&
16248          { ac_try='test -s conftest.$ac_objext'
16249   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16250   (eval $ac_try) 2>&5
16251   ac_status=$?
16252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16253   (exit $ac_status); }; }; then
16254   ol_cv_nonposix_strerror_r=yes
16255 else
16256   echo "$as_me: failed program was:" >&5
16257 sed 's/^/| /' conftest.$ac_ext >&5
16258
16259 ol_cv_nonposix_strerror_r=no
16260 fi
16261 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16262         else
16263                 if test "$cross_compiling" = yes; then
16264   ol_cv_nonposix_strerror=no
16265 else
16266   cat >conftest.$ac_ext <<_ACEOF
16267 /* confdefs.h.  */
16268 _ACEOF
16269 cat confdefs.h >>conftest.$ac_ext
16270 cat >>conftest.$ac_ext <<_ACEOF
16271 /* end confdefs.h.  */
16272
16273                         main() {
16274                                 char buf[100];
16275                                 buf[0] = 0;
16276                                 strerror_r( 1, buf, sizeof buf );
16277                                 exit( buf[0] == 0 );
16278                         }
16279
16280 _ACEOF
16281 rm -f conftest$ac_exeext
16282 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16283   (eval $ac_link) 2>&5
16284   ac_status=$?
16285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16286   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16288   (eval $ac_try) 2>&5
16289   ac_status=$?
16290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16291   (exit $ac_status); }; }; then
16292   ol_cv_nonposix_strerror_r=yes
16293 else
16294   echo "$as_me: program exited with status $ac_status" >&5
16295 echo "$as_me: failed program was:" >&5
16296 sed 's/^/| /' conftest.$ac_ext >&5
16297
16298 ( exit $ac_status )
16299 ol_cv_nonposix_strerror=no
16300 fi
16301 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16302 fi
16303         fi
16304
16305 fi
16306 echo "$as_me:$LINENO: result: $ol_cv_nonposix_strerror_r" >&5
16307 echo "${ECHO_T}$ol_cv_nonposix_strerror_r" >&6
16308 if test $ol_cv_nonposix_strerror_r = yes ; then
16309
16310 cat >>confdefs.h <<\_ACEOF
16311 #define HAVE_NONPOSIX_STRERROR_R 1
16312 _ACEOF
16313
16314 fi
16315
16316 elif test "${ac_cv_func_strerror}" = no ; then
16317         echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5
16318 echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6
16319 if test "${ol_cv_dcl_sys_errlist+set}" = set; then
16320   echo $ECHO_N "(cached) $ECHO_C" >&6
16321 else
16322
16323         cat >conftest.$ac_ext <<_ACEOF
16324 /* confdefs.h.  */
16325 _ACEOF
16326 cat confdefs.h >>conftest.$ac_ext
16327 cat >>conftest.$ac_ext <<_ACEOF
16328 /* end confdefs.h.  */
16329
16330 #include <stdio.h>
16331 #include <sys/types.h>
16332 #include <errno.h>
16333 #ifdef WINNT
16334 #include <stdlib.h>
16335 #endif
16336 int
16337 main ()
16338 {
16339 char *c = (char *) *sys_errlist
16340   ;
16341   return 0;
16342 }
16343 _ACEOF
16344 rm -f conftest.$ac_objext
16345 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16346   (eval $ac_compile) 2>conftest.er1
16347   ac_status=$?
16348   grep -v '^ *+' conftest.er1 >conftest.err
16349   rm -f conftest.er1
16350   cat conftest.err >&5
16351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16352   (exit $ac_status); } &&
16353          { ac_try='test -z "$ac_c_werror_flag"
16354                          || test ! -s conftest.err'
16355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16356   (eval $ac_try) 2>&5
16357   ac_status=$?
16358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16359   (exit $ac_status); }; } &&
16360          { ac_try='test -s conftest.$ac_objext'
16361   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16362   (eval $ac_try) 2>&5
16363   ac_status=$?
16364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16365   (exit $ac_status); }; }; then
16366   ol_cv_dcl_sys_errlist=yes
16367         ol_cv_have_sys_errlist=yes
16368 else
16369   echo "$as_me: failed program was:" >&5
16370 sed 's/^/| /' conftest.$ac_ext >&5
16371
16372 ol_cv_dcl_sys_errlist=no
16373 fi
16374 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16375 fi
16376 echo "$as_me:$LINENO: result: $ol_cv_dcl_sys_errlist" >&5
16377 echo "${ECHO_T}$ol_cv_dcl_sys_errlist" >&6
16378 #
16379 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16380 if test $ol_cv_dcl_sys_errlist = no ; then
16381
16382 cat >>confdefs.h <<\_ACEOF
16383 #define DECL_SYS_ERRLIST 1
16384 _ACEOF
16385
16386
16387         echo "$as_me:$LINENO: checking existence of sys_errlist" >&5
16388 echo $ECHO_N "checking existence of sys_errlist... $ECHO_C" >&6
16389 if test "${ol_cv_have_sys_errlist+set}" = set; then
16390   echo $ECHO_N "(cached) $ECHO_C" >&6
16391 else
16392
16393                 cat >conftest.$ac_ext <<_ACEOF
16394 /* confdefs.h.  */
16395 _ACEOF
16396 cat confdefs.h >>conftest.$ac_ext
16397 cat >>conftest.$ac_ext <<_ACEOF
16398 /* end confdefs.h.  */
16399 #include <errno.h>
16400 int
16401 main ()
16402 {
16403 char *c = (char *) *sys_errlist
16404   ;
16405   return 0;
16406 }
16407 _ACEOF
16408 rm -f conftest.$ac_objext conftest$ac_exeext
16409 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16410   (eval $ac_link) 2>conftest.er1
16411   ac_status=$?
16412   grep -v '^ *+' conftest.er1 >conftest.err
16413   rm -f conftest.er1
16414   cat conftest.err >&5
16415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16416   (exit $ac_status); } &&
16417          { ac_try='test -z "$ac_c_werror_flag"
16418                          || test ! -s conftest.err'
16419   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16420   (eval $ac_try) 2>&5
16421   ac_status=$?
16422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16423   (exit $ac_status); }; } &&
16424          { ac_try='test -s conftest$ac_exeext'
16425   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16426   (eval $ac_try) 2>&5
16427   ac_status=$?
16428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16429   (exit $ac_status); }; }; then
16430   ol_cv_have_sys_errlist=yes
16431 else
16432   echo "$as_me: failed program was:" >&5
16433 sed 's/^/| /' conftest.$ac_ext >&5
16434
16435 ol_cv_have_sys_errlist=no
16436 fi
16437 rm -f conftest.err conftest.$ac_objext \
16438       conftest$ac_exeext conftest.$ac_ext
16439 fi
16440 echo "$as_me:$LINENO: result: $ol_cv_have_sys_errlist" >&5
16441 echo "${ECHO_T}$ol_cv_have_sys_errlist" >&6
16442 fi
16443 if test $ol_cv_have_sys_errlist = yes ; then
16444
16445 cat >>confdefs.h <<\_ACEOF
16446 #define HAVE_SYS_ERRLIST 1
16447 _ACEOF
16448
16449 fi
16450
16451 fi
16452
16453
16454
16455 for ac_header in regex.h
16456 do
16457 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16458 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16459   echo "$as_me:$LINENO: checking for $ac_header" >&5
16460 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16461 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16462   echo $ECHO_N "(cached) $ECHO_C" >&6
16463 fi
16464 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16465 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16466 else
16467   # Is the header compilable?
16468 echo "$as_me:$LINENO: checking $ac_header usability" >&5
16469 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16470 cat >conftest.$ac_ext <<_ACEOF
16471 /* confdefs.h.  */
16472 _ACEOF
16473 cat confdefs.h >>conftest.$ac_ext
16474 cat >>conftest.$ac_ext <<_ACEOF
16475 /* end confdefs.h.  */
16476 $ac_includes_default
16477 #include <$ac_header>
16478 _ACEOF
16479 rm -f conftest.$ac_objext
16480 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16481   (eval $ac_compile) 2>conftest.er1
16482   ac_status=$?
16483   grep -v '^ *+' conftest.er1 >conftest.err
16484   rm -f conftest.er1
16485   cat conftest.err >&5
16486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16487   (exit $ac_status); } &&
16488          { ac_try='test -z "$ac_c_werror_flag"
16489                          || test ! -s conftest.err'
16490   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16491   (eval $ac_try) 2>&5
16492   ac_status=$?
16493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16494   (exit $ac_status); }; } &&
16495          { ac_try='test -s conftest.$ac_objext'
16496   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16497   (eval $ac_try) 2>&5
16498   ac_status=$?
16499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16500   (exit $ac_status); }; }; then
16501   ac_header_compiler=yes
16502 else
16503   echo "$as_me: failed program was:" >&5
16504 sed 's/^/| /' conftest.$ac_ext >&5
16505
16506 ac_header_compiler=no
16507 fi
16508 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16509 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16510 echo "${ECHO_T}$ac_header_compiler" >&6
16511
16512 # Is the header present?
16513 echo "$as_me:$LINENO: checking $ac_header presence" >&5
16514 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16515 cat >conftest.$ac_ext <<_ACEOF
16516 /* confdefs.h.  */
16517 _ACEOF
16518 cat confdefs.h >>conftest.$ac_ext
16519 cat >>conftest.$ac_ext <<_ACEOF
16520 /* end confdefs.h.  */
16521 #include <$ac_header>
16522 _ACEOF
16523 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16524   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16525   ac_status=$?
16526   grep -v '^ *+' conftest.er1 >conftest.err
16527   rm -f conftest.er1
16528   cat conftest.err >&5
16529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16530   (exit $ac_status); } >/dev/null; then
16531   if test -s conftest.err; then
16532     ac_cpp_err=$ac_c_preproc_warn_flag
16533     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16534   else
16535     ac_cpp_err=
16536   fi
16537 else
16538   ac_cpp_err=yes
16539 fi
16540 if test -z "$ac_cpp_err"; then
16541   ac_header_preproc=yes
16542 else
16543   echo "$as_me: failed program was:" >&5
16544 sed 's/^/| /' conftest.$ac_ext >&5
16545
16546   ac_header_preproc=no
16547 fi
16548 rm -f conftest.err conftest.$ac_ext
16549 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16550 echo "${ECHO_T}$ac_header_preproc" >&6
16551
16552 # So?  What about this header?
16553 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16554   yes:no: )
16555     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16556 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16557     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16558 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16559     ac_header_preproc=yes
16560     ;;
16561   no:yes:* )
16562     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16563 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16564     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
16565 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
16566     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16567 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16568     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
16569 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
16570     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16571 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16572     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16573 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
16574     (
16575       cat <<\_ASBOX
16576 ## --------------------------------------------- ##
16577 ## Report this to <http://www.openldap.org/its/> ##
16578 ## --------------------------------------------- ##
16579 _ASBOX
16580     ) |
16581       sed "s/^/$as_me: WARNING:     /" >&2
16582     ;;
16583 esac
16584 echo "$as_me:$LINENO: checking for $ac_header" >&5
16585 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16586 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16587   echo $ECHO_N "(cached) $ECHO_C" >&6
16588 else
16589   eval "$as_ac_Header=\$ac_header_preproc"
16590 fi
16591 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16592 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16593
16594 fi
16595 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16596   cat >>confdefs.h <<_ACEOF
16597 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16598 _ACEOF
16599
16600 fi
16601
16602 done
16603
16604 if test "$ac_cv_header_regex_h" != yes ; then
16605         { { echo "$as_me:$LINENO: error: POSIX regex.h required." >&5
16606 echo "$as_me: error: POSIX regex.h required." >&2;}
16607    { (exit 1); exit 1; }; }
16608 fi
16609 echo "$as_me:$LINENO: checking for library containing regfree" >&5
16610 echo $ECHO_N "checking for library containing regfree... $ECHO_C" >&6
16611 if test "${ac_cv_search_regfree+set}" = set; then
16612   echo $ECHO_N "(cached) $ECHO_C" >&6
16613 else
16614   ac_func_search_save_LIBS=$LIBS
16615 ac_cv_search_regfree=no
16616 cat >conftest.$ac_ext <<_ACEOF
16617 /* confdefs.h.  */
16618 _ACEOF
16619 cat confdefs.h >>conftest.$ac_ext
16620 cat >>conftest.$ac_ext <<_ACEOF
16621 /* end confdefs.h.  */
16622
16623 /* Override any gcc2 internal prototype to avoid an error.  */
16624 #ifdef __cplusplus
16625 extern "C"
16626 #endif
16627 /* We use char because int might match the return type of a gcc2
16628    builtin and then its argument prototype would still apply.  */
16629 char regfree ();
16630 int
16631 main ()
16632 {
16633 regfree ();
16634   ;
16635   return 0;
16636 }
16637 _ACEOF
16638 rm -f conftest.$ac_objext conftest$ac_exeext
16639 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16640   (eval $ac_link) 2>conftest.er1
16641   ac_status=$?
16642   grep -v '^ *+' conftest.er1 >conftest.err
16643   rm -f conftest.er1
16644   cat conftest.err >&5
16645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16646   (exit $ac_status); } &&
16647          { ac_try='test -z "$ac_c_werror_flag"
16648                          || test ! -s conftest.err'
16649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16650   (eval $ac_try) 2>&5
16651   ac_status=$?
16652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16653   (exit $ac_status); }; } &&
16654          { ac_try='test -s conftest$ac_exeext'
16655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16656   (eval $ac_try) 2>&5
16657   ac_status=$?
16658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16659   (exit $ac_status); }; }; then
16660   ac_cv_search_regfree="none required"
16661 else
16662   echo "$as_me: failed program was:" >&5
16663 sed 's/^/| /' conftest.$ac_ext >&5
16664
16665 fi
16666 rm -f conftest.err conftest.$ac_objext \
16667       conftest$ac_exeext conftest.$ac_ext
16668 if test "$ac_cv_search_regfree" = no; then
16669   for ac_lib in regex gnuregex; do
16670     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16671     cat >conftest.$ac_ext <<_ACEOF
16672 /* confdefs.h.  */
16673 _ACEOF
16674 cat confdefs.h >>conftest.$ac_ext
16675 cat >>conftest.$ac_ext <<_ACEOF
16676 /* end confdefs.h.  */
16677
16678 /* Override any gcc2 internal prototype to avoid an error.  */
16679 #ifdef __cplusplus
16680 extern "C"
16681 #endif
16682 /* We use char because int might match the return type of a gcc2
16683    builtin and then its argument prototype would still apply.  */
16684 char regfree ();
16685 int
16686 main ()
16687 {
16688 regfree ();
16689   ;
16690   return 0;
16691 }
16692 _ACEOF
16693 rm -f conftest.$ac_objext conftest$ac_exeext
16694 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16695   (eval $ac_link) 2>conftest.er1
16696   ac_status=$?
16697   grep -v '^ *+' conftest.er1 >conftest.err
16698   rm -f conftest.er1
16699   cat conftest.err >&5
16700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16701   (exit $ac_status); } &&
16702          { ac_try='test -z "$ac_c_werror_flag"
16703                          || test ! -s conftest.err'
16704   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16705   (eval $ac_try) 2>&5
16706   ac_status=$?
16707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16708   (exit $ac_status); }; } &&
16709          { ac_try='test -s conftest$ac_exeext'
16710   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16711   (eval $ac_try) 2>&5
16712   ac_status=$?
16713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16714   (exit $ac_status); }; }; then
16715   ac_cv_search_regfree="-l$ac_lib"
16716 break
16717 else
16718   echo "$as_me: failed program was:" >&5
16719 sed 's/^/| /' conftest.$ac_ext >&5
16720
16721 fi
16722 rm -f conftest.err conftest.$ac_objext \
16723       conftest$ac_exeext conftest.$ac_ext
16724   done
16725 fi
16726 LIBS=$ac_func_search_save_LIBS
16727 fi
16728 echo "$as_me:$LINENO: result: $ac_cv_search_regfree" >&5
16729 echo "${ECHO_T}$ac_cv_search_regfree" >&6
16730 if test "$ac_cv_search_regfree" != no; then
16731   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
16732   :
16733 else
16734   { { echo "$as_me:$LINENO: error: POSIX regex required." >&5
16735 echo "$as_me: error: POSIX regex required." >&2;}
16736    { (exit 1); exit 1; }; }
16737 fi
16738
16739
16740
16741 echo "$as_me:$LINENO: checking for compatible POSIX regex" >&5
16742 echo $ECHO_N "checking for compatible POSIX regex... $ECHO_C" >&6
16743 if test "${ol_cv_c_posix_regex+set}" = set; then
16744   echo $ECHO_N "(cached) $ECHO_C" >&6
16745 else
16746
16747         if test "$cross_compiling" = yes; then
16748   ol_cv_c_posix_regex=cross
16749 else
16750   cat >conftest.$ac_ext <<_ACEOF
16751 /* confdefs.h.  */
16752 _ACEOF
16753 cat confdefs.h >>conftest.$ac_ext
16754 cat >>conftest.$ac_ext <<_ACEOF
16755 /* end confdefs.h.  */
16756
16757 #include <sys/types.h>
16758 #include <regex.h>
16759 static char *pattern, *string;
16760 main()
16761 {
16762         int rc;
16763         regex_t re;
16764
16765         pattern = "^A";
16766
16767         if(regcomp(&re, pattern, 0)) {
16768                 return -1;
16769         }
16770
16771         string = "ALL MATCH";
16772
16773         rc = regexec(&re, string, 0, (void*)0, 0);
16774
16775         regfree(&re);
16776
16777         return rc;
16778 }
16779 _ACEOF
16780 rm -f conftest$ac_exeext
16781 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16782   (eval $ac_link) 2>&5
16783   ac_status=$?
16784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16785   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16786   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16787   (eval $ac_try) 2>&5
16788   ac_status=$?
16789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16790   (exit $ac_status); }; }; then
16791   ol_cv_c_posix_regex=yes
16792 else
16793   echo "$as_me: program exited with status $ac_status" >&5
16794 echo "$as_me: failed program was:" >&5
16795 sed 's/^/| /' conftest.$ac_ext >&5
16796
16797 ( exit $ac_status )
16798 ol_cv_c_posix_regex=no
16799 fi
16800 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16801 fi
16802 fi
16803 echo "$as_me:$LINENO: result: $ol_cv_c_posix_regex" >&5
16804 echo "${ECHO_T}$ol_cv_c_posix_regex" >&6
16805
16806 if test "$ol_cv_c_posix_regex" = no ; then
16807         { { echo "$as_me:$LINENO: error: broken POSIX regex!" >&5
16808 echo "$as_me: error: broken POSIX regex!" >&2;}
16809    { (exit 1); exit 1; }; }
16810 fi
16811
16812
16813 have_uuid=no
16814
16815 for ac_header in sys/uuid.h
16816 do
16817 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16818 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16819   echo "$as_me:$LINENO: checking for $ac_header" >&5
16820 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16821 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16822   echo $ECHO_N "(cached) $ECHO_C" >&6
16823 fi
16824 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16825 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16826 else
16827   # Is the header compilable?
16828 echo "$as_me:$LINENO: checking $ac_header usability" >&5
16829 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16830 cat >conftest.$ac_ext <<_ACEOF
16831 /* confdefs.h.  */
16832 _ACEOF
16833 cat confdefs.h >>conftest.$ac_ext
16834 cat >>conftest.$ac_ext <<_ACEOF
16835 /* end confdefs.h.  */
16836 $ac_includes_default
16837 #include <$ac_header>
16838 _ACEOF
16839 rm -f conftest.$ac_objext
16840 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16841   (eval $ac_compile) 2>conftest.er1
16842   ac_status=$?
16843   grep -v '^ *+' conftest.er1 >conftest.err
16844   rm -f conftest.er1
16845   cat conftest.err >&5
16846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16847   (exit $ac_status); } &&
16848          { ac_try='test -z "$ac_c_werror_flag"
16849                          || test ! -s conftest.err'
16850   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16851   (eval $ac_try) 2>&5
16852   ac_status=$?
16853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16854   (exit $ac_status); }; } &&
16855          { ac_try='test -s conftest.$ac_objext'
16856   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16857   (eval $ac_try) 2>&5
16858   ac_status=$?
16859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16860   (exit $ac_status); }; }; then
16861   ac_header_compiler=yes
16862 else
16863   echo "$as_me: failed program was:" >&5
16864 sed 's/^/| /' conftest.$ac_ext >&5
16865
16866 ac_header_compiler=no
16867 fi
16868 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16869 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16870 echo "${ECHO_T}$ac_header_compiler" >&6
16871
16872 # Is the header present?
16873 echo "$as_me:$LINENO: checking $ac_header presence" >&5
16874 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16875 cat >conftest.$ac_ext <<_ACEOF
16876 /* confdefs.h.  */
16877 _ACEOF
16878 cat confdefs.h >>conftest.$ac_ext
16879 cat >>conftest.$ac_ext <<_ACEOF
16880 /* end confdefs.h.  */
16881 #include <$ac_header>
16882 _ACEOF
16883 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16884   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16885   ac_status=$?
16886   grep -v '^ *+' conftest.er1 >conftest.err
16887   rm -f conftest.er1
16888   cat conftest.err >&5
16889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16890   (exit $ac_status); } >/dev/null; then
16891   if test -s conftest.err; then
16892     ac_cpp_err=$ac_c_preproc_warn_flag
16893     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16894   else
16895     ac_cpp_err=
16896   fi
16897 else
16898   ac_cpp_err=yes
16899 fi
16900 if test -z "$ac_cpp_err"; then
16901   ac_header_preproc=yes
16902 else
16903   echo "$as_me: failed program was:" >&5
16904 sed 's/^/| /' conftest.$ac_ext >&5
16905
16906   ac_header_preproc=no
16907 fi
16908 rm -f conftest.err conftest.$ac_ext
16909 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16910 echo "${ECHO_T}$ac_header_preproc" >&6
16911
16912 # So?  What about this header?
16913 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16914   yes:no: )
16915     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16916 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16917     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16918 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16919     ac_header_preproc=yes
16920     ;;
16921   no:yes:* )
16922     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16923 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16924     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
16925 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
16926     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16927 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16928     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
16929 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
16930     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16931 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16932     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16933 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
16934     (
16935       cat <<\_ASBOX
16936 ## --------------------------------------------- ##
16937 ## Report this to <http://www.openldap.org/its/> ##
16938 ## --------------------------------------------- ##
16939 _ASBOX
16940     ) |
16941       sed "s/^/$as_me: WARNING:     /" >&2
16942     ;;
16943 esac
16944 echo "$as_me:$LINENO: checking for $ac_header" >&5
16945 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16946 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16947   echo $ECHO_N "(cached) $ECHO_C" >&6
16948 else
16949   eval "$as_ac_Header=\$ac_header_preproc"
16950 fi
16951 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16952 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16953
16954 fi
16955 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16956   cat >>confdefs.h <<_ACEOF
16957 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16958 _ACEOF
16959
16960 fi
16961
16962 done
16963
16964 if test $ac_cv_header_sys_uuid_h = yes ; then
16965         save_LIBS="$LIBS"
16966         echo "$as_me:$LINENO: checking for library containing uuid_to_str" >&5
16967 echo $ECHO_N "checking for library containing uuid_to_str... $ECHO_C" >&6
16968 if test "${ac_cv_search_uuid_to_str+set}" = set; then
16969   echo $ECHO_N "(cached) $ECHO_C" >&6
16970 else
16971   ac_func_search_save_LIBS=$LIBS
16972 ac_cv_search_uuid_to_str=no
16973 cat >conftest.$ac_ext <<_ACEOF
16974 /* confdefs.h.  */
16975 _ACEOF
16976 cat confdefs.h >>conftest.$ac_ext
16977 cat >>conftest.$ac_ext <<_ACEOF
16978 /* end confdefs.h.  */
16979
16980 /* Override any gcc2 internal prototype to avoid an error.  */
16981 #ifdef __cplusplus
16982 extern "C"
16983 #endif
16984 /* We use char because int might match the return type of a gcc2
16985    builtin and then its argument prototype would still apply.  */
16986 char uuid_to_str ();
16987 int
16988 main ()
16989 {
16990 uuid_to_str ();
16991   ;
16992   return 0;
16993 }
16994 _ACEOF
16995 rm -f conftest.$ac_objext conftest$ac_exeext
16996 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16997   (eval $ac_link) 2>conftest.er1
16998   ac_status=$?
16999   grep -v '^ *+' conftest.er1 >conftest.err
17000   rm -f conftest.er1
17001   cat conftest.err >&5
17002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17003   (exit $ac_status); } &&
17004          { ac_try='test -z "$ac_c_werror_flag"
17005                          || test ! -s conftest.err'
17006   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17007   (eval $ac_try) 2>&5
17008   ac_status=$?
17009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17010   (exit $ac_status); }; } &&
17011          { ac_try='test -s conftest$ac_exeext'
17012   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17013   (eval $ac_try) 2>&5
17014   ac_status=$?
17015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17016   (exit $ac_status); }; }; then
17017   ac_cv_search_uuid_to_str="none required"
17018 else
17019   echo "$as_me: failed program was:" >&5
17020 sed 's/^/| /' conftest.$ac_ext >&5
17021
17022 fi
17023 rm -f conftest.err conftest.$ac_objext \
17024       conftest$ac_exeext conftest.$ac_ext
17025 if test "$ac_cv_search_uuid_to_str" = no; then
17026   for ac_lib in uuid; do
17027     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17028     cat >conftest.$ac_ext <<_ACEOF
17029 /* confdefs.h.  */
17030 _ACEOF
17031 cat confdefs.h >>conftest.$ac_ext
17032 cat >>conftest.$ac_ext <<_ACEOF
17033 /* end confdefs.h.  */
17034
17035 /* Override any gcc2 internal prototype to avoid an error.  */
17036 #ifdef __cplusplus
17037 extern "C"
17038 #endif
17039 /* We use char because int might match the return type of a gcc2
17040    builtin and then its argument prototype would still apply.  */
17041 char uuid_to_str ();
17042 int
17043 main ()
17044 {
17045 uuid_to_str ();
17046   ;
17047   return 0;
17048 }
17049 _ACEOF
17050 rm -f conftest.$ac_objext conftest$ac_exeext
17051 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17052   (eval $ac_link) 2>conftest.er1
17053   ac_status=$?
17054   grep -v '^ *+' conftest.er1 >conftest.err
17055   rm -f conftest.er1
17056   cat conftest.err >&5
17057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17058   (exit $ac_status); } &&
17059          { ac_try='test -z "$ac_c_werror_flag"
17060                          || test ! -s conftest.err'
17061   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17062   (eval $ac_try) 2>&5
17063   ac_status=$?
17064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17065   (exit $ac_status); }; } &&
17066          { ac_try='test -s conftest$ac_exeext'
17067   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17068   (eval $ac_try) 2>&5
17069   ac_status=$?
17070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17071   (exit $ac_status); }; }; then
17072   ac_cv_search_uuid_to_str="-l$ac_lib"
17073 break
17074 else
17075   echo "$as_me: failed program was:" >&5
17076 sed 's/^/| /' conftest.$ac_ext >&5
17077
17078 fi
17079 rm -f conftest.err conftest.$ac_objext \
17080       conftest$ac_exeext conftest.$ac_ext
17081   done
17082 fi
17083 LIBS=$ac_func_search_save_LIBS
17084 fi
17085 echo "$as_me:$LINENO: result: $ac_cv_search_uuid_to_str" >&5
17086 echo "${ECHO_T}$ac_cv_search_uuid_to_str" >&6
17087 if test "$ac_cv_search_uuid_to_str" != no; then
17088   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
17089   have_uuid=yes
17090 else
17091   :
17092 fi
17093
17094         LIBS="$save_LIBS"
17095
17096         if test have_uuid = yes ; then
17097
17098 cat >>confdefs.h <<\_ACEOF
17099 #define HAVE_UUID_TO_STR 1
17100 _ACEOF
17101
17102
17103                 test "$ac_cv_search_uuid_to_str" = "none required" || \
17104                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
17105         fi
17106 fi
17107
17108 if test $have_uuid = no ; then
17109         echo "$as_me:$LINENO: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
17110 echo $ECHO_N "checking to see if -lrpcrt4 is needed for win32 UUID support... $ECHO_C" >&6
17111         save_LIBS="$LIBS"
17112         LIBS="$LIBS -lrpcrt4"
17113         cat >conftest.$ac_ext <<_ACEOF
17114 /* confdefs.h.  */
17115 _ACEOF
17116 cat confdefs.h >>conftest.$ac_ext
17117 cat >>conftest.$ac_ext <<_ACEOF
17118 /* end confdefs.h.  */
17119
17120                 int __stdcall UuidCreate(void *);
17121                 int __stdcall UuidToStringA(void *,void **);
17122
17123 int
17124 main ()
17125 {
17126
17127                 UuidCreate(0);
17128                 UuidToStringA(0,0);
17129
17130   ;
17131   return 0;
17132 }
17133 _ACEOF
17134 rm -f conftest.$ac_objext conftest$ac_exeext
17135 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17136   (eval $ac_link) 2>conftest.er1
17137   ac_status=$?
17138   grep -v '^ *+' conftest.er1 >conftest.err
17139   rm -f conftest.er1
17140   cat conftest.err >&5
17141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17142   (exit $ac_status); } &&
17143          { ac_try='test -z "$ac_c_werror_flag"
17144                          || test ! -s conftest.err'
17145   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17146   (eval $ac_try) 2>&5
17147   ac_status=$?
17148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17149   (exit $ac_status); }; } &&
17150          { ac_try='test -s conftest$ac_exeext'
17151   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17152   (eval $ac_try) 2>&5
17153   ac_status=$?
17154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17155   (exit $ac_status); }; }; then
17156   need_rpcrt=yes
17157 else
17158   echo "$as_me: failed program was:" >&5
17159 sed 's/^/| /' conftest.$ac_ext >&5
17160
17161 need_rpcrt=no
17162 fi
17163 rm -f conftest.err conftest.$ac_objext \
17164       conftest$ac_exeext conftest.$ac_ext
17165         if test $need_rpcrt = yes; then
17166                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
17167         fi
17168         LIBS="$save_LIBS"
17169         echo "$as_me:$LINENO: result: $need_rpcrt" >&5
17170 echo "${ECHO_T}$need_rpcrt" >&6
17171 fi
17172
17173 ol_cv_lib_resolver=no
17174 if test $ol_cv_lib_resolver = no ; then
17175         echo "$as_me:$LINENO: checking for resolver link (default)" >&5
17176 echo $ECHO_N "checking for resolver link (default)... $ECHO_C" >&6
17177 if test "${ol_cv_resolver_none+set}" = set; then
17178   echo $ECHO_N "(cached) $ECHO_C" >&6
17179 else
17180
17181         ol_RESOLVER_LIB=
17182         ol_LIBS=$LIBS
17183         LIBS="$ol_RESOLVER_LIB $LIBS"
17184
17185         cat >conftest.$ac_ext <<_ACEOF
17186 /* confdefs.h.  */
17187 _ACEOF
17188 cat confdefs.h >>conftest.$ac_ext
17189 cat >>conftest.$ac_ext <<_ACEOF
17190 /* end confdefs.h.  */
17191
17192 #ifdef HAVE_SYS_TYPES_H
17193 #       include <sys/types.h>
17194 #endif
17195 #include <netinet/in.h>
17196 #ifdef HAVE_ARPA_NAMESER_H
17197 #       include <arpa/nameser.h>
17198 #endif
17199 #ifdef HAVE_RESOLV_H
17200 #       include <resolv.h>
17201 #endif
17202
17203 int
17204 main ()
17205 {
17206 {
17207         int len, status;
17208         char *request = NULL;
17209         unsigned char reply[64*1024];
17210         unsigned char host[64*1024];
17211         unsigned char *p;
17212
17213 #ifdef NS_HFIXEDSZ
17214         /* Bind 8/9 interface */
17215         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17216 #else
17217         /* Bind 4 interface */
17218 # ifndef T_SRV
17219 #  define T_SRV 33
17220 # endif
17221         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17222 #endif
17223         p = reply;
17224 #ifdef NS_HFIXEDSZ
17225         /* Bind 8/9 interface */
17226         p += NS_HFIXEDSZ;
17227 #elif defined(HFIXEDSZ)
17228         /* Bind 4 interface w/ HFIXEDSZ */
17229         p += HFIXEDSZ;
17230 #else
17231         /* Bind 4 interface w/o HFIXEDSZ */
17232         p += sizeof(HEADER);
17233 #endif
17234         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17235 }
17236   ;
17237   return 0;
17238 }
17239 _ACEOF
17240 rm -f conftest.$ac_objext conftest$ac_exeext
17241 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17242   (eval $ac_link) 2>conftest.er1
17243   ac_status=$?
17244   grep -v '^ *+' conftest.er1 >conftest.err
17245   rm -f conftest.er1
17246   cat conftest.err >&5
17247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17248   (exit $ac_status); } &&
17249          { ac_try='test -z "$ac_c_werror_flag"
17250                          || test ! -s conftest.err'
17251   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17252   (eval $ac_try) 2>&5
17253   ac_status=$?
17254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17255   (exit $ac_status); }; } &&
17256          { ac_try='test -s conftest$ac_exeext'
17257   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17258   (eval $ac_try) 2>&5
17259   ac_status=$?
17260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17261   (exit $ac_status); }; }; then
17262   ol_cv_resolver_none=yes
17263 else
17264   echo "$as_me: failed program was:" >&5
17265 sed 's/^/| /' conftest.$ac_ext >&5
17266
17267 ol_cv_resolver_none=no
17268 fi
17269 rm -f conftest.err conftest.$ac_objext \
17270       conftest$ac_exeext conftest.$ac_ext
17271
17272         LIBS="$ol_LIBS"
17273
17274 fi
17275 echo "$as_me:$LINENO: result: $ol_cv_resolver_none" >&5
17276 echo "${ECHO_T}$ol_cv_resolver_none" >&6
17277
17278         if test $ol_cv_resolver_none = yes ; then
17279                 ol_cv_lib_resolver=yes
17280         fi
17281 fi
17282
17283 if test $ol_cv_lib_resolver = no ; then
17284         echo "$as_me:$LINENO: checking for resolver link (-lresolv)" >&5
17285 echo $ECHO_N "checking for resolver link (-lresolv)... $ECHO_C" >&6
17286 if test "${ol_cv_resolver_resolv+set}" = set; then
17287   echo $ECHO_N "(cached) $ECHO_C" >&6
17288 else
17289
17290         ol_RESOLVER_LIB=-lresolv
17291         ol_LIBS=$LIBS
17292         LIBS="$ol_RESOLVER_LIB $LIBS"
17293
17294         cat >conftest.$ac_ext <<_ACEOF
17295 /* confdefs.h.  */
17296 _ACEOF
17297 cat confdefs.h >>conftest.$ac_ext
17298 cat >>conftest.$ac_ext <<_ACEOF
17299 /* end confdefs.h.  */
17300
17301 #ifdef HAVE_SYS_TYPES_H
17302 #       include <sys/types.h>
17303 #endif
17304 #include <netinet/in.h>
17305 #ifdef HAVE_ARPA_NAMESER_H
17306 #       include <arpa/nameser.h>
17307 #endif
17308 #ifdef HAVE_RESOLV_H
17309 #       include <resolv.h>
17310 #endif
17311
17312 int
17313 main ()
17314 {
17315 {
17316         int len, status;
17317         char *request = NULL;
17318         unsigned char reply[64*1024];
17319         unsigned char host[64*1024];
17320         unsigned char *p;
17321
17322 #ifdef NS_HFIXEDSZ
17323         /* Bind 8/9 interface */
17324         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17325 #else
17326         /* Bind 4 interface */
17327 # ifndef T_SRV
17328 #  define T_SRV 33
17329 # endif
17330         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17331 #endif
17332         p = reply;
17333 #ifdef NS_HFIXEDSZ
17334         /* Bind 8/9 interface */
17335         p += NS_HFIXEDSZ;
17336 #elif defined(HFIXEDSZ)
17337         /* Bind 4 interface w/ HFIXEDSZ */
17338         p += HFIXEDSZ;
17339 #else
17340         /* Bind 4 interface w/o HFIXEDSZ */
17341         p += sizeof(HEADER);
17342 #endif
17343         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17344 }
17345   ;
17346   return 0;
17347 }
17348 _ACEOF
17349 rm -f conftest.$ac_objext conftest$ac_exeext
17350 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17351   (eval $ac_link) 2>conftest.er1
17352   ac_status=$?
17353   grep -v '^ *+' conftest.er1 >conftest.err
17354   rm -f conftest.er1
17355   cat conftest.err >&5
17356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17357   (exit $ac_status); } &&
17358          { ac_try='test -z "$ac_c_werror_flag"
17359                          || test ! -s conftest.err'
17360   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17361   (eval $ac_try) 2>&5
17362   ac_status=$?
17363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17364   (exit $ac_status); }; } &&
17365          { ac_try='test -s conftest$ac_exeext'
17366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17367   (eval $ac_try) 2>&5
17368   ac_status=$?
17369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17370   (exit $ac_status); }; }; then
17371   ol_cv_resolver_resolv=yes
17372 else
17373   echo "$as_me: failed program was:" >&5
17374 sed 's/^/| /' conftest.$ac_ext >&5
17375
17376 ol_cv_resolver_resolv=no
17377 fi
17378 rm -f conftest.err conftest.$ac_objext \
17379       conftest$ac_exeext conftest.$ac_ext
17380
17381         LIBS="$ol_LIBS"
17382
17383 fi
17384 echo "$as_me:$LINENO: result: $ol_cv_resolver_resolv" >&5
17385 echo "${ECHO_T}$ol_cv_resolver_resolv" >&6
17386
17387         if test $ol_cv_resolver_resolv = yes ; then
17388                 ol_cv_lib_resolver=-lresolv
17389         fi
17390 fi
17391
17392 if test $ol_cv_lib_resolver = no ; then
17393         echo "$as_me:$LINENO: checking for resolver link (-lbind)" >&5
17394 echo $ECHO_N "checking for resolver link (-lbind)... $ECHO_C" >&6
17395 if test "${ol_cv_resolver_bind+set}" = set; then
17396   echo $ECHO_N "(cached) $ECHO_C" >&6
17397 else
17398
17399         ol_RESOLVER_LIB=-lbind
17400         ol_LIBS=$LIBS
17401         LIBS="$ol_RESOLVER_LIB $LIBS"
17402
17403         cat >conftest.$ac_ext <<_ACEOF
17404 /* confdefs.h.  */
17405 _ACEOF
17406 cat confdefs.h >>conftest.$ac_ext
17407 cat >>conftest.$ac_ext <<_ACEOF
17408 /* end confdefs.h.  */
17409
17410 #ifdef HAVE_SYS_TYPES_H
17411 #       include <sys/types.h>
17412 #endif
17413 #include <netinet/in.h>
17414 #ifdef HAVE_ARPA_NAMESER_H
17415 #       include <arpa/nameser.h>
17416 #endif
17417 #ifdef HAVE_RESOLV_H
17418 #       include <resolv.h>
17419 #endif
17420
17421 int
17422 main ()
17423 {
17424 {
17425         int len, status;
17426         char *request = NULL;
17427         unsigned char reply[64*1024];
17428         unsigned char host[64*1024];
17429         unsigned char *p;
17430
17431 #ifdef NS_HFIXEDSZ
17432         /* Bind 8/9 interface */
17433         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17434 #else
17435         /* Bind 4 interface */
17436 # ifndef T_SRV
17437 #  define T_SRV 33
17438 # endif
17439         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17440 #endif
17441         p = reply;
17442 #ifdef NS_HFIXEDSZ
17443         /* Bind 8/9 interface */
17444         p += NS_HFIXEDSZ;
17445 #elif defined(HFIXEDSZ)
17446         /* Bind 4 interface w/ HFIXEDSZ */
17447         p += HFIXEDSZ;
17448 #else
17449         /* Bind 4 interface w/o HFIXEDSZ */
17450         p += sizeof(HEADER);
17451 #endif
17452         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17453 }
17454   ;
17455   return 0;
17456 }
17457 _ACEOF
17458 rm -f conftest.$ac_objext conftest$ac_exeext
17459 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17460   (eval $ac_link) 2>conftest.er1
17461   ac_status=$?
17462   grep -v '^ *+' conftest.er1 >conftest.err
17463   rm -f conftest.er1
17464   cat conftest.err >&5
17465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17466   (exit $ac_status); } &&
17467          { ac_try='test -z "$ac_c_werror_flag"
17468                          || test ! -s conftest.err'
17469   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17470   (eval $ac_try) 2>&5
17471   ac_status=$?
17472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17473   (exit $ac_status); }; } &&
17474          { ac_try='test -s conftest$ac_exeext'
17475   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17476   (eval $ac_try) 2>&5
17477   ac_status=$?
17478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17479   (exit $ac_status); }; }; then
17480   ol_cv_resolver_bind=yes
17481 else
17482   echo "$as_me: failed program was:" >&5
17483 sed 's/^/| /' conftest.$ac_ext >&5
17484
17485 ol_cv_resolver_bind=no
17486 fi
17487 rm -f conftest.err conftest.$ac_objext \
17488       conftest$ac_exeext conftest.$ac_ext
17489
17490         LIBS="$ol_LIBS"
17491
17492 fi
17493 echo "$as_me:$LINENO: result: $ol_cv_resolver_bind" >&5
17494 echo "${ECHO_T}$ol_cv_resolver_bind" >&6
17495
17496         if test $ol_cv_resolver_bind = yes ; then
17497                 ol_cv_lib_resolver=-lbind
17498         fi
17499 fi
17500
17501
17502
17503 ol_link_dnssrv=no
17504 if test "$ol_cv_lib_resolver" != no ; then
17505
17506 cat >>confdefs.h <<\_ACEOF
17507 #define HAVE_RES_QUERY 1
17508 _ACEOF
17509
17510
17511         if test "$ol_enable_dnssrv" != no ; then
17512                 ol_link_dnssrv=yes
17513         fi
17514
17515         if test "$ol_cv_lib_resolver" != yes ; then
17516                 LIBS="$ol_cv_lib_resolver $LIBS"
17517         fi
17518 fi
17519
17520 if test "$ol_enable_dnssrv" = yes || test "$ol_enable_dnssrv" = mod ; then
17521         if test "$ol_link_dnssrv" = no ; then
17522                 { { echo "$as_me:$LINENO: error: DNSSRV requires res_query()" >&5
17523 echo "$as_me: error: DNSSRV requires res_query()" >&2;}
17524    { (exit 1); exit 1; }; }
17525         fi
17526 else
17527         ol_enable_dnssrv=no
17528 fi
17529
17530
17531 for ac_func in hstrerror
17532 do
17533 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17534 echo "$as_me:$LINENO: checking for $ac_func" >&5
17535 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17536 if eval "test \"\${$as_ac_var+set}\" = set"; then
17537   echo $ECHO_N "(cached) $ECHO_C" >&6
17538 else
17539   cat >conftest.$ac_ext <<_ACEOF
17540 /* confdefs.h.  */
17541 _ACEOF
17542 cat confdefs.h >>conftest.$ac_ext
17543 cat >>conftest.$ac_ext <<_ACEOF
17544 /* end confdefs.h.  */
17545 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17546    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17547 #define $ac_func innocuous_$ac_func
17548
17549 /* System header to define __stub macros and hopefully few prototypes,
17550     which can conflict with char $ac_func (); below.
17551     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17552     <limits.h> exists even on freestanding compilers.  */
17553
17554 #ifdef __STDC__
17555 # include <limits.h>
17556 #else
17557 # include <assert.h>
17558 #endif
17559
17560 #undef $ac_func
17561
17562 /* Override any gcc2 internal prototype to avoid an error.  */
17563 #ifdef __cplusplus
17564 extern "C"
17565 {
17566 #endif
17567 /* We use char because int might match the return type of a gcc2
17568    builtin and then its argument prototype would still apply.  */
17569 char $ac_func ();
17570 /* The GNU C library defines this for functions which it implements
17571     to always fail with ENOSYS.  Some functions are actually named
17572     something starting with __ and the normal name is an alias.  */
17573 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17574 choke me
17575 #else
17576 char (*f) () = $ac_func;
17577 #endif
17578 #ifdef __cplusplus
17579 }
17580 #endif
17581
17582 int
17583 main ()
17584 {
17585 return f != $ac_func;
17586   ;
17587   return 0;
17588 }
17589 _ACEOF
17590 rm -f conftest.$ac_objext conftest$ac_exeext
17591 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17592   (eval $ac_link) 2>conftest.er1
17593   ac_status=$?
17594   grep -v '^ *+' conftest.er1 >conftest.err
17595   rm -f conftest.er1
17596   cat conftest.err >&5
17597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17598   (exit $ac_status); } &&
17599          { ac_try='test -z "$ac_c_werror_flag"
17600                          || test ! -s conftest.err'
17601   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17602   (eval $ac_try) 2>&5
17603   ac_status=$?
17604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17605   (exit $ac_status); }; } &&
17606          { ac_try='test -s conftest$ac_exeext'
17607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17608   (eval $ac_try) 2>&5
17609   ac_status=$?
17610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17611   (exit $ac_status); }; }; then
17612   eval "$as_ac_var=yes"
17613 else
17614   echo "$as_me: failed program was:" >&5
17615 sed 's/^/| /' conftest.$ac_ext >&5
17616
17617 eval "$as_ac_var=no"
17618 fi
17619 rm -f conftest.err conftest.$ac_objext \
17620       conftest$ac_exeext conftest.$ac_ext
17621 fi
17622 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17623 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17624 if test `eval echo '${'$as_ac_var'}'` = yes; then
17625   cat >>confdefs.h <<_ACEOF
17626 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17627 _ACEOF
17628
17629 fi
17630 done
17631
17632
17633
17634
17635
17636
17637 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop
17638 do
17639 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17640 echo "$as_me:$LINENO: checking for $ac_func" >&5
17641 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17642 if eval "test \"\${$as_ac_var+set}\" = set"; then
17643   echo $ECHO_N "(cached) $ECHO_C" >&6
17644 else
17645   cat >conftest.$ac_ext <<_ACEOF
17646 /* confdefs.h.  */
17647 _ACEOF
17648 cat confdefs.h >>conftest.$ac_ext
17649 cat >>conftest.$ac_ext <<_ACEOF
17650 /* end confdefs.h.  */
17651 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17652    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17653 #define $ac_func innocuous_$ac_func
17654
17655 /* System header to define __stub macros and hopefully few prototypes,
17656     which can conflict with char $ac_func (); below.
17657     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17658     <limits.h> exists even on freestanding compilers.  */
17659
17660 #ifdef __STDC__
17661 # include <limits.h>
17662 #else
17663 # include <assert.h>
17664 #endif
17665
17666 #undef $ac_func
17667
17668 /* Override any gcc2 internal prototype to avoid an error.  */
17669 #ifdef __cplusplus
17670 extern "C"
17671 {
17672 #endif
17673 /* We use char because int might match the return type of a gcc2
17674    builtin and then its argument prototype would still apply.  */
17675 char $ac_func ();
17676 /* The GNU C library defines this for functions which it implements
17677     to always fail with ENOSYS.  Some functions are actually named
17678     something starting with __ and the normal name is an alias.  */
17679 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17680 choke me
17681 #else
17682 char (*f) () = $ac_func;
17683 #endif
17684 #ifdef __cplusplus
17685 }
17686 #endif
17687
17688 int
17689 main ()
17690 {
17691 return f != $ac_func;
17692   ;
17693   return 0;
17694 }
17695 _ACEOF
17696 rm -f conftest.$ac_objext conftest$ac_exeext
17697 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17698   (eval $ac_link) 2>conftest.er1
17699   ac_status=$?
17700   grep -v '^ *+' conftest.er1 >conftest.err
17701   rm -f conftest.er1
17702   cat conftest.err >&5
17703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17704   (exit $ac_status); } &&
17705          { ac_try='test -z "$ac_c_werror_flag"
17706                          || test ! -s conftest.err'
17707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17708   (eval $ac_try) 2>&5
17709   ac_status=$?
17710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17711   (exit $ac_status); }; } &&
17712          { ac_try='test -s conftest$ac_exeext'
17713   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17714   (eval $ac_try) 2>&5
17715   ac_status=$?
17716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17717   (exit $ac_status); }; }; then
17718   eval "$as_ac_var=yes"
17719 else
17720   echo "$as_me: failed program was:" >&5
17721 sed 's/^/| /' conftest.$ac_ext >&5
17722
17723 eval "$as_ac_var=no"
17724 fi
17725 rm -f conftest.err conftest.$ac_objext \
17726       conftest$ac_exeext conftest.$ac_ext
17727 fi
17728 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17729 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17730 if test `eval echo '${'$as_ac_var'}'` = yes; then
17731   cat >>confdefs.h <<_ACEOF
17732 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17733 _ACEOF
17734
17735 fi
17736 done
17737
17738
17739 ol_link_ipv6=no
17740 if test $ac_cv_func_getaddrinfo = no || test $ac_cv_func_inet_ntop = no ; then
17741         if test $ol_enable_ipv6 = yes ; then
17742                 { { echo "$as_me:$LINENO: error: IPv6 support requires getaddrinfo() and inet_ntop()" >&5
17743 echo "$as_me: error: IPv6 support requires getaddrinfo() and inet_ntop()" >&2;}
17744    { (exit 1); exit 1; }; }
17745         fi
17746 elif test $ol_enable_ipv6 != no ; then
17747         echo "$as_me:$LINENO: checking INET6_ADDRSTRLEN" >&5
17748 echo $ECHO_N "checking INET6_ADDRSTRLEN... $ECHO_C" >&6
17749 if test "${ol_cv_inet6_addrstrlen+set}" = set; then
17750   echo $ECHO_N "(cached) $ECHO_C" >&6
17751 else
17752
17753                 cat >conftest.$ac_ext <<_ACEOF
17754 /* confdefs.h.  */
17755 _ACEOF
17756 cat confdefs.h >>conftest.$ac_ext
17757 cat >>conftest.$ac_ext <<_ACEOF
17758 /* end confdefs.h.  */
17759
17760 #                       include <netinet/in.h>
17761 #                       ifdef INET6_ADDRSTRLEN
17762                                 __has_inet6_addrstrlen__;
17763 #                       endif
17764
17765 _ACEOF
17766 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17767   $EGREP "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
17768   ol_cv_inet6_addrstrlen=yes
17769 else
17770   ol_cv_inet6_addrstrlen=no
17771 fi
17772 rm -f conftest*
17773
17774 fi
17775 echo "$as_me:$LINENO: result: $ol_cv_inet6_addrstrlen" >&5
17776 echo "${ECHO_T}$ol_cv_inet6_addrstrlen" >&6
17777
17778
17779         echo "$as_me:$LINENO: checking struct sockaddr_storage" >&5
17780 echo $ECHO_N "checking struct sockaddr_storage... $ECHO_C" >&6
17781 if test "${ol_cv_struct_sockaddr_storage+set}" = set; then
17782   echo $ECHO_N "(cached) $ECHO_C" >&6
17783 else
17784
17785                 cat >conftest.$ac_ext <<_ACEOF
17786 /* confdefs.h.  */
17787 _ACEOF
17788 cat confdefs.h >>conftest.$ac_ext
17789 cat >>conftest.$ac_ext <<_ACEOF
17790 /* end confdefs.h.  */
17791
17792 #include <sys/types.h>
17793 #include <sys/socket.h>
17794
17795 int
17796 main ()
17797 {
17798
17799                         struct sockaddr_storage ss;
17800
17801   ;
17802   return 0;
17803 }
17804 _ACEOF
17805 rm -f conftest.$ac_objext
17806 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17807   (eval $ac_compile) 2>conftest.er1
17808   ac_status=$?
17809   grep -v '^ *+' conftest.er1 >conftest.err
17810   rm -f conftest.er1
17811   cat conftest.err >&5
17812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17813   (exit $ac_status); } &&
17814          { ac_try='test -z "$ac_c_werror_flag"
17815                          || test ! -s conftest.err'
17816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17817   (eval $ac_try) 2>&5
17818   ac_status=$?
17819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17820   (exit $ac_status); }; } &&
17821          { ac_try='test -s conftest.$ac_objext'
17822   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17823   (eval $ac_try) 2>&5
17824   ac_status=$?
17825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17826   (exit $ac_status); }; }; then
17827   ol_cv_struct_sockaddr_storage=yes
17828 else
17829   echo "$as_me: failed program was:" >&5
17830 sed 's/^/| /' conftest.$ac_ext >&5
17831
17832 ol_cv_struct_sockaddr_storage=no
17833 fi
17834 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17835 fi
17836 echo "$as_me:$LINENO: result: $ol_cv_struct_sockaddr_storage" >&5
17837 echo "${ECHO_T}$ol_cv_struct_sockaddr_storage" >&6
17838
17839         if test $ol_cv_inet6_addrstrlen = yes &&
17840            test $ol_cv_struct_sockaddr_storage = yes ; then
17841                 ol_link_ipv6=yes
17842         elif test $ol_enable_ipv6 = yes &&
17843              test $ol_cv_inet6_addrstrlen = no ; then
17844                 { { echo "$as_me:$LINENO: error: IPv6 support requires INET6_ADDRSTRLEN" >&5
17845 echo "$as_me: error: IPv6 support requires INET6_ADDRSTRLEN" >&2;}
17846    { (exit 1); exit 1; }; }
17847         elif test $ol_enable_ipv6 = yes &&
17848              test $ol_cv_struct_sockaddr_storage = no ; then
17849                 { { echo "$as_me:$LINENO: error: IPv6 support requires struct sockaddr_storage" >&5
17850 echo "$as_me: error: IPv6 support requires struct sockaddr_storage" >&2;}
17851    { (exit 1); exit 1; }; }
17852         fi
17853 fi
17854
17855 if test $ol_enable_local != no ; then
17856
17857 for ac_header in sys/un.h
17858 do
17859 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17860 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17861   echo "$as_me:$LINENO: checking for $ac_header" >&5
17862 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17863 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17864   echo $ECHO_N "(cached) $ECHO_C" >&6
17865 fi
17866 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17867 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17868 else
17869   # Is the header compilable?
17870 echo "$as_me:$LINENO: checking $ac_header usability" >&5
17871 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17872 cat >conftest.$ac_ext <<_ACEOF
17873 /* confdefs.h.  */
17874 _ACEOF
17875 cat confdefs.h >>conftest.$ac_ext
17876 cat >>conftest.$ac_ext <<_ACEOF
17877 /* end confdefs.h.  */
17878 $ac_includes_default
17879 #include <$ac_header>
17880 _ACEOF
17881 rm -f conftest.$ac_objext
17882 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17883   (eval $ac_compile) 2>conftest.er1
17884   ac_status=$?
17885   grep -v '^ *+' conftest.er1 >conftest.err
17886   rm -f conftest.er1
17887   cat conftest.err >&5
17888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17889   (exit $ac_status); } &&
17890          { ac_try='test -z "$ac_c_werror_flag"
17891                          || test ! -s conftest.err'
17892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17893   (eval $ac_try) 2>&5
17894   ac_status=$?
17895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17896   (exit $ac_status); }; } &&
17897          { ac_try='test -s conftest.$ac_objext'
17898   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17899   (eval $ac_try) 2>&5
17900   ac_status=$?
17901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17902   (exit $ac_status); }; }; then
17903   ac_header_compiler=yes
17904 else
17905   echo "$as_me: failed program was:" >&5
17906 sed 's/^/| /' conftest.$ac_ext >&5
17907
17908 ac_header_compiler=no
17909 fi
17910 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17911 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17912 echo "${ECHO_T}$ac_header_compiler" >&6
17913
17914 # Is the header present?
17915 echo "$as_me:$LINENO: checking $ac_header presence" >&5
17916 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17917 cat >conftest.$ac_ext <<_ACEOF
17918 /* confdefs.h.  */
17919 _ACEOF
17920 cat confdefs.h >>conftest.$ac_ext
17921 cat >>conftest.$ac_ext <<_ACEOF
17922 /* end confdefs.h.  */
17923 #include <$ac_header>
17924 _ACEOF
17925 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17926   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17927   ac_status=$?
17928   grep -v '^ *+' conftest.er1 >conftest.err
17929   rm -f conftest.er1
17930   cat conftest.err >&5
17931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17932   (exit $ac_status); } >/dev/null; then
17933   if test -s conftest.err; then
17934     ac_cpp_err=$ac_c_preproc_warn_flag
17935     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17936   else
17937     ac_cpp_err=
17938   fi
17939 else
17940   ac_cpp_err=yes
17941 fi
17942 if test -z "$ac_cpp_err"; then
17943   ac_header_preproc=yes
17944 else
17945   echo "$as_me: failed program was:" >&5
17946 sed 's/^/| /' conftest.$ac_ext >&5
17947
17948   ac_header_preproc=no
17949 fi
17950 rm -f conftest.err conftest.$ac_ext
17951 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17952 echo "${ECHO_T}$ac_header_preproc" >&6
17953
17954 # So?  What about this header?
17955 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17956   yes:no: )
17957     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17958 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17959     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17960 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17961     ac_header_preproc=yes
17962     ;;
17963   no:yes:* )
17964     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17965 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17966     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17967 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17968     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17969 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17970     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17971 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17972     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17973 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17974     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17975 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17976     (
17977       cat <<\_ASBOX
17978 ## --------------------------------------------- ##
17979 ## Report this to <http://www.openldap.org/its/> ##
17980 ## --------------------------------------------- ##
17981 _ASBOX
17982     ) |
17983       sed "s/^/$as_me: WARNING:     /" >&2
17984     ;;
17985 esac
17986 echo "$as_me:$LINENO: checking for $ac_header" >&5
17987 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17988 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17989   echo $ECHO_N "(cached) $ECHO_C" >&6
17990 else
17991   eval "$as_ac_Header=\$ac_header_preproc"
17992 fi
17993 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17994 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17995
17996 fi
17997 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17998   cat >>confdefs.h <<_ACEOF
17999 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18000 _ACEOF
18001
18002 fi
18003
18004 done
18005
18006
18007         if test $ol_enable_local = auto ; then
18008                 ol_enable_local=$ac_cv_header_sys_un_h
18009         elif test $ac_cv_header_sys_un_h = no ; then
18010                 { { echo "$as_me:$LINENO: error: AF_LOCAL domain support requires sys/un.h" >&5
18011 echo "$as_me: error: AF_LOCAL domain support requires sys/un.h" >&2;}
18012    { (exit 1); exit 1; }; }
18013         fi
18014 fi
18015
18016 ol_link_kbind=no
18017 ol_link_krb5=no
18018 ol_link_krb4=no
18019
18020 case $ol_with_kerberos in yes | auto | k5 | k5only | k425)
18021
18022
18023 for ac_header in krb5.h
18024 do
18025 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18026 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18027   echo "$as_me:$LINENO: checking for $ac_header" >&5
18028 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18029 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18030   echo $ECHO_N "(cached) $ECHO_C" >&6
18031 fi
18032 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18033 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18034 else
18035   # Is the header compilable?
18036 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18037 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18038 cat >conftest.$ac_ext <<_ACEOF
18039 /* confdefs.h.  */
18040 _ACEOF
18041 cat confdefs.h >>conftest.$ac_ext
18042 cat >>conftest.$ac_ext <<_ACEOF
18043 /* end confdefs.h.  */
18044 $ac_includes_default
18045 #include <$ac_header>
18046 _ACEOF
18047 rm -f conftest.$ac_objext
18048 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18049   (eval $ac_compile) 2>conftest.er1
18050   ac_status=$?
18051   grep -v '^ *+' conftest.er1 >conftest.err
18052   rm -f conftest.er1
18053   cat conftest.err >&5
18054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18055   (exit $ac_status); } &&
18056          { ac_try='test -z "$ac_c_werror_flag"
18057                          || test ! -s conftest.err'
18058   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18059   (eval $ac_try) 2>&5
18060   ac_status=$?
18061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18062   (exit $ac_status); }; } &&
18063          { ac_try='test -s conftest.$ac_objext'
18064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18065   (eval $ac_try) 2>&5
18066   ac_status=$?
18067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18068   (exit $ac_status); }; }; then
18069   ac_header_compiler=yes
18070 else
18071   echo "$as_me: failed program was:" >&5
18072 sed 's/^/| /' conftest.$ac_ext >&5
18073
18074 ac_header_compiler=no
18075 fi
18076 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18077 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18078 echo "${ECHO_T}$ac_header_compiler" >&6
18079
18080 # Is the header present?
18081 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18082 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18083 cat >conftest.$ac_ext <<_ACEOF
18084 /* confdefs.h.  */
18085 _ACEOF
18086 cat confdefs.h >>conftest.$ac_ext
18087 cat >>conftest.$ac_ext <<_ACEOF
18088 /* end confdefs.h.  */
18089 #include <$ac_header>
18090 _ACEOF
18091 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18092   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18093   ac_status=$?
18094   grep -v '^ *+' conftest.er1 >conftest.err
18095   rm -f conftest.er1
18096   cat conftest.err >&5
18097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18098   (exit $ac_status); } >/dev/null; then
18099   if test -s conftest.err; then
18100     ac_cpp_err=$ac_c_preproc_warn_flag
18101     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18102   else
18103     ac_cpp_err=
18104   fi
18105 else
18106   ac_cpp_err=yes
18107 fi
18108 if test -z "$ac_cpp_err"; then
18109   ac_header_preproc=yes
18110 else
18111   echo "$as_me: failed program was:" >&5
18112 sed 's/^/| /' conftest.$ac_ext >&5
18113
18114   ac_header_preproc=no
18115 fi
18116 rm -f conftest.err conftest.$ac_ext
18117 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18118 echo "${ECHO_T}$ac_header_preproc" >&6
18119
18120 # So?  What about this header?
18121 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18122   yes:no: )
18123     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18124 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18125     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18126 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18127     ac_header_preproc=yes
18128     ;;
18129   no:yes:* )
18130     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18131 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18132     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18133 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18134     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18135 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18136     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18137 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18138     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18139 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18140     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18141 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18142     (
18143       cat <<\_ASBOX
18144 ## --------------------------------------------- ##
18145 ## Report this to <http://www.openldap.org/its/> ##
18146 ## --------------------------------------------- ##
18147 _ASBOX
18148     ) |
18149       sed "s/^/$as_me: WARNING:     /" >&2
18150     ;;
18151 esac
18152 echo "$as_me:$LINENO: checking for $ac_header" >&5
18153 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18154 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18155   echo $ECHO_N "(cached) $ECHO_C" >&6
18156 else
18157   eval "$as_ac_Header=\$ac_header_preproc"
18158 fi
18159 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18160 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18161
18162 fi
18163 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18164   cat >>confdefs.h <<_ACEOF
18165 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18166 _ACEOF
18167
18168 fi
18169
18170 done
18171
18172
18173         if test $ac_cv_header_krb5_h = yes ; then
18174
18175 for ac_header in heim_err.h
18176 do
18177 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18178 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18179   echo "$as_me:$LINENO: checking for $ac_header" >&5
18180 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18181 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18182   echo $ECHO_N "(cached) $ECHO_C" >&6
18183 fi
18184 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18185 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18186 else
18187   # Is the header compilable?
18188 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18189 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18190 cat >conftest.$ac_ext <<_ACEOF
18191 /* confdefs.h.  */
18192 _ACEOF
18193 cat confdefs.h >>conftest.$ac_ext
18194 cat >>conftest.$ac_ext <<_ACEOF
18195 /* end confdefs.h.  */
18196 $ac_includes_default
18197 #include <$ac_header>
18198 _ACEOF
18199 rm -f conftest.$ac_objext
18200 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18201   (eval $ac_compile) 2>conftest.er1
18202   ac_status=$?
18203   grep -v '^ *+' conftest.er1 >conftest.err
18204   rm -f conftest.er1
18205   cat conftest.err >&5
18206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18207   (exit $ac_status); } &&
18208          { ac_try='test -z "$ac_c_werror_flag"
18209                          || test ! -s conftest.err'
18210   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18211   (eval $ac_try) 2>&5
18212   ac_status=$?
18213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18214   (exit $ac_status); }; } &&
18215          { ac_try='test -s conftest.$ac_objext'
18216   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18217   (eval $ac_try) 2>&5
18218   ac_status=$?
18219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18220   (exit $ac_status); }; }; then
18221   ac_header_compiler=yes
18222 else
18223   echo "$as_me: failed program was:" >&5
18224 sed 's/^/| /' conftest.$ac_ext >&5
18225
18226 ac_header_compiler=no
18227 fi
18228 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18229 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18230 echo "${ECHO_T}$ac_header_compiler" >&6
18231
18232 # Is the header present?
18233 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18234 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18235 cat >conftest.$ac_ext <<_ACEOF
18236 /* confdefs.h.  */
18237 _ACEOF
18238 cat confdefs.h >>conftest.$ac_ext
18239 cat >>conftest.$ac_ext <<_ACEOF
18240 /* end confdefs.h.  */
18241 #include <$ac_header>
18242 _ACEOF
18243 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18244   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18245   ac_status=$?
18246   grep -v '^ *+' conftest.er1 >conftest.err
18247   rm -f conftest.er1
18248   cat conftest.err >&5
18249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18250   (exit $ac_status); } >/dev/null; then
18251   if test -s conftest.err; then
18252     ac_cpp_err=$ac_c_preproc_warn_flag
18253     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18254   else
18255     ac_cpp_err=
18256   fi
18257 else
18258   ac_cpp_err=yes
18259 fi
18260 if test -z "$ac_cpp_err"; then
18261   ac_header_preproc=yes
18262 else
18263   echo "$as_me: failed program was:" >&5
18264 sed 's/^/| /' conftest.$ac_ext >&5
18265
18266   ac_header_preproc=no
18267 fi
18268 rm -f conftest.err conftest.$ac_ext
18269 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18270 echo "${ECHO_T}$ac_header_preproc" >&6
18271
18272 # So?  What about this header?
18273 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18274   yes:no: )
18275     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18276 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18277     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18278 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18279     ac_header_preproc=yes
18280     ;;
18281   no:yes:* )
18282     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18283 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18284     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18285 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18286     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18287 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18288     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18289 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18290     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18291 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18292     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18293 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18294     (
18295       cat <<\_ASBOX
18296 ## --------------------------------------------- ##
18297 ## Report this to <http://www.openldap.org/its/> ##
18298 ## --------------------------------------------- ##
18299 _ASBOX
18300     ) |
18301       sed "s/^/$as_me: WARNING:     /" >&2
18302     ;;
18303 esac
18304 echo "$as_me:$LINENO: checking for $ac_header" >&5
18305 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18306 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18307   echo $ECHO_N "(cached) $ECHO_C" >&6
18308 else
18309   eval "$as_ac_Header=\$ac_header_preproc"
18310 fi
18311 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18312 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18313
18314 fi
18315 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18316   cat >>confdefs.h <<_ACEOF
18317 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18318 _ACEOF
18319
18320 fi
18321
18322 done
18323
18324                 if test $ac_cv_header_heim_err_h = yes ; then
18325                         krb5_impl=heimdal
18326                 else
18327                         krb5_impl=mit
18328                 fi
18329
18330                 if test $krb5_impl = mit; then
18331                         echo "$as_me:$LINENO: checking for main in -lk5crypto" >&5
18332 echo $ECHO_N "checking for main in -lk5crypto... $ECHO_C" >&6
18333 if test "${ac_cv_lib_k5crypto_main+set}" = set; then
18334   echo $ECHO_N "(cached) $ECHO_C" >&6
18335 else
18336   ac_check_lib_save_LIBS=$LIBS
18337 LIBS="-lk5crypto  $LIBS"
18338 cat >conftest.$ac_ext <<_ACEOF
18339 /* confdefs.h.  */
18340 _ACEOF
18341 cat confdefs.h >>conftest.$ac_ext
18342 cat >>conftest.$ac_ext <<_ACEOF
18343 /* end confdefs.h.  */
18344
18345
18346 int
18347 main ()
18348 {
18349 main ();
18350   ;
18351   return 0;
18352 }
18353 _ACEOF
18354 rm -f conftest.$ac_objext conftest$ac_exeext
18355 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18356   (eval $ac_link) 2>conftest.er1
18357   ac_status=$?
18358   grep -v '^ *+' conftest.er1 >conftest.err
18359   rm -f conftest.er1
18360   cat conftest.err >&5
18361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18362   (exit $ac_status); } &&
18363          { ac_try='test -z "$ac_c_werror_flag"
18364                          || test ! -s conftest.err'
18365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18366   (eval $ac_try) 2>&5
18367   ac_status=$?
18368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18369   (exit $ac_status); }; } &&
18370          { ac_try='test -s conftest$ac_exeext'
18371   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18372   (eval $ac_try) 2>&5
18373   ac_status=$?
18374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18375   (exit $ac_status); }; }; then
18376   ac_cv_lib_k5crypto_main=yes
18377 else
18378   echo "$as_me: failed program was:" >&5
18379 sed 's/^/| /' conftest.$ac_ext >&5
18380
18381 ac_cv_lib_k5crypto_main=no
18382 fi
18383 rm -f conftest.err conftest.$ac_objext \
18384       conftest$ac_exeext conftest.$ac_ext
18385 LIBS=$ac_check_lib_save_LIBS
18386 fi
18387 echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_main" >&5
18388 echo "${ECHO_T}$ac_cv_lib_k5crypto_main" >&6
18389 if test $ac_cv_lib_k5crypto_main = yes; then
18390   krb5crypto=k5crypto
18391 else
18392   krb5crypto=crypto
18393 fi
18394
18395
18396                         echo "$as_me:$LINENO: checking for main in -lkrb5" >&5
18397 echo $ECHO_N "checking for main in -lkrb5... $ECHO_C" >&6
18398 if test "${ac_cv_lib_krb5_main+set}" = set; then
18399   echo $ECHO_N "(cached) $ECHO_C" >&6
18400 else
18401   ac_check_lib_save_LIBS=$LIBS
18402 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
18403 cat >conftest.$ac_ext <<_ACEOF
18404 /* confdefs.h.  */
18405 _ACEOF
18406 cat confdefs.h >>conftest.$ac_ext
18407 cat >>conftest.$ac_ext <<_ACEOF
18408 /* end confdefs.h.  */
18409
18410
18411 int
18412 main ()
18413 {
18414 main ();
18415   ;
18416   return 0;
18417 }
18418 _ACEOF
18419 rm -f conftest.$ac_objext conftest$ac_exeext
18420 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18421   (eval $ac_link) 2>conftest.er1
18422   ac_status=$?
18423   grep -v '^ *+' conftest.er1 >conftest.err
18424   rm -f conftest.er1
18425   cat conftest.err >&5
18426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18427   (exit $ac_status); } &&
18428          { ac_try='test -z "$ac_c_werror_flag"
18429                          || test ! -s conftest.err'
18430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18431   (eval $ac_try) 2>&5
18432   ac_status=$?
18433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18434   (exit $ac_status); }; } &&
18435          { ac_try='test -s conftest$ac_exeext'
18436   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18437   (eval $ac_try) 2>&5
18438   ac_status=$?
18439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18440   (exit $ac_status); }; }; then
18441   ac_cv_lib_krb5_main=yes
18442 else
18443   echo "$as_me: failed program was:" >&5
18444 sed 's/^/| /' conftest.$ac_ext >&5
18445
18446 ac_cv_lib_krb5_main=no
18447 fi
18448 rm -f conftest.err conftest.$ac_objext \
18449       conftest$ac_exeext conftest.$ac_ext
18450 LIBS=$ac_check_lib_save_LIBS
18451 fi
18452 echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_main" >&5
18453 echo "${ECHO_T}$ac_cv_lib_krb5_main" >&6
18454 if test $ac_cv_lib_krb5_main = yes; then
18455   have_krb5=yes
18456                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
18457 else
18458   have_krb5=no
18459 fi
18460
18461
18462                 elif test $krb5_impl = heimdal; then
18463                         echo "$as_me:$LINENO: checking for main in -ldes" >&5
18464 echo $ECHO_N "checking for main in -ldes... $ECHO_C" >&6
18465 if test "${ac_cv_lib_des_main+set}" = set; then
18466   echo $ECHO_N "(cached) $ECHO_C" >&6
18467 else
18468   ac_check_lib_save_LIBS=$LIBS
18469 LIBS="-ldes  $LIBS"
18470 cat >conftest.$ac_ext <<_ACEOF
18471 /* confdefs.h.  */
18472 _ACEOF
18473 cat confdefs.h >>conftest.$ac_ext
18474 cat >>conftest.$ac_ext <<_ACEOF
18475 /* end confdefs.h.  */
18476
18477
18478 int
18479 main ()
18480 {
18481 main ();
18482   ;
18483   return 0;
18484 }
18485 _ACEOF
18486 rm -f conftest.$ac_objext conftest$ac_exeext
18487 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18488   (eval $ac_link) 2>conftest.er1
18489   ac_status=$?
18490   grep -v '^ *+' conftest.er1 >conftest.err
18491   rm -f conftest.er1
18492   cat conftest.err >&5
18493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18494   (exit $ac_status); } &&
18495          { ac_try='test -z "$ac_c_werror_flag"
18496                          || test ! -s conftest.err'
18497   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18498   (eval $ac_try) 2>&5
18499   ac_status=$?
18500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18501   (exit $ac_status); }; } &&
18502          { ac_try='test -s conftest$ac_exeext'
18503   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18504   (eval $ac_try) 2>&5
18505   ac_status=$?
18506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18507   (exit $ac_status); }; }; then
18508   ac_cv_lib_des_main=yes
18509 else
18510   echo "$as_me: failed program was:" >&5
18511 sed 's/^/| /' conftest.$ac_ext >&5
18512
18513 ac_cv_lib_des_main=no
18514 fi
18515 rm -f conftest.err conftest.$ac_objext \
18516       conftest$ac_exeext conftest.$ac_ext
18517 LIBS=$ac_check_lib_save_LIBS
18518 fi
18519 echo "$as_me:$LINENO: result: $ac_cv_lib_des_main" >&5
18520 echo "${ECHO_T}$ac_cv_lib_des_main" >&6
18521 if test $ac_cv_lib_des_main = yes; then
18522   krb5crypto=des
18523 else
18524   krb5crypto=crypto
18525 fi
18526
18527
18528                         echo "$as_me:$LINENO: checking for main in -lkrb5" >&5
18529 echo $ECHO_N "checking for main in -lkrb5... $ECHO_C" >&6
18530 if test "${ac_cv_lib_krb5_main+set}" = set; then
18531   echo $ECHO_N "(cached) $ECHO_C" >&6
18532 else
18533   ac_check_lib_save_LIBS=$LIBS
18534 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
18535 cat >conftest.$ac_ext <<_ACEOF
18536 /* confdefs.h.  */
18537 _ACEOF
18538 cat confdefs.h >>conftest.$ac_ext
18539 cat >>conftest.$ac_ext <<_ACEOF
18540 /* end confdefs.h.  */
18541
18542
18543 int
18544 main ()
18545 {
18546 main ();
18547   ;
18548   return 0;
18549 }
18550 _ACEOF
18551 rm -f conftest.$ac_objext conftest$ac_exeext
18552 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18553   (eval $ac_link) 2>conftest.er1
18554   ac_status=$?
18555   grep -v '^ *+' conftest.er1 >conftest.err
18556   rm -f conftest.er1
18557   cat conftest.err >&5
18558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18559   (exit $ac_status); } &&
18560          { ac_try='test -z "$ac_c_werror_flag"
18561                          || test ! -s conftest.err'
18562   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18563   (eval $ac_try) 2>&5
18564   ac_status=$?
18565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18566   (exit $ac_status); }; } &&
18567          { ac_try='test -s conftest$ac_exeext'
18568   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18569   (eval $ac_try) 2>&5
18570   ac_status=$?
18571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18572   (exit $ac_status); }; }; then
18573   ac_cv_lib_krb5_main=yes
18574 else
18575   echo "$as_me: failed program was:" >&5
18576 sed 's/^/| /' conftest.$ac_ext >&5
18577
18578 ac_cv_lib_krb5_main=no
18579 fi
18580 rm -f conftest.err conftest.$ac_objext \
18581       conftest$ac_exeext conftest.$ac_ext
18582 LIBS=$ac_check_lib_save_LIBS
18583 fi
18584 echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_main" >&5
18585 echo "${ECHO_T}$ac_cv_lib_krb5_main" >&6
18586 if test $ac_cv_lib_krb5_main = yes; then
18587   have_krb5=yes
18588                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
18589 else
18590   have_krb5=no
18591 fi
18592
18593
18594
18595 cat >>confdefs.h <<\_ACEOF
18596 #define HAVE_HEIMDAL_KERBEROS 1
18597 _ACEOF
18598
18599
18600                 else
18601                         have_krb5=no
18602                         { echo "$as_me:$LINENO: WARNING: Unrecognized Kerberos5 Implementation" >&5
18603 echo "$as_me: WARNING: Unrecognized Kerberos5 Implementation" >&2;}
18604                 fi
18605
18606                 if test $have_krb5 = yes ; then
18607                         ol_link_krb5=yes
18608
18609
18610 cat >>confdefs.h <<\_ACEOF
18611 #define HAVE_KRB5 1
18612 _ACEOF
18613
18614
18615                         if test $ol_with_kerberos = k5only ; then
18616                                 ol_with_kerberos=found
18617                         fi
18618
18619                 elif test $ol_with_kerberos != auto ; then
18620                         { { echo "$as_me:$LINENO: error: Required Kerberos 5 support not available" >&5
18621 echo "$as_me: error: Required Kerberos 5 support not available" >&2;}
18622    { (exit 1); exit 1; }; }
18623                 fi
18624
18625         fi
18626         ;;
18627 esac
18628
18629 if test $ol_link_krb5 = yes &&
18630    { test $ol_with_kerberos = yes ||
18631      test $ol_with_kerberos = auto ||
18632      test $ol_with_kerberos = k425; }; then
18633
18634
18635
18636 for ac_header in kerberosIV/krb.h kerberosIV/des.h
18637 do
18638 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18639 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18640   echo "$as_me:$LINENO: checking for $ac_header" >&5
18641 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18642 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18643   echo $ECHO_N "(cached) $ECHO_C" >&6
18644 fi
18645 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18646 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18647 else
18648   # Is the header compilable?
18649 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18650 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18651 cat >conftest.$ac_ext <<_ACEOF
18652 /* confdefs.h.  */
18653 _ACEOF
18654 cat confdefs.h >>conftest.$ac_ext
18655 cat >>conftest.$ac_ext <<_ACEOF
18656 /* end confdefs.h.  */
18657 $ac_includes_default
18658 #include <$ac_header>
18659 _ACEOF
18660 rm -f conftest.$ac_objext
18661 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18662   (eval $ac_compile) 2>conftest.er1
18663   ac_status=$?
18664   grep -v '^ *+' conftest.er1 >conftest.err
18665   rm -f conftest.er1
18666   cat conftest.err >&5
18667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18668   (exit $ac_status); } &&
18669          { ac_try='test -z "$ac_c_werror_flag"
18670                          || test ! -s conftest.err'
18671   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18672   (eval $ac_try) 2>&5
18673   ac_status=$?
18674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18675   (exit $ac_status); }; } &&
18676          { ac_try='test -s conftest.$ac_objext'
18677   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18678   (eval $ac_try) 2>&5
18679   ac_status=$?
18680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18681   (exit $ac_status); }; }; then
18682   ac_header_compiler=yes
18683 else
18684   echo "$as_me: failed program was:" >&5
18685 sed 's/^/| /' conftest.$ac_ext >&5
18686
18687 ac_header_compiler=no
18688 fi
18689 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18690 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18691 echo "${ECHO_T}$ac_header_compiler" >&6
18692
18693 # Is the header present?
18694 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18695 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18696 cat >conftest.$ac_ext <<_ACEOF
18697 /* confdefs.h.  */
18698 _ACEOF
18699 cat confdefs.h >>conftest.$ac_ext
18700 cat >>conftest.$ac_ext <<_ACEOF
18701 /* end confdefs.h.  */
18702 #include <$ac_header>
18703 _ACEOF
18704 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18705   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18706   ac_status=$?
18707   grep -v '^ *+' conftest.er1 >conftest.err
18708   rm -f conftest.er1
18709   cat conftest.err >&5
18710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18711   (exit $ac_status); } >/dev/null; then
18712   if test -s conftest.err; then
18713     ac_cpp_err=$ac_c_preproc_warn_flag
18714     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18715   else
18716     ac_cpp_err=
18717   fi
18718 else
18719   ac_cpp_err=yes
18720 fi
18721 if test -z "$ac_cpp_err"; then
18722   ac_header_preproc=yes
18723 else
18724   echo "$as_me: failed program was:" >&5
18725 sed 's/^/| /' conftest.$ac_ext >&5
18726
18727   ac_header_preproc=no
18728 fi
18729 rm -f conftest.err conftest.$ac_ext
18730 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18731 echo "${ECHO_T}$ac_header_preproc" >&6
18732
18733 # So?  What about this header?
18734 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18735   yes:no: )
18736     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18737 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18738     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18739 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18740     ac_header_preproc=yes
18741     ;;
18742   no:yes:* )
18743     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18744 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18745     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18746 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18747     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18748 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18749     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18750 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18751     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18752 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18753     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18754 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18755     (
18756       cat <<\_ASBOX
18757 ## --------------------------------------------- ##
18758 ## Report this to <http://www.openldap.org/its/> ##
18759 ## --------------------------------------------- ##
18760 _ASBOX
18761     ) |
18762       sed "s/^/$as_me: WARNING:     /" >&2
18763     ;;
18764 esac
18765 echo "$as_me:$LINENO: checking for $ac_header" >&5
18766 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18767 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18768   echo $ECHO_N "(cached) $ECHO_C" >&6
18769 else
18770   eval "$as_ac_Header=\$ac_header_preproc"
18771 fi
18772 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18773 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18774
18775 fi
18776 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18777   cat >>confdefs.h <<_ACEOF
18778 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18779 _ACEOF
18780
18781 fi
18782
18783 done
18784
18785
18786         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
18787                 if test $krb5_impl = mit; then
18788                         echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
18789 echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6
18790 if test "${ac_cv_lib_krb4_main+set}" = set; then
18791   echo $ECHO_N "(cached) $ECHO_C" >&6
18792 else
18793   ac_check_lib_save_LIBS=$LIBS
18794 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
18795 cat >conftest.$ac_ext <<_ACEOF
18796 /* confdefs.h.  */
18797 _ACEOF
18798 cat confdefs.h >>conftest.$ac_ext
18799 cat >>conftest.$ac_ext <<_ACEOF
18800 /* end confdefs.h.  */
18801
18802
18803 int
18804 main ()
18805 {
18806 main ();
18807   ;
18808   return 0;
18809 }
18810 _ACEOF
18811 rm -f conftest.$ac_objext conftest$ac_exeext
18812 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18813   (eval $ac_link) 2>conftest.er1
18814   ac_status=$?
18815   grep -v '^ *+' conftest.er1 >conftest.err
18816   rm -f conftest.er1
18817   cat conftest.err >&5
18818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18819   (exit $ac_status); } &&
18820          { ac_try='test -z "$ac_c_werror_flag"
18821                          || test ! -s conftest.err'
18822   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18823   (eval $ac_try) 2>&5
18824   ac_status=$?
18825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18826   (exit $ac_status); }; } &&
18827          { ac_try='test -s conftest$ac_exeext'
18828   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18829   (eval $ac_try) 2>&5
18830   ac_status=$?
18831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18832   (exit $ac_status); }; }; then
18833   ac_cv_lib_krb4_main=yes
18834 else
18835   echo "$as_me: failed program was:" >&5
18836 sed 's/^/| /' conftest.$ac_ext >&5
18837
18838 ac_cv_lib_krb4_main=no
18839 fi
18840 rm -f conftest.err conftest.$ac_objext \
18841       conftest$ac_exeext conftest.$ac_ext
18842 LIBS=$ac_check_lib_save_LIBS
18843 fi
18844 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5
18845 echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6
18846 if test $ac_cv_lib_krb4_main = yes; then
18847   have_k425=yes
18848                                 KRB4_LIBS="-lkrb4 -ldes425"
18849 else
18850   have_k425=no
18851 fi
18852
18853
18854                 elif test $krb5_impl = heimdal; then
18855                         echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
18856 echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6
18857 if test "${ac_cv_lib_krb4_main+set}" = set; then
18858   echo $ECHO_N "(cached) $ECHO_C" >&6
18859 else
18860   ac_check_lib_save_LIBS=$LIBS
18861 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
18862 cat >conftest.$ac_ext <<_ACEOF
18863 /* confdefs.h.  */
18864 _ACEOF
18865 cat confdefs.h >>conftest.$ac_ext
18866 cat >>conftest.$ac_ext <<_ACEOF
18867 /* end confdefs.h.  */
18868
18869
18870 int
18871 main ()
18872 {
18873 main ();
18874   ;
18875   return 0;
18876 }
18877 _ACEOF
18878 rm -f conftest.$ac_objext conftest$ac_exeext
18879 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18880   (eval $ac_link) 2>conftest.er1
18881   ac_status=$?
18882   grep -v '^ *+' conftest.er1 >conftest.err
18883   rm -f conftest.er1
18884   cat conftest.err >&5
18885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18886   (exit $ac_status); } &&
18887          { ac_try='test -z "$ac_c_werror_flag"
18888                          || test ! -s conftest.err'
18889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18890   (eval $ac_try) 2>&5
18891   ac_status=$?
18892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18893   (exit $ac_status); }; } &&
18894          { ac_try='test -s conftest$ac_exeext'
18895   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18896   (eval $ac_try) 2>&5
18897   ac_status=$?
18898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18899   (exit $ac_status); }; }; then
18900   ac_cv_lib_krb4_main=yes
18901 else
18902   echo "$as_me: failed program was:" >&5
18903 sed 's/^/| /' conftest.$ac_ext >&5
18904
18905 ac_cv_lib_krb4_main=no
18906 fi
18907 rm -f conftest.err conftest.$ac_objext \
18908       conftest$ac_exeext conftest.$ac_ext
18909 LIBS=$ac_check_lib_save_LIBS
18910 fi
18911 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5
18912 echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6
18913 if test $ac_cv_lib_krb4_main = yes; then
18914   have_k425=yes
18915                                 KRB4_LIBS="-lkrb4"
18916 else
18917   have_k425=no
18918 fi
18919
18920
18921                 else
18922                         have_425=no
18923                         { echo "$as_me:$LINENO: WARNING: Unrecongized Kerberos V Implementation" >&5
18924 echo "$as_me: WARNING: Unrecongized Kerberos V Implementation" >&2;}
18925                 fi
18926
18927                 if test $have_k425 = yes ; then
18928                         ol_with_kerberos=found
18929                         ol_link_krb4=yes
18930
18931
18932 cat >>confdefs.h <<\_ACEOF
18933 #define HAVE_KRB425 1
18934 _ACEOF
18935
18936
18937 cat >>confdefs.h <<\_ACEOF
18938 #define HAVE_KRB4 1
18939 _ACEOF
18940
18941
18942                         echo "$as_me:$LINENO: checking for des_debug in Kerberos libraries" >&5
18943 echo $ECHO_N "checking for des_debug in Kerberos libraries... $ECHO_C" >&6
18944 if test "${ol_cv_var_des_debug+set}" = set; then
18945   echo $ECHO_N "(cached) $ECHO_C" >&6
18946 else
18947
18948                                                                 save_LIBS="$LIBS"
18949                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
18950                                 cat >conftest.$ac_ext <<_ACEOF
18951 /* confdefs.h.  */
18952 _ACEOF
18953 cat confdefs.h >>conftest.$ac_ext
18954 cat >>conftest.$ac_ext <<_ACEOF
18955 /* end confdefs.h.  */
18956
18957 #include <kerberosIV/krb.h>
18958 #include <kerberosIV/des.h>
18959 extern int des_debug;
18960
18961 int
18962 main ()
18963 {
18964
18965 des_debug = 1;
18966
18967   ;
18968   return 0;
18969 }
18970 _ACEOF
18971 rm -f conftest.$ac_objext conftest$ac_exeext
18972 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18973   (eval $ac_link) 2>conftest.er1
18974   ac_status=$?
18975   grep -v '^ *+' conftest.er1 >conftest.err
18976   rm -f conftest.er1
18977   cat conftest.err >&5
18978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18979   (exit $ac_status); } &&
18980          { ac_try='test -z "$ac_c_werror_flag"
18981                          || test ! -s conftest.err'
18982   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18983   (eval $ac_try) 2>&5
18984   ac_status=$?
18985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18986   (exit $ac_status); }; } &&
18987          { ac_try='test -s conftest$ac_exeext'
18988   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18989   (eval $ac_try) 2>&5
18990   ac_status=$?
18991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18992   (exit $ac_status); }; }; then
18993   ol_cv_var_des_debug=yes
18994 else
18995   echo "$as_me: failed program was:" >&5
18996 sed 's/^/| /' conftest.$ac_ext >&5
18997
18998 ol_cv_var_des_debug=no
18999 fi
19000 rm -f conftest.err conftest.$ac_objext \
19001       conftest$ac_exeext conftest.$ac_ext
19002                                                                 LIBS="$save_LIBS"
19003
19004 fi
19005 echo "$as_me:$LINENO: result: $ol_cv_var_des_debug" >&5
19006 echo "${ECHO_T}$ol_cv_var_des_debug" >&6
19007
19008                         if test $ol_cv_var_des_debug = yes ; then
19009
19010 cat >>confdefs.h <<\_ACEOF
19011 #define HAVE_DES_DEBUG 1
19012 _ACEOF
19013
19014                         fi
19015
19016                         LIBS="$save_LIBS"
19017                 fi
19018         fi
19019 fi
19020
19021 if test $ol_link_krb5 = yes ; then
19022         ol_with_kerberos=found
19023 fi
19024
19025 case $ol_with_kerberos in yes | auto | k4 | kth)
19026
19027
19028
19029
19030 for ac_header in krb.h des.h krb-archaeology.h
19031 do
19032 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19033 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19034   echo "$as_me:$LINENO: checking for $ac_header" >&5
19035 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19036 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19037   echo $ECHO_N "(cached) $ECHO_C" >&6
19038 fi
19039 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19040 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19041 else
19042   # Is the header compilable?
19043 echo "$as_me:$LINENO: checking $ac_header usability" >&5
19044 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19045 cat >conftest.$ac_ext <<_ACEOF
19046 /* confdefs.h.  */
19047 _ACEOF
19048 cat confdefs.h >>conftest.$ac_ext
19049 cat >>conftest.$ac_ext <<_ACEOF
19050 /* end confdefs.h.  */
19051 $ac_includes_default
19052 #include <$ac_header>
19053 _ACEOF
19054 rm -f conftest.$ac_objext
19055 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19056   (eval $ac_compile) 2>conftest.er1
19057   ac_status=$?
19058   grep -v '^ *+' conftest.er1 >conftest.err
19059   rm -f conftest.er1
19060   cat conftest.err >&5
19061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19062   (exit $ac_status); } &&
19063          { ac_try='test -z "$ac_c_werror_flag"
19064                          || test ! -s conftest.err'
19065   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19066   (eval $ac_try) 2>&5
19067   ac_status=$?
19068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19069   (exit $ac_status); }; } &&
19070          { ac_try='test -s conftest.$ac_objext'
19071   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19072   (eval $ac_try) 2>&5
19073   ac_status=$?
19074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19075   (exit $ac_status); }; }; then
19076   ac_header_compiler=yes
19077 else
19078   echo "$as_me: failed program was:" >&5
19079 sed 's/^/| /' conftest.$ac_ext >&5
19080
19081 ac_header_compiler=no
19082 fi
19083 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19084 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19085 echo "${ECHO_T}$ac_header_compiler" >&6
19086
19087 # Is the header present?
19088 echo "$as_me:$LINENO: checking $ac_header presence" >&5
19089 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19090 cat >conftest.$ac_ext <<_ACEOF
19091 /* confdefs.h.  */
19092 _ACEOF
19093 cat confdefs.h >>conftest.$ac_ext
19094 cat >>conftest.$ac_ext <<_ACEOF
19095 /* end confdefs.h.  */
19096 #include <$ac_header>
19097 _ACEOF
19098 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19099   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19100   ac_status=$?
19101   grep -v '^ *+' conftest.er1 >conftest.err
19102   rm -f conftest.er1
19103   cat conftest.err >&5
19104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19105   (exit $ac_status); } >/dev/null; then
19106   if test -s conftest.err; then
19107     ac_cpp_err=$ac_c_preproc_warn_flag
19108     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19109   else
19110     ac_cpp_err=
19111   fi
19112 else
19113   ac_cpp_err=yes
19114 fi
19115 if test -z "$ac_cpp_err"; then
19116   ac_header_preproc=yes
19117 else
19118   echo "$as_me: failed program was:" >&5
19119 sed 's/^/| /' conftest.$ac_ext >&5
19120
19121   ac_header_preproc=no
19122 fi
19123 rm -f conftest.err conftest.$ac_ext
19124 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19125 echo "${ECHO_T}$ac_header_preproc" >&6
19126
19127 # So?  What about this header?
19128 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19129   yes:no: )
19130     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19131 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19132     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19133 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19134     ac_header_preproc=yes
19135     ;;
19136   no:yes:* )
19137     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19138 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19139     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19140 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19141     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19142 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19143     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19144 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19145     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19146 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19147     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19148 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19149     (
19150       cat <<\_ASBOX
19151 ## --------------------------------------------- ##
19152 ## Report this to <http://www.openldap.org/its/> ##
19153 ## --------------------------------------------- ##
19154 _ASBOX
19155     ) |
19156       sed "s/^/$as_me: WARNING:     /" >&2
19157     ;;
19158 esac
19159 echo "$as_me:$LINENO: checking for $ac_header" >&5
19160 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19161 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19162   echo $ECHO_N "(cached) $ECHO_C" >&6
19163 else
19164   eval "$as_ac_Header=\$ac_header_preproc"
19165 fi
19166 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19167 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19168
19169 fi
19170 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19171   cat >>confdefs.h <<_ACEOF
19172 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19173 _ACEOF
19174
19175 fi
19176
19177 done
19178
19179
19180         if test $ac_cv_header_krb_h = yes ; then
19181                 echo "$as_me:$LINENO: checking for main in -lkrb" >&5
19182 echo $ECHO_N "checking for main in -lkrb... $ECHO_C" >&6
19183 if test "${ac_cv_lib_krb_main+set}" = set; then
19184   echo $ECHO_N "(cached) $ECHO_C" >&6
19185 else
19186   ac_check_lib_save_LIBS=$LIBS
19187 LIBS="-lkrb -ldes $LIBS"
19188 cat >conftest.$ac_ext <<_ACEOF
19189 /* confdefs.h.  */
19190 _ACEOF
19191 cat confdefs.h >>conftest.$ac_ext
19192 cat >>conftest.$ac_ext <<_ACEOF
19193 /* end confdefs.h.  */
19194
19195
19196 int
19197 main ()
19198 {
19199 main ();
19200   ;
19201   return 0;
19202 }
19203 _ACEOF
19204 rm -f conftest.$ac_objext conftest$ac_exeext
19205 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19206   (eval $ac_link) 2>conftest.er1
19207   ac_status=$?
19208   grep -v '^ *+' conftest.er1 >conftest.err
19209   rm -f conftest.er1
19210   cat conftest.err >&5
19211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19212   (exit $ac_status); } &&
19213          { ac_try='test -z "$ac_c_werror_flag"
19214                          || test ! -s conftest.err'
19215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19216   (eval $ac_try) 2>&5
19217   ac_status=$?
19218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19219   (exit $ac_status); }; } &&
19220          { ac_try='test -s conftest$ac_exeext'
19221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19222   (eval $ac_try) 2>&5
19223   ac_status=$?
19224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19225   (exit $ac_status); }; }; then
19226   ac_cv_lib_krb_main=yes
19227 else
19228   echo "$as_me: failed program was:" >&5
19229 sed 's/^/| /' conftest.$ac_ext >&5
19230
19231 ac_cv_lib_krb_main=no
19232 fi
19233 rm -f conftest.err conftest.$ac_objext \
19234       conftest$ac_exeext conftest.$ac_ext
19235 LIBS=$ac_check_lib_save_LIBS
19236 fi
19237 echo "$as_me:$LINENO: result: $ac_cv_lib_krb_main" >&5
19238 echo "${ECHO_T}$ac_cv_lib_krb_main" >&6
19239 if test $ac_cv_lib_krb_main = yes; then
19240   have_k4=yes
19241 else
19242   have_k4=no
19243 fi
19244
19245
19246                 if test $have_k4 = yes ; then
19247                         ol_with_kerberos=found
19248                         ol_link_krb4=yes
19249
19250
19251 cat >>confdefs.h <<\_ACEOF
19252 #define HAVE_KRB4 1
19253 _ACEOF
19254
19255
19256                         KRB4_LIBS="-lkrb -ldes"
19257
19258                         if test $ac_cv_header_krb_archaeology_h = yes ; then
19259
19260 cat >>confdefs.h <<\_ACEOF
19261 #define HAVE_KTH_KERBEROS 1
19262 _ACEOF
19263
19264                         fi
19265                 fi
19266         fi
19267         ;;
19268 esac
19269
19270 if test $ol_link_krb4 = yes && test $ol_enable_kbind != no ; then
19271         ol_link_kbind=yes
19272
19273 elif test $ol_enable_kbind = yes ; then
19274         { { echo "$as_me:$LINENO: error: Kerberos IV detection failed" >&5
19275 echo "$as_me: error: Kerberos IV detection failed" >&2;}
19276    { (exit 1); exit 1; }; }
19277 fi
19278
19279 if test $ol_link_krb4 = yes || test $ol_link_krb5 = yes ; then
19280
19281 cat >>confdefs.h <<\_ACEOF
19282 #define HAVE_KERBEROS 1
19283 _ACEOF
19284
19285
19286 elif test $ol_with_kerberos != auto && test $ol_with_kerberos != no ; then
19287         { { echo "$as_me:$LINENO: error: Kerberos detection failed" >&5
19288 echo "$as_me: error: Kerberos detection failed" >&2;}
19289    { (exit 1); exit 1; }; }
19290 fi
19291
19292
19293 ol_link_tls=no
19294 if test $ol_with_tls != no ; then
19295
19296 for ac_header in openssl/ssl.h
19297 do
19298 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19299 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19300   echo "$as_me:$LINENO: checking for $ac_header" >&5
19301 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19302 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19303   echo $ECHO_N "(cached) $ECHO_C" >&6
19304 fi
19305 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19306 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19307 else
19308   # Is the header compilable?
19309 echo "$as_me:$LINENO: checking $ac_header usability" >&5
19310 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19311 cat >conftest.$ac_ext <<_ACEOF
19312 /* confdefs.h.  */
19313 _ACEOF
19314 cat confdefs.h >>conftest.$ac_ext
19315 cat >>conftest.$ac_ext <<_ACEOF
19316 /* end confdefs.h.  */
19317 $ac_includes_default
19318 #include <$ac_header>
19319 _ACEOF
19320 rm -f conftest.$ac_objext
19321 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19322   (eval $ac_compile) 2>conftest.er1
19323   ac_status=$?
19324   grep -v '^ *+' conftest.er1 >conftest.err
19325   rm -f conftest.er1
19326   cat conftest.err >&5
19327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19328   (exit $ac_status); } &&
19329          { ac_try='test -z "$ac_c_werror_flag"
19330                          || test ! -s conftest.err'
19331   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19332   (eval $ac_try) 2>&5
19333   ac_status=$?
19334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19335   (exit $ac_status); }; } &&
19336          { ac_try='test -s conftest.$ac_objext'
19337   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19338   (eval $ac_try) 2>&5
19339   ac_status=$?
19340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19341   (exit $ac_status); }; }; then
19342   ac_header_compiler=yes
19343 else
19344   echo "$as_me: failed program was:" >&5
19345 sed 's/^/| /' conftest.$ac_ext >&5
19346
19347 ac_header_compiler=no
19348 fi
19349 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19350 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19351 echo "${ECHO_T}$ac_header_compiler" >&6
19352
19353 # Is the header present?
19354 echo "$as_me:$LINENO: checking $ac_header presence" >&5
19355 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19356 cat >conftest.$ac_ext <<_ACEOF
19357 /* confdefs.h.  */
19358 _ACEOF
19359 cat confdefs.h >>conftest.$ac_ext
19360 cat >>conftest.$ac_ext <<_ACEOF
19361 /* end confdefs.h.  */
19362 #include <$ac_header>
19363 _ACEOF
19364 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19365   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19366   ac_status=$?
19367   grep -v '^ *+' conftest.er1 >conftest.err
19368   rm -f conftest.er1
19369   cat conftest.err >&5
19370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19371   (exit $ac_status); } >/dev/null; then
19372   if test -s conftest.err; then
19373     ac_cpp_err=$ac_c_preproc_warn_flag
19374     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19375   else
19376     ac_cpp_err=
19377   fi
19378 else
19379   ac_cpp_err=yes
19380 fi
19381 if test -z "$ac_cpp_err"; then
19382   ac_header_preproc=yes
19383 else
19384   echo "$as_me: failed program was:" >&5
19385 sed 's/^/| /' conftest.$ac_ext >&5
19386
19387   ac_header_preproc=no
19388 fi
19389 rm -f conftest.err conftest.$ac_ext
19390 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19391 echo "${ECHO_T}$ac_header_preproc" >&6
19392
19393 # So?  What about this header?
19394 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19395   yes:no: )
19396     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19397 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19398     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19399 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19400     ac_header_preproc=yes
19401     ;;
19402   no:yes:* )
19403     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19404 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19405     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19406 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19407     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19408 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19409     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19410 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19411     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19412 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19413     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19414 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19415     (
19416       cat <<\_ASBOX
19417 ## --------------------------------------------- ##
19418 ## Report this to <http://www.openldap.org/its/> ##
19419 ## --------------------------------------------- ##
19420 _ASBOX
19421     ) |
19422       sed "s/^/$as_me: WARNING:     /" >&2
19423     ;;
19424 esac
19425 echo "$as_me:$LINENO: checking for $ac_header" >&5
19426 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19427 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19428   echo $ECHO_N "(cached) $ECHO_C" >&6
19429 else
19430   eval "$as_ac_Header=\$ac_header_preproc"
19431 fi
19432 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19433 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19434
19435 fi
19436 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19437   cat >>confdefs.h <<_ACEOF
19438 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19439 _ACEOF
19440
19441 fi
19442
19443 done
19444
19445
19446         if test $ac_cv_header_openssl_ssl_h = yes ; then
19447                 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
19448 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
19449 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
19450   echo $ECHO_N "(cached) $ECHO_C" >&6
19451 else
19452   ac_check_lib_save_LIBS=$LIBS
19453 LIBS="-lssl -lcrypto $LIBS"
19454 cat >conftest.$ac_ext <<_ACEOF
19455 /* confdefs.h.  */
19456 _ACEOF
19457 cat confdefs.h >>conftest.$ac_ext
19458 cat >>conftest.$ac_ext <<_ACEOF
19459 /* end confdefs.h.  */
19460
19461 /* Override any gcc2 internal prototype to avoid an error.  */
19462 #ifdef __cplusplus
19463 extern "C"
19464 #endif
19465 /* We use char because int might match the return type of a gcc2
19466    builtin and then its argument prototype would still apply.  */
19467 char SSL_library_init ();
19468 int
19469 main ()
19470 {
19471 SSL_library_init ();
19472   ;
19473   return 0;
19474 }
19475 _ACEOF
19476 rm -f conftest.$ac_objext conftest$ac_exeext
19477 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19478   (eval $ac_link) 2>conftest.er1
19479   ac_status=$?
19480   grep -v '^ *+' conftest.er1 >conftest.err
19481   rm -f conftest.er1
19482   cat conftest.err >&5
19483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19484   (exit $ac_status); } &&
19485          { ac_try='test -z "$ac_c_werror_flag"
19486                          || test ! -s conftest.err'
19487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19488   (eval $ac_try) 2>&5
19489   ac_status=$?
19490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19491   (exit $ac_status); }; } &&
19492          { ac_try='test -s conftest$ac_exeext'
19493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19494   (eval $ac_try) 2>&5
19495   ac_status=$?
19496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19497   (exit $ac_status); }; }; then
19498   ac_cv_lib_ssl_SSL_library_init=yes
19499 else
19500   echo "$as_me: failed program was:" >&5
19501 sed 's/^/| /' conftest.$ac_ext >&5
19502
19503 ac_cv_lib_ssl_SSL_library_init=no
19504 fi
19505 rm -f conftest.err conftest.$ac_objext \
19506       conftest$ac_exeext conftest.$ac_ext
19507 LIBS=$ac_check_lib_save_LIBS
19508 fi
19509 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
19510 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
19511 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
19512   have_openssl=yes
19513                         need_rsaref=no
19514 else
19515   have_openssl=no
19516 fi
19517
19518
19519                 if test $have_openssl = no ; then
19520                         echo "$as_me:$LINENO: checking for ssl3_accept in -lssl" >&5
19521 echo $ECHO_N "checking for ssl3_accept in -lssl... $ECHO_C" >&6
19522 if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then
19523   echo $ECHO_N "(cached) $ECHO_C" >&6
19524 else
19525   ac_check_lib_save_LIBS=$LIBS
19526 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
19527 cat >conftest.$ac_ext <<_ACEOF
19528 /* confdefs.h.  */
19529 _ACEOF
19530 cat confdefs.h >>conftest.$ac_ext
19531 cat >>conftest.$ac_ext <<_ACEOF
19532 /* end confdefs.h.  */
19533
19534 /* Override any gcc2 internal prototype to avoid an error.  */
19535 #ifdef __cplusplus
19536 extern "C"
19537 #endif
19538 /* We use char because int might match the return type of a gcc2
19539    builtin and then its argument prototype would still apply.  */
19540 char ssl3_accept ();
19541 int
19542 main ()
19543 {
19544 ssl3_accept ();
19545   ;
19546   return 0;
19547 }
19548 _ACEOF
19549 rm -f conftest.$ac_objext conftest$ac_exeext
19550 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19551   (eval $ac_link) 2>conftest.er1
19552   ac_status=$?
19553   grep -v '^ *+' conftest.er1 >conftest.err
19554   rm -f conftest.er1
19555   cat conftest.err >&5
19556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19557   (exit $ac_status); } &&
19558          { ac_try='test -z "$ac_c_werror_flag"
19559                          || test ! -s conftest.err'
19560   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19561   (eval $ac_try) 2>&5
19562   ac_status=$?
19563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19564   (exit $ac_status); }; } &&
19565          { ac_try='test -s conftest$ac_exeext'
19566   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19567   (eval $ac_try) 2>&5
19568   ac_status=$?
19569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19570   (exit $ac_status); }; }; then
19571   ac_cv_lib_ssl_ssl3_accept=yes
19572 else
19573   echo "$as_me: failed program was:" >&5
19574 sed 's/^/| /' conftest.$ac_ext >&5
19575
19576 ac_cv_lib_ssl_ssl3_accept=no
19577 fi
19578 rm -f conftest.err conftest.$ac_objext \
19579       conftest$ac_exeext conftest.$ac_ext
19580 LIBS=$ac_check_lib_save_LIBS
19581 fi
19582 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_ssl3_accept" >&5
19583 echo "${ECHO_T}$ac_cv_lib_ssl_ssl3_accept" >&6
19584 if test $ac_cv_lib_ssl_ssl3_accept = yes; then
19585   have_openssl=yes
19586                                 need_rsaref=yes
19587 else
19588   have_openssl=no
19589 fi
19590
19591                 fi
19592
19593                 if test $have_openssl = yes ; then
19594                         ol_with_tls=found
19595                         ol_link_tls=yes
19596
19597
19598 cat >>confdefs.h <<\_ACEOF
19599 #define HAVE_OPENSSL 1
19600 _ACEOF
19601
19602
19603                         if test $need_rsaref = yes; then
19604
19605 cat >>confdefs.h <<\_ACEOF
19606 #define HAVE_RSAREF 1
19607 _ACEOF
19608
19609
19610                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
19611                         else
19612                                 TLS_LIBS="-lssl -lcrypto"
19613                         fi
19614                 fi
19615                 echo "$as_me:$LINENO: checking OpenSSL library version (CRL checking capability)" >&5
19616 echo $ECHO_N "checking OpenSSL library version (CRL checking capability)... $ECHO_C" >&6
19617 if test "${ol_cv_ssl_crl_compat+set}" = set; then
19618   echo $ECHO_N "(cached) $ECHO_C" >&6
19619 else
19620
19621         cat >conftest.$ac_ext <<_ACEOF
19622 /* confdefs.h.  */
19623 _ACEOF
19624 cat confdefs.h >>conftest.$ac_ext
19625 cat >>conftest.$ac_ext <<_ACEOF
19626 /* end confdefs.h.  */
19627
19628 #ifdef HAVE_OPENSSL_SSL_H
19629 #include <openssl/ssl.h>
19630 #else
19631 #include <ssl.h>
19632 #endif
19633
19634 /* Require 0.9.7d+ */
19635 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
19636         char *__ssl_compat = "0.9.7d";
19637 #endif
19638
19639 _ACEOF
19640 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19641   $EGREP "__ssl_compat" >/dev/null 2>&1; then
19642   ol_cv_ssl_crl_compat=yes
19643 else
19644   ol_cv_ssl_crl_compat=no
19645 fi
19646 rm -f conftest*
19647
19648 fi
19649 echo "$as_me:$LINENO: result: $ol_cv_ssl_crl_compat" >&5
19650 echo "${ECHO_T}$ol_cv_ssl_crl_compat" >&6
19651
19652                 if test $ol_cv_ssl_crl_compat = no ; then
19653                         ol_link_ssl=no
19654                 else
19655
19656 cat >>confdefs.h <<\_ACEOF
19657 #define HAVE_OPENSSL_CRL 1
19658 _ACEOF
19659
19660                 fi
19661         fi
19662
19663 else
19664         { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5
19665 echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
19666 fi
19667
19668 WITH_TLS=no
19669 if test $ol_link_tls = yes ; then
19670
19671 cat >>confdefs.h <<\_ACEOF
19672 #define HAVE_TLS 1
19673 _ACEOF
19674
19675         WITH_TLS=yes
19676
19677 elif test $ol_with_tls = auto ; then
19678         { echo "$as_me:$LINENO: WARNING: Could not locate TLS/SSL package" >&5
19679 echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;}
19680         { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5
19681 echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
19682
19683 elif test $ol_with_tls != no ; then
19684         { { echo "$as_me:$LINENO: error: Could not locate TLS/SSL package" >&5
19685 echo "$as_me: error: Could not locate TLS/SSL package" >&2;}
19686    { (exit 1); exit 1; }; }
19687 fi
19688
19689 if test $ol_enable_lmpasswd != no; then
19690         if test $ol_link_tls != yes ; then
19691                 { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5
19692 echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;}
19693    { (exit 1); exit 1; }; }
19694         fi
19695
19696
19697 cat >>confdefs.h <<\_ACEOF
19698 #define SLAPD_LMHASH 1
19699 _ACEOF
19700
19701 fi
19702
19703 ol_link_threads=no
19704
19705 case $ol_with_threads in auto | yes | nt)
19706
19707
19708         echo "$as_me:$LINENO: checking for _beginthread" >&5
19709 echo $ECHO_N "checking for _beginthread... $ECHO_C" >&6
19710 if test "${ac_cv_func__beginthread+set}" = set; then
19711   echo $ECHO_N "(cached) $ECHO_C" >&6
19712 else
19713   cat >conftest.$ac_ext <<_ACEOF
19714 /* confdefs.h.  */
19715 _ACEOF
19716 cat confdefs.h >>conftest.$ac_ext
19717 cat >>conftest.$ac_ext <<_ACEOF
19718 /* end confdefs.h.  */
19719 /* Define _beginthread to an innocuous variant, in case <limits.h> declares _beginthread.
19720    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19721 #define _beginthread innocuous__beginthread
19722
19723 /* System header to define __stub macros and hopefully few prototypes,
19724     which can conflict with char _beginthread (); below.
19725     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19726     <limits.h> exists even on freestanding compilers.  */
19727
19728 #ifdef __STDC__
19729 # include <limits.h>
19730 #else
19731 # include <assert.h>
19732 #endif
19733
19734 #undef _beginthread
19735
19736 /* Override any gcc2 internal prototype to avoid an error.  */
19737 #ifdef __cplusplus
19738 extern "C"
19739 {
19740 #endif
19741 /* We use char because int might match the return type of a gcc2
19742    builtin and then its argument prototype would still apply.  */
19743 char _beginthread ();
19744 /* The GNU C library defines this for functions which it implements
19745     to always fail with ENOSYS.  Some functions are actually named
19746     something starting with __ and the normal name is an alias.  */
19747 #if defined (__stub__beginthread) || defined (__stub____beginthread)
19748 choke me
19749 #else
19750 char (*f) () = _beginthread;
19751 #endif
19752 #ifdef __cplusplus
19753 }
19754 #endif
19755
19756 int
19757 main ()
19758 {
19759 return f != _beginthread;
19760   ;
19761   return 0;
19762 }
19763 _ACEOF
19764 rm -f conftest.$ac_objext conftest$ac_exeext
19765 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19766   (eval $ac_link) 2>conftest.er1
19767   ac_status=$?
19768   grep -v '^ *+' conftest.er1 >conftest.err
19769   rm -f conftest.er1
19770   cat conftest.err >&5
19771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19772   (exit $ac_status); } &&
19773          { ac_try='test -z "$ac_c_werror_flag"
19774                          || test ! -s conftest.err'
19775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19776   (eval $ac_try) 2>&5
19777   ac_status=$?
19778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19779   (exit $ac_status); }; } &&
19780          { ac_try='test -s conftest$ac_exeext'
19781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19782   (eval $ac_try) 2>&5
19783   ac_status=$?
19784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19785   (exit $ac_status); }; }; then
19786   ac_cv_func__beginthread=yes
19787 else
19788   echo "$as_me: failed program was:" >&5
19789 sed 's/^/| /' conftest.$ac_ext >&5
19790
19791 ac_cv_func__beginthread=no
19792 fi
19793 rm -f conftest.err conftest.$ac_objext \
19794       conftest$ac_exeext conftest.$ac_ext
19795 fi
19796 echo "$as_me:$LINENO: result: $ac_cv_func__beginthread" >&5
19797 echo "${ECHO_T}$ac_cv_func__beginthread" >&6
19798
19799
19800         if test $ac_cv_func__beginthread = yes ; then
19801
19802 cat >>confdefs.h <<\_ACEOF
19803 #define HAVE_NT_THREADS 1
19804 _ACEOF
19805
19806                 ol_cv_nt_threads=yes
19807         fi
19808
19809
19810         if test "$ol_cv_nt_threads" = yes ; then
19811                 ol_link_threads=nt
19812                 ol_with_threads=found
19813                 ol_with_yielding_select=yes
19814
19815
19816 cat >>confdefs.h <<\_ACEOF
19817 #define HAVE_NT_SERVICE_MANAGER 1
19818 _ACEOF
19819
19820
19821 cat >>confdefs.h <<\_ACEOF
19822 #define HAVE_NT_EVENT_LOG 1
19823 _ACEOF
19824
19825         fi
19826
19827         if test $ol_with_threads = nt ; then
19828                 { { echo "$as_me:$LINENO: error: could not locate NT Threads" >&5
19829 echo "$as_me: error: could not locate NT Threads" >&2;}
19830    { (exit 1); exit 1; }; }
19831         fi
19832         ;;
19833 esac
19834
19835 case $ol_with_threads in auto | yes | posix)
19836
19837
19838 for ac_header in pthread.h
19839 do
19840 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19841 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19842   echo "$as_me:$LINENO: checking for $ac_header" >&5
19843 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19844 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19845   echo $ECHO_N "(cached) $ECHO_C" >&6
19846 fi
19847 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19848 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19849 else
19850   # Is the header compilable?
19851 echo "$as_me:$LINENO: checking $ac_header usability" >&5
19852 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19853 cat >conftest.$ac_ext <<_ACEOF
19854 /* confdefs.h.  */
19855 _ACEOF
19856 cat confdefs.h >>conftest.$ac_ext
19857 cat >>conftest.$ac_ext <<_ACEOF
19858 /* end confdefs.h.  */
19859 $ac_includes_default
19860 #include <$ac_header>
19861 _ACEOF
19862 rm -f conftest.$ac_objext
19863 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19864   (eval $ac_compile) 2>conftest.er1
19865   ac_status=$?
19866   grep -v '^ *+' conftest.er1 >conftest.err
19867   rm -f conftest.er1
19868   cat conftest.err >&5
19869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19870   (exit $ac_status); } &&
19871          { ac_try='test -z "$ac_c_werror_flag"
19872                          || test ! -s conftest.err'
19873   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19874   (eval $ac_try) 2>&5
19875   ac_status=$?
19876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19877   (exit $ac_status); }; } &&
19878          { ac_try='test -s conftest.$ac_objext'
19879   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19880   (eval $ac_try) 2>&5
19881   ac_status=$?
19882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19883   (exit $ac_status); }; }; then
19884   ac_header_compiler=yes
19885 else
19886   echo "$as_me: failed program was:" >&5
19887 sed 's/^/| /' conftest.$ac_ext >&5
19888
19889 ac_header_compiler=no
19890 fi
19891 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19892 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19893 echo "${ECHO_T}$ac_header_compiler" >&6
19894
19895 # Is the header present?
19896 echo "$as_me:$LINENO: checking $ac_header presence" >&5
19897 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19898 cat >conftest.$ac_ext <<_ACEOF
19899 /* confdefs.h.  */
19900 _ACEOF
19901 cat confdefs.h >>conftest.$ac_ext
19902 cat >>conftest.$ac_ext <<_ACEOF
19903 /* end confdefs.h.  */
19904 #include <$ac_header>
19905 _ACEOF
19906 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19907   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19908   ac_status=$?
19909   grep -v '^ *+' conftest.er1 >conftest.err
19910   rm -f conftest.er1
19911   cat conftest.err >&5
19912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19913   (exit $ac_status); } >/dev/null; then
19914   if test -s conftest.err; then
19915     ac_cpp_err=$ac_c_preproc_warn_flag
19916     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19917   else
19918     ac_cpp_err=
19919   fi
19920 else
19921   ac_cpp_err=yes
19922 fi
19923 if test -z "$ac_cpp_err"; then
19924   ac_header_preproc=yes
19925 else
19926   echo "$as_me: failed program was:" >&5
19927 sed 's/^/| /' conftest.$ac_ext >&5
19928
19929   ac_header_preproc=no
19930 fi
19931 rm -f conftest.err conftest.$ac_ext
19932 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19933 echo "${ECHO_T}$ac_header_preproc" >&6
19934
19935 # So?  What about this header?
19936 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19937   yes:no: )
19938     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19939 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19940     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19941 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19942     ac_header_preproc=yes
19943     ;;
19944   no:yes:* )
19945     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19946 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19947     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19948 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19949     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19950 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19951     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19952 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19953     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19954 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19955     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19956 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19957     (
19958       cat <<\_ASBOX
19959 ## --------------------------------------------- ##
19960 ## Report this to <http://www.openldap.org/its/> ##
19961 ## --------------------------------------------- ##
19962 _ASBOX
19963     ) |
19964       sed "s/^/$as_me: WARNING:     /" >&2
19965     ;;
19966 esac
19967 echo "$as_me:$LINENO: checking for $ac_header" >&5
19968 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19969 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19970   echo $ECHO_N "(cached) $ECHO_C" >&6
19971 else
19972   eval "$as_ac_Header=\$ac_header_preproc"
19973 fi
19974 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19975 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19976
19977 fi
19978 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19979   cat >>confdefs.h <<_ACEOF
19980 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19981 _ACEOF
19982
19983 fi
19984
19985 done
19986
19987
19988         if test $ac_cv_header_pthread_h = yes ; then
19989                 echo "$as_me:$LINENO: checking POSIX thread version" >&5
19990 echo $ECHO_N "checking POSIX thread version... $ECHO_C" >&6
19991 if test "${ol_cv_pthread_version+set}" = set; then
19992   echo $ECHO_N "(cached) $ECHO_C" >&6
19993 else
19994
19995         cat >conftest.$ac_ext <<_ACEOF
19996 /* confdefs.h.  */
19997 _ACEOF
19998 cat confdefs.h >>conftest.$ac_ext
19999 cat >>conftest.$ac_ext <<_ACEOF
20000 /* end confdefs.h.  */
20001
20002 #               include <pthread.h>
20003
20004 int
20005 main ()
20006 {
20007
20008                 int i = PTHREAD_CREATE_JOINABLE;
20009
20010   ;
20011   return 0;
20012 }
20013 _ACEOF
20014 rm -f conftest.$ac_objext
20015 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20016   (eval $ac_compile) 2>conftest.er1
20017   ac_status=$?
20018   grep -v '^ *+' conftest.er1 >conftest.err
20019   rm -f conftest.er1
20020   cat conftest.err >&5
20021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20022   (exit $ac_status); } &&
20023          { ac_try='test -z "$ac_c_werror_flag"
20024                          || test ! -s conftest.err'
20025   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20026   (eval $ac_try) 2>&5
20027   ac_status=$?
20028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20029   (exit $ac_status); }; } &&
20030          { ac_try='test -s conftest.$ac_objext'
20031   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20032   (eval $ac_try) 2>&5
20033   ac_status=$?
20034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20035   (exit $ac_status); }; }; then
20036
20037         cat >conftest.$ac_ext <<_ACEOF
20038 /* confdefs.h.  */
20039 _ACEOF
20040 cat confdefs.h >>conftest.$ac_ext
20041 cat >>conftest.$ac_ext <<_ACEOF
20042 /* end confdefs.h.  */
20043 #include <pthread.h>
20044
20045 _ACEOF
20046 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20047   $EGREP "pthread_detach" >/dev/null 2>&1; then
20048   ol_cv_pthread_version=10
20049 else
20050   ol_cv_pthread_version=8
20051 fi
20052 rm -f conftest*
20053
20054 else
20055   echo "$as_me: failed program was:" >&5
20056 sed 's/^/| /' conftest.$ac_ext >&5
20057
20058
20059         cat >conftest.$ac_ext <<_ACEOF
20060 /* confdefs.h.  */
20061 _ACEOF
20062 cat confdefs.h >>conftest.$ac_ext
20063 cat >>conftest.$ac_ext <<_ACEOF
20064 /* end confdefs.h.  */
20065
20066 #               include <pthread.h>
20067 #               ifdef PTHREAD_CREATE_UNDETACHED
20068                 draft7
20069 #               endif
20070
20071 _ACEOF
20072 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20073   $EGREP "draft7" >/dev/null 2>&1; then
20074   ol_cv_pthread_version=7
20075 else
20076
20077         cat >conftest.$ac_ext <<_ACEOF
20078 /* confdefs.h.  */
20079 _ACEOF
20080 cat confdefs.h >>conftest.$ac_ext
20081 cat >>conftest.$ac_ext <<_ACEOF
20082 /* end confdefs.h.  */
20083 #include <pthread.h>
20084
20085 _ACEOF
20086 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20087   $EGREP "pthread_attr_init" >/dev/null 2>&1; then
20088   ol_cv_pthread_version=6
20089 else
20090
20091         cat >conftest.$ac_ext <<_ACEOF
20092 /* confdefs.h.  */
20093 _ACEOF
20094 cat confdefs.h >>conftest.$ac_ext
20095 cat >>conftest.$ac_ext <<_ACEOF
20096 /* end confdefs.h.  */
20097
20098 #               include <pthread.h>
20099 #ifdef          PTHREAD_MUTEX_INITIALIZER
20100                 draft5
20101 #endif
20102
20103 _ACEOF
20104 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20105   $EGREP "draft5" >/dev/null 2>&1; then
20106   ol_cv_pthread_version=5
20107 else
20108   ol_cv_pthread_version=4
20109 fi
20110 rm -f conftest*
20111
20112 fi
20113 rm -f conftest*
20114
20115 fi
20116 rm -f conftest*
20117
20118 fi
20119 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20120
20121 fi
20122 echo "$as_me:$LINENO: result: $ol_cv_pthread_version" >&5
20123 echo "${ECHO_T}$ol_cv_pthread_version" >&6
20124
20125
20126                 if test $ol_cv_pthread_version != 0 ; then
20127
20128 cat >>confdefs.h <<_ACEOF
20129 #define HAVE_PTHREADS $ol_cv_pthread_version
20130 _ACEOF
20131
20132                 else
20133                         { { echo "$as_me:$LINENO: error: unknown pthread version" >&5
20134 echo "$as_me: error: unknown pthread version" >&2;}
20135    { (exit 1); exit 1; }; }
20136                 fi
20137
20138                 # consider threads found
20139                 ol_with_threads=found
20140
20141
20142         echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5
20143 echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6
20144 if test "${ol_cv_header_linux_threads+set}" = set; then
20145   echo $ECHO_N "(cached) $ECHO_C" >&6
20146 else
20147   cat >conftest.$ac_ext <<_ACEOF
20148 /* confdefs.h.  */
20149 _ACEOF
20150 cat confdefs.h >>conftest.$ac_ext
20151 cat >>conftest.$ac_ext <<_ACEOF
20152 /* end confdefs.h.  */
20153 #include <pthread.h>
20154 _ACEOF
20155 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20156   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then
20157   ol_cv_header_linux_threads=yes
20158 else
20159   ol_cv_header_linux_threads=no
20160 fi
20161 rm -f conftest*
20162
20163
20164 fi
20165 echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5
20166 echo "${ECHO_T}$ol_cv_header_linux_threads" >&6
20167         if test $ol_cv_header_linux_threads = yes; then
20168
20169 cat >>confdefs.h <<\_ACEOF
20170 #define HAVE_LINUX_THREADS 1
20171 _ACEOF
20172
20173         fi
20174
20175
20176         echo "$as_me:$LINENO: checking for GNU Pth pthread.h" >&5
20177 echo $ECHO_N "checking for GNU Pth pthread.h... $ECHO_C" >&6
20178 if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then
20179   echo $ECHO_N "(cached) $ECHO_C" >&6
20180 else
20181   cat >conftest.$ac_ext <<_ACEOF
20182 /* confdefs.h.  */
20183 _ACEOF
20184 cat confdefs.h >>conftest.$ac_ext
20185 cat >>conftest.$ac_ext <<_ACEOF
20186 /* end confdefs.h.  */
20187 #include <pthread.h>
20188 #ifdef _POSIX_THREAD_IS_GNU_PTH
20189         __gnu_pth__;
20190 #endif
20191
20192 _ACEOF
20193 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20194   $EGREP "__gnu_pth__" >/dev/null 2>&1; then
20195   ol_cv_header_gnu_pth_pthread_h=yes
20196 else
20197   ol_cv_header_gnu_pth_pthread_h=no
20198 fi
20199 rm -f conftest*
20200
20201
20202 fi
20203 echo "$as_me:$LINENO: result: $ol_cv_header_gnu_pth_pthread_h" >&5
20204 echo "${ECHO_T}$ol_cv_header_gnu_pth_pthread_h" >&6
20205
20206
20207                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
20208
20209 for ac_header in sched.h
20210 do
20211 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20212 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20213   echo "$as_me:$LINENO: checking for $ac_header" >&5
20214 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20215 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20216   echo $ECHO_N "(cached) $ECHO_C" >&6
20217 fi
20218 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20219 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20220 else
20221   # Is the header compilable?
20222 echo "$as_me:$LINENO: checking $ac_header usability" >&5
20223 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20224 cat >conftest.$ac_ext <<_ACEOF
20225 /* confdefs.h.  */
20226 _ACEOF
20227 cat confdefs.h >>conftest.$ac_ext
20228 cat >>conftest.$ac_ext <<_ACEOF
20229 /* end confdefs.h.  */
20230 $ac_includes_default
20231 #include <$ac_header>
20232 _ACEOF
20233 rm -f conftest.$ac_objext
20234 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20235   (eval $ac_compile) 2>conftest.er1
20236   ac_status=$?
20237   grep -v '^ *+' conftest.er1 >conftest.err
20238   rm -f conftest.er1
20239   cat conftest.err >&5
20240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20241   (exit $ac_status); } &&
20242          { ac_try='test -z "$ac_c_werror_flag"
20243                          || test ! -s conftest.err'
20244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20245   (eval $ac_try) 2>&5
20246   ac_status=$?
20247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20248   (exit $ac_status); }; } &&
20249          { ac_try='test -s conftest.$ac_objext'
20250   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20251   (eval $ac_try) 2>&5
20252   ac_status=$?
20253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20254   (exit $ac_status); }; }; then
20255   ac_header_compiler=yes
20256 else
20257   echo "$as_me: failed program was:" >&5
20258 sed 's/^/| /' conftest.$ac_ext >&5
20259
20260 ac_header_compiler=no
20261 fi
20262 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20263 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20264 echo "${ECHO_T}$ac_header_compiler" >&6
20265
20266 # Is the header present?
20267 echo "$as_me:$LINENO: checking $ac_header presence" >&5
20268 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20269 cat >conftest.$ac_ext <<_ACEOF
20270 /* confdefs.h.  */
20271 _ACEOF
20272 cat confdefs.h >>conftest.$ac_ext
20273 cat >>conftest.$ac_ext <<_ACEOF
20274 /* end confdefs.h.  */
20275 #include <$ac_header>
20276 _ACEOF
20277 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20278   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20279   ac_status=$?
20280   grep -v '^ *+' conftest.er1 >conftest.err
20281   rm -f conftest.er1
20282   cat conftest.err >&5
20283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20284   (exit $ac_status); } >/dev/null; then
20285   if test -s conftest.err; then
20286     ac_cpp_err=$ac_c_preproc_warn_flag
20287     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20288   else
20289     ac_cpp_err=
20290   fi
20291 else
20292   ac_cpp_err=yes
20293 fi
20294 if test -z "$ac_cpp_err"; then
20295   ac_header_preproc=yes
20296 else
20297   echo "$as_me: failed program was:" >&5
20298 sed 's/^/| /' conftest.$ac_ext >&5
20299
20300   ac_header_preproc=no
20301 fi
20302 rm -f conftest.err conftest.$ac_ext
20303 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20304 echo "${ECHO_T}$ac_header_preproc" >&6
20305
20306 # So?  What about this header?
20307 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20308   yes:no: )
20309     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20310 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
20311     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20312 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20313     ac_header_preproc=yes
20314     ;;
20315   no:yes:* )
20316     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20317 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
20318     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
20319 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
20320     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20321 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20322     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
20323 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
20324     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20325 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
20326     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20327 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
20328     (
20329       cat <<\_ASBOX
20330 ## --------------------------------------------- ##
20331 ## Report this to <http://www.openldap.org/its/> ##
20332 ## --------------------------------------------- ##
20333 _ASBOX
20334     ) |
20335       sed "s/^/$as_me: WARNING:     /" >&2
20336     ;;
20337 esac
20338 echo "$as_me:$LINENO: checking for $ac_header" >&5
20339 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20340 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20341   echo $ECHO_N "(cached) $ECHO_C" >&6
20342 else
20343   eval "$as_ac_Header=\$ac_header_preproc"
20344 fi
20345 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20346 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20347
20348 fi
20349 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20350   cat >>confdefs.h <<_ACEOF
20351 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20352 _ACEOF
20353
20354 fi
20355
20356 done
20357
20358                 fi
20359
20360
20361                                 echo "$as_me:$LINENO: checking for pthread_create in default libraries" >&5
20362 echo $ECHO_N "checking for pthread_create in default libraries... $ECHO_C" >&6
20363 if test "${ol_cv_pthread_create+set}" = set; then
20364   echo $ECHO_N "(cached) $ECHO_C" >&6
20365 else
20366
20367                         if test "$cross_compiling" = yes; then
20368   cat >conftest.$ac_ext <<_ACEOF
20369 /* confdefs.h.  */
20370 _ACEOF
20371 cat confdefs.h >>conftest.$ac_ext
20372 cat >>conftest.$ac_ext <<_ACEOF
20373 /* end confdefs.h.  */
20374
20375 /* pthread test headers */
20376 #include <pthread.h>
20377 #if HAVE_PTHREADS < 7
20378 #include <errno.h>
20379 #endif
20380 #ifndef NULL
20381 #define NULL (void*)0
20382 #endif
20383
20384 static void *task(p)
20385         void *p;
20386 {
20387         return (void *) (p == NULL);
20388 }
20389
20390 int
20391 main ()
20392 {
20393
20394         /* pthread test function */
20395 #ifndef PTHREAD_CREATE_DETACHED
20396 #define PTHREAD_CREATE_DETACHED 1
20397 #endif
20398         pthread_t t;
20399         int status;
20400         int detach = PTHREAD_CREATE_DETACHED;
20401
20402 #if HAVE_PTHREADS > 4
20403         /* Final pthreads */
20404         pthread_attr_t attr;
20405
20406         status = pthread_attr_init(&attr);
20407         if( status ) return status;
20408
20409 #if HAVE_PTHREADS < 7
20410         status = pthread_attr_setdetachstate(&attr, &detach);
20411         if( status < 0 ) status = errno;
20412 #else
20413         status = pthread_attr_setdetachstate(&attr, detach);
20414 #endif
20415         if( status ) return status;
20416         status = pthread_create( &t, &attr, task, NULL );
20417 #if HAVE_PTHREADS < 7
20418         if( status < 0 ) status = errno;
20419 #endif
20420         if( status ) return status;
20421 #else
20422         /* Draft 4 pthreads */
20423         status = pthread_create( &t, pthread_attr_default, task, NULL );
20424         if( status ) return errno;
20425
20426         /* give thread a chance to complete */
20427         /* it should remain joinable and hence detachable */
20428         sleep( 1 );
20429
20430         status = pthread_detach( &t );
20431         if( status ) return errno;
20432 #endif
20433
20434 #ifdef HAVE_LINUX_THREADS
20435         pthread_kill_other_threads_np();
20436 #endif
20437
20438         return 0;
20439
20440   ;
20441   return 0;
20442 }
20443 _ACEOF
20444 rm -f conftest.$ac_objext conftest$ac_exeext
20445 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20446   (eval $ac_link) 2>conftest.er1
20447   ac_status=$?
20448   grep -v '^ *+' conftest.er1 >conftest.err
20449   rm -f conftest.er1
20450   cat conftest.err >&5
20451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20452   (exit $ac_status); } &&
20453          { ac_try='test -z "$ac_c_werror_flag"
20454                          || test ! -s conftest.err'
20455   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20456   (eval $ac_try) 2>&5
20457   ac_status=$?
20458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20459   (exit $ac_status); }; } &&
20460          { ac_try='test -s conftest$ac_exeext'
20461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20462   (eval $ac_try) 2>&5
20463   ac_status=$?
20464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20465   (exit $ac_status); }; }; then
20466   ol_cv_pthread_create=yes
20467 else
20468   echo "$as_me: failed program was:" >&5
20469 sed 's/^/| /' conftest.$ac_ext >&5
20470
20471 ol_cv_pthread_create=no
20472 fi
20473 rm -f conftest.err conftest.$ac_objext \
20474       conftest$ac_exeext conftest.$ac_ext
20475 else
20476   cat >conftest.$ac_ext <<_ACEOF
20477 /* confdefs.h.  */
20478 _ACEOF
20479 cat confdefs.h >>conftest.$ac_ext
20480 cat >>conftest.$ac_ext <<_ACEOF
20481 /* end confdefs.h.  */
20482
20483 /* pthread test headers */
20484 #include <pthread.h>
20485 #if HAVE_PTHREADS < 7
20486 #include <errno.h>
20487 #endif
20488 #ifndef NULL
20489 #define NULL (void*)0
20490 #endif
20491
20492 static void *task(p)
20493         void *p;
20494 {
20495         return (void *) (p == NULL);
20496 }
20497
20498
20499 int main(argc, argv)
20500         int argc;
20501         char **argv;
20502 {
20503
20504         /* pthread test function */
20505 #ifndef PTHREAD_CREATE_DETACHED
20506 #define PTHREAD_CREATE_DETACHED 1
20507 #endif
20508         pthread_t t;
20509         int status;
20510         int detach = PTHREAD_CREATE_DETACHED;
20511
20512 #if HAVE_PTHREADS > 4
20513         /* Final pthreads */
20514         pthread_attr_t attr;
20515
20516         status = pthread_attr_init(&attr);
20517         if( status ) return status;
20518
20519 #if HAVE_PTHREADS < 7
20520         status = pthread_attr_setdetachstate(&attr, &detach);
20521         if( status < 0 ) status = errno;
20522 #else
20523         status = pthread_attr_setdetachstate(&attr, detach);
20524 #endif
20525         if( status ) return status;
20526         status = pthread_create( &t, &attr, task, NULL );
20527 #if HAVE_PTHREADS < 7
20528         if( status < 0 ) status = errno;
20529 #endif
20530         if( status ) return status;
20531 #else
20532         /* Draft 4 pthreads */
20533         status = pthread_create( &t, pthread_attr_default, task, NULL );
20534         if( status ) return errno;
20535
20536         /* give thread a chance to complete */
20537         /* it should remain joinable and hence detachable */
20538         sleep( 1 );
20539
20540         status = pthread_detach( &t );
20541         if( status ) return errno;
20542 #endif
20543
20544 #ifdef HAVE_LINUX_THREADS
20545         pthread_kill_other_threads_np();
20546 #endif
20547
20548         return 0;
20549
20550 }
20551
20552 _ACEOF
20553 rm -f conftest$ac_exeext
20554 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20555   (eval $ac_link) 2>&5
20556   ac_status=$?
20557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20558   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20559   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20560   (eval $ac_try) 2>&5
20561   ac_status=$?
20562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20563   (exit $ac_status); }; }; then
20564   ol_cv_pthread_create=yes
20565 else
20566   echo "$as_me: program exited with status $ac_status" >&5
20567 echo "$as_me: failed program was:" >&5
20568 sed 's/^/| /' conftest.$ac_ext >&5
20569
20570 ( exit $ac_status )
20571 ol_cv_pthread_create=no
20572 fi
20573 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20574 fi
20575 fi
20576 echo "$as_me:$LINENO: result: $ol_cv_pthread_create" >&5
20577 echo "${ECHO_T}$ol_cv_pthread_create" >&6
20578
20579                 if test $ol_cv_pthread_create != no ; then
20580                         ol_link_threads=posix
20581                         ol_link_pthreads=""
20582                 fi
20583
20584                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
20585 if test "$ol_link_threads" = no ; then
20586         # try -kthread
20587         echo "$as_me:$LINENO: checking for pthread link with -kthread" >&5
20588 echo $ECHO_N "checking for pthread link with -kthread... $ECHO_C" >&6
20589 if test "${ol_cv_pthread_kthread+set}" = set; then
20590   echo $ECHO_N "(cached) $ECHO_C" >&6
20591 else
20592
20593                 # save the flags
20594                 ol_LIBS="$LIBS"
20595                 LIBS="-kthread $LIBS"
20596
20597                 if test "$cross_compiling" = yes; then
20598   cat >conftest.$ac_ext <<_ACEOF
20599 /* confdefs.h.  */
20600 _ACEOF
20601 cat confdefs.h >>conftest.$ac_ext
20602 cat >>conftest.$ac_ext <<_ACEOF
20603 /* end confdefs.h.  */
20604
20605 /* pthread test headers */
20606 #include <pthread.h>
20607 #if HAVE_PTHREADS < 7
20608 #include <errno.h>
20609 #endif
20610 #ifndef NULL
20611 #define NULL (void*)0
20612 #endif
20613
20614 static void *task(p)
20615         void *p;
20616 {
20617         return (void *) (p == NULL);
20618 }
20619
20620 int
20621 main ()
20622 {
20623
20624         /* pthread test function */
20625 #ifndef PTHREAD_CREATE_DETACHED
20626 #define PTHREAD_CREATE_DETACHED 1
20627 #endif
20628         pthread_t t;
20629         int status;
20630         int detach = PTHREAD_CREATE_DETACHED;
20631
20632 #if HAVE_PTHREADS > 4
20633         /* Final pthreads */
20634         pthread_attr_t attr;
20635
20636         status = pthread_attr_init(&attr);
20637         if( status ) return status;
20638
20639 #if HAVE_PTHREADS < 7
20640         status = pthread_attr_setdetachstate(&attr, &detach);
20641         if( status < 0 ) status = errno;
20642 #else
20643         status = pthread_attr_setdetachstate(&attr, detach);
20644 #endif
20645         if( status ) return status;
20646         status = pthread_create( &t, &attr, task, NULL );
20647 #if HAVE_PTHREADS < 7
20648         if( status < 0 ) status = errno;
20649 #endif
20650         if( status ) return status;
20651 #else
20652         /* Draft 4 pthreads */
20653         status = pthread_create( &t, pthread_attr_default, task, NULL );
20654         if( status ) return errno;
20655
20656         /* give thread a chance to complete */
20657         /* it should remain joinable and hence detachable */
20658         sleep( 1 );
20659
20660         status = pthread_detach( &t );
20661         if( status ) return errno;
20662 #endif
20663
20664 #ifdef HAVE_LINUX_THREADS
20665         pthread_kill_other_threads_np();
20666 #endif
20667
20668         return 0;
20669
20670   ;
20671   return 0;
20672 }
20673 _ACEOF
20674 rm -f conftest.$ac_objext conftest$ac_exeext
20675 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20676   (eval $ac_link) 2>conftest.er1
20677   ac_status=$?
20678   grep -v '^ *+' conftest.er1 >conftest.err
20679   rm -f conftest.er1
20680   cat conftest.err >&5
20681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20682   (exit $ac_status); } &&
20683          { ac_try='test -z "$ac_c_werror_flag"
20684                          || test ! -s conftest.err'
20685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20686   (eval $ac_try) 2>&5
20687   ac_status=$?
20688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20689   (exit $ac_status); }; } &&
20690          { ac_try='test -s conftest$ac_exeext'
20691   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20692   (eval $ac_try) 2>&5
20693   ac_status=$?
20694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20695   (exit $ac_status); }; }; then
20696   ol_cv_pthread_kthread=yes
20697 else
20698   echo "$as_me: failed program was:" >&5
20699 sed 's/^/| /' conftest.$ac_ext >&5
20700
20701 ol_cv_pthread_kthread=no
20702 fi
20703 rm -f conftest.err conftest.$ac_objext \
20704       conftest$ac_exeext conftest.$ac_ext
20705 else
20706   cat >conftest.$ac_ext <<_ACEOF
20707 /* confdefs.h.  */
20708 _ACEOF
20709 cat confdefs.h >>conftest.$ac_ext
20710 cat >>conftest.$ac_ext <<_ACEOF
20711 /* end confdefs.h.  */
20712
20713 /* pthread test headers */
20714 #include <pthread.h>
20715 #if HAVE_PTHREADS < 7
20716 #include <errno.h>
20717 #endif
20718 #ifndef NULL
20719 #define NULL (void*)0
20720 #endif
20721
20722 static void *task(p)
20723         void *p;
20724 {
20725         return (void *) (p == NULL);
20726 }
20727
20728
20729 int main(argc, argv)
20730         int argc;
20731         char **argv;
20732 {
20733
20734         /* pthread test function */
20735 #ifndef PTHREAD_CREATE_DETACHED
20736 #define PTHREAD_CREATE_DETACHED 1
20737 #endif
20738         pthread_t t;
20739         int status;
20740         int detach = PTHREAD_CREATE_DETACHED;
20741
20742 #if HAVE_PTHREADS > 4
20743         /* Final pthreads */
20744         pthread_attr_t attr;
20745
20746         status = pthread_attr_init(&attr);
20747         if( status ) return status;
20748
20749 #if HAVE_PTHREADS < 7
20750         status = pthread_attr_setdetachstate(&attr, &detach);
20751         if( status < 0 ) status = errno;
20752 #else
20753         status = pthread_attr_setdetachstate(&attr, detach);
20754 #endif
20755         if( status ) return status;
20756         status = pthread_create( &t, &attr, task, NULL );
20757 #if HAVE_PTHREADS < 7
20758         if( status < 0 ) status = errno;
20759 #endif
20760         if( status ) return status;
20761 #else
20762         /* Draft 4 pthreads */
20763         status = pthread_create( &t, pthread_attr_default, task, NULL );
20764         if( status ) return errno;
20765
20766         /* give thread a chance to complete */
20767         /* it should remain joinable and hence detachable */
20768         sleep( 1 );
20769
20770         status = pthread_detach( &t );
20771         if( status ) return errno;
20772 #endif
20773
20774 #ifdef HAVE_LINUX_THREADS
20775         pthread_kill_other_threads_np();
20776 #endif
20777
20778         return 0;
20779
20780 }
20781
20782 _ACEOF
20783 rm -f conftest$ac_exeext
20784 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20785   (eval $ac_link) 2>&5
20786   ac_status=$?
20787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20788   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20789   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20790   (eval $ac_try) 2>&5
20791   ac_status=$?
20792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20793   (exit $ac_status); }; }; then
20794   ol_cv_pthread_kthread=yes
20795 else
20796   echo "$as_me: program exited with status $ac_status" >&5
20797 echo "$as_me: failed program was:" >&5
20798 sed 's/^/| /' conftest.$ac_ext >&5
20799
20800 ( exit $ac_status )
20801 ol_cv_pthread_kthread=no
20802 fi
20803 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20804 fi
20805
20806                 # restore the LIBS
20807                 LIBS="$ol_LIBS"
20808
20809 fi
20810 echo "$as_me:$LINENO: result: $ol_cv_pthread_kthread" >&5
20811 echo "${ECHO_T}$ol_cv_pthread_kthread" >&6
20812
20813         if test $ol_cv_pthread_kthread = yes ; then
20814                 ol_link_pthreads="-kthread"
20815                 ol_link_threads=posix
20816         fi
20817 fi
20818
20819                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
20820 if test "$ol_link_threads" = no ; then
20821         # try -pthread
20822         echo "$as_me:$LINENO: checking for pthread link with -pthread" >&5
20823 echo $ECHO_N "checking for pthread link with -pthread... $ECHO_C" >&6
20824 if test "${ol_cv_pthread_pthread+set}" = set; then
20825   echo $ECHO_N "(cached) $ECHO_C" >&6
20826 else
20827
20828                 # save the flags
20829                 ol_LIBS="$LIBS"
20830                 LIBS="-pthread $LIBS"
20831
20832                 if test "$cross_compiling" = yes; then
20833   cat >conftest.$ac_ext <<_ACEOF
20834 /* confdefs.h.  */
20835 _ACEOF
20836 cat confdefs.h >>conftest.$ac_ext
20837 cat >>conftest.$ac_ext <<_ACEOF
20838 /* end confdefs.h.  */
20839
20840 /* pthread test headers */
20841 #include <pthread.h>
20842 #if HAVE_PTHREADS < 7
20843 #include <errno.h>
20844 #endif
20845 #ifndef NULL
20846 #define NULL (void*)0
20847 #endif
20848
20849 static void *task(p)
20850         void *p;
20851 {
20852         return (void *) (p == NULL);
20853 }
20854
20855 int
20856 main ()
20857 {
20858
20859         /* pthread test function */
20860 #ifndef PTHREAD_CREATE_DETACHED
20861 #define PTHREAD_CREATE_DETACHED 1
20862 #endif
20863         pthread_t t;
20864         int status;
20865         int detach = PTHREAD_CREATE_DETACHED;
20866
20867 #if HAVE_PTHREADS > 4
20868         /* Final pthreads */
20869         pthread_attr_t attr;
20870
20871         status = pthread_attr_init(&attr);
20872         if( status ) return status;
20873
20874 #if HAVE_PTHREADS < 7
20875         status = pthread_attr_setdetachstate(&attr, &detach);
20876         if( status < 0 ) status = errno;
20877 #else
20878         status = pthread_attr_setdetachstate(&attr, detach);
20879 #endif
20880         if( status ) return status;
20881         status = pthread_create( &t, &attr, task, NULL );
20882 #if HAVE_PTHREADS < 7
20883         if( status < 0 ) status = errno;
20884 #endif
20885         if( status ) return status;
20886 #else
20887         /* Draft 4 pthreads */
20888         status = pthread_create( &t, pthread_attr_default, task, NULL );
20889         if( status ) return errno;
20890
20891         /* give thread a chance to complete */
20892         /* it should remain joinable and hence detachable */
20893         sleep( 1 );
20894
20895         status = pthread_detach( &t );
20896         if( status ) return errno;
20897 #endif
20898
20899 #ifdef HAVE_LINUX_THREADS
20900         pthread_kill_other_threads_np();
20901 #endif
20902
20903         return 0;
20904
20905   ;
20906   return 0;
20907 }
20908 _ACEOF
20909 rm -f conftest.$ac_objext conftest$ac_exeext
20910 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20911   (eval $ac_link) 2>conftest.er1
20912   ac_status=$?
20913   grep -v '^ *+' conftest.er1 >conftest.err
20914   rm -f conftest.er1
20915   cat conftest.err >&5
20916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20917   (exit $ac_status); } &&
20918          { ac_try='test -z "$ac_c_werror_flag"
20919                          || test ! -s conftest.err'
20920   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20921   (eval $ac_try) 2>&5
20922   ac_status=$?
20923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20924   (exit $ac_status); }; } &&
20925          { ac_try='test -s conftest$ac_exeext'
20926   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20927   (eval $ac_try) 2>&5
20928   ac_status=$?
20929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20930   (exit $ac_status); }; }; then
20931   ol_cv_pthread_pthread=yes
20932 else
20933   echo "$as_me: failed program was:" >&5
20934 sed 's/^/| /' conftest.$ac_ext >&5
20935
20936 ol_cv_pthread_pthread=no
20937 fi
20938 rm -f conftest.err conftest.$ac_objext \
20939       conftest$ac_exeext conftest.$ac_ext
20940 else
20941   cat >conftest.$ac_ext <<_ACEOF
20942 /* confdefs.h.  */
20943 _ACEOF
20944 cat confdefs.h >>conftest.$ac_ext
20945 cat >>conftest.$ac_ext <<_ACEOF
20946 /* end confdefs.h.  */
20947
20948 /* pthread test headers */
20949 #include <pthread.h>
20950 #if HAVE_PTHREADS < 7
20951 #include <errno.h>
20952 #endif
20953 #ifndef NULL
20954 #define NULL (void*)0
20955 #endif
20956
20957 static void *task(p)
20958         void *p;
20959 {
20960         return (void *) (p == NULL);
20961 }
20962
20963
20964 int main(argc, argv)
20965         int argc;
20966         char **argv;
20967 {
20968
20969         /* pthread test function */
20970 #ifndef PTHREAD_CREATE_DETACHED
20971 #define PTHREAD_CREATE_DETACHED 1
20972 #endif
20973         pthread_t t;
20974         int status;
20975         int detach = PTHREAD_CREATE_DETACHED;
20976
20977 #if HAVE_PTHREADS > 4
20978         /* Final pthreads */
20979         pthread_attr_t attr;
20980
20981         status = pthread_attr_init(&attr);
20982         if( status ) return status;
20983
20984 #if HAVE_PTHREADS < 7
20985         status = pthread_attr_setdetachstate(&attr, &detach);
20986         if( status < 0 ) status = errno;
20987 #else
20988         status = pthread_attr_setdetachstate(&attr, detach);
20989 #endif
20990         if( status ) return status;
20991         status = pthread_create( &t, &attr, task, NULL );
20992 #if HAVE_PTHREADS < 7
20993         if( status < 0 ) status = errno;
20994 #endif
20995         if( status ) return status;
20996 #else
20997         /* Draft 4 pthreads */
20998         status = pthread_create( &t, pthread_attr_default, task, NULL );
20999         if( status ) return errno;
21000
21001         /* give thread a chance to complete */
21002         /* it should remain joinable and hence detachable */
21003         sleep( 1 );
21004
21005         status = pthread_detach( &t );
21006         if( status ) return errno;
21007 #endif
21008
21009 #ifdef HAVE_LINUX_THREADS
21010         pthread_kill_other_threads_np();
21011 #endif
21012
21013         return 0;
21014
21015 }
21016
21017 _ACEOF
21018 rm -f conftest$ac_exeext
21019 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21020   (eval $ac_link) 2>&5
21021   ac_status=$?
21022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21023   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21024   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21025   (eval $ac_try) 2>&5
21026   ac_status=$?
21027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21028   (exit $ac_status); }; }; then
21029   ol_cv_pthread_pthread=yes
21030 else
21031   echo "$as_me: program exited with status $ac_status" >&5
21032 echo "$as_me: failed program was:" >&5
21033 sed 's/^/| /' conftest.$ac_ext >&5
21034
21035 ( exit $ac_status )
21036 ol_cv_pthread_pthread=no
21037 fi
21038 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21039 fi
21040
21041                 # restore the LIBS
21042                 LIBS="$ol_LIBS"
21043
21044 fi
21045 echo "$as_me:$LINENO: result: $ol_cv_pthread_pthread" >&5
21046 echo "${ECHO_T}$ol_cv_pthread_pthread" >&6
21047
21048         if test $ol_cv_pthread_pthread = yes ; then
21049                 ol_link_pthreads="-pthread"
21050                 ol_link_threads=posix
21051         fi
21052 fi
21053
21054                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
21055 if test "$ol_link_threads" = no ; then
21056         # try -pthreads
21057         echo "$as_me:$LINENO: checking for pthread link with -pthreads" >&5
21058 echo $ECHO_N "checking for pthread link with -pthreads... $ECHO_C" >&6
21059 if test "${ol_cv_pthread_pthreads+set}" = set; then
21060   echo $ECHO_N "(cached) $ECHO_C" >&6
21061 else
21062
21063                 # save the flags
21064                 ol_LIBS="$LIBS"
21065                 LIBS="-pthreads $LIBS"
21066
21067                 if test "$cross_compiling" = yes; then
21068   cat >conftest.$ac_ext <<_ACEOF
21069 /* confdefs.h.  */
21070 _ACEOF
21071 cat confdefs.h >>conftest.$ac_ext
21072 cat >>conftest.$ac_ext <<_ACEOF
21073 /* end confdefs.h.  */
21074
21075 /* pthread test headers */
21076 #include <pthread.h>
21077 #if HAVE_PTHREADS < 7
21078 #include <errno.h>
21079 #endif
21080 #ifndef NULL
21081 #define NULL (void*)0
21082 #endif
21083
21084 static void *task(p)
21085         void *p;
21086 {
21087         return (void *) (p == NULL);
21088 }
21089
21090 int
21091 main ()
21092 {
21093
21094         /* pthread test function */
21095 #ifndef PTHREAD_CREATE_DETACHED
21096 #define PTHREAD_CREATE_DETACHED 1
21097 #endif
21098         pthread_t t;
21099         int status;
21100         int detach = PTHREAD_CREATE_DETACHED;
21101
21102 #if HAVE_PTHREADS > 4
21103         /* Final pthreads */
21104         pthread_attr_t attr;
21105
21106         status = pthread_attr_init(&attr);
21107         if( status ) return status;
21108
21109 #if HAVE_PTHREADS < 7
21110         status = pthread_attr_setdetachstate(&attr, &detach);
21111         if( status < 0 ) status = errno;
21112 #else
21113         status = pthread_attr_setdetachstate(&attr, detach);
21114 #endif
21115         if( status ) return status;
21116         status = pthread_create( &t, &attr, task, NULL );
21117 #if HAVE_PTHREADS < 7
21118         if( status < 0 ) status = errno;
21119 #endif
21120         if( status ) return status;
21121 #else
21122         /* Draft 4 pthreads */
21123         status = pthread_create( &t, pthread_attr_default, task, NULL );
21124         if( status ) return errno;
21125
21126         /* give thread a chance to complete */
21127         /* it should remain joinable and hence detachable */
21128         sleep( 1 );
21129
21130         status = pthread_detach( &t );
21131         if( status ) return errno;
21132 #endif
21133
21134 #ifdef HAVE_LINUX_THREADS
21135         pthread_kill_other_threads_np();
21136 #endif
21137
21138         return 0;
21139
21140   ;
21141   return 0;
21142 }
21143 _ACEOF
21144 rm -f conftest.$ac_objext conftest$ac_exeext
21145 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21146   (eval $ac_link) 2>conftest.er1
21147   ac_status=$?
21148   grep -v '^ *+' conftest.er1 >conftest.err
21149   rm -f conftest.er1
21150   cat conftest.err >&5
21151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21152   (exit $ac_status); } &&
21153          { ac_try='test -z "$ac_c_werror_flag"
21154                          || test ! -s conftest.err'
21155   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21156   (eval $ac_try) 2>&5
21157   ac_status=$?
21158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21159   (exit $ac_status); }; } &&
21160          { ac_try='test -s conftest$ac_exeext'
21161   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21162   (eval $ac_try) 2>&5
21163   ac_status=$?
21164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21165   (exit $ac_status); }; }; then
21166   ol_cv_pthread_pthreads=yes
21167 else
21168   echo "$as_me: failed program was:" >&5
21169 sed 's/^/| /' conftest.$ac_ext >&5
21170
21171 ol_cv_pthread_pthreads=no
21172 fi
21173 rm -f conftest.err conftest.$ac_objext \
21174       conftest$ac_exeext conftest.$ac_ext
21175 else
21176   cat >conftest.$ac_ext <<_ACEOF
21177 /* confdefs.h.  */
21178 _ACEOF
21179 cat confdefs.h >>conftest.$ac_ext
21180 cat >>conftest.$ac_ext <<_ACEOF
21181 /* end confdefs.h.  */
21182
21183 /* pthread test headers */
21184 #include <pthread.h>
21185 #if HAVE_PTHREADS < 7
21186 #include <errno.h>
21187 #endif
21188 #ifndef NULL
21189 #define NULL (void*)0
21190 #endif
21191
21192 static void *task(p)
21193         void *p;
21194 {
21195         return (void *) (p == NULL);
21196 }
21197
21198
21199 int main(argc, argv)
21200         int argc;
21201         char **argv;
21202 {
21203
21204         /* pthread test function */
21205 #ifndef PTHREAD_CREATE_DETACHED
21206 #define PTHREAD_CREATE_DETACHED 1
21207 #endif
21208         pthread_t t;
21209         int status;
21210         int detach = PTHREAD_CREATE_DETACHED;
21211
21212 #if HAVE_PTHREADS > 4
21213         /* Final pthreads */
21214         pthread_attr_t attr;
21215
21216         status = pthread_attr_init(&attr);
21217         if( status ) return status;
21218
21219 #if HAVE_PTHREADS < 7
21220         status = pthread_attr_setdetachstate(&attr, &detach);
21221         if( status < 0 ) status = errno;
21222 #else
21223         status = pthread_attr_setdetachstate(&attr, detach);
21224 #endif
21225         if( status ) return status;
21226         status = pthread_create( &t, &attr, task, NULL );
21227 #if HAVE_PTHREADS < 7
21228         if( status < 0 ) status = errno;
21229 #endif
21230         if( status ) return status;
21231 #else
21232         /* Draft 4 pthreads */
21233         status = pthread_create( &t, pthread_attr_default, task, NULL );
21234         if( status ) return errno;
21235
21236         /* give thread a chance to complete */
21237         /* it should remain joinable and hence detachable */
21238         sleep( 1 );
21239
21240         status = pthread_detach( &t );
21241         if( status ) return errno;
21242 #endif
21243
21244 #ifdef HAVE_LINUX_THREADS
21245         pthread_kill_other_threads_np();
21246 #endif
21247
21248         return 0;
21249
21250 }
21251
21252 _ACEOF
21253 rm -f conftest$ac_exeext
21254 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21255   (eval $ac_link) 2>&5
21256   ac_status=$?
21257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21258   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21259   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21260   (eval $ac_try) 2>&5
21261   ac_status=$?
21262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21263   (exit $ac_status); }; }; then
21264   ol_cv_pthread_pthreads=yes
21265 else
21266   echo "$as_me: program exited with status $ac_status" >&5
21267 echo "$as_me: failed program was:" >&5
21268 sed 's/^/| /' conftest.$ac_ext >&5
21269
21270 ( exit $ac_status )
21271 ol_cv_pthread_pthreads=no
21272 fi
21273 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21274 fi
21275
21276                 # restore the LIBS
21277                 LIBS="$ol_LIBS"
21278
21279 fi
21280 echo "$as_me:$LINENO: result: $ol_cv_pthread_pthreads" >&5
21281 echo "${ECHO_T}$ol_cv_pthread_pthreads" >&6
21282
21283         if test $ol_cv_pthread_pthreads = yes ; then
21284                 ol_link_pthreads="-pthreads"
21285                 ol_link_threads=posix
21286         fi
21287 fi
21288
21289                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
21290 if test "$ol_link_threads" = no ; then
21291         # try -mthreads
21292         echo "$as_me:$LINENO: checking for pthread link with -mthreads" >&5
21293 echo $ECHO_N "checking for pthread link with -mthreads... $ECHO_C" >&6
21294 if test "${ol_cv_pthread_mthreads+set}" = set; then
21295   echo $ECHO_N "(cached) $ECHO_C" >&6
21296 else
21297
21298                 # save the flags
21299                 ol_LIBS="$LIBS"
21300                 LIBS="-mthreads $LIBS"
21301
21302                 if test "$cross_compiling" = yes; then
21303   cat >conftest.$ac_ext <<_ACEOF
21304 /* confdefs.h.  */
21305 _ACEOF
21306 cat confdefs.h >>conftest.$ac_ext
21307 cat >>conftest.$ac_ext <<_ACEOF
21308 /* end confdefs.h.  */
21309
21310 /* pthread test headers */
21311 #include <pthread.h>
21312 #if HAVE_PTHREADS < 7
21313 #include <errno.h>
21314 #endif
21315 #ifndef NULL
21316 #define NULL (void*)0
21317 #endif
21318
21319 static void *task(p)
21320         void *p;
21321 {
21322         return (void *) (p == NULL);
21323 }
21324
21325 int
21326 main ()
21327 {
21328
21329         /* pthread test function */
21330 #ifndef PTHREAD_CREATE_DETACHED
21331 #define PTHREAD_CREATE_DETACHED 1
21332 #endif
21333         pthread_t t;
21334         int status;
21335         int detach = PTHREAD_CREATE_DETACHED;
21336
21337 #if HAVE_PTHREADS > 4
21338         /* Final pthreads */
21339         pthread_attr_t attr;
21340
21341         status = pthread_attr_init(&attr);
21342         if( status ) return status;
21343
21344 #if HAVE_PTHREADS < 7
21345         status = pthread_attr_setdetachstate(&attr, &detach);
21346         if( status < 0 ) status = errno;
21347 #else
21348         status = pthread_attr_setdetachstate(&attr, detach);
21349 #endif
21350         if( status ) return status;
21351         status = pthread_create( &t, &attr, task, NULL );
21352 #if HAVE_PTHREADS < 7
21353         if( status < 0 ) status = errno;
21354 #endif
21355         if( status ) return status;
21356 #else
21357         /* Draft 4 pthreads */
21358         status = pthread_create( &t, pthread_attr_default, task, NULL );
21359         if( status ) return errno;
21360
21361         /* give thread a chance to complete */
21362         /* it should remain joinable and hence detachable */
21363         sleep( 1 );
21364
21365         status = pthread_detach( &t );
21366         if( status ) return errno;
21367 #endif
21368
21369 #ifdef HAVE_LINUX_THREADS
21370         pthread_kill_other_threads_np();
21371 #endif
21372
21373         return 0;
21374
21375   ;
21376   return 0;
21377 }
21378 _ACEOF
21379 rm -f conftest.$ac_objext conftest$ac_exeext
21380 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21381   (eval $ac_link) 2>conftest.er1
21382   ac_status=$?
21383   grep -v '^ *+' conftest.er1 >conftest.err
21384   rm -f conftest.er1
21385   cat conftest.err >&5
21386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21387   (exit $ac_status); } &&
21388          { ac_try='test -z "$ac_c_werror_flag"
21389                          || test ! -s conftest.err'
21390   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21391   (eval $ac_try) 2>&5
21392   ac_status=$?
21393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21394   (exit $ac_status); }; } &&
21395          { ac_try='test -s conftest$ac_exeext'
21396   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21397   (eval $ac_try) 2>&5
21398   ac_status=$?
21399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21400   (exit $ac_status); }; }; then
21401   ol_cv_pthread_mthreads=yes
21402 else
21403   echo "$as_me: failed program was:" >&5
21404 sed 's/^/| /' conftest.$ac_ext >&5
21405
21406 ol_cv_pthread_mthreads=no
21407 fi
21408 rm -f conftest.err conftest.$ac_objext \
21409       conftest$ac_exeext conftest.$ac_ext
21410 else
21411   cat >conftest.$ac_ext <<_ACEOF
21412 /* confdefs.h.  */
21413 _ACEOF
21414 cat confdefs.h >>conftest.$ac_ext
21415 cat >>conftest.$ac_ext <<_ACEOF
21416 /* end confdefs.h.  */
21417
21418 /* pthread test headers */
21419 #include <pthread.h>
21420 #if HAVE_PTHREADS < 7
21421 #include <errno.h>
21422 #endif
21423 #ifndef NULL
21424 #define NULL (void*)0
21425 #endif
21426
21427 static void *task(p)
21428         void *p;
21429 {
21430         return (void *) (p == NULL);
21431 }
21432
21433
21434 int main(argc, argv)
21435         int argc;
21436         char **argv;
21437 {
21438
21439         /* pthread test function */
21440 #ifndef PTHREAD_CREATE_DETACHED
21441 #define PTHREAD_CREATE_DETACHED 1
21442 #endif
21443         pthread_t t;
21444         int status;
21445         int detach = PTHREAD_CREATE_DETACHED;
21446
21447 #if HAVE_PTHREADS > 4
21448         /* Final pthreads */
21449         pthread_attr_t attr;
21450
21451         status = pthread_attr_init(&attr);
21452         if( status ) return status;
21453
21454 #if HAVE_PTHREADS < 7
21455         status = pthread_attr_setdetachstate(&attr, &detach);
21456         if( status < 0 ) status = errno;
21457 #else
21458         status = pthread_attr_setdetachstate(&attr, detach);
21459 #endif
21460         if( status ) return status;
21461         status = pthread_create( &t, &attr, task, NULL );
21462 #if HAVE_PTHREADS < 7
21463         if( status < 0 ) status = errno;
21464 #endif
21465         if( status ) return status;
21466 #else
21467         /* Draft 4 pthreads */
21468         status = pthread_create( &t, pthread_attr_default, task, NULL );
21469         if( status ) return errno;
21470
21471         /* give thread a chance to complete */
21472         /* it should remain joinable and hence detachable */
21473         sleep( 1 );
21474
21475         status = pthread_detach( &t );
21476         if( status ) return errno;
21477 #endif
21478
21479 #ifdef HAVE_LINUX_THREADS
21480         pthread_kill_other_threads_np();
21481 #endif
21482
21483         return 0;
21484
21485 }
21486
21487 _ACEOF
21488 rm -f conftest$ac_exeext
21489 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21490   (eval $ac_link) 2>&5
21491   ac_status=$?
21492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21493   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21494   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21495   (eval $ac_try) 2>&5
21496   ac_status=$?
21497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21498   (exit $ac_status); }; }; then
21499   ol_cv_pthread_mthreads=yes
21500 else
21501   echo "$as_me: program exited with status $ac_status" >&5
21502 echo "$as_me: failed program was:" >&5
21503 sed 's/^/| /' conftest.$ac_ext >&5
21504
21505 ( exit $ac_status )
21506 ol_cv_pthread_mthreads=no
21507 fi
21508 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21509 fi
21510
21511                 # restore the LIBS
21512                 LIBS="$ol_LIBS"
21513
21514 fi
21515 echo "$as_me:$LINENO: result: $ol_cv_pthread_mthreads" >&5
21516 echo "${ECHO_T}$ol_cv_pthread_mthreads" >&6
21517
21518         if test $ol_cv_pthread_mthreads = yes ; then
21519                 ol_link_pthreads="-mthreads"
21520                 ol_link_threads=posix
21521         fi
21522 fi
21523
21524                 # Pthread try link: -thread (ol_cv_pthread_thread)
21525 if test "$ol_link_threads" = no ; then
21526         # try -thread
21527         echo "$as_me:$LINENO: checking for pthread link with -thread" >&5
21528 echo $ECHO_N "checking for pthread link with -thread... $ECHO_C" >&6
21529 if test "${ol_cv_pthread_thread+set}" = set; then
21530   echo $ECHO_N "(cached) $ECHO_C" >&6
21531 else
21532
21533                 # save the flags
21534                 ol_LIBS="$LIBS"
21535                 LIBS="-thread $LIBS"
21536
21537                 if test "$cross_compiling" = yes; then
21538   cat >conftest.$ac_ext <<_ACEOF
21539 /* confdefs.h.  */
21540 _ACEOF
21541 cat confdefs.h >>conftest.$ac_ext
21542 cat >>conftest.$ac_ext <<_ACEOF
21543 /* end confdefs.h.  */
21544
21545 /* pthread test headers */
21546 #include <pthread.h>
21547 #if HAVE_PTHREADS < 7
21548 #include <errno.h>
21549 #endif
21550 #ifndef NULL
21551 #define NULL (void*)0
21552 #endif
21553
21554 static void *task(p)
21555         void *p;
21556 {
21557         return (void *) (p == NULL);
21558 }
21559
21560 int
21561 main ()
21562 {
21563
21564         /* pthread test function */
21565 #ifndef PTHREAD_CREATE_DETACHED
21566 #define PTHREAD_CREATE_DETACHED 1
21567 #endif
21568         pthread_t t;
21569         int status;
21570         int detach = PTHREAD_CREATE_DETACHED;
21571
21572 #if HAVE_PTHREADS > 4
21573         /* Final pthreads */
21574         pthread_attr_t attr;
21575
21576         status = pthread_attr_init(&attr);
21577         if( status ) return status;
21578
21579 #if HAVE_PTHREADS < 7
21580         status = pthread_attr_setdetachstate(&attr, &detach);
21581         if( status < 0 ) status = errno;
21582 #else
21583         status = pthread_attr_setdetachstate(&attr, detach);
21584 #endif
21585         if( status ) return status;
21586         status = pthread_create( &t, &attr, task, NULL );
21587 #if HAVE_PTHREADS < 7
21588         if( status < 0 ) status = errno;
21589 #endif
21590         if( status ) return status;
21591 #else
21592         /* Draft 4 pthreads */
21593         status = pthread_create( &t, pthread_attr_default, task, NULL );
21594         if( status ) return errno;
21595
21596         /* give thread a chance to complete */
21597         /* it should remain joinable and hence detachable */
21598         sleep( 1 );
21599
21600         status = pthread_detach( &t );
21601         if( status ) return errno;
21602 #endif
21603
21604 #ifdef HAVE_LINUX_THREADS
21605         pthread_kill_other_threads_np();
21606 #endif
21607
21608         return 0;
21609
21610   ;
21611   return 0;
21612 }
21613 _ACEOF
21614 rm -f conftest.$ac_objext conftest$ac_exeext
21615 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21616   (eval $ac_link) 2>conftest.er1
21617   ac_status=$?
21618   grep -v '^ *+' conftest.er1 >conftest.err
21619   rm -f conftest.er1
21620   cat conftest.err >&5
21621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21622   (exit $ac_status); } &&
21623          { ac_try='test -z "$ac_c_werror_flag"
21624                          || test ! -s conftest.err'
21625   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21626   (eval $ac_try) 2>&5
21627   ac_status=$?
21628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21629   (exit $ac_status); }; } &&
21630          { ac_try='test -s conftest$ac_exeext'
21631   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21632   (eval $ac_try) 2>&5
21633   ac_status=$?
21634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21635   (exit $ac_status); }; }; then
21636   ol_cv_pthread_thread=yes
21637 else
21638   echo "$as_me: failed program was:" >&5
21639 sed 's/^/| /' conftest.$ac_ext >&5
21640
21641 ol_cv_pthread_thread=no
21642 fi
21643 rm -f conftest.err conftest.$ac_objext \
21644       conftest$ac_exeext conftest.$ac_ext
21645 else
21646   cat >conftest.$ac_ext <<_ACEOF
21647 /* confdefs.h.  */
21648 _ACEOF
21649 cat confdefs.h >>conftest.$ac_ext
21650 cat >>conftest.$ac_ext <<_ACEOF
21651 /* end confdefs.h.  */
21652
21653 /* pthread test headers */
21654 #include <pthread.h>
21655 #if HAVE_PTHREADS < 7
21656 #include <errno.h>
21657 #endif
21658 #ifndef NULL
21659 #define NULL (void*)0
21660 #endif
21661
21662 static void *task(p)
21663         void *p;
21664 {
21665         return (void *) (p == NULL);
21666 }
21667
21668
21669 int main(argc, argv)
21670         int argc;
21671         char **argv;
21672 {
21673
21674         /* pthread test function */
21675 #ifndef PTHREAD_CREATE_DETACHED
21676 #define PTHREAD_CREATE_DETACHED 1
21677 #endif
21678         pthread_t t;
21679         int status;
21680         int detach = PTHREAD_CREATE_DETACHED;
21681
21682 #if HAVE_PTHREADS > 4
21683         /* Final pthreads */
21684         pthread_attr_t attr;
21685
21686         status = pthread_attr_init(&attr);
21687         if( status ) return status;
21688
21689 #if HAVE_PTHREADS < 7
21690         status = pthread_attr_setdetachstate(&attr, &detach);
21691         if( status < 0 ) status = errno;
21692 #else
21693         status = pthread_attr_setdetachstate(&attr, detach);
21694 #endif
21695         if( status ) return status;
21696         status = pthread_create( &t, &attr, task, NULL );
21697 #if HAVE_PTHREADS < 7
21698         if( status < 0 ) status = errno;
21699 #endif
21700         if( status ) return status;
21701 #else
21702         /* Draft 4 pthreads */
21703         status = pthread_create( &t, pthread_attr_default, task, NULL );
21704         if( status ) return errno;
21705
21706         /* give thread a chance to complete */
21707         /* it should remain joinable and hence detachable */
21708         sleep( 1 );
21709
21710         status = pthread_detach( &t );
21711         if( status ) return errno;
21712 #endif
21713
21714 #ifdef HAVE_LINUX_THREADS
21715         pthread_kill_other_threads_np();
21716 #endif
21717
21718         return 0;
21719
21720 }
21721
21722 _ACEOF
21723 rm -f conftest$ac_exeext
21724 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21725   (eval $ac_link) 2>&5
21726   ac_status=$?
21727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21728   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21729   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21730   (eval $ac_try) 2>&5
21731   ac_status=$?
21732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21733   (exit $ac_status); }; }; then
21734   ol_cv_pthread_thread=yes
21735 else
21736   echo "$as_me: program exited with status $ac_status" >&5
21737 echo "$as_me: failed program was:" >&5
21738 sed 's/^/| /' conftest.$ac_ext >&5
21739
21740 ( exit $ac_status )
21741 ol_cv_pthread_thread=no
21742 fi
21743 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21744 fi
21745
21746                 # restore the LIBS
21747                 LIBS="$ol_LIBS"
21748
21749 fi
21750 echo "$as_me:$LINENO: result: $ol_cv_pthread_thread" >&5
21751 echo "${ECHO_T}$ol_cv_pthread_thread" >&6
21752
21753         if test $ol_cv_pthread_thread = yes ; then
21754                 ol_link_pthreads="-thread"
21755                 ol_link_threads=posix
21756         fi
21757 fi
21758
21759
21760                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
21761 if test "$ol_link_threads" = no ; then
21762         # try -lpthread -lmach -lexc -lc_r
21763         echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
21764 echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc -lc_r... $ECHO_C" >&6
21765 if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then
21766   echo $ECHO_N "(cached) $ECHO_C" >&6
21767 else
21768
21769                 # save the flags
21770                 ol_LIBS="$LIBS"
21771                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
21772
21773                 if test "$cross_compiling" = yes; then
21774   cat >conftest.$ac_ext <<_ACEOF
21775 /* confdefs.h.  */
21776 _ACEOF
21777 cat confdefs.h >>conftest.$ac_ext
21778 cat >>conftest.$ac_ext <<_ACEOF
21779 /* end confdefs.h.  */
21780
21781 /* pthread test headers */
21782 #include <pthread.h>
21783 #if HAVE_PTHREADS < 7
21784 #include <errno.h>
21785 #endif
21786 #ifndef NULL
21787 #define NULL (void*)0
21788 #endif
21789
21790 static void *task(p)
21791         void *p;
21792 {
21793         return (void *) (p == NULL);
21794 }
21795
21796 int
21797 main ()
21798 {
21799
21800         /* pthread test function */
21801 #ifndef PTHREAD_CREATE_DETACHED
21802 #define PTHREAD_CREATE_DETACHED 1
21803 #endif
21804         pthread_t t;
21805         int status;
21806         int detach = PTHREAD_CREATE_DETACHED;
21807
21808 #if HAVE_PTHREADS > 4
21809         /* Final pthreads */
21810         pthread_attr_t attr;
21811
21812         status = pthread_attr_init(&attr);
21813         if( status ) return status;
21814
21815 #if HAVE_PTHREADS < 7
21816         status = pthread_attr_setdetachstate(&attr, &detach);
21817         if( status < 0 ) status = errno;
21818 #else
21819         status = pthread_attr_setdetachstate(&attr, detach);
21820 #endif
21821         if( status ) return status;
21822         status = pthread_create( &t, &attr, task, NULL );
21823 #if HAVE_PTHREADS < 7
21824         if( status < 0 ) status = errno;
21825 #endif
21826         if( status ) return status;
21827 #else
21828         /* Draft 4 pthreads */
21829         status = pthread_create( &t, pthread_attr_default, task, NULL );
21830         if( status ) return errno;
21831
21832         /* give thread a chance to complete */
21833         /* it should remain joinable and hence detachable */
21834         sleep( 1 );
21835
21836         status = pthread_detach( &t );
21837         if( status ) return errno;
21838 #endif
21839
21840 #ifdef HAVE_LINUX_THREADS
21841         pthread_kill_other_threads_np();
21842 #endif
21843
21844         return 0;
21845
21846   ;
21847   return 0;
21848 }
21849 _ACEOF
21850 rm -f conftest.$ac_objext conftest$ac_exeext
21851 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21852   (eval $ac_link) 2>conftest.er1
21853   ac_status=$?
21854   grep -v '^ *+' conftest.er1 >conftest.err
21855   rm -f conftest.er1
21856   cat conftest.err >&5
21857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21858   (exit $ac_status); } &&
21859          { ac_try='test -z "$ac_c_werror_flag"
21860                          || test ! -s conftest.err'
21861   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21862   (eval $ac_try) 2>&5
21863   ac_status=$?
21864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21865   (exit $ac_status); }; } &&
21866          { ac_try='test -s conftest$ac_exeext'
21867   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21868   (eval $ac_try) 2>&5
21869   ac_status=$?
21870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21871   (exit $ac_status); }; }; then
21872   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
21873 else
21874   echo "$as_me: failed program was:" >&5
21875 sed 's/^/| /' conftest.$ac_ext >&5
21876
21877 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
21878 fi
21879 rm -f conftest.err conftest.$ac_objext \
21880       conftest$ac_exeext conftest.$ac_ext
21881 else
21882   cat >conftest.$ac_ext <<_ACEOF
21883 /* confdefs.h.  */
21884 _ACEOF
21885 cat confdefs.h >>conftest.$ac_ext
21886 cat >>conftest.$ac_ext <<_ACEOF
21887 /* end confdefs.h.  */
21888
21889 /* pthread test headers */
21890 #include <pthread.h>
21891 #if HAVE_PTHREADS < 7
21892 #include <errno.h>
21893 #endif
21894 #ifndef NULL
21895 #define NULL (void*)0
21896 #endif
21897
21898 static void *task(p)
21899         void *p;
21900 {
21901         return (void *) (p == NULL);
21902 }
21903
21904
21905 int main(argc, argv)
21906         int argc;
21907         char **argv;
21908 {
21909
21910         /* pthread test function */
21911 #ifndef PTHREAD_CREATE_DETACHED
21912 #define PTHREAD_CREATE_DETACHED 1
21913 #endif
21914         pthread_t t;
21915         int status;
21916         int detach = PTHREAD_CREATE_DETACHED;
21917
21918 #if HAVE_PTHREADS > 4
21919         /* Final pthreads */
21920         pthread_attr_t attr;
21921
21922         status = pthread_attr_init(&attr);
21923         if( status ) return status;
21924
21925 #if HAVE_PTHREADS < 7
21926         status = pthread_attr_setdetachstate(&attr, &detach);
21927         if( status < 0 ) status = errno;
21928 #else
21929         status = pthread_attr_setdetachstate(&attr, detach);
21930 #endif
21931         if( status ) return status;
21932         status = pthread_create( &t, &attr, task, NULL );
21933 #if HAVE_PTHREADS < 7
21934         if( status < 0 ) status = errno;
21935 #endif
21936         if( status ) return status;
21937 #else
21938         /* Draft 4 pthreads */
21939         status = pthread_create( &t, pthread_attr_default, task, NULL );
21940         if( status ) return errno;
21941
21942         /* give thread a chance to complete */
21943         /* it should remain joinable and hence detachable */
21944         sleep( 1 );
21945
21946         status = pthread_detach( &t );
21947         if( status ) return errno;
21948 #endif
21949
21950 #ifdef HAVE_LINUX_THREADS
21951         pthread_kill_other_threads_np();
21952 #endif
21953
21954         return 0;
21955
21956 }
21957
21958 _ACEOF
21959 rm -f conftest$ac_exeext
21960 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21961   (eval $ac_link) 2>&5
21962   ac_status=$?
21963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21964   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21965   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21966   (eval $ac_try) 2>&5
21967   ac_status=$?
21968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21969   (exit $ac_status); }; }; then
21970   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
21971 else
21972   echo "$as_me: program exited with status $ac_status" >&5
21973 echo "$as_me: failed program was:" >&5
21974 sed 's/^/| /' conftest.$ac_ext >&5
21975
21976 ( exit $ac_status )
21977 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
21978 fi
21979 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21980 fi
21981
21982                 # restore the LIBS
21983                 LIBS="$ol_LIBS"
21984
21985 fi
21986 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
21987 echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6
21988
21989         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
21990                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
21991                 ol_link_threads=posix
21992         fi
21993 fi
21994
21995                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
21996 if test "$ol_link_threads" = no ; then
21997         # try -lpthread -lmach -lexc
21998         echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc" >&5
21999 echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc... $ECHO_C" >&6
22000 if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then
22001   echo $ECHO_N "(cached) $ECHO_C" >&6
22002 else
22003
22004                 # save the flags
22005                 ol_LIBS="$LIBS"
22006                 LIBS="-lpthread -lmach -lexc $LIBS"
22007
22008                 if test "$cross_compiling" = yes; then
22009   cat >conftest.$ac_ext <<_ACEOF
22010 /* confdefs.h.  */
22011 _ACEOF
22012 cat confdefs.h >>conftest.$ac_ext
22013 cat >>conftest.$ac_ext <<_ACEOF
22014 /* end confdefs.h.  */
22015
22016 /* pthread test headers */
22017 #include <pthread.h>
22018 #if HAVE_PTHREADS < 7
22019 #include <errno.h>
22020 #endif
22021 #ifndef NULL
22022 #define NULL (void*)0
22023 #endif
22024
22025 static void *task(p)
22026         void *p;
22027 {
22028         return (void *) (p == NULL);
22029 }
22030
22031 int
22032 main ()
22033 {
22034
22035         /* pthread test function */
22036 #ifndef PTHREAD_CREATE_DETACHED
22037 #define PTHREAD_CREATE_DETACHED 1
22038 #endif
22039         pthread_t t;
22040         int status;
22041         int detach = PTHREAD_CREATE_DETACHED;
22042
22043 #if HAVE_PTHREADS > 4
22044         /* Final pthreads */
22045         pthread_attr_t attr;
22046
22047         status = pthread_attr_init(&attr);
22048         if( status ) return status;
22049
22050 #if HAVE_PTHREADS < 7
22051         status = pthread_attr_setdetachstate(&attr, &detach);
22052         if( status < 0 ) status = errno;
22053 #else
22054         status = pthread_attr_setdetachstate(&attr, detach);
22055 #endif
22056         if( status ) return status;
22057         status = pthread_create( &t, &attr, task, NULL );
22058 #if HAVE_PTHREADS < 7
22059         if( status < 0 ) status = errno;
22060 #endif
22061         if( status ) return status;
22062 #else
22063         /* Draft 4 pthreads */
22064         status = pthread_create( &t, pthread_attr_default, task, NULL );
22065         if( status ) return errno;
22066
22067         /* give thread a chance to complete */
22068         /* it should remain joinable and hence detachable */
22069         sleep( 1 );
22070
22071         status = pthread_detach( &t );
22072         if( status ) return errno;
22073 #endif
22074
22075 #ifdef HAVE_LINUX_THREADS
22076         pthread_kill_other_threads_np();
22077 #endif
22078
22079         return 0;
22080
22081   ;
22082   return 0;
22083 }
22084 _ACEOF
22085 rm -f conftest.$ac_objext conftest$ac_exeext
22086 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22087   (eval $ac_link) 2>conftest.er1
22088   ac_status=$?
22089   grep -v '^ *+' conftest.er1 >conftest.err
22090   rm -f conftest.er1
22091   cat conftest.err >&5
22092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22093   (exit $ac_status); } &&
22094          { ac_try='test -z "$ac_c_werror_flag"
22095                          || test ! -s conftest.err'
22096   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22097   (eval $ac_try) 2>&5
22098   ac_status=$?
22099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22100   (exit $ac_status); }; } &&
22101          { ac_try='test -s conftest$ac_exeext'
22102   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22103   (eval $ac_try) 2>&5
22104   ac_status=$?
22105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22106   (exit $ac_status); }; }; then
22107   ol_cv_pthread_lpthread_lmach_lexc=yes
22108 else
22109   echo "$as_me: failed program was:" >&5
22110 sed 's/^/| /' conftest.$ac_ext >&5
22111
22112 ol_cv_pthread_lpthread_lmach_lexc=no
22113 fi
22114 rm -f conftest.err conftest.$ac_objext \
22115       conftest$ac_exeext conftest.$ac_ext
22116 else
22117   cat >conftest.$ac_ext <<_ACEOF
22118 /* confdefs.h.  */
22119 _ACEOF
22120 cat confdefs.h >>conftest.$ac_ext
22121 cat >>conftest.$ac_ext <<_ACEOF
22122 /* end confdefs.h.  */
22123
22124 /* pthread test headers */
22125 #include <pthread.h>
22126 #if HAVE_PTHREADS < 7
22127 #include <errno.h>
22128 #endif
22129 #ifndef NULL
22130 #define NULL (void*)0
22131 #endif
22132
22133 static void *task(p)
22134         void *p;
22135 {
22136         return (void *) (p == NULL);
22137 }
22138
22139
22140 int main(argc, argv)
22141         int argc;
22142         char **argv;
22143 {
22144
22145         /* pthread test function */
22146 #ifndef PTHREAD_CREATE_DETACHED
22147 #define PTHREAD_CREATE_DETACHED 1
22148 #endif
22149         pthread_t t;
22150         int status;
22151         int detach = PTHREAD_CREATE_DETACHED;
22152
22153 #if HAVE_PTHREADS > 4
22154         /* Final pthreads */
22155         pthread_attr_t attr;
22156
22157         status = pthread_attr_init(&attr);
22158         if( status ) return status;
22159
22160 #if HAVE_PTHREADS < 7
22161         status = pthread_attr_setdetachstate(&attr, &detach);
22162         if( status < 0 ) status = errno;
22163 #else
22164         status = pthread_attr_setdetachstate(&attr, detach);
22165 #endif
22166         if( status ) return status;
22167         status = pthread_create( &t, &attr, task, NULL );
22168 #if HAVE_PTHREADS < 7
22169         if( status < 0 ) status = errno;
22170 #endif
22171         if( status ) return status;
22172 #else
22173         /* Draft 4 pthreads */
22174         status = pthread_create( &t, pthread_attr_default, task, NULL );
22175         if( status ) return errno;
22176
22177         /* give thread a chance to complete */
22178         /* it should remain joinable and hence detachable */
22179         sleep( 1 );
22180
22181         status = pthread_detach( &t );
22182         if( status ) return errno;
22183 #endif
22184
22185 #ifdef HAVE_LINUX_THREADS
22186         pthread_kill_other_threads_np();
22187 #endif
22188
22189         return 0;
22190
22191 }
22192
22193 _ACEOF
22194 rm -f conftest$ac_exeext
22195 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22196   (eval $ac_link) 2>&5
22197   ac_status=$?
22198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22199   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22201   (eval $ac_try) 2>&5
22202   ac_status=$?
22203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22204   (exit $ac_status); }; }; then
22205   ol_cv_pthread_lpthread_lmach_lexc=yes
22206 else
22207   echo "$as_me: program exited with status $ac_status" >&5
22208 echo "$as_me: failed program was:" >&5
22209 sed 's/^/| /' conftest.$ac_ext >&5
22210
22211 ( exit $ac_status )
22212 ol_cv_pthread_lpthread_lmach_lexc=no
22213 fi
22214 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22215 fi
22216
22217                 # restore the LIBS
22218                 LIBS="$ol_LIBS"
22219
22220 fi
22221 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
22222 echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc" >&6
22223
22224         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
22225                 ol_link_pthreads="-lpthread -lmach -lexc"
22226                 ol_link_threads=posix
22227         fi
22228 fi
22229
22230
22231                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
22232 if test "$ol_link_threads" = no ; then
22233         # try -lpthread -Wl,-woff,85
22234         echo "$as_me:$LINENO: checking for pthread link with -lpthread -Wl,-woff,85" >&5
22235 echo $ECHO_N "checking for pthread link with -lpthread -Wl,-woff,85... $ECHO_C" >&6
22236 if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then
22237   echo $ECHO_N "(cached) $ECHO_C" >&6
22238 else
22239
22240                 # save the flags
22241                 ol_LIBS="$LIBS"
22242                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
22243
22244                 if test "$cross_compiling" = yes; then
22245   cat >conftest.$ac_ext <<_ACEOF
22246 /* confdefs.h.  */
22247 _ACEOF
22248 cat confdefs.h >>conftest.$ac_ext
22249 cat >>conftest.$ac_ext <<_ACEOF
22250 /* end confdefs.h.  */
22251
22252 /* pthread test headers */
22253 #include <pthread.h>
22254 #if HAVE_PTHREADS < 7
22255 #include <errno.h>
22256 #endif
22257 #ifndef NULL
22258 #define NULL (void*)0
22259 #endif
22260
22261 static void *task(p)
22262         void *p;
22263 {
22264         return (void *) (p == NULL);
22265 }
22266
22267 int
22268 main ()
22269 {
22270
22271         /* pthread test function */
22272 #ifndef PTHREAD_CREATE_DETACHED
22273 #define PTHREAD_CREATE_DETACHED 1
22274 #endif
22275         pthread_t t;
22276         int status;
22277         int detach = PTHREAD_CREATE_DETACHED;
22278
22279 #if HAVE_PTHREADS > 4
22280         /* Final pthreads */
22281         pthread_attr_t attr;
22282
22283         status = pthread_attr_init(&attr);
22284         if( status ) return status;
22285
22286 #if HAVE_PTHREADS < 7
22287         status = pthread_attr_setdetachstate(&attr, &detach);
22288         if( status < 0 ) status = errno;
22289 #else
22290         status = pthread_attr_setdetachstate(&attr, detach);
22291 #endif
22292         if( status ) return status;
22293         status = pthread_create( &t, &attr, task, NULL );
22294 #if HAVE_PTHREADS < 7
22295         if( status < 0 ) status = errno;
22296 #endif
22297         if( status ) return status;
22298 #else
22299         /* Draft 4 pthreads */
22300         status = pthread_create( &t, pthread_attr_default, task, NULL );
22301         if( status ) return errno;
22302
22303         /* give thread a chance to complete */
22304         /* it should remain joinable and hence detachable */
22305         sleep( 1 );
22306
22307         status = pthread_detach( &t );
22308         if( status ) return errno;
22309 #endif
22310
22311 #ifdef HAVE_LINUX_THREADS
22312         pthread_kill_other_threads_np();
22313 #endif
22314
22315         return 0;
22316
22317   ;
22318   return 0;
22319 }
22320 _ACEOF
22321 rm -f conftest.$ac_objext conftest$ac_exeext
22322 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22323   (eval $ac_link) 2>conftest.er1
22324   ac_status=$?
22325   grep -v '^ *+' conftest.er1 >conftest.err
22326   rm -f conftest.er1
22327   cat conftest.err >&5
22328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22329   (exit $ac_status); } &&
22330          { ac_try='test -z "$ac_c_werror_flag"
22331                          || test ! -s conftest.err'
22332   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22333   (eval $ac_try) 2>&5
22334   ac_status=$?
22335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22336   (exit $ac_status); }; } &&
22337          { ac_try='test -s conftest$ac_exeext'
22338   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22339   (eval $ac_try) 2>&5
22340   ac_status=$?
22341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22342   (exit $ac_status); }; }; then
22343   ol_cv_pthread_lib_lpthread_woff=yes
22344 else
22345   echo "$as_me: failed program was:" >&5
22346 sed 's/^/| /' conftest.$ac_ext >&5
22347
22348 ol_cv_pthread_lib_lpthread_woff=no
22349 fi
22350 rm -f conftest.err conftest.$ac_objext \
22351       conftest$ac_exeext conftest.$ac_ext
22352 else
22353   cat >conftest.$ac_ext <<_ACEOF
22354 /* confdefs.h.  */
22355 _ACEOF
22356 cat confdefs.h >>conftest.$ac_ext
22357 cat >>conftest.$ac_ext <<_ACEOF
22358 /* end confdefs.h.  */
22359
22360 /* pthread test headers */
22361 #include <pthread.h>
22362 #if HAVE_PTHREADS < 7
22363 #include <errno.h>
22364 #endif
22365 #ifndef NULL
22366 #define NULL (void*)0
22367 #endif
22368
22369 static void *task(p)
22370         void *p;
22371 {
22372         return (void *) (p == NULL);
22373 }
22374
22375
22376 int main(argc, argv)
22377         int argc;
22378         char **argv;
22379 {
22380
22381         /* pthread test function */
22382 #ifndef PTHREAD_CREATE_DETACHED
22383 #define PTHREAD_CREATE_DETACHED 1
22384 #endif
22385         pthread_t t;
22386         int status;
22387         int detach = PTHREAD_CREATE_DETACHED;
22388
22389 #if HAVE_PTHREADS > 4
22390         /* Final pthreads */
22391         pthread_attr_t attr;
22392
22393         status = pthread_attr_init(&attr);
22394         if( status ) return status;
22395
22396 #if HAVE_PTHREADS < 7
22397         status = pthread_attr_setdetachstate(&attr, &detach);
22398         if( status < 0 ) status = errno;
22399 #else
22400         status = pthread_attr_setdetachstate(&attr, detach);
22401 #endif
22402         if( status ) return status;
22403         status = pthread_create( &t, &attr, task, NULL );
22404 #if HAVE_PTHREADS < 7
22405         if( status < 0 ) status = errno;
22406 #endif
22407         if( status ) return status;
22408 #else
22409         /* Draft 4 pthreads */
22410         status = pthread_create( &t, pthread_attr_default, task, NULL );
22411         if( status ) return errno;
22412
22413         /* give thread a chance to complete */
22414         /* it should remain joinable and hence detachable */
22415         sleep( 1 );
22416
22417         status = pthread_detach( &t );
22418         if( status ) return errno;
22419 #endif
22420
22421 #ifdef HAVE_LINUX_THREADS
22422         pthread_kill_other_threads_np();
22423 #endif
22424
22425         return 0;
22426
22427 }
22428
22429 _ACEOF
22430 rm -f conftest$ac_exeext
22431 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22432   (eval $ac_link) 2>&5
22433   ac_status=$?
22434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22435   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22436   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22437   (eval $ac_try) 2>&5
22438   ac_status=$?
22439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22440   (exit $ac_status); }; }; then
22441   ol_cv_pthread_lib_lpthread_woff=yes
22442 else
22443   echo "$as_me: program exited with status $ac_status" >&5
22444 echo "$as_me: failed program was:" >&5
22445 sed 's/^/| /' conftest.$ac_ext >&5
22446
22447 ( exit $ac_status )
22448 ol_cv_pthread_lib_lpthread_woff=no
22449 fi
22450 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22451 fi
22452
22453                 # restore the LIBS
22454                 LIBS="$ol_LIBS"
22455
22456 fi
22457 echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthread_woff" >&5
22458 echo "${ECHO_T}$ol_cv_pthread_lib_lpthread_woff" >&6
22459
22460         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
22461                 ol_link_pthreads="-lpthread -Wl,-woff,85"
22462                 ol_link_threads=posix
22463         fi
22464 fi
22465
22466
22467                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
22468 if test "$ol_link_threads" = no ; then
22469         # try -lpthread
22470         echo "$as_me:$LINENO: checking for pthread link with -lpthread" >&5
22471 echo $ECHO_N "checking for pthread link with -lpthread... $ECHO_C" >&6
22472 if test "${ol_cv_pthread_lpthread+set}" = set; then
22473   echo $ECHO_N "(cached) $ECHO_C" >&6
22474 else
22475
22476                 # save the flags
22477                 ol_LIBS="$LIBS"
22478                 LIBS="-lpthread $LIBS"
22479
22480                 if test "$cross_compiling" = yes; then
22481   cat >conftest.$ac_ext <<_ACEOF
22482 /* confdefs.h.  */
22483 _ACEOF
22484 cat confdefs.h >>conftest.$ac_ext
22485 cat >>conftest.$ac_ext <<_ACEOF
22486 /* end confdefs.h.  */
22487
22488 /* pthread test headers */
22489 #include <pthread.h>
22490 #if HAVE_PTHREADS < 7
22491 #include <errno.h>
22492 #endif
22493 #ifndef NULL
22494 #define NULL (void*)0
22495 #endif
22496
22497 static void *task(p)
22498         void *p;
22499 {
22500         return (void *) (p == NULL);
22501 }
22502
22503 int
22504 main ()
22505 {
22506
22507         /* pthread test function */
22508 #ifndef PTHREAD_CREATE_DETACHED
22509 #define PTHREAD_CREATE_DETACHED 1
22510 #endif
22511         pthread_t t;
22512         int status;
22513         int detach = PTHREAD_CREATE_DETACHED;
22514
22515 #if HAVE_PTHREADS > 4
22516         /* Final pthreads */
22517         pthread_attr_t attr;
22518
22519         status = pthread_attr_init(&attr);
22520         if( status ) return status;
22521
22522 #if HAVE_PTHREADS < 7
22523         status = pthread_attr_setdetachstate(&attr, &detach);
22524         if( status < 0 ) status = errno;
22525 #else
22526         status = pthread_attr_setdetachstate(&attr, detach);
22527 #endif
22528         if( status ) return status;
22529         status = pthread_create( &t, &attr, task, NULL );
22530 #if HAVE_PTHREADS < 7
22531         if( status < 0 ) status = errno;
22532 #endif
22533         if( status ) return status;
22534 #else
22535         /* Draft 4 pthreads */
22536         status = pthread_create( &t, pthread_attr_default, task, NULL );
22537         if( status ) return errno;
22538
22539         /* give thread a chance to complete */
22540         /* it should remain joinable and hence detachable */
22541         sleep( 1 );
22542
22543         status = pthread_detach( &t );
22544         if( status ) return errno;
22545 #endif
22546
22547 #ifdef HAVE_LINUX_THREADS
22548         pthread_kill_other_threads_np();
22549 #endif
22550
22551         return 0;
22552
22553   ;
22554   return 0;
22555 }
22556 _ACEOF
22557 rm -f conftest.$ac_objext conftest$ac_exeext
22558 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22559   (eval $ac_link) 2>conftest.er1
22560   ac_status=$?
22561   grep -v '^ *+' conftest.er1 >conftest.err
22562   rm -f conftest.er1
22563   cat conftest.err >&5
22564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22565   (exit $ac_status); } &&
22566          { ac_try='test -z "$ac_c_werror_flag"
22567                          || test ! -s conftest.err'
22568   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22569   (eval $ac_try) 2>&5
22570   ac_status=$?
22571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22572   (exit $ac_status); }; } &&
22573          { ac_try='test -s conftest$ac_exeext'
22574   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22575   (eval $ac_try) 2>&5
22576   ac_status=$?
22577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22578   (exit $ac_status); }; }; then
22579   ol_cv_pthread_lpthread=yes
22580 else
22581   echo "$as_me: failed program was:" >&5
22582 sed 's/^/| /' conftest.$ac_ext >&5
22583
22584 ol_cv_pthread_lpthread=no
22585 fi
22586 rm -f conftest.err conftest.$ac_objext \
22587       conftest$ac_exeext conftest.$ac_ext
22588 else
22589   cat >conftest.$ac_ext <<_ACEOF
22590 /* confdefs.h.  */
22591 _ACEOF
22592 cat confdefs.h >>conftest.$ac_ext
22593 cat >>conftest.$ac_ext <<_ACEOF
22594 /* end confdefs.h.  */
22595
22596 /* pthread test headers */
22597 #include <pthread.h>
22598 #if HAVE_PTHREADS < 7
22599 #include <errno.h>
22600 #endif
22601 #ifndef NULL
22602 #define NULL (void*)0
22603 #endif
22604
22605 static void *task(p)
22606         void *p;
22607 {
22608         return (void *) (p == NULL);
22609 }
22610
22611
22612 int main(argc, argv)
22613         int argc;
22614         char **argv;
22615 {
22616
22617         /* pthread test function */
22618 #ifndef PTHREAD_CREATE_DETACHED
22619 #define PTHREAD_CREATE_DETACHED 1
22620 #endif
22621         pthread_t t;
22622         int status;
22623         int detach = PTHREAD_CREATE_DETACHED;
22624
22625 #if HAVE_PTHREADS > 4
22626         /* Final pthreads */
22627         pthread_attr_t attr;
22628
22629         status = pthread_attr_init(&attr);
22630         if( status ) return status;
22631
22632 #if HAVE_PTHREADS < 7
22633         status = pthread_attr_setdetachstate(&attr, &detach);
22634         if( status < 0 ) status = errno;
22635 #else
22636         status = pthread_attr_setdetachstate(&attr, detach);
22637 #endif
22638         if( status ) return status;
22639         status = pthread_create( &t, &attr, task, NULL );
22640 #if HAVE_PTHREADS < 7
22641         if( status < 0 ) status = errno;
22642 #endif
22643         if( status ) return status;
22644 #else
22645         /* Draft 4 pthreads */
22646         status = pthread_create( &t, pthread_attr_default, task, NULL );
22647         if( status ) return errno;
22648
22649         /* give thread a chance to complete */
22650         /* it should remain joinable and hence detachable */
22651         sleep( 1 );
22652
22653         status = pthread_detach( &t );
22654         if( status ) return errno;
22655 #endif
22656
22657 #ifdef HAVE_LINUX_THREADS
22658         pthread_kill_other_threads_np();
22659 #endif
22660
22661         return 0;
22662
22663 }
22664
22665 _ACEOF
22666 rm -f conftest$ac_exeext
22667 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22668   (eval $ac_link) 2>&5
22669   ac_status=$?
22670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22671   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22672   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22673   (eval $ac_try) 2>&5
22674   ac_status=$?
22675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22676   (exit $ac_status); }; }; then
22677   ol_cv_pthread_lpthread=yes
22678 else
22679   echo "$as_me: program exited with status $ac_status" >&5
22680 echo "$as_me: failed program was:" >&5
22681 sed 's/^/| /' conftest.$ac_ext >&5
22682
22683 ( exit $ac_status )
22684 ol_cv_pthread_lpthread=no
22685 fi
22686 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22687 fi
22688
22689                 # restore the LIBS
22690                 LIBS="$ol_LIBS"
22691
22692 fi
22693 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread" >&5
22694 echo "${ECHO_T}$ol_cv_pthread_lpthread" >&6
22695
22696         if test $ol_cv_pthread_lpthread = yes ; then
22697                 ol_link_pthreads="-lpthread"
22698                 ol_link_threads=posix
22699         fi
22700 fi
22701
22702                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
22703 if test "$ol_link_threads" = no ; then
22704         # try -lc_r
22705         echo "$as_me:$LINENO: checking for pthread link with -lc_r" >&5
22706 echo $ECHO_N "checking for pthread link with -lc_r... $ECHO_C" >&6
22707 if test "${ol_cv_pthread_lc_r+set}" = set; then
22708   echo $ECHO_N "(cached) $ECHO_C" >&6
22709 else
22710
22711                 # save the flags
22712                 ol_LIBS="$LIBS"
22713                 LIBS="-lc_r $LIBS"
22714
22715                 if test "$cross_compiling" = yes; then
22716   cat >conftest.$ac_ext <<_ACEOF
22717 /* confdefs.h.  */
22718 _ACEOF
22719 cat confdefs.h >>conftest.$ac_ext
22720 cat >>conftest.$ac_ext <<_ACEOF
22721 /* end confdefs.h.  */
22722
22723 /* pthread test headers */
22724 #include <pthread.h>
22725 #if HAVE_PTHREADS < 7
22726 #include <errno.h>
22727 #endif
22728 #ifndef NULL
22729 #define NULL (void*)0
22730 #endif
22731
22732 static void *task(p)
22733         void *p;
22734 {
22735         return (void *) (p == NULL);
22736 }
22737
22738 int
22739 main ()
22740 {
22741
22742         /* pthread test function */
22743 #ifndef PTHREAD_CREATE_DETACHED
22744 #define PTHREAD_CREATE_DETACHED 1
22745 #endif
22746         pthread_t t;
22747         int status;
22748         int detach = PTHREAD_CREATE_DETACHED;
22749
22750 #if HAVE_PTHREADS > 4
22751         /* Final pthreads */
22752         pthread_attr_t attr;
22753
22754         status = pthread_attr_init(&attr);
22755         if( status ) return status;
22756
22757 #if HAVE_PTHREADS < 7
22758         status = pthread_attr_setdetachstate(&attr, &detach);
22759         if( status < 0 ) status = errno;
22760 #else
22761         status = pthread_attr_setdetachstate(&attr, detach);
22762 #endif
22763         if( status ) return status;
22764         status = pthread_create( &t, &attr, task, NULL );
22765 #if HAVE_PTHREADS < 7
22766         if( status < 0 ) status = errno;
22767 #endif
22768         if( status ) return status;
22769 #else
22770         /* Draft 4 pthreads */
22771         status = pthread_create( &t, pthread_attr_default, task, NULL );
22772         if( status ) return errno;
22773
22774         /* give thread a chance to complete */
22775         /* it should remain joinable and hence detachable */
22776         sleep( 1 );
22777
22778         status = pthread_detach( &t );
22779         if( status ) return errno;
22780 #endif
22781
22782 #ifdef HAVE_LINUX_THREADS
22783         pthread_kill_other_threads_np();
22784 #endif
22785
22786         return 0;
22787
22788   ;
22789   return 0;
22790 }
22791 _ACEOF
22792 rm -f conftest.$ac_objext conftest$ac_exeext
22793 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22794   (eval $ac_link) 2>conftest.er1
22795   ac_status=$?
22796   grep -v '^ *+' conftest.er1 >conftest.err
22797   rm -f conftest.er1
22798   cat conftest.err >&5
22799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22800   (exit $ac_status); } &&
22801          { ac_try='test -z "$ac_c_werror_flag"
22802                          || test ! -s conftest.err'
22803   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22804   (eval $ac_try) 2>&5
22805   ac_status=$?
22806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22807   (exit $ac_status); }; } &&
22808          { ac_try='test -s conftest$ac_exeext'
22809   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22810   (eval $ac_try) 2>&5
22811   ac_status=$?
22812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22813   (exit $ac_status); }; }; then
22814   ol_cv_pthread_lc_r=yes
22815 else
22816   echo "$as_me: failed program was:" >&5
22817 sed 's/^/| /' conftest.$ac_ext >&5
22818
22819 ol_cv_pthread_lc_r=no
22820 fi
22821 rm -f conftest.err conftest.$ac_objext \
22822       conftest$ac_exeext conftest.$ac_ext
22823 else
22824   cat >conftest.$ac_ext <<_ACEOF
22825 /* confdefs.h.  */
22826 _ACEOF
22827 cat confdefs.h >>conftest.$ac_ext
22828 cat >>conftest.$ac_ext <<_ACEOF
22829 /* end confdefs.h.  */
22830
22831 /* pthread test headers */
22832 #include <pthread.h>
22833 #if HAVE_PTHREADS < 7
22834 #include <errno.h>
22835 #endif
22836 #ifndef NULL
22837 #define NULL (void*)0
22838 #endif
22839
22840 static void *task(p)
22841         void *p;
22842 {
22843         return (void *) (p == NULL);
22844 }
22845
22846
22847 int main(argc, argv)
22848         int argc;
22849         char **argv;
22850 {
22851
22852         /* pthread test function */
22853 #ifndef PTHREAD_CREATE_DETACHED
22854 #define PTHREAD_CREATE_DETACHED 1
22855 #endif
22856         pthread_t t;
22857         int status;
22858         int detach = PTHREAD_CREATE_DETACHED;
22859
22860 #if HAVE_PTHREADS > 4
22861         /* Final pthreads */
22862         pthread_attr_t attr;
22863
22864         status = pthread_attr_init(&attr);
22865         if( status ) return status;
22866
22867 #if HAVE_PTHREADS < 7
22868         status = pthread_attr_setdetachstate(&attr, &detach);
22869         if( status < 0 ) status = errno;
22870 #else
22871         status = pthread_attr_setdetachstate(&attr, detach);
22872 #endif
22873         if( status ) return status;
22874         status = pthread_create( &t, &attr, task, NULL );
22875 #if HAVE_PTHREADS < 7
22876         if( status < 0 ) status = errno;
22877 #endif
22878         if( status ) return status;
22879 #else
22880         /* Draft 4 pthreads */
22881         status = pthread_create( &t, pthread_attr_default, task, NULL );
22882         if( status ) return errno;
22883
22884         /* give thread a chance to complete */
22885         /* it should remain joinable and hence detachable */
22886         sleep( 1 );
22887
22888         status = pthread_detach( &t );
22889         if( status ) return errno;
22890 #endif
22891
22892 #ifdef HAVE_LINUX_THREADS
22893         pthread_kill_other_threads_np();
22894 #endif
22895
22896         return 0;
22897
22898 }
22899
22900 _ACEOF
22901 rm -f conftest$ac_exeext
22902 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22903   (eval $ac_link) 2>&5
22904   ac_status=$?
22905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22906   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22907   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22908   (eval $ac_try) 2>&5
22909   ac_status=$?
22910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22911   (exit $ac_status); }; }; then
22912   ol_cv_pthread_lc_r=yes
22913 else
22914   echo "$as_me: program exited with status $ac_status" >&5
22915 echo "$as_me: failed program was:" >&5
22916 sed 's/^/| /' conftest.$ac_ext >&5
22917
22918 ( exit $ac_status )
22919 ol_cv_pthread_lc_r=no
22920 fi
22921 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22922 fi
22923
22924                 # restore the LIBS
22925                 LIBS="$ol_LIBS"
22926
22927 fi
22928 echo "$as_me:$LINENO: result: $ol_cv_pthread_lc_r" >&5
22929 echo "${ECHO_T}$ol_cv_pthread_lc_r" >&6
22930
22931         if test $ol_cv_pthread_lc_r = yes ; then
22932                 ol_link_pthreads="-lc_r"
22933                 ol_link_threads=posix
22934         fi
22935 fi
22936
22937
22938                 # Pthread try link: -threads (ol_cv_pthread_threads)
22939 if test "$ol_link_threads" = no ; then
22940         # try -threads
22941         echo "$as_me:$LINENO: checking for pthread link with -threads" >&5
22942 echo $ECHO_N "checking for pthread link with -threads... $ECHO_C" >&6
22943 if test "${ol_cv_pthread_threads+set}" = set; then
22944   echo $ECHO_N "(cached) $ECHO_C" >&6
22945 else
22946
22947                 # save the flags
22948                 ol_LIBS="$LIBS"
22949                 LIBS="-threads $LIBS"
22950
22951                 if test "$cross_compiling" = yes; then
22952   cat >conftest.$ac_ext <<_ACEOF
22953 /* confdefs.h.  */
22954 _ACEOF
22955 cat confdefs.h >>conftest.$ac_ext
22956 cat >>conftest.$ac_ext <<_ACEOF
22957 /* end confdefs.h.  */
22958
22959 /* pthread test headers */
22960 #include <pthread.h>
22961 #if HAVE_PTHREADS < 7
22962 #include <errno.h>
22963 #endif
22964 #ifndef NULL
22965 #define NULL (void*)0
22966 #endif
22967
22968 static void *task(p)
22969         void *p;
22970 {
22971         return (void *) (p == NULL);
22972 }
22973
22974 int
22975 main ()
22976 {
22977
22978         /* pthread test function */
22979 #ifndef PTHREAD_CREATE_DETACHED
22980 #define PTHREAD_CREATE_DETACHED 1
22981 #endif
22982         pthread_t t;
22983         int status;
22984         int detach = PTHREAD_CREATE_DETACHED;
22985
22986 #if HAVE_PTHREADS > 4
22987         /* Final pthreads */
22988         pthread_attr_t attr;
22989
22990         status = pthread_attr_init(&attr);
22991         if( status ) return status;
22992
22993 #if HAVE_PTHREADS < 7
22994         status = pthread_attr_setdetachstate(&attr, &detach);
22995         if( status < 0 ) status = errno;
22996 #else
22997         status = pthread_attr_setdetachstate(&attr, detach);
22998 #endif
22999         if( status ) return status;
23000         status = pthread_create( &t, &attr, task, NULL );
23001 #if HAVE_PTHREADS < 7
23002         if( status < 0 ) status = errno;
23003 #endif
23004         if( status ) return status;
23005 #else
23006         /* Draft 4 pthreads */
23007         status = pthread_create( &t, pthread_attr_default, task, NULL );
23008         if( status ) return errno;
23009
23010         /* give thread a chance to complete */
23011         /* it should remain joinable and hence detachable */
23012         sleep( 1 );
23013
23014         status = pthread_detach( &t );
23015         if( status ) return errno;
23016 #endif
23017
23018 #ifdef HAVE_LINUX_THREADS
23019         pthread_kill_other_threads_np();
23020 #endif
23021
23022         return 0;
23023
23024   ;
23025   return 0;
23026 }
23027 _ACEOF
23028 rm -f conftest.$ac_objext conftest$ac_exeext
23029 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23030   (eval $ac_link) 2>conftest.er1
23031   ac_status=$?
23032   grep -v '^ *+' conftest.er1 >conftest.err
23033   rm -f conftest.er1
23034   cat conftest.err >&5
23035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23036   (exit $ac_status); } &&
23037          { ac_try='test -z "$ac_c_werror_flag"
23038                          || test ! -s conftest.err'
23039   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23040   (eval $ac_try) 2>&5
23041   ac_status=$?
23042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23043   (exit $ac_status); }; } &&
23044          { ac_try='test -s conftest$ac_exeext'
23045   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23046   (eval $ac_try) 2>&5
23047   ac_status=$?
23048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23049   (exit $ac_status); }; }; then
23050   ol_cv_pthread_threads=yes
23051 else
23052   echo "$as_me: failed program was:" >&5
23053 sed 's/^/| /' conftest.$ac_ext >&5
23054
23055 ol_cv_pthread_threads=no
23056 fi
23057 rm -f conftest.err conftest.$ac_objext \
23058       conftest$ac_exeext conftest.$ac_ext
23059 else
23060   cat >conftest.$ac_ext <<_ACEOF
23061 /* confdefs.h.  */
23062 _ACEOF
23063 cat confdefs.h >>conftest.$ac_ext
23064 cat >>conftest.$ac_ext <<_ACEOF
23065 /* end confdefs.h.  */
23066
23067 /* pthread test headers */
23068 #include <pthread.h>
23069 #if HAVE_PTHREADS < 7
23070 #include <errno.h>
23071 #endif
23072 #ifndef NULL
23073 #define NULL (void*)0
23074 #endif
23075
23076 static void *task(p)
23077         void *p;
23078 {
23079         return (void *) (p == NULL);
23080 }
23081
23082
23083 int main(argc, argv)
23084         int argc;
23085         char **argv;
23086 {
23087
23088         /* pthread test function */
23089 #ifndef PTHREAD_CREATE_DETACHED
23090 #define PTHREAD_CREATE_DETACHED 1
23091 #endif
23092         pthread_t t;
23093         int status;
23094         int detach = PTHREAD_CREATE_DETACHED;
23095
23096 #if HAVE_PTHREADS > 4
23097         /* Final pthreads */
23098         pthread_attr_t attr;
23099
23100         status = pthread_attr_init(&attr);
23101         if( status ) return status;
23102
23103 #if HAVE_PTHREADS < 7
23104         status = pthread_attr_setdetachstate(&attr, &detach);
23105         if( status < 0 ) status = errno;
23106 #else
23107         status = pthread_attr_setdetachstate(&attr, detach);
23108 #endif
23109         if( status ) return status;
23110         status = pthread_create( &t, &attr, task, NULL );
23111 #if HAVE_PTHREADS < 7
23112         if( status < 0 ) status = errno;
23113 #endif
23114         if( status ) return status;
23115 #else
23116         /* Draft 4 pthreads */
23117         status = pthread_create( &t, pthread_attr_default, task, NULL );
23118         if( status ) return errno;
23119
23120         /* give thread a chance to complete */
23121         /* it should remain joinable and hence detachable */
23122         sleep( 1 );
23123
23124         status = pthread_detach( &t );
23125         if( status ) return errno;
23126 #endif
23127
23128 #ifdef HAVE_LINUX_THREADS
23129         pthread_kill_other_threads_np();
23130 #endif
23131
23132         return 0;
23133
23134 }
23135
23136 _ACEOF
23137 rm -f conftest$ac_exeext
23138 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23139   (eval $ac_link) 2>&5
23140   ac_status=$?
23141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23142   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23144   (eval $ac_try) 2>&5
23145   ac_status=$?
23146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23147   (exit $ac_status); }; }; then
23148   ol_cv_pthread_threads=yes
23149 else
23150   echo "$as_me: program exited with status $ac_status" >&5
23151 echo "$as_me: failed program was:" >&5
23152 sed 's/^/| /' conftest.$ac_ext >&5
23153
23154 ( exit $ac_status )
23155 ol_cv_pthread_threads=no
23156 fi
23157 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23158 fi
23159
23160                 # restore the LIBS
23161                 LIBS="$ol_LIBS"
23162
23163 fi
23164 echo "$as_me:$LINENO: result: $ol_cv_pthread_threads" >&5
23165 echo "${ECHO_T}$ol_cv_pthread_threads" >&6
23166
23167         if test $ol_cv_pthread_threads = yes ; then
23168                 ol_link_pthreads="-threads"
23169                 ol_link_threads=posix
23170         fi
23171 fi
23172
23173
23174                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
23175 if test "$ol_link_threads" = no ; then
23176         # try -lpthreads -lmach -lexc -lc_r
23177         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
23178 echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc -lc_r... $ECHO_C" >&6
23179 if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then
23180   echo $ECHO_N "(cached) $ECHO_C" >&6
23181 else
23182
23183                 # save the flags
23184                 ol_LIBS="$LIBS"
23185                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
23186
23187                 if test "$cross_compiling" = yes; then
23188   cat >conftest.$ac_ext <<_ACEOF
23189 /* confdefs.h.  */
23190 _ACEOF
23191 cat confdefs.h >>conftest.$ac_ext
23192 cat >>conftest.$ac_ext <<_ACEOF
23193 /* end confdefs.h.  */
23194
23195 /* pthread test headers */
23196 #include <pthread.h>
23197 #if HAVE_PTHREADS < 7
23198 #include <errno.h>
23199 #endif
23200 #ifndef NULL
23201 #define NULL (void*)0
23202 #endif
23203
23204 static void *task(p)
23205         void *p;
23206 {
23207         return (void *) (p == NULL);
23208 }
23209
23210 int
23211 main ()
23212 {
23213
23214         /* pthread test function */
23215 #ifndef PTHREAD_CREATE_DETACHED
23216 #define PTHREAD_CREATE_DETACHED 1
23217 #endif
23218         pthread_t t;
23219         int status;
23220         int detach = PTHREAD_CREATE_DETACHED;
23221
23222 #if HAVE_PTHREADS > 4
23223         /* Final pthreads */
23224         pthread_attr_t attr;
23225
23226         status = pthread_attr_init(&attr);
23227         if( status ) return status;
23228
23229 #if HAVE_PTHREADS < 7
23230         status = pthread_attr_setdetachstate(&attr, &detach);
23231         if( status < 0 ) status = errno;
23232 #else
23233         status = pthread_attr_setdetachstate(&attr, detach);
23234 #endif
23235         if( status ) return status;
23236         status = pthread_create( &t, &attr, task, NULL );
23237 #if HAVE_PTHREADS < 7
23238         if( status < 0 ) status = errno;
23239 #endif
23240         if( status ) return status;
23241 #else
23242         /* Draft 4 pthreads */
23243         status = pthread_create( &t, pthread_attr_default, task, NULL );
23244         if( status ) return errno;
23245
23246         /* give thread a chance to complete */
23247         /* it should remain joinable and hence detachable */
23248         sleep( 1 );
23249
23250         status = pthread_detach( &t );
23251         if( status ) return errno;
23252 #endif
23253
23254 #ifdef HAVE_LINUX_THREADS
23255         pthread_kill_other_threads_np();
23256 #endif
23257
23258         return 0;
23259
23260   ;
23261   return 0;
23262 }
23263 _ACEOF
23264 rm -f conftest.$ac_objext conftest$ac_exeext
23265 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23266   (eval $ac_link) 2>conftest.er1
23267   ac_status=$?
23268   grep -v '^ *+' conftest.er1 >conftest.err
23269   rm -f conftest.er1
23270   cat conftest.err >&5
23271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23272   (exit $ac_status); } &&
23273          { ac_try='test -z "$ac_c_werror_flag"
23274                          || test ! -s conftest.err'
23275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23276   (eval $ac_try) 2>&5
23277   ac_status=$?
23278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23279   (exit $ac_status); }; } &&
23280          { ac_try='test -s conftest$ac_exeext'
23281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23282   (eval $ac_try) 2>&5
23283   ac_status=$?
23284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23285   (exit $ac_status); }; }; then
23286   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
23287 else
23288   echo "$as_me: failed program was:" >&5
23289 sed 's/^/| /' conftest.$ac_ext >&5
23290
23291 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
23292 fi
23293 rm -f conftest.err conftest.$ac_objext \
23294       conftest$ac_exeext conftest.$ac_ext
23295 else
23296   cat >conftest.$ac_ext <<_ACEOF
23297 /* confdefs.h.  */
23298 _ACEOF
23299 cat confdefs.h >>conftest.$ac_ext
23300 cat >>conftest.$ac_ext <<_ACEOF
23301 /* end confdefs.h.  */
23302
23303 /* pthread test headers */
23304 #include <pthread.h>
23305 #if HAVE_PTHREADS < 7
23306 #include <errno.h>
23307 #endif
23308 #ifndef NULL
23309 #define NULL (void*)0
23310 #endif
23311
23312 static void *task(p)
23313         void *p;
23314 {
23315         return (void *) (p == NULL);
23316 }
23317
23318
23319 int main(argc, argv)
23320         int argc;
23321         char **argv;
23322 {
23323
23324         /* pthread test function */
23325 #ifndef PTHREAD_CREATE_DETACHED
23326 #define PTHREAD_CREATE_DETACHED 1
23327 #endif
23328         pthread_t t;
23329         int status;
23330         int detach = PTHREAD_CREATE_DETACHED;
23331
23332 #if HAVE_PTHREADS > 4
23333         /* Final pthreads */
23334         pthread_attr_t attr;
23335
23336         status = pthread_attr_init(&attr);
23337         if( status ) return status;
23338
23339 #if HAVE_PTHREADS < 7
23340         status = pthread_attr_setdetachstate(&attr, &detach);
23341         if( status < 0 ) status = errno;
23342 #else
23343         status = pthread_attr_setdetachstate(&attr, detach);
23344 #endif
23345         if( status ) return status;
23346         status = pthread_create( &t, &attr, task, NULL );
23347 #if HAVE_PTHREADS < 7
23348         if( status < 0 ) status = errno;
23349 #endif
23350         if( status ) return status;
23351 #else
23352         /* Draft 4 pthreads */
23353         status = pthread_create( &t, pthread_attr_default, task, NULL );
23354         if( status ) return errno;
23355
23356         /* give thread a chance to complete */
23357         /* it should remain joinable and hence detachable */
23358         sleep( 1 );
23359
23360         status = pthread_detach( &t );
23361         if( status ) return errno;
23362 #endif
23363
23364 #ifdef HAVE_LINUX_THREADS
23365         pthread_kill_other_threads_np();
23366 #endif
23367
23368         return 0;
23369
23370 }
23371
23372 _ACEOF
23373 rm -f conftest$ac_exeext
23374 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23375   (eval $ac_link) 2>&5
23376   ac_status=$?
23377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23378   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23379   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23380   (eval $ac_try) 2>&5
23381   ac_status=$?
23382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23383   (exit $ac_status); }; }; then
23384   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
23385 else
23386   echo "$as_me: program exited with status $ac_status" >&5
23387 echo "$as_me: failed program was:" >&5
23388 sed 's/^/| /' conftest.$ac_ext >&5
23389
23390 ( exit $ac_status )
23391 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
23392 fi
23393 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23394 fi
23395
23396                 # restore the LIBS
23397                 LIBS="$ol_LIBS"
23398
23399 fi
23400 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
23401 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6
23402
23403         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
23404                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
23405                 ol_link_threads=posix
23406         fi
23407 fi
23408
23409                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
23410 if test "$ol_link_threads" = no ; then
23411         # try -lpthreads -lmach -lexc
23412         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc" >&5
23413 echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc... $ECHO_C" >&6
23414 if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then
23415   echo $ECHO_N "(cached) $ECHO_C" >&6
23416 else
23417
23418                 # save the flags
23419                 ol_LIBS="$LIBS"
23420                 LIBS="-lpthreads -lmach -lexc $LIBS"
23421
23422                 if test "$cross_compiling" = yes; then
23423   cat >conftest.$ac_ext <<_ACEOF
23424 /* confdefs.h.  */
23425 _ACEOF
23426 cat confdefs.h >>conftest.$ac_ext
23427 cat >>conftest.$ac_ext <<_ACEOF
23428 /* end confdefs.h.  */
23429
23430 /* pthread test headers */
23431 #include <pthread.h>
23432 #if HAVE_PTHREADS < 7
23433 #include <errno.h>
23434 #endif
23435 #ifndef NULL
23436 #define NULL (void*)0
23437 #endif
23438
23439 static void *task(p)
23440         void *p;
23441 {
23442         return (void *) (p == NULL);
23443 }
23444
23445 int
23446 main ()
23447 {
23448
23449         /* pthread test function */
23450 #ifndef PTHREAD_CREATE_DETACHED
23451 #define PTHREAD_CREATE_DETACHED 1
23452 #endif
23453         pthread_t t;
23454         int status;
23455         int detach = PTHREAD_CREATE_DETACHED;
23456
23457 #if HAVE_PTHREADS > 4
23458         /* Final pthreads */
23459         pthread_attr_t attr;
23460
23461         status = pthread_attr_init(&attr);
23462         if( status ) return status;
23463
23464 #if HAVE_PTHREADS < 7
23465         status = pthread_attr_setdetachstate(&attr, &detach);
23466         if( status < 0 ) status = errno;
23467 #else
23468         status = pthread_attr_setdetachstate(&attr, detach);
23469 #endif
23470         if( status ) return status;
23471         status = pthread_create( &t, &attr, task, NULL );
23472 #if HAVE_PTHREADS < 7
23473         if( status < 0 ) status = errno;
23474 #endif
23475         if( status ) return status;
23476 #else
23477         /* Draft 4 pthreads */
23478         status = pthread_create( &t, pthread_attr_default, task, NULL );
23479         if( status ) return errno;
23480
23481         /* give thread a chance to complete */
23482         /* it should remain joinable and hence detachable */
23483         sleep( 1 );
23484
23485         status = pthread_detach( &t );
23486         if( status ) return errno;
23487 #endif
23488
23489 #ifdef HAVE_LINUX_THREADS
23490         pthread_kill_other_threads_np();
23491 #endif
23492
23493         return 0;
23494
23495   ;
23496   return 0;
23497 }
23498 _ACEOF
23499 rm -f conftest.$ac_objext conftest$ac_exeext
23500 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23501   (eval $ac_link) 2>conftest.er1
23502   ac_status=$?
23503   grep -v '^ *+' conftest.er1 >conftest.err
23504   rm -f conftest.er1
23505   cat conftest.err >&5
23506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23507   (exit $ac_status); } &&
23508          { ac_try='test -z "$ac_c_werror_flag"
23509                          || test ! -s conftest.err'
23510   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23511   (eval $ac_try) 2>&5
23512   ac_status=$?
23513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23514   (exit $ac_status); }; } &&
23515          { ac_try='test -s conftest$ac_exeext'
23516   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23517   (eval $ac_try) 2>&5
23518   ac_status=$?
23519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23520   (exit $ac_status); }; }; then
23521   ol_cv_pthread_lpthreads_lmach_lexc=yes
23522 else
23523   echo "$as_me: failed program was:" >&5
23524 sed 's/^/| /' conftest.$ac_ext >&5
23525
23526 ol_cv_pthread_lpthreads_lmach_lexc=no
23527 fi
23528 rm -f conftest.err conftest.$ac_objext \
23529       conftest$ac_exeext conftest.$ac_ext
23530 else
23531   cat >conftest.$ac_ext <<_ACEOF
23532 /* confdefs.h.  */
23533 _ACEOF
23534 cat confdefs.h >>conftest.$ac_ext
23535 cat >>conftest.$ac_ext <<_ACEOF
23536 /* end confdefs.h.  */
23537
23538 /* pthread test headers */
23539 #include <pthread.h>
23540 #if HAVE_PTHREADS < 7
23541 #include <errno.h>
23542 #endif
23543 #ifndef NULL
23544 #define NULL (void*)0
23545 #endif
23546
23547 static void *task(p)
23548         void *p;
23549 {
23550         return (void *) (p == NULL);
23551 }
23552
23553
23554 int main(argc, argv)
23555         int argc;
23556         char **argv;
23557 {
23558
23559         /* pthread test function */
23560 #ifndef PTHREAD_CREATE_DETACHED
23561 #define PTHREAD_CREATE_DETACHED 1
23562 #endif
23563         pthread_t t;
23564         int status;
23565         int detach = PTHREAD_CREATE_DETACHED;
23566
23567 #if HAVE_PTHREADS > 4
23568         /* Final pthreads */
23569         pthread_attr_t attr;
23570
23571         status = pthread_attr_init(&attr);
23572         if( status ) return status;
23573
23574 #if HAVE_PTHREADS < 7
23575         status = pthread_attr_setdetachstate(&attr, &detach);
23576         if( status < 0 ) status = errno;
23577 #else
23578         status = pthread_attr_setdetachstate(&attr, detach);
23579 #endif
23580         if( status ) return status;
23581         status = pthread_create( &t, &attr, task, NULL );
23582 #if HAVE_PTHREADS < 7
23583         if( status < 0 ) status = errno;
23584 #endif
23585         if( status ) return status;
23586 #else
23587         /* Draft 4 pthreads */
23588         status = pthread_create( &t, pthread_attr_default, task, NULL );
23589         if( status ) return errno;
23590
23591         /* give thread a chance to complete */
23592         /* it should remain joinable and hence detachable */
23593         sleep( 1 );
23594
23595         status = pthread_detach( &t );
23596         if( status ) return errno;
23597 #endif
23598
23599 #ifdef HAVE_LINUX_THREADS
23600         pthread_kill_other_threads_np();
23601 #endif
23602
23603         return 0;
23604
23605 }
23606
23607 _ACEOF
23608 rm -f conftest$ac_exeext
23609 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23610   (eval $ac_link) 2>&5
23611   ac_status=$?
23612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23613   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23614   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23615   (eval $ac_try) 2>&5
23616   ac_status=$?
23617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23618   (exit $ac_status); }; }; then
23619   ol_cv_pthread_lpthreads_lmach_lexc=yes
23620 else
23621   echo "$as_me: program exited with status $ac_status" >&5
23622 echo "$as_me: failed program was:" >&5
23623 sed 's/^/| /' conftest.$ac_ext >&5
23624
23625 ( exit $ac_status )
23626 ol_cv_pthread_lpthreads_lmach_lexc=no
23627 fi
23628 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23629 fi
23630
23631                 # restore the LIBS
23632                 LIBS="$ol_LIBS"
23633
23634 fi
23635 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
23636 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc" >&6
23637
23638         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
23639                 ol_link_pthreads="-lpthreads -lmach -lexc"
23640                 ol_link_threads=posix
23641         fi
23642 fi
23643
23644                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
23645 if test "$ol_link_threads" = no ; then
23646         # try -lpthreads -lexc
23647         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lexc" >&5
23648 echo $ECHO_N "checking for pthread link with -lpthreads -lexc... $ECHO_C" >&6
23649 if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then
23650   echo $ECHO_N "(cached) $ECHO_C" >&6
23651 else
23652
23653                 # save the flags
23654                 ol_LIBS="$LIBS"
23655                 LIBS="-lpthreads -lexc $LIBS"
23656
23657                 if test "$cross_compiling" = yes; then
23658   cat >conftest.$ac_ext <<_ACEOF
23659 /* confdefs.h.  */
23660 _ACEOF
23661 cat confdefs.h >>conftest.$ac_ext
23662 cat >>conftest.$ac_ext <<_ACEOF
23663 /* end confdefs.h.  */
23664
23665 /* pthread test headers */
23666 #include <pthread.h>
23667 #if HAVE_PTHREADS < 7
23668 #include <errno.h>
23669 #endif
23670 #ifndef NULL
23671 #define NULL (void*)0
23672 #endif
23673
23674 static void *task(p)
23675         void *p;
23676 {
23677         return (void *) (p == NULL);
23678 }
23679
23680 int
23681 main ()
23682 {
23683
23684         /* pthread test function */
23685 #ifndef PTHREAD_CREATE_DETACHED
23686 #define PTHREAD_CREATE_DETACHED 1
23687 #endif
23688         pthread_t t;
23689         int status;
23690         int detach = PTHREAD_CREATE_DETACHED;
23691
23692 #if HAVE_PTHREADS > 4
23693         /* Final pthreads */
23694         pthread_attr_t attr;
23695
23696         status = pthread_attr_init(&attr);
23697         if( status ) return status;
23698
23699 #if HAVE_PTHREADS < 7
23700         status = pthread_attr_setdetachstate(&attr, &detach);
23701         if( status < 0 ) status = errno;
23702 #else
23703         status = pthread_attr_setdetachstate(&attr, detach);
23704 #endif
23705         if( status ) return status;
23706         status = pthread_create( &t, &attr, task, NULL );
23707 #if HAVE_PTHREADS < 7
23708         if( status < 0 ) status = errno;
23709 #endif
23710         if( status ) return status;
23711 #else
23712         /* Draft 4 pthreads */
23713         status = pthread_create( &t, pthread_attr_default, task, NULL );
23714         if( status ) return errno;
23715
23716         /* give thread a chance to complete */
23717         /* it should remain joinable and hence detachable */
23718         sleep( 1 );
23719
23720         status = pthread_detach( &t );
23721         if( status ) return errno;
23722 #endif
23723
23724 #ifdef HAVE_LINUX_THREADS
23725         pthread_kill_other_threads_np();
23726 #endif
23727
23728         return 0;
23729
23730   ;
23731   return 0;
23732 }
23733 _ACEOF
23734 rm -f conftest.$ac_objext conftest$ac_exeext
23735 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23736   (eval $ac_link) 2>conftest.er1
23737   ac_status=$?
23738   grep -v '^ *+' conftest.er1 >conftest.err
23739   rm -f conftest.er1
23740   cat conftest.err >&5
23741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23742   (exit $ac_status); } &&
23743          { ac_try='test -z "$ac_c_werror_flag"
23744                          || test ! -s conftest.err'
23745   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23746   (eval $ac_try) 2>&5
23747   ac_status=$?
23748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23749   (exit $ac_status); }; } &&
23750          { ac_try='test -s conftest$ac_exeext'
23751   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23752   (eval $ac_try) 2>&5
23753   ac_status=$?
23754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23755   (exit $ac_status); }; }; then
23756   ol_cv_pthread_lpthreads_lexc=yes
23757 else
23758   echo "$as_me: failed program was:" >&5
23759 sed 's/^/| /' conftest.$ac_ext >&5
23760
23761 ol_cv_pthread_lpthreads_lexc=no
23762 fi
23763 rm -f conftest.err conftest.$ac_objext \
23764       conftest$ac_exeext conftest.$ac_ext
23765 else
23766   cat >conftest.$ac_ext <<_ACEOF
23767 /* confdefs.h.  */
23768 _ACEOF
23769 cat confdefs.h >>conftest.$ac_ext
23770 cat >>conftest.$ac_ext <<_ACEOF
23771 /* end confdefs.h.  */
23772
23773 /* pthread test headers */
23774 #include <pthread.h>
23775 #if HAVE_PTHREADS < 7
23776 #include <errno.h>
23777 #endif
23778 #ifndef NULL
23779 #define NULL (void*)0
23780 #endif
23781
23782 static void *task(p)
23783         void *p;
23784 {
23785         return (void *) (p == NULL);
23786 }
23787
23788
23789 int main(argc, argv)
23790         int argc;
23791         char **argv;
23792 {
23793
23794         /* pthread test function */
23795 #ifndef PTHREAD_CREATE_DETACHED
23796 #define PTHREAD_CREATE_DETACHED 1
23797 #endif
23798         pthread_t t;
23799         int status;
23800         int detach = PTHREAD_CREATE_DETACHED;
23801
23802 #if HAVE_PTHREADS > 4
23803         /* Final pthreads */
23804         pthread_attr_t attr;
23805
23806         status = pthread_attr_init(&attr);
23807         if( status ) return status;
23808
23809 #if HAVE_PTHREADS < 7
23810         status = pthread_attr_setdetachstate(&attr, &detach);
23811         if( status < 0 ) status = errno;
23812 #else
23813         status = pthread_attr_setdetachstate(&attr, detach);
23814 #endif
23815         if( status ) return status;
23816         status = pthread_create( &t, &attr, task, NULL );
23817 #if HAVE_PTHREADS < 7
23818         if( status < 0 ) status = errno;
23819 #endif
23820         if( status ) return status;
23821 #else
23822         /* Draft 4 pthreads */
23823         status = pthread_create( &t, pthread_attr_default, task, NULL );
23824         if( status ) return errno;
23825
23826         /* give thread a chance to complete */
23827         /* it should remain joinable and hence detachable */
23828         sleep( 1 );
23829
23830         status = pthread_detach( &t );
23831         if( status ) return errno;
23832 #endif
23833
23834 #ifdef HAVE_LINUX_THREADS
23835         pthread_kill_other_threads_np();
23836 #endif
23837
23838         return 0;
23839
23840 }
23841
23842 _ACEOF
23843 rm -f conftest$ac_exeext
23844 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23845   (eval $ac_link) 2>&5
23846   ac_status=$?
23847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23848   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23849   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23850   (eval $ac_try) 2>&5
23851   ac_status=$?
23852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23853   (exit $ac_status); }; }; then
23854   ol_cv_pthread_lpthreads_lexc=yes
23855 else
23856   echo "$as_me: program exited with status $ac_status" >&5
23857 echo "$as_me: failed program was:" >&5
23858 sed 's/^/| /' conftest.$ac_ext >&5
23859
23860 ( exit $ac_status )
23861 ol_cv_pthread_lpthreads_lexc=no
23862 fi
23863 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23864 fi
23865
23866                 # restore the LIBS
23867                 LIBS="$ol_LIBS"
23868
23869 fi
23870 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lexc" >&5
23871 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lexc" >&6
23872
23873         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
23874                 ol_link_pthreads="-lpthreads -lexc"
23875                 ol_link_threads=posix
23876         fi
23877 fi
23878
23879
23880                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
23881 if test "$ol_link_threads" = no ; then
23882         # try -lpthreads
23883         echo "$as_me:$LINENO: checking for pthread link with -lpthreads" >&5
23884 echo $ECHO_N "checking for pthread link with -lpthreads... $ECHO_C" >&6
23885 if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then
23886   echo $ECHO_N "(cached) $ECHO_C" >&6
23887 else
23888
23889                 # save the flags
23890                 ol_LIBS="$LIBS"
23891                 LIBS="-lpthreads $LIBS"
23892
23893                 if test "$cross_compiling" = yes; then
23894   cat >conftest.$ac_ext <<_ACEOF
23895 /* confdefs.h.  */
23896 _ACEOF
23897 cat confdefs.h >>conftest.$ac_ext
23898 cat >>conftest.$ac_ext <<_ACEOF
23899 /* end confdefs.h.  */
23900
23901 /* pthread test headers */
23902 #include <pthread.h>
23903 #if HAVE_PTHREADS < 7
23904 #include <errno.h>
23905 #endif
23906 #ifndef NULL
23907 #define NULL (void*)0
23908 #endif
23909
23910 static void *task(p)
23911         void *p;
23912 {
23913         return (void *) (p == NULL);
23914 }
23915
23916 int
23917 main ()
23918 {
23919
23920         /* pthread test function */
23921 #ifndef PTHREAD_CREATE_DETACHED
23922 #define PTHREAD_CREATE_DETACHED 1
23923 #endif
23924         pthread_t t;
23925         int status;
23926         int detach = PTHREAD_CREATE_DETACHED;
23927
23928 #if HAVE_PTHREADS > 4
23929         /* Final pthreads */
23930         pthread_attr_t attr;
23931
23932         status = pthread_attr_init(&attr);
23933         if( status ) return status;
23934
23935 #if HAVE_PTHREADS < 7
23936         status = pthread_attr_setdetachstate(&attr, &detach);
23937         if( status < 0 ) status = errno;
23938 #else
23939         status = pthread_attr_setdetachstate(&attr, detach);
23940 #endif
23941         if( status ) return status;
23942         status = pthread_create( &t, &attr, task, NULL );
23943 #if HAVE_PTHREADS < 7
23944         if( status < 0 ) status = errno;
23945 #endif
23946         if( status ) return status;
23947 #else
23948         /* Draft 4 pthreads */
23949         status = pthread_create( &t, pthread_attr_default, task, NULL );
23950         if( status ) return errno;
23951
23952         /* give thread a chance to complete */
23953         /* it should remain joinable and hence detachable */
23954         sleep( 1 );
23955
23956         status = pthread_detach( &t );
23957         if( status ) return errno;
23958 #endif
23959
23960 #ifdef HAVE_LINUX_THREADS
23961         pthread_kill_other_threads_np();
23962 #endif
23963
23964         return 0;
23965
23966   ;
23967   return 0;
23968 }
23969 _ACEOF
23970 rm -f conftest.$ac_objext conftest$ac_exeext
23971 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23972   (eval $ac_link) 2>conftest.er1
23973   ac_status=$?
23974   grep -v '^ *+' conftest.er1 >conftest.err
23975   rm -f conftest.er1
23976   cat conftest.err >&5
23977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23978   (exit $ac_status); } &&
23979          { ac_try='test -z "$ac_c_werror_flag"
23980                          || test ! -s conftest.err'
23981   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23982   (eval $ac_try) 2>&5
23983   ac_status=$?
23984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23985   (exit $ac_status); }; } &&
23986          { ac_try='test -s conftest$ac_exeext'
23987   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23988   (eval $ac_try) 2>&5
23989   ac_status=$?
23990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23991   (exit $ac_status); }; }; then
23992   ol_cv_pthread_lib_lpthreads=yes
23993 else
23994   echo "$as_me: failed program was:" >&5
23995 sed 's/^/| /' conftest.$ac_ext >&5
23996
23997 ol_cv_pthread_lib_lpthreads=no
23998 fi
23999 rm -f conftest.err conftest.$ac_objext \
24000       conftest$ac_exeext conftest.$ac_ext
24001 else
24002   cat >conftest.$ac_ext <<_ACEOF
24003 /* confdefs.h.  */
24004 _ACEOF
24005 cat confdefs.h >>conftest.$ac_ext
24006 cat >>conftest.$ac_ext <<_ACEOF
24007 /* end confdefs.h.  */
24008
24009 /* pthread test headers */
24010 #include <pthread.h>
24011 #if HAVE_PTHREADS < 7
24012 #include <errno.h>
24013 #endif
24014 #ifndef NULL
24015 #define NULL (void*)0
24016 #endif
24017
24018 static void *task(p)
24019         void *p;
24020 {
24021         return (void *) (p == NULL);
24022 }
24023
24024
24025 int main(argc, argv)
24026         int argc;
24027         char **argv;
24028 {
24029
24030         /* pthread test function */
24031 #ifndef PTHREAD_CREATE_DETACHED
24032 #define PTHREAD_CREATE_DETACHED 1
24033 #endif
24034         pthread_t t;
24035         int status;
24036         int detach = PTHREAD_CREATE_DETACHED;
24037
24038 #if HAVE_PTHREADS > 4
24039         /* Final pthreads */
24040         pthread_attr_t attr;
24041
24042         status = pthread_attr_init(&attr);
24043         if( status ) return status;
24044
24045 #if HAVE_PTHREADS < 7
24046         status = pthread_attr_setdetachstate(&attr, &detach);
24047         if( status < 0 ) status = errno;
24048 #else
24049         status = pthread_attr_setdetachstate(&attr, detach);
24050 #endif
24051         if( status ) return status;
24052         status = pthread_create( &t, &attr, task, NULL );
24053 #if HAVE_PTHREADS < 7
24054         if( status < 0 ) status = errno;
24055 #endif
24056         if( status ) return status;
24057 #else
24058         /* Draft 4 pthreads */
24059         status = pthread_create( &t, pthread_attr_default, task, NULL );
24060         if( status ) return errno;
24061
24062         /* give thread a chance to complete */
24063         /* it should remain joinable and hence detachable */
24064         sleep( 1 );
24065
24066         status = pthread_detach( &t );
24067         if( status ) return errno;
24068 #endif
24069
24070 #ifdef HAVE_LINUX_THREADS
24071         pthread_kill_other_threads_np();
24072 #endif
24073
24074         return 0;
24075
24076 }
24077
24078 _ACEOF
24079 rm -f conftest$ac_exeext
24080 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24081   (eval $ac_link) 2>&5
24082   ac_status=$?
24083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24084   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24086   (eval $ac_try) 2>&5
24087   ac_status=$?
24088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24089   (exit $ac_status); }; }; then
24090   ol_cv_pthread_lib_lpthreads=yes
24091 else
24092   echo "$as_me: program exited with status $ac_status" >&5
24093 echo "$as_me: failed program was:" >&5
24094 sed 's/^/| /' conftest.$ac_ext >&5
24095
24096 ( exit $ac_status )
24097 ol_cv_pthread_lib_lpthreads=no
24098 fi
24099 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24100 fi
24101
24102                 # restore the LIBS
24103                 LIBS="$ol_LIBS"
24104
24105 fi
24106 echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthreads" >&5
24107 echo "${ECHO_T}$ol_cv_pthread_lib_lpthreads" >&6
24108
24109         if test $ol_cv_pthread_lib_lpthreads = yes ; then
24110                 ol_link_pthreads="-lpthreads"
24111                 ol_link_threads=posix
24112         fi
24113 fi
24114
24115
24116                 if test $ol_link_threads != no ; then
24117                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
24118
24119                                                 save_CPPFLAGS="$CPPFLAGS"
24120                         save_LIBS="$LIBS"
24121                         LIBS="$LTHREAD_LIBS $LIBS"
24122
24123
24124
24125
24126 for ac_func in sched_yield pthread_yield thr_yield
24127 do
24128 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24129 echo "$as_me:$LINENO: checking for $ac_func" >&5
24130 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24131 if eval "test \"\${$as_ac_var+set}\" = set"; then
24132   echo $ECHO_N "(cached) $ECHO_C" >&6
24133 else
24134   cat >conftest.$ac_ext <<_ACEOF
24135 /* confdefs.h.  */
24136 _ACEOF
24137 cat confdefs.h >>conftest.$ac_ext
24138 cat >>conftest.$ac_ext <<_ACEOF
24139 /* end confdefs.h.  */
24140 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24141    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24142 #define $ac_func innocuous_$ac_func
24143
24144 /* System header to define __stub macros and hopefully few prototypes,
24145     which can conflict with char $ac_func (); below.
24146     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24147     <limits.h> exists even on freestanding compilers.  */
24148
24149 #ifdef __STDC__
24150 # include <limits.h>
24151 #else
24152 # include <assert.h>
24153 #endif
24154
24155 #undef $ac_func
24156
24157 /* Override any gcc2 internal prototype to avoid an error.  */
24158 #ifdef __cplusplus
24159 extern "C"
24160 {
24161 #endif
24162 /* We use char because int might match the return type of a gcc2
24163    builtin and then its argument prototype would still apply.  */
24164 char $ac_func ();
24165 /* The GNU C library defines this for functions which it implements
24166     to always fail with ENOSYS.  Some functions are actually named
24167     something starting with __ and the normal name is an alias.  */
24168 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24169 choke me
24170 #else
24171 char (*f) () = $ac_func;
24172 #endif
24173 #ifdef __cplusplus
24174 }
24175 #endif
24176
24177 int
24178 main ()
24179 {
24180 return f != $ac_func;
24181   ;
24182   return 0;
24183 }
24184 _ACEOF
24185 rm -f conftest.$ac_objext conftest$ac_exeext
24186 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24187   (eval $ac_link) 2>conftest.er1
24188   ac_status=$?
24189   grep -v '^ *+' conftest.er1 >conftest.err
24190   rm -f conftest.er1
24191   cat conftest.err >&5
24192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24193   (exit $ac_status); } &&
24194          { ac_try='test -z "$ac_c_werror_flag"
24195                          || test ! -s conftest.err'
24196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24197   (eval $ac_try) 2>&5
24198   ac_status=$?
24199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24200   (exit $ac_status); }; } &&
24201          { ac_try='test -s conftest$ac_exeext'
24202   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24203   (eval $ac_try) 2>&5
24204   ac_status=$?
24205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24206   (exit $ac_status); }; }; then
24207   eval "$as_ac_var=yes"
24208 else
24209   echo "$as_me: failed program was:" >&5
24210 sed 's/^/| /' conftest.$ac_ext >&5
24211
24212 eval "$as_ac_var=no"
24213 fi
24214 rm -f conftest.err conftest.$ac_objext \
24215       conftest$ac_exeext conftest.$ac_ext
24216 fi
24217 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24218 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24219 if test `eval echo '${'$as_ac_var'}'` = yes; then
24220   cat >>confdefs.h <<_ACEOF
24221 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24222 _ACEOF
24223
24224 fi
24225 done
24226
24227
24228                         if test $ac_cv_func_sched_yield = no &&
24229                            test $ac_cv_func_pthread_yield = no &&
24230                            test $ac_cv_func_thr_yield = no ; then
24231                                                                 echo "$as_me:$LINENO: checking for sched_yield in -lrt" >&5
24232 echo $ECHO_N "checking for sched_yield in -lrt... $ECHO_C" >&6
24233 if test "${ac_cv_lib_rt_sched_yield+set}" = set; then
24234   echo $ECHO_N "(cached) $ECHO_C" >&6
24235 else
24236   ac_check_lib_save_LIBS=$LIBS
24237 LIBS="-lrt  $LIBS"
24238 cat >conftest.$ac_ext <<_ACEOF
24239 /* confdefs.h.  */
24240 _ACEOF
24241 cat confdefs.h >>conftest.$ac_ext
24242 cat >>conftest.$ac_ext <<_ACEOF
24243 /* end confdefs.h.  */
24244
24245 /* Override any gcc2 internal prototype to avoid an error.  */
24246 #ifdef __cplusplus
24247 extern "C"
24248 #endif
24249 /* We use char because int might match the return type of a gcc2
24250    builtin and then its argument prototype would still apply.  */
24251 char sched_yield ();
24252 int
24253 main ()
24254 {
24255 sched_yield ();
24256   ;
24257   return 0;
24258 }
24259 _ACEOF
24260 rm -f conftest.$ac_objext conftest$ac_exeext
24261 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24262   (eval $ac_link) 2>conftest.er1
24263   ac_status=$?
24264   grep -v '^ *+' conftest.er1 >conftest.err
24265   rm -f conftest.er1
24266   cat conftest.err >&5
24267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24268   (exit $ac_status); } &&
24269          { ac_try='test -z "$ac_c_werror_flag"
24270                          || test ! -s conftest.err'
24271   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24272   (eval $ac_try) 2>&5
24273   ac_status=$?
24274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24275   (exit $ac_status); }; } &&
24276          { ac_try='test -s conftest$ac_exeext'
24277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24278   (eval $ac_try) 2>&5
24279   ac_status=$?
24280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24281   (exit $ac_status); }; }; then
24282   ac_cv_lib_rt_sched_yield=yes
24283 else
24284   echo "$as_me: failed program was:" >&5
24285 sed 's/^/| /' conftest.$ac_ext >&5
24286
24287 ac_cv_lib_rt_sched_yield=no
24288 fi
24289 rm -f conftest.err conftest.$ac_objext \
24290       conftest$ac_exeext conftest.$ac_ext
24291 LIBS=$ac_check_lib_save_LIBS
24292 fi
24293 echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_yield" >&5
24294 echo "${ECHO_T}$ac_cv_lib_rt_sched_yield" >&6
24295 if test $ac_cv_lib_rt_sched_yield = yes; then
24296   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
24297
24298 cat >>confdefs.h <<\_ACEOF
24299 #define HAVE_SCHED_YIELD 1
24300 _ACEOF
24301
24302                                         ac_cv_func_sched_yield=yes
24303 else
24304   ac_cv_func_sched_yield=no
24305 fi
24306
24307                         fi
24308                         if test $ac_cv_func_sched_yield = no &&
24309                            test $ac_cv_func_pthread_yield = no &&
24310                            test "$ac_cv_func_thr_yield" = no ; then
24311                                 { echo "$as_me:$LINENO: WARNING: could not locate sched_yield() or pthread_yield()" >&5
24312 echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
24313                         fi
24314
24315
24316
24317 for ac_func in pthread_kill pthread_rwlock_destroy
24318 do
24319 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24320 echo "$as_me:$LINENO: checking for $ac_func" >&5
24321 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24322 if eval "test \"\${$as_ac_var+set}\" = set"; then
24323   echo $ECHO_N "(cached) $ECHO_C" >&6
24324 else
24325   cat >conftest.$ac_ext <<_ACEOF
24326 /* confdefs.h.  */
24327 _ACEOF
24328 cat confdefs.h >>conftest.$ac_ext
24329 cat >>conftest.$ac_ext <<_ACEOF
24330 /* end confdefs.h.  */
24331 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24332    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24333 #define $ac_func innocuous_$ac_func
24334
24335 /* System header to define __stub macros and hopefully few prototypes,
24336     which can conflict with char $ac_func (); below.
24337     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24338     <limits.h> exists even on freestanding compilers.  */
24339
24340 #ifdef __STDC__
24341 # include <limits.h>
24342 #else
24343 # include <assert.h>
24344 #endif
24345
24346 #undef $ac_func
24347
24348 /* Override any gcc2 internal prototype to avoid an error.  */
24349 #ifdef __cplusplus
24350 extern "C"
24351 {
24352 #endif
24353 /* We use char because int might match the return type of a gcc2
24354    builtin and then its argument prototype would still apply.  */
24355 char $ac_func ();
24356 /* The GNU C library defines this for functions which it implements
24357     to always fail with ENOSYS.  Some functions are actually named
24358     something starting with __ and the normal name is an alias.  */
24359 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24360 choke me
24361 #else
24362 char (*f) () = $ac_func;
24363 #endif
24364 #ifdef __cplusplus
24365 }
24366 #endif
24367
24368 int
24369 main ()
24370 {
24371 return f != $ac_func;
24372   ;
24373   return 0;
24374 }
24375 _ACEOF
24376 rm -f conftest.$ac_objext conftest$ac_exeext
24377 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24378   (eval $ac_link) 2>conftest.er1
24379   ac_status=$?
24380   grep -v '^ *+' conftest.er1 >conftest.err
24381   rm -f conftest.er1
24382   cat conftest.err >&5
24383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24384   (exit $ac_status); } &&
24385          { ac_try='test -z "$ac_c_werror_flag"
24386                          || test ! -s conftest.err'
24387   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24388   (eval $ac_try) 2>&5
24389   ac_status=$?
24390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24391   (exit $ac_status); }; } &&
24392          { ac_try='test -s conftest$ac_exeext'
24393   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24394   (eval $ac_try) 2>&5
24395   ac_status=$?
24396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24397   (exit $ac_status); }; }; then
24398   eval "$as_ac_var=yes"
24399 else
24400   echo "$as_me: failed program was:" >&5
24401 sed 's/^/| /' conftest.$ac_ext >&5
24402
24403 eval "$as_ac_var=no"
24404 fi
24405 rm -f conftest.err conftest.$ac_objext \
24406       conftest$ac_exeext conftest.$ac_ext
24407 fi
24408 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24409 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24410 if test `eval echo '${'$as_ac_var'}'` = yes; then
24411   cat >>confdefs.h <<_ACEOF
24412 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24413 _ACEOF
24414
24415 fi
24416 done
24417
24418
24419                                                                         echo "$as_me:$LINENO: checking for pthread_detach with <pthread.h>" >&5
24420 echo $ECHO_N "checking for pthread_detach with <pthread.h>... $ECHO_C" >&6
24421 if test "${ol_cv_func_pthread_detach+set}" = set; then
24422   echo $ECHO_N "(cached) $ECHO_C" >&6
24423 else
24424
24425                                                                 cat >conftest.$ac_ext <<_ACEOF
24426 /* confdefs.h.  */
24427 _ACEOF
24428 cat confdefs.h >>conftest.$ac_ext
24429 cat >>conftest.$ac_ext <<_ACEOF
24430 /* end confdefs.h.  */
24431
24432 #include <pthread.h>
24433 #ifndef NULL
24434 #define NULL (void*)0
24435 #endif
24436
24437 int
24438 main ()
24439 {
24440 pthread_detach(NULL);
24441   ;
24442   return 0;
24443 }
24444 _ACEOF
24445 rm -f conftest.$ac_objext conftest$ac_exeext
24446 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24447   (eval $ac_link) 2>conftest.er1
24448   ac_status=$?
24449   grep -v '^ *+' conftest.er1 >conftest.err
24450   rm -f conftest.er1
24451   cat conftest.err >&5
24452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24453   (exit $ac_status); } &&
24454          { ac_try='test -z "$ac_c_werror_flag"
24455                          || test ! -s conftest.err'
24456   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24457   (eval $ac_try) 2>&5
24458   ac_status=$?
24459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24460   (exit $ac_status); }; } &&
24461          { ac_try='test -s conftest$ac_exeext'
24462   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24463   (eval $ac_try) 2>&5
24464   ac_status=$?
24465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24466   (exit $ac_status); }; }; then
24467   ol_cv_func_pthread_detach=yes
24468 else
24469   echo "$as_me: failed program was:" >&5
24470 sed 's/^/| /' conftest.$ac_ext >&5
24471
24472 ol_cv_func_pthread_detach=no
24473 fi
24474 rm -f conftest.err conftest.$ac_objext \
24475       conftest$ac_exeext conftest.$ac_ext
24476
24477 fi
24478 echo "$as_me:$LINENO: result: $ol_cv_func_pthread_detach" >&5
24479 echo "${ECHO_T}$ol_cv_func_pthread_detach" >&6
24480
24481                         if test $ol_cv_func_pthread_detach = no ; then
24482                                 { { echo "$as_me:$LINENO: error: could not locate pthread_detach()" >&5
24483 echo "$as_me: error: could not locate pthread_detach()" >&2;}
24484    { (exit 1); exit 1; }; }
24485                         fi
24486
24487
24488 cat >>confdefs.h <<\_ACEOF
24489 #define HAVE_PTHREAD_DETACH 1
24490 _ACEOF
24491
24492
24493
24494
24495
24496
24497 for ac_func in \
24498                                 pthread_setconcurrency \
24499                                 pthread_getconcurrency \
24500                                 thr_setconcurrency \
24501                                 thr_getconcurrency \
24502
24503 do
24504 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24505 echo "$as_me:$LINENO: checking for $ac_func" >&5
24506 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24507 if eval "test \"\${$as_ac_var+set}\" = set"; then
24508   echo $ECHO_N "(cached) $ECHO_C" >&6
24509 else
24510   cat >conftest.$ac_ext <<_ACEOF
24511 /* confdefs.h.  */
24512 _ACEOF
24513 cat confdefs.h >>conftest.$ac_ext
24514 cat >>conftest.$ac_ext <<_ACEOF
24515 /* end confdefs.h.  */
24516 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24517    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24518 #define $ac_func innocuous_$ac_func
24519
24520 /* System header to define __stub macros and hopefully few prototypes,
24521     which can conflict with char $ac_func (); below.
24522     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24523     <limits.h> exists even on freestanding compilers.  */
24524
24525 #ifdef __STDC__
24526 # include <limits.h>
24527 #else
24528 # include <assert.h>
24529 #endif
24530
24531 #undef $ac_func
24532
24533 /* Override any gcc2 internal prototype to avoid an error.  */
24534 #ifdef __cplusplus
24535 extern "C"
24536 {
24537 #endif
24538 /* We use char because int might match the return type of a gcc2
24539    builtin and then its argument prototype would still apply.  */
24540 char $ac_func ();
24541 /* The GNU C library defines this for functions which it implements
24542     to always fail with ENOSYS.  Some functions are actually named
24543     something starting with __ and the normal name is an alias.  */
24544 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24545 choke me
24546 #else
24547 char (*f) () = $ac_func;
24548 #endif
24549 #ifdef __cplusplus
24550 }
24551 #endif
24552
24553 int
24554 main ()
24555 {
24556 return f != $ac_func;
24557   ;
24558   return 0;
24559 }
24560 _ACEOF
24561 rm -f conftest.$ac_objext conftest$ac_exeext
24562 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24563   (eval $ac_link) 2>conftest.er1
24564   ac_status=$?
24565   grep -v '^ *+' conftest.er1 >conftest.err
24566   rm -f conftest.er1
24567   cat conftest.err >&5
24568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24569   (exit $ac_status); } &&
24570          { ac_try='test -z "$ac_c_werror_flag"
24571                          || test ! -s conftest.err'
24572   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24573   (eval $ac_try) 2>&5
24574   ac_status=$?
24575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24576   (exit $ac_status); }; } &&
24577          { ac_try='test -s conftest$ac_exeext'
24578   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24579   (eval $ac_try) 2>&5
24580   ac_status=$?
24581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24582   (exit $ac_status); }; }; then
24583   eval "$as_ac_var=yes"
24584 else
24585   echo "$as_me: failed program was:" >&5
24586 sed 's/^/| /' conftest.$ac_ext >&5
24587
24588 eval "$as_ac_var=no"
24589 fi
24590 rm -f conftest.err conftest.$ac_objext \
24591       conftest$ac_exeext conftest.$ac_ext
24592 fi
24593 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24594 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24595 if test `eval echo '${'$as_ac_var'}'` = yes; then
24596   cat >>confdefs.h <<_ACEOF
24597 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24598 _ACEOF
24599
24600 fi
24601 done
24602
24603
24604
24605
24606 for ac_func in pthread_kill_other_threads_np
24607 do
24608 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24609 echo "$as_me:$LINENO: checking for $ac_func" >&5
24610 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24611 if eval "test \"\${$as_ac_var+set}\" = set"; then
24612   echo $ECHO_N "(cached) $ECHO_C" >&6
24613 else
24614   cat >conftest.$ac_ext <<_ACEOF
24615 /* confdefs.h.  */
24616 _ACEOF
24617 cat confdefs.h >>conftest.$ac_ext
24618 cat >>conftest.$ac_ext <<_ACEOF
24619 /* end confdefs.h.  */
24620 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24621    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24622 #define $ac_func innocuous_$ac_func
24623
24624 /* System header to define __stub macros and hopefully few prototypes,
24625     which can conflict with char $ac_func (); below.
24626     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24627     <limits.h> exists even on freestanding compilers.  */
24628
24629 #ifdef __STDC__
24630 # include <limits.h>
24631 #else
24632 # include <assert.h>
24633 #endif
24634
24635 #undef $ac_func
24636
24637 /* Override any gcc2 internal prototype to avoid an error.  */
24638 #ifdef __cplusplus
24639 extern "C"
24640 {
24641 #endif
24642 /* We use char because int might match the return type of a gcc2
24643    builtin and then its argument prototype would still apply.  */
24644 char $ac_func ();
24645 /* The GNU C library defines this for functions which it implements
24646     to always fail with ENOSYS.  Some functions are actually named
24647     something starting with __ and the normal name is an alias.  */
24648 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24649 choke me
24650 #else
24651 char (*f) () = $ac_func;
24652 #endif
24653 #ifdef __cplusplus
24654 }
24655 #endif
24656
24657 int
24658 main ()
24659 {
24660 return f != $ac_func;
24661   ;
24662   return 0;
24663 }
24664 _ACEOF
24665 rm -f conftest.$ac_objext conftest$ac_exeext
24666 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24667   (eval $ac_link) 2>conftest.er1
24668   ac_status=$?
24669   grep -v '^ *+' conftest.er1 >conftest.err
24670   rm -f conftest.er1
24671   cat conftest.err >&5
24672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24673   (exit $ac_status); } &&
24674          { ac_try='test -z "$ac_c_werror_flag"
24675                          || test ! -s conftest.err'
24676   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24677   (eval $ac_try) 2>&5
24678   ac_status=$?
24679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24680   (exit $ac_status); }; } &&
24681          { ac_try='test -s conftest$ac_exeext'
24682   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24683   (eval $ac_try) 2>&5
24684   ac_status=$?
24685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24686   (exit $ac_status); }; }; then
24687   eval "$as_ac_var=yes"
24688 else
24689   echo "$as_me: failed program was:" >&5
24690 sed 's/^/| /' conftest.$ac_ext >&5
24691
24692 eval "$as_ac_var=no"
24693 fi
24694 rm -f conftest.err conftest.$ac_objext \
24695       conftest$ac_exeext conftest.$ac_ext
24696 fi
24697 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24698 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24699 if test `eval echo '${'$as_ac_var'}'` = yes; then
24700   cat >>confdefs.h <<_ACEOF
24701 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24702 _ACEOF
24703
24704 fi
24705 done
24706
24707         echo "$as_me:$LINENO: checking for LinuxThreads implementation" >&5
24708 echo $ECHO_N "checking for LinuxThreads implementation... $ECHO_C" >&6
24709 if test "${ol_cv_sys_linux_threads+set}" = set; then
24710   echo $ECHO_N "(cached) $ECHO_C" >&6
24711 else
24712   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
24713 fi
24714 echo "$as_me:$LINENO: result: $ol_cv_sys_linux_threads" >&5
24715 echo "${ECHO_T}$ol_cv_sys_linux_threads" >&6
24716
24717
24718
24719
24720         echo "$as_me:$LINENO: checking for LinuxThreads consistency" >&5
24721 echo $ECHO_N "checking for LinuxThreads consistency... $ECHO_C" >&6
24722 if test "${ol_cv_linux_threads+set}" = set; then
24723   echo $ECHO_N "(cached) $ECHO_C" >&6
24724 else
24725
24726                 if test $ol_cv_header_linux_threads = yes &&
24727                    test $ol_cv_sys_linux_threads = yes; then
24728                         ol_cv_linux_threads=yes
24729                 elif test $ol_cv_header_linux_threads = no &&
24730                      test $ol_cv_sys_linux_threads = no; then
24731                         ol_cv_linux_threads=no
24732                 else
24733                         ol_cv_linux_threads=error
24734                 fi
24735
24736 fi
24737 echo "$as_me:$LINENO: result: $ol_cv_linux_threads" >&5
24738 echo "${ECHO_T}$ol_cv_linux_threads" >&6
24739
24740
24741                         if test $ol_cv_linux_threads = error; then
24742                                 { { echo "$as_me:$LINENO: error: LinuxThreads header/library mismatch" >&5
24743 echo "$as_me: error: LinuxThreads header/library mismatch" >&2;}
24744    { (exit 1); exit 1; }; };
24745                         fi
24746
24747                         echo "$as_me:$LINENO: checking if pthread_create() works" >&5
24748 echo $ECHO_N "checking if pthread_create() works... $ECHO_C" >&6
24749 if test "${ol_cv_pthread_create_works+set}" = set; then
24750   echo $ECHO_N "(cached) $ECHO_C" >&6
24751 else
24752
24753                         if test "$cross_compiling" = yes; then
24754                                 ol_cv_pthread_create_works=yes
24755 else
24756   cat >conftest.$ac_ext <<_ACEOF
24757 /* confdefs.h.  */
24758 _ACEOF
24759 cat confdefs.h >>conftest.$ac_ext
24760 cat >>conftest.$ac_ext <<_ACEOF
24761 /* end confdefs.h.  */
24762
24763 /* pthread test headers */
24764 #include <pthread.h>
24765 #if HAVE_PTHREADS < 7
24766 #include <errno.h>
24767 #endif
24768 #ifndef NULL
24769 #define NULL (void*)0
24770 #endif
24771
24772 static void *task(p)
24773         void *p;
24774 {
24775         return (void *) (p == NULL);
24776 }
24777
24778
24779 int main(argc, argv)
24780         int argc;
24781         char **argv;
24782 {
24783
24784         /* pthread test function */
24785 #ifndef PTHREAD_CREATE_DETACHED
24786 #define PTHREAD_CREATE_DETACHED 1
24787 #endif
24788         pthread_t t;
24789         int status;
24790         int detach = PTHREAD_CREATE_DETACHED;
24791
24792 #if HAVE_PTHREADS > 4
24793         /* Final pthreads */
24794         pthread_attr_t attr;
24795
24796         status = pthread_attr_init(&attr);
24797         if( status ) return status;
24798
24799 #if HAVE_PTHREADS < 7
24800         status = pthread_attr_setdetachstate(&attr, &detach);
24801         if( status < 0 ) status = errno;
24802 #else
24803         status = pthread_attr_setdetachstate(&attr, detach);
24804 #endif
24805         if( status ) return status;
24806         status = pthread_create( &t, &attr, task, NULL );
24807 #if HAVE_PTHREADS < 7
24808         if( status < 0 ) status = errno;
24809 #endif
24810         if( status ) return status;
24811 #else
24812         /* Draft 4 pthreads */
24813         status = pthread_create( &t, pthread_attr_default, task, NULL );
24814         if( status ) return errno;
24815
24816         /* give thread a chance to complete */
24817         /* it should remain joinable and hence detachable */
24818         sleep( 1 );
24819
24820         status = pthread_detach( &t );
24821         if( status ) return errno;
24822 #endif
24823
24824 #ifdef HAVE_LINUX_THREADS
24825         pthread_kill_other_threads_np();
24826 #endif
24827
24828         return 0;
24829
24830 }
24831
24832 _ACEOF
24833 rm -f conftest$ac_exeext
24834 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24835   (eval $ac_link) 2>&5
24836   ac_status=$?
24837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24838   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24839   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24840   (eval $ac_try) 2>&5
24841   ac_status=$?
24842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24843   (exit $ac_status); }; }; then
24844   ol_cv_pthread_create_works=yes
24845 else
24846   echo "$as_me: program exited with status $ac_status" >&5
24847 echo "$as_me: failed program was:" >&5
24848 sed 's/^/| /' conftest.$ac_ext >&5
24849
24850 ( exit $ac_status )
24851 ol_cv_pthread_create_works=no
24852 fi
24853 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24854 fi
24855 fi
24856 echo "$as_me:$LINENO: result: $ol_cv_pthread_create_works" >&5
24857 echo "${ECHO_T}$ol_cv_pthread_create_works" >&6
24858
24859                         if test $ol_cv_pthread_create_works = no ; then
24860                                 { { echo "$as_me:$LINENO: error: pthread_create is not usable, check environment settings" >&5
24861 echo "$as_me: error: pthread_create is not usable, check environment settings" >&2;}
24862    { (exit 1); exit 1; }; }
24863                         fi
24864
24865                         ol_replace_broken_yield=no
24866                         case "$target" in
24867                         *-*-linux*)
24868
24869 for ac_func in nanosleep
24870 do
24871 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24872 echo "$as_me:$LINENO: checking for $ac_func" >&5
24873 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24874 if eval "test \"\${$as_ac_var+set}\" = set"; then
24875   echo $ECHO_N "(cached) $ECHO_C" >&6
24876 else
24877   cat >conftest.$ac_ext <<_ACEOF
24878 /* confdefs.h.  */
24879 _ACEOF
24880 cat confdefs.h >>conftest.$ac_ext
24881 cat >>conftest.$ac_ext <<_ACEOF
24882 /* end confdefs.h.  */
24883 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24884    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24885 #define $ac_func innocuous_$ac_func
24886
24887 /* System header to define __stub macros and hopefully few prototypes,
24888     which can conflict with char $ac_func (); below.
24889     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24890     <limits.h> exists even on freestanding compilers.  */
24891
24892 #ifdef __STDC__
24893 # include <limits.h>
24894 #else
24895 # include <assert.h>
24896 #endif
24897
24898 #undef $ac_func
24899
24900 /* Override any gcc2 internal prototype to avoid an error.  */
24901 #ifdef __cplusplus
24902 extern "C"
24903 {
24904 #endif
24905 /* We use char because int might match the return type of a gcc2
24906    builtin and then its argument prototype would still apply.  */
24907 char $ac_func ();
24908 /* The GNU C library defines this for functions which it implements
24909     to always fail with ENOSYS.  Some functions are actually named
24910     something starting with __ and the normal name is an alias.  */
24911 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24912 choke me
24913 #else
24914 char (*f) () = $ac_func;
24915 #endif
24916 #ifdef __cplusplus
24917 }
24918 #endif
24919
24920 int
24921 main ()
24922 {
24923 return f != $ac_func;
24924   ;
24925   return 0;
24926 }
24927 _ACEOF
24928 rm -f conftest.$ac_objext conftest$ac_exeext
24929 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24930   (eval $ac_link) 2>conftest.er1
24931   ac_status=$?
24932   grep -v '^ *+' conftest.er1 >conftest.err
24933   rm -f conftest.er1
24934   cat conftest.err >&5
24935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24936   (exit $ac_status); } &&
24937          { ac_try='test -z "$ac_c_werror_flag"
24938                          || test ! -s conftest.err'
24939   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24940   (eval $ac_try) 2>&5
24941   ac_status=$?
24942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24943   (exit $ac_status); }; } &&
24944          { ac_try='test -s conftest$ac_exeext'
24945   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24946   (eval $ac_try) 2>&5
24947   ac_status=$?
24948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24949   (exit $ac_status); }; }; then
24950   eval "$as_ac_var=yes"
24951 else
24952   echo "$as_me: failed program was:" >&5
24953 sed 's/^/| /' conftest.$ac_ext >&5
24954
24955 eval "$as_ac_var=no"
24956 fi
24957 rm -f conftest.err conftest.$ac_objext \
24958       conftest$ac_exeext conftest.$ac_ext
24959 fi
24960 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24961 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24962 if test `eval echo '${'$as_ac_var'}'` = yes; then
24963   cat >>confdefs.h <<_ACEOF
24964 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24965 _ACEOF
24966
24967 fi
24968 done
24969
24970                                 ol_replace_broken_yield=yes
24971                         ;;
24972                         esac
24973
24974                         if test $ol_replace_broken_yield = yes ; then
24975
24976 cat >>confdefs.h <<\_ACEOF
24977 #define REPLACE_BROKEN_YIELD 1
24978 _ACEOF
24979
24980                         fi
24981
24982                                                 if test $ol_with_yielding_select = auto ; then
24983                                 echo "$as_me:$LINENO: checking if select yields when using pthreads" >&5
24984 echo $ECHO_N "checking if select yields when using pthreads... $ECHO_C" >&6
24985 if test "${ol_cv_pthread_select_yields+set}" = set; then
24986   echo $ECHO_N "(cached) $ECHO_C" >&6
24987 else
24988
24989                                 if test "$cross_compiling" = yes; then
24990   ol_cv_pthread_select_yields=cross
24991 else
24992   cat >conftest.$ac_ext <<_ACEOF
24993 /* confdefs.h.  */
24994 _ACEOF
24995 cat confdefs.h >>conftest.$ac_ext
24996 cat >>conftest.$ac_ext <<_ACEOF
24997 /* end confdefs.h.  */
24998
24999 #include <sys/types.h>
25000 #include <sys/time.h>
25001 #include <unistd.h>
25002 #include <pthread.h>
25003 #ifndef NULL
25004 #define NULL (void*) 0
25005 #endif
25006
25007 static int fildes[2];
25008
25009 static void *task(p)
25010         void *p;
25011 {
25012         int i;
25013         struct timeval tv;
25014
25015         fd_set rfds;
25016
25017         tv.tv_sec=10;
25018         tv.tv_usec=0;
25019
25020         FD_ZERO(&rfds);
25021         FD_SET(fildes[0], &rfds);
25022
25023         /* we're not interested in any fds */
25024         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
25025
25026         if(i < 0) {
25027                 perror("select");
25028                 exit(10);
25029         }
25030
25031         exit(0); /* if we exit here, the select blocked the whole process */
25032 }
25033
25034 int main(argc, argv)
25035         int argc;
25036         char **argv;
25037 {
25038         pthread_t t;
25039
25040         /* create a pipe to select */
25041         if(pipe(&fildes[0])) {
25042                 perror("select");
25043                 exit(1);
25044         }
25045
25046 #ifdef HAVE_PTHREAD_SETCONCURRENCY
25047         (void) pthread_setconcurrency(2);
25048 #else
25049 #ifdef HAVE_THR_SETCONCURRENCY
25050         /* Set Solaris LWP concurrency to 2 */
25051         thr_setconcurrency(2);
25052 #endif
25053 #endif
25054
25055 #if HAVE_PTHREADS < 6
25056         pthread_create(&t, pthread_attr_default, task, NULL);
25057 #else
25058         pthread_create(&t, NULL, task, NULL);
25059 #endif
25060
25061         /* make sure task runs first */
25062 #if HAVE_THR_YIELD
25063         thr_yield();
25064 #elif defined( HAVE_SCHED_YIELD )
25065         sched_yield();
25066 #elif defined( HAVE_PTHREAD_YIELD )
25067         pthread_yield();
25068 #endif
25069
25070         exit(2);
25071 }
25072 _ACEOF
25073 rm -f conftest$ac_exeext
25074 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25075   (eval $ac_link) 2>&5
25076   ac_status=$?
25077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25078   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25079   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25080   (eval $ac_try) 2>&5
25081   ac_status=$?
25082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25083   (exit $ac_status); }; }; then
25084   ol_cv_pthread_select_yields=no
25085 else
25086   echo "$as_me: program exited with status $ac_status" >&5
25087 echo "$as_me: failed program was:" >&5
25088 sed 's/^/| /' conftest.$ac_ext >&5
25089
25090 ( exit $ac_status )
25091 ol_cv_pthread_select_yields=yes
25092 fi
25093 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25094 fi
25095 fi
25096 echo "$as_me:$LINENO: result: $ol_cv_pthread_select_yields" >&5
25097 echo "${ECHO_T}$ol_cv_pthread_select_yields" >&6
25098
25099                                 if test $ol_cv_pthread_select_yields = cross ; then
25100                                         { { echo "$as_me:$LINENO: error: crossing compiling: use --with-yielding_select=yes|no|manual" >&5
25101 echo "$as_me: error: crossing compiling: use --with-yielding_select=yes|no|manual" >&2;}
25102    { (exit 1); exit 1; }; }
25103                                 fi
25104
25105                                 if test $ol_cv_pthread_select_yields = yes ; then
25106                                         ol_with_yielding_select=yes
25107                                 fi
25108                         fi
25109
25110                                                 CPPFLAGS="$save_CPPFLAGS"
25111                         LIBS="$save_LIBS"
25112                 else
25113                         { { echo "$as_me:$LINENO: error: could not locate usable POSIX Threads" >&5
25114 echo "$as_me: error: could not locate usable POSIX Threads" >&2;}
25115    { (exit 1); exit 1; }; }
25116                 fi
25117         fi
25118
25119         if test $ol_with_threads = posix ; then
25120                 { { echo "$as_me:$LINENO: error: could not locate POSIX Threads" >&5
25121 echo "$as_me: error: could not locate POSIX Threads" >&2;}
25122    { (exit 1); exit 1; }; }
25123         fi
25124         ;;
25125 esac
25126
25127 case $ol_with_threads in auto | yes | mach)
25128
25129
25130
25131 for ac_header in mach/cthreads.h cthreads.h
25132 do
25133 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25134 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25135   echo "$as_me:$LINENO: checking for $ac_header" >&5
25136 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25137 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25138   echo $ECHO_N "(cached) $ECHO_C" >&6
25139 fi
25140 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25141 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25142 else
25143   # Is the header compilable?
25144 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25145 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25146 cat >conftest.$ac_ext <<_ACEOF
25147 /* confdefs.h.  */
25148 _ACEOF
25149 cat confdefs.h >>conftest.$ac_ext
25150 cat >>conftest.$ac_ext <<_ACEOF
25151 /* end confdefs.h.  */
25152 $ac_includes_default
25153 #include <$ac_header>
25154 _ACEOF
25155 rm -f conftest.$ac_objext
25156 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25157   (eval $ac_compile) 2>conftest.er1
25158   ac_status=$?
25159   grep -v '^ *+' conftest.er1 >conftest.err
25160   rm -f conftest.er1
25161   cat conftest.err >&5
25162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25163   (exit $ac_status); } &&
25164          { ac_try='test -z "$ac_c_werror_flag"
25165                          || test ! -s conftest.err'
25166   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25167   (eval $ac_try) 2>&5
25168   ac_status=$?
25169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25170   (exit $ac_status); }; } &&
25171          { ac_try='test -s conftest.$ac_objext'
25172   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25173   (eval $ac_try) 2>&5
25174   ac_status=$?
25175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25176   (exit $ac_status); }; }; then
25177   ac_header_compiler=yes
25178 else
25179   echo "$as_me: failed program was:" >&5
25180 sed 's/^/| /' conftest.$ac_ext >&5
25181
25182 ac_header_compiler=no
25183 fi
25184 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25185 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25186 echo "${ECHO_T}$ac_header_compiler" >&6
25187
25188 # Is the header present?
25189 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25190 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
25191 cat >conftest.$ac_ext <<_ACEOF
25192 /* confdefs.h.  */
25193 _ACEOF
25194 cat confdefs.h >>conftest.$ac_ext
25195 cat >>conftest.$ac_ext <<_ACEOF
25196 /* end confdefs.h.  */
25197 #include <$ac_header>
25198 _ACEOF
25199 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25200   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25201   ac_status=$?
25202   grep -v '^ *+' conftest.er1 >conftest.err
25203   rm -f conftest.er1
25204   cat conftest.err >&5
25205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25206   (exit $ac_status); } >/dev/null; then
25207   if test -s conftest.err; then
25208     ac_cpp_err=$ac_c_preproc_warn_flag
25209     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25210   else
25211     ac_cpp_err=
25212   fi
25213 else
25214   ac_cpp_err=yes
25215 fi
25216 if test -z "$ac_cpp_err"; then
25217   ac_header_preproc=yes
25218 else
25219   echo "$as_me: failed program was:" >&5
25220 sed 's/^/| /' conftest.$ac_ext >&5
25221
25222   ac_header_preproc=no
25223 fi
25224 rm -f conftest.err conftest.$ac_ext
25225 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25226 echo "${ECHO_T}$ac_header_preproc" >&6
25227
25228 # So?  What about this header?
25229 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25230   yes:no: )
25231     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25232 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25233     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25234 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25235     ac_header_preproc=yes
25236     ;;
25237   no:yes:* )
25238     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25239 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25240     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25241 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25242     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25243 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25244     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25245 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25246     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25247 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25248     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25249 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25250     (
25251       cat <<\_ASBOX
25252 ## --------------------------------------------- ##
25253 ## Report this to <http://www.openldap.org/its/> ##
25254 ## --------------------------------------------- ##
25255 _ASBOX
25256     ) |
25257       sed "s/^/$as_me: WARNING:     /" >&2
25258     ;;
25259 esac
25260 echo "$as_me:$LINENO: checking for $ac_header" >&5
25261 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25262 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25263   echo $ECHO_N "(cached) $ECHO_C" >&6
25264 else
25265   eval "$as_ac_Header=\$ac_header_preproc"
25266 fi
25267 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25268 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25269
25270 fi
25271 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25272   cat >>confdefs.h <<_ACEOF
25273 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25274 _ACEOF
25275
25276 fi
25277
25278 done
25279
25280         if test $ac_cv_header_mach_cthreads_h = yes ; then
25281                 ol_with_threads=found
25282
25283                                 echo "$as_me:$LINENO: checking for cthread_fork" >&5
25284 echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6
25285 if test "${ac_cv_func_cthread_fork+set}" = set; then
25286   echo $ECHO_N "(cached) $ECHO_C" >&6
25287 else
25288   cat >conftest.$ac_ext <<_ACEOF
25289 /* confdefs.h.  */
25290 _ACEOF
25291 cat confdefs.h >>conftest.$ac_ext
25292 cat >>conftest.$ac_ext <<_ACEOF
25293 /* end confdefs.h.  */
25294 /* Define cthread_fork to an innocuous variant, in case <limits.h> declares cthread_fork.
25295    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
25296 #define cthread_fork innocuous_cthread_fork
25297
25298 /* System header to define __stub macros and hopefully few prototypes,
25299     which can conflict with char cthread_fork (); below.
25300     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25301     <limits.h> exists even on freestanding compilers.  */
25302
25303 #ifdef __STDC__
25304 # include <limits.h>
25305 #else
25306 # include <assert.h>
25307 #endif
25308
25309 #undef cthread_fork
25310
25311 /* Override any gcc2 internal prototype to avoid an error.  */
25312 #ifdef __cplusplus
25313 extern "C"
25314 {
25315 #endif
25316 /* We use char because int might match the return type of a gcc2
25317    builtin and then its argument prototype would still apply.  */
25318 char cthread_fork ();
25319 /* The GNU C library defines this for functions which it implements
25320     to always fail with ENOSYS.  Some functions are actually named
25321     something starting with __ and the normal name is an alias.  */
25322 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
25323 choke me
25324 #else
25325 char (*f) () = cthread_fork;
25326 #endif
25327 #ifdef __cplusplus
25328 }
25329 #endif
25330
25331 int
25332 main ()
25333 {
25334 return f != cthread_fork;
25335   ;
25336   return 0;
25337 }
25338 _ACEOF
25339 rm -f conftest.$ac_objext conftest$ac_exeext
25340 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25341   (eval $ac_link) 2>conftest.er1
25342   ac_status=$?
25343   grep -v '^ *+' conftest.er1 >conftest.err
25344   rm -f conftest.er1
25345   cat conftest.err >&5
25346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25347   (exit $ac_status); } &&
25348          { ac_try='test -z "$ac_c_werror_flag"
25349                          || test ! -s conftest.err'
25350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25351   (eval $ac_try) 2>&5
25352   ac_status=$?
25353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25354   (exit $ac_status); }; } &&
25355          { ac_try='test -s conftest$ac_exeext'
25356   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25357   (eval $ac_try) 2>&5
25358   ac_status=$?
25359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25360   (exit $ac_status); }; }; then
25361   ac_cv_func_cthread_fork=yes
25362 else
25363   echo "$as_me: failed program was:" >&5
25364 sed 's/^/| /' conftest.$ac_ext >&5
25365
25366 ac_cv_func_cthread_fork=no
25367 fi
25368 rm -f conftest.err conftest.$ac_objext \
25369       conftest$ac_exeext conftest.$ac_ext
25370 fi
25371 echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5
25372 echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6
25373 if test $ac_cv_func_cthread_fork = yes; then
25374   ol_link_threads=yes
25375 fi
25376
25377
25378                 if test $ol_link_threads = no ; then
25379                                                                         echo "$as_me:$LINENO: checking for cthread_fork with -all_load" >&5
25380 echo $ECHO_N "checking for cthread_fork with -all_load... $ECHO_C" >&6
25381 if test "${ol_cv_cthread_all_load+set}" = set; then
25382   echo $ECHO_N "(cached) $ECHO_C" >&6
25383 else
25384
25385                                                                 save_LIBS="$LIBS"
25386                                 LIBS="-all_load $LIBS"
25387                                 cat >conftest.$ac_ext <<_ACEOF
25388 /* confdefs.h.  */
25389 _ACEOF
25390 cat confdefs.h >>conftest.$ac_ext
25391 cat >>conftest.$ac_ext <<_ACEOF
25392 /* end confdefs.h.  */
25393 #include <mach/cthreads.h>
25394 int
25395 main ()
25396 {
25397
25398                                         cthread_fork((void *)0, (void *)0);
25399
25400   ;
25401   return 0;
25402 }
25403 _ACEOF
25404 rm -f conftest.$ac_objext conftest$ac_exeext
25405 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25406   (eval $ac_link) 2>conftest.er1
25407   ac_status=$?
25408   grep -v '^ *+' conftest.er1 >conftest.err
25409   rm -f conftest.er1
25410   cat conftest.err >&5
25411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25412   (exit $ac_status); } &&
25413          { ac_try='test -z "$ac_c_werror_flag"
25414                          || test ! -s conftest.err'
25415   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25416   (eval $ac_try) 2>&5
25417   ac_status=$?
25418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25419   (exit $ac_status); }; } &&
25420          { ac_try='test -s conftest$ac_exeext'
25421   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25422   (eval $ac_try) 2>&5
25423   ac_status=$?
25424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25425   (exit $ac_status); }; }; then
25426   ol_cv_cthread_all_load=yes
25427 else
25428   echo "$as_me: failed program was:" >&5
25429 sed 's/^/| /' conftest.$ac_ext >&5
25430
25431 ol_cv_cthread_all_load=no
25432 fi
25433 rm -f conftest.err conftest.$ac_objext \
25434       conftest$ac_exeext conftest.$ac_ext
25435                                                                 LIBS="$save_LIBS"
25436
25437 fi
25438 echo "$as_me:$LINENO: result: $ol_cv_cthread_all_load" >&5
25439 echo "${ECHO_T}$ol_cv_cthread_all_load" >&6
25440
25441                         if test $ol_cv_cthread_all_load = yes ; then
25442                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
25443                                 ol_link_threads=mach
25444                                 ol_with_threads=found
25445                         fi
25446                 fi
25447
25448         elif test $ac_cv_header_cthreads_h = yes ; then
25449
25450                 ol_with_threads=found
25451
25452                                 save_LIBS="$LIBS"
25453                 LIBS="$LIBS -lthreads"
25454                 echo "$as_me:$LINENO: checking for cthread_fork" >&5
25455 echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6
25456 if test "${ac_cv_func_cthread_fork+set}" = set; then
25457   echo $ECHO_N "(cached) $ECHO_C" >&6
25458 else
25459   cat >conftest.$ac_ext <<_ACEOF
25460 /* confdefs.h.  */
25461 _ACEOF
25462 cat confdefs.h >>conftest.$ac_ext
25463 cat >>conftest.$ac_ext <<_ACEOF
25464 /* end confdefs.h.  */
25465 /* Define cthread_fork to an innocuous variant, in case <limits.h> declares cthread_fork.
25466    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
25467 #define cthread_fork innocuous_cthread_fork
25468
25469 /* System header to define __stub macros and hopefully few prototypes,
25470     which can conflict with char cthread_fork (); below.
25471     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25472     <limits.h> exists even on freestanding compilers.  */
25473
25474 #ifdef __STDC__
25475 # include <limits.h>
25476 #else
25477 # include <assert.h>
25478 #endif
25479
25480 #undef cthread_fork
25481
25482 /* Override any gcc2 internal prototype to avoid an error.  */
25483 #ifdef __cplusplus
25484 extern "C"
25485 {
25486 #endif
25487 /* We use char because int might match the return type of a gcc2
25488    builtin and then its argument prototype would still apply.  */
25489 char cthread_fork ();
25490 /* The GNU C library defines this for functions which it implements
25491     to always fail with ENOSYS.  Some functions are actually named
25492     something starting with __ and the normal name is an alias.  */
25493 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
25494 choke me
25495 #else
25496 char (*f) () = cthread_fork;
25497 #endif
25498 #ifdef __cplusplus
25499 }
25500 #endif
25501
25502 int
25503 main ()
25504 {
25505 return f != cthread_fork;
25506   ;
25507   return 0;
25508 }
25509 _ACEOF
25510 rm -f conftest.$ac_objext conftest$ac_exeext
25511 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25512   (eval $ac_link) 2>conftest.er1
25513   ac_status=$?
25514   grep -v '^ *+' conftest.er1 >conftest.err
25515   rm -f conftest.er1
25516   cat conftest.err >&5
25517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25518   (exit $ac_status); } &&
25519          { ac_try='test -z "$ac_c_werror_flag"
25520                          || test ! -s conftest.err'
25521   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25522   (eval $ac_try) 2>&5
25523   ac_status=$?
25524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25525   (exit $ac_status); }; } &&
25526          { ac_try='test -s conftest$ac_exeext'
25527   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25528   (eval $ac_try) 2>&5
25529   ac_status=$?
25530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25531   (exit $ac_status); }; }; then
25532   ac_cv_func_cthread_fork=yes
25533 else
25534   echo "$as_me: failed program was:" >&5
25535 sed 's/^/| /' conftest.$ac_ext >&5
25536
25537 ac_cv_func_cthread_fork=no
25538 fi
25539 rm -f conftest.err conftest.$ac_objext \
25540       conftest$ac_exeext conftest.$ac_ext
25541 fi
25542 echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5
25543 echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6
25544 if test $ac_cv_func_cthread_fork = yes; then
25545   ol_link_threads=yes
25546 fi
25547
25548                 LIBS="$save_LIBS"
25549
25550                 if test $ol_link_threads = yes ; then
25551                         LTHREAD_LIBS="-lthreads"
25552                         ol_link_threads=mach
25553                         ol_with_threads=found
25554                 else
25555                         { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5
25556 echo "$as_me: error: could not link with Mach CThreads" >&2;}
25557    { (exit 1); exit 1; }; }
25558                 fi
25559
25560         elif test $ol_with_threads = mach ; then
25561                 { { echo "$as_me:$LINENO: error: could not locate Mach CThreads" >&5
25562 echo "$as_me: error: could not locate Mach CThreads" >&2;}
25563    { (exit 1); exit 1; }; }
25564         fi
25565
25566         if test $ol_link_threads = mach ; then
25567
25568 cat >>confdefs.h <<\_ACEOF
25569 #define HAVE_MACH_CTHREADS 1
25570 _ACEOF
25571
25572         elif test $ol_with_threads = found ; then
25573                 { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5
25574 echo "$as_me: error: could not link with Mach CThreads" >&2;}
25575    { (exit 1); exit 1; }; }
25576         fi
25577         ;;
25578 esac
25579
25580 case $ol_with_threads in auto | yes | pth)
25581
25582
25583 for ac_header in pth.h
25584 do
25585 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25586 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25587   echo "$as_me:$LINENO: checking for $ac_header" >&5
25588 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25589 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25590   echo $ECHO_N "(cached) $ECHO_C" >&6
25591 fi
25592 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25593 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25594 else
25595   # Is the header compilable?
25596 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25597 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25598 cat >conftest.$ac_ext <<_ACEOF
25599 /* confdefs.h.  */
25600 _ACEOF
25601 cat confdefs.h >>conftest.$ac_ext
25602 cat >>conftest.$ac_ext <<_ACEOF
25603 /* end confdefs.h.  */
25604 $ac_includes_default
25605 #include <$ac_header>
25606 _ACEOF
25607 rm -f conftest.$ac_objext
25608 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25609   (eval $ac_compile) 2>conftest.er1
25610   ac_status=$?
25611   grep -v '^ *+' conftest.er1 >conftest.err
25612   rm -f conftest.er1
25613   cat conftest.err >&5
25614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25615   (exit $ac_status); } &&
25616          { ac_try='test -z "$ac_c_werror_flag"
25617                          || test ! -s conftest.err'
25618   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25619   (eval $ac_try) 2>&5
25620   ac_status=$?
25621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25622   (exit $ac_status); }; } &&
25623          { ac_try='test -s conftest.$ac_objext'
25624   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25625   (eval $ac_try) 2>&5
25626   ac_status=$?
25627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25628   (exit $ac_status); }; }; then
25629   ac_header_compiler=yes
25630 else
25631   echo "$as_me: failed program was:" >&5
25632 sed 's/^/| /' conftest.$ac_ext >&5
25633
25634 ac_header_compiler=no
25635 fi
25636 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25637 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25638 echo "${ECHO_T}$ac_header_compiler" >&6
25639
25640 # Is the header present?
25641 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25642 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
25643 cat >conftest.$ac_ext <<_ACEOF
25644 /* confdefs.h.  */
25645 _ACEOF
25646 cat confdefs.h >>conftest.$ac_ext
25647 cat >>conftest.$ac_ext <<_ACEOF
25648 /* end confdefs.h.  */
25649 #include <$ac_header>
25650 _ACEOF
25651 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25652   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25653   ac_status=$?
25654   grep -v '^ *+' conftest.er1 >conftest.err
25655   rm -f conftest.er1
25656   cat conftest.err >&5
25657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25658   (exit $ac_status); } >/dev/null; then
25659   if test -s conftest.err; then
25660     ac_cpp_err=$ac_c_preproc_warn_flag
25661     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25662   else
25663     ac_cpp_err=
25664   fi
25665 else
25666   ac_cpp_err=yes
25667 fi
25668 if test -z "$ac_cpp_err"; then
25669   ac_header_preproc=yes
25670 else
25671   echo "$as_me: failed program was:" >&5
25672 sed 's/^/| /' conftest.$ac_ext >&5
25673
25674   ac_header_preproc=no
25675 fi
25676 rm -f conftest.err conftest.$ac_ext
25677 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25678 echo "${ECHO_T}$ac_header_preproc" >&6
25679
25680 # So?  What about this header?
25681 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25682   yes:no: )
25683     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25684 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25685     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25686 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25687     ac_header_preproc=yes
25688     ;;
25689   no:yes:* )
25690     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25691 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25692     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25693 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25694     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25695 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25696     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25697 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25698     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25699 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25700     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25701 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25702     (
25703       cat <<\_ASBOX
25704 ## --------------------------------------------- ##
25705 ## Report this to <http://www.openldap.org/its/> ##
25706 ## --------------------------------------------- ##
25707 _ASBOX
25708     ) |
25709       sed "s/^/$as_me: WARNING:     /" >&2
25710     ;;
25711 esac
25712 echo "$as_me:$LINENO: checking for $ac_header" >&5
25713 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25714 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25715   echo $ECHO_N "(cached) $ECHO_C" >&6
25716 else
25717   eval "$as_ac_Header=\$ac_header_preproc"
25718 fi
25719 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25720 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25721
25722 fi
25723 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25724   cat >>confdefs.h <<_ACEOF
25725 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25726 _ACEOF
25727
25728 fi
25729
25730 done
25731
25732
25733         if test $ac_cv_header_pth_h = yes ; then
25734                 echo "$as_me:$LINENO: checking for pth_version in -lpth" >&5
25735 echo $ECHO_N "checking for pth_version in -lpth... $ECHO_C" >&6
25736 if test "${ac_cv_lib_pth_pth_version+set}" = set; then
25737   echo $ECHO_N "(cached) $ECHO_C" >&6
25738 else
25739   ac_check_lib_save_LIBS=$LIBS
25740 LIBS="-lpth  $LIBS"
25741 cat >conftest.$ac_ext <<_ACEOF
25742 /* confdefs.h.  */
25743 _ACEOF
25744 cat confdefs.h >>conftest.$ac_ext
25745 cat >>conftest.$ac_ext <<_ACEOF
25746 /* end confdefs.h.  */
25747
25748 /* Override any gcc2 internal prototype to avoid an error.  */
25749 #ifdef __cplusplus
25750 extern "C"
25751 #endif
25752 /* We use char because int might match the return type of a gcc2
25753    builtin and then its argument prototype would still apply.  */
25754 char pth_version ();
25755 int
25756 main ()
25757 {
25758 pth_version ();
25759   ;
25760   return 0;
25761 }
25762 _ACEOF
25763 rm -f conftest.$ac_objext conftest$ac_exeext
25764 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25765   (eval $ac_link) 2>conftest.er1
25766   ac_status=$?
25767   grep -v '^ *+' conftest.er1 >conftest.err
25768   rm -f conftest.er1
25769   cat conftest.err >&5
25770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25771   (exit $ac_status); } &&
25772          { ac_try='test -z "$ac_c_werror_flag"
25773                          || test ! -s conftest.err'
25774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25775   (eval $ac_try) 2>&5
25776   ac_status=$?
25777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25778   (exit $ac_status); }; } &&
25779          { ac_try='test -s conftest$ac_exeext'
25780   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25781   (eval $ac_try) 2>&5
25782   ac_status=$?
25783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25784   (exit $ac_status); }; }; then
25785   ac_cv_lib_pth_pth_version=yes
25786 else
25787   echo "$as_me: failed program was:" >&5
25788 sed 's/^/| /' conftest.$ac_ext >&5
25789
25790 ac_cv_lib_pth_pth_version=no
25791 fi
25792 rm -f conftest.err conftest.$ac_objext \
25793       conftest$ac_exeext conftest.$ac_ext
25794 LIBS=$ac_check_lib_save_LIBS
25795 fi
25796 echo "$as_me:$LINENO: result: $ac_cv_lib_pth_pth_version" >&5
25797 echo "${ECHO_T}$ac_cv_lib_pth_pth_version" >&6
25798 if test $ac_cv_lib_pth_pth_version = yes; then
25799   have_pth=yes
25800 else
25801   have_pth=no
25802 fi
25803
25804
25805                 if test $have_pth = yes ; then
25806
25807 cat >>confdefs.h <<\_ACEOF
25808 #define HAVE_GNU_PTH 1
25809 _ACEOF
25810
25811                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
25812                         ol_link_threads=pth
25813                         ol_with_threads=found
25814
25815                         if test $ol_with_yielding_select = auto ; then
25816                                 ol_with_yielding_select=yes
25817                         fi
25818                 fi
25819         fi
25820         ;;
25821 esac
25822
25823 case $ol_with_threads in auto | yes | lwp)
25824
25825
25826
25827 for ac_header in thread.h synch.h
25828 do
25829 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25830 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25831   echo "$as_me:$LINENO: checking for $ac_header" >&5
25832 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25833 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25834   echo $ECHO_N "(cached) $ECHO_C" >&6
25835 fi
25836 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25837 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25838 else
25839   # Is the header compilable?
25840 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25841 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25842 cat >conftest.$ac_ext <<_ACEOF
25843 /* confdefs.h.  */
25844 _ACEOF
25845 cat confdefs.h >>conftest.$ac_ext
25846 cat >>conftest.$ac_ext <<_ACEOF
25847 /* end confdefs.h.  */
25848 $ac_includes_default
25849 #include <$ac_header>
25850 _ACEOF
25851 rm -f conftest.$ac_objext
25852 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25853   (eval $ac_compile) 2>conftest.er1
25854   ac_status=$?
25855   grep -v '^ *+' conftest.er1 >conftest.err
25856   rm -f conftest.er1
25857   cat conftest.err >&5
25858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25859   (exit $ac_status); } &&
25860          { ac_try='test -z "$ac_c_werror_flag"
25861                          || test ! -s conftest.err'
25862   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25863   (eval $ac_try) 2>&5
25864   ac_status=$?
25865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25866   (exit $ac_status); }; } &&
25867          { ac_try='test -s conftest.$ac_objext'
25868   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25869   (eval $ac_try) 2>&5
25870   ac_status=$?
25871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25872   (exit $ac_status); }; }; then
25873   ac_header_compiler=yes
25874 else
25875   echo "$as_me: failed program was:" >&5
25876 sed 's/^/| /' conftest.$ac_ext >&5
25877
25878 ac_header_compiler=no
25879 fi
25880 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25881 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25882 echo "${ECHO_T}$ac_header_compiler" >&6
25883
25884 # Is the header present?
25885 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25886 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
25887 cat >conftest.$ac_ext <<_ACEOF
25888 /* confdefs.h.  */
25889 _ACEOF
25890 cat confdefs.h >>conftest.$ac_ext
25891 cat >>conftest.$ac_ext <<_ACEOF
25892 /* end confdefs.h.  */
25893 #include <$ac_header>
25894 _ACEOF
25895 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25896   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25897   ac_status=$?
25898   grep -v '^ *+' conftest.er1 >conftest.err
25899   rm -f conftest.er1
25900   cat conftest.err >&5
25901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25902   (exit $ac_status); } >/dev/null; then
25903   if test -s conftest.err; then
25904     ac_cpp_err=$ac_c_preproc_warn_flag
25905     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25906   else
25907     ac_cpp_err=
25908   fi
25909 else
25910   ac_cpp_err=yes
25911 fi
25912 if test -z "$ac_cpp_err"; then
25913   ac_header_preproc=yes
25914 else
25915   echo "$as_me: failed program was:" >&5
25916 sed 's/^/| /' conftest.$ac_ext >&5
25917
25918   ac_header_preproc=no
25919 fi
25920 rm -f conftest.err conftest.$ac_ext
25921 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25922 echo "${ECHO_T}$ac_header_preproc" >&6
25923
25924 # So?  What about this header?
25925 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25926   yes:no: )
25927     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25928 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25929     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25930 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25931     ac_header_preproc=yes
25932     ;;
25933   no:yes:* )
25934     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25935 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25936     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25937 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25938     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25939 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25940     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25941 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25942     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25943 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25944     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25945 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25946     (
25947       cat <<\_ASBOX
25948 ## --------------------------------------------- ##
25949 ## Report this to <http://www.openldap.org/its/> ##
25950 ## --------------------------------------------- ##
25951 _ASBOX
25952     ) |
25953       sed "s/^/$as_me: WARNING:     /" >&2
25954     ;;
25955 esac
25956 echo "$as_me:$LINENO: checking for $ac_header" >&5
25957 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25958 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25959   echo $ECHO_N "(cached) $ECHO_C" >&6
25960 else
25961   eval "$as_ac_Header=\$ac_header_preproc"
25962 fi
25963 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25964 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25965
25966 fi
25967 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25968   cat >>confdefs.h <<_ACEOF
25969 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25970 _ACEOF
25971
25972 fi
25973
25974 done
25975
25976         if test $ac_cv_header_thread_h = yes &&
25977            test $ac_cv_header_synch_h = yes ; then
25978                 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
25979 echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
25980 if test "${ac_cv_lib_thread_thr_create+set}" = set; then
25981   echo $ECHO_N "(cached) $ECHO_C" >&6
25982 else
25983   ac_check_lib_save_LIBS=$LIBS
25984 LIBS="-lthread  $LIBS"
25985 cat >conftest.$ac_ext <<_ACEOF
25986 /* confdefs.h.  */
25987 _ACEOF
25988 cat confdefs.h >>conftest.$ac_ext
25989 cat >>conftest.$ac_ext <<_ACEOF
25990 /* end confdefs.h.  */
25991
25992 /* Override any gcc2 internal prototype to avoid an error.  */
25993 #ifdef __cplusplus
25994 extern "C"
25995 #endif
25996 /* We use char because int might match the return type of a gcc2
25997    builtin and then its argument prototype would still apply.  */
25998 char thr_create ();
25999 int
26000 main ()
26001 {
26002 thr_create ();
26003   ;
26004   return 0;
26005 }
26006 _ACEOF
26007 rm -f conftest.$ac_objext conftest$ac_exeext
26008 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26009   (eval $ac_link) 2>conftest.er1
26010   ac_status=$?
26011   grep -v '^ *+' conftest.er1 >conftest.err
26012   rm -f conftest.er1
26013   cat conftest.err >&5
26014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26015   (exit $ac_status); } &&
26016          { ac_try='test -z "$ac_c_werror_flag"
26017                          || test ! -s conftest.err'
26018   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26019   (eval $ac_try) 2>&5
26020   ac_status=$?
26021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26022   (exit $ac_status); }; } &&
26023          { ac_try='test -s conftest$ac_exeext'
26024   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26025   (eval $ac_try) 2>&5
26026   ac_status=$?
26027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26028   (exit $ac_status); }; }; then
26029   ac_cv_lib_thread_thr_create=yes
26030 else
26031   echo "$as_me: failed program was:" >&5
26032 sed 's/^/| /' conftest.$ac_ext >&5
26033
26034 ac_cv_lib_thread_thr_create=no
26035 fi
26036 rm -f conftest.err conftest.$ac_objext \
26037       conftest$ac_exeext conftest.$ac_ext
26038 LIBS=$ac_check_lib_save_LIBS
26039 fi
26040 echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
26041 echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
26042 if test $ac_cv_lib_thread_thr_create = yes; then
26043   have_thr=yes
26044 else
26045   have_thr=no
26046 fi
26047
26048
26049                 if test $have_thr = yes ; then
26050
26051 cat >>confdefs.h <<\_ACEOF
26052 #define HAVE_THR 1
26053 _ACEOF
26054
26055                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
26056                         ol_link_threads=thr
26057
26058                         if test $ol_with_yielding_select = auto ; then
26059                                 ol_with_yielding_select=yes
26060                         fi
26061
26062
26063
26064 for ac_func in \
26065                                 thr_setconcurrency \
26066                                 thr_getconcurrency \
26067
26068 do
26069 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
26070 echo "$as_me:$LINENO: checking for $ac_func" >&5
26071 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
26072 if eval "test \"\${$as_ac_var+set}\" = set"; then
26073   echo $ECHO_N "(cached) $ECHO_C" >&6
26074 else
26075   cat >conftest.$ac_ext <<_ACEOF
26076 /* confdefs.h.  */
26077 _ACEOF
26078 cat confdefs.h >>conftest.$ac_ext
26079 cat >>conftest.$ac_ext <<_ACEOF
26080 /* end confdefs.h.  */
26081 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
26082    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
26083 #define $ac_func innocuous_$ac_func
26084
26085 /* System header to define __stub macros and hopefully few prototypes,
26086     which can conflict with char $ac_func (); below.
26087     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
26088     <limits.h> exists even on freestanding compilers.  */
26089
26090 #ifdef __STDC__
26091 # include <limits.h>
26092 #else
26093 # include <assert.h>
26094 #endif
26095
26096 #undef $ac_func
26097
26098 /* Override any gcc2 internal prototype to avoid an error.  */
26099 #ifdef __cplusplus
26100 extern "C"
26101 {
26102 #endif
26103 /* We use char because int might match the return type of a gcc2
26104    builtin and then its argument prototype would still apply.  */
26105 char $ac_func ();
26106 /* The GNU C library defines this for functions which it implements
26107     to always fail with ENOSYS.  Some functions are actually named
26108     something starting with __ and the normal name is an alias.  */
26109 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
26110 choke me
26111 #else
26112 char (*f) () = $ac_func;
26113 #endif
26114 #ifdef __cplusplus
26115 }
26116 #endif
26117
26118 int
26119 main ()
26120 {
26121 return f != $ac_func;
26122   ;
26123   return 0;
26124 }
26125 _ACEOF
26126 rm -f conftest.$ac_objext conftest$ac_exeext
26127 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26128   (eval $ac_link) 2>conftest.er1
26129   ac_status=$?
26130   grep -v '^ *+' conftest.er1 >conftest.err
26131   rm -f conftest.er1
26132   cat conftest.err >&5
26133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26134   (exit $ac_status); } &&
26135          { ac_try='test -z "$ac_c_werror_flag"
26136                          || test ! -s conftest.err'
26137   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26138   (eval $ac_try) 2>&5
26139   ac_status=$?
26140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26141   (exit $ac_status); }; } &&
26142          { ac_try='test -s conftest$ac_exeext'
26143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26144   (eval $ac_try) 2>&5
26145   ac_status=$?
26146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26147   (exit $ac_status); }; }; then
26148   eval "$as_ac_var=yes"
26149 else
26150   echo "$as_me: failed program was:" >&5
26151 sed 's/^/| /' conftest.$ac_ext >&5
26152
26153 eval "$as_ac_var=no"
26154 fi
26155 rm -f conftest.err conftest.$ac_objext \
26156       conftest$ac_exeext conftest.$ac_ext
26157 fi
26158 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
26159 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
26160 if test `eval echo '${'$as_ac_var'}'` = yes; then
26161   cat >>confdefs.h <<_ACEOF
26162 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
26163 _ACEOF
26164
26165 fi
26166 done
26167
26168                 fi
26169         fi
26170
26171
26172 for ac_header in lwp/lwp.h
26173 do
26174 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26175 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26176   echo "$as_me:$LINENO: checking for $ac_header" >&5
26177 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26178 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26179   echo $ECHO_N "(cached) $ECHO_C" >&6
26180 fi
26181 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26182 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26183 else
26184   # Is the header compilable?
26185 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26186 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26187 cat >conftest.$ac_ext <<_ACEOF
26188 /* confdefs.h.  */
26189 _ACEOF
26190 cat confdefs.h >>conftest.$ac_ext
26191 cat >>conftest.$ac_ext <<_ACEOF
26192 /* end confdefs.h.  */
26193 $ac_includes_default
26194 #include <$ac_header>
26195 _ACEOF
26196 rm -f conftest.$ac_objext
26197 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26198   (eval $ac_compile) 2>conftest.er1
26199   ac_status=$?
26200   grep -v '^ *+' conftest.er1 >conftest.err
26201   rm -f conftest.er1
26202   cat conftest.err >&5
26203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26204   (exit $ac_status); } &&
26205          { ac_try='test -z "$ac_c_werror_flag"
26206                          || test ! -s conftest.err'
26207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26208   (eval $ac_try) 2>&5
26209   ac_status=$?
26210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26211   (exit $ac_status); }; } &&
26212          { ac_try='test -s conftest.$ac_objext'
26213   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26214   (eval $ac_try) 2>&5
26215   ac_status=$?
26216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26217   (exit $ac_status); }; }; then
26218   ac_header_compiler=yes
26219 else
26220   echo "$as_me: failed program was:" >&5
26221 sed 's/^/| /' conftest.$ac_ext >&5
26222
26223 ac_header_compiler=no
26224 fi
26225 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26226 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26227 echo "${ECHO_T}$ac_header_compiler" >&6
26228
26229 # Is the header present?
26230 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26231 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26232 cat >conftest.$ac_ext <<_ACEOF
26233 /* confdefs.h.  */
26234 _ACEOF
26235 cat confdefs.h >>conftest.$ac_ext
26236 cat >>conftest.$ac_ext <<_ACEOF
26237 /* end confdefs.h.  */
26238 #include <$ac_header>
26239 _ACEOF
26240 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26241   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26242   ac_status=$?
26243   grep -v '^ *+' conftest.er1 >conftest.err
26244   rm -f conftest.er1
26245   cat conftest.err >&5
26246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26247   (exit $ac_status); } >/dev/null; then
26248   if test -s conftest.err; then
26249     ac_cpp_err=$ac_c_preproc_warn_flag
26250     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26251   else
26252     ac_cpp_err=
26253   fi
26254 else
26255   ac_cpp_err=yes
26256 fi
26257 if test -z "$ac_cpp_err"; then
26258   ac_header_preproc=yes
26259 else
26260   echo "$as_me: failed program was:" >&5
26261 sed 's/^/| /' conftest.$ac_ext >&5
26262
26263   ac_header_preproc=no
26264 fi
26265 rm -f conftest.err conftest.$ac_ext
26266 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26267 echo "${ECHO_T}$ac_header_preproc" >&6
26268
26269 # So?  What about this header?
26270 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26271   yes:no: )
26272     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26273 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26274     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26275 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26276     ac_header_preproc=yes
26277     ;;
26278   no:yes:* )
26279     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26280 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26281     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26282 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26283     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26284 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26285     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26286 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26287     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26288 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26289     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26290 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26291     (
26292       cat <<\_ASBOX
26293 ## --------------------------------------------- ##
26294 ## Report this to <http://www.openldap.org/its/> ##
26295 ## --------------------------------------------- ##
26296 _ASBOX
26297     ) |
26298       sed "s/^/$as_me: WARNING:     /" >&2
26299     ;;
26300 esac
26301 echo "$as_me:$LINENO: checking for $ac_header" >&5
26302 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26303 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26304   echo $ECHO_N "(cached) $ECHO_C" >&6
26305 else
26306   eval "$as_ac_Header=\$ac_header_preproc"
26307 fi
26308 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26309 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26310
26311 fi
26312 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26313   cat >>confdefs.h <<_ACEOF
26314 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26315 _ACEOF
26316
26317 fi
26318
26319 done
26320
26321         if test $ac_cv_header_lwp_lwp_h = yes ; then
26322                 echo "$as_me:$LINENO: checking for lwp_create in -llwp" >&5
26323 echo $ECHO_N "checking for lwp_create in -llwp... $ECHO_C" >&6
26324 if test "${ac_cv_lib_lwp_lwp_create+set}" = set; then
26325   echo $ECHO_N "(cached) $ECHO_C" >&6
26326 else
26327   ac_check_lib_save_LIBS=$LIBS
26328 LIBS="-llwp  $LIBS"
26329 cat >conftest.$ac_ext <<_ACEOF
26330 /* confdefs.h.  */
26331 _ACEOF
26332 cat confdefs.h >>conftest.$ac_ext
26333 cat >>conftest.$ac_ext <<_ACEOF
26334 /* end confdefs.h.  */
26335
26336 /* Override any gcc2 internal prototype to avoid an error.  */
26337 #ifdef __cplusplus
26338 extern "C"
26339 #endif
26340 /* We use char because int might match the return type of a gcc2
26341    builtin and then its argument prototype would still apply.  */
26342 char lwp_create ();
26343 int
26344 main ()
26345 {
26346 lwp_create ();
26347   ;
26348   return 0;
26349 }
26350 _ACEOF
26351 rm -f conftest.$ac_objext conftest$ac_exeext
26352 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26353   (eval $ac_link) 2>conftest.er1
26354   ac_status=$?
26355   grep -v '^ *+' conftest.er1 >conftest.err
26356   rm -f conftest.er1
26357   cat conftest.err >&5
26358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26359   (exit $ac_status); } &&
26360          { ac_try='test -z "$ac_c_werror_flag"
26361                          || test ! -s conftest.err'
26362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26363   (eval $ac_try) 2>&5
26364   ac_status=$?
26365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26366   (exit $ac_status); }; } &&
26367          { ac_try='test -s conftest$ac_exeext'
26368   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26369   (eval $ac_try) 2>&5
26370   ac_status=$?
26371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26372   (exit $ac_status); }; }; then
26373   ac_cv_lib_lwp_lwp_create=yes
26374 else
26375   echo "$as_me: failed program was:" >&5
26376 sed 's/^/| /' conftest.$ac_ext >&5
26377
26378 ac_cv_lib_lwp_lwp_create=no
26379 fi
26380 rm -f conftest.err conftest.$ac_objext \
26381       conftest$ac_exeext conftest.$ac_ext
26382 LIBS=$ac_check_lib_save_LIBS
26383 fi
26384 echo "$as_me:$LINENO: result: $ac_cv_lib_lwp_lwp_create" >&5
26385 echo "${ECHO_T}$ac_cv_lib_lwp_lwp_create" >&6
26386 if test $ac_cv_lib_lwp_lwp_create = yes; then
26387   have_lwp=yes
26388 else
26389   have_lwp=no
26390 fi
26391
26392
26393                 if test $have_lwp = yes ; then
26394
26395 cat >>confdefs.h <<\_ACEOF
26396 #define HAVE_LWP 1
26397 _ACEOF
26398
26399                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
26400                         ol_link_threads=lwp
26401
26402                         if test $ol_with_yielding_select = auto ; then
26403                                 ol_with_yielding_select=no
26404                         fi
26405                 fi
26406         fi
26407         ;;
26408 esac
26409
26410 if test $ol_with_yielding_select = yes ; then
26411
26412 cat >>confdefs.h <<\_ACEOF
26413 #define HAVE_YIELDING_SELECT 1
26414 _ACEOF
26415
26416 fi
26417
26418 if test $ol_with_threads = manual ; then
26419                 ol_link_threads=yes
26420
26421         { echo "$as_me:$LINENO: WARNING: thread defines and link options must be set manually" >&5
26422 echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
26423
26424
26425
26426 for ac_header in pthread.h sched.h
26427 do
26428 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26429 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26430   echo "$as_me:$LINENO: checking for $ac_header" >&5
26431 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26432 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26433   echo $ECHO_N "(cached) $ECHO_C" >&6
26434 fi
26435 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26436 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26437 else
26438   # Is the header compilable?
26439 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26440 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26441 cat >conftest.$ac_ext <<_ACEOF
26442 /* confdefs.h.  */
26443 _ACEOF
26444 cat confdefs.h >>conftest.$ac_ext
26445 cat >>conftest.$ac_ext <<_ACEOF
26446 /* end confdefs.h.  */
26447 $ac_includes_default
26448 #include <$ac_header>
26449 _ACEOF
26450 rm -f conftest.$ac_objext
26451 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26452   (eval $ac_compile) 2>conftest.er1
26453   ac_status=$?
26454   grep -v '^ *+' conftest.er1 >conftest.err
26455   rm -f conftest.er1
26456   cat conftest.err >&5
26457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26458   (exit $ac_status); } &&
26459          { ac_try='test -z "$ac_c_werror_flag"
26460                          || test ! -s conftest.err'
26461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26462   (eval $ac_try) 2>&5
26463   ac_status=$?
26464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26465   (exit $ac_status); }; } &&
26466          { ac_try='test -s conftest.$ac_objext'
26467   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26468   (eval $ac_try) 2>&5
26469   ac_status=$?
26470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26471   (exit $ac_status); }; }; then
26472   ac_header_compiler=yes
26473 else
26474   echo "$as_me: failed program was:" >&5
26475 sed 's/^/| /' conftest.$ac_ext >&5
26476
26477 ac_header_compiler=no
26478 fi
26479 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26480 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26481 echo "${ECHO_T}$ac_header_compiler" >&6
26482
26483 # Is the header present?
26484 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26485 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26486 cat >conftest.$ac_ext <<_ACEOF
26487 /* confdefs.h.  */
26488 _ACEOF
26489 cat confdefs.h >>conftest.$ac_ext
26490 cat >>conftest.$ac_ext <<_ACEOF
26491 /* end confdefs.h.  */
26492 #include <$ac_header>
26493 _ACEOF
26494 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26495   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26496   ac_status=$?
26497   grep -v '^ *+' conftest.er1 >conftest.err
26498   rm -f conftest.er1
26499   cat conftest.err >&5
26500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26501   (exit $ac_status); } >/dev/null; then
26502   if test -s conftest.err; then
26503     ac_cpp_err=$ac_c_preproc_warn_flag
26504     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26505   else
26506     ac_cpp_err=
26507   fi
26508 else
26509   ac_cpp_err=yes
26510 fi
26511 if test -z "$ac_cpp_err"; then
26512   ac_header_preproc=yes
26513 else
26514   echo "$as_me: failed program was:" >&5
26515 sed 's/^/| /' conftest.$ac_ext >&5
26516
26517   ac_header_preproc=no
26518 fi
26519 rm -f conftest.err conftest.$ac_ext
26520 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26521 echo "${ECHO_T}$ac_header_preproc" >&6
26522
26523 # So?  What about this header?
26524 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26525   yes:no: )
26526     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26527 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26528     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26529 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26530     ac_header_preproc=yes
26531     ;;
26532   no:yes:* )
26533     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26534 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26535     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26536 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26537     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26538 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26539     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26540 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26541     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26542 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26543     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26544 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26545     (
26546       cat <<\_ASBOX
26547 ## --------------------------------------------- ##
26548 ## Report this to <http://www.openldap.org/its/> ##
26549 ## --------------------------------------------- ##
26550 _ASBOX
26551     ) |
26552       sed "s/^/$as_me: WARNING:     /" >&2
26553     ;;
26554 esac
26555 echo "$as_me:$LINENO: checking for $ac_header" >&5
26556 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26557 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26558   echo $ECHO_N "(cached) $ECHO_C" >&6
26559 else
26560   eval "$as_ac_Header=\$ac_header_preproc"
26561 fi
26562 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26563 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26564
26565 fi
26566 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26567   cat >>confdefs.h <<_ACEOF
26568 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26569 _ACEOF
26570
26571 fi
26572
26573 done
26574
26575
26576
26577 for ac_func in sched_yield pthread_yield
26578 do
26579 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
26580 echo "$as_me:$LINENO: checking for $ac_func" >&5
26581 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
26582 if eval "test \"\${$as_ac_var+set}\" = set"; then
26583   echo $ECHO_N "(cached) $ECHO_C" >&6
26584 else
26585   cat >conftest.$ac_ext <<_ACEOF
26586 /* confdefs.h.  */
26587 _ACEOF
26588 cat confdefs.h >>conftest.$ac_ext
26589 cat >>conftest.$ac_ext <<_ACEOF
26590 /* end confdefs.h.  */
26591 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
26592    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
26593 #define $ac_func innocuous_$ac_func
26594
26595 /* System header to define __stub macros and hopefully few prototypes,
26596     which can conflict with char $ac_func (); below.
26597     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
26598     <limits.h> exists even on freestanding compilers.  */
26599
26600 #ifdef __STDC__
26601 # include <limits.h>
26602 #else
26603 # include <assert.h>
26604 #endif
26605
26606 #undef $ac_func
26607
26608 /* Override any gcc2 internal prototype to avoid an error.  */
26609 #ifdef __cplusplus
26610 extern "C"
26611 {
26612 #endif
26613 /* We use char because int might match the return type of a gcc2
26614    builtin and then its argument prototype would still apply.  */
26615 char $ac_func ();
26616 /* The GNU C library defines this for functions which it implements
26617     to always fail with ENOSYS.  Some functions are actually named
26618     something starting with __ and the normal name is an alias.  */
26619 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
26620 choke me
26621 #else
26622 char (*f) () = $ac_func;
26623 #endif
26624 #ifdef __cplusplus
26625 }
26626 #endif
26627
26628 int
26629 main ()
26630 {
26631 return f != $ac_func;
26632   ;
26633   return 0;
26634 }
26635 _ACEOF
26636 rm -f conftest.$ac_objext conftest$ac_exeext
26637 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26638   (eval $ac_link) 2>conftest.er1
26639   ac_status=$?
26640   grep -v '^ *+' conftest.er1 >conftest.err
26641   rm -f conftest.er1
26642   cat conftest.err >&5
26643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26644   (exit $ac_status); } &&
26645          { ac_try='test -z "$ac_c_werror_flag"
26646                          || test ! -s conftest.err'
26647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26648   (eval $ac_try) 2>&5
26649   ac_status=$?
26650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26651   (exit $ac_status); }; } &&
26652          { ac_try='test -s conftest$ac_exeext'
26653   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26654   (eval $ac_try) 2>&5
26655   ac_status=$?
26656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26657   (exit $ac_status); }; }; then
26658   eval "$as_ac_var=yes"
26659 else
26660   echo "$as_me: failed program was:" >&5
26661 sed 's/^/| /' conftest.$ac_ext >&5
26662
26663 eval "$as_ac_var=no"
26664 fi
26665 rm -f conftest.err conftest.$ac_objext \
26666       conftest$ac_exeext conftest.$ac_ext
26667 fi
26668 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
26669 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
26670 if test `eval echo '${'$as_ac_var'}'` = yes; then
26671   cat >>confdefs.h <<_ACEOF
26672 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
26673 _ACEOF
26674
26675 fi
26676 done
26677
26678
26679         echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5
26680 echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6
26681 if test "${ol_cv_header_linux_threads+set}" = set; then
26682   echo $ECHO_N "(cached) $ECHO_C" >&6
26683 else
26684   cat >conftest.$ac_ext <<_ACEOF
26685 /* confdefs.h.  */
26686 _ACEOF
26687 cat confdefs.h >>conftest.$ac_ext
26688 cat >>conftest.$ac_ext <<_ACEOF
26689 /* end confdefs.h.  */
26690 #include <pthread.h>
26691 _ACEOF
26692 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26693   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then
26694   ol_cv_header_linux_threads=yes
26695 else
26696   ol_cv_header_linux_threads=no
26697 fi
26698 rm -f conftest*
26699
26700
26701 fi
26702 echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5
26703 echo "${ECHO_T}$ol_cv_header_linux_threads" >&6
26704         if test $ol_cv_header_linux_threads = yes; then
26705
26706 cat >>confdefs.h <<\_ACEOF
26707 #define HAVE_LINUX_THREADS 1
26708 _ACEOF
26709
26710         fi
26711
26712
26713
26714 for ac_header in mach/cthreads.h
26715 do
26716 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26717 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26718   echo "$as_me:$LINENO: checking for $ac_header" >&5
26719 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26720 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26721   echo $ECHO_N "(cached) $ECHO_C" >&6
26722 fi
26723 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26724 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26725 else
26726   # Is the header compilable?
26727 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26728 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26729 cat >conftest.$ac_ext <<_ACEOF
26730 /* confdefs.h.  */
26731 _ACEOF
26732 cat confdefs.h >>conftest.$ac_ext
26733 cat >>conftest.$ac_ext <<_ACEOF
26734 /* end confdefs.h.  */
26735 $ac_includes_default
26736 #include <$ac_header>
26737 _ACEOF
26738 rm -f conftest.$ac_objext
26739 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26740   (eval $ac_compile) 2>conftest.er1
26741   ac_status=$?
26742   grep -v '^ *+' conftest.er1 >conftest.err
26743   rm -f conftest.er1
26744   cat conftest.err >&5
26745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26746   (exit $ac_status); } &&
26747          { ac_try='test -z "$ac_c_werror_flag"
26748                          || test ! -s conftest.err'
26749   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26750   (eval $ac_try) 2>&5
26751   ac_status=$?
26752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26753   (exit $ac_status); }; } &&
26754          { ac_try='test -s conftest.$ac_objext'
26755   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26756   (eval $ac_try) 2>&5
26757   ac_status=$?
26758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26759   (exit $ac_status); }; }; then
26760   ac_header_compiler=yes
26761 else
26762   echo "$as_me: failed program was:" >&5
26763 sed 's/^/| /' conftest.$ac_ext >&5
26764
26765 ac_header_compiler=no
26766 fi
26767 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26768 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26769 echo "${ECHO_T}$ac_header_compiler" >&6
26770
26771 # Is the header present?
26772 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26773 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26774 cat >conftest.$ac_ext <<_ACEOF
26775 /* confdefs.h.  */
26776 _ACEOF
26777 cat confdefs.h >>conftest.$ac_ext
26778 cat >>conftest.$ac_ext <<_ACEOF
26779 /* end confdefs.h.  */
26780 #include <$ac_header>
26781 _ACEOF
26782 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26783   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26784   ac_status=$?
26785   grep -v '^ *+' conftest.er1 >conftest.err
26786   rm -f conftest.er1
26787   cat conftest.err >&5
26788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26789   (exit $ac_status); } >/dev/null; then
26790   if test -s conftest.err; then
26791     ac_cpp_err=$ac_c_preproc_warn_flag
26792     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26793   else
26794     ac_cpp_err=
26795   fi
26796 else
26797   ac_cpp_err=yes
26798 fi
26799 if test -z "$ac_cpp_err"; then
26800   ac_header_preproc=yes
26801 else
26802   echo "$as_me: failed program was:" >&5
26803 sed 's/^/| /' conftest.$ac_ext >&5
26804
26805   ac_header_preproc=no
26806 fi
26807 rm -f conftest.err conftest.$ac_ext
26808 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26809 echo "${ECHO_T}$ac_header_preproc" >&6
26810
26811 # So?  What about this header?
26812 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26813   yes:no: )
26814     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26815 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26816     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26817 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26818     ac_header_preproc=yes
26819     ;;
26820   no:yes:* )
26821     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26822 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26823     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26824 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26825     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26826 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26827     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26828 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26829     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26830 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26831     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26832 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26833     (
26834       cat <<\_ASBOX
26835 ## --------------------------------------------- ##
26836 ## Report this to <http://www.openldap.org/its/> ##
26837 ## --------------------------------------------- ##
26838 _ASBOX
26839     ) |
26840       sed "s/^/$as_me: WARNING:     /" >&2
26841     ;;
26842 esac
26843 echo "$as_me:$LINENO: checking for $ac_header" >&5
26844 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26845 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26846   echo $ECHO_N "(cached) $ECHO_C" >&6
26847 else
26848   eval "$as_ac_Header=\$ac_header_preproc"
26849 fi
26850 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26851 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26852
26853 fi
26854 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26855   cat >>confdefs.h <<_ACEOF
26856 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26857 _ACEOF
26858
26859 fi
26860
26861 done
26862
26863
26864 for ac_header in lwp/lwp.h
26865 do
26866 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26867 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26868   echo "$as_me:$LINENO: checking for $ac_header" >&5
26869 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26870 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26871   echo $ECHO_N "(cached) $ECHO_C" >&6
26872 fi
26873 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26874 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26875 else
26876   # Is the header compilable?
26877 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26878 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26879 cat >conftest.$ac_ext <<_ACEOF
26880 /* confdefs.h.  */
26881 _ACEOF
26882 cat confdefs.h >>conftest.$ac_ext
26883 cat >>conftest.$ac_ext <<_ACEOF
26884 /* end confdefs.h.  */
26885 $ac_includes_default
26886 #include <$ac_header>
26887 _ACEOF
26888 rm -f conftest.$ac_objext
26889 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26890   (eval $ac_compile) 2>conftest.er1
26891   ac_status=$?
26892   grep -v '^ *+' conftest.er1 >conftest.err
26893   rm -f conftest.er1
26894   cat conftest.err >&5
26895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26896   (exit $ac_status); } &&
26897          { ac_try='test -z "$ac_c_werror_flag"
26898                          || test ! -s conftest.err'
26899   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26900   (eval $ac_try) 2>&5
26901   ac_status=$?
26902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26903   (exit $ac_status); }; } &&
26904          { ac_try='test -s conftest.$ac_objext'
26905   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26906   (eval $ac_try) 2>&5
26907   ac_status=$?
26908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26909   (exit $ac_status); }; }; then
26910   ac_header_compiler=yes
26911 else
26912   echo "$as_me: failed program was:" >&5
26913 sed 's/^/| /' conftest.$ac_ext >&5
26914
26915 ac_header_compiler=no
26916 fi
26917 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26918 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26919 echo "${ECHO_T}$ac_header_compiler" >&6
26920
26921 # Is the header present?
26922 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26923 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26924 cat >conftest.$ac_ext <<_ACEOF
26925 /* confdefs.h.  */
26926 _ACEOF
26927 cat confdefs.h >>conftest.$ac_ext
26928 cat >>conftest.$ac_ext <<_ACEOF
26929 /* end confdefs.h.  */
26930 #include <$ac_header>
26931 _ACEOF
26932 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26933   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26934   ac_status=$?
26935   grep -v '^ *+' conftest.er1 >conftest.err
26936   rm -f conftest.er1
26937   cat conftest.err >&5
26938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26939   (exit $ac_status); } >/dev/null; then
26940   if test -s conftest.err; then
26941     ac_cpp_err=$ac_c_preproc_warn_flag
26942     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26943   else
26944     ac_cpp_err=
26945   fi
26946 else
26947   ac_cpp_err=yes
26948 fi
26949 if test -z "$ac_cpp_err"; then
26950   ac_header_preproc=yes
26951 else
26952   echo "$as_me: failed program was:" >&5
26953 sed 's/^/| /' conftest.$ac_ext >&5
26954
26955   ac_header_preproc=no
26956 fi
26957 rm -f conftest.err conftest.$ac_ext
26958 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26959 echo "${ECHO_T}$ac_header_preproc" >&6
26960
26961 # So?  What about this header?
26962 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26963   yes:no: )
26964     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26965 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26966     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26967 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26968     ac_header_preproc=yes
26969     ;;
26970   no:yes:* )
26971     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26972 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26973     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26974 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26975     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26976 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26977     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26978 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26979     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26980 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26981     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26982 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26983     (
26984       cat <<\_ASBOX
26985 ## --------------------------------------------- ##
26986 ## Report this to <http://www.openldap.org/its/> ##
26987 ## --------------------------------------------- ##
26988 _ASBOX
26989     ) |
26990       sed "s/^/$as_me: WARNING:     /" >&2
26991     ;;
26992 esac
26993 echo "$as_me:$LINENO: checking for $ac_header" >&5
26994 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26995 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26996   echo $ECHO_N "(cached) $ECHO_C" >&6
26997 else
26998   eval "$as_ac_Header=\$ac_header_preproc"
26999 fi
27000 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27001 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27002
27003 fi
27004 if test `eval echo '${'$as_ac_Header'}'` = yes; then
27005   cat >>confdefs.h <<_ACEOF
27006 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
27007 _ACEOF
27008
27009 fi
27010
27011 done
27012
27013
27014
27015 for ac_header in thread.h synch.h
27016 do
27017 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
27018 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27019   echo "$as_me:$LINENO: checking for $ac_header" >&5
27020 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27021 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27022   echo $ECHO_N "(cached) $ECHO_C" >&6
27023 fi
27024 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27025 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27026 else
27027   # Is the header compilable?
27028 echo "$as_me:$LINENO: checking $ac_header usability" >&5
27029 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
27030 cat >conftest.$ac_ext <<_ACEOF
27031 /* confdefs.h.  */
27032 _ACEOF
27033 cat confdefs.h >>conftest.$ac_ext
27034 cat >>conftest.$ac_ext <<_ACEOF
27035 /* end confdefs.h.  */
27036 $ac_includes_default
27037 #include <$ac_header>
27038 _ACEOF
27039 rm -f conftest.$ac_objext
27040 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27041   (eval $ac_compile) 2>conftest.er1
27042   ac_status=$?
27043   grep -v '^ *+' conftest.er1 >conftest.err
27044   rm -f conftest.er1
27045   cat conftest.err >&5
27046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27047   (exit $ac_status); } &&
27048          { ac_try='test -z "$ac_c_werror_flag"
27049                          || test ! -s conftest.err'
27050   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27051   (eval $ac_try) 2>&5
27052   ac_status=$?
27053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27054   (exit $ac_status); }; } &&
27055          { ac_try='test -s conftest.$ac_objext'
27056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27057   (eval $ac_try) 2>&5
27058   ac_status=$?
27059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27060   (exit $ac_status); }; }; then
27061   ac_header_compiler=yes
27062 else
27063   echo "$as_me: failed program was:" >&5
27064 sed 's/^/| /' conftest.$ac_ext >&5
27065
27066 ac_header_compiler=no
27067 fi
27068 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27069 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27070 echo "${ECHO_T}$ac_header_compiler" >&6
27071
27072 # Is the header present?
27073 echo "$as_me:$LINENO: checking $ac_header presence" >&5
27074 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
27075 cat >conftest.$ac_ext <<_ACEOF
27076 /* confdefs.h.  */
27077 _ACEOF
27078 cat confdefs.h >>conftest.$ac_ext
27079 cat >>conftest.$ac_ext <<_ACEOF
27080 /* end confdefs.h.  */
27081 #include <$ac_header>
27082 _ACEOF
27083 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
27084   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
27085   ac_status=$?
27086   grep -v '^ *+' conftest.er1 >conftest.err
27087   rm -f conftest.er1
27088   cat conftest.err >&5
27089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27090   (exit $ac_status); } >/dev/null; then
27091   if test -s conftest.err; then
27092     ac_cpp_err=$ac_c_preproc_warn_flag
27093     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
27094   else
27095     ac_cpp_err=
27096   fi
27097 else
27098   ac_cpp_err=yes
27099 fi
27100 if test -z "$ac_cpp_err"; then
27101   ac_header_preproc=yes
27102 else
27103   echo "$as_me: failed program was:" >&5
27104 sed 's/^/| /' conftest.$ac_ext >&5
27105
27106   ac_header_preproc=no
27107 fi
27108 rm -f conftest.err conftest.$ac_ext
27109 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27110 echo "${ECHO_T}$ac_header_preproc" >&6
27111
27112 # So?  What about this header?
27113 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
27114   yes:no: )
27115     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27116 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27117     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
27118 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
27119     ac_header_preproc=yes
27120     ;;
27121   no:yes:* )
27122     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27123 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27124     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
27125 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
27126     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
27127 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
27128     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
27129 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
27130     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27131 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27132     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
27133 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
27134     (
27135       cat <<\_ASBOX
27136 ## --------------------------------------------- ##
27137 ## Report this to <http://www.openldap.org/its/> ##
27138 ## --------------------------------------------- ##
27139 _ASBOX
27140     ) |
27141       sed "s/^/$as_me: WARNING:     /" >&2
27142     ;;
27143 esac
27144 echo "$as_me:$LINENO: checking for $ac_header" >&5
27145 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27146 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27147   echo $ECHO_N "(cached) $ECHO_C" >&6
27148 else
27149   eval "$as_ac_Header=\$ac_header_preproc"
27150 fi
27151 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27152 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27153
27154 fi
27155 if test `eval echo '${'$as_ac_Header'}'` = yes; then
27156   cat >>confdefs.h <<_ACEOF
27157 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
27158 _ACEOF
27159
27160 fi
27161
27162 done
27163
27164 fi
27165
27166 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
27167                         cat >>confdefs.h <<\_ACEOF
27168 #define REENTRANT 1
27169 _ACEOF
27170
27171         cat >>confdefs.h <<\_ACEOF
27172 #define _REENTRANT 1
27173 _ACEOF
27174
27175         cat >>confdefs.h <<\_ACEOF
27176 #define THREAD_SAFE 1
27177 _ACEOF
27178
27179         cat >>confdefs.h <<\_ACEOF
27180 #define _THREAD_SAFE 1
27181 _ACEOF
27182
27183         cat >>confdefs.h <<\_ACEOF
27184 #define THREADSAFE 1
27185 _ACEOF
27186
27187         cat >>confdefs.h <<\_ACEOF
27188 #define _THREADSAFE 1
27189 _ACEOF
27190
27191         cat >>confdefs.h <<\_ACEOF
27192 #define _SGI_MP_SOURCE 1
27193 _ACEOF
27194
27195
27196                         echo "$as_me:$LINENO: checking for thread specific errno" >&5
27197 echo $ECHO_N "checking for thread specific errno... $ECHO_C" >&6
27198 if test "${ol_cv_errno_thread_specific+set}" = set; then
27199   echo $ECHO_N "(cached) $ECHO_C" >&6
27200 else
27201
27202                 cat >conftest.$ac_ext <<_ACEOF
27203 /* confdefs.h.  */
27204 _ACEOF
27205 cat confdefs.h >>conftest.$ac_ext
27206 cat >>conftest.$ac_ext <<_ACEOF
27207 /* end confdefs.h.  */
27208 #include <errno.h>
27209 int
27210 main ()
27211 {
27212 errno = 0;
27213   ;
27214   return 0;
27215 }
27216 _ACEOF
27217 rm -f conftest.$ac_objext conftest$ac_exeext
27218 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27219   (eval $ac_link) 2>conftest.er1
27220   ac_status=$?
27221   grep -v '^ *+' conftest.er1 >conftest.err
27222   rm -f conftest.er1
27223   cat conftest.err >&5
27224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27225   (exit $ac_status); } &&
27226          { ac_try='test -z "$ac_c_werror_flag"
27227                          || test ! -s conftest.err'
27228   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27229   (eval $ac_try) 2>&5
27230   ac_status=$?
27231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27232   (exit $ac_status); }; } &&
27233          { ac_try='test -s conftest$ac_exeext'
27234   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27235   (eval $ac_try) 2>&5
27236   ac_status=$?
27237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27238   (exit $ac_status); }; }; then
27239   ol_cv_errno_thread_specific=yes
27240 else
27241   echo "$as_me: failed program was:" >&5
27242 sed 's/^/| /' conftest.$ac_ext >&5
27243
27244 ol_cv_errno_thread_specific=no
27245 fi
27246 rm -f conftest.err conftest.$ac_objext \
27247       conftest$ac_exeext conftest.$ac_ext
27248
27249 fi
27250 echo "$as_me:$LINENO: result: $ol_cv_errno_thread_specific" >&5
27251 echo "${ECHO_T}$ol_cv_errno_thread_specific" >&6
27252
27253                         echo "$as_me:$LINENO: checking for thread specific h_errno" >&5
27254 echo $ECHO_N "checking for thread specific h_errno... $ECHO_C" >&6
27255 if test "${ol_cv_h_errno_thread_specific+set}" = set; then
27256   echo $ECHO_N "(cached) $ECHO_C" >&6
27257 else
27258
27259                 cat >conftest.$ac_ext <<_ACEOF
27260 /* confdefs.h.  */
27261 _ACEOF
27262 cat confdefs.h >>conftest.$ac_ext
27263 cat >>conftest.$ac_ext <<_ACEOF
27264 /* end confdefs.h.  */
27265 #include <netdb.h>
27266 int
27267 main ()
27268 {
27269 h_errno = 0;
27270   ;
27271   return 0;
27272 }
27273 _ACEOF
27274 rm -f conftest.$ac_objext conftest$ac_exeext
27275 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27276   (eval $ac_link) 2>conftest.er1
27277   ac_status=$?
27278   grep -v '^ *+' conftest.er1 >conftest.err
27279   rm -f conftest.er1
27280   cat conftest.err >&5
27281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27282   (exit $ac_status); } &&
27283          { ac_try='test -z "$ac_c_werror_flag"
27284                          || test ! -s conftest.err'
27285   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27286   (eval $ac_try) 2>&5
27287   ac_status=$?
27288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27289   (exit $ac_status); }; } &&
27290          { ac_try='test -s conftest$ac_exeext'
27291   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27292   (eval $ac_try) 2>&5
27293   ac_status=$?
27294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27295   (exit $ac_status); }; }; then
27296   ol_cv_h_errno_thread_specific=yes
27297 else
27298   echo "$as_me: failed program was:" >&5
27299 sed 's/^/| /' conftest.$ac_ext >&5
27300
27301 ol_cv_h_errno_thread_specific=no
27302 fi
27303 rm -f conftest.err conftest.$ac_objext \
27304       conftest$ac_exeext conftest.$ac_ext
27305
27306 fi
27307 echo "$as_me:$LINENO: result: $ol_cv_h_errno_thread_specific" >&5
27308 echo "${ECHO_T}$ol_cv_h_errno_thread_specific" >&6
27309
27310         if test $ol_cv_errno_thread_specific != yes ||
27311            test $ol_cv_h_errno_thread_specific != yes ; then
27312                 LIBS="$LTHREAD_LIBS $LIBS"
27313                 LTHREAD_LIBS=""
27314         fi
27315
27316 fi
27317
27318 if test $ol_link_threads = no ; then
27319         if test $ol_with_threads = yes ; then
27320                 { { echo "$as_me:$LINENO: error: no suitable thread support" >&5
27321 echo "$as_me: error: no suitable thread support" >&2;}
27322    { (exit 1); exit 1; }; }
27323         fi
27324
27325         if test $ol_with_threads = auto ; then
27326                 { echo "$as_me:$LINENO: WARNING: no suitable thread support, disabling threads" >&5
27327 echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
27328                 ol_with_threads=no
27329         fi
27330
27331
27332 cat >>confdefs.h <<\_ACEOF
27333 #define NO_THREADS 1
27334 _ACEOF
27335
27336         LTHREAD_LIBS=""
27337         BUILD_THREAD=no
27338 else
27339         BUILD_THREAD=yes
27340 fi
27341
27342 if test $ol_link_threads != no ; then
27343
27344 cat >>confdefs.h <<\_ACEOF
27345 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
27346 _ACEOF
27347
27348 fi
27349
27350
27351
27352
27353 for ac_func in \
27354         ctime_r                 \
27355         gethostbyname_r gethostbyaddr_r \
27356
27357 do
27358 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
27359 echo "$as_me:$LINENO: checking for $ac_func" >&5
27360 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
27361 if eval "test \"\${$as_ac_var+set}\" = set"; then
27362   echo $ECHO_N "(cached) $ECHO_C" >&6
27363 else
27364   cat >conftest.$ac_ext <<_ACEOF
27365 /* confdefs.h.  */
27366 _ACEOF
27367 cat confdefs.h >>conftest.$ac_ext
27368 cat >>conftest.$ac_ext <<_ACEOF
27369 /* end confdefs.h.  */
27370 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
27371    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
27372 #define $ac_func innocuous_$ac_func
27373
27374 /* System header to define __stub macros and hopefully few prototypes,
27375     which can conflict with char $ac_func (); below.
27376     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
27377     <limits.h> exists even on freestanding compilers.  */
27378
27379 #ifdef __STDC__
27380 # include <limits.h>
27381 #else
27382 # include <assert.h>
27383 #endif
27384
27385 #undef $ac_func
27386
27387 /* Override any gcc2 internal prototype to avoid an error.  */
27388 #ifdef __cplusplus
27389 extern "C"
27390 {
27391 #endif
27392 /* We use char because int might match the return type of a gcc2
27393    builtin and then its argument prototype would still apply.  */
27394 char $ac_func ();
27395 /* The GNU C library defines this for functions which it implements
27396     to always fail with ENOSYS.  Some functions are actually named
27397     something starting with __ and the normal name is an alias.  */
27398 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
27399 choke me
27400 #else
27401 char (*f) () = $ac_func;
27402 #endif
27403 #ifdef __cplusplus
27404 }
27405 #endif
27406
27407 int
27408 main ()
27409 {
27410 return f != $ac_func;
27411   ;
27412   return 0;
27413 }
27414 _ACEOF
27415 rm -f conftest.$ac_objext conftest$ac_exeext
27416 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27417   (eval $ac_link) 2>conftest.er1
27418   ac_status=$?
27419   grep -v '^ *+' conftest.er1 >conftest.err
27420   rm -f conftest.er1
27421   cat conftest.err >&5
27422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27423   (exit $ac_status); } &&
27424          { ac_try='test -z "$ac_c_werror_flag"
27425                          || test ! -s conftest.err'
27426   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27427   (eval $ac_try) 2>&5
27428   ac_status=$?
27429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27430   (exit $ac_status); }; } &&
27431          { ac_try='test -s conftest$ac_exeext'
27432   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27433   (eval $ac_try) 2>&5
27434   ac_status=$?
27435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27436   (exit $ac_status); }; }; then
27437   eval "$as_ac_var=yes"
27438 else
27439   echo "$as_me: failed program was:" >&5
27440 sed 's/^/| /' conftest.$ac_ext >&5
27441
27442 eval "$as_ac_var=no"
27443 fi
27444 rm -f conftest.err conftest.$ac_objext \
27445       conftest$ac_exeext conftest.$ac_ext
27446 fi
27447 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
27448 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
27449 if test `eval echo '${'$as_ac_var'}'` = yes; then
27450   cat >>confdefs.h <<_ACEOF
27451 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
27452 _ACEOF
27453
27454 fi
27455 done
27456
27457
27458 if test "$ac_cv_func_ctime_r" = no ; then
27459         ol_cv_func_ctime_r_nargs=0
27460 else
27461         echo "$as_me:$LINENO: checking number of arguments of ctime_r" >&5
27462 echo $ECHO_N "checking number of arguments of ctime_r... $ECHO_C" >&6
27463 if test "${ol_cv_func_ctime_r_nargs+set}" = set; then
27464   echo $ECHO_N "(cached) $ECHO_C" >&6
27465 else
27466   cat >conftest.$ac_ext <<_ACEOF
27467 /* confdefs.h.  */
27468 _ACEOF
27469 cat confdefs.h >>conftest.$ac_ext
27470 cat >>conftest.$ac_ext <<_ACEOF
27471 /* end confdefs.h.  */
27472 #include <time.h>
27473 int
27474 main ()
27475 {
27476 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
27477   ;
27478   return 0;
27479 }
27480 _ACEOF
27481 rm -f conftest.$ac_objext
27482 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27483   (eval $ac_compile) 2>conftest.er1
27484   ac_status=$?
27485   grep -v '^ *+' conftest.er1 >conftest.err
27486   rm -f conftest.er1
27487   cat conftest.err >&5
27488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27489   (exit $ac_status); } &&
27490          { ac_try='test -z "$ac_c_werror_flag"
27491                          || test ! -s conftest.err'
27492   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27493   (eval $ac_try) 2>&5
27494   ac_status=$?
27495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27496   (exit $ac_status); }; } &&
27497          { ac_try='test -s conftest.$ac_objext'
27498   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27499   (eval $ac_try) 2>&5
27500   ac_status=$?
27501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27502   (exit $ac_status); }; }; then
27503   ol_cv_func_ctime_r_nargs3=yes
27504 else
27505   echo "$as_me: failed program was:" >&5
27506 sed 's/^/| /' conftest.$ac_ext >&5
27507
27508 ol_cv_func_ctime_r_nargs3=no
27509 fi
27510 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27511
27512         cat >conftest.$ac_ext <<_ACEOF
27513 /* confdefs.h.  */
27514 _ACEOF
27515 cat confdefs.h >>conftest.$ac_ext
27516 cat >>conftest.$ac_ext <<_ACEOF
27517 /* end confdefs.h.  */
27518 #include <time.h>
27519 int
27520 main ()
27521 {
27522 time_t ti; char *buffer; ctime_r(&ti,buffer);
27523   ;
27524   return 0;
27525 }
27526 _ACEOF
27527 rm -f conftest.$ac_objext
27528 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27529   (eval $ac_compile) 2>conftest.er1
27530   ac_status=$?
27531   grep -v '^ *+' conftest.er1 >conftest.err
27532   rm -f conftest.er1
27533   cat conftest.err >&5
27534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27535   (exit $ac_status); } &&
27536          { ac_try='test -z "$ac_c_werror_flag"
27537                          || test ! -s conftest.err'
27538   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27539   (eval $ac_try) 2>&5
27540   ac_status=$?
27541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27542   (exit $ac_status); }; } &&
27543          { ac_try='test -s conftest.$ac_objext'
27544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27545   (eval $ac_try) 2>&5
27546   ac_status=$?
27547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27548   (exit $ac_status); }; }; then
27549   ol_cv_func_ctime_r_nargs2=yes
27550 else
27551   echo "$as_me: failed program was:" >&5
27552 sed 's/^/| /' conftest.$ac_ext >&5
27553
27554 ol_cv_func_ctime_r_nargs2=no
27555 fi
27556 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27557
27558         if test $ol_cv_func_ctime_r_nargs3 = yes &&
27559            test $ol_cv_func_ctime_r_nargs2 = no ; then
27560
27561                 ol_cv_func_ctime_r_nargs=3
27562
27563         elif test $ol_cv_func_ctime_r_nargs3 = no &&
27564              test $ol_cv_func_ctime_r_nargs2 = yes ; then
27565
27566                 ol_cv_func_ctime_r_nargs=2
27567
27568         else
27569                 ol_cv_func_ctime_r_nargs=0
27570         fi
27571
27572 fi
27573 echo "$as_me:$LINENO: result: $ol_cv_func_ctime_r_nargs" >&5
27574 echo "${ECHO_T}$ol_cv_func_ctime_r_nargs" >&6
27575
27576   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
27577
27578 cat >>confdefs.h <<_ACEOF
27579 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
27580 _ACEOF
27581
27582   fi
27583
27584 fi
27585
27586 if test "$ac_cv_func_gethostbyname_r" = yes ; then
27587         echo "$as_me:$LINENO: checking number of arguments of gethostbyname_r" >&5
27588 echo $ECHO_N "checking number of arguments of gethostbyname_r... $ECHO_C" >&6
27589 if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then
27590   echo $ECHO_N "(cached) $ECHO_C" >&6
27591 else
27592   cat >conftest.$ac_ext <<_ACEOF
27593 /* confdefs.h.  */
27594 _ACEOF
27595 cat confdefs.h >>conftest.$ac_ext
27596 cat >>conftest.$ac_ext <<_ACEOF
27597 /* end confdefs.h.  */
27598 #include <sys/types.h>
27599 #include <sys/socket.h>
27600 #include <netinet/in.h>
27601 #include <netdb.h>
27602 #define BUFSIZE (sizeof(struct hostent)+10)
27603 int
27604 main ()
27605 {
27606 struct hostent hent; char buffer[BUFSIZE];
27607                 int bufsize=BUFSIZE;int h_errno;
27608                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
27609                         buffer, bufsize, &h_errno);
27610   ;
27611   return 0;
27612 }
27613 _ACEOF
27614 rm -f conftest.$ac_objext
27615 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27616   (eval $ac_compile) 2>conftest.er1
27617   ac_status=$?
27618   grep -v '^ *+' conftest.er1 >conftest.err
27619   rm -f conftest.er1
27620   cat conftest.err >&5
27621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27622   (exit $ac_status); } &&
27623          { ac_try='test -z "$ac_c_werror_flag"
27624                          || test ! -s conftest.err'
27625   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27626   (eval $ac_try) 2>&5
27627   ac_status=$?
27628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27629   (exit $ac_status); }; } &&
27630          { ac_try='test -s conftest.$ac_objext'
27631   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27632   (eval $ac_try) 2>&5
27633   ac_status=$?
27634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27635   (exit $ac_status); }; }; then
27636   ol_cv_func_gethostbyname_r_nargs5=yes
27637 else
27638   echo "$as_me: failed program was:" >&5
27639 sed 's/^/| /' conftest.$ac_ext >&5
27640
27641 ol_cv_func_gethostbyname_r_nargs5=no
27642 fi
27643 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27644
27645         cat >conftest.$ac_ext <<_ACEOF
27646 /* confdefs.h.  */
27647 _ACEOF
27648 cat confdefs.h >>conftest.$ac_ext
27649 cat >>conftest.$ac_ext <<_ACEOF
27650 /* end confdefs.h.  */
27651 #include <sys/types.h>
27652 #include <sys/socket.h>
27653 #include <netinet/in.h>
27654 #include <netdb.h>
27655 #define BUFSIZE (sizeof(struct hostent)+10)
27656 int
27657 main ()
27658 {
27659 struct hostent hent;struct hostent *rhent;
27660                 char buffer[BUFSIZE];
27661                 int bufsize=BUFSIZE;int h_errno;
27662                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
27663                         &rhent, &h_errno);
27664   ;
27665   return 0;
27666 }
27667 _ACEOF
27668 rm -f conftest.$ac_objext
27669 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27670   (eval $ac_compile) 2>conftest.er1
27671   ac_status=$?
27672   grep -v '^ *+' conftest.er1 >conftest.err
27673   rm -f conftest.er1
27674   cat conftest.err >&5
27675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27676   (exit $ac_status); } &&
27677          { ac_try='test -z "$ac_c_werror_flag"
27678                          || test ! -s conftest.err'
27679   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27680   (eval $ac_try) 2>&5
27681   ac_status=$?
27682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27683   (exit $ac_status); }; } &&
27684          { ac_try='test -s conftest.$ac_objext'
27685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27686   (eval $ac_try) 2>&5
27687   ac_status=$?
27688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27689   (exit $ac_status); }; }; then
27690   ol_cv_func_gethostbyname_r_nargs6=yes
27691 else
27692   echo "$as_me: failed program was:" >&5
27693 sed 's/^/| /' conftest.$ac_ext >&5
27694
27695 ol_cv_func_gethostbyname_r_nargs6=no
27696 fi
27697 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27698
27699         if test $ol_cv_func_gethostbyname_r_nargs5 = yes &&
27700            test $ol_cv_func_gethostbyname_r_nargs6 = no ; then
27701
27702                 ol_cv_func_gethostbyname_r_nargs=5
27703
27704         elif test $ol_cv_func_gethostbyname_r_nargs5 = no &&
27705              test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
27706
27707                 ol_cv_func_gethostbyname_r_nargs=6
27708
27709         else
27710                 ol_cv_func_gethostbyname_r_nargs=0
27711         fi
27712
27713 fi
27714 echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyname_r_nargs" >&5
27715 echo "${ECHO_T}$ol_cv_func_gethostbyname_r_nargs" >&6
27716   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
27717
27718 cat >>confdefs.h <<_ACEOF
27719 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
27720 _ACEOF
27721
27722   fi
27723
27724 else
27725         ol_cv_func_gethostbyname_r_nargs=0
27726 fi
27727
27728 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
27729         echo "$as_me:$LINENO: checking number of arguments of gethostbyaddr_r" >&5
27730 echo $ECHO_N "checking number of arguments of gethostbyaddr_r... $ECHO_C" >&6
27731 if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then
27732   echo $ECHO_N "(cached) $ECHO_C" >&6
27733 else
27734   cat >conftest.$ac_ext <<_ACEOF
27735 /* confdefs.h.  */
27736 _ACEOF
27737 cat confdefs.h >>conftest.$ac_ext
27738 cat >>conftest.$ac_ext <<_ACEOF
27739 /* end confdefs.h.  */
27740 #include <sys/types.h>
27741 #include <sys/socket.h>
27742 #include <netinet/in.h>
27743 #include <netdb.h>
27744 #define BUFSIZE (sizeof(struct hostent)+10)
27745 int
27746 main ()
27747 {
27748 struct hostent hent; char buffer[BUFSIZE];
27749             struct in_addr add;
27750             size_t alen=sizeof(struct in_addr);
27751             int bufsize=BUFSIZE;int h_errno;
27752                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
27753                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
27754   ;
27755   return 0;
27756 }
27757 _ACEOF
27758 rm -f conftest.$ac_objext
27759 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27760   (eval $ac_compile) 2>conftest.er1
27761   ac_status=$?
27762   grep -v '^ *+' conftest.er1 >conftest.err
27763   rm -f conftest.er1
27764   cat conftest.err >&5
27765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27766   (exit $ac_status); } &&
27767          { ac_try='test -z "$ac_c_werror_flag"
27768                          || test ! -s conftest.err'
27769   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27770   (eval $ac_try) 2>&5
27771   ac_status=$?
27772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27773   (exit $ac_status); }; } &&
27774          { ac_try='test -s conftest.$ac_objext'
27775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27776   (eval $ac_try) 2>&5
27777   ac_status=$?
27778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27779   (exit $ac_status); }; }; then
27780   ol_cv_func_gethostbyaddr_r_nargs7=yes
27781 else
27782   echo "$as_me: failed program was:" >&5
27783 sed 's/^/| /' conftest.$ac_ext >&5
27784
27785 ol_cv_func_gethostbyaddr_r_nargs7=no
27786 fi
27787 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27788
27789         cat >conftest.$ac_ext <<_ACEOF
27790 /* confdefs.h.  */
27791 _ACEOF
27792 cat confdefs.h >>conftest.$ac_ext
27793 cat >>conftest.$ac_ext <<_ACEOF
27794 /* end confdefs.h.  */
27795 #include <sys/types.h>
27796 #include <sys/socket.h>
27797 #include <netinet/in.h>
27798 #include <netdb.h>
27799 #define BUFSIZE (sizeof(struct hostent)+10)
27800 int
27801 main ()
27802 {
27803 struct hostent hent;
27804                 struct hostent *rhent; char buffer[BUFSIZE];
27805                 struct in_addr add;
27806                 size_t alen=sizeof(struct in_addr);
27807                 int bufsize=BUFSIZE;int h_errno;
27808                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
27809                         alen, AF_INET, &hent, buffer, bufsize,
27810                         &rhent, &h_errno);
27811   ;
27812   return 0;
27813 }
27814 _ACEOF
27815 rm -f conftest.$ac_objext
27816 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27817   (eval $ac_compile) 2>conftest.er1
27818   ac_status=$?
27819   grep -v '^ *+' conftest.er1 >conftest.err
27820   rm -f conftest.er1
27821   cat conftest.err >&5
27822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27823   (exit $ac_status); } &&
27824          { ac_try='test -z "$ac_c_werror_flag"
27825                          || test ! -s conftest.err'
27826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27827   (eval $ac_try) 2>&5
27828   ac_status=$?
27829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27830   (exit $ac_status); }; } &&
27831          { ac_try='test -s conftest.$ac_objext'
27832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27833   (eval $ac_try) 2>&5
27834   ac_status=$?
27835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27836   (exit $ac_status); }; }; then
27837   ol_cv_func_gethostbyaddr_r_nargs8=yes
27838 else
27839   echo "$as_me: failed program was:" >&5
27840 sed 's/^/| /' conftest.$ac_ext >&5
27841
27842 ol_cv_func_gethostbyaddr_r_nargs8=no
27843 fi
27844 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27845
27846         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes &&
27847            test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
27848
27849                 ol_cv_func_gethostbyaddr_r_nargs=7
27850
27851         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no &&
27852              test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
27853
27854                 ol_cv_func_gethostbyaddr_r_nargs=8
27855
27856         else
27857                 ol_cv_func_gethostbyaddr_r_nargs=0
27858         fi
27859
27860 fi
27861 echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5
27862 echo "${ECHO_T}$ol_cv_func_gethostbyaddr_r_nargs" >&6
27863   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
27864
27865 cat >>confdefs.h <<_ACEOF
27866 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
27867 _ACEOF
27868
27869   fi
27870
27871 else
27872         ol_cv_func_gethostbyaddr_r_nargs=0
27873 fi
27874
27875 ol_link_ldbm=no
27876
27877 case $ol_enable_ldbm_api in auto | berkeley | bcompat)
27878
27879         if test $ol_enable_ldbm_api = bcompat; then \
27880
27881
27882 for ac_header in db_185.h db.h
27883 do
27884 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
27885 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27886   echo "$as_me:$LINENO: checking for $ac_header" >&5
27887 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27888 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27889   echo $ECHO_N "(cached) $ECHO_C" >&6
27890 fi
27891 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27892 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27893 else
27894   # Is the header compilable?
27895 echo "$as_me:$LINENO: checking $ac_header usability" >&5
27896 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
27897 cat >conftest.$ac_ext <<_ACEOF
27898 /* confdefs.h.  */
27899 _ACEOF
27900 cat confdefs.h >>conftest.$ac_ext
27901 cat >>conftest.$ac_ext <<_ACEOF
27902 /* end confdefs.h.  */
27903 $ac_includes_default
27904 #include <$ac_header>
27905 _ACEOF
27906 rm -f conftest.$ac_objext
27907 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27908   (eval $ac_compile) 2>conftest.er1
27909   ac_status=$?
27910   grep -v '^ *+' conftest.er1 >conftest.err
27911   rm -f conftest.er1
27912   cat conftest.err >&5
27913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27914   (exit $ac_status); } &&
27915          { ac_try='test -z "$ac_c_werror_flag"
27916                          || test ! -s conftest.err'
27917   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27918   (eval $ac_try) 2>&5
27919   ac_status=$?
27920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27921   (exit $ac_status); }; } &&
27922          { ac_try='test -s conftest.$ac_objext'
27923   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27924   (eval $ac_try) 2>&5
27925   ac_status=$?
27926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27927   (exit $ac_status); }; }; then
27928   ac_header_compiler=yes
27929 else
27930   echo "$as_me: failed program was:" >&5
27931 sed 's/^/| /' conftest.$ac_ext >&5
27932
27933 ac_header_compiler=no
27934 fi
27935 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27936 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27937 echo "${ECHO_T}$ac_header_compiler" >&6
27938
27939 # Is the header present?
27940 echo "$as_me:$LINENO: checking $ac_header presence" >&5
27941 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
27942 cat >conftest.$ac_ext <<_ACEOF
27943 /* confdefs.h.  */
27944 _ACEOF
27945 cat confdefs.h >>conftest.$ac_ext
27946 cat >>conftest.$ac_ext <<_ACEOF
27947 /* end confdefs.h.  */
27948 #include <$ac_header>
27949 _ACEOF
27950 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
27951   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
27952   ac_status=$?
27953   grep -v '^ *+' conftest.er1 >conftest.err
27954   rm -f conftest.er1
27955   cat conftest.err >&5
27956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27957   (exit $ac_status); } >/dev/null; then
27958   if test -s conftest.err; then
27959     ac_cpp_err=$ac_c_preproc_warn_flag
27960     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
27961   else
27962     ac_cpp_err=
27963   fi
27964 else
27965   ac_cpp_err=yes
27966 fi
27967 if test -z "$ac_cpp_err"; then
27968   ac_header_preproc=yes
27969 else
27970   echo "$as_me: failed program was:" >&5
27971 sed 's/^/| /' conftest.$ac_ext >&5
27972
27973   ac_header_preproc=no
27974 fi
27975 rm -f conftest.err conftest.$ac_ext
27976 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27977 echo "${ECHO_T}$ac_header_preproc" >&6
27978
27979 # So?  What about this header?
27980 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
27981   yes:no: )
27982     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27983 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27984     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
27985 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
27986     ac_header_preproc=yes
27987     ;;
27988   no:yes:* )
27989     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27990 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27991     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
27992 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
27993     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
27994 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
27995     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
27996 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
27997     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27998 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27999     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
28000 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
28001     (
28002       cat <<\_ASBOX
28003 ## --------------------------------------------- ##
28004 ## Report this to <http://www.openldap.org/its/> ##
28005 ## --------------------------------------------- ##
28006 _ASBOX
28007     ) |
28008       sed "s/^/$as_me: WARNING:     /" >&2
28009     ;;
28010 esac
28011 echo "$as_me:$LINENO: checking for $ac_header" >&5
28012 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
28013 if eval "test \"\${$as_ac_Header+set}\" = set"; then
28014   echo $ECHO_N "(cached) $ECHO_C" >&6
28015 else
28016   eval "$as_ac_Header=\$ac_header_preproc"
28017 fi
28018 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
28019 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
28020
28021 fi
28022 if test `eval echo '${'$as_ac_Header'}'` = yes; then
28023   cat >>confdefs.h <<_ACEOF
28024 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
28025 _ACEOF
28026
28027 fi
28028
28029 done
28030
28031 if test $ac_cv_header_db_185_h = yes || test $ac_cv_header_db_h = yes; then
28032         echo "$as_me:$LINENO: checking if Berkeley DB header compatibility" >&5
28033 echo $ECHO_N "checking if Berkeley DB header compatibility... $ECHO_C" >&6
28034 if test "${ol_cv_header_db1+set}" = set; then
28035   echo $ECHO_N "(cached) $ECHO_C" >&6
28036 else
28037
28038                 cat >conftest.$ac_ext <<_ACEOF
28039 /* confdefs.h.  */
28040 _ACEOF
28041 cat confdefs.h >>conftest.$ac_ext
28042 cat >>conftest.$ac_ext <<_ACEOF
28043 /* end confdefs.h.  */
28044
28045 #if HAVE_DB_185_H
28046 #       include <db_185.h>
28047 #else
28048 #       include <db.h>
28049 #endif
28050
28051  /* this check could be improved */
28052 #ifndef DB_VERSION_MAJOR
28053 #       define DB_VERSION_MAJOR 1
28054 #endif
28055
28056 #if DB_VERSION_MAJOR == 1
28057         __db_version_1
28058 #endif
28059
28060 _ACEOF
28061 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28062   $EGREP "__db_version_1" >/dev/null 2>&1; then
28063   ol_cv_header_db1=yes
28064 else
28065   ol_cv_header_db1=no
28066 fi
28067 rm -f conftest*
28068
28069 fi
28070 echo "$as_me:$LINENO: result: $ol_cv_header_db1" >&5
28071 echo "${ECHO_T}$ol_cv_header_db1" >&6
28072
28073         if test $ol_cv_header_db1 = yes ; then
28074                 ol_cv_lib_db=no
28075
28076 echo "$as_me:$LINENO: checking for Berkeley DB major version" >&5
28077 echo $ECHO_N "checking for Berkeley DB major version... $ECHO_C" >&6
28078 if test "${ol_cv_bdb_major+set}" = set; then
28079   echo $ECHO_N "(cached) $ECHO_C" >&6
28080 else
28081
28082         ol_cv_bdb_major=0
28083         if test $ol_cv_bdb_major = 0 ; then
28084                 cat >conftest.$ac_ext <<_ACEOF
28085 /* confdefs.h.  */
28086 _ACEOF
28087 cat confdefs.h >>conftest.$ac_ext
28088 cat >>conftest.$ac_ext <<_ACEOF
28089 /* end confdefs.h.  */
28090
28091 #include <db.h>
28092 #ifndef DB_VERSION_MAJOR
28093 #       define DB_VERSION_MAJOR 1
28094 #endif
28095 #if DB_VERSION_MAJOR == 4
28096 __db_version
28097 #endif
28098
28099 _ACEOF
28100 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28101   $EGREP "__db_version" >/dev/null 2>&1; then
28102   ol_cv_bdb_major=4
28103 else
28104   :
28105 fi
28106 rm -f conftest*
28107
28108         fi
28109         if test $ol_cv_bdb_major = 0 ; then
28110                 cat >conftest.$ac_ext <<_ACEOF
28111 /* confdefs.h.  */
28112 _ACEOF
28113 cat confdefs.h >>conftest.$ac_ext
28114 cat >>conftest.$ac_ext <<_ACEOF
28115 /* end confdefs.h.  */
28116
28117 #include <db.h>
28118 #ifndef DB_VERSION_MAJOR
28119 #       define DB_VERSION_MAJOR 1
28120 #endif
28121 #if DB_VERSION_MAJOR == 3
28122 __db_version
28123 #endif
28124
28125 _ACEOF
28126 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28127   $EGREP "__db_version" >/dev/null 2>&1; then
28128   ol_cv_bdb_major=3
28129 else
28130   :
28131 fi
28132 rm -f conftest*
28133
28134         fi
28135         if test $ol_cv_bdb_major = 0 ; then
28136                 cat >conftest.$ac_ext <<_ACEOF
28137 /* confdefs.h.  */
28138 _ACEOF
28139 cat confdefs.h >>conftest.$ac_ext
28140 cat >>conftest.$ac_ext <<_ACEOF
28141 /* end confdefs.h.  */
28142
28143 #include <db.h>
28144 #ifndef DB_VERSION_MAJOR
28145 #       define DB_VERSION_MAJOR 1
28146 #endif
28147 #if DB_VERSION_MAJOR == 2
28148 __db_version
28149 #endif
28150
28151 _ACEOF
28152 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28153   $EGREP "__db_version" >/dev/null 2>&1; then
28154   ol_cv_bdb_major=2
28155 else
28156   :
28157 fi
28158 rm -f conftest*
28159
28160         fi
28161         if test $ol_cv_bdb_major = 0 ; then
28162                 cat >conftest.$ac_ext <<_ACEOF
28163 /* confdefs.h.  */
28164 _ACEOF
28165 cat confdefs.h >>conftest.$ac_ext
28166 cat >>conftest.$ac_ext <<_ACEOF
28167 /* end confdefs.h.  */
28168
28169 #include <db.h>
28170 #ifndef DB_VERSION_MAJOR
28171 #       define DB_VERSION_MAJOR 1
28172 #endif
28173 #if DB_VERSION_MAJOR == 1
28174 __db_version
28175 #endif
28176
28177 _ACEOF
28178 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28179   $EGREP "__db_version" >/dev/null 2>&1; then
28180   ol_cv_bdb_major=1
28181 else
28182   :
28183 fi
28184 rm -f conftest*
28185
28186         fi
28187
28188         if test $ol_cv_bdb_major = 0 ; then
28189                 { { echo "$as_me:$LINENO: error: Unknown Berkeley DB major version" >&5
28190 echo "$as_me: error: Unknown Berkeley DB major version" >&2;}
28191    { (exit 1); exit 1; }; }
28192         fi
28193
28194 fi
28195 echo "$as_me:$LINENO: result: $ol_cv_bdb_major" >&5
28196 echo "${ECHO_T}$ol_cv_bdb_major" >&6
28197
28198 echo "$as_me:$LINENO: checking for Berkeley DB minor version" >&5
28199 echo $ECHO_N "checking for Berkeley DB minor version... $ECHO_C" >&6
28200 if test "${ol_cv_bdb_minor+set}" = set; then
28201   echo $ECHO_N "(cached) $ECHO_C" >&6
28202 else
28203
28204         ol_cv_bdb_minor=0
28205         if test $ol_cv_bdb_minor = 0 ; then
28206                 cat >conftest.$ac_ext <<_ACEOF
28207 /* confdefs.h.  */
28208 _ACEOF
28209 cat confdefs.h >>conftest.$ac_ext
28210 cat >>conftest.$ac_ext <<_ACEOF
28211 /* end confdefs.h.  */
28212
28213 #include <db.h>
28214 #ifndef DB_VERSION_MINOR
28215 #       define DB_VERSION_MINOR 0
28216 #endif
28217 #if DB_VERSION_MINOR == 9
28218 __db_version
28219 #endif
28220
28221 _ACEOF
28222 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28223   $EGREP "__db_version" >/dev/null 2>&1; then
28224   ol_cv_bdb_minor=9
28225 else
28226   :
28227 fi
28228 rm -f conftest*
28229
28230         fi
28231         if test $ol_cv_bdb_minor = 0 ; then
28232                 cat >conftest.$ac_ext <<_ACEOF
28233 /* confdefs.h.  */
28234 _ACEOF
28235 cat confdefs.h >>conftest.$ac_ext
28236 cat >>conftest.$ac_ext <<_ACEOF
28237 /* end confdefs.h.  */
28238
28239 #include <db.h>
28240 #ifndef DB_VERSION_MINOR
28241 #       define DB_VERSION_MINOR 0
28242 #endif
28243 #if DB_VERSION_MINOR == 8
28244 __db_version
28245 #endif
28246
28247 _ACEOF
28248 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28249   $EGREP "__db_version" >/dev/null 2>&1; then
28250   ol_cv_bdb_minor=8
28251 else
28252   :
28253 fi
28254 rm -f conftest*
28255
28256         fi
28257         if test $ol_cv_bdb_minor = 0 ; then
28258                 cat >conftest.$ac_ext <<_ACEOF
28259 /* confdefs.h.  */
28260 _ACEOF
28261 cat confdefs.h >>conftest.$ac_ext
28262 cat >>conftest.$ac_ext <<_ACEOF
28263 /* end confdefs.h.  */
28264
28265 #include <db.h>
28266 #ifndef DB_VERSION_MINOR
28267 #       define DB_VERSION_MINOR 0
28268 #endif
28269 #if DB_VERSION_MINOR == 7
28270 __db_version
28271 #endif
28272
28273 _ACEOF
28274 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28275   $EGREP "__db_version" >/dev/null 2>&1; then
28276   ol_cv_bdb_minor=7
28277 else
28278   :
28279 fi
28280 rm -f conftest*
28281
28282         fi
28283         if test $ol_cv_bdb_minor = 0 ; then
28284                 cat >conftest.$ac_ext <<_ACEOF
28285 /* confdefs.h.  */
28286 _ACEOF
28287 cat confdefs.h >>conftest.$ac_ext
28288 cat >>conftest.$ac_ext <<_ACEOF
28289 /* end confdefs.h.  */
28290
28291 #include <db.h>
28292 #ifndef DB_VERSION_MINOR
28293 #       define DB_VERSION_MINOR 0
28294 #endif
28295 #if DB_VERSION_MINOR == 6
28296 __db_version
28297 #endif
28298
28299 _ACEOF
28300 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28301   $EGREP "__db_version" >/dev/null 2>&1; then
28302   ol_cv_bdb_minor=6
28303 else
28304   :
28305 fi
28306 rm -f conftest*
28307
28308         fi
28309         if test $ol_cv_bdb_minor = 0 ; then
28310                 cat >conftest.$ac_ext <<_ACEOF
28311 /* confdefs.h.  */
28312 _ACEOF
28313 cat confdefs.h >>conftest.$ac_ext
28314 cat >>conftest.$ac_ext <<_ACEOF
28315 /* end confdefs.h.  */
28316
28317 #include <db.h>
28318 #ifndef DB_VERSION_MINOR
28319 #       define DB_VERSION_MINOR 0
28320 #endif
28321 #if DB_VERSION_MINOR == 5
28322 __db_version
28323 #endif
28324
28325 _ACEOF
28326 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28327   $EGREP "__db_version" >/dev/null 2>&1; then
28328   ol_cv_bdb_minor=5
28329 else
28330   :
28331 fi
28332 rm -f conftest*
28333
28334         fi
28335         if test $ol_cv_bdb_minor = 0 ; then
28336                 cat >conftest.$ac_ext <<_ACEOF
28337 /* confdefs.h.  */
28338 _ACEOF
28339 cat confdefs.h >>conftest.$ac_ext
28340 cat >>conftest.$ac_ext <<_ACEOF
28341 /* end confdefs.h.  */
28342
28343 #include <db.h>
28344 #ifndef DB_VERSION_MINOR
28345 #       define DB_VERSION_MINOR 0
28346 #endif
28347 #if DB_VERSION_MINOR == 4
28348 __db_version
28349 #endif
28350
28351 _ACEOF
28352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28353   $EGREP "__db_version" >/dev/null 2>&1; then
28354   ol_cv_bdb_minor=4
28355 else
28356   :
28357 fi
28358 rm -f conftest*
28359
28360         fi
28361         if test $ol_cv_bdb_minor = 0 ; then
28362                 cat >conftest.$ac_ext <<_ACEOF
28363 /* confdefs.h.  */
28364 _ACEOF
28365 cat confdefs.h >>conftest.$ac_ext
28366 cat >>conftest.$ac_ext <<_ACEOF
28367 /* end confdefs.h.  */
28368
28369 #include <db.h>
28370 #ifndef DB_VERSION_MINOR
28371 #       define DB_VERSION_MINOR 0
28372 #endif
28373 #if DB_VERSION_MINOR == 3
28374 __db_version
28375 #endif
28376
28377 _ACEOF
28378 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28379   $EGREP "__db_version" >/dev/null 2>&1; then
28380   ol_cv_bdb_minor=3
28381 else
28382   :
28383 fi
28384 rm -f conftest*
28385
28386         fi
28387         if test $ol_cv_bdb_minor = 0 ; then
28388                 cat >conftest.$ac_ext <<_ACEOF
28389 /* confdefs.h.  */
28390 _ACEOF
28391 cat confdefs.h >>conftest.$ac_ext
28392 cat >>conftest.$ac_ext <<_ACEOF
28393 /* end confdefs.h.  */
28394
28395 #include <db.h>
28396 #ifndef DB_VERSION_MINOR
28397 #       define DB_VERSION_MINOR 0
28398 #endif
28399 #if DB_VERSION_MINOR == 2
28400 __db_version
28401 #endif
28402
28403 _ACEOF
28404 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28405   $EGREP "__db_version" >/dev/null 2>&1; then
28406   ol_cv_bdb_minor=2
28407 else
28408   :
28409 fi
28410 rm -f conftest*
28411
28412         fi
28413         if test $ol_cv_bdb_minor = 0 ; then
28414                 cat >conftest.$ac_ext <<_ACEOF
28415 /* confdefs.h.  */
28416 _ACEOF
28417 cat confdefs.h >>conftest.$ac_ext
28418 cat >>conftest.$ac_ext <<_ACEOF
28419 /* end confdefs.h.  */
28420
28421 #include <db.h>
28422 #ifndef DB_VERSION_MINOR
28423 #       define DB_VERSION_MINOR 0
28424 #endif
28425 #if DB_VERSION_MINOR == 1
28426 __db_version
28427 #endif
28428
28429 _ACEOF
28430 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28431   $EGREP "__db_version" >/dev/null 2>&1; then
28432   ol_cv_bdb_minor=1
28433 else
28434   :
28435 fi
28436 rm -f conftest*
28437
28438         fi
28439
28440 fi
28441 echo "$as_me:$LINENO: result: $ol_cv_bdb_minor" >&5
28442 echo "${ECHO_T}$ol_cv_bdb_minor" >&6
28443
28444 if test $ol_cv_bdb_major = 4 ; then
28445         if test $ol_cv_bdb_minor = 4 ; then
28446                 if test $ol_cv_lib_db = no ; then
28447         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb44)" >&5
28448 echo $ECHO_N "checking for Berkeley DB link (-ldb44)... $ECHO_C" >&6
28449 if test "${ol_cv_db_db44+set}" = set; then
28450   echo $ECHO_N "(cached) $ECHO_C" >&6
28451 else
28452
28453         ol_DB_LIB=-ldb44
28454         ol_LIBS=$LIBS
28455         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28456
28457         cat >conftest.$ac_ext <<_ACEOF
28458 /* confdefs.h.  */
28459 _ACEOF
28460 cat confdefs.h >>conftest.$ac_ext
28461 cat >>conftest.$ac_ext <<_ACEOF
28462 /* end confdefs.h.  */
28463
28464 #ifdef HAVE_DB_185_H
28465 # include <db_185.h>
28466 #else
28467 # include <db.h>
28468 #endif
28469
28470 #ifndef DB_VERSION_MAJOR
28471 # define DB_VERSION_MAJOR 1
28472 #endif
28473
28474 #ifndef NULL
28475 #define NULL ((void*)0)
28476 #endif
28477
28478 int
28479 main ()
28480 {
28481
28482 #if DB_VERSION_MAJOR > 1
28483         {
28484                 char *version;
28485                 int major, minor, patch;
28486
28487                 version = db_version( &major, &minor, &patch );
28488
28489                 if( major != DB_VERSION_MAJOR ||
28490                         minor < DB_VERSION_MINOR )
28491                 {
28492                         printf("Berkeley DB version mismatch\n"
28493                                 "\theader: %s\n\tlibrary: %s\n",
28494                                 DB_VERSION_STRING, version);
28495                         return 1;
28496                 }
28497         }
28498 #endif
28499
28500 #if DB_VERSION_MAJOR > 2
28501         db_env_create( NULL, 0 );
28502 #elif DB_VERSION_MAJOR > 1
28503         db_appexit( NULL );
28504 #else
28505         (void) dbopen( NULL, 0, 0, 0, NULL);
28506 #endif
28507
28508   ;
28509   return 0;
28510 }
28511 _ACEOF
28512 rm -f conftest.$ac_objext conftest$ac_exeext
28513 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28514   (eval $ac_link) 2>conftest.er1
28515   ac_status=$?
28516   grep -v '^ *+' conftest.er1 >conftest.err
28517   rm -f conftest.er1
28518   cat conftest.err >&5
28519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28520   (exit $ac_status); } &&
28521          { ac_try='test -z "$ac_c_werror_flag"
28522                          || test ! -s conftest.err'
28523   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28524   (eval $ac_try) 2>&5
28525   ac_status=$?
28526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28527   (exit $ac_status); }; } &&
28528          { ac_try='test -s conftest$ac_exeext'
28529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28530   (eval $ac_try) 2>&5
28531   ac_status=$?
28532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28533   (exit $ac_status); }; }; then
28534   ol_cv_db_db44=yes
28535 else
28536   echo "$as_me: failed program was:" >&5
28537 sed 's/^/| /' conftest.$ac_ext >&5
28538
28539 ol_cv_db_db44=no
28540 fi
28541 rm -f conftest.err conftest.$ac_objext \
28542       conftest$ac_exeext conftest.$ac_ext
28543
28544         LIBS="$ol_LIBS"
28545
28546 fi
28547 echo "$as_me:$LINENO: result: $ol_cv_db_db44" >&5
28548 echo "${ECHO_T}$ol_cv_db_db44" >&6
28549
28550         if test $ol_cv_db_db44 = yes ; then
28551                 ol_cv_lib_db=-ldb44
28552         fi
28553 fi
28554
28555                 if test $ol_cv_lib_db = no ; then
28556         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-44)" >&5
28557 echo $ECHO_N "checking for Berkeley DB link (-ldb-44)... $ECHO_C" >&6
28558 if test "${ol_cv_db_db_44+set}" = set; then
28559   echo $ECHO_N "(cached) $ECHO_C" >&6
28560 else
28561
28562         ol_DB_LIB=-ldb-44
28563         ol_LIBS=$LIBS
28564         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28565
28566         cat >conftest.$ac_ext <<_ACEOF
28567 /* confdefs.h.  */
28568 _ACEOF
28569 cat confdefs.h >>conftest.$ac_ext
28570 cat >>conftest.$ac_ext <<_ACEOF
28571 /* end confdefs.h.  */
28572
28573 #ifdef HAVE_DB_185_H
28574 # include <db_185.h>
28575 #else
28576 # include <db.h>
28577 #endif
28578
28579 #ifndef DB_VERSION_MAJOR
28580 # define DB_VERSION_MAJOR 1
28581 #endif
28582
28583 #ifndef NULL
28584 #define NULL ((void*)0)
28585 #endif
28586
28587 int
28588 main ()
28589 {
28590
28591 #if DB_VERSION_MAJOR > 1
28592         {
28593                 char *version;
28594                 int major, minor, patch;
28595
28596                 version = db_version( &major, &minor, &patch );
28597
28598                 if( major != DB_VERSION_MAJOR ||
28599                         minor < DB_VERSION_MINOR )
28600                 {
28601                         printf("Berkeley DB version mismatch\n"
28602                                 "\theader: %s\n\tlibrary: %s\n",
28603                                 DB_VERSION_STRING, version);
28604                         return 1;
28605                 }
28606         }
28607 #endif
28608
28609 #if DB_VERSION_MAJOR > 2
28610         db_env_create( NULL, 0 );
28611 #elif DB_VERSION_MAJOR > 1
28612         db_appexit( NULL );
28613 #else
28614         (void) dbopen( NULL, 0, 0, 0, NULL);
28615 #endif
28616
28617   ;
28618   return 0;
28619 }
28620 _ACEOF
28621 rm -f conftest.$ac_objext conftest$ac_exeext
28622 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28623   (eval $ac_link) 2>conftest.er1
28624   ac_status=$?
28625   grep -v '^ *+' conftest.er1 >conftest.err
28626   rm -f conftest.er1
28627   cat conftest.err >&5
28628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28629   (exit $ac_status); } &&
28630          { ac_try='test -z "$ac_c_werror_flag"
28631                          || test ! -s conftest.err'
28632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28633   (eval $ac_try) 2>&5
28634   ac_status=$?
28635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28636   (exit $ac_status); }; } &&
28637          { ac_try='test -s conftest$ac_exeext'
28638   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28639   (eval $ac_try) 2>&5
28640   ac_status=$?
28641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28642   (exit $ac_status); }; }; then
28643   ol_cv_db_db_44=yes
28644 else
28645   echo "$as_me: failed program was:" >&5
28646 sed 's/^/| /' conftest.$ac_ext >&5
28647
28648 ol_cv_db_db_44=no
28649 fi
28650 rm -f conftest.err conftest.$ac_objext \
28651       conftest$ac_exeext conftest.$ac_ext
28652
28653         LIBS="$ol_LIBS"
28654
28655 fi
28656 echo "$as_me:$LINENO: result: $ol_cv_db_db_44" >&5
28657 echo "${ECHO_T}$ol_cv_db_db_44" >&6
28658
28659         if test $ol_cv_db_db_44 = yes ; then
28660                 ol_cv_lib_db=-ldb-44
28661         fi
28662 fi
28663
28664                 if test $ol_cv_lib_db = no ; then
28665         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.4)" >&5
28666 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.4)... $ECHO_C" >&6
28667 if test "${ol_cv_db_db_4_dot_4+set}" = set; then
28668   echo $ECHO_N "(cached) $ECHO_C" >&6
28669 else
28670
28671         ol_DB_LIB=-ldb-4.4
28672         ol_LIBS=$LIBS
28673         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28674
28675         cat >conftest.$ac_ext <<_ACEOF
28676 /* confdefs.h.  */
28677 _ACEOF
28678 cat confdefs.h >>conftest.$ac_ext
28679 cat >>conftest.$ac_ext <<_ACEOF
28680 /* end confdefs.h.  */
28681
28682 #ifdef HAVE_DB_185_H
28683 # include <db_185.h>
28684 #else
28685 # include <db.h>
28686 #endif
28687
28688 #ifndef DB_VERSION_MAJOR
28689 # define DB_VERSION_MAJOR 1
28690 #endif
28691
28692 #ifndef NULL
28693 #define NULL ((void*)0)
28694 #endif
28695
28696 int
28697 main ()
28698 {
28699
28700 #if DB_VERSION_MAJOR > 1
28701         {
28702                 char *version;
28703                 int major, minor, patch;
28704
28705                 version = db_version( &major, &minor, &patch );
28706
28707                 if( major != DB_VERSION_MAJOR ||
28708                         minor < DB_VERSION_MINOR )
28709                 {
28710                         printf("Berkeley DB version mismatch\n"
28711                                 "\theader: %s\n\tlibrary: %s\n",
28712                                 DB_VERSION_STRING, version);
28713                         return 1;
28714                 }
28715         }
28716 #endif
28717
28718 #if DB_VERSION_MAJOR > 2
28719         db_env_create( NULL, 0 );
28720 #elif DB_VERSION_MAJOR > 1
28721         db_appexit( NULL );
28722 #else
28723         (void) dbopen( NULL, 0, 0, 0, NULL);
28724 #endif
28725
28726   ;
28727   return 0;
28728 }
28729 _ACEOF
28730 rm -f conftest.$ac_objext conftest$ac_exeext
28731 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28732   (eval $ac_link) 2>conftest.er1
28733   ac_status=$?
28734   grep -v '^ *+' conftest.er1 >conftest.err
28735   rm -f conftest.er1
28736   cat conftest.err >&5
28737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28738   (exit $ac_status); } &&
28739          { ac_try='test -z "$ac_c_werror_flag"
28740                          || test ! -s conftest.err'
28741   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28742   (eval $ac_try) 2>&5
28743   ac_status=$?
28744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28745   (exit $ac_status); }; } &&
28746          { ac_try='test -s conftest$ac_exeext'
28747   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28748   (eval $ac_try) 2>&5
28749   ac_status=$?
28750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28751   (exit $ac_status); }; }; then
28752   ol_cv_db_db_4_dot_4=yes
28753 else
28754   echo "$as_me: failed program was:" >&5
28755 sed 's/^/| /' conftest.$ac_ext >&5
28756
28757 ol_cv_db_db_4_dot_4=no
28758 fi
28759 rm -f conftest.err conftest.$ac_objext \
28760       conftest$ac_exeext conftest.$ac_ext
28761
28762         LIBS="$ol_LIBS"
28763
28764 fi
28765 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_4" >&5
28766 echo "${ECHO_T}$ol_cv_db_db_4_dot_4" >&6
28767
28768         if test $ol_cv_db_db_4_dot_4 = yes ; then
28769                 ol_cv_lib_db=-ldb-4.4
28770         fi
28771 fi
28772
28773                 if test $ol_cv_lib_db = no ; then
28774         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-4)" >&5
28775 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-4)... $ECHO_C" >&6
28776 if test "${ol_cv_db_db_4_4+set}" = set; then
28777   echo $ECHO_N "(cached) $ECHO_C" >&6
28778 else
28779
28780         ol_DB_LIB=-ldb-4-4
28781         ol_LIBS=$LIBS
28782         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28783
28784         cat >conftest.$ac_ext <<_ACEOF
28785 /* confdefs.h.  */
28786 _ACEOF
28787 cat confdefs.h >>conftest.$ac_ext
28788 cat >>conftest.$ac_ext <<_ACEOF
28789 /* end confdefs.h.  */
28790
28791 #ifdef HAVE_DB_185_H
28792 # include <db_185.h>
28793 #else
28794 # include <db.h>
28795 #endif
28796
28797 #ifndef DB_VERSION_MAJOR
28798 # define DB_VERSION_MAJOR 1
28799 #endif
28800
28801 #ifndef NULL
28802 #define NULL ((void*)0)
28803 #endif
28804
28805 int
28806 main ()
28807 {
28808
28809 #if DB_VERSION_MAJOR > 1
28810         {
28811                 char *version;
28812                 int major, minor, patch;
28813
28814                 version = db_version( &major, &minor, &patch );
28815
28816                 if( major != DB_VERSION_MAJOR ||
28817                         minor < DB_VERSION_MINOR )
28818                 {
28819                         printf("Berkeley DB version mismatch\n"
28820                                 "\theader: %s\n\tlibrary: %s\n",
28821                                 DB_VERSION_STRING, version);
28822                         return 1;
28823                 }
28824         }
28825 #endif
28826
28827 #if DB_VERSION_MAJOR > 2
28828         db_env_create( NULL, 0 );
28829 #elif DB_VERSION_MAJOR > 1
28830         db_appexit( NULL );
28831 #else
28832         (void) dbopen( NULL, 0, 0, 0, NULL);
28833 #endif
28834
28835   ;
28836   return 0;
28837 }
28838 _ACEOF
28839 rm -f conftest.$ac_objext conftest$ac_exeext
28840 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28841   (eval $ac_link) 2>conftest.er1
28842   ac_status=$?
28843   grep -v '^ *+' conftest.er1 >conftest.err
28844   rm -f conftest.er1
28845   cat conftest.err >&5
28846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28847   (exit $ac_status); } &&
28848          { ac_try='test -z "$ac_c_werror_flag"
28849                          || test ! -s conftest.err'
28850   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28851   (eval $ac_try) 2>&5
28852   ac_status=$?
28853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28854   (exit $ac_status); }; } &&
28855          { ac_try='test -s conftest$ac_exeext'
28856   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28857   (eval $ac_try) 2>&5
28858   ac_status=$?
28859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28860   (exit $ac_status); }; }; then
28861   ol_cv_db_db_4_4=yes
28862 else
28863   echo "$as_me: failed program was:" >&5
28864 sed 's/^/| /' conftest.$ac_ext >&5
28865
28866 ol_cv_db_db_4_4=no
28867 fi
28868 rm -f conftest.err conftest.$ac_objext \
28869       conftest$ac_exeext conftest.$ac_ext
28870
28871         LIBS="$ol_LIBS"
28872
28873 fi
28874 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_4" >&5
28875 echo "${ECHO_T}$ol_cv_db_db_4_4" >&6
28876
28877         if test $ol_cv_db_db_4_4 = yes ; then
28878                 ol_cv_lib_db=-ldb-4-4
28879         fi
28880 fi
28881
28882         elif test $ol_cv_bdb_minor = 3 ; then
28883                 if test $ol_cv_lib_db = no ; then
28884         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb43)" >&5
28885 echo $ECHO_N "checking for Berkeley DB link (-ldb43)... $ECHO_C" >&6
28886 if test "${ol_cv_db_db43+set}" = set; then
28887   echo $ECHO_N "(cached) $ECHO_C" >&6
28888 else
28889
28890         ol_DB_LIB=-ldb43
28891         ol_LIBS=$LIBS
28892         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28893
28894         cat >conftest.$ac_ext <<_ACEOF
28895 /* confdefs.h.  */
28896 _ACEOF
28897 cat confdefs.h >>conftest.$ac_ext
28898 cat >>conftest.$ac_ext <<_ACEOF
28899 /* end confdefs.h.  */
28900
28901 #ifdef HAVE_DB_185_H
28902 # include <db_185.h>
28903 #else
28904 # include <db.h>
28905 #endif
28906
28907 #ifndef DB_VERSION_MAJOR
28908 # define DB_VERSION_MAJOR 1
28909 #endif
28910
28911 #ifndef NULL
28912 #define NULL ((void*)0)
28913 #endif
28914
28915 int
28916 main ()
28917 {
28918
28919 #if DB_VERSION_MAJOR > 1
28920         {
28921                 char *version;
28922                 int major, minor, patch;
28923
28924                 version = db_version( &major, &minor, &patch );
28925
28926                 if( major != DB_VERSION_MAJOR ||
28927                         minor < DB_VERSION_MINOR )
28928                 {
28929                         printf("Berkeley DB version mismatch\n"
28930                                 "\theader: %s\n\tlibrary: %s\n",
28931                                 DB_VERSION_STRING, version);
28932                         return 1;
28933                 }
28934         }
28935 #endif
28936
28937 #if DB_VERSION_MAJOR > 2
28938         db_env_create( NULL, 0 );
28939 #elif DB_VERSION_MAJOR > 1
28940         db_appexit( NULL );
28941 #else
28942         (void) dbopen( NULL, 0, 0, 0, NULL);
28943 #endif
28944
28945   ;
28946   return 0;
28947 }
28948 _ACEOF
28949 rm -f conftest.$ac_objext conftest$ac_exeext
28950 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28951   (eval $ac_link) 2>conftest.er1
28952   ac_status=$?
28953   grep -v '^ *+' conftest.er1 >conftest.err
28954   rm -f conftest.er1
28955   cat conftest.err >&5
28956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28957   (exit $ac_status); } &&
28958          { ac_try='test -z "$ac_c_werror_flag"
28959                          || test ! -s conftest.err'
28960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28961   (eval $ac_try) 2>&5
28962   ac_status=$?
28963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28964   (exit $ac_status); }; } &&
28965          { ac_try='test -s conftest$ac_exeext'
28966   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28967   (eval $ac_try) 2>&5
28968   ac_status=$?
28969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28970   (exit $ac_status); }; }; then
28971   ol_cv_db_db43=yes
28972 else
28973   echo "$as_me: failed program was:" >&5
28974 sed 's/^/| /' conftest.$ac_ext >&5
28975
28976 ol_cv_db_db43=no
28977 fi
28978 rm -f conftest.err conftest.$ac_objext \
28979       conftest$ac_exeext conftest.$ac_ext
28980
28981         LIBS="$ol_LIBS"
28982
28983 fi
28984 echo "$as_me:$LINENO: result: $ol_cv_db_db43" >&5
28985 echo "${ECHO_T}$ol_cv_db_db43" >&6
28986
28987         if test $ol_cv_db_db43 = yes ; then
28988                 ol_cv_lib_db=-ldb43
28989         fi
28990 fi
28991
28992                 if test $ol_cv_lib_db = no ; then
28993         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-43)" >&5
28994 echo $ECHO_N "checking for Berkeley DB link (-ldb-43)... $ECHO_C" >&6
28995 if test "${ol_cv_db_db_43+set}" = set; then
28996   echo $ECHO_N "(cached) $ECHO_C" >&6
28997 else
28998
28999         ol_DB_LIB=-ldb-43
29000         ol_LIBS=$LIBS
29001         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29002
29003         cat >conftest.$ac_ext <<_ACEOF
29004 /* confdefs.h.  */
29005 _ACEOF
29006 cat confdefs.h >>conftest.$ac_ext
29007 cat >>conftest.$ac_ext <<_ACEOF
29008 /* end confdefs.h.  */
29009
29010 #ifdef HAVE_DB_185_H
29011 # include <db_185.h>
29012 #else
29013 # include <db.h>
29014 #endif
29015
29016 #ifndef DB_VERSION_MAJOR
29017 # define DB_VERSION_MAJOR 1
29018 #endif
29019
29020 #ifndef NULL
29021 #define NULL ((void*)0)
29022 #endif
29023
29024 int
29025 main ()
29026 {
29027
29028 #if DB_VERSION_MAJOR > 1
29029         {
29030                 char *version;
29031                 int major, minor, patch;
29032
29033                 version = db_version( &major, &minor, &patch );
29034
29035                 if( major != DB_VERSION_MAJOR ||
29036                         minor < DB_VERSION_MINOR )
29037                 {
29038                         printf("Berkeley DB version mismatch\n"
29039                                 "\theader: %s\n\tlibrary: %s\n",
29040                                 DB_VERSION_STRING, version);
29041                         return 1;
29042                 }
29043         }
29044 #endif
29045
29046 #if DB_VERSION_MAJOR > 2
29047         db_env_create( NULL, 0 );
29048 #elif DB_VERSION_MAJOR > 1
29049         db_appexit( NULL );
29050 #else
29051         (void) dbopen( NULL, 0, 0, 0, NULL);
29052 #endif
29053
29054   ;
29055   return 0;
29056 }
29057 _ACEOF
29058 rm -f conftest.$ac_objext conftest$ac_exeext
29059 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29060   (eval $ac_link) 2>conftest.er1
29061   ac_status=$?
29062   grep -v '^ *+' conftest.er1 >conftest.err
29063   rm -f conftest.er1
29064   cat conftest.err >&5
29065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29066   (exit $ac_status); } &&
29067          { ac_try='test -z "$ac_c_werror_flag"
29068                          || test ! -s conftest.err'
29069   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29070   (eval $ac_try) 2>&5
29071   ac_status=$?
29072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29073   (exit $ac_status); }; } &&
29074          { ac_try='test -s conftest$ac_exeext'
29075   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29076   (eval $ac_try) 2>&5
29077   ac_status=$?
29078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29079   (exit $ac_status); }; }; then
29080   ol_cv_db_db_43=yes
29081 else
29082   echo "$as_me: failed program was:" >&5
29083 sed 's/^/| /' conftest.$ac_ext >&5
29084
29085 ol_cv_db_db_43=no
29086 fi
29087 rm -f conftest.err conftest.$ac_objext \
29088       conftest$ac_exeext conftest.$ac_ext
29089
29090         LIBS="$ol_LIBS"
29091
29092 fi
29093 echo "$as_me:$LINENO: result: $ol_cv_db_db_43" >&5
29094 echo "${ECHO_T}$ol_cv_db_db_43" >&6
29095
29096         if test $ol_cv_db_db_43 = yes ; then
29097                 ol_cv_lib_db=-ldb-43
29098         fi
29099 fi
29100
29101                 if test $ol_cv_lib_db = no ; then
29102         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.3)" >&5
29103 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.3)... $ECHO_C" >&6
29104 if test "${ol_cv_db_db_4_dot_3+set}" = set; then
29105   echo $ECHO_N "(cached) $ECHO_C" >&6
29106 else
29107
29108         ol_DB_LIB=-ldb-4.3
29109         ol_LIBS=$LIBS
29110         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29111
29112         cat >conftest.$ac_ext <<_ACEOF
29113 /* confdefs.h.  */
29114 _ACEOF
29115 cat confdefs.h >>conftest.$ac_ext
29116 cat >>conftest.$ac_ext <<_ACEOF
29117 /* end confdefs.h.  */
29118
29119 #ifdef HAVE_DB_185_H
29120 # include <db_185.h>
29121 #else
29122 # include <db.h>
29123 #endif
29124
29125 #ifndef DB_VERSION_MAJOR
29126 # define DB_VERSION_MAJOR 1
29127 #endif
29128
29129 #ifndef NULL
29130 #define NULL ((void*)0)
29131 #endif
29132
29133 int
29134 main ()
29135 {
29136
29137 #if DB_VERSION_MAJOR > 1
29138         {
29139                 char *version;
29140                 int major, minor, patch;
29141
29142                 version = db_version( &major, &minor, &patch );
29143
29144                 if( major != DB_VERSION_MAJOR ||
29145                         minor < DB_VERSION_MINOR )
29146                 {
29147                         printf("Berkeley DB version mismatch\n"
29148                                 "\theader: %s\n\tlibrary: %s\n",
29149                                 DB_VERSION_STRING, version);
29150                         return 1;
29151                 }
29152         }
29153 #endif
29154
29155 #if DB_VERSION_MAJOR > 2
29156         db_env_create( NULL, 0 );
29157 #elif DB_VERSION_MAJOR > 1
29158         db_appexit( NULL );
29159 #else
29160         (void) dbopen( NULL, 0, 0, 0, NULL);
29161 #endif
29162
29163   ;
29164   return 0;
29165 }
29166 _ACEOF
29167 rm -f conftest.$ac_objext conftest$ac_exeext
29168 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29169   (eval $ac_link) 2>conftest.er1
29170   ac_status=$?
29171   grep -v '^ *+' conftest.er1 >conftest.err
29172   rm -f conftest.er1
29173   cat conftest.err >&5
29174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29175   (exit $ac_status); } &&
29176          { ac_try='test -z "$ac_c_werror_flag"
29177                          || test ! -s conftest.err'
29178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29179   (eval $ac_try) 2>&5
29180   ac_status=$?
29181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29182   (exit $ac_status); }; } &&
29183          { ac_try='test -s conftest$ac_exeext'
29184   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29185   (eval $ac_try) 2>&5
29186   ac_status=$?
29187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29188   (exit $ac_status); }; }; then
29189   ol_cv_db_db_4_dot_3=yes
29190 else
29191   echo "$as_me: failed program was:" >&5
29192 sed 's/^/| /' conftest.$ac_ext >&5
29193
29194 ol_cv_db_db_4_dot_3=no
29195 fi
29196 rm -f conftest.err conftest.$ac_objext \
29197       conftest$ac_exeext conftest.$ac_ext
29198
29199         LIBS="$ol_LIBS"
29200
29201 fi
29202 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_3" >&5
29203 echo "${ECHO_T}$ol_cv_db_db_4_dot_3" >&6
29204
29205         if test $ol_cv_db_db_4_dot_3 = yes ; then
29206                 ol_cv_lib_db=-ldb-4.3
29207         fi
29208 fi
29209
29210                 if test $ol_cv_lib_db = no ; then
29211         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-3)" >&5
29212 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-3)... $ECHO_C" >&6
29213 if test "${ol_cv_db_db_4_3+set}" = set; then
29214   echo $ECHO_N "(cached) $ECHO_C" >&6
29215 else
29216
29217         ol_DB_LIB=-ldb-4-3
29218         ol_LIBS=$LIBS
29219         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29220
29221         cat >conftest.$ac_ext <<_ACEOF
29222 /* confdefs.h.  */
29223 _ACEOF
29224 cat confdefs.h >>conftest.$ac_ext
29225 cat >>conftest.$ac_ext <<_ACEOF
29226 /* end confdefs.h.  */
29227
29228 #ifdef HAVE_DB_185_H
29229 # include <db_185.h>
29230 #else
29231 # include <db.h>
29232 #endif
29233
29234 #ifndef DB_VERSION_MAJOR
29235 # define DB_VERSION_MAJOR 1
29236 #endif
29237
29238 #ifndef NULL
29239 #define NULL ((void*)0)
29240 #endif
29241
29242 int
29243 main ()
29244 {
29245
29246 #if DB_VERSION_MAJOR > 1
29247         {
29248                 char *version;
29249                 int major, minor, patch;
29250
29251                 version = db_version( &major, &minor, &patch );
29252
29253                 if( major != DB_VERSION_MAJOR ||
29254                         minor < DB_VERSION_MINOR )
29255                 {
29256                         printf("Berkeley DB version mismatch\n"
29257                                 "\theader: %s\n\tlibrary: %s\n",
29258                                 DB_VERSION_STRING, version);
29259                         return 1;
29260                 }
29261         }
29262 #endif
29263
29264 #if DB_VERSION_MAJOR > 2
29265         db_env_create( NULL, 0 );
29266 #elif DB_VERSION_MAJOR > 1
29267         db_appexit( NULL );
29268 #else
29269         (void) dbopen( NULL, 0, 0, 0, NULL);
29270 #endif
29271
29272   ;
29273   return 0;
29274 }
29275 _ACEOF
29276 rm -f conftest.$ac_objext conftest$ac_exeext
29277 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29278   (eval $ac_link) 2>conftest.er1
29279   ac_status=$?
29280   grep -v '^ *+' conftest.er1 >conftest.err
29281   rm -f conftest.er1
29282   cat conftest.err >&5
29283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29284   (exit $ac_status); } &&
29285          { ac_try='test -z "$ac_c_werror_flag"
29286                          || test ! -s conftest.err'
29287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29288   (eval $ac_try) 2>&5
29289   ac_status=$?
29290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29291   (exit $ac_status); }; } &&
29292          { ac_try='test -s conftest$ac_exeext'
29293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29294   (eval $ac_try) 2>&5
29295   ac_status=$?
29296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29297   (exit $ac_status); }; }; then
29298   ol_cv_db_db_4_3=yes
29299 else
29300   echo "$as_me: failed program was:" >&5
29301 sed 's/^/| /' conftest.$ac_ext >&5
29302
29303 ol_cv_db_db_4_3=no
29304 fi
29305 rm -f conftest.err conftest.$ac_objext \
29306       conftest$ac_exeext conftest.$ac_ext
29307
29308         LIBS="$ol_LIBS"
29309
29310 fi
29311 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_3" >&5
29312 echo "${ECHO_T}$ol_cv_db_db_4_3" >&6
29313
29314         if test $ol_cv_db_db_4_3 = yes ; then
29315                 ol_cv_lib_db=-ldb-4-3
29316         fi
29317 fi
29318
29319         elif test $ol_cv_bdb_minor = 2 ; then
29320                 if test $ol_cv_lib_db = no ; then
29321         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb42)" >&5
29322 echo $ECHO_N "checking for Berkeley DB link (-ldb42)... $ECHO_C" >&6
29323 if test "${ol_cv_db_db42+set}" = set; then
29324   echo $ECHO_N "(cached) $ECHO_C" >&6
29325 else
29326
29327         ol_DB_LIB=-ldb42
29328         ol_LIBS=$LIBS
29329         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29330
29331         cat >conftest.$ac_ext <<_ACEOF
29332 /* confdefs.h.  */
29333 _ACEOF
29334 cat confdefs.h >>conftest.$ac_ext
29335 cat >>conftest.$ac_ext <<_ACEOF
29336 /* end confdefs.h.  */
29337
29338 #ifdef HAVE_DB_185_H
29339 # include <db_185.h>
29340 #else
29341 # include <db.h>
29342 #endif
29343
29344 #ifndef DB_VERSION_MAJOR
29345 # define DB_VERSION_MAJOR 1
29346 #endif
29347
29348 #ifndef NULL
29349 #define NULL ((void*)0)
29350 #endif
29351
29352 int
29353 main ()
29354 {
29355
29356 #if DB_VERSION_MAJOR > 1
29357         {
29358                 char *version;
29359                 int major, minor, patch;
29360
29361                 version = db_version( &major, &minor, &patch );
29362
29363                 if( major != DB_VERSION_MAJOR ||
29364                         minor < DB_VERSION_MINOR )
29365                 {
29366                         printf("Berkeley DB version mismatch\n"
29367                                 "\theader: %s\n\tlibrary: %s\n",
29368                                 DB_VERSION_STRING, version);
29369                         return 1;
29370                 }
29371         }
29372 #endif
29373
29374 #if DB_VERSION_MAJOR > 2
29375         db_env_create( NULL, 0 );
29376 #elif DB_VERSION_MAJOR > 1
29377         db_appexit( NULL );
29378 #else
29379         (void) dbopen( NULL, 0, 0, 0, NULL);
29380 #endif
29381
29382   ;
29383   return 0;
29384 }
29385 _ACEOF
29386 rm -f conftest.$ac_objext conftest$ac_exeext
29387 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29388   (eval $ac_link) 2>conftest.er1
29389   ac_status=$?
29390   grep -v '^ *+' conftest.er1 >conftest.err
29391   rm -f conftest.er1
29392   cat conftest.err >&5
29393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29394   (exit $ac_status); } &&
29395          { ac_try='test -z "$ac_c_werror_flag"
29396                          || test ! -s conftest.err'
29397   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29398   (eval $ac_try) 2>&5
29399   ac_status=$?
29400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29401   (exit $ac_status); }; } &&
29402          { ac_try='test -s conftest$ac_exeext'
29403   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29404   (eval $ac_try) 2>&5
29405   ac_status=$?
29406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29407   (exit $ac_status); }; }; then
29408   ol_cv_db_db42=yes
29409 else
29410   echo "$as_me: failed program was:" >&5
29411 sed 's/^/| /' conftest.$ac_ext >&5
29412
29413 ol_cv_db_db42=no
29414 fi
29415 rm -f conftest.err conftest.$ac_objext \
29416       conftest$ac_exeext conftest.$ac_ext
29417
29418         LIBS="$ol_LIBS"
29419
29420 fi
29421 echo "$as_me:$LINENO: result: $ol_cv_db_db42" >&5
29422 echo "${ECHO_T}$ol_cv_db_db42" >&6
29423
29424         if test $ol_cv_db_db42 = yes ; then
29425                 ol_cv_lib_db=-ldb42
29426         fi
29427 fi
29428
29429                 if test $ol_cv_lib_db = no ; then
29430         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-42)" >&5
29431 echo $ECHO_N "checking for Berkeley DB link (-ldb-42)... $ECHO_C" >&6
29432 if test "${ol_cv_db_db_42+set}" = set; then
29433   echo $ECHO_N "(cached) $ECHO_C" >&6
29434 else
29435
29436         ol_DB_LIB=-ldb-42
29437         ol_LIBS=$LIBS
29438         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29439
29440         cat >conftest.$ac_ext <<_ACEOF
29441 /* confdefs.h.  */
29442 _ACEOF
29443 cat confdefs.h >>conftest.$ac_ext
29444 cat >>conftest.$ac_ext <<_ACEOF
29445 /* end confdefs.h.  */
29446
29447 #ifdef HAVE_DB_185_H
29448 # include <db_185.h>
29449 #else
29450 # include <db.h>
29451 #endif
29452
29453 #ifndef DB_VERSION_MAJOR
29454 # define DB_VERSION_MAJOR 1
29455 #endif
29456
29457 #ifndef NULL
29458 #define NULL ((void*)0)
29459 #endif
29460
29461 int
29462 main ()
29463 {
29464
29465 #if DB_VERSION_MAJOR > 1
29466         {
29467                 char *version;
29468                 int major, minor, patch;
29469
29470                 version = db_version( &major, &minor, &patch );
29471
29472                 if( major != DB_VERSION_MAJOR ||
29473                         minor < DB_VERSION_MINOR )
29474                 {
29475                         printf("Berkeley DB version mismatch\n"
29476                                 "\theader: %s\n\tlibrary: %s\n",
29477                                 DB_VERSION_STRING, version);
29478                         return 1;
29479                 }
29480         }
29481 #endif
29482
29483 #if DB_VERSION_MAJOR > 2
29484         db_env_create( NULL, 0 );
29485 #elif DB_VERSION_MAJOR > 1
29486         db_appexit( NULL );
29487 #else
29488         (void) dbopen( NULL, 0, 0, 0, NULL);
29489 #endif
29490
29491   ;
29492   return 0;
29493 }
29494 _ACEOF
29495 rm -f conftest.$ac_objext conftest$ac_exeext
29496 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29497   (eval $ac_link) 2>conftest.er1
29498   ac_status=$?
29499   grep -v '^ *+' conftest.er1 >conftest.err
29500   rm -f conftest.er1
29501   cat conftest.err >&5
29502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29503   (exit $ac_status); } &&
29504          { ac_try='test -z "$ac_c_werror_flag"
29505                          || test ! -s conftest.err'
29506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29507   (eval $ac_try) 2>&5
29508   ac_status=$?
29509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29510   (exit $ac_status); }; } &&
29511          { ac_try='test -s conftest$ac_exeext'
29512   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29513   (eval $ac_try) 2>&5
29514   ac_status=$?
29515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29516   (exit $ac_status); }; }; then
29517   ol_cv_db_db_42=yes
29518 else
29519   echo "$as_me: failed program was:" >&5
29520 sed 's/^/| /' conftest.$ac_ext >&5
29521
29522 ol_cv_db_db_42=no
29523 fi
29524 rm -f conftest.err conftest.$ac_objext \
29525       conftest$ac_exeext conftest.$ac_ext
29526
29527         LIBS="$ol_LIBS"
29528
29529 fi
29530 echo "$as_me:$LINENO: result: $ol_cv_db_db_42" >&5
29531 echo "${ECHO_T}$ol_cv_db_db_42" >&6
29532
29533         if test $ol_cv_db_db_42 = yes ; then
29534                 ol_cv_lib_db=-ldb-42
29535         fi
29536 fi
29537
29538                 if test $ol_cv_lib_db = no ; then
29539         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.2)" >&5
29540 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.2)... $ECHO_C" >&6
29541 if test "${ol_cv_db_db_4_dot_2+set}" = set; then
29542   echo $ECHO_N "(cached) $ECHO_C" >&6
29543 else
29544
29545         ol_DB_LIB=-ldb-4.2
29546         ol_LIBS=$LIBS
29547         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29548
29549         cat >conftest.$ac_ext <<_ACEOF
29550 /* confdefs.h.  */
29551 _ACEOF
29552 cat confdefs.h >>conftest.$ac_ext
29553 cat >>conftest.$ac_ext <<_ACEOF
29554 /* end confdefs.h.  */
29555
29556 #ifdef HAVE_DB_185_H
29557 # include <db_185.h>
29558 #else
29559 # include <db.h>
29560 #endif
29561
29562 #ifndef DB_VERSION_MAJOR
29563 # define DB_VERSION_MAJOR 1
29564 #endif
29565
29566 #ifndef NULL
29567 #define NULL ((void*)0)
29568 #endif
29569
29570 int
29571 main ()
29572 {
29573
29574 #if DB_VERSION_MAJOR > 1
29575         {
29576                 char *version;
29577                 int major, minor, patch;
29578
29579                 version = db_version( &major, &minor, &patch );
29580
29581                 if( major != DB_VERSION_MAJOR ||
29582                         minor < DB_VERSION_MINOR )
29583                 {
29584                         printf("Berkeley DB version mismatch\n"
29585                                 "\theader: %s\n\tlibrary: %s\n",
29586                                 DB_VERSION_STRING, version);
29587                         return 1;
29588                 }
29589         }
29590 #endif
29591
29592 #if DB_VERSION_MAJOR > 2
29593         db_env_create( NULL, 0 );
29594 #elif DB_VERSION_MAJOR > 1
29595         db_appexit( NULL );
29596 #else
29597         (void) dbopen( NULL, 0, 0, 0, NULL);
29598 #endif
29599
29600   ;
29601   return 0;
29602 }
29603 _ACEOF
29604 rm -f conftest.$ac_objext conftest$ac_exeext
29605 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29606   (eval $ac_link) 2>conftest.er1
29607   ac_status=$?
29608   grep -v '^ *+' conftest.er1 >conftest.err
29609   rm -f conftest.er1
29610   cat conftest.err >&5
29611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29612   (exit $ac_status); } &&
29613          { ac_try='test -z "$ac_c_werror_flag"
29614                          || test ! -s conftest.err'
29615   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29616   (eval $ac_try) 2>&5
29617   ac_status=$?
29618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29619   (exit $ac_status); }; } &&
29620          { ac_try='test -s conftest$ac_exeext'
29621   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29622   (eval $ac_try) 2>&5
29623   ac_status=$?
29624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29625   (exit $ac_status); }; }; then
29626   ol_cv_db_db_4_dot_2=yes
29627 else
29628   echo "$as_me: failed program was:" >&5
29629 sed 's/^/| /' conftest.$ac_ext >&5
29630
29631 ol_cv_db_db_4_dot_2=no
29632 fi
29633 rm -f conftest.err conftest.$ac_objext \
29634       conftest$ac_exeext conftest.$ac_ext
29635
29636         LIBS="$ol_LIBS"
29637
29638 fi
29639 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_2" >&5
29640 echo "${ECHO_T}$ol_cv_db_db_4_dot_2" >&6
29641
29642         if test $ol_cv_db_db_4_dot_2 = yes ; then
29643                 ol_cv_lib_db=-ldb-4.2
29644         fi
29645 fi
29646
29647                 if test $ol_cv_lib_db = no ; then
29648         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-2)" >&5
29649 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-2)... $ECHO_C" >&6
29650 if test "${ol_cv_db_db_4_2+set}" = set; then
29651   echo $ECHO_N "(cached) $ECHO_C" >&6
29652 else
29653
29654         ol_DB_LIB=-ldb-4-2
29655         ol_LIBS=$LIBS
29656         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29657
29658         cat >conftest.$ac_ext <<_ACEOF
29659 /* confdefs.h.  */
29660 _ACEOF
29661 cat confdefs.h >>conftest.$ac_ext
29662 cat >>conftest.$ac_ext <<_ACEOF
29663 /* end confdefs.h.  */
29664
29665 #ifdef HAVE_DB_185_H
29666 # include <db_185.h>
29667 #else
29668 # include <db.h>
29669 #endif
29670
29671 #ifndef DB_VERSION_MAJOR
29672 # define DB_VERSION_MAJOR 1
29673 #endif
29674
29675 #ifndef NULL
29676 #define NULL ((void*)0)
29677 #endif
29678
29679 int
29680 main ()
29681 {
29682
29683 #if DB_VERSION_MAJOR > 1
29684         {
29685                 char *version;
29686                 int major, minor, patch;
29687
29688                 version = db_version( &major, &minor, &patch );
29689
29690                 if( major != DB_VERSION_MAJOR ||
29691                         minor < DB_VERSION_MINOR )
29692                 {
29693                         printf("Berkeley DB version mismatch\n"
29694                                 "\theader: %s\n\tlibrary: %s\n",
29695                                 DB_VERSION_STRING, version);
29696                         return 1;
29697                 }
29698         }
29699 #endif
29700
29701 #if DB_VERSION_MAJOR > 2
29702         db_env_create( NULL, 0 );
29703 #elif DB_VERSION_MAJOR > 1
29704         db_appexit( NULL );
29705 #else
29706         (void) dbopen( NULL, 0, 0, 0, NULL);
29707 #endif
29708
29709   ;
29710   return 0;
29711 }
29712 _ACEOF
29713 rm -f conftest.$ac_objext conftest$ac_exeext
29714 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29715   (eval $ac_link) 2>conftest.er1
29716   ac_status=$?
29717   grep -v '^ *+' conftest.er1 >conftest.err
29718   rm -f conftest.er1
29719   cat conftest.err >&5
29720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29721   (exit $ac_status); } &&
29722          { ac_try='test -z "$ac_c_werror_flag"
29723                          || test ! -s conftest.err'
29724   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29725   (eval $ac_try) 2>&5
29726   ac_status=$?
29727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29728   (exit $ac_status); }; } &&
29729          { ac_try='test -s conftest$ac_exeext'
29730   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29731   (eval $ac_try) 2>&5
29732   ac_status=$?
29733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29734   (exit $ac_status); }; }; then
29735   ol_cv_db_db_4_2=yes
29736 else
29737   echo "$as_me: failed program was:" >&5
29738 sed 's/^/| /' conftest.$ac_ext >&5
29739
29740 ol_cv_db_db_4_2=no
29741 fi
29742 rm -f conftest.err conftest.$ac_objext \
29743       conftest$ac_exeext conftest.$ac_ext
29744
29745         LIBS="$ol_LIBS"
29746
29747 fi
29748 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_2" >&5
29749 echo "${ECHO_T}$ol_cv_db_db_4_2" >&6
29750
29751         if test $ol_cv_db_db_4_2 = yes ; then
29752                 ol_cv_lib_db=-ldb-4-2
29753         fi
29754 fi
29755
29756         elif test $ol_cv_bdb_minor = 1 ; then
29757                 if test $ol_cv_lib_db = no ; then
29758         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb41)" >&5
29759 echo $ECHO_N "checking for Berkeley DB link (-ldb41)... $ECHO_C" >&6
29760 if test "${ol_cv_db_db41+set}" = set; then
29761   echo $ECHO_N "(cached) $ECHO_C" >&6
29762 else
29763
29764         ol_DB_LIB=-ldb41
29765         ol_LIBS=$LIBS
29766         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29767
29768         cat >conftest.$ac_ext <<_ACEOF
29769 /* confdefs.h.  */
29770 _ACEOF
29771 cat confdefs.h >>conftest.$ac_ext
29772 cat >>conftest.$ac_ext <<_ACEOF
29773 /* end confdefs.h.  */
29774
29775 #ifdef HAVE_DB_185_H
29776 # include <db_185.h>
29777 #else
29778 # include <db.h>
29779 #endif
29780
29781 #ifndef DB_VERSION_MAJOR
29782 # define DB_VERSION_MAJOR 1
29783 #endif
29784
29785 #ifndef NULL
29786 #define NULL ((void*)0)
29787 #endif
29788
29789 int
29790 main ()
29791 {
29792
29793 #if DB_VERSION_MAJOR > 1
29794         {
29795                 char *version;
29796                 int major, minor, patch;
29797
29798                 version = db_version( &major, &minor, &patch );
29799
29800                 if( major != DB_VERSION_MAJOR ||
29801                         minor < DB_VERSION_MINOR )
29802                 {
29803                         printf("Berkeley DB version mismatch\n"
29804                                 "\theader: %s\n\tlibrary: %s\n",
29805                                 DB_VERSION_STRING, version);
29806                         return 1;
29807                 }
29808         }
29809 #endif
29810
29811 #if DB_VERSION_MAJOR > 2
29812         db_env_create( NULL, 0 );
29813 #elif DB_VERSION_MAJOR > 1
29814         db_appexit( NULL );
29815 #else
29816         (void) dbopen( NULL, 0, 0, 0, NULL);
29817 #endif
29818
29819   ;
29820   return 0;
29821 }
29822 _ACEOF
29823 rm -f conftest.$ac_objext conftest$ac_exeext
29824 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29825   (eval $ac_link) 2>conftest.er1
29826   ac_status=$?
29827   grep -v '^ *+' conftest.er1 >conftest.err
29828   rm -f conftest.er1
29829   cat conftest.err >&5
29830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29831   (exit $ac_status); } &&
29832          { ac_try='test -z "$ac_c_werror_flag"
29833                          || test ! -s conftest.err'
29834   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29835   (eval $ac_try) 2>&5
29836   ac_status=$?
29837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29838   (exit $ac_status); }; } &&
29839          { ac_try='test -s conftest$ac_exeext'
29840   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29841   (eval $ac_try) 2>&5
29842   ac_status=$?
29843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29844   (exit $ac_status); }; }; then
29845   ol_cv_db_db41=yes
29846 else
29847   echo "$as_me: failed program was:" >&5
29848 sed 's/^/| /' conftest.$ac_ext >&5
29849
29850 ol_cv_db_db41=no
29851 fi
29852 rm -f conftest.err conftest.$ac_objext \
29853       conftest$ac_exeext conftest.$ac_ext
29854
29855         LIBS="$ol_LIBS"
29856
29857 fi
29858 echo "$as_me:$LINENO: result: $ol_cv_db_db41" >&5
29859 echo "${ECHO_T}$ol_cv_db_db41" >&6
29860
29861         if test $ol_cv_db_db41 = yes ; then
29862                 ol_cv_lib_db=-ldb41
29863         fi
29864 fi
29865
29866                 if test $ol_cv_lib_db = no ; then
29867         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-41)" >&5
29868 echo $ECHO_N "checking for Berkeley DB link (-ldb-41)... $ECHO_C" >&6
29869 if test "${ol_cv_db_db_41+set}" = set; then
29870   echo $ECHO_N "(cached) $ECHO_C" >&6
29871 else
29872
29873         ol_DB_LIB=-ldb-41
29874         ol_LIBS=$LIBS
29875         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29876
29877         cat >conftest.$ac_ext <<_ACEOF
29878 /* confdefs.h.  */
29879 _ACEOF
29880 cat confdefs.h >>conftest.$ac_ext
29881 cat >>conftest.$ac_ext <<_ACEOF
29882 /* end confdefs.h.  */
29883
29884 #ifdef HAVE_DB_185_H
29885 # include <db_185.h>
29886 #else
29887 # include <db.h>
29888 #endif
29889
29890 #ifndef DB_VERSION_MAJOR
29891 # define DB_VERSION_MAJOR 1
29892 #endif
29893
29894 #ifndef NULL
29895 #define NULL ((void*)0)
29896 #endif
29897
29898 int
29899 main ()
29900 {
29901
29902 #if DB_VERSION_MAJOR > 1
29903         {
29904                 char *version;
29905                 int major, minor, patch;
29906
29907                 version = db_version( &major, &minor, &patch );
29908
29909                 if( major != DB_VERSION_MAJOR ||
29910                         minor < DB_VERSION_MINOR )
29911                 {
29912                         printf("Berkeley DB version mismatch\n"
29913                                 "\theader: %s\n\tlibrary: %s\n",
29914                                 DB_VERSION_STRING, version);
29915                         return 1;
29916                 }
29917         }
29918 #endif
29919
29920 #if DB_VERSION_MAJOR > 2
29921         db_env_create( NULL, 0 );
29922 #elif DB_VERSION_MAJOR > 1
29923         db_appexit( NULL );
29924 #else
29925         (void) dbopen( NULL, 0, 0, 0, NULL);
29926 #endif
29927
29928   ;
29929   return 0;
29930 }
29931 _ACEOF
29932 rm -f conftest.$ac_objext conftest$ac_exeext
29933 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29934   (eval $ac_link) 2>conftest.er1
29935   ac_status=$?
29936   grep -v '^ *+' conftest.er1 >conftest.err
29937   rm -f conftest.er1
29938   cat conftest.err >&5
29939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29940   (exit $ac_status); } &&
29941          { ac_try='test -z "$ac_c_werror_flag"
29942                          || test ! -s conftest.err'
29943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29944   (eval $ac_try) 2>&5
29945   ac_status=$?
29946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29947   (exit $ac_status); }; } &&
29948          { ac_try='test -s conftest$ac_exeext'
29949   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29950   (eval $ac_try) 2>&5
29951   ac_status=$?
29952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29953   (exit $ac_status); }; }; then
29954   ol_cv_db_db_41=yes
29955 else
29956   echo "$as_me: failed program was:" >&5
29957 sed 's/^/| /' conftest.$ac_ext >&5
29958
29959 ol_cv_db_db_41=no
29960 fi
29961 rm -f conftest.err conftest.$ac_objext \
29962       conftest$ac_exeext conftest.$ac_ext
29963
29964         LIBS="$ol_LIBS"
29965
29966 fi
29967 echo "$as_me:$LINENO: result: $ol_cv_db_db_41" >&5
29968 echo "${ECHO_T}$ol_cv_db_db_41" >&6
29969
29970         if test $ol_cv_db_db_41 = yes ; then
29971                 ol_cv_lib_db=-ldb-41
29972         fi
29973 fi
29974
29975                 if test $ol_cv_lib_db = no ; then
29976         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.1)" >&5
29977 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.1)... $ECHO_C" >&6
29978 if test "${ol_cv_db_db_4_dot_1+set}" = set; then
29979   echo $ECHO_N "(cached) $ECHO_C" >&6
29980 else
29981
29982         ol_DB_LIB=-ldb-4.1
29983         ol_LIBS=$LIBS
29984         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29985
29986         cat >conftest.$ac_ext <<_ACEOF
29987 /* confdefs.h.  */
29988 _ACEOF
29989 cat confdefs.h >>conftest.$ac_ext
29990 cat >>conftest.$ac_ext <<_ACEOF
29991 /* end confdefs.h.  */
29992
29993 #ifdef HAVE_DB_185_H
29994 # include <db_185.h>
29995 #else
29996 # include <db.h>
29997 #endif
29998
29999 #ifndef DB_VERSION_MAJOR
30000 # define DB_VERSION_MAJOR 1
30001 #endif
30002
30003 #ifndef NULL
30004 #define NULL ((void*)0)
30005 #endif
30006
30007 int
30008 main ()
30009 {
30010
30011 #if DB_VERSION_MAJOR > 1
30012         {
30013                 char *version;
30014                 int major, minor, patch;
30015
30016                 version = db_version( &major, &minor, &patch );
30017
30018                 if( major != DB_VERSION_MAJOR ||
30019                         minor < DB_VERSION_MINOR )
30020                 {
30021                         printf("Berkeley DB version mismatch\n"
30022                                 "\theader: %s\n\tlibrary: %s\n",
30023                                 DB_VERSION_STRING, version);
30024                         return 1;
30025                 }
30026         }
30027 #endif
30028
30029 #if DB_VERSION_MAJOR > 2
30030         db_env_create( NULL, 0 );
30031 #elif DB_VERSION_MAJOR > 1
30032         db_appexit( NULL );
30033 #else
30034         (void) dbopen( NULL, 0, 0, 0, NULL);
30035 #endif
30036
30037   ;
30038   return 0;
30039 }
30040 _ACEOF
30041 rm -f conftest.$ac_objext conftest$ac_exeext
30042 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30043   (eval $ac_link) 2>conftest.er1
30044   ac_status=$?
30045   grep -v '^ *+' conftest.er1 >conftest.err
30046   rm -f conftest.er1
30047   cat conftest.err >&5
30048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30049   (exit $ac_status); } &&
30050          { ac_try='test -z "$ac_c_werror_flag"
30051                          || test ! -s conftest.err'
30052   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30053   (eval $ac_try) 2>&5
30054   ac_status=$?
30055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30056   (exit $ac_status); }; } &&
30057          { ac_try='test -s conftest$ac_exeext'
30058   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30059   (eval $ac_try) 2>&5
30060   ac_status=$?
30061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30062   (exit $ac_status); }; }; then
30063   ol_cv_db_db_4_dot_1=yes
30064 else
30065   echo "$as_me: failed program was:" >&5
30066 sed 's/^/| /' conftest.$ac_ext >&5
30067
30068 ol_cv_db_db_4_dot_1=no
30069 fi
30070 rm -f conftest.err conftest.$ac_objext \
30071       conftest$ac_exeext conftest.$ac_ext
30072
30073         LIBS="$ol_LIBS"
30074
30075 fi
30076 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_1" >&5
30077 echo "${ECHO_T}$ol_cv_db_db_4_dot_1" >&6
30078
30079         if test $ol_cv_db_db_4_dot_1 = yes ; then
30080                 ol_cv_lib_db=-ldb-4.1
30081         fi
30082 fi
30083
30084                 if test $ol_cv_lib_db = no ; then
30085         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-1)" >&5
30086 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-1)... $ECHO_C" >&6
30087 if test "${ol_cv_db_db_4_1+set}" = set; then
30088   echo $ECHO_N "(cached) $ECHO_C" >&6
30089 else
30090
30091         ol_DB_LIB=-ldb-4-1
30092         ol_LIBS=$LIBS
30093         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30094
30095         cat >conftest.$ac_ext <<_ACEOF
30096 /* confdefs.h.  */
30097 _ACEOF
30098 cat confdefs.h >>conftest.$ac_ext
30099 cat >>conftest.$ac_ext <<_ACEOF
30100 /* end confdefs.h.  */
30101
30102 #ifdef HAVE_DB_185_H
30103 # include <db_185.h>
30104 #else
30105 # include <db.h>
30106 #endif
30107
30108 #ifndef DB_VERSION_MAJOR
30109 # define DB_VERSION_MAJOR 1
30110 #endif
30111
30112 #ifndef NULL
30113 #define NULL ((void*)0)
30114 #endif
30115
30116 int
30117 main ()
30118 {
30119
30120 #if DB_VERSION_MAJOR > 1
30121         {
30122                 char *version;
30123                 int major, minor, patch;
30124
30125                 version = db_version( &major, &minor, &patch );
30126
30127                 if( major != DB_VERSION_MAJOR ||
30128                         minor < DB_VERSION_MINOR )
30129                 {
30130                         printf("Berkeley DB version mismatch\n"
30131                                 "\theader: %s\n\tlibrary: %s\n",
30132                                 DB_VERSION_STRING, version);
30133                         return 1;
30134                 }
30135         }
30136 #endif
30137
30138 #if DB_VERSION_MAJOR > 2
30139         db_env_create( NULL, 0 );
30140 #elif DB_VERSION_MAJOR > 1
30141         db_appexit( NULL );
30142 #else
30143         (void) dbopen( NULL, 0, 0, 0, NULL);
30144 #endif
30145
30146   ;
30147   return 0;
30148 }
30149 _ACEOF
30150 rm -f conftest.$ac_objext conftest$ac_exeext
30151 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30152   (eval $ac_link) 2>conftest.er1
30153   ac_status=$?
30154   grep -v '^ *+' conftest.er1 >conftest.err
30155   rm -f conftest.er1
30156   cat conftest.err >&5
30157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30158   (exit $ac_status); } &&
30159          { ac_try='test -z "$ac_c_werror_flag"
30160                          || test ! -s conftest.err'
30161   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30162   (eval $ac_try) 2>&5
30163   ac_status=$?
30164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30165   (exit $ac_status); }; } &&
30166          { ac_try='test -s conftest$ac_exeext'
30167   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30168   (eval $ac_try) 2>&5
30169   ac_status=$?
30170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30171   (exit $ac_status); }; }; then
30172   ol_cv_db_db_4_1=yes
30173 else
30174   echo "$as_me: failed program was:" >&5
30175 sed 's/^/| /' conftest.$ac_ext >&5
30176
30177 ol_cv_db_db_4_1=no
30178 fi
30179 rm -f conftest.err conftest.$ac_objext \
30180       conftest$ac_exeext conftest.$ac_ext
30181
30182         LIBS="$ol_LIBS"
30183
30184 fi
30185 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_1" >&5
30186 echo "${ECHO_T}$ol_cv_db_db_4_1" >&6
30187
30188         if test $ol_cv_db_db_4_1 = yes ; then
30189                 ol_cv_lib_db=-ldb-4-1
30190         fi
30191 fi
30192
30193         fi
30194         if test $ol_cv_lib_db = no ; then
30195         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4)" >&5
30196 echo $ECHO_N "checking for Berkeley DB link (-ldb-4)... $ECHO_C" >&6
30197 if test "${ol_cv_db_db_4+set}" = set; then
30198   echo $ECHO_N "(cached) $ECHO_C" >&6
30199 else
30200
30201         ol_DB_LIB=-ldb-4
30202         ol_LIBS=$LIBS
30203         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30204
30205         cat >conftest.$ac_ext <<_ACEOF
30206 /* confdefs.h.  */
30207 _ACEOF
30208 cat confdefs.h >>conftest.$ac_ext
30209 cat >>conftest.$ac_ext <<_ACEOF
30210 /* end confdefs.h.  */
30211
30212 #ifdef HAVE_DB_185_H
30213 # include <db_185.h>
30214 #else
30215 # include <db.h>
30216 #endif
30217
30218 #ifndef DB_VERSION_MAJOR
30219 # define DB_VERSION_MAJOR 1
30220 #endif
30221
30222 #ifndef NULL
30223 #define NULL ((void*)0)
30224 #endif
30225
30226 int
30227 main ()
30228 {
30229
30230 #if DB_VERSION_MAJOR > 1
30231         {
30232                 char *version;
30233                 int major, minor, patch;
30234
30235                 version = db_version( &major, &minor, &patch );
30236
30237                 if( major != DB_VERSION_MAJOR ||
30238                         minor < DB_VERSION_MINOR )
30239                 {
30240                         printf("Berkeley DB version mismatch\n"
30241                                 "\theader: %s\n\tlibrary: %s\n",
30242                                 DB_VERSION_STRING, version);
30243                         return 1;
30244                 }
30245         }
30246 #endif
30247
30248 #if DB_VERSION_MAJOR > 2
30249         db_env_create( NULL, 0 );
30250 #elif DB_VERSION_MAJOR > 1
30251         db_appexit( NULL );
30252 #else
30253         (void) dbopen( NULL, 0, 0, 0, NULL);
30254 #endif
30255
30256   ;
30257   return 0;
30258 }
30259 _ACEOF
30260 rm -f conftest.$ac_objext conftest$ac_exeext
30261 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30262   (eval $ac_link) 2>conftest.er1
30263   ac_status=$?
30264   grep -v '^ *+' conftest.er1 >conftest.err
30265   rm -f conftest.er1
30266   cat conftest.err >&5
30267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30268   (exit $ac_status); } &&
30269          { ac_try='test -z "$ac_c_werror_flag"
30270                          || test ! -s conftest.err'
30271   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30272   (eval $ac_try) 2>&5
30273   ac_status=$?
30274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30275   (exit $ac_status); }; } &&
30276          { ac_try='test -s conftest$ac_exeext'
30277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30278   (eval $ac_try) 2>&5
30279   ac_status=$?
30280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30281   (exit $ac_status); }; }; then
30282   ol_cv_db_db_4=yes
30283 else
30284   echo "$as_me: failed program was:" >&5
30285 sed 's/^/| /' conftest.$ac_ext >&5
30286
30287 ol_cv_db_db_4=no
30288 fi
30289 rm -f conftest.err conftest.$ac_objext \
30290       conftest$ac_exeext conftest.$ac_ext
30291
30292         LIBS="$ol_LIBS"
30293
30294 fi
30295 echo "$as_me:$LINENO: result: $ol_cv_db_db_4" >&5
30296 echo "${ECHO_T}$ol_cv_db_db_4" >&6
30297
30298         if test $ol_cv_db_db_4 = yes ; then
30299                 ol_cv_lib_db=-ldb-4
30300         fi
30301 fi
30302
30303         if test $ol_cv_lib_db = no ; then
30304         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb4)" >&5
30305 echo $ECHO_N "checking for Berkeley DB link (-ldb4)... $ECHO_C" >&6
30306 if test "${ol_cv_db_db4+set}" = set; then
30307   echo $ECHO_N "(cached) $ECHO_C" >&6
30308 else
30309
30310         ol_DB_LIB=-ldb4
30311         ol_LIBS=$LIBS
30312         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30313
30314         cat >conftest.$ac_ext <<_ACEOF
30315 /* confdefs.h.  */
30316 _ACEOF
30317 cat confdefs.h >>conftest.$ac_ext
30318 cat >>conftest.$ac_ext <<_ACEOF
30319 /* end confdefs.h.  */
30320
30321 #ifdef HAVE_DB_185_H
30322 # include <db_185.h>
30323 #else
30324 # include <db.h>
30325 #endif
30326
30327 #ifndef DB_VERSION_MAJOR
30328 # define DB_VERSION_MAJOR 1
30329 #endif
30330
30331 #ifndef NULL
30332 #define NULL ((void*)0)
30333 #endif
30334
30335 int
30336 main ()
30337 {
30338
30339 #if DB_VERSION_MAJOR > 1
30340         {
30341                 char *version;
30342                 int major, minor, patch;
30343
30344                 version = db_version( &major, &minor, &patch );
30345
30346                 if( major != DB_VERSION_MAJOR ||
30347                         minor < DB_VERSION_MINOR )
30348                 {
30349                         printf("Berkeley DB version mismatch\n"
30350                                 "\theader: %s\n\tlibrary: %s\n",
30351                                 DB_VERSION_STRING, version);
30352                         return 1;
30353                 }
30354         }
30355 #endif
30356
30357 #if DB_VERSION_MAJOR > 2
30358         db_env_create( NULL, 0 );
30359 #elif DB_VERSION_MAJOR > 1
30360         db_appexit( NULL );
30361 #else
30362         (void) dbopen( NULL, 0, 0, 0, NULL);
30363 #endif
30364
30365   ;
30366   return 0;
30367 }
30368 _ACEOF
30369 rm -f conftest.$ac_objext conftest$ac_exeext
30370 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30371   (eval $ac_link) 2>conftest.er1
30372   ac_status=$?
30373   grep -v '^ *+' conftest.er1 >conftest.err
30374   rm -f conftest.er1
30375   cat conftest.err >&5
30376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30377   (exit $ac_status); } &&
30378          { ac_try='test -z "$ac_c_werror_flag"
30379                          || test ! -s conftest.err'
30380   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30381   (eval $ac_try) 2>&5
30382   ac_status=$?
30383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30384   (exit $ac_status); }; } &&
30385          { ac_try='test -s conftest$ac_exeext'
30386   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30387   (eval $ac_try) 2>&5
30388   ac_status=$?
30389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30390   (exit $ac_status); }; }; then
30391   ol_cv_db_db4=yes
30392 else
30393   echo "$as_me: failed program was:" >&5
30394 sed 's/^/| /' conftest.$ac_ext >&5
30395
30396 ol_cv_db_db4=no
30397 fi
30398 rm -f conftest.err conftest.$ac_objext \
30399       conftest$ac_exeext conftest.$ac_ext
30400
30401         LIBS="$ol_LIBS"
30402
30403 fi
30404 echo "$as_me:$LINENO: result: $ol_cv_db_db4" >&5
30405 echo "${ECHO_T}$ol_cv_db_db4" >&6
30406
30407         if test $ol_cv_db_db4 = yes ; then
30408                 ol_cv_lib_db=-ldb4
30409         fi
30410 fi
30411
30412         if test $ol_cv_lib_db = no ; then
30413         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb)" >&5
30414 echo $ECHO_N "checking for Berkeley DB link (-ldb)... $ECHO_C" >&6
30415 if test "${ol_cv_db_db+set}" = set; then
30416   echo $ECHO_N "(cached) $ECHO_C" >&6
30417 else
30418
30419         ol_DB_LIB=-ldb
30420         ol_LIBS=$LIBS
30421         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30422
30423         cat >conftest.$ac_ext <<_ACEOF
30424 /* confdefs.h.  */
30425 _ACEOF
30426 cat confdefs.h >>conftest.$ac_ext
30427 cat >>conftest.$ac_ext <<_ACEOF
30428 /* end confdefs.h.  */
30429
30430 #ifdef HAVE_DB_185_H
30431 # include <db_185.h>
30432 #else
30433 # include <db.h>
30434 #endif
30435
30436 #ifndef DB_VERSION_MAJOR
30437 # define DB_VERSION_MAJOR 1
30438 #endif
30439
30440 #ifndef NULL
30441 #define NULL ((void*)0)
30442 #endif
30443
30444 int
30445 main ()
30446 {
30447
30448 #if DB_VERSION_MAJOR > 1
30449         {
30450                 char *version;
30451                 int major, minor, patch;
30452
30453                 version = db_version( &major, &minor, &patch );
30454
30455                 if( major != DB_VERSION_MAJOR ||
30456                         minor < DB_VERSION_MINOR )
30457                 {
30458                         printf("Berkeley DB version mismatch\n"
30459                                 "\theader: %s\n\tlibrary: %s\n",
30460                                 DB_VERSION_STRING, version);
30461                         return 1;
30462                 }
30463         }
30464 #endif
30465
30466 #if DB_VERSION_MAJOR > 2
30467         db_env_create( NULL, 0 );
30468 #elif DB_VERSION_MAJOR > 1
30469         db_appexit( NULL );
30470 #else
30471         (void) dbopen( NULL, 0, 0, 0, NULL);
30472 #endif
30473
30474   ;
30475   return 0;
30476 }
30477 _ACEOF
30478 rm -f conftest.$ac_objext conftest$ac_exeext
30479 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30480   (eval $ac_link) 2>conftest.er1
30481   ac_status=$?
30482   grep -v '^ *+' conftest.er1 >conftest.err
30483   rm -f conftest.er1
30484   cat conftest.err >&5
30485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30486   (exit $ac_status); } &&
30487          { ac_try='test -z "$ac_c_werror_flag"
30488                          || test ! -s conftest.err'
30489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30490   (eval $ac_try) 2>&5
30491   ac_status=$?
30492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30493   (exit $ac_status); }; } &&
30494          { ac_try='test -s conftest$ac_exeext'
30495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30496   (eval $ac_try) 2>&5
30497   ac_status=$?
30498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30499   (exit $ac_status); }; }; then
30500   ol_cv_db_db=yes
30501 else
30502   echo "$as_me: failed program was:" >&5
30503 sed 's/^/| /' conftest.$ac_ext >&5
30504
30505 ol_cv_db_db=no
30506 fi
30507 rm -f conftest.err conftest.$ac_objext \
30508       conftest$ac_exeext conftest.$ac_ext
30509
30510         LIBS="$ol_LIBS"
30511
30512 fi
30513 echo "$as_me:$LINENO: result: $ol_cv_db_db" >&5
30514 echo "${ECHO_T}$ol_cv_db_db" >&6
30515
30516         if test $ol_cv_db_db = yes ; then
30517                 ol_cv_lib_db=-ldb
30518         fi
30519 fi
30520
30521
30522 elif test $ol_cv_bdb_major = 3 ; then
30523         if test $ol_cv_lib_db = no ; then
30524         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb3)" >&5
30525 echo $ECHO_N "checking for Berkeley DB link (-ldb3)... $ECHO_C" >&6
30526 if test "${ol_cv_db_db3+set}" = set; then
30527   echo $ECHO_N "(cached) $ECHO_C" >&6
30528 else
30529
30530         ol_DB_LIB=-ldb3
30531         ol_LIBS=$LIBS
30532         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30533
30534         cat >conftest.$ac_ext <<_ACEOF
30535 /* confdefs.h.  */
30536 _ACEOF
30537 cat confdefs.h >>conftest.$ac_ext
30538 cat >>conftest.$ac_ext <<_ACEOF
30539 /* end confdefs.h.  */
30540
30541 #ifdef HAVE_DB_185_H
30542 # include <db_185.h>
30543 #else
30544 # include <db.h>
30545 #endif
30546
30547 #ifndef DB_VERSION_MAJOR
30548 # define DB_VERSION_MAJOR 1
30549 #endif
30550
30551 #ifndef NULL
30552 #define NULL ((void*)0)
30553 #endif
30554
30555 int
30556 main ()
30557 {
30558
30559 #if DB_VERSION_MAJOR > 1
30560         {
30561                 char *version;
30562                 int major, minor, patch;
30563
30564                 version = db_version( &major, &minor, &patch );
30565
30566                 if( major != DB_VERSION_MAJOR ||
30567                         minor < DB_VERSION_MINOR )
30568                 {
30569                         printf("Berkeley DB version mismatch\n"
30570                                 "\theader: %s\n\tlibrary: %s\n",
30571                                 DB_VERSION_STRING, version);
30572                         return 1;
30573                 }
30574         }
30575 #endif
30576
30577 #if DB_VERSION_MAJOR > 2
30578         db_env_create( NULL, 0 );
30579 #elif DB_VERSION_MAJOR > 1
30580         db_appexit( NULL );
30581 #else
30582         (void) dbopen( NULL, 0, 0, 0, NULL);
30583 #endif
30584
30585   ;
30586   return 0;
30587 }
30588 _ACEOF
30589 rm -f conftest.$ac_objext conftest$ac_exeext
30590 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30591   (eval $ac_link) 2>conftest.er1
30592   ac_status=$?
30593   grep -v '^ *+' conftest.er1 >conftest.err
30594   rm -f conftest.er1
30595   cat conftest.err >&5
30596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30597   (exit $ac_status); } &&
30598          { ac_try='test -z "$ac_c_werror_flag"
30599                          || test ! -s conftest.err'
30600   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30601   (eval $ac_try) 2>&5
30602   ac_status=$?
30603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30604   (exit $ac_status); }; } &&
30605          { ac_try='test -s conftest$ac_exeext'
30606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30607   (eval $ac_try) 2>&5
30608   ac_status=$?
30609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30610   (exit $ac_status); }; }; then
30611   ol_cv_db_db3=yes
30612 else
30613   echo "$as_me: failed program was:" >&5
30614 sed 's/^/| /' conftest.$ac_ext >&5
30615
30616 ol_cv_db_db3=no
30617 fi
30618 rm -f conftest.err conftest.$ac_objext \
30619       conftest$ac_exeext conftest.$ac_ext
30620
30621         LIBS="$ol_LIBS"
30622
30623 fi
30624 echo "$as_me:$LINENO: result: $ol_cv_db_db3" >&5
30625 echo "${ECHO_T}$ol_cv_db_db3" >&6
30626
30627         if test $ol_cv_db_db3 = yes ; then
30628                 ol_cv_lib_db=-ldb3
30629         fi
30630 fi
30631
30632         if test $ol_cv_lib_db = no ; then
30633         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-3)" >&5
30634 echo $ECHO_N "checking for Berkeley DB link (-ldb-3)... $ECHO_C" >&6
30635 if test "${ol_cv_db_db_3+set}" = set; then
30636   echo $ECHO_N "(cached) $ECHO_C" >&6
30637 else
30638
30639         ol_DB_LIB=-ldb-3
30640         ol_LIBS=$LIBS
30641         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30642
30643         cat >conftest.$ac_ext <<_ACEOF
30644 /* confdefs.h.  */
30645 _ACEOF
30646 cat confdefs.h >>conftest.$ac_ext
30647 cat >>conftest.$ac_ext <<_ACEOF
30648 /* end confdefs.h.  */
30649
30650 #ifdef HAVE_DB_185_H
30651 # include <db_185.h>
30652 #else
30653 # include <db.h>
30654 #endif
30655
30656 #ifndef DB_VERSION_MAJOR
30657 # define DB_VERSION_MAJOR 1
30658 #endif
30659
30660 #ifndef NULL
30661 #define NULL ((void*)0)
30662 #endif
30663
30664 int
30665 main ()
30666 {
30667
30668 #if DB_VERSION_MAJOR > 1
30669         {
30670                 char *version;
30671                 int major, minor, patch;
30672
30673                 version = db_version( &major, &minor, &patch );
30674
30675                 if( major != DB_VERSION_MAJOR ||
30676                         minor < DB_VERSION_MINOR )
30677                 {
30678                         printf("Berkeley DB version mismatch\n"
30679                                 "\theader: %s\n\tlibrary: %s\n",
30680                                 DB_VERSION_STRING, version);
30681                         return 1;
30682                 }
30683         }
30684 #endif
30685
30686 #if DB_VERSION_MAJOR > 2
30687         db_env_create( NULL, 0 );
30688 #elif DB_VERSION_MAJOR > 1
30689         db_appexit( NULL );
30690 #else
30691         (void) dbopen( NULL, 0, 0, 0, NULL);
30692 #endif
30693
30694   ;
30695   return 0;
30696 }
30697 _ACEOF
30698 rm -f conftest.$ac_objext conftest$ac_exeext
30699 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30700   (eval $ac_link) 2>conftest.er1
30701   ac_status=$?
30702   grep -v '^ *+' conftest.er1 >conftest.err
30703   rm -f conftest.er1
30704   cat conftest.err >&5
30705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30706   (exit $ac_status); } &&
30707          { ac_try='test -z "$ac_c_werror_flag"
30708                          || test ! -s conftest.err'
30709   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30710   (eval $ac_try) 2>&5
30711   ac_status=$?
30712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30713   (exit $ac_status); }; } &&
30714          { ac_try='test -s conftest$ac_exeext'
30715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30716   (eval $ac_try) 2>&5
30717   ac_status=$?
30718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30719   (exit $ac_status); }; }; then
30720   ol_cv_db_db_3=yes
30721 else
30722   echo "$as_me: failed program was:" >&5
30723 sed 's/^/| /' conftest.$ac_ext >&5
30724
30725 ol_cv_db_db_3=no
30726 fi
30727 rm -f conftest.err conftest.$ac_objext \
30728       conftest$ac_exeext conftest.$ac_ext
30729
30730         LIBS="$ol_LIBS"
30731
30732 fi
30733 echo "$as_me:$LINENO: result: $ol_cv_db_db_3" >&5
30734 echo "${ECHO_T}$ol_cv_db_db_3" >&6
30735
30736         if test $ol_cv_db_db_3 = yes ; then
30737                 ol_cv_lib_db=-ldb-3
30738         fi
30739 fi
30740
30741
30742 elif test $ol_cv_bdb_major = 2 ; then
30743         if test $ol_cv_lib_db = no ; then
30744         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb2)" >&5
30745 echo $ECHO_N "checking for Berkeley DB link (-ldb2)... $ECHO_C" >&6
30746 if test "${ol_cv_db_db2+set}" = set; then
30747   echo $ECHO_N "(cached) $ECHO_C" >&6
30748 else
30749
30750         ol_DB_LIB=-ldb2
30751         ol_LIBS=$LIBS
30752         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30753
30754         cat >conftest.$ac_ext <<_ACEOF
30755 /* confdefs.h.  */
30756 _ACEOF
30757 cat confdefs.h >>conftest.$ac_ext
30758 cat >>conftest.$ac_ext <<_ACEOF
30759 /* end confdefs.h.  */
30760
30761 #ifdef HAVE_DB_185_H
30762 # include <db_185.h>
30763 #else
30764 # include <db.h>
30765 #endif
30766
30767 #ifndef DB_VERSION_MAJOR
30768 # define DB_VERSION_MAJOR 1
30769 #endif
30770
30771 #ifndef NULL
30772 #define NULL ((void*)0)
30773 #endif
30774
30775 int
30776 main ()
30777 {
30778
30779 #if DB_VERSION_MAJOR > 1
30780         {
30781                 char *version;
30782                 int major, minor, patch;
30783
30784                 version = db_version( &major, &minor, &patch );
30785
30786                 if( major != DB_VERSION_MAJOR ||
30787                         minor < DB_VERSION_MINOR )
30788                 {
30789                         printf("Berkeley DB version mismatch\n"
30790                                 "\theader: %s\n\tlibrary: %s\n",
30791                                 DB_VERSION_STRING, version);
30792                         return 1;
30793                 }
30794         }
30795 #endif
30796
30797 #if DB_VERSION_MAJOR > 2
30798         db_env_create( NULL, 0 );
30799 #elif DB_VERSION_MAJOR > 1
30800         db_appexit( NULL );
30801 #else
30802         (void) dbopen( NULL, 0, 0, 0, NULL);
30803 #endif
30804
30805   ;
30806   return 0;
30807 }
30808 _ACEOF
30809 rm -f conftest.$ac_objext conftest$ac_exeext
30810 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30811   (eval $ac_link) 2>conftest.er1
30812   ac_status=$?
30813   grep -v '^ *+' conftest.er1 >conftest.err
30814   rm -f conftest.er1
30815   cat conftest.err >&5
30816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30817   (exit $ac_status); } &&
30818          { ac_try='test -z "$ac_c_werror_flag"
30819                          || test ! -s conftest.err'
30820   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30821   (eval $ac_try) 2>&5
30822   ac_status=$?
30823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30824   (exit $ac_status); }; } &&
30825          { ac_try='test -s conftest$ac_exeext'
30826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30827   (eval $ac_try) 2>&5
30828   ac_status=$?
30829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30830   (exit $ac_status); }; }; then
30831   ol_cv_db_db2=yes
30832 else
30833   echo "$as_me: failed program was:" >&5
30834 sed 's/^/| /' conftest.$ac_ext >&5
30835
30836 ol_cv_db_db2=no
30837 fi
30838 rm -f conftest.err conftest.$ac_objext \
30839       conftest$ac_exeext conftest.$ac_ext
30840
30841         LIBS="$ol_LIBS"
30842
30843 fi
30844 echo "$as_me:$LINENO: result: $ol_cv_db_db2" >&5
30845 echo "${ECHO_T}$ol_cv_db_db2" >&6
30846
30847         if test $ol_cv_db_db2 = yes ; then
30848                 ol_cv_lib_db=-ldb2
30849         fi
30850 fi
30851
30852         if test $ol_cv_lib_db = no ; then
30853         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-2)" >&5
30854 echo $ECHO_N "checking for Berkeley DB link (-ldb-2)... $ECHO_C" >&6
30855 if test "${ol_cv_db_db_2+set}" = set; then
30856   echo $ECHO_N "(cached) $ECHO_C" >&6
30857 else
30858
30859         ol_DB_LIB=-ldb-2
30860         ol_LIBS=$LIBS
30861         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30862
30863         cat >conftest.$ac_ext <<_ACEOF
30864 /* confdefs.h.  */
30865 _ACEOF
30866 cat confdefs.h >>conftest.$ac_ext
30867 cat >>conftest.$ac_ext <<_ACEOF
30868 /* end confdefs.h.  */
30869
30870 #ifdef HAVE_DB_185_H
30871 # include <db_185.h>
30872 #else
30873 # include <db.h>
30874 #endif
30875
30876 #ifndef DB_VERSION_MAJOR
30877 # define DB_VERSION_MAJOR 1
30878 #endif
30879
30880 #ifndef NULL
30881 #define NULL ((void*)0)
30882 #endif
30883
30884 int
30885 main ()
30886 {
30887
30888 #if DB_VERSION_MAJOR > 1
30889         {
30890                 char *version;
30891                 int major, minor, patch;
30892
30893                 version = db_version( &major, &minor, &patch );
30894
30895                 if( major != DB_VERSION_MAJOR ||
30896                         minor < DB_VERSION_MINOR )
30897                 {
30898                         printf("Berkeley DB version mismatch\n"
30899                                 "\theader: %s\n\tlibrary: %s\n",
30900                                 DB_VERSION_STRING, version);
30901                         return 1;
30902                 }
30903         }
30904 #endif
30905
30906 #if DB_VERSION_MAJOR > 2
30907         db_env_create( NULL, 0 );
30908 #elif DB_VERSION_MAJOR > 1
30909         db_appexit( NULL );
30910 #else
30911         (void) dbopen( NULL, 0, 0, 0, NULL);
30912 #endif
30913
30914   ;
30915   return 0;
30916 }
30917 _ACEOF
30918 rm -f conftest.$ac_objext conftest$ac_exeext
30919 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30920   (eval $ac_link) 2>conftest.er1
30921   ac_status=$?
30922   grep -v '^ *+' conftest.er1 >conftest.err
30923   rm -f conftest.er1
30924   cat conftest.err >&5
30925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30926   (exit $ac_status); } &&
30927          { ac_try='test -z "$ac_c_werror_flag"
30928                          || test ! -s conftest.err'
30929   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30930   (eval $ac_try) 2>&5
30931   ac_status=$?
30932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30933   (exit $ac_status); }; } &&
30934          { ac_try='test -s conftest$ac_exeext'
30935   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30936   (eval $ac_try) 2>&5
30937   ac_status=$?
30938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30939   (exit $ac_status); }; }; then
30940   ol_cv_db_db_2=yes
30941 else
30942   echo "$as_me: failed program was:" >&5
30943 sed 's/^/| /' conftest.$ac_ext >&5
30944
30945 ol_cv_db_db_2=no
30946 fi
30947 rm -f conftest.err conftest.$ac_objext \
30948       conftest$ac_exeext conftest.$ac_ext
30949
30950         LIBS="$ol_LIBS"
30951
30952 fi
30953 echo "$as_me:$LINENO: result: $ol_cv_db_db_2" >&5
30954 echo "${ECHO_T}$ol_cv_db_db_2" >&6
30955
30956         if test $ol_cv_db_db_2 = yes ; then
30957                 ol_cv_lib_db=-ldb-2
30958         fi
30959 fi
30960
30961
30962 elif test $ol_cv_bdb_major = 1 ; then
30963         if test $ol_cv_lib_db = no ; then
30964         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb1)" >&5
30965 echo $ECHO_N "checking for Berkeley DB link (-ldb1)... $ECHO_C" >&6
30966 if test "${ol_cv_db_db1+set}" = set; then
30967   echo $ECHO_N "(cached) $ECHO_C" >&6
30968 else
30969
30970         ol_DB_LIB=-ldb1
30971         ol_LIBS=$LIBS
30972         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30973
30974         cat >conftest.$ac_ext <<_ACEOF
30975 /* confdefs.h.  */
30976 _ACEOF
30977 cat confdefs.h >>conftest.$ac_ext
30978 cat >>conftest.$ac_ext <<_ACEOF
30979 /* end confdefs.h.  */
30980
30981 #ifdef HAVE_DB_185_H
30982 # include <db_185.h>
30983 #else
30984 # include <db.h>
30985 #endif
30986
30987 #ifndef DB_VERSION_MAJOR
30988 # define DB_VERSION_MAJOR 1
30989 #endif
30990
30991 #ifndef NULL
30992 #define NULL ((void*)0)
30993 #endif
30994
30995 int
30996 main ()
30997 {
30998
30999 #if DB_VERSION_MAJOR > 1
31000         {
31001                 char *version;
31002                 int major, minor, patch;
31003
31004                 version = db_version( &major, &minor, &patch );
31005
31006                 if( major != DB_VERSION_MAJOR ||
31007                         minor < DB_VERSION_MINOR )
31008                 {
31009                         printf("Berkeley DB version mismatch\n"
31010                                 "\theader: %s\n\tlibrary: %s\n",
31011                                 DB_VERSION_STRING, version);
31012                         return 1;
31013                 }
31014         }
31015 #endif
31016
31017 #if DB_VERSION_MAJOR > 2
31018         db_env_create( NULL, 0 );
31019 #elif DB_VERSION_MAJOR > 1
31020         db_appexit( NULL );
31021 #else
31022         (void) dbopen( NULL, 0, 0, 0, NULL);
31023 #endif
31024
31025   ;
31026   return 0;
31027 }
31028 _ACEOF
31029 rm -f conftest.$ac_objext conftest$ac_exeext
31030 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31031   (eval $ac_link) 2>conftest.er1
31032   ac_status=$?
31033   grep -v '^ *+' conftest.er1 >conftest.err
31034   rm -f conftest.er1
31035   cat conftest.err >&5
31036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31037   (exit $ac_status); } &&
31038          { ac_try='test -z "$ac_c_werror_flag"
31039                          || test ! -s conftest.err'
31040   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31041   (eval $ac_try) 2>&5
31042   ac_status=$?
31043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31044   (exit $ac_status); }; } &&
31045          { ac_try='test -s conftest$ac_exeext'
31046   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31047   (eval $ac_try) 2>&5
31048   ac_status=$?
31049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31050   (exit $ac_status); }; }; then
31051   ol_cv_db_db1=yes
31052 else
31053   echo "$as_me: failed program was:" >&5
31054 sed 's/^/| /' conftest.$ac_ext >&5
31055
31056 ol_cv_db_db1=no
31057 fi
31058 rm -f conftest.err conftest.$ac_objext \
31059       conftest$ac_exeext conftest.$ac_ext
31060
31061         LIBS="$ol_LIBS"
31062
31063 fi
31064 echo "$as_me:$LINENO: result: $ol_cv_db_db1" >&5
31065 echo "${ECHO_T}$ol_cv_db_db1" >&6
31066
31067         if test $ol_cv_db_db1 = yes ; then
31068                 ol_cv_lib_db=-ldb1
31069         fi
31070 fi
31071
31072         if test $ol_cv_lib_db = no ; then
31073         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-1)" >&5
31074 echo $ECHO_N "checking for Berkeley DB link (-ldb-1)... $ECHO_C" >&6
31075 if test "${ol_cv_db_db_1+set}" = set; then
31076   echo $ECHO_N "(cached) $ECHO_C" >&6
31077 else
31078
31079         ol_DB_LIB=-ldb-1
31080         ol_LIBS=$LIBS
31081         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31082
31083         cat >conftest.$ac_ext <<_ACEOF
31084 /* confdefs.h.  */
31085 _ACEOF
31086 cat confdefs.h >>conftest.$ac_ext
31087 cat >>conftest.$ac_ext <<_ACEOF
31088 /* end confdefs.h.  */
31089
31090 #ifdef HAVE_DB_185_H
31091 # include <db_185.h>
31092 #else
31093 # include <db.h>
31094 #endif
31095
31096 #ifndef DB_VERSION_MAJOR
31097 # define DB_VERSION_MAJOR 1
31098 #endif
31099
31100 #ifndef NULL
31101 #define NULL ((void*)0)
31102 #endif
31103
31104 int
31105 main ()
31106 {
31107
31108 #if DB_VERSION_MAJOR > 1
31109         {
31110                 char *version;
31111                 int major, minor, patch;
31112
31113                 version = db_version( &major, &minor, &patch );
31114
31115                 if( major != DB_VERSION_MAJOR ||
31116                         minor < DB_VERSION_MINOR )
31117                 {
31118                         printf("Berkeley DB version mismatch\n"
31119                                 "\theader: %s\n\tlibrary: %s\n",
31120                                 DB_VERSION_STRING, version);
31121                         return 1;
31122                 }
31123         }
31124 #endif
31125
31126 #if DB_VERSION_MAJOR > 2
31127         db_env_create( NULL, 0 );
31128 #elif DB_VERSION_MAJOR > 1
31129         db_appexit( NULL );
31130 #else
31131         (void) dbopen( NULL, 0, 0, 0, NULL);
31132 #endif
31133
31134   ;
31135   return 0;
31136 }
31137 _ACEOF
31138 rm -f conftest.$ac_objext conftest$ac_exeext
31139 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31140   (eval $ac_link) 2>conftest.er1
31141   ac_status=$?
31142   grep -v '^ *+' conftest.er1 >conftest.err
31143   rm -f conftest.er1
31144   cat conftest.err >&5
31145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31146   (exit $ac_status); } &&
31147          { ac_try='test -z "$ac_c_werror_flag"
31148                          || test ! -s conftest.err'
31149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31150   (eval $ac_try) 2>&5
31151   ac_status=$?
31152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31153   (exit $ac_status); }; } &&
31154          { ac_try='test -s conftest$ac_exeext'
31155   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31156   (eval $ac_try) 2>&5
31157   ac_status=$?
31158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31159   (exit $ac_status); }; }; then
31160   ol_cv_db_db_1=yes
31161 else
31162   echo "$as_me: failed program was:" >&5
31163 sed 's/^/| /' conftest.$ac_ext >&5
31164
31165 ol_cv_db_db_1=no
31166 fi
31167 rm -f conftest.err conftest.$ac_objext \
31168       conftest$ac_exeext conftest.$ac_ext
31169
31170         LIBS="$ol_LIBS"
31171
31172 fi
31173 echo "$as_me:$LINENO: result: $ol_cv_db_db_1" >&5
31174 echo "${ECHO_T}$ol_cv_db_db_1" >&6
31175
31176         if test $ol_cv_db_db_1 = yes ; then
31177                 ol_cv_lib_db=-ldb-1
31178         fi
31179 fi
31180
31181 fi
31182 if test $ol_cv_lib_db = no ; then
31183         echo "$as_me:$LINENO: checking for Berkeley DB link (default)" >&5
31184 echo $ECHO_N "checking for Berkeley DB link (default)... $ECHO_C" >&6
31185 if test "${ol_cv_db_none+set}" = set; then
31186   echo $ECHO_N "(cached) $ECHO_C" >&6
31187 else
31188
31189         ol_DB_LIB=
31190         ol_LIBS=$LIBS
31191         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31192
31193         cat >conftest.$ac_ext <<_ACEOF
31194 /* confdefs.h.  */
31195 _ACEOF
31196 cat confdefs.h >>conftest.$ac_ext
31197 cat >>conftest.$ac_ext <<_ACEOF
31198 /* end confdefs.h.  */
31199
31200 #ifdef HAVE_DB_185_H
31201 # include <db_185.h>
31202 #else
31203 # include <db.h>
31204 #endif
31205
31206 #ifndef DB_VERSION_MAJOR
31207 # define DB_VERSION_MAJOR 1
31208 #endif
31209
31210 #ifndef NULL
31211 #define NULL ((void*)0)
31212 #endif
31213
31214 int
31215 main ()
31216 {
31217
31218 #if DB_VERSION_MAJOR > 1
31219         {
31220                 char *version;
31221                 int major, minor, patch;
31222
31223                 version = db_version( &major, &minor, &patch );
31224
31225                 if( major != DB_VERSION_MAJOR ||
31226                         minor < DB_VERSION_MINOR )
31227                 {
31228                         printf("Berkeley DB version mismatch\n"
31229                                 "\theader: %s\n\tlibrary: %s\n",
31230                                 DB_VERSION_STRING, version);
31231                         return 1;
31232                 }
31233         }
31234 #endif
31235
31236 #if DB_VERSION_MAJOR > 2
31237         db_env_create( NULL, 0 );
31238 #elif DB_VERSION_MAJOR > 1
31239         db_appexit( NULL );
31240 #else
31241         (void) dbopen( NULL, 0, 0, 0, NULL);
31242 #endif
31243
31244   ;
31245   return 0;
31246 }
31247 _ACEOF
31248 rm -f conftest.$ac_objext conftest$ac_exeext
31249 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31250   (eval $ac_link) 2>conftest.er1
31251   ac_status=$?
31252   grep -v '^ *+' conftest.er1 >conftest.err
31253   rm -f conftest.er1
31254   cat conftest.err >&5
31255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31256   (exit $ac_status); } &&
31257          { ac_try='test -z "$ac_c_werror_flag"
31258                          || test ! -s conftest.err'
31259   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31260   (eval $ac_try) 2>&5
31261   ac_status=$?
31262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31263   (exit $ac_status); }; } &&
31264          { ac_try='test -s conftest$ac_exeext'
31265   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31266   (eval $ac_try) 2>&5
31267   ac_status=$?
31268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31269   (exit $ac_status); }; }; then
31270   ol_cv_db_none=yes
31271 else
31272   echo "$as_me: failed program was:" >&5
31273 sed 's/^/| /' conftest.$ac_ext >&5
31274
31275 ol_cv_db_none=no
31276 fi
31277 rm -f conftest.err conftest.$ac_objext \
31278       conftest$ac_exeext conftest.$ac_ext
31279
31280         LIBS="$ol_LIBS"
31281
31282 fi
31283 echo "$as_me:$LINENO: result: $ol_cv_db_none" >&5
31284 echo "${ECHO_T}$ol_cv_db_none" >&6
31285
31286         if test $ol_cv_db_none = yes ; then
31287                 ol_cv_lib_db=yes
31288         fi
31289 fi
31290
31291
31292                 if test "$ol_cv_lib_db" != no ; then
31293                         ol_cv_berkeley_db=yes
31294                 fi
31295         fi
31296 fi
31297
31298         else
31299                 ol_cv_berkeley_db=no
31300
31301 for ac_header in db.h
31302 do
31303 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
31304 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31305   echo "$as_me:$LINENO: checking for $ac_header" >&5
31306 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31307 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31308   echo $ECHO_N "(cached) $ECHO_C" >&6
31309 fi
31310 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
31311 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
31312 else
31313   # Is the header compilable?
31314 echo "$as_me:$LINENO: checking $ac_header usability" >&5
31315 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
31316 cat >conftest.$ac_ext <<_ACEOF
31317 /* confdefs.h.  */
31318 _ACEOF
31319 cat confdefs.h >>conftest.$ac_ext
31320 cat >>conftest.$ac_ext <<_ACEOF
31321 /* end confdefs.h.  */
31322 $ac_includes_default
31323 #include <$ac_header>
31324 _ACEOF
31325 rm -f conftest.$ac_objext
31326 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
31327   (eval $ac_compile) 2>conftest.er1
31328   ac_status=$?
31329   grep -v '^ *+' conftest.er1 >conftest.err
31330   rm -f conftest.er1
31331   cat conftest.err >&5
31332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31333   (exit $ac_status); } &&
31334          { ac_try='test -z "$ac_c_werror_flag"
31335                          || test ! -s conftest.err'
31336   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31337   (eval $ac_try) 2>&5
31338   ac_status=$?
31339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31340   (exit $ac_status); }; } &&
31341          { ac_try='test -s conftest.$ac_objext'
31342   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31343   (eval $ac_try) 2>&5
31344   ac_status=$?
31345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31346   (exit $ac_status); }; }; then
31347   ac_header_compiler=yes
31348 else
31349   echo "$as_me: failed program was:" >&5
31350 sed 's/^/| /' conftest.$ac_ext >&5
31351
31352 ac_header_compiler=no
31353 fi
31354 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
31355 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
31356 echo "${ECHO_T}$ac_header_compiler" >&6
31357
31358 # Is the header present?
31359 echo "$as_me:$LINENO: checking $ac_header presence" >&5
31360 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
31361 cat >conftest.$ac_ext <<_ACEOF
31362 /* confdefs.h.  */
31363 _ACEOF
31364 cat confdefs.h >>conftest.$ac_ext
31365 cat >>conftest.$ac_ext <<_ACEOF
31366 /* end confdefs.h.  */
31367 #include <$ac_header>
31368 _ACEOF
31369 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
31370   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
31371   ac_status=$?
31372   grep -v '^ *+' conftest.er1 >conftest.err
31373   rm -f conftest.er1
31374   cat conftest.err >&5
31375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31376   (exit $ac_status); } >/dev/null; then
31377   if test -s conftest.err; then
31378     ac_cpp_err=$ac_c_preproc_warn_flag
31379     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
31380   else
31381     ac_cpp_err=
31382   fi
31383 else
31384   ac_cpp_err=yes
31385 fi
31386 if test -z "$ac_cpp_err"; then
31387   ac_header_preproc=yes
31388 else
31389   echo "$as_me: failed program was:" >&5
31390 sed 's/^/| /' conftest.$ac_ext >&5
31391
31392   ac_header_preproc=no
31393 fi
31394 rm -f conftest.err conftest.$ac_ext
31395 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
31396 echo "${ECHO_T}$ac_header_preproc" >&6
31397
31398 # So?  What about this header?
31399 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
31400   yes:no: )
31401     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
31402 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
31403     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
31404 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
31405     ac_header_preproc=yes
31406     ;;
31407   no:yes:* )
31408     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
31409 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
31410     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
31411 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
31412     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
31413 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
31414     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
31415 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
31416     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
31417 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
31418     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
31419 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
31420     (
31421       cat <<\_ASBOX
31422 ## --------------------------------------------- ##
31423 ## Report this to <http://www.openldap.org/its/> ##
31424 ## --------------------------------------------- ##
31425 _ASBOX
31426     ) |
31427       sed "s/^/$as_me: WARNING:     /" >&2
31428     ;;
31429 esac
31430 echo "$as_me:$LINENO: checking for $ac_header" >&5
31431 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31432 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31433   echo $ECHO_N "(cached) $ECHO_C" >&6
31434 else
31435   eval "$as_ac_Header=\$ac_header_preproc"
31436 fi
31437 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
31438 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
31439
31440 fi
31441 if test `eval echo '${'$as_ac_Header'}'` = yes; then
31442   cat >>confdefs.h <<_ACEOF
31443 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
31444 _ACEOF
31445
31446 fi
31447
31448 done
31449
31450 if test $ac_cv_header_db_h = yes; then
31451         ol_cv_lib_db=no
31452
31453 echo "$as_me:$LINENO: checking for Berkeley DB major version" >&5
31454 echo $ECHO_N "checking for Berkeley DB major version... $ECHO_C" >&6
31455 if test "${ol_cv_bdb_major+set}" = set; then
31456   echo $ECHO_N "(cached) $ECHO_C" >&6
31457 else
31458
31459         ol_cv_bdb_major=0
31460         if test $ol_cv_bdb_major = 0 ; then
31461                 cat >conftest.$ac_ext <<_ACEOF
31462 /* confdefs.h.  */
31463 _ACEOF
31464 cat confdefs.h >>conftest.$ac_ext
31465 cat >>conftest.$ac_ext <<_ACEOF
31466 /* end confdefs.h.  */
31467
31468 #include <db.h>
31469 #ifndef DB_VERSION_MAJOR
31470 #       define DB_VERSION_MAJOR 1
31471 #endif
31472 #if DB_VERSION_MAJOR == 4
31473 __db_version
31474 #endif
31475
31476 _ACEOF
31477 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31478   $EGREP "__db_version" >/dev/null 2>&1; then
31479   ol_cv_bdb_major=4
31480 else
31481   :
31482 fi
31483 rm -f conftest*
31484
31485         fi
31486         if test $ol_cv_bdb_major = 0 ; then
31487                 cat >conftest.$ac_ext <<_ACEOF
31488 /* confdefs.h.  */
31489 _ACEOF
31490 cat confdefs.h >>conftest.$ac_ext
31491 cat >>conftest.$ac_ext <<_ACEOF
31492 /* end confdefs.h.  */
31493
31494 #include <db.h>
31495 #ifndef DB_VERSION_MAJOR
31496 #       define DB_VERSION_MAJOR 1
31497 #endif
31498 #if DB_VERSION_MAJOR == 3
31499 __db_version
31500 #endif
31501
31502 _ACEOF
31503 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31504   $EGREP "__db_version" >/dev/null 2>&1; then
31505   ol_cv_bdb_major=3
31506 else
31507   :
31508 fi
31509 rm -f conftest*
31510
31511         fi
31512         if test $ol_cv_bdb_major = 0 ; then
31513                 cat >conftest.$ac_ext <<_ACEOF
31514 /* confdefs.h.  */
31515 _ACEOF
31516 cat confdefs.h >>conftest.$ac_ext
31517 cat >>conftest.$ac_ext <<_ACEOF
31518 /* end confdefs.h.  */
31519
31520 #include <db.h>
31521 #ifndef DB_VERSION_MAJOR
31522 #       define DB_VERSION_MAJOR 1
31523 #endif
31524 #if DB_VERSION_MAJOR == 2
31525 __db_version
31526 #endif
31527
31528 _ACEOF
31529 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31530   $EGREP "__db_version" >/dev/null 2>&1; then
31531   ol_cv_bdb_major=2
31532 else
31533   :
31534 fi
31535 rm -f conftest*
31536
31537         fi
31538         if test $ol_cv_bdb_major = 0 ; then
31539                 cat >conftest.$ac_ext <<_ACEOF
31540 /* confdefs.h.  */
31541 _ACEOF
31542 cat confdefs.h >>conftest.$ac_ext
31543 cat >>conftest.$ac_ext <<_ACEOF
31544 /* end confdefs.h.  */
31545
31546 #include <db.h>
31547 #ifndef DB_VERSION_MAJOR
31548 #       define DB_VERSION_MAJOR 1
31549 #endif
31550 #if DB_VERSION_MAJOR == 1
31551 __db_version
31552 #endif
31553
31554 _ACEOF
31555 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31556   $EGREP "__db_version" >/dev/null 2>&1; then
31557   ol_cv_bdb_major=1
31558 else
31559   :
31560 fi
31561 rm -f conftest*
31562
31563         fi
31564
31565         if test $ol_cv_bdb_major = 0 ; then
31566                 { { echo "$as_me:$LINENO: error: Unknown Berkeley DB major version" >&5
31567 echo "$as_me: error: Unknown Berkeley DB major version" >&2;}
31568    { (exit 1); exit 1; }; }
31569         fi
31570
31571 fi
31572 echo "$as_me:$LINENO: result: $ol_cv_bdb_major" >&5
31573 echo "${ECHO_T}$ol_cv_bdb_major" >&6
31574
31575 echo "$as_me:$LINENO: checking for Berkeley DB minor version" >&5
31576 echo $ECHO_N "checking for Berkeley DB minor version... $ECHO_C" >&6
31577 if test "${ol_cv_bdb_minor+set}" = set; then
31578   echo $ECHO_N "(cached) $ECHO_C" >&6
31579 else
31580
31581         ol_cv_bdb_minor=0
31582         if test $ol_cv_bdb_minor = 0 ; then
31583                 cat >conftest.$ac_ext <<_ACEOF
31584 /* confdefs.h.  */
31585 _ACEOF
31586 cat confdefs.h >>conftest.$ac_ext
31587 cat >>conftest.$ac_ext <<_ACEOF
31588 /* end confdefs.h.  */
31589
31590 #include <db.h>
31591 #ifndef DB_VERSION_MINOR
31592 #       define DB_VERSION_MINOR 0
31593 #endif
31594 #if DB_VERSION_MINOR == 9
31595 __db_version
31596 #endif
31597
31598 _ACEOF
31599 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31600   $EGREP "__db_version" >/dev/null 2>&1; then
31601   ol_cv_bdb_minor=9
31602 else
31603   :
31604 fi
31605 rm -f conftest*
31606
31607         fi
31608         if test $ol_cv_bdb_minor = 0 ; then
31609                 cat >conftest.$ac_ext <<_ACEOF
31610 /* confdefs.h.  */
31611 _ACEOF
31612 cat confdefs.h >>conftest.$ac_ext
31613 cat >>conftest.$ac_ext <<_ACEOF
31614 /* end confdefs.h.  */
31615
31616 #include <db.h>
31617 #ifndef DB_VERSION_MINOR
31618 #       define DB_VERSION_MINOR 0
31619 #endif
31620 #if DB_VERSION_MINOR == 8
31621 __db_version
31622 #endif
31623
31624 _ACEOF
31625 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31626   $EGREP "__db_version" >/dev/null 2>&1; then
31627   ol_cv_bdb_minor=8
31628 else
31629   :
31630 fi
31631 rm -f conftest*
31632
31633         fi
31634         if test $ol_cv_bdb_minor = 0 ; then
31635                 cat >conftest.$ac_ext <<_ACEOF
31636 /* confdefs.h.  */
31637 _ACEOF
31638 cat confdefs.h >>conftest.$ac_ext
31639 cat >>conftest.$ac_ext <<_ACEOF
31640 /* end confdefs.h.  */
31641
31642 #include <db.h>
31643 #ifndef DB_VERSION_MINOR
31644 #       define DB_VERSION_MINOR 0
31645 #endif
31646 #if DB_VERSION_MINOR == 7
31647 __db_version
31648 #endif
31649
31650 _ACEOF
31651 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31652   $EGREP "__db_version" >/dev/null 2>&1; then
31653   ol_cv_bdb_minor=7
31654 else
31655   :
31656 fi
31657 rm -f conftest*
31658
31659         fi
31660         if test $ol_cv_bdb_minor = 0 ; then
31661                 cat >conftest.$ac_ext <<_ACEOF
31662 /* confdefs.h.  */
31663 _ACEOF
31664 cat confdefs.h >>conftest.$ac_ext
31665 cat >>conftest.$ac_ext <<_ACEOF
31666 /* end confdefs.h.  */
31667
31668 #include <db.h>
31669 #ifndef DB_VERSION_MINOR
31670 #       define DB_VERSION_MINOR 0
31671 #endif
31672 #if DB_VERSION_MINOR == 6
31673 __db_version
31674 #endif
31675
31676 _ACEOF
31677 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31678   $EGREP "__db_version" >/dev/null 2>&1; then
31679   ol_cv_bdb_minor=6
31680 else
31681   :
31682 fi
31683 rm -f conftest*
31684
31685         fi
31686         if test $ol_cv_bdb_minor = 0 ; then
31687                 cat >conftest.$ac_ext <<_ACEOF
31688 /* confdefs.h.  */
31689 _ACEOF
31690 cat confdefs.h >>conftest.$ac_ext
31691 cat >>conftest.$ac_ext <<_ACEOF
31692 /* end confdefs.h.  */
31693
31694 #include <db.h>
31695 #ifndef DB_VERSION_MINOR
31696 #       define DB_VERSION_MINOR 0
31697 #endif
31698 #if DB_VERSION_MINOR == 5
31699 __db_version
31700 #endif
31701
31702 _ACEOF
31703 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31704   $EGREP "__db_version" >/dev/null 2>&1; then
31705   ol_cv_bdb_minor=5
31706 else
31707   :
31708 fi
31709 rm -f conftest*
31710
31711         fi
31712         if test $ol_cv_bdb_minor = 0 ; then
31713                 cat >conftest.$ac_ext <<_ACEOF
31714 /* confdefs.h.  */
31715 _ACEOF
31716 cat confdefs.h >>conftest.$ac_ext
31717 cat >>conftest.$ac_ext <<_ACEOF
31718 /* end confdefs.h.  */
31719
31720 #include <db.h>
31721 #ifndef DB_VERSION_MINOR
31722 #       define DB_VERSION_MINOR 0
31723 #endif
31724 #if DB_VERSION_MINOR == 4
31725 __db_version
31726 #endif
31727
31728 _ACEOF
31729 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31730   $EGREP "__db_version" >/dev/null 2>&1; then
31731   ol_cv_bdb_minor=4
31732 else
31733   :
31734 fi
31735 rm -f conftest*
31736
31737         fi
31738         if test $ol_cv_bdb_minor = 0 ; then
31739                 cat >conftest.$ac_ext <<_ACEOF
31740 /* confdefs.h.  */
31741 _ACEOF
31742 cat confdefs.h >>conftest.$ac_ext
31743 cat >>conftest.$ac_ext <<_ACEOF
31744 /* end confdefs.h.  */
31745
31746 #include <db.h>
31747 #ifndef DB_VERSION_MINOR
31748 #       define DB_VERSION_MINOR 0
31749 #endif
31750 #if DB_VERSION_MINOR == 3
31751 __db_version
31752 #endif
31753
31754 _ACEOF
31755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31756   $EGREP "__db_version" >/dev/null 2>&1; then
31757   ol_cv_bdb_minor=3
31758 else
31759   :
31760 fi
31761 rm -f conftest*
31762
31763         fi
31764         if test $ol_cv_bdb_minor = 0 ; then
31765                 cat >conftest.$ac_ext <<_ACEOF
31766 /* confdefs.h.  */
31767 _ACEOF
31768 cat confdefs.h >>conftest.$ac_ext
31769 cat >>conftest.$ac_ext <<_ACEOF
31770 /* end confdefs.h.  */
31771
31772 #include <db.h>
31773 #ifndef DB_VERSION_MINOR
31774 #       define DB_VERSION_MINOR 0
31775 #endif
31776 #if DB_VERSION_MINOR == 2
31777 __db_version
31778 #endif
31779
31780 _ACEOF
31781 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31782   $EGREP "__db_version" >/dev/null 2>&1; then
31783   ol_cv_bdb_minor=2
31784 else
31785   :
31786 fi
31787 rm -f conftest*
31788
31789         fi
31790         if test $ol_cv_bdb_minor = 0 ; then
31791                 cat >conftest.$ac_ext <<_ACEOF
31792 /* confdefs.h.  */
31793 _ACEOF
31794 cat confdefs.h >>conftest.$ac_ext
31795 cat >>conftest.$ac_ext <<_ACEOF
31796 /* end confdefs.h.  */
31797
31798 #include <db.h>
31799 #ifndef DB_VERSION_MINOR
31800 #       define DB_VERSION_MINOR 0
31801 #endif
31802 #if DB_VERSION_MINOR == 1
31803 __db_version
31804 #endif
31805
31806 _ACEOF
31807 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31808   $EGREP "__db_version" >/dev/null 2>&1; then
31809   ol_cv_bdb_minor=1
31810 else
31811   :
31812 fi
31813 rm -f conftest*
31814
31815         fi
31816
31817 fi
31818 echo "$as_me:$LINENO: result: $ol_cv_bdb_minor" >&5
31819 echo "${ECHO_T}$ol_cv_bdb_minor" >&6
31820
31821 if test $ol_cv_bdb_major = 4 ; then
31822         if test $ol_cv_bdb_minor = 4 ; then
31823                 if test $ol_cv_lib_db = no ; then
31824         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb44)" >&5
31825 echo $ECHO_N "checking for Berkeley DB link (-ldb44)... $ECHO_C" >&6
31826 if test "${ol_cv_db_db44+set}" = set; then
31827   echo $ECHO_N "(cached) $ECHO_C" >&6
31828 else
31829
31830         ol_DB_LIB=-ldb44
31831         ol_LIBS=$LIBS
31832         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31833
31834         cat >conftest.$ac_ext <<_ACEOF
31835 /* confdefs.h.  */
31836 _ACEOF
31837 cat confdefs.h >>conftest.$ac_ext
31838 cat >>conftest.$ac_ext <<_ACEOF
31839 /* end confdefs.h.  */
31840
31841 #ifdef HAVE_DB_185_H
31842 # include <db_185.h>
31843 #else
31844 # include <db.h>
31845 #endif
31846
31847 #ifndef DB_VERSION_MAJOR
31848 # define DB_VERSION_MAJOR 1
31849 #endif
31850
31851 #ifndef NULL
31852 #define NULL ((void*)0)
31853 #endif
31854
31855 int
31856 main ()
31857 {
31858
31859 #if DB_VERSION_MAJOR > 1
31860         {
31861                 char *version;
31862                 int major, minor, patch;
31863
31864                 version = db_version( &major, &minor, &patch );
31865
31866                 if( major != DB_VERSION_MAJOR ||
31867                         minor < DB_VERSION_MINOR )
31868                 {
31869                         printf("Berkeley DB version mismatch\n"
31870                                 "\theader: %s\n\tlibrary: %s\n",
31871                                 DB_VERSION_STRING, version);
31872                         return 1;
31873                 }
31874         }
31875 #endif
31876
31877 #if DB_VERSION_MAJOR > 2
31878         db_env_create( NULL, 0 );
31879 #elif DB_VERSION_MAJOR > 1
31880         db_appexit( NULL );
31881 #else
31882         (void) dbopen( NULL, 0, 0, 0, NULL);
31883 #endif
31884
31885   ;
31886   return 0;
31887 }
31888 _ACEOF
31889 rm -f conftest.$ac_objext conftest$ac_exeext
31890 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31891   (eval $ac_link) 2>conftest.er1
31892   ac_status=$?
31893   grep -v '^ *+' conftest.er1 >conftest.err
31894   rm -f conftest.er1
31895   cat conftest.err >&5
31896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31897   (exit $ac_status); } &&
31898          { ac_try='test -z "$ac_c_werror_flag"
31899                          || test ! -s conftest.err'
31900   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31901   (eval $ac_try) 2>&5
31902   ac_status=$?
31903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31904   (exit $ac_status); }; } &&
31905          { ac_try='test -s conftest$ac_exeext'
31906   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31907   (eval $ac_try) 2>&5
31908   ac_status=$?
31909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31910   (exit $ac_status); }; }; then
31911   ol_cv_db_db44=yes
31912 else
31913   echo "$as_me: failed program was:" >&5
31914 sed 's/^/| /' conftest.$ac_ext >&5
31915
31916 ol_cv_db_db44=no
31917 fi
31918 rm -f conftest.err conftest.$ac_objext \
31919       conftest$ac_exeext conftest.$ac_ext
31920
31921         LIBS="$ol_LIBS"
31922
31923 fi
31924 echo "$as_me:$LINENO: result: $ol_cv_db_db44" >&5
31925 echo "${ECHO_T}$ol_cv_db_db44" >&6
31926
31927         if test $ol_cv_db_db44 = yes ; then
31928                 ol_cv_lib_db=-ldb44
31929         fi
31930 fi
31931
31932                 if test $ol_cv_lib_db = no ; then
31933         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-44)" >&5
31934 echo $ECHO_N "checking for Berkeley DB link (-ldb-44)... $ECHO_C" >&6
31935 if test "${ol_cv_db_db_44+set}" = set; then
31936   echo $ECHO_N "(cached) $ECHO_C" >&6
31937 else
31938
31939         ol_DB_LIB=-ldb-44
31940         ol_LIBS=$LIBS
31941         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31942
31943         cat >conftest.$ac_ext <<_ACEOF
31944 /* confdefs.h.  */
31945 _ACEOF
31946 cat confdefs.h >>conftest.$ac_ext
31947 cat >>conftest.$ac_ext <<_ACEOF
31948 /* end confdefs.h.  */
31949
31950 #ifdef HAVE_DB_185_H
31951 # include <db_185.h>
31952 #else
31953 # include <db.h>
31954 #endif
31955
31956 #ifndef DB_VERSION_MAJOR
31957 # define DB_VERSION_MAJOR 1
31958 #endif
31959
31960 #ifndef NULL
31961 #define NULL ((void*)0)
31962 #endif
31963
31964 int
31965 main ()
31966 {
31967
31968 #if DB_VERSION_MAJOR > 1
31969         {
31970                 char *version;
31971                 int major, minor, patch;
31972
31973                 version = db_version( &major, &minor, &patch );
31974
31975                 if( major != DB_VERSION_MAJOR ||
31976                         minor < DB_VERSION_MINOR )
31977                 {
31978                         printf("Berkeley DB version mismatch\n"
31979                                 "\theader: %s\n\tlibrary: %s\n",
31980                                 DB_VERSION_STRING, version);
31981                         return 1;
31982                 }
31983         }
31984 #endif
31985
31986 #if DB_VERSION_MAJOR > 2
31987         db_env_create( NULL, 0 );
31988 #elif DB_VERSION_MAJOR > 1
31989         db_appexit( NULL );
31990 #else
31991         (void) dbopen( NULL, 0, 0, 0, NULL);
31992 #endif
31993
31994   ;
31995   return 0;
31996 }
31997 _ACEOF
31998 rm -f conftest.$ac_objext conftest$ac_exeext
31999 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32000   (eval $ac_link) 2>conftest.er1
32001   ac_status=$?
32002   grep -v '^ *+' conftest.er1 >conftest.err
32003   rm -f conftest.er1
32004   cat conftest.err >&5
32005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32006   (exit $ac_status); } &&
32007          { ac_try='test -z "$ac_c_werror_flag"
32008                          || test ! -s conftest.err'
32009   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32010   (eval $ac_try) 2>&5
32011   ac_status=$?
32012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32013   (exit $ac_status); }; } &&
32014          { ac_try='test -s conftest$ac_exeext'
32015   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32016   (eval $ac_try) 2>&5
32017   ac_status=$?
32018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32019   (exit $ac_status); }; }; then
32020   ol_cv_db_db_44=yes
32021 else
32022   echo "$as_me: failed program was:" >&5
32023 sed 's/^/| /' conftest.$ac_ext >&5
32024
32025 ol_cv_db_db_44=no
32026 fi
32027 rm -f conftest.err conftest.$ac_objext \
32028       conftest$ac_exeext conftest.$ac_ext
32029
32030         LIBS="$ol_LIBS"
32031
32032 fi
32033 echo "$as_me:$LINENO: result: $ol_cv_db_db_44" >&5
32034 echo "${ECHO_T}$ol_cv_db_db_44" >&6
32035
32036         if test $ol_cv_db_db_44 = yes ; then
32037                 ol_cv_lib_db=-ldb-44
32038         fi
32039 fi
32040
32041                 if test $ol_cv_lib_db = no ; then
32042         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.4)" >&5
32043 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.4)... $ECHO_C" >&6
32044 if test "${ol_cv_db_db_4_dot_4+set}" = set; then
32045   echo $ECHO_N "(cached) $ECHO_C" >&6
32046 else
32047
32048         ol_DB_LIB=-ldb-4.4
32049         ol_LIBS=$LIBS
32050         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32051
32052         cat >conftest.$ac_ext <<_ACEOF
32053 /* confdefs.h.  */
32054 _ACEOF
32055 cat confdefs.h >>conftest.$ac_ext
32056 cat >>conftest.$ac_ext <<_ACEOF
32057 /* end confdefs.h.  */
32058
32059 #ifdef HAVE_DB_185_H
32060 # include <db_185.h>
32061 #else
32062 # include <db.h>
32063 #endif
32064
32065 #ifndef DB_VERSION_MAJOR
32066 # define DB_VERSION_MAJOR 1
32067 #endif
32068
32069 #ifndef NULL
32070 #define NULL ((void*)0)
32071 #endif
32072
32073 int
32074 main ()
32075 {
32076
32077 #if DB_VERSION_MAJOR > 1
32078         {
32079                 char *version;
32080                 int major, minor, patch;
32081
32082                 version = db_version( &major, &minor, &patch );
32083
32084                 if( major != DB_VERSION_MAJOR ||
32085                         minor < DB_VERSION_MINOR )
32086                 {
32087                         printf("Berkeley DB version mismatch\n"
32088                                 "\theader: %s\n\tlibrary: %s\n",
32089                                 DB_VERSION_STRING, version);
32090                         return 1;
32091                 }
32092         }
32093 #endif
32094
32095 #if DB_VERSION_MAJOR > 2
32096         db_env_create( NULL, 0 );
32097 #elif DB_VERSION_MAJOR > 1
32098         db_appexit( NULL );
32099 #else
32100         (void) dbopen( NULL, 0, 0, 0, NULL);
32101 #endif
32102
32103   ;
32104   return 0;
32105 }
32106 _ACEOF
32107 rm -f conftest.$ac_objext conftest$ac_exeext
32108 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32109   (eval $ac_link) 2>conftest.er1
32110   ac_status=$?
32111   grep -v '^ *+' conftest.er1 >conftest.err
32112   rm -f conftest.er1
32113   cat conftest.err >&5
32114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32115   (exit $ac_status); } &&
32116          { ac_try='test -z "$ac_c_werror_flag"
32117                          || test ! -s conftest.err'
32118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32119   (eval $ac_try) 2>&5
32120   ac_status=$?
32121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32122   (exit $ac_status); }; } &&
32123          { ac_try='test -s conftest$ac_exeext'
32124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32125   (eval $ac_try) 2>&5
32126   ac_status=$?
32127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32128   (exit $ac_status); }; }; then
32129   ol_cv_db_db_4_dot_4=yes
32130 else
32131   echo "$as_me: failed program was:" >&5
32132 sed 's/^/| /' conftest.$ac_ext >&5
32133
32134 ol_cv_db_db_4_dot_4=no
32135 fi
32136 rm -f conftest.err conftest.$ac_objext \
32137       conftest$ac_exeext conftest.$ac_ext
32138
32139         LIBS="$ol_LIBS"
32140
32141 fi
32142 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_4" >&5
32143 echo "${ECHO_T}$ol_cv_db_db_4_dot_4" >&6
32144
32145         if test $ol_cv_db_db_4_dot_4 = yes ; then
32146                 ol_cv_lib_db=-ldb-4.4
32147         fi
32148 fi
32149
32150                 if test $ol_cv_lib_db = no ; then
32151         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-4)" >&5
32152 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-4)... $ECHO_C" >&6
32153 if test "${ol_cv_db_db_4_4+set}" = set; then
32154   echo $ECHO_N "(cached) $ECHO_C" >&6
32155 else
32156
32157         ol_DB_LIB=-ldb-4-4
32158         ol_LIBS=$LIBS
32159         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32160
32161         cat >conftest.$ac_ext <<_ACEOF
32162 /* confdefs.h.  */
32163 _ACEOF
32164 cat confdefs.h >>conftest.$ac_ext
32165 cat >>conftest.$ac_ext <<_ACEOF
32166 /* end confdefs.h.  */
32167
32168 #ifdef HAVE_DB_185_H
32169 # include <db_185.h>
32170 #else
32171 # include <db.h>
32172 #endif
32173
32174 #ifndef DB_VERSION_MAJOR
32175 # define DB_VERSION_MAJOR 1
32176 #endif
32177
32178 #ifndef NULL
32179 #define NULL ((void*)0)
32180 #endif
32181
32182 int
32183 main ()
32184 {
32185
32186 #if DB_VERSION_MAJOR > 1
32187         {
32188                 char *version;
32189                 int major, minor, patch;
32190
32191                 version = db_version( &major, &minor, &patch );
32192
32193                 if( major != DB_VERSION_MAJOR ||
32194                         minor < DB_VERSION_MINOR )
32195                 {
32196                         printf("Berkeley DB version mismatch\n"
32197                                 "\theader: %s\n\tlibrary: %s\n",
32198                                 DB_VERSION_STRING, version);
32199                         return 1;
32200                 }
32201         }
32202 #endif
32203
32204 #if DB_VERSION_MAJOR > 2
32205         db_env_create( NULL, 0 );
32206 #elif DB_VERSION_MAJOR > 1
32207         db_appexit( NULL );
32208 #else
32209         (void) dbopen( NULL, 0, 0, 0, NULL);
32210 #endif
32211
32212   ;
32213   return 0;
32214 }
32215 _ACEOF
32216 rm -f conftest.$ac_objext conftest$ac_exeext
32217 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32218   (eval $ac_link) 2>conftest.er1
32219   ac_status=$?
32220   grep -v '^ *+' conftest.er1 >conftest.err
32221   rm -f conftest.er1
32222   cat conftest.err >&5
32223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32224   (exit $ac_status); } &&
32225          { ac_try='test -z "$ac_c_werror_flag"
32226                          || test ! -s conftest.err'
32227   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32228   (eval $ac_try) 2>&5
32229   ac_status=$?
32230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32231   (exit $ac_status); }; } &&
32232          { ac_try='test -s conftest$ac_exeext'
32233   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32234   (eval $ac_try) 2>&5
32235   ac_status=$?
32236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32237   (exit $ac_status); }; }; then
32238   ol_cv_db_db_4_4=yes
32239 else
32240   echo "$as_me: failed program was:" >&5
32241 sed 's/^/| /' conftest.$ac_ext >&5
32242
32243 ol_cv_db_db_4_4=no
32244 fi
32245 rm -f conftest.err conftest.$ac_objext \
32246       conftest$ac_exeext conftest.$ac_ext
32247
32248         LIBS="$ol_LIBS"
32249
32250 fi
32251 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_4" >&5
32252 echo "${ECHO_T}$ol_cv_db_db_4_4" >&6
32253
32254         if test $ol_cv_db_db_4_4 = yes ; then
32255                 ol_cv_lib_db=-ldb-4-4
32256         fi
32257 fi
32258
32259         elif test $ol_cv_bdb_minor = 3 ; then
32260                 if test $ol_cv_lib_db = no ; then
32261         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb43)" >&5
32262 echo $ECHO_N "checking for Berkeley DB link (-ldb43)... $ECHO_C" >&6
32263 if test "${ol_cv_db_db43+set}" = set; then
32264   echo $ECHO_N "(cached) $ECHO_C" >&6
32265 else
32266
32267         ol_DB_LIB=-ldb43
32268         ol_LIBS=$LIBS
32269         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32270
32271         cat >conftest.$ac_ext <<_ACEOF
32272 /* confdefs.h.  */
32273 _ACEOF
32274 cat confdefs.h >>conftest.$ac_ext
32275 cat >>conftest.$ac_ext <<_ACEOF
32276 /* end confdefs.h.  */
32277
32278 #ifdef HAVE_DB_185_H
32279 # include <db_185.h>
32280 #else
32281 # include <db.h>
32282 #endif
32283
32284 #ifndef DB_VERSION_MAJOR
32285 # define DB_VERSION_MAJOR 1
32286 #endif
32287
32288 #ifndef NULL
32289 #define NULL ((void*)0)
32290 #endif
32291
32292 int
32293 main ()
32294 {
32295
32296 #if DB_VERSION_MAJOR > 1
32297         {
32298                 char *version;
32299                 int major, minor, patch;
32300
32301                 version = db_version( &major, &minor, &patch );
32302
32303                 if( major != DB_VERSION_MAJOR ||
32304                         minor < DB_VERSION_MINOR )
32305                 {
32306                         printf("Berkeley DB version mismatch\n"
32307                                 "\theader: %s\n\tlibrary: %s\n",
32308                                 DB_VERSION_STRING, version);
32309                         return 1;
32310                 }
32311         }
32312 #endif
32313
32314 #if DB_VERSION_MAJOR > 2
32315         db_env_create( NULL, 0 );
32316 #elif DB_VERSION_MAJOR > 1
32317         db_appexit( NULL );
32318 #else
32319         (void) dbopen( NULL, 0, 0, 0, NULL);
32320 #endif
32321
32322   ;
32323   return 0;
32324 }
32325 _ACEOF
32326 rm -f conftest.$ac_objext conftest$ac_exeext
32327 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32328   (eval $ac_link) 2>conftest.er1
32329   ac_status=$?
32330   grep -v '^ *+' conftest.er1 >conftest.err
32331   rm -f conftest.er1
32332   cat conftest.err >&5
32333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32334   (exit $ac_status); } &&
32335          { ac_try='test -z "$ac_c_werror_flag"
32336                          || test ! -s conftest.err'
32337   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32338   (eval $ac_try) 2>&5
32339   ac_status=$?
32340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32341   (exit $ac_status); }; } &&
32342          { ac_try='test -s conftest$ac_exeext'
32343   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32344   (eval $ac_try) 2>&5
32345   ac_status=$?
32346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32347   (exit $ac_status); }; }; then
32348   ol_cv_db_db43=yes
32349 else
32350   echo "$as_me: failed program was:" >&5
32351 sed 's/^/| /' conftest.$ac_ext >&5
32352
32353 ol_cv_db_db43=no
32354 fi
32355 rm -f conftest.err conftest.$ac_objext \
32356       conftest$ac_exeext conftest.$ac_ext
32357
32358         LIBS="$ol_LIBS"
32359
32360 fi
32361 echo "$as_me:$LINENO: result: $ol_cv_db_db43" >&5
32362 echo "${ECHO_T}$ol_cv_db_db43" >&6
32363
32364         if test $ol_cv_db_db43 = yes ; then
32365                 ol_cv_lib_db=-ldb43
32366         fi
32367 fi
32368
32369                 if test $ol_cv_lib_db = no ; then
32370         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-43)" >&5
32371 echo $ECHO_N "checking for Berkeley DB link (-ldb-43)... $ECHO_C" >&6
32372 if test "${ol_cv_db_db_43+set}" = set; then
32373   echo $ECHO_N "(cached) $ECHO_C" >&6
32374 else
32375
32376         ol_DB_LIB=-ldb-43
32377         ol_LIBS=$LIBS
32378         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32379
32380         cat >conftest.$ac_ext <<_ACEOF
32381 /* confdefs.h.  */
32382 _ACEOF
32383 cat confdefs.h >>conftest.$ac_ext
32384 cat >>conftest.$ac_ext <<_ACEOF
32385 /* end confdefs.h.  */
32386
32387 #ifdef HAVE_DB_185_H
32388 # include <db_185.h>
32389 #else
32390 # include <db.h>
32391 #endif
32392
32393 #ifndef DB_VERSION_MAJOR
32394 # define DB_VERSION_MAJOR 1
32395 #endif
32396
32397 #ifndef NULL
32398 #define NULL ((void*)0)
32399 #endif
32400
32401 int
32402 main ()
32403 {
32404
32405 #if DB_VERSION_MAJOR > 1
32406         {
32407                 char *version;
32408                 int major, minor, patch;
32409
32410                 version = db_version( &major, &minor, &patch );
32411
32412                 if( major != DB_VERSION_MAJOR ||
32413                         minor < DB_VERSION_MINOR )
32414                 {
32415                         printf("Berkeley DB version mismatch\n"
32416                                 "\theader: %s\n\tlibrary: %s\n",
32417                                 DB_VERSION_STRING, version);
32418                         return 1;
32419                 }
32420         }
32421 #endif
32422
32423 #if DB_VERSION_MAJOR > 2
32424         db_env_create( NULL, 0 );
32425 #elif DB_VERSION_MAJOR > 1
32426         db_appexit( NULL );
32427 #else
32428         (void) dbopen( NULL, 0, 0, 0, NULL);
32429 #endif
32430
32431   ;
32432   return 0;
32433 }
32434 _ACEOF
32435 rm -f conftest.$ac_objext conftest$ac_exeext
32436 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32437   (eval $ac_link) 2>conftest.er1
32438   ac_status=$?
32439   grep -v '^ *+' conftest.er1 >conftest.err
32440   rm -f conftest.er1
32441   cat conftest.err >&5
32442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32443   (exit $ac_status); } &&
32444          { ac_try='test -z "$ac_c_werror_flag"
32445                          || test ! -s conftest.err'
32446   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32447   (eval $ac_try) 2>&5
32448   ac_status=$?
32449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32450   (exit $ac_status); }; } &&
32451          { ac_try='test -s conftest$ac_exeext'
32452   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32453   (eval $ac_try) 2>&5
32454   ac_status=$?
32455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32456   (exit $ac_status); }; }; then
32457   ol_cv_db_db_43=yes
32458 else
32459   echo "$as_me: failed program was:" >&5
32460 sed 's/^/| /' conftest.$ac_ext >&5
32461
32462 ol_cv_db_db_43=no
32463 fi
32464 rm -f conftest.err conftest.$ac_objext \
32465       conftest$ac_exeext conftest.$ac_ext
32466
32467         LIBS="$ol_LIBS"
32468
32469 fi
32470 echo "$as_me:$LINENO: result: $ol_cv_db_db_43" >&5
32471 echo "${ECHO_T}$ol_cv_db_db_43" >&6
32472
32473         if test $ol_cv_db_db_43 = yes ; then
32474                 ol_cv_lib_db=-ldb-43
32475         fi
32476 fi
32477
32478                 if test $ol_cv_lib_db = no ; then
32479         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.3)" >&5
32480 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.3)... $ECHO_C" >&6
32481 if test "${ol_cv_db_db_4_dot_3+set}" = set; then
32482   echo $ECHO_N "(cached) $ECHO_C" >&6
32483 else
32484
32485         ol_DB_LIB=-ldb-4.3
32486         ol_LIBS=$LIBS
32487         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32488
32489         cat >conftest.$ac_ext <<_ACEOF
32490 /* confdefs.h.  */
32491 _ACEOF
32492 cat confdefs.h >>conftest.$ac_ext
32493 cat >>conftest.$ac_ext <<_ACEOF
32494 /* end confdefs.h.  */
32495
32496 #ifdef HAVE_DB_185_H
32497 # include <db_185.h>
32498 #else
32499 # include <db.h>
32500 #endif
32501
32502 #ifndef DB_VERSION_MAJOR
32503 # define DB_VERSION_MAJOR 1
32504 #endif
32505
32506 #ifndef NULL
32507 #define NULL ((void*)0)
32508 #endif
32509
32510 int
32511 main ()
32512 {
32513
32514 #if DB_VERSION_MAJOR > 1
32515         {
32516                 char *version;
32517                 int major, minor, patch;
32518
32519                 version = db_version( &major, &minor, &patch );
32520
32521                 if( major != DB_VERSION_MAJOR ||
32522                         minor < DB_VERSION_MINOR )
32523                 {
32524                         printf("Berkeley DB version mismatch\n"
32525                                 "\theader: %s\n\tlibrary: %s\n",
32526                                 DB_VERSION_STRING, version);
32527                         return 1;
32528                 }
32529         }
32530 #endif
32531
32532 #if DB_VERSION_MAJOR > 2
32533         db_env_create( NULL, 0 );
32534 #elif DB_VERSION_MAJOR > 1
32535         db_appexit( NULL );
32536 #else
32537         (void) dbopen( NULL, 0, 0, 0, NULL);
32538 #endif
32539
32540   ;
32541   return 0;
32542 }
32543 _ACEOF
32544 rm -f conftest.$ac_objext conftest$ac_exeext
32545 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32546   (eval $ac_link) 2>conftest.er1
32547   ac_status=$?
32548   grep -v '^ *+' conftest.er1 >conftest.err
32549   rm -f conftest.er1
32550   cat conftest.err >&5
32551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32552   (exit $ac_status); } &&
32553          { ac_try='test -z "$ac_c_werror_flag"
32554                          || test ! -s conftest.err'
32555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32556   (eval $ac_try) 2>&5
32557   ac_status=$?
32558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32559   (exit $ac_status); }; } &&
32560          { ac_try='test -s conftest$ac_exeext'
32561   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32562   (eval $ac_try) 2>&5
32563   ac_status=$?
32564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32565   (exit $ac_status); }; }; then
32566   ol_cv_db_db_4_dot_3=yes
32567 else
32568   echo "$as_me: failed program was:" >&5
32569 sed 's/^/| /' conftest.$ac_ext >&5
32570
32571 ol_cv_db_db_4_dot_3=no
32572 fi
32573 rm -f conftest.err conftest.$ac_objext \
32574       conftest$ac_exeext conftest.$ac_ext
32575
32576         LIBS="$ol_LIBS"
32577
32578 fi
32579 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_3" >&5
32580 echo "${ECHO_T}$ol_cv_db_db_4_dot_3" >&6
32581
32582         if test $ol_cv_db_db_4_dot_3 = yes ; then
32583                 ol_cv_lib_db=-ldb-4.3
32584         fi
32585 fi
32586
32587                 if test $ol_cv_lib_db = no ; then
32588         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-3)" >&5
32589 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-3)... $ECHO_C" >&6
32590 if test "${ol_cv_db_db_4_3+set}" = set; then
32591   echo $ECHO_N "(cached) $ECHO_C" >&6
32592 else
32593
32594         ol_DB_LIB=-ldb-4-3
32595         ol_LIBS=$LIBS
32596         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32597
32598         cat >conftest.$ac_ext <<_ACEOF
32599 /* confdefs.h.  */
32600 _ACEOF
32601 cat confdefs.h >>conftest.$ac_ext
32602 cat >>conftest.$ac_ext <<_ACEOF
32603 /* end confdefs.h.  */
32604
32605 #ifdef HAVE_DB_185_H
32606 # include <db_185.h>
32607 #else
32608 # include <db.h>
32609 #endif
32610
32611 #ifndef DB_VERSION_MAJOR
32612 # define DB_VERSION_MAJOR 1
32613 #endif
32614
32615 #ifndef NULL
32616 #define NULL ((void*)0)
32617 #endif
32618
32619 int
32620 main ()
32621 {
32622
32623 #if DB_VERSION_MAJOR > 1
32624         {
32625                 char *version;
32626                 int major, minor, patch;
32627
32628                 version = db_version( &major, &minor, &patch );
32629
32630                 if( major != DB_VERSION_MAJOR ||
32631                         minor < DB_VERSION_MINOR )
32632                 {
32633                         printf("Berkeley DB version mismatch\n"
32634                                 "\theader: %s\n\tlibrary: %s\n",
32635                                 DB_VERSION_STRING, version);
32636                         return 1;
32637                 }
32638         }
32639 #endif
32640
32641 #if DB_VERSION_MAJOR > 2
32642         db_env_create( NULL, 0 );
32643 #elif DB_VERSION_MAJOR > 1
32644         db_appexit( NULL );
32645 #else
32646         (void) dbopen( NULL, 0, 0, 0, NULL);
32647 #endif
32648
32649   ;
32650   return 0;
32651 }
32652 _ACEOF
32653 rm -f conftest.$ac_objext conftest$ac_exeext
32654 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32655   (eval $ac_link) 2>conftest.er1
32656   ac_status=$?
32657   grep -v '^ *+' conftest.er1 >conftest.err
32658   rm -f conftest.er1
32659   cat conftest.err >&5
32660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32661   (exit $ac_status); } &&
32662          { ac_try='test -z "$ac_c_werror_flag"
32663                          || test ! -s conftest.err'
32664   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32665   (eval $ac_try) 2>&5
32666   ac_status=$?
32667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32668   (exit $ac_status); }; } &&
32669          { ac_try='test -s conftest$ac_exeext'
32670   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32671   (eval $ac_try) 2>&5
32672   ac_status=$?
32673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32674   (exit $ac_status); }; }; then
32675   ol_cv_db_db_4_3=yes
32676 else
32677   echo "$as_me: failed program was:" >&5
32678 sed 's/^/| /' conftest.$ac_ext >&5
32679
32680 ol_cv_db_db_4_3=no
32681 fi
32682 rm -f conftest.err conftest.$ac_objext \
32683       conftest$ac_exeext conftest.$ac_ext
32684
32685         LIBS="$ol_LIBS"
32686
32687 fi
32688 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_3" >&5
32689 echo "${ECHO_T}$ol_cv_db_db_4_3" >&6
32690
32691         if test $ol_cv_db_db_4_3 = yes ; then
32692                 ol_cv_lib_db=-ldb-4-3
32693         fi
32694 fi
32695
32696         elif test $ol_cv_bdb_minor = 2 ; then
32697                 if test $ol_cv_lib_db = no ; then
32698         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb42)" >&5
32699 echo $ECHO_N "checking for Berkeley DB link (-ldb42)... $ECHO_C" >&6
32700 if test "${ol_cv_db_db42+set}" = set; then
32701   echo $ECHO_N "(cached) $ECHO_C" >&6
32702 else
32703
32704         ol_DB_LIB=-ldb42
32705         ol_LIBS=$LIBS
32706         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32707
32708         cat >conftest.$ac_ext <<_ACEOF
32709 /* confdefs.h.  */
32710 _ACEOF
32711 cat confdefs.h >>conftest.$ac_ext
32712 cat >>conftest.$ac_ext <<_ACEOF
32713 /* end confdefs.h.  */
32714
32715 #ifdef HAVE_DB_185_H
32716 # include <db_185.h>
32717 #else
32718 # include <db.h>
32719 #endif
32720
32721 #ifndef DB_VERSION_MAJOR
32722 # define DB_VERSION_MAJOR 1
32723 #endif
32724
32725 #ifndef NULL
32726 #define NULL ((void*)0)
32727 #endif
32728
32729 int
32730 main ()
32731 {
32732
32733 #if DB_VERSION_MAJOR > 1
32734         {
32735                 char *version;
32736                 int major, minor, patch;
32737
32738                 version = db_version( &major, &minor, &patch );
32739
32740                 if( major != DB_VERSION_MAJOR ||
32741                         minor < DB_VERSION_MINOR )
32742                 {
32743                         printf("Berkeley DB version mismatch\n"
32744                                 "\theader: %s\n\tlibrary: %s\n",
32745                                 DB_VERSION_STRING, version);
32746                         return 1;
32747                 }
32748         }
32749 #endif
32750
32751 #if DB_VERSION_MAJOR > 2
32752         db_env_create( NULL, 0 );
32753 #elif DB_VERSION_MAJOR > 1
32754         db_appexit( NULL );
32755 #else
32756         (void) dbopen( NULL, 0, 0, 0, NULL);
32757 #endif
32758
32759   ;
32760   return 0;
32761 }
32762 _ACEOF
32763 rm -f conftest.$ac_objext conftest$ac_exeext
32764 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32765   (eval $ac_link) 2>conftest.er1
32766   ac_status=$?
32767   grep -v '^ *+' conftest.er1 >conftest.err
32768   rm -f conftest.er1
32769   cat conftest.err >&5
32770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32771   (exit $ac_status); } &&
32772          { ac_try='test -z "$ac_c_werror_flag"
32773                          || test ! -s conftest.err'
32774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32775   (eval $ac_try) 2>&5
32776   ac_status=$?
32777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32778   (exit $ac_status); }; } &&
32779          { ac_try='test -s conftest$ac_exeext'
32780   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32781   (eval $ac_try) 2>&5
32782   ac_status=$?
32783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32784   (exit $ac_status); }; }; then
32785   ol_cv_db_db42=yes
32786 else
32787   echo "$as_me: failed program was:" >&5
32788 sed 's/^/| /' conftest.$ac_ext >&5
32789
32790 ol_cv_db_db42=no
32791 fi
32792 rm -f conftest.err conftest.$ac_objext \
32793       conftest$ac_exeext conftest.$ac_ext
32794
32795         LIBS="$ol_LIBS"
32796
32797 fi
32798 echo "$as_me:$LINENO: result: $ol_cv_db_db42" >&5
32799 echo "${ECHO_T}$ol_cv_db_db42" >&6
32800
32801         if test $ol_cv_db_db42 = yes ; then
32802                 ol_cv_lib_db=-ldb42
32803         fi
32804 fi
32805
32806                 if test $ol_cv_lib_db = no ; then
32807         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-42)" >&5
32808 echo $ECHO_N "checking for Berkeley DB link (-ldb-42)... $ECHO_C" >&6
32809 if test "${ol_cv_db_db_42+set}" = set; then
32810   echo $ECHO_N "(cached) $ECHO_C" >&6
32811 else
32812
32813         ol_DB_LIB=-ldb-42
32814         ol_LIBS=$LIBS
32815         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32816
32817         cat >conftest.$ac_ext <<_ACEOF
32818 /* confdefs.h.  */
32819 _ACEOF
32820 cat confdefs.h >>conftest.$ac_ext
32821 cat >>conftest.$ac_ext <<_ACEOF
32822 /* end confdefs.h.  */
32823
32824 #ifdef HAVE_DB_185_H
32825 # include <db_185.h>
32826 #else
32827 # include <db.h>
32828 #endif
32829
32830 #ifndef DB_VERSION_MAJOR
32831 # define DB_VERSION_MAJOR 1
32832 #endif
32833
32834 #ifndef NULL
32835 #define NULL ((void*)0)
32836 #endif
32837
32838 int
32839 main ()
32840 {
32841
32842 #if DB_VERSION_MAJOR > 1
32843         {
32844                 char *version;
32845                 int major, minor, patch;
32846
32847                 version = db_version( &major, &minor, &patch );
32848
32849                 if( major != DB_VERSION_MAJOR ||
32850                         minor < DB_VERSION_MINOR )
32851                 {
32852                         printf("Berkeley DB version mismatch\n"
32853                                 "\theader: %s\n\tlibrary: %s\n",
32854                                 DB_VERSION_STRING, version);
32855                         return 1;
32856                 }
32857         }
32858 #endif
32859
32860 #if DB_VERSION_MAJOR > 2
32861         db_env_create( NULL, 0 );
32862 #elif DB_VERSION_MAJOR > 1
32863         db_appexit( NULL );
32864 #else
32865         (void) dbopen( NULL, 0, 0, 0, NULL);
32866 #endif
32867
32868   ;
32869   return 0;
32870 }
32871 _ACEOF
32872 rm -f conftest.$ac_objext conftest$ac_exeext
32873 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32874   (eval $ac_link) 2>conftest.er1
32875   ac_status=$?
32876   grep -v '^ *+' conftest.er1 >conftest.err
32877   rm -f conftest.er1
32878   cat conftest.err >&5
32879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32880   (exit $ac_status); } &&
32881          { ac_try='test -z "$ac_c_werror_flag"
32882                          || test ! -s conftest.err'
32883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32884   (eval $ac_try) 2>&5
32885   ac_status=$?
32886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32887   (exit $ac_status); }; } &&
32888          { ac_try='test -s conftest$ac_exeext'
32889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32890   (eval $ac_try) 2>&5
32891   ac_status=$?
32892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32893   (exit $ac_status); }; }; then
32894   ol_cv_db_db_42=yes
32895 else
32896   echo "$as_me: failed program was:" >&5
32897 sed 's/^/| /' conftest.$ac_ext >&5
32898
32899 ol_cv_db_db_42=no
32900 fi
32901 rm -f conftest.err conftest.$ac_objext \
32902       conftest$ac_exeext conftest.$ac_ext
32903
32904         LIBS="$ol_LIBS"
32905
32906 fi
32907 echo "$as_me:$LINENO: result: $ol_cv_db_db_42" >&5
32908 echo "${ECHO_T}$ol_cv_db_db_42" >&6
32909
32910         if test $ol_cv_db_db_42 = yes ; then
32911                 ol_cv_lib_db=-ldb-42
32912         fi
32913 fi
32914
32915                 if test $ol_cv_lib_db = no ; then
32916         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.2)" >&5
32917 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.2)... $ECHO_C" >&6
32918 if test "${ol_cv_db_db_4_dot_2+set}" = set; then
32919   echo $ECHO_N "(cached) $ECHO_C" >&6
32920 else
32921
32922         ol_DB_LIB=-ldb-4.2
32923         ol_LIBS=$LIBS
32924         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32925
32926         cat >conftest.$ac_ext <<_ACEOF
32927 /* confdefs.h.  */
32928 _ACEOF
32929 cat confdefs.h >>conftest.$ac_ext
32930 cat >>conftest.$ac_ext <<_ACEOF
32931 /* end confdefs.h.  */
32932
32933 #ifdef HAVE_DB_185_H
32934 # include <db_185.h>
32935 #else
32936 # include <db.h>
32937 #endif
32938
32939 #ifndef DB_VERSION_MAJOR
32940 # define DB_VERSION_MAJOR 1
32941 #endif
32942
32943 #ifndef NULL
32944 #define NULL ((void*)0)
32945 #endif
32946
32947 int
32948 main ()
32949 {
32950
32951 #if DB_VERSION_MAJOR > 1
32952         {
32953                 char *version;
32954                 int major, minor, patch;
32955
32956                 version = db_version( &major, &minor, &patch );
32957
32958                 if( major != DB_VERSION_MAJOR ||
32959                         minor < DB_VERSION_MINOR )
32960                 {
32961                         printf("Berkeley DB version mismatch\n"
32962                                 "\theader: %s\n\tlibrary: %s\n",
32963                                 DB_VERSION_STRING, version);
32964                         return 1;
32965                 }
32966         }
32967 #endif
32968
32969 #if DB_VERSION_MAJOR > 2
32970         db_env_create( NULL, 0 );
32971 #elif DB_VERSION_MAJOR > 1
32972         db_appexit( NULL );
32973 #else
32974         (void) dbopen( NULL, 0, 0, 0, NULL);
32975 #endif
32976
32977   ;
32978   return 0;
32979 }
32980 _ACEOF
32981 rm -f conftest.$ac_objext conftest$ac_exeext
32982 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32983   (eval $ac_link) 2>conftest.er1
32984   ac_status=$?
32985   grep -v '^ *+' conftest.er1 >conftest.err
32986   rm -f conftest.er1
32987   cat conftest.err >&5
32988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32989   (exit $ac_status); } &&
32990          { ac_try='test -z "$ac_c_werror_flag"
32991                          || test ! -s conftest.err'
32992   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32993   (eval $ac_try) 2>&5
32994   ac_status=$?
32995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32996   (exit $ac_status); }; } &&
32997          { ac_try='test -s conftest$ac_exeext'
32998   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32999   (eval $ac_try) 2>&5
33000   ac_status=$?
33001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33002   (exit $ac_status); }; }; then
33003   ol_cv_db_db_4_dot_2=yes
33004 else
33005   echo "$as_me: failed program was:" >&5
33006 sed 's/^/| /' conftest.$ac_ext >&5
33007
33008 ol_cv_db_db_4_dot_2=no
33009 fi
33010 rm -f conftest.err conftest.$ac_objext \
33011       conftest$ac_exeext conftest.$ac_ext
33012
33013         LIBS="$ol_LIBS"
33014
33015 fi
33016 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_2" >&5
33017 echo "${ECHO_T}$ol_cv_db_db_4_dot_2" >&6
33018
33019         if test $ol_cv_db_db_4_dot_2 = yes ; then
33020                 ol_cv_lib_db=-ldb-4.2
33021         fi
33022 fi
33023
33024                 if test $ol_cv_lib_db = no ; then
33025         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-2)" >&5
33026 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-2)... $ECHO_C" >&6
33027 if test "${ol_cv_db_db_4_2+set}" = set; then
33028   echo $ECHO_N "(cached) $ECHO_C" >&6
33029 else
33030
33031         ol_DB_LIB=-ldb-4-2
33032         ol_LIBS=$LIBS
33033         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33034
33035         cat >conftest.$ac_ext <<_ACEOF
33036 /* confdefs.h.  */
33037 _ACEOF
33038 cat confdefs.h >>conftest.$ac_ext
33039 cat >>conftest.$ac_ext <<_ACEOF
33040 /* end confdefs.h.  */
33041
33042 #ifdef HAVE_DB_185_H
33043 # include <db_185.h>
33044 #else
33045 # include <db.h>
33046 #endif
33047
33048 #ifndef DB_VERSION_MAJOR
33049 # define DB_VERSION_MAJOR 1
33050 #endif
33051
33052 #ifndef NULL
33053 #define NULL ((void*)0)
33054 #endif
33055
33056 int
33057 main ()
33058 {
33059
33060 #if DB_VERSION_MAJOR > 1
33061         {
33062                 char *version;
33063                 int major, minor, patch;
33064
33065                 version = db_version( &major, &minor, &patch );
33066
33067                 if( major != DB_VERSION_MAJOR ||
33068                         minor < DB_VERSION_MINOR )
33069                 {
33070                         printf("Berkeley DB version mismatch\n"
33071                                 "\theader: %s\n\tlibrary: %s\n",
33072                                 DB_VERSION_STRING, version);
33073                         return 1;
33074                 }
33075         }
33076 #endif
33077
33078 #if DB_VERSION_MAJOR > 2
33079         db_env_create( NULL, 0 );
33080 #elif DB_VERSION_MAJOR > 1
33081         db_appexit( NULL );
33082 #else
33083         (void) dbopen( NULL, 0, 0, 0, NULL);
33084 #endif
33085
33086   ;
33087   return 0;
33088 }
33089 _ACEOF
33090 rm -f conftest.$ac_objext conftest$ac_exeext
33091 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33092   (eval $ac_link) 2>conftest.er1
33093   ac_status=$?
33094   grep -v '^ *+' conftest.er1 >conftest.err
33095   rm -f conftest.er1
33096   cat conftest.err >&5
33097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33098   (exit $ac_status); } &&
33099          { ac_try='test -z "$ac_c_werror_flag"
33100                          || test ! -s conftest.err'
33101   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33102   (eval $ac_try) 2>&5
33103   ac_status=$?
33104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33105   (exit $ac_status); }; } &&
33106          { ac_try='test -s conftest$ac_exeext'
33107   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33108   (eval $ac_try) 2>&5
33109   ac_status=$?
33110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33111   (exit $ac_status); }; }; then
33112   ol_cv_db_db_4_2=yes
33113 else
33114   echo "$as_me: failed program was:" >&5
33115 sed 's/^/| /' conftest.$ac_ext >&5
33116
33117 ol_cv_db_db_4_2=no
33118 fi
33119 rm -f conftest.err conftest.$ac_objext \
33120       conftest$ac_exeext conftest.$ac_ext
33121
33122         LIBS="$ol_LIBS"
33123
33124 fi
33125 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_2" >&5
33126 echo "${ECHO_T}$ol_cv_db_db_4_2" >&6
33127
33128         if test $ol_cv_db_db_4_2 = yes ; then
33129                 ol_cv_lib_db=-ldb-4-2
33130         fi
33131 fi
33132
33133         elif test $ol_cv_bdb_minor = 1 ; then
33134                 if test $ol_cv_lib_db = no ; then
33135         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb41)" >&5
33136 echo $ECHO_N "checking for Berkeley DB link (-ldb41)... $ECHO_C" >&6
33137 if test "${ol_cv_db_db41+set}" = set; then
33138   echo $ECHO_N "(cached) $ECHO_C" >&6
33139 else
33140
33141         ol_DB_LIB=-ldb41
33142         ol_LIBS=$LIBS
33143         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33144
33145         cat >conftest.$ac_ext <<_ACEOF
33146 /* confdefs.h.  */
33147 _ACEOF
33148 cat confdefs.h >>conftest.$ac_ext
33149 cat >>conftest.$ac_ext <<_ACEOF
33150 /* end confdefs.h.  */
33151
33152 #ifdef HAVE_DB_185_H
33153 # include <db_185.h>
33154 #else
33155 # include <db.h>
33156 #endif
33157
33158 #ifndef DB_VERSION_MAJOR
33159 # define DB_VERSION_MAJOR 1
33160 #endif
33161
33162 #ifndef NULL
33163 #define NULL ((void*)0)
33164 #endif
33165
33166 int
33167 main ()
33168 {
33169
33170 #if DB_VERSION_MAJOR > 1
33171         {
33172                 char *version;
33173                 int major, minor, patch;
33174
33175                 version = db_version( &major, &minor, &patch );
33176
33177                 if( major != DB_VERSION_MAJOR ||
33178                         minor < DB_VERSION_MINOR )
33179                 {
33180                         printf("Berkeley DB version mismatch\n"
33181                                 "\theader: %s\n\tlibrary: %s\n",
33182                                 DB_VERSION_STRING, version);
33183                         return 1;
33184                 }
33185         }
33186 #endif
33187
33188 #if DB_VERSION_MAJOR > 2
33189         db_env_create( NULL, 0 );
33190 #elif DB_VERSION_MAJOR > 1
33191         db_appexit( NULL );
33192 #else
33193         (void) dbopen( NULL, 0, 0, 0, NULL);
33194 #endif
33195
33196   ;
33197   return 0;
33198 }
33199 _ACEOF
33200 rm -f conftest.$ac_objext conftest$ac_exeext
33201 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33202   (eval $ac_link) 2>conftest.er1
33203   ac_status=$?
33204   grep -v '^ *+' conftest.er1 >conftest.err
33205   rm -f conftest.er1
33206   cat conftest.err >&5
33207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33208   (exit $ac_status); } &&
33209          { ac_try='test -z "$ac_c_werror_flag"
33210                          || test ! -s conftest.err'
33211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33212   (eval $ac_try) 2>&5
33213   ac_status=$?
33214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33215   (exit $ac_status); }; } &&
33216          { ac_try='test -s conftest$ac_exeext'
33217   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33218   (eval $ac_try) 2>&5
33219   ac_status=$?
33220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33221   (exit $ac_status); }; }; then
33222   ol_cv_db_db41=yes
33223 else
33224   echo "$as_me: failed program was:" >&5
33225 sed 's/^/| /' conftest.$ac_ext >&5
33226
33227 ol_cv_db_db41=no
33228 fi
33229 rm -f conftest.err conftest.$ac_objext \
33230       conftest$ac_exeext conftest.$ac_ext
33231
33232         LIBS="$ol_LIBS"
33233
33234 fi
33235 echo "$as_me:$LINENO: result: $ol_cv_db_db41" >&5
33236 echo "${ECHO_T}$ol_cv_db_db41" >&6
33237
33238         if test $ol_cv_db_db41 = yes ; then
33239                 ol_cv_lib_db=-ldb41
33240         fi
33241 fi
33242
33243                 if test $ol_cv_lib_db = no ; then
33244         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-41)" >&5
33245 echo $ECHO_N "checking for Berkeley DB link (-ldb-41)... $ECHO_C" >&6
33246 if test "${ol_cv_db_db_41+set}" = set; then
33247   echo $ECHO_N "(cached) $ECHO_C" >&6
33248 else
33249
33250         ol_DB_LIB=-ldb-41
33251         ol_LIBS=$LIBS
33252         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33253
33254         cat >conftest.$ac_ext <<_ACEOF
33255 /* confdefs.h.  */
33256 _ACEOF
33257 cat confdefs.h >>conftest.$ac_ext
33258 cat >>conftest.$ac_ext <<_ACEOF
33259 /* end confdefs.h.  */
33260
33261 #ifdef HAVE_DB_185_H
33262 # include <db_185.h>
33263 #else
33264 # include <db.h>
33265 #endif
33266
33267 #ifndef DB_VERSION_MAJOR
33268 # define DB_VERSION_MAJOR 1
33269 #endif
33270
33271 #ifndef NULL
33272 #define NULL ((void*)0)
33273 #endif
33274
33275 int
33276 main ()
33277 {
33278
33279 #if DB_VERSION_MAJOR > 1
33280         {
33281                 char *version;
33282                 int major, minor, patch;
33283
33284                 version = db_version( &major, &minor, &patch );
33285
33286                 if( major != DB_VERSION_MAJOR ||
33287                         minor < DB_VERSION_MINOR )
33288                 {
33289                         printf("Berkeley DB version mismatch\n"
33290                                 "\theader: %s\n\tlibrary: %s\n",
33291                                 DB_VERSION_STRING, version);
33292                         return 1;
33293                 }
33294         }
33295 #endif
33296
33297 #if DB_VERSION_MAJOR > 2
33298         db_env_create( NULL, 0 );
33299 #elif DB_VERSION_MAJOR > 1
33300         db_appexit( NULL );
33301 #else
33302         (void) dbopen( NULL, 0, 0, 0, NULL);
33303 #endif
33304
33305   ;
33306   return 0;
33307 }
33308 _ACEOF
33309 rm -f conftest.$ac_objext conftest$ac_exeext
33310 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33311   (eval $ac_link) 2>conftest.er1
33312   ac_status=$?
33313   grep -v '^ *+' conftest.er1 >conftest.err
33314   rm -f conftest.er1
33315   cat conftest.err >&5
33316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33317   (exit $ac_status); } &&
33318          { ac_try='test -z "$ac_c_werror_flag"
33319                          || test ! -s conftest.err'
33320   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33321   (eval $ac_try) 2>&5
33322   ac_status=$?
33323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33324   (exit $ac_status); }; } &&
33325          { ac_try='test -s conftest$ac_exeext'
33326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33327   (eval $ac_try) 2>&5
33328   ac_status=$?
33329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33330   (exit $ac_status); }; }; then
33331   ol_cv_db_db_41=yes
33332 else
33333   echo "$as_me: failed program was:" >&5
33334 sed 's/^/| /' conftest.$ac_ext >&5
33335
33336 ol_cv_db_db_41=no
33337 fi
33338 rm -f conftest.err conftest.$ac_objext \
33339       conftest$ac_exeext conftest.$ac_ext
33340
33341         LIBS="$ol_LIBS"
33342
33343 fi
33344 echo "$as_me:$LINENO: result: $ol_cv_db_db_41" >&5
33345 echo "${ECHO_T}$ol_cv_db_db_41" >&6
33346
33347         if test $ol_cv_db_db_41 = yes ; then
33348                 ol_cv_lib_db=-ldb-41
33349         fi
33350 fi
33351
33352                 if test $ol_cv_lib_db = no ; then
33353         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.1)" >&5
33354 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.1)... $ECHO_C" >&6
33355 if test "${ol_cv_db_db_4_dot_1+set}" = set; then
33356   echo $ECHO_N "(cached) $ECHO_C" >&6
33357 else
33358
33359         ol_DB_LIB=-ldb-4.1
33360         ol_LIBS=$LIBS
33361         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33362
33363         cat >conftest.$ac_ext <<_ACEOF
33364 /* confdefs.h.  */
33365 _ACEOF
33366 cat confdefs.h >>conftest.$ac_ext
33367 cat >>conftest.$ac_ext <<_ACEOF
33368 /* end confdefs.h.  */
33369
33370 #ifdef HAVE_DB_185_H
33371 # include <db_185.h>
33372 #else
33373 # include <db.h>
33374 #endif
33375
33376 #ifndef DB_VERSION_MAJOR
33377 # define DB_VERSION_MAJOR 1
33378 #endif
33379
33380 #ifndef NULL
33381 #define NULL ((void*)0)
33382 #endif
33383
33384 int
33385 main ()
33386 {
33387
33388 #if DB_VERSION_MAJOR > 1
33389         {
33390                 char *version;
33391                 int major, minor, patch;
33392
33393                 version = db_version( &major, &minor, &patch );
33394
33395                 if( major != DB_VERSION_MAJOR ||
33396                         minor < DB_VERSION_MINOR )
33397                 {
33398                         printf("Berkeley DB version mismatch\n"
33399                                 "\theader: %s\n\tlibrary: %s\n",
33400                                 DB_VERSION_STRING, version);
33401                         return 1;
33402                 }
33403         }
33404 #endif
33405
33406 #if DB_VERSION_MAJOR > 2
33407         db_env_create( NULL, 0 );
33408 #elif DB_VERSION_MAJOR > 1
33409         db_appexit( NULL );
33410 #else
33411         (void) dbopen( NULL, 0, 0, 0, NULL);
33412 #endif
33413
33414   ;
33415   return 0;
33416 }
33417 _ACEOF
33418 rm -f conftest.$ac_objext conftest$ac_exeext
33419 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33420   (eval $ac_link) 2>conftest.er1
33421   ac_status=$?
33422   grep -v '^ *+' conftest.er1 >conftest.err
33423   rm -f conftest.er1
33424   cat conftest.err >&5
33425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33426   (exit $ac_status); } &&
33427          { ac_try='test -z "$ac_c_werror_flag"
33428                          || test ! -s conftest.err'
33429   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33430   (eval $ac_try) 2>&5
33431   ac_status=$?
33432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33433   (exit $ac_status); }; } &&
33434          { ac_try='test -s conftest$ac_exeext'
33435   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33436   (eval $ac_try) 2>&5
33437   ac_status=$?
33438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33439   (exit $ac_status); }; }; then
33440   ol_cv_db_db_4_dot_1=yes
33441 else
33442   echo "$as_me: failed program was:" >&5
33443 sed 's/^/| /' conftest.$ac_ext >&5
33444
33445 ol_cv_db_db_4_dot_1=no
33446 fi
33447 rm -f conftest.err conftest.$ac_objext \
33448       conftest$ac_exeext conftest.$ac_ext
33449
33450         LIBS="$ol_LIBS"
33451
33452 fi
33453 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_1" >&5
33454 echo "${ECHO_T}$ol_cv_db_db_4_dot_1" >&6
33455
33456         if test $ol_cv_db_db_4_dot_1 = yes ; then
33457                 ol_cv_lib_db=-ldb-4.1
33458         fi
33459 fi
33460
33461                 if test $ol_cv_lib_db = no ; then
33462         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-1)" >&5
33463 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-1)... $ECHO_C" >&6
33464 if test "${ol_cv_db_db_4_1+set}" = set; then
33465   echo $ECHO_N "(cached) $ECHO_C" >&6
33466 else
33467
33468         ol_DB_LIB=-ldb-4-1
33469         ol_LIBS=$LIBS
33470         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33471
33472         cat >conftest.$ac_ext <<_ACEOF
33473 /* confdefs.h.  */
33474 _ACEOF
33475 cat confdefs.h >>conftest.$ac_ext
33476 cat >>conftest.$ac_ext <<_ACEOF
33477 /* end confdefs.h.  */
33478
33479 #ifdef HAVE_DB_185_H
33480 # include <db_185.h>
33481 #else
33482 # include <db.h>
33483 #endif
33484
33485 #ifndef DB_VERSION_MAJOR
33486 # define DB_VERSION_MAJOR 1
33487 #endif
33488
33489 #ifndef NULL
33490 #define NULL ((void*)0)
33491 #endif
33492
33493 int
33494 main ()
33495 {
33496
33497 #if DB_VERSION_MAJOR > 1
33498         {
33499                 char *version;
33500                 int major, minor, patch;
33501
33502                 version = db_version( &major, &minor, &patch );
33503
33504                 if( major != DB_VERSION_MAJOR ||
33505                         minor < DB_VERSION_MINOR )
33506                 {
33507                         printf("Berkeley DB version mismatch\n"
33508                                 "\theader: %s\n\tlibrary: %s\n",
33509                                 DB_VERSION_STRING, version);
33510                         return 1;
33511                 }
33512         }
33513 #endif
33514
33515 #if DB_VERSION_MAJOR > 2
33516         db_env_create( NULL, 0 );
33517 #elif DB_VERSION_MAJOR > 1
33518         db_appexit( NULL );
33519 #else
33520         (void) dbopen( NULL, 0, 0, 0, NULL);
33521 #endif
33522
33523   ;
33524   return 0;
33525 }
33526 _ACEOF
33527 rm -f conftest.$ac_objext conftest$ac_exeext
33528 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33529   (eval $ac_link) 2>conftest.er1
33530   ac_status=$?
33531   grep -v '^ *+' conftest.er1 >conftest.err
33532   rm -f conftest.er1
33533   cat conftest.err >&5
33534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33535   (exit $ac_status); } &&
33536          { ac_try='test -z "$ac_c_werror_flag"
33537                          || test ! -s conftest.err'
33538   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33539   (eval $ac_try) 2>&5
33540   ac_status=$?
33541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33542   (exit $ac_status); }; } &&
33543          { ac_try='test -s conftest$ac_exeext'
33544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33545   (eval $ac_try) 2>&5
33546   ac_status=$?
33547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33548   (exit $ac_status); }; }; then
33549   ol_cv_db_db_4_1=yes
33550 else
33551   echo "$as_me: failed program was:" >&5
33552 sed 's/^/| /' conftest.$ac_ext >&5
33553
33554 ol_cv_db_db_4_1=no
33555 fi
33556 rm -f conftest.err conftest.$ac_objext \
33557       conftest$ac_exeext conftest.$ac_ext
33558
33559         LIBS="$ol_LIBS"
33560
33561 fi
33562 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_1" >&5
33563 echo "${ECHO_T}$ol_cv_db_db_4_1" >&6
33564
33565         if test $ol_cv_db_db_4_1 = yes ; then
33566                 ol_cv_lib_db=-ldb-4-1
33567         fi
33568 fi
33569
33570         fi
33571         if test $ol_cv_lib_db = no ; then
33572         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4)" >&5
33573 echo $ECHO_N "checking for Berkeley DB link (-ldb-4)... $ECHO_C" >&6
33574 if test "${ol_cv_db_db_4+set}" = set; then
33575   echo $ECHO_N "(cached) $ECHO_C" >&6
33576 else
33577
33578         ol_DB_LIB=-ldb-4
33579         ol_LIBS=$LIBS
33580         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33581
33582         cat >conftest.$ac_ext <<_ACEOF
33583 /* confdefs.h.  */
33584 _ACEOF
33585 cat confdefs.h >>conftest.$ac_ext
33586 cat >>conftest.$ac_ext <<_ACEOF
33587 /* end confdefs.h.  */
33588
33589 #ifdef HAVE_DB_185_H
33590 # include <db_185.h>
33591 #else
33592 # include <db.h>
33593 #endif
33594
33595 #ifndef DB_VERSION_MAJOR
33596 # define DB_VERSION_MAJOR 1
33597 #endif
33598
33599 #ifndef NULL
33600 #define NULL ((void*)0)
33601 #endif
33602
33603 int
33604 main ()
33605 {
33606
33607 #if DB_VERSION_MAJOR > 1
33608         {
33609                 char *version;
33610                 int major, minor, patch;
33611
33612                 version = db_version( &major, &minor, &patch );
33613
33614                 if( major != DB_VERSION_MAJOR ||
33615                         minor < DB_VERSION_MINOR )
33616                 {
33617                         printf("Berkeley DB version mismatch\n"
33618                                 "\theader: %s\n\tlibrary: %s\n",
33619                                 DB_VERSION_STRING, version);
33620                         return 1;
33621                 }
33622         }
33623 #endif
33624
33625 #if DB_VERSION_MAJOR > 2
33626         db_env_create( NULL, 0 );
33627 #elif DB_VERSION_MAJOR > 1
33628         db_appexit( NULL );
33629 #else
33630         (void) dbopen( NULL, 0, 0, 0, NULL);
33631 #endif
33632
33633   ;
33634   return 0;
33635 }
33636 _ACEOF
33637 rm -f conftest.$ac_objext conftest$ac_exeext
33638 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33639   (eval $ac_link) 2>conftest.er1
33640   ac_status=$?
33641   grep -v '^ *+' conftest.er1 >conftest.err
33642   rm -f conftest.er1
33643   cat conftest.err >&5
33644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33645   (exit $ac_status); } &&
33646          { ac_try='test -z "$ac_c_werror_flag"
33647                          || test ! -s conftest.err'
33648   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33649   (eval $ac_try) 2>&5
33650   ac_status=$?
33651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33652   (exit $ac_status); }; } &&
33653          { ac_try='test -s conftest$ac_exeext'
33654   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33655   (eval $ac_try) 2>&5
33656   ac_status=$?
33657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33658   (exit $ac_status); }; }; then
33659   ol_cv_db_db_4=yes
33660 else
33661   echo "$as_me: failed program was:" >&5
33662 sed 's/^/| /' conftest.$ac_ext >&5
33663
33664 ol_cv_db_db_4=no
33665 fi
33666 rm -f conftest.err conftest.$ac_objext \
33667       conftest$ac_exeext conftest.$ac_ext
33668
33669         LIBS="$ol_LIBS"
33670
33671 fi
33672 echo "$as_me:$LINENO: result: $ol_cv_db_db_4" >&5
33673 echo "${ECHO_T}$ol_cv_db_db_4" >&6
33674
33675         if test $ol_cv_db_db_4 = yes ; then
33676                 ol_cv_lib_db=-ldb-4
33677         fi
33678 fi
33679
33680         if test $ol_cv_lib_db = no ; then
33681         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb4)" >&5
33682 echo $ECHO_N "checking for Berkeley DB link (-ldb4)... $ECHO_C" >&6
33683 if test "${ol_cv_db_db4+set}" = set; then
33684   echo $ECHO_N "(cached) $ECHO_C" >&6
33685 else
33686
33687         ol_DB_LIB=-ldb4
33688         ol_LIBS=$LIBS
33689         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33690
33691         cat >conftest.$ac_ext <<_ACEOF
33692 /* confdefs.h.  */
33693 _ACEOF
33694 cat confdefs.h >>conftest.$ac_ext
33695 cat >>conftest.$ac_ext <<_ACEOF
33696 /* end confdefs.h.  */
33697
33698 #ifdef HAVE_DB_185_H
33699 # include <db_185.h>
33700 #else
33701 # include <db.h>
33702 #endif
33703
33704 #ifndef DB_VERSION_MAJOR
33705 # define DB_VERSION_MAJOR 1
33706 #endif
33707
33708 #ifndef NULL
33709 #define NULL ((void*)0)
33710 #endif
33711
33712 int
33713 main ()
33714 {
33715
33716 #if DB_VERSION_MAJOR > 1
33717         {
33718                 char *version;
33719                 int major, minor, patch;
33720
33721                 version = db_version( &major, &minor, &patch );
33722
33723                 if( major != DB_VERSION_MAJOR ||
33724                         minor < DB_VERSION_MINOR )
33725                 {
33726                         printf("Berkeley DB version mismatch\n"
33727                                 "\theader: %s\n\tlibrary: %s\n",
33728                                 DB_VERSION_STRING, version);
33729                         return 1;
33730                 }
33731         }
33732 #endif
33733
33734 #if DB_VERSION_MAJOR > 2
33735         db_env_create( NULL, 0 );
33736 #elif DB_VERSION_MAJOR > 1
33737         db_appexit( NULL );
33738 #else
33739         (void) dbopen( NULL, 0, 0, 0, NULL);
33740 #endif
33741
33742   ;
33743   return 0;
33744 }
33745 _ACEOF
33746 rm -f conftest.$ac_objext conftest$ac_exeext
33747 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33748   (eval $ac_link) 2>conftest.er1
33749   ac_status=$?
33750   grep -v '^ *+' conftest.er1 >conftest.err
33751   rm -f conftest.er1
33752   cat conftest.err >&5
33753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33754   (exit $ac_status); } &&
33755          { ac_try='test -z "$ac_c_werror_flag"
33756                          || test ! -s conftest.err'
33757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33758   (eval $ac_try) 2>&5
33759   ac_status=$?
33760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33761   (exit $ac_status); }; } &&
33762          { ac_try='test -s conftest$ac_exeext'
33763   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33764   (eval $ac_try) 2>&5
33765   ac_status=$?
33766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33767   (exit $ac_status); }; }; then
33768   ol_cv_db_db4=yes
33769 else
33770   echo "$as_me: failed program was:" >&5
33771 sed 's/^/| /' conftest.$ac_ext >&5
33772
33773 ol_cv_db_db4=no
33774 fi
33775 rm -f conftest.err conftest.$ac_objext \
33776       conftest$ac_exeext conftest.$ac_ext
33777
33778         LIBS="$ol_LIBS"
33779
33780 fi
33781 echo "$as_me:$LINENO: result: $ol_cv_db_db4" >&5
33782 echo "${ECHO_T}$ol_cv_db_db4" >&6
33783
33784         if test $ol_cv_db_db4 = yes ; then
33785                 ol_cv_lib_db=-ldb4
33786         fi
33787 fi
33788
33789         if test $ol_cv_lib_db = no ; then
33790         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb)" >&5
33791 echo $ECHO_N "checking for Berkeley DB link (-ldb)... $ECHO_C" >&6
33792 if test "${ol_cv_db_db+set}" = set; then
33793   echo $ECHO_N "(cached) $ECHO_C" >&6
33794 else
33795
33796         ol_DB_LIB=-ldb
33797         ol_LIBS=$LIBS
33798         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33799
33800         cat >conftest.$ac_ext <<_ACEOF
33801 /* confdefs.h.  */
33802 _ACEOF
33803 cat confdefs.h >>conftest.$ac_ext
33804 cat >>conftest.$ac_ext <<_ACEOF
33805 /* end confdefs.h.  */
33806
33807 #ifdef HAVE_DB_185_H
33808 # include <db_185.h>
33809 #else
33810 # include <db.h>
33811 #endif
33812
33813 #ifndef DB_VERSION_MAJOR
33814 # define DB_VERSION_MAJOR 1
33815 #endif
33816
33817 #ifndef NULL
33818 #define NULL ((void*)0)
33819 #endif
33820
33821 int
33822 main ()
33823 {
33824
33825 #if DB_VERSION_MAJOR > 1
33826         {
33827                 char *version;
33828                 int major, minor, patch;
33829
33830                 version = db_version( &major, &minor, &patch );
33831
33832                 if( major != DB_VERSION_MAJOR ||
33833                         minor < DB_VERSION_MINOR )
33834                 {
33835                         printf("Berkeley DB version mismatch\n"
33836                                 "\theader: %s\n\tlibrary: %s\n",
33837                                 DB_VERSION_STRING, version);
33838                         return 1;
33839                 }
33840         }
33841 #endif
33842
33843 #if DB_VERSION_MAJOR > 2
33844         db_env_create( NULL, 0 );
33845 #elif DB_VERSION_MAJOR > 1
33846         db_appexit( NULL );
33847 #else
33848         (void) dbopen( NULL, 0, 0, 0, NULL);
33849 #endif
33850
33851   ;
33852   return 0;
33853 }
33854 _ACEOF
33855 rm -f conftest.$ac_objext conftest$ac_exeext
33856 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33857   (eval $ac_link) 2>conftest.er1
33858   ac_status=$?
33859   grep -v '^ *+' conftest.er1 >conftest.err
33860   rm -f conftest.er1
33861   cat conftest.err >&5
33862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33863   (exit $ac_status); } &&
33864          { ac_try='test -z "$ac_c_werror_flag"
33865                          || test ! -s conftest.err'
33866   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33867   (eval $ac_try) 2>&5
33868   ac_status=$?
33869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33870   (exit $ac_status); }; } &&
33871          { ac_try='test -s conftest$ac_exeext'
33872   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33873   (eval $ac_try) 2>&5
33874   ac_status=$?
33875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33876   (exit $ac_status); }; }; then
33877   ol_cv_db_db=yes
33878 else
33879   echo "$as_me: failed program was:" >&5
33880 sed 's/^/| /' conftest.$ac_ext >&5
33881
33882 ol_cv_db_db=no
33883 fi
33884 rm -f conftest.err conftest.$ac_objext \
33885       conftest$ac_exeext conftest.$ac_ext
33886
33887         LIBS="$ol_LIBS"
33888
33889 fi
33890 echo "$as_me:$LINENO: result: $ol_cv_db_db" >&5
33891 echo "${ECHO_T}$ol_cv_db_db" >&6
33892
33893         if test $ol_cv_db_db = yes ; then
33894                 ol_cv_lib_db=-ldb
33895         fi
33896 fi
33897
33898
33899 elif test $ol_cv_bdb_major = 3 ; then
33900         if test $ol_cv_lib_db = no ; then
33901         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb3)" >&5
33902 echo $ECHO_N "checking for Berkeley DB link (-ldb3)... $ECHO_C" >&6
33903 if test "${ol_cv_db_db3+set}" = set; then
33904   echo $ECHO_N "(cached) $ECHO_C" >&6
33905 else
33906
33907         ol_DB_LIB=-ldb3
33908         ol_LIBS=$LIBS
33909         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33910
33911         cat >conftest.$ac_ext <<_ACEOF
33912 /* confdefs.h.  */
33913 _ACEOF
33914 cat confdefs.h >>conftest.$ac_ext
33915 cat >>conftest.$ac_ext <<_ACEOF
33916 /* end confdefs.h.  */
33917
33918 #ifdef HAVE_DB_185_H
33919 # include <db_185.h>
33920 #else
33921 # include <db.h>
33922 #endif
33923
33924 #ifndef DB_VERSION_MAJOR
33925 # define DB_VERSION_MAJOR 1
33926 #endif
33927
33928 #ifndef NULL
33929 #define NULL ((void*)0)
33930 #endif
33931
33932 int
33933 main ()
33934 {
33935
33936 #if DB_VERSION_MAJOR > 1
33937         {
33938                 char *version;
33939                 int major, minor, patch;
33940
33941                 version = db_version( &major, &minor, &patch );
33942
33943                 if( major != DB_VERSION_MAJOR ||
33944                         minor < DB_VERSION_MINOR )
33945                 {
33946                         printf("Berkeley DB version mismatch\n"
33947                                 "\theader: %s\n\tlibrary: %s\n",
33948                                 DB_VERSION_STRING, version);
33949                         return 1;
33950                 }
33951         }
33952 #endif
33953
33954 #if DB_VERSION_MAJOR > 2
33955         db_env_create( NULL, 0 );
33956 #elif DB_VERSION_MAJOR > 1
33957         db_appexit( NULL );
33958 #else
33959         (void) dbopen( NULL, 0, 0, 0, NULL);
33960 #endif
33961
33962   ;
33963   return 0;
33964 }
33965 _ACEOF
33966 rm -f conftest.$ac_objext conftest$ac_exeext
33967 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33968   (eval $ac_link) 2>conftest.er1
33969   ac_status=$?
33970   grep -v '^ *+' conftest.er1 >conftest.err
33971   rm -f conftest.er1
33972   cat conftest.err >&5
33973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33974   (exit $ac_status); } &&
33975          { ac_try='test -z "$ac_c_werror_flag"
33976                          || test ! -s conftest.err'
33977   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33978   (eval $ac_try) 2>&5
33979   ac_status=$?
33980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33981   (exit $ac_status); }; } &&
33982          { ac_try='test -s conftest$ac_exeext'
33983   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33984   (eval $ac_try) 2>&5
33985   ac_status=$?
33986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33987   (exit $ac_status); }; }; then
33988   ol_cv_db_db3=yes
33989 else
33990   echo "$as_me: failed program was:" >&5
33991 sed 's/^/| /' conftest.$ac_ext >&5
33992
33993 ol_cv_db_db3=no
33994 fi
33995 rm -f conftest.err conftest.$ac_objext \
33996       conftest$ac_exeext conftest.$ac_ext
33997
33998         LIBS="$ol_LIBS"
33999
34000 fi
34001 echo "$as_me:$LINENO: result: $ol_cv_db_db3" >&5
34002 echo "${ECHO_T}$ol_cv_db_db3" >&6
34003
34004         if test $ol_cv_db_db3 = yes ; then
34005                 ol_cv_lib_db=-ldb3
34006         fi
34007 fi
34008
34009         if test $ol_cv_lib_db = no ; then
34010         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-3)" >&5
34011 echo $ECHO_N "checking for Berkeley DB link (-ldb-3)... $ECHO_C" >&6
34012 if test "${ol_cv_db_db_3+set}" = set; then
34013   echo $ECHO_N "(cached) $ECHO_C" >&6
34014 else
34015
34016         ol_DB_LIB=-ldb-3
34017         ol_LIBS=$LIBS
34018         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34019
34020         cat >conftest.$ac_ext <<_ACEOF
34021 /* confdefs.h.  */
34022 _ACEOF
34023 cat confdefs.h >>conftest.$ac_ext
34024 cat >>conftest.$ac_ext <<_ACEOF
34025 /* end confdefs.h.  */
34026
34027 #ifdef HAVE_DB_185_H
34028 # include <db_185.h>
34029 #else
34030 # include <db.h>
34031 #endif
34032
34033 #ifndef DB_VERSION_MAJOR
34034 # define DB_VERSION_MAJOR 1
34035 #endif
34036
34037 #ifndef NULL
34038 #define NULL ((void*)0)
34039 #endif
34040
34041 int
34042 main ()
34043 {
34044
34045 #if DB_VERSION_MAJOR > 1
34046         {
34047                 char *version;
34048                 int major, minor, patch;
34049
34050                 version = db_version( &major, &minor, &patch );
34051
34052                 if( major != DB_VERSION_MAJOR ||
34053                         minor < DB_VERSION_MINOR )
34054                 {
34055                         printf("Berkeley DB version mismatch\n"
34056                                 "\theader: %s\n\tlibrary: %s\n",
34057                                 DB_VERSION_STRING, version);
34058                         return 1;
34059                 }
34060         }
34061 #endif
34062
34063 #if DB_VERSION_MAJOR > 2
34064         db_env_create( NULL, 0 );
34065 #elif DB_VERSION_MAJOR > 1
34066         db_appexit( NULL );
34067 #else
34068         (void) dbopen( NULL, 0, 0, 0, NULL);
34069 #endif
34070
34071   ;
34072   return 0;
34073 }
34074 _ACEOF
34075 rm -f conftest.$ac_objext conftest$ac_exeext
34076 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34077   (eval $ac_link) 2>conftest.er1
34078   ac_status=$?
34079   grep -v '^ *+' conftest.er1 >conftest.err
34080   rm -f conftest.er1
34081   cat conftest.err >&5
34082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34083   (exit $ac_status); } &&
34084          { ac_try='test -z "$ac_c_werror_flag"
34085                          || test ! -s conftest.err'
34086   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34087   (eval $ac_try) 2>&5
34088   ac_status=$?
34089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34090   (exit $ac_status); }; } &&
34091          { ac_try='test -s conftest$ac_exeext'
34092   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34093   (eval $ac_try) 2>&5
34094   ac_status=$?
34095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34096   (exit $ac_status); }; }; then
34097   ol_cv_db_db_3=yes
34098 else
34099   echo "$as_me: failed program was:" >&5
34100 sed 's/^/| /' conftest.$ac_ext >&5
34101
34102 ol_cv_db_db_3=no
34103 fi
34104 rm -f conftest.err conftest.$ac_objext \
34105       conftest$ac_exeext conftest.$ac_ext
34106
34107         LIBS="$ol_LIBS"
34108
34109 fi
34110 echo "$as_me:$LINENO: result: $ol_cv_db_db_3" >&5
34111 echo "${ECHO_T}$ol_cv_db_db_3" >&6
34112
34113         if test $ol_cv_db_db_3 = yes ; then
34114                 ol_cv_lib_db=-ldb-3
34115         fi
34116 fi
34117
34118
34119 elif test $ol_cv_bdb_major = 2 ; then
34120         if test $ol_cv_lib_db = no ; then
34121         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb2)" >&5
34122 echo $ECHO_N "checking for Berkeley DB link (-ldb2)... $ECHO_C" >&6
34123 if test "${ol_cv_db_db2+set}" = set; then
34124   echo $ECHO_N "(cached) $ECHO_C" >&6
34125 else
34126
34127         ol_DB_LIB=-ldb2
34128         ol_LIBS=$LIBS
34129         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34130
34131         cat >conftest.$ac_ext <<_ACEOF
34132 /* confdefs.h.  */
34133 _ACEOF
34134 cat confdefs.h >>conftest.$ac_ext
34135 cat >>conftest.$ac_ext <<_ACEOF
34136 /* end confdefs.h.  */
34137
34138 #ifdef HAVE_DB_185_H
34139 # include <db_185.h>
34140 #else
34141 # include <db.h>
34142 #endif
34143
34144 #ifndef DB_VERSION_MAJOR
34145 # define DB_VERSION_MAJOR 1
34146 #endif
34147
34148 #ifndef NULL
34149 #define NULL ((void*)0)
34150 #endif
34151
34152 int
34153 main ()
34154 {
34155
34156 #if DB_VERSION_MAJOR > 1
34157         {
34158                 char *version;
34159                 int major, minor, patch;
34160
34161                 version = db_version( &major, &minor, &patch );
34162
34163                 if( major != DB_VERSION_MAJOR ||
34164                         minor < DB_VERSION_MINOR )
34165                 {
34166                         printf("Berkeley DB version mismatch\n"
34167                                 "\theader: %s\n\tlibrary: %s\n",
34168                                 DB_VERSION_STRING, version);
34169                         return 1;
34170                 }
34171         }
34172 #endif
34173
34174 #if DB_VERSION_MAJOR > 2
34175         db_env_create( NULL, 0 );
34176 #elif DB_VERSION_MAJOR > 1
34177         db_appexit( NULL );
34178 #else
34179         (void) dbopen( NULL, 0, 0, 0, NULL);
34180 #endif
34181
34182   ;
34183   return 0;
34184 }
34185 _ACEOF
34186 rm -f conftest.$ac_objext conftest$ac_exeext
34187 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34188   (eval $ac_link) 2>conftest.er1
34189   ac_status=$?
34190   grep -v '^ *+' conftest.er1 >conftest.err
34191   rm -f conftest.er1
34192   cat conftest.err >&5
34193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34194   (exit $ac_status); } &&
34195          { ac_try='test -z "$ac_c_werror_flag"
34196                          || test ! -s conftest.err'
34197   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34198   (eval $ac_try) 2>&5
34199   ac_status=$?
34200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34201   (exit $ac_status); }; } &&
34202          { ac_try='test -s conftest$ac_exeext'
34203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34204   (eval $ac_try) 2>&5
34205   ac_status=$?
34206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34207   (exit $ac_status); }; }; then
34208   ol_cv_db_db2=yes
34209 else
34210   echo "$as_me: failed program was:" >&5
34211 sed 's/^/| /' conftest.$ac_ext >&5
34212
34213 ol_cv_db_db2=no
34214 fi
34215 rm -f conftest.err conftest.$ac_objext \
34216       conftest$ac_exeext conftest.$ac_ext
34217
34218         LIBS="$ol_LIBS"
34219
34220 fi
34221 echo "$as_me:$LINENO: result: $ol_cv_db_db2" >&5
34222 echo "${ECHO_T}$ol_cv_db_db2" >&6
34223
34224         if test $ol_cv_db_db2 = yes ; then
34225                 ol_cv_lib_db=-ldb2
34226         fi
34227 fi
34228
34229         if test $ol_cv_lib_db = no ; then
34230         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-2)" >&5
34231 echo $ECHO_N "checking for Berkeley DB link (-ldb-2)... $ECHO_C" >&6
34232 if test "${ol_cv_db_db_2+set}" = set; then
34233   echo $ECHO_N "(cached) $ECHO_C" >&6
34234 else
34235
34236         ol_DB_LIB=-ldb-2
34237         ol_LIBS=$LIBS
34238         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34239
34240         cat >conftest.$ac_ext <<_ACEOF
34241 /* confdefs.h.  */
34242 _ACEOF
34243 cat confdefs.h >>conftest.$ac_ext
34244 cat >>conftest.$ac_ext <<_ACEOF
34245 /* end confdefs.h.  */
34246
34247 #ifdef HAVE_DB_185_H
34248 # include <db_185.h>
34249 #else
34250 # include <db.h>
34251 #endif
34252
34253 #ifndef DB_VERSION_MAJOR
34254 # define DB_VERSION_MAJOR 1
34255 #endif
34256
34257 #ifndef NULL
34258 #define NULL ((void*)0)
34259 #endif
34260
34261 int
34262 main ()
34263 {
34264
34265 #if DB_VERSION_MAJOR > 1
34266         {
34267                 char *version;
34268                 int major, minor, patch;
34269
34270                 version = db_version( &major, &minor, &patch );
34271
34272                 if( major != DB_VERSION_MAJOR ||
34273                         minor < DB_VERSION_MINOR )
34274                 {
34275                         printf("Berkeley DB version mismatch\n"
34276                                 "\theader: %s\n\tlibrary: %s\n",
34277                                 DB_VERSION_STRING, version);
34278                         return 1;
34279                 }
34280         }
34281 #endif
34282
34283 #if DB_VERSION_MAJOR > 2
34284         db_env_create( NULL, 0 );
34285 #elif DB_VERSION_MAJOR > 1
34286         db_appexit( NULL );
34287 #else
34288         (void) dbopen( NULL, 0, 0, 0, NULL);
34289 #endif
34290
34291   ;
34292   return 0;
34293 }
34294 _ACEOF
34295 rm -f conftest.$ac_objext conftest$ac_exeext
34296 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34297   (eval $ac_link) 2>conftest.er1
34298   ac_status=$?
34299   grep -v '^ *+' conftest.er1 >conftest.err
34300   rm -f conftest.er1
34301   cat conftest.err >&5
34302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34303   (exit $ac_status); } &&
34304          { ac_try='test -z "$ac_c_werror_flag"
34305                          || test ! -s conftest.err'
34306   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34307   (eval $ac_try) 2>&5
34308   ac_status=$?
34309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34310   (exit $ac_status); }; } &&
34311          { ac_try='test -s conftest$ac_exeext'
34312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34313   (eval $ac_try) 2>&5
34314   ac_status=$?
34315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34316   (exit $ac_status); }; }; then
34317   ol_cv_db_db_2=yes
34318 else
34319   echo "$as_me: failed program was:" >&5
34320 sed 's/^/| /' conftest.$ac_ext >&5
34321
34322 ol_cv_db_db_2=no
34323 fi
34324 rm -f conftest.err conftest.$ac_objext \
34325       conftest$ac_exeext conftest.$ac_ext
34326
34327         LIBS="$ol_LIBS"
34328
34329 fi
34330 echo "$as_me:$LINENO: result: $ol_cv_db_db_2" >&5
34331 echo "${ECHO_T}$ol_cv_db_db_2" >&6
34332
34333         if test $ol_cv_db_db_2 = yes ; then
34334                 ol_cv_lib_db=-ldb-2
34335         fi
34336 fi
34337
34338
34339 elif test $ol_cv_bdb_major = 1 ; then
34340         if test $ol_cv_lib_db = no ; then
34341         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb1)" >&5
34342 echo $ECHO_N "checking for Berkeley DB link (-ldb1)... $ECHO_C" >&6
34343 if test "${ol_cv_db_db1+set}" = set; then
34344   echo $ECHO_N "(cached) $ECHO_C" >&6
34345 else
34346
34347         ol_DB_LIB=-ldb1
34348         ol_LIBS=$LIBS
34349         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34350
34351         cat >conftest.$ac_ext <<_ACEOF
34352 /* confdefs.h.  */
34353 _ACEOF
34354 cat confdefs.h >>conftest.$ac_ext
34355 cat >>conftest.$ac_ext <<_ACEOF
34356 /* end confdefs.h.  */
34357
34358 #ifdef HAVE_DB_185_H
34359 # include <db_185.h>
34360 #else
34361 # include <db.h>
34362 #endif
34363
34364 #ifndef DB_VERSION_MAJOR
34365 # define DB_VERSION_MAJOR 1
34366 #endif
34367
34368 #ifndef NULL
34369 #define NULL ((void*)0)
34370 #endif
34371
34372 int
34373 main ()
34374 {
34375
34376 #if DB_VERSION_MAJOR > 1
34377         {
34378                 char *version;
34379                 int major, minor, patch;
34380
34381                 version = db_version( &major, &minor, &patch );
34382
34383                 if( major != DB_VERSION_MAJOR ||
34384                         minor < DB_VERSION_MINOR )
34385                 {
34386                         printf("Berkeley DB version mismatch\n"
34387                                 "\theader: %s\n\tlibrary: %s\n",
34388                                 DB_VERSION_STRING, version);
34389                         return 1;
34390                 }
34391         }
34392 #endif
34393
34394 #if DB_VERSION_MAJOR > 2
34395         db_env_create( NULL, 0 );
34396 #elif DB_VERSION_MAJOR > 1
34397         db_appexit( NULL );
34398 #else
34399         (void) dbopen( NULL, 0, 0, 0, NULL);
34400 #endif
34401
34402   ;
34403   return 0;
34404 }
34405 _ACEOF
34406 rm -f conftest.$ac_objext conftest$ac_exeext
34407 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34408   (eval $ac_link) 2>conftest.er1
34409   ac_status=$?
34410   grep -v '^ *+' conftest.er1 >conftest.err
34411   rm -f conftest.er1
34412   cat conftest.err >&5
34413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34414   (exit $ac_status); } &&
34415          { ac_try='test -z "$ac_c_werror_flag"
34416                          || test ! -s conftest.err'
34417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34418   (eval $ac_try) 2>&5
34419   ac_status=$?
34420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34421   (exit $ac_status); }; } &&
34422          { ac_try='test -s conftest$ac_exeext'
34423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34424   (eval $ac_try) 2>&5
34425   ac_status=$?
34426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34427   (exit $ac_status); }; }; then
34428   ol_cv_db_db1=yes
34429 else
34430   echo "$as_me: failed program was:" >&5
34431 sed 's/^/| /' conftest.$ac_ext >&5
34432
34433 ol_cv_db_db1=no
34434 fi
34435 rm -f conftest.err conftest.$ac_objext \
34436       conftest$ac_exeext conftest.$ac_ext
34437
34438         LIBS="$ol_LIBS"
34439
34440 fi
34441 echo "$as_me:$LINENO: result: $ol_cv_db_db1" >&5
34442 echo "${ECHO_T}$ol_cv_db_db1" >&6
34443
34444         if test $ol_cv_db_db1 = yes ; then
34445                 ol_cv_lib_db=-ldb1
34446         fi
34447 fi
34448
34449         if test $ol_cv_lib_db = no ; then
34450         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-1)" >&5
34451 echo $ECHO_N "checking for Berkeley DB link (-ldb-1)... $ECHO_C" >&6
34452 if test "${ol_cv_db_db_1+set}" = set; then
34453   echo $ECHO_N "(cached) $ECHO_C" >&6
34454 else
34455
34456         ol_DB_LIB=-ldb-1
34457         ol_LIBS=$LIBS
34458         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34459
34460         cat >conftest.$ac_ext <<_ACEOF
34461 /* confdefs.h.  */
34462 _ACEOF
34463 cat confdefs.h >>conftest.$ac_ext
34464 cat >>conftest.$ac_ext <<_ACEOF
34465 /* end confdefs.h.  */
34466
34467 #ifdef HAVE_DB_185_H
34468 # include <db_185.h>
34469 #else
34470 # include <db.h>
34471 #endif
34472
34473 #ifndef DB_VERSION_MAJOR
34474 # define DB_VERSION_MAJOR 1
34475 #endif
34476
34477 #ifndef NULL
34478 #define NULL ((void*)0)
34479 #endif
34480
34481 int
34482 main ()
34483 {
34484
34485 #if DB_VERSION_MAJOR > 1
34486         {
34487                 char *version;
34488                 int major, minor, patch;
34489
34490                 version = db_version( &major, &minor, &patch );
34491
34492                 if( major != DB_VERSION_MAJOR ||
34493                         minor < DB_VERSION_MINOR )
34494                 {
34495                         printf("Berkeley DB version mismatch\n"
34496                                 "\theader: %s\n\tlibrary: %s\n",
34497                                 DB_VERSION_STRING, version);
34498                         return 1;
34499                 }
34500         }
34501 #endif
34502
34503 #if DB_VERSION_MAJOR > 2
34504         db_env_create( NULL, 0 );
34505 #elif DB_VERSION_MAJOR > 1
34506         db_appexit( NULL );
34507 #else
34508         (void) dbopen( NULL, 0, 0, 0, NULL);
34509 #endif
34510
34511   ;
34512   return 0;
34513 }
34514 _ACEOF
34515 rm -f conftest.$ac_objext conftest$ac_exeext
34516 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34517   (eval $ac_link) 2>conftest.er1
34518   ac_status=$?
34519   grep -v '^ *+' conftest.er1 >conftest.err
34520   rm -f conftest.er1
34521   cat conftest.err >&5
34522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34523   (exit $ac_status); } &&
34524          { ac_try='test -z "$ac_c_werror_flag"
34525                          || test ! -s conftest.err'
34526   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34527   (eval $ac_try) 2>&5
34528   ac_status=$?
34529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34530   (exit $ac_status); }; } &&
34531          { ac_try='test -s conftest$ac_exeext'
34532   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34533   (eval $ac_try) 2>&5
34534   ac_status=$?
34535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34536   (exit $ac_status); }; }; then
34537   ol_cv_db_db_1=yes
34538 else
34539   echo "$as_me: failed program was:" >&5
34540 sed 's/^/| /' conftest.$ac_ext >&5
34541
34542 ol_cv_db_db_1=no
34543 fi
34544 rm -f conftest.err conftest.$ac_objext \
34545       conftest$ac_exeext conftest.$ac_ext
34546
34547         LIBS="$ol_LIBS"
34548
34549 fi
34550 echo "$as_me:$LINENO: result: $ol_cv_db_db_1" >&5
34551 echo "${ECHO_T}$ol_cv_db_db_1" >&6
34552
34553         if test $ol_cv_db_db_1 = yes ; then
34554                 ol_cv_lib_db=-ldb-1
34555         fi
34556 fi
34557
34558 fi
34559 if test $ol_cv_lib_db = no ; then
34560         echo "$as_me:$LINENO: checking for Berkeley DB link (default)" >&5
34561 echo $ECHO_N "checking for Berkeley DB link (default)... $ECHO_C" >&6
34562 if test "${ol_cv_db_none+set}" = set; then
34563   echo $ECHO_N "(cached) $ECHO_C" >&6
34564 else
34565
34566         ol_DB_LIB=
34567         ol_LIBS=$LIBS
34568         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34569
34570         cat >conftest.$ac_ext <<_ACEOF
34571 /* confdefs.h.  */
34572 _ACEOF
34573 cat confdefs.h >>conftest.$ac_ext
34574 cat >>conftest.$ac_ext <<_ACEOF
34575 /* end confdefs.h.  */
34576
34577 #ifdef HAVE_DB_185_H
34578 # include <db_185.h>
34579 #else
34580 # include <db.h>
34581 #endif
34582
34583 #ifndef DB_VERSION_MAJOR
34584 # define DB_VERSION_MAJOR 1
34585 #endif
34586
34587 #ifndef NULL
34588 #define NULL ((void*)0)
34589 #endif
34590
34591 int
34592 main ()
34593 {
34594
34595 #if DB_VERSION_MAJOR > 1
34596         {
34597                 char *version;
34598                 int major, minor, patch;
34599
34600                 version = db_version( &major, &minor, &patch );
34601
34602                 if( major != DB_VERSION_MAJOR ||
34603                         minor < DB_VERSION_MINOR )
34604                 {
34605                         printf("Berkeley DB version mismatch\n"
34606                                 "\theader: %s\n\tlibrary: %s\n",
34607                                 DB_VERSION_STRING, version);
34608                         return 1;
34609                 }
34610         }
34611 #endif
34612
34613 #if DB_VERSION_MAJOR > 2
34614         db_env_create( NULL, 0 );
34615 #elif DB_VERSION_MAJOR > 1
34616         db_appexit( NULL );
34617 #else
34618         (void) dbopen( NULL, 0, 0, 0, NULL);
34619 #endif
34620
34621   ;
34622   return 0;
34623 }
34624 _ACEOF
34625 rm -f conftest.$ac_objext conftest$ac_exeext
34626 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34627   (eval $ac_link) 2>conftest.er1
34628   ac_status=$?
34629   grep -v '^ *+' conftest.er1 >conftest.err
34630   rm -f conftest.er1
34631   cat conftest.err >&5
34632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34633   (exit $ac_status); } &&
34634          { ac_try='test -z "$ac_c_werror_flag"
34635                          || test ! -s conftest.err'
34636   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34637   (eval $ac_try) 2>&5
34638   ac_status=$?
34639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34640   (exit $ac_status); }; } &&
34641          { ac_try='test -s conftest$ac_exeext'
34642   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34643   (eval $ac_try) 2>&5
34644   ac_status=$?
34645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34646   (exit $ac_status); }; }; then
34647   ol_cv_db_none=yes
34648 else
34649   echo "$as_me: failed program was:" >&5
34650 sed 's/^/| /' conftest.$ac_ext >&5
34651
34652 ol_cv_db_none=no
34653 fi
34654 rm -f conftest.err conftest.$ac_objext \
34655       conftest$ac_exeext conftest.$ac_ext
34656
34657         LIBS="$ol_LIBS"
34658
34659 fi
34660 echo "$as_me:$LINENO: result: $ol_cv_db_none" >&5
34661 echo "${ECHO_T}$ol_cv_db_none" >&6
34662
34663         if test $ol_cv_db_none = yes ; then
34664                 ol_cv_lib_db=yes
34665         fi
34666 fi
34667
34668
34669         if test "$ol_cv_lib_db" != no ; then
34670                 ol_cv_berkeley_db=yes
34671                 echo "$as_me:$LINENO: checking for Berkeley DB version match" >&5
34672 echo $ECHO_N "checking for Berkeley DB version match... $ECHO_C" >&6
34673 if test "${ol_cv_berkeley_db_version+set}" = set; then
34674   echo $ECHO_N "(cached) $ECHO_C" >&6
34675 else
34676
34677         ol_LIBS="$LIBS"
34678         LIBS="$LTHREAD_LIBS $LIBS"
34679         if test $ol_cv_lib_db != yes ; then
34680                 LIBS="$ol_cv_lib_db $LIBS"
34681         fi
34682
34683         if test "$cross_compiling" = yes; then
34684   ol_cv_berkeley_db_version=cross
34685 else
34686   cat >conftest.$ac_ext <<_ACEOF
34687 /* confdefs.h.  */
34688 _ACEOF
34689 cat confdefs.h >>conftest.$ac_ext
34690 cat >>conftest.$ac_ext <<_ACEOF
34691 /* end confdefs.h.  */
34692
34693 #ifdef HAVE_DB_185_H
34694         choke me;
34695 #else
34696 #include <db.h>
34697 #endif
34698 #ifndef DB_VERSION_MAJOR
34699 # define DB_VERSION_MAJOR 1
34700 #endif
34701 #ifndef NULL
34702 #define NULL ((void *)0)
34703 #endif
34704 main()
34705 {
34706 #if DB_VERSION_MAJOR > 1
34707         char *version;
34708         int major, minor, patch;
34709
34710         version = db_version( &major, &minor, &patch );
34711
34712         if( major != DB_VERSION_MAJOR ||
34713                 minor != DB_VERSION_MINOR ||
34714                 patch != DB_VERSION_PATCH )
34715         {
34716                 printf("Berkeley DB version mismatch\n"
34717                         "\theader: %s\n\tlibrary: %s\n",
34718                         DB_VERSION_STRING, version);
34719                 return 1;
34720         }
34721 #endif
34722
34723         return 0;
34724 }
34725 _ACEOF
34726 rm -f conftest$ac_exeext
34727 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34728   (eval $ac_link) 2>&5
34729   ac_status=$?
34730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34731   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
34732   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34733   (eval $ac_try) 2>&5
34734   ac_status=$?
34735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34736   (exit $ac_status); }; }; then
34737   ol_cv_berkeley_db_version=yes
34738 else
34739   echo "$as_me: program exited with status $ac_status" >&5
34740 echo "$as_me: failed program was:" >&5
34741 sed 's/^/| /' conftest.$ac_ext >&5
34742
34743 ( exit $ac_status )
34744 ol_cv_berkeley_db_version=no
34745 fi
34746 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
34747 fi
34748
34749         LIBS="$ol_LIBS"
34750
34751 fi
34752 echo "$as_me:$LINENO: result: $ol_cv_berkeley_db_version" >&5
34753 echo "${ECHO_T}$ol_cv_berkeley_db_version" >&6
34754
34755         if test $ol_cv_berkeley_db_version = no ; then
34756                 { { echo "$as_me:$LINENO: error: Berkeley DB version mismatch" >&5
34757 echo "$as_me: error: Berkeley DB version mismatch" >&2;}
34758    { (exit 1); exit 1; }; }
34759         fi
34760
34761                 echo "$as_me:$LINENO: checking for Berkeley DB thread support" >&5
34762 echo $ECHO_N "checking for Berkeley DB thread support... $ECHO_C" >&6
34763 if test "${ol_cv_berkeley_db_thread+set}" = set; then
34764   echo $ECHO_N "(cached) $ECHO_C" >&6
34765 else
34766
34767         ol_LIBS="$LIBS"
34768         LIBS="$LTHREAD_LIBS $LIBS"
34769         if test $ol_cv_lib_db != yes ; then
34770                 LIBS="$ol_cv_lib_db $LIBS"
34771         fi
34772
34773         if test "$cross_compiling" = yes; then
34774   ol_cv_berkeley_db_thread=cross
34775 else
34776   cat >conftest.$ac_ext <<_ACEOF
34777 /* confdefs.h.  */
34778 _ACEOF
34779 cat confdefs.h >>conftest.$ac_ext
34780 cat >>conftest.$ac_ext <<_ACEOF
34781 /* end confdefs.h.  */
34782
34783 #ifdef HAVE_DB_185_H
34784         choke me;
34785 #else
34786 #include <db.h>
34787 #endif
34788 #ifndef NULL
34789 #define NULL ((void *)0)
34790 #endif
34791 main()
34792 {
34793         int rc;
34794         u_int32_t flags = DB_CREATE |
34795 #ifdef DB_PRIVATE
34796                 DB_PRIVATE |
34797 #endif
34798                 DB_THREAD;
34799
34800 #if DB_VERSION_MAJOR > 2
34801         DB_ENV *env = NULL;
34802
34803         rc = db_env_create( &env, 0 );
34804
34805         flags |= DB_INIT_MPOOL;
34806 #ifdef DB_MPOOL_PRIVATE
34807         flags |= DB_MPOOL_PRIVATE;
34808 #endif
34809
34810         if( rc ) {
34811                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
34812                 return rc;
34813         }
34814
34815 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
34816         rc = env->open( env, NULL, flags, 0 );
34817 #else
34818         rc = env->open( env, NULL, NULL, flags, 0 );
34819 #endif
34820
34821         if ( rc == 0 ) {
34822                 rc = env->close( env, 0 );
34823         }
34824
34825         if( rc ) {
34826                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
34827                 return rc;
34828         }
34829
34830 #else
34831         DB_ENV env;
34832         memset( &env, '\0', sizeof(env) );
34833
34834         rc = db_appinit( NULL, NULL, &env, flags );
34835
34836         if( rc == 0 ) {
34837                 db_appexit( &env );
34838         }
34839
34840         unlink("__db_mpool.share");
34841         unlink("__db_lock.share");
34842 #endif
34843
34844         return rc;
34845 }
34846 _ACEOF
34847 rm -f conftest$ac_exeext
34848 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34849   (eval $ac_link) 2>&5
34850   ac_status=$?
34851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34852   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
34853   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34854   (eval $ac_try) 2>&5
34855   ac_status=$?
34856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34857   (exit $ac_status); }; }; then
34858   ol_cv_berkeley_db_thread=yes
34859 else
34860   echo "$as_me: program exited with status $ac_status" >&5
34861 echo "$as_me: failed program was:" >&5
34862 sed 's/^/| /' conftest.$ac_ext >&5
34863
34864 ( exit $ac_status )
34865 ol_cv_berkeley_db_thread=no
34866 fi
34867 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
34868 fi
34869
34870         LIBS="$ol_LIBS"
34871
34872 fi
34873 echo "$as_me:$LINENO: result: $ol_cv_berkeley_db_thread" >&5
34874 echo "${ECHO_T}$ol_cv_berkeley_db_thread" >&6
34875
34876         if test $ol_cv_berkeley_db_thread != no ; then
34877
34878 cat >>confdefs.h <<\_ACEOF
34879 #define HAVE_BERKELEY_DB_THREAD 1
34880 _ACEOF
34881
34882         fi
34883
34884         fi
34885 fi
34886
34887         fi
34888
34889         if test $ol_cv_berkeley_db != no ; then
34890
34891 cat >>confdefs.h <<\_ACEOF
34892 #define HAVE_BERKELEY_DB 1
34893 _ACEOF
34894
34895
34896                 ol_link_ldbm=berkeley
34897                 ol_enable_ldbm_api=berkeley
34898
34899                 if test $ol_enable_ldbm_type = hash ; then
34900
34901 cat >>confdefs.h <<\_ACEOF
34902 #define LDBM_USE_DBHASH 1
34903 _ACEOF
34904
34905                 else
34906
34907 cat >>confdefs.h <<\_ACEOF
34908 #define LDBM_USE_DBBTREE 1
34909 _ACEOF
34910
34911                 fi
34912
34913                                                 if test $ol_cv_lib_db != yes ; then
34914                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
34915                 fi
34916         fi
34917         ;;
34918 esac
34919
34920 if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
34921         if test $ol_link_ldbm != berkeley ; then
34922                 { { echo "$as_me:$LINENO: error: BDB/HDB: BerkeleyDB not available" >&5
34923 echo "$as_me: error: BDB/HDB: BerkeleyDB not available" >&2;}
34924    { (exit 1); exit 1; }; }
34925         else
34926                 echo "$as_me:$LINENO: checking Berkeley DB version for BDB/HDB backends" >&5
34927 echo $ECHO_N "checking Berkeley DB version for BDB/HDB backends... $ECHO_C" >&6
34928 if test "${ol_cv_bdb_compat+set}" = set; then
34929   echo $ECHO_N "(cached) $ECHO_C" >&6
34930 else
34931
34932         cat >conftest.$ac_ext <<_ACEOF
34933 /* confdefs.h.  */
34934 _ACEOF
34935 cat confdefs.h >>conftest.$ac_ext
34936 cat >>conftest.$ac_ext <<_ACEOF
34937 /* end confdefs.h.  */
34938
34939 #include <db.h>
34940
34941  /* this check could be improved */
34942 #ifndef DB_VERSION_MAJOR
34943 #       define DB_VERSION_MAJOR 1
34944 #endif
34945 #ifndef DB_VERSION_MINOR
34946 #       define DB_VERSION_MINOR 0
34947 #endif
34948
34949 /* require 4.2 or later */
34950 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
34951         __db_version_compat
34952 #endif
34953
34954 _ACEOF
34955 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34956   $EGREP "__db_version_compat" >/dev/null 2>&1; then
34957   ol_cv_bdb_compat=yes
34958 else
34959   ol_cv_bdb_compat=no
34960 fi
34961 rm -f conftest*
34962
34963 fi
34964 echo "$as_me:$LINENO: result: $ol_cv_bdb_compat" >&5
34965 echo "${ECHO_T}$ol_cv_bdb_compat" >&6
34966
34967
34968                 if test $ol_cv_bdb_compat != yes ; then
34969                         { { echo "$as_me:$LINENO: error: BDB/HDB: BerkeleyDB version incompatible" >&5
34970 echo "$as_me: error: BDB/HDB: BerkeleyDB version incompatible" >&2;}
34971    { (exit 1); exit 1; }; }
34972                 fi
34973         fi
34974 fi
34975
34976 if test $ol_link_ldbm = no && test $ol_enable_ldbm_type = btree ; then
34977         { echo "$as_me:$LINENO: WARNING: Could not find LDBM with BTREE support" >&5
34978 echo "$as_me: WARNING: Could not find LDBM with BTREE support" >&2;}
34979         ol_enable_ldbm_api=none
34980 fi
34981
34982 if test $ol_enable_ldbm_api = auto || test $ol_enable_ldbm_api = mdbm ; then
34983         echo "$as_me:$LINENO: checking for MDBM library" >&5
34984 echo $ECHO_N "checking for MDBM library... $ECHO_C" >&6
34985 if test "${ol_cv_lib_mdbm+set}" = set; then
34986   echo $ECHO_N "(cached) $ECHO_C" >&6
34987 else
34988         ol_LIBS="$LIBS"
34989         echo "$as_me:$LINENO: checking for mdbm_set_chain" >&5
34990 echo $ECHO_N "checking for mdbm_set_chain... $ECHO_C" >&6
34991 if test "${ac_cv_func_mdbm_set_chain+set}" = set; then
34992   echo $ECHO_N "(cached) $ECHO_C" >&6
34993 else
34994   cat >conftest.$ac_ext <<_ACEOF
34995 /* confdefs.h.  */
34996 _ACEOF
34997 cat confdefs.h >>conftest.$ac_ext
34998 cat >>conftest.$ac_ext <<_ACEOF
34999 /* end confdefs.h.  */
35000 /* Define mdbm_set_chain to an innocuous variant, in case <limits.h> declares mdbm_set_chain.
35001    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
35002 #define mdbm_set_chain innocuous_mdbm_set_chain
35003
35004 /* System header to define __stub macros and hopefully few prototypes,
35005     which can conflict with char mdbm_set_chain (); below.
35006     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35007     <limits.h> exists even on freestanding compilers.  */
35008
35009 #ifdef __STDC__
35010 # include <limits.h>
35011 #else
35012 # include <assert.h>
35013 #endif
35014
35015 #undef mdbm_set_chain
35016
35017 /* Override any gcc2 internal prototype to avoid an error.  */
35018 #ifdef __cplusplus
35019 extern "C"
35020 {
35021 #endif
35022 /* We use char because int might match the return type of a gcc2
35023    builtin and then its argument prototype would still apply.  */
35024 char mdbm_set_chain ();
35025 /* The GNU C library defines this for functions which it implements
35026     to always fail with ENOSYS.  Some functions are actually named
35027     something starting with __ and the normal name is an alias.  */
35028 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
35029 choke me
35030 #else
35031 char (*f) () = mdbm_set_chain;
35032 #endif
35033 #ifdef __cplusplus
35034 }
35035 #endif
35036
35037 int
35038 main ()
35039 {
35040 return f != mdbm_set_chain;
35041   ;
35042   return 0;
35043 }
35044 _ACEOF
35045 rm -f conftest.$ac_objext conftest$ac_exeext
35046 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35047   (eval $ac_link) 2>conftest.er1
35048   ac_status=$?
35049   grep -v '^ *+' conftest.er1 >conftest.err
35050   rm -f conftest.er1
35051   cat conftest.err >&5
35052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35053   (exit $ac_status); } &&
35054          { ac_try='test -z "$ac_c_werror_flag"
35055                          || test ! -s conftest.err'
35056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35057   (eval $ac_try) 2>&5
35058   ac_status=$?
35059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35060   (exit $ac_status); }; } &&
35061          { ac_try='test -s conftest$ac_exeext'
35062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35063   (eval $ac_try) 2>&5
35064   ac_status=$?
35065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35066   (exit $ac_status); }; }; then
35067   ac_cv_func_mdbm_set_chain=yes
35068 else
35069   echo "$as_me: failed program was:" >&5
35070 sed 's/^/| /' conftest.$ac_ext >&5
35071
35072 ac_cv_func_mdbm_set_chain=no
35073 fi
35074 rm -f conftest.err conftest.$ac_objext \
35075       conftest$ac_exeext conftest.$ac_ext
35076 fi
35077 echo "$as_me:$LINENO: result: $ac_cv_func_mdbm_set_chain" >&5
35078 echo "${ECHO_T}$ac_cv_func_mdbm_set_chain" >&6
35079 if test $ac_cv_func_mdbm_set_chain = yes; then
35080   ol_cv_lib_mdbm=yes
35081 else
35082
35083                 echo "$as_me:$LINENO: checking for mdbm_set_chain in -lmdbm" >&5
35084 echo $ECHO_N "checking for mdbm_set_chain in -lmdbm... $ECHO_C" >&6
35085 if test "${ac_cv_lib_mdbm_mdbm_set_chain+set}" = set; then
35086   echo $ECHO_N "(cached) $ECHO_C" >&6
35087 else
35088   ac_check_lib_save_LIBS=$LIBS
35089 LIBS="-lmdbm  $LIBS"
35090 cat >conftest.$ac_ext <<_ACEOF
35091 /* confdefs.h.  */
35092 _ACEOF
35093 cat confdefs.h >>conftest.$ac_ext
35094 cat >>conftest.$ac_ext <<_ACEOF
35095 /* end confdefs.h.  */
35096
35097 /* Override any gcc2 internal prototype to avoid an error.  */
35098 #ifdef __cplusplus
35099 extern "C"
35100 #endif
35101 /* We use char because int might match the return type of a gcc2
35102    builtin and then its argument prototype would still apply.  */
35103 char mdbm_set_chain ();
35104 int
35105 main ()
35106 {
35107 mdbm_set_chain ();
35108   ;
35109   return 0;
35110 }
35111 _ACEOF
35112 rm -f conftest.$ac_objext conftest$ac_exeext
35113 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35114   (eval $ac_link) 2>conftest.er1
35115   ac_status=$?
35116   grep -v '^ *+' conftest.er1 >conftest.err
35117   rm -f conftest.er1
35118   cat conftest.err >&5
35119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35120   (exit $ac_status); } &&
35121          { ac_try='test -z "$ac_c_werror_flag"
35122                          || test ! -s conftest.err'
35123   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35124   (eval $ac_try) 2>&5
35125   ac_status=$?
35126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35127   (exit $ac_status); }; } &&
35128          { ac_try='test -s conftest$ac_exeext'
35129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35130   (eval $ac_try) 2>&5
35131   ac_status=$?
35132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35133   (exit $ac_status); }; }; then
35134   ac_cv_lib_mdbm_mdbm_set_chain=yes
35135 else
35136   echo "$as_me: failed program was:" >&5
35137 sed 's/^/| /' conftest.$ac_ext >&5
35138
35139 ac_cv_lib_mdbm_mdbm_set_chain=no
35140 fi
35141 rm -f conftest.err conftest.$ac_objext \
35142       conftest$ac_exeext conftest.$ac_ext
35143 LIBS=$ac_check_lib_save_LIBS
35144 fi
35145 echo "$as_me:$LINENO: result: $ac_cv_lib_mdbm_mdbm_set_chain" >&5
35146 echo "${ECHO_T}$ac_cv_lib_mdbm_mdbm_set_chain" >&6
35147 if test $ac_cv_lib_mdbm_mdbm_set_chain = yes; then
35148   ol_cv_lib_mdbm=-lmdbm
35149 else
35150   ol_cv_lib_mdbm=no
35151 fi
35152
35153
35154 fi
35155
35156         LIBS="$ol_LIBS"
35157
35158 fi
35159 echo "$as_me:$LINENO: result: $ol_cv_lib_mdbm" >&5
35160 echo "${ECHO_T}$ol_cv_lib_mdbm" >&6
35161
35162
35163
35164 for ac_header in mdbm.h
35165 do
35166 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
35167 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35168   echo "$as_me:$LINENO: checking for $ac_header" >&5
35169 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35170 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35171   echo $ECHO_N "(cached) $ECHO_C" >&6
35172 fi
35173 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35174 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35175 else
35176   # Is the header compilable?
35177 echo "$as_me:$LINENO: checking $ac_header usability" >&5
35178 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
35179 cat >conftest.$ac_ext <<_ACEOF
35180 /* confdefs.h.  */
35181 _ACEOF
35182 cat confdefs.h >>conftest.$ac_ext
35183 cat >>conftest.$ac_ext <<_ACEOF
35184 /* end confdefs.h.  */
35185 $ac_includes_default
35186 #include <$ac_header>
35187 _ACEOF
35188 rm -f conftest.$ac_objext
35189 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35190   (eval $ac_compile) 2>conftest.er1
35191   ac_status=$?
35192   grep -v '^ *+' conftest.er1 >conftest.err
35193   rm -f conftest.er1
35194   cat conftest.err >&5
35195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35196   (exit $ac_status); } &&
35197          { ac_try='test -z "$ac_c_werror_flag"
35198                          || test ! -s conftest.err'
35199   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35200   (eval $ac_try) 2>&5
35201   ac_status=$?
35202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35203   (exit $ac_status); }; } &&
35204          { ac_try='test -s conftest.$ac_objext'
35205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35206   (eval $ac_try) 2>&5
35207   ac_status=$?
35208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35209   (exit $ac_status); }; }; then
35210   ac_header_compiler=yes
35211 else
35212   echo "$as_me: failed program was:" >&5
35213 sed 's/^/| /' conftest.$ac_ext >&5
35214
35215 ac_header_compiler=no
35216 fi
35217 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35218 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
35219 echo "${ECHO_T}$ac_header_compiler" >&6
35220
35221 # Is the header present?
35222 echo "$as_me:$LINENO: checking $ac_header presence" >&5
35223 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
35224 cat >conftest.$ac_ext <<_ACEOF
35225 /* confdefs.h.  */
35226 _ACEOF
35227 cat confdefs.h >>conftest.$ac_ext
35228 cat >>conftest.$ac_ext <<_ACEOF
35229 /* end confdefs.h.  */
35230 #include <$ac_header>
35231 _ACEOF
35232 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
35233   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
35234   ac_status=$?
35235   grep -v '^ *+' conftest.er1 >conftest.err
35236   rm -f conftest.er1
35237   cat conftest.err >&5
35238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35239   (exit $ac_status); } >/dev/null; then
35240   if test -s conftest.err; then
35241     ac_cpp_err=$ac_c_preproc_warn_flag
35242     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
35243   else
35244     ac_cpp_err=
35245   fi
35246 else
35247   ac_cpp_err=yes
35248 fi
35249 if test -z "$ac_cpp_err"; then
35250   ac_header_preproc=yes
35251 else
35252   echo "$as_me: failed program was:" >&5
35253 sed 's/^/| /' conftest.$ac_ext >&5
35254
35255   ac_header_preproc=no
35256 fi
35257 rm -f conftest.err conftest.$ac_ext
35258 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
35259 echo "${ECHO_T}$ac_header_preproc" >&6
35260
35261 # So?  What about this header?
35262 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
35263   yes:no: )
35264     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
35265 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35266     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
35267 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
35268     ac_header_preproc=yes
35269     ;;
35270   no:yes:* )
35271     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
35272 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35273     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
35274 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
35275     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
35276 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
35277     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
35278 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
35279     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
35280 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35281     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
35282 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
35283     (
35284       cat <<\_ASBOX
35285 ## --------------------------------------------- ##
35286 ## Report this to <http://www.openldap.org/its/> ##
35287 ## --------------------------------------------- ##
35288 _ASBOX
35289     ) |
35290       sed "s/^/$as_me: WARNING:     /" >&2
35291     ;;
35292 esac
35293 echo "$as_me:$LINENO: checking for $ac_header" >&5
35294 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35295 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35296   echo $ECHO_N "(cached) $ECHO_C" >&6
35297 else
35298   eval "$as_ac_Header=\$ac_header_preproc"
35299 fi
35300 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35301 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35302
35303 fi
35304 if test `eval echo '${'$as_ac_Header'}'` = yes; then
35305   cat >>confdefs.h <<_ACEOF
35306 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
35307 _ACEOF
35308
35309 fi
35310
35311 done
35312
35313  echo "$as_me:$LINENO: checking for db" >&5
35314 echo $ECHO_N "checking for db... $ECHO_C" >&6
35315 if test "${ol_cv_mdbm+set}" = set; then
35316   echo $ECHO_N "(cached) $ECHO_C" >&6
35317 else
35318
35319         if test $ol_cv_lib_mdbm = no || test $ac_cv_header_mdbm_h = no ; then
35320                 ol_cv_mdbm=no
35321         else
35322                 ol_cv_mdbm=yes
35323         fi
35324
35325 fi
35326 echo "$as_me:$LINENO: result: $ol_cv_mdbm" >&5
35327 echo "${ECHO_T}$ol_cv_mdbm" >&6
35328  if test $ol_cv_mdbm = yes ; then
35329
35330 cat >>confdefs.h <<\_ACEOF
35331 #define HAVE_MDBM 1
35332 _ACEOF
35333
35334  fi
35335
35336
35337         if test $ol_cv_mdbm = yes ; then
35338                 ol_link_ldbm=mdbm
35339                 ol_enable_ldbm_api=mdbm
35340                 if test $ol_cv_lib_mdbm != yes ; then
35341                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
35342                 fi
35343         fi
35344 fi
35345
35346 if test $ol_enable_ldbm_api = auto || test $ol_enable_ldbm_api = gdbm ; then
35347         echo "$as_me:$LINENO: checking for GDBM library" >&5
35348 echo $ECHO_N "checking for GDBM library... $ECHO_C" >&6
35349 if test "${ol_cv_lib_gdbm+set}" = set; then
35350   echo $ECHO_N "(cached) $ECHO_C" >&6
35351 else
35352         ol_LIBS="$LIBS"
35353         echo "$as_me:$LINENO: checking for gdbm_open" >&5
35354 echo $ECHO_N "checking for gdbm_open... $ECHO_C" >&6
35355 if test "${ac_cv_func_gdbm_open+set}" = set; then
35356   echo $ECHO_N "(cached) $ECHO_C" >&6
35357 else
35358   cat >conftest.$ac_ext <<_ACEOF
35359 /* confdefs.h.  */
35360 _ACEOF
35361 cat confdefs.h >>conftest.$ac_ext
35362 cat >>conftest.$ac_ext <<_ACEOF
35363 /* end confdefs.h.  */
35364 /* Define gdbm_open to an innocuous variant, in case <limits.h> declares gdbm_open.
35365    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
35366 #define gdbm_open innocuous_gdbm_open
35367
35368 /* System header to define __stub macros and hopefully few prototypes,
35369     which can conflict with char gdbm_open (); below.
35370     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35371     <limits.h> exists even on freestanding compilers.  */
35372
35373 #ifdef __STDC__
35374 # include <limits.h>
35375 #else
35376 # include <assert.h>
35377 #endif
35378
35379 #undef gdbm_open
35380
35381 /* Override any gcc2 internal prototype to avoid an error.  */
35382 #ifdef __cplusplus
35383 extern "C"
35384 {
35385 #endif
35386 /* We use char because int might match the return type of a gcc2
35387    builtin and then its argument prototype would still apply.  */
35388 char gdbm_open ();
35389 /* The GNU C library defines this for functions which it implements
35390     to always fail with ENOSYS.  Some functions are actually named
35391     something starting with __ and the normal name is an alias.  */
35392 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
35393 choke me
35394 #else
35395 char (*f) () = gdbm_open;
35396 #endif
35397 #ifdef __cplusplus
35398 }
35399 #endif
35400
35401 int
35402 main ()
35403 {
35404 return f != gdbm_open;
35405   ;
35406   return 0;
35407 }
35408 _ACEOF
35409 rm -f conftest.$ac_objext conftest$ac_exeext
35410 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35411   (eval $ac_link) 2>conftest.er1
35412   ac_status=$?
35413   grep -v '^ *+' conftest.er1 >conftest.err
35414   rm -f conftest.er1
35415   cat conftest.err >&5
35416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35417   (exit $ac_status); } &&
35418          { ac_try='test -z "$ac_c_werror_flag"
35419                          || test ! -s conftest.err'
35420   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35421   (eval $ac_try) 2>&5
35422   ac_status=$?
35423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35424   (exit $ac_status); }; } &&
35425          { ac_try='test -s conftest$ac_exeext'
35426   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35427   (eval $ac_try) 2>&5
35428   ac_status=$?
35429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35430   (exit $ac_status); }; }; then
35431   ac_cv_func_gdbm_open=yes
35432 else
35433   echo "$as_me: failed program was:" >&5
35434 sed 's/^/| /' conftest.$ac_ext >&5
35435
35436 ac_cv_func_gdbm_open=no
35437 fi
35438 rm -f conftest.err conftest.$ac_objext \
35439       conftest$ac_exeext conftest.$ac_ext
35440 fi
35441 echo "$as_me:$LINENO: result: $ac_cv_func_gdbm_open" >&5
35442 echo "${ECHO_T}$ac_cv_func_gdbm_open" >&6
35443 if test $ac_cv_func_gdbm_open = yes; then
35444   ol_cv_lib_gdbm=yes
35445 else
35446
35447                 echo "$as_me:$LINENO: checking for gdbm_open in -lgdbm" >&5
35448 echo $ECHO_N "checking for gdbm_open in -lgdbm... $ECHO_C" >&6
35449 if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then
35450   echo $ECHO_N "(cached) $ECHO_C" >&6
35451 else
35452   ac_check_lib_save_LIBS=$LIBS
35453 LIBS="-lgdbm  $LIBS"
35454 cat >conftest.$ac_ext <<_ACEOF
35455 /* confdefs.h.  */
35456 _ACEOF
35457 cat confdefs.h >>conftest.$ac_ext
35458 cat >>conftest.$ac_ext <<_ACEOF
35459 /* end confdefs.h.  */
35460
35461 /* Override any gcc2 internal prototype to avoid an error.  */
35462 #ifdef __cplusplus
35463 extern "C"
35464 #endif
35465 /* We use char because int might match the return type of a gcc2
35466    builtin and then its argument prototype would still apply.  */
35467 char gdbm_open ();
35468 int
35469 main ()
35470 {
35471 gdbm_open ();
35472   ;
35473   return 0;
35474 }
35475 _ACEOF
35476 rm -f conftest.$ac_objext conftest$ac_exeext
35477 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35478   (eval $ac_link) 2>conftest.er1
35479   ac_status=$?
35480   grep -v '^ *+' conftest.er1 >conftest.err
35481   rm -f conftest.er1
35482   cat conftest.err >&5
35483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35484   (exit $ac_status); } &&
35485          { ac_try='test -z "$ac_c_werror_flag"
35486                          || test ! -s conftest.err'
35487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35488   (eval $ac_try) 2>&5
35489   ac_status=$?
35490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35491   (exit $ac_status); }; } &&
35492          { ac_try='test -s conftest$ac_exeext'
35493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35494   (eval $ac_try) 2>&5
35495   ac_status=$?
35496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35497   (exit $ac_status); }; }; then
35498   ac_cv_lib_gdbm_gdbm_open=yes
35499 else
35500   echo "$as_me: failed program was:" >&5
35501 sed 's/^/| /' conftest.$ac_ext >&5
35502
35503 ac_cv_lib_gdbm_gdbm_open=no
35504 fi
35505 rm -f conftest.err conftest.$ac_objext \
35506       conftest$ac_exeext conftest.$ac_ext
35507 LIBS=$ac_check_lib_save_LIBS
35508 fi
35509 echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_gdbm_open" >&5
35510 echo "${ECHO_T}$ac_cv_lib_gdbm_gdbm_open" >&6
35511 if test $ac_cv_lib_gdbm_gdbm_open = yes; then
35512   ol_cv_lib_gdbm=-lgdbm
35513 else
35514   ol_cv_lib_gdbm=no
35515 fi
35516
35517
35518 fi
35519
35520         LIBS="$ol_LIBS"
35521
35522 fi
35523 echo "$as_me:$LINENO: result: $ol_cv_lib_gdbm" >&5
35524 echo "${ECHO_T}$ol_cv_lib_gdbm" >&6
35525
35526
35527
35528 for ac_header in gdbm.h
35529 do
35530 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
35531 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35532   echo "$as_me:$LINENO: checking for $ac_header" >&5
35533 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35534 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35535   echo $ECHO_N "(cached) $ECHO_C" >&6
35536 fi
35537 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35538 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35539 else
35540   # Is the header compilable?
35541 echo "$as_me:$LINENO: checking $ac_header usability" >&5
35542 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
35543 cat >conftest.$ac_ext <<_ACEOF
35544 /* confdefs.h.  */
35545 _ACEOF
35546 cat confdefs.h >>conftest.$ac_ext
35547 cat >>conftest.$ac_ext <<_ACEOF
35548 /* end confdefs.h.  */
35549 $ac_includes_default
35550 #include <$ac_header>
35551 _ACEOF
35552 rm -f conftest.$ac_objext
35553 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35554   (eval $ac_compile) 2>conftest.er1
35555   ac_status=$?
35556   grep -v '^ *+' conftest.er1 >conftest.err
35557   rm -f conftest.er1
35558   cat conftest.err >&5
35559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35560   (exit $ac_status); } &&
35561          { ac_try='test -z "$ac_c_werror_flag"
35562                          || test ! -s conftest.err'
35563   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35564   (eval $ac_try) 2>&5
35565   ac_status=$?
35566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35567   (exit $ac_status); }; } &&
35568          { ac_try='test -s conftest.$ac_objext'
35569   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35570   (eval $ac_try) 2>&5
35571   ac_status=$?
35572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35573   (exit $ac_status); }; }; then
35574   ac_header_compiler=yes
35575 else
35576   echo "$as_me: failed program was:" >&5
35577 sed 's/^/| /' conftest.$ac_ext >&5
35578
35579 ac_header_compiler=no
35580 fi
35581 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35582 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
35583 echo "${ECHO_T}$ac_header_compiler" >&6
35584
35585 # Is the header present?
35586 echo "$as_me:$LINENO: checking $ac_header presence" >&5
35587 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
35588 cat >conftest.$ac_ext <<_ACEOF
35589 /* confdefs.h.  */
35590 _ACEOF
35591 cat confdefs.h >>conftest.$ac_ext
35592 cat >>conftest.$ac_ext <<_ACEOF
35593 /* end confdefs.h.  */
35594 #include <$ac_header>
35595 _ACEOF
35596 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
35597   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
35598   ac_status=$?
35599   grep -v '^ *+' conftest.er1 >conftest.err
35600   rm -f conftest.er1
35601   cat conftest.err >&5
35602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35603   (exit $ac_status); } >/dev/null; then
35604   if test -s conftest.err; then
35605     ac_cpp_err=$ac_c_preproc_warn_flag
35606     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
35607   else
35608     ac_cpp_err=
35609   fi
35610 else
35611   ac_cpp_err=yes
35612 fi
35613 if test -z "$ac_cpp_err"; then
35614   ac_header_preproc=yes
35615 else
35616   echo "$as_me: failed program was:" >&5
35617 sed 's/^/| /' conftest.$ac_ext >&5
35618
35619   ac_header_preproc=no
35620 fi
35621 rm -f conftest.err conftest.$ac_ext
35622 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
35623 echo "${ECHO_T}$ac_header_preproc" >&6
35624
35625 # So?  What about this header?
35626 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
35627   yes:no: )
35628     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
35629 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35630     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
35631 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
35632     ac_header_preproc=yes
35633     ;;
35634   no:yes:* )
35635     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
35636 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35637     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
35638 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
35639     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
35640 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
35641     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
35642 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
35643     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
35644 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35645     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
35646 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
35647     (
35648       cat <<\_ASBOX
35649 ## --------------------------------------------- ##
35650 ## Report this to <http://www.openldap.org/its/> ##
35651 ## --------------------------------------------- ##
35652 _ASBOX
35653     ) |
35654       sed "s/^/$as_me: WARNING:     /" >&2
35655     ;;
35656 esac
35657 echo "$as_me:$LINENO: checking for $ac_header" >&5
35658 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35659 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35660   echo $ECHO_N "(cached) $ECHO_C" >&6
35661 else
35662   eval "$as_ac_Header=\$ac_header_preproc"
35663 fi
35664 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35665 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35666
35667 fi
35668 if test `eval echo '${'$as_ac_Header'}'` = yes; then
35669   cat >>confdefs.h <<_ACEOF
35670 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
35671 _ACEOF
35672
35673 fi
35674
35675 done
35676
35677  echo "$as_me:$LINENO: checking for db" >&5
35678 echo $ECHO_N "checking for db... $ECHO_C" >&6
35679 if test "${ol_cv_gdbm+set}" = set; then
35680   echo $ECHO_N "(cached) $ECHO_C" >&6
35681 else
35682
35683         if test $ol_cv_lib_gdbm = no || test $ac_cv_header_gdbm_h = no ; then
35684                 ol_cv_gdbm=no
35685         else
35686                 ol_cv_gdbm=yes
35687         fi
35688
35689 fi
35690 echo "$as_me:$LINENO: result: $ol_cv_gdbm" >&5
35691 echo "${ECHO_T}$ol_cv_gdbm" >&6
35692  if test $ol_cv_gdbm = yes ; then
35693
35694 cat >>confdefs.h <<\_ACEOF
35695 #define HAVE_GDBM 1
35696 _ACEOF
35697
35698  fi
35699
35700
35701         if test $ol_cv_gdbm = yes ; then
35702                 ol_link_ldbm=gdbm
35703                 ol_enable_ldbm_api=gdbm
35704
35705                 if test $ol_cv_lib_gdbm != yes ; then
35706                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
35707                 fi
35708         fi
35709 fi
35710
35711 if test $ol_enable_ldbm_api = ndbm ; then
35712         echo "$as_me:$LINENO: checking for NDBM library" >&5
35713 echo $ECHO_N "checking for NDBM library... $ECHO_C" >&6
35714 if test "${ol_cv_lib_ndbm+set}" = set; then
35715   echo $ECHO_N "(cached) $ECHO_C" >&6
35716 else
35717         ol_LIBS="$LIBS"
35718         echo "$as_me:$LINENO: checking for dbm_open" >&5
35719 echo $ECHO_N "checking for dbm_open... $ECHO_C" >&6
35720 if test "${ac_cv_func_dbm_open+set}" = set; then
35721   echo $ECHO_N "(cached) $ECHO_C" >&6
35722 else
35723   cat >conftest.$ac_ext <<_ACEOF
35724 /* confdefs.h.  */
35725 _ACEOF
35726 cat confdefs.h >>conftest.$ac_ext
35727 cat >>conftest.$ac_ext <<_ACEOF
35728 /* end confdefs.h.  */
35729 /* Define dbm_open to an innocuous variant, in case <limits.h> declares dbm_open.
35730    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
35731 #define dbm_open innocuous_dbm_open
35732
35733 /* System header to define __stub macros and hopefully few prototypes,
35734     which can conflict with char dbm_open (); below.
35735     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35736     <limits.h> exists even on freestanding compilers.  */
35737
35738 #ifdef __STDC__
35739 # include <limits.h>
35740 #else
35741 # include <assert.h>
35742 #endif
35743
35744 #undef dbm_open
35745
35746 /* Override any gcc2 internal prototype to avoid an error.  */
35747 #ifdef __cplusplus
35748 extern "C"
35749 {
35750 #endif
35751 /* We use char because int might match the return type of a gcc2
35752    builtin and then its argument prototype would still apply.  */
35753 char dbm_open ();
35754 /* The GNU C library defines this for functions which it implements
35755     to always fail with ENOSYS.  Some functions are actually named
35756     something starting with __ and the normal name is an alias.  */
35757 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
35758 choke me
35759 #else
35760 char (*f) () = dbm_open;
35761 #endif
35762 #ifdef __cplusplus
35763 }
35764 #endif
35765
35766 int
35767 main ()
35768 {
35769 return f != dbm_open;
35770   ;
35771   return 0;
35772 }
35773 _ACEOF
35774 rm -f conftest.$ac_objext conftest$ac_exeext
35775 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35776   (eval $ac_link) 2>conftest.er1
35777   ac_status=$?
35778   grep -v '^ *+' conftest.er1 >conftest.err
35779   rm -f conftest.er1
35780   cat conftest.err >&5
35781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35782   (exit $ac_status); } &&
35783          { ac_try='test -z "$ac_c_werror_flag"
35784                          || test ! -s conftest.err'
35785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35786   (eval $ac_try) 2>&5
35787   ac_status=$?
35788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35789   (exit $ac_status); }; } &&
35790          { ac_try='test -s conftest$ac_exeext'
35791   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35792   (eval $ac_try) 2>&5
35793   ac_status=$?
35794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35795   (exit $ac_status); }; }; then
35796   ac_cv_func_dbm_open=yes
35797 else
35798   echo "$as_me: failed program was:" >&5
35799 sed 's/^/| /' conftest.$ac_ext >&5
35800
35801 ac_cv_func_dbm_open=no
35802 fi
35803 rm -f conftest.err conftest.$ac_objext \
35804       conftest$ac_exeext conftest.$ac_ext
35805 fi
35806 echo "$as_me:$LINENO: result: $ac_cv_func_dbm_open" >&5
35807 echo "${ECHO_T}$ac_cv_func_dbm_open" >&6
35808 if test $ac_cv_func_dbm_open = yes; then
35809   ol_cv_lib_ndbm=yes
35810 else
35811
35812                 echo "$as_me:$LINENO: checking for dbm_open in -lndbm" >&5
35813 echo $ECHO_N "checking for dbm_open in -lndbm... $ECHO_C" >&6
35814 if test "${ac_cv_lib_ndbm_dbm_open+set}" = set; then
35815   echo $ECHO_N "(cached) $ECHO_C" >&6
35816 else
35817   ac_check_lib_save_LIBS=$LIBS
35818 LIBS="-lndbm  $LIBS"
35819 cat >conftest.$ac_ext <<_ACEOF
35820 /* confdefs.h.  */
35821 _ACEOF
35822 cat confdefs.h >>conftest.$ac_ext
35823 cat >>conftest.$ac_ext <<_ACEOF
35824 /* end confdefs.h.  */
35825
35826 /* Override any gcc2 internal prototype to avoid an error.  */
35827 #ifdef __cplusplus
35828 extern "C"
35829 #endif
35830 /* We use char because int might match the return type of a gcc2
35831    builtin and then its argument prototype would still apply.  */
35832 char dbm_open ();
35833 int
35834 main ()
35835 {
35836 dbm_open ();
35837   ;
35838   return 0;
35839 }
35840 _ACEOF
35841 rm -f conftest.$ac_objext conftest$ac_exeext
35842 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35843   (eval $ac_link) 2>conftest.er1
35844   ac_status=$?
35845   grep -v '^ *+' conftest.er1 >conftest.err
35846   rm -f conftest.er1
35847   cat conftest.err >&5
35848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35849   (exit $ac_status); } &&
35850          { ac_try='test -z "$ac_c_werror_flag"
35851                          || test ! -s conftest.err'
35852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35853   (eval $ac_try) 2>&5
35854   ac_status=$?
35855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35856   (exit $ac_status); }; } &&
35857          { ac_try='test -s conftest$ac_exeext'
35858   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35859   (eval $ac_try) 2>&5
35860   ac_status=$?
35861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35862   (exit $ac_status); }; }; then
35863   ac_cv_lib_ndbm_dbm_open=yes
35864 else
35865   echo "$as_me: failed program was:" >&5
35866 sed 's/^/| /' conftest.$ac_ext >&5
35867
35868 ac_cv_lib_ndbm_dbm_open=no
35869 fi
35870 rm -f conftest.err conftest.$ac_objext \
35871       conftest$ac_exeext conftest.$ac_ext
35872 LIBS=$ac_check_lib_save_LIBS
35873 fi
35874 echo "$as_me:$LINENO: result: $ac_cv_lib_ndbm_dbm_open" >&5
35875 echo "${ECHO_T}$ac_cv_lib_ndbm_dbm_open" >&6
35876 if test $ac_cv_lib_ndbm_dbm_open = yes; then
35877   ol_cv_lib_ndbm=-lndbm
35878 else
35879
35880                         echo "$as_me:$LINENO: checking for dbm_open in -ldbm" >&5
35881 echo $ECHO_N "checking for dbm_open in -ldbm... $ECHO_C" >&6
35882 if test "${ac_cv_lib_dbm_dbm_open+set}" = set; then
35883   echo $ECHO_N "(cached) $ECHO_C" >&6
35884 else
35885   ac_check_lib_save_LIBS=$LIBS
35886 LIBS="-ldbm  $LIBS"
35887 cat >conftest.$ac_ext <<_ACEOF
35888 /* confdefs.h.  */
35889 _ACEOF
35890 cat confdefs.h >>conftest.$ac_ext
35891 cat >>conftest.$ac_ext <<_ACEOF
35892 /* end confdefs.h.  */
35893
35894 /* Override any gcc2 internal prototype to avoid an error.  */
35895 #ifdef __cplusplus
35896 extern "C"
35897 #endif
35898 /* We use char because int might match the return type of a gcc2
35899    builtin and then its argument prototype would still apply.  */
35900 char dbm_open ();
35901 int
35902 main ()
35903 {
35904 dbm_open ();
35905   ;
35906   return 0;
35907 }
35908 _ACEOF
35909 rm -f conftest.$ac_objext conftest$ac_exeext
35910 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35911   (eval $ac_link) 2>conftest.er1
35912   ac_status=$?
35913   grep -v '^ *+' conftest.er1 >conftest.err
35914   rm -f conftest.er1
35915   cat conftest.err >&5
35916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35917   (exit $ac_status); } &&
35918          { ac_try='test -z "$ac_c_werror_flag"
35919                          || test ! -s conftest.err'
35920   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35921   (eval $ac_try) 2>&5
35922   ac_status=$?
35923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35924   (exit $ac_status); }; } &&
35925          { ac_try='test -s conftest$ac_exeext'
35926   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35927   (eval $ac_try) 2>&5
35928   ac_status=$?
35929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35930   (exit $ac_status); }; }; then
35931   ac_cv_lib_dbm_dbm_open=yes
35932 else
35933   echo "$as_me: failed program was:" >&5
35934 sed 's/^/| /' conftest.$ac_ext >&5
35935
35936 ac_cv_lib_dbm_dbm_open=no
35937 fi
35938 rm -f conftest.err conftest.$ac_objext \
35939       conftest$ac_exeext conftest.$ac_ext
35940 LIBS=$ac_check_lib_save_LIBS
35941 fi
35942 echo "$as_me:$LINENO: result: $ac_cv_lib_dbm_dbm_open" >&5
35943 echo "${ECHO_T}$ac_cv_lib_dbm_dbm_open" >&6
35944 if test $ac_cv_lib_dbm_dbm_open = yes; then
35945   ol_cv_lib_ndbm=-ldbm
35946 else
35947   ol_cv_lib_ndbm=no
35948 fi
35949
35950 fi
35951
35952
35953 fi
35954
35955         LIBS="$ol_LIBS"
35956
35957 fi
35958 echo "$as_me:$LINENO: result: $ol_cv_lib_ndbm" >&5
35959 echo "${ECHO_T}$ol_cv_lib_ndbm" >&6
35960
35961
35962
35963 for ac_header in ndbm.h
35964 do
35965 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
35966 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35967   echo "$as_me:$LINENO: checking for $ac_header" >&5
35968 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35969 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35970   echo $ECHO_N "(cached) $ECHO_C" >&6
35971 fi
35972 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35973 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35974 else
35975   # Is the header compilable?
35976 echo "$as_me:$LINENO: checking $ac_header usability" >&5
35977 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
35978 cat >conftest.$ac_ext <<_ACEOF
35979 /* confdefs.h.  */
35980 _ACEOF
35981 cat confdefs.h >>conftest.$ac_ext
35982 cat >>conftest.$ac_ext <<_ACEOF
35983 /* end confdefs.h.  */
35984 $ac_includes_default
35985 #include <$ac_header>
35986 _ACEOF
35987 rm -f conftest.$ac_objext
35988 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35989   (eval $ac_compile) 2>conftest.er1
35990   ac_status=$?
35991   grep -v '^ *+' conftest.er1 >conftest.err
35992   rm -f conftest.er1
35993   cat conftest.err >&5
35994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35995   (exit $ac_status); } &&
35996          { ac_try='test -z "$ac_c_werror_flag"
35997                          || test ! -s conftest.err'
35998   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35999   (eval $ac_try) 2>&5
36000   ac_status=$?
36001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36002   (exit $ac_status); }; } &&
36003          { ac_try='test -s conftest.$ac_objext'
36004   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36005   (eval $ac_try) 2>&5
36006   ac_status=$?
36007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36008   (exit $ac_status); }; }; then
36009   ac_header_compiler=yes
36010 else
36011   echo "$as_me: failed program was:" >&5
36012 sed 's/^/| /' conftest.$ac_ext >&5
36013
36014 ac_header_compiler=no
36015 fi
36016 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36017 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
36018 echo "${ECHO_T}$ac_header_compiler" >&6
36019
36020 # Is the header present?
36021 echo "$as_me:$LINENO: checking $ac_header presence" >&5
36022 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
36023 cat >conftest.$ac_ext <<_ACEOF
36024 /* confdefs.h.  */
36025 _ACEOF
36026 cat confdefs.h >>conftest.$ac_ext
36027 cat >>conftest.$ac_ext <<_ACEOF
36028 /* end confdefs.h.  */
36029 #include <$ac_header>
36030 _ACEOF
36031 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
36032   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
36033   ac_status=$?
36034   grep -v '^ *+' conftest.er1 >conftest.err
36035   rm -f conftest.er1
36036   cat conftest.err >&5
36037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36038   (exit $ac_status); } >/dev/null; then
36039   if test -s conftest.err; then
36040     ac_cpp_err=$ac_c_preproc_warn_flag
36041     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
36042   else
36043     ac_cpp_err=
36044   fi
36045 else
36046   ac_cpp_err=yes
36047 fi
36048 if test -z "$ac_cpp_err"; then
36049   ac_header_preproc=yes
36050 else
36051   echo "$as_me: failed program was:" >&5
36052 sed 's/^/| /' conftest.$ac_ext >&5
36053
36054   ac_header_preproc=no
36055 fi
36056 rm -f conftest.err conftest.$ac_ext
36057 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
36058 echo "${ECHO_T}$ac_header_preproc" >&6
36059
36060 # So?  What about this header?
36061 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
36062   yes:no: )
36063     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
36064 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
36065     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
36066 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
36067     ac_header_preproc=yes
36068     ;;
36069   no:yes:* )
36070     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
36071 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
36072     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
36073 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
36074     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
36075 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
36076     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
36077 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
36078     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
36079 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
36080     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
36081 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
36082     (
36083       cat <<\_ASBOX
36084 ## --------------------------------------------- ##
36085 ## Report this to <http://www.openldap.org/its/> ##
36086 ## --------------------------------------------- ##
36087 _ASBOX
36088     ) |
36089       sed "s/^/$as_me: WARNING:     /" >&2
36090     ;;
36091 esac
36092 echo "$as_me:$LINENO: checking for $ac_header" >&5
36093 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36094 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36095   echo $ECHO_N "(cached) $ECHO_C" >&6
36096 else
36097   eval "$as_ac_Header=\$ac_header_preproc"
36098 fi
36099 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36100 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36101
36102 fi
36103 if test `eval echo '${'$as_ac_Header'}'` = yes; then
36104   cat >>confdefs.h <<_ACEOF
36105 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
36106 _ACEOF
36107
36108 fi
36109
36110 done
36111
36112  echo "$as_me:$LINENO: checking for db" >&5
36113 echo $ECHO_N "checking for db... $ECHO_C" >&6
36114 if test "${ol_cv_ndbm+set}" = set; then
36115   echo $ECHO_N "(cached) $ECHO_C" >&6
36116 else
36117
36118         if test $ol_cv_lib_ndbm = no || test $ac_cv_header_ndbm_h = no ; then
36119                 ol_cv_ndbm=no
36120         else
36121                 ol_cv_ndbm=yes
36122         fi
36123
36124 fi
36125 echo "$as_me:$LINENO: result: $ol_cv_ndbm" >&5
36126 echo "${ECHO_T}$ol_cv_ndbm" >&6
36127  if test $ol_cv_ndbm = yes ; then
36128
36129 cat >>confdefs.h <<\_ACEOF
36130 #define HAVE_NDBM 1
36131 _ACEOF
36132
36133  fi
36134
36135
36136         if test $ol_cv_ndbm = yes ; then
36137                 ol_link_ldbm=ndbm
36138                 ol_enable_ldbm_api=ndbm
36139
36140                 if test $ol_cv_lib_ndbm != yes ; then
36141                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
36142                 fi
36143         fi
36144 fi
36145
36146 if test $ol_link_ldbm = no && test $ol_enable_ldbm != no ; then
36147         { { echo "$as_me:$LINENO: error: could not find suitable LDBM backend" >&5
36148 echo "$as_me: error: could not find suitable LDBM backend" >&2;}
36149    { (exit 1); exit 1; }; }
36150 fi
36151
36152 if test $ol_enable_bdb = yes ||
36153    test $ol_enable_hdb = yes ||
36154    test $ol_enable_ldbm = yes ; then
36155         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
36156 fi
36157
36158
36159 if test $ol_enable_dynamic = yes && test $enable_shared = yes ; then
36160         BUILD_LIBS_DYNAMIC=shared
36161
36162 cat >>confdefs.h <<\_ACEOF
36163 #define LDAP_LIBS_DYNAMIC 1
36164 _ACEOF
36165
36166         LTSTATIC=""
36167 else
36168         BUILD_LIBS_DYNAMIC=static
36169         LTSTATIC="-static"
36170 fi
36171
36172 if test $ol_enable_wrappers != no ; then
36173
36174 for ac_header in tcpd.h
36175 do
36176 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
36177 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36178   echo "$as_me:$LINENO: checking for $ac_header" >&5
36179 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36180 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36181   echo $ECHO_N "(cached) $ECHO_C" >&6
36182 fi
36183 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36184 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36185 else
36186   # Is the header compilable?
36187 echo "$as_me:$LINENO: checking $ac_header usability" >&5
36188 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
36189 cat >conftest.$ac_ext <<_ACEOF
36190 /* confdefs.h.  */
36191 _ACEOF
36192 cat confdefs.h >>conftest.$ac_ext
36193 cat >>conftest.$ac_ext <<_ACEOF
36194 /* end confdefs.h.  */
36195 $ac_includes_default
36196 #include <$ac_header>
36197 _ACEOF
36198 rm -f conftest.$ac_objext
36199 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36200   (eval $ac_compile) 2>conftest.er1
36201   ac_status=$?
36202   grep -v '^ *+' conftest.er1 >conftest.err
36203   rm -f conftest.er1
36204   cat conftest.err >&5
36205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36206   (exit $ac_status); } &&
36207          { ac_try='test -z "$ac_c_werror_flag"
36208                          || test ! -s conftest.err'
36209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36210   (eval $ac_try) 2>&5
36211   ac_status=$?
36212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36213   (exit $ac_status); }; } &&
36214          { ac_try='test -s conftest.$ac_objext'
36215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36216   (eval $ac_try) 2>&5
36217   ac_status=$?
36218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36219   (exit $ac_status); }; }; then
36220   ac_header_compiler=yes
36221 else
36222   echo "$as_me: failed program was:" >&5
36223 sed 's/^/| /' conftest.$ac_ext >&5
36224
36225 ac_header_compiler=no
36226 fi
36227 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36228 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
36229 echo "${ECHO_T}$ac_header_compiler" >&6
36230
36231 # Is the header present?
36232 echo "$as_me:$LINENO: checking $ac_header presence" >&5
36233 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
36234 cat >conftest.$ac_ext <<_ACEOF
36235 /* confdefs.h.  */
36236 _ACEOF
36237 cat confdefs.h >>conftest.$ac_ext
36238 cat >>conftest.$ac_ext <<_ACEOF
36239 /* end confdefs.h.  */
36240 #include <$ac_header>
36241 _ACEOF
36242 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
36243   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
36244   ac_status=$?
36245   grep -v '^ *+' conftest.er1 >conftest.err
36246   rm -f conftest.er1
36247   cat conftest.err >&5
36248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36249   (exit $ac_status); } >/dev/null; then
36250   if test -s conftest.err; then
36251     ac_cpp_err=$ac_c_preproc_warn_flag
36252     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
36253   else
36254     ac_cpp_err=
36255   fi
36256 else
36257   ac_cpp_err=yes
36258 fi
36259 if test -z "$ac_cpp_err"; then
36260   ac_header_preproc=yes
36261 else
36262   echo "$as_me: failed program was:" >&5
36263 sed 's/^/| /' conftest.$ac_ext >&5
36264
36265   ac_header_preproc=no
36266 fi
36267 rm -f conftest.err conftest.$ac_ext
36268 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
36269 echo "${ECHO_T}$ac_header_preproc" >&6
36270
36271 # So?  What about this header?
36272 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
36273   yes:no: )
36274     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
36275 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
36276     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
36277 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
36278     ac_header_preproc=yes
36279     ;;
36280   no:yes:* )
36281     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
36282 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
36283     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
36284 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
36285     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
36286 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
36287     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
36288 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
36289     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
36290 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
36291     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
36292 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
36293     (
36294       cat <<\_ASBOX
36295 ## --------------------------------------------- ##
36296 ## Report this to <http://www.openldap.org/its/> ##
36297 ## --------------------------------------------- ##
36298 _ASBOX
36299     ) |
36300       sed "s/^/$as_me: WARNING:     /" >&2
36301     ;;
36302 esac
36303 echo "$as_me:$LINENO: checking for $ac_header" >&5
36304 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36305 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36306   echo $ECHO_N "(cached) $ECHO_C" >&6
36307 else
36308   eval "$as_ac_Header=\$ac_header_preproc"
36309 fi
36310 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36311 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36312
36313 fi
36314 if test `eval echo '${'$as_ac_Header'}'` = yes; then
36315   cat >>confdefs.h <<_ACEOF
36316 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
36317 _ACEOF
36318
36319                 echo "$as_me:$LINENO: checking for TCP wrappers library" >&5
36320 echo $ECHO_N "checking for TCP wrappers library... $ECHO_C" >&6
36321                 save_LIBS="$LIBS"
36322                 LIBS="$LIBS -lwrap"
36323                 cat >conftest.$ac_ext <<_ACEOF
36324 /* confdefs.h.  */
36325 _ACEOF
36326 cat confdefs.h >>conftest.$ac_ext
36327 cat >>conftest.$ac_ext <<_ACEOF
36328 /* end confdefs.h.  */
36329
36330 #include <tcpd.h>
36331 int allow_severity = 0;
36332 int deny_severity  = 0;
36333
36334 struct request_info *req;
36335
36336 int
36337 main ()
36338 {
36339
36340 hosts_access(req)
36341
36342   ;
36343   return 0;
36344 }
36345 _ACEOF
36346 rm -f conftest.$ac_objext conftest$ac_exeext
36347 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36348   (eval $ac_link) 2>conftest.er1
36349   ac_status=$?
36350   grep -v '^ *+' conftest.er1 >conftest.err
36351   rm -f conftest.er1
36352   cat conftest.err >&5
36353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36354   (exit $ac_status); } &&
36355          { ac_try='test -z "$ac_c_werror_flag"
36356                          || test ! -s conftest.err'
36357   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36358   (eval $ac_try) 2>&5
36359   ac_status=$?
36360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36361   (exit $ac_status); }; } &&
36362          { ac_try='test -s conftest$ac_exeext'
36363   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36364   (eval $ac_try) 2>&5
36365   ac_status=$?
36366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36367   (exit $ac_status); }; }; then
36368   echo "$as_me:$LINENO: result: -lwrap" >&5
36369 echo "${ECHO_T}-lwrap" >&6
36370                 have_wrappers=yes
36371                 LIBS="$save_LIBS"
36372 else
36373   echo "$as_me: failed program was:" >&5
36374 sed 's/^/| /' conftest.$ac_ext >&5
36375
36376
36377                                 LIBS="$LIBS -lnsl"
36378                 cat >conftest.$ac_ext <<_ACEOF
36379 /* confdefs.h.  */
36380 _ACEOF
36381 cat confdefs.h >>conftest.$ac_ext
36382 cat >>conftest.$ac_ext <<_ACEOF
36383 /* end confdefs.h.  */
36384
36385 #include <tcpd.h>
36386 int allow_severity = 0;
36387 int deny_severity  = 0;
36388
36389 struct request_info *req;
36390
36391 int
36392 main ()
36393 {
36394
36395 hosts_access(req)
36396
36397   ;
36398   return 0;
36399 }
36400 _ACEOF
36401 rm -f conftest.$ac_objext conftest$ac_exeext
36402 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36403   (eval $ac_link) 2>conftest.er1
36404   ac_status=$?
36405   grep -v '^ *+' conftest.er1 >conftest.err
36406   rm -f conftest.er1
36407   cat conftest.err >&5
36408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36409   (exit $ac_status); } &&
36410          { ac_try='test -z "$ac_c_werror_flag"
36411                          || test ! -s conftest.err'
36412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36413   (eval $ac_try) 2>&5
36414   ac_status=$?
36415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36416   (exit $ac_status); }; } &&
36417          { ac_try='test -s conftest$ac_exeext'
36418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36419   (eval $ac_try) 2>&5
36420   ac_status=$?
36421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36422   (exit $ac_status); }; }; then
36423   echo "$as_me:$LINENO: result: -lwrap -lnsl" >&5
36424 echo "${ECHO_T}-lwrap -lnsl" >&6
36425                 have_wrappers=yes
36426                 LIBS="$save_LIBS -lnsl"
36427 else
36428   echo "$as_me: failed program was:" >&5
36429 sed 's/^/| /' conftest.$ac_ext >&5
36430
36431
36432                 echo "$as_me:$LINENO: result: no" >&5
36433 echo "${ECHO_T}no" >&6
36434                 have_wrappers=no
36435                 LIBS=$save_LIBS
36436 fi
36437 rm -f conftest.err conftest.$ac_objext \
36438       conftest$ac_exeext conftest.$ac_ext
36439 fi
36440 rm -f conftest.err conftest.$ac_objext \
36441       conftest$ac_exeext conftest.$ac_ext
36442 else
36443   have_wrappers=no
36444 fi
36445
36446 done
36447
36448
36449         if test $have_wrappers = yes ; then
36450
36451 cat >>confdefs.h <<\_ACEOF
36452 #define HAVE_TCPD 1
36453 _ACEOF
36454
36455                 WRAP_LIBS="-lwrap"
36456         elif test $ol_enable_wrappers = yes ; then
36457                 { { echo "$as_me:$LINENO: error: could not find TCP wrappers, select apppropriate options or disable" >&5
36458 echo "$as_me: error: could not find TCP wrappers, select apppropriate options or disable" >&2;}
36459    { (exit 1); exit 1; }; }
36460         else
36461                 { echo "$as_me:$LINENO: WARNING: could not find TCP wrappers, support disabled" >&5
36462 echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
36463                 WRAP_LIBS=""
36464         fi
36465 fi
36466
36467 if test $ol_enable_syslog != no ; then
36468         echo "$as_me:$LINENO: checking for openlog" >&5
36469 echo $ECHO_N "checking for openlog... $ECHO_C" >&6
36470 if test "${ac_cv_func_openlog+set}" = set; then
36471   echo $ECHO_N "(cached) $ECHO_C" >&6
36472 else
36473   cat >conftest.$ac_ext <<_ACEOF
36474 /* confdefs.h.  */
36475 _ACEOF
36476 cat confdefs.h >>conftest.$ac_ext
36477 cat >>conftest.$ac_ext <<_ACEOF
36478 /* end confdefs.h.  */
36479 /* Define openlog to an innocuous variant, in case <limits.h> declares openlog.
36480    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
36481 #define openlog innocuous_openlog
36482
36483 /* System header to define __stub macros and hopefully few prototypes,
36484     which can conflict with char openlog (); below.
36485     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36486     <limits.h> exists even on freestanding compilers.  */
36487
36488 #ifdef __STDC__
36489 # include <limits.h>
36490 #else
36491 # include <assert.h>
36492 #endif
36493
36494 #undef openlog
36495
36496 /* Override any gcc2 internal prototype to avoid an error.  */
36497 #ifdef __cplusplus
36498 extern "C"
36499 {
36500 #endif
36501 /* We use char because int might match the return type of a gcc2
36502    builtin and then its argument prototype would still apply.  */
36503 char openlog ();
36504 /* The GNU C library defines this for functions which it implements
36505     to always fail with ENOSYS.  Some functions are actually named
36506     something starting with __ and the normal name is an alias.  */
36507 #if defined (__stub_openlog) || defined (__stub___openlog)
36508 choke me
36509 #else
36510 char (*f) () = openlog;
36511 #endif
36512 #ifdef __cplusplus
36513 }
36514 #endif
36515
36516 int
36517 main ()
36518 {
36519 return f != openlog;
36520   ;
36521   return 0;
36522 }
36523 _ACEOF
36524 rm -f conftest.$ac_objext conftest$ac_exeext
36525 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36526   (eval $ac_link) 2>conftest.er1
36527   ac_status=$?
36528   grep -v '^ *+' conftest.er1 >conftest.err
36529   rm -f conftest.er1
36530   cat conftest.err >&5
36531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36532   (exit $ac_status); } &&
36533          { ac_try='test -z "$ac_c_werror_flag"
36534                          || test ! -s conftest.err'
36535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36536   (eval $ac_try) 2>&5
36537   ac_status=$?
36538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36539   (exit $ac_status); }; } &&
36540          { ac_try='test -s conftest$ac_exeext'
36541   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36542   (eval $ac_try) 2>&5
36543   ac_status=$?
36544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36545   (exit $ac_status); }; }; then
36546   ac_cv_func_openlog=yes
36547 else
36548   echo "$as_me: failed program was:" >&5
36549 sed 's/^/| /' conftest.$ac_ext >&5
36550
36551 ac_cv_func_openlog=no
36552 fi
36553 rm -f conftest.err conftest.$ac_objext \
36554       conftest$ac_exeext conftest.$ac_ext
36555 fi
36556 echo "$as_me:$LINENO: result: $ac_cv_func_openlog" >&5
36557 echo "${ECHO_T}$ac_cv_func_openlog" >&6
36558
36559         if test $ac_cv_func_openlog = no && test $ol_enable_syslog = yes; then
36560                 { { echo "$as_me:$LINENO: error: could not find syslog" >&5
36561 echo "$as_me: error: could not find syslog" >&2;}
36562    { (exit select appropriate options or disable); exit select appropriate options or disable; }; }
36563         fi
36564         ol_enable_syslog=$ac_cv_func_openlog
36565 fi
36566
36567 ol_link_sql=no
36568 if test $ol_enable_sql != no ; then
36569
36570
36571 for ac_header in sql.h sqlext.h
36572 do
36573 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
36574 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36575   echo "$as_me:$LINENO: checking for $ac_header" >&5
36576 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36577 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36578   echo $ECHO_N "(cached) $ECHO_C" >&6
36579 fi
36580 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36581 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36582 else
36583   # Is the header compilable?
36584 echo "$as_me:$LINENO: checking $ac_header usability" >&5
36585 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
36586 cat >conftest.$ac_ext <<_ACEOF
36587 /* confdefs.h.  */
36588 _ACEOF
36589 cat confdefs.h >>conftest.$ac_ext
36590 cat >>conftest.$ac_ext <<_ACEOF
36591 /* end confdefs.h.  */
36592 $ac_includes_default
36593 #include <$ac_header>
36594 _ACEOF
36595 rm -f conftest.$ac_objext
36596 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36597   (eval $ac_compile) 2>conftest.er1
36598   ac_status=$?
36599   grep -v '^ *+' conftest.er1 >conftest.err
36600   rm -f conftest.er1
36601   cat conftest.err >&5
36602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36603   (exit $ac_status); } &&
36604          { ac_try='test -z "$ac_c_werror_flag"
36605                          || test ! -s conftest.err'
36606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36607   (eval $ac_try) 2>&5
36608   ac_status=$?
36609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36610   (exit $ac_status); }; } &&
36611          { ac_try='test -s conftest.$ac_objext'
36612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36613   (eval $ac_try) 2>&5
36614   ac_status=$?
36615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36616   (exit $ac_status); }; }; then
36617   ac_header_compiler=yes
36618 else
36619   echo "$as_me: failed program was:" >&5
36620 sed 's/^/| /' conftest.$ac_ext >&5
36621
36622 ac_header_compiler=no
36623 fi
36624 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36625 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
36626 echo "${ECHO_T}$ac_header_compiler" >&6
36627
36628 # Is the header present?
36629 echo "$as_me:$LINENO: checking $ac_header presence" >&5
36630 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
36631 cat >conftest.$ac_ext <<_ACEOF
36632 /* confdefs.h.  */
36633 _ACEOF
36634 cat confdefs.h >>conftest.$ac_ext
36635 cat >>conftest.$ac_ext <<_ACEOF
36636 /* end confdefs.h.  */
36637 #include <$ac_header>
36638 _ACEOF
36639 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
36640   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
36641   ac_status=$?
36642   grep -v '^ *+' conftest.er1 >conftest.err
36643   rm -f conftest.er1
36644   cat conftest.err >&5
36645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36646   (exit $ac_status); } >/dev/null; then
36647   if test -s conftest.err; then
36648     ac_cpp_err=$ac_c_preproc_warn_flag
36649     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
36650   else
36651     ac_cpp_err=
36652   fi
36653 else
36654   ac_cpp_err=yes
36655 fi
36656 if test -z "$ac_cpp_err"; then
36657   ac_header_preproc=yes
36658 else
36659   echo "$as_me: failed program was:" >&5
36660 sed 's/^/| /' conftest.$ac_ext >&5
36661
36662   ac_header_preproc=no
36663 fi
36664 rm -f conftest.err conftest.$ac_ext
36665 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
36666 echo "${ECHO_T}$ac_header_preproc" >&6
36667
36668 # So?  What about this header?
36669 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
36670   yes:no: )
36671     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
36672 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
36673     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
36674 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
36675     ac_header_preproc=yes
36676     ;;
36677   no:yes:* )
36678     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
36679 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
36680     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
36681 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
36682     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
36683 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
36684     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
36685 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
36686     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
36687 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
36688     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
36689 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
36690     (
36691       cat <<\_ASBOX
36692 ## --------------------------------------------- ##
36693 ## Report this to <http://www.openldap.org/its/> ##
36694 ## --------------------------------------------- ##
36695 _ASBOX
36696     ) |
36697       sed "s/^/$as_me: WARNING:     /" >&2
36698     ;;
36699 esac
36700 echo "$as_me:$LINENO: checking for $ac_header" >&5
36701 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36702 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36703   echo $ECHO_N "(cached) $ECHO_C" >&6
36704 else
36705   eval "$as_ac_Header=\$ac_header_preproc"
36706 fi
36707 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36708 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36709
36710 fi
36711 if test `eval echo '${'$as_ac_Header'}'` = yes; then
36712   cat >>confdefs.h <<_ACEOF
36713 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
36714 _ACEOF
36715
36716 else
36717
36718                 { { echo "$as_me:$LINENO: error: could not locate SQL headers" >&5
36719 echo "$as_me: error: could not locate SQL headers" >&2;}
36720    { (exit 1); exit 1; }; }
36721
36722 fi
36723
36724 done
36725
36726
36727         sql_LIBS="$LIBS"
36728         LIBS="$LTHREAD_LIBS"
36729
36730         echo "$as_me:$LINENO: checking for SQLDriverConnect in -liodbc" >&5
36731 echo $ECHO_N "checking for SQLDriverConnect in -liodbc... $ECHO_C" >&6
36732 if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then
36733   echo $ECHO_N "(cached) $ECHO_C" >&6
36734 else
36735   ac_check_lib_save_LIBS=$LIBS
36736 LIBS="-liodbc  $LIBS"
36737 cat >conftest.$ac_ext <<_ACEOF
36738 /* confdefs.h.  */
36739 _ACEOF
36740 cat confdefs.h >>conftest.$ac_ext
36741 cat >>conftest.$ac_ext <<_ACEOF
36742 /* end confdefs.h.  */
36743
36744 /* Override any gcc2 internal prototype to avoid an error.  */
36745 #ifdef __cplusplus
36746 extern "C"
36747 #endif
36748 /* We use char because int might match the return type of a gcc2
36749    builtin and then its argument prototype would still apply.  */
36750 char SQLDriverConnect ();
36751 int
36752 main ()
36753 {
36754 SQLDriverConnect ();
36755   ;
36756   return 0;
36757 }
36758 _ACEOF
36759 rm -f conftest.$ac_objext conftest$ac_exeext
36760 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36761   (eval $ac_link) 2>conftest.er1
36762   ac_status=$?
36763   grep -v '^ *+' conftest.er1 >conftest.err
36764   rm -f conftest.er1
36765   cat conftest.err >&5
36766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36767   (exit $ac_status); } &&
36768          { ac_try='test -z "$ac_c_werror_flag"
36769                          || test ! -s conftest.err'
36770   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36771   (eval $ac_try) 2>&5
36772   ac_status=$?
36773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36774   (exit $ac_status); }; } &&
36775          { ac_try='test -s conftest$ac_exeext'
36776   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36777   (eval $ac_try) 2>&5
36778   ac_status=$?
36779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36780   (exit $ac_status); }; }; then
36781   ac_cv_lib_iodbc_SQLDriverConnect=yes
36782 else
36783   echo "$as_me: failed program was:" >&5
36784 sed 's/^/| /' conftest.$ac_ext >&5
36785
36786 ac_cv_lib_iodbc_SQLDriverConnect=no
36787 fi
36788 rm -f conftest.err conftest.$ac_objext \
36789       conftest$ac_exeext conftest.$ac_ext
36790 LIBS=$ac_check_lib_save_LIBS
36791 fi
36792 echo "$as_me:$LINENO: result: $ac_cv_lib_iodbc_SQLDriverConnect" >&5
36793 echo "${ECHO_T}$ac_cv_lib_iodbc_SQLDriverConnect" >&6
36794 if test $ac_cv_lib_iodbc_SQLDriverConnect = yes; then
36795   have_iodbc=yes
36796 else
36797   have_iodbc=no
36798 fi
36799
36800         if test $have_iodbc = yes ; then
36801                 ol_link_sql="-liodbc"
36802         else
36803                 echo "$as_me:$LINENO: checking for SQLDriverConnect in -lodbc" >&5
36804 echo $ECHO_N "checking for SQLDriverConnect in -lodbc... $ECHO_C" >&6
36805 if test "${ac_cv_lib_odbc_SQLDriverConnect+set}" = set; then
36806   echo $ECHO_N "(cached) $ECHO_C" >&6
36807 else
36808   ac_check_lib_save_LIBS=$LIBS
36809 LIBS="-lodbc  $LIBS"
36810 cat >conftest.$ac_ext <<_ACEOF
36811 /* confdefs.h.  */
36812 _ACEOF
36813 cat confdefs.h >>conftest.$ac_ext
36814 cat >>conftest.$ac_ext <<_ACEOF
36815 /* end confdefs.h.  */
36816
36817 /* Override any gcc2 internal prototype to avoid an error.  */
36818 #ifdef __cplusplus
36819 extern "C"
36820 #endif
36821 /* We use char because int might match the return type of a gcc2
36822    builtin and then its argument prototype would still apply.  */
36823 char SQLDriverConnect ();
36824 int
36825 main ()
36826 {
36827 SQLDriverConnect ();
36828   ;
36829   return 0;
36830 }
36831 _ACEOF
36832 rm -f conftest.$ac_objext conftest$ac_exeext
36833 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36834   (eval $ac_link) 2>conftest.er1
36835   ac_status=$?
36836   grep -v '^ *+' conftest.er1 >conftest.err
36837   rm -f conftest.er1
36838   cat conftest.err >&5
36839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36840   (exit $ac_status); } &&
36841          { ac_try='test -z "$ac_c_werror_flag"
36842                          || test ! -s conftest.err'
36843   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36844   (eval $ac_try) 2>&5
36845   ac_status=$?
36846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36847   (exit $ac_status); }; } &&
36848          { ac_try='test -s conftest$ac_exeext'
36849   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36850   (eval $ac_try) 2>&5
36851   ac_status=$?
36852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36853   (exit $ac_status); }; }; then
36854   ac_cv_lib_odbc_SQLDriverConnect=yes
36855 else
36856   echo "$as_me: failed program was:" >&5
36857 sed 's/^/| /' conftest.$ac_ext >&5
36858
36859 ac_cv_lib_odbc_SQLDriverConnect=no
36860 fi
36861 rm -f conftest.err conftest.$ac_objext \
36862       conftest$ac_exeext conftest.$ac_ext
36863 LIBS=$ac_check_lib_save_LIBS
36864 fi
36865 echo "$as_me:$LINENO: result: $ac_cv_lib_odbc_SQLDriverConnect" >&5
36866 echo "${ECHO_T}$ac_cv_lib_odbc_SQLDriverConnect" >&6
36867 if test $ac_cv_lib_odbc_SQLDriverConnect = yes; then
36868   have_odbc=yes
36869 else
36870   have_odbc=no
36871 fi
36872
36873                 if test $have_odbc = yes ; then
36874                         ol_link_sql="-lodbc"
36875                 fi
36876         fi
36877
36878         LIBS="$sql_LIBS"
36879
36880         if test $ol_link_sql != no ; then
36881                 SLAPD_SQL_LIBS="$ol_link_sql"
36882
36883         elif test $ol_enable_sql != auto ; then
36884                 { { echo "$as_me:$LINENO: error: could not locate suitable ODBC library" >&5
36885 echo "$as_me: error: could not locate suitable ODBC library" >&2;}
36886    { (exit 1); exit 1; }; }
36887         fi
36888 fi
36889
36890 ol_icu=no
36891
36892 for ac_header in unicode/utypes.h
36893 do
36894 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
36895 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36896   echo "$as_me:$LINENO: checking for $ac_header" >&5
36897 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36898 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36899   echo $ECHO_N "(cached) $ECHO_C" >&6
36900 fi
36901 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36902 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36903 else
36904   # Is the header compilable?
36905 echo "$as_me:$LINENO: checking $ac_header usability" >&5
36906 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
36907 cat >conftest.$ac_ext <<_ACEOF
36908 /* confdefs.h.  */
36909 _ACEOF
36910 cat confdefs.h >>conftest.$ac_ext
36911 cat >>conftest.$ac_ext <<_ACEOF
36912 /* end confdefs.h.  */
36913 $ac_includes_default
36914 #include <$ac_header>
36915 _ACEOF
36916 rm -f conftest.$ac_objext
36917 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36918   (eval $ac_compile) 2>conftest.er1
36919   ac_status=$?
36920   grep -v '^ *+' conftest.er1 >conftest.err
36921   rm -f conftest.er1
36922   cat conftest.err >&5
36923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36924   (exit $ac_status); } &&
36925          { ac_try='test -z "$ac_c_werror_flag"
36926                          || test ! -s conftest.err'
36927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36928   (eval $ac_try) 2>&5
36929   ac_status=$?
36930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36931   (exit $ac_status); }; } &&
36932          { ac_try='test -s conftest.$ac_objext'
36933   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36934   (eval $ac_try) 2>&5
36935   ac_status=$?
36936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36937   (exit $ac_status); }; }; then
36938   ac_header_compiler=yes
36939 else
36940   echo "$as_me: failed program was:" >&5
36941 sed 's/^/| /' conftest.$ac_ext >&5
36942
36943 ac_header_compiler=no
36944 fi
36945 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36946 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
36947 echo "${ECHO_T}$ac_header_compiler" >&6
36948
36949 # Is the header present?
36950 echo "$as_me:$LINENO: checking $ac_header presence" >&5
36951 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
36952 cat >conftest.$ac_ext <<_ACEOF
36953 /* confdefs.h.  */
36954 _ACEOF
36955 cat confdefs.h >>conftest.$ac_ext
36956 cat >>conftest.$ac_ext <<_ACEOF
36957 /* end confdefs.h.  */
36958 #include <$ac_header>
36959 _ACEOF
36960 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
36961   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
36962   ac_status=$?
36963   grep -v '^ *+' conftest.er1 >conftest.err
36964   rm -f conftest.er1
36965   cat conftest.err >&5
36966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36967   (exit $ac_status); } >/dev/null; then
36968   if test -s conftest.err; then
36969     ac_cpp_err=$ac_c_preproc_warn_flag
36970     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
36971   else
36972     ac_cpp_err=
36973   fi
36974 else
36975   ac_cpp_err=yes
36976 fi
36977 if test -z "$ac_cpp_err"; then
36978   ac_header_preproc=yes
36979 else
36980   echo "$as_me: failed program was:" >&5
36981 sed 's/^/| /' conftest.$ac_ext >&5
36982
36983   ac_header_preproc=no
36984 fi
36985 rm -f conftest.err conftest.$ac_ext
36986 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
36987 echo "${ECHO_T}$ac_header_preproc" >&6
36988
36989 # So?  What about this header?
36990 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
36991   yes:no: )
36992     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
36993 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
36994     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
36995 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
36996     ac_header_preproc=yes
36997     ;;
36998   no:yes:* )
36999     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
37000 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
37001     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
37002 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
37003     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
37004 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
37005     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
37006 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
37007     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
37008 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
37009     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
37010 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
37011     (
37012       cat <<\_ASBOX
37013 ## --------------------------------------------- ##
37014 ## Report this to <http://www.openldap.org/its/> ##
37015 ## --------------------------------------------- ##
37016 _ASBOX
37017     ) |
37018       sed "s/^/$as_me: WARNING:     /" >&2
37019     ;;
37020 esac
37021 echo "$as_me:$LINENO: checking for $ac_header" >&5
37022 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37023 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37024   echo $ECHO_N "(cached) $ECHO_C" >&6
37025 else
37026   eval "$as_ac_Header=\$ac_header_preproc"
37027 fi
37028 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37029 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37030
37031 fi
37032 if test `eval echo '${'$as_ac_Header'}'` = yes; then
37033   cat >>confdefs.h <<_ACEOF
37034 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
37035 _ACEOF
37036
37037 fi
37038
37039 done
37040
37041 if test $ac_cv_header_unicode_utypes_h = yes ; then
37042                 OL_ICULIBS="-licuuc -licudata"
37043
37044         echo "$as_me:$LINENO: checking for ICU libraries" >&5
37045 echo $ECHO_N "checking for ICU libraries... $ECHO_C" >&6
37046 if test "${ol_cv_lib_icu+set}" = set; then
37047   echo $ECHO_N "(cached) $ECHO_C" >&6
37048 else
37049
37050                 ol_LIBS="$LIBS"
37051                 LIBS="$OL_ICULIBS $LIBS"
37052                 cat >conftest.$ac_ext <<_ACEOF
37053 /* confdefs.h.  */
37054 _ACEOF
37055 cat confdefs.h >>conftest.$ac_ext
37056 cat >>conftest.$ac_ext <<_ACEOF
37057 /* end confdefs.h.  */
37058
37059 #include <unicode/utypes.h>
37060
37061 int
37062 main ()
37063 {
37064
37065 (void) u_errorName(0);
37066
37067   ;
37068   return 0;
37069 }
37070 _ACEOF
37071 rm -f conftest.$ac_objext conftest$ac_exeext
37072 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37073   (eval $ac_link) 2>conftest.er1
37074   ac_status=$?
37075   grep -v '^ *+' conftest.er1 >conftest.err
37076   rm -f conftest.er1
37077   cat conftest.err >&5
37078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37079   (exit $ac_status); } &&
37080          { ac_try='test -z "$ac_c_werror_flag"
37081                          || test ! -s conftest.err'
37082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37083   (eval $ac_try) 2>&5
37084   ac_status=$?
37085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37086   (exit $ac_status); }; } &&
37087          { ac_try='test -s conftest$ac_exeext'
37088   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37089   (eval $ac_try) 2>&5
37090   ac_status=$?
37091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37092   (exit $ac_status); }; }; then
37093   ol_cv_lib_icu=yes
37094 else
37095   echo "$as_me: failed program was:" >&5
37096 sed 's/^/| /' conftest.$ac_ext >&5
37097
37098 ol_cv_lib_icu=no
37099 fi
37100 rm -f conftest.err conftest.$ac_objext \
37101       conftest$ac_exeext conftest.$ac_ext
37102                 LIBS="$ol_LIBS"
37103
37104 fi
37105 echo "$as_me:$LINENO: result: $ol_cv_lib_icu" >&5
37106 echo "${ECHO_T}$ol_cv_lib_icu" >&6
37107
37108         if test $ol_cv_lib_icu != no ; then
37109                 ol_icu="$OL_ICULIBS"
37110
37111 cat >>confdefs.h <<\_ACEOF
37112 #define HAVE_ICU 1
37113 _ACEOF
37114
37115         fi
37116 fi
37117
37118 if test "$ol_icu" = no ; then
37119         { echo "$as_me:$LINENO: WARNING: ICU not available" >&5
37120 echo "$as_me: WARNING: ICU not available" >&2;}
37121 else
37122         ICU_LIBS="$ol_icu"
37123 fi
37124 WITH_SASL=no
37125 ol_link_sasl=no
37126 ol_link_spasswd=no
37127 if test $ol_with_cyrus_sasl != no ; then
37128
37129
37130 for ac_header in sasl/sasl.h sasl.h
37131 do
37132 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
37133 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37134   echo "$as_me:$LINENO: checking for $ac_header" >&5
37135 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37136 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37137   echo $ECHO_N "(cached) $ECHO_C" >&6
37138 fi
37139 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37140 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37141 else
37142   # Is the header compilable?
37143 echo "$as_me:$LINENO: checking $ac_header usability" >&5
37144 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
37145 cat >conftest.$ac_ext <<_ACEOF
37146 /* confdefs.h.  */
37147 _ACEOF
37148 cat confdefs.h >>conftest.$ac_ext
37149 cat >>conftest.$ac_ext <<_ACEOF
37150 /* end confdefs.h.  */
37151 $ac_includes_default
37152 #include <$ac_header>
37153 _ACEOF
37154 rm -f conftest.$ac_objext
37155 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37156   (eval $ac_compile) 2>conftest.er1
37157   ac_status=$?
37158   grep -v '^ *+' conftest.er1 >conftest.err
37159   rm -f conftest.er1
37160   cat conftest.err >&5
37161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37162   (exit $ac_status); } &&
37163          { ac_try='test -z "$ac_c_werror_flag"
37164                          || test ! -s conftest.err'
37165   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37166   (eval $ac_try) 2>&5
37167   ac_status=$?
37168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37169   (exit $ac_status); }; } &&
37170          { ac_try='test -s conftest.$ac_objext'
37171   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37172   (eval $ac_try) 2>&5
37173   ac_status=$?
37174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37175   (exit $ac_status); }; }; then
37176   ac_header_compiler=yes
37177 else
37178   echo "$as_me: failed program was:" >&5
37179 sed 's/^/| /' conftest.$ac_ext >&5
37180
37181 ac_header_compiler=no
37182 fi
37183 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37184 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
37185 echo "${ECHO_T}$ac_header_compiler" >&6
37186
37187 # Is the header present?
37188 echo "$as_me:$LINENO: checking $ac_header presence" >&5
37189 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
37190 cat >conftest.$ac_ext <<_ACEOF
37191 /* confdefs.h.  */
37192 _ACEOF
37193 cat confdefs.h >>conftest.$ac_ext
37194 cat >>conftest.$ac_ext <<_ACEOF
37195 /* end confdefs.h.  */
37196 #include <$ac_header>
37197 _ACEOF
37198 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
37199   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
37200   ac_status=$?
37201   grep -v '^ *+' conftest.er1 >conftest.err
37202   rm -f conftest.er1
37203   cat conftest.err >&5
37204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37205   (exit $ac_status); } >/dev/null; then
37206   if test -s conftest.err; then
37207     ac_cpp_err=$ac_c_preproc_warn_flag
37208     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
37209   else
37210     ac_cpp_err=
37211   fi
37212 else
37213   ac_cpp_err=yes
37214 fi
37215 if test -z "$ac_cpp_err"; then
37216   ac_header_preproc=yes
37217 else
37218   echo "$as_me: failed program was:" >&5
37219 sed 's/^/| /' conftest.$ac_ext >&5
37220
37221   ac_header_preproc=no
37222 fi
37223 rm -f conftest.err conftest.$ac_ext
37224 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
37225 echo "${ECHO_T}$ac_header_preproc" >&6
37226
37227 # So?  What about this header?
37228 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
37229   yes:no: )
37230     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
37231 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
37232     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
37233 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
37234     ac_header_preproc=yes
37235     ;;
37236   no:yes:* )
37237     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
37238 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
37239     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
37240 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
37241     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
37242 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
37243     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
37244 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
37245     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
37246 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
37247     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
37248 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
37249     (
37250       cat <<\_ASBOX
37251 ## --------------------------------------------- ##
37252 ## Report this to <http://www.openldap.org/its/> ##
37253 ## --------------------------------------------- ##
37254 _ASBOX
37255     ) |
37256       sed "s/^/$as_me: WARNING:     /" >&2
37257     ;;
37258 esac
37259 echo "$as_me:$LINENO: checking for $ac_header" >&5
37260 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37261 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37262   echo $ECHO_N "(cached) $ECHO_C" >&6
37263 else
37264   eval "$as_ac_Header=\$ac_header_preproc"
37265 fi
37266 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37267 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37268
37269 fi
37270 if test `eval echo '${'$as_ac_Header'}'` = yes; then
37271   cat >>confdefs.h <<_ACEOF
37272 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
37273 _ACEOF
37274
37275 fi
37276
37277 done
37278
37279
37280         if test $ac_cv_header_sasl_sasl_h = yes ||
37281            test $ac_cv_header_sasl_h = yes; then
37282                 echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl2" >&5
37283 echo $ECHO_N "checking for sasl_client_init in -lsasl2... $ECHO_C" >&6
37284 if test "${ac_cv_lib_sasl2_sasl_client_init+set}" = set; then
37285   echo $ECHO_N "(cached) $ECHO_C" >&6
37286 else
37287   ac_check_lib_save_LIBS=$LIBS
37288 LIBS="-lsasl2  $LIBS"
37289 cat >conftest.$ac_ext <<_ACEOF
37290 /* confdefs.h.  */
37291 _ACEOF
37292 cat confdefs.h >>conftest.$ac_ext
37293 cat >>conftest.$ac_ext <<_ACEOF
37294 /* end confdefs.h.  */
37295
37296 /* Override any gcc2 internal prototype to avoid an error.  */
37297 #ifdef __cplusplus
37298 extern "C"
37299 #endif
37300 /* We use char because int might match the return type of a gcc2
37301    builtin and then its argument prototype would still apply.  */
37302 char sasl_client_init ();
37303 int
37304 main ()
37305 {
37306 sasl_client_init ();
37307   ;
37308   return 0;
37309 }
37310 _ACEOF
37311 rm -f conftest.$ac_objext conftest$ac_exeext
37312 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37313   (eval $ac_link) 2>conftest.er1
37314   ac_status=$?
37315   grep -v '^ *+' conftest.er1 >conftest.err
37316   rm -f conftest.er1
37317   cat conftest.err >&5
37318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37319   (exit $ac_status); } &&
37320          { ac_try='test -z "$ac_c_werror_flag"
37321                          || test ! -s conftest.err'
37322   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37323   (eval $ac_try) 2>&5
37324   ac_status=$?
37325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37326   (exit $ac_status); }; } &&
37327          { ac_try='test -s conftest$ac_exeext'
37328   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37329   (eval $ac_try) 2>&5
37330   ac_status=$?
37331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37332   (exit $ac_status); }; }; then
37333   ac_cv_lib_sasl2_sasl_client_init=yes
37334 else
37335   echo "$as_me: failed program was:" >&5
37336 sed 's/^/| /' conftest.$ac_ext >&5
37337
37338 ac_cv_lib_sasl2_sasl_client_init=no
37339 fi
37340 rm -f conftest.err conftest.$ac_objext \
37341       conftest$ac_exeext conftest.$ac_ext
37342 LIBS=$ac_check_lib_save_LIBS
37343 fi
37344 echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_sasl_client_init" >&5
37345 echo "${ECHO_T}$ac_cv_lib_sasl2_sasl_client_init" >&6
37346 if test $ac_cv_lib_sasl2_sasl_client_init = yes; then
37347   ol_link_sasl="-lsasl2"
37348 else
37349   echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl" >&5
37350 echo $ECHO_N "checking for sasl_client_init in -lsasl... $ECHO_C" >&6
37351 if test "${ac_cv_lib_sasl_sasl_client_init+set}" = set; then
37352   echo $ECHO_N "(cached) $ECHO_C" >&6
37353 else
37354   ac_check_lib_save_LIBS=$LIBS
37355 LIBS="-lsasl  $LIBS"
37356 cat >conftest.$ac_ext <<_ACEOF
37357 /* confdefs.h.  */
37358 _ACEOF
37359 cat confdefs.h >>conftest.$ac_ext
37360 cat >>conftest.$ac_ext <<_ACEOF
37361 /* end confdefs.h.  */
37362
37363 /* Override any gcc2 internal prototype to avoid an error.  */
37364 #ifdef __cplusplus
37365 extern "C"
37366 #endif
37367 /* We use char because int might match the return type of a gcc2
37368    builtin and then its argument prototype would still apply.  */
37369 char sasl_client_init ();
37370 int
37371 main ()
37372 {
37373 sasl_client_init ();
37374   ;
37375   return 0;
37376 }
37377 _ACEOF
37378 rm -f conftest.$ac_objext conftest$ac_exeext
37379 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37380   (eval $ac_link) 2>conftest.er1
37381   ac_status=$?
37382   grep -v '^ *+' conftest.er1 >conftest.err
37383   rm -f conftest.er1
37384   cat conftest.err >&5
37385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37386   (exit $ac_status); } &&
37387          { ac_try='test -z "$ac_c_werror_flag"
37388                          || test ! -s conftest.err'
37389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37390   (eval $ac_try) 2>&5
37391   ac_status=$?
37392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37393   (exit $ac_status); }; } &&
37394          { ac_try='test -s conftest$ac_exeext'
37395   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37396   (eval $ac_try) 2>&5
37397   ac_status=$?
37398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37399   (exit $ac_status); }; }; then
37400   ac_cv_lib_sasl_sasl_client_init=yes
37401 else
37402   echo "$as_me: failed program was:" >&5
37403 sed 's/^/| /' conftest.$ac_ext >&5
37404
37405 ac_cv_lib_sasl_sasl_client_init=no
37406 fi
37407 rm -f conftest.err conftest.$ac_objext \
37408       conftest$ac_exeext conftest.$ac_ext
37409 LIBS=$ac_check_lib_save_LIBS
37410 fi
37411 echo "$as_me:$LINENO: result: $ac_cv_lib_sasl_sasl_client_init" >&5
37412 echo "${ECHO_T}$ac_cv_lib_sasl_sasl_client_init" >&6
37413 if test $ac_cv_lib_sasl_sasl_client_init = yes; then
37414   ol_link_sasl="-lsasl"
37415 fi
37416
37417 fi
37418
37419         fi
37420
37421         if test $ol_link_sasl = no ; then
37422                 if test $ol_with_cyrus_sasl != auto ; then
37423                         { { echo "$as_me:$LINENO: error: Could not locate Cyrus SASL" >&5
37424 echo "$as_me: error: Could not locate Cyrus SASL" >&2;}
37425    { (exit 1); exit 1; }; }
37426                 else
37427                         { echo "$as_me:$LINENO: WARNING: Could not locate Cyrus SASL" >&5
37428 echo "$as_me: WARNING: Could not locate Cyrus SASL" >&2;}
37429                         { echo "$as_me:$LINENO: WARNING: SASL authentication not supported!" >&5
37430 echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
37431                         if test $ol_link_tls = no ; then
37432                                 { echo "$as_me:$LINENO: WARNING: Strong authentication not supported!" >&5
37433 echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
37434                         fi
37435                 fi
37436         else
37437                 echo "$as_me:$LINENO: checking Cyrus SASL library version" >&5
37438 echo $ECHO_N "checking Cyrus SASL library version... $ECHO_C" >&6
37439 if test "${ol_cv_sasl_compat+set}" = set; then
37440   echo $ECHO_N "(cached) $ECHO_C" >&6
37441 else
37442
37443         cat >conftest.$ac_ext <<_ACEOF
37444 /* confdefs.h.  */
37445 _ACEOF
37446 cat confdefs.h >>conftest.$ac_ext
37447 cat >>conftest.$ac_ext <<_ACEOF
37448 /* end confdefs.h.  */
37449
37450 #ifdef HAVE_SASL_SASL_H
37451 #include <sasl/sasl.h>
37452 #else
37453 #include <sasl.h>
37454 #endif
37455
37456 /* Require 2.1.15+ */
37457 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
37458         char *__sasl_compat = "2.2+ or better okay (we guess)";
37459 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
37460         && SASL_VERSION_STEP >=15
37461         char *__sasl_compat = "2.1.15+ or better okay";
37462 #endif
37463
37464 _ACEOF
37465 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37466   $EGREP "__sasl_compat" >/dev/null 2>&1; then
37467   ol_cv_sasl_compat=yes
37468 else
37469   ol_cv_sasl_compat=no
37470 fi
37471 rm -f conftest*
37472
37473 fi
37474 echo "$as_me:$LINENO: result: $ol_cv_sasl_compat" >&5
37475 echo "${ECHO_T}$ol_cv_sasl_compat" >&6
37476
37477                 if test $ol_cv_sasl_compat = no ; then
37478                         ol_link_sasl=no
37479                         { { echo "$as_me:$LINENO: error: Cyrus SASL library located but is incompatible" >&5
37480 echo "$as_me: error: Cyrus SASL library located but is incompatible" >&2;}
37481    { (exit 1); exit 1; }; }
37482                 fi
37483
37484
37485 cat >>confdefs.h <<\_ACEOF
37486 #define HAVE_CYRUS_SASL 1
37487 _ACEOF
37488
37489                 SASL_LIBS="$ol_link_sasl"
37490                 if test $ol_enable_spasswd != no ; then
37491                         ol_link_spasswd=yes
37492                 fi
37493
37494                 ac_save_LIBS="$LIBS"
37495                 LIBS="$LIBS $ol_link_sasl"
37496                 echo "$as_me:$LINENO: checking for sasl_version" >&5
37497 echo $ECHO_N "checking for sasl_version... $ECHO_C" >&6
37498 if test "${ac_cv_func_sasl_version+set}" = set; then
37499   echo $ECHO_N "(cached) $ECHO_C" >&6
37500 else
37501   cat >conftest.$ac_ext <<_ACEOF
37502 /* confdefs.h.  */
37503 _ACEOF
37504 cat confdefs.h >>conftest.$ac_ext
37505 cat >>conftest.$ac_ext <<_ACEOF
37506 /* end confdefs.h.  */
37507 /* Define sasl_version to an innocuous variant, in case <limits.h> declares sasl_version.
37508    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
37509 #define sasl_version innocuous_sasl_version
37510
37511 /* System header to define __stub macros and hopefully few prototypes,
37512     which can conflict with char sasl_version (); below.
37513     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
37514     <limits.h> exists even on freestanding compilers.  */
37515
37516 #ifdef __STDC__
37517 # include <limits.h>
37518 #else
37519 # include <assert.h>
37520 #endif
37521
37522 #undef sasl_version
37523
37524 /* Override any gcc2 internal prototype to avoid an error.  */
37525 #ifdef __cplusplus
37526 extern "C"
37527 {
37528 #endif
37529 /* We use char because int might match the return type of a gcc2
37530    builtin and then its argument prototype would still apply.  */
37531 char sasl_version ();
37532 /* The GNU C library defines this for functions which it implements
37533     to always fail with ENOSYS.  Some functions are actually named
37534     something starting with __ and the normal name is an alias.  */
37535 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
37536 choke me
37537 #else
37538 char (*f) () = sasl_version;
37539 #endif
37540 #ifdef __cplusplus
37541 }
37542 #endif
37543
37544 int
37545 main ()
37546 {
37547 return f != sasl_version;
37548   ;
37549   return 0;
37550 }
37551 _ACEOF
37552 rm -f conftest.$ac_objext conftest$ac_exeext
37553 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37554   (eval $ac_link) 2>conftest.er1
37555   ac_status=$?
37556   grep -v '^ *+' conftest.er1 >conftest.err
37557   rm -f conftest.er1
37558   cat conftest.err >&5
37559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37560   (exit $ac_status); } &&
37561          { ac_try='test -z "$ac_c_werror_flag"
37562                          || test ! -s conftest.err'
37563   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37564   (eval $ac_try) 2>&5
37565   ac_status=$?
37566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37567   (exit $ac_status); }; } &&
37568          { ac_try='test -s conftest$ac_exeext'
37569   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37570   (eval $ac_try) 2>&5
37571   ac_status=$?
37572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37573   (exit $ac_status); }; }; then
37574   ac_cv_func_sasl_version=yes
37575 else
37576   echo "$as_me: failed program was:" >&5
37577 sed 's/^/| /' conftest.$ac_ext >&5
37578
37579 ac_cv_func_sasl_version=no
37580 fi
37581 rm -f conftest.err conftest.$ac_objext \
37582       conftest$ac_exeext conftest.$ac_ext
37583 fi
37584 echo "$as_me:$LINENO: result: $ac_cv_func_sasl_version" >&5
37585 echo "${ECHO_T}$ac_cv_func_sasl_version" >&6
37586 if test $ac_cv_func_sasl_version = yes; then
37587
37588 cat >>confdefs.h <<\_ACEOF
37589 #define HAVE_SASL_VERSION 1
37590 _ACEOF
37591
37592 fi
37593
37594                 LIBS="$ac_save_LIBS"
37595
37596                 WITH_SASL=yes
37597         fi
37598
37599 else
37600         { echo "$as_me:$LINENO: WARNING: SASL authentication not supported!" >&5
37601 echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
37602         if test $ol_link_tls = no ; then
37603                 { echo "$as_me:$LINENO: WARNING: Strong authentication not supported!" >&5
37604 echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
37605         fi
37606 fi
37607
37608 if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
37609         dev=no
37610         if test -r /dev/urandom ; then
37611                 dev="/dev/urandom";
37612         elif test -r /idev/urandom ; then
37613                 dev="/idev/urandom";
37614         elif test -r /dev/srandom ; then
37615                 dev="/dev/srandom";
37616         elif test -r /dev/random ; then
37617                 dev="/dev/random";
37618         elif test -r /idev/random ; then
37619                 dev="/idev/random";
37620         fi
37621
37622         if test $dev != no ; then
37623
37624 cat >>confdefs.h <<_ACEOF
37625 #define URANDOM_DEVICE "$dev"
37626 _ACEOF
37627
37628         fi
37629 fi
37630
37631 ol_link_fetch=no
37632 if test $ol_with_fetch != no ; then
37633         ol_LIBS=$LIBS
37634 LIBS="-lfetch -lcom_err $LIBS"
37635 echo "$as_me:$LINENO: checking fetch(3) library" >&5
37636 echo $ECHO_N "checking fetch(3) library... $ECHO_C" >&6
37637 if test "${ol_cv_lib_fetch+set}" = set; then
37638   echo $ECHO_N "(cached) $ECHO_C" >&6
37639 else
37640
37641         cat >conftest.$ac_ext <<_ACEOF
37642 /* confdefs.h.  */
37643 _ACEOF
37644 cat confdefs.h >>conftest.$ac_ext
37645 cat >>conftest.$ac_ext <<_ACEOF
37646 /* end confdefs.h.  */
37647
37648 #include <sys/param.h>
37649 #include <stdio.h>
37650 #include <fetch.h>
37651 int
37652 main ()
37653 {
37654 struct url *u = fetchParseURL("file:///");
37655   ;
37656   return 0;
37657 }
37658 _ACEOF
37659 rm -f conftest.$ac_objext conftest$ac_exeext
37660 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37661   (eval $ac_link) 2>conftest.er1
37662   ac_status=$?
37663   grep -v '^ *+' conftest.er1 >conftest.err
37664   rm -f conftest.er1
37665   cat conftest.err >&5
37666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37667   (exit $ac_status); } &&
37668          { ac_try='test -z "$ac_c_werror_flag"
37669                          || test ! -s conftest.err'
37670   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37671   (eval $ac_try) 2>&5
37672   ac_status=$?
37673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37674   (exit $ac_status); }; } &&
37675          { ac_try='test -s conftest$ac_exeext'
37676   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37677   (eval $ac_try) 2>&5
37678   ac_status=$?
37679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37680   (exit $ac_status); }; }; then
37681   ol_cv_lib_fetch=yes
37682 else
37683   echo "$as_me: failed program was:" >&5
37684 sed 's/^/| /' conftest.$ac_ext >&5
37685
37686 ol_cv_lib_fetch=no
37687 fi
37688 rm -f conftest.err conftest.$ac_objext \
37689       conftest$ac_exeext conftest.$ac_ext
37690 fi
37691 echo "$as_me:$LINENO: result: $ol_cv_lib_fetch" >&5
37692 echo "${ECHO_T}$ol_cv_lib_fetch" >&6
37693 LIBS=$ol_LIBS
37694 if test $ol_cv_lib_fetch != no ; then
37695         ol_link_fetch="-lfetch -lcom_err"
37696
37697 cat >>confdefs.h <<\_ACEOF
37698 #define HAVE_FETCH 1
37699 _ACEOF
37700
37701 fi
37702
37703
37704         if test $ol_cv_lib_fetch != no ; then
37705                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
37706                 ol_link_fetch=freebsd
37707
37708         elif test $ol_with_fetch != auto ; then
37709                 { { echo "$as_me:$LINENO: error: no suitable API for --with-fetch=$ol_with_fetch" >&5
37710 echo "$as_me: error: no suitable API for --with-fetch=$ol_with_fetch" >&2;}
37711    { (exit 1); exit 1; }; }
37712         fi
37713 fi
37714
37715 if test $ol_enable_crypt != no ; then
37716         save_LIBS="$LIBS"
37717         LIBS="$TLS_LIBS $LIBS"
37718
37719         echo "$as_me:$LINENO: checking for crypt" >&5
37720 echo $ECHO_N "checking for crypt... $ECHO_C" >&6
37721 if test "${ac_cv_func_crypt+set}" = set; then
37722   echo $ECHO_N "(cached) $ECHO_C" >&6
37723 else
37724   cat >conftest.$ac_ext <<_ACEOF
37725 /* confdefs.h.  */
37726 _ACEOF
37727 cat confdefs.h >>conftest.$ac_ext
37728 cat >>conftest.$ac_ext <<_ACEOF
37729 /* end confdefs.h.  */
37730 /* Define crypt to an innocuous variant, in case <limits.h> declares crypt.
37731    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
37732 #define crypt innocuous_crypt
37733
37734 /* System header to define __stub macros and hopefully few prototypes,
37735     which can conflict with char crypt (); below.
37736     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
37737     <limits.h> exists even on freestanding compilers.  */
37738
37739 #ifdef __STDC__
37740 # include <limits.h>
37741 #else
37742 # include <assert.h>
37743 #endif
37744
37745 #undef crypt
37746
37747 /* Override any gcc2 internal prototype to avoid an error.  */
37748 #ifdef __cplusplus
37749 extern "C"
37750 {
37751 #endif
37752 /* We use char because int might match the return type of a gcc2
37753    builtin and then its argument prototype would still apply.  */
37754 char crypt ();
37755 /* The GNU C library defines this for functions which it implements
37756     to always fail with ENOSYS.  Some functions are actually named
37757     something starting with __ and the normal name is an alias.  */
37758 #if defined (__stub_crypt) || defined (__stub___crypt)
37759 choke me
37760 #else
37761 char (*f) () = crypt;
37762 #endif
37763 #ifdef __cplusplus
37764 }
37765 #endif
37766
37767 int
37768 main ()
37769 {
37770 return f != crypt;
37771   ;
37772   return 0;
37773 }
37774 _ACEOF
37775 rm -f conftest.$ac_objext conftest$ac_exeext
37776 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37777   (eval $ac_link) 2>conftest.er1
37778   ac_status=$?
37779   grep -v '^ *+' conftest.er1 >conftest.err
37780   rm -f conftest.er1
37781   cat conftest.err >&5
37782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37783   (exit $ac_status); } &&
37784          { ac_try='test -z "$ac_c_werror_flag"
37785                          || test ! -s conftest.err'
37786   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37787   (eval $ac_try) 2>&5
37788   ac_status=$?
37789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37790   (exit $ac_status); }; } &&
37791          { ac_try='test -s conftest$ac_exeext'
37792   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37793   (eval $ac_try) 2>&5
37794   ac_status=$?
37795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37796   (exit $ac_status); }; }; then
37797   ac_cv_func_crypt=yes
37798 else
37799   echo "$as_me: failed program was:" >&5
37800 sed 's/^/| /' conftest.$ac_ext >&5
37801
37802 ac_cv_func_crypt=no
37803 fi
37804 rm -f conftest.err conftest.$ac_objext \
37805       conftest$ac_exeext conftest.$ac_ext
37806 fi
37807 echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
37808 echo "${ECHO_T}$ac_cv_func_crypt" >&6
37809 if test $ac_cv_func_crypt = yes; then
37810   have_crypt=yes
37811 else
37812
37813                 LIBS="$save_LIBS"
37814                 echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
37815 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
37816 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
37817   echo $ECHO_N "(cached) $ECHO_C" >&6
37818 else
37819   ac_check_lib_save_LIBS=$LIBS
37820 LIBS="-lcrypt  $LIBS"
37821 cat >conftest.$ac_ext <<_ACEOF
37822 /* confdefs.h.  */
37823 _ACEOF
37824 cat confdefs.h >>conftest.$ac_ext
37825 cat >>conftest.$ac_ext <<_ACEOF
37826 /* end confdefs.h.  */
37827
37828 /* Override any gcc2 internal prototype to avoid an error.  */
37829 #ifdef __cplusplus
37830 extern "C"
37831 #endif
37832 /* We use char because int might match the return type of a gcc2
37833    builtin and then its argument prototype would still apply.  */
37834 char crypt ();
37835 int
37836 main ()
37837 {
37838 crypt ();
37839   ;
37840   return 0;
37841 }
37842 _ACEOF
37843 rm -f conftest.$ac_objext conftest$ac_exeext
37844 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37845   (eval $ac_link) 2>conftest.er1
37846   ac_status=$?
37847   grep -v '^ *+' conftest.er1 >conftest.err
37848   rm -f conftest.er1
37849   cat conftest.err >&5
37850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37851   (exit $ac_status); } &&
37852          { ac_try='test -z "$ac_c_werror_flag"
37853                          || test ! -s conftest.err'
37854   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37855   (eval $ac_try) 2>&5
37856   ac_status=$?
37857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37858   (exit $ac_status); }; } &&
37859          { ac_try='test -s conftest$ac_exeext'
37860   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37861   (eval $ac_try) 2>&5
37862   ac_status=$?
37863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37864   (exit $ac_status); }; }; then
37865   ac_cv_lib_crypt_crypt=yes
37866 else
37867   echo "$as_me: failed program was:" >&5
37868 sed 's/^/| /' conftest.$ac_ext >&5
37869
37870 ac_cv_lib_crypt_crypt=no
37871 fi
37872 rm -f conftest.err conftest.$ac_objext \
37873       conftest$ac_exeext conftest.$ac_ext
37874 LIBS=$ac_check_lib_save_LIBS
37875 fi
37876 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
37877 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
37878 if test $ac_cv_lib_crypt_crypt = yes; then
37879   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
37880                         have_crypt=yes
37881 else
37882   have_crypt=no
37883 fi
37884
37885 fi
37886
37887
37888         LIBS="$save_LIBS"
37889
37890         if test $have_crypt = yes ; then
37891
37892 cat >>confdefs.h <<\_ACEOF
37893 #define HAVE_CRYPT 1
37894 _ACEOF
37895
37896         else
37897                 { echo "$as_me:$LINENO: WARNING: could not find crypt" >&5
37898 echo "$as_me: WARNING: could not find crypt" >&2;}
37899                 if test $ol_enable_crypt = yes ; then
37900                         { { echo "$as_me:$LINENO: error: could not find crypt, select appropriate options or disable" >&5
37901 echo "$as_me: error: could not find crypt, select appropriate options or disable" >&2;}
37902    { (exit 1); exit 1; }; }
37903                 fi
37904
37905                 { echo "$as_me:$LINENO: WARNING: disabling crypt support" >&5
37906 echo "$as_me: WARNING: disabling crypt support" >&2;}
37907                 ol_enable_crypt=no
37908         fi
37909 fi
37910
37911 if test $ol_enable_proctitle != no ; then
37912         echo "$as_me:$LINENO: checking for setproctitle" >&5
37913 echo $ECHO_N "checking for setproctitle... $ECHO_C" >&6
37914 if test "${ac_cv_func_setproctitle+set}" = set; then
37915   echo $ECHO_N "(cached) $ECHO_C" >&6
37916 else
37917   cat >conftest.$ac_ext <<_ACEOF
37918 /* confdefs.h.  */
37919 _ACEOF
37920 cat confdefs.h >>conftest.$ac_ext
37921 cat >>conftest.$ac_ext <<_ACEOF
37922 /* end confdefs.h.  */
37923 /* Define setproctitle to an innocuous variant, in case <limits.h> declares setproctitle.
37924    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
37925 #define setproctitle innocuous_setproctitle
37926
37927 /* System header to define __stub macros and hopefully few prototypes,
37928     which can conflict with char setproctitle (); below.
37929     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
37930     <limits.h> exists even on freestanding compilers.  */
37931
37932 #ifdef __STDC__
37933 # include <limits.h>
37934 #else
37935 # include <assert.h>
37936 #endif
37937
37938 #undef setproctitle
37939
37940 /* Override any gcc2 internal prototype to avoid an error.  */
37941 #ifdef __cplusplus
37942 extern "C"
37943 {
37944 #endif
37945 /* We use char because int might match the return type of a gcc2
37946    builtin and then its argument prototype would still apply.  */
37947 char setproctitle ();
37948 /* The GNU C library defines this for functions which it implements
37949     to always fail with ENOSYS.  Some functions are actually named
37950     something starting with __ and the normal name is an alias.  */
37951 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
37952 choke me
37953 #else
37954 char (*f) () = setproctitle;
37955 #endif
37956 #ifdef __cplusplus
37957 }
37958 #endif
37959
37960 int
37961 main ()
37962 {
37963 return f != setproctitle;
37964   ;
37965   return 0;
37966 }
37967 _ACEOF
37968 rm -f conftest.$ac_objext conftest$ac_exeext
37969 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37970   (eval $ac_link) 2>conftest.er1
37971   ac_status=$?
37972   grep -v '^ *+' conftest.er1 >conftest.err
37973   rm -f conftest.er1
37974   cat conftest.err >&5
37975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37976   (exit $ac_status); } &&
37977          { ac_try='test -z "$ac_c_werror_flag"
37978                          || test ! -s conftest.err'
37979   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37980   (eval $ac_try) 2>&5
37981   ac_status=$?
37982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37983   (exit $ac_status); }; } &&
37984          { ac_try='test -s conftest$ac_exeext'
37985   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37986   (eval $ac_try) 2>&5
37987   ac_status=$?
37988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37989   (exit $ac_status); }; }; then
37990   ac_cv_func_setproctitle=yes
37991 else
37992   echo "$as_me: failed program was:" >&5
37993 sed 's/^/| /' conftest.$ac_ext >&5
37994
37995 ac_cv_func_setproctitle=no
37996 fi
37997 rm -f conftest.err conftest.$ac_objext \
37998       conftest$ac_exeext conftest.$ac_ext
37999 fi
38000 echo "$as_me:$LINENO: result: $ac_cv_func_setproctitle" >&5
38001 echo "${ECHO_T}$ac_cv_func_setproctitle" >&6
38002 if test $ac_cv_func_setproctitle = yes; then
38003   have_setproctitle=yes
38004 else
38005
38006                 echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
38007 echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
38008 if test "${ac_cv_lib_util_setproctitle+set}" = set; then
38009   echo $ECHO_N "(cached) $ECHO_C" >&6
38010 else
38011   ac_check_lib_save_LIBS=$LIBS
38012 LIBS="-lutil  $LIBS"
38013 cat >conftest.$ac_ext <<_ACEOF
38014 /* confdefs.h.  */
38015 _ACEOF
38016 cat confdefs.h >>conftest.$ac_ext
38017 cat >>conftest.$ac_ext <<_ACEOF
38018 /* end confdefs.h.  */
38019
38020 /* Override any gcc2 internal prototype to avoid an error.  */
38021 #ifdef __cplusplus
38022 extern "C"
38023 #endif
38024 /* We use char because int might match the return type of a gcc2
38025    builtin and then its argument prototype would still apply.  */
38026 char setproctitle ();
38027 int
38028 main ()
38029 {
38030 setproctitle ();
38031   ;
38032   return 0;
38033 }
38034 _ACEOF
38035 rm -f conftest.$ac_objext conftest$ac_exeext
38036 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38037   (eval $ac_link) 2>conftest.er1
38038   ac_status=$?
38039   grep -v '^ *+' conftest.er1 >conftest.err
38040   rm -f conftest.er1
38041   cat conftest.err >&5
38042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38043   (exit $ac_status); } &&
38044          { ac_try='test -z "$ac_c_werror_flag"
38045                          || test ! -s conftest.err'
38046   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38047   (eval $ac_try) 2>&5
38048   ac_status=$?
38049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38050   (exit $ac_status); }; } &&
38051          { ac_try='test -s conftest$ac_exeext'
38052   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38053   (eval $ac_try) 2>&5
38054   ac_status=$?
38055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38056   (exit $ac_status); }; }; then
38057   ac_cv_lib_util_setproctitle=yes
38058 else
38059   echo "$as_me: failed program was:" >&5
38060 sed 's/^/| /' conftest.$ac_ext >&5
38061
38062 ac_cv_lib_util_setproctitle=no
38063 fi
38064 rm -f conftest.err conftest.$ac_objext \
38065       conftest$ac_exeext conftest.$ac_ext
38066 LIBS=$ac_check_lib_save_LIBS
38067 fi
38068 echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
38069 echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
38070 if test $ac_cv_lib_util_setproctitle = yes; then
38071   have_setproctitle=yes
38072                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
38073 else
38074   have_setproctitle=no
38075                         case $LIBOBJS in
38076     "setproctitle.$ac_objext"   | \
38077   *" setproctitle.$ac_objext"   | \
38078     "setproctitle.$ac_objext "* | \
38079   *" setproctitle.$ac_objext "* ) ;;
38080   *) LIBOBJS="$LIBOBJS setproctitle.$ac_objext" ;;
38081 esac
38082
38083                         LIBSRCS="$LIBSRCS setproctitle.c"
38084 fi
38085
38086 fi
38087
38088
38089         if test $have_setproctitle = yes ; then
38090
38091 cat >>confdefs.h <<\_ACEOF
38092 #define HAVE_SETPROCTITLE 1
38093 _ACEOF
38094
38095         fi
38096 fi
38097
38098 if test $ol_enable_slp != no ; then
38099
38100 for ac_header in slp.h
38101 do
38102 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
38103 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38104   echo "$as_me:$LINENO: checking for $ac_header" >&5
38105 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
38106 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38107   echo $ECHO_N "(cached) $ECHO_C" >&6
38108 fi
38109 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
38110 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
38111 else
38112   # Is the header compilable?
38113 echo "$as_me:$LINENO: checking $ac_header usability" >&5
38114 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
38115 cat >conftest.$ac_ext <<_ACEOF
38116 /* confdefs.h.  */
38117 _ACEOF
38118 cat confdefs.h >>conftest.$ac_ext
38119 cat >>conftest.$ac_ext <<_ACEOF
38120 /* end confdefs.h.  */
38121 $ac_includes_default
38122 #include <$ac_header>
38123 _ACEOF
38124 rm -f conftest.$ac_objext
38125 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38126   (eval $ac_compile) 2>conftest.er1
38127   ac_status=$?
38128   grep -v '^ *+' conftest.er1 >conftest.err
38129   rm -f conftest.er1
38130   cat conftest.err >&5
38131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38132   (exit $ac_status); } &&
38133          { ac_try='test -z "$ac_c_werror_flag"
38134                          || test ! -s conftest.err'
38135   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38136   (eval $ac_try) 2>&5
38137   ac_status=$?
38138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38139   (exit $ac_status); }; } &&
38140          { ac_try='test -s conftest.$ac_objext'
38141   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38142   (eval $ac_try) 2>&5
38143   ac_status=$?
38144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38145   (exit $ac_status); }; }; then
38146   ac_header_compiler=yes
38147 else
38148   echo "$as_me: failed program was:" >&5
38149 sed 's/^/| /' conftest.$ac_ext >&5
38150
38151 ac_header_compiler=no
38152 fi
38153 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38154 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
38155 echo "${ECHO_T}$ac_header_compiler" >&6
38156
38157 # Is the header present?
38158 echo "$as_me:$LINENO: checking $ac_header presence" >&5
38159 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
38160 cat >conftest.$ac_ext <<_ACEOF
38161 /* confdefs.h.  */
38162 _ACEOF
38163 cat confdefs.h >>conftest.$ac_ext
38164 cat >>conftest.$ac_ext <<_ACEOF
38165 /* end confdefs.h.  */
38166 #include <$ac_header>
38167 _ACEOF
38168 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
38169   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
38170   ac_status=$?
38171   grep -v '^ *+' conftest.er1 >conftest.err
38172   rm -f conftest.er1
38173   cat conftest.err >&5
38174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38175   (exit $ac_status); } >/dev/null; then
38176   if test -s conftest.err; then
38177     ac_cpp_err=$ac_c_preproc_warn_flag
38178     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
38179   else
38180     ac_cpp_err=
38181   fi
38182 else
38183   ac_cpp_err=yes
38184 fi
38185 if test -z "$ac_cpp_err"; then
38186   ac_header_preproc=yes
38187 else
38188   echo "$as_me: failed program was:" >&5
38189 sed 's/^/| /' conftest.$ac_ext >&5
38190
38191   ac_header_preproc=no
38192 fi
38193 rm -f conftest.err conftest.$ac_ext
38194 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
38195 echo "${ECHO_T}$ac_header_preproc" >&6
38196
38197 # So?  What about this header?
38198 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
38199   yes:no: )
38200     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
38201 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
38202     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
38203 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
38204     ac_header_preproc=yes
38205     ;;
38206   no:yes:* )
38207     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
38208 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
38209     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
38210 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
38211     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
38212 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
38213     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
38214 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
38215     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
38216 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
38217     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
38218 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
38219     (
38220       cat <<\_ASBOX
38221 ## --------------------------------------------- ##
38222 ## Report this to <http://www.openldap.org/its/> ##
38223 ## --------------------------------------------- ##
38224 _ASBOX
38225     ) |
38226       sed "s/^/$as_me: WARNING:     /" >&2
38227     ;;
38228 esac
38229 echo "$as_me:$LINENO: checking for $ac_header" >&5
38230 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
38231 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38232   echo $ECHO_N "(cached) $ECHO_C" >&6
38233 else
38234   eval "$as_ac_Header=\$ac_header_preproc"
38235 fi
38236 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
38237 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
38238
38239 fi
38240 if test `eval echo '${'$as_ac_Header'}'` = yes; then
38241   cat >>confdefs.h <<_ACEOF
38242 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
38243 _ACEOF
38244
38245 fi
38246
38247 done
38248
38249
38250         if test $ac_cv_header_slp_h = yes ; then
38251                 echo "$as_me:$LINENO: checking for SLPOpen in -lslp" >&5
38252 echo $ECHO_N "checking for SLPOpen in -lslp... $ECHO_C" >&6
38253 if test "${ac_cv_lib_slp_SLPOpen+set}" = set; then
38254   echo $ECHO_N "(cached) $ECHO_C" >&6
38255 else
38256   ac_check_lib_save_LIBS=$LIBS
38257 LIBS="-lslp  $LIBS"
38258 cat >conftest.$ac_ext <<_ACEOF
38259 /* confdefs.h.  */
38260 _ACEOF
38261 cat confdefs.h >>conftest.$ac_ext
38262 cat >>conftest.$ac_ext <<_ACEOF
38263 /* end confdefs.h.  */
38264
38265 /* Override any gcc2 internal prototype to avoid an error.  */
38266 #ifdef __cplusplus
38267 extern "C"
38268 #endif
38269 /* We use char because int might match the return type of a gcc2
38270    builtin and then its argument prototype would still apply.  */
38271 char SLPOpen ();
38272 int
38273 main ()
38274 {
38275 SLPOpen ();
38276   ;
38277   return 0;
38278 }
38279 _ACEOF
38280 rm -f conftest.$ac_objext conftest$ac_exeext
38281 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38282   (eval $ac_link) 2>conftest.er1
38283   ac_status=$?
38284   grep -v '^ *+' conftest.er1 >conftest.err
38285   rm -f conftest.er1
38286   cat conftest.err >&5
38287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38288   (exit $ac_status); } &&
38289          { ac_try='test -z "$ac_c_werror_flag"
38290                          || test ! -s conftest.err'
38291   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38292   (eval $ac_try) 2>&5
38293   ac_status=$?
38294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38295   (exit $ac_status); }; } &&
38296          { ac_try='test -s conftest$ac_exeext'
38297   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38298   (eval $ac_try) 2>&5
38299   ac_status=$?
38300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38301   (exit $ac_status); }; }; then
38302   ac_cv_lib_slp_SLPOpen=yes
38303 else
38304   echo "$as_me: failed program was:" >&5
38305 sed 's/^/| /' conftest.$ac_ext >&5
38306
38307 ac_cv_lib_slp_SLPOpen=no
38308 fi
38309 rm -f conftest.err conftest.$ac_objext \
38310       conftest$ac_exeext conftest.$ac_ext
38311 LIBS=$ac_check_lib_save_LIBS
38312 fi
38313 echo "$as_me:$LINENO: result: $ac_cv_lib_slp_SLPOpen" >&5
38314 echo "${ECHO_T}$ac_cv_lib_slp_SLPOpen" >&6
38315 if test $ac_cv_lib_slp_SLPOpen = yes; then
38316   have_slp=yes
38317 else
38318   have_slp=no
38319 fi
38320
38321                 if test $have_slp = yes ; then
38322
38323 cat >>confdefs.h <<\_ACEOF
38324 #define HAVE_SLP 1
38325 _ACEOF
38326
38327                         SLAPD_SLP_LIBS=-lslp
38328                 fi
38329
38330         elif test $ol_enable_slp = yes ; then
38331                 { { echo "$as_me:$LINENO: error: SLP not found" >&5
38332 echo "$as_me: error: SLP not found" >&2;}
38333    { (exit 1); exit 1; }; }
38334         fi
38335 fi
38336
38337 if test "$ol_with_multiple_precision" != "no" ; then
38338         ol_have_bignum=no
38339         ol_have_gmp=no
38340
38341
38342
38343 for ac_header in openssl/bn.h bn.h
38344 do
38345 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
38346 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38347   echo "$as_me:$LINENO: checking for $ac_header" >&5
38348 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
38349 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38350   echo $ECHO_N "(cached) $ECHO_C" >&6
38351 fi
38352 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
38353 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
38354 else
38355   # Is the header compilable?
38356 echo "$as_me:$LINENO: checking $ac_header usability" >&5
38357 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
38358 cat >conftest.$ac_ext <<_ACEOF
38359 /* confdefs.h.  */
38360 _ACEOF
38361 cat confdefs.h >>conftest.$ac_ext
38362 cat >>conftest.$ac_ext <<_ACEOF
38363 /* end confdefs.h.  */
38364 $ac_includes_default
38365 #include <$ac_header>
38366 _ACEOF
38367 rm -f conftest.$ac_objext
38368 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38369   (eval $ac_compile) 2>conftest.er1
38370   ac_status=$?
38371   grep -v '^ *+' conftest.er1 >conftest.err
38372   rm -f conftest.er1
38373   cat conftest.err >&5
38374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38375   (exit $ac_status); } &&
38376          { ac_try='test -z "$ac_c_werror_flag"
38377                          || test ! -s conftest.err'
38378   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38379   (eval $ac_try) 2>&5
38380   ac_status=$?
38381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38382   (exit $ac_status); }; } &&
38383          { ac_try='test -s conftest.$ac_objext'
38384   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38385   (eval $ac_try) 2>&5
38386   ac_status=$?
38387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38388   (exit $ac_status); }; }; then
38389   ac_header_compiler=yes
38390 else
38391   echo "$as_me: failed program was:" >&5
38392 sed 's/^/| /' conftest.$ac_ext >&5
38393
38394 ac_header_compiler=no
38395 fi
38396 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38397 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
38398 echo "${ECHO_T}$ac_header_compiler" >&6
38399
38400 # Is the header present?
38401 echo "$as_me:$LINENO: checking $ac_header presence" >&5
38402 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
38403 cat >conftest.$ac_ext <<_ACEOF
38404 /* confdefs.h.  */
38405 _ACEOF
38406 cat confdefs.h >>conftest.$ac_ext
38407 cat >>conftest.$ac_ext <<_ACEOF
38408 /* end confdefs.h.  */
38409 #include <$ac_header>
38410 _ACEOF
38411 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
38412   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
38413   ac_status=$?
38414   grep -v '^ *+' conftest.er1 >conftest.err
38415   rm -f conftest.er1
38416   cat conftest.err >&5
38417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38418   (exit $ac_status); } >/dev/null; then
38419   if test -s conftest.err; then
38420     ac_cpp_err=$ac_c_preproc_warn_flag
38421     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
38422   else
38423     ac_cpp_err=
38424   fi
38425 else
38426   ac_cpp_err=yes
38427 fi
38428 if test -z "$ac_cpp_err"; then
38429   ac_header_preproc=yes
38430 else
38431   echo "$as_me: failed program was:" >&5
38432 sed 's/^/| /' conftest.$ac_ext >&5
38433
38434   ac_header_preproc=no
38435 fi
38436 rm -f conftest.err conftest.$ac_ext
38437 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
38438 echo "${ECHO_T}$ac_header_preproc" >&6
38439
38440 # So?  What about this header?
38441 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
38442   yes:no: )
38443     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
38444 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
38445     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
38446 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
38447     ac_header_preproc=yes
38448     ;;
38449   no:yes:* )
38450     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
38451 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
38452     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
38453 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
38454     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
38455 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
38456     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
38457 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
38458     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
38459 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
38460     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
38461 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
38462     (
38463       cat <<\_ASBOX
38464 ## --------------------------------------------- ##
38465 ## Report this to <http://www.openldap.org/its/> ##
38466 ## --------------------------------------------- ##
38467 _ASBOX
38468     ) |
38469       sed "s/^/$as_me: WARNING:     /" >&2
38470     ;;
38471 esac
38472 echo "$as_me:$LINENO: checking for $ac_header" >&5
38473 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
38474 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38475   echo $ECHO_N "(cached) $ECHO_C" >&6
38476 else
38477   eval "$as_ac_Header=\$ac_header_preproc"
38478 fi
38479 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
38480 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
38481
38482 fi
38483 if test `eval echo '${'$as_ac_Header'}'` = yes; then
38484   cat >>confdefs.h <<_ACEOF
38485 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
38486 _ACEOF
38487
38488 fi
38489
38490 done
38491
38492
38493
38494 for ac_header in openssl/crypto.h crypto.h
38495 do
38496 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
38497 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38498   echo "$as_me:$LINENO: checking for $ac_header" >&5
38499 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
38500 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38501   echo $ECHO_N "(cached) $ECHO_C" >&6
38502 fi
38503 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
38504 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
38505 else
38506   # Is the header compilable?
38507 echo "$as_me:$LINENO: checking $ac_header usability" >&5
38508 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
38509 cat >conftest.$ac_ext <<_ACEOF
38510 /* confdefs.h.  */
38511 _ACEOF
38512 cat confdefs.h >>conftest.$ac_ext
38513 cat >>conftest.$ac_ext <<_ACEOF
38514 /* end confdefs.h.  */
38515 $ac_includes_default
38516 #include <$ac_header>
38517 _ACEOF
38518 rm -f conftest.$ac_objext
38519 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38520   (eval $ac_compile) 2>conftest.er1
38521   ac_status=$?
38522   grep -v '^ *+' conftest.er1 >conftest.err
38523   rm -f conftest.er1
38524   cat conftest.err >&5
38525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38526   (exit $ac_status); } &&
38527          { ac_try='test -z "$ac_c_werror_flag"
38528                          || test ! -s conftest.err'
38529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38530   (eval $ac_try) 2>&5
38531   ac_status=$?
38532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38533   (exit $ac_status); }; } &&
38534          { ac_try='test -s conftest.$ac_objext'
38535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38536   (eval $ac_try) 2>&5
38537   ac_status=$?
38538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38539   (exit $ac_status); }; }; then
38540   ac_header_compiler=yes
38541 else
38542   echo "$as_me: failed program was:" >&5
38543 sed 's/^/| /' conftest.$ac_ext >&5
38544
38545 ac_header_compiler=no
38546 fi
38547 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38548 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
38549 echo "${ECHO_T}$ac_header_compiler" >&6
38550
38551 # Is the header present?
38552 echo "$as_me:$LINENO: checking $ac_header presence" >&5
38553 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
38554 cat >conftest.$ac_ext <<_ACEOF
38555 /* confdefs.h.  */
38556 _ACEOF
38557 cat confdefs.h >>conftest.$ac_ext
38558 cat >>conftest.$ac_ext <<_ACEOF
38559 /* end confdefs.h.  */
38560 #include <$ac_header>
38561 _ACEOF
38562 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
38563   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
38564   ac_status=$?
38565   grep -v '^ *+' conftest.er1 >conftest.err
38566   rm -f conftest.er1
38567   cat conftest.err >&5
38568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38569   (exit $ac_status); } >/dev/null; then
38570   if test -s conftest.err; then
38571     ac_cpp_err=$ac_c_preproc_warn_flag
38572     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
38573   else
38574     ac_cpp_err=
38575   fi
38576 else
38577   ac_cpp_err=yes
38578 fi
38579 if test -z "$ac_cpp_err"; then
38580   ac_header_preproc=yes
38581 else
38582   echo "$as_me: failed program was:" >&5
38583 sed 's/^/| /' conftest.$ac_ext >&5
38584
38585   ac_header_preproc=no
38586 fi
38587 rm -f conftest.err conftest.$ac_ext
38588 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
38589 echo "${ECHO_T}$ac_header_preproc" >&6
38590
38591 # So?  What about this header?
38592 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
38593   yes:no: )
38594     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
38595 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
38596     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
38597 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
38598     ac_header_preproc=yes
38599     ;;
38600   no:yes:* )
38601     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
38602 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
38603     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
38604 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
38605     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
38606 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
38607     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
38608 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
38609     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
38610 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
38611     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
38612 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
38613     (
38614       cat <<\_ASBOX
38615 ## --------------------------------------------- ##
38616 ## Report this to <http://www.openldap.org/its/> ##
38617 ## --------------------------------------------- ##
38618 _ASBOX
38619     ) |
38620       sed "s/^/$as_me: WARNING:     /" >&2
38621     ;;
38622 esac
38623 echo "$as_me:$LINENO: checking for $ac_header" >&5
38624 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
38625 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38626   echo $ECHO_N "(cached) $ECHO_C" >&6
38627 else
38628   eval "$as_ac_Header=\$ac_header_preproc"
38629 fi
38630 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
38631 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
38632
38633 fi
38634 if test `eval echo '${'$as_ac_Header'}'` = yes; then
38635   cat >>confdefs.h <<_ACEOF
38636 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
38637 _ACEOF
38638
38639 fi
38640
38641 done
38642
38643
38644 for ac_header in gmp.h
38645 do
38646 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
38647 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38648   echo "$as_me:$LINENO: checking for $ac_header" >&5
38649 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
38650 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38651   echo $ECHO_N "(cached) $ECHO_C" >&6
38652 fi
38653 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
38654 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
38655 else
38656   # Is the header compilable?
38657 echo "$as_me:$LINENO: checking $ac_header usability" >&5
38658 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
38659 cat >conftest.$ac_ext <<_ACEOF
38660 /* confdefs.h.  */
38661 _ACEOF
38662 cat confdefs.h >>conftest.$ac_ext
38663 cat >>conftest.$ac_ext <<_ACEOF
38664 /* end confdefs.h.  */
38665 $ac_includes_default
38666 #include <$ac_header>
38667 _ACEOF
38668 rm -f conftest.$ac_objext
38669 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38670   (eval $ac_compile) 2>conftest.er1
38671   ac_status=$?
38672   grep -v '^ *+' conftest.er1 >conftest.err
38673   rm -f conftest.er1
38674   cat conftest.err >&5
38675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38676   (exit $ac_status); } &&
38677          { ac_try='test -z "$ac_c_werror_flag"
38678                          || test ! -s conftest.err'
38679   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38680   (eval $ac_try) 2>&5
38681   ac_status=$?
38682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38683   (exit $ac_status); }; } &&
38684          { ac_try='test -s conftest.$ac_objext'
38685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38686   (eval $ac_try) 2>&5
38687   ac_status=$?
38688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38689   (exit $ac_status); }; }; then
38690   ac_header_compiler=yes
38691 else
38692   echo "$as_me: failed program was:" >&5
38693 sed 's/^/| /' conftest.$ac_ext >&5
38694
38695 ac_header_compiler=no
38696 fi
38697 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38698 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
38699 echo "${ECHO_T}$ac_header_compiler" >&6
38700
38701 # Is the header present?
38702 echo "$as_me:$LINENO: checking $ac_header presence" >&5
38703 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
38704 cat >conftest.$ac_ext <<_ACEOF
38705 /* confdefs.h.  */
38706 _ACEOF
38707 cat confdefs.h >>conftest.$ac_ext
38708 cat >>conftest.$ac_ext <<_ACEOF
38709 /* end confdefs.h.  */
38710 #include <$ac_header>
38711 _ACEOF
38712 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
38713   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
38714   ac_status=$?
38715   grep -v '^ *+' conftest.er1 >conftest.err
38716   rm -f conftest.er1
38717   cat conftest.err >&5
38718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38719   (exit $ac_status); } >/dev/null; then
38720   if test -s conftest.err; then
38721     ac_cpp_err=$ac_c_preproc_warn_flag
38722     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
38723   else
38724     ac_cpp_err=
38725   fi
38726 else
38727   ac_cpp_err=yes
38728 fi
38729 if test -z "$ac_cpp_err"; then
38730   ac_header_preproc=yes
38731 else
38732   echo "$as_me: failed program was:" >&5
38733 sed 's/^/| /' conftest.$ac_ext >&5
38734
38735   ac_header_preproc=no
38736 fi
38737 rm -f conftest.err conftest.$ac_ext
38738 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
38739 echo "${ECHO_T}$ac_header_preproc" >&6
38740
38741 # So?  What about this header?
38742 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
38743   yes:no: )
38744     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
38745 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
38746     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
38747 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
38748     ac_header_preproc=yes
38749     ;;
38750   no:yes:* )
38751     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
38752 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
38753     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
38754 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
38755     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
38756 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
38757     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
38758 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
38759     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
38760 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
38761     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
38762 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
38763     (
38764       cat <<\_ASBOX
38765 ## --------------------------------------------- ##
38766 ## Report this to <http://www.openldap.org/its/> ##
38767 ## --------------------------------------------- ##
38768 _ASBOX
38769     ) |
38770       sed "s/^/$as_me: WARNING:     /" >&2
38771     ;;
38772 esac
38773 echo "$as_me:$LINENO: checking for $ac_header" >&5
38774 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
38775 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38776   echo $ECHO_N "(cached) $ECHO_C" >&6
38777 else
38778   eval "$as_ac_Header=\$ac_header_preproc"
38779 fi
38780 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
38781 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
38782
38783 fi
38784 if test `eval echo '${'$as_ac_Header'}'` = yes; then
38785   cat >>confdefs.h <<_ACEOF
38786 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
38787 _ACEOF
38788
38789 fi
38790
38791 done
38792
38793
38794         if test "$ol_with_tls" = "found" ; then
38795                 ol_have_bn_h=no
38796                 ol_have_crypto_h=no
38797
38798                 if test "$ac_cv_header_openssl_bn_h" = "yes" ||
38799                    test "$ac_cv_header_bn_h" = "yes" ; then
38800                         ol_have_bn_h=yes
38801                 fi
38802
38803                 if test "$ac_cv_header_openssl_crypto_h" = "yes" ||
38804                    test "$ac_cv_header_crypto_h" = "yes" ; then
38805                         ol_have_crypto_h=yes
38806                 fi
38807
38808                 if test "$ol_have_bn_h" = "yes" &&
38809                    test "$ol_have_crypto_h" = "yes" ; then
38810                         ol_have_bignum=yes
38811                 fi
38812         fi
38813
38814         if test $ac_cv_header_gmp_h = yes ; then
38815                 echo "$as_me:$LINENO: checking for __gmpz_add_ui in -lgmp" >&5
38816 echo $ECHO_N "checking for __gmpz_add_ui in -lgmp... $ECHO_C" >&6
38817 if test "${ac_cv_lib_gmp___gmpz_add_ui+set}" = set; then
38818   echo $ECHO_N "(cached) $ECHO_C" >&6
38819 else
38820   ac_check_lib_save_LIBS=$LIBS
38821 LIBS="-lgmp  $LIBS"
38822 cat >conftest.$ac_ext <<_ACEOF
38823 /* confdefs.h.  */
38824 _ACEOF
38825 cat confdefs.h >>conftest.$ac_ext
38826 cat >>conftest.$ac_ext <<_ACEOF
38827 /* end confdefs.h.  */
38828
38829 /* Override any gcc2 internal prototype to avoid an error.  */
38830 #ifdef __cplusplus
38831 extern "C"
38832 #endif
38833 /* We use char because int might match the return type of a gcc2
38834    builtin and then its argument prototype would still apply.  */
38835 char __gmpz_add_ui ();
38836 int
38837 main ()
38838 {
38839 __gmpz_add_ui ();
38840   ;
38841   return 0;
38842 }
38843 _ACEOF
38844 rm -f conftest.$ac_objext conftest$ac_exeext
38845 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38846   (eval $ac_link) 2>conftest.er1
38847   ac_status=$?
38848   grep -v '^ *+' conftest.er1 >conftest.err
38849   rm -f conftest.er1
38850   cat conftest.err >&5
38851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38852   (exit $ac_status); } &&
38853          { ac_try='test -z "$ac_c_werror_flag"
38854                          || test ! -s conftest.err'
38855   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38856   (eval $ac_try) 2>&5
38857   ac_status=$?
38858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38859   (exit $ac_status); }; } &&
38860          { ac_try='test -s conftest$ac_exeext'
38861   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38862   (eval $ac_try) 2>&5
38863   ac_status=$?
38864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38865   (exit $ac_status); }; }; then
38866   ac_cv_lib_gmp___gmpz_add_ui=yes
38867 else
38868   echo "$as_me: failed program was:" >&5
38869 sed 's/^/| /' conftest.$ac_ext >&5
38870
38871 ac_cv_lib_gmp___gmpz_add_ui=no
38872 fi
38873 rm -f conftest.err conftest.$ac_objext \
38874       conftest$ac_exeext conftest.$ac_ext
38875 LIBS=$ac_check_lib_save_LIBS
38876 fi
38877 echo "$as_me:$LINENO: result: $ac_cv_lib_gmp___gmpz_add_ui" >&5
38878 echo "${ECHO_T}$ac_cv_lib_gmp___gmpz_add_ui" >&6
38879 if test $ac_cv_lib_gmp___gmpz_add_ui = yes; then
38880   have_gmp=yes
38881 else
38882   have_gmp=no
38883 fi
38884
38885                 if test $have_gmp = yes ; then
38886                         ol_have_gmp=yes
38887                 fi
38888         fi
38889
38890         echo "$as_me:$LINENO: checking for multiple precision support" >&5
38891 echo $ECHO_N "checking for multiple precision support... $ECHO_C" >&6
38892
38893         ol_mp_support="none"
38894         case "$ol_with_multiple_precision" in
38895         auto)
38896                                                                                 if test "$ol_have_bignum" = "yes" ; then
38897                         ol_mp_support="bignum"
38898                 else
38899                         if test "$ol_have_gmp" = "yes" ; then
38900                                 ol_mp_support="gmp"
38901                         fi
38902                 fi
38903                 ;;
38904         bignum)
38905                 if test "$ol_have_bignum" != "yes" ; then
38906                         { { echo "$as_me:$LINENO: error: OpenSSL's BIGNUM not available" >&5
38907 echo "$as_me: error: OpenSSL's BIGNUM not available" >&2;}
38908    { (exit 1); exit 1; }; }
38909                 fi
38910                 ol_mp_support="bignum"
38911                 ;;
38912         gmp)
38913                 if test "$ol_have_gmp" != "yes" ; then
38914                         { { echo "$as_me:$LINENO: error: GMP not available" >&5
38915 echo "$as_me: error: GMP not available" >&2;}
38916    { (exit 1); exit 1; }; }
38917                 fi
38918                 ol_mp_support="gmp"
38919                 ;;
38920         yes)
38921                 if test "$ol_have_bignum" = "yes" ; then
38922                         ol_mp_support="bignum"
38923                 elif test "$ol_have_gmp" = "yes" ; then
38924                         ol_mp_support="gmp"
38925                 else
38926                         { { echo "$as_me:$LINENO: error: not available" >&5
38927 echo "$as_me: error: not available" >&2;}
38928    { (exit 1); exit 1; }; }
38929                 fi
38930                 ;;
38931         esac
38932
38933         case "$ol_mp_support" in
38934         bignum)
38935
38936 cat >>confdefs.h <<\_ACEOF
38937 #define HAVE_BIGNUM 1
38938 _ACEOF
38939
38940                 ;;
38941         gmp)
38942
38943 cat >>confdefs.h <<\_ACEOF
38944 #define HAVE_GMP 1
38945 _ACEOF
38946
38947                 SLAPD_GMP_LIBS=-lgmp
38948                 ;;
38949         none)
38950                 ;;
38951         esac
38952
38953         echo "$as_me:$LINENO: result: $ol_mp_support" >&5
38954 echo "${ECHO_T}$ol_mp_support" >&6
38955 fi
38956
38957
38958 echo "$as_me:$LINENO: checking for mode_t" >&5
38959 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
38960 if test "${ac_cv_type_mode_t+set}" = set; then
38961   echo $ECHO_N "(cached) $ECHO_C" >&6
38962 else
38963   cat >conftest.$ac_ext <<_ACEOF
38964 /* confdefs.h.  */
38965 _ACEOF
38966 cat confdefs.h >>conftest.$ac_ext
38967 cat >>conftest.$ac_ext <<_ACEOF
38968 /* end confdefs.h.  */
38969 $ac_includes_default
38970 int
38971 main ()
38972 {
38973 if ((mode_t *) 0)
38974   return 0;
38975 if (sizeof (mode_t))
38976   return 0;
38977   ;
38978   return 0;
38979 }
38980 _ACEOF
38981 rm -f conftest.$ac_objext
38982 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38983   (eval $ac_compile) 2>conftest.er1
38984   ac_status=$?
38985   grep -v '^ *+' conftest.er1 >conftest.err
38986   rm -f conftest.er1
38987   cat conftest.err >&5
38988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38989   (exit $ac_status); } &&
38990          { ac_try='test -z "$ac_c_werror_flag"
38991                          || test ! -s conftest.err'
38992   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38993   (eval $ac_try) 2>&5
38994   ac_status=$?
38995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38996   (exit $ac_status); }; } &&
38997          { ac_try='test -s conftest.$ac_objext'
38998   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38999   (eval $ac_try) 2>&5
39000   ac_status=$?
39001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39002   (exit $ac_status); }; }; then
39003   ac_cv_type_mode_t=yes
39004 else
39005   echo "$as_me: failed program was:" >&5
39006 sed 's/^/| /' conftest.$ac_ext >&5
39007
39008 ac_cv_type_mode_t=no
39009 fi
39010 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39011 fi
39012 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
39013 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
39014 if test $ac_cv_type_mode_t = yes; then
39015   :
39016 else
39017
39018 cat >>confdefs.h <<_ACEOF
39019 #define mode_t int
39020 _ACEOF
39021
39022 fi
39023
39024 echo "$as_me:$LINENO: checking for off_t" >&5
39025 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
39026 if test "${ac_cv_type_off_t+set}" = set; then
39027   echo $ECHO_N "(cached) $ECHO_C" >&6
39028 else
39029   cat >conftest.$ac_ext <<_ACEOF
39030 /* confdefs.h.  */
39031 _ACEOF
39032 cat confdefs.h >>conftest.$ac_ext
39033 cat >>conftest.$ac_ext <<_ACEOF
39034 /* end confdefs.h.  */
39035 $ac_includes_default
39036 int
39037 main ()
39038 {
39039 if ((off_t *) 0)
39040   return 0;
39041 if (sizeof (off_t))
39042   return 0;
39043   ;
39044   return 0;
39045 }
39046 _ACEOF
39047 rm -f conftest.$ac_objext
39048 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39049   (eval $ac_compile) 2>conftest.er1
39050   ac_status=$?
39051   grep -v '^ *+' conftest.er1 >conftest.err
39052   rm -f conftest.er1
39053   cat conftest.err >&5
39054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39055   (exit $ac_status); } &&
39056          { ac_try='test -z "$ac_c_werror_flag"
39057                          || test ! -s conftest.err'
39058   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39059   (eval $ac_try) 2>&5
39060   ac_status=$?
39061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39062   (exit $ac_status); }; } &&
39063          { ac_try='test -s conftest.$ac_objext'
39064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39065   (eval $ac_try) 2>&5
39066   ac_status=$?
39067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39068   (exit $ac_status); }; }; then
39069   ac_cv_type_off_t=yes
39070 else
39071   echo "$as_me: failed program was:" >&5
39072 sed 's/^/| /' conftest.$ac_ext >&5
39073
39074 ac_cv_type_off_t=no
39075 fi
39076 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39077 fi
39078 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
39079 echo "${ECHO_T}$ac_cv_type_off_t" >&6
39080 if test $ac_cv_type_off_t = yes; then
39081   :
39082 else
39083
39084 cat >>confdefs.h <<_ACEOF
39085 #define off_t long
39086 _ACEOF
39087
39088 fi
39089
39090 echo "$as_me:$LINENO: checking for pid_t" >&5
39091 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
39092 if test "${ac_cv_type_pid_t+set}" = set; then
39093   echo $ECHO_N "(cached) $ECHO_C" >&6
39094 else
39095   cat >conftest.$ac_ext <<_ACEOF
39096 /* confdefs.h.  */
39097 _ACEOF
39098 cat confdefs.h >>conftest.$ac_ext
39099 cat >>conftest.$ac_ext <<_ACEOF
39100 /* end confdefs.h.  */
39101 $ac_includes_default
39102 int
39103 main ()
39104 {
39105 if ((pid_t *) 0)
39106   return 0;
39107 if (sizeof (pid_t))
39108   return 0;
39109   ;
39110   return 0;
39111 }
39112 _ACEOF
39113 rm -f conftest.$ac_objext
39114 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39115   (eval $ac_compile) 2>conftest.er1
39116   ac_status=$?
39117   grep -v '^ *+' conftest.er1 >conftest.err
39118   rm -f conftest.er1
39119   cat conftest.err >&5
39120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39121   (exit $ac_status); } &&
39122          { ac_try='test -z "$ac_c_werror_flag"
39123                          || test ! -s conftest.err'
39124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39125   (eval $ac_try) 2>&5
39126   ac_status=$?
39127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39128   (exit $ac_status); }; } &&
39129          { ac_try='test -s conftest.$ac_objext'
39130   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39131   (eval $ac_try) 2>&5
39132   ac_status=$?
39133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39134   (exit $ac_status); }; }; then
39135   ac_cv_type_pid_t=yes
39136 else
39137   echo "$as_me: failed program was:" >&5
39138 sed 's/^/| /' conftest.$ac_ext >&5
39139
39140 ac_cv_type_pid_t=no
39141 fi
39142 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39143 fi
39144 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
39145 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
39146 if test $ac_cv_type_pid_t = yes; then
39147   :
39148 else
39149
39150 cat >>confdefs.h <<_ACEOF
39151 #define pid_t int
39152 _ACEOF
39153
39154 fi
39155
39156 echo "$as_me:$LINENO: checking for ssize_t" >&5
39157 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
39158 if test "${ac_cv_type_ssize_t+set}" = set; then
39159   echo $ECHO_N "(cached) $ECHO_C" >&6
39160 else
39161   cat >conftest.$ac_ext <<_ACEOF
39162 /* confdefs.h.  */
39163 _ACEOF
39164 cat confdefs.h >>conftest.$ac_ext
39165 cat >>conftest.$ac_ext <<_ACEOF
39166 /* end confdefs.h.  */
39167 $ac_includes_default
39168 int
39169 main ()
39170 {
39171 if ((ssize_t *) 0)
39172   return 0;
39173 if (sizeof (ssize_t))
39174   return 0;
39175   ;
39176   return 0;
39177 }
39178 _ACEOF
39179 rm -f conftest.$ac_objext
39180 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39181   (eval $ac_compile) 2>conftest.er1
39182   ac_status=$?
39183   grep -v '^ *+' conftest.er1 >conftest.err
39184   rm -f conftest.er1
39185   cat conftest.err >&5
39186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39187   (exit $ac_status); } &&
39188          { ac_try='test -z "$ac_c_werror_flag"
39189                          || test ! -s conftest.err'
39190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39191   (eval $ac_try) 2>&5
39192   ac_status=$?
39193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39194   (exit $ac_status); }; } &&
39195          { ac_try='test -s conftest.$ac_objext'
39196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39197   (eval $ac_try) 2>&5
39198   ac_status=$?
39199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39200   (exit $ac_status); }; }; then
39201   ac_cv_type_ssize_t=yes
39202 else
39203   echo "$as_me: failed program was:" >&5
39204 sed 's/^/| /' conftest.$ac_ext >&5
39205
39206 ac_cv_type_ssize_t=no
39207 fi
39208 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39209 fi
39210 echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
39211 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
39212 if test $ac_cv_type_ssize_t = yes; then
39213   :
39214 else
39215
39216 cat >>confdefs.h <<_ACEOF
39217 #define ssize_t signed int
39218 _ACEOF
39219
39220 fi
39221
39222 echo "$as_me:$LINENO: checking for caddr_t" >&5
39223 echo $ECHO_N "checking for caddr_t... $ECHO_C" >&6
39224 if test "${ac_cv_type_caddr_t+set}" = set; then
39225   echo $ECHO_N "(cached) $ECHO_C" >&6
39226 else
39227   cat >conftest.$ac_ext <<_ACEOF
39228 /* confdefs.h.  */
39229 _ACEOF
39230 cat confdefs.h >>conftest.$ac_ext
39231 cat >>conftest.$ac_ext <<_ACEOF
39232 /* end confdefs.h.  */
39233 $ac_includes_default
39234 int
39235 main ()
39236 {
39237 if ((caddr_t *) 0)
39238   return 0;
39239 if (sizeof (caddr_t))
39240   return 0;
39241   ;
39242   return 0;
39243 }
39244 _ACEOF
39245 rm -f conftest.$ac_objext
39246 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39247   (eval $ac_compile) 2>conftest.er1
39248   ac_status=$?
39249   grep -v '^ *+' conftest.er1 >conftest.err
39250   rm -f conftest.er1
39251   cat conftest.err >&5
39252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39253   (exit $ac_status); } &&
39254          { ac_try='test -z "$ac_c_werror_flag"
39255                          || test ! -s conftest.err'
39256   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39257   (eval $ac_try) 2>&5
39258   ac_status=$?
39259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39260   (exit $ac_status); }; } &&
39261          { ac_try='test -s conftest.$ac_objext'
39262   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39263   (eval $ac_try) 2>&5
39264   ac_status=$?
39265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39266   (exit $ac_status); }; }; then
39267   ac_cv_type_caddr_t=yes
39268 else
39269   echo "$as_me: failed program was:" >&5
39270 sed 's/^/| /' conftest.$ac_ext >&5
39271
39272 ac_cv_type_caddr_t=no
39273 fi
39274 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39275 fi
39276 echo "$as_me:$LINENO: result: $ac_cv_type_caddr_t" >&5
39277 echo "${ECHO_T}$ac_cv_type_caddr_t" >&6
39278 if test $ac_cv_type_caddr_t = yes; then
39279   :
39280 else
39281
39282 cat >>confdefs.h <<_ACEOF
39283 #define caddr_t char *
39284 _ACEOF
39285
39286 fi
39287
39288 echo "$as_me:$LINENO: checking for size_t" >&5
39289 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
39290 if test "${ac_cv_type_size_t+set}" = set; then
39291   echo $ECHO_N "(cached) $ECHO_C" >&6
39292 else
39293   cat >conftest.$ac_ext <<_ACEOF
39294 /* confdefs.h.  */
39295 _ACEOF
39296 cat confdefs.h >>conftest.$ac_ext
39297 cat >>conftest.$ac_ext <<_ACEOF
39298 /* end confdefs.h.  */
39299 $ac_includes_default
39300 int
39301 main ()
39302 {
39303 if ((size_t *) 0)
39304   return 0;
39305 if (sizeof (size_t))
39306   return 0;
39307   ;
39308   return 0;
39309 }
39310 _ACEOF
39311 rm -f conftest.$ac_objext
39312 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39313   (eval $ac_compile) 2>conftest.er1
39314   ac_status=$?
39315   grep -v '^ *+' conftest.er1 >conftest.err
39316   rm -f conftest.er1
39317   cat conftest.err >&5
39318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39319   (exit $ac_status); } &&
39320          { ac_try='test -z "$ac_c_werror_flag"
39321                          || test ! -s conftest.err'
39322   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39323   (eval $ac_try) 2>&5
39324   ac_status=$?
39325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39326   (exit $ac_status); }; } &&
39327          { ac_try='test -s conftest.$ac_objext'
39328   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39329   (eval $ac_try) 2>&5
39330   ac_status=$?
39331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39332   (exit $ac_status); }; }; then
39333   ac_cv_type_size_t=yes
39334 else
39335   echo "$as_me: failed program was:" >&5
39336 sed 's/^/| /' conftest.$ac_ext >&5
39337
39338 ac_cv_type_size_t=no
39339 fi
39340 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39341 fi
39342 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
39343 echo "${ECHO_T}$ac_cv_type_size_t" >&6
39344 if test $ac_cv_type_size_t = yes; then
39345   :
39346 else
39347
39348 cat >>confdefs.h <<_ACEOF
39349 #define size_t unsigned
39350 _ACEOF
39351
39352 fi
39353
39354
39355 echo "$as_me:$LINENO: checking for long long" >&5
39356 echo $ECHO_N "checking for long long... $ECHO_C" >&6
39357 if test "${ac_cv_type_long_long+set}" = set; then
39358   echo $ECHO_N "(cached) $ECHO_C" >&6
39359 else
39360   cat >conftest.$ac_ext <<_ACEOF
39361 /* confdefs.h.  */
39362 _ACEOF
39363 cat confdefs.h >>conftest.$ac_ext
39364 cat >>conftest.$ac_ext <<_ACEOF
39365 /* end confdefs.h.  */
39366 $ac_includes_default
39367 int
39368 main ()
39369 {
39370 if ((long long *) 0)
39371   return 0;
39372 if (sizeof (long long))
39373   return 0;
39374   ;
39375   return 0;
39376 }
39377 _ACEOF
39378 rm -f conftest.$ac_objext
39379 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39380   (eval $ac_compile) 2>conftest.er1
39381   ac_status=$?
39382   grep -v '^ *+' conftest.er1 >conftest.err
39383   rm -f conftest.er1
39384   cat conftest.err >&5
39385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39386   (exit $ac_status); } &&
39387          { ac_try='test -z "$ac_c_werror_flag"
39388                          || test ! -s conftest.err'
39389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39390   (eval $ac_try) 2>&5
39391   ac_status=$?
39392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39393   (exit $ac_status); }; } &&
39394          { ac_try='test -s conftest.$ac_objext'
39395   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39396   (eval $ac_try) 2>&5
39397   ac_status=$?
39398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39399   (exit $ac_status); }; }; then
39400   ac_cv_type_long_long=yes
39401 else
39402   echo "$as_me: failed program was:" >&5
39403 sed 's/^/| /' conftest.$ac_ext >&5
39404
39405 ac_cv_type_long_long=no
39406 fi
39407 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39408 fi
39409 echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
39410 echo "${ECHO_T}$ac_cv_type_long_long" >&6
39411 if test $ac_cv_type_long_long = yes; then
39412
39413 cat >>confdefs.h <<_ACEOF
39414 #define HAVE_LONG_LONG 1
39415 _ACEOF
39416
39417
39418 fi
39419
39420 echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
39421 echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
39422 if test "${ac_cv_type_ptrdiff_t+set}" = set; then
39423   echo $ECHO_N "(cached) $ECHO_C" >&6
39424 else
39425   cat >conftest.$ac_ext <<_ACEOF
39426 /* confdefs.h.  */
39427 _ACEOF
39428 cat confdefs.h >>conftest.$ac_ext
39429 cat >>conftest.$ac_ext <<_ACEOF
39430 /* end confdefs.h.  */
39431 $ac_includes_default
39432 int
39433 main ()
39434 {
39435 if ((ptrdiff_t *) 0)
39436   return 0;
39437 if (sizeof (ptrdiff_t))
39438   return 0;
39439   ;
39440   return 0;
39441 }
39442 _ACEOF
39443 rm -f conftest.$ac_objext
39444 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39445   (eval $ac_compile) 2>conftest.er1
39446   ac_status=$?
39447   grep -v '^ *+' conftest.er1 >conftest.err
39448   rm -f conftest.er1
39449   cat conftest.err >&5
39450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39451   (exit $ac_status); } &&
39452          { ac_try='test -z "$ac_c_werror_flag"
39453                          || test ! -s conftest.err'
39454   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39455   (eval $ac_try) 2>&5
39456   ac_status=$?
39457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39458   (exit $ac_status); }; } &&
39459          { ac_try='test -s conftest.$ac_objext'
39460   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39461   (eval $ac_try) 2>&5
39462   ac_status=$?
39463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39464   (exit $ac_status); }; }; then
39465   ac_cv_type_ptrdiff_t=yes
39466 else
39467   echo "$as_me: failed program was:" >&5
39468 sed 's/^/| /' conftest.$ac_ext >&5
39469
39470 ac_cv_type_ptrdiff_t=no
39471 fi
39472 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39473 fi
39474 echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
39475 echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6
39476 if test $ac_cv_type_ptrdiff_t = yes; then
39477
39478 cat >>confdefs.h <<_ACEOF
39479 #define HAVE_PTRDIFF_T 1
39480 _ACEOF
39481
39482
39483 fi
39484
39485
39486 echo "$as_me:$LINENO: checking for socklen_t" >&5
39487 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
39488 if test "${ac_cv_type_socklen_t+set}" = set; then
39489   echo $ECHO_N "(cached) $ECHO_C" >&6
39490 else
39491   cat >conftest.$ac_ext <<_ACEOF
39492 /* confdefs.h.  */
39493 _ACEOF
39494 cat confdefs.h >>conftest.$ac_ext
39495 cat >>conftest.$ac_ext <<_ACEOF
39496 /* end confdefs.h.  */
39497 $ac_includes_default
39498 #ifdef HAVE_SYS_SOCKET_H
39499 #include <sys/socket.h>
39500 #endif
39501
39502
39503 int
39504 main ()
39505 {
39506 if ((socklen_t *) 0)
39507   return 0;
39508 if (sizeof (socklen_t))
39509   return 0;
39510   ;
39511   return 0;
39512 }
39513 _ACEOF
39514 rm -f conftest.$ac_objext
39515 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39516   (eval $ac_compile) 2>conftest.er1
39517   ac_status=$?
39518   grep -v '^ *+' conftest.er1 >conftest.err
39519   rm -f conftest.er1
39520   cat conftest.err >&5
39521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39522   (exit $ac_status); } &&
39523          { ac_try='test -z "$ac_c_werror_flag"
39524                          || test ! -s conftest.err'
39525   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39526   (eval $ac_try) 2>&5
39527   ac_status=$?
39528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39529   (exit $ac_status); }; } &&
39530          { ac_try='test -s conftest.$ac_objext'
39531   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39532   (eval $ac_try) 2>&5
39533   ac_status=$?
39534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39535   (exit $ac_status); }; }; then
39536   ac_cv_type_socklen_t=yes
39537 else
39538   echo "$as_me: failed program was:" >&5
39539 sed 's/^/| /' conftest.$ac_ext >&5
39540
39541 ac_cv_type_socklen_t=no
39542 fi
39543 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39544 fi
39545 echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
39546 echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
39547 if test $ac_cv_type_socklen_t = yes; then
39548   :
39549 else
39550
39551 cat >>confdefs.h <<_ACEOF
39552 #define socklen_t int
39553 _ACEOF
39554
39555 fi
39556
39557
39558 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
39559 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
39560 if test "${ac_cv_type_signal+set}" = set; then
39561   echo $ECHO_N "(cached) $ECHO_C" >&6
39562 else
39563   cat >conftest.$ac_ext <<_ACEOF
39564 /* confdefs.h.  */
39565 _ACEOF
39566 cat confdefs.h >>conftest.$ac_ext
39567 cat >>conftest.$ac_ext <<_ACEOF
39568 /* end confdefs.h.  */
39569 #include <sys/types.h>
39570 #include <signal.h>
39571 #ifdef signal
39572 # undef signal
39573 #endif
39574 #ifdef __cplusplus
39575 extern "C" void (*signal (int, void (*)(int)))(int);
39576 #else
39577 void (*signal ()) ();
39578 #endif
39579
39580 int
39581 main ()
39582 {
39583 int i;
39584   ;
39585   return 0;
39586 }
39587 _ACEOF
39588 rm -f conftest.$ac_objext
39589 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39590   (eval $ac_compile) 2>conftest.er1
39591   ac_status=$?
39592   grep -v '^ *+' conftest.er1 >conftest.err
39593   rm -f conftest.er1
39594   cat conftest.err >&5
39595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39596   (exit $ac_status); } &&
39597          { ac_try='test -z "$ac_c_werror_flag"
39598                          || test ! -s conftest.err'
39599   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39600   (eval $ac_try) 2>&5
39601   ac_status=$?
39602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39603   (exit $ac_status); }; } &&
39604          { ac_try='test -s conftest.$ac_objext'
39605   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39606   (eval $ac_try) 2>&5
39607   ac_status=$?
39608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39609   (exit $ac_status); }; }; then
39610   ac_cv_type_signal=void
39611 else
39612   echo "$as_me: failed program was:" >&5
39613 sed 's/^/| /' conftest.$ac_ext >&5
39614
39615 ac_cv_type_signal=int
39616 fi
39617 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39618 fi
39619 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
39620 echo "${ECHO_T}$ac_cv_type_signal" >&6
39621
39622 cat >>confdefs.h <<_ACEOF
39623 #define RETSIGTYPE $ac_cv_type_signal
39624 _ACEOF
39625
39626
39627
39628 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
39629 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
39630 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
39631   echo $ECHO_N "(cached) $ECHO_C" >&6
39632 else
39633   cat >conftest.$ac_ext <<_ACEOF
39634 /* confdefs.h.  */
39635 _ACEOF
39636 cat confdefs.h >>conftest.$ac_ext
39637 cat >>conftest.$ac_ext <<_ACEOF
39638 /* end confdefs.h.  */
39639 $ac_includes_default
39640 #include <signal.h>
39641
39642
39643 int
39644 main ()
39645 {
39646 if ((sig_atomic_t *) 0)
39647   return 0;
39648 if (sizeof (sig_atomic_t))
39649   return 0;
39650   ;
39651   return 0;
39652 }
39653 _ACEOF
39654 rm -f conftest.$ac_objext
39655 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39656   (eval $ac_compile) 2>conftest.er1
39657   ac_status=$?
39658   grep -v '^ *+' conftest.er1 >conftest.err
39659   rm -f conftest.er1
39660   cat conftest.err >&5
39661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39662   (exit $ac_status); } &&
39663          { ac_try='test -z "$ac_c_werror_flag"
39664                          || test ! -s conftest.err'
39665   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39666   (eval $ac_try) 2>&5
39667   ac_status=$?
39668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39669   (exit $ac_status); }; } &&
39670          { ac_try='test -s conftest.$ac_objext'
39671   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39672   (eval $ac_try) 2>&5
39673   ac_status=$?
39674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39675   (exit $ac_status); }; }; then
39676   ac_cv_type_sig_atomic_t=yes
39677 else
39678   echo "$as_me: failed program was:" >&5
39679 sed 's/^/| /' conftest.$ac_ext >&5
39680
39681 ac_cv_type_sig_atomic_t=no
39682 fi
39683 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39684 fi
39685 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
39686 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
39687 if test $ac_cv_type_sig_atomic_t = yes; then
39688   :
39689 else
39690
39691 cat >>confdefs.h <<_ACEOF
39692 #define sig_atomic_t int
39693 _ACEOF
39694
39695 fi
39696
39697
39698 echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
39699 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
39700 if test "${ac_cv_type_uid_t+set}" = set; then
39701   echo $ECHO_N "(cached) $ECHO_C" >&6
39702 else
39703   cat >conftest.$ac_ext <<_ACEOF
39704 /* confdefs.h.  */
39705 _ACEOF
39706 cat confdefs.h >>conftest.$ac_ext
39707 cat >>conftest.$ac_ext <<_ACEOF
39708 /* end confdefs.h.  */
39709 #include <sys/types.h>
39710
39711 _ACEOF
39712 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
39713   $EGREP "uid_t" >/dev/null 2>&1; then
39714   ac_cv_type_uid_t=yes
39715 else
39716   ac_cv_type_uid_t=no
39717 fi
39718 rm -f conftest*
39719
39720 fi
39721 echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
39722 echo "${ECHO_T}$ac_cv_type_uid_t" >&6
39723 if test $ac_cv_type_uid_t = no; then
39724
39725 cat >>confdefs.h <<\_ACEOF
39726 #define uid_t int
39727 _ACEOF
39728
39729
39730 cat >>confdefs.h <<\_ACEOF
39731 #define gid_t int
39732 _ACEOF
39733
39734 fi
39735
39736
39737 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
39738 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
39739 if test "${ac_cv_header_time+set}" = set; then
39740   echo $ECHO_N "(cached) $ECHO_C" >&6
39741 else
39742   cat >conftest.$ac_ext <<_ACEOF
39743 /* confdefs.h.  */
39744 _ACEOF
39745 cat confdefs.h >>conftest.$ac_ext
39746 cat >>conftest.$ac_ext <<_ACEOF
39747 /* end confdefs.h.  */
39748 #include <sys/types.h>
39749 #include <sys/time.h>
39750 #include <time.h>
39751
39752 int
39753 main ()
39754 {
39755 if ((struct tm *) 0)
39756 return 0;
39757   ;
39758   return 0;
39759 }
39760 _ACEOF
39761 rm -f conftest.$ac_objext
39762 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39763   (eval $ac_compile) 2>conftest.er1
39764   ac_status=$?
39765   grep -v '^ *+' conftest.er1 >conftest.err
39766   rm -f conftest.er1
39767   cat conftest.err >&5
39768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39769   (exit $ac_status); } &&
39770          { ac_try='test -z "$ac_c_werror_flag"
39771                          || test ! -s conftest.err'
39772   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39773   (eval $ac_try) 2>&5
39774   ac_status=$?
39775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39776   (exit $ac_status); }; } &&
39777          { ac_try='test -s conftest.$ac_objext'
39778   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39779   (eval $ac_try) 2>&5
39780   ac_status=$?
39781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39782   (exit $ac_status); }; }; then
39783   ac_cv_header_time=yes
39784 else
39785   echo "$as_me: failed program was:" >&5
39786 sed 's/^/| /' conftest.$ac_ext >&5
39787
39788 ac_cv_header_time=no
39789 fi
39790 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39791 fi
39792 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
39793 echo "${ECHO_T}$ac_cv_header_time" >&6
39794 if test $ac_cv_header_time = yes; then
39795
39796 cat >>confdefs.h <<\_ACEOF
39797 #define TIME_WITH_SYS_TIME 1
39798 _ACEOF
39799
39800 fi
39801
39802 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
39803 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
39804 if test "${ac_cv_struct_tm+set}" = set; then
39805   echo $ECHO_N "(cached) $ECHO_C" >&6
39806 else
39807   cat >conftest.$ac_ext <<_ACEOF
39808 /* confdefs.h.  */
39809 _ACEOF
39810 cat confdefs.h >>conftest.$ac_ext
39811 cat >>conftest.$ac_ext <<_ACEOF
39812 /* end confdefs.h.  */
39813 #include <sys/types.h>
39814 #include <time.h>
39815
39816 int
39817 main ()
39818 {
39819 struct tm *tp; tp->tm_sec;
39820   ;
39821   return 0;
39822 }
39823 _ACEOF
39824 rm -f conftest.$ac_objext
39825 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39826   (eval $ac_compile) 2>conftest.er1
39827   ac_status=$?
39828   grep -v '^ *+' conftest.er1 >conftest.err
39829   rm -f conftest.er1
39830   cat conftest.err >&5
39831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39832   (exit $ac_status); } &&
39833          { ac_try='test -z "$ac_c_werror_flag"
39834                          || test ! -s conftest.err'
39835   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39836   (eval $ac_try) 2>&5
39837   ac_status=$?
39838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39839   (exit $ac_status); }; } &&
39840          { ac_try='test -s conftest.$ac_objext'
39841   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39842   (eval $ac_try) 2>&5
39843   ac_status=$?
39844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39845   (exit $ac_status); }; }; then
39846   ac_cv_struct_tm=time.h
39847 else
39848   echo "$as_me: failed program was:" >&5
39849 sed 's/^/| /' conftest.$ac_ext >&5
39850
39851 ac_cv_struct_tm=sys/time.h
39852 fi
39853 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39854 fi
39855 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
39856 echo "${ECHO_T}$ac_cv_struct_tm" >&6
39857 if test $ac_cv_struct_tm = sys/time.h; then
39858
39859 cat >>confdefs.h <<\_ACEOF
39860 #define TM_IN_SYS_TIME 1
39861 _ACEOF
39862
39863 fi
39864
39865 echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
39866 echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
39867 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
39868   echo $ECHO_N "(cached) $ECHO_C" >&6
39869 else
39870   cat >conftest.$ac_ext <<_ACEOF
39871 /* confdefs.h.  */
39872 _ACEOF
39873 cat confdefs.h >>conftest.$ac_ext
39874 cat >>conftest.$ac_ext <<_ACEOF
39875 /* end confdefs.h.  */
39876 $ac_includes_default
39877 int
39878 main ()
39879 {
39880 static struct stat ac_aggr;
39881 if (ac_aggr.st_blksize)
39882 return 0;
39883   ;
39884   return 0;
39885 }
39886 _ACEOF
39887 rm -f conftest.$ac_objext
39888 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39889   (eval $ac_compile) 2>conftest.er1
39890   ac_status=$?
39891   grep -v '^ *+' conftest.er1 >conftest.err
39892   rm -f conftest.er1
39893   cat conftest.err >&5
39894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39895   (exit $ac_status); } &&
39896          { ac_try='test -z "$ac_c_werror_flag"
39897                          || test ! -s conftest.err'
39898   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39899   (eval $ac_try) 2>&5
39900   ac_status=$?
39901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39902   (exit $ac_status); }; } &&
39903          { ac_try='test -s conftest.$ac_objext'
39904   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39905   (eval $ac_try) 2>&5
39906   ac_status=$?
39907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39908   (exit $ac_status); }; }; then
39909   ac_cv_member_struct_stat_st_blksize=yes
39910 else
39911   echo "$as_me: failed program was:" >&5
39912 sed 's/^/| /' conftest.$ac_ext >&5
39913
39914 cat >conftest.$ac_ext <<_ACEOF
39915 /* confdefs.h.  */
39916 _ACEOF
39917 cat confdefs.h >>conftest.$ac_ext
39918 cat >>conftest.$ac_ext <<_ACEOF
39919 /* end confdefs.h.  */
39920 $ac_includes_default
39921 int
39922 main ()
39923 {
39924 static struct stat ac_aggr;
39925 if (sizeof ac_aggr.st_blksize)
39926 return 0;
39927   ;
39928   return 0;
39929 }
39930 _ACEOF
39931 rm -f conftest.$ac_objext
39932 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39933   (eval $ac_compile) 2>conftest.er1
39934   ac_status=$?
39935   grep -v '^ *+' conftest.er1 >conftest.err
39936   rm -f conftest.er1
39937   cat conftest.err >&5
39938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39939   (exit $ac_status); } &&
39940          { ac_try='test -z "$ac_c_werror_flag"
39941                          || test ! -s conftest.err'
39942   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39943   (eval $ac_try) 2>&5
39944   ac_status=$?
39945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39946   (exit $ac_status); }; } &&
39947          { ac_try='test -s conftest.$ac_objext'
39948   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39949   (eval $ac_try) 2>&5
39950   ac_status=$?
39951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39952   (exit $ac_status); }; }; then
39953   ac_cv_member_struct_stat_st_blksize=yes
39954 else
39955   echo "$as_me: failed program was:" >&5
39956 sed 's/^/| /' conftest.$ac_ext >&5
39957
39958 ac_cv_member_struct_stat_st_blksize=no
39959 fi
39960 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39961 fi
39962 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39963 fi
39964 echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
39965 echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
39966 if test $ac_cv_member_struct_stat_st_blksize = yes; then
39967
39968 cat >>confdefs.h <<_ACEOF
39969 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
39970 _ACEOF
39971
39972
39973 fi
39974
39975 echo "$as_me:$LINENO: checking for struct passwd.pw_gecos" >&5
39976 echo $ECHO_N "checking for struct passwd.pw_gecos... $ECHO_C" >&6
39977 if test "${ac_cv_member_struct_passwd_pw_gecos+set}" = set; then
39978   echo $ECHO_N "(cached) $ECHO_C" >&6
39979 else
39980   cat >conftest.$ac_ext <<_ACEOF
39981 /* confdefs.h.  */
39982 _ACEOF
39983 cat confdefs.h >>conftest.$ac_ext
39984 cat >>conftest.$ac_ext <<_ACEOF
39985 /* end confdefs.h.  */
39986 $ac_includes_default
39987 #include <pwd.h>
39988
39989 int
39990 main ()
39991 {
39992 static struct passwd ac_aggr;
39993 if (ac_aggr.pw_gecos)
39994 return 0;
39995   ;
39996   return 0;
39997 }
39998 _ACEOF
39999 rm -f conftest.$ac_objext
40000 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40001   (eval $ac_compile) 2>conftest.er1
40002   ac_status=$?
40003   grep -v '^ *+' conftest.er1 >conftest.err
40004   rm -f conftest.er1
40005   cat conftest.err >&5
40006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40007   (exit $ac_status); } &&
40008          { ac_try='test -z "$ac_c_werror_flag"
40009                          || test ! -s conftest.err'
40010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40011   (eval $ac_try) 2>&5
40012   ac_status=$?
40013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40014   (exit $ac_status); }; } &&
40015          { ac_try='test -s conftest.$ac_objext'
40016   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40017   (eval $ac_try) 2>&5
40018   ac_status=$?
40019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40020   (exit $ac_status); }; }; then
40021   ac_cv_member_struct_passwd_pw_gecos=yes
40022 else
40023   echo "$as_me: failed program was:" >&5
40024 sed 's/^/| /' conftest.$ac_ext >&5
40025
40026 cat >conftest.$ac_ext <<_ACEOF
40027 /* confdefs.h.  */
40028 _ACEOF
40029 cat confdefs.h >>conftest.$ac_ext
40030 cat >>conftest.$ac_ext <<_ACEOF
40031 /* end confdefs.h.  */
40032 $ac_includes_default
40033 #include <pwd.h>
40034
40035 int
40036 main ()
40037 {
40038 static struct passwd ac_aggr;
40039 if (sizeof ac_aggr.pw_gecos)
40040 return 0;
40041   ;
40042   return 0;
40043 }
40044 _ACEOF
40045 rm -f conftest.$ac_objext
40046 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40047   (eval $ac_compile) 2>conftest.er1
40048   ac_status=$?
40049   grep -v '^ *+' conftest.er1 >conftest.err
40050   rm -f conftest.er1
40051   cat conftest.err >&5
40052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40053   (exit $ac_status); } &&
40054          { ac_try='test -z "$ac_c_werror_flag"
40055                          || test ! -s conftest.err'
40056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40057   (eval $ac_try) 2>&5
40058   ac_status=$?
40059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40060   (exit $ac_status); }; } &&
40061          { ac_try='test -s conftest.$ac_objext'
40062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40063   (eval $ac_try) 2>&5
40064   ac_status=$?
40065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40066   (exit $ac_status); }; }; then
40067   ac_cv_member_struct_passwd_pw_gecos=yes
40068 else
40069   echo "$as_me: failed program was:" >&5
40070 sed 's/^/| /' conftest.$ac_ext >&5
40071
40072 ac_cv_member_struct_passwd_pw_gecos=no
40073 fi
40074 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40075 fi
40076 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40077 fi
40078 echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_gecos" >&5
40079 echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_gecos" >&6
40080 if test $ac_cv_member_struct_passwd_pw_gecos = yes; then
40081
40082 cat >>confdefs.h <<_ACEOF
40083 #define HAVE_STRUCT_PASSWD_PW_GECOS 1
40084 _ACEOF
40085
40086
40087 fi
40088
40089 echo "$as_me:$LINENO: checking for struct passwd.pw_passwd" >&5
40090 echo $ECHO_N "checking for struct passwd.pw_passwd... $ECHO_C" >&6
40091 if test "${ac_cv_member_struct_passwd_pw_passwd+set}" = set; then
40092   echo $ECHO_N "(cached) $ECHO_C" >&6
40093 else
40094   cat >conftest.$ac_ext <<_ACEOF
40095 /* confdefs.h.  */
40096 _ACEOF
40097 cat confdefs.h >>conftest.$ac_ext
40098 cat >>conftest.$ac_ext <<_ACEOF
40099 /* end confdefs.h.  */
40100 $ac_includes_default
40101 #include <pwd.h>
40102
40103 int
40104 main ()
40105 {
40106 static struct passwd ac_aggr;
40107 if (ac_aggr.pw_passwd)
40108 return 0;
40109   ;
40110   return 0;
40111 }
40112 _ACEOF
40113 rm -f conftest.$ac_objext
40114 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40115   (eval $ac_compile) 2>conftest.er1
40116   ac_status=$?
40117   grep -v '^ *+' conftest.er1 >conftest.err
40118   rm -f conftest.er1
40119   cat conftest.err >&5
40120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40121   (exit $ac_status); } &&
40122          { ac_try='test -z "$ac_c_werror_flag"
40123                          || test ! -s conftest.err'
40124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40125   (eval $ac_try) 2>&5
40126   ac_status=$?
40127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40128   (exit $ac_status); }; } &&
40129          { ac_try='test -s conftest.$ac_objext'
40130   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40131   (eval $ac_try) 2>&5
40132   ac_status=$?
40133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40134   (exit $ac_status); }; }; then
40135   ac_cv_member_struct_passwd_pw_passwd=yes
40136 else
40137   echo "$as_me: failed program was:" >&5
40138 sed 's/^/| /' conftest.$ac_ext >&5
40139
40140 cat >conftest.$ac_ext <<_ACEOF
40141 /* confdefs.h.  */
40142 _ACEOF
40143 cat confdefs.h >>conftest.$ac_ext
40144 cat >>conftest.$ac_ext <<_ACEOF
40145 /* end confdefs.h.  */
40146 $ac_includes_default
40147 #include <pwd.h>
40148
40149 int
40150 main ()
40151 {
40152 static struct passwd ac_aggr;
40153 if (sizeof ac_aggr.pw_passwd)
40154 return 0;
40155   ;
40156   return 0;
40157 }
40158 _ACEOF
40159 rm -f conftest.$ac_objext
40160 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40161   (eval $ac_compile) 2>conftest.er1
40162   ac_status=$?
40163   grep -v '^ *+' conftest.er1 >conftest.err
40164   rm -f conftest.er1
40165   cat conftest.err >&5
40166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40167   (exit $ac_status); } &&
40168          { ac_try='test -z "$ac_c_werror_flag"
40169                          || test ! -s conftest.err'
40170   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40171   (eval $ac_try) 2>&5
40172   ac_status=$?
40173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40174   (exit $ac_status); }; } &&
40175          { ac_try='test -s conftest.$ac_objext'
40176   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40177   (eval $ac_try) 2>&5
40178   ac_status=$?
40179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40180   (exit $ac_status); }; }; then
40181   ac_cv_member_struct_passwd_pw_passwd=yes
40182 else
40183   echo "$as_me: failed program was:" >&5
40184 sed 's/^/| /' conftest.$ac_ext >&5
40185
40186 ac_cv_member_struct_passwd_pw_passwd=no
40187 fi
40188 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40189 fi
40190 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40191 fi
40192 echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_passwd" >&5
40193 echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_passwd" >&6
40194 if test $ac_cv_member_struct_passwd_pw_passwd = yes; then
40195
40196 cat >>confdefs.h <<_ACEOF
40197 #define HAVE_STRUCT_PASSWD_PW_PASSWD 1
40198 _ACEOF
40199
40200
40201 fi
40202
40203
40204 echo "$as_me:$LINENO: checking if toupper() requires islower()" >&5
40205 echo $ECHO_N "checking if toupper() requires islower()... $ECHO_C" >&6
40206 if test "${ol_cv_c_upper_lower+set}" = set; then
40207   echo $ECHO_N "(cached) $ECHO_C" >&6
40208 else
40209
40210         if test "$cross_compiling" = yes; then
40211   ol_cv_c_upper_lower=safe
40212 else
40213   cat >conftest.$ac_ext <<_ACEOF
40214 /* confdefs.h.  */
40215 _ACEOF
40216 cat confdefs.h >>conftest.$ac_ext
40217 cat >>conftest.$ac_ext <<_ACEOF
40218 /* end confdefs.h.  */
40219
40220 #include <ctype.h>
40221 main()
40222 {
40223         if ('C' == toupper('C'))
40224                 exit(0);
40225         else
40226                 exit(1);
40227 }
40228 _ACEOF
40229 rm -f conftest$ac_exeext
40230 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
40231   (eval $ac_link) 2>&5
40232   ac_status=$?
40233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40234   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
40235   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40236   (eval $ac_try) 2>&5
40237   ac_status=$?
40238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40239   (exit $ac_status); }; }; then
40240   ol_cv_c_upper_lower=no
40241 else
40242   echo "$as_me: program exited with status $ac_status" >&5
40243 echo "$as_me: failed program was:" >&5
40244 sed 's/^/| /' conftest.$ac_ext >&5
40245
40246 ( exit $ac_status )
40247 ol_cv_c_upper_lower=yes
40248 fi
40249 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
40250 fi
40251 fi
40252 echo "$as_me:$LINENO: result: $ol_cv_c_upper_lower" >&5
40253 echo "${ECHO_T}$ol_cv_c_upper_lower" >&6
40254 if test $ol_cv_c_upper_lower != no ; then
40255
40256 cat >>confdefs.h <<\_ACEOF
40257 #define C_UPPER_LOWER 1
40258 _ACEOF
40259
40260 fi
40261
40262 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
40263 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
40264 if test "${ac_cv_c_const+set}" = set; then
40265   echo $ECHO_N "(cached) $ECHO_C" >&6
40266 else
40267   cat >conftest.$ac_ext <<_ACEOF
40268 /* confdefs.h.  */
40269 _ACEOF
40270 cat confdefs.h >>conftest.$ac_ext
40271 cat >>conftest.$ac_ext <<_ACEOF
40272 /* end confdefs.h.  */
40273
40274 int
40275 main ()
40276 {
40277 /* FIXME: Include the comments suggested by Paul. */
40278 #ifndef __cplusplus
40279   /* Ultrix mips cc rejects this.  */
40280   typedef int charset[2];
40281   const charset x;
40282   /* SunOS 4.1.1 cc rejects this.  */
40283   char const *const *ccp;
40284   char **p;
40285   /* NEC SVR4.0.2 mips cc rejects this.  */
40286   struct point {int x, y;};
40287   static struct point const zero = {0,0};
40288   /* AIX XL C 1.02.0.0 rejects this.
40289      It does not let you subtract one const X* pointer from another in
40290      an arm of an if-expression whose if-part is not a constant
40291      expression */
40292   const char *g = "string";
40293   ccp = &g + (g ? g-g : 0);
40294   /* HPUX 7.0 cc rejects these. */
40295   ++ccp;
40296   p = (char**) ccp;
40297   ccp = (char const *const *) p;
40298   { /* SCO 3.2v4 cc rejects this.  */
40299     char *t;
40300     char const *s = 0 ? (char *) 0 : (char const *) 0;
40301
40302     *t++ = 0;
40303   }
40304   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
40305     int x[] = {25, 17};
40306     const int *foo = &x[0];
40307     ++foo;
40308   }
40309   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
40310     typedef const int *iptr;
40311     iptr p = 0;
40312     ++p;
40313   }
40314   { /* AIX XL C 1.02.0.0 rejects this saying
40315        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
40316     struct s { int j; const int *ap[3]; };
40317     struct s *b; b->j = 5;
40318   }
40319   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
40320     const int foo = 10;
40321   }
40322 #endif
40323
40324   ;
40325   return 0;
40326 }
40327 _ACEOF
40328 rm -f conftest.$ac_objext
40329 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40330   (eval $ac_compile) 2>conftest.er1
40331   ac_status=$?
40332   grep -v '^ *+' conftest.er1 >conftest.err
40333   rm -f conftest.er1
40334   cat conftest.err >&5
40335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40336   (exit $ac_status); } &&
40337          { ac_try='test -z "$ac_c_werror_flag"
40338                          || test ! -s conftest.err'
40339   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40340   (eval $ac_try) 2>&5
40341   ac_status=$?
40342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40343   (exit $ac_status); }; } &&
40344          { ac_try='test -s conftest.$ac_objext'
40345   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40346   (eval $ac_try) 2>&5
40347   ac_status=$?
40348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40349   (exit $ac_status); }; }; then
40350   ac_cv_c_const=yes
40351 else
40352   echo "$as_me: failed program was:" >&5
40353 sed 's/^/| /' conftest.$ac_ext >&5
40354
40355 ac_cv_c_const=no
40356 fi
40357 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40358 fi
40359 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
40360 echo "${ECHO_T}$ac_cv_c_const" >&6
40361 if test $ac_cv_c_const = no; then
40362
40363 cat >>confdefs.h <<\_ACEOF
40364 #define const
40365 _ACEOF
40366
40367 fi
40368
40369 echo "$as_me:$LINENO: checking if compiler understands volatile" >&5
40370 echo $ECHO_N "checking if compiler understands volatile... $ECHO_C" >&6
40371 if test "${ol_cv_c_volatile+set}" = set; then
40372   echo $ECHO_N "(cached) $ECHO_C" >&6
40373 else
40374   cat >conftest.$ac_ext <<_ACEOF
40375 /* confdefs.h.  */
40376 _ACEOF
40377 cat confdefs.h >>conftest.$ac_ext
40378 cat >>conftest.$ac_ext <<_ACEOF
40379 /* end confdefs.h.  */
40380 int x, y, z;
40381 int
40382 main ()
40383 {
40384 volatile int a; int * volatile b = x ? &y : &z;
40385       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
40386       *b = 0;
40387   ;
40388   return 0;
40389 }
40390 _ACEOF
40391 rm -f conftest.$ac_objext
40392 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40393   (eval $ac_compile) 2>conftest.er1
40394   ac_status=$?
40395   grep -v '^ *+' conftest.er1 >conftest.err
40396   rm -f conftest.er1
40397   cat conftest.err >&5
40398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40399   (exit $ac_status); } &&
40400          { ac_try='test -z "$ac_c_werror_flag"
40401                          || test ! -s conftest.err'
40402   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40403   (eval $ac_try) 2>&5
40404   ac_status=$?
40405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40406   (exit $ac_status); }; } &&
40407          { ac_try='test -s conftest.$ac_objext'
40408   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40409   (eval $ac_try) 2>&5
40410   ac_status=$?
40411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40412   (exit $ac_status); }; }; then
40413   ol_cv_c_volatile=yes
40414 else
40415   echo "$as_me: failed program was:" >&5
40416 sed 's/^/| /' conftest.$ac_ext >&5
40417
40418 ol_cv_c_volatile=no
40419 fi
40420 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40421 fi
40422 echo "$as_me:$LINENO: result: $ol_cv_c_volatile" >&5
40423 echo "${ECHO_T}$ol_cv_c_volatile" >&6
40424   if test $ol_cv_c_volatile = yes; then
40425     :
40426   else
40427
40428 cat >>confdefs.h <<\_ACEOF
40429 #define volatile
40430 _ACEOF
40431
40432   fi
40433
40434
40435 if test $cross_compiling = yes ; then
40436         { echo "$as_me:$LINENO: WARNING: Crossing compiling... all bets are off!" >&5
40437 echo "$as_me: WARNING: Crossing compiling... all bets are off!" >&2;}
40438
40439 cat >>confdefs.h <<\_ACEOF
40440 #define CROSS_COMPILING 1
40441 _ACEOF
40442
40443 else
40444         echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
40445 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
40446 if test "${ac_cv_c_bigendian+set}" = set; then
40447   echo $ECHO_N "(cached) $ECHO_C" >&6
40448 else
40449   # See if sys/param.h defines the BYTE_ORDER macro.
40450 cat >conftest.$ac_ext <<_ACEOF
40451 /* confdefs.h.  */
40452 _ACEOF
40453 cat confdefs.h >>conftest.$ac_ext
40454 cat >>conftest.$ac_ext <<_ACEOF
40455 /* end confdefs.h.  */
40456 #include <sys/types.h>
40457 #include <sys/param.h>
40458
40459 int
40460 main ()
40461 {
40462 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
40463  bogus endian macros
40464 #endif
40465
40466   ;
40467   return 0;
40468 }
40469 _ACEOF
40470 rm -f conftest.$ac_objext
40471 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40472   (eval $ac_compile) 2>conftest.er1
40473   ac_status=$?
40474   grep -v '^ *+' conftest.er1 >conftest.err
40475   rm -f conftest.er1
40476   cat conftest.err >&5
40477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40478   (exit $ac_status); } &&
40479          { ac_try='test -z "$ac_c_werror_flag"
40480                          || test ! -s conftest.err'
40481   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40482   (eval $ac_try) 2>&5
40483   ac_status=$?
40484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40485   (exit $ac_status); }; } &&
40486          { ac_try='test -s conftest.$ac_objext'
40487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40488   (eval $ac_try) 2>&5
40489   ac_status=$?
40490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40491   (exit $ac_status); }; }; then
40492   # It does; now see whether it defined to BIG_ENDIAN or not.
40493 cat >conftest.$ac_ext <<_ACEOF
40494 /* confdefs.h.  */
40495 _ACEOF
40496 cat confdefs.h >>conftest.$ac_ext
40497 cat >>conftest.$ac_ext <<_ACEOF
40498 /* end confdefs.h.  */
40499 #include <sys/types.h>
40500 #include <sys/param.h>
40501
40502 int
40503 main ()
40504 {
40505 #if BYTE_ORDER != BIG_ENDIAN
40506  not big endian
40507 #endif
40508
40509   ;
40510   return 0;
40511 }
40512 _ACEOF
40513 rm -f conftest.$ac_objext
40514 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40515   (eval $ac_compile) 2>conftest.er1
40516   ac_status=$?
40517   grep -v '^ *+' conftest.er1 >conftest.err
40518   rm -f conftest.er1
40519   cat conftest.err >&5
40520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40521   (exit $ac_status); } &&
40522          { ac_try='test -z "$ac_c_werror_flag"
40523                          || test ! -s conftest.err'
40524   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40525   (eval $ac_try) 2>&5
40526   ac_status=$?
40527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40528   (exit $ac_status); }; } &&
40529          { ac_try='test -s conftest.$ac_objext'
40530   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40531   (eval $ac_try) 2>&5
40532   ac_status=$?
40533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40534   (exit $ac_status); }; }; then
40535   ac_cv_c_bigendian=yes
40536 else
40537   echo "$as_me: failed program was:" >&5
40538 sed 's/^/| /' conftest.$ac_ext >&5
40539
40540 ac_cv_c_bigendian=no
40541 fi
40542 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40543 else
40544   echo "$as_me: failed program was:" >&5
40545 sed 's/^/| /' conftest.$ac_ext >&5
40546
40547 # It does not; compile a test program.
40548 if test "$cross_compiling" = yes; then
40549   # try to guess the endianness by grepping values into an object file
40550   ac_cv_c_bigendian=unknown
40551   cat >conftest.$ac_ext <<_ACEOF
40552 /* confdefs.h.  */
40553 _ACEOF
40554 cat confdefs.h >>conftest.$ac_ext
40555 cat >>conftest.$ac_ext <<_ACEOF
40556 /* end confdefs.h.  */
40557 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
40558 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
40559 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
40560 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
40561 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
40562 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
40563 int
40564 main ()
40565 {
40566  _ascii (); _ebcdic ();
40567   ;
40568   return 0;
40569 }
40570 _ACEOF
40571 rm -f conftest.$ac_objext
40572 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40573   (eval $ac_compile) 2>conftest.er1
40574   ac_status=$?
40575   grep -v '^ *+' conftest.er1 >conftest.err
40576   rm -f conftest.er1
40577   cat conftest.err >&5
40578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40579   (exit $ac_status); } &&
40580          { ac_try='test -z "$ac_c_werror_flag"
40581                          || test ! -s conftest.err'
40582   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40583   (eval $ac_try) 2>&5
40584   ac_status=$?
40585   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40586   (exit $ac_status); }; } &&
40587          { ac_try='test -s conftest.$ac_objext'
40588   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40589   (eval $ac_try) 2>&5
40590   ac_status=$?
40591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40592   (exit $ac_status); }; }; then
40593   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
40594   ac_cv_c_bigendian=yes
40595 fi
40596 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
40597   if test "$ac_cv_c_bigendian" = unknown; then
40598     ac_cv_c_bigendian=no
40599   else
40600     # finding both strings is unlikely to happen, but who knows?
40601     ac_cv_c_bigendian=unknown
40602   fi
40603 fi
40604 else
40605   echo "$as_me: failed program was:" >&5
40606 sed 's/^/| /' conftest.$ac_ext >&5
40607
40608 fi
40609 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40610 else
40611   cat >conftest.$ac_ext <<_ACEOF
40612 /* confdefs.h.  */
40613 _ACEOF
40614 cat confdefs.h >>conftest.$ac_ext
40615 cat >>conftest.$ac_ext <<_ACEOF
40616 /* end confdefs.h.  */
40617 int
40618 main ()
40619 {
40620   /* Are we little or big endian?  From Harbison&Steele.  */
40621   union
40622   {
40623     long l;
40624     char c[sizeof (long)];
40625   } u;
40626   u.l = 1;
40627   exit (u.c[sizeof (long) - 1] == 1);
40628 }
40629 _ACEOF
40630 rm -f conftest$ac_exeext
40631 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
40632   (eval $ac_link) 2>&5
40633   ac_status=$?
40634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40635   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
40636   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40637   (eval $ac_try) 2>&5
40638   ac_status=$?
40639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40640   (exit $ac_status); }; }; then
40641   ac_cv_c_bigendian=no
40642 else
40643   echo "$as_me: program exited with status $ac_status" >&5
40644 echo "$as_me: failed program was:" >&5
40645 sed 's/^/| /' conftest.$ac_ext >&5
40646
40647 ( exit $ac_status )
40648 ac_cv_c_bigendian=yes
40649 fi
40650 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
40651 fi
40652 fi
40653 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40654 fi
40655 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
40656 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
40657 case $ac_cv_c_bigendian in
40658   yes)
40659
40660 cat >>confdefs.h <<\_ACEOF
40661 #define WORDS_BIGENDIAN 1
40662 _ACEOF
40663  ;;
40664   no)
40665      ;;
40666   *)
40667     { { echo "$as_me:$LINENO: error: unknown endianness
40668 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
40669 echo "$as_me: error: unknown endianness
40670 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
40671    { (exit 1); exit 1; }; } ;;
40672 esac
40673
40674 fi
40675
40676 echo "$as_me:$LINENO: checking for short" >&5
40677 echo $ECHO_N "checking for short... $ECHO_C" >&6
40678 if test "${ac_cv_type_short+set}" = set; then
40679   echo $ECHO_N "(cached) $ECHO_C" >&6
40680 else
40681   cat >conftest.$ac_ext <<_ACEOF
40682 /* confdefs.h.  */
40683 _ACEOF
40684 cat confdefs.h >>conftest.$ac_ext
40685 cat >>conftest.$ac_ext <<_ACEOF
40686 /* end confdefs.h.  */
40687 $ac_includes_default
40688 int
40689 main ()
40690 {
40691 if ((short *) 0)
40692   return 0;
40693 if (sizeof (short))
40694   return 0;
40695   ;
40696   return 0;
40697 }
40698 _ACEOF
40699 rm -f conftest.$ac_objext
40700 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40701   (eval $ac_compile) 2>conftest.er1
40702   ac_status=$?
40703   grep -v '^ *+' conftest.er1 >conftest.err
40704   rm -f conftest.er1
40705   cat conftest.err >&5
40706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40707   (exit $ac_status); } &&
40708          { ac_try='test -z "$ac_c_werror_flag"
40709                          || test ! -s conftest.err'
40710   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40711   (eval $ac_try) 2>&5
40712   ac_status=$?
40713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40714   (exit $ac_status); }; } &&
40715          { ac_try='test -s conftest.$ac_objext'
40716   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40717   (eval $ac_try) 2>&5
40718   ac_status=$?
40719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40720   (exit $ac_status); }; }; then
40721   ac_cv_type_short=yes
40722 else
40723   echo "$as_me: failed program was:" >&5
40724 sed 's/^/| /' conftest.$ac_ext >&5
40725
40726 ac_cv_type_short=no
40727 fi
40728 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40729 fi
40730 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
40731 echo "${ECHO_T}$ac_cv_type_short" >&6
40732
40733 echo "$as_me:$LINENO: checking size of short" >&5
40734 echo $ECHO_N "checking size of short... $ECHO_C" >&6
40735 if test "${ac_cv_sizeof_short+set}" = set; then
40736   echo $ECHO_N "(cached) $ECHO_C" >&6
40737 else
40738   if test "$ac_cv_type_short" = yes; then
40739   # The cast to unsigned long works around a bug in the HP C Compiler
40740   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40741   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40742   # This bug is HP SR number 8606223364.
40743   if test "$cross_compiling" = yes; then
40744   # Depending upon the size, compute the lo and hi bounds.
40745 cat >conftest.$ac_ext <<_ACEOF
40746 /* confdefs.h.  */
40747 _ACEOF
40748 cat confdefs.h >>conftest.$ac_ext
40749 cat >>conftest.$ac_ext <<_ACEOF
40750 /* end confdefs.h.  */
40751 $ac_includes_default
40752 int
40753 main ()
40754 {
40755 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
40756 test_array [0] = 0
40757
40758   ;
40759   return 0;
40760 }
40761 _ACEOF
40762 rm -f conftest.$ac_objext
40763 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40764   (eval $ac_compile) 2>conftest.er1
40765   ac_status=$?
40766   grep -v '^ *+' conftest.er1 >conftest.err
40767   rm -f conftest.er1
40768   cat conftest.err >&5
40769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40770   (exit $ac_status); } &&
40771          { ac_try='test -z "$ac_c_werror_flag"
40772                          || test ! -s conftest.err'
40773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40774   (eval $ac_try) 2>&5
40775   ac_status=$?
40776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40777   (exit $ac_status); }; } &&
40778          { ac_try='test -s conftest.$ac_objext'
40779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40780   (eval $ac_try) 2>&5
40781   ac_status=$?
40782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40783   (exit $ac_status); }; }; then
40784   ac_lo=0 ac_mid=0
40785   while :; do
40786     cat >conftest.$ac_ext <<_ACEOF
40787 /* confdefs.h.  */
40788 _ACEOF
40789 cat confdefs.h >>conftest.$ac_ext
40790 cat >>conftest.$ac_ext <<_ACEOF
40791 /* end confdefs.h.  */
40792 $ac_includes_default
40793 int
40794 main ()
40795 {
40796 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
40797 test_array [0] = 0
40798
40799   ;
40800   return 0;
40801 }
40802 _ACEOF
40803 rm -f conftest.$ac_objext
40804 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40805   (eval $ac_compile) 2>conftest.er1
40806   ac_status=$?
40807   grep -v '^ *+' conftest.er1 >conftest.err
40808   rm -f conftest.er1
40809   cat conftest.err >&5
40810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40811   (exit $ac_status); } &&
40812          { ac_try='test -z "$ac_c_werror_flag"
40813                          || test ! -s conftest.err'
40814   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40815   (eval $ac_try) 2>&5
40816   ac_status=$?
40817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40818   (exit $ac_status); }; } &&
40819          { ac_try='test -s conftest.$ac_objext'
40820   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40821   (eval $ac_try) 2>&5
40822   ac_status=$?
40823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40824   (exit $ac_status); }; }; then
40825   ac_hi=$ac_mid; break
40826 else
40827   echo "$as_me: failed program was:" >&5
40828 sed 's/^/| /' conftest.$ac_ext >&5
40829
40830 ac_lo=`expr $ac_mid + 1`
40831                     if test $ac_lo -le $ac_mid; then
40832                       ac_lo= ac_hi=
40833                       break
40834                     fi
40835                     ac_mid=`expr 2 '*' $ac_mid + 1`
40836 fi
40837 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40838   done
40839 else
40840   echo "$as_me: failed program was:" >&5
40841 sed 's/^/| /' conftest.$ac_ext >&5
40842
40843 cat >conftest.$ac_ext <<_ACEOF
40844 /* confdefs.h.  */
40845 _ACEOF
40846 cat confdefs.h >>conftest.$ac_ext
40847 cat >>conftest.$ac_ext <<_ACEOF
40848 /* end confdefs.h.  */
40849 $ac_includes_default
40850 int
40851 main ()
40852 {
40853 static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
40854 test_array [0] = 0
40855
40856   ;
40857   return 0;
40858 }
40859 _ACEOF
40860 rm -f conftest.$ac_objext
40861 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40862   (eval $ac_compile) 2>conftest.er1
40863   ac_status=$?
40864   grep -v '^ *+' conftest.er1 >conftest.err
40865   rm -f conftest.er1
40866   cat conftest.err >&5
40867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40868   (exit $ac_status); } &&
40869          { ac_try='test -z "$ac_c_werror_flag"
40870                          || test ! -s conftest.err'
40871   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40872   (eval $ac_try) 2>&5
40873   ac_status=$?
40874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40875   (exit $ac_status); }; } &&
40876          { ac_try='test -s conftest.$ac_objext'
40877   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40878   (eval $ac_try) 2>&5
40879   ac_status=$?
40880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40881   (exit $ac_status); }; }; then
40882   ac_hi=-1 ac_mid=-1
40883   while :; do
40884     cat >conftest.$ac_ext <<_ACEOF
40885 /* confdefs.h.  */
40886 _ACEOF
40887 cat confdefs.h >>conftest.$ac_ext
40888 cat >>conftest.$ac_ext <<_ACEOF
40889 /* end confdefs.h.  */
40890 $ac_includes_default
40891 int
40892 main ()
40893 {
40894 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
40895 test_array [0] = 0
40896
40897   ;
40898   return 0;
40899 }
40900 _ACEOF
40901 rm -f conftest.$ac_objext
40902 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40903   (eval $ac_compile) 2>conftest.er1
40904   ac_status=$?
40905   grep -v '^ *+' conftest.er1 >conftest.err
40906   rm -f conftest.er1
40907   cat conftest.err >&5
40908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40909   (exit $ac_status); } &&
40910          { ac_try='test -z "$ac_c_werror_flag"
40911                          || test ! -s conftest.err'
40912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40913   (eval $ac_try) 2>&5
40914   ac_status=$?
40915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40916   (exit $ac_status); }; } &&
40917          { ac_try='test -s conftest.$ac_objext'
40918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40919   (eval $ac_try) 2>&5
40920   ac_status=$?
40921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40922   (exit $ac_status); }; }; then
40923   ac_lo=$ac_mid; break
40924 else
40925   echo "$as_me: failed program was:" >&5
40926 sed 's/^/| /' conftest.$ac_ext >&5
40927
40928 ac_hi=`expr '(' $ac_mid ')' - 1`
40929                        if test $ac_mid -le $ac_hi; then
40930                          ac_lo= ac_hi=
40931                          break
40932                        fi
40933                        ac_mid=`expr 2 '*' $ac_mid`
40934 fi
40935 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40936   done
40937 else
40938   echo "$as_me: failed program was:" >&5
40939 sed 's/^/| /' conftest.$ac_ext >&5
40940
40941 ac_lo= ac_hi=
40942 fi
40943 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40944 fi
40945 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40946 # Binary search between lo and hi bounds.
40947 while test "x$ac_lo" != "x$ac_hi"; do
40948   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
40949   cat >conftest.$ac_ext <<_ACEOF
40950 /* confdefs.h.  */
40951 _ACEOF
40952 cat confdefs.h >>conftest.$ac_ext
40953 cat >>conftest.$ac_ext <<_ACEOF
40954 /* end confdefs.h.  */
40955 $ac_includes_default
40956 int
40957 main ()
40958 {
40959 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
40960 test_array [0] = 0
40961
40962   ;
40963   return 0;
40964 }
40965 _ACEOF
40966 rm -f conftest.$ac_objext
40967 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40968   (eval $ac_compile) 2>conftest.er1
40969   ac_status=$?
40970   grep -v '^ *+' conftest.er1 >conftest.err
40971   rm -f conftest.er1
40972   cat conftest.err >&5
40973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40974   (exit $ac_status); } &&
40975          { ac_try='test -z "$ac_c_werror_flag"
40976                          || test ! -s conftest.err'
40977   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40978   (eval $ac_try) 2>&5
40979   ac_status=$?
40980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40981   (exit $ac_status); }; } &&
40982          { ac_try='test -s conftest.$ac_objext'
40983   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40984   (eval $ac_try) 2>&5
40985   ac_status=$?
40986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40987   (exit $ac_status); }; }; then
40988   ac_hi=$ac_mid
40989 else
40990   echo "$as_me: failed program was:" >&5
40991 sed 's/^/| /' conftest.$ac_ext >&5
40992
40993 ac_lo=`expr '(' $ac_mid ')' + 1`
40994 fi
40995 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40996 done
40997 case $ac_lo in
40998 ?*) ac_cv_sizeof_short=$ac_lo;;
40999 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
41000 See \`config.log' for more details." >&5
41001 echo "$as_me: error: cannot compute sizeof (short), 77
41002 See \`config.log' for more details." >&2;}
41003    { (exit 1); exit 1; }; } ;;
41004 esac
41005 else
41006   if test "$cross_compiling" = yes; then
41007   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
41008 See \`config.log' for more details." >&5
41009 echo "$as_me: error: cannot run test program while cross compiling
41010 See \`config.log' for more details." >&2;}
41011    { (exit 1); exit 1; }; }
41012 else
41013   cat >conftest.$ac_ext <<_ACEOF
41014 /* confdefs.h.  */
41015 _ACEOF
41016 cat confdefs.h >>conftest.$ac_ext
41017 cat >>conftest.$ac_ext <<_ACEOF
41018 /* end confdefs.h.  */
41019 $ac_includes_default
41020 long longval () { return (long) (sizeof (short)); }
41021 unsigned long ulongval () { return (long) (sizeof (short)); }
41022 #include <stdio.h>
41023 #include <stdlib.h>
41024 int
41025 main ()
41026 {
41027
41028   FILE *f = fopen ("conftest.val", "w");
41029   if (! f)
41030     exit (1);
41031   if (((long) (sizeof (short))) < 0)
41032     {
41033       long i = longval ();
41034       if (i != ((long) (sizeof (short))))
41035         exit (1);
41036       fprintf (f, "%ld\n", i);
41037     }
41038   else
41039     {
41040       unsigned long i = ulongval ();
41041       if (i != ((long) (sizeof (short))))
41042         exit (1);
41043       fprintf (f, "%lu\n", i);
41044     }
41045   exit (ferror (f) || fclose (f) != 0);
41046
41047   ;
41048   return 0;
41049 }
41050 _ACEOF
41051 rm -f conftest$ac_exeext
41052 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
41053   (eval $ac_link) 2>&5
41054   ac_status=$?
41055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41056   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
41057   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41058   (eval $ac_try) 2>&5
41059   ac_status=$?
41060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41061   (exit $ac_status); }; }; then
41062   ac_cv_sizeof_short=`cat conftest.val`
41063 else
41064   echo "$as_me: program exited with status $ac_status" >&5
41065 echo "$as_me: failed program was:" >&5
41066 sed 's/^/| /' conftest.$ac_ext >&5
41067
41068 ( exit $ac_status )
41069 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
41070 See \`config.log' for more details." >&5
41071 echo "$as_me: error: cannot compute sizeof (short), 77
41072 See \`config.log' for more details." >&2;}
41073    { (exit 1); exit 1; }; }
41074 fi
41075 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
41076 fi
41077 fi
41078 rm -f conftest.val
41079 else
41080   ac_cv_sizeof_short=0
41081 fi
41082 fi
41083 echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
41084 echo "${ECHO_T}$ac_cv_sizeof_short" >&6
41085 cat >>confdefs.h <<_ACEOF
41086 #define SIZEOF_SHORT $ac_cv_sizeof_short
41087 _ACEOF
41088
41089
41090 echo "$as_me:$LINENO: checking for int" >&5
41091 echo $ECHO_N "checking for int... $ECHO_C" >&6
41092 if test "${ac_cv_type_int+set}" = set; then
41093   echo $ECHO_N "(cached) $ECHO_C" >&6
41094 else
41095   cat >conftest.$ac_ext <<_ACEOF
41096 /* confdefs.h.  */
41097 _ACEOF
41098 cat confdefs.h >>conftest.$ac_ext
41099 cat >>conftest.$ac_ext <<_ACEOF
41100 /* end confdefs.h.  */
41101 $ac_includes_default
41102 int
41103 main ()
41104 {
41105 if ((int *) 0)
41106   return 0;
41107 if (sizeof (int))
41108   return 0;
41109   ;
41110   return 0;
41111 }
41112 _ACEOF
41113 rm -f conftest.$ac_objext
41114 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41115   (eval $ac_compile) 2>conftest.er1
41116   ac_status=$?
41117   grep -v '^ *+' conftest.er1 >conftest.err
41118   rm -f conftest.er1
41119   cat conftest.err >&5
41120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41121   (exit $ac_status); } &&
41122          { ac_try='test -z "$ac_c_werror_flag"
41123                          || test ! -s conftest.err'
41124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41125   (eval $ac_try) 2>&5
41126   ac_status=$?
41127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41128   (exit $ac_status); }; } &&
41129          { ac_try='test -s conftest.$ac_objext'
41130   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41131   (eval $ac_try) 2>&5
41132   ac_status=$?
41133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41134   (exit $ac_status); }; }; then
41135   ac_cv_type_int=yes
41136 else
41137   echo "$as_me: failed program was:" >&5
41138 sed 's/^/| /' conftest.$ac_ext >&5
41139
41140 ac_cv_type_int=no
41141 fi
41142 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41143 fi
41144 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
41145 echo "${ECHO_T}$ac_cv_type_int" >&6
41146
41147 echo "$as_me:$LINENO: checking size of int" >&5
41148 echo $ECHO_N "checking size of int... $ECHO_C" >&6
41149 if test "${ac_cv_sizeof_int+set}" = set; then
41150   echo $ECHO_N "(cached) $ECHO_C" >&6
41151 else
41152   if test "$ac_cv_type_int" = yes; then
41153   # The cast to unsigned long works around a bug in the HP C Compiler
41154   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41155   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41156   # This bug is HP SR number 8606223364.
41157   if test "$cross_compiling" = yes; then
41158   # Depending upon the size, compute the lo and hi bounds.
41159 cat >conftest.$ac_ext <<_ACEOF
41160 /* confdefs.h.  */
41161 _ACEOF
41162 cat confdefs.h >>conftest.$ac_ext
41163 cat >>conftest.$ac_ext <<_ACEOF
41164 /* end confdefs.h.  */
41165 $ac_includes_default
41166 int
41167 main ()
41168 {
41169 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
41170 test_array [0] = 0
41171
41172   ;
41173   return 0;
41174 }
41175 _ACEOF
41176 rm -f conftest.$ac_objext
41177 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41178   (eval $ac_compile) 2>conftest.er1
41179   ac_status=$?
41180   grep -v '^ *+' conftest.er1 >conftest.err
41181   rm -f conftest.er1
41182   cat conftest.err >&5
41183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41184   (exit $ac_status); } &&
41185          { ac_try='test -z "$ac_c_werror_flag"
41186                          || test ! -s conftest.err'
41187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41188   (eval $ac_try) 2>&5
41189   ac_status=$?
41190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41191   (exit $ac_status); }; } &&
41192          { ac_try='test -s conftest.$ac_objext'
41193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41194   (eval $ac_try) 2>&5
41195   ac_status=$?
41196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41197   (exit $ac_status); }; }; then
41198   ac_lo=0 ac_mid=0
41199   while :; do
41200     cat >conftest.$ac_ext <<_ACEOF
41201 /* confdefs.h.  */
41202 _ACEOF
41203 cat confdefs.h >>conftest.$ac_ext
41204 cat >>conftest.$ac_ext <<_ACEOF
41205 /* end confdefs.h.  */
41206 $ac_includes_default
41207 int
41208 main ()
41209 {
41210 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
41211 test_array [0] = 0
41212
41213   ;
41214   return 0;
41215 }
41216 _ACEOF
41217 rm -f conftest.$ac_objext
41218 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41219   (eval $ac_compile) 2>conftest.er1
41220   ac_status=$?
41221   grep -v '^ *+' conftest.er1 >conftest.err
41222   rm -f conftest.er1
41223   cat conftest.err >&5
41224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41225   (exit $ac_status); } &&
41226          { ac_try='test -z "$ac_c_werror_flag"
41227                          || test ! -s conftest.err'
41228   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41229   (eval $ac_try) 2>&5
41230   ac_status=$?
41231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41232   (exit $ac_status); }; } &&
41233          { ac_try='test -s conftest.$ac_objext'
41234   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41235   (eval $ac_try) 2>&5
41236   ac_status=$?
41237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41238   (exit $ac_status); }; }; then
41239   ac_hi=$ac_mid; break
41240 else
41241   echo "$as_me: failed program was:" >&5
41242 sed 's/^/| /' conftest.$ac_ext >&5
41243
41244 ac_lo=`expr $ac_mid + 1`
41245                     if test $ac_lo -le $ac_mid; then
41246                       ac_lo= ac_hi=
41247                       break
41248                     fi
41249                     ac_mid=`expr 2 '*' $ac_mid + 1`
41250 fi
41251 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41252   done
41253 else
41254   echo "$as_me: failed program was:" >&5
41255 sed 's/^/| /' conftest.$ac_ext >&5
41256
41257 cat >conftest.$ac_ext <<_ACEOF
41258 /* confdefs.h.  */
41259 _ACEOF
41260 cat confdefs.h >>conftest.$ac_ext
41261 cat >>conftest.$ac_ext <<_ACEOF
41262 /* end confdefs.h.  */
41263 $ac_includes_default
41264 int
41265 main ()
41266 {
41267 static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
41268 test_array [0] = 0
41269
41270   ;
41271   return 0;
41272 }
41273 _ACEOF
41274 rm -f conftest.$ac_objext
41275 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41276   (eval $ac_compile) 2>conftest.er1
41277   ac_status=$?
41278   grep -v '^ *+' conftest.er1 >conftest.err
41279   rm -f conftest.er1
41280   cat conftest.err >&5
41281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41282   (exit $ac_status); } &&
41283          { ac_try='test -z "$ac_c_werror_flag"
41284                          || test ! -s conftest.err'
41285   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41286   (eval $ac_try) 2>&5
41287   ac_status=$?
41288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41289   (exit $ac_status); }; } &&
41290          { ac_try='test -s conftest.$ac_objext'
41291   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41292   (eval $ac_try) 2>&5
41293   ac_status=$?
41294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41295   (exit $ac_status); }; }; then
41296   ac_hi=-1 ac_mid=-1
41297   while :; do
41298     cat >conftest.$ac_ext <<_ACEOF
41299 /* confdefs.h.  */
41300 _ACEOF
41301 cat confdefs.h >>conftest.$ac_ext
41302 cat >>conftest.$ac_ext <<_ACEOF
41303 /* end confdefs.h.  */
41304 $ac_includes_default
41305 int
41306 main ()
41307 {
41308 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
41309 test_array [0] = 0
41310
41311   ;
41312   return 0;
41313 }
41314 _ACEOF
41315 rm -f conftest.$ac_objext
41316 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41317   (eval $ac_compile) 2>conftest.er1
41318   ac_status=$?
41319   grep -v '^ *+' conftest.er1 >conftest.err
41320   rm -f conftest.er1
41321   cat conftest.err >&5
41322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41323   (exit $ac_status); } &&
41324          { ac_try='test -z "$ac_c_werror_flag"
41325                          || test ! -s conftest.err'
41326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41327   (eval $ac_try) 2>&5
41328   ac_status=$?
41329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41330   (exit $ac_status); }; } &&
41331          { ac_try='test -s conftest.$ac_objext'
41332   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41333   (eval $ac_try) 2>&5
41334   ac_status=$?
41335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41336   (exit $ac_status); }; }; then
41337   ac_lo=$ac_mid; break
41338 else
41339   echo "$as_me: failed program was:" >&5
41340 sed 's/^/| /' conftest.$ac_ext >&5
41341
41342 ac_hi=`expr '(' $ac_mid ')' - 1`
41343                        if test $ac_mid -le $ac_hi; then
41344                          ac_lo= ac_hi=
41345                          break
41346                        fi
41347                        ac_mid=`expr 2 '*' $ac_mid`
41348 fi
41349 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41350   done
41351 else
41352   echo "$as_me: failed program was:" >&5
41353 sed 's/^/| /' conftest.$ac_ext >&5
41354
41355 ac_lo= ac_hi=
41356 fi
41357 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41358 fi
41359 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41360 # Binary search between lo and hi bounds.
41361 while test "x$ac_lo" != "x$ac_hi"; do
41362   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
41363   cat >conftest.$ac_ext <<_ACEOF
41364 /* confdefs.h.  */
41365 _ACEOF
41366 cat confdefs.h >>conftest.$ac_ext
41367 cat >>conftest.$ac_ext <<_ACEOF
41368 /* end confdefs.h.  */
41369 $ac_includes_default
41370 int
41371 main ()
41372 {
41373 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
41374 test_array [0] = 0
41375
41376   ;
41377   return 0;
41378 }
41379 _ACEOF
41380 rm -f conftest.$ac_objext
41381 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41382   (eval $ac_compile) 2>conftest.er1
41383   ac_status=$?
41384   grep -v '^ *+' conftest.er1 >conftest.err
41385   rm -f conftest.er1
41386   cat conftest.err >&5
41387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41388   (exit $ac_status); } &&
41389          { ac_try='test -z "$ac_c_werror_flag"
41390                          || test ! -s conftest.err'
41391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41392   (eval $ac_try) 2>&5
41393   ac_status=$?
41394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41395   (exit $ac_status); }; } &&
41396          { ac_try='test -s conftest.$ac_objext'
41397   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41398   (eval $ac_try) 2>&5
41399   ac_status=$?
41400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41401   (exit $ac_status); }; }; then
41402   ac_hi=$ac_mid
41403 else
41404   echo "$as_me: failed program was:" >&5
41405 sed 's/^/| /' conftest.$ac_ext >&5
41406
41407 ac_lo=`expr '(' $ac_mid ')' + 1`
41408 fi
41409 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41410 done
41411 case $ac_lo in
41412 ?*) ac_cv_sizeof_int=$ac_lo;;
41413 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
41414 See \`config.log' for more details." >&5
41415 echo "$as_me: error: cannot compute sizeof (int), 77
41416 See \`config.log' for more details." >&2;}
41417    { (exit 1); exit 1; }; } ;;
41418 esac
41419 else
41420   if test "$cross_compiling" = yes; then
41421   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
41422 See \`config.log' for more details." >&5
41423 echo "$as_me: error: cannot run test program while cross compiling
41424 See \`config.log' for more details." >&2;}
41425    { (exit 1); exit 1; }; }
41426 else
41427   cat >conftest.$ac_ext <<_ACEOF
41428 /* confdefs.h.  */
41429 _ACEOF
41430 cat confdefs.h >>conftest.$ac_ext
41431 cat >>conftest.$ac_ext <<_ACEOF
41432 /* end confdefs.h.  */
41433 $ac_includes_default
41434 long longval () { return (long) (sizeof (int)); }
41435 unsigned long ulongval () { return (long) (sizeof (int)); }
41436 #include <stdio.h>
41437 #include <stdlib.h>
41438 int
41439 main ()
41440 {
41441
41442   FILE *f = fopen ("conftest.val", "w");
41443   if (! f)
41444     exit (1);
41445   if (((long) (sizeof (int))) < 0)
41446     {
41447       long i = longval ();
41448       if (i != ((long) (sizeof (int))))
41449         exit (1);
41450       fprintf (f, "%ld\n", i);
41451     }
41452   else
41453     {
41454       unsigned long i = ulongval ();
41455       if (i != ((long) (sizeof (int))))
41456         exit (1);
41457       fprintf (f, "%lu\n", i);
41458     }
41459   exit (ferror (f) || fclose (f) != 0);
41460
41461   ;
41462   return 0;
41463 }
41464 _ACEOF
41465 rm -f conftest$ac_exeext
41466 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
41467   (eval $ac_link) 2>&5
41468   ac_status=$?
41469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41470   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
41471   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41472   (eval $ac_try) 2>&5
41473   ac_status=$?
41474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41475   (exit $ac_status); }; }; then
41476   ac_cv_sizeof_int=`cat conftest.val`
41477 else
41478   echo "$as_me: program exited with status $ac_status" >&5
41479 echo "$as_me: failed program was:" >&5
41480 sed 's/^/| /' conftest.$ac_ext >&5
41481
41482 ( exit $ac_status )
41483 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
41484 See \`config.log' for more details." >&5
41485 echo "$as_me: error: cannot compute sizeof (int), 77
41486 See \`config.log' for more details." >&2;}
41487    { (exit 1); exit 1; }; }
41488 fi
41489 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
41490 fi
41491 fi
41492 rm -f conftest.val
41493 else
41494   ac_cv_sizeof_int=0
41495 fi
41496 fi
41497 echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
41498 echo "${ECHO_T}$ac_cv_sizeof_int" >&6
41499 cat >>confdefs.h <<_ACEOF
41500 #define SIZEOF_INT $ac_cv_sizeof_int
41501 _ACEOF
41502
41503
41504 echo "$as_me:$LINENO: checking for long" >&5
41505 echo $ECHO_N "checking for long... $ECHO_C" >&6
41506 if test "${ac_cv_type_long+set}" = set; then
41507   echo $ECHO_N "(cached) $ECHO_C" >&6
41508 else
41509   cat >conftest.$ac_ext <<_ACEOF
41510 /* confdefs.h.  */
41511 _ACEOF
41512 cat confdefs.h >>conftest.$ac_ext
41513 cat >>conftest.$ac_ext <<_ACEOF
41514 /* end confdefs.h.  */
41515 $ac_includes_default
41516 int
41517 main ()
41518 {
41519 if ((long *) 0)
41520   return 0;
41521 if (sizeof (long))
41522   return 0;
41523   ;
41524   return 0;
41525 }
41526 _ACEOF
41527 rm -f conftest.$ac_objext
41528 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41529   (eval $ac_compile) 2>conftest.er1
41530   ac_status=$?
41531   grep -v '^ *+' conftest.er1 >conftest.err
41532   rm -f conftest.er1
41533   cat conftest.err >&5
41534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41535   (exit $ac_status); } &&
41536          { ac_try='test -z "$ac_c_werror_flag"
41537                          || test ! -s conftest.err'
41538   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41539   (eval $ac_try) 2>&5
41540   ac_status=$?
41541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41542   (exit $ac_status); }; } &&
41543          { ac_try='test -s conftest.$ac_objext'
41544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41545   (eval $ac_try) 2>&5
41546   ac_status=$?
41547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41548   (exit $ac_status); }; }; then
41549   ac_cv_type_long=yes
41550 else
41551   echo "$as_me: failed program was:" >&5
41552 sed 's/^/| /' conftest.$ac_ext >&5
41553
41554 ac_cv_type_long=no
41555 fi
41556 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41557 fi
41558 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
41559 echo "${ECHO_T}$ac_cv_type_long" >&6
41560
41561 echo "$as_me:$LINENO: checking size of long" >&5
41562 echo $ECHO_N "checking size of long... $ECHO_C" >&6
41563 if test "${ac_cv_sizeof_long+set}" = set; then
41564   echo $ECHO_N "(cached) $ECHO_C" >&6
41565 else
41566   if test "$ac_cv_type_long" = yes; then
41567   # The cast to unsigned long works around a bug in the HP C Compiler
41568   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41569   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41570   # This bug is HP SR number 8606223364.
41571   if test "$cross_compiling" = yes; then
41572   # Depending upon the size, compute the lo and hi bounds.
41573 cat >conftest.$ac_ext <<_ACEOF
41574 /* confdefs.h.  */
41575 _ACEOF
41576 cat confdefs.h >>conftest.$ac_ext
41577 cat >>conftest.$ac_ext <<_ACEOF
41578 /* end confdefs.h.  */
41579 $ac_includes_default
41580 int
41581 main ()
41582 {
41583 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
41584 test_array [0] = 0
41585
41586   ;
41587   return 0;
41588 }
41589 _ACEOF
41590 rm -f conftest.$ac_objext
41591 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41592   (eval $ac_compile) 2>conftest.er1
41593   ac_status=$?
41594   grep -v '^ *+' conftest.er1 >conftest.err
41595   rm -f conftest.er1
41596   cat conftest.err >&5
41597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41598   (exit $ac_status); } &&
41599          { ac_try='test -z "$ac_c_werror_flag"
41600                          || test ! -s conftest.err'
41601   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41602   (eval $ac_try) 2>&5
41603   ac_status=$?
41604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41605   (exit $ac_status); }; } &&
41606          { ac_try='test -s conftest.$ac_objext'
41607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41608   (eval $ac_try) 2>&5
41609   ac_status=$?
41610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41611   (exit $ac_status); }; }; then
41612   ac_lo=0 ac_mid=0
41613   while :; do
41614     cat >conftest.$ac_ext <<_ACEOF
41615 /* confdefs.h.  */
41616 _ACEOF
41617 cat confdefs.h >>conftest.$ac_ext
41618 cat >>conftest.$ac_ext <<_ACEOF
41619 /* end confdefs.h.  */
41620 $ac_includes_default
41621 int
41622 main ()
41623 {
41624 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
41625 test_array [0] = 0
41626
41627   ;
41628   return 0;
41629 }
41630 _ACEOF
41631 rm -f conftest.$ac_objext
41632 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41633   (eval $ac_compile) 2>conftest.er1
41634   ac_status=$?
41635   grep -v '^ *+' conftest.er1 >conftest.err
41636   rm -f conftest.er1
41637   cat conftest.err >&5
41638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41639   (exit $ac_status); } &&
41640          { ac_try='test -z "$ac_c_werror_flag"
41641                          || test ! -s conftest.err'
41642   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41643   (eval $ac_try) 2>&5
41644   ac_status=$?
41645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41646   (exit $ac_status); }; } &&
41647          { ac_try='test -s conftest.$ac_objext'
41648   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41649   (eval $ac_try) 2>&5
41650   ac_status=$?
41651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41652   (exit $ac_status); }; }; then
41653   ac_hi=$ac_mid; break
41654 else
41655   echo "$as_me: failed program was:" >&5
41656 sed 's/^/| /' conftest.$ac_ext >&5
41657
41658 ac_lo=`expr $ac_mid + 1`
41659                     if test $ac_lo -le $ac_mid; then
41660                       ac_lo= ac_hi=
41661                       break
41662                     fi
41663                     ac_mid=`expr 2 '*' $ac_mid + 1`
41664 fi
41665 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41666   done
41667 else
41668   echo "$as_me: failed program was:" >&5
41669 sed 's/^/| /' conftest.$ac_ext >&5
41670
41671 cat >conftest.$ac_ext <<_ACEOF
41672 /* confdefs.h.  */
41673 _ACEOF
41674 cat confdefs.h >>conftest.$ac_ext
41675 cat >>conftest.$ac_ext <<_ACEOF
41676 /* end confdefs.h.  */
41677 $ac_includes_default
41678 int
41679 main ()
41680 {
41681 static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
41682 test_array [0] = 0
41683
41684   ;
41685   return 0;
41686 }
41687 _ACEOF
41688 rm -f conftest.$ac_objext
41689 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41690   (eval $ac_compile) 2>conftest.er1
41691   ac_status=$?
41692   grep -v '^ *+' conftest.er1 >conftest.err
41693   rm -f conftest.er1
41694   cat conftest.err >&5
41695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41696   (exit $ac_status); } &&
41697          { ac_try='test -z "$ac_c_werror_flag"
41698                          || test ! -s conftest.err'
41699   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41700   (eval $ac_try) 2>&5
41701   ac_status=$?
41702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41703   (exit $ac_status); }; } &&
41704          { ac_try='test -s conftest.$ac_objext'
41705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41706   (eval $ac_try) 2>&5
41707   ac_status=$?
41708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41709   (exit $ac_status); }; }; then
41710   ac_hi=-1 ac_mid=-1
41711   while :; do
41712     cat >conftest.$ac_ext <<_ACEOF
41713 /* confdefs.h.  */
41714 _ACEOF
41715 cat confdefs.h >>conftest.$ac_ext
41716 cat >>conftest.$ac_ext <<_ACEOF
41717 /* end confdefs.h.  */
41718 $ac_includes_default
41719 int
41720 main ()
41721 {
41722 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
41723 test_array [0] = 0
41724
41725   ;
41726   return 0;
41727 }
41728 _ACEOF
41729 rm -f conftest.$ac_objext
41730 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41731   (eval $ac_compile) 2>conftest.er1
41732   ac_status=$?
41733   grep -v '^ *+' conftest.er1 >conftest.err
41734   rm -f conftest.er1
41735   cat conftest.err >&5
41736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41737   (exit $ac_status); } &&
41738          { ac_try='test -z "$ac_c_werror_flag"
41739                          || test ! -s conftest.err'
41740   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41741   (eval $ac_try) 2>&5
41742   ac_status=$?
41743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41744   (exit $ac_status); }; } &&
41745          { ac_try='test -s conftest.$ac_objext'
41746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41747   (eval $ac_try) 2>&5
41748   ac_status=$?
41749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41750   (exit $ac_status); }; }; then
41751   ac_lo=$ac_mid; break
41752 else
41753   echo "$as_me: failed program was:" >&5
41754 sed 's/^/| /' conftest.$ac_ext >&5
41755
41756 ac_hi=`expr '(' $ac_mid ')' - 1`
41757                        if test $ac_mid -le $ac_hi; then
41758                          ac_lo= ac_hi=
41759                          break
41760                        fi
41761                        ac_mid=`expr 2 '*' $ac_mid`
41762 fi
41763 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41764   done
41765 else
41766   echo "$as_me: failed program was:" >&5
41767 sed 's/^/| /' conftest.$ac_ext >&5
41768
41769 ac_lo= ac_hi=
41770 fi
41771 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41772 fi
41773 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41774 # Binary search between lo and hi bounds.
41775 while test "x$ac_lo" != "x$ac_hi"; do
41776   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
41777   cat >conftest.$ac_ext <<_ACEOF
41778 /* confdefs.h.  */
41779 _ACEOF
41780 cat confdefs.h >>conftest.$ac_ext
41781 cat >>conftest.$ac_ext <<_ACEOF
41782 /* end confdefs.h.  */
41783 $ac_includes_default
41784 int
41785 main ()
41786 {
41787 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
41788 test_array [0] = 0
41789
41790   ;
41791   return 0;
41792 }
41793 _ACEOF
41794 rm -f conftest.$ac_objext
41795 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41796   (eval $ac_compile) 2>conftest.er1
41797   ac_status=$?
41798   grep -v '^ *+' conftest.er1 >conftest.err
41799   rm -f conftest.er1
41800   cat conftest.err >&5
41801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41802   (exit $ac_status); } &&
41803          { ac_try='test -z "$ac_c_werror_flag"
41804                          || test ! -s conftest.err'
41805   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41806   (eval $ac_try) 2>&5
41807   ac_status=$?
41808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41809   (exit $ac_status); }; } &&
41810          { ac_try='test -s conftest.$ac_objext'
41811   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41812   (eval $ac_try) 2>&5
41813   ac_status=$?
41814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41815   (exit $ac_status); }; }; then
41816   ac_hi=$ac_mid
41817 else
41818   echo "$as_me: failed program was:" >&5
41819 sed 's/^/| /' conftest.$ac_ext >&5
41820
41821 ac_lo=`expr '(' $ac_mid ')' + 1`
41822 fi
41823 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41824 done
41825 case $ac_lo in
41826 ?*) ac_cv_sizeof_long=$ac_lo;;
41827 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
41828 See \`config.log' for more details." >&5
41829 echo "$as_me: error: cannot compute sizeof (long), 77
41830 See \`config.log' for more details." >&2;}
41831    { (exit 1); exit 1; }; } ;;
41832 esac
41833 else
41834   if test "$cross_compiling" = yes; then
41835   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
41836 See \`config.log' for more details." >&5
41837 echo "$as_me: error: cannot run test program while cross compiling
41838 See \`config.log' for more details." >&2;}
41839    { (exit 1); exit 1; }; }
41840 else
41841   cat >conftest.$ac_ext <<_ACEOF
41842 /* confdefs.h.  */
41843 _ACEOF
41844 cat confdefs.h >>conftest.$ac_ext
41845 cat >>conftest.$ac_ext <<_ACEOF
41846 /* end confdefs.h.  */
41847 $ac_includes_default
41848 long longval () { return (long) (sizeof (long)); }
41849 unsigned long ulongval () { return (long) (sizeof (long)); }
41850 #include <stdio.h>
41851 #include <stdlib.h>
41852 int
41853 main ()
41854 {
41855
41856   FILE *f = fopen ("conftest.val", "w");
41857   if (! f)
41858     exit (1);
41859   if (((long) (sizeof (long))) < 0)
41860     {
41861       long i = longval ();
41862       if (i != ((long) (sizeof (long))))
41863         exit (1);
41864       fprintf (f, "%ld\n", i);
41865     }
41866   else
41867     {
41868       unsigned long i = ulongval ();
41869       if (i != ((long) (sizeof (long))))
41870         exit (1);
41871       fprintf (f, "%lu\n", i);
41872     }
41873   exit (ferror (f) || fclose (f) != 0);
41874
41875   ;
41876   return 0;
41877 }
41878 _ACEOF
41879 rm -f conftest$ac_exeext
41880 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
41881   (eval $ac_link) 2>&5
41882   ac_status=$?
41883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41884   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
41885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41886   (eval $ac_try) 2>&5
41887   ac_status=$?
41888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41889   (exit $ac_status); }; }; then
41890   ac_cv_sizeof_long=`cat conftest.val`
41891 else
41892   echo "$as_me: program exited with status $ac_status" >&5
41893 echo "$as_me: failed program was:" >&5
41894 sed 's/^/| /' conftest.$ac_ext >&5
41895
41896 ( exit $ac_status )
41897 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
41898 See \`config.log' for more details." >&5
41899 echo "$as_me: error: cannot compute sizeof (long), 77
41900 See \`config.log' for more details." >&2;}
41901    { (exit 1); exit 1; }; }
41902 fi
41903 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
41904 fi
41905 fi
41906 rm -f conftest.val
41907 else
41908   ac_cv_sizeof_long=0
41909 fi
41910 fi
41911 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
41912 echo "${ECHO_T}$ac_cv_sizeof_long" >&6
41913 cat >>confdefs.h <<_ACEOF
41914 #define SIZEOF_LONG $ac_cv_sizeof_long
41915 _ACEOF
41916
41917
41918 echo "$as_me:$LINENO: checking for wchar_t" >&5
41919 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
41920 if test "${ac_cv_type_wchar_t+set}" = set; then
41921   echo $ECHO_N "(cached) $ECHO_C" >&6
41922 else
41923   cat >conftest.$ac_ext <<_ACEOF
41924 /* confdefs.h.  */
41925 _ACEOF
41926 cat confdefs.h >>conftest.$ac_ext
41927 cat >>conftest.$ac_ext <<_ACEOF
41928 /* end confdefs.h.  */
41929 $ac_includes_default
41930 int
41931 main ()
41932 {
41933 if ((wchar_t *) 0)
41934   return 0;
41935 if (sizeof (wchar_t))
41936   return 0;
41937   ;
41938   return 0;
41939 }
41940 _ACEOF
41941 rm -f conftest.$ac_objext
41942 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41943   (eval $ac_compile) 2>conftest.er1
41944   ac_status=$?
41945   grep -v '^ *+' conftest.er1 >conftest.err
41946   rm -f conftest.er1
41947   cat conftest.err >&5
41948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41949   (exit $ac_status); } &&
41950          { ac_try='test -z "$ac_c_werror_flag"
41951                          || test ! -s conftest.err'
41952   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41953   (eval $ac_try) 2>&5
41954   ac_status=$?
41955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41956   (exit $ac_status); }; } &&
41957          { ac_try='test -s conftest.$ac_objext'
41958   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41959   (eval $ac_try) 2>&5
41960   ac_status=$?
41961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41962   (exit $ac_status); }; }; then
41963   ac_cv_type_wchar_t=yes
41964 else
41965   echo "$as_me: failed program was:" >&5
41966 sed 's/^/| /' conftest.$ac_ext >&5
41967
41968 ac_cv_type_wchar_t=no
41969 fi
41970 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41971 fi
41972 echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
41973 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
41974
41975 echo "$as_me:$LINENO: checking size of wchar_t" >&5
41976 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
41977 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
41978   echo $ECHO_N "(cached) $ECHO_C" >&6
41979 else
41980   if test "$ac_cv_type_wchar_t" = yes; then
41981   # The cast to unsigned long works around a bug in the HP C Compiler
41982   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41983   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41984   # This bug is HP SR number 8606223364.
41985   if test "$cross_compiling" = yes; then
41986   # Depending upon the size, compute the lo and hi bounds.
41987 cat >conftest.$ac_ext <<_ACEOF
41988 /* confdefs.h.  */
41989 _ACEOF
41990 cat confdefs.h >>conftest.$ac_ext
41991 cat >>conftest.$ac_ext <<_ACEOF
41992 /* end confdefs.h.  */
41993 $ac_includes_default
41994 int
41995 main ()
41996 {
41997 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
41998 test_array [0] = 0
41999
42000   ;
42001   return 0;
42002 }
42003 _ACEOF
42004 rm -f conftest.$ac_objext
42005 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42006   (eval $ac_compile) 2>conftest.er1
42007   ac_status=$?
42008   grep -v '^ *+' conftest.er1 >conftest.err
42009   rm -f conftest.er1
42010   cat conftest.err >&5
42011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42012   (exit $ac_status); } &&
42013          { ac_try='test -z "$ac_c_werror_flag"
42014                          || test ! -s conftest.err'
42015   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42016   (eval $ac_try) 2>&5
42017   ac_status=$?
42018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42019   (exit $ac_status); }; } &&
42020          { ac_try='test -s conftest.$ac_objext'
42021   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42022   (eval $ac_try) 2>&5
42023   ac_status=$?
42024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42025   (exit $ac_status); }; }; then
42026   ac_lo=0 ac_mid=0
42027   while :; do
42028     cat >conftest.$ac_ext <<_ACEOF
42029 /* confdefs.h.  */
42030 _ACEOF
42031 cat confdefs.h >>conftest.$ac_ext
42032 cat >>conftest.$ac_ext <<_ACEOF
42033 /* end confdefs.h.  */
42034 $ac_includes_default
42035 int
42036 main ()
42037 {
42038 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
42039 test_array [0] = 0
42040
42041   ;
42042   return 0;
42043 }
42044 _ACEOF
42045 rm -f conftest.$ac_objext
42046 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42047   (eval $ac_compile) 2>conftest.er1
42048   ac_status=$?
42049   grep -v '^ *+' conftest.er1 >conftest.err
42050   rm -f conftest.er1
42051   cat conftest.err >&5
42052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42053   (exit $ac_status); } &&
42054          { ac_try='test -z "$ac_c_werror_flag"
42055                          || test ! -s conftest.err'
42056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42057   (eval $ac_try) 2>&5
42058   ac_status=$?
42059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42060   (exit $ac_status); }; } &&
42061          { ac_try='test -s conftest.$ac_objext'
42062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42063   (eval $ac_try) 2>&5
42064   ac_status=$?
42065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42066   (exit $ac_status); }; }; then
42067   ac_hi=$ac_mid; break
42068 else
42069   echo "$as_me: failed program was:" >&5
42070 sed 's/^/| /' conftest.$ac_ext >&5
42071
42072 ac_lo=`expr $ac_mid + 1`
42073                     if test $ac_lo -le $ac_mid; then
42074                       ac_lo= ac_hi=
42075                       break
42076                     fi
42077                     ac_mid=`expr 2 '*' $ac_mid + 1`
42078 fi
42079 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42080   done
42081 else
42082   echo "$as_me: failed program was:" >&5
42083 sed 's/^/| /' conftest.$ac_ext >&5
42084
42085 cat >conftest.$ac_ext <<_ACEOF
42086 /* confdefs.h.  */
42087 _ACEOF
42088 cat confdefs.h >>conftest.$ac_ext
42089 cat >>conftest.$ac_ext <<_ACEOF
42090 /* end confdefs.h.  */
42091 $ac_includes_default
42092 int
42093 main ()
42094 {
42095 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
42096 test_array [0] = 0
42097
42098   ;
42099   return 0;
42100 }
42101 _ACEOF
42102 rm -f conftest.$ac_objext
42103 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42104   (eval $ac_compile) 2>conftest.er1
42105   ac_status=$?
42106   grep -v '^ *+' conftest.er1 >conftest.err
42107   rm -f conftest.er1
42108   cat conftest.err >&5
42109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42110   (exit $ac_status); } &&
42111          { ac_try='test -z "$ac_c_werror_flag"
42112                          || test ! -s conftest.err'
42113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42114   (eval $ac_try) 2>&5
42115   ac_status=$?
42116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42117   (exit $ac_status); }; } &&
42118          { ac_try='test -s conftest.$ac_objext'
42119   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42120   (eval $ac_try) 2>&5
42121   ac_status=$?
42122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42123   (exit $ac_status); }; }; then
42124   ac_hi=-1 ac_mid=-1
42125   while :; do
42126     cat >conftest.$ac_ext <<_ACEOF
42127 /* confdefs.h.  */
42128 _ACEOF
42129 cat confdefs.h >>conftest.$ac_ext
42130 cat >>conftest.$ac_ext <<_ACEOF
42131 /* end confdefs.h.  */
42132 $ac_includes_default
42133 int
42134 main ()
42135 {
42136 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
42137 test_array [0] = 0
42138
42139   ;
42140   return 0;
42141 }
42142 _ACEOF
42143 rm -f conftest.$ac_objext
42144 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42145   (eval $ac_compile) 2>conftest.er1
42146   ac_status=$?
42147   grep -v '^ *+' conftest.er1 >conftest.err
42148   rm -f conftest.er1
42149   cat conftest.err >&5
42150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42151   (exit $ac_status); } &&
42152          { ac_try='test -z "$ac_c_werror_flag"
42153                          || test ! -s conftest.err'
42154   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42155   (eval $ac_try) 2>&5
42156   ac_status=$?
42157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42158   (exit $ac_status); }; } &&
42159          { ac_try='test -s conftest.$ac_objext'
42160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42161   (eval $ac_try) 2>&5
42162   ac_status=$?
42163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42164   (exit $ac_status); }; }; then
42165   ac_lo=$ac_mid; break
42166 else
42167   echo "$as_me: failed program was:" >&5
42168 sed 's/^/| /' conftest.$ac_ext >&5
42169
42170 ac_hi=`expr '(' $ac_mid ')' - 1`
42171                        if test $ac_mid -le $ac_hi; then
42172                          ac_lo= ac_hi=
42173                          break
42174                        fi
42175                        ac_mid=`expr 2 '*' $ac_mid`
42176 fi
42177 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42178   done
42179 else
42180   echo "$as_me: failed program was:" >&5
42181 sed 's/^/| /' conftest.$ac_ext >&5
42182
42183 ac_lo= ac_hi=
42184 fi
42185 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42186 fi
42187 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42188 # Binary search between lo and hi bounds.
42189 while test "x$ac_lo" != "x$ac_hi"; do
42190   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
42191   cat >conftest.$ac_ext <<_ACEOF
42192 /* confdefs.h.  */
42193 _ACEOF
42194 cat confdefs.h >>conftest.$ac_ext
42195 cat >>conftest.$ac_ext <<_ACEOF
42196 /* end confdefs.h.  */
42197 $ac_includes_default
42198 int
42199 main ()
42200 {
42201 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
42202 test_array [0] = 0
42203
42204   ;
42205   return 0;
42206 }
42207 _ACEOF
42208 rm -f conftest.$ac_objext
42209 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42210   (eval $ac_compile) 2>conftest.er1
42211   ac_status=$?
42212   grep -v '^ *+' conftest.er1 >conftest.err
42213   rm -f conftest.er1
42214   cat conftest.err >&5
42215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42216   (exit $ac_status); } &&
42217          { ac_try='test -z "$ac_c_werror_flag"
42218                          || test ! -s conftest.err'
42219   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42220   (eval $ac_try) 2>&5
42221   ac_status=$?
42222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42223   (exit $ac_status); }; } &&
42224          { ac_try='test -s conftest.$ac_objext'
42225   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42226   (eval $ac_try) 2>&5
42227   ac_status=$?
42228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42229   (exit $ac_status); }; }; then
42230   ac_hi=$ac_mid
42231 else
42232   echo "$as_me: failed program was:" >&5
42233 sed 's/^/| /' conftest.$ac_ext >&5
42234
42235 ac_lo=`expr '(' $ac_mid ')' + 1`
42236 fi
42237 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42238 done
42239 case $ac_lo in
42240 ?*) ac_cv_sizeof_wchar_t=$ac_lo;;
42241 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
42242 See \`config.log' for more details." >&5
42243 echo "$as_me: error: cannot compute sizeof (wchar_t), 77
42244 See \`config.log' for more details." >&2;}
42245    { (exit 1); exit 1; }; } ;;
42246 esac
42247 else
42248   if test "$cross_compiling" = yes; then
42249   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
42250 See \`config.log' for more details." >&5
42251 echo "$as_me: error: cannot run test program while cross compiling
42252 See \`config.log' for more details." >&2;}
42253    { (exit 1); exit 1; }; }
42254 else
42255   cat >conftest.$ac_ext <<_ACEOF
42256 /* confdefs.h.  */
42257 _ACEOF
42258 cat confdefs.h >>conftest.$ac_ext
42259 cat >>conftest.$ac_ext <<_ACEOF
42260 /* end confdefs.h.  */
42261 $ac_includes_default
42262 long longval () { return (long) (sizeof (wchar_t)); }
42263 unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
42264 #include <stdio.h>
42265 #include <stdlib.h>
42266 int
42267 main ()
42268 {
42269
42270   FILE *f = fopen ("conftest.val", "w");
42271   if (! f)
42272     exit (1);
42273   if (((long) (sizeof (wchar_t))) < 0)
42274     {
42275       long i = longval ();
42276       if (i != ((long) (sizeof (wchar_t))))
42277         exit (1);
42278       fprintf (f, "%ld\n", i);
42279     }
42280   else
42281     {
42282       unsigned long i = ulongval ();
42283       if (i != ((long) (sizeof (wchar_t))))
42284         exit (1);
42285       fprintf (f, "%lu\n", i);
42286     }
42287   exit (ferror (f) || fclose (f) != 0);
42288
42289   ;
42290   return 0;
42291 }
42292 _ACEOF
42293 rm -f conftest$ac_exeext
42294 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42295   (eval $ac_link) 2>&5
42296   ac_status=$?
42297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42298   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
42299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42300   (eval $ac_try) 2>&5
42301   ac_status=$?
42302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42303   (exit $ac_status); }; }; then
42304   ac_cv_sizeof_wchar_t=`cat conftest.val`
42305 else
42306   echo "$as_me: program exited with status $ac_status" >&5
42307 echo "$as_me: failed program was:" >&5
42308 sed 's/^/| /' conftest.$ac_ext >&5
42309
42310 ( exit $ac_status )
42311 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
42312 See \`config.log' for more details." >&5
42313 echo "$as_me: error: cannot compute sizeof (wchar_t), 77
42314 See \`config.log' for more details." >&2;}
42315    { (exit 1); exit 1; }; }
42316 fi
42317 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
42318 fi
42319 fi
42320 rm -f conftest.val
42321 else
42322   ac_cv_sizeof_wchar_t=0
42323 fi
42324 fi
42325 echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
42326 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
42327 cat >>confdefs.h <<_ACEOF
42328 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
42329 _ACEOF
42330
42331
42332
42333 if test "$ac_cv_sizeof_int" -lt 4 ; then
42334         { echo "$as_me:$LINENO: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&5
42335 echo "$as_me: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&2;}
42336
42337
42338 cat >>confdefs.h <<\_ACEOF
42339 #define LBER_INT_T long
42340 _ACEOF
42341
42342 else
42343
42344 cat >>confdefs.h <<\_ACEOF
42345 #define LBER_INT_T int
42346 _ACEOF
42347
42348 fi
42349
42350
42351 cat >>confdefs.h <<\_ACEOF
42352 #define LBER_LEN_T long
42353 _ACEOF
42354
42355
42356 cat >>confdefs.h <<\_ACEOF
42357 #define LBER_SOCKET_T int
42358 _ACEOF
42359
42360
42361 cat >>confdefs.h <<\_ACEOF
42362 #define LBER_TAG_T long
42363 _ACEOF
42364
42365
42366 echo "$as_me:$LINENO: checking for working memcmp" >&5
42367 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
42368 if test "${ac_cv_func_memcmp_working+set}" = set; then
42369   echo $ECHO_N "(cached) $ECHO_C" >&6
42370 else
42371   if test "$cross_compiling" = yes; then
42372   ac_cv_func_memcmp_working=no
42373 else
42374   cat >conftest.$ac_ext <<_ACEOF
42375 /* confdefs.h.  */
42376 _ACEOF
42377 cat confdefs.h >>conftest.$ac_ext
42378 cat >>conftest.$ac_ext <<_ACEOF
42379 /* end confdefs.h.  */
42380 $ac_includes_default
42381 int
42382 main ()
42383 {
42384
42385   /* Some versions of memcmp are not 8-bit clean.  */
42386   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
42387   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
42388     exit (1);
42389
42390   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
42391      or more and with at least one buffer not starting on a 4-byte boundary.
42392      William Lewis provided this test program.   */
42393   {
42394     char foo[21];
42395     char bar[21];
42396     int i;
42397     for (i = 0; i < 4; i++)
42398       {
42399         char *a = foo + i;
42400         char *b = bar + i;
42401         strcpy (a, "--------01111111");
42402         strcpy (b, "--------10000000");
42403         if (memcmp (a, b, 16) >= 0)
42404           exit (1);
42405       }
42406     exit (0);
42407   }
42408
42409   ;
42410   return 0;
42411 }
42412 _ACEOF
42413 rm -f conftest$ac_exeext
42414 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42415   (eval $ac_link) 2>&5
42416   ac_status=$?
42417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42418   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
42419   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42420   (eval $ac_try) 2>&5
42421   ac_status=$?
42422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42423   (exit $ac_status); }; }; then
42424   ac_cv_func_memcmp_working=yes
42425 else
42426   echo "$as_me: program exited with status $ac_status" >&5
42427 echo "$as_me: failed program was:" >&5
42428 sed 's/^/| /' conftest.$ac_ext >&5
42429
42430 ( exit $ac_status )
42431 ac_cv_func_memcmp_working=no
42432 fi
42433 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
42434 fi
42435 fi
42436 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
42437 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
42438 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
42439     "memcmp.$ac_objext"   | \
42440   *" memcmp.$ac_objext"   | \
42441     "memcmp.$ac_objext "* | \
42442   *" memcmp.$ac_objext "* ) ;;
42443   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
42444 esac
42445
42446
42447
42448 if test $ac_cv_func_memcmp_working = no ; then
42449
42450 cat >>confdefs.h <<\_ACEOF
42451 #define NEED_MEMCMP_REPLACEMENT 1
42452 _ACEOF
42453
42454 fi
42455
42456
42457 for ac_func in strftime
42458 do
42459 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
42460 echo "$as_me:$LINENO: checking for $ac_func" >&5
42461 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
42462 if eval "test \"\${$as_ac_var+set}\" = set"; then
42463   echo $ECHO_N "(cached) $ECHO_C" >&6
42464 else
42465   cat >conftest.$ac_ext <<_ACEOF
42466 /* confdefs.h.  */
42467 _ACEOF
42468 cat confdefs.h >>conftest.$ac_ext
42469 cat >>conftest.$ac_ext <<_ACEOF
42470 /* end confdefs.h.  */
42471 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
42472    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
42473 #define $ac_func innocuous_$ac_func
42474
42475 /* System header to define __stub macros and hopefully few prototypes,
42476     which can conflict with char $ac_func (); below.
42477     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
42478     <limits.h> exists even on freestanding compilers.  */
42479
42480 #ifdef __STDC__
42481 # include <limits.h>
42482 #else
42483 # include <assert.h>
42484 #endif
42485
42486 #undef $ac_func
42487
42488 /* Override any gcc2 internal prototype to avoid an error.  */
42489 #ifdef __cplusplus
42490 extern "C"
42491 {
42492 #endif
42493 /* We use char because int might match the return type of a gcc2
42494    builtin and then its argument prototype would still apply.  */
42495 char $ac_func ();
42496 /* The GNU C library defines this for functions which it implements
42497     to always fail with ENOSYS.  Some functions are actually named
42498     something starting with __ and the normal name is an alias.  */
42499 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
42500 choke me
42501 #else
42502 char (*f) () = $ac_func;
42503 #endif
42504 #ifdef __cplusplus
42505 }
42506 #endif
42507
42508 int
42509 main ()
42510 {
42511 return f != $ac_func;
42512   ;
42513   return 0;
42514 }
42515 _ACEOF
42516 rm -f conftest.$ac_objext conftest$ac_exeext
42517 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42518   (eval $ac_link) 2>conftest.er1
42519   ac_status=$?
42520   grep -v '^ *+' conftest.er1 >conftest.err
42521   rm -f conftest.er1
42522   cat conftest.err >&5
42523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42524   (exit $ac_status); } &&
42525          { ac_try='test -z "$ac_c_werror_flag"
42526                          || test ! -s conftest.err'
42527   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42528   (eval $ac_try) 2>&5
42529   ac_status=$?
42530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42531   (exit $ac_status); }; } &&
42532          { ac_try='test -s conftest$ac_exeext'
42533   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42534   (eval $ac_try) 2>&5
42535   ac_status=$?
42536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42537   (exit $ac_status); }; }; then
42538   eval "$as_ac_var=yes"
42539 else
42540   echo "$as_me: failed program was:" >&5
42541 sed 's/^/| /' conftest.$ac_ext >&5
42542
42543 eval "$as_ac_var=no"
42544 fi
42545 rm -f conftest.err conftest.$ac_objext \
42546       conftest$ac_exeext conftest.$ac_ext
42547 fi
42548 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
42549 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
42550 if test `eval echo '${'$as_ac_var'}'` = yes; then
42551   cat >>confdefs.h <<_ACEOF
42552 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
42553 _ACEOF
42554
42555 else
42556   # strftime is in -lintl on SCO UNIX.
42557 echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
42558 echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
42559 if test "${ac_cv_lib_intl_strftime+set}" = set; then
42560   echo $ECHO_N "(cached) $ECHO_C" >&6
42561 else
42562   ac_check_lib_save_LIBS=$LIBS
42563 LIBS="-lintl  $LIBS"
42564 cat >conftest.$ac_ext <<_ACEOF
42565 /* confdefs.h.  */
42566 _ACEOF
42567 cat confdefs.h >>conftest.$ac_ext
42568 cat >>conftest.$ac_ext <<_ACEOF
42569 /* end confdefs.h.  */
42570
42571 /* Override any gcc2 internal prototype to avoid an error.  */
42572 #ifdef __cplusplus
42573 extern "C"
42574 #endif
42575 /* We use char because int might match the return type of a gcc2
42576    builtin and then its argument prototype would still apply.  */
42577 char strftime ();
42578 int
42579 main ()
42580 {
42581 strftime ();
42582   ;
42583   return 0;
42584 }
42585 _ACEOF
42586 rm -f conftest.$ac_objext conftest$ac_exeext
42587 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42588   (eval $ac_link) 2>conftest.er1
42589   ac_status=$?
42590   grep -v '^ *+' conftest.er1 >conftest.err
42591   rm -f conftest.er1
42592   cat conftest.err >&5
42593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42594   (exit $ac_status); } &&
42595          { ac_try='test -z "$ac_c_werror_flag"
42596                          || test ! -s conftest.err'
42597   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42598   (eval $ac_try) 2>&5
42599   ac_status=$?
42600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42601   (exit $ac_status); }; } &&
42602          { ac_try='test -s conftest$ac_exeext'
42603   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42604   (eval $ac_try) 2>&5
42605   ac_status=$?
42606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42607   (exit $ac_status); }; }; then
42608   ac_cv_lib_intl_strftime=yes
42609 else
42610   echo "$as_me: failed program was:" >&5
42611 sed 's/^/| /' conftest.$ac_ext >&5
42612
42613 ac_cv_lib_intl_strftime=no
42614 fi
42615 rm -f conftest.err conftest.$ac_objext \
42616       conftest$ac_exeext conftest.$ac_ext
42617 LIBS=$ac_check_lib_save_LIBS
42618 fi
42619 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
42620 echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
42621 if test $ac_cv_lib_intl_strftime = yes; then
42622   cat >>confdefs.h <<\_ACEOF
42623 #define HAVE_STRFTIME 1
42624 _ACEOF
42625
42626 LIBS="-lintl $LIBS"
42627 fi
42628
42629 fi
42630 done
42631
42632
42633 echo "$as_me:$LINENO: checking for inet_aton()" >&5
42634 echo $ECHO_N "checking for inet_aton()... $ECHO_C" >&6
42635 if test "${ol_cv_func_inet_aton+set}" = set; then
42636   echo $ECHO_N "(cached) $ECHO_C" >&6
42637 else
42638   cat >conftest.$ac_ext <<_ACEOF
42639 /* confdefs.h.  */
42640 _ACEOF
42641 cat confdefs.h >>conftest.$ac_ext
42642 cat >>conftest.$ac_ext <<_ACEOF
42643 /* end confdefs.h.  */
42644
42645 #ifdef HAVE_SYS_TYPES_H
42646 #       include <sys/types.h>
42647 #endif
42648 #ifdef HAVE_SYS_SOCKET_H
42649 #       include <sys/socket.h>
42650 #       ifdef HAVE_SYS_SELECT_H
42651 #               include <sys/select.h>
42652 #       endif
42653 #       include <netinet/in.h>
42654 #       ifdef HAVE_ARPA_INET_H
42655 #               include <arpa/inet.h>
42656 #       endif
42657 #endif
42658
42659 int
42660 main ()
42661 {
42662 struct in_addr in;
42663 int rc = inet_aton( "255.255.255.255", &in );
42664   ;
42665   return 0;
42666 }
42667 _ACEOF
42668 rm -f conftest.$ac_objext conftest$ac_exeext
42669 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42670   (eval $ac_link) 2>conftest.er1
42671   ac_status=$?
42672   grep -v '^ *+' conftest.er1 >conftest.err
42673   rm -f conftest.er1
42674   cat conftest.err >&5
42675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42676   (exit $ac_status); } &&
42677          { ac_try='test -z "$ac_c_werror_flag"
42678                          || test ! -s conftest.err'
42679   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42680   (eval $ac_try) 2>&5
42681   ac_status=$?
42682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42683   (exit $ac_status); }; } &&
42684          { ac_try='test -s conftest$ac_exeext'
42685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42686   (eval $ac_try) 2>&5
42687   ac_status=$?
42688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42689   (exit $ac_status); }; }; then
42690   ol_cv_func_inet_aton=yes
42691 else
42692   echo "$as_me: failed program was:" >&5
42693 sed 's/^/| /' conftest.$ac_ext >&5
42694
42695 ol_cv_func_inet_aton=no
42696 fi
42697 rm -f conftest.err conftest.$ac_objext \
42698       conftest$ac_exeext conftest.$ac_ext
42699 fi
42700 echo "$as_me:$LINENO: result: $ol_cv_func_inet_aton" >&5
42701 echo "${ECHO_T}$ol_cv_func_inet_aton" >&6
42702   if test $ol_cv_func_inet_aton != no; then
42703
42704 cat >>confdefs.h <<\_ACEOF
42705 #define HAVE_INET_ATON 1
42706 _ACEOF
42707
42708   fi
42709
42710
42711 echo "$as_me:$LINENO: checking for _spawnlp" >&5
42712 echo $ECHO_N "checking for _spawnlp... $ECHO_C" >&6
42713 if test "${ac_cv_func__spawnlp+set}" = set; then
42714   echo $ECHO_N "(cached) $ECHO_C" >&6
42715 else
42716   cat >conftest.$ac_ext <<_ACEOF
42717 /* confdefs.h.  */
42718 _ACEOF
42719 cat confdefs.h >>conftest.$ac_ext
42720 cat >>conftest.$ac_ext <<_ACEOF
42721 /* end confdefs.h.  */
42722 /* Define _spawnlp to an innocuous variant, in case <limits.h> declares _spawnlp.
42723    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
42724 #define _spawnlp innocuous__spawnlp
42725
42726 /* System header to define __stub macros and hopefully few prototypes,
42727     which can conflict with char _spawnlp (); below.
42728     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
42729     <limits.h> exists even on freestanding compilers.  */
42730
42731 #ifdef __STDC__
42732 # include <limits.h>
42733 #else
42734 # include <assert.h>
42735 #endif
42736
42737 #undef _spawnlp
42738
42739 /* Override any gcc2 internal prototype to avoid an error.  */
42740 #ifdef __cplusplus
42741 extern "C"
42742 {
42743 #endif
42744 /* We use char because int might match the return type of a gcc2
42745    builtin and then its argument prototype would still apply.  */
42746 char _spawnlp ();
42747 /* The GNU C library defines this for functions which it implements
42748     to always fail with ENOSYS.  Some functions are actually named
42749     something starting with __ and the normal name is an alias.  */
42750 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
42751 choke me
42752 #else
42753 char (*f) () = _spawnlp;
42754 #endif
42755 #ifdef __cplusplus
42756 }
42757 #endif
42758
42759 int
42760 main ()
42761 {
42762 return f != _spawnlp;
42763   ;
42764   return 0;
42765 }
42766 _ACEOF
42767 rm -f conftest.$ac_objext conftest$ac_exeext
42768 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42769   (eval $ac_link) 2>conftest.er1
42770   ac_status=$?
42771   grep -v '^ *+' conftest.er1 >conftest.err
42772   rm -f conftest.er1
42773   cat conftest.err >&5
42774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42775   (exit $ac_status); } &&
42776          { ac_try='test -z "$ac_c_werror_flag"
42777                          || test ! -s conftest.err'
42778   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42779   (eval $ac_try) 2>&5
42780   ac_status=$?
42781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42782   (exit $ac_status); }; } &&
42783          { ac_try='test -s conftest$ac_exeext'
42784   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42785   (eval $ac_try) 2>&5
42786   ac_status=$?
42787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42788   (exit $ac_status); }; }; then
42789   ac_cv_func__spawnlp=yes
42790 else
42791   echo "$as_me: failed program was:" >&5
42792 sed 's/^/| /' conftest.$ac_ext >&5
42793
42794 ac_cv_func__spawnlp=no
42795 fi
42796 rm -f conftest.err conftest.$ac_objext \
42797       conftest$ac_exeext conftest.$ac_ext
42798 fi
42799 echo "$as_me:$LINENO: result: $ac_cv_func__spawnlp" >&5
42800 echo "${ECHO_T}$ac_cv_func__spawnlp" >&6
42801 if test $ac_cv_func__spawnlp = yes; then
42802
42803 cat >>confdefs.h <<\_ACEOF
42804 #define HAVE_SPAWNLP 1
42805 _ACEOF
42806
42807 fi
42808
42809
42810 echo "$as_me:$LINENO: checking for _snprintf" >&5
42811 echo $ECHO_N "checking for _snprintf... $ECHO_C" >&6
42812 if test "${ac_cv_func__snprintf+set}" = set; then
42813   echo $ECHO_N "(cached) $ECHO_C" >&6
42814 else
42815   cat >conftest.$ac_ext <<_ACEOF
42816 /* confdefs.h.  */
42817 _ACEOF
42818 cat confdefs.h >>conftest.$ac_ext
42819 cat >>conftest.$ac_ext <<_ACEOF
42820 /* end confdefs.h.  */
42821 /* Define _snprintf to an innocuous variant, in case <limits.h> declares _snprintf.
42822    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
42823 #define _snprintf innocuous__snprintf
42824
42825 /* System header to define __stub macros and hopefully few prototypes,
42826     which can conflict with char _snprintf (); below.
42827     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
42828     <limits.h> exists even on freestanding compilers.  */
42829
42830 #ifdef __STDC__
42831 # include <limits.h>
42832 #else
42833 # include <assert.h>
42834 #endif
42835
42836 #undef _snprintf
42837
42838 /* Override any gcc2 internal prototype to avoid an error.  */
42839 #ifdef __cplusplus
42840 extern "C"
42841 {
42842 #endif
42843 /* We use char because int might match the return type of a gcc2
42844    builtin and then its argument prototype would still apply.  */
42845 char _snprintf ();
42846 /* The GNU C library defines this for functions which it implements
42847     to always fail with ENOSYS.  Some functions are actually named
42848     something starting with __ and the normal name is an alias.  */
42849 #if defined (__stub__snprintf) || defined (__stub____snprintf)
42850 choke me
42851 #else
42852 char (*f) () = _snprintf;
42853 #endif
42854 #ifdef __cplusplus
42855 }
42856 #endif
42857
42858 int
42859 main ()
42860 {
42861 return f != _snprintf;
42862   ;
42863   return 0;
42864 }
42865 _ACEOF
42866 rm -f conftest.$ac_objext conftest$ac_exeext
42867 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42868   (eval $ac_link) 2>conftest.er1
42869   ac_status=$?
42870   grep -v '^ *+' conftest.er1 >conftest.err
42871   rm -f conftest.er1
42872   cat conftest.err >&5
42873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42874   (exit $ac_status); } &&
42875          { ac_try='test -z "$ac_c_werror_flag"
42876                          || test ! -s conftest.err'
42877   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42878   (eval $ac_try) 2>&5
42879   ac_status=$?
42880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42881   (exit $ac_status); }; } &&
42882          { ac_try='test -s conftest$ac_exeext'
42883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42884   (eval $ac_try) 2>&5
42885   ac_status=$?
42886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42887   (exit $ac_status); }; }; then
42888   ac_cv_func__snprintf=yes
42889 else
42890   echo "$as_me: failed program was:" >&5
42891 sed 's/^/| /' conftest.$ac_ext >&5
42892
42893 ac_cv_func__snprintf=no
42894 fi
42895 rm -f conftest.err conftest.$ac_objext \
42896       conftest$ac_exeext conftest.$ac_ext
42897 fi
42898 echo "$as_me:$LINENO: result: $ac_cv_func__snprintf" >&5
42899 echo "${ECHO_T}$ac_cv_func__snprintf" >&6
42900 if test $ac_cv_func__snprintf = yes; then
42901   ac_cv_func_snprintf=yes
42902
42903 cat >>confdefs.h <<\_ACEOF
42904 #define snprintf _snprintf
42905 _ACEOF
42906
42907
42908 fi
42909
42910
42911 echo "$as_me:$LINENO: checking for _vsnprintf" >&5
42912 echo $ECHO_N "checking for _vsnprintf... $ECHO_C" >&6
42913 if test "${ac_cv_func__vsnprintf+set}" = set; then
42914   echo $ECHO_N "(cached) $ECHO_C" >&6
42915 else
42916   cat >conftest.$ac_ext <<_ACEOF
42917 /* confdefs.h.  */
42918 _ACEOF
42919 cat confdefs.h >>conftest.$ac_ext
42920 cat >>conftest.$ac_ext <<_ACEOF
42921 /* end confdefs.h.  */
42922 /* Define _vsnprintf to an innocuous variant, in case <limits.h> declares _vsnprintf.
42923    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
42924 #define _vsnprintf innocuous__vsnprintf
42925
42926 /* System header to define __stub macros and hopefully few prototypes,
42927     which can conflict with char _vsnprintf (); below.
42928     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
42929     <limits.h> exists even on freestanding compilers.  */
42930
42931 #ifdef __STDC__
42932 # include <limits.h>
42933 #else
42934 # include <assert.h>
42935 #endif
42936
42937 #undef _vsnprintf
42938
42939 /* Override any gcc2 internal prototype to avoid an error.  */
42940 #ifdef __cplusplus
42941 extern "C"
42942 {
42943 #endif
42944 /* We use char because int might match the return type of a gcc2
42945    builtin and then its argument prototype would still apply.  */
42946 char _vsnprintf ();
42947 /* The GNU C library defines this for functions which it implements
42948     to always fail with ENOSYS.  Some functions are actually named
42949     something starting with __ and the normal name is an alias.  */
42950 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
42951 choke me
42952 #else
42953 char (*f) () = _vsnprintf;
42954 #endif
42955 #ifdef __cplusplus
42956 }
42957 #endif
42958
42959 int
42960 main ()
42961 {
42962 return f != _vsnprintf;
42963   ;
42964   return 0;
42965 }
42966 _ACEOF
42967 rm -f conftest.$ac_objext conftest$ac_exeext
42968 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42969   (eval $ac_link) 2>conftest.er1
42970   ac_status=$?
42971   grep -v '^ *+' conftest.er1 >conftest.err
42972   rm -f conftest.er1
42973   cat conftest.err >&5
42974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42975   (exit $ac_status); } &&
42976          { ac_try='test -z "$ac_c_werror_flag"
42977                          || test ! -s conftest.err'
42978   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42979   (eval $ac_try) 2>&5
42980   ac_status=$?
42981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42982   (exit $ac_status); }; } &&
42983          { ac_try='test -s conftest$ac_exeext'
42984   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42985   (eval $ac_try) 2>&5
42986   ac_status=$?
42987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42988   (exit $ac_status); }; }; then
42989   ac_cv_func__vsnprintf=yes
42990 else
42991   echo "$as_me: failed program was:" >&5
42992 sed 's/^/| /' conftest.$ac_ext >&5
42993
42994 ac_cv_func__vsnprintf=no
42995 fi
42996 rm -f conftest.err conftest.$ac_objext \
42997       conftest$ac_exeext conftest.$ac_ext
42998 fi
42999 echo "$as_me:$LINENO: result: $ac_cv_func__vsnprintf" >&5
43000 echo "${ECHO_T}$ac_cv_func__vsnprintf" >&6
43001 if test $ac_cv_func__vsnprintf = yes; then
43002   ac_cv_func_vsnprintf=yes
43003
43004 cat >>confdefs.h <<\_ACEOF
43005 #define vsnprintf _vsnprintf
43006 _ACEOF
43007
43008
43009 fi
43010
43011
43012
43013 for ac_func in vprintf
43014 do
43015 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
43016 echo "$as_me:$LINENO: checking for $ac_func" >&5
43017 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
43018 if eval "test \"\${$as_ac_var+set}\" = set"; then
43019   echo $ECHO_N "(cached) $ECHO_C" >&6
43020 else
43021   cat >conftest.$ac_ext <<_ACEOF
43022 /* confdefs.h.  */
43023 _ACEOF
43024 cat confdefs.h >>conftest.$ac_ext
43025 cat >>conftest.$ac_ext <<_ACEOF
43026 /* end confdefs.h.  */
43027 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
43028    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43029 #define $ac_func innocuous_$ac_func
43030
43031 /* System header to define __stub macros and hopefully few prototypes,
43032     which can conflict with char $ac_func (); below.
43033     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43034     <limits.h> exists even on freestanding compilers.  */
43035
43036 #ifdef __STDC__
43037 # include <limits.h>
43038 #else
43039 # include <assert.h>
43040 #endif
43041
43042 #undef $ac_func
43043
43044 /* Override any gcc2 internal prototype to avoid an error.  */
43045 #ifdef __cplusplus
43046 extern "C"
43047 {
43048 #endif
43049 /* We use char because int might match the return type of a gcc2
43050    builtin and then its argument prototype would still apply.  */
43051 char $ac_func ();
43052 /* The GNU C library defines this for functions which it implements
43053     to always fail with ENOSYS.  Some functions are actually named
43054     something starting with __ and the normal name is an alias.  */
43055 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
43056 choke me
43057 #else
43058 char (*f) () = $ac_func;
43059 #endif
43060 #ifdef __cplusplus
43061 }
43062 #endif
43063
43064 int
43065 main ()
43066 {
43067 return f != $ac_func;
43068   ;
43069   return 0;
43070 }
43071 _ACEOF
43072 rm -f conftest.$ac_objext conftest$ac_exeext
43073 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43074   (eval $ac_link) 2>conftest.er1
43075   ac_status=$?
43076   grep -v '^ *+' conftest.er1 >conftest.err
43077   rm -f conftest.er1
43078   cat conftest.err >&5
43079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43080   (exit $ac_status); } &&
43081          { ac_try='test -z "$ac_c_werror_flag"
43082                          || test ! -s conftest.err'
43083   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43084   (eval $ac_try) 2>&5
43085   ac_status=$?
43086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43087   (exit $ac_status); }; } &&
43088          { ac_try='test -s conftest$ac_exeext'
43089   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43090   (eval $ac_try) 2>&5
43091   ac_status=$?
43092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43093   (exit $ac_status); }; }; then
43094   eval "$as_ac_var=yes"
43095 else
43096   echo "$as_me: failed program was:" >&5
43097 sed 's/^/| /' conftest.$ac_ext >&5
43098
43099 eval "$as_ac_var=no"
43100 fi
43101 rm -f conftest.err conftest.$ac_objext \
43102       conftest$ac_exeext conftest.$ac_ext
43103 fi
43104 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
43105 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
43106 if test `eval echo '${'$as_ac_var'}'` = yes; then
43107   cat >>confdefs.h <<_ACEOF
43108 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
43109 _ACEOF
43110
43111 echo "$as_me:$LINENO: checking for _doprnt" >&5
43112 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
43113 if test "${ac_cv_func__doprnt+set}" = set; then
43114   echo $ECHO_N "(cached) $ECHO_C" >&6
43115 else
43116   cat >conftest.$ac_ext <<_ACEOF
43117 /* confdefs.h.  */
43118 _ACEOF
43119 cat confdefs.h >>conftest.$ac_ext
43120 cat >>conftest.$ac_ext <<_ACEOF
43121 /* end confdefs.h.  */
43122 /* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
43123    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43124 #define _doprnt innocuous__doprnt
43125
43126 /* System header to define __stub macros and hopefully few prototypes,
43127     which can conflict with char _doprnt (); below.
43128     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43129     <limits.h> exists even on freestanding compilers.  */
43130
43131 #ifdef __STDC__
43132 # include <limits.h>
43133 #else
43134 # include <assert.h>
43135 #endif
43136
43137 #undef _doprnt
43138
43139 /* Override any gcc2 internal prototype to avoid an error.  */
43140 #ifdef __cplusplus
43141 extern "C"
43142 {
43143 #endif
43144 /* We use char because int might match the return type of a gcc2
43145    builtin and then its argument prototype would still apply.  */
43146 char _doprnt ();
43147 /* The GNU C library defines this for functions which it implements
43148     to always fail with ENOSYS.  Some functions are actually named
43149     something starting with __ and the normal name is an alias.  */
43150 #if defined (__stub__doprnt) || defined (__stub____doprnt)
43151 choke me
43152 #else
43153 char (*f) () = _doprnt;
43154 #endif
43155 #ifdef __cplusplus
43156 }
43157 #endif
43158
43159 int
43160 main ()
43161 {
43162 return f != _doprnt;
43163   ;
43164   return 0;
43165 }
43166 _ACEOF
43167 rm -f conftest.$ac_objext conftest$ac_exeext
43168 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43169   (eval $ac_link) 2>conftest.er1
43170   ac_status=$?
43171   grep -v '^ *+' conftest.er1 >conftest.err
43172   rm -f conftest.er1
43173   cat conftest.err >&5
43174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43175   (exit $ac_status); } &&
43176          { ac_try='test -z "$ac_c_werror_flag"
43177                          || test ! -s conftest.err'
43178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43179   (eval $ac_try) 2>&5
43180   ac_status=$?
43181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43182   (exit $ac_status); }; } &&
43183          { ac_try='test -s conftest$ac_exeext'
43184   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43185   (eval $ac_try) 2>&5
43186   ac_status=$?
43187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43188   (exit $ac_status); }; }; then
43189   ac_cv_func__doprnt=yes
43190 else
43191   echo "$as_me: failed program was:" >&5
43192 sed 's/^/| /' conftest.$ac_ext >&5
43193
43194 ac_cv_func__doprnt=no
43195 fi
43196 rm -f conftest.err conftest.$ac_objext \
43197       conftest$ac_exeext conftest.$ac_ext
43198 fi
43199 echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
43200 echo "${ECHO_T}$ac_cv_func__doprnt" >&6
43201 if test $ac_cv_func__doprnt = yes; then
43202
43203 cat >>confdefs.h <<\_ACEOF
43204 #define HAVE_DOPRNT 1
43205 _ACEOF
43206
43207 fi
43208
43209 fi
43210 done
43211
43212
43213
43214 if test $ac_cv_func_vprintf = yes ; then
43215
43216
43217 for ac_func in snprintf vsnprintf
43218 do
43219 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
43220 echo "$as_me:$LINENO: checking for $ac_func" >&5
43221 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
43222 if eval "test \"\${$as_ac_var+set}\" = set"; then
43223   echo $ECHO_N "(cached) $ECHO_C" >&6
43224 else
43225   cat >conftest.$ac_ext <<_ACEOF
43226 /* confdefs.h.  */
43227 _ACEOF
43228 cat confdefs.h >>conftest.$ac_ext
43229 cat >>conftest.$ac_ext <<_ACEOF
43230 /* end confdefs.h.  */
43231 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
43232    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43233 #define $ac_func innocuous_$ac_func
43234
43235 /* System header to define __stub macros and hopefully few prototypes,
43236     which can conflict with char $ac_func (); below.
43237     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43238     <limits.h> exists even on freestanding compilers.  */
43239
43240 #ifdef __STDC__
43241 # include <limits.h>
43242 #else
43243 # include <assert.h>
43244 #endif
43245
43246 #undef $ac_func
43247
43248 /* Override any gcc2 internal prototype to avoid an error.  */
43249 #ifdef __cplusplus
43250 extern "C"
43251 {
43252 #endif
43253 /* We use char because int might match the return type of a gcc2
43254    builtin and then its argument prototype would still apply.  */
43255 char $ac_func ();
43256 /* The GNU C library defines this for functions which it implements
43257     to always fail with ENOSYS.  Some functions are actually named
43258     something starting with __ and the normal name is an alias.  */
43259 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
43260 choke me
43261 #else
43262 char (*f) () = $ac_func;
43263 #endif
43264 #ifdef __cplusplus
43265 }
43266 #endif
43267
43268 int
43269 main ()
43270 {
43271 return f != $ac_func;
43272   ;
43273   return 0;
43274 }
43275 _ACEOF
43276 rm -f conftest.$ac_objext conftest$ac_exeext
43277 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43278   (eval $ac_link) 2>conftest.er1
43279   ac_status=$?
43280   grep -v '^ *+' conftest.er1 >conftest.err
43281   rm -f conftest.er1
43282   cat conftest.err >&5
43283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43284   (exit $ac_status); } &&
43285          { ac_try='test -z "$ac_c_werror_flag"
43286                          || test ! -s conftest.err'
43287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43288   (eval $ac_try) 2>&5
43289   ac_status=$?
43290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43291   (exit $ac_status); }; } &&
43292          { ac_try='test -s conftest$ac_exeext'
43293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43294   (eval $ac_try) 2>&5
43295   ac_status=$?
43296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43297   (exit $ac_status); }; }; then
43298   eval "$as_ac_var=yes"
43299 else
43300   echo "$as_me: failed program was:" >&5
43301 sed 's/^/| /' conftest.$ac_ext >&5
43302
43303 eval "$as_ac_var=no"
43304 fi
43305 rm -f conftest.err conftest.$ac_objext \
43306       conftest$ac_exeext conftest.$ac_ext
43307 fi
43308 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
43309 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
43310 if test `eval echo '${'$as_ac_var'}'` = yes; then
43311   cat >>confdefs.h <<_ACEOF
43312 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
43313 _ACEOF
43314
43315 fi
43316 done
43317
43318 fi
43319
43320
43321
43322
43323
43324
43325
43326
43327
43328
43329
43330
43331
43332
43333
43334
43335
43336
43337
43338
43339
43340
43341
43342
43343
43344
43345
43346
43347
43348
43349
43350
43351
43352
43353
43354
43355
43356
43357
43358
43359
43360
43361
43362
43363
43364
43365
43366
43367
43368
43369
43370
43371
43372
43373
43374 for ac_func in \
43375         bcopy                   \
43376         closesocket             \
43377         chroot                  \
43378         endgrent                \
43379         endpwent                \
43380         fcntl                   \
43381         flock                   \
43382         fstat                   \
43383         getdtablesize   \
43384         getgrgid                \
43385         gethostname             \
43386         getpass                 \
43387         getpassphrase   \
43388         getpwuid                \
43389         getpwnam                \
43390         getspnam                \
43391         gettimeofday    \
43392         initgroups              \
43393         inet_ntoa_b             \
43394         lockf                   \
43395         memcpy                  \
43396         memmove                 \
43397         memrchr                 \
43398         mkstemp                 \
43399         mktemp                  \
43400         pipe                    \
43401         read                    \
43402         recv                    \
43403         recvfrom                \
43404         setpwfile               \
43405         setgid                  \
43406         setegid                 \
43407         setsid                  \
43408         setuid                  \
43409         seteuid                 \
43410         signal                  \
43411         strdup                  \
43412         strpbrk                 \
43413         strrchr                 \
43414         strsep                  \
43415         strstr                  \
43416         strtol                  \
43417         strtoul                 \
43418         strtoq                  \
43419         strtouq                 \
43420         strtoll                 \
43421         strspn                  \
43422         sysconf                 \
43423         waitpid                 \
43424         wait4                   \
43425         write                   \
43426         send                    \
43427         sendmsg                 \
43428         sendto                  \
43429
43430 do
43431 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
43432 echo "$as_me:$LINENO: checking for $ac_func" >&5
43433 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
43434 if eval "test \"\${$as_ac_var+set}\" = set"; then
43435   echo $ECHO_N "(cached) $ECHO_C" >&6
43436 else
43437   cat >conftest.$ac_ext <<_ACEOF
43438 /* confdefs.h.  */
43439 _ACEOF
43440 cat confdefs.h >>conftest.$ac_ext
43441 cat >>conftest.$ac_ext <<_ACEOF
43442 /* end confdefs.h.  */
43443 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
43444    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43445 #define $ac_func innocuous_$ac_func
43446
43447 /* System header to define __stub macros and hopefully few prototypes,
43448     which can conflict with char $ac_func (); below.
43449     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43450     <limits.h> exists even on freestanding compilers.  */
43451
43452 #ifdef __STDC__
43453 # include <limits.h>
43454 #else
43455 # include <assert.h>
43456 #endif
43457
43458 #undef $ac_func
43459
43460 /* Override any gcc2 internal prototype to avoid an error.  */
43461 #ifdef __cplusplus
43462 extern "C"
43463 {
43464 #endif
43465 /* We use char because int might match the return type of a gcc2
43466    builtin and then its argument prototype would still apply.  */
43467 char $ac_func ();
43468 /* The GNU C library defines this for functions which it implements
43469     to always fail with ENOSYS.  Some functions are actually named
43470     something starting with __ and the normal name is an alias.  */
43471 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
43472 choke me
43473 #else
43474 char (*f) () = $ac_func;
43475 #endif
43476 #ifdef __cplusplus
43477 }
43478 #endif
43479
43480 int
43481 main ()
43482 {
43483 return f != $ac_func;
43484   ;
43485   return 0;
43486 }
43487 _ACEOF
43488 rm -f conftest.$ac_objext conftest$ac_exeext
43489 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43490   (eval $ac_link) 2>conftest.er1
43491   ac_status=$?
43492   grep -v '^ *+' conftest.er1 >conftest.err
43493   rm -f conftest.er1
43494   cat conftest.err >&5
43495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43496   (exit $ac_status); } &&
43497          { ac_try='test -z "$ac_c_werror_flag"
43498                          || test ! -s conftest.err'
43499   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43500   (eval $ac_try) 2>&5
43501   ac_status=$?
43502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43503   (exit $ac_status); }; } &&
43504          { ac_try='test -s conftest$ac_exeext'
43505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43506   (eval $ac_try) 2>&5
43507   ac_status=$?
43508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43509   (exit $ac_status); }; }; then
43510   eval "$as_ac_var=yes"
43511 else
43512   echo "$as_me: failed program was:" >&5
43513 sed 's/^/| /' conftest.$ac_ext >&5
43514
43515 eval "$as_ac_var=no"
43516 fi
43517 rm -f conftest.err conftest.$ac_objext \
43518       conftest$ac_exeext conftest.$ac_ext
43519 fi
43520 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
43521 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
43522 if test `eval echo '${'$as_ac_var'}'` = yes; then
43523   cat >>confdefs.h <<_ACEOF
43524 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
43525 _ACEOF
43526
43527 fi
43528 done
43529
43530
43531
43532
43533 for ac_func in getopt getpeereid
43534 do
43535 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
43536 echo "$as_me:$LINENO: checking for $ac_func" >&5
43537 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
43538 if eval "test \"\${$as_ac_var+set}\" = set"; then
43539   echo $ECHO_N "(cached) $ECHO_C" >&6
43540 else
43541   cat >conftest.$ac_ext <<_ACEOF
43542 /* confdefs.h.  */
43543 _ACEOF
43544 cat confdefs.h >>conftest.$ac_ext
43545 cat >>conftest.$ac_ext <<_ACEOF
43546 /* end confdefs.h.  */
43547 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
43548    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43549 #define $ac_func innocuous_$ac_func
43550
43551 /* System header to define __stub macros and hopefully few prototypes,
43552     which can conflict with char $ac_func (); below.
43553     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43554     <limits.h> exists even on freestanding compilers.  */
43555
43556 #ifdef __STDC__
43557 # include <limits.h>
43558 #else
43559 # include <assert.h>
43560 #endif
43561
43562 #undef $ac_func
43563
43564 /* Override any gcc2 internal prototype to avoid an error.  */
43565 #ifdef __cplusplus
43566 extern "C"
43567 {
43568 #endif
43569 /* We use char because int might match the return type of a gcc2
43570    builtin and then its argument prototype would still apply.  */
43571 char $ac_func ();
43572 /* The GNU C library defines this for functions which it implements
43573     to always fail with ENOSYS.  Some functions are actually named
43574     something starting with __ and the normal name is an alias.  */
43575 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
43576 choke me
43577 #else
43578 char (*f) () = $ac_func;
43579 #endif
43580 #ifdef __cplusplus
43581 }
43582 #endif
43583
43584 int
43585 main ()
43586 {
43587 return f != $ac_func;
43588   ;
43589   return 0;
43590 }
43591 _ACEOF
43592 rm -f conftest.$ac_objext conftest$ac_exeext
43593 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43594   (eval $ac_link) 2>conftest.er1
43595   ac_status=$?
43596   grep -v '^ *+' conftest.er1 >conftest.err
43597   rm -f conftest.er1
43598   cat conftest.err >&5
43599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43600   (exit $ac_status); } &&
43601          { ac_try='test -z "$ac_c_werror_flag"
43602                          || test ! -s conftest.err'
43603   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43604   (eval $ac_try) 2>&5
43605   ac_status=$?
43606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43607   (exit $ac_status); }; } &&
43608          { ac_try='test -s conftest$ac_exeext'
43609   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43610   (eval $ac_try) 2>&5
43611   ac_status=$?
43612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43613   (exit $ac_status); }; }; then
43614   eval "$as_ac_var=yes"
43615 else
43616   echo "$as_me: failed program was:" >&5
43617 sed 's/^/| /' conftest.$ac_ext >&5
43618
43619 eval "$as_ac_var=no"
43620 fi
43621 rm -f conftest.err conftest.$ac_objext \
43622       conftest$ac_exeext conftest.$ac_ext
43623 fi
43624 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
43625 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
43626 if test `eval echo '${'$as_ac_var'}'` = yes; then
43627   cat >>confdefs.h <<_ACEOF
43628 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
43629 _ACEOF
43630
43631 else
43632   case $LIBOBJS in
43633     "$ac_func.$ac_objext"   | \
43634   *" $ac_func.$ac_objext"   | \
43635     "$ac_func.$ac_objext "* | \
43636   *" $ac_func.$ac_objext "* ) ;;
43637   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
43638 esac
43639
43640 fi
43641 done
43642
43643
43644
43645 if test "$ac_cv_func_getopt" != yes; then
43646         LIBSRCS="$LIBSRCS getopt.c"
43647 fi
43648
43649 if test "$ac_cv_func_getpeereid" != yes; then
43650
43651 for ac_func in getpeerucred
43652 do
43653 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
43654 echo "$as_me:$LINENO: checking for $ac_func" >&5
43655 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
43656 if eval "test \"\${$as_ac_var+set}\" = set"; then
43657   echo $ECHO_N "(cached) $ECHO_C" >&6
43658 else
43659   cat >conftest.$ac_ext <<_ACEOF
43660 /* confdefs.h.  */
43661 _ACEOF
43662 cat confdefs.h >>conftest.$ac_ext
43663 cat >>conftest.$ac_ext <<_ACEOF
43664 /* end confdefs.h.  */
43665 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
43666    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43667 #define $ac_func innocuous_$ac_func
43668
43669 /* System header to define __stub macros and hopefully few prototypes,
43670     which can conflict with char $ac_func (); below.
43671     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43672     <limits.h> exists even on freestanding compilers.  */
43673
43674 #ifdef __STDC__
43675 # include <limits.h>
43676 #else
43677 # include <assert.h>
43678 #endif
43679
43680 #undef $ac_func
43681
43682 /* Override any gcc2 internal prototype to avoid an error.  */
43683 #ifdef __cplusplus
43684 extern "C"
43685 {
43686 #endif
43687 /* We use char because int might match the return type of a gcc2
43688    builtin and then its argument prototype would still apply.  */
43689 char $ac_func ();
43690 /* The GNU C library defines this for functions which it implements
43691     to always fail with ENOSYS.  Some functions are actually named
43692     something starting with __ and the normal name is an alias.  */
43693 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
43694 choke me
43695 #else
43696 char (*f) () = $ac_func;
43697 #endif
43698 #ifdef __cplusplus
43699 }
43700 #endif
43701
43702 int
43703 main ()
43704 {
43705 return f != $ac_func;
43706   ;
43707   return 0;
43708 }
43709 _ACEOF
43710 rm -f conftest.$ac_objext conftest$ac_exeext
43711 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43712   (eval $ac_link) 2>conftest.er1
43713   ac_status=$?
43714   grep -v '^ *+' conftest.er1 >conftest.err
43715   rm -f conftest.er1
43716   cat conftest.err >&5
43717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43718   (exit $ac_status); } &&
43719          { ac_try='test -z "$ac_c_werror_flag"
43720                          || test ! -s conftest.err'
43721   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43722   (eval $ac_try) 2>&5
43723   ac_status=$?
43724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43725   (exit $ac_status); }; } &&
43726          { ac_try='test -s conftest$ac_exeext'
43727   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43728   (eval $ac_try) 2>&5
43729   ac_status=$?
43730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43731   (exit $ac_status); }; }; then
43732   eval "$as_ac_var=yes"
43733 else
43734   echo "$as_me: failed program was:" >&5
43735 sed 's/^/| /' conftest.$ac_ext >&5
43736
43737 eval "$as_ac_var=no"
43738 fi
43739 rm -f conftest.err conftest.$ac_objext \
43740       conftest$ac_exeext conftest.$ac_ext
43741 fi
43742 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
43743 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
43744 if test `eval echo '${'$as_ac_var'}'` = yes; then
43745   cat >>confdefs.h <<_ACEOF
43746 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
43747 _ACEOF
43748
43749 fi
43750 done
43751
43752         if test "$ac_cv_func_getpeerucred" != yes ; then
43753                 echo "$as_me:$LINENO: checking for struct msghdr.msg_accrightslen" >&5
43754 echo $ECHO_N "checking for struct msghdr.msg_accrightslen... $ECHO_C" >&6
43755 if test "${ac_cv_member_struct_msghdr_msg_accrightslen+set}" = set; then
43756   echo $ECHO_N "(cached) $ECHO_C" >&6
43757 else
43758   cat >conftest.$ac_ext <<_ACEOF
43759 /* confdefs.h.  */
43760 _ACEOF
43761 cat confdefs.h >>conftest.$ac_ext
43762 cat >>conftest.$ac_ext <<_ACEOF
43763 /* end confdefs.h.  */
43764 $ac_includes_default
43765 #ifdef HAVE_SYS_SOCKET_H
43766 #include <sys/socket.h>
43767 #endif
43768
43769 int
43770 main ()
43771 {
43772 static struct msghdr ac_aggr;
43773 if (ac_aggr.msg_accrightslen)
43774 return 0;
43775   ;
43776   return 0;
43777 }
43778 _ACEOF
43779 rm -f conftest.$ac_objext
43780 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
43781   (eval $ac_compile) 2>conftest.er1
43782   ac_status=$?
43783   grep -v '^ *+' conftest.er1 >conftest.err
43784   rm -f conftest.er1
43785   cat conftest.err >&5
43786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43787   (exit $ac_status); } &&
43788          { ac_try='test -z "$ac_c_werror_flag"
43789                          || test ! -s conftest.err'
43790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43791   (eval $ac_try) 2>&5
43792   ac_status=$?
43793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43794   (exit $ac_status); }; } &&
43795          { ac_try='test -s conftest.$ac_objext'
43796   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43797   (eval $ac_try) 2>&5
43798   ac_status=$?
43799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43800   (exit $ac_status); }; }; then
43801   ac_cv_member_struct_msghdr_msg_accrightslen=yes
43802 else
43803   echo "$as_me: failed program was:" >&5
43804 sed 's/^/| /' conftest.$ac_ext >&5
43805
43806 cat >conftest.$ac_ext <<_ACEOF
43807 /* confdefs.h.  */
43808 _ACEOF
43809 cat confdefs.h >>conftest.$ac_ext
43810 cat >>conftest.$ac_ext <<_ACEOF
43811 /* end confdefs.h.  */
43812 $ac_includes_default
43813 #ifdef HAVE_SYS_SOCKET_H
43814 #include <sys/socket.h>
43815 #endif
43816
43817 int
43818 main ()
43819 {
43820 static struct msghdr ac_aggr;
43821 if (sizeof ac_aggr.msg_accrightslen)
43822 return 0;
43823   ;
43824   return 0;
43825 }
43826 _ACEOF
43827 rm -f conftest.$ac_objext
43828 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
43829   (eval $ac_compile) 2>conftest.er1
43830   ac_status=$?
43831   grep -v '^ *+' conftest.er1 >conftest.err
43832   rm -f conftest.er1
43833   cat conftest.err >&5
43834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43835   (exit $ac_status); } &&
43836          { ac_try='test -z "$ac_c_werror_flag"
43837                          || test ! -s conftest.err'
43838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43839   (eval $ac_try) 2>&5
43840   ac_status=$?
43841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43842   (exit $ac_status); }; } &&
43843          { ac_try='test -s conftest.$ac_objext'
43844   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43845   (eval $ac_try) 2>&5
43846   ac_status=$?
43847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43848   (exit $ac_status); }; }; then
43849   ac_cv_member_struct_msghdr_msg_accrightslen=yes
43850 else
43851   echo "$as_me: failed program was:" >&5
43852 sed 's/^/| /' conftest.$ac_ext >&5
43853
43854 ac_cv_member_struct_msghdr_msg_accrightslen=no
43855 fi
43856 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
43857 fi
43858 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
43859 fi
43860 echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_accrightslen" >&5
43861 echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_accrightslen" >&6
43862 if test $ac_cv_member_struct_msghdr_msg_accrightslen = yes; then
43863
43864 cat >>confdefs.h <<_ACEOF
43865 #define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTSLEN 1
43866 _ACEOF
43867
43868
43869 fi
43870
43871                 if test "$ac_cv_member_struct_msghdr_msg_accrightslen" != yes; then
43872                         echo "$as_me:$LINENO: checking for struct msghdr.msg_control" >&5
43873 echo $ECHO_N "checking for struct msghdr.msg_control... $ECHO_C" >&6
43874 if test "${ac_cv_member_struct_msghdr_msg_control+set}" = set; then
43875   echo $ECHO_N "(cached) $ECHO_C" >&6
43876 else
43877   cat >conftest.$ac_ext <<_ACEOF
43878 /* confdefs.h.  */
43879 _ACEOF
43880 cat confdefs.h >>conftest.$ac_ext
43881 cat >>conftest.$ac_ext <<_ACEOF
43882 /* end confdefs.h.  */
43883 $ac_includes_default
43884 #ifdef HAVE_SYS_SOCKET_H
43885 #include <sys/socket.h>
43886 #endif
43887
43888 int
43889 main ()
43890 {
43891 static struct msghdr ac_aggr;
43892 if (ac_aggr.msg_control)
43893 return 0;
43894   ;
43895   return 0;
43896 }
43897 _ACEOF
43898 rm -f conftest.$ac_objext
43899 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
43900   (eval $ac_compile) 2>conftest.er1
43901   ac_status=$?
43902   grep -v '^ *+' conftest.er1 >conftest.err
43903   rm -f conftest.er1
43904   cat conftest.err >&5
43905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43906   (exit $ac_status); } &&
43907          { ac_try='test -z "$ac_c_werror_flag"
43908                          || test ! -s conftest.err'
43909   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43910   (eval $ac_try) 2>&5
43911   ac_status=$?
43912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43913   (exit $ac_status); }; } &&
43914          { ac_try='test -s conftest.$ac_objext'
43915   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43916   (eval $ac_try) 2>&5
43917   ac_status=$?
43918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43919   (exit $ac_status); }; }; then
43920   ac_cv_member_struct_msghdr_msg_control=yes
43921 else
43922   echo "$as_me: failed program was:" >&5
43923 sed 's/^/| /' conftest.$ac_ext >&5
43924
43925 cat >conftest.$ac_ext <<_ACEOF
43926 /* confdefs.h.  */
43927 _ACEOF
43928 cat confdefs.h >>conftest.$ac_ext
43929 cat >>conftest.$ac_ext <<_ACEOF
43930 /* end confdefs.h.  */
43931 $ac_includes_default
43932 #ifdef HAVE_SYS_SOCKET_H
43933 #include <sys/socket.h>
43934 #endif
43935
43936 int
43937 main ()
43938 {
43939 static struct msghdr ac_aggr;
43940 if (sizeof ac_aggr.msg_control)
43941 return 0;
43942   ;
43943   return 0;
43944 }
43945 _ACEOF
43946 rm -f conftest.$ac_objext
43947 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
43948   (eval $ac_compile) 2>conftest.er1
43949   ac_status=$?
43950   grep -v '^ *+' conftest.er1 >conftest.err
43951   rm -f conftest.er1
43952   cat conftest.err >&5
43953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43954   (exit $ac_status); } &&
43955          { ac_try='test -z "$ac_c_werror_flag"
43956                          || test ! -s conftest.err'
43957   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43958   (eval $ac_try) 2>&5
43959   ac_status=$?
43960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43961   (exit $ac_status); }; } &&
43962          { ac_try='test -s conftest.$ac_objext'
43963   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43964   (eval $ac_try) 2>&5
43965   ac_status=$?
43966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43967   (exit $ac_status); }; }; then
43968   ac_cv_member_struct_msghdr_msg_control=yes
43969 else
43970   echo "$as_me: failed program was:" >&5
43971 sed 's/^/| /' conftest.$ac_ext >&5
43972
43973 ac_cv_member_struct_msghdr_msg_control=no
43974 fi
43975 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
43976 fi
43977 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
43978 fi
43979 echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_control" >&5
43980 echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_control" >&6
43981 if test $ac_cv_member_struct_msghdr_msg_control = yes; then
43982
43983 cat >>confdefs.h <<_ACEOF
43984 #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
43985 _ACEOF
43986
43987
43988 fi
43989
43990                 fi
43991         fi
43992         LIBSRCS="$LIBSRCS getpeereid.c"
43993 fi
43994
43995 if test "$ac_cv_func_snprintf" != yes ||
43996    test "$ac_cv_func_vsnprintf" != yes; then
43997         if test "$ac_cv_func_snprintf" != yes; then
43998
43999 cat >>confdefs.h <<\_ACEOF
44000 #define snprintf ber_pvt_snprintf
44001 _ACEOF
44002
44003         fi
44004         if test "$ac_cv_func_vsnprintf" != yes; then
44005
44006 cat >>confdefs.h <<\_ACEOF
44007 #define vsnprintf ber_pvt_vsnprintf
44008 _ACEOF
44009
44010         fi
44011 fi
44012
44013
44014 if test "$ol_enable_slapi" != no ; then
44015
44016 for ac_header in ltdl.h
44017 do
44018 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
44019 if eval "test \"\${$as_ac_Header+set}\" = set"; then
44020   echo "$as_me:$LINENO: checking for $ac_header" >&5
44021 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
44022 if eval "test \"\${$as_ac_Header+set}\" = set"; then
44023   echo $ECHO_N "(cached) $ECHO_C" >&6
44024 fi
44025 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
44026 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
44027 else
44028   # Is the header compilable?
44029 echo "$as_me:$LINENO: checking $ac_header usability" >&5
44030 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
44031 cat >conftest.$ac_ext <<_ACEOF
44032 /* confdefs.h.  */
44033 _ACEOF
44034 cat confdefs.h >>conftest.$ac_ext
44035 cat >>conftest.$ac_ext <<_ACEOF
44036 /* end confdefs.h.  */
44037 $ac_includes_default
44038 #include <$ac_header>
44039 _ACEOF
44040 rm -f conftest.$ac_objext
44041 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
44042   (eval $ac_compile) 2>conftest.er1
44043   ac_status=$?
44044   grep -v '^ *+' conftest.er1 >conftest.err
44045   rm -f conftest.er1
44046   cat conftest.err >&5
44047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44048   (exit $ac_status); } &&
44049          { ac_try='test -z "$ac_c_werror_flag"
44050                          || test ! -s conftest.err'
44051   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44052   (eval $ac_try) 2>&5
44053   ac_status=$?
44054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44055   (exit $ac_status); }; } &&
44056          { ac_try='test -s conftest.$ac_objext'
44057   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44058   (eval $ac_try) 2>&5
44059   ac_status=$?
44060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44061   (exit $ac_status); }; }; then
44062   ac_header_compiler=yes
44063 else
44064   echo "$as_me: failed program was:" >&5
44065 sed 's/^/| /' conftest.$ac_ext >&5
44066
44067 ac_header_compiler=no
44068 fi
44069 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
44070 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
44071 echo "${ECHO_T}$ac_header_compiler" >&6
44072
44073 # Is the header present?
44074 echo "$as_me:$LINENO: checking $ac_header presence" >&5
44075 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
44076 cat >conftest.$ac_ext <<_ACEOF
44077 /* confdefs.h.  */
44078 _ACEOF
44079 cat confdefs.h >>conftest.$ac_ext
44080 cat >>conftest.$ac_ext <<_ACEOF
44081 /* end confdefs.h.  */
44082 #include <$ac_header>
44083 _ACEOF
44084 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
44085   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
44086   ac_status=$?
44087   grep -v '^ *+' conftest.er1 >conftest.err
44088   rm -f conftest.er1
44089   cat conftest.err >&5
44090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44091   (exit $ac_status); } >/dev/null; then
44092   if test -s conftest.err; then
44093     ac_cpp_err=$ac_c_preproc_warn_flag
44094     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
44095   else
44096     ac_cpp_err=
44097   fi
44098 else
44099   ac_cpp_err=yes
44100 fi
44101 if test -z "$ac_cpp_err"; then
44102   ac_header_preproc=yes
44103 else
44104   echo "$as_me: failed program was:" >&5
44105 sed 's/^/| /' conftest.$ac_ext >&5
44106
44107   ac_header_preproc=no
44108 fi
44109 rm -f conftest.err conftest.$ac_ext
44110 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
44111 echo "${ECHO_T}$ac_header_preproc" >&6
44112
44113 # So?  What about this header?
44114 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
44115   yes:no: )
44116     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
44117 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
44118     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
44119 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
44120     ac_header_preproc=yes
44121     ;;
44122   no:yes:* )
44123     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
44124 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
44125     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
44126 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
44127     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
44128 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
44129     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
44130 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
44131     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
44132 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
44133     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
44134 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
44135     (
44136       cat <<\_ASBOX
44137 ## --------------------------------------------- ##
44138 ## Report this to <http://www.openldap.org/its/> ##
44139 ## --------------------------------------------- ##
44140 _ASBOX
44141     ) |
44142       sed "s/^/$as_me: WARNING:     /" >&2
44143     ;;
44144 esac
44145 echo "$as_me:$LINENO: checking for $ac_header" >&5
44146 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
44147 if eval "test \"\${$as_ac_Header+set}\" = set"; then
44148   echo $ECHO_N "(cached) $ECHO_C" >&6
44149 else
44150   eval "$as_ac_Header=\$ac_header_preproc"
44151 fi
44152 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
44153 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
44154
44155 fi
44156 if test `eval echo '${'$as_ac_Header'}'` = yes; then
44157   cat >>confdefs.h <<_ACEOF
44158 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
44159 _ACEOF
44160
44161 fi
44162
44163 done
44164
44165
44166         if test $ac_cv_header_ltdl_h != yes ; then
44167                 { { echo "$as_me:$LINENO: error: could not locate <ltdl.h>" >&5
44168 echo "$as_me: error: could not locate <ltdl.h>" >&2;}
44169    { (exit 1); exit 1; }; }
44170         fi
44171         echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
44172 echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6
44173 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
44174   echo $ECHO_N "(cached) $ECHO_C" >&6
44175 else
44176   ac_check_lib_save_LIBS=$LIBS
44177 LIBS="-lltdl  $LIBS"
44178 cat >conftest.$ac_ext <<_ACEOF
44179 /* confdefs.h.  */
44180 _ACEOF
44181 cat confdefs.h >>conftest.$ac_ext
44182 cat >>conftest.$ac_ext <<_ACEOF
44183 /* end confdefs.h.  */
44184
44185 /* Override any gcc2 internal prototype to avoid an error.  */
44186 #ifdef __cplusplus
44187 extern "C"
44188 #endif
44189 /* We use char because int might match the return type of a gcc2
44190    builtin and then its argument prototype would still apply.  */
44191 char lt_dlinit ();
44192 int
44193 main ()
44194 {
44195 lt_dlinit ();
44196   ;
44197   return 0;
44198 }
44199 _ACEOF
44200 rm -f conftest.$ac_objext conftest$ac_exeext
44201 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
44202   (eval $ac_link) 2>conftest.er1
44203   ac_status=$?
44204   grep -v '^ *+' conftest.er1 >conftest.err
44205   rm -f conftest.er1
44206   cat conftest.err >&5
44207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44208   (exit $ac_status); } &&
44209          { ac_try='test -z "$ac_c_werror_flag"
44210                          || test ! -s conftest.err'
44211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44212   (eval $ac_try) 2>&5
44213   ac_status=$?
44214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44215   (exit $ac_status); }; } &&
44216          { ac_try='test -s conftest$ac_exeext'
44217   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44218   (eval $ac_try) 2>&5
44219   ac_status=$?
44220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44221   (exit $ac_status); }; }; then
44222   ac_cv_lib_ltdl_lt_dlinit=yes
44223 else
44224   echo "$as_me: failed program was:" >&5
44225 sed 's/^/| /' conftest.$ac_ext >&5
44226
44227 ac_cv_lib_ltdl_lt_dlinit=no
44228 fi
44229 rm -f conftest.err conftest.$ac_objext \
44230       conftest$ac_exeext conftest.$ac_ext
44231 LIBS=$ac_check_lib_save_LIBS
44232 fi
44233 echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
44234 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6
44235 if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
44236
44237                 SLAPI_LIBS=-lltdl
44238                 LIBSLAPI=libslapi.a
44239                 LIBSLAPITOOLS=../libslapi.a
44240
44241 cat >>confdefs.h <<\_ACEOF
44242 #define HAVE_LIBLTDL 1
44243 _ACEOF
44244
44245
44246 else
44247   { { echo "$as_me:$LINENO: error: could not locate libtool -lltdl" >&5
44248 echo "$as_me: error: could not locate libtool -lltdl" >&2;}
44249    { (exit 1); exit 1; }; }
44250 fi
44251
44252
44253
44254 cat >>confdefs.h <<\_ACEOF
44255 #define LDAP_SLAPI 1
44256 _ACEOF
44257
44258 fi
44259
44260 if test "$ol_enable_debug" != no ; then
44261         if test "$ol_enable_debug" = traditional; then
44262
44263 cat >>confdefs.h <<\_ACEOF
44264 #define OLD_DEBUG 1
44265 _ACEOF
44266
44267         fi
44268
44269 cat >>confdefs.h <<\_ACEOF
44270 #define LDAP_DEBUG 1
44271 _ACEOF
44272
44273 fi
44274 if test "$ol_enable_syslog" = yes ; then
44275
44276 cat >>confdefs.h <<\_ACEOF
44277 #define LDAP_SYSLOG 1
44278 _ACEOF
44279
44280 fi
44281 if test "$ol_link_kbind" != no ; then
44282
44283 cat >>confdefs.h <<\_ACEOF
44284 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
44285 _ACEOF
44286
44287 fi
44288 if test "$ol_enable_proctitle" != no ; then
44289
44290 cat >>confdefs.h <<\_ACEOF
44291 #define LDAP_PROCTITLE 1
44292 _ACEOF
44293
44294 fi
44295 if test "$ol_enable_referrals" != no ; then
44296
44297 cat >>confdefs.h <<\_ACEOF
44298 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
44299 _ACEOF
44300
44301 fi
44302 if test "$ol_enable_local" != no; then
44303
44304 cat >>confdefs.h <<\_ACEOF
44305 #define LDAP_PF_LOCAL 1
44306 _ACEOF
44307
44308 fi
44309 if test "$ol_link_ipv6" != no; then
44310
44311 cat >>confdefs.h <<\_ACEOF
44312 #define LDAP_PF_INET6 1
44313 _ACEOF
44314
44315 fi
44316 if test "$ol_enable_cleartext" != no ; then
44317
44318 cat >>confdefs.h <<\_ACEOF
44319 #define SLAPD_CLEARTEXT 1
44320 _ACEOF
44321
44322 fi
44323 if test "$ol_enable_crypt" != no ; then
44324
44325 cat >>confdefs.h <<\_ACEOF
44326 #define SLAPD_CRYPT 1
44327 _ACEOF
44328
44329 fi
44330 if test "$ol_link_spasswd" != no ; then
44331
44332 cat >>confdefs.h <<\_ACEOF
44333 #define SLAPD_SPASSWD 1
44334 _ACEOF
44335
44336 fi
44337 if test "$ol_enable_multimaster" != no ; then
44338
44339 cat >>confdefs.h <<\_ACEOF
44340 #define SLAPD_MULTIMASTER 1
44341 _ACEOF
44342
44343 fi
44344 if test "$ol_enable_rlookups" != no ; then
44345
44346 cat >>confdefs.h <<\_ACEOF
44347 #define SLAPD_RLOOKUPS 1
44348 _ACEOF
44349
44350 fi
44351 if test "$ol_enable_aci" != no ; then
44352         if test $ol_enable_dynacl = no ; then
44353                 ol_enable_dynacl=yes
44354                 { echo "$as_me:$LINENO: WARNING: ACIs need dynacl" >&5
44355 echo "$as_me: WARNING: ACIs need dynacl" >&2;}
44356         fi
44357         if test "$ol_enable_aci" = mod ; then
44358                 MFLAG=SLAPD_MOD_DYNAMIC
44359                                 { { echo "$as_me:$LINENO: error: ACI build as dynamic module not supported (yet)" >&5
44360 echo "$as_me: error: ACI build as dynamic module not supported (yet)" >&2;}
44361    { (exit 1); exit 1; }; }
44362         else
44363                 MFLAG=SLAPD_MOD_STATIC
44364         fi
44365         WITH_ACI_ENABLED=$ol_enable_aci
44366
44367 cat >>confdefs.h <<_ACEOF
44368 #define SLAPD_ACI_ENABLED $MFLAG
44369 _ACEOF
44370
44371 else
44372         WITH_ACI_ENABLED=no
44373 fi
44374 if test "$ol_enable_dynacl" != no ; then
44375
44376 cat >>confdefs.h <<\_ACEOF
44377 #define SLAP_DYNACL 1
44378 _ACEOF
44379
44380 fi
44381
44382 if test "$ol_link_modules" != no ; then
44383
44384 cat >>confdefs.h <<\_ACEOF
44385 #define SLAPD_MODULES 1
44386 _ACEOF
44387
44388         BUILD_SLAPD=yes
44389         SLAPD_MODULES_LDFLAGS="-dlopen self"
44390 fi
44391
44392
44393 cat >>confdefs.h <<\_ACEOF
44394 #define SLAPD_MOD_STATIC 1
44395 _ACEOF
44396
44397
44398 cat >>confdefs.h <<\_ACEOF
44399 #define SLAPD_MOD_DYNAMIC 2
44400 _ACEOF
44401
44402
44403 if test "$ol_enable_bdb" != no ; then
44404         BUILD_SLAPD=yes
44405         BUILD_BDB=$ol_enable_bdb
44406         if test "$ol_enable_bdb" = mod ; then
44407                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
44408                 MFLAG=SLAPD_MOD_DYNAMIC
44409         else
44410                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
44411                 MFLAG=SLAPD_MOD_STATIC
44412         fi
44413
44414 cat >>confdefs.h <<_ACEOF
44415 #define SLAPD_BDB $MFLAG
44416 _ACEOF
44417
44418 fi
44419
44420 if test "$ol_enable_dnssrv" != no ; then
44421         BUILD_SLAPD=yes
44422         BUILD_DNSSRV=$ol_enable_dnssrv
44423         if test "$ol_enable_dnssrv" = mod ; then
44424                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
44425                 MFLAG=SLAPD_MOD_DYNAMIC
44426         else
44427                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
44428                 MFLAG=SLAPD_MOD_STATIC
44429         fi
44430
44431 cat >>confdefs.h <<_ACEOF
44432 #define SLAPD_DNSSRV $MFLAG
44433 _ACEOF
44434
44435 fi
44436
44437 if test "$ol_enable_hdb" != no ; then
44438         BUILD_SLAPD=yes
44439         BUILD_HDB=$ol_enable_hdb
44440         if test "$ol_enable_hdb" = mod ; then
44441                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
44442                 MFLAG=SLAPD_MOD_DYNAMIC
44443         else
44444                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
44445                 MFLAG=SLAPD_MOD_STATIC
44446         fi
44447
44448 cat >>confdefs.h <<_ACEOF
44449 #define SLAPD_HDB $MFLAG
44450 _ACEOF
44451
44452 fi
44453
44454 if test "$ol_enable_ldap" != no ; then
44455         BUILD_SLAPD=yes
44456         BUILD_LDAP=$ol_enable_ldap
44457         if test "$ol_enable_ldap" = mod ; then
44458                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
44459                 MFLAG=SLAPD_MOD_DYNAMIC
44460         else
44461                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
44462                 MFLAG=SLAPD_MOD_STATIC
44463         fi
44464
44465 cat >>confdefs.h <<_ACEOF
44466 #define SLAPD_LDAP $MFLAG
44467 _ACEOF
44468
44469 fi
44470
44471 if test "$ol_link_ldbm" != no && test $ol_enable_ldbm != no; then
44472         BUILD_SLAPD=yes
44473         BUILD_LDBM=$ol_enable_ldbm
44474         if test "$ol_enable_ldbm" = mod ; then
44475                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
44476                 MFLAG=SLAPD_MOD_DYNAMIC
44477         else
44478                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
44479                 MFLAG=SLAPD_MOD_STATIC
44480         fi
44481
44482 cat >>confdefs.h <<_ACEOF
44483 #define SLAPD_LDBM $MFLAG
44484 _ACEOF
44485
44486 fi
44487
44488 if test "$ol_enable_meta" != no ; then
44489         BUILD_SLAPD=yes
44490         BUILD_META=$ol_enable_meta
44491         BUILD_REWRITE=yes
44492         if test "$ol_enable_meta" = mod ; then
44493                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
44494                 MFLAG=SLAPD_MOD_DYNAMIC
44495         else
44496                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
44497                 MFLAG=SLAPD_MOD_STATIC
44498         fi
44499
44500 cat >>confdefs.h <<_ACEOF
44501 #define SLAPD_META $MFLAG
44502 _ACEOF
44503
44504 fi
44505
44506 if test "$ol_enable_monitor" != no ; then
44507         BUILD_SLAPD=yes
44508         BUILD_MONITOR=$ol_enable_monitor
44509         if test "$ol_enable_monitor" = mod ; then
44510                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
44511                 MFLAG=SLAPD_MOD_DYNAMIC
44512         else
44513                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
44514                 MFLAG=SLAPD_MOD_STATIC
44515         fi
44516
44517 cat >>confdefs.h <<_ACEOF
44518 #define SLAPD_MONITOR $MFLAG
44519 _ACEOF
44520
44521 fi
44522
44523 if test "$ol_enable_null" != no ; then
44524         BUILD_SLAPD=yes
44525         BUILD_NULL=$ol_enable_null
44526         if test "$ol_enable_null" = mod ; then
44527                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
44528                 MFLAG=SLAPD_MOD_DYNAMIC
44529         else
44530                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
44531                 MFLAG=SLAPD_MOD_STATIC
44532         fi
44533
44534 cat >>confdefs.h <<_ACEOF
44535 #define SLAPD_NULL $MFLAG
44536 _ACEOF
44537
44538 fi
44539
44540 if test "$ol_enable_passwd" != no ; then
44541         BUILD_SLAPD=yes
44542         BUILD_PASSWD=$ol_enable_passwd
44543         if test "$ol_enable_passwd" = mod ; then
44544                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
44545                 MFLAG=SLAPD_MOD_DYNAMIC
44546         else
44547                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
44548                 MFLAG=SLAPD_MOD_STATIC
44549         fi
44550
44551 cat >>confdefs.h <<_ACEOF
44552 #define SLAPD_PASSWD $MFLAG
44553 _ACEOF
44554
44555 fi
44556
44557 if test "$ol_link_perl" != no ; then
44558         BUILD_SLAPD=yes
44559         BUILD_PERL=$ol_enable_perl
44560         if test "$ol_enable_perl" = mod ; then
44561                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
44562                 MFLAG=SLAPD_MOD_DYNAMIC
44563         else
44564                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
44565                 MFLAG=SLAPD_MOD_STATIC
44566         fi
44567
44568 cat >>confdefs.h <<_ACEOF
44569 #define SLAPD_PERL $MFLAG
44570 _ACEOF
44571
44572 fi
44573
44574 if test "$ol_enable_relay" != no ; then
44575         BUILD_SLAPD=yes
44576         BUILD_RELAY=$ol_enable_relay
44577         if test "$ol_enable_relay" = mod ; then
44578                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
44579                 MFLAG=SLAPD_MOD_DYNAMIC
44580         else
44581                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
44582                 MFLAG=SLAPD_MOD_STATIC
44583         fi
44584
44585 cat >>confdefs.h <<_ACEOF
44586 #define SLAPD_RELAY $MFLAG
44587 _ACEOF
44588
44589 fi
44590
44591 if test "$ol_enable_shell" != no ; then
44592         if test "$ol_link_threads" != no ; then
44593                 { echo "$as_me:$LINENO: WARNING: Use of --without-threads is recommended with back-shell" >&5
44594 echo "$as_me: WARNING: Use of --without-threads is recommended with back-shell" >&2;}
44595         fi
44596         BUILD_SLAPD=yes
44597         BUILD_SHELL=$ol_enable_shell
44598         if test "$ol_enable_shell" = mod ; then
44599                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
44600                 MFLAG=SLAPD_MOD_DYNAMIC
44601         else
44602                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
44603                 MFLAG=SLAPD_MOD_STATIC
44604         fi
44605
44606 cat >>confdefs.h <<_ACEOF
44607 #define SLAPD_SHELL $MFLAG
44608 _ACEOF
44609
44610 fi
44611
44612 if test "$ol_link_sql" != no ; then
44613         BUILD_SLAPD=yes
44614         BUILD_SQL=$ol_enable_sql
44615         if test "$ol_enable_sql" = mod; then
44616                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
44617                 MFLAG=SLAPD_MOD_DYNAMIC
44618         else
44619                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
44620                 MFLAG=SLAPD_MOD_STATIC
44621         fi
44622
44623 cat >>confdefs.h <<_ACEOF
44624 #define SLAPD_SQL $MFLAG
44625 _ACEOF
44626
44627 fi
44628
44629 if test "$ol_enable_accesslog" != no ; then
44630         BUILD_ACCESSLOG=$ol_enable_accesslog
44631         if test "$ol_enable_accesslog" = mod ; then
44632                 MFLAG=SLAPD_MOD_DYNAMIC
44633                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
44634         else
44635                 MFLAG=SLAPD_MOD_STATIC
44636                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
44637         fi
44638
44639 cat >>confdefs.h <<_ACEOF
44640 #define SLAPD_OVER_ACCESSLOG $MFLAG
44641 _ACEOF
44642
44643 fi
44644
44645 if test "$ol_enable_dds" != no ; then
44646         BUILD_DDS=$ol_enable_dds
44647         if test "$ol_enable_dds" = mod ; then
44648                 MFLAG=SLAPD_MOD_DYNAMIC
44649                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dds.la"
44650         else
44651                 MFLAG=SLAPD_MOD_STATIC
44652                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dds.o"
44653         fi
44654
44655 cat >>confdefs.h <<_ACEOF
44656 #define SLAPD_OVER_DDS $MFLAG
44657 _ACEOF
44658
44659 fi
44660
44661 if test "$ol_enable_denyop" != no ; then
44662         BUILD_DENYOP=$ol_enable_denyop
44663         if test "$ol_enable_denyop" = mod ; then
44664                 MFLAG=SLAPD_MOD_DYNAMIC
44665                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
44666         else
44667                 MFLAG=SLAPD_MOD_STATIC
44668                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS denyop.o"
44669         fi
44670
44671 cat >>confdefs.h <<_ACEOF
44672 #define SLAPD_OVER_DENYOP $MFLAG
44673 _ACEOF
44674
44675 fi
44676
44677 if test "$ol_enable_dyngroup" != no ; then
44678         BUILD_DYNGROUP=$ol_enable_dyngroup
44679         if test "$ol_enable_dyngroup" = mod ; then
44680                 MFLAG=SLAPD_MOD_DYNAMIC
44681                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
44682         else
44683                 MFLAG=SLAPD_MOD_STATIC
44684                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
44685         fi
44686
44687 cat >>confdefs.h <<_ACEOF
44688 #define SLAPD_OVER_DYNGROUP $MFLAG
44689 _ACEOF
44690
44691 fi
44692
44693 if test "$ol_enable_dynlist" != no ; then
44694         BUILD_DYNLIST=$ol_enable_dynlist
44695         if test "$ol_enable_dynlist" = mod ; then
44696                 MFLAG=SLAPD_MOD_DYNAMIC
44697                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
44698         else
44699                 MFLAG=SLAPD_MOD_STATIC
44700                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
44701         fi
44702
44703 cat >>confdefs.h <<_ACEOF
44704 #define SLAPD_OVER_DYNLIST $MFLAG
44705 _ACEOF
44706
44707 fi
44708
44709 if test "$ol_enable_lastmod" != no ; then
44710         BUILD_LASTMOD=$ol_enable_lastmod
44711         if test "$ol_enable_lastmod" = mod ; then
44712                 MFLAG=SLAPD_MOD_DYNAMIC
44713                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
44714         else
44715                 MFLAG=SLAPD_MOD_STATIC
44716                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS lastmod.o"
44717         fi
44718
44719 cat >>confdefs.h <<_ACEOF
44720 #define SLAPD_OVER_LASTMOD $MFLAG
44721 _ACEOF
44722
44723 fi
44724
44725 if test "$ol_enable_ppolicy" != no ; then
44726         BUILD_PPOLICY=$ol_enable_ppolicy
44727         if test "$ol_enable_ppolicy" = mod ; then
44728                 MFLAG=SLAPD_MOD_DYNAMIC
44729                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
44730         else
44731                 MFLAG=SLAPD_MOD_STATIC
44732                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
44733         fi
44734
44735 cat >>confdefs.h <<_ACEOF
44736 #define SLAPD_OVER_PPOLICY $MFLAG
44737 _ACEOF
44738
44739 fi
44740
44741 if test "$ol_enable_proxycache" != no ; then
44742         BUILD_PROXYCACHE=$ol_enable_proxycache
44743         if test "$ol_enable_proxycache" = mod ; then
44744                 MFLAG=SLAPD_MOD_DYNAMIC
44745                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
44746         else
44747                 MFLAG=SLAPD_MOD_STATIC
44748                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
44749         fi
44750
44751 cat >>confdefs.h <<_ACEOF
44752 #define SLAPD_OVER_PROXYCACHE $MFLAG
44753 _ACEOF
44754
44755 fi
44756
44757 if test "$ol_enable_refint" != no ; then
44758         BUILD_REFINT=$ol_enable_refint
44759         if test "$ol_enable_refint" = mod ; then
44760                 MFLAG=SLAPD_MOD_DYNAMIC
44761                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
44762         else
44763                 MFLAG=SLAPD_MOD_STATIC
44764                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
44765         fi
44766
44767 cat >>confdefs.h <<_ACEOF
44768 #define SLAPD_OVER_REFINT $MFLAG
44769 _ACEOF
44770
44771 fi
44772
44773 if test "$ol_enable_retcode" != no ; then
44774         BUILD_RETCODE=$ol_enable_retcode
44775         if test "$ol_enable_retcode" = mod ; then
44776                 MFLAG=SLAPD_MOD_DYNAMIC
44777                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
44778         else
44779                 MFLAG=SLAPD_MOD_STATIC
44780                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
44781         fi
44782
44783 cat >>confdefs.h <<_ACEOF
44784 #define SLAPD_OVER_RETCODE $MFLAG
44785 _ACEOF
44786
44787 fi
44788
44789 if test "$ol_enable_rwm" != no ; then
44790         BUILD_REWRITE=yes
44791         BUILD_RWM=$ol_enable_rwm
44792         if test "$ol_enable_rwm" = mod ; then
44793                 MFLAG=SLAPD_MOD_DYNAMIC
44794                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
44795         else
44796                 MFLAG=SLAPD_MOD_STATIC
44797                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
44798         fi
44799
44800 cat >>confdefs.h <<_ACEOF
44801 #define SLAPD_OVER_RWM $MFLAG
44802 _ACEOF
44803
44804 fi
44805
44806 if test "$ol_enable_syncprov" != no ; then
44807         BUILD_SYNCPROV=$ol_enable_syncprov
44808         if test "$ol_enable_syncprov" = mod ; then
44809                 MFLAG=SLAPD_MOD_DYNAMIC
44810                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
44811         else
44812                 MFLAG=SLAPD_MOD_STATIC
44813                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
44814         fi
44815
44816 cat >>confdefs.h <<_ACEOF
44817 #define SLAPD_OVER_SYNCPROV $MFLAG
44818 _ACEOF
44819
44820 fi
44821
44822 if test "$ol_enable_translucent" != no ; then
44823         BUILD_TRANSLUCENT=$ol_enable_translucent
44824         if test "$ol_enable_translucent" = mod ; then
44825                 MFLAG=SLAPD_MOD_DYNAMIC
44826                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
44827         else
44828                 MFLAG=SLAPD_MOD_STATIC
44829                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
44830         fi
44831
44832 cat >>confdefs.h <<_ACEOF
44833 #define SLAPD_OVER_TRANSLUCENT $MFLAG
44834 _ACEOF
44835
44836 fi
44837
44838 if test "$ol_enable_unique" != no ; then
44839         BUILD_UNIQUE=$ol_enable_unique
44840         if test "$ol_enable_unique" = mod ; then
44841                 MFLAG=SLAPD_MOD_DYNAMIC
44842                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
44843         else
44844                 MFLAG=SLAPD_MOD_STATIC
44845                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
44846         fi
44847
44848 cat >>confdefs.h <<_ACEOF
44849 #define SLAPD_OVER_UNIQUE $MFLAG
44850 _ACEOF
44851
44852 fi
44853
44854 if test "$ol_enable_valsort" != no ; then
44855         BUILD_VALSORT=$ol_enable_valsort
44856         if test "$ol_enable_valsort" = mod ; then
44857                 MFLAG=SLAPD_MOD_DYNAMIC
44858                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS valsort.la"
44859         else
44860                 MFLAG=SLAPD_MOD_STATIC
44861                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS valsort.o"
44862         fi
44863
44864 cat >>confdefs.h <<_ACEOF
44865 #define SLAPD_OVER_VALSORT $MFLAG
44866 _ACEOF
44867
44868 fi
44869
44870 if test "$ol_enable_slurpd" != no &&
44871    test "$ol_link_threads" != no &&
44872    test $BUILD_SLAPD = yes ; then
44873         BUILD_SLURPD=yes
44874 fi
44875
44876 if test "$ol_enable_rewrite" != no ; then
44877
44878 cat >>confdefs.h <<\_ACEOF
44879 #define ENABLE_REWRITE 1
44880 _ACEOF
44881
44882         BUILD_REWRITE=yes
44883 fi
44884
44885 if test "$ol_enable_slapi" != no ; then
44886
44887 cat >>confdefs.h <<\_ACEOF
44888 #define ENABLE_SLAPI 1
44889 _ACEOF
44890
44891         BUILD_SLAPI=yes
44892         SLAPD_SLAPI_DEPEND=libslapi.a
44893 fi
44894
44895
44896
44897 if test "$ac_cv_mingw32" = yes ; then
44898         PLAT=NT
44899         SLAPD_MODULES_LDFLAGS=
44900 else
44901         PLAT=UNIX
44902 fi
44903
44904
44905
44906
44907
44908
44909
44910
44911
44912
44913
44914
44915
44916
44917
44918
44919
44920
44921
44922
44923
44924
44925
44926
44927
44928
44929
44930
44931
44932
44933
44934
44935
44936
44937
44938
44939
44940
44941
44942
44943
44944
44945
44946
44947
44948
44949
44950
44951
44952
44953
44954
44955
44956
44957
44958
44959
44960
44961
44962
44963
44964
44965
44966
44967
44968
44969
44970
44971
44972
44973
44974
44975
44976
44977
44978
44979
44980
44981
44982
44983
44984
44985
44986 # Check whether --with-xxinstall or --without-xxinstall was given.
44987 if test "${with_xxinstall+set}" = set; then
44988   withval="$with_xxinstall"
44989
44990 fi;
44991
44992
44993                                                                                                                                                                                                                                                                                                                                                                                                                 ac_config_files="$ac_config_files Makefile:build/top.mk:Makefile.in:build/dir.mk doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk include/Makefile:build/top.mk:include/Makefile.in libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk tests/run tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk"
44994
44995
44996           ac_config_commands="$ac_config_commands default"
44997
44998
44999
45000 test "x$prefix" = xNONE && prefix=$ac_default_prefix
45001 # Let make expand exec_prefix.
45002 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
45003
45004 # VPATH may cause trouble with some makes, so we remove $(srcdir),
45005 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
45006 # trailing colons and then remove the whole line if VPATH becomes empty
45007 # (actually we leave an empty line to preserve line numbers).
45008 if test "x$srcdir" = x.; then
45009   ac_vpsub='/^[  ]*VPATH[        ]*=/{
45010 s/:*\$(srcdir):*/:/;
45011 s/:*\${srcdir}:*/:/;
45012 s/:*@srcdir@:*/:/;
45013 s/^\([^=]*=[     ]*\):*/\1/;
45014 s/:*$//;
45015 s/^[^=]*=[       ]*$//;
45016 }'
45017 fi
45018
45019 DEFS=-DHAVE_CONFIG_H
45020
45021 ac_libobjs=
45022 ac_ltlibobjs=
45023 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
45024   # 1. Remove the extension, and $U if already installed.
45025   ac_i=`echo "$ac_i" |
45026          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
45027   # 2. Add them.
45028   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
45029   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
45030 done
45031 LIBOBJS=$ac_libobjs
45032
45033 LTLIBOBJS=$ac_ltlibobjs
45034
45035
45036 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
45037   { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
45038 Usually this means the macro was only invoked conditionally." >&5
45039 echo "$as_me: error: conditional \"AMDEP\" was never defined.
45040 Usually this means the macro was only invoked conditionally." >&2;}
45041    { (exit 1); exit 1; }; }
45042 fi
45043 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
45044   { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
45045 Usually this means the macro was only invoked conditionally." >&5
45046 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
45047 Usually this means the macro was only invoked conditionally." >&2;}
45048    { (exit 1); exit 1; }; }
45049 fi
45050 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
45051   { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
45052 Usually this means the macro was only invoked conditionally." >&5
45053 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
45054 Usually this means the macro was only invoked conditionally." >&2;}
45055    { (exit 1); exit 1; }; }
45056 fi
45057
45058 : ${CONFIG_STATUS=./config.status}
45059 ac_clean_files_save=$ac_clean_files
45060 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
45061 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
45062 echo "$as_me: creating $CONFIG_STATUS" >&6;}
45063 cat >$CONFIG_STATUS <<_ACEOF
45064 #! $SHELL
45065 # Generated by $as_me.
45066 # Run this file to recreate the current configuration.
45067 # Compiler output produced by configure, useful for debugging
45068 # configure, is in config.log if it exists.
45069
45070 debug=false
45071 ac_cs_recheck=false
45072 ac_cs_silent=false
45073 SHELL=\${CONFIG_SHELL-$SHELL}
45074 _ACEOF
45075
45076 cat >>$CONFIG_STATUS <<\_ACEOF
45077 ## --------------------- ##
45078 ## M4sh Initialization.  ##
45079 ## --------------------- ##
45080
45081 # Be Bourne compatible
45082 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
45083   emulate sh
45084   NULLCMD=:
45085   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
45086   # is contrary to our usage.  Disable this feature.
45087   alias -g '${1+"$@"}'='"$@"'
45088 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
45089   set -o posix
45090 fi
45091 DUALCASE=1; export DUALCASE # for MKS sh
45092
45093 # Support unset when possible.
45094 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
45095   as_unset=unset
45096 else
45097   as_unset=false
45098 fi
45099
45100
45101 # Work around bugs in pre-3.0 UWIN ksh.
45102 $as_unset ENV MAIL MAILPATH
45103 PS1='$ '
45104 PS2='> '
45105 PS4='+ '
45106
45107 # NLS nuisances.
45108 for as_var in \
45109   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
45110   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
45111   LC_TELEPHONE LC_TIME
45112 do
45113   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
45114     eval $as_var=C; export $as_var
45115   else
45116     $as_unset $as_var
45117   fi
45118 done
45119
45120 # Required to use basename.
45121 if expr a : '\(a\)' >/dev/null 2>&1; then
45122   as_expr=expr
45123 else
45124   as_expr=false
45125 fi
45126
45127 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
45128   as_basename=basename
45129 else
45130   as_basename=false
45131 fi
45132
45133
45134 # Name of the executable.
45135 as_me=`$as_basename "$0" ||
45136 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
45137          X"$0" : 'X\(//\)$' \| \
45138          X"$0" : 'X\(/\)$' \| \
45139          .     : '\(.\)' 2>/dev/null ||
45140 echo X/"$0" |
45141     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
45142           /^X\/\(\/\/\)$/{ s//\1/; q; }
45143           /^X\/\(\/\).*/{ s//\1/; q; }
45144           s/.*/./; q'`
45145
45146
45147 # PATH needs CR, and LINENO needs CR and PATH.
45148 # Avoid depending upon Character Ranges.
45149 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
45150 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
45151 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
45152 as_cr_digits='0123456789'
45153 as_cr_alnum=$as_cr_Letters$as_cr_digits
45154
45155 # The user is always right.
45156 if test "${PATH_SEPARATOR+set}" != set; then
45157   echo "#! /bin/sh" >conf$$.sh
45158   echo  "exit 0"   >>conf$$.sh
45159   chmod +x conf$$.sh
45160   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
45161     PATH_SEPARATOR=';'
45162   else
45163     PATH_SEPARATOR=:
45164   fi
45165   rm -f conf$$.sh
45166 fi
45167
45168
45169   as_lineno_1=$LINENO
45170   as_lineno_2=$LINENO
45171   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
45172   test "x$as_lineno_1" != "x$as_lineno_2" &&
45173   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
45174   # Find who we are.  Look in the path if we contain no path at all
45175   # relative or not.
45176   case $0 in
45177     *[\\/]* ) as_myself=$0 ;;
45178     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45179 for as_dir in $PATH
45180 do
45181   IFS=$as_save_IFS
45182   test -z "$as_dir" && as_dir=.
45183   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
45184 done
45185
45186        ;;
45187   esac
45188   # We did not find ourselves, most probably we were run as `sh COMMAND'
45189   # in which case we are not to be found in the path.
45190   if test "x$as_myself" = x; then
45191     as_myself=$0
45192   fi
45193   if test ! -f "$as_myself"; then
45194     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
45195 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
45196    { (exit 1); exit 1; }; }
45197   fi
45198   case $CONFIG_SHELL in
45199   '')
45200     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45201 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
45202 do
45203   IFS=$as_save_IFS
45204   test -z "$as_dir" && as_dir=.
45205   for as_base in sh bash ksh sh5; do
45206          case $as_dir in
45207          /*)
45208            if ("$as_dir/$as_base" -c '
45209   as_lineno_1=$LINENO
45210   as_lineno_2=$LINENO
45211   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
45212   test "x$as_lineno_1" != "x$as_lineno_2" &&
45213   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
45214              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
45215              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
45216              CONFIG_SHELL=$as_dir/$as_base
45217              export CONFIG_SHELL
45218              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
45219            fi;;
45220          esac
45221        done
45222 done
45223 ;;
45224   esac
45225
45226   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
45227   # uniformly replaced by the line number.  The first 'sed' inserts a
45228   # line-number line before each line; the second 'sed' does the real
45229   # work.  The second script uses 'N' to pair each line-number line
45230   # with the numbered line, and appends trailing '-' during
45231   # substitution so that $LINENO is not a special case at line end.
45232   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
45233   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
45234   sed '=' <$as_myself |
45235     sed '
45236       N
45237       s,$,-,
45238       : loop
45239       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
45240       t loop
45241       s,-$,,
45242       s,^['$as_cr_digits']*\n,,
45243     ' >$as_me.lineno &&
45244   chmod +x $as_me.lineno ||
45245     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
45246 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
45247    { (exit 1); exit 1; }; }
45248
45249   # Don't try to exec as it changes $[0], causing all sort of problems
45250   # (the dirname of $[0] is not the place where we might find the
45251   # original and so on.  Autoconf is especially sensible to this).
45252   . ./$as_me.lineno
45253   # Exit status is that of the last command.
45254   exit
45255 }
45256
45257
45258 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
45259   *c*,-n*) ECHO_N= ECHO_C='
45260 ' ECHO_T='      ' ;;
45261   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
45262   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
45263 esac
45264
45265 if expr a : '\(a\)' >/dev/null 2>&1; then
45266   as_expr=expr
45267 else
45268   as_expr=false
45269 fi
45270
45271 rm -f conf$$ conf$$.exe conf$$.file
45272 echo >conf$$.file
45273 if ln -s conf$$.file conf$$ 2>/dev/null; then
45274   # We could just check for DJGPP; but this test a) works b) is more generic
45275   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45276   if test -f conf$$.exe; then
45277     # Don't use ln at all; we don't have any links
45278     as_ln_s='cp -p'
45279   else
45280     as_ln_s='ln -s'
45281   fi
45282 elif ln conf$$.file conf$$ 2>/dev/null; then
45283   as_ln_s=ln
45284 else
45285   as_ln_s='cp -p'
45286 fi
45287 rm -f conf$$ conf$$.exe conf$$.file
45288
45289 if mkdir -p . 2>/dev/null; then
45290   as_mkdir_p=:
45291 else
45292   test -d ./-p && rmdir ./-p
45293   as_mkdir_p=false
45294 fi
45295
45296 as_executable_p="test -f"
45297
45298 # Sed expression to map a string onto a valid CPP name.
45299 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
45300
45301 # Sed expression to map a string onto a valid variable name.
45302 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
45303
45304
45305 # IFS
45306 # We need space, tab and new line, in precisely that order.
45307 as_nl='
45308 '
45309 IFS="   $as_nl"
45310
45311 # CDPATH.
45312 $as_unset CDPATH
45313
45314 exec 6>&1
45315
45316 # Open the log real soon, to keep \$[0] and so on meaningful, and to
45317 # report actual input values of CONFIG_FILES etc. instead of their
45318 # values after options handling.  Logging --version etc. is OK.
45319 exec 5>>config.log
45320 {
45321   echo
45322   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
45323 ## Running $as_me. ##
45324 _ASBOX
45325 } >&5
45326 cat >&5 <<_CSEOF
45327
45328 This file was extended by $as_me, which was
45329 generated by GNU Autoconf 2.59.  Invocation command line was
45330
45331   CONFIG_FILES    = $CONFIG_FILES
45332   CONFIG_HEADERS  = $CONFIG_HEADERS
45333   CONFIG_LINKS    = $CONFIG_LINKS
45334   CONFIG_COMMANDS = $CONFIG_COMMANDS
45335   $ $0 $@
45336
45337 _CSEOF
45338 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
45339 echo >&5
45340 _ACEOF
45341
45342 # Files that config.status was made for.
45343 if test -n "$ac_config_files"; then
45344   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
45345 fi
45346
45347 if test -n "$ac_config_headers"; then
45348   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
45349 fi
45350
45351 if test -n "$ac_config_links"; then
45352   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
45353 fi
45354
45355 if test -n "$ac_config_commands"; then
45356   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
45357 fi
45358
45359 cat >>$CONFIG_STATUS <<\_ACEOF
45360
45361 ac_cs_usage="\
45362 \`$as_me' instantiates files from templates according to the
45363 current configuration.
45364
45365 Usage: $0 [OPTIONS] [FILE]...
45366
45367   -h, --help       print this help, then exit
45368   -V, --version    print version number, then exit
45369   -q, --quiet      do not print progress messages
45370   -d, --debug      don't remove temporary files
45371       --recheck    update $as_me by reconfiguring in the same conditions
45372   --file=FILE[:TEMPLATE]
45373                    instantiate the configuration file FILE
45374   --header=FILE[:TEMPLATE]
45375                    instantiate the configuration header FILE
45376
45377 Configuration files:
45378 $config_files
45379
45380 Configuration headers:
45381 $config_headers
45382
45383 Configuration commands:
45384 $config_commands
45385
45386 Report bugs to <bug-autoconf@gnu.org>."
45387 _ACEOF
45388
45389 cat >>$CONFIG_STATUS <<_ACEOF
45390 ac_cs_version="\\
45391 config.status
45392 configured by $0, generated by GNU Autoconf 2.59,
45393   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
45394
45395 Copyright (C) 2003 Free Software Foundation, Inc.
45396 This config.status script is free software; the Free Software Foundation
45397 gives unlimited permission to copy, distribute and modify it."
45398 srcdir=$srcdir
45399 INSTALL="$INSTALL"
45400 _ACEOF
45401
45402 cat >>$CONFIG_STATUS <<\_ACEOF
45403 # If no file are specified by the user, then we need to provide default
45404 # value.  By we need to know if files were specified by the user.
45405 ac_need_defaults=:
45406 while test $# != 0
45407 do
45408   case $1 in
45409   --*=*)
45410     ac_option=`expr "x$1" : 'x\([^=]*\)='`
45411     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
45412     ac_shift=:
45413     ;;
45414   -*)
45415     ac_option=$1
45416     ac_optarg=$2
45417     ac_shift=shift
45418     ;;
45419   *) # This is not an option, so the user has probably given explicit
45420      # arguments.
45421      ac_option=$1
45422      ac_need_defaults=false;;
45423   esac
45424
45425   case $ac_option in
45426   # Handling of the options.
45427 _ACEOF
45428 cat >>$CONFIG_STATUS <<\_ACEOF
45429   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
45430     ac_cs_recheck=: ;;
45431   --version | --vers* | -V )
45432     echo "$ac_cs_version"; exit 0 ;;
45433   --he | --h)
45434     # Conflict between --help and --header
45435     { { echo "$as_me:$LINENO: error: ambiguous option: $1
45436 Try \`$0 --help' for more information." >&5
45437 echo "$as_me: error: ambiguous option: $1
45438 Try \`$0 --help' for more information." >&2;}
45439    { (exit 1); exit 1; }; };;
45440   --help | --hel | -h )
45441     echo "$ac_cs_usage"; exit 0 ;;
45442   --debug | --d* | -d )
45443     debug=: ;;
45444   --file | --fil | --fi | --f )
45445     $ac_shift
45446     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
45447     ac_need_defaults=false;;
45448   --header | --heade | --head | --hea )
45449     $ac_shift
45450     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
45451     ac_need_defaults=false;;
45452   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
45453   | -silent | --silent | --silen | --sile | --sil | --si | --s)
45454     ac_cs_silent=: ;;
45455
45456   # This is an error.
45457   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
45458 Try \`$0 --help' for more information." >&5
45459 echo "$as_me: error: unrecognized option: $1
45460 Try \`$0 --help' for more information." >&2;}
45461    { (exit 1); exit 1; }; } ;;
45462
45463   *) ac_config_targets="$ac_config_targets $1" ;;
45464
45465   esac
45466   shift
45467 done
45468
45469 ac_configure_extra_args=
45470
45471 if $ac_cs_silent; then
45472   exec 6>/dev/null
45473   ac_configure_extra_args="$ac_configure_extra_args --silent"
45474 fi
45475
45476 _ACEOF
45477 cat >>$CONFIG_STATUS <<_ACEOF
45478 if \$ac_cs_recheck; then
45479   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
45480   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
45481 fi
45482
45483 _ACEOF
45484
45485 cat >>$CONFIG_STATUS <<_ACEOF
45486 #
45487 # INIT-COMMANDS section.
45488 #
45489
45490 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
45491
45492 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
45493 STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS"
45494
45495
45496 _ACEOF
45497
45498
45499
45500 cat >>$CONFIG_STATUS <<\_ACEOF
45501 for ac_config_target in $ac_config_targets
45502 do
45503   case "$ac_config_target" in
45504   # Handling of arguments.
45505   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:build/top.mk:Makefile.in:build/dir.mk" ;;
45506   "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk" ;;
45507   "doc/man/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk" ;;
45508   "doc/man/man1/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk" ;;
45509   "doc/man/man3/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk" ;;
45510   "doc/man/man5/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk" ;;
45511   "doc/man/man8/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk" ;;
45512   "clients/Makefile" ) CONFIG_FILES="$CONFIG_FILES clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk" ;;
45513   "clients/tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk" ;;
45514   "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile:build/top.mk:include/Makefile.in" ;;
45515   "libraries/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk" ;;
45516   "libraries/liblber/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
45517   "libraries/libldap/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
45518   "libraries/libldap_r/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
45519   "libraries/liblunicode/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
45520   "libraries/liblutil/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
45521   "libraries/librewrite/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
45522   "servers/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk" ;;
45523   "servers/slapd/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk" ;;
45524   "servers/slapd/back-bdb/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk" ;;
45525   "servers/slapd/back-dnssrv/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk" ;;
45526   "servers/slapd/back-hdb/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk" ;;
45527   "servers/slapd/back-ldap/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk" ;;
45528   "servers/slapd/back-ldbm/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk" ;;
45529   "servers/slapd/back-ldif/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk" ;;
45530   "servers/slapd/back-meta/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk" ;;
45531   "servers/slapd/back-monitor/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk" ;;
45532   "servers/slapd/back-null/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk" ;;
45533   "servers/slapd/back-passwd/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk" ;;
45534   "servers/slapd/back-perl/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk" ;;
45535   "servers/slapd/back-relay/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk" ;;
45536   "servers/slapd/back-shell/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk" ;;
45537   "servers/slapd/back-sql/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk" ;;
45538   "servers/slapd/shell-backends/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk" ;;
45539   "servers/slapd/slapi/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
45540   "servers/slapd/overlays/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk" ;;
45541   "servers/slurpd/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk" ;;
45542   "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;;
45543   "tests/run" ) CONFIG_FILES="$CONFIG_FILES tests/run" ;;
45544   "tests/progs/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;;
45545   "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
45546   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
45547   "include/portable.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h:include/portable.hin" ;;
45548   "include/ldap_features.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h:include/ldap_features.hin" ;;
45549   "include/lber_types.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h:include/lber_types.hin" ;;
45550   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
45551 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
45552    { (exit 1); exit 1; }; };;
45553   esac
45554 done
45555
45556 # If the user did not use the arguments to specify the items to instantiate,
45557 # then the envvar interface is used.  Set only those that are not.
45558 # We use the long form for the default assignment because of an extremely
45559 # bizarre bug on SunOS 4.1.3.
45560 if $ac_need_defaults; then
45561   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
45562   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
45563   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
45564 fi
45565
45566 # Have a temporary directory for convenience.  Make it in the build tree
45567 # simply because there is no reason to put it here, and in addition,
45568 # creating and moving files from /tmp can sometimes cause problems.
45569 # Create a temporary directory, and hook for its removal unless debugging.
45570 $debug ||
45571 {
45572   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
45573   trap '{ (exit 1); exit 1; }' 1 2 13 15
45574 }
45575
45576 # Create a (secure) tmp directory for tmp files.
45577
45578 {
45579   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
45580   test -n "$tmp" && test -d "$tmp"
45581 }  ||
45582 {
45583   tmp=./confstat$$-$RANDOM
45584   (umask 077 && mkdir $tmp)
45585 } ||
45586 {
45587    echo "$me: cannot create a temporary directory in ." >&2
45588    { (exit 1); exit 1; }
45589 }
45590
45591 _ACEOF
45592
45593 cat >>$CONFIG_STATUS <<_ACEOF
45594
45595 #
45596 # CONFIG_FILES section.
45597 #
45598
45599 # No need to generate the scripts if there are no CONFIG_FILES.
45600 # This happens for instance when ./config.status config.h
45601 if test -n "\$CONFIG_FILES"; then
45602   # Protect against being on the right side of a sed subst in config.status.
45603   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
45604    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
45605 s,@SHELL@,$SHELL,;t t
45606 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
45607 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
45608 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
45609 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
45610 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
45611 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
45612 s,@exec_prefix@,$exec_prefix,;t t
45613 s,@prefix@,$prefix,;t t
45614 s,@program_transform_name@,$program_transform_name,;t t
45615 s,@bindir@,$bindir,;t t
45616 s,@sbindir@,$sbindir,;t t
45617 s,@libexecdir@,$libexecdir,;t t
45618 s,@datadir@,$datadir,;t t
45619 s,@sysconfdir@,$sysconfdir,;t t
45620 s,@sharedstatedir@,$sharedstatedir,;t t
45621 s,@localstatedir@,$localstatedir,;t t
45622 s,@libdir@,$libdir,;t t
45623 s,@includedir@,$includedir,;t t
45624 s,@oldincludedir@,$oldincludedir,;t t
45625 s,@infodir@,$infodir,;t t
45626 s,@mandir@,$mandir,;t t
45627 s,@build_alias@,$build_alias,;t t
45628 s,@host_alias@,$host_alias,;t t
45629 s,@target_alias@,$target_alias,;t t
45630 s,@DEFS@,$DEFS,;t t
45631 s,@ECHO_C@,$ECHO_C,;t t
45632 s,@ECHO_N@,$ECHO_N,;t t
45633 s,@ECHO_T@,$ECHO_T,;t t
45634 s,@LIBS@,$LIBS,;t t
45635 s,@build@,$build,;t t
45636 s,@build_cpu@,$build_cpu,;t t
45637 s,@build_vendor@,$build_vendor,;t t
45638 s,@build_os@,$build_os,;t t
45639 s,@host@,$host,;t t
45640 s,@host_cpu@,$host_cpu,;t t
45641 s,@host_vendor@,$host_vendor,;t t
45642 s,@host_os@,$host_os,;t t
45643 s,@target@,$target,;t t
45644 s,@target_cpu@,$target_cpu,;t t
45645 s,@target_vendor@,$target_vendor,;t t
45646 s,@target_os@,$target_os,;t t
45647 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
45648 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
45649 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
45650 s,@CYGPATH_W@,$CYGPATH_W,;t t
45651 s,@PACKAGE@,$PACKAGE,;t t
45652 s,@VERSION@,$VERSION,;t t
45653 s,@ACLOCAL@,$ACLOCAL,;t t
45654 s,@AUTOCONF@,$AUTOCONF,;t t
45655 s,@AUTOMAKE@,$AUTOMAKE,;t t
45656 s,@AUTOHEADER@,$AUTOHEADER,;t t
45657 s,@MAKEINFO@,$MAKEINFO,;t t
45658 s,@install_sh@,$install_sh,;t t
45659 s,@STRIP@,$STRIP,;t t
45660 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
45661 s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
45662 s,@mkdir_p@,$mkdir_p,;t t
45663 s,@AWK@,$AWK,;t t
45664 s,@SET_MAKE@,$SET_MAKE,;t t
45665 s,@am__leading_dot@,$am__leading_dot,;t t
45666 s,@AMTAR@,$AMTAR,;t t
45667 s,@am__tar@,$am__tar,;t t
45668 s,@am__untar@,$am__untar,;t t
45669 s,@OPENLDAP_LIBRELEASE@,$OPENLDAP_LIBRELEASE,;t t
45670 s,@OPENLDAP_LIBVERSION@,$OPENLDAP_LIBVERSION,;t t
45671 s,@OPENLDAP_RELEASE_DATE@,$OPENLDAP_RELEASE_DATE,;t t
45672 s,@top_builddir@,$top_builddir,;t t
45673 s,@ldap_subdir@,$ldap_subdir,;t t
45674 s,@CC@,$CC,;t t
45675 s,@AR@,$AR,;t t
45676 s,@CFLAGS@,$CFLAGS,;t t
45677 s,@LDFLAGS@,$LDFLAGS,;t t
45678 s,@CPPFLAGS@,$CPPFLAGS,;t t
45679 s,@ac_ct_CC@,$ac_ct_CC,;t t
45680 s,@EXEEXT@,$EXEEXT,;t t
45681 s,@OBJEXT@,$OBJEXT,;t t
45682 s,@DEPDIR@,$DEPDIR,;t t
45683 s,@am__include@,$am__include,;t t
45684 s,@am__quote@,$am__quote,;t t
45685 s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
45686 s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
45687 s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
45688 s,@CCDEPMODE@,$CCDEPMODE,;t t
45689 s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
45690 s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
45691 s,@EGREP@,$EGREP,;t t
45692 s,@LN_S@,$LN_S,;t t
45693 s,@ECHO@,$ECHO,;t t
45694 s,@ac_ct_AR@,$ac_ct_AR,;t t
45695 s,@RANLIB@,$RANLIB,;t t
45696 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
45697 s,@DLLTOOL@,$DLLTOOL,;t t
45698 s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
45699 s,@AS@,$AS,;t t
45700 s,@ac_ct_AS@,$ac_ct_AS,;t t
45701 s,@OBJDUMP@,$OBJDUMP,;t t
45702 s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t
45703 s,@CPP@,$CPP,;t t
45704 s,@LIBTOOL@,$LIBTOOL,;t t
45705 s,@PERLBIN@,$PERLBIN,;t t
45706 s,@OL_MKDEP@,$OL_MKDEP,;t t
45707 s,@OL_MKDEP_FLAGS@,$OL_MKDEP_FLAGS,;t t
45708 s,@LTSTATIC@,$LTSTATIC,;t t
45709 s,@LIBOBJS@,$LIBOBJS,;t t
45710 s,@LIBSRCS@,$LIBSRCS,;t t
45711 s,@PLAT@,$PLAT,;t t
45712 s,@WITH_SASL@,$WITH_SASL,;t t
45713 s,@WITH_TLS@,$WITH_TLS,;t t
45714 s,@WITH_MODULES_ENABLED@,$WITH_MODULES_ENABLED,;t t
45715 s,@WITH_ACI_ENABLED@,$WITH_ACI_ENABLED,;t t
45716 s,@BUILD_THREAD@,$BUILD_THREAD,;t t
45717 s,@BUILD_LIBS_DYNAMIC@,$BUILD_LIBS_DYNAMIC,;t t
45718 s,@BUILD_SLAPD@,$BUILD_SLAPD,;t t
45719 s,@BUILD_SLAPI@,$BUILD_SLAPI,;t t
45720 s,@SLAPD_SLAPI_DEPEND@,$SLAPD_SLAPI_DEPEND,;t t
45721 s,@BUILD_BDB@,$BUILD_BDB,;t t
45722 s,@BUILD_DNSSRV@,$BUILD_DNSSRV,;t t
45723 s,@BUILD_HDB@,$BUILD_HDB,;t t
45724 s,@BUILD_LDAP@,$BUILD_LDAP,;t t
45725 s,@BUILD_LDBM@,$BUILD_LDBM,;t t
45726 s,@BUILD_META@,$BUILD_META,;t t
45727 s,@BUILD_MONITOR@,$BUILD_MONITOR,;t t
45728 s,@BUILD_NULL@,$BUILD_NULL,;t t
45729 s,@BUILD_PASSWD@,$BUILD_PASSWD,;t t
45730 s,@BUILD_RELAY@,$BUILD_RELAY,;t t
45731 s,@BUILD_PERL@,$BUILD_PERL,;t t
45732 s,@BUILD_SHELL@,$BUILD_SHELL,;t t
45733 s,@BUILD_SQL@,$BUILD_SQL,;t t
45734 s,@BUILD_ACCESSLOG@,$BUILD_ACCESSLOG,;t t
45735 s,@BUILD_DDS@,$BUILD_DDS,;t t
45736 s,@BUILD_DENYOP@,$BUILD_DENYOP,;t t
45737 s,@BUILD_DYNGROUP@,$BUILD_DYNGROUP,;t t
45738 s,@BUILD_DYNLIST@,$BUILD_DYNLIST,;t t
45739 s,@BUILD_LASTMOD@,$BUILD_LASTMOD,;t t
45740 s,@BUILD_PPOLICY@,$BUILD_PPOLICY,;t t
45741 s,@BUILD_PROXYCACHE@,$BUILD_PROXYCACHE,;t t
45742 s,@BUILD_REFINT@,$BUILD_REFINT,;t t
45743 s,@BUILD_RETCODE@,$BUILD_RETCODE,;t t
45744 s,@BUILD_RWM@,$BUILD_RWM,;t t
45745 s,@BUILD_SYNCPROV@,$BUILD_SYNCPROV,;t t
45746 s,@BUILD_TRANSLUCENT@,$BUILD_TRANSLUCENT,;t t
45747 s,@BUILD_UNIQUE@,$BUILD_UNIQUE,;t t
45748 s,@BUILD_VALSORT@,$BUILD_VALSORT,;t t
45749 s,@BUILD_SLURPD@,$BUILD_SLURPD,;t t
45750 s,@LDAP_LIBS@,$LDAP_LIBS,;t t
45751 s,@SLAPD_LIBS@,$SLAPD_LIBS,;t t
45752 s,@SLURPD_LIBS@,$SLURPD_LIBS,;t t
45753 s,@LDBM_LIBS@,$LDBM_LIBS,;t t
45754 s,@LTHREAD_LIBS@,$LTHREAD_LIBS,;t t
45755 s,@LUTIL_LIBS@,$LUTIL_LIBS,;t t
45756 s,@WRAP_LIBS@,$WRAP_LIBS,;t t
45757 s,@SLAPD_MODULES_CPPFLAGS@,$SLAPD_MODULES_CPPFLAGS,;t t
45758 s,@SLAPD_MODULES_LDFLAGS@,$SLAPD_MODULES_LDFLAGS,;t t
45759 s,@SLAPD_NO_STATIC@,$SLAPD_NO_STATIC,;t t
45760 s,@SLAPD_STATIC_BACKENDS@,$SLAPD_STATIC_BACKENDS,;t t
45761 s,@SLAPD_DYNAMIC_BACKENDS@,$SLAPD_DYNAMIC_BACKENDS,;t t
45762 s,@SLAPD_STATIC_OVERLAYS@,$SLAPD_STATIC_OVERLAYS,;t t
45763 s,@SLAPD_DYNAMIC_OVERLAYS@,$SLAPD_DYNAMIC_OVERLAYS,;t t
45764 s,@PERL_CPPFLAGS@,$PERL_CPPFLAGS,;t t
45765 s,@SLAPD_PERL_LDFLAGS@,$SLAPD_PERL_LDFLAGS,;t t
45766 s,@MOD_PERL_LDFLAGS@,$MOD_PERL_LDFLAGS,;t t
45767 s,@KRB4_LIBS@,$KRB4_LIBS,;t t
45768 s,@KRB5_LIBS@,$KRB5_LIBS,;t t
45769 s,@SASL_LIBS@,$SASL_LIBS,;t t
45770 s,@TLS_LIBS@,$TLS_LIBS,;t t
45771 s,@MODULES_LIBS@,$MODULES_LIBS,;t t
45772 s,@SLAPI_LIBS@,$SLAPI_LIBS,;t t
45773 s,@LIBSLAPI@,$LIBSLAPI,;t t
45774 s,@LIBSLAPITOOLS@,$LIBSLAPITOOLS,;t t
45775 s,@AUTH_LIBS@,$AUTH_LIBS,;t t
45776 s,@ICU_LIBS@,$ICU_LIBS,;t t
45777 s,@SLAPD_SLP_LIBS@,$SLAPD_SLP_LIBS,;t t
45778 s,@SLAPD_GMP_LIBS@,$SLAPD_GMP_LIBS,;t t
45779 s,@SLAPD_SQL_LDFLAGS@,$SLAPD_SQL_LDFLAGS,;t t
45780 s,@SLAPD_SQL_LIBS@,$SLAPD_SQL_LIBS,;t t
45781 s,@SLAPD_SQL_INCLUDES@,$SLAPD_SQL_INCLUDES,;t t
45782 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
45783 CEOF
45784
45785 _ACEOF
45786
45787   cat >>$CONFIG_STATUS <<\_ACEOF
45788   # Split the substitutions into bite-sized pieces for seds with
45789   # small command number limits, like on Digital OSF/1 and HP-UX.
45790   ac_max_sed_lines=48
45791   ac_sed_frag=1 # Number of current file.
45792   ac_beg=1 # First line for current file.
45793   ac_end=$ac_max_sed_lines # Line after last line for current file.
45794   ac_more_lines=:
45795   ac_sed_cmds=
45796   while $ac_more_lines; do
45797     if test $ac_beg -gt 1; then
45798       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
45799     else
45800       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
45801     fi
45802     if test ! -s $tmp/subs.frag; then
45803       ac_more_lines=false
45804     else
45805       # The purpose of the label and of the branching condition is to
45806       # speed up the sed processing (if there are no `@' at all, there
45807       # is no need to browse any of the substitutions).
45808       # These are the two extra sed commands mentioned above.
45809       (echo ':t
45810   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
45811       if test -z "$ac_sed_cmds"; then
45812         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
45813       else
45814         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
45815       fi
45816       ac_sed_frag=`expr $ac_sed_frag + 1`
45817       ac_beg=$ac_end
45818       ac_end=`expr $ac_end + $ac_max_sed_lines`
45819     fi
45820   done
45821   if test -z "$ac_sed_cmds"; then
45822     ac_sed_cmds=cat
45823   fi
45824 fi # test -n "$CONFIG_FILES"
45825
45826 _ACEOF
45827 cat >>$CONFIG_STATUS <<\_ACEOF
45828 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
45829   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
45830   case $ac_file in
45831   - | *:- | *:-:* ) # input from stdin
45832         cat >$tmp/stdin
45833         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
45834         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
45835   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
45836         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
45837   * )   ac_file_in=$ac_file.in ;;
45838   esac
45839
45840   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
45841   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
45842 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
45843          X"$ac_file" : 'X\(//\)[^/]' \| \
45844          X"$ac_file" : 'X\(//\)$' \| \
45845          X"$ac_file" : 'X\(/\)' \| \
45846          .     : '\(.\)' 2>/dev/null ||
45847 echo X"$ac_file" |
45848     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
45849           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
45850           /^X\(\/\/\)$/{ s//\1/; q; }
45851           /^X\(\/\).*/{ s//\1/; q; }
45852           s/.*/./; q'`
45853   { if $as_mkdir_p; then
45854     mkdir -p "$ac_dir"
45855   else
45856     as_dir="$ac_dir"
45857     as_dirs=
45858     while test ! -d "$as_dir"; do
45859       as_dirs="$as_dir $as_dirs"
45860       as_dir=`(dirname "$as_dir") 2>/dev/null ||
45861 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
45862          X"$as_dir" : 'X\(//\)[^/]' \| \
45863          X"$as_dir" : 'X\(//\)$' \| \
45864          X"$as_dir" : 'X\(/\)' \| \
45865          .     : '\(.\)' 2>/dev/null ||
45866 echo X"$as_dir" |
45867     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
45868           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
45869           /^X\(\/\/\)$/{ s//\1/; q; }
45870           /^X\(\/\).*/{ s//\1/; q; }
45871           s/.*/./; q'`
45872     done
45873     test ! -n "$as_dirs" || mkdir $as_dirs
45874   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
45875 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
45876    { (exit 1); exit 1; }; }; }
45877
45878   ac_builddir=.
45879
45880 if test "$ac_dir" != .; then
45881   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
45882   # A "../" for each directory in $ac_dir_suffix.
45883   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
45884 else
45885   ac_dir_suffix= ac_top_builddir=
45886 fi
45887
45888 case $srcdir in
45889   .)  # No --srcdir option.  We are building in place.
45890     ac_srcdir=.
45891     if test -z "$ac_top_builddir"; then
45892        ac_top_srcdir=.
45893     else
45894        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
45895     fi ;;
45896   [\\/]* | ?:[\\/]* )  # Absolute path.
45897     ac_srcdir=$srcdir$ac_dir_suffix;
45898     ac_top_srcdir=$srcdir ;;
45899   *) # Relative path.
45900     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
45901     ac_top_srcdir=$ac_top_builddir$srcdir ;;
45902 esac
45903
45904 # Do not use `cd foo && pwd` to compute absolute paths, because
45905 # the directories may not exist.
45906 case `pwd` in
45907 .) ac_abs_builddir="$ac_dir";;
45908 *)
45909   case "$ac_dir" in
45910   .) ac_abs_builddir=`pwd`;;
45911   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
45912   *) ac_abs_builddir=`pwd`/"$ac_dir";;
45913   esac;;
45914 esac
45915 case $ac_abs_builddir in
45916 .) ac_abs_top_builddir=${ac_top_builddir}.;;
45917 *)
45918   case ${ac_top_builddir}. in
45919   .) ac_abs_top_builddir=$ac_abs_builddir;;
45920   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
45921   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
45922   esac;;
45923 esac
45924 case $ac_abs_builddir in
45925 .) ac_abs_srcdir=$ac_srcdir;;
45926 *)
45927   case $ac_srcdir in
45928   .) ac_abs_srcdir=$ac_abs_builddir;;
45929   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
45930   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
45931   esac;;
45932 esac
45933 case $ac_abs_builddir in
45934 .) ac_abs_top_srcdir=$ac_top_srcdir;;
45935 *)
45936   case $ac_top_srcdir in
45937   .) ac_abs_top_srcdir=$ac_abs_builddir;;
45938   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
45939   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
45940   esac;;
45941 esac
45942
45943
45944   case $INSTALL in
45945   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
45946   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
45947   esac
45948
45949   if test x"$ac_file" != x-; then
45950     { echo "$as_me:$LINENO: creating $ac_file" >&5
45951 echo "$as_me: creating $ac_file" >&6;}
45952     rm -f "$ac_file"
45953   fi
45954   # Let's still pretend it is `configure' which instantiates (i.e., don't
45955   # use $as_me), people would be surprised to read:
45956   #    /* config.h.  Generated by config.status.  */
45957   if test x"$ac_file" = x-; then
45958     configure_input=
45959   else
45960     configure_input="$ac_file.  "
45961   fi
45962   configure_input=$configure_input"Generated from `echo $ac_file_in |
45963                                      sed 's,.*/,,'` by configure."
45964
45965   # First look for the input files in the build tree, otherwise in the
45966   # src tree.
45967   ac_file_inputs=`IFS=:
45968     for f in $ac_file_in; do
45969       case $f in
45970       -) echo $tmp/stdin ;;
45971       [\\/$]*)
45972          # Absolute (can't be DOS-style, as IFS=:)
45973          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
45974 echo "$as_me: error: cannot find input file: $f" >&2;}
45975    { (exit 1); exit 1; }; }
45976          echo "$f";;
45977       *) # Relative
45978          if test -f "$f"; then
45979            # Build tree
45980            echo "$f"
45981          elif test -f "$srcdir/$f"; then
45982            # Source tree
45983            echo "$srcdir/$f"
45984          else
45985            # /dev/null tree
45986            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
45987 echo "$as_me: error: cannot find input file: $f" >&2;}
45988    { (exit 1); exit 1; }; }
45989          fi;;
45990       esac
45991     done` || { (exit 1); exit 1; }
45992 _ACEOF
45993 cat >>$CONFIG_STATUS <<_ACEOF
45994   sed "$ac_vpsub
45995 $extrasub
45996 _ACEOF
45997 cat >>$CONFIG_STATUS <<\_ACEOF
45998 :t
45999 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
46000 s,@configure_input@,$configure_input,;t t
46001 s,@srcdir@,$ac_srcdir,;t t
46002 s,@abs_srcdir@,$ac_abs_srcdir,;t t
46003 s,@top_srcdir@,$ac_top_srcdir,;t t
46004 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
46005 s,@builddir@,$ac_builddir,;t t
46006 s,@abs_builddir@,$ac_abs_builddir,;t t
46007 s,@top_builddir@,$ac_top_builddir,;t t
46008 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
46009 s,@INSTALL@,$ac_INSTALL,;t t
46010 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
46011   rm -f $tmp/stdin
46012   if test x"$ac_file" != x-; then
46013     mv $tmp/out $ac_file
46014   else
46015     cat $tmp/out
46016     rm -f $tmp/out
46017   fi
46018
46019 done
46020 _ACEOF
46021 cat >>$CONFIG_STATUS <<\_ACEOF
46022
46023 #
46024 # CONFIG_HEADER section.
46025 #
46026
46027 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
46028 # NAME is the cpp macro being defined and VALUE is the value it is being given.
46029 #
46030 # ac_d sets the value in "#define NAME VALUE" lines.
46031 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
46032 ac_dB='[         ].*$,\1#\2'
46033 ac_dC=' '
46034 ac_dD=',;t'
46035 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
46036 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
46037 ac_uB='$,\1#\2define\3'
46038 ac_uC=' '
46039 ac_uD=',;t'
46040
46041 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
46042   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
46043   case $ac_file in
46044   - | *:- | *:-:* ) # input from stdin
46045         cat >$tmp/stdin
46046         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
46047         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
46048   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
46049         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
46050   * )   ac_file_in=$ac_file.in ;;
46051   esac
46052
46053   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
46054 echo "$as_me: creating $ac_file" >&6;}
46055
46056   # First look for the input files in the build tree, otherwise in the
46057   # src tree.
46058   ac_file_inputs=`IFS=:
46059     for f in $ac_file_in; do
46060       case $f in
46061       -) echo $tmp/stdin ;;
46062       [\\/$]*)
46063          # Absolute (can't be DOS-style, as IFS=:)
46064          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
46065 echo "$as_me: error: cannot find input file: $f" >&2;}
46066    { (exit 1); exit 1; }; }
46067          # Do quote $f, to prevent DOS paths from being IFS'd.
46068          echo "$f";;
46069       *) # Relative
46070          if test -f "$f"; then
46071            # Build tree
46072            echo "$f"
46073          elif test -f "$srcdir/$f"; then
46074            # Source tree
46075            echo "$srcdir/$f"
46076          else
46077            # /dev/null tree
46078            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
46079 echo "$as_me: error: cannot find input file: $f" >&2;}
46080    { (exit 1); exit 1; }; }
46081          fi;;
46082       esac
46083     done` || { (exit 1); exit 1; }
46084   # Remove the trailing spaces.
46085   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
46086
46087 _ACEOF
46088
46089 # Transform confdefs.h into two sed scripts, `conftest.defines' and
46090 # `conftest.undefs', that substitutes the proper values into
46091 # config.h.in to produce config.h.  The first handles `#define'
46092 # templates, and the second `#undef' templates.
46093 # And first: Protect against being on the right side of a sed subst in
46094 # config.status.  Protect against being in an unquoted here document
46095 # in config.status.
46096 rm -f conftest.defines conftest.undefs
46097 # Using a here document instead of a string reduces the quoting nightmare.
46098 # Putting comments in sed scripts is not portable.
46099 #
46100 # `end' is used to avoid that the second main sed command (meant for
46101 # 0-ary CPP macros) applies to n-ary macro definitions.
46102 # See the Autoconf documentation for `clear'.
46103 cat >confdef2sed.sed <<\_ACEOF
46104 s/[\\&,]/\\&/g
46105 s,[\\$`],\\&,g
46106 t clear
46107 : clear
46108 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
46109 t end
46110 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
46111 : end
46112 _ACEOF
46113 # If some macros were called several times there might be several times
46114 # the same #defines, which is useless.  Nevertheless, we may not want to
46115 # sort them, since we want the *last* AC-DEFINE to be honored.
46116 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
46117 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
46118 rm -f confdef2sed.sed
46119
46120 # This sed command replaces #undef with comments.  This is necessary, for
46121 # example, in the case of _POSIX_SOURCE, which is predefined and required
46122 # on some systems where configure will not decide to define it.
46123 cat >>conftest.undefs <<\_ACEOF
46124 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
46125 _ACEOF
46126
46127 # Break up conftest.defines because some shells have a limit on the size
46128 # of here documents, and old seds have small limits too (100 cmds).
46129 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
46130 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
46131 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
46132 echo '  :' >>$CONFIG_STATUS
46133 rm -f conftest.tail
46134 while grep . conftest.defines >/dev/null
46135 do
46136   # Write a limited-size here document to $tmp/defines.sed.
46137   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
46138   # Speed up: don't consider the non `#define' lines.
46139   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
46140   # Work around the forget-to-reset-the-flag bug.
46141   echo 't clr' >>$CONFIG_STATUS
46142   echo ': clr' >>$CONFIG_STATUS
46143   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
46144   echo 'CEOF
46145   sed -f $tmp/defines.sed $tmp/in >$tmp/out
46146   rm -f $tmp/in
46147   mv $tmp/out $tmp/in
46148 ' >>$CONFIG_STATUS
46149   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
46150   rm -f conftest.defines
46151   mv conftest.tail conftest.defines
46152 done
46153 rm -f conftest.defines
46154 echo '  fi # grep' >>$CONFIG_STATUS
46155 echo >>$CONFIG_STATUS
46156
46157 # Break up conftest.undefs because some shells have a limit on the size
46158 # of here documents, and old seds have small limits too (100 cmds).
46159 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
46160 rm -f conftest.tail
46161 while grep . conftest.undefs >/dev/null
46162 do
46163   # Write a limited-size here document to $tmp/undefs.sed.
46164   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
46165   # Speed up: don't consider the non `#undef'
46166   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
46167   # Work around the forget-to-reset-the-flag bug.
46168   echo 't clr' >>$CONFIG_STATUS
46169   echo ': clr' >>$CONFIG_STATUS
46170   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
46171   echo 'CEOF
46172   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
46173   rm -f $tmp/in
46174   mv $tmp/out $tmp/in
46175 ' >>$CONFIG_STATUS
46176   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
46177   rm -f conftest.undefs
46178   mv conftest.tail conftest.undefs
46179 done
46180 rm -f conftest.undefs
46181
46182 cat >>$CONFIG_STATUS <<\_ACEOF
46183   # Let's still pretend it is `configure' which instantiates (i.e., don't
46184   # use $as_me), people would be surprised to read:
46185   #    /* config.h.  Generated by config.status.  */
46186   if test x"$ac_file" = x-; then
46187     echo "/* Generated by configure.  */" >$tmp/config.h
46188   else
46189     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
46190   fi
46191   cat $tmp/in >>$tmp/config.h
46192   rm -f $tmp/in
46193   if test x"$ac_file" != x-; then
46194     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
46195       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
46196 echo "$as_me: $ac_file is unchanged" >&6;}
46197     else
46198       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
46199 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46200          X"$ac_file" : 'X\(//\)[^/]' \| \
46201          X"$ac_file" : 'X\(//\)$' \| \
46202          X"$ac_file" : 'X\(/\)' \| \
46203          .     : '\(.\)' 2>/dev/null ||
46204 echo X"$ac_file" |
46205     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46206           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46207           /^X\(\/\/\)$/{ s//\1/; q; }
46208           /^X\(\/\).*/{ s//\1/; q; }
46209           s/.*/./; q'`
46210       { if $as_mkdir_p; then
46211     mkdir -p "$ac_dir"
46212   else
46213     as_dir="$ac_dir"
46214     as_dirs=
46215     while test ! -d "$as_dir"; do
46216       as_dirs="$as_dir $as_dirs"
46217       as_dir=`(dirname "$as_dir") 2>/dev/null ||
46218 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46219          X"$as_dir" : 'X\(//\)[^/]' \| \
46220          X"$as_dir" : 'X\(//\)$' \| \
46221          X"$as_dir" : 'X\(/\)' \| \
46222          .     : '\(.\)' 2>/dev/null ||
46223 echo X"$as_dir" |
46224     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46225           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46226           /^X\(\/\/\)$/{ s//\1/; q; }
46227           /^X\(\/\).*/{ s//\1/; q; }
46228           s/.*/./; q'`
46229     done
46230     test ! -n "$as_dirs" || mkdir $as_dirs
46231   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
46232 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
46233    { (exit 1); exit 1; }; }; }
46234
46235       rm -f $ac_file
46236       mv $tmp/config.h $ac_file
46237     fi
46238   else
46239     cat $tmp/config.h
46240     rm -f $tmp/config.h
46241   fi
46242 # Compute $ac_file's index in $config_headers.
46243 _am_stamp_count=1
46244 for _am_header in $config_headers :; do
46245   case $_am_header in
46246     $ac_file | $ac_file:* )
46247       break ;;
46248     * )
46249       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
46250   esac
46251 done
46252 echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
46253 $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46254          X$ac_file : 'X\(//\)[^/]' \| \
46255          X$ac_file : 'X\(//\)$' \| \
46256          X$ac_file : 'X\(/\)' \| \
46257          .     : '\(.\)' 2>/dev/null ||
46258 echo X$ac_file |
46259     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46260           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46261           /^X\(\/\/\)$/{ s//\1/; q; }
46262           /^X\(\/\).*/{ s//\1/; q; }
46263           s/.*/./; q'`/stamp-h$_am_stamp_count
46264 done
46265 _ACEOF
46266 cat >>$CONFIG_STATUS <<\_ACEOF
46267
46268 #
46269 # CONFIG_COMMANDS section.
46270 #
46271 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
46272   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
46273   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
46274   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
46275 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46276          X"$ac_dest" : 'X\(//\)[^/]' \| \
46277          X"$ac_dest" : 'X\(//\)$' \| \
46278          X"$ac_dest" : 'X\(/\)' \| \
46279          .     : '\(.\)' 2>/dev/null ||
46280 echo X"$ac_dest" |
46281     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46282           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46283           /^X\(\/\/\)$/{ s//\1/; q; }
46284           /^X\(\/\).*/{ s//\1/; q; }
46285           s/.*/./; q'`
46286   { if $as_mkdir_p; then
46287     mkdir -p "$ac_dir"
46288   else
46289     as_dir="$ac_dir"
46290     as_dirs=
46291     while test ! -d "$as_dir"; do
46292       as_dirs="$as_dir $as_dirs"
46293       as_dir=`(dirname "$as_dir") 2>/dev/null ||
46294 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46295          X"$as_dir" : 'X\(//\)[^/]' \| \
46296          X"$as_dir" : 'X\(//\)$' \| \
46297          X"$as_dir" : 'X\(/\)' \| \
46298          .     : '\(.\)' 2>/dev/null ||
46299 echo X"$as_dir" |
46300     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46301           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46302           /^X\(\/\/\)$/{ s//\1/; q; }
46303           /^X\(\/\).*/{ s//\1/; q; }
46304           s/.*/./; q'`
46305     done
46306     test ! -n "$as_dirs" || mkdir $as_dirs
46307   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
46308 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
46309    { (exit 1); exit 1; }; }; }
46310
46311   ac_builddir=.
46312
46313 if test "$ac_dir" != .; then
46314   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
46315   # A "../" for each directory in $ac_dir_suffix.
46316   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
46317 else
46318   ac_dir_suffix= ac_top_builddir=
46319 fi
46320
46321 case $srcdir in
46322   .)  # No --srcdir option.  We are building in place.
46323     ac_srcdir=.
46324     if test -z "$ac_top_builddir"; then
46325        ac_top_srcdir=.
46326     else
46327        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
46328     fi ;;
46329   [\\/]* | ?:[\\/]* )  # Absolute path.
46330     ac_srcdir=$srcdir$ac_dir_suffix;
46331     ac_top_srcdir=$srcdir ;;
46332   *) # Relative path.
46333     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
46334     ac_top_srcdir=$ac_top_builddir$srcdir ;;
46335 esac
46336
46337 # Do not use `cd foo && pwd` to compute absolute paths, because
46338 # the directories may not exist.
46339 case `pwd` in
46340 .) ac_abs_builddir="$ac_dir";;
46341 *)
46342   case "$ac_dir" in
46343   .) ac_abs_builddir=`pwd`;;
46344   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
46345   *) ac_abs_builddir=`pwd`/"$ac_dir";;
46346   esac;;
46347 esac
46348 case $ac_abs_builddir in
46349 .) ac_abs_top_builddir=${ac_top_builddir}.;;
46350 *)
46351   case ${ac_top_builddir}. in
46352   .) ac_abs_top_builddir=$ac_abs_builddir;;
46353   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
46354   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
46355   esac;;
46356 esac
46357 case $ac_abs_builddir in
46358 .) ac_abs_srcdir=$ac_srcdir;;
46359 *)
46360   case $ac_srcdir in
46361   .) ac_abs_srcdir=$ac_abs_builddir;;
46362   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
46363   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
46364   esac;;
46365 esac
46366 case $ac_abs_builddir in
46367 .) ac_abs_top_srcdir=$ac_top_srcdir;;
46368 *)
46369   case $ac_top_srcdir in
46370   .) ac_abs_top_srcdir=$ac_abs_builddir;;
46371   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
46372   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
46373   esac;;
46374 esac
46375
46376
46377   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
46378 echo "$as_me: executing $ac_dest commands" >&6;}
46379   case $ac_dest in
46380     depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
46381   # Strip MF so we end up with the name of the file.
46382   mf=`echo "$mf" | sed -e 's/:.*$//'`
46383   # Check whether this is an Automake generated Makefile or not.
46384   # We used to match only the files named `Makefile.in', but
46385   # some people rename them; so instead we look at the file content.
46386   # Grep'ing the first line is not enough: some people post-process
46387   # each Makefile.in and add a new line on top of each file to say so.
46388   # So let's grep whole file.
46389   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
46390     dirpart=`(dirname "$mf") 2>/dev/null ||
46391 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46392          X"$mf" : 'X\(//\)[^/]' \| \
46393          X"$mf" : 'X\(//\)$' \| \
46394          X"$mf" : 'X\(/\)' \| \
46395          .     : '\(.\)' 2>/dev/null ||
46396 echo X"$mf" |
46397     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46398           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46399           /^X\(\/\/\)$/{ s//\1/; q; }
46400           /^X\(\/\).*/{ s//\1/; q; }
46401           s/.*/./; q'`
46402   else
46403     continue
46404   fi
46405   # Extract the definition of DEPDIR, am__include, and am__quote
46406   # from the Makefile without running `make'.
46407   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
46408   test -z "$DEPDIR" && continue
46409   am__include=`sed -n 's/^am__include = //p' < "$mf"`
46410   test -z "am__include" && continue
46411   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
46412   # When using ansi2knr, U may be empty or an underscore; expand it
46413   U=`sed -n 's/^U = //p' < "$mf"`
46414   # Find all dependency output files, they are included files with
46415   # $(DEPDIR) in their names.  We invoke sed twice because it is the
46416   # simplest approach to changing $(DEPDIR) to its actual value in the
46417   # expansion.
46418   for file in `sed -n "
46419     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
46420        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
46421     # Make sure the directory exists.
46422     test -f "$dirpart/$file" && continue
46423     fdir=`(dirname "$file") 2>/dev/null ||
46424 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46425          X"$file" : 'X\(//\)[^/]' \| \
46426          X"$file" : 'X\(//\)$' \| \
46427          X"$file" : 'X\(/\)' \| \
46428          .     : '\(.\)' 2>/dev/null ||
46429 echo X"$file" |
46430     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46431           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46432           /^X\(\/\/\)$/{ s//\1/; q; }
46433           /^X\(\/\).*/{ s//\1/; q; }
46434           s/.*/./; q'`
46435     { if $as_mkdir_p; then
46436     mkdir -p $dirpart/$fdir
46437   else
46438     as_dir=$dirpart/$fdir
46439     as_dirs=
46440     while test ! -d "$as_dir"; do
46441       as_dirs="$as_dir $as_dirs"
46442       as_dir=`(dirname "$as_dir") 2>/dev/null ||
46443 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46444          X"$as_dir" : 'X\(//\)[^/]' \| \
46445          X"$as_dir" : 'X\(//\)$' \| \
46446          X"$as_dir" : 'X\(/\)' \| \
46447          .     : '\(.\)' 2>/dev/null ||
46448 echo X"$as_dir" |
46449     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46450           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46451           /^X\(\/\/\)$/{ s//\1/; q; }
46452           /^X\(\/\).*/{ s//\1/; q; }
46453           s/.*/./; q'`
46454     done
46455     test ! -n "$as_dirs" || mkdir $as_dirs
46456   fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
46457 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
46458    { (exit 1); exit 1; }; }; }
46459
46460     # echo "creating $dirpart/$file"
46461     echo '# dummy' > "$dirpart/$file"
46462   done
46463 done
46464  ;;
46465     default )
46466 chmod +x tests/run
46467 date > stamp-h
46468 BACKENDSC="servers/slapd/backends.c"
46469 echo "Making $BACKENDSC"
46470 rm -f $BACKENDSC
46471 cat > $BACKENDSC << ENDX
46472 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
46473  *
46474  * Copyright 1998-2006 The OpenLDAP Foundation.
46475  * All rights reserved.
46476  *
46477  * Redistribution and use in source and binary forms, with or without
46478  * modification, are permitted only as authorized by the OpenLDAP
46479  * Public License.
46480  *
46481  * A copy of this license is available in the file LICENSE in the
46482  * top-level directory of the distribution or, alternatively, at
46483  * <http://www.OpenLDAP.org/license.html>.
46484  */
46485 /* This file is automatically generated by configure; please do not edit. */
46486
46487 #include "portable.h"
46488 #include "slap.h"
46489
46490 ENDX
46491 if test "${STATIC_BACKENDS}"; then
46492         for b in config ${STATIC_BACKENDS}; do
46493                 bb=`echo "${b}" | sed -e 's/back-//'`
46494                 cat >> $BACKENDSC << ENDX
46495 extern BI_init ${bb}_back_initialize;
46496 ENDX
46497         done
46498
46499         cat >> $BACKENDSC << ENDX
46500
46501 BackendInfo slap_binfo[] = {
46502 ENDX
46503
46504         for b in config ${STATIC_BACKENDS}; do
46505                 bb=`echo "${b}" | sed -e 's/back-//'`
46506                 echo "    Add ${bb} ..."
46507                 cat >> $BACKENDSC << ENDX
46508         { "${bb}", ${bb}_back_initialize },
46509 ENDX
46510         done
46511
46512         cat >> $BACKENDSC << ENDX
46513         { NULL, NULL },
46514 };
46515
46516 /* end of generated file */
46517 ENDX
46518 fi
46519 OVERLAYSC="servers/slapd/overlays/statover.c"
46520 echo "Making $OVERLAYSC"
46521 rm -f $OVERLAYSC
46522 cat > $OVERLAYSC << ENDX
46523 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
46524  *
46525  * Copyright 1998-2006 The OpenLDAP Foundation.
46526  * All rights reserved.
46527  *
46528  * Redistribution and use in source and binary forms, with or without
46529  * modification, are permitted only as authorized by the OpenLDAP
46530  * Public License.
46531  *
46532  * A copy of this license is available in the file LICENSE in the
46533  * top-level directory of the distribution or, alternatively, at
46534  * <http://www.OpenLDAP.org/license.html>.
46535  */
46536 /* This file is automatically generated by configure; please do not edit. */
46537
46538 #include "portable.h"
46539 #include "slap.h"
46540
46541 ENDX
46542 if test "${STATIC_OVERLAYS}"; then
46543         for o in ${STATIC_OVERLAYS}; do
46544                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
46545                 cat >> $OVERLAYSC << ENDX
46546 extern OV_init ${oo}_initialize;
46547 ENDX
46548         done
46549 fi
46550
46551 cat >> $OVERLAYSC << ENDX
46552
46553 OverlayInit slap_oinfo[] = {
46554 ENDX
46555
46556 if test "${STATIC_OVERLAYS}"; then
46557         for o in ${STATIC_OVERLAYS}; do
46558                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
46559                 echo "    Add ${oo} ..."
46560                 cat >> $OVERLAYSC << ENDX
46561         { "${oo}", ${oo}_initialize },
46562 ENDX
46563         done
46564 fi
46565
46566         cat >> $OVERLAYSC << ENDX
46567         { NULL, NULL },
46568 };
46569
46570 /* end of generated file */
46571 ENDX
46572
46573 echo Please run \"make depend\" to build dependencies
46574  ;;
46575   esac
46576 done
46577 _ACEOF
46578
46579 cat >>$CONFIG_STATUS <<\_ACEOF
46580
46581 { (exit 0); exit 0; }
46582 _ACEOF
46583 chmod +x $CONFIG_STATUS
46584 ac_clean_files=$ac_clean_files_save
46585
46586
46587 # configure is writing to config.log, and then calls config.status.
46588 # config.status does its own redirection, appending to config.log.
46589 # Unfortunately, on DOS this fails, as config.log is still kept open
46590 # by configure, so config.status won't be able to write to it; its
46591 # output is simply discarded.  So we exec the FD to /dev/null,
46592 # effectively closing config.log, so it can be properly (re)opened and
46593 # appended to by config.status.  When coming back to configure, we
46594 # need to make the FD available again.
46595 if test "$no_create" != yes; then
46596   ac_cs_success=:
46597   ac_config_status_args=
46598   test "$silent" = yes &&
46599     ac_config_status_args="$ac_config_status_args --quiet"
46600   exec 5>/dev/null
46601   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
46602   exec 5>>config.log
46603   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
46604   # would make configure fail if this is the last instruction.
46605   $ac_cs_success || { (exit 1); exit 1; }
46606 fi
46607