]> git.sur5r.net Git - openldap/blob - configure
don't risk using dangling pointers when looping thru connections (ITS#4405)
[openldap] / configure
1 #! /bin/sh
2 # From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.560.2.29 2006/04/05 21:36:14 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_AUDITLOG 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 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 [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-aci          enable per-object ACIs (experimental) [no]
1019     --enable-cleartext    enable cleartext passwords [yes]
1020     --enable-crypt        enable crypt(3) passwords [no]
1021     --enable-lmpasswd     enable LAN Manager passwords [no]
1022     --enable-spasswd      enable (Cyrus) SASL password verification [no]
1023     --enable-modules      enable dynamic module support [no]
1024     --enable-rewrite      enable DN rewriting in back-ldap and rwm overlay [auto]
1025     --enable-rlookups     enable reverse lookups of client hostnames [no]
1026     --enable-slapi        enable SLAPI support (experimental) [no]
1027     --enable-slp          enable SLPv2 support [no]
1028     --enable-wrappers     enable tcp wrapper support [no]
1029
1030 SLAPD Backend Options:
1031     --enable-backends     enable all available backends no|yes|mod
1032     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]
1033     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]
1034     --enable-hdb          enable Hierarchical DB backend no|yes|mod [yes]
1035     --enable-ldap         enable ldap backend no|yes|mod [no]
1036     --enable-ldbm         enable ldbm backend no|yes|mod [no]
1037       --enable-ldbm-api   use LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]
1038       --enable-ldbm-type  use LDBM type auto|btree|hash [auto]
1039     --enable-meta         enable metadirectory backend no|yes|mod [no]
1040     --enable-monitor      enable monitor backend no|yes|mod [yes]
1041     --enable-null         enable null backend no|yes|mod [no]
1042     --enable-passwd       enable passwd backend no|yes|mod [no]
1043     --enable-perl         enable perl backend no|yes|mod [no]
1044     --enable-relay        enable relay backend no|yes|mod [yes]
1045     --enable-shell        enable shell backend no|yes|mod [no]
1046     --enable-sql          enable sql backend no|yes|mod [no]
1047
1048 SLAPD Overlay Options:
1049     --enable-overlays     enable all available overlays no|yes|mod
1050     --enable-accesslog    In-Directory Access Logging overlay no|yes|mod [no]
1051     --enable-auditlog     Audit Logging overlay no|yes|mod [no]
1052     --enable-denyop       Deny Operation overlay no|yes|mod [no]
1053     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]
1054     --enable-dynlist      Dynamic List overlay no|yes|mod [no]
1055     --enable-lastmod      Last Modification overlay no|yes|mod [no]
1056     --enable-ppolicy      Password Policy overlay no|yes|mod [no]
1057     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]
1058     --enable-refint       Referential Integrity overlay no|yes|mod [no]
1059     --enable-retcode      Return Code testing overlay no|yes|mod [no]
1060     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]
1061     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [yes]
1062     --enable-translucent  Translucent Proxy overlay no|yes|mod [no]
1063     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]
1064     --enable-valsort      Value Sorting overlay no|yes|mod [no]
1065
1066 SLURPD (Replication Daemon) Options:
1067   --enable-slurpd         enable building slurpd [auto]
1068
1069 Library Generation & Linking Options
1070   --enable-static[=PKGS]
1071                           build static libraries [default=yes]
1072   --enable-shared[=PKGS]
1073                           build shared libraries [default=yes]
1074   --enable-fast-install[=PKGS]
1075                           optimize for fast installation [default=yes]
1076   --disable-dependency-tracking  speeds up one-time build
1077   --enable-dependency-tracking   do not reject slow dependency extractors
1078   --disable-libtool-lock  avoid locking (might break parallel builds)
1079
1080 Optional Packages:
1081   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1082   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1083   --with-subdir=DIR       change default subdirectory used for installs
1084   --with-cyrus-sasl       with Cyrus SASL support [auto]
1085   --with-fetch            with fetch(3) URL support [auto]
1086   --with-threads          with threads [auto]
1087   --with-tls              with TLS/SSL support [auto]
1088   --with-yielding-select  with implicitly yielding select [auto]
1089   --with-mp               with multiple precision statistics auto|longlong|long|bignum|gmp [auto]
1090
1091   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1092   --with-pic              try to use only PIC/non-PIC objects [default=use
1093                           both]
1094   --with-tags[=TAGS]
1095                           include additional configurations [automatic]
1096
1097 See INSTALL file for further details.
1098
1099 Some influential environment variables:
1100   CC          C compiler command
1101   CFLAGS      C compiler flags
1102   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1103               nonstandard directory <lib dir>
1104   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
1105               headers in a nonstandard directory <include dir>
1106   CPP         C preprocessor
1107
1108 Use these variables to override the choices made by `configure' or to help
1109 it to find libraries and programs with nonstandard names/locations.
1110
1111 _ACEOF
1112 fi
1113
1114 if test "$ac_init_help" = "recursive"; then
1115   # If there are subdirs, report their specific --help.
1116   ac_popdir=`pwd`
1117   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1118     test -d $ac_dir || continue
1119     ac_builddir=.
1120
1121 if test "$ac_dir" != .; then
1122   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1123   # A "../" for each directory in $ac_dir_suffix.
1124   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
1125 else
1126   ac_dir_suffix= ac_top_builddir=
1127 fi
1128
1129 case $srcdir in
1130   .)  # No --srcdir option.  We are building in place.
1131     ac_srcdir=.
1132     if test -z "$ac_top_builddir"; then
1133        ac_top_srcdir=.
1134     else
1135        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
1136     fi ;;
1137   [\\/]* | ?:[\\/]* )  # Absolute path.
1138     ac_srcdir=$srcdir$ac_dir_suffix;
1139     ac_top_srcdir=$srcdir ;;
1140   *) # Relative path.
1141     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
1142     ac_top_srcdir=$ac_top_builddir$srcdir ;;
1143 esac
1144
1145 # Do not use `cd foo && pwd` to compute absolute paths, because
1146 # the directories may not exist.
1147 case `pwd` in
1148 .) ac_abs_builddir="$ac_dir";;
1149 *)
1150   case "$ac_dir" in
1151   .) ac_abs_builddir=`pwd`;;
1152   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
1153   *) ac_abs_builddir=`pwd`/"$ac_dir";;
1154   esac;;
1155 esac
1156 case $ac_abs_builddir in
1157 .) ac_abs_top_builddir=${ac_top_builddir}.;;
1158 *)
1159   case ${ac_top_builddir}. in
1160   .) ac_abs_top_builddir=$ac_abs_builddir;;
1161   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
1162   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
1163   esac;;
1164 esac
1165 case $ac_abs_builddir in
1166 .) ac_abs_srcdir=$ac_srcdir;;
1167 *)
1168   case $ac_srcdir in
1169   .) ac_abs_srcdir=$ac_abs_builddir;;
1170   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1171   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1172   esac;;
1173 esac
1174 case $ac_abs_builddir in
1175 .) ac_abs_top_srcdir=$ac_top_srcdir;;
1176 *)
1177   case $ac_top_srcdir in
1178   .) ac_abs_top_srcdir=$ac_abs_builddir;;
1179   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1180   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1181   esac;;
1182 esac
1183
1184     cd $ac_dir
1185     # Check for guested configure; otherwise get Cygnus style configure.
1186     if test -f $ac_srcdir/configure.gnu; then
1187       echo
1188       $SHELL $ac_srcdir/configure.gnu  --help=recursive
1189     elif test -f $ac_srcdir/configure; then
1190       echo
1191       $SHELL $ac_srcdir/configure  --help=recursive
1192     elif test -f $ac_srcdir/configure.ac ||
1193            test -f $ac_srcdir/configure.in; then
1194       echo
1195       $ac_configure --help
1196     else
1197       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1198     fi
1199     cd $ac_popdir
1200   done
1201 fi
1202
1203 test -n "$ac_init_help" && exit 0
1204 if $ac_init_version; then
1205   cat <<\_ACEOF
1206
1207 Copyright (C) 2003 Free Software Foundation, Inc.
1208 This configure script is free software; the Free Software Foundation
1209 gives unlimited permission to copy, distribute and modify it.
1210
1211 Copyright 1998-2006 The OpenLDAP Foundation. All rights reserved.
1212 Restrictions apply, see COPYRIGHT and LICENSE files.
1213 _ACEOF
1214   exit 0
1215 fi
1216 exec 5>config.log
1217 cat >&5 <<_ACEOF
1218 This file contains any messages produced by compilers while
1219 running configure, to aid debugging if configure makes a mistake.
1220
1221 It was created by $as_me, which was
1222 generated by GNU Autoconf 2.59.  Invocation command line was
1223
1224   $ $0 $@
1225
1226 _ACEOF
1227 {
1228 cat <<_ASUNAME
1229 ## --------- ##
1230 ## Platform. ##
1231 ## --------- ##
1232
1233 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1234 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1235 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1236 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1237 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1238
1239 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1240 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1241
1242 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1243 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1244 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1245 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1246 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1247 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1248 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1249
1250 _ASUNAME
1251
1252 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1253 for as_dir in $PATH
1254 do
1255   IFS=$as_save_IFS
1256   test -z "$as_dir" && as_dir=.
1257   echo "PATH: $as_dir"
1258 done
1259
1260 } >&5
1261
1262 cat >&5 <<_ACEOF
1263
1264
1265 ## ----------- ##
1266 ## Core tests. ##
1267 ## ----------- ##
1268
1269 _ACEOF
1270
1271
1272 # Keep a trace of the command line.
1273 # Strip out --no-create and --no-recursion so they do not pile up.
1274 # Strip out --silent because we don't want to record it for future runs.
1275 # Also quote any args containing shell meta-characters.
1276 # Make two passes to allow for proper duplicate-argument suppression.
1277 ac_configure_args=
1278 ac_configure_args0=
1279 ac_configure_args1=
1280 ac_sep=
1281 ac_must_keep_next=false
1282 for ac_pass in 1 2
1283 do
1284   for ac_arg
1285   do
1286     case $ac_arg in
1287     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1288     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1289     | -silent | --silent | --silen | --sile | --sil)
1290       continue ;;
1291     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1292       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1293     esac
1294     case $ac_pass in
1295     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1296     2)
1297       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1298       if test $ac_must_keep_next = true; then
1299         ac_must_keep_next=false # Got value, back to normal.
1300       else
1301         case $ac_arg in
1302           *=* | --config-cache | -C | -disable-* | --disable-* \
1303           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1304           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1305           | -with-* | --with-* | -without-* | --without-* | --x)
1306             case "$ac_configure_args0 " in
1307               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1308             esac
1309             ;;
1310           -* ) ac_must_keep_next=true ;;
1311         esac
1312       fi
1313       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1314       # Get rid of the leading space.
1315       ac_sep=" "
1316       ;;
1317     esac
1318   done
1319 done
1320 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1321 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1322
1323 # When interrupted or exit'd, cleanup temporary files, and complete
1324 # config.log.  We remove comments because anyway the quotes in there
1325 # would cause problems or look ugly.
1326 # WARNING: Be sure not to use single quotes in there, as some shells,
1327 # such as our DU 5.0 friend, will then `close' the trap.
1328 trap 'exit_status=$?
1329   # Save into config.log some information that might help in debugging.
1330   {
1331     echo
1332
1333     cat <<\_ASBOX
1334 ## ---------------- ##
1335 ## Cache variables. ##
1336 ## ---------------- ##
1337 _ASBOX
1338     echo
1339     # The following way of writing the cache mishandles newlines in values,
1340 {
1341   (set) 2>&1 |
1342     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1343     *ac_space=\ *)
1344       sed -n \
1345         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1346           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1347       ;;
1348     *)
1349       sed -n \
1350         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1351       ;;
1352     esac;
1353 }
1354     echo
1355
1356     cat <<\_ASBOX
1357 ## ----------------- ##
1358 ## Output variables. ##
1359 ## ----------------- ##
1360 _ASBOX
1361     echo
1362     for ac_var in $ac_subst_vars
1363     do
1364       eval ac_val=$`echo $ac_var`
1365       echo "$ac_var='"'"'$ac_val'"'"'"
1366     done | sort
1367     echo
1368
1369     if test -n "$ac_subst_files"; then
1370       cat <<\_ASBOX
1371 ## ------------- ##
1372 ## Output files. ##
1373 ## ------------- ##
1374 _ASBOX
1375       echo
1376       for ac_var in $ac_subst_files
1377       do
1378         eval ac_val=$`echo $ac_var`
1379         echo "$ac_var='"'"'$ac_val'"'"'"
1380       done | sort
1381       echo
1382     fi
1383
1384     if test -s confdefs.h; then
1385       cat <<\_ASBOX
1386 ## ----------- ##
1387 ## confdefs.h. ##
1388 ## ----------- ##
1389 _ASBOX
1390       echo
1391       sed "/^$/d" confdefs.h | sort
1392       echo
1393     fi
1394     test "$ac_signal" != 0 &&
1395       echo "$as_me: caught signal $ac_signal"
1396     echo "$as_me: exit $exit_status"
1397   } >&5
1398   rm -f core *.core &&
1399   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1400     exit $exit_status
1401      ' 0
1402 for ac_signal in 1 2 13 15; do
1403   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1404 done
1405 ac_signal=0
1406
1407 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1408 rm -rf conftest* confdefs.h
1409 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1410 echo >confdefs.h
1411
1412 # Predefined preprocessor variables.
1413
1414 cat >>confdefs.h <<_ACEOF
1415 #define PACKAGE_NAME "$PACKAGE_NAME"
1416 _ACEOF
1417
1418
1419 cat >>confdefs.h <<_ACEOF
1420 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1421 _ACEOF
1422
1423
1424 cat >>confdefs.h <<_ACEOF
1425 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1426 _ACEOF
1427
1428
1429 cat >>confdefs.h <<_ACEOF
1430 #define PACKAGE_STRING "$PACKAGE_STRING"
1431 _ACEOF
1432
1433
1434 cat >>confdefs.h <<_ACEOF
1435 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1436 _ACEOF
1437
1438
1439 # Let the site file select an alternate cache file if it wants to.
1440 # Prefer explicitly selected file to automatically selected ones.
1441 if test -z "$CONFIG_SITE"; then
1442   if test "x$prefix" != xNONE; then
1443     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1444   else
1445     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1446   fi
1447 fi
1448 for ac_site_file in $CONFIG_SITE; do
1449   if test -r "$ac_site_file"; then
1450     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1451 echo "$as_me: loading site script $ac_site_file" >&6;}
1452     sed 's/^/| /' "$ac_site_file" >&5
1453     . "$ac_site_file"
1454   fi
1455 done
1456
1457
1458 # Check that the precious variables saved in the cache have kept the same
1459 # value.
1460 ac_cache_corrupted=false
1461 for ac_var in `(set) 2>&1 |
1462                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1463   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1464   eval ac_new_set=\$ac_env_${ac_var}_set
1465   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1466   eval ac_new_val="\$ac_env_${ac_var}_value"
1467   case $ac_old_set,$ac_new_set in
1468     set,)
1469       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1470 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1471       ac_cache_corrupted=: ;;
1472     ,set)
1473       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1474 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1475       ac_cache_corrupted=: ;;
1476     ,);;
1477     *)
1478       if test "x$ac_old_val" != "x$ac_new_val"; then
1479         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1480 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1481         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1482 echo "$as_me:   former value:  $ac_old_val" >&2;}
1483         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1484 echo "$as_me:   current value: $ac_new_val" >&2;}
1485         ac_cache_corrupted=:
1486       fi;;
1487   esac
1488   # Pass precious variables to config.status.
1489   if test "$ac_new_set" = set; then
1490     case $ac_new_val in
1491     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1492       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1493     *) ac_arg=$ac_var=$ac_new_val ;;
1494     esac
1495     case " $ac_configure_args " in
1496       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1497       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1498     esac
1499   fi
1500 done
1501 if $ac_cache_corrupted; then
1502   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1503 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1504   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1505 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1506    { (exit 1); exit 1; }; }
1507 fi
1508
1509 ac_ext=c
1510 ac_cpp='$CPP $CPPFLAGS'
1511 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1512 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1513 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1514
1515
1516
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 ac_aux_dir=
1558 for ac_dir in build $srcdir/build; do
1559   if test -f $ac_dir/install-sh; then
1560     ac_aux_dir=$ac_dir
1561     ac_install_sh="$ac_aux_dir/install-sh -c"
1562     break
1563   elif test -f $ac_dir/install.sh; then
1564     ac_aux_dir=$ac_dir
1565     ac_install_sh="$ac_aux_dir/install.sh -c"
1566     break
1567   elif test -f $ac_dir/shtool; then
1568     ac_aux_dir=$ac_dir
1569     ac_install_sh="$ac_aux_dir/shtool install -c"
1570     break
1571   fi
1572 done
1573 if test -z "$ac_aux_dir"; then
1574   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build $srcdir/build" >&5
1575 echo "$as_me: error: cannot find install-sh or install.sh in build $srcdir/build" >&2;}
1576    { (exit 1); exit 1; }; }
1577 fi
1578 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1579 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1580 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1581
1582 eval `$ac_aux_dir/version.sh`
1583 if test -z "$OL_STRING"; then
1584         { { echo "$as_me:$LINENO: error: could not determine version" >&5
1585 echo "$as_me: error: could not determine version" >&2;}
1586    { (exit 1); exit 1; }; }
1587 fi
1588
1589 if test -f "$ac_aux_dir/shtool" && test ! -d $ac_aux_dir/shtool; then
1590         ac_cv_shtool="$ac_aux_dir/shtool"
1591 else
1592         { { echo "$as_me:$LINENO: error: no shtool found in $ac_aux_dir" >&5
1593 echo "$as_me: error: no shtool found in $ac_aux_dir" >&2;}
1594    { (exit 1); exit 1; }; }
1595 fi
1596
1597 SHTOOL="$ac_cv_shtool"
1598
1599 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
1600 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
1601
1602 OPENLDAP_CVS=""
1603 if test -d $ac_aux_dir/CVS; then
1604         OPENLDAP_CVS="(from CVS sources) "
1605 fi
1606
1607 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
1608
1609 # Make sure we can run config.sub.
1610 $ac_config_sub sun4 >/dev/null 2>&1 ||
1611   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1612 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1613    { (exit 1); exit 1; }; }
1614
1615 echo "$as_me:$LINENO: checking build system type" >&5
1616 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1617 if test "${ac_cv_build+set}" = set; then
1618   echo $ECHO_N "(cached) $ECHO_C" >&6
1619 else
1620   ac_cv_build_alias=$build_alias
1621 test -z "$ac_cv_build_alias" &&
1622   ac_cv_build_alias=`$ac_config_guess`
1623 test -z "$ac_cv_build_alias" &&
1624   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1625 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1626    { (exit 1); exit 1; }; }
1627 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1628   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1629 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1630    { (exit 1); exit 1; }; }
1631
1632 fi
1633 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1634 echo "${ECHO_T}$ac_cv_build" >&6
1635 build=$ac_cv_build
1636 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1637 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1638 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1639
1640
1641 echo "$as_me:$LINENO: checking host system type" >&5
1642 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1643 if test "${ac_cv_host+set}" = set; then
1644   echo $ECHO_N "(cached) $ECHO_C" >&6
1645 else
1646   ac_cv_host_alias=$host_alias
1647 test -z "$ac_cv_host_alias" &&
1648   ac_cv_host_alias=$ac_cv_build_alias
1649 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1650   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1651 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1652    { (exit 1); exit 1; }; }
1653
1654 fi
1655 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1656 echo "${ECHO_T}$ac_cv_host" >&6
1657 host=$ac_cv_host
1658 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1659 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1660 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1661
1662
1663 echo "$as_me:$LINENO: checking target system type" >&5
1664 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1665 if test "${ac_cv_target+set}" = set; then
1666   echo $ECHO_N "(cached) $ECHO_C" >&6
1667 else
1668   ac_cv_target_alias=$target_alias
1669 test "x$ac_cv_target_alias" = "x" &&
1670   ac_cv_target_alias=$ac_cv_host_alias
1671 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1672   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1673 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1674    { (exit 1); exit 1; }; }
1675
1676 fi
1677 echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1678 echo "${ECHO_T}$ac_cv_target" >&6
1679 target=$ac_cv_target
1680 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1681 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1682 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1683
1684
1685 # The aliases save the names the user supplied, while $host etc.
1686 # will get canonicalized.
1687 test -n "$target_alias" &&
1688   test "$program_prefix$program_suffix$program_transform_name" = \
1689     NONENONEs,x,x, &&
1690   program_prefix=${target_alias}-
1691
1692 am__api_version="1.9"
1693 # Find a good install program.  We prefer a C program (faster),
1694 # so one script is as good as another.  But avoid the broken or
1695 # incompatible versions:
1696 # SysV /etc/install, /usr/sbin/install
1697 # SunOS /usr/etc/install
1698 # IRIX /sbin/install
1699 # AIX /bin/install
1700 # AmigaOS /C/install, which installs bootblocks on floppy discs
1701 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1702 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1703 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1704 # OS/2's system install, which has a completely different semantic
1705 # ./install, which can be erroneously created by make from ./install.sh.
1706 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
1707 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
1708 if test -z "$INSTALL"; then
1709 if test "${ac_cv_path_install+set}" = set; then
1710   echo $ECHO_N "(cached) $ECHO_C" >&6
1711 else
1712   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1713 for as_dir in $PATH
1714 do
1715   IFS=$as_save_IFS
1716   test -z "$as_dir" && as_dir=.
1717   # Account for people who put trailing slashes in PATH elements.
1718 case $as_dir/ in
1719   ./ | .// | /cC/* | \
1720   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
1721   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
1722   /usr/ucb/* ) ;;
1723   *)
1724     # OSF1 and SCO ODT 3.0 have their own names for install.
1725     # Don't use installbsd from OSF since it installs stuff as root
1726     # by default.
1727     for ac_prog in ginstall scoinst install; do
1728       for ac_exec_ext in '' $ac_executable_extensions; do
1729         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
1730           if test $ac_prog = install &&
1731             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
1732             # AIX install.  It has an incompatible calling convention.
1733             :
1734           elif test $ac_prog = install &&
1735             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
1736             # program-specific install script used by HP pwplus--don't use.
1737             :
1738           else
1739             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
1740             break 3
1741           fi
1742         fi
1743       done
1744     done
1745     ;;
1746 esac
1747 done
1748
1749
1750 fi
1751   if test "${ac_cv_path_install+set}" = set; then
1752     INSTALL=$ac_cv_path_install
1753   else
1754     # As a last resort, use the slow shell script.  We don't cache a
1755     # path for INSTALL within a source directory, because that will
1756     # break other packages using the cache if that directory is
1757     # removed, or if the path is relative.
1758     INSTALL=$ac_install_sh
1759   fi
1760 fi
1761 echo "$as_me:$LINENO: result: $INSTALL" >&5
1762 echo "${ECHO_T}$INSTALL" >&6
1763
1764 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1765 # It thinks the first close brace ends the variable substitution.
1766 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1767
1768 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1769
1770 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1771
1772 echo "$as_me:$LINENO: checking whether build environment is sane" >&5
1773 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
1774 # Just in case
1775 sleep 1
1776 echo timestamp > conftest.file
1777 # Do `set' in a subshell so we don't clobber the current shell's
1778 # arguments.  Must try -L first in case configure is actually a
1779 # symlink; some systems play weird games with the mod time of symlinks
1780 # (eg FreeBSD returns the mod time of the symlink's containing
1781 # directory).
1782 if (
1783    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1784    if test "$*" = "X"; then
1785       # -L didn't work.
1786       set X `ls -t $srcdir/configure conftest.file`
1787    fi
1788    rm -f conftest.file
1789    if test "$*" != "X $srcdir/configure conftest.file" \
1790       && test "$*" != "X conftest.file $srcdir/configure"; then
1791
1792       # If neither matched, then we have a broken ls.  This can happen
1793       # if, for instance, CONFIG_SHELL is bash and it inherits a
1794       # broken ls alias from the environment.  This has actually
1795       # happened.  Such a system could not be considered "sane".
1796       { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
1797 alias in your environment" >&5
1798 echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
1799 alias in your environment" >&2;}
1800    { (exit 1); exit 1; }; }
1801    fi
1802
1803    test "$2" = conftest.file
1804    )
1805 then
1806    # Ok.
1807    :
1808 else
1809    { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
1810 Check your system clock" >&5
1811 echo "$as_me: error: newly created file is older than distributed files!
1812 Check your system clock" >&2;}
1813    { (exit 1); exit 1; }; }
1814 fi
1815 echo "$as_me:$LINENO: result: yes" >&5
1816 echo "${ECHO_T}yes" >&6
1817 test "$program_prefix" != NONE &&
1818   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1819 # Use a double $ so make ignores it.
1820 test "$program_suffix" != NONE &&
1821   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1822 # Double any \ or $.  echo might interpret backslashes.
1823 # By default was `s,x,x', remove it if useless.
1824 cat <<\_ACEOF >conftest.sed
1825 s/[\\$]/&&/g;s/;s,x,x,$//
1826 _ACEOF
1827 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1828 rm conftest.sed
1829
1830 # expand $ac_aux_dir to an absolute path
1831 am_aux_dir=`cd $ac_aux_dir && pwd`
1832
1833 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
1834 # Use eval to expand $SHELL
1835 if eval "$MISSING --run true"; then
1836   am_missing_run="$MISSING --run "
1837 else
1838   am_missing_run=
1839   { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
1840 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
1841 fi
1842
1843 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
1844   # We used to keeping the `.' as first argument, in order to
1845   # allow $(mkdir_p) to be used without argument.  As in
1846   #   $(mkdir_p) $(somedir)
1847   # where $(somedir) is conditionally defined.  However this is wrong
1848   # for two reasons:
1849   #  1. if the package is installed by a user who cannot write `.'
1850   #     make install will fail,
1851   #  2. the above comment should most certainly read
1852   #     $(mkdir_p) $(DESTDIR)$(somedir)
1853   #     so it does not work when $(somedir) is undefined and
1854   #     $(DESTDIR) is not.
1855   #  To support the latter case, we have to write
1856   #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
1857   #  so the `.' trick is pointless.
1858   mkdir_p='mkdir -p --'
1859 else
1860   # On NextStep and OpenStep, the `mkdir' command does not
1861   # recognize any option.  It will interpret all options as
1862   # directories to create, and then abort because `.' already
1863   # exists.
1864   for d in ./-p ./--version;
1865   do
1866     test -d $d && rmdir $d
1867   done
1868   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
1869   if test -f "$ac_aux_dir/mkinstalldirs"; then
1870     mkdir_p='$(mkinstalldirs)'
1871   else
1872     mkdir_p='$(install_sh) -d'
1873   fi
1874 fi
1875
1876 for ac_prog in gawk mawk nawk awk
1877 do
1878   # Extract the first word of "$ac_prog", so it can be a program name with args.
1879 set dummy $ac_prog; ac_word=$2
1880 echo "$as_me:$LINENO: checking for $ac_word" >&5
1881 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1882 if test "${ac_cv_prog_AWK+set}" = set; then
1883   echo $ECHO_N "(cached) $ECHO_C" >&6
1884 else
1885   if test -n "$AWK"; then
1886   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1887 else
1888 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1889 for as_dir in $PATH
1890 do
1891   IFS=$as_save_IFS
1892   test -z "$as_dir" && as_dir=.
1893   for ac_exec_ext in '' $ac_executable_extensions; do
1894   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1895     ac_cv_prog_AWK="$ac_prog"
1896     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1897     break 2
1898   fi
1899 done
1900 done
1901
1902 fi
1903 fi
1904 AWK=$ac_cv_prog_AWK
1905 if test -n "$AWK"; then
1906   echo "$as_me:$LINENO: result: $AWK" >&5
1907 echo "${ECHO_T}$AWK" >&6
1908 else
1909   echo "$as_me:$LINENO: result: no" >&5
1910 echo "${ECHO_T}no" >&6
1911 fi
1912
1913   test -n "$AWK" && break
1914 done
1915
1916 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
1917 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
1918 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
1919 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1920   echo $ECHO_N "(cached) $ECHO_C" >&6
1921 else
1922   cat >conftest.make <<\_ACEOF
1923 all:
1924         @echo 'ac_maketemp="$(MAKE)"'
1925 _ACEOF
1926 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1927 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1928 if test -n "$ac_maketemp"; then
1929   eval ac_cv_prog_make_${ac_make}_set=yes
1930 else
1931   eval ac_cv_prog_make_${ac_make}_set=no
1932 fi
1933 rm -f conftest.make
1934 fi
1935 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1936   echo "$as_me:$LINENO: result: yes" >&5
1937 echo "${ECHO_T}yes" >&6
1938   SET_MAKE=
1939 else
1940   echo "$as_me:$LINENO: result: no" >&5
1941 echo "${ECHO_T}no" >&6
1942   SET_MAKE="MAKE=${MAKE-make}"
1943 fi
1944
1945 rm -rf .tst 2>/dev/null
1946 mkdir .tst 2>/dev/null
1947 if test -d .tst; then
1948   am__leading_dot=.
1949 else
1950   am__leading_dot=_
1951 fi
1952 rmdir .tst 2>/dev/null
1953
1954 # test to see if srcdir already configured
1955 if test "`cd $srcdir && pwd`" != "`pwd`" &&
1956    test -f $srcdir/config.status; then
1957   { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
1958 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
1959    { (exit 1); exit 1; }; }
1960 fi
1961
1962 # test whether we have cygpath
1963 if test -z "$CYGPATH_W"; then
1964   if (cygpath --version) >/dev/null 2>/dev/null; then
1965     CYGPATH_W='cygpath -w'
1966   else
1967     CYGPATH_W=echo
1968   fi
1969 fi
1970
1971
1972 # Define the identity of the package.
1973  PACKAGE=$OL_PACKAGE
1974  VERSION=$OL_VERSION
1975
1976
1977 # Some tools Automake needs.
1978
1979 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
1980
1981
1982 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
1983
1984
1985 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
1986
1987
1988 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
1989
1990
1991 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
1992
1993 install_sh=${install_sh-"$am_aux_dir/install-sh"}
1994
1995 # Installed binaries are usually stripped using `strip' when the user
1996 # run `make install-strip'.  However `strip' might not be the right
1997 # tool to use in cross-compilation environments, therefore Automake
1998 # will honor the `STRIP' environment variable to overrule this program.
1999 if test "$cross_compiling" != no; then
2000   if test -n "$ac_tool_prefix"; then
2001   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2002 set dummy ${ac_tool_prefix}strip; ac_word=$2
2003 echo "$as_me:$LINENO: checking for $ac_word" >&5
2004 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2005 if test "${ac_cv_prog_STRIP+set}" = set; then
2006   echo $ECHO_N "(cached) $ECHO_C" >&6
2007 else
2008   if test -n "$STRIP"; then
2009   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2010 else
2011 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2012 for as_dir in $PATH
2013 do
2014   IFS=$as_save_IFS
2015   test -z "$as_dir" && as_dir=.
2016   for ac_exec_ext in '' $ac_executable_extensions; do
2017   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2018     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2019     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2020     break 2
2021   fi
2022 done
2023 done
2024
2025 fi
2026 fi
2027 STRIP=$ac_cv_prog_STRIP
2028 if test -n "$STRIP"; then
2029   echo "$as_me:$LINENO: result: $STRIP" >&5
2030 echo "${ECHO_T}$STRIP" >&6
2031 else
2032   echo "$as_me:$LINENO: result: no" >&5
2033 echo "${ECHO_T}no" >&6
2034 fi
2035
2036 fi
2037 if test -z "$ac_cv_prog_STRIP"; then
2038   ac_ct_STRIP=$STRIP
2039   # Extract the first word of "strip", so it can be a program name with args.
2040 set dummy strip; ac_word=$2
2041 echo "$as_me:$LINENO: checking for $ac_word" >&5
2042 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2043 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
2044   echo $ECHO_N "(cached) $ECHO_C" >&6
2045 else
2046   if test -n "$ac_ct_STRIP"; then
2047   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2048 else
2049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2050 for as_dir in $PATH
2051 do
2052   IFS=$as_save_IFS
2053   test -z "$as_dir" && as_dir=.
2054   for ac_exec_ext in '' $ac_executable_extensions; do
2055   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2056     ac_cv_prog_ac_ct_STRIP="strip"
2057     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2058     break 2
2059   fi
2060 done
2061 done
2062
2063   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
2064 fi
2065 fi
2066 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2067 if test -n "$ac_ct_STRIP"; then
2068   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
2069 echo "${ECHO_T}$ac_ct_STRIP" >&6
2070 else
2071   echo "$as_me:$LINENO: result: no" >&5
2072 echo "${ECHO_T}no" >&6
2073 fi
2074
2075   STRIP=$ac_ct_STRIP
2076 else
2077   STRIP="$ac_cv_prog_STRIP"
2078 fi
2079
2080 fi
2081 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
2082
2083 # We need awk for the "check" target.  The system "awk" is bad on
2084 # some platforms.
2085 # Always define AMTAR for backward compatibility.
2086
2087 AMTAR=${AMTAR-"${am_missing_run}tar"}
2088
2089 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
2090
2091
2092
2093
2094
2095 cat >>confdefs.h <<_ACEOF
2096 #define OPENLDAP_PACKAGE "$PACKAGE"
2097 _ACEOF
2098
2099
2100 cat >>confdefs.h <<_ACEOF
2101 #define OPENLDAP_VERSION "$VERSION"
2102 _ACEOF
2103
2104
2105
2106 cat >>confdefs.h <<_ACEOF
2107 #define LDAP_VENDOR_VERSION $OL_API_INC
2108 _ACEOF
2109
2110
2111 cat >>confdefs.h <<_ACEOF
2112 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
2113 _ACEOF
2114
2115
2116 cat >>confdefs.h <<_ACEOF
2117 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
2118 _ACEOF
2119
2120
2121 cat >>confdefs.h <<_ACEOF
2122 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
2123 _ACEOF
2124
2125
2126 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
2127
2128 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
2129
2130 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
2131
2132
2133
2134
2135
2136
2137
2138           ac_config_headers="$ac_config_headers include/portable.h:include/portable.hin"
2139
2140           ac_config_headers="$ac_config_headers include/ldap_features.h:include/ldap_features.hin"
2141
2142           ac_config_headers="$ac_config_headers include/lber_types.h:include/lber_types.hin"
2143
2144
2145 echo "$as_me:$LINENO: checking configure arguments" >&5
2146 echo $ECHO_N "checking configure arguments... $ECHO_C" >&6
2147
2148
2149 top_builddir=`pwd`
2150
2151 ldap_subdir="/openldap"
2152
2153
2154 # Check whether --with-subdir or --without-subdir was given.
2155 if test "${with_subdir+set}" = set; then
2156   withval="$with_subdir"
2157   case "$withval" in
2158         no) ldap_subdir=""
2159                 ;;
2160         yes)
2161                 ;;
2162         /*|\\*)
2163                 ldap_subdir="$withval"
2164                 ;;
2165         *)
2166                 ldap_subdir="/$withval"
2167                 ;;
2168 esac
2169
2170 fi;
2171
2172 # OpenLDAP --enable-debug
2173
2174         # Check whether --enable-debug or --disable-debug was given.
2175 if test "${enable_debug+set}" = set; then
2176   enableval="$enable_debug"
2177
2178         ol_arg=invalid
2179         for ol_val in auto yes no ; do
2180                 if test "$enableval" = "$ol_val" ; then
2181                         ol_arg="$ol_val"
2182                 fi
2183         done
2184         if test "$ol_arg" = "invalid" ; then
2185                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-debug" >&5
2186 echo "$as_me: error: bad value $enableval for --enable-debug" >&2;}
2187    { (exit 1); exit 1; }; }
2188         fi
2189         ol_enable_debug="$ol_arg"
2190
2191 else
2192         ol_enable_debug=yes
2193 fi;
2194 # end --enable-debug
2195 # OpenLDAP --enable-dynamic
2196
2197         # Check whether --enable-dynamic or --disable-dynamic was given.
2198 if test "${enable_dynamic+set}" = set; then
2199   enableval="$enable_dynamic"
2200
2201         ol_arg=invalid
2202         for ol_val in auto yes no ; do
2203                 if test "$enableval" = "$ol_val" ; then
2204                         ol_arg="$ol_val"
2205                 fi
2206         done
2207         if test "$ol_arg" = "invalid" ; then
2208                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dynamic" >&5
2209 echo "$as_me: error: bad value $enableval for --enable-dynamic" >&2;}
2210    { (exit 1); exit 1; }; }
2211         fi
2212         ol_enable_dynamic="$ol_arg"
2213
2214 else
2215         ol_enable_dynamic=no
2216 fi;
2217 # end --enable-dynamic
2218 # OpenLDAP --enable-syslog
2219
2220         # Check whether --enable-syslog or --disable-syslog was given.
2221 if test "${enable_syslog+set}" = set; then
2222   enableval="$enable_syslog"
2223
2224         ol_arg=invalid
2225         for ol_val in auto yes no ; do
2226                 if test "$enableval" = "$ol_val" ; then
2227                         ol_arg="$ol_val"
2228                 fi
2229         done
2230         if test "$ol_arg" = "invalid" ; then
2231                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-syslog" >&5
2232 echo "$as_me: error: bad value $enableval for --enable-syslog" >&2;}
2233    { (exit 1); exit 1; }; }
2234         fi
2235         ol_enable_syslog="$ol_arg"
2236
2237 else
2238         ol_enable_syslog=auto
2239 fi;
2240 # end --enable-syslog
2241 # OpenLDAP --enable-proctitle
2242
2243         # Check whether --enable-proctitle or --disable-proctitle was given.
2244 if test "${enable_proctitle+set}" = set; then
2245   enableval="$enable_proctitle"
2246
2247         ol_arg=invalid
2248         for ol_val in auto yes no ; do
2249                 if test "$enableval" = "$ol_val" ; then
2250                         ol_arg="$ol_val"
2251                 fi
2252         done
2253         if test "$ol_arg" = "invalid" ; then
2254                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-proctitle" >&5
2255 echo "$as_me: error: bad value $enableval for --enable-proctitle" >&2;}
2256    { (exit 1); exit 1; }; }
2257         fi
2258         ol_enable_proctitle="$ol_arg"
2259
2260 else
2261         ol_enable_proctitle=yes
2262 fi;
2263 # end --enable-proctitle
2264 ol_enable_referrals=${ol_enable_referrals-no}
2265 ol_enable_kbind=${ol_enable_kbind-no}
2266 # OpenLDAP --enable-ipv6
2267
2268         # Check whether --enable-ipv6 or --disable-ipv6 was given.
2269 if test "${enable_ipv6+set}" = set; then
2270   enableval="$enable_ipv6"
2271
2272         ol_arg=invalid
2273         for ol_val in auto yes no ; do
2274                 if test "$enableval" = "$ol_val" ; then
2275                         ol_arg="$ol_val"
2276                 fi
2277         done
2278         if test "$ol_arg" = "invalid" ; then
2279                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ipv6" >&5
2280 echo "$as_me: error: bad value $enableval for --enable-ipv6" >&2;}
2281    { (exit 1); exit 1; }; }
2282         fi
2283         ol_enable_ipv6="$ol_arg"
2284
2285 else
2286         ol_enable_ipv6=auto
2287 fi;
2288 # end --enable-ipv6
2289 # OpenLDAP --enable-local
2290
2291         # Check whether --enable-local or --disable-local was given.
2292 if test "${enable_local+set}" = set; then
2293   enableval="$enable_local"
2294
2295         ol_arg=invalid
2296         for ol_val in auto yes no ; do
2297                 if test "$enableval" = "$ol_val" ; then
2298                         ol_arg="$ol_val"
2299                 fi
2300         done
2301         if test "$ol_arg" = "invalid" ; then
2302                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-local" >&5
2303 echo "$as_me: error: bad value $enableval for --enable-local" >&2;}
2304    { (exit 1); exit 1; }; }
2305         fi
2306         ol_enable_local="$ol_arg"
2307
2308 else
2309         ol_enable_local=auto
2310 fi;
2311 # end --enable-local
2312
2313 # OpenLDAP --with-cyrus_sasl
2314
2315 # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
2316 if test "${with_cyrus_sasl+set}" = set; then
2317   withval="$with_cyrus_sasl"
2318
2319         ol_arg=invalid
2320         for ol_val in auto yes no  ; do
2321                 if test "$withval" = "$ol_val" ; then
2322                         ol_arg="$ol_val"
2323                 fi
2324         done
2325         if test "$ol_arg" = "invalid" ; then
2326                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-cyrus_sasl" >&5
2327 echo "$as_me: error: bad value $withval for --with-cyrus_sasl" >&2;}
2328    { (exit 1); exit 1; }; }
2329         fi
2330         ol_with_cyrus_sasl="$ol_arg"
2331
2332 else
2333         ol_with_cyrus_sasl="auto"
2334 fi; # end --with-cyrus_sasl
2335
2336 # OpenLDAP --with-fetch
2337
2338 # Check whether --with-fetch or --without-fetch was given.
2339 if test "${with_fetch+set}" = set; then
2340   withval="$with_fetch"
2341
2342         ol_arg=invalid
2343         for ol_val in auto yes no  ; do
2344                 if test "$withval" = "$ol_val" ; then
2345                         ol_arg="$ol_val"
2346                 fi
2347         done
2348         if test "$ol_arg" = "invalid" ; then
2349                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-fetch" >&5
2350 echo "$as_me: error: bad value $withval for --with-fetch" >&2;}
2351    { (exit 1); exit 1; }; }
2352         fi
2353         ol_with_fetch="$ol_arg"
2354
2355 else
2356         ol_with_fetch="auto"
2357 fi; # end --with-fetch
2358
2359 ol_with_kerberos=${ol_with_kerberos-auto}
2360 # OpenLDAP --with-threads
2361
2362 # Check whether --with-threads or --without-threads was given.
2363 if test "${with_threads+set}" = set; then
2364   withval="$with_threads"
2365
2366         ol_arg=invalid
2367         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
2368                 if test "$withval" = "$ol_val" ; then
2369                         ol_arg="$ol_val"
2370                 fi
2371         done
2372         if test "$ol_arg" = "invalid" ; then
2373                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-threads" >&5
2374 echo "$as_me: error: bad value $withval for --with-threads" >&2;}
2375    { (exit 1); exit 1; }; }
2376         fi
2377         ol_with_threads="$ol_arg"
2378
2379 else
2380         ol_with_threads="auto"
2381 fi; # end --with-threads
2382
2383 # OpenLDAP --with-tls
2384
2385 # Check whether --with-tls or --without-tls was given.
2386 if test "${with_tls+set}" = set; then
2387   withval="$with_tls"
2388
2389         ol_arg=invalid
2390         for ol_val in auto openssl yes no  ; do
2391                 if test "$withval" = "$ol_val" ; then
2392                         ol_arg="$ol_val"
2393                 fi
2394         done
2395         if test "$ol_arg" = "invalid" ; then
2396                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-tls" >&5
2397 echo "$as_me: error: bad value $withval for --with-tls" >&2;}
2398    { (exit 1); exit 1; }; }
2399         fi
2400         ol_with_tls="$ol_arg"
2401
2402 else
2403         ol_with_tls="auto"
2404 fi; # end --with-tls
2405
2406 # OpenLDAP --with-yielding_select
2407
2408 # Check whether --with-yielding_select or --without-yielding_select was given.
2409 if test "${with_yielding_select+set}" = set; then
2410   withval="$with_yielding_select"
2411
2412         ol_arg=invalid
2413         for ol_val in auto yes no manual  ; do
2414                 if test "$withval" = "$ol_val" ; then
2415                         ol_arg="$ol_val"
2416                 fi
2417         done
2418         if test "$ol_arg" = "invalid" ; then
2419                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-yielding_select" >&5
2420 echo "$as_me: error: bad value $withval for --with-yielding_select" >&2;}
2421    { (exit 1); exit 1; }; }
2422         fi
2423         ol_with_yielding_select="$ol_arg"
2424
2425 else
2426         ol_with_yielding_select="auto"
2427 fi; # end --with-yielding_select
2428
2429 # OpenLDAP --with-mp
2430
2431 # Check whether --with-mp or --without-mp was given.
2432 if test "${with_mp+set}" = set; then
2433   withval="$with_mp"
2434
2435         ol_arg=invalid
2436         for ol_val in auto longlong long bignum gmp yes no ; do
2437                 if test "$withval" = "$ol_val" ; then
2438                         ol_arg="$ol_val"
2439                 fi
2440         done
2441         if test "$ol_arg" = "invalid" ; then
2442                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-mp" >&5
2443 echo "$as_me: error: bad value $withval for --with-mp" >&2;}
2444    { (exit 1); exit 1; }; }
2445         fi
2446         ol_with_mp="$ol_arg"
2447
2448 else
2449         ol_with_mp="auto"
2450 fi; # end --with-mp
2451
2452
2453
2454 # Check whether --enable-xxslapdoptions or --disable-xxslapdoptions was given.
2455 if test "${enable_xxslapdoptions+set}" = set; then
2456   enableval="$enable_xxslapdoptions"
2457
2458 fi;
2459 # OpenLDAP --enable-slapd
2460
2461         # Check whether --enable-slapd or --disable-slapd was given.
2462 if test "${enable_slapd+set}" = set; then
2463   enableval="$enable_slapd"
2464
2465         ol_arg=invalid
2466         for ol_val in auto yes no ; do
2467                 if test "$enableval" = "$ol_val" ; then
2468                         ol_arg="$ol_val"
2469                 fi
2470         done
2471         if test "$ol_arg" = "invalid" ; then
2472                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slapd" >&5
2473 echo "$as_me: error: bad value $enableval for --enable-slapd" >&2;}
2474    { (exit 1); exit 1; }; }
2475         fi
2476         ol_enable_slapd="$ol_arg"
2477
2478 else
2479         ol_enable_slapd=yes
2480 fi;
2481 # end --enable-slapd
2482 # OpenLDAP --enable-aci
2483
2484         # Check whether --enable-aci or --disable-aci was given.
2485 if test "${enable_aci+set}" = set; then
2486   enableval="$enable_aci"
2487
2488         ol_arg=invalid
2489         for ol_val in auto yes no ; do
2490                 if test "$enableval" = "$ol_val" ; then
2491                         ol_arg="$ol_val"
2492                 fi
2493         done
2494         if test "$ol_arg" = "invalid" ; then
2495                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-aci" >&5
2496 echo "$as_me: error: bad value $enableval for --enable-aci" >&2;}
2497    { (exit 1); exit 1; }; }
2498         fi
2499         ol_enable_aci="$ol_arg"
2500
2501 else
2502         ol_enable_aci=no
2503 fi;
2504 # end --enable-aci
2505 # OpenLDAP --enable-cleartext
2506
2507         # Check whether --enable-cleartext or --disable-cleartext was given.
2508 if test "${enable_cleartext+set}" = set; then
2509   enableval="$enable_cleartext"
2510
2511         ol_arg=invalid
2512         for ol_val in auto yes no ; do
2513                 if test "$enableval" = "$ol_val" ; then
2514                         ol_arg="$ol_val"
2515                 fi
2516         done
2517         if test "$ol_arg" = "invalid" ; then
2518                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-cleartext" >&5
2519 echo "$as_me: error: bad value $enableval for --enable-cleartext" >&2;}
2520    { (exit 1); exit 1; }; }
2521         fi
2522         ol_enable_cleartext="$ol_arg"
2523
2524 else
2525         ol_enable_cleartext=yes
2526 fi;
2527 # end --enable-cleartext
2528 # OpenLDAP --enable-crypt
2529
2530         # Check whether --enable-crypt or --disable-crypt was given.
2531 if test "${enable_crypt+set}" = set; then
2532   enableval="$enable_crypt"
2533
2534         ol_arg=invalid
2535         for ol_val in auto yes no ; do
2536                 if test "$enableval" = "$ol_val" ; then
2537                         ol_arg="$ol_val"
2538                 fi
2539         done
2540         if test "$ol_arg" = "invalid" ; then
2541                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-crypt" >&5
2542 echo "$as_me: error: bad value $enableval for --enable-crypt" >&2;}
2543    { (exit 1); exit 1; }; }
2544         fi
2545         ol_enable_crypt="$ol_arg"
2546
2547 else
2548         ol_enable_crypt=no
2549 fi;
2550 # end --enable-crypt
2551 # OpenLDAP --enable-lmpasswd
2552
2553         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
2554 if test "${enable_lmpasswd+set}" = set; then
2555   enableval="$enable_lmpasswd"
2556
2557         ol_arg=invalid
2558         for ol_val in auto yes no ; do
2559                 if test "$enableval" = "$ol_val" ; then
2560                         ol_arg="$ol_val"
2561                 fi
2562         done
2563         if test "$ol_arg" = "invalid" ; then
2564                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-lmpasswd" >&5
2565 echo "$as_me: error: bad value $enableval for --enable-lmpasswd" >&2;}
2566    { (exit 1); exit 1; }; }
2567         fi
2568         ol_enable_lmpasswd="$ol_arg"
2569
2570 else
2571         ol_enable_lmpasswd=no
2572 fi;
2573 # end --enable-lmpasswd
2574 # OpenLDAP --enable-spasswd
2575
2576         # Check whether --enable-spasswd or --disable-spasswd was given.
2577 if test "${enable_spasswd+set}" = set; then
2578   enableval="$enable_spasswd"
2579
2580         ol_arg=invalid
2581         for ol_val in auto yes no ; do
2582                 if test "$enableval" = "$ol_val" ; then
2583                         ol_arg="$ol_val"
2584                 fi
2585         done
2586         if test "$ol_arg" = "invalid" ; then
2587                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-spasswd" >&5
2588 echo "$as_me: error: bad value $enableval for --enable-spasswd" >&2;}
2589    { (exit 1); exit 1; }; }
2590         fi
2591         ol_enable_spasswd="$ol_arg"
2592
2593 else
2594         ol_enable_spasswd=no
2595 fi;
2596 # end --enable-spasswd
2597 # OpenLDAP --enable-modules
2598
2599         # Check whether --enable-modules or --disable-modules was given.
2600 if test "${enable_modules+set}" = set; then
2601   enableval="$enable_modules"
2602
2603         ol_arg=invalid
2604         for ol_val in auto yes no ; do
2605                 if test "$enableval" = "$ol_val" ; then
2606                         ol_arg="$ol_val"
2607                 fi
2608         done
2609         if test "$ol_arg" = "invalid" ; then
2610                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-modules" >&5
2611 echo "$as_me: error: bad value $enableval for --enable-modules" >&2;}
2612    { (exit 1); exit 1; }; }
2613         fi
2614         ol_enable_modules="$ol_arg"
2615
2616 else
2617         ol_enable_modules=no
2618 fi;
2619 # end --enable-modules
2620 ol_enable_multimaster=${ol_enable_multimaster-no}
2621 # OpenLDAP --enable-rewrite
2622
2623         # Check whether --enable-rewrite or --disable-rewrite was given.
2624 if test "${enable_rewrite+set}" = set; then
2625   enableval="$enable_rewrite"
2626
2627         ol_arg=invalid
2628         for ol_val in auto yes no ; do
2629                 if test "$enableval" = "$ol_val" ; then
2630                         ol_arg="$ol_val"
2631                 fi
2632         done
2633         if test "$ol_arg" = "invalid" ; then
2634                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rewrite" >&5
2635 echo "$as_me: error: bad value $enableval for --enable-rewrite" >&2;}
2636    { (exit 1); exit 1; }; }
2637         fi
2638         ol_enable_rewrite="$ol_arg"
2639
2640 else
2641         ol_enable_rewrite=auto
2642 fi;
2643 # end --enable-rewrite
2644 # OpenLDAP --enable-rlookups
2645
2646         # Check whether --enable-rlookups or --disable-rlookups was given.
2647 if test "${enable_rlookups+set}" = set; then
2648   enableval="$enable_rlookups"
2649
2650         ol_arg=invalid
2651         for ol_val in auto yes no ; do
2652                 if test "$enableval" = "$ol_val" ; then
2653                         ol_arg="$ol_val"
2654                 fi
2655         done
2656         if test "$ol_arg" = "invalid" ; then
2657                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rlookups" >&5
2658 echo "$as_me: error: bad value $enableval for --enable-rlookups" >&2;}
2659    { (exit 1); exit 1; }; }
2660         fi
2661         ol_enable_rlookups="$ol_arg"
2662
2663 else
2664         ol_enable_rlookups=no
2665 fi;
2666 # end --enable-rlookups
2667 # OpenLDAP --enable-slapi
2668
2669         # Check whether --enable-slapi or --disable-slapi was given.
2670 if test "${enable_slapi+set}" = set; then
2671   enableval="$enable_slapi"
2672
2673         ol_arg=invalid
2674         for ol_val in auto yes no ; do
2675                 if test "$enableval" = "$ol_val" ; then
2676                         ol_arg="$ol_val"
2677                 fi
2678         done
2679         if test "$ol_arg" = "invalid" ; then
2680                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slapi" >&5
2681 echo "$as_me: error: bad value $enableval for --enable-slapi" >&2;}
2682    { (exit 1); exit 1; }; }
2683         fi
2684         ol_enable_slapi="$ol_arg"
2685
2686 else
2687         ol_enable_slapi=no
2688 fi;
2689 # end --enable-slapi
2690 # OpenLDAP --enable-slp
2691
2692         # Check whether --enable-slp or --disable-slp was given.
2693 if test "${enable_slp+set}" = set; then
2694   enableval="$enable_slp"
2695
2696         ol_arg=invalid
2697         for ol_val in auto yes no ; do
2698                 if test "$enableval" = "$ol_val" ; then
2699                         ol_arg="$ol_val"
2700                 fi
2701         done
2702         if test "$ol_arg" = "invalid" ; then
2703                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slp" >&5
2704 echo "$as_me: error: bad value $enableval for --enable-slp" >&2;}
2705    { (exit 1); exit 1; }; }
2706         fi
2707         ol_enable_slp="$ol_arg"
2708
2709 else
2710         ol_enable_slp=no
2711 fi;
2712 # end --enable-slp
2713 # OpenLDAP --enable-wrappers
2714
2715         # Check whether --enable-wrappers or --disable-wrappers was given.
2716 if test "${enable_wrappers+set}" = set; then
2717   enableval="$enable_wrappers"
2718
2719         ol_arg=invalid
2720         for ol_val in auto yes no ; do
2721                 if test "$enableval" = "$ol_val" ; then
2722                         ol_arg="$ol_val"
2723                 fi
2724         done
2725         if test "$ol_arg" = "invalid" ; then
2726                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-wrappers" >&5
2727 echo "$as_me: error: bad value $enableval for --enable-wrappers" >&2;}
2728    { (exit 1); exit 1; }; }
2729         fi
2730         ol_enable_wrappers="$ol_arg"
2731
2732 else
2733         ol_enable_wrappers=no
2734 fi;
2735 # end --enable-wrappers
2736
2737 Backends="bdb \
2738         dnssrv \
2739         hdb \
2740         ldap \
2741         ldbm \
2742         meta \
2743         monitor \
2744         null \
2745         passwd \
2746         perl \
2747         relay \
2748         shell \
2749         sql"
2750
2751 # Check whether --enable-xxslapbackends or --disable-xxslapbackends was given.
2752 if test "${enable_xxslapbackends+set}" = set; then
2753   enableval="$enable_xxslapbackends"
2754
2755 fi;
2756
2757 # OpenLDAP --enable-backends
2758
2759         # Check whether --enable-backends or --disable-backends was given.
2760 if test "${enable_backends+set}" = set; then
2761   enableval="$enable_backends"
2762
2763         ol_arg=invalid
2764         for ol_val in no yes mod ; do
2765                 if test "$enableval" = "$ol_val" ; then
2766                         ol_arg="$ol_val"
2767                 fi
2768         done
2769         if test "$ol_arg" = "invalid" ; then
2770                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-backends" >&5
2771 echo "$as_me: error: bad value $enableval for --enable-backends" >&2;}
2772    { (exit 1); exit 1; }; }
2773         fi
2774         ol_enable_backends="$ol_arg"
2775
2776 fi;
2777 # end --enable-backends
2778 # OpenLDAP --enable-bdb
2779
2780         # Check whether --enable-bdb or --disable-bdb was given.
2781 if test "${enable_bdb+set}" = set; then
2782   enableval="$enable_bdb"
2783
2784         ol_arg=invalid
2785         for ol_val in no yes mod ; do
2786                 if test "$enableval" = "$ol_val" ; then
2787                         ol_arg="$ol_val"
2788                 fi
2789         done
2790         if test "$ol_arg" = "invalid" ; then
2791                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-bdb" >&5
2792 echo "$as_me: error: bad value $enableval for --enable-bdb" >&2;}
2793    { (exit 1); exit 1; }; }
2794         fi
2795         ol_enable_bdb="$ol_arg"
2796
2797 else
2798         ol_enable_bdb=${ol_enable_backends:-yes}
2799 fi;
2800 # end --enable-bdb
2801 # OpenLDAP --enable-dnssrv
2802
2803         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2804 if test "${enable_dnssrv+set}" = set; then
2805   enableval="$enable_dnssrv"
2806
2807         ol_arg=invalid
2808         for ol_val in no yes mod ; do
2809                 if test "$enableval" = "$ol_val" ; then
2810                         ol_arg="$ol_val"
2811                 fi
2812         done
2813         if test "$ol_arg" = "invalid" ; then
2814                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dnssrv" >&5
2815 echo "$as_me: error: bad value $enableval for --enable-dnssrv" >&2;}
2816    { (exit 1); exit 1; }; }
2817         fi
2818         ol_enable_dnssrv="$ol_arg"
2819
2820 else
2821         ol_enable_dnssrv=${ol_enable_backends:-no}
2822 fi;
2823 # end --enable-dnssrv
2824 # OpenLDAP --enable-hdb
2825
2826         # Check whether --enable-hdb or --disable-hdb was given.
2827 if test "${enable_hdb+set}" = set; then
2828   enableval="$enable_hdb"
2829
2830         ol_arg=invalid
2831         for ol_val in no yes mod ; do
2832                 if test "$enableval" = "$ol_val" ; then
2833                         ol_arg="$ol_val"
2834                 fi
2835         done
2836         if test "$ol_arg" = "invalid" ; then
2837                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-hdb" >&5
2838 echo "$as_me: error: bad value $enableval for --enable-hdb" >&2;}
2839    { (exit 1); exit 1; }; }
2840         fi
2841         ol_enable_hdb="$ol_arg"
2842
2843 else
2844         ol_enable_hdb=${ol_enable_backends:-yes}
2845 fi;
2846 # end --enable-hdb
2847 # OpenLDAP --enable-ldap
2848
2849         # Check whether --enable-ldap or --disable-ldap was given.
2850 if test "${enable_ldap+set}" = set; then
2851   enableval="$enable_ldap"
2852
2853         ol_arg=invalid
2854         for ol_val in no yes mod ; do
2855                 if test "$enableval" = "$ol_val" ; then
2856                         ol_arg="$ol_val"
2857                 fi
2858         done
2859         if test "$ol_arg" = "invalid" ; then
2860                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldap" >&5
2861 echo "$as_me: error: bad value $enableval for --enable-ldap" >&2;}
2862    { (exit 1); exit 1; }; }
2863         fi
2864         ol_enable_ldap="$ol_arg"
2865
2866 else
2867         ol_enable_ldap=${ol_enable_backends:-no}
2868 fi;
2869 # end --enable-ldap
2870 # OpenLDAP --enable-ldbm
2871
2872         # Check whether --enable-ldbm or --disable-ldbm was given.
2873 if test "${enable_ldbm+set}" = set; then
2874   enableval="$enable_ldbm"
2875
2876         ol_arg=invalid
2877         for ol_val in no yes mod ; do
2878                 if test "$enableval" = "$ol_val" ; then
2879                         ol_arg="$ol_val"
2880                 fi
2881         done
2882         if test "$ol_arg" = "invalid" ; then
2883                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldbm" >&5
2884 echo "$as_me: error: bad value $enableval for --enable-ldbm" >&2;}
2885    { (exit 1); exit 1; }; }
2886         fi
2887         ol_enable_ldbm="$ol_arg"
2888
2889 else
2890         ol_enable_ldbm=${ol_enable_backends:-no}
2891 fi;
2892 # end --enable-ldbm
2893
2894 # Check whether --with-ldbm_api or --without-ldbm_api was given.
2895 if test "${with_ldbm_api+set}" = set; then
2896   withval="$with_ldbm_api"
2897
2898         { echo "$as_me:$LINENO: WARNING: Please use --enable-ldbm-api instead of --with-ldbm-api" >&5
2899 echo "$as_me: WARNING: Please use --enable-ldbm-api instead of --with-ldbm-api" >&2;}
2900         enable_ldbm_api="$with_ldbm_api"
2901 fi;
2902 # OpenLDAP --enable-ldbm_api
2903
2904         # Check whether --enable-ldbm_api or --disable-ldbm_api was given.
2905 if test "${enable_ldbm_api+set}" = set; then
2906   enableval="$enable_ldbm_api"
2907
2908         ol_arg=invalid
2909         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2910                 if test "$enableval" = "$ol_val" ; then
2911                         ol_arg="$ol_val"
2912                 fi
2913         done
2914         if test "$ol_arg" = "invalid" ; then
2915                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldbm_api" >&5
2916 echo "$as_me: error: bad value $enableval for --enable-ldbm_api" >&2;}
2917    { (exit 1); exit 1; }; }
2918         fi
2919         ol_enable_ldbm_api="$ol_arg"
2920
2921 else
2922         ol_enable_ldbm_api=auto
2923 fi;
2924 # end --enable-ldbm_api
2925
2926
2927 # Check whether --with-ldbm_type or --without-ldbm_type was given.
2928 if test "${with_ldbm_type+set}" = set; then
2929   withval="$with_ldbm_type"
2930
2931         { echo "$as_me:$LINENO: WARNING: Please use --enable-ldbm-type instead of --with-ldbm-type" >&5
2932 echo "$as_me: WARNING: Please use --enable-ldbm-type instead of --with-ldbm-type" >&2;}
2933         enable_ldbm_type="$with_ldbm_type"
2934 fi;
2935 # OpenLDAP --enable-ldbm_type
2936
2937         # Check whether --enable-ldbm_type or --disable-ldbm_type was given.
2938 if test "${enable_ldbm_type+set}" = set; then
2939   enableval="$enable_ldbm_type"
2940
2941         ol_arg=invalid
2942         for ol_val in auto btree hash ; do
2943                 if test "$enableval" = "$ol_val" ; then
2944                         ol_arg="$ol_val"
2945                 fi
2946         done
2947         if test "$ol_arg" = "invalid" ; then
2948                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldbm_type" >&5
2949 echo "$as_me: error: bad value $enableval for --enable-ldbm_type" >&2;}
2950    { (exit 1); exit 1; }; }
2951         fi
2952         ol_enable_ldbm_type="$ol_arg"
2953
2954 else
2955         ol_enable_ldbm_type=auto
2956 fi;
2957 # end --enable-ldbm_type
2958
2959 # OpenLDAP --enable-meta
2960
2961         # Check whether --enable-meta or --disable-meta was given.
2962 if test "${enable_meta+set}" = set; then
2963   enableval="$enable_meta"
2964
2965         ol_arg=invalid
2966         for ol_val in no yes mod ; do
2967                 if test "$enableval" = "$ol_val" ; then
2968                         ol_arg="$ol_val"
2969                 fi
2970         done
2971         if test "$ol_arg" = "invalid" ; then
2972                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-meta" >&5
2973 echo "$as_me: error: bad value $enableval for --enable-meta" >&2;}
2974    { (exit 1); exit 1; }; }
2975         fi
2976         ol_enable_meta="$ol_arg"
2977
2978 else
2979         ol_enable_meta=${ol_enable_backends:-no}
2980 fi;
2981 # end --enable-meta
2982 # OpenLDAP --enable-monitor
2983
2984         # Check whether --enable-monitor or --disable-monitor was given.
2985 if test "${enable_monitor+set}" = set; then
2986   enableval="$enable_monitor"
2987
2988         ol_arg=invalid
2989         for ol_val in no yes mod ; do
2990                 if test "$enableval" = "$ol_val" ; then
2991                         ol_arg="$ol_val"
2992                 fi
2993         done
2994         if test "$ol_arg" = "invalid" ; then
2995                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-monitor" >&5
2996 echo "$as_me: error: bad value $enableval for --enable-monitor" >&2;}
2997    { (exit 1); exit 1; }; }
2998         fi
2999         ol_enable_monitor="$ol_arg"
3000
3001 else
3002         ol_enable_monitor=${ol_enable_backends:-yes}
3003 fi;
3004 # end --enable-monitor
3005 # OpenLDAP --enable-null
3006
3007         # Check whether --enable-null or --disable-null was given.
3008 if test "${enable_null+set}" = set; then
3009   enableval="$enable_null"
3010
3011         ol_arg=invalid
3012         for ol_val in no yes mod ; do
3013                 if test "$enableval" = "$ol_val" ; then
3014                         ol_arg="$ol_val"
3015                 fi
3016         done
3017         if test "$ol_arg" = "invalid" ; then
3018                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-null" >&5
3019 echo "$as_me: error: bad value $enableval for --enable-null" >&2;}
3020    { (exit 1); exit 1; }; }
3021         fi
3022         ol_enable_null="$ol_arg"
3023
3024 else
3025         ol_enable_null=${ol_enable_backends:-no}
3026 fi;
3027 # end --enable-null
3028 # OpenLDAP --enable-passwd
3029
3030         # Check whether --enable-passwd or --disable-passwd was given.
3031 if test "${enable_passwd+set}" = set; then
3032   enableval="$enable_passwd"
3033
3034         ol_arg=invalid
3035         for ol_val in no yes mod ; do
3036                 if test "$enableval" = "$ol_val" ; then
3037                         ol_arg="$ol_val"
3038                 fi
3039         done
3040         if test "$ol_arg" = "invalid" ; then
3041                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-passwd" >&5
3042 echo "$as_me: error: bad value $enableval for --enable-passwd" >&2;}
3043    { (exit 1); exit 1; }; }
3044         fi
3045         ol_enable_passwd="$ol_arg"
3046
3047 else
3048         ol_enable_passwd=${ol_enable_backends:-no}
3049 fi;
3050 # end --enable-passwd
3051 # OpenLDAP --enable-perl
3052
3053         # Check whether --enable-perl or --disable-perl was given.
3054 if test "${enable_perl+set}" = set; then
3055   enableval="$enable_perl"
3056
3057         ol_arg=invalid
3058         for ol_val in no yes mod ; do
3059                 if test "$enableval" = "$ol_val" ; then
3060                         ol_arg="$ol_val"
3061                 fi
3062         done
3063         if test "$ol_arg" = "invalid" ; then
3064                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-perl" >&5
3065 echo "$as_me: error: bad value $enableval for --enable-perl" >&2;}
3066    { (exit 1); exit 1; }; }
3067         fi
3068         ol_enable_perl="$ol_arg"
3069
3070 else
3071         ol_enable_perl=${ol_enable_backends:-no}
3072 fi;
3073 # end --enable-perl
3074 # OpenLDAP --enable-relay
3075
3076         # Check whether --enable-relay or --disable-relay was given.
3077 if test "${enable_relay+set}" = set; then
3078   enableval="$enable_relay"
3079
3080         ol_arg=invalid
3081         for ol_val in no yes mod ; do
3082                 if test "$enableval" = "$ol_val" ; then
3083                         ol_arg="$ol_val"
3084                 fi
3085         done
3086         if test "$ol_arg" = "invalid" ; then
3087                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-relay" >&5
3088 echo "$as_me: error: bad value $enableval for --enable-relay" >&2;}
3089    { (exit 1); exit 1; }; }
3090         fi
3091         ol_enable_relay="$ol_arg"
3092
3093 else
3094         ol_enable_relay=${ol_enable_backends:-yes}
3095 fi;
3096 # end --enable-relay
3097 # OpenLDAP --enable-shell
3098
3099         # Check whether --enable-shell or --disable-shell was given.
3100 if test "${enable_shell+set}" = set; then
3101   enableval="$enable_shell"
3102
3103         ol_arg=invalid
3104         for ol_val in no yes mod ; do
3105                 if test "$enableval" = "$ol_val" ; then
3106                         ol_arg="$ol_val"
3107                 fi
3108         done
3109         if test "$ol_arg" = "invalid" ; then
3110                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-shell" >&5
3111 echo "$as_me: error: bad value $enableval for --enable-shell" >&2;}
3112    { (exit 1); exit 1; }; }
3113         fi
3114         ol_enable_shell="$ol_arg"
3115
3116 else
3117         ol_enable_shell=${ol_enable_backends:-no}
3118 fi;
3119 # end --enable-shell
3120 # OpenLDAP --enable-sql
3121
3122         # Check whether --enable-sql or --disable-sql was given.
3123 if test "${enable_sql+set}" = set; then
3124   enableval="$enable_sql"
3125
3126         ol_arg=invalid
3127         for ol_val in no yes mod ; do
3128                 if test "$enableval" = "$ol_val" ; then
3129                         ol_arg="$ol_val"
3130                 fi
3131         done
3132         if test "$ol_arg" = "invalid" ; then
3133                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-sql" >&5
3134 echo "$as_me: error: bad value $enableval for --enable-sql" >&2;}
3135    { (exit 1); exit 1; }; }
3136         fi
3137         ol_enable_sql="$ol_arg"
3138
3139 else
3140         ol_enable_sql=${ol_enable_backends:-no}
3141 fi;
3142 # end --enable-sql
3143
3144 Overlays="accesslog \
3145         auditlog \
3146         denyop \
3147         dyngroup \
3148         dynlist \
3149         lastmod \
3150         ppolicy \
3151         proxycache \
3152         refint \
3153         retcode \
3154         rwm \
3155         syncprov \
3156         translucent \
3157         unique \
3158         valsort"
3159
3160 # Check whether --enable-xxslapoverlays or --disable-xxslapoverlays was given.
3161 if test "${enable_xxslapoverlays+set}" = set; then
3162   enableval="$enable_xxslapoverlays"
3163
3164 fi;
3165
3166 # OpenLDAP --enable-overlays
3167
3168         # Check whether --enable-overlays or --disable-overlays was given.
3169 if test "${enable_overlays+set}" = set; then
3170   enableval="$enable_overlays"
3171
3172         ol_arg=invalid
3173         for ol_val in no yes mod ; do
3174                 if test "$enableval" = "$ol_val" ; then
3175                         ol_arg="$ol_val"
3176                 fi
3177         done
3178         if test "$ol_arg" = "invalid" ; then
3179                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-overlays" >&5
3180 echo "$as_me: error: bad value $enableval for --enable-overlays" >&2;}
3181    { (exit 1); exit 1; }; }
3182         fi
3183         ol_enable_overlays="$ol_arg"
3184
3185 fi;
3186 # end --enable-overlays
3187 # OpenLDAP --enable-accesslog
3188
3189         # Check whether --enable-accesslog or --disable-accesslog was given.
3190 if test "${enable_accesslog+set}" = set; then
3191   enableval="$enable_accesslog"
3192
3193         ol_arg=invalid
3194         for ol_val in no yes mod ; do
3195                 if test "$enableval" = "$ol_val" ; then
3196                         ol_arg="$ol_val"
3197                 fi
3198         done
3199         if test "$ol_arg" = "invalid" ; then
3200                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-accesslog" >&5
3201 echo "$as_me: error: bad value $enableval for --enable-accesslog" >&2;}
3202    { (exit 1); exit 1; }; }
3203         fi
3204         ol_enable_accesslog="$ol_arg"
3205
3206 else
3207         ol_enable_accesslog=${ol_enable_overlays:-no}
3208 fi;
3209 # end --enable-accesslog
3210
3211 # OpenLDAP --enable-auditlog
3212
3213         # Check whether --enable-auditlog or --disable-auditlog was given.
3214 if test "${enable_auditlog+set}" = set; then
3215   enableval="$enable_auditlog"
3216
3217         ol_arg=invalid
3218         for ol_val in no yes mod ; do
3219                 if test "$enableval" = "$ol_val" ; then
3220                         ol_arg="$ol_val"
3221                 fi
3222         done
3223         if test "$ol_arg" = "invalid" ; then
3224                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-auditlog" >&5
3225 echo "$as_me: error: bad value $enableval for --enable-auditlog" >&2;}
3226    { (exit 1); exit 1; }; }
3227         fi
3228         ol_enable_auditlog="$ol_arg"
3229
3230 else
3231         ol_enable_auditlog=${ol_enable_overlays:-no}
3232 fi;
3233 # end --enable-auditlog
3234
3235 # OpenLDAP --enable-denyop
3236
3237         # Check whether --enable-denyop or --disable-denyop was given.
3238 if test "${enable_denyop+set}" = set; then
3239   enableval="$enable_denyop"
3240
3241         ol_arg=invalid
3242         for ol_val in no yes mod ; do
3243                 if test "$enableval" = "$ol_val" ; then
3244                         ol_arg="$ol_val"
3245                 fi
3246         done
3247         if test "$ol_arg" = "invalid" ; then
3248                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-denyop" >&5
3249 echo "$as_me: error: bad value $enableval for --enable-denyop" >&2;}
3250    { (exit 1); exit 1; }; }
3251         fi
3252         ol_enable_denyop="$ol_arg"
3253
3254 else
3255         ol_enable_denyop=${ol_enable_overlays:-no}
3256 fi;
3257 # end --enable-denyop
3258
3259 # OpenLDAP --enable-dyngroup
3260
3261         # Check whether --enable-dyngroup or --disable-dyngroup was given.
3262 if test "${enable_dyngroup+set}" = set; then
3263   enableval="$enable_dyngroup"
3264
3265         ol_arg=invalid
3266         for ol_val in no yes mod ; do
3267                 if test "$enableval" = "$ol_val" ; then
3268                         ol_arg="$ol_val"
3269                 fi
3270         done
3271         if test "$ol_arg" = "invalid" ; then
3272                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dyngroup" >&5
3273 echo "$as_me: error: bad value $enableval for --enable-dyngroup" >&2;}
3274    { (exit 1); exit 1; }; }
3275         fi
3276         ol_enable_dyngroup="$ol_arg"
3277
3278 else
3279         ol_enable_dyngroup=${ol_enable_overlays:-no}
3280 fi;
3281 # end --enable-dyngroup
3282
3283 # OpenLDAP --enable-dynlist
3284
3285         # Check whether --enable-dynlist or --disable-dynlist was given.
3286 if test "${enable_dynlist+set}" = set; then
3287   enableval="$enable_dynlist"
3288
3289         ol_arg=invalid
3290         for ol_val in no yes mod ; do
3291                 if test "$enableval" = "$ol_val" ; then
3292                         ol_arg="$ol_val"
3293                 fi
3294         done
3295         if test "$ol_arg" = "invalid" ; then
3296                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dynlist" >&5
3297 echo "$as_me: error: bad value $enableval for --enable-dynlist" >&2;}
3298    { (exit 1); exit 1; }; }
3299         fi
3300         ol_enable_dynlist="$ol_arg"
3301
3302 else
3303         ol_enable_dynlist=${ol_enable_overlays:-no}
3304 fi;
3305 # end --enable-dynlist
3306
3307 # OpenLDAP --enable-lastmod
3308
3309         # Check whether --enable-lastmod or --disable-lastmod was given.
3310 if test "${enable_lastmod+set}" = set; then
3311   enableval="$enable_lastmod"
3312
3313         ol_arg=invalid
3314         for ol_val in no yes mod ; do
3315                 if test "$enableval" = "$ol_val" ; then
3316                         ol_arg="$ol_val"
3317                 fi
3318         done
3319         if test "$ol_arg" = "invalid" ; then
3320                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-lastmod" >&5
3321 echo "$as_me: error: bad value $enableval for --enable-lastmod" >&2;}
3322    { (exit 1); exit 1; }; }
3323         fi
3324         ol_enable_lastmod="$ol_arg"
3325
3326 else
3327         ol_enable_lastmod=${ol_enable_overlays:-no}
3328 fi;
3329 # end --enable-lastmod
3330
3331 # OpenLDAP --enable-ppolicy
3332
3333         # Check whether --enable-ppolicy or --disable-ppolicy was given.
3334 if test "${enable_ppolicy+set}" = set; then
3335   enableval="$enable_ppolicy"
3336
3337         ol_arg=invalid
3338         for ol_val in no yes mod ; do
3339                 if test "$enableval" = "$ol_val" ; then
3340                         ol_arg="$ol_val"
3341                 fi
3342         done
3343         if test "$ol_arg" = "invalid" ; then
3344                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ppolicy" >&5
3345 echo "$as_me: error: bad value $enableval for --enable-ppolicy" >&2;}
3346    { (exit 1); exit 1; }; }
3347         fi
3348         ol_enable_ppolicy="$ol_arg"
3349
3350 else
3351         ol_enable_ppolicy=${ol_enable_overlays:-no}
3352 fi;
3353 # end --enable-ppolicy
3354
3355 # OpenLDAP --enable-proxycache
3356
3357         # Check whether --enable-proxycache or --disable-proxycache was given.
3358 if test "${enable_proxycache+set}" = set; then
3359   enableval="$enable_proxycache"
3360
3361         ol_arg=invalid
3362         for ol_val in no yes mod ; do
3363                 if test "$enableval" = "$ol_val" ; then
3364                         ol_arg="$ol_val"
3365                 fi
3366         done
3367         if test "$ol_arg" = "invalid" ; then
3368                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-proxycache" >&5
3369 echo "$as_me: error: bad value $enableval for --enable-proxycache" >&2;}
3370    { (exit 1); exit 1; }; }
3371         fi
3372         ol_enable_proxycache="$ol_arg"
3373
3374 else
3375         ol_enable_proxycache=${ol_enable_overlays:-no}
3376 fi;
3377 # end --enable-proxycache
3378
3379 # OpenLDAP --enable-refint
3380
3381         # Check whether --enable-refint or --disable-refint was given.
3382 if test "${enable_refint+set}" = set; then
3383   enableval="$enable_refint"
3384
3385         ol_arg=invalid
3386         for ol_val in no yes mod ; do
3387                 if test "$enableval" = "$ol_val" ; then
3388                         ol_arg="$ol_val"
3389                 fi
3390         done
3391         if test "$ol_arg" = "invalid" ; then
3392                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-refint" >&5
3393 echo "$as_me: error: bad value $enableval for --enable-refint" >&2;}
3394    { (exit 1); exit 1; }; }
3395         fi
3396         ol_enable_refint="$ol_arg"
3397
3398 else
3399         ol_enable_refint=${ol_enable_overlays:-no}
3400 fi;
3401 # end --enable-refint
3402
3403 # OpenLDAP --enable-retcode
3404
3405         # Check whether --enable-retcode or --disable-retcode was given.
3406 if test "${enable_retcode+set}" = set; then
3407   enableval="$enable_retcode"
3408
3409         ol_arg=invalid
3410         for ol_val in no yes mod ; do
3411                 if test "$enableval" = "$ol_val" ; then
3412                         ol_arg="$ol_val"
3413                 fi
3414         done
3415         if test "$ol_arg" = "invalid" ; then
3416                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-retcode" >&5
3417 echo "$as_me: error: bad value $enableval for --enable-retcode" >&2;}
3418    { (exit 1); exit 1; }; }
3419         fi
3420         ol_enable_retcode="$ol_arg"
3421
3422 else
3423         ol_enable_retcode=${ol_enable_overlays:-no}
3424 fi;
3425 # end --enable-retcode
3426
3427 # OpenLDAP --enable-rwm
3428
3429         # Check whether --enable-rwm or --disable-rwm was given.
3430 if test "${enable_rwm+set}" = set; then
3431   enableval="$enable_rwm"
3432
3433         ol_arg=invalid
3434         for ol_val in no yes mod ; do
3435                 if test "$enableval" = "$ol_val" ; then
3436                         ol_arg="$ol_val"
3437                 fi
3438         done
3439         if test "$ol_arg" = "invalid" ; then
3440                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rwm" >&5
3441 echo "$as_me: error: bad value $enableval for --enable-rwm" >&2;}
3442    { (exit 1); exit 1; }; }
3443         fi
3444         ol_enable_rwm="$ol_arg"
3445
3446 else
3447         ol_enable_rwm=${ol_enable_overlays:-no}
3448 fi;
3449 # end --enable-rwm
3450
3451 # OpenLDAP --enable-syncprov
3452
3453         # Check whether --enable-syncprov or --disable-syncprov was given.
3454 if test "${enable_syncprov+set}" = set; then
3455   enableval="$enable_syncprov"
3456
3457         ol_arg=invalid
3458         for ol_val in no yes mod ; do
3459                 if test "$enableval" = "$ol_val" ; then
3460                         ol_arg="$ol_val"
3461                 fi
3462         done
3463         if test "$ol_arg" = "invalid" ; then
3464                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-syncprov" >&5
3465 echo "$as_me: error: bad value $enableval for --enable-syncprov" >&2;}
3466    { (exit 1); exit 1; }; }
3467         fi
3468         ol_enable_syncprov="$ol_arg"
3469
3470 else
3471         ol_enable_syncprov=${ol_enable_overlays:-yes}
3472 fi;
3473 # end --enable-syncprov
3474
3475 # OpenLDAP --enable-translucent
3476
3477         # Check whether --enable-translucent or --disable-translucent was given.
3478 if test "${enable_translucent+set}" = set; then
3479   enableval="$enable_translucent"
3480
3481         ol_arg=invalid
3482         for ol_val in no yes mod ; do
3483                 if test "$enableval" = "$ol_val" ; then
3484                         ol_arg="$ol_val"
3485                 fi
3486         done
3487         if test "$ol_arg" = "invalid" ; then
3488                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-translucent" >&5
3489 echo "$as_me: error: bad value $enableval for --enable-translucent" >&2;}
3490    { (exit 1); exit 1; }; }
3491         fi
3492         ol_enable_translucent="$ol_arg"
3493
3494 else
3495         ol_enable_translucent=${ol_enable_overlays:-no}
3496 fi;
3497 # end --enable-translucent
3498
3499 # OpenLDAP --enable-unique
3500
3501         # Check whether --enable-unique or --disable-unique was given.
3502 if test "${enable_unique+set}" = set; then
3503   enableval="$enable_unique"
3504
3505         ol_arg=invalid
3506         for ol_val in no yes mod ; do
3507                 if test "$enableval" = "$ol_val" ; then
3508                         ol_arg="$ol_val"
3509                 fi
3510         done
3511         if test "$ol_arg" = "invalid" ; then
3512                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-unique" >&5
3513 echo "$as_me: error: bad value $enableval for --enable-unique" >&2;}
3514    { (exit 1); exit 1; }; }
3515         fi
3516         ol_enable_unique="$ol_arg"
3517
3518 else
3519         ol_enable_unique=${ol_enable_overlays:-no}
3520 fi;
3521 # end --enable-unique
3522
3523 # OpenLDAP --enable-valsort
3524
3525         # Check whether --enable-valsort or --disable-valsort was given.
3526 if test "${enable_valsort+set}" = set; then
3527   enableval="$enable_valsort"
3528
3529         ol_arg=invalid
3530         for ol_val in no yes mod ; do
3531                 if test "$enableval" = "$ol_val" ; then
3532                         ol_arg="$ol_val"
3533                 fi
3534         done
3535         if test "$ol_arg" = "invalid" ; then
3536                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-valsort" >&5
3537 echo "$as_me: error: bad value $enableval for --enable-valsort" >&2;}
3538    { (exit 1); exit 1; }; }
3539         fi
3540         ol_enable_valsort="$ol_arg"
3541
3542 else
3543         ol_enable_valsort=${ol_enable_overlays:-no}
3544 fi;
3545 # end --enable-valsort
3546
3547
3548 # Check whether --enable-xxslurpdoptions or --disable-xxslurpdoptions was given.
3549 if test "${enable_xxslurpdoptions+set}" = set; then
3550   enableval="$enable_xxslurpdoptions"
3551
3552 fi;
3553 # OpenLDAP --enable-slurpd
3554
3555         # Check whether --enable-slurpd or --disable-slurpd was given.
3556 if test "${enable_slurpd+set}" = set; then
3557   enableval="$enable_slurpd"
3558
3559         ol_arg=invalid
3560         for ol_val in auto yes no ; do
3561                 if test "$enableval" = "$ol_val" ; then
3562                         ol_arg="$ol_val"
3563                 fi
3564         done
3565         if test "$ol_arg" = "invalid" ; then
3566                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slurpd" >&5
3567 echo "$as_me: error: bad value $enableval for --enable-slurpd" >&2;}
3568    { (exit 1); exit 1; }; }
3569         fi
3570         ol_enable_slurpd="$ol_arg"
3571
3572 else
3573         ol_enable_slurpd=auto
3574 fi;
3575 # end --enable-slurpd
3576
3577 # Check whether --enable-xxliboptions or --disable-xxliboptions was given.
3578 if test "${enable_xxliboptions+set}" = set; then
3579   enableval="$enable_xxliboptions"
3580
3581 fi;
3582 # Check whether --enable-static or --disable-static was given.
3583 if test "${enable_static+set}" = set; then
3584   enableval="$enable_static"
3585   p=${PACKAGE-default}
3586     case $enableval in
3587     yes) enable_static=yes ;;
3588     no) enable_static=no ;;
3589     *)
3590      enable_static=no
3591       # Look at the argument we got.  We use all the common list separators.
3592       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3593       for pkg in $enableval; do
3594         IFS="$lt_save_ifs"
3595         if test "X$pkg" = "X$p"; then
3596           enable_static=yes
3597         fi
3598       done
3599       IFS="$lt_save_ifs"
3600       ;;
3601     esac
3602 else
3603   enable_static=yes
3604 fi;
3605
3606 # Check whether --enable-shared or --disable-shared was given.
3607 if test "${enable_shared+set}" = set; then
3608   enableval="$enable_shared"
3609   p=${PACKAGE-default}
3610     case $enableval in
3611     yes) enable_shared=yes ;;
3612     no) enable_shared=no ;;
3613     *)
3614       enable_shared=no
3615       # Look at the argument we got.  We use all the common list separators.
3616       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3617       for pkg in $enableval; do
3618         IFS="$lt_save_ifs"
3619         if test "X$pkg" = "X$p"; then
3620           enable_shared=yes
3621         fi
3622       done
3623       IFS="$lt_save_ifs"
3624       ;;
3625     esac
3626 else
3627   enable_shared=yes
3628 fi;
3629
3630
3631
3632 # validate options
3633 if test $ol_enable_slapd = no ; then
3634                 if test $ol_enable_slapi = yes ; then
3635                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-slapi argument" >&5
3636 echo "$as_me: WARNING: slapd disabled, ignoring --enable-slapi argument" >&2;}
3637         fi
3638         case "$ol_enable_backends" in yes | mod)
3639                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-backends argument" >&5
3640 echo "$as_me: WARNING: slapd disabled, ignoring --enable-backends argument" >&2;}
3641         esac
3642         for i in $Backends; do
3643                 eval "ol_tmp=\$ol_enable_$i"
3644                 if test $ol_tmp != no ; then
3645                         { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
3646 echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
3647                         eval "ol_enable_$i=no"
3648                 fi
3649         done
3650         if test $ol_enable_modules = yes ; then
3651                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-modules argument" >&5
3652 echo "$as_me: WARNING: slapd disabled, ignoring --enable-modules argument" >&2;}
3653         fi
3654         if test $ol_enable_multimaster = yes ; then
3655                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-multimaster argument" >&5
3656 echo "$as_me: WARNING: slapd disabled, ignoring --enable-multimaster argument" >&2;}
3657         fi
3658         if test $ol_enable_wrappers = yes ; then
3659                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&5
3660 echo "$as_me: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&2;}
3661         fi
3662         if test $ol_enable_rlookups = yes ; then
3663                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&5
3664 echo "$as_me: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&2;}
3665         fi
3666         if test $ol_enable_aci = yes ; then
3667                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-aci argument" >&5
3668 echo "$as_me: WARNING: slapd disabled, ignoring --enable-aci argument" >&2;}
3669         fi
3670         if test $ol_enable_ldbm_api != auto ; then
3671                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-ldbm-api argument" >&5
3672 echo "$as_me: WARNING: slapd disabled, ignoring --enable-ldbm-api argument" >&2;}
3673         fi
3674         if test $ol_enable_ldbm_type != auto ; then
3675                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-ldbm-type argument" >&5
3676 echo "$as_me: WARNING: slapd disabled, ignoring --enable-ldbm-type argument" >&2;}
3677         fi
3678         if test $ol_enable_slurpd = yes ; then
3679                 { { echo "$as_me:$LINENO: error: slurpd requires slapd" >&5
3680 echo "$as_me: error: slurpd requires slapd" >&2;}
3681    { (exit 1); exit 1; }; }
3682         fi
3683         if test $ol_enable_rewrite = yes ; then
3684                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&5
3685 echo "$as_me: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&2;}
3686         fi
3687                 case "$ol_enable_overlays" in yes | mod)
3688                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-overlays argument" >&5
3689 echo "$as_me: WARNING: slapd disabled, ignoring --enable-overlays argument" >&2;}
3690         esac
3691         for i in $Overlays; do
3692                 eval "ol_tmp=\$ol_enable_$i"
3693                 if test $ol_tmp != no ; then
3694                         { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
3695 echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
3696                         eval "ol_enable_$i=no"
3697                 fi
3698         done
3699
3700         # force settings to no
3701         ol_enable_slapi=no
3702
3703         ol_enable_backends=
3704         ol_enable_overlays=
3705         ol_enable_modules=no
3706         ol_enable_multimaster=no
3707         ol_enable_rlookups=no
3708         ol_enable_aci=no
3709         ol_enable_wrappers=no
3710
3711         ol_enable_ldbm_api=no
3712         ol_enable_ldbm_type=no
3713
3714         ol_enable_slurpd=no
3715
3716         ol_enable_rewrite=no
3717
3718 elif test $ol_enable_ldbm = no ; then
3719
3720         if test $ol_enable_ldbm_api != auto ; then
3721                 { echo "$as_me:$LINENO: WARNING: LDBM disabled, ignoring --enable-ldbm-api argument" >&5
3722 echo "$as_me: WARNING: LDBM disabled, ignoring --enable-ldbm-api argument" >&2;}
3723         fi
3724
3725         if test $ol_enable_ldbm_type != auto ; then
3726                 { echo "$as_me:$LINENO: WARNING: LDBM disabled, ignoring --enable-ldbm-type argument" >&5
3727 echo "$as_me: WARNING: LDBM disabled, ignoring --enable-ldbm-type argument" >&2;}
3728         fi
3729
3730         if test $ol_enable_modules != yes &&
3731            test $ol_enable_bdb = no &&
3732            test $ol_enable_dnssrv = no &&
3733            test $ol_enable_hdb = no &&
3734            test $ol_enable_ldap = no &&
3735            test $ol_enable_meta = no &&
3736            test $ol_enable_monitor = no &&
3737            test $ol_enable_null = no &&
3738            test $ol_enable_passwd = no &&
3739            test $ol_enable_perl = no &&
3740            test $ol_enable_relay = no &&
3741            test $ol_enable_shell = no &&
3742            test $ol_enable_sql = no ; then
3743
3744                 if test $ol_enable_slapd = yes ; then
3745                         { { echo "$as_me:$LINENO: error: slapd requires a backend" >&5
3746 echo "$as_me: error: slapd requires a backend" >&2;}
3747    { (exit 1); exit 1; }; }
3748                 else
3749                         { echo "$as_me:$LINENO: WARNING: skipping slapd, no backend specified" >&5
3750 echo "$as_me: WARNING: skipping slapd, no backend specified" >&2;}
3751                         ol_enable_slapd=no
3752                 fi
3753         fi
3754
3755         ol_enable_ldbm_api=no
3756         ol_enable_ldbm_type=no
3757
3758         if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
3759                 ol_enable_ldbm_api=berkeley
3760         fi
3761
3762 else
3763                 if test $ol_enable_ldbm_api = gdbm &&
3764            test $ol_enable_ldbm_type = btree ; then
3765                 { { echo "$as_me:$LINENO: error: GDBM only supports LDBM type hash" >&5
3766 echo "$as_me: error: GDBM only supports LDBM type hash" >&2;}
3767    { (exit 1); exit 1; }; }
3768         fi
3769         if test $ol_enable_ldbm_api = mdbm &&
3770            test $ol_enable_ldbm_type = btree ; then
3771                 { { echo "$as_me:$LINENO: error: MDBM only supports LDBM type hash" >&5
3772 echo "$as_me: error: MDBM only supports LDBM type hash" >&2;}
3773    { (exit 1); exit 1; }; }
3774         fi
3775         if test $ol_enable_ldbm_api = ndbm &&
3776            test $ol_enable_ldbm_type = btree ; then
3777                 { { echo "$as_me:$LINENO: error: NDBM only supports LDBM type hash" >&5
3778 echo "$as_me: error: NDBM only supports LDBM type hash" >&2;}
3779    { (exit 1); exit 1; }; }
3780         fi
3781
3782         if test $ol_enable_bdb/$ol_enable_hdb != no/no ; then
3783                 if test $ol_enable_ldbm_api = auto ; then
3784                         ol_enable_ldbm_api=berkeley
3785                 elif test $ol_enable_ldbm_api != berkeley ; then
3786                         { { echo "$as_me:$LINENO: error: LDBM API not compatible with BDB/HDB" >&5
3787 echo "$as_me: error: LDBM API not compatible with BDB/HDB" >&2;}
3788    { (exit 1); exit 1; }; }
3789                 fi
3790         fi
3791 fi
3792
3793 if test $ol_enable_meta/$ol_enable_ldap = yes/no ; then
3794         { { echo "$as_me:$LINENO: error: --enable-meta requires --enable-ldap" >&5
3795 echo "$as_me: error: --enable-meta requires --enable-ldap" >&2;}
3796    { (exit 1); exit 1; }; }
3797 fi
3798
3799 if test $ol_enable_slurpd = yes ; then
3800                 if test $ol_with_threads = no ; then
3801                 { { echo "$as_me:$LINENO: error: slurpd requires threads" >&5
3802 echo "$as_me: error: slurpd requires threads" >&2;}
3803    { (exit 1); exit 1; }; }
3804         fi
3805 fi
3806
3807 if test $ol_enable_lmpasswd = yes ; then
3808         if test $ol_with_tls = no ; then
3809                 { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5
3810 echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;}
3811    { (exit 1); exit 1; }; }
3812         fi
3813 fi
3814
3815 if test $ol_enable_kbind = yes ; then
3816         if test $ol_with_kerberos = no ; then
3817                 { { echo "$as_me:$LINENO: error: options require --with-kerberos" >&5
3818 echo "$as_me: error: options require --with-kerberos" >&2;}
3819    { (exit 1); exit 1; }; }
3820         elif test $ol_with_kerberos = auto ; then
3821                 ol_with_kerberos=yes
3822         fi
3823
3824 elif test $ol_enable_kbind = no ; then
3825         if test $ol_with_kerberos = auto ; then
3826                 ol_with_kerberos=no
3827         elif test $ol_with_kerberos != no ; then
3828                 { echo "$as_me:$LINENO: WARNING: Kerberos detection enabled unnecessarily" >&5
3829 echo "$as_me: WARNING: Kerberos detection enabled unnecessarily" >&2;};
3830                 ol_with_kerberos=no
3831         fi
3832 fi
3833
3834 if test $ol_enable_spasswd = yes ; then
3835         if test $ol_with_cyrus_sasl = no ; then
3836                 { { echo "$as_me:$LINENO: error: options require --with-cyrus-sasl" >&5
3837 echo "$as_me: error: options require --with-cyrus-sasl" >&2;}
3838    { (exit 1); exit 1; }; }
3839         fi
3840         ol_with_cyrus_sasl=yes
3841 fi
3842
3843 echo "$as_me:$LINENO: result: done" >&5
3844 echo "${ECHO_T}done" >&6
3845
3846 LDAP_LIBS=
3847 LDBM_LIBS=
3848 LTHREAD_LIBS=
3849 LUTIL_LIBS=
3850
3851 SLAPD_LIBS=
3852 SLURPD_LIBS=
3853
3854 BUILD_SLAPD=no
3855 BUILD_SLURPD=no
3856
3857 BUILD_THREAD=no
3858
3859 BUILD_SLAPI=no
3860 SLAPD_SLAPI_DEPEND=
3861
3862 BUILD_BDB=no
3863 BUILD_DNSSRV=no
3864 BUILD_HDB=no
3865 BUILD_LDAP=no
3866 BUILD_LDBM=no
3867 BUILD_META=no
3868 BUILD_MONITOR=no
3869 BUILD_NULL=no
3870 BUILD_PASSWD=no
3871 BUILD_PERL=no
3872 BUILD_RELAY=no
3873 BUILD_SHELL=no
3874 BUILD_SQL=no
3875
3876 BUILD_ACCESSLOG=no
3877 BUILD_AUDITLOG=no
3878 BUILD_DENYOP=no
3879 BUILD_DYNGROUP=no
3880 BUILD_DYNLIST=no
3881 BUILD_LASTMOD=no
3882 BUILD_PPOLICY=no
3883 BUILD_PROXYCACHE=no
3884 BUILD_REFINT=no
3885 BUILD_RETCODE=no
3886 BUILD_RWM=no
3887 BUILD_SYNCPROV=no
3888 BUILD_TRANSLUCENT=no
3889 BUILD_UNIQUE=no
3890 BUILD_VALSORT=no
3891
3892 SLAPD_STATIC_OVERLAYS=
3893 SLAPD_DYNAMIC_OVERLAYS=
3894
3895 SLAPD_MODULES_LDFLAGS=
3896 SLAPD_MODULES_CPPFLAGS=
3897
3898 SLAPD_STATIC_BACKENDS=back-ldif
3899 SLAPD_DYNAMIC_BACKENDS=
3900
3901 SLAPD_PERL_LDFLAGS=
3902 MOD_PERL_LDFLAGS=
3903 PERL_CPPFLAGS=
3904
3905 SLAPD_SQL_LDFLAGS=
3906 SLAPD_SQL_LIBS=
3907 SLAPD_SQL_INCLUDES=
3908
3909 KRB4_LIBS=
3910 KRB5_LIBS=
3911 SASL_LIBS=
3912 TLS_LIBS=
3913 MODULES_LIBS=
3914 SLAPI_LIBS=
3915 LIBSLAPI=
3916 LIBSLAPITOOLS=
3917 AUTH_LIBS=
3918
3919 SLAPD_SLP_LIBS=
3920 SLAPD_GMP_LIBS=
3921
3922
3923
3924 cat >>confdefs.h <<\_ACEOF
3925 #define HAVE_MKVERSION 1
3926 _ACEOF
3927
3928
3929
3930
3931 ol_aix_threads=no
3932 case "$target" in
3933 *-*-aix*)       if test -z "$CC" ; then
3934                 case "$ol_with_threads" in
3935                 auto | yes |  posix) ol_aix_threads=yes ;;
3936                 esac
3937         fi
3938 ;;
3939 esac
3940
3941 if test $ol_aix_threads = yes ; then
3942         if test -z "${CC}" ; then
3943                 for ac_prog in cc_r xlc_r cc
3944 do
3945   # Extract the first word of "$ac_prog", so it can be a program name with args.
3946 set dummy $ac_prog; ac_word=$2
3947 echo "$as_me:$LINENO: checking for $ac_word" >&5
3948 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3949 if test "${ac_cv_prog_CC+set}" = set; then
3950   echo $ECHO_N "(cached) $ECHO_C" >&6
3951 else
3952   if test -n "$CC"; then
3953   ac_cv_prog_CC="$CC" # Let the user override the test.
3954 else
3955 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3956 for as_dir in $PATH
3957 do
3958   IFS=$as_save_IFS
3959   test -z "$as_dir" && as_dir=.
3960   for ac_exec_ext in '' $ac_executable_extensions; do
3961   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3962     ac_cv_prog_CC="$ac_prog"
3963     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3964     break 2
3965   fi
3966 done
3967 done
3968
3969 fi
3970 fi
3971 CC=$ac_cv_prog_CC
3972 if test -n "$CC"; then
3973   echo "$as_me:$LINENO: result: $CC" >&5
3974 echo "${ECHO_T}$CC" >&6
3975 else
3976   echo "$as_me:$LINENO: result: no" >&5
3977 echo "${ECHO_T}no" >&6
3978 fi
3979
3980   test -n "$CC" && break
3981 done
3982
3983
3984                 if test "$CC" = cc ; then
3985                                                 if test $ol_with_threads != auto ; then
3986                                 { { echo "$as_me:$LINENO: error: --with-threads requires cc_r (or other suitable compiler) on AIX" >&5
3987 echo "$as_me: error: --with-threads requires cc_r (or other suitable compiler) on AIX" >&2;}
3988    { (exit 1); exit 1; }; }
3989                         else
3990                                 { echo "$as_me:$LINENO: WARNING: disabling threads, no cc_r on AIX" >&5
3991 echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
3992                         fi
3993                         ol_with_threads=no
3994                 fi
3995         fi
3996
3997         case ${CC} in cc_r | xlc_r)
3998                 ol_with_threads=posix
3999                 ol_cv_pthread_create=yes
4000                 ;;
4001         esac
4002 fi
4003
4004 if test -z "${CC}"; then
4005         for ac_prog in cc gcc
4006 do
4007   # Extract the first word of "$ac_prog", so it can be a program name with args.
4008 set dummy $ac_prog; ac_word=$2
4009 echo "$as_me:$LINENO: checking for $ac_word" >&5
4010 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4011 if test "${ac_cv_prog_CC+set}" = set; then
4012   echo $ECHO_N "(cached) $ECHO_C" >&6
4013 else
4014   if test -n "$CC"; then
4015   ac_cv_prog_CC="$CC" # Let the user override the test.
4016 else
4017 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4018 for as_dir in $PATH
4019 do
4020   IFS=$as_save_IFS
4021   test -z "$as_dir" && as_dir=.
4022   for ac_exec_ext in '' $ac_executable_extensions; do
4023   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4024     ac_cv_prog_CC="$ac_prog"
4025     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4026     break 2
4027   fi
4028 done
4029 done
4030
4031 fi
4032 fi
4033 CC=$ac_cv_prog_CC
4034 if test -n "$CC"; then
4035   echo "$as_me:$LINENO: result: $CC" >&5
4036 echo "${ECHO_T}$CC" >&6
4037 else
4038   echo "$as_me:$LINENO: result: no" >&5
4039 echo "${ECHO_T}no" >&6
4040 fi
4041
4042   test -n "$CC" && break
4043 done
4044 test -n "$CC" || CC="missing"
4045
4046
4047         if test "${CC}" = "missing" ; then
4048                 { { echo "$as_me:$LINENO: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." >&5
4049 echo "$as_me: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." >&2;}
4050    { (exit 1); exit 1; }; }
4051         fi
4052 fi
4053
4054 if test -z "${AR}"; then
4055         for ac_prog in ar gar
4056 do
4057   # Extract the first word of "$ac_prog", so it can be a program name with args.
4058 set dummy $ac_prog; ac_word=$2
4059 echo "$as_me:$LINENO: checking for $ac_word" >&5
4060 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4061 if test "${ac_cv_prog_AR+set}" = set; then
4062   echo $ECHO_N "(cached) $ECHO_C" >&6
4063 else
4064   if test -n "$AR"; then
4065   ac_cv_prog_AR="$AR" # Let the user override the test.
4066 else
4067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4068 for as_dir in $PATH
4069 do
4070   IFS=$as_save_IFS
4071   test -z "$as_dir" && as_dir=.
4072   for ac_exec_ext in '' $ac_executable_extensions; do
4073   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4074     ac_cv_prog_AR="$ac_prog"
4075     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4076     break 2
4077   fi
4078 done
4079 done
4080
4081 fi
4082 fi
4083 AR=$ac_cv_prog_AR
4084 if test -n "$AR"; then
4085   echo "$as_me:$LINENO: result: $AR" >&5
4086 echo "${ECHO_T}$AR" >&6
4087 else
4088   echo "$as_me:$LINENO: result: no" >&5
4089 echo "${ECHO_T}no" >&6
4090 fi
4091
4092   test -n "$AR" && break
4093 done
4094 test -n "$AR" || AR="missing"
4095
4096
4097         if test "${AR}" = "missing" ; then
4098                 { { echo "$as_me:$LINENO: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." >&5
4099 echo "$as_me: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." >&2;}
4100    { (exit 1); exit 1; }; }
4101         fi
4102 fi
4103
4104
4105
4106
4107
4108 # Check whether --enable-fast-install or --disable-fast-install was given.
4109 if test "${enable_fast_install+set}" = set; then
4110   enableval="$enable_fast_install"
4111   p=${PACKAGE-default}
4112     case $enableval in
4113     yes) enable_fast_install=yes ;;
4114     no) enable_fast_install=no ;;
4115     *)
4116       enable_fast_install=no
4117       # Look at the argument we got.  We use all the common list separators.
4118       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4119       for pkg in $enableval; do
4120         IFS="$lt_save_ifs"
4121         if test "X$pkg" = "X$p"; then
4122           enable_fast_install=yes
4123         fi
4124       done
4125       IFS="$lt_save_ifs"
4126       ;;
4127     esac
4128 else
4129   enable_fast_install=yes
4130 fi;
4131
4132 DEPDIR="${am__leading_dot}deps"
4133
4134           ac_config_commands="$ac_config_commands depfiles"
4135
4136
4137 am_make=${MAKE-make}
4138 cat > confinc << 'END'
4139 am__doit:
4140         @echo done
4141 .PHONY: am__doit
4142 END
4143 # If we don't find an include directive, just comment out the code.
4144 echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
4145 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
4146 am__include="#"
4147 am__quote=
4148 _am_result=none
4149 # First try GNU make style include.
4150 echo "include confinc" > confmf
4151 # We grep out `Entering directory' and `Leaving directory'
4152 # messages which can occur if `w' ends up in MAKEFLAGS.
4153 # In particular we don't look at `^make:' because GNU make might
4154 # be invoked under some other name (usually "gmake"), in which
4155 # case it prints its new name instead of `make'.
4156 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
4157    am__include=include
4158    am__quote=
4159    _am_result=GNU
4160 fi
4161 # Now try BSD make style include.
4162 if test "$am__include" = "#"; then
4163    echo '.include "confinc"' > confmf
4164    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
4165       am__include=.include
4166       am__quote="\""
4167       _am_result=BSD
4168    fi
4169 fi
4170
4171
4172 echo "$as_me:$LINENO: result: $_am_result" >&5
4173 echo "${ECHO_T}$_am_result" >&6
4174 rm -f confinc confmf
4175
4176 # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
4177 if test "${enable_dependency_tracking+set}" = set; then
4178   enableval="$enable_dependency_tracking"
4179
4180 fi;
4181 if test "x$enable_dependency_tracking" != xno; then
4182   am_depcomp="$ac_aux_dir/depcomp"
4183   AMDEPBACKSLASH='\'
4184 fi
4185
4186
4187 if test "x$enable_dependency_tracking" != xno; then
4188   AMDEP_TRUE=
4189   AMDEP_FALSE='#'
4190 else
4191   AMDEP_TRUE='#'
4192   AMDEP_FALSE=
4193 fi
4194
4195
4196
4197 ac_ext=c
4198 ac_cpp='$CPP $CPPFLAGS'
4199 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4200 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4201 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4202 if test -n "$ac_tool_prefix"; then
4203   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4204 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4205 echo "$as_me:$LINENO: checking for $ac_word" >&5
4206 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4207 if test "${ac_cv_prog_CC+set}" = set; then
4208   echo $ECHO_N "(cached) $ECHO_C" >&6
4209 else
4210   if test -n "$CC"; then
4211   ac_cv_prog_CC="$CC" # Let the user override the test.
4212 else
4213 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4214 for as_dir in $PATH
4215 do
4216   IFS=$as_save_IFS
4217   test -z "$as_dir" && as_dir=.
4218   for ac_exec_ext in '' $ac_executable_extensions; do
4219   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4220     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4221     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4222     break 2
4223   fi
4224 done
4225 done
4226
4227 fi
4228 fi
4229 CC=$ac_cv_prog_CC
4230 if test -n "$CC"; then
4231   echo "$as_me:$LINENO: result: $CC" >&5
4232 echo "${ECHO_T}$CC" >&6
4233 else
4234   echo "$as_me:$LINENO: result: no" >&5
4235 echo "${ECHO_T}no" >&6
4236 fi
4237
4238 fi
4239 if test -z "$ac_cv_prog_CC"; then
4240   ac_ct_CC=$CC
4241   # Extract the first word of "gcc", so it can be a program name with args.
4242 set dummy gcc; ac_word=$2
4243 echo "$as_me:$LINENO: checking for $ac_word" >&5
4244 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4245 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4246   echo $ECHO_N "(cached) $ECHO_C" >&6
4247 else
4248   if test -n "$ac_ct_CC"; then
4249   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4250 else
4251 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4252 for as_dir in $PATH
4253 do
4254   IFS=$as_save_IFS
4255   test -z "$as_dir" && as_dir=.
4256   for ac_exec_ext in '' $ac_executable_extensions; do
4257   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4258     ac_cv_prog_ac_ct_CC="gcc"
4259     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4260     break 2
4261   fi
4262 done
4263 done
4264
4265 fi
4266 fi
4267 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4268 if test -n "$ac_ct_CC"; then
4269   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4270 echo "${ECHO_T}$ac_ct_CC" >&6
4271 else
4272   echo "$as_me:$LINENO: result: no" >&5
4273 echo "${ECHO_T}no" >&6
4274 fi
4275
4276   CC=$ac_ct_CC
4277 else
4278   CC="$ac_cv_prog_CC"
4279 fi
4280
4281 if test -z "$CC"; then
4282   if test -n "$ac_tool_prefix"; then
4283   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4284 set dummy ${ac_tool_prefix}cc; ac_word=$2
4285 echo "$as_me:$LINENO: checking for $ac_word" >&5
4286 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4287 if test "${ac_cv_prog_CC+set}" = set; then
4288   echo $ECHO_N "(cached) $ECHO_C" >&6
4289 else
4290   if test -n "$CC"; then
4291   ac_cv_prog_CC="$CC" # Let the user override the test.
4292 else
4293 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4294 for as_dir in $PATH
4295 do
4296   IFS=$as_save_IFS
4297   test -z "$as_dir" && as_dir=.
4298   for ac_exec_ext in '' $ac_executable_extensions; do
4299   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4300     ac_cv_prog_CC="${ac_tool_prefix}cc"
4301     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4302     break 2
4303   fi
4304 done
4305 done
4306
4307 fi
4308 fi
4309 CC=$ac_cv_prog_CC
4310 if test -n "$CC"; then
4311   echo "$as_me:$LINENO: result: $CC" >&5
4312 echo "${ECHO_T}$CC" >&6
4313 else
4314   echo "$as_me:$LINENO: result: no" >&5
4315 echo "${ECHO_T}no" >&6
4316 fi
4317
4318 fi
4319 if test -z "$ac_cv_prog_CC"; then
4320   ac_ct_CC=$CC
4321   # Extract the first word of "cc", so it can be a program name with args.
4322 set dummy cc; ac_word=$2
4323 echo "$as_me:$LINENO: checking for $ac_word" >&5
4324 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4325 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4326   echo $ECHO_N "(cached) $ECHO_C" >&6
4327 else
4328   if test -n "$ac_ct_CC"; then
4329   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4330 else
4331 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4332 for as_dir in $PATH
4333 do
4334   IFS=$as_save_IFS
4335   test -z "$as_dir" && as_dir=.
4336   for ac_exec_ext in '' $ac_executable_extensions; do
4337   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4338     ac_cv_prog_ac_ct_CC="cc"
4339     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4340     break 2
4341   fi
4342 done
4343 done
4344
4345 fi
4346 fi
4347 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4348 if test -n "$ac_ct_CC"; then
4349   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4350 echo "${ECHO_T}$ac_ct_CC" >&6
4351 else
4352   echo "$as_me:$LINENO: result: no" >&5
4353 echo "${ECHO_T}no" >&6
4354 fi
4355
4356   CC=$ac_ct_CC
4357 else
4358   CC="$ac_cv_prog_CC"
4359 fi
4360
4361 fi
4362 if test -z "$CC"; then
4363   # Extract the first word of "cc", so it can be a program name with args.
4364 set dummy cc; ac_word=$2
4365 echo "$as_me:$LINENO: checking for $ac_word" >&5
4366 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4367 if test "${ac_cv_prog_CC+set}" = set; then
4368   echo $ECHO_N "(cached) $ECHO_C" >&6
4369 else
4370   if test -n "$CC"; then
4371   ac_cv_prog_CC="$CC" # Let the user override the test.
4372 else
4373   ac_prog_rejected=no
4374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4375 for as_dir in $PATH
4376 do
4377   IFS=$as_save_IFS
4378   test -z "$as_dir" && as_dir=.
4379   for ac_exec_ext in '' $ac_executable_extensions; do
4380   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4381     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4382        ac_prog_rejected=yes
4383        continue
4384      fi
4385     ac_cv_prog_CC="cc"
4386     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4387     break 2
4388   fi
4389 done
4390 done
4391
4392 if test $ac_prog_rejected = yes; then
4393   # We found a bogon in the path, so make sure we never use it.
4394   set dummy $ac_cv_prog_CC
4395   shift
4396   if test $# != 0; then
4397     # We chose a different compiler from the bogus one.
4398     # However, it has the same basename, so the bogon will be chosen
4399     # first if we set CC to just the basename; use the full file name.
4400     shift
4401     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4402   fi
4403 fi
4404 fi
4405 fi
4406 CC=$ac_cv_prog_CC
4407 if test -n "$CC"; then
4408   echo "$as_me:$LINENO: result: $CC" >&5
4409 echo "${ECHO_T}$CC" >&6
4410 else
4411   echo "$as_me:$LINENO: result: no" >&5
4412 echo "${ECHO_T}no" >&6
4413 fi
4414
4415 fi
4416 if test -z "$CC"; then
4417   if test -n "$ac_tool_prefix"; then
4418   for ac_prog in cl
4419   do
4420     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4421 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4422 echo "$as_me:$LINENO: checking for $ac_word" >&5
4423 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4424 if test "${ac_cv_prog_CC+set}" = set; then
4425   echo $ECHO_N "(cached) $ECHO_C" >&6
4426 else
4427   if test -n "$CC"; then
4428   ac_cv_prog_CC="$CC" # Let the user override the test.
4429 else
4430 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4431 for as_dir in $PATH
4432 do
4433   IFS=$as_save_IFS
4434   test -z "$as_dir" && as_dir=.
4435   for ac_exec_ext in '' $ac_executable_extensions; do
4436   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4437     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4438     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4439     break 2
4440   fi
4441 done
4442 done
4443
4444 fi
4445 fi
4446 CC=$ac_cv_prog_CC
4447 if test -n "$CC"; then
4448   echo "$as_me:$LINENO: result: $CC" >&5
4449 echo "${ECHO_T}$CC" >&6
4450 else
4451   echo "$as_me:$LINENO: result: no" >&5
4452 echo "${ECHO_T}no" >&6
4453 fi
4454
4455     test -n "$CC" && break
4456   done
4457 fi
4458 if test -z "$CC"; then
4459   ac_ct_CC=$CC
4460   for ac_prog in cl
4461 do
4462   # Extract the first word of "$ac_prog", so it can be a program name with args.
4463 set dummy $ac_prog; ac_word=$2
4464 echo "$as_me:$LINENO: checking for $ac_word" >&5
4465 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4466 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4467   echo $ECHO_N "(cached) $ECHO_C" >&6
4468 else
4469   if test -n "$ac_ct_CC"; then
4470   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4471 else
4472 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4473 for as_dir in $PATH
4474 do
4475   IFS=$as_save_IFS
4476   test -z "$as_dir" && as_dir=.
4477   for ac_exec_ext in '' $ac_executable_extensions; do
4478   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4479     ac_cv_prog_ac_ct_CC="$ac_prog"
4480     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4481     break 2
4482   fi
4483 done
4484 done
4485
4486 fi
4487 fi
4488 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4489 if test -n "$ac_ct_CC"; then
4490   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4491 echo "${ECHO_T}$ac_ct_CC" >&6
4492 else
4493   echo "$as_me:$LINENO: result: no" >&5
4494 echo "${ECHO_T}no" >&6
4495 fi
4496
4497   test -n "$ac_ct_CC" && break
4498 done
4499
4500   CC=$ac_ct_CC
4501 fi
4502
4503 fi
4504
4505
4506 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
4507 See \`config.log' for more details." >&5
4508 echo "$as_me: error: no acceptable C compiler found in \$PATH
4509 See \`config.log' for more details." >&2;}
4510    { (exit 1); exit 1; }; }
4511
4512 # Provide some information about the compiler.
4513 echo "$as_me:$LINENO:" \
4514      "checking for C compiler version" >&5
4515 ac_compiler=`set X $ac_compile; echo $2`
4516 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
4517   (eval $ac_compiler --version </dev/null >&5) 2>&5
4518   ac_status=$?
4519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4520   (exit $ac_status); }
4521 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
4522   (eval $ac_compiler -v </dev/null >&5) 2>&5
4523   ac_status=$?
4524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4525   (exit $ac_status); }
4526 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
4527   (eval $ac_compiler -V </dev/null >&5) 2>&5
4528   ac_status=$?
4529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4530   (exit $ac_status); }
4531
4532 cat >conftest.$ac_ext <<_ACEOF
4533 /* confdefs.h.  */
4534 _ACEOF
4535 cat confdefs.h >>conftest.$ac_ext
4536 cat >>conftest.$ac_ext <<_ACEOF
4537 /* end confdefs.h.  */
4538
4539 int
4540 main ()
4541 {
4542
4543   ;
4544   return 0;
4545 }
4546 _ACEOF
4547 ac_clean_files_save=$ac_clean_files
4548 ac_clean_files="$ac_clean_files a.out a.exe b.out"
4549 # Try to create an executable without -o first, disregard a.out.
4550 # It will help us diagnose broken compilers, and finding out an intuition
4551 # of exeext.
4552 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
4553 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
4554 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4555 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
4556   (eval $ac_link_default) 2>&5
4557   ac_status=$?
4558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4559   (exit $ac_status); }; then
4560   # Find the output, starting from the most likely.  This scheme is
4561 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
4562 # resort.
4563
4564 # Be careful to initialize this variable, since it used to be cached.
4565 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
4566 ac_cv_exeext=
4567 # b.out is created by i960 compilers.
4568 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
4569 do
4570   test -f "$ac_file" || continue
4571   case $ac_file in
4572     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
4573         ;;
4574     conftest.$ac_ext )
4575         # This is the source file.
4576         ;;
4577     [ab].out )
4578         # We found the default executable, but exeext='' is most
4579         # certainly right.
4580         break;;
4581     *.* )
4582         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4583         # FIXME: I believe we export ac_cv_exeext for Libtool,
4584         # but it would be cool to find out if it's true.  Does anybody
4585         # maintain Libtool? --akim.
4586         export ac_cv_exeext
4587         break;;
4588     * )
4589         break;;
4590   esac
4591 done
4592 else
4593   echo "$as_me: failed program was:" >&5
4594 sed 's/^/| /' conftest.$ac_ext >&5
4595
4596 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
4597 See \`config.log' for more details." >&5
4598 echo "$as_me: error: C compiler cannot create executables
4599 See \`config.log' for more details." >&2;}
4600    { (exit 77); exit 77; }; }
4601 fi
4602
4603 ac_exeext=$ac_cv_exeext
4604 echo "$as_me:$LINENO: result: $ac_file" >&5
4605 echo "${ECHO_T}$ac_file" >&6
4606
4607 # Check the compiler produces executables we can run.  If not, either
4608 # the compiler is broken, or we cross compile.
4609 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
4610 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
4611 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
4612 # If not cross compiling, check that we can run a simple program.
4613 if test "$cross_compiling" != yes; then
4614   if { ac_try='./$ac_file'
4615   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4616   (eval $ac_try) 2>&5
4617   ac_status=$?
4618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4619   (exit $ac_status); }; }; then
4620     cross_compiling=no
4621   else
4622     if test "$cross_compiling" = maybe; then
4623         cross_compiling=yes
4624     else
4625         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
4626 If you meant to cross compile, use \`--host'.
4627 See \`config.log' for more details." >&5
4628 echo "$as_me: error: cannot run C compiled programs.
4629 If you meant to cross compile, use \`--host'.
4630 See \`config.log' for more details." >&2;}
4631    { (exit 1); exit 1; }; }
4632     fi
4633   fi
4634 fi
4635 echo "$as_me:$LINENO: result: yes" >&5
4636 echo "${ECHO_T}yes" >&6
4637
4638 rm -f a.out a.exe conftest$ac_cv_exeext b.out
4639 ac_clean_files=$ac_clean_files_save
4640 # Check the compiler produces executables we can run.  If not, either
4641 # the compiler is broken, or we cross compile.
4642 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
4643 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
4644 echo "$as_me:$LINENO: result: $cross_compiling" >&5
4645 echo "${ECHO_T}$cross_compiling" >&6
4646
4647 echo "$as_me:$LINENO: checking for suffix of executables" >&5
4648 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
4649 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4650   (eval $ac_link) 2>&5
4651   ac_status=$?
4652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4653   (exit $ac_status); }; then
4654   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4655 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4656 # work properly (i.e., refer to `conftest.exe'), while it won't with
4657 # `rm'.
4658 for ac_file in conftest.exe conftest conftest.*; do
4659   test -f "$ac_file" || continue
4660   case $ac_file in
4661     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
4662     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4663           export ac_cv_exeext
4664           break;;
4665     * ) break;;
4666   esac
4667 done
4668 else
4669   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
4670 See \`config.log' for more details." >&5
4671 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
4672 See \`config.log' for more details." >&2;}
4673    { (exit 1); exit 1; }; }
4674 fi
4675
4676 rm -f conftest$ac_cv_exeext
4677 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
4678 echo "${ECHO_T}$ac_cv_exeext" >&6
4679
4680 rm -f conftest.$ac_ext
4681 EXEEXT=$ac_cv_exeext
4682 ac_exeext=$EXEEXT
4683 echo "$as_me:$LINENO: checking for suffix of object files" >&5
4684 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
4685 if test "${ac_cv_objext+set}" = set; then
4686   echo $ECHO_N "(cached) $ECHO_C" >&6
4687 else
4688   cat >conftest.$ac_ext <<_ACEOF
4689 /* confdefs.h.  */
4690 _ACEOF
4691 cat confdefs.h >>conftest.$ac_ext
4692 cat >>conftest.$ac_ext <<_ACEOF
4693 /* end confdefs.h.  */
4694
4695 int
4696 main ()
4697 {
4698
4699   ;
4700   return 0;
4701 }
4702 _ACEOF
4703 rm -f conftest.o conftest.obj
4704 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4705   (eval $ac_compile) 2>&5
4706   ac_status=$?
4707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4708   (exit $ac_status); }; then
4709   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
4710   case $ac_file in
4711     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
4712     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4713        break;;
4714   esac
4715 done
4716 else
4717   echo "$as_me: failed program was:" >&5
4718 sed 's/^/| /' conftest.$ac_ext >&5
4719
4720 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
4721 See \`config.log' for more details." >&5
4722 echo "$as_me: error: cannot compute suffix of object files: cannot compile
4723 See \`config.log' for more details." >&2;}
4724    { (exit 1); exit 1; }; }
4725 fi
4726
4727 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4728 fi
4729 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
4730 echo "${ECHO_T}$ac_cv_objext" >&6
4731 OBJEXT=$ac_cv_objext
4732 ac_objext=$OBJEXT
4733 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
4734 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
4735 if test "${ac_cv_c_compiler_gnu+set}" = set; then
4736   echo $ECHO_N "(cached) $ECHO_C" >&6
4737 else
4738   cat >conftest.$ac_ext <<_ACEOF
4739 /* confdefs.h.  */
4740 _ACEOF
4741 cat confdefs.h >>conftest.$ac_ext
4742 cat >>conftest.$ac_ext <<_ACEOF
4743 /* end confdefs.h.  */
4744
4745 int
4746 main ()
4747 {
4748 #ifndef __GNUC__
4749        choke me
4750 #endif
4751
4752   ;
4753   return 0;
4754 }
4755 _ACEOF
4756 rm -f conftest.$ac_objext
4757 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4758   (eval $ac_compile) 2>conftest.er1
4759   ac_status=$?
4760   grep -v '^ *+' conftest.er1 >conftest.err
4761   rm -f conftest.er1
4762   cat conftest.err >&5
4763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4764   (exit $ac_status); } &&
4765          { ac_try='test -z "$ac_c_werror_flag"
4766                          || test ! -s conftest.err'
4767   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4768   (eval $ac_try) 2>&5
4769   ac_status=$?
4770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4771   (exit $ac_status); }; } &&
4772          { ac_try='test -s conftest.$ac_objext'
4773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4774   (eval $ac_try) 2>&5
4775   ac_status=$?
4776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4777   (exit $ac_status); }; }; then
4778   ac_compiler_gnu=yes
4779 else
4780   echo "$as_me: failed program was:" >&5
4781 sed 's/^/| /' conftest.$ac_ext >&5
4782
4783 ac_compiler_gnu=no
4784 fi
4785 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4786 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4787
4788 fi
4789 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
4790 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
4791 GCC=`test $ac_compiler_gnu = yes && echo yes`
4792 ac_test_CFLAGS=${CFLAGS+set}
4793 ac_save_CFLAGS=$CFLAGS
4794 CFLAGS="-g"
4795 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
4796 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
4797 if test "${ac_cv_prog_cc_g+set}" = set; then
4798   echo $ECHO_N "(cached) $ECHO_C" >&6
4799 else
4800   cat >conftest.$ac_ext <<_ACEOF
4801 /* confdefs.h.  */
4802 _ACEOF
4803 cat confdefs.h >>conftest.$ac_ext
4804 cat >>conftest.$ac_ext <<_ACEOF
4805 /* end confdefs.h.  */
4806
4807 int
4808 main ()
4809 {
4810
4811   ;
4812   return 0;
4813 }
4814 _ACEOF
4815 rm -f conftest.$ac_objext
4816 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4817   (eval $ac_compile) 2>conftest.er1
4818   ac_status=$?
4819   grep -v '^ *+' conftest.er1 >conftest.err
4820   rm -f conftest.er1
4821   cat conftest.err >&5
4822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4823   (exit $ac_status); } &&
4824          { ac_try='test -z "$ac_c_werror_flag"
4825                          || test ! -s conftest.err'
4826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4827   (eval $ac_try) 2>&5
4828   ac_status=$?
4829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4830   (exit $ac_status); }; } &&
4831          { ac_try='test -s conftest.$ac_objext'
4832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4833   (eval $ac_try) 2>&5
4834   ac_status=$?
4835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4836   (exit $ac_status); }; }; then
4837   ac_cv_prog_cc_g=yes
4838 else
4839   echo "$as_me: failed program was:" >&5
4840 sed 's/^/| /' conftest.$ac_ext >&5
4841
4842 ac_cv_prog_cc_g=no
4843 fi
4844 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4845 fi
4846 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
4847 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
4848 if test "$ac_test_CFLAGS" = set; then
4849   CFLAGS=$ac_save_CFLAGS
4850 elif test $ac_cv_prog_cc_g = yes; then
4851   if test "$GCC" = yes; then
4852     CFLAGS="-g -O2"
4853   else
4854     CFLAGS="-g"
4855   fi
4856 else
4857   if test "$GCC" = yes; then
4858     CFLAGS="-O2"
4859   else
4860     CFLAGS=
4861   fi
4862 fi
4863 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
4864 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
4865 if test "${ac_cv_prog_cc_stdc+set}" = set; then
4866   echo $ECHO_N "(cached) $ECHO_C" >&6
4867 else
4868   ac_cv_prog_cc_stdc=no
4869 ac_save_CC=$CC
4870 cat >conftest.$ac_ext <<_ACEOF
4871 /* confdefs.h.  */
4872 _ACEOF
4873 cat confdefs.h >>conftest.$ac_ext
4874 cat >>conftest.$ac_ext <<_ACEOF
4875 /* end confdefs.h.  */
4876 #include <stdarg.h>
4877 #include <stdio.h>
4878 #include <sys/types.h>
4879 #include <sys/stat.h>
4880 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4881 struct buf { int x; };
4882 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4883 static char *e (p, i)
4884      char **p;
4885      int i;
4886 {
4887   return p[i];
4888 }
4889 static char *f (char * (*g) (char **, int), char **p, ...)
4890 {
4891   char *s;
4892   va_list v;
4893   va_start (v,p);
4894   s = g (p, va_arg (v,int));
4895   va_end (v);
4896   return s;
4897 }
4898
4899 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4900    function prototypes and stuff, but not '\xHH' hex character constants.
4901    These don't provoke an error unfortunately, instead are silently treated
4902    as 'x'.  The following induces an error, until -std1 is added to get
4903    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4904    array size at least.  It's necessary to write '\x00'==0 to get something
4905    that's true only with -std1.  */
4906 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4907
4908 int test (int i, double x);
4909 struct s1 {int (*f) (int a);};
4910 struct s2 {int (*f) (double a);};
4911 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4912 int argc;
4913 char **argv;
4914 int
4915 main ()
4916 {
4917 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4918   ;
4919   return 0;
4920 }
4921 _ACEOF
4922 # Don't try gcc -ansi; that turns off useful extensions and
4923 # breaks some systems' header files.
4924 # AIX                   -qlanglvl=ansi
4925 # Ultrix and OSF/1      -std1
4926 # HP-UX 10.20 and later -Ae
4927 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4928 # SVR4                  -Xc -D__EXTENSIONS__
4929 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4930 do
4931   CC="$ac_save_CC $ac_arg"
4932   rm -f conftest.$ac_objext
4933 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4934   (eval $ac_compile) 2>conftest.er1
4935   ac_status=$?
4936   grep -v '^ *+' conftest.er1 >conftest.err
4937   rm -f conftest.er1
4938   cat conftest.err >&5
4939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4940   (exit $ac_status); } &&
4941          { ac_try='test -z "$ac_c_werror_flag"
4942                          || test ! -s conftest.err'
4943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4944   (eval $ac_try) 2>&5
4945   ac_status=$?
4946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4947   (exit $ac_status); }; } &&
4948          { ac_try='test -s conftest.$ac_objext'
4949   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4950   (eval $ac_try) 2>&5
4951   ac_status=$?
4952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4953   (exit $ac_status); }; }; then
4954   ac_cv_prog_cc_stdc=$ac_arg
4955 break
4956 else
4957   echo "$as_me: failed program was:" >&5
4958 sed 's/^/| /' conftest.$ac_ext >&5
4959
4960 fi
4961 rm -f conftest.err conftest.$ac_objext
4962 done
4963 rm -f conftest.$ac_ext conftest.$ac_objext
4964 CC=$ac_save_CC
4965
4966 fi
4967
4968 case "x$ac_cv_prog_cc_stdc" in
4969   x|xno)
4970     echo "$as_me:$LINENO: result: none needed" >&5
4971 echo "${ECHO_T}none needed" >&6 ;;
4972   *)
4973     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
4974 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
4975     CC="$CC $ac_cv_prog_cc_stdc" ;;
4976 esac
4977
4978 # Some people use a C++ compiler to compile C.  Since we use `exit',
4979 # in C++ we need to declare it.  In case someone uses the same compiler
4980 # for both compiling C and C++ we need to have the C++ compiler decide
4981 # the declaration of exit, since it's the most demanding environment.
4982 cat >conftest.$ac_ext <<_ACEOF
4983 #ifndef __cplusplus
4984   choke me
4985 #endif
4986 _ACEOF
4987 rm -f conftest.$ac_objext
4988 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4989   (eval $ac_compile) 2>conftest.er1
4990   ac_status=$?
4991   grep -v '^ *+' conftest.er1 >conftest.err
4992   rm -f conftest.er1
4993   cat conftest.err >&5
4994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4995   (exit $ac_status); } &&
4996          { ac_try='test -z "$ac_c_werror_flag"
4997                          || test ! -s conftest.err'
4998   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4999   (eval $ac_try) 2>&5
5000   ac_status=$?
5001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5002   (exit $ac_status); }; } &&
5003          { ac_try='test -s conftest.$ac_objext'
5004   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5005   (eval $ac_try) 2>&5
5006   ac_status=$?
5007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5008   (exit $ac_status); }; }; then
5009   for ac_declaration in \
5010    '' \
5011    'extern "C" void std::exit (int) throw (); using std::exit;' \
5012    'extern "C" void std::exit (int); using std::exit;' \
5013    'extern "C" void exit (int) throw ();' \
5014    'extern "C" void exit (int);' \
5015    'void exit (int);'
5016 do
5017   cat >conftest.$ac_ext <<_ACEOF
5018 /* confdefs.h.  */
5019 _ACEOF
5020 cat confdefs.h >>conftest.$ac_ext
5021 cat >>conftest.$ac_ext <<_ACEOF
5022 /* end confdefs.h.  */
5023 $ac_declaration
5024 #include <stdlib.h>
5025 int
5026 main ()
5027 {
5028 exit (42);
5029   ;
5030   return 0;
5031 }
5032 _ACEOF
5033 rm -f conftest.$ac_objext
5034 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5035   (eval $ac_compile) 2>conftest.er1
5036   ac_status=$?
5037   grep -v '^ *+' conftest.er1 >conftest.err
5038   rm -f conftest.er1
5039   cat conftest.err >&5
5040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5041   (exit $ac_status); } &&
5042          { ac_try='test -z "$ac_c_werror_flag"
5043                          || test ! -s conftest.err'
5044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5045   (eval $ac_try) 2>&5
5046   ac_status=$?
5047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5048   (exit $ac_status); }; } &&
5049          { ac_try='test -s conftest.$ac_objext'
5050   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5051   (eval $ac_try) 2>&5
5052   ac_status=$?
5053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5054   (exit $ac_status); }; }; then
5055   :
5056 else
5057   echo "$as_me: failed program was:" >&5
5058 sed 's/^/| /' conftest.$ac_ext >&5
5059
5060 continue
5061 fi
5062 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5063   cat >conftest.$ac_ext <<_ACEOF
5064 /* confdefs.h.  */
5065 _ACEOF
5066 cat confdefs.h >>conftest.$ac_ext
5067 cat >>conftest.$ac_ext <<_ACEOF
5068 /* end confdefs.h.  */
5069 $ac_declaration
5070 int
5071 main ()
5072 {
5073 exit (42);
5074   ;
5075   return 0;
5076 }
5077 _ACEOF
5078 rm -f conftest.$ac_objext
5079 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5080   (eval $ac_compile) 2>conftest.er1
5081   ac_status=$?
5082   grep -v '^ *+' conftest.er1 >conftest.err
5083   rm -f conftest.er1
5084   cat conftest.err >&5
5085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5086   (exit $ac_status); } &&
5087          { ac_try='test -z "$ac_c_werror_flag"
5088                          || test ! -s conftest.err'
5089   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5090   (eval $ac_try) 2>&5
5091   ac_status=$?
5092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5093   (exit $ac_status); }; } &&
5094          { ac_try='test -s conftest.$ac_objext'
5095   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5096   (eval $ac_try) 2>&5
5097   ac_status=$?
5098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5099   (exit $ac_status); }; }; then
5100   break
5101 else
5102   echo "$as_me: failed program was:" >&5
5103 sed 's/^/| /' conftest.$ac_ext >&5
5104
5105 fi
5106 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5107 done
5108 rm -f conftest*
5109 if test -n "$ac_declaration"; then
5110   echo '#ifdef __cplusplus' >>confdefs.h
5111   echo $ac_declaration      >>confdefs.h
5112   echo '#endif'             >>confdefs.h
5113 fi
5114
5115 else
5116   echo "$as_me: failed program was:" >&5
5117 sed 's/^/| /' conftest.$ac_ext >&5
5118
5119 fi
5120 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5121 ac_ext=c
5122 ac_cpp='$CPP $CPPFLAGS'
5123 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5124 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5125 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5126
5127 depcc="$CC"   am_compiler_list=
5128
5129 echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
5130 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
5131 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
5132   echo $ECHO_N "(cached) $ECHO_C" >&6
5133 else
5134   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5135   # We make a subdir and do the tests there.  Otherwise we can end up
5136   # making bogus files that we don't know about and never remove.  For
5137   # instance it was reported that on HP-UX the gcc test will end up
5138   # making a dummy file named `D' -- because `-MD' means `put the output
5139   # in D'.
5140   mkdir conftest.dir
5141   # Copy depcomp to subdir because otherwise we won't find it if we're
5142   # using a relative directory.
5143   cp "$am_depcomp" conftest.dir
5144   cd conftest.dir
5145   # We will build objects and dependencies in a subdirectory because
5146   # it helps to detect inapplicable dependency modes.  For instance
5147   # both Tru64's cc and ICC support -MD to output dependencies as a
5148   # side effect of compilation, but ICC will put the dependencies in
5149   # the current directory while Tru64 will put them in the object
5150   # directory.
5151   mkdir sub
5152
5153   am_cv_CC_dependencies_compiler_type=none
5154   if test "$am_compiler_list" = ""; then
5155      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5156   fi
5157   for depmode in $am_compiler_list; do
5158     # Setup a source with many dependencies, because some compilers
5159     # like to wrap large dependency lists on column 80 (with \), and
5160     # we should not choose a depcomp mode which is confused by this.
5161     #
5162     # We need to recreate these files for each test, as the compiler may
5163     # overwrite some of them when testing with obscure command lines.
5164     # This happens at least with the AIX C compiler.
5165     : > sub/conftest.c
5166     for i in 1 2 3 4 5 6; do
5167       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5168       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5169       # Solaris 8's {/usr,}/bin/sh.
5170       touch sub/conftst$i.h
5171     done
5172     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5173
5174     case $depmode in
5175     nosideeffect)
5176       # after this tag, mechanisms are not by side-effect, so they'll
5177       # only be used when explicitly requested
5178       if test "x$enable_dependency_tracking" = xyes; then
5179         continue
5180       else
5181         break
5182       fi
5183       ;;
5184     none) break ;;
5185     esac
5186     # We check with `-c' and `-o' for the sake of the "dashmstdout"
5187     # mode.  It turns out that the SunPro C++ compiler does not properly
5188     # handle `-M -o', and we need to detect this.
5189     if depmode=$depmode \
5190        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5191        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5192        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
5193          >/dev/null 2>conftest.err &&
5194        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5195        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
5196        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5197       # icc doesn't choke on unknown options, it will just issue warnings
5198       # or remarks (even with -Werror).  So we grep stderr for any message
5199       # that says an option was ignored or not supported.
5200       # When given -MP, icc 7.0 and 7.1 complain thusly:
5201       #   icc: Command line warning: ignoring option '-M'; no argument required
5202       # The diagnosis changed in icc 8.0:
5203       #   icc: Command line remark: option '-MP' not supported
5204       if (grep 'ignoring option' conftest.err ||
5205           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5206         am_cv_CC_dependencies_compiler_type=$depmode
5207         break
5208       fi
5209     fi
5210   done
5211
5212   cd ..
5213   rm -rf conftest.dir
5214 else
5215   am_cv_CC_dependencies_compiler_type=none
5216 fi
5217
5218 fi
5219 echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
5220 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
5221 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5222
5223
5224
5225 if
5226   test "x$enable_dependency_tracking" != xno \
5227   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5228   am__fastdepCC_TRUE=
5229   am__fastdepCC_FALSE='#'
5230 else
5231   am__fastdepCC_TRUE='#'
5232   am__fastdepCC_FALSE=
5233 fi
5234
5235
5236 echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
5237 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
5238 if test "${lt_cv_path_SED+set}" = set; then
5239   echo $ECHO_N "(cached) $ECHO_C" >&6
5240 else
5241   # Loop through the user's path and test for sed and gsed.
5242 # Then use that list of sed's as ones to test for truncation.
5243 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5244 for as_dir in $PATH
5245 do
5246   IFS=$as_save_IFS
5247   test -z "$as_dir" && as_dir=.
5248   for lt_ac_prog in sed gsed; do
5249     for ac_exec_ext in '' $ac_executable_extensions; do
5250       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
5251         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
5252       fi
5253     done
5254   done
5255 done
5256 lt_ac_max=0
5257 lt_ac_count=0
5258 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
5259 # along with /bin/sed that truncates output.
5260 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
5261   test ! -f $lt_ac_sed && continue
5262   cat /dev/null > conftest.in
5263   lt_ac_count=0
5264   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
5265   # Check for GNU sed and select it if it is found.
5266   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
5267     lt_cv_path_SED=$lt_ac_sed
5268     break
5269   fi
5270   while true; do
5271     cat conftest.in conftest.in >conftest.tmp
5272     mv conftest.tmp conftest.in
5273     cp conftest.in conftest.nl
5274     echo >>conftest.nl
5275     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
5276     cmp -s conftest.out conftest.nl || break
5277     # 10000 chars as input seems more than enough
5278     test $lt_ac_count -gt 10 && break
5279     lt_ac_count=`expr $lt_ac_count + 1`
5280     if test $lt_ac_count -gt $lt_ac_max; then
5281       lt_ac_max=$lt_ac_count
5282       lt_cv_path_SED=$lt_ac_sed
5283     fi
5284   done
5285 done
5286
5287 fi
5288
5289 SED=$lt_cv_path_SED
5290 echo "$as_me:$LINENO: result: $SED" >&5
5291 echo "${ECHO_T}$SED" >&6
5292
5293 echo "$as_me:$LINENO: checking for egrep" >&5
5294 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
5295 if test "${ac_cv_prog_egrep+set}" = set; then
5296   echo $ECHO_N "(cached) $ECHO_C" >&6
5297 else
5298   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
5299     then ac_cv_prog_egrep='grep -E'
5300     else ac_cv_prog_egrep='egrep'
5301     fi
5302 fi
5303 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
5304 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
5305  EGREP=$ac_cv_prog_egrep
5306
5307
5308
5309 # Check whether --with-gnu-ld or --without-gnu-ld was given.
5310 if test "${with_gnu_ld+set}" = set; then
5311   withval="$with_gnu_ld"
5312   test "$withval" = no || with_gnu_ld=yes
5313 else
5314   with_gnu_ld=no
5315 fi;
5316 ac_prog=ld
5317 if test "$GCC" = yes; then
5318   # Check if gcc -print-prog-name=ld gives a path.
5319   echo "$as_me:$LINENO: checking for ld used by $CC" >&5
5320 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
5321   case $host in
5322   *-*-mingw*)
5323     # gcc leaves a trailing carriage return which upsets mingw
5324     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5325   *)
5326     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5327   esac
5328   case $ac_prog in
5329     # Accept absolute paths.
5330     [\\/]* | ?:[\\/]*)
5331       re_direlt='/[^/][^/]*/\.\./'
5332       # Canonicalize the pathname of ld
5333       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
5334       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5335         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
5336       done
5337       test -z "$LD" && LD="$ac_prog"
5338       ;;
5339   "")
5340     # If it fails, then pretend we aren't using GCC.
5341     ac_prog=ld
5342     ;;
5343   *)
5344     # If it is relative, then search for the first ld in PATH.
5345     with_gnu_ld=unknown
5346     ;;
5347   esac
5348 elif test "$with_gnu_ld" = yes; then
5349   echo "$as_me:$LINENO: checking for GNU ld" >&5
5350 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
5351 else
5352   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
5353 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
5354 fi
5355 if test "${lt_cv_path_LD+set}" = set; then
5356   echo $ECHO_N "(cached) $ECHO_C" >&6
5357 else
5358   if test -z "$LD"; then
5359   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5360   for ac_dir in $PATH; do
5361     IFS="$lt_save_ifs"
5362     test -z "$ac_dir" && ac_dir=.
5363     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5364       lt_cv_path_LD="$ac_dir/$ac_prog"
5365       # Check to see if the program is GNU ld.  I'd rather use --version,
5366       # but apparently some variants of GNU ld only accept -v.
5367       # Break only if it was the GNU/non-GNU ld that we prefer.
5368       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5369       *GNU* | *'with BFD'*)
5370         test "$with_gnu_ld" != no && break
5371         ;;
5372       *)
5373         test "$with_gnu_ld" != yes && break
5374         ;;
5375       esac
5376     fi
5377   done
5378   IFS="$lt_save_ifs"
5379 else
5380   lt_cv_path_LD="$LD" # Let the user override the test with a path.
5381 fi
5382 fi
5383
5384 LD="$lt_cv_path_LD"
5385 if test -n "$LD"; then
5386   echo "$as_me:$LINENO: result: $LD" >&5
5387 echo "${ECHO_T}$LD" >&6
5388 else
5389   echo "$as_me:$LINENO: result: no" >&5
5390 echo "${ECHO_T}no" >&6
5391 fi
5392 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
5393 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
5394    { (exit 1); exit 1; }; }
5395 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
5396 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
5397 if test "${lt_cv_prog_gnu_ld+set}" = set; then
5398   echo $ECHO_N "(cached) $ECHO_C" >&6
5399 else
5400   # I'd rather use --version here, but apparently some GNU lds only accept -v.
5401 case `$LD -v 2>&1 </dev/null` in
5402 *GNU* | *'with BFD'*)
5403   lt_cv_prog_gnu_ld=yes
5404   ;;
5405 *)
5406   lt_cv_prog_gnu_ld=no
5407   ;;
5408 esac
5409 fi
5410 echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
5411 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
5412 with_gnu_ld=$lt_cv_prog_gnu_ld
5413
5414
5415 echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
5416 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
5417 if test "${lt_cv_ld_reload_flag+set}" = set; then
5418   echo $ECHO_N "(cached) $ECHO_C" >&6
5419 else
5420   lt_cv_ld_reload_flag='-r'
5421 fi
5422 echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
5423 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
5424 reload_flag=$lt_cv_ld_reload_flag
5425 case $reload_flag in
5426 "" | " "*) ;;
5427 *) reload_flag=" $reload_flag" ;;
5428 esac
5429 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5430 case $host_os in
5431   darwin*)
5432     if test "$GCC" = yes; then
5433       reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
5434     else
5435       reload_cmds='$LD$reload_flag -o $output$reload_objs'
5436     fi
5437     ;;
5438 esac
5439
5440 echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
5441 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
5442 if test "${lt_cv_path_NM+set}" = set; then
5443   echo $ECHO_N "(cached) $ECHO_C" >&6
5444 else
5445   if test -n "$NM"; then
5446   # Let the user override the test.
5447   lt_cv_path_NM="$NM"
5448 else
5449   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5450   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
5451     IFS="$lt_save_ifs"
5452     test -z "$ac_dir" && ac_dir=.
5453     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
5454     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5455       # Check to see if the nm accepts a BSD-compat flag.
5456       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5457       #   nm: unknown option "B" ignored
5458       # Tru64's nm complains that /dev/null is an invalid object file
5459       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5460       */dev/null* | *'Invalid file or object type'*)
5461         lt_cv_path_NM="$tmp_nm -B"
5462         break
5463         ;;
5464       *)
5465         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5466         */dev/null*)
5467           lt_cv_path_NM="$tmp_nm -p"
5468           break
5469           ;;
5470         *)
5471           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5472           continue # so that we can try to find one that supports BSD flags
5473           ;;
5474         esac
5475       esac
5476     fi
5477   done
5478   IFS="$lt_save_ifs"
5479   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
5480 fi
5481 fi
5482 echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
5483 echo "${ECHO_T}$lt_cv_path_NM" >&6
5484 NM="$lt_cv_path_NM"
5485
5486 echo "$as_me:$LINENO: checking whether ln -s works" >&5
5487 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
5488 LN_S=$as_ln_s
5489 if test "$LN_S" = "ln -s"; then
5490   echo "$as_me:$LINENO: result: yes" >&5
5491 echo "${ECHO_T}yes" >&6
5492 else
5493   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
5494 echo "${ECHO_T}no, using $LN_S" >&6
5495 fi
5496
5497 echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
5498 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
5499 if test "${lt_cv_deplibs_check_method+set}" = set; then
5500   echo $ECHO_N "(cached) $ECHO_C" >&6
5501 else
5502   lt_cv_file_magic_cmd='$MAGIC_CMD'
5503 lt_cv_file_magic_test_file=
5504 lt_cv_deplibs_check_method='unknown'
5505 # Need to set the preceding variable on all platforms that support
5506 # interlibrary dependencies.
5507 # 'none' -- dependencies not supported.
5508 # `unknown' -- same as none, but documents that we really don't know.
5509 # 'pass_all' -- all dependencies passed with no checks.
5510 # 'test_compile' -- check by making test program.
5511 # 'file_magic [[regex]]' -- check by looking for files in library path
5512 # which responds to the $file_magic_cmd with a given extended regex.
5513 # If you have `file' or equivalent on your system and you're not sure
5514 # whether `pass_all' will *always* work, you probably want this one.
5515
5516 case $host_os in
5517 aix4* | aix5*)
5518   lt_cv_deplibs_check_method=pass_all
5519   ;;
5520
5521 beos*)
5522   lt_cv_deplibs_check_method=pass_all
5523   ;;
5524
5525 bsdi[45]*)
5526   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
5527   lt_cv_file_magic_cmd='/usr/bin/file -L'
5528   lt_cv_file_magic_test_file=/shlib/libc.so
5529   ;;
5530
5531 cygwin*)
5532   # func_win32_libid is a shell function defined in ltmain.sh
5533   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5534   lt_cv_file_magic_cmd='func_win32_libid'
5535   ;;
5536
5537 mingw* | pw32*)
5538   # Base MSYS/MinGW do not provide the 'file' command needed by
5539   # func_win32_libid shell function, so use a weaker test based on 'objdump'.
5540   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
5541   lt_cv_file_magic_cmd='$OBJDUMP -f'
5542   ;;
5543
5544 darwin* | rhapsody*)
5545   lt_cv_deplibs_check_method=pass_all
5546   ;;
5547
5548 freebsd* | kfreebsd*-gnu | dragonfly*)
5549   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5550     case $host_cpu in
5551     i*86 )
5552       # Not sure whether the presence of OpenBSD here was a mistake.
5553       # Let's accept both of them until this is cleared up.
5554       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
5555       lt_cv_file_magic_cmd=/usr/bin/file
5556       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5557       ;;
5558     esac
5559   else
5560     lt_cv_deplibs_check_method=pass_all
5561   fi
5562   ;;
5563
5564 gnu*)
5565   lt_cv_deplibs_check_method=pass_all
5566   ;;
5567
5568 hpux10.20* | hpux11*)
5569   lt_cv_file_magic_cmd=/usr/bin/file
5570   case $host_cpu in
5571   ia64*)
5572     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
5573     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5574     ;;
5575   hppa*64*)
5576     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]'
5577     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5578     ;;
5579   *)
5580     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
5581     lt_cv_file_magic_test_file=/usr/lib/libc.sl
5582     ;;
5583   esac
5584   ;;
5585
5586 irix5* | irix6* | nonstopux*)
5587   case $LD in
5588   *-32|*"-32 ") libmagic=32-bit;;
5589   *-n32|*"-n32 ") libmagic=N32;;
5590   *-64|*"-64 ") libmagic=64-bit;;
5591   *) libmagic=never-match;;
5592   esac
5593   lt_cv_deplibs_check_method=pass_all
5594   ;;
5595
5596 # This must be Linux ELF.
5597 linux*)
5598   lt_cv_deplibs_check_method=pass_all
5599   ;;
5600
5601 netbsd*)
5602   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5603     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5604   else
5605     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
5606   fi
5607   ;;
5608
5609 newos6*)
5610   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
5611   lt_cv_file_magic_cmd=/usr/bin/file
5612   lt_cv_file_magic_test_file=/usr/lib/libnls.so
5613   ;;
5614
5615 nto-qnx*)
5616   lt_cv_deplibs_check_method=unknown
5617   ;;
5618
5619 openbsd*)
5620   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5621     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
5622   else
5623     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5624   fi
5625   ;;
5626
5627 osf3* | osf4* | osf5*)
5628   lt_cv_deplibs_check_method=pass_all
5629   ;;
5630
5631 sco3.2v5*)
5632   lt_cv_deplibs_check_method=pass_all
5633   ;;
5634
5635 solaris*)
5636   lt_cv_deplibs_check_method=pass_all
5637   ;;
5638
5639 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5640   case $host_vendor in
5641   motorola)
5642     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]'
5643     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5644     ;;
5645   ncr)
5646     lt_cv_deplibs_check_method=pass_all
5647     ;;
5648   sequent)
5649     lt_cv_file_magic_cmd='/bin/file'
5650     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
5651     ;;
5652   sni)
5653     lt_cv_file_magic_cmd='/bin/file'
5654     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
5655     lt_cv_file_magic_test_file=/lib/libc.so
5656     ;;
5657   siemens)
5658     lt_cv_deplibs_check_method=pass_all
5659     ;;
5660   esac
5661   ;;
5662
5663 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
5664   lt_cv_deplibs_check_method=pass_all
5665   ;;
5666 esac
5667
5668 fi
5669 echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
5670 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
5671 file_magic_cmd=$lt_cv_file_magic_cmd
5672 deplibs_check_method=$lt_cv_deplibs_check_method
5673 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5674
5675
5676
5677
5678 # If no C compiler was specified, use CC.
5679 LTCC=${LTCC-"$CC"}
5680
5681 # Allow CC to be a program name with arguments.
5682 compiler=$CC
5683
5684
5685 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
5686 if test "${enable_libtool_lock+set}" = set; then
5687   enableval="$enable_libtool_lock"
5688
5689 fi;
5690 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5691
5692 # Some flags need to be propagated to the compiler or linker for good
5693 # libtool support.
5694 case $host in
5695 ia64-*-hpux*)
5696   # Find out which ABI we are using.
5697   echo 'int i;' > conftest.$ac_ext
5698   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5699   (eval $ac_compile) 2>&5
5700   ac_status=$?
5701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5702   (exit $ac_status); }; then
5703     case `/usr/bin/file conftest.$ac_objext` in
5704     *ELF-32*)
5705       HPUX_IA64_MODE="32"
5706       ;;
5707     *ELF-64*)
5708       HPUX_IA64_MODE="64"
5709       ;;
5710     esac
5711   fi
5712   rm -rf conftest*
5713   ;;
5714 *-*-irix6*)
5715   # Find out which ABI we are using.
5716   echo '#line 5716 "configure"' > conftest.$ac_ext
5717   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5718   (eval $ac_compile) 2>&5
5719   ac_status=$?
5720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5721   (exit $ac_status); }; then
5722    if test "$lt_cv_prog_gnu_ld" = yes; then
5723     case `/usr/bin/file conftest.$ac_objext` in
5724     *32-bit*)
5725       LD="${LD-ld} -melf32bsmip"
5726       ;;
5727     *N32*)
5728       LD="${LD-ld} -melf32bmipn32"
5729       ;;
5730     *64-bit*)
5731       LD="${LD-ld} -melf64bmip"
5732       ;;
5733     esac
5734    else
5735     case `/usr/bin/file conftest.$ac_objext` in
5736     *32-bit*)
5737       LD="${LD-ld} -32"
5738       ;;
5739     *N32*)
5740       LD="${LD-ld} -n32"
5741       ;;
5742     *64-bit*)
5743       LD="${LD-ld} -64"
5744       ;;
5745     esac
5746    fi
5747   fi
5748   rm -rf conftest*
5749   ;;
5750
5751 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
5752   # Find out which ABI we are using.
5753   echo 'int i;' > conftest.$ac_ext
5754   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5755   (eval $ac_compile) 2>&5
5756   ac_status=$?
5757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5758   (exit $ac_status); }; then
5759     case `/usr/bin/file conftest.o` in
5760     *32-bit*)
5761       case $host in
5762         x86_64-*linux*)
5763           LD="${LD-ld} -m elf_i386"
5764           ;;
5765         ppc64-*linux*|powerpc64-*linux*)
5766           LD="${LD-ld} -m elf32ppclinux"
5767           ;;
5768         s390x-*linux*)
5769           LD="${LD-ld} -m elf_s390"
5770           ;;
5771         sparc64-*linux*)
5772           LD="${LD-ld} -m elf32_sparc"
5773           ;;
5774       esac
5775       ;;
5776     *64-bit*)
5777       case $host in
5778         x86_64-*linux*)
5779           LD="${LD-ld} -m elf_x86_64"
5780           ;;
5781         ppc*-*linux*|powerpc*-*linux*)
5782           LD="${LD-ld} -m elf64ppc"
5783           ;;
5784         s390*-*linux*)
5785           LD="${LD-ld} -m elf64_s390"
5786           ;;
5787         sparc*-*linux*)
5788           LD="${LD-ld} -m elf64_sparc"
5789           ;;
5790       esac
5791       ;;
5792     esac
5793   fi
5794   rm -rf conftest*
5795   ;;
5796
5797 *-*-sco3.2v5*)
5798   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
5799   SAVE_CFLAGS="$CFLAGS"
5800   CFLAGS="$CFLAGS -belf"
5801   echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
5802 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
5803 if test "${lt_cv_cc_needs_belf+set}" = set; then
5804   echo $ECHO_N "(cached) $ECHO_C" >&6
5805 else
5806   ac_ext=c
5807 ac_cpp='$CPP $CPPFLAGS'
5808 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5809 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5810 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5811
5812      cat >conftest.$ac_ext <<_ACEOF
5813 /* confdefs.h.  */
5814 _ACEOF
5815 cat confdefs.h >>conftest.$ac_ext
5816 cat >>conftest.$ac_ext <<_ACEOF
5817 /* end confdefs.h.  */
5818
5819 int
5820 main ()
5821 {
5822
5823   ;
5824   return 0;
5825 }
5826 _ACEOF
5827 rm -f conftest.$ac_objext conftest$ac_exeext
5828 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5829   (eval $ac_link) 2>conftest.er1
5830   ac_status=$?
5831   grep -v '^ *+' conftest.er1 >conftest.err
5832   rm -f conftest.er1
5833   cat conftest.err >&5
5834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5835   (exit $ac_status); } &&
5836          { ac_try='test -z "$ac_c_werror_flag"
5837                          || test ! -s conftest.err'
5838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5839   (eval $ac_try) 2>&5
5840   ac_status=$?
5841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5842   (exit $ac_status); }; } &&
5843          { ac_try='test -s conftest$ac_exeext'
5844   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5845   (eval $ac_try) 2>&5
5846   ac_status=$?
5847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5848   (exit $ac_status); }; }; then
5849   lt_cv_cc_needs_belf=yes
5850 else
5851   echo "$as_me: failed program was:" >&5
5852 sed 's/^/| /' conftest.$ac_ext >&5
5853
5854 lt_cv_cc_needs_belf=no
5855 fi
5856 rm -f conftest.err conftest.$ac_objext \
5857       conftest$ac_exeext conftest.$ac_ext
5858      ac_ext=c
5859 ac_cpp='$CPP $CPPFLAGS'
5860 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5861 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5862 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5863
5864 fi
5865 echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
5866 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
5867   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5868     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5869     CFLAGS="$SAVE_CFLAGS"
5870   fi
5871   ;;
5872 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
5873   if test -n "$ac_tool_prefix"; then
5874   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5875 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
5876 echo "$as_me:$LINENO: checking for $ac_word" >&5
5877 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5878 if test "${ac_cv_prog_DLLTOOL+set}" = set; then
5879   echo $ECHO_N "(cached) $ECHO_C" >&6
5880 else
5881   if test -n "$DLLTOOL"; then
5882   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
5883 else
5884 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5885 for as_dir in $PATH
5886 do
5887   IFS=$as_save_IFS
5888   test -z "$as_dir" && as_dir=.
5889   for ac_exec_ext in '' $ac_executable_extensions; do
5890   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5891     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
5892     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5893     break 2
5894   fi
5895 done
5896 done
5897
5898 fi
5899 fi
5900 DLLTOOL=$ac_cv_prog_DLLTOOL
5901 if test -n "$DLLTOOL"; then
5902   echo "$as_me:$LINENO: result: $DLLTOOL" >&5
5903 echo "${ECHO_T}$DLLTOOL" >&6
5904 else
5905   echo "$as_me:$LINENO: result: no" >&5
5906 echo "${ECHO_T}no" >&6
5907 fi
5908
5909 fi
5910 if test -z "$ac_cv_prog_DLLTOOL"; then
5911   ac_ct_DLLTOOL=$DLLTOOL
5912   # Extract the first word of "dlltool", so it can be a program name with args.
5913 set dummy dlltool; ac_word=$2
5914 echo "$as_me:$LINENO: checking for $ac_word" >&5
5915 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5916 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
5917   echo $ECHO_N "(cached) $ECHO_C" >&6
5918 else
5919   if test -n "$ac_ct_DLLTOOL"; then
5920   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
5921 else
5922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5923 for as_dir in $PATH
5924 do
5925   IFS=$as_save_IFS
5926   test -z "$as_dir" && as_dir=.
5927   for ac_exec_ext in '' $ac_executable_extensions; do
5928   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5929     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
5930     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5931     break 2
5932   fi
5933 done
5934 done
5935
5936   test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="false"
5937 fi
5938 fi
5939 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
5940 if test -n "$ac_ct_DLLTOOL"; then
5941   echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
5942 echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
5943 else
5944   echo "$as_me:$LINENO: result: no" >&5
5945 echo "${ECHO_T}no" >&6
5946 fi
5947
5948   DLLTOOL=$ac_ct_DLLTOOL
5949 else
5950   DLLTOOL="$ac_cv_prog_DLLTOOL"
5951 fi
5952
5953   if test -n "$ac_tool_prefix"; then
5954   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
5955 set dummy ${ac_tool_prefix}as; ac_word=$2
5956 echo "$as_me:$LINENO: checking for $ac_word" >&5
5957 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5958 if test "${ac_cv_prog_AS+set}" = set; then
5959   echo $ECHO_N "(cached) $ECHO_C" >&6
5960 else
5961   if test -n "$AS"; then
5962   ac_cv_prog_AS="$AS" # Let the user override the test.
5963 else
5964 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5965 for as_dir in $PATH
5966 do
5967   IFS=$as_save_IFS
5968   test -z "$as_dir" && as_dir=.
5969   for ac_exec_ext in '' $ac_executable_extensions; do
5970   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5971     ac_cv_prog_AS="${ac_tool_prefix}as"
5972     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5973     break 2
5974   fi
5975 done
5976 done
5977
5978 fi
5979 fi
5980 AS=$ac_cv_prog_AS
5981 if test -n "$AS"; then
5982   echo "$as_me:$LINENO: result: $AS" >&5
5983 echo "${ECHO_T}$AS" >&6
5984 else
5985   echo "$as_me:$LINENO: result: no" >&5
5986 echo "${ECHO_T}no" >&6
5987 fi
5988
5989 fi
5990 if test -z "$ac_cv_prog_AS"; then
5991   ac_ct_AS=$AS
5992   # Extract the first word of "as", so it can be a program name with args.
5993 set dummy as; ac_word=$2
5994 echo "$as_me:$LINENO: checking for $ac_word" >&5
5995 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5996 if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
5997   echo $ECHO_N "(cached) $ECHO_C" >&6
5998 else
5999   if test -n "$ac_ct_AS"; then
6000   ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
6001 else
6002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6003 for as_dir in $PATH
6004 do
6005   IFS=$as_save_IFS
6006   test -z "$as_dir" && as_dir=.
6007   for ac_exec_ext in '' $ac_executable_extensions; do
6008   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6009     ac_cv_prog_ac_ct_AS="as"
6010     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6011     break 2
6012   fi
6013 done
6014 done
6015
6016   test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="false"
6017 fi
6018 fi
6019 ac_ct_AS=$ac_cv_prog_ac_ct_AS
6020 if test -n "$ac_ct_AS"; then
6021   echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
6022 echo "${ECHO_T}$ac_ct_AS" >&6
6023 else
6024   echo "$as_me:$LINENO: result: no" >&5
6025 echo "${ECHO_T}no" >&6
6026 fi
6027
6028   AS=$ac_ct_AS
6029 else
6030   AS="$ac_cv_prog_AS"
6031 fi
6032
6033   if test -n "$ac_tool_prefix"; then
6034   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
6035 set dummy ${ac_tool_prefix}objdump; ac_word=$2
6036 echo "$as_me:$LINENO: checking for $ac_word" >&5
6037 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6038 if test "${ac_cv_prog_OBJDUMP+set}" = set; then
6039   echo $ECHO_N "(cached) $ECHO_C" >&6
6040 else
6041   if test -n "$OBJDUMP"; then
6042   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
6043 else
6044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6045 for as_dir in $PATH
6046 do
6047   IFS=$as_save_IFS
6048   test -z "$as_dir" && as_dir=.
6049   for ac_exec_ext in '' $ac_executable_extensions; do
6050   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6051     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
6052     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6053     break 2
6054   fi
6055 done
6056 done
6057
6058 fi
6059 fi
6060 OBJDUMP=$ac_cv_prog_OBJDUMP
6061 if test -n "$OBJDUMP"; then
6062   echo "$as_me:$LINENO: result: $OBJDUMP" >&5
6063 echo "${ECHO_T}$OBJDUMP" >&6
6064 else
6065   echo "$as_me:$LINENO: result: no" >&5
6066 echo "${ECHO_T}no" >&6
6067 fi
6068
6069 fi
6070 if test -z "$ac_cv_prog_OBJDUMP"; then
6071   ac_ct_OBJDUMP=$OBJDUMP
6072   # Extract the first word of "objdump", so it can be a program name with args.
6073 set dummy objdump; ac_word=$2
6074 echo "$as_me:$LINENO: checking for $ac_word" >&5
6075 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6076 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
6077   echo $ECHO_N "(cached) $ECHO_C" >&6
6078 else
6079   if test -n "$ac_ct_OBJDUMP"; then
6080   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
6081 else
6082 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6083 for as_dir in $PATH
6084 do
6085   IFS=$as_save_IFS
6086   test -z "$as_dir" && as_dir=.
6087   for ac_exec_ext in '' $ac_executable_extensions; do
6088   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6089     ac_cv_prog_ac_ct_OBJDUMP="objdump"
6090     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6091     break 2
6092   fi
6093 done
6094 done
6095
6096   test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false"
6097 fi
6098 fi
6099 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
6100 if test -n "$ac_ct_OBJDUMP"; then
6101   echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
6102 echo "${ECHO_T}$ac_ct_OBJDUMP" >&6
6103 else
6104   echo "$as_me:$LINENO: result: no" >&5
6105 echo "${ECHO_T}no" >&6
6106 fi
6107
6108   OBJDUMP=$ac_ct_OBJDUMP
6109 else
6110   OBJDUMP="$ac_cv_prog_OBJDUMP"
6111 fi
6112
6113   ;;
6114
6115 esac
6116
6117 need_locks="$enable_libtool_lock"
6118
6119
6120 ac_ext=c
6121 ac_cpp='$CPP $CPPFLAGS'
6122 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6123 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6124 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6125 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
6126 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
6127 # On Suns, sometimes $CPP names a directory.
6128 if test -n "$CPP" && test -d "$CPP"; then
6129   CPP=
6130 fi
6131 if test -z "$CPP"; then
6132   if test "${ac_cv_prog_CPP+set}" = set; then
6133   echo $ECHO_N "(cached) $ECHO_C" >&6
6134 else
6135       # Double quotes because CPP needs to be expanded
6136     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6137     do
6138       ac_preproc_ok=false
6139 for ac_c_preproc_warn_flag in '' yes
6140 do
6141   # Use a header file that comes with gcc, so configuring glibc
6142   # with a fresh cross-compiler works.
6143   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6144   # <limits.h> exists even on freestanding compilers.
6145   # On the NeXT, cc -E runs the code through the compiler's parser,
6146   # not just through cpp. "Syntax error" is here to catch this case.
6147   cat >conftest.$ac_ext <<_ACEOF
6148 /* confdefs.h.  */
6149 _ACEOF
6150 cat confdefs.h >>conftest.$ac_ext
6151 cat >>conftest.$ac_ext <<_ACEOF
6152 /* end confdefs.h.  */
6153 #ifdef __STDC__
6154 # include <limits.h>
6155 #else
6156 # include <assert.h>
6157 #endif
6158                      Syntax error
6159 _ACEOF
6160 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6161   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6162   ac_status=$?
6163   grep -v '^ *+' conftest.er1 >conftest.err
6164   rm -f conftest.er1
6165   cat conftest.err >&5
6166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6167   (exit $ac_status); } >/dev/null; then
6168   if test -s conftest.err; then
6169     ac_cpp_err=$ac_c_preproc_warn_flag
6170     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6171   else
6172     ac_cpp_err=
6173   fi
6174 else
6175   ac_cpp_err=yes
6176 fi
6177 if test -z "$ac_cpp_err"; then
6178   :
6179 else
6180   echo "$as_me: failed program was:" >&5
6181 sed 's/^/| /' conftest.$ac_ext >&5
6182
6183   # Broken: fails on valid input.
6184 continue
6185 fi
6186 rm -f conftest.err conftest.$ac_ext
6187
6188   # OK, works on sane cases.  Now check whether non-existent headers
6189   # can be detected and how.
6190   cat >conftest.$ac_ext <<_ACEOF
6191 /* confdefs.h.  */
6192 _ACEOF
6193 cat confdefs.h >>conftest.$ac_ext
6194 cat >>conftest.$ac_ext <<_ACEOF
6195 /* end confdefs.h.  */
6196 #include <ac_nonexistent.h>
6197 _ACEOF
6198 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6199   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6200   ac_status=$?
6201   grep -v '^ *+' conftest.er1 >conftest.err
6202   rm -f conftest.er1
6203   cat conftest.err >&5
6204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6205   (exit $ac_status); } >/dev/null; then
6206   if test -s conftest.err; then
6207     ac_cpp_err=$ac_c_preproc_warn_flag
6208     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6209   else
6210     ac_cpp_err=
6211   fi
6212 else
6213   ac_cpp_err=yes
6214 fi
6215 if test -z "$ac_cpp_err"; then
6216   # Broken: success on invalid input.
6217 continue
6218 else
6219   echo "$as_me: failed program was:" >&5
6220 sed 's/^/| /' conftest.$ac_ext >&5
6221
6222   # Passes both tests.
6223 ac_preproc_ok=:
6224 break
6225 fi
6226 rm -f conftest.err conftest.$ac_ext
6227
6228 done
6229 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6230 rm -f conftest.err conftest.$ac_ext
6231 if $ac_preproc_ok; then
6232   break
6233 fi
6234
6235     done
6236     ac_cv_prog_CPP=$CPP
6237
6238 fi
6239   CPP=$ac_cv_prog_CPP
6240 else
6241   ac_cv_prog_CPP=$CPP
6242 fi
6243 echo "$as_me:$LINENO: result: $CPP" >&5
6244 echo "${ECHO_T}$CPP" >&6
6245 ac_preproc_ok=false
6246 for ac_c_preproc_warn_flag in '' yes
6247 do
6248   # Use a header file that comes with gcc, so configuring glibc
6249   # with a fresh cross-compiler works.
6250   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6251   # <limits.h> exists even on freestanding compilers.
6252   # On the NeXT, cc -E runs the code through the compiler's parser,
6253   # not just through cpp. "Syntax error" is here to catch this case.
6254   cat >conftest.$ac_ext <<_ACEOF
6255 /* confdefs.h.  */
6256 _ACEOF
6257 cat confdefs.h >>conftest.$ac_ext
6258 cat >>conftest.$ac_ext <<_ACEOF
6259 /* end confdefs.h.  */
6260 #ifdef __STDC__
6261 # include <limits.h>
6262 #else
6263 # include <assert.h>
6264 #endif
6265                      Syntax error
6266 _ACEOF
6267 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6268   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6269   ac_status=$?
6270   grep -v '^ *+' conftest.er1 >conftest.err
6271   rm -f conftest.er1
6272   cat conftest.err >&5
6273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6274   (exit $ac_status); } >/dev/null; then
6275   if test -s conftest.err; then
6276     ac_cpp_err=$ac_c_preproc_warn_flag
6277     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6278   else
6279     ac_cpp_err=
6280   fi
6281 else
6282   ac_cpp_err=yes
6283 fi
6284 if test -z "$ac_cpp_err"; then
6285   :
6286 else
6287   echo "$as_me: failed program was:" >&5
6288 sed 's/^/| /' conftest.$ac_ext >&5
6289
6290   # Broken: fails on valid input.
6291 continue
6292 fi
6293 rm -f conftest.err conftest.$ac_ext
6294
6295   # OK, works on sane cases.  Now check whether non-existent headers
6296   # can be detected and how.
6297   cat >conftest.$ac_ext <<_ACEOF
6298 /* confdefs.h.  */
6299 _ACEOF
6300 cat confdefs.h >>conftest.$ac_ext
6301 cat >>conftest.$ac_ext <<_ACEOF
6302 /* end confdefs.h.  */
6303 #include <ac_nonexistent.h>
6304 _ACEOF
6305 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6306   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6307   ac_status=$?
6308   grep -v '^ *+' conftest.er1 >conftest.err
6309   rm -f conftest.er1
6310   cat conftest.err >&5
6311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6312   (exit $ac_status); } >/dev/null; then
6313   if test -s conftest.err; then
6314     ac_cpp_err=$ac_c_preproc_warn_flag
6315     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6316   else
6317     ac_cpp_err=
6318   fi
6319 else
6320   ac_cpp_err=yes
6321 fi
6322 if test -z "$ac_cpp_err"; then
6323   # Broken: success on invalid input.
6324 continue
6325 else
6326   echo "$as_me: failed program was:" >&5
6327 sed 's/^/| /' conftest.$ac_ext >&5
6328
6329   # Passes both tests.
6330 ac_preproc_ok=:
6331 break
6332 fi
6333 rm -f conftest.err conftest.$ac_ext
6334
6335 done
6336 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6337 rm -f conftest.err conftest.$ac_ext
6338 if $ac_preproc_ok; then
6339   :
6340 else
6341   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
6342 See \`config.log' for more details." >&5
6343 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
6344 See \`config.log' for more details." >&2;}
6345    { (exit 1); exit 1; }; }
6346 fi
6347
6348 ac_ext=c
6349 ac_cpp='$CPP $CPPFLAGS'
6350 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6351 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6352 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6353
6354
6355 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6356 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6357 if test "${ac_cv_header_stdc+set}" = set; then
6358   echo $ECHO_N "(cached) $ECHO_C" >&6
6359 else
6360   cat >conftest.$ac_ext <<_ACEOF
6361 /* confdefs.h.  */
6362 _ACEOF
6363 cat confdefs.h >>conftest.$ac_ext
6364 cat >>conftest.$ac_ext <<_ACEOF
6365 /* end confdefs.h.  */
6366 #include <stdlib.h>
6367 #include <stdarg.h>
6368 #include <string.h>
6369 #include <float.h>
6370
6371 int
6372 main ()
6373 {
6374
6375   ;
6376   return 0;
6377 }
6378 _ACEOF
6379 rm -f conftest.$ac_objext
6380 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6381   (eval $ac_compile) 2>conftest.er1
6382   ac_status=$?
6383   grep -v '^ *+' conftest.er1 >conftest.err
6384   rm -f conftest.er1
6385   cat conftest.err >&5
6386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6387   (exit $ac_status); } &&
6388          { ac_try='test -z "$ac_c_werror_flag"
6389                          || test ! -s conftest.err'
6390   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6391   (eval $ac_try) 2>&5
6392   ac_status=$?
6393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6394   (exit $ac_status); }; } &&
6395          { ac_try='test -s conftest.$ac_objext'
6396   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6397   (eval $ac_try) 2>&5
6398   ac_status=$?
6399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6400   (exit $ac_status); }; }; then
6401   ac_cv_header_stdc=yes
6402 else
6403   echo "$as_me: failed program was:" >&5
6404 sed 's/^/| /' conftest.$ac_ext >&5
6405
6406 ac_cv_header_stdc=no
6407 fi
6408 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6409
6410 if test $ac_cv_header_stdc = yes; then
6411   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6412   cat >conftest.$ac_ext <<_ACEOF
6413 /* confdefs.h.  */
6414 _ACEOF
6415 cat confdefs.h >>conftest.$ac_ext
6416 cat >>conftest.$ac_ext <<_ACEOF
6417 /* end confdefs.h.  */
6418 #include <string.h>
6419
6420 _ACEOF
6421 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6422   $EGREP "memchr" >/dev/null 2>&1; then
6423   :
6424 else
6425   ac_cv_header_stdc=no
6426 fi
6427 rm -f conftest*
6428
6429 fi
6430
6431 if test $ac_cv_header_stdc = yes; then
6432   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6433   cat >conftest.$ac_ext <<_ACEOF
6434 /* confdefs.h.  */
6435 _ACEOF
6436 cat confdefs.h >>conftest.$ac_ext
6437 cat >>conftest.$ac_ext <<_ACEOF
6438 /* end confdefs.h.  */
6439 #include <stdlib.h>
6440
6441 _ACEOF
6442 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6443   $EGREP "free" >/dev/null 2>&1; then
6444   :
6445 else
6446   ac_cv_header_stdc=no
6447 fi
6448 rm -f conftest*
6449
6450 fi
6451
6452 if test $ac_cv_header_stdc = yes; then
6453   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6454   if test "$cross_compiling" = yes; then
6455   :
6456 else
6457   cat >conftest.$ac_ext <<_ACEOF
6458 /* confdefs.h.  */
6459 _ACEOF
6460 cat confdefs.h >>conftest.$ac_ext
6461 cat >>conftest.$ac_ext <<_ACEOF
6462 /* end confdefs.h.  */
6463 #include <ctype.h>
6464 #if ((' ' & 0x0FF) == 0x020)
6465 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6466 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6467 #else
6468 # define ISLOWER(c) \
6469                    (('a' <= (c) && (c) <= 'i') \
6470                      || ('j' <= (c) && (c) <= 'r') \
6471                      || ('s' <= (c) && (c) <= 'z'))
6472 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6473 #endif
6474
6475 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6476 int
6477 main ()
6478 {
6479   int i;
6480   for (i = 0; i < 256; i++)
6481     if (XOR (islower (i), ISLOWER (i))
6482         || toupper (i) != TOUPPER (i))
6483       exit(2);
6484   exit (0);
6485 }
6486 _ACEOF
6487 rm -f conftest$ac_exeext
6488 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6489   (eval $ac_link) 2>&5
6490   ac_status=$?
6491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6492   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6494   (eval $ac_try) 2>&5
6495   ac_status=$?
6496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6497   (exit $ac_status); }; }; then
6498   :
6499 else
6500   echo "$as_me: program exited with status $ac_status" >&5
6501 echo "$as_me: failed program was:" >&5
6502 sed 's/^/| /' conftest.$ac_ext >&5
6503
6504 ( exit $ac_status )
6505 ac_cv_header_stdc=no
6506 fi
6507 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6508 fi
6509 fi
6510 fi
6511 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6512 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6513 if test $ac_cv_header_stdc = yes; then
6514
6515 cat >>confdefs.h <<\_ACEOF
6516 #define STDC_HEADERS 1
6517 _ACEOF
6518
6519 fi
6520
6521 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6532                   inttypes.h stdint.h unistd.h
6533 do
6534 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6535 echo "$as_me:$LINENO: checking for $ac_header" >&5
6536 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6537 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6538   echo $ECHO_N "(cached) $ECHO_C" >&6
6539 else
6540   cat >conftest.$ac_ext <<_ACEOF
6541 /* confdefs.h.  */
6542 _ACEOF
6543 cat confdefs.h >>conftest.$ac_ext
6544 cat >>conftest.$ac_ext <<_ACEOF
6545 /* end confdefs.h.  */
6546 $ac_includes_default
6547
6548 #include <$ac_header>
6549 _ACEOF
6550 rm -f conftest.$ac_objext
6551 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6552   (eval $ac_compile) 2>conftest.er1
6553   ac_status=$?
6554   grep -v '^ *+' conftest.er1 >conftest.err
6555   rm -f conftest.er1
6556   cat conftest.err >&5
6557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6558   (exit $ac_status); } &&
6559          { ac_try='test -z "$ac_c_werror_flag"
6560                          || test ! -s conftest.err'
6561   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6562   (eval $ac_try) 2>&5
6563   ac_status=$?
6564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6565   (exit $ac_status); }; } &&
6566          { ac_try='test -s conftest.$ac_objext'
6567   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6568   (eval $ac_try) 2>&5
6569   ac_status=$?
6570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6571   (exit $ac_status); }; }; then
6572   eval "$as_ac_Header=yes"
6573 else
6574   echo "$as_me: failed program was:" >&5
6575 sed 's/^/| /' conftest.$ac_ext >&5
6576
6577 eval "$as_ac_Header=no"
6578 fi
6579 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6580 fi
6581 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6582 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6583 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6584   cat >>confdefs.h <<_ACEOF
6585 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6586 _ACEOF
6587
6588 fi
6589
6590 done
6591
6592
6593
6594 for ac_header in dlfcn.h
6595 do
6596 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6597 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6598   echo "$as_me:$LINENO: checking for $ac_header" >&5
6599 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6600 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6601   echo $ECHO_N "(cached) $ECHO_C" >&6
6602 fi
6603 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6604 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6605 else
6606   # Is the header compilable?
6607 echo "$as_me:$LINENO: checking $ac_header usability" >&5
6608 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6609 cat >conftest.$ac_ext <<_ACEOF
6610 /* confdefs.h.  */
6611 _ACEOF
6612 cat confdefs.h >>conftest.$ac_ext
6613 cat >>conftest.$ac_ext <<_ACEOF
6614 /* end confdefs.h.  */
6615 $ac_includes_default
6616 #include <$ac_header>
6617 _ACEOF
6618 rm -f conftest.$ac_objext
6619 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6620   (eval $ac_compile) 2>conftest.er1
6621   ac_status=$?
6622   grep -v '^ *+' conftest.er1 >conftest.err
6623   rm -f conftest.er1
6624   cat conftest.err >&5
6625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6626   (exit $ac_status); } &&
6627          { ac_try='test -z "$ac_c_werror_flag"
6628                          || test ! -s conftest.err'
6629   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6630   (eval $ac_try) 2>&5
6631   ac_status=$?
6632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6633   (exit $ac_status); }; } &&
6634          { ac_try='test -s conftest.$ac_objext'
6635   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6636   (eval $ac_try) 2>&5
6637   ac_status=$?
6638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6639   (exit $ac_status); }; }; then
6640   ac_header_compiler=yes
6641 else
6642   echo "$as_me: failed program was:" >&5
6643 sed 's/^/| /' conftest.$ac_ext >&5
6644
6645 ac_header_compiler=no
6646 fi
6647 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6648 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6649 echo "${ECHO_T}$ac_header_compiler" >&6
6650
6651 # Is the header present?
6652 echo "$as_me:$LINENO: checking $ac_header presence" >&5
6653 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6654 cat >conftest.$ac_ext <<_ACEOF
6655 /* confdefs.h.  */
6656 _ACEOF
6657 cat confdefs.h >>conftest.$ac_ext
6658 cat >>conftest.$ac_ext <<_ACEOF
6659 /* end confdefs.h.  */
6660 #include <$ac_header>
6661 _ACEOF
6662 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6663   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6664   ac_status=$?
6665   grep -v '^ *+' conftest.er1 >conftest.err
6666   rm -f conftest.er1
6667   cat conftest.err >&5
6668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6669   (exit $ac_status); } >/dev/null; then
6670   if test -s conftest.err; then
6671     ac_cpp_err=$ac_c_preproc_warn_flag
6672     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6673   else
6674     ac_cpp_err=
6675   fi
6676 else
6677   ac_cpp_err=yes
6678 fi
6679 if test -z "$ac_cpp_err"; then
6680   ac_header_preproc=yes
6681 else
6682   echo "$as_me: failed program was:" >&5
6683 sed 's/^/| /' conftest.$ac_ext >&5
6684
6685   ac_header_preproc=no
6686 fi
6687 rm -f conftest.err conftest.$ac_ext
6688 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6689 echo "${ECHO_T}$ac_header_preproc" >&6
6690
6691 # So?  What about this header?
6692 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6693   yes:no: )
6694     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6695 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6696     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6697 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6698     ac_header_preproc=yes
6699     ;;
6700   no:yes:* )
6701     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6702 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6703     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6704 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6705     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6706 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6707     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6708 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6709     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6710 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6711     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6712 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6713     (
6714       cat <<\_ASBOX
6715 ## --------------------------------------------- ##
6716 ## Report this to <http://www.openldap.org/its/> ##
6717 ## --------------------------------------------- ##
6718 _ASBOX
6719     ) |
6720       sed "s/^/$as_me: WARNING:     /" >&2
6721     ;;
6722 esac
6723 echo "$as_me:$LINENO: checking for $ac_header" >&5
6724 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6725 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6726   echo $ECHO_N "(cached) $ECHO_C" >&6
6727 else
6728   eval "$as_ac_Header=\$ac_header_preproc"
6729 fi
6730 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6731 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6732
6733 fi
6734 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6735   cat >>confdefs.h <<_ACEOF
6736 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6737 _ACEOF
6738
6739 fi
6740
6741 done
6742
6743
6744 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
6745
6746 # find the maximum length of command line arguments
6747 echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
6748 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
6749 if test "${lt_cv_sys_max_cmd_len+set}" = set; then
6750   echo $ECHO_N "(cached) $ECHO_C" >&6
6751 else
6752     i=0
6753   teststring="ABCD"
6754
6755   case $build_os in
6756   msdosdjgpp*)
6757     # On DJGPP, this test can blow up pretty badly due to problems in libc
6758     # (any single argument exceeding 2000 bytes causes a buffer overrun
6759     # during glob expansion).  Even if it were fixed, the result of this
6760     # check would be larger than it should be.
6761     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
6762     ;;
6763
6764   gnu*)
6765     # Under GNU Hurd, this test is not required because there is
6766     # no limit to the length of command line arguments.
6767     # Libtool will interpret -1 as no limit whatsoever
6768     lt_cv_sys_max_cmd_len=-1;
6769     ;;
6770
6771   cygwin* | mingw*)
6772     # On Win9x/ME, this test blows up -- it succeeds, but takes
6773     # about 5 minutes as the teststring grows exponentially.
6774     # Worse, since 9x/ME are not pre-emptively multitasking,
6775     # you end up with a "frozen" computer, even though with patience
6776     # the test eventually succeeds (with a max line length of 256k).
6777     # Instead, let's just punt: use the minimum linelength reported by
6778     # all of the supported platforms: 8192 (on NT/2K/XP).
6779     lt_cv_sys_max_cmd_len=8192;
6780     ;;
6781
6782   amigaos*)
6783     # On AmigaOS with pdksh, this test takes hours, literally.
6784     # So we just punt and use a minimum line length of 8192.
6785     lt_cv_sys_max_cmd_len=8192;
6786     ;;
6787
6788   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
6789     # This has been around since 386BSD, at least.  Likely further.
6790     if test -x /sbin/sysctl; then
6791       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
6792     elif test -x /usr/sbin/sysctl; then
6793       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
6794     else
6795       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
6796     fi
6797     # And add a safety zone
6798     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6799     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6800     ;;
6801   osf*)
6802     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
6803     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
6804     # nice to cause kernel panics so lets avoid the loop below.
6805     # First set a reasonable default.
6806     lt_cv_sys_max_cmd_len=16384
6807     #
6808     if test -x /sbin/sysconfig; then
6809       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
6810         *1*) lt_cv_sys_max_cmd_len=-1 ;;
6811       esac
6812     fi
6813     ;;
6814   *)
6815     # If test is not a shell built-in, we'll probably end up computing a
6816     # maximum length that is only half of the actual maximum length, but
6817     # we can't tell.
6818     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
6819     while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
6820                = "XX$teststring") >/dev/null 2>&1 &&
6821             new_result=`expr "X$teststring" : ".*" 2>&1` &&
6822             lt_cv_sys_max_cmd_len=$new_result &&
6823             test $i != 17 # 1/2 MB should be enough
6824     do
6825       i=`expr $i + 1`
6826       teststring=$teststring$teststring
6827     done
6828     teststring=
6829     # Add a significant safety factor because C++ compilers can tack on massive
6830     # amounts of additional arguments before passing them to the linker.
6831     # It appears as though 1/2 is a usable value.
6832     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6833     ;;
6834   esac
6835
6836 fi
6837
6838 if test -n $lt_cv_sys_max_cmd_len ; then
6839   echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
6840 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
6841 else
6842   echo "$as_me:$LINENO: result: none" >&5
6843 echo "${ECHO_T}none" >&6
6844 fi
6845
6846
6847
6848
6849 # Check for command to grab the raw symbol name followed by C symbol from nm.
6850 echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
6851 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
6852 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
6853   echo $ECHO_N "(cached) $ECHO_C" >&6
6854 else
6855
6856 # These are sane defaults that work on at least a few old systems.
6857 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
6858
6859 # Character class describing NM global symbol codes.
6860 symcode='[BCDEGRST]'
6861
6862 # Regexp to match symbols that can be accessed directly from C.
6863 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
6864
6865 # Transform an extracted symbol line into a proper C declaration
6866 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6867
6868 # Transform an extracted symbol line into symbol name and symbol address
6869 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'"
6870
6871 # Define system-specific variables.
6872 case $host_os in
6873 aix*)
6874   symcode='[BCDT]'
6875   ;;
6876 cygwin* | mingw* | pw32*)
6877   symcode='[ABCDGISTW]'
6878   ;;
6879 hpux*) # Its linker distinguishes data from code symbols
6880   if test "$host_cpu" = ia64; then
6881     symcode='[ABCDEGRST]'
6882   fi
6883   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6884   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'"
6885   ;;
6886 linux*)
6887   if test "$host_cpu" = ia64; then
6888     symcode='[ABCDGIRSTW]'
6889     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6890     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'"
6891   fi
6892   ;;
6893 irix* | nonstopux*)
6894   symcode='[BCDEGRST]'
6895   ;;
6896 osf*)
6897   symcode='[BCDEGQRST]'
6898   ;;
6899 solaris* | sysv5*)
6900   symcode='[BDRT]'
6901   ;;
6902 sysv4)
6903   symcode='[DFNSTU]'
6904   ;;
6905 esac
6906
6907 # Handle CRLF in mingw tool chain
6908 opt_cr=
6909 case $build_os in
6910 mingw*)
6911   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6912   ;;
6913 esac
6914
6915 # If we're using GNU nm, then use its standard symbol codes.
6916 case `$NM -V 2>&1` in
6917 *GNU* | *'with BFD'*)
6918   symcode='[ABCDGIRSTW]' ;;
6919 esac
6920
6921 # Try without a prefix undercore, then with it.
6922 for ac_symprfx in "" "_"; do
6923
6924   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6925   symxfrm="\\1 $ac_symprfx\\2 \\2"
6926
6927   # Write the raw and C identifiers.
6928   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[       ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6929
6930   # Check to see that the pipe works correctly.
6931   pipe_works=no
6932
6933   rm -f conftest*
6934   cat > conftest.$ac_ext <<EOF
6935 #ifdef __cplusplus
6936 extern "C" {
6937 #endif
6938 char nm_test_var;
6939 void nm_test_func(){}
6940 #ifdef __cplusplus
6941 }
6942 #endif
6943 int main(){nm_test_var='a';nm_test_func();return(0);}
6944 EOF
6945
6946   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6947   (eval $ac_compile) 2>&5
6948   ac_status=$?
6949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6950   (exit $ac_status); }; then
6951     # Now try to grab the symbols.
6952     nlist=conftest.nm
6953     if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
6954   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
6955   ac_status=$?
6956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6957   (exit $ac_status); } && test -s "$nlist"; then
6958       # Try sorting and uniquifying the output.
6959       if sort "$nlist" | uniq > "$nlist"T; then
6960         mv -f "$nlist"T "$nlist"
6961       else
6962         rm -f "$nlist"T
6963       fi
6964
6965       # Make sure that we snagged all the symbols we need.
6966       if grep ' nm_test_var$' "$nlist" >/dev/null; then
6967         if grep ' nm_test_func$' "$nlist" >/dev/null; then
6968           cat <<EOF > conftest.$ac_ext
6969 #ifdef __cplusplus
6970 extern "C" {
6971 #endif
6972
6973 EOF
6974           # Now generate the symbol file.
6975           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6976
6977           cat <<EOF >> conftest.$ac_ext
6978 #if defined (__STDC__) && __STDC__
6979 # define lt_ptr_t void *
6980 #else
6981 # define lt_ptr_t char *
6982 # define const
6983 #endif
6984
6985 /* The mapping between symbol names and symbols. */
6986 const struct {
6987   const char *name;
6988   lt_ptr_t address;
6989 }
6990 lt_preloaded_symbols[] =
6991 {
6992 EOF
6993           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
6994           cat <<\EOF >> conftest.$ac_ext
6995   {0, (lt_ptr_t) 0}
6996 };
6997
6998 #ifdef __cplusplus
6999 }
7000 #endif
7001 EOF
7002           # Now try linking the two files.
7003           mv conftest.$ac_objext conftstm.$ac_objext
7004           lt_save_LIBS="$LIBS"
7005           lt_save_CFLAGS="$CFLAGS"
7006           LIBS="conftstm.$ac_objext"
7007           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7008           if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7009   (eval $ac_link) 2>&5
7010   ac_status=$?
7011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7012   (exit $ac_status); } && test -s conftest${ac_exeext}; then
7013             pipe_works=yes
7014           fi
7015           LIBS="$lt_save_LIBS"
7016           CFLAGS="$lt_save_CFLAGS"
7017         else
7018           echo "cannot find nm_test_func in $nlist" >&5
7019         fi
7020       else
7021         echo "cannot find nm_test_var in $nlist" >&5
7022       fi
7023     else
7024       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7025     fi
7026   else
7027     echo "$progname: failed program was:" >&5
7028     cat conftest.$ac_ext >&5
7029   fi
7030   rm -f conftest* conftst*
7031
7032   # Do not use the global_symbol_pipe unless it works.
7033   if test "$pipe_works" = yes; then
7034     break
7035   else
7036     lt_cv_sys_global_symbol_pipe=
7037   fi
7038 done
7039
7040 fi
7041
7042 if test -z "$lt_cv_sys_global_symbol_pipe"; then
7043   lt_cv_sys_global_symbol_to_cdecl=
7044 fi
7045 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7046   echo "$as_me:$LINENO: result: failed" >&5
7047 echo "${ECHO_T}failed" >&6
7048 else
7049   echo "$as_me:$LINENO: result: ok" >&5
7050 echo "${ECHO_T}ok" >&6
7051 fi
7052
7053 echo "$as_me:$LINENO: checking for objdir" >&5
7054 echo $ECHO_N "checking for objdir... $ECHO_C" >&6
7055 if test "${lt_cv_objdir+set}" = set; then
7056   echo $ECHO_N "(cached) $ECHO_C" >&6
7057 else
7058   rm -f .libs 2>/dev/null
7059 mkdir .libs 2>/dev/null
7060 if test -d .libs; then
7061   lt_cv_objdir=.libs
7062 else
7063   # MS-DOS does not allow filenames that begin with a dot.
7064   lt_cv_objdir=_libs
7065 fi
7066 rmdir .libs 2>/dev/null
7067 fi
7068 echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
7069 echo "${ECHO_T}$lt_cv_objdir" >&6
7070 objdir=$lt_cv_objdir
7071
7072
7073
7074
7075
7076 case $host_os in
7077 aix3*)
7078   # AIX sometimes has problems with the GCC collect2 program.  For some
7079   # reason, if we set the COLLECT_NAMES environment variable, the problems
7080   # vanish in a puff of smoke.
7081   if test "X${COLLECT_NAMES+set}" != Xset; then
7082     COLLECT_NAMES=
7083     export COLLECT_NAMES
7084   fi
7085   ;;
7086 esac
7087
7088 # Sed substitution that helps us do robust quoting.  It backslashifies
7089 # metacharacters that are still active within double-quoted strings.
7090 Xsed='sed -e 1s/^X//'
7091 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
7092
7093 # Same as above, but do not quote variable references.
7094 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
7095
7096 # Sed substitution to delay expansion of an escaped shell variable in a
7097 # double_quote_subst'ed string.
7098 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7099
7100 # Sed substitution to avoid accidental globbing in evaled expressions
7101 no_glob_subst='s/\*/\\\*/g'
7102
7103 # Constants:
7104 rm="rm -f"
7105
7106 # Global variables:
7107 default_ofile=libtool
7108 can_build_shared=yes
7109
7110 # All known linkers require a `.a' archive for static linking (except MSVC,
7111 # which needs '.lib').
7112 libext=a
7113 ltmain="$ac_aux_dir/ltmain.sh"
7114 ofile="$default_ofile"
7115 with_gnu_ld="$lt_cv_prog_gnu_ld"
7116
7117 if test -n "$ac_tool_prefix"; then
7118   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7119 set dummy ${ac_tool_prefix}ar; ac_word=$2
7120 echo "$as_me:$LINENO: checking for $ac_word" >&5
7121 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7122 if test "${ac_cv_prog_AR+set}" = set; then
7123   echo $ECHO_N "(cached) $ECHO_C" >&6
7124 else
7125   if test -n "$AR"; then
7126   ac_cv_prog_AR="$AR" # Let the user override the test.
7127 else
7128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7129 for as_dir in $PATH
7130 do
7131   IFS=$as_save_IFS
7132   test -z "$as_dir" && as_dir=.
7133   for ac_exec_ext in '' $ac_executable_extensions; do
7134   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7135     ac_cv_prog_AR="${ac_tool_prefix}ar"
7136     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7137     break 2
7138   fi
7139 done
7140 done
7141
7142 fi
7143 fi
7144 AR=$ac_cv_prog_AR
7145 if test -n "$AR"; then
7146   echo "$as_me:$LINENO: result: $AR" >&5
7147 echo "${ECHO_T}$AR" >&6
7148 else
7149   echo "$as_me:$LINENO: result: no" >&5
7150 echo "${ECHO_T}no" >&6
7151 fi
7152
7153 fi
7154 if test -z "$ac_cv_prog_AR"; then
7155   ac_ct_AR=$AR
7156   # Extract the first word of "ar", so it can be a program name with args.
7157 set dummy ar; ac_word=$2
7158 echo "$as_me:$LINENO: checking for $ac_word" >&5
7159 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7160 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
7161   echo $ECHO_N "(cached) $ECHO_C" >&6
7162 else
7163   if test -n "$ac_ct_AR"; then
7164   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7165 else
7166 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7167 for as_dir in $PATH
7168 do
7169   IFS=$as_save_IFS
7170   test -z "$as_dir" && as_dir=.
7171   for ac_exec_ext in '' $ac_executable_extensions; do
7172   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7173     ac_cv_prog_ac_ct_AR="ar"
7174     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7175     break 2
7176   fi
7177 done
7178 done
7179
7180   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
7181 fi
7182 fi
7183 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7184 if test -n "$ac_ct_AR"; then
7185   echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
7186 echo "${ECHO_T}$ac_ct_AR" >&6
7187 else
7188   echo "$as_me:$LINENO: result: no" >&5
7189 echo "${ECHO_T}no" >&6
7190 fi
7191
7192   AR=$ac_ct_AR
7193 else
7194   AR="$ac_cv_prog_AR"
7195 fi
7196
7197 if test -n "$ac_tool_prefix"; then
7198   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7199 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7200 echo "$as_me:$LINENO: checking for $ac_word" >&5
7201 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7202 if test "${ac_cv_prog_RANLIB+set}" = set; then
7203   echo $ECHO_N "(cached) $ECHO_C" >&6
7204 else
7205   if test -n "$RANLIB"; then
7206   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7207 else
7208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7209 for as_dir in $PATH
7210 do
7211   IFS=$as_save_IFS
7212   test -z "$as_dir" && as_dir=.
7213   for ac_exec_ext in '' $ac_executable_extensions; do
7214   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7215     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7216     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7217     break 2
7218   fi
7219 done
7220 done
7221
7222 fi
7223 fi
7224 RANLIB=$ac_cv_prog_RANLIB
7225 if test -n "$RANLIB"; then
7226   echo "$as_me:$LINENO: result: $RANLIB" >&5
7227 echo "${ECHO_T}$RANLIB" >&6
7228 else
7229   echo "$as_me:$LINENO: result: no" >&5
7230 echo "${ECHO_T}no" >&6
7231 fi
7232
7233 fi
7234 if test -z "$ac_cv_prog_RANLIB"; then
7235   ac_ct_RANLIB=$RANLIB
7236   # Extract the first word of "ranlib", so it can be a program name with args.
7237 set dummy ranlib; ac_word=$2
7238 echo "$as_me:$LINENO: checking for $ac_word" >&5
7239 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7240 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7241   echo $ECHO_N "(cached) $ECHO_C" >&6
7242 else
7243   if test -n "$ac_ct_RANLIB"; then
7244   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7245 else
7246 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7247 for as_dir in $PATH
7248 do
7249   IFS=$as_save_IFS
7250   test -z "$as_dir" && as_dir=.
7251   for ac_exec_ext in '' $ac_executable_extensions; do
7252   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7253     ac_cv_prog_ac_ct_RANLIB="ranlib"
7254     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7255     break 2
7256   fi
7257 done
7258 done
7259
7260   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7261 fi
7262 fi
7263 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7264 if test -n "$ac_ct_RANLIB"; then
7265   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7266 echo "${ECHO_T}$ac_ct_RANLIB" >&6
7267 else
7268   echo "$as_me:$LINENO: result: no" >&5
7269 echo "${ECHO_T}no" >&6
7270 fi
7271
7272   RANLIB=$ac_ct_RANLIB
7273 else
7274   RANLIB="$ac_cv_prog_RANLIB"
7275 fi
7276
7277 if test -n "$ac_tool_prefix"; then
7278   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7279 set dummy ${ac_tool_prefix}strip; ac_word=$2
7280 echo "$as_me:$LINENO: checking for $ac_word" >&5
7281 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7282 if test "${ac_cv_prog_STRIP+set}" = set; then
7283   echo $ECHO_N "(cached) $ECHO_C" >&6
7284 else
7285   if test -n "$STRIP"; then
7286   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7287 else
7288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7289 for as_dir in $PATH
7290 do
7291   IFS=$as_save_IFS
7292   test -z "$as_dir" && as_dir=.
7293   for ac_exec_ext in '' $ac_executable_extensions; do
7294   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7295     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7296     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7297     break 2
7298   fi
7299 done
7300 done
7301
7302 fi
7303 fi
7304 STRIP=$ac_cv_prog_STRIP
7305 if test -n "$STRIP"; then
7306   echo "$as_me:$LINENO: result: $STRIP" >&5
7307 echo "${ECHO_T}$STRIP" >&6
7308 else
7309   echo "$as_me:$LINENO: result: no" >&5
7310 echo "${ECHO_T}no" >&6
7311 fi
7312
7313 fi
7314 if test -z "$ac_cv_prog_STRIP"; then
7315   ac_ct_STRIP=$STRIP
7316   # Extract the first word of "strip", so it can be a program name with args.
7317 set dummy strip; ac_word=$2
7318 echo "$as_me:$LINENO: checking for $ac_word" >&5
7319 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7320 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
7321   echo $ECHO_N "(cached) $ECHO_C" >&6
7322 else
7323   if test -n "$ac_ct_STRIP"; then
7324   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7325 else
7326 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7327 for as_dir in $PATH
7328 do
7329   IFS=$as_save_IFS
7330   test -z "$as_dir" && as_dir=.
7331   for ac_exec_ext in '' $ac_executable_extensions; do
7332   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7333     ac_cv_prog_ac_ct_STRIP="strip"
7334     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7335     break 2
7336   fi
7337 done
7338 done
7339
7340   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
7341 fi
7342 fi
7343 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7344 if test -n "$ac_ct_STRIP"; then
7345   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
7346 echo "${ECHO_T}$ac_ct_STRIP" >&6
7347 else
7348   echo "$as_me:$LINENO: result: no" >&5
7349 echo "${ECHO_T}no" >&6
7350 fi
7351
7352   STRIP=$ac_ct_STRIP
7353 else
7354   STRIP="$ac_cv_prog_STRIP"
7355 fi
7356
7357
7358 old_CC="$CC"
7359 old_CFLAGS="$CFLAGS"
7360
7361 # Set sane defaults for various variables
7362 test -z "$AR" && AR=ar
7363 test -z "$AR_FLAGS" && AR_FLAGS=cru
7364 test -z "$AS" && AS=as
7365 test -z "$CC" && CC=cc
7366 test -z "$LTCC" && LTCC=$CC
7367 test -z "$DLLTOOL" && DLLTOOL=dlltool
7368 test -z "$LD" && LD=ld
7369 test -z "$LN_S" && LN_S="ln -s"
7370 test -z "$MAGIC_CMD" && MAGIC_CMD=file
7371 test -z "$NM" && NM=nm
7372 test -z "$SED" && SED=sed
7373 test -z "$OBJDUMP" && OBJDUMP=objdump
7374 test -z "$RANLIB" && RANLIB=:
7375 test -z "$STRIP" && STRIP=:
7376 test -z "$ac_objext" && ac_objext=o
7377
7378 # Determine commands to create old-style static archives.
7379 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
7380 old_postinstall_cmds='chmod 644 $oldlib'
7381 old_postuninstall_cmds=
7382
7383 if test -n "$RANLIB"; then
7384   case $host_os in
7385   openbsd*)
7386     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
7387     ;;
7388   *)
7389     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
7390     ;;
7391   esac
7392   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
7393 fi
7394
7395 for cc_temp in $compiler""; do
7396   case $cc_temp in
7397     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
7398     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
7399     \-*) ;;
7400     *) break;;
7401   esac
7402 done
7403 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
7404
7405
7406 # Only perform the check for file, if the check method requires it
7407 case $deplibs_check_method in
7408 file_magic*)
7409   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
7410     echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
7411 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
7412 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
7413   echo $ECHO_N "(cached) $ECHO_C" >&6
7414 else
7415   case $MAGIC_CMD in
7416 [\\/*] |  ?:[\\/]*)
7417   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7418   ;;
7419 *)
7420   lt_save_MAGIC_CMD="$MAGIC_CMD"
7421   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7422   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7423   for ac_dir in $ac_dummy; do
7424     IFS="$lt_save_ifs"
7425     test -z "$ac_dir" && ac_dir=.
7426     if test -f $ac_dir/${ac_tool_prefix}file; then
7427       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
7428       if test -n "$file_magic_test_file"; then
7429         case $deplibs_check_method in
7430         "file_magic "*)
7431           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7432           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7433           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7434             $EGREP "$file_magic_regex" > /dev/null; then
7435             :
7436           else
7437             cat <<EOF 1>&2
7438
7439 *** Warning: the command libtool uses to detect shared libraries,
7440 *** $file_magic_cmd, produces output that libtool cannot recognize.
7441 *** The result is that libtool may fail to recognize shared libraries
7442 *** as such.  This will affect the creation of libtool libraries that
7443 *** depend on shared libraries, but programs linked with such libtool
7444 *** libraries will work regardless of this problem.  Nevertheless, you
7445 *** may want to report the problem to your system manager and/or to
7446 *** bug-libtool@gnu.org
7447
7448 EOF
7449           fi ;;
7450         esac
7451       fi
7452       break
7453     fi
7454   done
7455   IFS="$lt_save_ifs"
7456   MAGIC_CMD="$lt_save_MAGIC_CMD"
7457   ;;
7458 esac
7459 fi
7460
7461 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7462 if test -n "$MAGIC_CMD"; then
7463   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
7464 echo "${ECHO_T}$MAGIC_CMD" >&6
7465 else
7466   echo "$as_me:$LINENO: result: no" >&5
7467 echo "${ECHO_T}no" >&6
7468 fi
7469
7470 if test -z "$lt_cv_path_MAGIC_CMD"; then
7471   if test -n "$ac_tool_prefix"; then
7472     echo "$as_me:$LINENO: checking for file" >&5
7473 echo $ECHO_N "checking for file... $ECHO_C" >&6
7474 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
7475   echo $ECHO_N "(cached) $ECHO_C" >&6
7476 else
7477   case $MAGIC_CMD in
7478 [\\/*] |  ?:[\\/]*)
7479   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7480   ;;
7481 *)
7482   lt_save_MAGIC_CMD="$MAGIC_CMD"
7483   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7484   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7485   for ac_dir in $ac_dummy; do
7486     IFS="$lt_save_ifs"
7487     test -z "$ac_dir" && ac_dir=.
7488     if test -f $ac_dir/file; then
7489       lt_cv_path_MAGIC_CMD="$ac_dir/file"
7490       if test -n "$file_magic_test_file"; then
7491         case $deplibs_check_method in
7492         "file_magic "*)
7493           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7494           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7495           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7496             $EGREP "$file_magic_regex" > /dev/null; then
7497             :
7498           else
7499             cat <<EOF 1>&2
7500
7501 *** Warning: the command libtool uses to detect shared libraries,
7502 *** $file_magic_cmd, produces output that libtool cannot recognize.
7503 *** The result is that libtool may fail to recognize shared libraries
7504 *** as such.  This will affect the creation of libtool libraries that
7505 *** depend on shared libraries, but programs linked with such libtool
7506 *** libraries will work regardless of this problem.  Nevertheless, you
7507 *** may want to report the problem to your system manager and/or to
7508 *** bug-libtool@gnu.org
7509
7510 EOF
7511           fi ;;
7512         esac
7513       fi
7514       break
7515     fi
7516   done
7517   IFS="$lt_save_ifs"
7518   MAGIC_CMD="$lt_save_MAGIC_CMD"
7519   ;;
7520 esac
7521 fi
7522
7523 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7524 if test -n "$MAGIC_CMD"; then
7525   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
7526 echo "${ECHO_T}$MAGIC_CMD" >&6
7527 else
7528   echo "$as_me:$LINENO: result: no" >&5
7529 echo "${ECHO_T}no" >&6
7530 fi
7531
7532   else
7533     MAGIC_CMD=:
7534   fi
7535 fi
7536
7537   fi
7538   ;;
7539 esac
7540
7541 enable_dlopen=yes
7542 enable_win32_dll=yes
7543
7544 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
7545 if test "${enable_libtool_lock+set}" = set; then
7546   enableval="$enable_libtool_lock"
7547
7548 fi;
7549 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
7550
7551
7552 # Check whether --with-pic or --without-pic was given.
7553 if test "${with_pic+set}" = set; then
7554   withval="$with_pic"
7555   pic_mode="$withval"
7556 else
7557   pic_mode=default
7558 fi;
7559 test -z "$pic_mode" && pic_mode=default
7560
7561 # Use C for the default configuration in the libtool script
7562 tagname=
7563 lt_save_CC="$CC"
7564 ac_ext=c
7565 ac_cpp='$CPP $CPPFLAGS'
7566 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7567 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7568 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7569
7570
7571 # Source file extension for C test sources.
7572 ac_ext=c
7573
7574 # Object file extension for compiled C test sources.
7575 objext=o
7576 objext=$objext
7577
7578 # Code to be used in simple compile tests
7579 lt_simple_compile_test_code="int some_variable = 0;\n"
7580
7581 # Code to be used in simple link tests
7582 lt_simple_link_test_code='int main(){return(0);}\n'
7583
7584
7585 # If no C compiler was specified, use CC.
7586 LTCC=${LTCC-"$CC"}
7587
7588 # Allow CC to be a program name with arguments.
7589 compiler=$CC
7590
7591
7592 # save warnings/boilerplate of simple test code
7593 ac_outfile=conftest.$ac_objext
7594 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
7595 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
7596 _lt_compiler_boilerplate=`cat conftest.err`
7597 $rm conftest*
7598
7599 ac_outfile=conftest.$ac_objext
7600 printf "$lt_simple_link_test_code" >conftest.$ac_ext
7601 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
7602 _lt_linker_boilerplate=`cat conftest.err`
7603 $rm conftest*
7604
7605
7606 #
7607 # Check for any special shared library compilation flags.
7608 #
7609 lt_prog_cc_shlib=
7610 if test "$GCC" = no; then
7611   case $host_os in
7612   sco3.2v5*)
7613     lt_prog_cc_shlib='-belf'
7614     ;;
7615   esac
7616 fi
7617 if test -n "$lt_prog_cc_shlib"; then
7618   { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
7619 echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
7620   if echo "$old_CC $old_CFLAGS " | grep "[      ]$lt_prog_cc_shlib[     ]" >/dev/null; then :
7621   else
7622     { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
7623 echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
7624     lt_cv_prog_cc_can_build_shared=no
7625   fi
7626 fi
7627
7628
7629 #
7630 # Check to make sure the static flag actually works.
7631 #
7632 echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5
7633 echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6
7634 if test "${lt_prog_compiler_static_works+set}" = set; then
7635   echo $ECHO_N "(cached) $ECHO_C" >&6
7636 else
7637   lt_prog_compiler_static_works=no
7638    save_LDFLAGS="$LDFLAGS"
7639    LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
7640    printf "$lt_simple_link_test_code" > conftest.$ac_ext
7641    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
7642      # The linker can only warn and ignore the option if not recognized
7643      # So say no if there are warnings
7644      if test -s conftest.err; then
7645        # Append any errors to the config.log.
7646        cat conftest.err 1>&5
7647        $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
7648        $SED '/^$/d' conftest.err >conftest.er2
7649        if diff conftest.exp conftest.er2 >/dev/null; then
7650          lt_prog_compiler_static_works=yes
7651        fi
7652      else
7653        lt_prog_compiler_static_works=yes
7654      fi
7655    fi
7656    $rm conftest*
7657    LDFLAGS="$save_LDFLAGS"
7658
7659 fi
7660 echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
7661 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
7662
7663 if test x"$lt_prog_compiler_static_works" = xyes; then
7664     :
7665 else
7666     lt_prog_compiler_static=
7667 fi
7668
7669
7670
7671
7672 lt_prog_compiler_no_builtin_flag=
7673
7674 if test "$GCC" = yes; then
7675   lt_prog_compiler_no_builtin_flag=' -fno-builtin'
7676
7677
7678 echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
7679 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
7680 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
7681   echo $ECHO_N "(cached) $ECHO_C" >&6
7682 else
7683   lt_cv_prog_compiler_rtti_exceptions=no
7684   ac_outfile=conftest.$ac_objext
7685    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7686    lt_compiler_flag="-fno-rtti -fno-exceptions"
7687    # Insert the option either (1) after the last *FLAGS variable, or
7688    # (2) before a word containing "conftest.", or (3) at the end.
7689    # Note that $ac_compile itself does not contain backslashes and begins
7690    # with a dollar sign (not a hyphen), so the echo should work correctly.
7691    # The option is referenced via a variable to avoid confusing sed.
7692    lt_compile=`echo "$ac_compile" | $SED \
7693    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7694    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7695    -e 's:$: $lt_compiler_flag:'`
7696    (eval echo "\"\$as_me:7696: $lt_compile\"" >&5)
7697    (eval "$lt_compile" 2>conftest.err)
7698    ac_status=$?
7699    cat conftest.err >&5
7700    echo "$as_me:7700: \$? = $ac_status" >&5
7701    if (exit $ac_status) && test -s "$ac_outfile"; then
7702      # The compiler can only warn and ignore the option if not recognized
7703      # So say no if there are warnings other than the usual output.
7704      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
7705      $SED '/^$/d' conftest.err >conftest.er2
7706      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
7707        lt_cv_prog_compiler_rtti_exceptions=yes
7708      fi
7709    fi
7710    $rm conftest*
7711
7712 fi
7713 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
7714 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
7715
7716 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
7717     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
7718 else
7719     :
7720 fi
7721
7722 fi
7723
7724 lt_prog_compiler_wl=
7725 lt_prog_compiler_pic=
7726 lt_prog_compiler_static=
7727
7728 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
7729 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
7730
7731   if test "$GCC" = yes; then
7732     lt_prog_compiler_wl='-Wl,'
7733     lt_prog_compiler_static='-static'
7734
7735     case $host_os in
7736       aix*)
7737       # All AIX code is PIC.
7738       if test "$host_cpu" = ia64; then
7739         # AIX 5 now supports IA64 processor
7740         lt_prog_compiler_static='-Bstatic'
7741       fi
7742       ;;
7743
7744     amigaos*)
7745       # FIXME: we need at least 68020 code to build shared libraries, but
7746       # adding the `-m68020' flag to GCC prevents building anything better,
7747       # like `-m68040'.
7748       lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
7749       ;;
7750
7751     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7752       # PIC is the default for these OSes.
7753       ;;
7754
7755     mingw* | pw32* | os2*)
7756       # This hack is so that the source file can tell whether it is being
7757       # built for inclusion in a dll (and should export symbols for example).
7758       lt_prog_compiler_pic='-DDLL_EXPORT'
7759       ;;
7760
7761     darwin* | rhapsody*)
7762       # PIC is the default on this platform
7763       # Common symbols not allowed in MH_DYLIB files
7764       lt_prog_compiler_pic='-fno-common'
7765       ;;
7766
7767     msdosdjgpp*)
7768       # Just because we use GCC doesn't mean we suddenly get shared libraries
7769       # on systems that don't support them.
7770       lt_prog_compiler_can_build_shared=no
7771       enable_shared=no
7772       ;;
7773
7774     sysv4*MP*)
7775       if test -d /usr/nec; then
7776         lt_prog_compiler_pic=-Kconform_pic
7777       fi
7778       ;;
7779
7780     hpux*)
7781       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7782       # not for PA HP-UX.
7783       case $host_cpu in
7784       hppa*64*|ia64*)
7785         # +Z the default
7786         ;;
7787       *)
7788         lt_prog_compiler_pic='-fPIC'
7789         ;;
7790       esac
7791       ;;
7792
7793     *)
7794       lt_prog_compiler_pic='-fPIC'
7795       ;;
7796     esac
7797   else
7798     # PORTME Check for flag to pass linker flags through the system compiler.
7799     case $host_os in
7800     aix*)
7801       lt_prog_compiler_wl='-Wl,'
7802       if test "$host_cpu" = ia64; then
7803         # AIX 5 now supports IA64 processor
7804         lt_prog_compiler_static='-Bstatic'
7805       else
7806         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
7807       fi
7808       ;;
7809       darwin*)
7810         # PIC is the default on this platform
7811         # Common symbols not allowed in MH_DYLIB files
7812        case $cc_basename in
7813          xlc*)
7814          lt_prog_compiler_pic='-qnocommon'
7815          lt_prog_compiler_wl='-Wl,'
7816          ;;
7817        esac
7818        ;;
7819
7820     mingw* | pw32* | os2*)
7821       # This hack is so that the source file can tell whether it is being
7822       # built for inclusion in a dll (and should export symbols for example).
7823       lt_prog_compiler_pic='-DDLL_EXPORT'
7824       ;;
7825
7826     hpux9* | hpux10* | hpux11*)
7827       lt_prog_compiler_wl='-Wl,'
7828       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7829       # not for PA HP-UX.
7830       case $host_cpu in
7831       hppa*64*|ia64*)
7832         # +Z the default
7833         ;;
7834       *)
7835         lt_prog_compiler_pic='+Z'
7836         ;;
7837       esac
7838       # Is there a better lt_prog_compiler_static that works with the bundled CC?
7839       lt_prog_compiler_static='${wl}-a ${wl}archive'
7840       ;;
7841
7842     irix5* | irix6* | nonstopux*)
7843       lt_prog_compiler_wl='-Wl,'
7844       # PIC (with -KPIC) is the default.
7845       lt_prog_compiler_static='-non_shared'
7846       ;;
7847
7848     newsos6)
7849       lt_prog_compiler_pic='-KPIC'
7850       lt_prog_compiler_static='-Bstatic'
7851       ;;
7852
7853     linux*)
7854       case $cc_basename in
7855       icc* | ecc*)
7856         lt_prog_compiler_wl='-Wl,'
7857         lt_prog_compiler_pic='-KPIC'
7858         lt_prog_compiler_static='-static'
7859         ;;
7860       pgcc* | pgf77* | pgf90* | pgf95*)
7861         # Portland Group compilers (*not* the Pentium gcc compiler,
7862         # which looks to be a dead project)
7863         lt_prog_compiler_wl='-Wl,'
7864         lt_prog_compiler_pic='-fpic'
7865         lt_prog_compiler_static='-Bstatic'
7866         ;;
7867       ccc*)
7868         lt_prog_compiler_wl='-Wl,'
7869         # All Alpha code is PIC.
7870         lt_prog_compiler_static='-non_shared'
7871         ;;
7872       esac
7873       ;;
7874
7875     osf3* | osf4* | osf5*)
7876       lt_prog_compiler_wl='-Wl,'
7877       # All OSF/1 code is PIC.
7878       lt_prog_compiler_static='-non_shared'
7879       ;;
7880
7881     sco3.2v5*)
7882       lt_prog_compiler_pic='-Kpic'
7883       lt_prog_compiler_static='-dn'
7884       ;;
7885
7886     solaris*)
7887       lt_prog_compiler_pic='-KPIC'
7888       lt_prog_compiler_static='-Bstatic'
7889       case $cc_basename in
7890       f77* | f90* | f95*)
7891         lt_prog_compiler_wl='-Qoption ld ';;
7892       *)
7893         lt_prog_compiler_wl='-Wl,';;
7894       esac
7895       ;;
7896
7897     sunos4*)
7898       lt_prog_compiler_wl='-Qoption ld '
7899       lt_prog_compiler_pic='-PIC'
7900       lt_prog_compiler_static='-Bstatic'
7901       ;;
7902
7903     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7904       lt_prog_compiler_wl='-Wl,'
7905       lt_prog_compiler_pic='-KPIC'
7906       lt_prog_compiler_static='-Bstatic'
7907       ;;
7908
7909     sysv4*MP*)
7910       if test -d /usr/nec ;then
7911         lt_prog_compiler_pic='-Kconform_pic'
7912         lt_prog_compiler_static='-Bstatic'
7913       fi
7914       ;;
7915
7916     unicos*)
7917       lt_prog_compiler_wl='-Wl,'
7918       lt_prog_compiler_can_build_shared=no
7919       ;;
7920
7921     uts4*)
7922       lt_prog_compiler_pic='-pic'
7923       lt_prog_compiler_static='-Bstatic'
7924       ;;
7925
7926     *)
7927       lt_prog_compiler_can_build_shared=no
7928       ;;
7929     esac
7930   fi
7931
7932 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
7933 echo "${ECHO_T}$lt_prog_compiler_pic" >&6
7934
7935 #
7936 # Check to make sure the PIC flag actually works.
7937 #
7938 if test -n "$lt_prog_compiler_pic"; then
7939
7940 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
7941 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
7942 if test "${lt_prog_compiler_pic_works+set}" = set; then
7943   echo $ECHO_N "(cached) $ECHO_C" >&6
7944 else
7945   lt_prog_compiler_pic_works=no
7946   ac_outfile=conftest.$ac_objext
7947    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7948    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
7949    # Insert the option either (1) after the last *FLAGS variable, or
7950    # (2) before a word containing "conftest.", or (3) at the end.
7951    # Note that $ac_compile itself does not contain backslashes and begins
7952    # with a dollar sign (not a hyphen), so the echo should work correctly.
7953    # The option is referenced via a variable to avoid confusing sed.
7954    lt_compile=`echo "$ac_compile" | $SED \
7955    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7956    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7957    -e 's:$: $lt_compiler_flag:'`
7958    (eval echo "\"\$as_me:7958: $lt_compile\"" >&5)
7959    (eval "$lt_compile" 2>conftest.err)
7960    ac_status=$?
7961    cat conftest.err >&5
7962    echo "$as_me:7962: \$? = $ac_status" >&5
7963    if (exit $ac_status) && test -s "$ac_outfile"; then
7964      # The compiler can only warn and ignore the option if not recognized
7965      # So say no if there are warnings other than the usual output.
7966      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
7967      $SED '/^$/d' conftest.err >conftest.er2
7968      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
7969        lt_prog_compiler_pic_works=yes
7970      fi
7971    fi
7972    $rm conftest*
7973
7974 fi
7975 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
7976 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
7977
7978 if test x"$lt_prog_compiler_pic_works" = xyes; then
7979     case $lt_prog_compiler_pic in
7980      "" | " "*) ;;
7981      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
7982      esac
7983 else
7984     lt_prog_compiler_pic=
7985      lt_prog_compiler_can_build_shared=no
7986 fi
7987
7988 fi
7989 case $host_os in
7990   # For platforms which do not support PIC, -DPIC is meaningless:
7991   *djgpp*)
7992     lt_prog_compiler_pic=
7993     ;;
7994   *)
7995     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
7996     ;;
7997 esac
7998
7999 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
8000 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
8001 if test "${lt_cv_prog_compiler_c_o+set}" = set; then
8002   echo $ECHO_N "(cached) $ECHO_C" >&6
8003 else
8004   lt_cv_prog_compiler_c_o=no
8005    $rm -r conftest 2>/dev/null
8006    mkdir conftest
8007    cd conftest
8008    mkdir out
8009    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8010
8011    lt_compiler_flag="-o out/conftest2.$ac_objext"
8012    # Insert the option either (1) after the last *FLAGS variable, or
8013    # (2) before a word containing "conftest.", or (3) at the end.
8014    # Note that $ac_compile itself does not contain backslashes and begins
8015    # with a dollar sign (not a hyphen), so the echo should work correctly.
8016    lt_compile=`echo "$ac_compile" | $SED \
8017    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8018    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8019    -e 's:$: $lt_compiler_flag:'`
8020    (eval echo "\"\$as_me:8020: $lt_compile\"" >&5)
8021    (eval "$lt_compile" 2>out/conftest.err)
8022    ac_status=$?
8023    cat out/conftest.err >&5
8024    echo "$as_me:8024: \$? = $ac_status" >&5
8025    if (exit $ac_status) && test -s out/conftest2.$ac_objext
8026    then
8027      # The compiler can only warn and ignore the option if not recognized
8028      # So say no if there are warnings
8029      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
8030      $SED '/^$/d' out/conftest.err >out/conftest.er2
8031      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8032        lt_cv_prog_compiler_c_o=yes
8033      fi
8034    fi
8035    chmod u+w . 2>&5
8036    $rm conftest*
8037    # SGI C++ compiler will create directory out/ii_files/ for
8038    # template instantiation
8039    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
8040    $rm out/* && rmdir out
8041    cd ..
8042    rmdir conftest
8043    $rm conftest*
8044
8045 fi
8046 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
8047 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
8048
8049
8050 hard_links="nottested"
8051 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
8052   # do not overwrite the value of need_locks provided by the user
8053   echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
8054 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
8055   hard_links=yes
8056   $rm conftest*
8057   ln conftest.a conftest.b 2>/dev/null && hard_links=no
8058   touch conftest.a
8059   ln conftest.a conftest.b 2>&5 || hard_links=no
8060   ln conftest.a conftest.b 2>/dev/null && hard_links=no
8061   echo "$as_me:$LINENO: result: $hard_links" >&5
8062 echo "${ECHO_T}$hard_links" >&6
8063   if test "$hard_links" = no; then
8064     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
8065 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
8066     need_locks=warn
8067   fi
8068 else
8069   need_locks=no
8070 fi
8071
8072 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
8073 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
8074
8075   runpath_var=
8076   allow_undefined_flag=
8077   enable_shared_with_static_runtimes=no
8078   archive_cmds=
8079   archive_expsym_cmds=
8080   old_archive_From_new_cmds=
8081   old_archive_from_expsyms_cmds=
8082   export_dynamic_flag_spec=
8083   whole_archive_flag_spec=
8084   thread_safe_flag_spec=
8085   hardcode_libdir_flag_spec=
8086   hardcode_libdir_flag_spec_ld=
8087   hardcode_libdir_separator=
8088   hardcode_direct=no
8089   hardcode_minus_L=no
8090   hardcode_shlibpath_var=unsupported
8091   link_all_deplibs=unknown
8092   hardcode_automatic=no
8093   module_cmds=
8094   module_expsym_cmds=
8095   always_export_symbols=no
8096   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8097   # include_expsyms should be a list of space-separated symbols to be *always*
8098   # included in the symbol list
8099   include_expsyms=
8100   # exclude_expsyms can be an extended regexp of symbols to exclude
8101   # it will be wrapped by ` (' and `)$', so one must not match beginning or
8102   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
8103   # as well as any symbol that contains `d'.
8104   exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
8105   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8106   # platforms (ab)use it in PIC code, but their linkers get confused if
8107   # the symbol is explicitly referenced.  Since portable code cannot
8108   # rely on this symbol name, it's probably fine to never include it in
8109   # preloaded symbol tables.
8110   extract_expsyms_cmds=
8111   # Just being paranoid about ensuring that cc_basename is set.
8112   for cc_temp in $compiler""; do
8113   case $cc_temp in
8114     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8115     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8116     \-*) ;;
8117     *) break;;
8118   esac
8119 done
8120 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8121
8122   case $host_os in
8123   cygwin* | mingw* | pw32*)
8124     # FIXME: the MSVC++ port hasn't been tested in a loooong time
8125     # When not using gcc, we currently assume that we are using
8126     # Microsoft Visual C++.
8127     if test "$GCC" != yes; then
8128       with_gnu_ld=no
8129     fi
8130     ;;
8131   openbsd*)
8132     with_gnu_ld=no
8133     ;;
8134   esac
8135
8136   ld_shlibs=yes
8137   if test "$with_gnu_ld" = yes; then
8138     # If archive_cmds runs LD, not CC, wlarc should be empty
8139     wlarc='${wl}'
8140
8141     # Set some defaults for GNU ld with shared library support. These
8142     # are reset later if shared libraries are not supported. Putting them
8143     # here allows them to be overridden if necessary.
8144     runpath_var=LD_RUN_PATH
8145     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
8146     export_dynamic_flag_spec='${wl}--export-dynamic'
8147     # ancient GNU ld didn't support --whole-archive et. al.
8148     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
8149         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8150       else
8151         whole_archive_flag_spec=
8152     fi
8153     supports_anon_versioning=no
8154     case `$LD -v 2>/dev/null` in
8155       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
8156       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8157       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8158       *\ 2.11.*) ;; # other 2.11 versions
8159       *) supports_anon_versioning=yes ;;
8160     esac
8161
8162     # See if GNU ld supports shared libraries.
8163     case $host_os in
8164     aix3* | aix4* | aix5*)
8165       # On AIX/PPC, the GNU linker is very broken
8166       if test "$host_cpu" != ia64; then
8167         ld_shlibs=no
8168         cat <<EOF 1>&2
8169
8170 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
8171 *** to be unable to reliably create shared libraries on AIX.
8172 *** Therefore, libtool is disabling shared libraries support.  If you
8173 *** really care for shared libraries, you may want to modify your PATH
8174 *** so that a non-GNU linker is found, and then restart.
8175
8176 EOF
8177       fi
8178       ;;
8179
8180     amigaos*)
8181       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)'
8182       hardcode_libdir_flag_spec='-L$libdir'
8183       hardcode_minus_L=yes
8184
8185       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
8186       # that the semantics of dynamic libraries on AmigaOS, at least up
8187       # to version 4, is to share data among multiple programs linked
8188       # with the same dynamic library.  Since this doesn't match the
8189       # behavior of shared libraries on other platforms, we can't use
8190       # them.
8191       ld_shlibs=no
8192       ;;
8193
8194     beos*)
8195       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8196         allow_undefined_flag=unsupported
8197         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8198         # support --undefined.  This deserves some investigation.  FIXME
8199         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8200       else
8201         ld_shlibs=no
8202       fi
8203       ;;
8204
8205     cygwin* | mingw* | pw32*)
8206       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
8207       # as there is no search path for DLLs.
8208       hardcode_libdir_flag_spec='-L$libdir'
8209       allow_undefined_flag=unsupported
8210       always_export_symbols=no
8211       enable_shared_with_static_runtimes=yes
8212       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
8213
8214       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8215         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8216         # If the export-symbols file already is a .def file (1st line
8217         # is EXPORTS), use it as is; otherwise, prepend...
8218         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8219           cp $export_symbols $output_objdir/$soname.def;
8220         else
8221           echo EXPORTS > $output_objdir/$soname.def;
8222           cat $export_symbols >> $output_objdir/$soname.def;
8223         fi~
8224         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
8225       else
8226         ld_shlibs=no
8227       fi
8228       ;;
8229
8230     linux*)
8231       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8232         tmp_addflag=
8233         case $cc_basename,$host_cpu in
8234         pgcc*)                          # Portland Group C compiler
8235           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'
8236           tmp_addflag=' $pic_flag'
8237           ;;
8238         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
8239           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'
8240           tmp_addflag=' $pic_flag -Mnomain' ;;
8241         ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
8242           tmp_addflag=' -i_dynamic' ;;
8243         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
8244           tmp_addflag=' -i_dynamic -nofor_main' ;;
8245         ifc* | ifort*)                  # Intel Fortran compiler
8246           tmp_addflag=' -nofor_main' ;;
8247         esac
8248         archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8249
8250         if test $supports_anon_versioning = yes; then
8251           archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
8252   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8253   $echo "local: *; };" >> $output_objdir/$libname.ver~
8254           $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8255         fi
8256       else
8257         ld_shlibs=no
8258       fi
8259       ;;
8260
8261     netbsd*)
8262       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8263         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
8264         wlarc=
8265       else
8266         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8267         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8268       fi
8269       ;;
8270
8271     solaris* | sysv5*)
8272       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
8273         ld_shlibs=no
8274         cat <<EOF 1>&2
8275
8276 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
8277 *** create shared libraries on Solaris systems.  Therefore, libtool
8278 *** is disabling shared libraries support.  We urge you to upgrade GNU
8279 *** binutils to release 2.9.1 or newer.  Another option is to modify
8280 *** your PATH or compiler configuration so that the native linker is
8281 *** used, and then restart.
8282
8283 EOF
8284       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8285         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8286         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8287       else
8288         ld_shlibs=no
8289       fi
8290       ;;
8291
8292     sunos4*)
8293       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8294       wlarc=
8295       hardcode_direct=yes
8296       hardcode_shlibpath_var=no
8297       ;;
8298
8299     *)
8300       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8301         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8302         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8303       else
8304         ld_shlibs=no
8305       fi
8306       ;;
8307     esac
8308
8309     if test "$ld_shlibs" = no; then
8310       runpath_var=
8311       hardcode_libdir_flag_spec=
8312       export_dynamic_flag_spec=
8313       whole_archive_flag_spec=
8314     fi
8315   else
8316     # PORTME fill in a description of your system's linker (not GNU ld)
8317     case $host_os in
8318     aix3*)
8319       allow_undefined_flag=unsupported
8320       always_export_symbols=yes
8321       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'
8322       # Note: this linker hardcodes the directories in LIBPATH if there
8323       # are no directories specified by -L.
8324       hardcode_minus_L=yes
8325       if test "$GCC" = yes && test -z "$link_static_flag"; then
8326         # Neither direct hardcoding nor static linking is supported with a
8327         # broken collect2.
8328         hardcode_direct=unsupported
8329       fi
8330       ;;
8331
8332     aix4* | aix5*)
8333       if test "$host_cpu" = ia64; then
8334         # On IA64, the linker does run time linking by default, so we don't
8335         # have to do anything special.
8336         aix_use_runtimelinking=no
8337         exp_sym_flag='-Bexport'
8338         no_entry_flag=""
8339       else
8340         # If we're using GNU nm, then we don't want the "-C" option.
8341         # -C means demangle to AIX nm, but means don't demangle with GNU nm
8342         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
8343           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'
8344         else
8345           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'
8346         fi
8347         aix_use_runtimelinking=no
8348
8349         # Test if we are trying to use run time linking or normal
8350         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8351         # need to do runtime linking.
8352         case $host_os in aix4.[23]|aix4.[23].*|aix5*)
8353           for ld_flag in $LDFLAGS; do
8354           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
8355             aix_use_runtimelinking=yes
8356             break
8357           fi
8358           done
8359         esac
8360
8361         exp_sym_flag='-bexport'
8362         no_entry_flag='-bnoentry'
8363       fi
8364
8365       # When large executables or shared objects are built, AIX ld can
8366       # have problems creating the table of contents.  If linking a library
8367       # or program results in "error TOC overflow" add -mminimal-toc to
8368       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
8369       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8370
8371       archive_cmds=''
8372       hardcode_direct=yes
8373       hardcode_libdir_separator=':'
8374       link_all_deplibs=yes
8375
8376       if test "$GCC" = yes; then
8377         case $host_os in aix4.[012]|aix4.[012].*)
8378         # We only want to do this on AIX 4.2 and lower, the check
8379         # below for broken collect2 doesn't work under 4.3+
8380           collect2name=`${CC} -print-prog-name=collect2`
8381           if test -f "$collect2name" && \
8382            strings "$collect2name" | grep resolve_lib_name >/dev/null
8383           then
8384           # We have reworked collect2
8385           hardcode_direct=yes
8386           else
8387           # We have old collect2
8388           hardcode_direct=unsupported
8389           # It fails to find uninstalled libraries when the uninstalled
8390           # path is not listed in the libpath.  Setting hardcode_minus_L
8391           # to unsupported forces relinking
8392           hardcode_minus_L=yes
8393           hardcode_libdir_flag_spec='-L$libdir'
8394           hardcode_libdir_separator=
8395           fi
8396         esac
8397         shared_flag='-shared'
8398         if test "$aix_use_runtimelinking" = yes; then
8399           shared_flag="$shared_flag "'${wl}-G'
8400         fi
8401       else
8402         # not using gcc
8403         if test "$host_cpu" = ia64; then
8404         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8405         # chokes on -Wl,-G. The following line is correct:
8406           shared_flag='-G'
8407         else
8408         if test "$aix_use_runtimelinking" = yes; then
8409             shared_flag='${wl}-G'
8410           else
8411             shared_flag='${wl}-bM:SRE'
8412         fi
8413         fi
8414       fi
8415
8416       # It seems that -bexpall does not export symbols beginning with
8417       # underscore (_), so it is better to generate a list of symbols to export.
8418       always_export_symbols=yes
8419       if test "$aix_use_runtimelinking" = yes; then
8420         # Warning - without using the other runtime loading flags (-brtl),
8421         # -berok will link without error, but may produce a broken library.
8422         allow_undefined_flag='-berok'
8423        # Determine the default libpath from the value encoded in an empty executable.
8424        cat >conftest.$ac_ext <<_ACEOF
8425 /* confdefs.h.  */
8426 _ACEOF
8427 cat confdefs.h >>conftest.$ac_ext
8428 cat >>conftest.$ac_ext <<_ACEOF
8429 /* end confdefs.h.  */
8430
8431 int
8432 main ()
8433 {
8434
8435   ;
8436   return 0;
8437 }
8438 _ACEOF
8439 rm -f conftest.$ac_objext conftest$ac_exeext
8440 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8441   (eval $ac_link) 2>conftest.er1
8442   ac_status=$?
8443   grep -v '^ *+' conftest.er1 >conftest.err
8444   rm -f conftest.er1
8445   cat conftest.err >&5
8446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8447   (exit $ac_status); } &&
8448          { ac_try='test -z "$ac_c_werror_flag"
8449                          || test ! -s conftest.err'
8450   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8451   (eval $ac_try) 2>&5
8452   ac_status=$?
8453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8454   (exit $ac_status); }; } &&
8455          { ac_try='test -s conftest$ac_exeext'
8456   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8457   (eval $ac_try) 2>&5
8458   ac_status=$?
8459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8460   (exit $ac_status); }; }; then
8461
8462 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
8463 }'`
8464 # Check for a 64-bit object if we didn't find anything.
8465 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; }
8466 }'`; fi
8467 else
8468   echo "$as_me: failed program was:" >&5
8469 sed 's/^/| /' conftest.$ac_ext >&5
8470
8471 fi
8472 rm -f conftest.err conftest.$ac_objext \
8473       conftest$ac_exeext conftest.$ac_ext
8474 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8475
8476        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8477         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"
8478        else
8479         if test "$host_cpu" = ia64; then
8480           hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
8481           allow_undefined_flag="-z nodefs"
8482           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"
8483         else
8484          # Determine the default libpath from the value encoded in an empty executable.
8485          cat >conftest.$ac_ext <<_ACEOF
8486 /* confdefs.h.  */
8487 _ACEOF
8488 cat confdefs.h >>conftest.$ac_ext
8489 cat >>conftest.$ac_ext <<_ACEOF
8490 /* end confdefs.h.  */
8491
8492 int
8493 main ()
8494 {
8495
8496   ;
8497   return 0;
8498 }
8499 _ACEOF
8500 rm -f conftest.$ac_objext conftest$ac_exeext
8501 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8502   (eval $ac_link) 2>conftest.er1
8503   ac_status=$?
8504   grep -v '^ *+' conftest.er1 >conftest.err
8505   rm -f conftest.er1
8506   cat conftest.err >&5
8507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8508   (exit $ac_status); } &&
8509          { ac_try='test -z "$ac_c_werror_flag"
8510                          || test ! -s conftest.err'
8511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8512   (eval $ac_try) 2>&5
8513   ac_status=$?
8514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8515   (exit $ac_status); }; } &&
8516          { ac_try='test -s conftest$ac_exeext'
8517   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8518   (eval $ac_try) 2>&5
8519   ac_status=$?
8520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8521   (exit $ac_status); }; }; then
8522
8523 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
8524 }'`
8525 # Check for a 64-bit object if we didn't find anything.
8526 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; }
8527 }'`; fi
8528 else
8529   echo "$as_me: failed program was:" >&5
8530 sed 's/^/| /' conftest.$ac_ext >&5
8531
8532 fi
8533 rm -f conftest.err conftest.$ac_objext \
8534       conftest$ac_exeext conftest.$ac_ext
8535 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8536
8537          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8538           # Warning - without using the other run time loading flags,
8539           # -berok will link without error, but may produce a broken library.
8540           no_undefined_flag=' ${wl}-bernotok'
8541           allow_undefined_flag=' ${wl}-berok'
8542           # -bexpall does not export symbols beginning with underscore (_)
8543           always_export_symbols=yes
8544           # Exported symbols can be pulled into shared objects from archives
8545           whole_archive_flag_spec=' '
8546           archive_cmds_need_lc=yes
8547           # This is similar to how AIX traditionally builds its shared libraries.
8548           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'
8549         fi
8550       fi
8551       ;;
8552
8553     amigaos*)
8554       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)'
8555       hardcode_libdir_flag_spec='-L$libdir'
8556       hardcode_minus_L=yes
8557       # see comment about different semantics on the GNU ld section
8558       ld_shlibs=no
8559       ;;
8560
8561     bsdi[45]*)
8562       export_dynamic_flag_spec=-rdynamic
8563       ;;
8564
8565     cygwin* | mingw* | pw32*)
8566       # When not using gcc, we currently assume that we are using
8567       # Microsoft Visual C++.
8568       # hardcode_libdir_flag_spec is actually meaningless, as there is
8569       # no search path for DLLs.
8570       hardcode_libdir_flag_spec=' '
8571       allow_undefined_flag=unsupported
8572       # Tell ltmain to make .lib files, not .a files.
8573       libext=lib
8574       # Tell ltmain to make .dll files, not .so files.
8575       shrext_cmds=".dll"
8576       # FIXME: Setting linknames here is a bad hack.
8577       archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
8578       # The linker will automatically build a .lib file if we build a DLL.
8579       old_archive_From_new_cmds='true'
8580       # FIXME: Should let the user specify the lib program.
8581       old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
8582       fix_srcfile_path='`cygpath -w "$srcfile"`'
8583       enable_shared_with_static_runtimes=yes
8584       ;;
8585
8586     darwin* | rhapsody*)
8587       case $host_os in
8588         rhapsody* | darwin1.[012])
8589          allow_undefined_flag='${wl}-undefined ${wl}suppress'
8590          ;;
8591        *) # Darwin 1.3 on
8592          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8593            allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8594          else
8595            case ${MACOSX_DEPLOYMENT_TARGET} in
8596              10.[012])
8597                allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8598                ;;
8599              10.*)
8600                allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
8601                ;;
8602            esac
8603          fi
8604          ;;
8605       esac
8606       archive_cmds_need_lc=no
8607       hardcode_direct=no
8608       hardcode_automatic=yes
8609       hardcode_shlibpath_var=unsupported
8610       whole_archive_flag_spec=''
8611       link_all_deplibs=yes
8612     if test "$GCC" = yes ; then
8613         output_verbose_link_cmd='echo'
8614         archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
8615       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8616       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8617       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}'
8618       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}'
8619     else
8620       case $cc_basename in
8621         xlc*)
8622          output_verbose_link_cmd='echo'
8623          archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
8624          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8625           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8626          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}'
8627           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}'
8628           ;;
8629        *)
8630          ld_shlibs=no
8631           ;;
8632       esac
8633     fi
8634       ;;
8635
8636     dgux*)
8637       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8638       hardcode_libdir_flag_spec='-L$libdir'
8639       hardcode_shlibpath_var=no
8640       ;;
8641
8642     freebsd1*)
8643       ld_shlibs=no
8644       ;;
8645
8646     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8647     # support.  Future versions do this automatically, but an explicit c++rt0.o
8648     # does not break anything, and helps significantly (at the cost of a little
8649     # extra space).
8650     freebsd2.2*)
8651       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
8652       hardcode_libdir_flag_spec='-R$libdir'
8653       hardcode_direct=yes
8654       hardcode_shlibpath_var=no
8655       ;;
8656
8657     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8658     freebsd2*)
8659       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8660       hardcode_direct=yes
8661       hardcode_minus_L=yes
8662       hardcode_shlibpath_var=no
8663       ;;
8664
8665     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
8666     freebsd* | kfreebsd*-gnu | dragonfly*)
8667       archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
8668       hardcode_libdir_flag_spec='-R$libdir'
8669       hardcode_direct=yes
8670       hardcode_shlibpath_var=no
8671       ;;
8672
8673     hpux9*)
8674       if test "$GCC" = yes; then
8675         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'
8676       else
8677         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'
8678       fi
8679       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8680       hardcode_libdir_separator=:
8681       hardcode_direct=yes
8682
8683       # hardcode_minus_L: Not really in the search PATH,
8684       # but as the default location of the library.
8685       hardcode_minus_L=yes
8686       export_dynamic_flag_spec='${wl}-E'
8687       ;;
8688
8689     hpux10* | hpux11*)
8690       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8691         case $host_cpu in
8692         hppa*64*|ia64*)
8693           archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8694           ;;
8695         *)
8696           archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8697           ;;
8698         esac
8699       else
8700         case $host_cpu in
8701         hppa*64*|ia64*)
8702           archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
8703           ;;
8704         *)
8705           archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
8706           ;;
8707         esac
8708       fi
8709       if test "$with_gnu_ld" = no; then
8710         case $host_cpu in
8711         hppa*64*)
8712           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8713           hardcode_libdir_flag_spec_ld='+b $libdir'
8714           hardcode_libdir_separator=:
8715           hardcode_direct=no
8716           hardcode_shlibpath_var=no
8717           ;;
8718         ia64*)
8719           hardcode_libdir_flag_spec='-L$libdir'
8720           hardcode_direct=no
8721           hardcode_shlibpath_var=no
8722
8723           # hardcode_minus_L: Not really in the search PATH,
8724           # but as the default location of the library.
8725           hardcode_minus_L=yes
8726           ;;
8727         *)
8728           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8729           hardcode_libdir_separator=:
8730           hardcode_direct=yes
8731           export_dynamic_flag_spec='${wl}-E'
8732
8733           # hardcode_minus_L: Not really in the search PATH,
8734           # but as the default location of the library.
8735           hardcode_minus_L=yes
8736           ;;
8737         esac
8738       fi
8739       ;;
8740
8741     irix5* | irix6* | nonstopux*)
8742       if test "$GCC" = yes; then
8743         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'
8744       else
8745         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'
8746         hardcode_libdir_flag_spec_ld='-rpath $libdir'
8747       fi
8748       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8749       hardcode_libdir_separator=:
8750       link_all_deplibs=yes
8751       ;;
8752
8753     netbsd*)
8754       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8755         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
8756       else
8757         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
8758       fi
8759       hardcode_libdir_flag_spec='-R$libdir'
8760       hardcode_direct=yes
8761       hardcode_shlibpath_var=no
8762       ;;
8763
8764     newsos6)
8765       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8766       hardcode_direct=yes
8767       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8768       hardcode_libdir_separator=:
8769       hardcode_shlibpath_var=no
8770       ;;
8771
8772     openbsd*)
8773       hardcode_direct=yes
8774       hardcode_shlibpath_var=no
8775       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8776         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8777         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
8778         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8779         export_dynamic_flag_spec='${wl}-E'
8780       else
8781        case $host_os in
8782          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
8783            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8784            hardcode_libdir_flag_spec='-R$libdir'
8785            ;;
8786          *)
8787            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8788            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8789            ;;
8790        esac
8791       fi
8792       ;;
8793
8794     os2*)
8795       hardcode_libdir_flag_spec='-L$libdir'
8796       hardcode_minus_L=yes
8797       allow_undefined_flag=unsupported
8798       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'
8799       old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
8800       ;;
8801
8802     osf3*)
8803       if test "$GCC" = yes; then
8804         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8805         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'
8806       else
8807         allow_undefined_flag=' -expect_unresolved \*'
8808         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'
8809       fi
8810       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8811       hardcode_libdir_separator=:
8812       ;;
8813
8814     osf4* | osf5*)      # as osf3* with the addition of -msym flag
8815       if test "$GCC" = yes; then
8816         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8817         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'
8818         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8819       else
8820         allow_undefined_flag=' -expect_unresolved \*'
8821         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'
8822         archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
8823         $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'
8824
8825         # Both c and cxx compiler support -rpath directly
8826         hardcode_libdir_flag_spec='-rpath $libdir'
8827       fi
8828       hardcode_libdir_separator=:
8829       ;;
8830
8831     sco3.2v5*)
8832       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8833       hardcode_shlibpath_var=no
8834       export_dynamic_flag_spec='${wl}-Bexport'
8835       runpath_var=LD_RUN_PATH
8836       hardcode_runpath_var=yes
8837       ;;
8838
8839     solaris*)
8840       no_undefined_flag=' -z text'
8841       if test "$GCC" = yes; then
8842         wlarc='${wl}'
8843         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8844         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8845           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
8846       else
8847         wlarc=''
8848         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8849         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8850         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8851       fi
8852       hardcode_libdir_flag_spec='-R$libdir'
8853       hardcode_shlibpath_var=no
8854       case $host_os in
8855       solaris2.[0-5] | solaris2.[0-5].*) ;;
8856       *)
8857         # The compiler driver will combine linker options so we
8858         # cannot just pass the convience library names through
8859         # without $wl, iff we do not link with $LD.
8860         # Luckily, gcc supports the same syntax we need for Sun Studio.
8861         # Supported since Solaris 2.6 (maybe 2.5.1?)
8862         case $wlarc in
8863         '')
8864           whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
8865         *)
8866           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' ;;
8867         esac ;;
8868       esac
8869       link_all_deplibs=yes
8870       ;;
8871
8872     sunos4*)
8873       if test "x$host_vendor" = xsequent; then
8874         # Use $CC to link under sequent, because it throws in some extra .o
8875         # files that make .init and .fini sections work.
8876         archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
8877       else
8878         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
8879       fi
8880       hardcode_libdir_flag_spec='-L$libdir'
8881       hardcode_direct=yes
8882       hardcode_minus_L=yes
8883       hardcode_shlibpath_var=no
8884       ;;
8885
8886     sysv4)
8887       case $host_vendor in
8888         sni)
8889           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8890           hardcode_direct=yes # is this really true???
8891         ;;
8892         siemens)
8893           ## LD is ld it makes a PLAMLIB
8894           ## CC just makes a GrossModule.
8895           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8896           reload_cmds='$CC -r -o $output$reload_objs'
8897           hardcode_direct=no
8898         ;;
8899         motorola)
8900           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8901           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
8902         ;;
8903       esac
8904       runpath_var='LD_RUN_PATH'
8905       hardcode_shlibpath_var=no
8906       ;;
8907
8908     sysv4.3*)
8909       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8910       hardcode_shlibpath_var=no
8911       export_dynamic_flag_spec='-Bexport'
8912       ;;
8913
8914     sysv4*MP*)
8915       if test -d /usr/nec; then
8916         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8917         hardcode_shlibpath_var=no
8918         runpath_var=LD_RUN_PATH
8919         hardcode_runpath_var=yes
8920         ld_shlibs=yes
8921       fi
8922       ;;
8923
8924     sysv4.2uw2*)
8925       archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8926       hardcode_direct=yes
8927       hardcode_minus_L=no
8928       hardcode_shlibpath_var=no
8929       hardcode_runpath_var=yes
8930       runpath_var=LD_RUN_PATH
8931       ;;
8932
8933    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
8934       no_undefined_flag='${wl}-z ${wl}text'
8935       if test "$GCC" = yes; then
8936         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8937       else
8938         archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8939       fi
8940       runpath_var='LD_RUN_PATH'
8941       hardcode_shlibpath_var=no
8942       ;;
8943
8944     sysv5*)
8945       no_undefined_flag=' -z text'
8946       # $CC -shared without GNU ld will not create a library from C++
8947       # object files and a static libstdc++, better avoid it by now
8948       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8949       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8950                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8951       hardcode_libdir_flag_spec=
8952       hardcode_shlibpath_var=no
8953       runpath_var='LD_RUN_PATH'
8954       ;;
8955
8956     uts4*)
8957       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8958       hardcode_libdir_flag_spec='-L$libdir'
8959       hardcode_shlibpath_var=no
8960       ;;
8961
8962     *)
8963       ld_shlibs=no
8964       ;;
8965     esac
8966   fi
8967
8968 echo "$as_me:$LINENO: result: $ld_shlibs" >&5
8969 echo "${ECHO_T}$ld_shlibs" >&6
8970 test "$ld_shlibs" = no && can_build_shared=no
8971
8972 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
8973 if test "$GCC" = yes; then
8974   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
8975 fi
8976
8977 #
8978 # Do we need to explicitly link libc?
8979 #
8980 case "x$archive_cmds_need_lc" in
8981 x|xyes)
8982   # Assume -lc should be added
8983   archive_cmds_need_lc=yes
8984
8985   if test "$enable_shared" = yes && test "$GCC" = yes; then
8986     case $archive_cmds in
8987     *'~'*)
8988       # FIXME: we may have to deal with multi-command sequences.
8989       ;;
8990     '$CC '*)
8991       # Test whether the compiler implicitly links with -lc since on some
8992       # systems, -lgcc has to come before -lc. If gcc already passes -lc
8993       # to ld, don't add -lc before -lgcc.
8994       echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
8995 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
8996       $rm conftest*
8997       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8998
8999       if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9000   (eval $ac_compile) 2>&5
9001   ac_status=$?
9002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9003   (exit $ac_status); } 2>conftest.err; then
9004         soname=conftest
9005         lib=conftest
9006         libobjs=conftest.$ac_objext
9007         deplibs=
9008         wl=$lt_prog_compiler_wl
9009         compiler_flags=-v
9010         linker_flags=-v
9011         verstring=
9012         output_objdir=.
9013         libname=conftest
9014         lt_save_allow_undefined_flag=$allow_undefined_flag
9015         allow_undefined_flag=
9016         if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
9017   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
9018   ac_status=$?
9019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9020   (exit $ac_status); }
9021         then
9022           archive_cmds_need_lc=no
9023         else
9024           archive_cmds_need_lc=yes
9025         fi
9026         allow_undefined_flag=$lt_save_allow_undefined_flag
9027       else
9028         cat conftest.err 1>&5
9029       fi
9030       $rm conftest*
9031       echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
9032 echo "${ECHO_T}$archive_cmds_need_lc" >&6
9033       ;;
9034     esac
9035   fi
9036   ;;
9037 esac
9038
9039 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
9040 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
9041 library_names_spec=
9042 libname_spec='lib$name'
9043 soname_spec=
9044 shrext_cmds=".so"
9045 postinstall_cmds=
9046 postuninstall_cmds=
9047 finish_cmds=
9048 finish_eval=
9049 shlibpath_var=
9050 shlibpath_overrides_runpath=unknown
9051 version_type=none
9052 dynamic_linker="$host_os ld.so"
9053 sys_lib_dlsearch_path_spec="/lib /usr/lib"
9054 if test "$GCC" = yes; then
9055   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9056   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
9057     # if the path contains ";" then we assume it to be the separator
9058     # otherwise default to the standard path separator (i.e. ":") - it is
9059     # assumed that no part of a normal pathname contains ";" but that should
9060     # okay in the real world where ";" in dirpaths is itself problematic.
9061     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9062   else
9063     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
9064   fi
9065 else
9066   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
9067 fi
9068 need_lib_prefix=unknown
9069 hardcode_into_libs=no
9070
9071 # when you set need_version to no, make sure it does not cause -set_version
9072 # flags to be left without arguments
9073 need_version=unknown
9074
9075 case $host_os in
9076 aix3*)
9077   version_type=linux
9078   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
9079   shlibpath_var=LIBPATH
9080
9081   # AIX 3 has no versioning support, so we append a major version to the name.
9082   soname_spec='${libname}${release}${shared_ext}$major'
9083   ;;
9084
9085 aix4* | aix5*)
9086   version_type=linux
9087   need_lib_prefix=no
9088   need_version=no
9089   hardcode_into_libs=yes
9090   if test "$host_cpu" = ia64; then
9091     # AIX 5 supports IA64
9092     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
9093     shlibpath_var=LD_LIBRARY_PATH
9094   else
9095     # With GCC up to 2.95.x, collect2 would create an import file
9096     # for dependence libraries.  The import file would start with
9097     # the line `#! .'.  This would cause the generated library to
9098     # depend on `.', always an invalid library.  This was fixed in
9099     # development snapshots of GCC prior to 3.0.
9100     case $host_os in
9101       aix4 | aix4.[01] | aix4.[01].*)
9102       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
9103            echo ' yes '
9104            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
9105         :
9106       else
9107         can_build_shared=no
9108       fi
9109       ;;
9110     esac
9111     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
9112     # soname into executable. Probably we can add versioning support to
9113     # collect2, so additional links can be useful in future.
9114     if test "$aix_use_runtimelinking" = yes; then
9115       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
9116       # instead of lib<name>.a to let people know that these are not
9117       # typical AIX shared libraries.
9118       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9119     else
9120       # We preserve .a as extension for shared libraries through AIX4.2
9121       # and later when we are not doing run time linking.
9122       library_names_spec='${libname}${release}.a $libname.a'
9123       soname_spec='${libname}${release}${shared_ext}$major'
9124     fi
9125     shlibpath_var=LIBPATH
9126   fi
9127   ;;
9128
9129 amigaos*)
9130   library_names_spec='$libname.ixlibrary $libname.a'
9131   # Create ${libname}_ixlibrary.a entries in /sys/libs.
9132   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'
9133   ;;
9134
9135 beos*)
9136   library_names_spec='${libname}${shared_ext}'
9137   dynamic_linker="$host_os ld.so"
9138   shlibpath_var=LIBRARY_PATH
9139   ;;
9140
9141 bsdi[45]*)
9142   version_type=linux
9143   need_version=no
9144   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9145   soname_spec='${libname}${release}${shared_ext}$major'
9146   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
9147   shlibpath_var=LD_LIBRARY_PATH
9148   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
9149   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
9150   # the default ld.so.conf also contains /usr/contrib/lib and
9151   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
9152   # libtool to hard-code these into programs
9153   ;;
9154
9155 cygwin* | mingw* | pw32*)
9156   version_type=windows
9157   shrext_cmds=".dll"
9158   need_version=no
9159   need_lib_prefix=no
9160
9161   case $GCC,$host_os in
9162   yes,cygwin* | yes,mingw* | yes,pw32*)
9163     library_names_spec='$libname.dll.a'
9164     # DLL is installed to $(libdir)/../bin by postinstall_cmds
9165     postinstall_cmds='base_file=`basename \${file}`~
9166       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
9167       dldir=$destdir/`dirname \$dlpath`~
9168       test -d \$dldir || mkdir -p \$dldir~
9169       $install_prog $dir/$dlname \$dldir/$dlname~
9170       chmod a+x \$dldir/$dlname'
9171     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
9172       dlpath=$dir/\$dldll~
9173        $rm \$dlpath'
9174     shlibpath_overrides_runpath=yes
9175
9176     case $host_os in
9177     cygwin*)
9178       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
9179       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9180       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
9181       ;;
9182     mingw*)
9183       # MinGW DLLs use traditional 'lib' prefix
9184       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9185       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9186       if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
9187         # It is most probably a Windows format PATH printed by
9188         # mingw gcc, but we are running on Cygwin. Gcc prints its search
9189         # path with ; separators, and with drive letters. We can handle the
9190         # drive letters (cygwin fileutils understands them), so leave them,
9191         # especially as we might pass files found there to a mingw objdump,
9192         # which wouldn't understand a cygwinified path. Ahh.
9193         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9194       else
9195         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
9196       fi
9197       ;;
9198     pw32*)
9199       # pw32 DLLs use 'pw' prefix rather than 'lib'
9200       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9201       ;;
9202     esac
9203     ;;
9204
9205   *)
9206     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
9207     ;;
9208   esac
9209   dynamic_linker='Win32 ld.exe'
9210   # FIXME: first we should search . and the directory the executable is in
9211   shlibpath_var=PATH
9212   ;;
9213
9214 darwin* | rhapsody*)
9215   dynamic_linker="$host_os dyld"
9216   version_type=darwin
9217   need_lib_prefix=no
9218   need_version=no
9219   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
9220   soname_spec='${libname}${release}${major}$shared_ext'
9221   shlibpath_overrides_runpath=yes
9222   shlibpath_var=DYLD_LIBRARY_PATH
9223   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
9224   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
9225   if test "$GCC" = yes; then
9226     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"`
9227   else
9228     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
9229   fi
9230   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
9231   ;;
9232
9233 dgux*)
9234   version_type=linux
9235   need_lib_prefix=no
9236   need_version=no
9237   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
9238   soname_spec='${libname}${release}${shared_ext}$major'
9239   shlibpath_var=LD_LIBRARY_PATH
9240   ;;
9241
9242 freebsd1*)
9243   dynamic_linker=no
9244   ;;
9245
9246 kfreebsd*-gnu)
9247   version_type=linux
9248   need_lib_prefix=no
9249   need_version=no
9250   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9251   soname_spec='${libname}${release}${shared_ext}$major'
9252   shlibpath_var=LD_LIBRARY_PATH
9253   shlibpath_overrides_runpath=no
9254   hardcode_into_libs=yes
9255   dynamic_linker='GNU ld.so'
9256   ;;
9257
9258 freebsd* | dragonfly*)
9259   # DragonFly does not have aout.  When/if they implement a new
9260   # versioning mechanism, adjust this.
9261   if test -x /usr/bin/objformat; then
9262     objformat=`/usr/bin/objformat`
9263   else
9264     case $host_os in
9265     freebsd[123]*) objformat=aout ;;
9266     *) objformat=elf ;;
9267     esac
9268   fi
9269   version_type=freebsd-$objformat
9270   case $version_type in
9271     freebsd-elf*)
9272       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
9273       need_version=no
9274       need_lib_prefix=no
9275       ;;
9276     freebsd-*)
9277       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
9278       need_version=yes
9279       ;;
9280   esac
9281   shlibpath_var=LD_LIBRARY_PATH
9282   case $host_os in
9283   freebsd2*)
9284     shlibpath_overrides_runpath=yes
9285     ;;
9286   freebsd3.[01]* | freebsdelf3.[01]*)
9287     shlibpath_overrides_runpath=yes
9288     hardcode_into_libs=yes
9289     ;;
9290   *) # from 3.2 on
9291     shlibpath_overrides_runpath=no
9292     hardcode_into_libs=yes
9293     ;;
9294   esac
9295   ;;
9296
9297 gnu*)
9298   version_type=linux
9299   need_lib_prefix=no
9300   need_version=no
9301   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
9302   soname_spec='${libname}${release}${shared_ext}$major'
9303   shlibpath_var=LD_LIBRARY_PATH
9304   hardcode_into_libs=yes
9305   ;;
9306
9307 hpux9* | hpux10* | hpux11*)
9308   # Give a soname corresponding to the major version so that dld.sl refuses to
9309   # link against other versions.
9310   version_type=sunos
9311   need_lib_prefix=no
9312   need_version=no
9313   case $host_cpu in
9314   ia64*)
9315     shrext_cmds='.so'
9316     hardcode_into_libs=yes
9317     dynamic_linker="$host_os dld.so"
9318     shlibpath_var=LD_LIBRARY_PATH
9319     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9320     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9321     soname_spec='${libname}${release}${shared_ext}$major'
9322     if test "X$HPUX_IA64_MODE" = X32; then
9323       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
9324     else
9325       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
9326     fi
9327     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9328     ;;
9329    hppa*64*)
9330      shrext_cmds='.sl'
9331      hardcode_into_libs=yes
9332      dynamic_linker="$host_os dld.sl"
9333      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
9334      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9335      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9336      soname_spec='${libname}${release}${shared_ext}$major'
9337      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
9338      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9339      ;;
9340    *)
9341     shrext_cmds='.sl'
9342     dynamic_linker="$host_os dld.sl"
9343     shlibpath_var=SHLIB_PATH
9344     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
9345     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9346     soname_spec='${libname}${release}${shared_ext}$major'
9347     ;;
9348   esac
9349   # HP-UX runs *really* slowly unless shared libraries are mode 555.
9350   postinstall_cmds='chmod 555 $lib'
9351   ;;
9352
9353 irix5* | irix6* | nonstopux*)
9354   case $host_os in
9355     nonstopux*) version_type=nonstopux ;;
9356     *)
9357         if test "$lt_cv_prog_gnu_ld" = yes; then
9358                 version_type=linux
9359         else
9360                 version_type=irix
9361         fi ;;
9362   esac
9363   need_lib_prefix=no
9364   need_version=no
9365   soname_spec='${libname}${release}${shared_ext}$major'
9366   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
9367   case $host_os in
9368   irix5* | nonstopux*)
9369     libsuff= shlibsuff=
9370     ;;
9371   *)
9372     case $LD in # libtool.m4 will add one of these switches to LD
9373     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
9374       libsuff= shlibsuff= libmagic=32-bit;;
9375     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
9376       libsuff=32 shlibsuff=N32 libmagic=N32;;
9377     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
9378       libsuff=64 shlibsuff=64 libmagic=64-bit;;
9379     *) libsuff= shlibsuff= libmagic=never-match;;
9380     esac
9381     ;;
9382   esac
9383   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
9384   shlibpath_overrides_runpath=no
9385   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
9386   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
9387   hardcode_into_libs=yes
9388   ;;
9389
9390 # No shared lib support for Linux oldld, aout, or coff.
9391 linux*oldld* | linux*aout* | linux*coff*)
9392   dynamic_linker=no
9393   ;;
9394
9395 # This must be Linux ELF.
9396 linux*)
9397   version_type=linux
9398   need_lib_prefix=no
9399   need_version=no
9400   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9401   soname_spec='${libname}${release}${shared_ext}$major'
9402   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
9403   shlibpath_var=LD_LIBRARY_PATH
9404   shlibpath_overrides_runpath=no
9405   # This implies no fast_install, which is unacceptable.
9406   # Some rework will be needed to allow for fast_install
9407   # before this can be enabled.
9408   hardcode_into_libs=yes
9409
9410   # Append ld.so.conf contents to the search path
9411   if test -f /etc/ld.so.conf; then
9412     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' ' '`
9413     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
9414   fi
9415
9416   # We used to test for /lib/ld.so.1 and disable shared libraries on
9417   # powerpc, because MkLinux only supported shared libraries with the
9418   # GNU dynamic linker.  Since this was broken with cross compilers,
9419   # most powerpc-linux boxes support dynamic linking these days and
9420   # people can always --disable-shared, the test was removed, and we
9421   # assume the GNU/Linux dynamic linker is in use.
9422   dynamic_linker='GNU/Linux ld.so'
9423   ;;
9424
9425 knetbsd*-gnu)
9426   version_type=linux
9427   need_lib_prefix=no
9428   need_version=no
9429   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9430   soname_spec='${libname}${release}${shared_ext}$major'
9431   shlibpath_var=LD_LIBRARY_PATH
9432   shlibpath_overrides_runpath=no
9433   hardcode_into_libs=yes
9434   dynamic_linker='GNU ld.so'
9435   ;;
9436
9437 netbsd*)
9438   version_type=sunos
9439   need_lib_prefix=no
9440   need_version=no
9441   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9442     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9443     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9444     dynamic_linker='NetBSD (a.out) ld.so'
9445   else
9446     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9447     soname_spec='${libname}${release}${shared_ext}$major'
9448     dynamic_linker='NetBSD ld.elf_so'
9449   fi
9450   shlibpath_var=LD_LIBRARY_PATH
9451   shlibpath_overrides_runpath=yes
9452   hardcode_into_libs=yes
9453   ;;
9454
9455 newsos6)
9456   version_type=linux
9457   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9458   shlibpath_var=LD_LIBRARY_PATH
9459   shlibpath_overrides_runpath=yes
9460   ;;
9461
9462 nto-qnx*)
9463   version_type=linux
9464   need_lib_prefix=no
9465   need_version=no
9466   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9467   soname_spec='${libname}${release}${shared_ext}$major'
9468   shlibpath_var=LD_LIBRARY_PATH
9469   shlibpath_overrides_runpath=yes
9470   ;;
9471
9472 openbsd*)
9473   version_type=sunos
9474   need_lib_prefix=no
9475   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
9476   case $host_os in
9477     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
9478     *)                         need_version=no  ;;
9479   esac
9480   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9481   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9482   shlibpath_var=LD_LIBRARY_PATH
9483   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9484     case $host_os in
9485       openbsd2.[89] | openbsd2.[89].*)
9486         shlibpath_overrides_runpath=no
9487         ;;
9488       *)
9489         shlibpath_overrides_runpath=yes
9490         ;;
9491       esac
9492   else
9493     shlibpath_overrides_runpath=yes
9494   fi
9495   ;;
9496
9497 os2*)
9498   libname_spec='$name'
9499   shrext_cmds=".dll"
9500   need_lib_prefix=no
9501   library_names_spec='$libname${shared_ext} $libname.a'
9502   dynamic_linker='OS/2 ld.exe'
9503   shlibpath_var=LIBPATH
9504   ;;
9505
9506 osf3* | osf4* | osf5*)
9507   version_type=osf
9508   need_lib_prefix=no
9509   need_version=no
9510   soname_spec='${libname}${release}${shared_ext}$major'
9511   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9512   shlibpath_var=LD_LIBRARY_PATH
9513   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
9514   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
9515   ;;
9516
9517 sco3.2v5*)
9518   version_type=osf
9519   soname_spec='${libname}${release}${shared_ext}$major'
9520   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9521   shlibpath_var=LD_LIBRARY_PATH
9522   ;;
9523
9524 solaris*)
9525   version_type=linux
9526   need_lib_prefix=no
9527   need_version=no
9528   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9529   soname_spec='${libname}${release}${shared_ext}$major'
9530   shlibpath_var=LD_LIBRARY_PATH
9531   shlibpath_overrides_runpath=yes
9532   hardcode_into_libs=yes
9533   # ldd complains unless libraries are executable
9534   postinstall_cmds='chmod +x $lib'
9535   ;;
9536
9537 sunos4*)
9538   version_type=sunos
9539   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9540   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
9541   shlibpath_var=LD_LIBRARY_PATH
9542   shlibpath_overrides_runpath=yes
9543   if test "$with_gnu_ld" = yes; then
9544     need_lib_prefix=no
9545   fi
9546   need_version=yes
9547   ;;
9548
9549 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9550   version_type=linux
9551   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9552   soname_spec='${libname}${release}${shared_ext}$major'
9553   shlibpath_var=LD_LIBRARY_PATH
9554   case $host_vendor in
9555     sni)
9556       shlibpath_overrides_runpath=no
9557       need_lib_prefix=no
9558       export_dynamic_flag_spec='${wl}-Blargedynsym'
9559       runpath_var=LD_RUN_PATH
9560       ;;
9561     siemens)
9562       need_lib_prefix=no
9563       ;;
9564     motorola)
9565       need_lib_prefix=no
9566       need_version=no
9567       shlibpath_overrides_runpath=no
9568       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
9569       ;;
9570   esac
9571   ;;
9572
9573 sysv4*MP*)
9574   if test -d /usr/nec ;then
9575     version_type=linux
9576     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
9577     soname_spec='$libname${shared_ext}.$major'
9578     shlibpath_var=LD_LIBRARY_PATH
9579   fi
9580   ;;
9581
9582 uts4*)
9583   version_type=linux
9584   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9585   soname_spec='${libname}${release}${shared_ext}$major'
9586   shlibpath_var=LD_LIBRARY_PATH
9587   ;;
9588
9589 *)
9590   dynamic_linker=no
9591   ;;
9592 esac
9593 echo "$as_me:$LINENO: result: $dynamic_linker" >&5
9594 echo "${ECHO_T}$dynamic_linker" >&6
9595 test "$dynamic_linker" = no && can_build_shared=no
9596
9597 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
9598 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
9599 hardcode_action=
9600 if test -n "$hardcode_libdir_flag_spec" || \
9601    test -n "$runpath_var" || \
9602    test "X$hardcode_automatic" = "Xyes" ; then
9603
9604   # We can hardcode non-existant directories.
9605   if test "$hardcode_direct" != no &&
9606      # If the only mechanism to avoid hardcoding is shlibpath_var, we
9607      # have to relink, otherwise we might link with an installed library
9608      # when we should be linking with a yet-to-be-installed one
9609      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
9610      test "$hardcode_minus_L" != no; then
9611     # Linking always hardcodes the temporary library directory.
9612     hardcode_action=relink
9613   else
9614     # We can link without hardcoding, and we can hardcode nonexisting dirs.
9615     hardcode_action=immediate
9616   fi
9617 else
9618   # We cannot hardcode anything, or else we can only hardcode existing
9619   # directories.
9620   hardcode_action=unsupported
9621 fi
9622 echo "$as_me:$LINENO: result: $hardcode_action" >&5
9623 echo "${ECHO_T}$hardcode_action" >&6
9624
9625 if test "$hardcode_action" = relink; then
9626   # Fast installation is not supported
9627   enable_fast_install=no
9628 elif test "$shlibpath_overrides_runpath" = yes ||
9629      test "$enable_shared" = no; then
9630   # Fast installation is not necessary
9631   enable_fast_install=needless
9632 fi
9633
9634 striplib=
9635 old_striplib=
9636 echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
9637 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
9638 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
9639   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
9640   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
9641   echo "$as_me:$LINENO: result: yes" >&5
9642 echo "${ECHO_T}yes" >&6
9643 else
9644 # FIXME - insert some real tests, host_os isn't really good enough
9645   case $host_os in
9646    darwin*)
9647        if test -n "$STRIP" ; then
9648          striplib="$STRIP -x"
9649          echo "$as_me:$LINENO: result: yes" >&5
9650 echo "${ECHO_T}yes" >&6
9651        else
9652   echo "$as_me:$LINENO: result: no" >&5
9653 echo "${ECHO_T}no" >&6
9654 fi
9655        ;;
9656    *)
9657   echo "$as_me:$LINENO: result: no" >&5
9658 echo "${ECHO_T}no" >&6
9659     ;;
9660   esac
9661 fi
9662
9663 if test "x$enable_dlopen" != xyes; then
9664   enable_dlopen=unknown
9665   enable_dlopen_self=unknown
9666   enable_dlopen_self_static=unknown
9667 else
9668   lt_cv_dlopen=no
9669   lt_cv_dlopen_libs=
9670
9671   case $host_os in
9672   beos*)
9673     lt_cv_dlopen="load_add_on"
9674     lt_cv_dlopen_libs=
9675     lt_cv_dlopen_self=yes
9676     ;;
9677
9678   mingw* | pw32*)
9679     lt_cv_dlopen="LoadLibrary"
9680     lt_cv_dlopen_libs=
9681    ;;
9682
9683   cygwin*)
9684     lt_cv_dlopen="dlopen"
9685     lt_cv_dlopen_libs=
9686    ;;
9687
9688   darwin*)
9689   # if libdl is installed we need to link against it
9690     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9691 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9692 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9693   echo $ECHO_N "(cached) $ECHO_C" >&6
9694 else
9695   ac_check_lib_save_LIBS=$LIBS
9696 LIBS="-ldl  $LIBS"
9697 cat >conftest.$ac_ext <<_ACEOF
9698 /* confdefs.h.  */
9699 _ACEOF
9700 cat confdefs.h >>conftest.$ac_ext
9701 cat >>conftest.$ac_ext <<_ACEOF
9702 /* end confdefs.h.  */
9703
9704 /* Override any gcc2 internal prototype to avoid an error.  */
9705 #ifdef __cplusplus
9706 extern "C"
9707 #endif
9708 /* We use char because int might match the return type of a gcc2
9709    builtin and then its argument prototype would still apply.  */
9710 char dlopen ();
9711 int
9712 main ()
9713 {
9714 dlopen ();
9715   ;
9716   return 0;
9717 }
9718 _ACEOF
9719 rm -f conftest.$ac_objext conftest$ac_exeext
9720 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9721   (eval $ac_link) 2>conftest.er1
9722   ac_status=$?
9723   grep -v '^ *+' conftest.er1 >conftest.err
9724   rm -f conftest.er1
9725   cat conftest.err >&5
9726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9727   (exit $ac_status); } &&
9728          { ac_try='test -z "$ac_c_werror_flag"
9729                          || test ! -s conftest.err'
9730   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9731   (eval $ac_try) 2>&5
9732   ac_status=$?
9733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9734   (exit $ac_status); }; } &&
9735          { ac_try='test -s conftest$ac_exeext'
9736   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9737   (eval $ac_try) 2>&5
9738   ac_status=$?
9739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9740   (exit $ac_status); }; }; then
9741   ac_cv_lib_dl_dlopen=yes
9742 else
9743   echo "$as_me: failed program was:" >&5
9744 sed 's/^/| /' conftest.$ac_ext >&5
9745
9746 ac_cv_lib_dl_dlopen=no
9747 fi
9748 rm -f conftest.err conftest.$ac_objext \
9749       conftest$ac_exeext conftest.$ac_ext
9750 LIBS=$ac_check_lib_save_LIBS
9751 fi
9752 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9753 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9754 if test $ac_cv_lib_dl_dlopen = yes; then
9755   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
9756 else
9757
9758     lt_cv_dlopen="dyld"
9759     lt_cv_dlopen_libs=
9760     lt_cv_dlopen_self=yes
9761
9762 fi
9763
9764    ;;
9765
9766   *)
9767     echo "$as_me:$LINENO: checking for shl_load" >&5
9768 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
9769 if test "${ac_cv_func_shl_load+set}" = set; then
9770   echo $ECHO_N "(cached) $ECHO_C" >&6
9771 else
9772   cat >conftest.$ac_ext <<_ACEOF
9773 /* confdefs.h.  */
9774 _ACEOF
9775 cat confdefs.h >>conftest.$ac_ext
9776 cat >>conftest.$ac_ext <<_ACEOF
9777 /* end confdefs.h.  */
9778 /* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
9779    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9780 #define shl_load innocuous_shl_load
9781
9782 /* System header to define __stub macros and hopefully few prototypes,
9783     which can conflict with char shl_load (); below.
9784     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9785     <limits.h> exists even on freestanding compilers.  */
9786
9787 #ifdef __STDC__
9788 # include <limits.h>
9789 #else
9790 # include <assert.h>
9791 #endif
9792
9793 #undef shl_load
9794
9795 /* Override any gcc2 internal prototype to avoid an error.  */
9796 #ifdef __cplusplus
9797 extern "C"
9798 {
9799 #endif
9800 /* We use char because int might match the return type of a gcc2
9801    builtin and then its argument prototype would still apply.  */
9802 char shl_load ();
9803 /* The GNU C library defines this for functions which it implements
9804     to always fail with ENOSYS.  Some functions are actually named
9805     something starting with __ and the normal name is an alias.  */
9806 #if defined (__stub_shl_load) || defined (__stub___shl_load)
9807 choke me
9808 #else
9809 char (*f) () = shl_load;
9810 #endif
9811 #ifdef __cplusplus
9812 }
9813 #endif
9814
9815 int
9816 main ()
9817 {
9818 return f != shl_load;
9819   ;
9820   return 0;
9821 }
9822 _ACEOF
9823 rm -f conftest.$ac_objext conftest$ac_exeext
9824 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9825   (eval $ac_link) 2>conftest.er1
9826   ac_status=$?
9827   grep -v '^ *+' conftest.er1 >conftest.err
9828   rm -f conftest.er1
9829   cat conftest.err >&5
9830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9831   (exit $ac_status); } &&
9832          { ac_try='test -z "$ac_c_werror_flag"
9833                          || test ! -s conftest.err'
9834   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9835   (eval $ac_try) 2>&5
9836   ac_status=$?
9837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9838   (exit $ac_status); }; } &&
9839          { ac_try='test -s conftest$ac_exeext'
9840   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9841   (eval $ac_try) 2>&5
9842   ac_status=$?
9843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9844   (exit $ac_status); }; }; then
9845   ac_cv_func_shl_load=yes
9846 else
9847   echo "$as_me: failed program was:" >&5
9848 sed 's/^/| /' conftest.$ac_ext >&5
9849
9850 ac_cv_func_shl_load=no
9851 fi
9852 rm -f conftest.err conftest.$ac_objext \
9853       conftest$ac_exeext conftest.$ac_ext
9854 fi
9855 echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
9856 echo "${ECHO_T}$ac_cv_func_shl_load" >&6
9857 if test $ac_cv_func_shl_load = yes; then
9858   lt_cv_dlopen="shl_load"
9859 else
9860   echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9861 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9862 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9863   echo $ECHO_N "(cached) $ECHO_C" >&6
9864 else
9865   ac_check_lib_save_LIBS=$LIBS
9866 LIBS="-ldld  $LIBS"
9867 cat >conftest.$ac_ext <<_ACEOF
9868 /* confdefs.h.  */
9869 _ACEOF
9870 cat confdefs.h >>conftest.$ac_ext
9871 cat >>conftest.$ac_ext <<_ACEOF
9872 /* end confdefs.h.  */
9873
9874 /* Override any gcc2 internal prototype to avoid an error.  */
9875 #ifdef __cplusplus
9876 extern "C"
9877 #endif
9878 /* We use char because int might match the return type of a gcc2
9879    builtin and then its argument prototype would still apply.  */
9880 char shl_load ();
9881 int
9882 main ()
9883 {
9884 shl_load ();
9885   ;
9886   return 0;
9887 }
9888 _ACEOF
9889 rm -f conftest.$ac_objext conftest$ac_exeext
9890 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9891   (eval $ac_link) 2>conftest.er1
9892   ac_status=$?
9893   grep -v '^ *+' conftest.er1 >conftest.err
9894   rm -f conftest.er1
9895   cat conftest.err >&5
9896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9897   (exit $ac_status); } &&
9898          { ac_try='test -z "$ac_c_werror_flag"
9899                          || test ! -s conftest.err'
9900   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9901   (eval $ac_try) 2>&5
9902   ac_status=$?
9903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9904   (exit $ac_status); }; } &&
9905          { ac_try='test -s conftest$ac_exeext'
9906   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9907   (eval $ac_try) 2>&5
9908   ac_status=$?
9909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9910   (exit $ac_status); }; }; then
9911   ac_cv_lib_dld_shl_load=yes
9912 else
9913   echo "$as_me: failed program was:" >&5
9914 sed 's/^/| /' conftest.$ac_ext >&5
9915
9916 ac_cv_lib_dld_shl_load=no
9917 fi
9918 rm -f conftest.err conftest.$ac_objext \
9919       conftest$ac_exeext conftest.$ac_ext
9920 LIBS=$ac_check_lib_save_LIBS
9921 fi
9922 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9923 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9924 if test $ac_cv_lib_dld_shl_load = yes; then
9925   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
9926 else
9927   echo "$as_me:$LINENO: checking for dlopen" >&5
9928 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
9929 if test "${ac_cv_func_dlopen+set}" = set; then
9930   echo $ECHO_N "(cached) $ECHO_C" >&6
9931 else
9932   cat >conftest.$ac_ext <<_ACEOF
9933 /* confdefs.h.  */
9934 _ACEOF
9935 cat confdefs.h >>conftest.$ac_ext
9936 cat >>conftest.$ac_ext <<_ACEOF
9937 /* end confdefs.h.  */
9938 /* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
9939    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9940 #define dlopen innocuous_dlopen
9941
9942 /* System header to define __stub macros and hopefully few prototypes,
9943     which can conflict with char dlopen (); below.
9944     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9945     <limits.h> exists even on freestanding compilers.  */
9946
9947 #ifdef __STDC__
9948 # include <limits.h>
9949 #else
9950 # include <assert.h>
9951 #endif
9952
9953 #undef dlopen
9954
9955 /* Override any gcc2 internal prototype to avoid an error.  */
9956 #ifdef __cplusplus
9957 extern "C"
9958 {
9959 #endif
9960 /* We use char because int might match the return type of a gcc2
9961    builtin and then its argument prototype would still apply.  */
9962 char dlopen ();
9963 /* The GNU C library defines this for functions which it implements
9964     to always fail with ENOSYS.  Some functions are actually named
9965     something starting with __ and the normal name is an alias.  */
9966 #if defined (__stub_dlopen) || defined (__stub___dlopen)
9967 choke me
9968 #else
9969 char (*f) () = dlopen;
9970 #endif
9971 #ifdef __cplusplus
9972 }
9973 #endif
9974
9975 int
9976 main ()
9977 {
9978 return f != dlopen;
9979   ;
9980   return 0;
9981 }
9982 _ACEOF
9983 rm -f conftest.$ac_objext conftest$ac_exeext
9984 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9985   (eval $ac_link) 2>conftest.er1
9986   ac_status=$?
9987   grep -v '^ *+' conftest.er1 >conftest.err
9988   rm -f conftest.er1
9989   cat conftest.err >&5
9990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9991   (exit $ac_status); } &&
9992          { ac_try='test -z "$ac_c_werror_flag"
9993                          || test ! -s conftest.err'
9994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9995   (eval $ac_try) 2>&5
9996   ac_status=$?
9997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9998   (exit $ac_status); }; } &&
9999          { ac_try='test -s conftest$ac_exeext'
10000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10001   (eval $ac_try) 2>&5
10002   ac_status=$?
10003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10004   (exit $ac_status); }; }; then
10005   ac_cv_func_dlopen=yes
10006 else
10007   echo "$as_me: failed program was:" >&5
10008 sed 's/^/| /' conftest.$ac_ext >&5
10009
10010 ac_cv_func_dlopen=no
10011 fi
10012 rm -f conftest.err conftest.$ac_objext \
10013       conftest$ac_exeext conftest.$ac_ext
10014 fi
10015 echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
10016 echo "${ECHO_T}$ac_cv_func_dlopen" >&6
10017 if test $ac_cv_func_dlopen = yes; then
10018   lt_cv_dlopen="dlopen"
10019 else
10020   echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10021 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10022 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10023   echo $ECHO_N "(cached) $ECHO_C" >&6
10024 else
10025   ac_check_lib_save_LIBS=$LIBS
10026 LIBS="-ldl  $LIBS"
10027 cat >conftest.$ac_ext <<_ACEOF
10028 /* confdefs.h.  */
10029 _ACEOF
10030 cat confdefs.h >>conftest.$ac_ext
10031 cat >>conftest.$ac_ext <<_ACEOF
10032 /* end confdefs.h.  */
10033
10034 /* Override any gcc2 internal prototype to avoid an error.  */
10035 #ifdef __cplusplus
10036 extern "C"
10037 #endif
10038 /* We use char because int might match the return type of a gcc2
10039    builtin and then its argument prototype would still apply.  */
10040 char dlopen ();
10041 int
10042 main ()
10043 {
10044 dlopen ();
10045   ;
10046   return 0;
10047 }
10048 _ACEOF
10049 rm -f conftest.$ac_objext conftest$ac_exeext
10050 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10051   (eval $ac_link) 2>conftest.er1
10052   ac_status=$?
10053   grep -v '^ *+' conftest.er1 >conftest.err
10054   rm -f conftest.er1
10055   cat conftest.err >&5
10056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10057   (exit $ac_status); } &&
10058          { ac_try='test -z "$ac_c_werror_flag"
10059                          || test ! -s conftest.err'
10060   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10061   (eval $ac_try) 2>&5
10062   ac_status=$?
10063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10064   (exit $ac_status); }; } &&
10065          { ac_try='test -s conftest$ac_exeext'
10066   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10067   (eval $ac_try) 2>&5
10068   ac_status=$?
10069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10070   (exit $ac_status); }; }; then
10071   ac_cv_lib_dl_dlopen=yes
10072 else
10073   echo "$as_me: failed program was:" >&5
10074 sed 's/^/| /' conftest.$ac_ext >&5
10075
10076 ac_cv_lib_dl_dlopen=no
10077 fi
10078 rm -f conftest.err conftest.$ac_objext \
10079       conftest$ac_exeext conftest.$ac_ext
10080 LIBS=$ac_check_lib_save_LIBS
10081 fi
10082 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10083 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10084 if test $ac_cv_lib_dl_dlopen = yes; then
10085   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10086 else
10087   echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
10088 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
10089 if test "${ac_cv_lib_svld_dlopen+set}" = set; then
10090   echo $ECHO_N "(cached) $ECHO_C" >&6
10091 else
10092   ac_check_lib_save_LIBS=$LIBS
10093 LIBS="-lsvld  $LIBS"
10094 cat >conftest.$ac_ext <<_ACEOF
10095 /* confdefs.h.  */
10096 _ACEOF
10097 cat confdefs.h >>conftest.$ac_ext
10098 cat >>conftest.$ac_ext <<_ACEOF
10099 /* end confdefs.h.  */
10100
10101 /* Override any gcc2 internal prototype to avoid an error.  */
10102 #ifdef __cplusplus
10103 extern "C"
10104 #endif
10105 /* We use char because int might match the return type of a gcc2
10106    builtin and then its argument prototype would still apply.  */
10107 char dlopen ();
10108 int
10109 main ()
10110 {
10111 dlopen ();
10112   ;
10113   return 0;
10114 }
10115 _ACEOF
10116 rm -f conftest.$ac_objext conftest$ac_exeext
10117 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10118   (eval $ac_link) 2>conftest.er1
10119   ac_status=$?
10120   grep -v '^ *+' conftest.er1 >conftest.err
10121   rm -f conftest.er1
10122   cat conftest.err >&5
10123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10124   (exit $ac_status); } &&
10125          { ac_try='test -z "$ac_c_werror_flag"
10126                          || test ! -s conftest.err'
10127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10128   (eval $ac_try) 2>&5
10129   ac_status=$?
10130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10131   (exit $ac_status); }; } &&
10132          { ac_try='test -s conftest$ac_exeext'
10133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10134   (eval $ac_try) 2>&5
10135   ac_status=$?
10136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10137   (exit $ac_status); }; }; then
10138   ac_cv_lib_svld_dlopen=yes
10139 else
10140   echo "$as_me: failed program was:" >&5
10141 sed 's/^/| /' conftest.$ac_ext >&5
10142
10143 ac_cv_lib_svld_dlopen=no
10144 fi
10145 rm -f conftest.err conftest.$ac_objext \
10146       conftest$ac_exeext conftest.$ac_ext
10147 LIBS=$ac_check_lib_save_LIBS
10148 fi
10149 echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
10150 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
10151 if test $ac_cv_lib_svld_dlopen = yes; then
10152   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
10153 else
10154   echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
10155 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
10156 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
10157   echo $ECHO_N "(cached) $ECHO_C" >&6
10158 else
10159   ac_check_lib_save_LIBS=$LIBS
10160 LIBS="-ldld  $LIBS"
10161 cat >conftest.$ac_ext <<_ACEOF
10162 /* confdefs.h.  */
10163 _ACEOF
10164 cat confdefs.h >>conftest.$ac_ext
10165 cat >>conftest.$ac_ext <<_ACEOF
10166 /* end confdefs.h.  */
10167
10168 /* Override any gcc2 internal prototype to avoid an error.  */
10169 #ifdef __cplusplus
10170 extern "C"
10171 #endif
10172 /* We use char because int might match the return type of a gcc2
10173    builtin and then its argument prototype would still apply.  */
10174 char dld_link ();
10175 int
10176 main ()
10177 {
10178 dld_link ();
10179   ;
10180   return 0;
10181 }
10182 _ACEOF
10183 rm -f conftest.$ac_objext conftest$ac_exeext
10184 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10185   (eval $ac_link) 2>conftest.er1
10186   ac_status=$?
10187   grep -v '^ *+' conftest.er1 >conftest.err
10188   rm -f conftest.er1
10189   cat conftest.err >&5
10190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10191   (exit $ac_status); } &&
10192          { ac_try='test -z "$ac_c_werror_flag"
10193                          || test ! -s conftest.err'
10194   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10195   (eval $ac_try) 2>&5
10196   ac_status=$?
10197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10198   (exit $ac_status); }; } &&
10199          { ac_try='test -s conftest$ac_exeext'
10200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10201   (eval $ac_try) 2>&5
10202   ac_status=$?
10203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10204   (exit $ac_status); }; }; then
10205   ac_cv_lib_dld_dld_link=yes
10206 else
10207   echo "$as_me: failed program was:" >&5
10208 sed 's/^/| /' conftest.$ac_ext >&5
10209
10210 ac_cv_lib_dld_dld_link=no
10211 fi
10212 rm -f conftest.err conftest.$ac_objext \
10213       conftest$ac_exeext conftest.$ac_ext
10214 LIBS=$ac_check_lib_save_LIBS
10215 fi
10216 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
10217 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
10218 if test $ac_cv_lib_dld_dld_link = yes; then
10219   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
10220 fi
10221
10222
10223 fi
10224
10225
10226 fi
10227
10228
10229 fi
10230
10231
10232 fi
10233
10234
10235 fi
10236
10237     ;;
10238   esac
10239
10240   if test "x$lt_cv_dlopen" != xno; then
10241     enable_dlopen=yes
10242   else
10243     enable_dlopen=no
10244   fi
10245
10246   case $lt_cv_dlopen in
10247   dlopen)
10248     save_CPPFLAGS="$CPPFLAGS"
10249     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
10250
10251     save_LDFLAGS="$LDFLAGS"
10252     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
10253
10254     save_LIBS="$LIBS"
10255     LIBS="$lt_cv_dlopen_libs $LIBS"
10256
10257     echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
10258 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
10259 if test "${lt_cv_dlopen_self+set}" = set; then
10260   echo $ECHO_N "(cached) $ECHO_C" >&6
10261 else
10262           if test "$cross_compiling" = yes; then :
10263   lt_cv_dlopen_self=cross
10264 else
10265   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10266   lt_status=$lt_dlunknown
10267   cat > conftest.$ac_ext <<EOF
10268 #line 10268 "configure"
10269 #include "confdefs.h"
10270
10271 #if HAVE_DLFCN_H
10272 #include <dlfcn.h>
10273 #endif
10274
10275 #include <stdio.h>
10276
10277 #ifdef RTLD_GLOBAL
10278 #  define LT_DLGLOBAL           RTLD_GLOBAL
10279 #else
10280 #  ifdef DL_GLOBAL
10281 #    define LT_DLGLOBAL         DL_GLOBAL
10282 #  else
10283 #    define LT_DLGLOBAL         0
10284 #  endif
10285 #endif
10286
10287 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10288    find out it does not work in some platform. */
10289 #ifndef LT_DLLAZY_OR_NOW
10290 #  ifdef RTLD_LAZY
10291 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10292 #  else
10293 #    ifdef DL_LAZY
10294 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10295 #    else
10296 #      ifdef RTLD_NOW
10297 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10298 #      else
10299 #        ifdef DL_NOW
10300 #          define LT_DLLAZY_OR_NOW      DL_NOW
10301 #        else
10302 #          define LT_DLLAZY_OR_NOW      0
10303 #        endif
10304 #      endif
10305 #    endif
10306 #  endif
10307 #endif
10308
10309 #ifdef __cplusplus
10310 extern "C" void exit (int);
10311 #endif
10312
10313 void fnord() { int i=42;}
10314 int main ()
10315 {
10316   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10317   int status = $lt_dlunknown;
10318
10319   if (self)
10320     {
10321       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10322       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10323       /* dlclose (self); */
10324     }
10325
10326     exit (status);
10327 }
10328 EOF
10329   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10330   (eval $ac_link) 2>&5
10331   ac_status=$?
10332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10333   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
10334     (./conftest; exit; ) >&5 2>/dev/null
10335     lt_status=$?
10336     case x$lt_status in
10337       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
10338       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
10339       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
10340     esac
10341   else :
10342     # compilation failed
10343     lt_cv_dlopen_self=no
10344   fi
10345 fi
10346 rm -fr conftest*
10347
10348
10349 fi
10350 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
10351 echo "${ECHO_T}$lt_cv_dlopen_self" >&6
10352
10353     if test "x$lt_cv_dlopen_self" = xyes; then
10354       LDFLAGS="$LDFLAGS $link_static_flag"
10355       echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
10356 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
10357 if test "${lt_cv_dlopen_self_static+set}" = set; then
10358   echo $ECHO_N "(cached) $ECHO_C" >&6
10359 else
10360           if test "$cross_compiling" = yes; then :
10361   lt_cv_dlopen_self_static=cross
10362 else
10363   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10364   lt_status=$lt_dlunknown
10365   cat > conftest.$ac_ext <<EOF
10366 #line 10366 "configure"
10367 #include "confdefs.h"
10368
10369 #if HAVE_DLFCN_H
10370 #include <dlfcn.h>
10371 #endif
10372
10373 #include <stdio.h>
10374
10375 #ifdef RTLD_GLOBAL
10376 #  define LT_DLGLOBAL           RTLD_GLOBAL
10377 #else
10378 #  ifdef DL_GLOBAL
10379 #    define LT_DLGLOBAL         DL_GLOBAL
10380 #  else
10381 #    define LT_DLGLOBAL         0
10382 #  endif
10383 #endif
10384
10385 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10386    find out it does not work in some platform. */
10387 #ifndef LT_DLLAZY_OR_NOW
10388 #  ifdef RTLD_LAZY
10389 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10390 #  else
10391 #    ifdef DL_LAZY
10392 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10393 #    else
10394 #      ifdef RTLD_NOW
10395 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10396 #      else
10397 #        ifdef DL_NOW
10398 #          define LT_DLLAZY_OR_NOW      DL_NOW
10399 #        else
10400 #          define LT_DLLAZY_OR_NOW      0
10401 #        endif
10402 #      endif
10403 #    endif
10404 #  endif
10405 #endif
10406
10407 #ifdef __cplusplus
10408 extern "C" void exit (int);
10409 #endif
10410
10411 void fnord() { int i=42;}
10412 int main ()
10413 {
10414   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10415   int status = $lt_dlunknown;
10416
10417   if (self)
10418     {
10419       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10420       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10421       /* dlclose (self); */
10422     }
10423
10424     exit (status);
10425 }
10426 EOF
10427   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10428   (eval $ac_link) 2>&5
10429   ac_status=$?
10430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10431   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
10432     (./conftest; exit; ) >&5 2>/dev/null
10433     lt_status=$?
10434     case x$lt_status in
10435       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
10436       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
10437       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
10438     esac
10439   else :
10440     # compilation failed
10441     lt_cv_dlopen_self_static=no
10442   fi
10443 fi
10444 rm -fr conftest*
10445
10446
10447 fi
10448 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
10449 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
10450     fi
10451
10452     CPPFLAGS="$save_CPPFLAGS"
10453     LDFLAGS="$save_LDFLAGS"
10454     LIBS="$save_LIBS"
10455     ;;
10456   esac
10457
10458   case $lt_cv_dlopen_self in
10459   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
10460   *) enable_dlopen_self=unknown ;;
10461   esac
10462
10463   case $lt_cv_dlopen_self_static in
10464   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
10465   *) enable_dlopen_self_static=unknown ;;
10466   esac
10467 fi
10468
10469
10470 # Report which librarie types wil actually be built
10471 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
10472 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
10473 echo "$as_me:$LINENO: result: $can_build_shared" >&5
10474 echo "${ECHO_T}$can_build_shared" >&6
10475
10476 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
10477 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
10478 test "$can_build_shared" = "no" && enable_shared=no
10479
10480 # On AIX, shared libraries and static libraries use the same namespace, and
10481 # are all built from PIC.
10482 case $host_os in
10483 aix3*)
10484   test "$enable_shared" = yes && enable_static=no
10485   if test -n "$RANLIB"; then
10486     archive_cmds="$archive_cmds~\$RANLIB \$lib"
10487     postinstall_cmds='$RANLIB $lib'
10488   fi
10489   ;;
10490
10491 aix4* | aix5*)
10492   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
10493     test "$enable_shared" = yes && enable_static=no
10494   fi
10495     ;;
10496 esac
10497 echo "$as_me:$LINENO: result: $enable_shared" >&5
10498 echo "${ECHO_T}$enable_shared" >&6
10499
10500 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
10501 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
10502 # Make sure either enable_shared or enable_static is yes.
10503 test "$enable_shared" = yes || enable_static=yes
10504 echo "$as_me:$LINENO: result: $enable_static" >&5
10505 echo "${ECHO_T}$enable_static" >&6
10506
10507 # The else clause should only fire when bootstrapping the
10508 # libtool distribution, otherwise you forgot to ship ltmain.sh
10509 # with your package, and you will get complaints that there are
10510 # no rules to generate ltmain.sh.
10511 if test -f "$ltmain"; then
10512   # See if we are running on zsh, and set the options which allow our commands through
10513   # without removal of \ escapes.
10514   if test -n "${ZSH_VERSION+set}" ; then
10515     setopt NO_GLOB_SUBST
10516   fi
10517   # Now quote all the things that may contain metacharacters while being
10518   # careful not to overquote the AC_SUBSTed values.  We take copies of the
10519   # variables and quote the copies for generation of the libtool script.
10520   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
10521     SED SHELL STRIP \
10522     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
10523     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
10524     deplibs_check_method reload_flag reload_cmds need_locks \
10525     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
10526     lt_cv_sys_global_symbol_to_c_name_address \
10527     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
10528     old_postinstall_cmds old_postuninstall_cmds \
10529     compiler \
10530     CC \
10531     LD \
10532     lt_prog_compiler_wl \
10533     lt_prog_compiler_pic \
10534     lt_prog_compiler_static \
10535     lt_prog_compiler_no_builtin_flag \
10536     export_dynamic_flag_spec \
10537     thread_safe_flag_spec \
10538     whole_archive_flag_spec \
10539     enable_shared_with_static_runtimes \
10540     old_archive_cmds \
10541     old_archive_from_new_cmds \
10542     predep_objects \
10543     postdep_objects \
10544     predeps \
10545     postdeps \
10546     compiler_lib_search_path \
10547     archive_cmds \
10548     archive_expsym_cmds \
10549     postinstall_cmds \
10550     postuninstall_cmds \
10551     old_archive_from_expsyms_cmds \
10552     allow_undefined_flag \
10553     no_undefined_flag \
10554     export_symbols_cmds \
10555     hardcode_libdir_flag_spec \
10556     hardcode_libdir_flag_spec_ld \
10557     hardcode_libdir_separator \
10558     hardcode_automatic \
10559     module_cmds \
10560     module_expsym_cmds \
10561     lt_cv_prog_compiler_c_o \
10562     exclude_expsyms \
10563     include_expsyms; do
10564
10565     case $var in
10566     old_archive_cmds | \
10567     old_archive_from_new_cmds | \
10568     archive_cmds | \
10569     archive_expsym_cmds | \
10570     module_cmds | \
10571     module_expsym_cmds | \
10572     old_archive_from_expsyms_cmds | \
10573     export_symbols_cmds | \
10574     extract_expsyms_cmds | reload_cmds | finish_cmds | \
10575     postinstall_cmds | postuninstall_cmds | \
10576     old_postinstall_cmds | old_postuninstall_cmds | \
10577     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
10578       # Double-quote double-evaled strings.
10579       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
10580       ;;
10581     *)
10582       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
10583       ;;
10584     esac
10585   done
10586
10587   case $lt_echo in
10588   *'\$0 --fallback-echo"')
10589     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
10590     ;;
10591   esac
10592
10593 cfgfile="${ofile}T"
10594   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
10595   $rm -f "$cfgfile"
10596   { echo "$as_me:$LINENO: creating $ofile" >&5
10597 echo "$as_me: creating $ofile" >&6;}
10598
10599   cat <<__EOF__ >> "$cfgfile"
10600 #! $SHELL
10601
10602 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
10603 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
10604 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
10605 #
10606 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
10607 # Free Software Foundation, Inc.
10608 #
10609 # This file is part of GNU Libtool:
10610 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
10611 #
10612 # This program is free software; you can redistribute it and/or modify
10613 # it under the terms of the GNU General Public License as published by
10614 # the Free Software Foundation; either version 2 of the License, or
10615 # (at your option) any later version.
10616 #
10617 # This program is distributed in the hope that it will be useful, but
10618 # WITHOUT ANY WARRANTY; without even the implied warranty of
10619 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10620 # General Public License for more details.
10621 #
10622 # You should have received a copy of the GNU General Public License
10623 # along with this program; if not, write to the Free Software
10624 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
10625 #
10626 # As a special exception to the GNU General Public License, if you
10627 # distribute this file as part of a program that contains a
10628 # configuration script generated by Autoconf, you may include it under
10629 # the same distribution terms that you use for the rest of that program.
10630
10631 # A sed program that does not truncate output.
10632 SED=$lt_SED
10633
10634 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
10635 Xsed="$SED -e 1s/^X//"
10636
10637 # The HP-UX ksh and POSIX shell print the target directory to stdout
10638 # if CDPATH is set.
10639 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
10640
10641 # The names of the tagged configurations supported by this script.
10642 available_tags=
10643
10644 # ### BEGIN LIBTOOL CONFIG
10645
10646 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10647
10648 # Shell to use when invoking shell scripts.
10649 SHELL=$lt_SHELL
10650
10651 # Whether or not to build shared libraries.
10652 build_libtool_libs=$enable_shared
10653
10654 # Whether or not to build static libraries.
10655 build_old_libs=$enable_static
10656
10657 # Whether or not to add -lc for building shared libraries.
10658 build_libtool_need_lc=$archive_cmds_need_lc
10659
10660 # Whether or not to disallow shared libs when runtime libs are static
10661 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
10662
10663 # Whether or not to optimize for fast installation.
10664 fast_install=$enable_fast_install
10665
10666 # The host system.
10667 host_alias=$host_alias
10668 host=$host
10669 host_os=$host_os
10670
10671 # The build system.
10672 build_alias=$build_alias
10673 build=$build
10674 build_os=$build_os
10675
10676 # An echo program that does not interpret backslashes.
10677 echo=$lt_echo
10678
10679 # The archiver.
10680 AR=$lt_AR
10681 AR_FLAGS=$lt_AR_FLAGS
10682
10683 # A C compiler.
10684 LTCC=$lt_LTCC
10685
10686 # A language-specific compiler.
10687 CC=$lt_compiler
10688
10689 # Is the compiler the GNU C compiler?
10690 with_gcc=$GCC
10691
10692 # An ERE matcher.
10693 EGREP=$lt_EGREP
10694
10695 # The linker used to build libraries.
10696 LD=$lt_LD
10697
10698 # Whether we need hard or soft links.
10699 LN_S=$lt_LN_S
10700
10701 # A BSD-compatible nm program.
10702 NM=$lt_NM
10703
10704 # A symbol stripping program
10705 STRIP=$lt_STRIP
10706
10707 # Used to examine libraries when file_magic_cmd begins "file"
10708 MAGIC_CMD=$MAGIC_CMD
10709
10710 # Used on cygwin: DLL creation program.
10711 DLLTOOL="$DLLTOOL"
10712
10713 # Used on cygwin: object dumper.
10714 OBJDUMP="$OBJDUMP"
10715
10716 # Used on cygwin: assembler.
10717 AS="$AS"
10718
10719 # The name of the directory that contains temporary libtool files.
10720 objdir=$objdir
10721
10722 # How to create reloadable object files.
10723 reload_flag=$lt_reload_flag
10724 reload_cmds=$lt_reload_cmds
10725
10726 # How to pass a linker flag through the compiler.
10727 wl=$lt_lt_prog_compiler_wl
10728
10729 # Object file suffix (normally "o").
10730 objext="$ac_objext"
10731
10732 # Old archive suffix (normally "a").
10733 libext="$libext"
10734
10735 # Shared library suffix (normally ".so").
10736 shrext_cmds='$shrext_cmds'
10737
10738 # Executable file suffix (normally "").
10739 exeext="$exeext"
10740
10741 # Additional compiler flags for building library objects.
10742 pic_flag=$lt_lt_prog_compiler_pic
10743 pic_mode=$pic_mode
10744
10745 # What is the maximum length of a command?
10746 max_cmd_len=$lt_cv_sys_max_cmd_len
10747
10748 # Does compiler simultaneously support -c and -o options?
10749 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
10750
10751 # Must we lock files when doing compilation?
10752 need_locks=$lt_need_locks
10753
10754 # Do we need the lib prefix for modules?
10755 need_lib_prefix=$need_lib_prefix
10756
10757 # Do we need a version for libraries?
10758 need_version=$need_version
10759
10760 # Whether dlopen is supported.
10761 dlopen_support=$enable_dlopen
10762
10763 # Whether dlopen of programs is supported.
10764 dlopen_self=$enable_dlopen_self
10765
10766 # Whether dlopen of statically linked programs is supported.
10767 dlopen_self_static=$enable_dlopen_self_static
10768
10769 # Compiler flag to prevent dynamic linking.
10770 link_static_flag=$lt_lt_prog_compiler_static
10771
10772 # Compiler flag to turn off builtin functions.
10773 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
10774
10775 # Compiler flag to allow reflexive dlopens.
10776 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
10777
10778 # Compiler flag to generate shared objects directly from archives.
10779 whole_archive_flag_spec=$lt_whole_archive_flag_spec
10780
10781 # Compiler flag to generate thread-safe objects.
10782 thread_safe_flag_spec=$lt_thread_safe_flag_spec
10783
10784 # Library versioning type.
10785 version_type=$version_type
10786
10787 # Format of library name prefix.
10788 libname_spec=$lt_libname_spec
10789
10790 # List of archive names.  First name is the real one, the rest are links.
10791 # The last name is the one that the linker finds with -lNAME.
10792 library_names_spec=$lt_library_names_spec
10793
10794 # The coded name of the library, if different from the real name.
10795 soname_spec=$lt_soname_spec
10796
10797 # Commands used to build and install an old-style archive.
10798 RANLIB=$lt_RANLIB
10799 old_archive_cmds=$lt_old_archive_cmds
10800 old_postinstall_cmds=$lt_old_postinstall_cmds
10801 old_postuninstall_cmds=$lt_old_postuninstall_cmds
10802
10803 # Create an old-style archive from a shared archive.
10804 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
10805
10806 # Create a temporary old-style archive to link instead of a shared archive.
10807 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
10808
10809 # Commands used to build and install a shared archive.
10810 archive_cmds=$lt_archive_cmds
10811 archive_expsym_cmds=$lt_archive_expsym_cmds
10812 postinstall_cmds=$lt_postinstall_cmds
10813 postuninstall_cmds=$lt_postuninstall_cmds
10814
10815 # Commands used to build a loadable module (assumed same as above if empty)
10816 module_cmds=$lt_module_cmds
10817 module_expsym_cmds=$lt_module_expsym_cmds
10818
10819 # Commands to strip libraries.
10820 old_striplib=$lt_old_striplib
10821 striplib=$lt_striplib
10822
10823 # Dependencies to place before the objects being linked to create a
10824 # shared library.
10825 predep_objects=$lt_predep_objects
10826
10827 # Dependencies to place after the objects being linked to create a
10828 # shared library.
10829 postdep_objects=$lt_postdep_objects
10830
10831 # Dependencies to place before the objects being linked to create a
10832 # shared library.
10833 predeps=$lt_predeps
10834
10835 # Dependencies to place after the objects being linked to create a
10836 # shared library.
10837 postdeps=$lt_postdeps
10838
10839 # The library search path used internally by the compiler when linking
10840 # a shared library.
10841 compiler_lib_search_path=$lt_compiler_lib_search_path
10842
10843 # Method to check whether dependent libraries are shared objects.
10844 deplibs_check_method=$lt_deplibs_check_method
10845
10846 # Command to use when deplibs_check_method == file_magic.
10847 file_magic_cmd=$lt_file_magic_cmd
10848
10849 # Flag that allows shared libraries with undefined symbols to be built.
10850 allow_undefined_flag=$lt_allow_undefined_flag
10851
10852 # Flag that forces no undefined symbols.
10853 no_undefined_flag=$lt_no_undefined_flag
10854
10855 # Commands used to finish a libtool library installation in a directory.
10856 finish_cmds=$lt_finish_cmds
10857
10858 # Same as above, but a single script fragment to be evaled but not shown.
10859 finish_eval=$lt_finish_eval
10860
10861 # Take the output of nm and produce a listing of raw symbols and C names.
10862 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
10863
10864 # Transform the output of nm in a proper C declaration
10865 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
10866
10867 # Transform the output of nm in a C name address pair
10868 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
10869
10870 # This is the shared library runtime path variable.
10871 runpath_var=$runpath_var
10872
10873 # This is the shared library path variable.
10874 shlibpath_var=$shlibpath_var
10875
10876 # Is shlibpath searched before the hard-coded library search path?
10877 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
10878
10879 # How to hardcode a shared library path into an executable.
10880 hardcode_action=$hardcode_action
10881
10882 # Whether we should hardcode library paths into libraries.
10883 hardcode_into_libs=$hardcode_into_libs
10884
10885 # Flag to hardcode \$libdir into a binary during linking.
10886 # This must work even if \$libdir does not exist.
10887 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
10888
10889 # If ld is used when linking, flag to hardcode \$libdir into
10890 # a binary during linking. This must work even if \$libdir does
10891 # not exist.
10892 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
10893
10894 # Whether we need a single -rpath flag with a separated argument.
10895 hardcode_libdir_separator=$lt_hardcode_libdir_separator
10896
10897 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
10898 # resulting binary.
10899 hardcode_direct=$hardcode_direct
10900
10901 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
10902 # resulting binary.
10903 hardcode_minus_L=$hardcode_minus_L
10904
10905 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
10906 # the resulting binary.
10907 hardcode_shlibpath_var=$hardcode_shlibpath_var
10908
10909 # Set to yes if building a shared library automatically hardcodes DIR into the library
10910 # and all subsequent libraries and executables linked against it.
10911 hardcode_automatic=$hardcode_automatic
10912
10913 # Variables whose values should be saved in libtool wrapper scripts and
10914 # restored at relink time.
10915 variables_saved_for_relink="$variables_saved_for_relink"
10916
10917 # Whether libtool must link a program against all its dependency libraries.
10918 link_all_deplibs=$link_all_deplibs
10919
10920 # Compile-time system search path for libraries
10921 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
10922
10923 # Run-time system search path for libraries
10924 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
10925
10926 # Fix the shell variable \$srcfile for the compiler.
10927 fix_srcfile_path="$fix_srcfile_path"
10928
10929 # Set to yes if exported symbols are required.
10930 always_export_symbols=$always_export_symbols
10931
10932 # The commands to list exported symbols.
10933 export_symbols_cmds=$lt_export_symbols_cmds
10934
10935 # The commands to extract the exported symbol list from a shared archive.
10936 extract_expsyms_cmds=$lt_extract_expsyms_cmds
10937
10938 # Symbols that should not be listed in the preloaded symbols.
10939 exclude_expsyms=$lt_exclude_expsyms
10940
10941 # Symbols that must always be exported.
10942 include_expsyms=$lt_include_expsyms
10943
10944 # ### END LIBTOOL CONFIG
10945
10946 __EOF__
10947
10948
10949   case $host_os in
10950   aix3*)
10951     cat <<\EOF >> "$cfgfile"
10952
10953 # AIX sometimes has problems with the GCC collect2 program.  For some
10954 # reason, if we set the COLLECT_NAMES environment variable, the problems
10955 # vanish in a puff of smoke.
10956 if test "X${COLLECT_NAMES+set}" != Xset; then
10957   COLLECT_NAMES=
10958   export COLLECT_NAMES
10959 fi
10960 EOF
10961     ;;
10962   esac
10963
10964   # We use sed instead of cat because bash on DJGPP gets confused if
10965   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
10966   # text mode, it properly converts lines to CR/LF.  This bash problem
10967   # is reportedly fixed, but why not run on old versions too?
10968   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
10969
10970   mv -f "$cfgfile" "$ofile" || \
10971     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
10972   chmod +x "$ofile"
10973
10974 else
10975   # If there is no Makefile yet, we rely on a make rule to execute
10976   # `config.status --recheck' to rerun these tests and create the
10977   # libtool script then.
10978   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
10979   if test -f "$ltmain_in"; then
10980     test -f Makefile && make "$ltmain"
10981   fi
10982 fi
10983
10984
10985 ac_ext=c
10986 ac_cpp='$CPP $CPPFLAGS'
10987 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10988 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10989 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10990
10991 CC="$lt_save_CC"
10992
10993
10994 # Check whether --with-tags or --without-tags was given.
10995 if test "${with_tags+set}" = set; then
10996   withval="$with_tags"
10997   tagnames="$withval"
10998 fi;
10999
11000 if test -f "$ltmain" && test -n "$tagnames"; then
11001   if test ! -f "${ofile}"; then
11002     { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
11003 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
11004   fi
11005
11006   if test -z "$LTCC"; then
11007     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
11008     if test -z "$LTCC"; then
11009       { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
11010 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
11011     else
11012       { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
11013 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
11014     fi
11015   fi
11016
11017   # Extract list of available tagged configurations in $ofile.
11018   # Note that this assumes the entire list is on one line.
11019   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
11020
11021   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
11022   for tagname in $tagnames; do
11023     IFS="$lt_save_ifs"
11024     # Check whether tagname contains only valid characters
11025     case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
11026     "") ;;
11027     *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
11028 echo "$as_me: error: invalid tag name: $tagname" >&2;}
11029    { (exit 1); exit 1; }; }
11030         ;;
11031     esac
11032
11033     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
11034     then
11035       { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
11036 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
11037    { (exit 1); exit 1; }; }
11038     fi
11039
11040     # Update the list of available tags.
11041     if test -n "$tagname"; then
11042       echo appending configuration tag \"$tagname\" to $ofile
11043
11044       case $tagname in
11045       CXX)
11046         if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
11047             ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
11048             (test "X$CXX" != "Xg++"))) ; then
11049           :
11050         else
11051           tagname=""
11052         fi
11053         ;;
11054
11055       F77)
11056         if test -n "$F77" && test "X$F77" != "Xno"; then
11057           :
11058         else
11059           tagname=""
11060         fi
11061         ;;
11062
11063       GCJ)
11064         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
11065           :
11066         else
11067           tagname=""
11068         fi
11069         ;;
11070
11071       RC)
11072
11073
11074
11075 # Source file extension for RC test sources.
11076 ac_ext=rc
11077
11078 # Object file extension for compiled RC test sources.
11079 objext=o
11080 objext_RC=$objext
11081
11082 # Code to be used in simple compile tests
11083 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
11084
11085 # Code to be used in simple link tests
11086 lt_simple_link_test_code="$lt_simple_compile_test_code"
11087
11088 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11089
11090 # If no C compiler was specified, use CC.
11091 LTCC=${LTCC-"$CC"}
11092
11093 # Allow CC to be a program name with arguments.
11094 compiler=$CC
11095
11096
11097 # save warnings/boilerplate of simple test code
11098 ac_outfile=conftest.$ac_objext
11099 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
11100 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11101 _lt_compiler_boilerplate=`cat conftest.err`
11102 $rm conftest*
11103
11104 ac_outfile=conftest.$ac_objext
11105 printf "$lt_simple_link_test_code" >conftest.$ac_ext
11106 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11107 _lt_linker_boilerplate=`cat conftest.err`
11108 $rm conftest*
11109
11110
11111 # Allow CC to be a program name with arguments.
11112 lt_save_CC="$CC"
11113 CC=${RC-"windres"}
11114 compiler=$CC
11115 compiler_RC=$CC
11116 for cc_temp in $compiler""; do
11117   case $cc_temp in
11118     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
11119     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
11120     \-*) ;;
11121     *) break;;
11122   esac
11123 done
11124 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
11125
11126 lt_cv_prog_compiler_c_o_RC=yes
11127
11128 # The else clause should only fire when bootstrapping the
11129 # libtool distribution, otherwise you forgot to ship ltmain.sh
11130 # with your package, and you will get complaints that there are
11131 # no rules to generate ltmain.sh.
11132 if test -f "$ltmain"; then
11133   # See if we are running on zsh, and set the options which allow our commands through
11134   # without removal of \ escapes.
11135   if test -n "${ZSH_VERSION+set}" ; then
11136     setopt NO_GLOB_SUBST
11137   fi
11138   # Now quote all the things that may contain metacharacters while being
11139   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11140   # variables and quote the copies for generation of the libtool script.
11141   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11142     SED SHELL STRIP \
11143     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11144     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11145     deplibs_check_method reload_flag reload_cmds need_locks \
11146     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11147     lt_cv_sys_global_symbol_to_c_name_address \
11148     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11149     old_postinstall_cmds old_postuninstall_cmds \
11150     compiler_RC \
11151     CC_RC \
11152     LD_RC \
11153     lt_prog_compiler_wl_RC \
11154     lt_prog_compiler_pic_RC \
11155     lt_prog_compiler_static_RC \
11156     lt_prog_compiler_no_builtin_flag_RC \
11157     export_dynamic_flag_spec_RC \
11158     thread_safe_flag_spec_RC \
11159     whole_archive_flag_spec_RC \
11160     enable_shared_with_static_runtimes_RC \
11161     old_archive_cmds_RC \
11162     old_archive_from_new_cmds_RC \
11163     predep_objects_RC \
11164     postdep_objects_RC \
11165     predeps_RC \
11166     postdeps_RC \
11167     compiler_lib_search_path_RC \
11168     archive_cmds_RC \
11169     archive_expsym_cmds_RC \
11170     postinstall_cmds_RC \
11171     postuninstall_cmds_RC \
11172     old_archive_from_expsyms_cmds_RC \
11173     allow_undefined_flag_RC \
11174     no_undefined_flag_RC \
11175     export_symbols_cmds_RC \
11176     hardcode_libdir_flag_spec_RC \
11177     hardcode_libdir_flag_spec_ld_RC \
11178     hardcode_libdir_separator_RC \
11179     hardcode_automatic_RC \
11180     module_cmds_RC \
11181     module_expsym_cmds_RC \
11182     lt_cv_prog_compiler_c_o_RC \
11183     exclude_expsyms_RC \
11184     include_expsyms_RC; do
11185
11186     case $var in
11187     old_archive_cmds_RC | \
11188     old_archive_from_new_cmds_RC | \
11189     archive_cmds_RC | \
11190     archive_expsym_cmds_RC | \
11191     module_cmds_RC | \
11192     module_expsym_cmds_RC | \
11193     old_archive_from_expsyms_cmds_RC | \
11194     export_symbols_cmds_RC | \
11195     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11196     postinstall_cmds | postuninstall_cmds | \
11197     old_postinstall_cmds | old_postuninstall_cmds | \
11198     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11199       # Double-quote double-evaled strings.
11200       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11201       ;;
11202     *)
11203       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11204       ;;
11205     esac
11206   done
11207
11208   case $lt_echo in
11209   *'\$0 --fallback-echo"')
11210     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11211     ;;
11212   esac
11213
11214 cfgfile="$ofile"
11215
11216   cat <<__EOF__ >> "$cfgfile"
11217 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
11218
11219 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11220
11221 # Shell to use when invoking shell scripts.
11222 SHELL=$lt_SHELL
11223
11224 # Whether or not to build shared libraries.
11225 build_libtool_libs=$enable_shared
11226
11227 # Whether or not to build static libraries.
11228 build_old_libs=$enable_static
11229
11230 # Whether or not to add -lc for building shared libraries.
11231 build_libtool_need_lc=$archive_cmds_need_lc_RC
11232
11233 # Whether or not to disallow shared libs when runtime libs are static
11234 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
11235
11236 # Whether or not to optimize for fast installation.
11237 fast_install=$enable_fast_install
11238
11239 # The host system.
11240 host_alias=$host_alias
11241 host=$host
11242 host_os=$host_os
11243
11244 # The build system.
11245 build_alias=$build_alias
11246 build=$build
11247 build_os=$build_os
11248
11249 # An echo program that does not interpret backslashes.
11250 echo=$lt_echo
11251
11252 # The archiver.
11253 AR=$lt_AR
11254 AR_FLAGS=$lt_AR_FLAGS
11255
11256 # A C compiler.
11257 LTCC=$lt_LTCC
11258
11259 # A language-specific compiler.
11260 CC=$lt_compiler_RC
11261
11262 # Is the compiler the GNU C compiler?
11263 with_gcc=$GCC_RC
11264
11265 # An ERE matcher.
11266 EGREP=$lt_EGREP
11267
11268 # The linker used to build libraries.
11269 LD=$lt_LD_RC
11270
11271 # Whether we need hard or soft links.
11272 LN_S=$lt_LN_S
11273
11274 # A BSD-compatible nm program.
11275 NM=$lt_NM
11276
11277 # A symbol stripping program
11278 STRIP=$lt_STRIP
11279
11280 # Used to examine libraries when file_magic_cmd begins "file"
11281 MAGIC_CMD=$MAGIC_CMD
11282
11283 # Used on cygwin: DLL creation program.
11284 DLLTOOL="$DLLTOOL"
11285
11286 # Used on cygwin: object dumper.
11287 OBJDUMP="$OBJDUMP"
11288
11289 # Used on cygwin: assembler.
11290 AS="$AS"
11291
11292 # The name of the directory that contains temporary libtool files.
11293 objdir=$objdir
11294
11295 # How to create reloadable object files.
11296 reload_flag=$lt_reload_flag
11297 reload_cmds=$lt_reload_cmds
11298
11299 # How to pass a linker flag through the compiler.
11300 wl=$lt_lt_prog_compiler_wl_RC
11301
11302 # Object file suffix (normally "o").
11303 objext="$ac_objext"
11304
11305 # Old archive suffix (normally "a").
11306 libext="$libext"
11307
11308 # Shared library suffix (normally ".so").
11309 shrext_cmds='$shrext_cmds'
11310
11311 # Executable file suffix (normally "").
11312 exeext="$exeext"
11313
11314 # Additional compiler flags for building library objects.
11315 pic_flag=$lt_lt_prog_compiler_pic_RC
11316 pic_mode=$pic_mode
11317
11318 # What is the maximum length of a command?
11319 max_cmd_len=$lt_cv_sys_max_cmd_len
11320
11321 # Does compiler simultaneously support -c and -o options?
11322 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
11323
11324 # Must we lock files when doing compilation?
11325 need_locks=$lt_need_locks
11326
11327 # Do we need the lib prefix for modules?
11328 need_lib_prefix=$need_lib_prefix
11329
11330 # Do we need a version for libraries?
11331 need_version=$need_version
11332
11333 # Whether dlopen is supported.
11334 dlopen_support=$enable_dlopen
11335
11336 # Whether dlopen of programs is supported.
11337 dlopen_self=$enable_dlopen_self
11338
11339 # Whether dlopen of statically linked programs is supported.
11340 dlopen_self_static=$enable_dlopen_self_static
11341
11342 # Compiler flag to prevent dynamic linking.
11343 link_static_flag=$lt_lt_prog_compiler_static_RC
11344
11345 # Compiler flag to turn off builtin functions.
11346 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
11347
11348 # Compiler flag to allow reflexive dlopens.
11349 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
11350
11351 # Compiler flag to generate shared objects directly from archives.
11352 whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
11353
11354 # Compiler flag to generate thread-safe objects.
11355 thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
11356
11357 # Library versioning type.
11358 version_type=$version_type
11359
11360 # Format of library name prefix.
11361 libname_spec=$lt_libname_spec
11362
11363 # List of archive names.  First name is the real one, the rest are links.
11364 # The last name is the one that the linker finds with -lNAME.
11365 library_names_spec=$lt_library_names_spec
11366
11367 # The coded name of the library, if different from the real name.
11368 soname_spec=$lt_soname_spec
11369
11370 # Commands used to build and install an old-style archive.
11371 RANLIB=$lt_RANLIB
11372 old_archive_cmds=$lt_old_archive_cmds_RC
11373 old_postinstall_cmds=$lt_old_postinstall_cmds
11374 old_postuninstall_cmds=$lt_old_postuninstall_cmds
11375
11376 # Create an old-style archive from a shared archive.
11377 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
11378
11379 # Create a temporary old-style archive to link instead of a shared archive.
11380 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
11381
11382 # Commands used to build and install a shared archive.
11383 archive_cmds=$lt_archive_cmds_RC
11384 archive_expsym_cmds=$lt_archive_expsym_cmds_RC
11385 postinstall_cmds=$lt_postinstall_cmds
11386 postuninstall_cmds=$lt_postuninstall_cmds
11387
11388 # Commands used to build a loadable module (assumed same as above if empty)
11389 module_cmds=$lt_module_cmds_RC
11390 module_expsym_cmds=$lt_module_expsym_cmds_RC
11391
11392 # Commands to strip libraries.
11393 old_striplib=$lt_old_striplib
11394 striplib=$lt_striplib
11395
11396 # Dependencies to place before the objects being linked to create a
11397 # shared library.
11398 predep_objects=$lt_predep_objects_RC
11399
11400 # Dependencies to place after the objects being linked to create a
11401 # shared library.
11402 postdep_objects=$lt_postdep_objects_RC
11403
11404 # Dependencies to place before the objects being linked to create a
11405 # shared library.
11406 predeps=$lt_predeps_RC
11407
11408 # Dependencies to place after the objects being linked to create a
11409 # shared library.
11410 postdeps=$lt_postdeps_RC
11411
11412 # The library search path used internally by the compiler when linking
11413 # a shared library.
11414 compiler_lib_search_path=$lt_compiler_lib_search_path_RC
11415
11416 # Method to check whether dependent libraries are shared objects.
11417 deplibs_check_method=$lt_deplibs_check_method
11418
11419 # Command to use when deplibs_check_method == file_magic.
11420 file_magic_cmd=$lt_file_magic_cmd
11421
11422 # Flag that allows shared libraries with undefined symbols to be built.
11423 allow_undefined_flag=$lt_allow_undefined_flag_RC
11424
11425 # Flag that forces no undefined symbols.
11426 no_undefined_flag=$lt_no_undefined_flag_RC
11427
11428 # Commands used to finish a libtool library installation in a directory.
11429 finish_cmds=$lt_finish_cmds
11430
11431 # Same as above, but a single script fragment to be evaled but not shown.
11432 finish_eval=$lt_finish_eval
11433
11434 # Take the output of nm and produce a listing of raw symbols and C names.
11435 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
11436
11437 # Transform the output of nm in a proper C declaration
11438 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
11439
11440 # Transform the output of nm in a C name address pair
11441 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
11442
11443 # This is the shared library runtime path variable.
11444 runpath_var=$runpath_var
11445
11446 # This is the shared library path variable.
11447 shlibpath_var=$shlibpath_var
11448
11449 # Is shlibpath searched before the hard-coded library search path?
11450 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
11451
11452 # How to hardcode a shared library path into an executable.
11453 hardcode_action=$hardcode_action_RC
11454
11455 # Whether we should hardcode library paths into libraries.
11456 hardcode_into_libs=$hardcode_into_libs
11457
11458 # Flag to hardcode \$libdir into a binary during linking.
11459 # This must work even if \$libdir does not exist.
11460 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
11461
11462 # If ld is used when linking, flag to hardcode \$libdir into
11463 # a binary during linking. This must work even if \$libdir does
11464 # not exist.
11465 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
11466
11467 # Whether we need a single -rpath flag with a separated argument.
11468 hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
11469
11470 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
11471 # resulting binary.
11472 hardcode_direct=$hardcode_direct_RC
11473
11474 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
11475 # resulting binary.
11476 hardcode_minus_L=$hardcode_minus_L_RC
11477
11478 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
11479 # the resulting binary.
11480 hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
11481
11482 # Set to yes if building a shared library automatically hardcodes DIR into the library
11483 # and all subsequent libraries and executables linked against it.
11484 hardcode_automatic=$hardcode_automatic_RC
11485
11486 # Variables whose values should be saved in libtool wrapper scripts and
11487 # restored at relink time.
11488 variables_saved_for_relink="$variables_saved_for_relink"
11489
11490 # Whether libtool must link a program against all its dependency libraries.
11491 link_all_deplibs=$link_all_deplibs_RC
11492
11493 # Compile-time system search path for libraries
11494 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
11495
11496 # Run-time system search path for libraries
11497 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
11498
11499 # Fix the shell variable \$srcfile for the compiler.
11500 fix_srcfile_path="$fix_srcfile_path_RC"
11501
11502 # Set to yes if exported symbols are required.
11503 always_export_symbols=$always_export_symbols_RC
11504
11505 # The commands to list exported symbols.
11506 export_symbols_cmds=$lt_export_symbols_cmds_RC
11507
11508 # The commands to extract the exported symbol list from a shared archive.
11509 extract_expsyms_cmds=$lt_extract_expsyms_cmds
11510
11511 # Symbols that should not be listed in the preloaded symbols.
11512 exclude_expsyms=$lt_exclude_expsyms_RC
11513
11514 # Symbols that must always be exported.
11515 include_expsyms=$lt_include_expsyms_RC
11516
11517 # ### END LIBTOOL TAG CONFIG: $tagname
11518
11519 __EOF__
11520
11521
11522 else
11523   # If there is no Makefile yet, we rely on a make rule to execute
11524   # `config.status --recheck' to rerun these tests and create the
11525   # libtool script then.
11526   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
11527   if test -f "$ltmain_in"; then
11528     test -f Makefile && make "$ltmain"
11529   fi
11530 fi
11531
11532
11533 ac_ext=c
11534 ac_cpp='$CPP $CPPFLAGS'
11535 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11536 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11537 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11538
11539 CC="$lt_save_CC"
11540
11541         ;;
11542
11543       *)
11544         { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
11545 echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
11546    { (exit 1); exit 1; }; }
11547         ;;
11548       esac
11549
11550       # Append the new tag name to the list of available tags.
11551       if test -n "$tagname" ; then
11552       available_tags="$available_tags $tagname"
11553     fi
11554     fi
11555   done
11556   IFS="$lt_save_ifs"
11557
11558   # Now substitute the updated list of available tags.
11559   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
11560     mv "${ofile}T" "$ofile"
11561     chmod +x "$ofile"
11562   else
11563     rm -f "${ofile}T"
11564     { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
11565 echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
11566    { (exit 1); exit 1; }; }
11567   fi
11568 fi
11569
11570
11571
11572 # This can be used to rebuild libtool when needed
11573 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
11574
11575 # Always use our own libtool.
11576 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
11577
11578 # Prevent multiple expansion
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589 ol_link_perl=no
11590 if test $ol_enable_perl != no ; then
11591         # Extract the first word of "perl", so it can be a program name with args.
11592 set dummy perl; ac_word=$2
11593 echo "$as_me:$LINENO: checking for $ac_word" >&5
11594 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11595 if test "${ac_cv_path_PERLBIN+set}" = set; then
11596   echo $ECHO_N "(cached) $ECHO_C" >&6
11597 else
11598   case $PERLBIN in
11599   [\\/]* | ?:[\\/]*)
11600   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
11601   ;;
11602   *)
11603   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11604 for as_dir in $PATH
11605 do
11606   IFS=$as_save_IFS
11607   test -z "$as_dir" && as_dir=.
11608   for ac_exec_ext in '' $ac_executable_extensions; do
11609   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11610     ac_cv_path_PERLBIN="$as_dir/$ac_word$ac_exec_ext"
11611     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11612     break 2
11613   fi
11614 done
11615 done
11616
11617   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
11618   ;;
11619 esac
11620 fi
11621 PERLBIN=$ac_cv_path_PERLBIN
11622
11623 if test -n "$PERLBIN"; then
11624   echo "$as_me:$LINENO: result: $PERLBIN" >&5
11625 echo "${ECHO_T}$PERLBIN" >&6
11626 else
11627   echo "$as_me:$LINENO: result: no" >&5
11628 echo "${ECHO_T}no" >&6
11629 fi
11630
11631
11632         if test "no$PERLBIN" = "no" ; then
11633                 if test $ol_enable_perl = yes ; then
11634                         { { echo "$as_me:$LINENO: error: could not locate perl" >&5
11635 echo "$as_me: error: could not locate perl" >&2;}
11636    { (exit 1); exit 1; }; }
11637                 fi
11638
11639         else
11640                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
11641                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
11642
11643                 if test x"$ol_enable_perl" = "xyes" ; then
11644                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
11645                 else
11646                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
11647                 fi
11648                                 ol_link_perl=yes
11649         fi
11650 fi
11651
11652 ac_ext=c
11653 ac_cpp='$CPP $CPPFLAGS'
11654 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11655 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11656 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11657 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
11658 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
11659 # On Suns, sometimes $CPP names a directory.
11660 if test -n "$CPP" && test -d "$CPP"; then
11661   CPP=
11662 fi
11663 if test -z "$CPP"; then
11664   if test "${ac_cv_prog_CPP+set}" = set; then
11665   echo $ECHO_N "(cached) $ECHO_C" >&6
11666 else
11667       # Double quotes because CPP needs to be expanded
11668     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
11669     do
11670       ac_preproc_ok=false
11671 for ac_c_preproc_warn_flag in '' yes
11672 do
11673   # Use a header file that comes with gcc, so configuring glibc
11674   # with a fresh cross-compiler works.
11675   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11676   # <limits.h> exists even on freestanding compilers.
11677   # On the NeXT, cc -E runs the code through the compiler's parser,
11678   # not just through cpp. "Syntax error" is here to catch this case.
11679   cat >conftest.$ac_ext <<_ACEOF
11680 /* confdefs.h.  */
11681 _ACEOF
11682 cat confdefs.h >>conftest.$ac_ext
11683 cat >>conftest.$ac_ext <<_ACEOF
11684 /* end confdefs.h.  */
11685 #ifdef __STDC__
11686 # include <limits.h>
11687 #else
11688 # include <assert.h>
11689 #endif
11690                      Syntax error
11691 _ACEOF
11692 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11693   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11694   ac_status=$?
11695   grep -v '^ *+' conftest.er1 >conftest.err
11696   rm -f conftest.er1
11697   cat conftest.err >&5
11698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11699   (exit $ac_status); } >/dev/null; then
11700   if test -s conftest.err; then
11701     ac_cpp_err=$ac_c_preproc_warn_flag
11702     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11703   else
11704     ac_cpp_err=
11705   fi
11706 else
11707   ac_cpp_err=yes
11708 fi
11709 if test -z "$ac_cpp_err"; then
11710   :
11711 else
11712   echo "$as_me: failed program was:" >&5
11713 sed 's/^/| /' conftest.$ac_ext >&5
11714
11715   # Broken: fails on valid input.
11716 continue
11717 fi
11718 rm -f conftest.err conftest.$ac_ext
11719
11720   # OK, works on sane cases.  Now check whether non-existent headers
11721   # can be detected and how.
11722   cat >conftest.$ac_ext <<_ACEOF
11723 /* confdefs.h.  */
11724 _ACEOF
11725 cat confdefs.h >>conftest.$ac_ext
11726 cat >>conftest.$ac_ext <<_ACEOF
11727 /* end confdefs.h.  */
11728 #include <ac_nonexistent.h>
11729 _ACEOF
11730 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11731   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11732   ac_status=$?
11733   grep -v '^ *+' conftest.er1 >conftest.err
11734   rm -f conftest.er1
11735   cat conftest.err >&5
11736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11737   (exit $ac_status); } >/dev/null; then
11738   if test -s conftest.err; then
11739     ac_cpp_err=$ac_c_preproc_warn_flag
11740     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11741   else
11742     ac_cpp_err=
11743   fi
11744 else
11745   ac_cpp_err=yes
11746 fi
11747 if test -z "$ac_cpp_err"; then
11748   # Broken: success on invalid input.
11749 continue
11750 else
11751   echo "$as_me: failed program was:" >&5
11752 sed 's/^/| /' conftest.$ac_ext >&5
11753
11754   # Passes both tests.
11755 ac_preproc_ok=:
11756 break
11757 fi
11758 rm -f conftest.err conftest.$ac_ext
11759
11760 done
11761 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
11762 rm -f conftest.err conftest.$ac_ext
11763 if $ac_preproc_ok; then
11764   break
11765 fi
11766
11767     done
11768     ac_cv_prog_CPP=$CPP
11769
11770 fi
11771   CPP=$ac_cv_prog_CPP
11772 else
11773   ac_cv_prog_CPP=$CPP
11774 fi
11775 echo "$as_me:$LINENO: result: $CPP" >&5
11776 echo "${ECHO_T}$CPP" >&6
11777 ac_preproc_ok=false
11778 for ac_c_preproc_warn_flag in '' yes
11779 do
11780   # Use a header file that comes with gcc, so configuring glibc
11781   # with a fresh cross-compiler works.
11782   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11783   # <limits.h> exists even on freestanding compilers.
11784   # On the NeXT, cc -E runs the code through the compiler's parser,
11785   # not just through cpp. "Syntax error" is here to catch this case.
11786   cat >conftest.$ac_ext <<_ACEOF
11787 /* confdefs.h.  */
11788 _ACEOF
11789 cat confdefs.h >>conftest.$ac_ext
11790 cat >>conftest.$ac_ext <<_ACEOF
11791 /* end confdefs.h.  */
11792 #ifdef __STDC__
11793 # include <limits.h>
11794 #else
11795 # include <assert.h>
11796 #endif
11797                      Syntax error
11798 _ACEOF
11799 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11800   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11801   ac_status=$?
11802   grep -v '^ *+' conftest.er1 >conftest.err
11803   rm -f conftest.er1
11804   cat conftest.err >&5
11805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11806   (exit $ac_status); } >/dev/null; then
11807   if test -s conftest.err; then
11808     ac_cpp_err=$ac_c_preproc_warn_flag
11809     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11810   else
11811     ac_cpp_err=
11812   fi
11813 else
11814   ac_cpp_err=yes
11815 fi
11816 if test -z "$ac_cpp_err"; then
11817   :
11818 else
11819   echo "$as_me: failed program was:" >&5
11820 sed 's/^/| /' conftest.$ac_ext >&5
11821
11822   # Broken: fails on valid input.
11823 continue
11824 fi
11825 rm -f conftest.err conftest.$ac_ext
11826
11827   # OK, works on sane cases.  Now check whether non-existent headers
11828   # can be detected and how.
11829   cat >conftest.$ac_ext <<_ACEOF
11830 /* confdefs.h.  */
11831 _ACEOF
11832 cat confdefs.h >>conftest.$ac_ext
11833 cat >>conftest.$ac_ext <<_ACEOF
11834 /* end confdefs.h.  */
11835 #include <ac_nonexistent.h>
11836 _ACEOF
11837 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11838   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11839   ac_status=$?
11840   grep -v '^ *+' conftest.er1 >conftest.err
11841   rm -f conftest.er1
11842   cat conftest.err >&5
11843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11844   (exit $ac_status); } >/dev/null; then
11845   if test -s conftest.err; then
11846     ac_cpp_err=$ac_c_preproc_warn_flag
11847     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11848   else
11849     ac_cpp_err=
11850   fi
11851 else
11852   ac_cpp_err=yes
11853 fi
11854 if test -z "$ac_cpp_err"; then
11855   # Broken: success on invalid input.
11856 continue
11857 else
11858   echo "$as_me: failed program was:" >&5
11859 sed 's/^/| /' conftest.$ac_ext >&5
11860
11861   # Passes both tests.
11862 ac_preproc_ok=:
11863 break
11864 fi
11865 rm -f conftest.err conftest.$ac_ext
11866
11867 done
11868 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
11869 rm -f conftest.err conftest.$ac_ext
11870 if $ac_preproc_ok; then
11871   :
11872 else
11873   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
11874 See \`config.log' for more details." >&5
11875 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
11876 See \`config.log' for more details." >&2;}
11877    { (exit 1); exit 1; }; }
11878 fi
11879
11880 ac_ext=c
11881 ac_cpp='$CPP $CPPFLAGS'
11882 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11883 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11884 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11885
11886
11887 case $host_os in
11888   *mingw32* ) ac_cv_mingw32=yes ;;
11889   *cygwin* ) ac_cv_cygwin=yes ;;
11890 esac
11891
11892
11893
11894
11895 cat >>confdefs.h <<_ACEOF
11896 #define EXEEXT "${EXEEXT}"
11897 _ACEOF
11898
11899
11900 echo "$as_me:$LINENO: checking for be_app in -lbe" >&5
11901 echo $ECHO_N "checking for be_app in -lbe... $ECHO_C" >&6
11902 if test "${ac_cv_lib_be_be_app+set}" = set; then
11903   echo $ECHO_N "(cached) $ECHO_C" >&6
11904 else
11905   ac_check_lib_save_LIBS=$LIBS
11906 LIBS="-lbe -lroot -lnet $LIBS"
11907 cat >conftest.$ac_ext <<_ACEOF
11908 /* confdefs.h.  */
11909 _ACEOF
11910 cat confdefs.h >>conftest.$ac_ext
11911 cat >>conftest.$ac_ext <<_ACEOF
11912 /* end confdefs.h.  */
11913
11914 /* Override any gcc2 internal prototype to avoid an error.  */
11915 #ifdef __cplusplus
11916 extern "C"
11917 #endif
11918 /* We use char because int might match the return type of a gcc2
11919    builtin and then its argument prototype would still apply.  */
11920 char be_app ();
11921 int
11922 main ()
11923 {
11924 be_app ();
11925   ;
11926   return 0;
11927 }
11928 _ACEOF
11929 rm -f conftest.$ac_objext conftest$ac_exeext
11930 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11931   (eval $ac_link) 2>conftest.er1
11932   ac_status=$?
11933   grep -v '^ *+' conftest.er1 >conftest.err
11934   rm -f conftest.er1
11935   cat conftest.err >&5
11936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11937   (exit $ac_status); } &&
11938          { ac_try='test -z "$ac_c_werror_flag"
11939                          || test ! -s conftest.err'
11940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11941   (eval $ac_try) 2>&5
11942   ac_status=$?
11943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11944   (exit $ac_status); }; } &&
11945          { ac_try='test -s conftest$ac_exeext'
11946   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11947   (eval $ac_try) 2>&5
11948   ac_status=$?
11949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11950   (exit $ac_status); }; }; then
11951   ac_cv_lib_be_be_app=yes
11952 else
11953   echo "$as_me: failed program was:" >&5
11954 sed 's/^/| /' conftest.$ac_ext >&5
11955
11956 ac_cv_lib_be_be_app=no
11957 fi
11958 rm -f conftest.err conftest.$ac_objext \
11959       conftest$ac_exeext conftest.$ac_ext
11960 LIBS=$ac_check_lib_save_LIBS
11961 fi
11962 echo "$as_me:$LINENO: result: $ac_cv_lib_be_be_app" >&5
11963 echo "${ECHO_T}$ac_cv_lib_be_be_app" >&6
11964 if test $ac_cv_lib_be_be_app = yes; then
11965   LIBS="$LIBS -lbe -lroot -lnet"
11966 else
11967   :
11968 fi
11969
11970
11971 ac_ext=c
11972 ac_cpp='$CPP $CPPFLAGS'
11973 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11974 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11975 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11976 if test -n "$ac_tool_prefix"; then
11977   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
11978 set dummy ${ac_tool_prefix}gcc; ac_word=$2
11979 echo "$as_me:$LINENO: checking for $ac_word" >&5
11980 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11981 if test "${ac_cv_prog_CC+set}" = set; then
11982   echo $ECHO_N "(cached) $ECHO_C" >&6
11983 else
11984   if test -n "$CC"; then
11985   ac_cv_prog_CC="$CC" # Let the user override the test.
11986 else
11987 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11988 for as_dir in $PATH
11989 do
11990   IFS=$as_save_IFS
11991   test -z "$as_dir" && as_dir=.
11992   for ac_exec_ext in '' $ac_executable_extensions; do
11993   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11994     ac_cv_prog_CC="${ac_tool_prefix}gcc"
11995     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11996     break 2
11997   fi
11998 done
11999 done
12000
12001 fi
12002 fi
12003 CC=$ac_cv_prog_CC
12004 if test -n "$CC"; then
12005   echo "$as_me:$LINENO: result: $CC" >&5
12006 echo "${ECHO_T}$CC" >&6
12007 else
12008   echo "$as_me:$LINENO: result: no" >&5
12009 echo "${ECHO_T}no" >&6
12010 fi
12011
12012 fi
12013 if test -z "$ac_cv_prog_CC"; then
12014   ac_ct_CC=$CC
12015   # Extract the first word of "gcc", so it can be a program name with args.
12016 set dummy gcc; ac_word=$2
12017 echo "$as_me:$LINENO: checking for $ac_word" >&5
12018 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12019 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
12020   echo $ECHO_N "(cached) $ECHO_C" >&6
12021 else
12022   if test -n "$ac_ct_CC"; then
12023   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12024 else
12025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12026 for as_dir in $PATH
12027 do
12028   IFS=$as_save_IFS
12029   test -z "$as_dir" && as_dir=.
12030   for ac_exec_ext in '' $ac_executable_extensions; do
12031   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12032     ac_cv_prog_ac_ct_CC="gcc"
12033     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12034     break 2
12035   fi
12036 done
12037 done
12038
12039 fi
12040 fi
12041 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12042 if test -n "$ac_ct_CC"; then
12043   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
12044 echo "${ECHO_T}$ac_ct_CC" >&6
12045 else
12046   echo "$as_me:$LINENO: result: no" >&5
12047 echo "${ECHO_T}no" >&6
12048 fi
12049
12050   CC=$ac_ct_CC
12051 else
12052   CC="$ac_cv_prog_CC"
12053 fi
12054
12055 if test -z "$CC"; then
12056   if test -n "$ac_tool_prefix"; then
12057   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
12058 set dummy ${ac_tool_prefix}cc; ac_word=$2
12059 echo "$as_me:$LINENO: checking for $ac_word" >&5
12060 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12061 if test "${ac_cv_prog_CC+set}" = set; then
12062   echo $ECHO_N "(cached) $ECHO_C" >&6
12063 else
12064   if test -n "$CC"; then
12065   ac_cv_prog_CC="$CC" # Let the user override the test.
12066 else
12067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12068 for as_dir in $PATH
12069 do
12070   IFS=$as_save_IFS
12071   test -z "$as_dir" && as_dir=.
12072   for ac_exec_ext in '' $ac_executable_extensions; do
12073   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12074     ac_cv_prog_CC="${ac_tool_prefix}cc"
12075     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12076     break 2
12077   fi
12078 done
12079 done
12080
12081 fi
12082 fi
12083 CC=$ac_cv_prog_CC
12084 if test -n "$CC"; then
12085   echo "$as_me:$LINENO: result: $CC" >&5
12086 echo "${ECHO_T}$CC" >&6
12087 else
12088   echo "$as_me:$LINENO: result: no" >&5
12089 echo "${ECHO_T}no" >&6
12090 fi
12091
12092 fi
12093 if test -z "$ac_cv_prog_CC"; then
12094   ac_ct_CC=$CC
12095   # Extract the first word of "cc", so it can be a program name with args.
12096 set dummy cc; ac_word=$2
12097 echo "$as_me:$LINENO: checking for $ac_word" >&5
12098 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12099 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
12100   echo $ECHO_N "(cached) $ECHO_C" >&6
12101 else
12102   if test -n "$ac_ct_CC"; then
12103   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12104 else
12105 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12106 for as_dir in $PATH
12107 do
12108   IFS=$as_save_IFS
12109   test -z "$as_dir" && as_dir=.
12110   for ac_exec_ext in '' $ac_executable_extensions; do
12111   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12112     ac_cv_prog_ac_ct_CC="cc"
12113     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12114     break 2
12115   fi
12116 done
12117 done
12118
12119 fi
12120 fi
12121 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12122 if test -n "$ac_ct_CC"; then
12123   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
12124 echo "${ECHO_T}$ac_ct_CC" >&6
12125 else
12126   echo "$as_me:$LINENO: result: no" >&5
12127 echo "${ECHO_T}no" >&6
12128 fi
12129
12130   CC=$ac_ct_CC
12131 else
12132   CC="$ac_cv_prog_CC"
12133 fi
12134
12135 fi
12136 if test -z "$CC"; then
12137   # Extract the first word of "cc", so it can be a program name with args.
12138 set dummy cc; ac_word=$2
12139 echo "$as_me:$LINENO: checking for $ac_word" >&5
12140 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12141 if test "${ac_cv_prog_CC+set}" = set; then
12142   echo $ECHO_N "(cached) $ECHO_C" >&6
12143 else
12144   if test -n "$CC"; then
12145   ac_cv_prog_CC="$CC" # Let the user override the test.
12146 else
12147   ac_prog_rejected=no
12148 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12149 for as_dir in $PATH
12150 do
12151   IFS=$as_save_IFS
12152   test -z "$as_dir" && as_dir=.
12153   for ac_exec_ext in '' $ac_executable_extensions; do
12154   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12155     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
12156        ac_prog_rejected=yes
12157        continue
12158      fi
12159     ac_cv_prog_CC="cc"
12160     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12161     break 2
12162   fi
12163 done
12164 done
12165
12166 if test $ac_prog_rejected = yes; then
12167   # We found a bogon in the path, so make sure we never use it.
12168   set dummy $ac_cv_prog_CC
12169   shift
12170   if test $# != 0; then
12171     # We chose a different compiler from the bogus one.
12172     # However, it has the same basename, so the bogon will be chosen
12173     # first if we set CC to just the basename; use the full file name.
12174     shift
12175     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
12176   fi
12177 fi
12178 fi
12179 fi
12180 CC=$ac_cv_prog_CC
12181 if test -n "$CC"; then
12182   echo "$as_me:$LINENO: result: $CC" >&5
12183 echo "${ECHO_T}$CC" >&6
12184 else
12185   echo "$as_me:$LINENO: result: no" >&5
12186 echo "${ECHO_T}no" >&6
12187 fi
12188
12189 fi
12190 if test -z "$CC"; then
12191   if test -n "$ac_tool_prefix"; then
12192   for ac_prog in cl
12193   do
12194     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12195 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12196 echo "$as_me:$LINENO: checking for $ac_word" >&5
12197 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12198 if test "${ac_cv_prog_CC+set}" = set; then
12199   echo $ECHO_N "(cached) $ECHO_C" >&6
12200 else
12201   if test -n "$CC"; then
12202   ac_cv_prog_CC="$CC" # Let the user override the test.
12203 else
12204 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12205 for as_dir in $PATH
12206 do
12207   IFS=$as_save_IFS
12208   test -z "$as_dir" && as_dir=.
12209   for ac_exec_ext in '' $ac_executable_extensions; do
12210   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12211     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
12212     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12213     break 2
12214   fi
12215 done
12216 done
12217
12218 fi
12219 fi
12220 CC=$ac_cv_prog_CC
12221 if test -n "$CC"; then
12222   echo "$as_me:$LINENO: result: $CC" >&5
12223 echo "${ECHO_T}$CC" >&6
12224 else
12225   echo "$as_me:$LINENO: result: no" >&5
12226 echo "${ECHO_T}no" >&6
12227 fi
12228
12229     test -n "$CC" && break
12230   done
12231 fi
12232 if test -z "$CC"; then
12233   ac_ct_CC=$CC
12234   for ac_prog in cl
12235 do
12236   # Extract the first word of "$ac_prog", so it can be a program name with args.
12237 set dummy $ac_prog; ac_word=$2
12238 echo "$as_me:$LINENO: checking for $ac_word" >&5
12239 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12240 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
12241   echo $ECHO_N "(cached) $ECHO_C" >&6
12242 else
12243   if test -n "$ac_ct_CC"; then
12244   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12245 else
12246 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12247 for as_dir in $PATH
12248 do
12249   IFS=$as_save_IFS
12250   test -z "$as_dir" && as_dir=.
12251   for ac_exec_ext in '' $ac_executable_extensions; do
12252   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12253     ac_cv_prog_ac_ct_CC="$ac_prog"
12254     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12255     break 2
12256   fi
12257 done
12258 done
12259
12260 fi
12261 fi
12262 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12263 if test -n "$ac_ct_CC"; then
12264   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
12265 echo "${ECHO_T}$ac_ct_CC" >&6
12266 else
12267   echo "$as_me:$LINENO: result: no" >&5
12268 echo "${ECHO_T}no" >&6
12269 fi
12270
12271   test -n "$ac_ct_CC" && break
12272 done
12273
12274   CC=$ac_ct_CC
12275 fi
12276
12277 fi
12278
12279
12280 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
12281 See \`config.log' for more details." >&5
12282 echo "$as_me: error: no acceptable C compiler found in \$PATH
12283 See \`config.log' for more details." >&2;}
12284    { (exit 1); exit 1; }; }
12285
12286 # Provide some information about the compiler.
12287 echo "$as_me:$LINENO:" \
12288      "checking for C compiler version" >&5
12289 ac_compiler=`set X $ac_compile; echo $2`
12290 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
12291   (eval $ac_compiler --version </dev/null >&5) 2>&5
12292   ac_status=$?
12293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12294   (exit $ac_status); }
12295 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
12296   (eval $ac_compiler -v </dev/null >&5) 2>&5
12297   ac_status=$?
12298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12299   (exit $ac_status); }
12300 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
12301   (eval $ac_compiler -V </dev/null >&5) 2>&5
12302   ac_status=$?
12303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12304   (exit $ac_status); }
12305
12306 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
12307 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
12308 if test "${ac_cv_c_compiler_gnu+set}" = set; then
12309   echo $ECHO_N "(cached) $ECHO_C" >&6
12310 else
12311   cat >conftest.$ac_ext <<_ACEOF
12312 /* confdefs.h.  */
12313 _ACEOF
12314 cat confdefs.h >>conftest.$ac_ext
12315 cat >>conftest.$ac_ext <<_ACEOF
12316 /* end confdefs.h.  */
12317
12318 int
12319 main ()
12320 {
12321 #ifndef __GNUC__
12322        choke me
12323 #endif
12324
12325   ;
12326   return 0;
12327 }
12328 _ACEOF
12329 rm -f conftest.$ac_objext
12330 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12331   (eval $ac_compile) 2>conftest.er1
12332   ac_status=$?
12333   grep -v '^ *+' conftest.er1 >conftest.err
12334   rm -f conftest.er1
12335   cat conftest.err >&5
12336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12337   (exit $ac_status); } &&
12338          { ac_try='test -z "$ac_c_werror_flag"
12339                          || test ! -s conftest.err'
12340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12341   (eval $ac_try) 2>&5
12342   ac_status=$?
12343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12344   (exit $ac_status); }; } &&
12345          { ac_try='test -s conftest.$ac_objext'
12346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12347   (eval $ac_try) 2>&5
12348   ac_status=$?
12349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12350   (exit $ac_status); }; }; then
12351   ac_compiler_gnu=yes
12352 else
12353   echo "$as_me: failed program was:" >&5
12354 sed 's/^/| /' conftest.$ac_ext >&5
12355
12356 ac_compiler_gnu=no
12357 fi
12358 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12359 ac_cv_c_compiler_gnu=$ac_compiler_gnu
12360
12361 fi
12362 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
12363 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
12364 GCC=`test $ac_compiler_gnu = yes && echo yes`
12365 ac_test_CFLAGS=${CFLAGS+set}
12366 ac_save_CFLAGS=$CFLAGS
12367 CFLAGS="-g"
12368 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
12369 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
12370 if test "${ac_cv_prog_cc_g+set}" = set; then
12371   echo $ECHO_N "(cached) $ECHO_C" >&6
12372 else
12373   cat >conftest.$ac_ext <<_ACEOF
12374 /* confdefs.h.  */
12375 _ACEOF
12376 cat confdefs.h >>conftest.$ac_ext
12377 cat >>conftest.$ac_ext <<_ACEOF
12378 /* end confdefs.h.  */
12379
12380 int
12381 main ()
12382 {
12383
12384   ;
12385   return 0;
12386 }
12387 _ACEOF
12388 rm -f conftest.$ac_objext
12389 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12390   (eval $ac_compile) 2>conftest.er1
12391   ac_status=$?
12392   grep -v '^ *+' conftest.er1 >conftest.err
12393   rm -f conftest.er1
12394   cat conftest.err >&5
12395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12396   (exit $ac_status); } &&
12397          { ac_try='test -z "$ac_c_werror_flag"
12398                          || test ! -s conftest.err'
12399   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12400   (eval $ac_try) 2>&5
12401   ac_status=$?
12402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12403   (exit $ac_status); }; } &&
12404          { ac_try='test -s conftest.$ac_objext'
12405   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12406   (eval $ac_try) 2>&5
12407   ac_status=$?
12408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12409   (exit $ac_status); }; }; then
12410   ac_cv_prog_cc_g=yes
12411 else
12412   echo "$as_me: failed program was:" >&5
12413 sed 's/^/| /' conftest.$ac_ext >&5
12414
12415 ac_cv_prog_cc_g=no
12416 fi
12417 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12418 fi
12419 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
12420 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
12421 if test "$ac_test_CFLAGS" = set; then
12422   CFLAGS=$ac_save_CFLAGS
12423 elif test $ac_cv_prog_cc_g = yes; then
12424   if test "$GCC" = yes; then
12425     CFLAGS="-g -O2"
12426   else
12427     CFLAGS="-g"
12428   fi
12429 else
12430   if test "$GCC" = yes; then
12431     CFLAGS="-O2"
12432   else
12433     CFLAGS=
12434   fi
12435 fi
12436 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
12437 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
12438 if test "${ac_cv_prog_cc_stdc+set}" = set; then
12439   echo $ECHO_N "(cached) $ECHO_C" >&6
12440 else
12441   ac_cv_prog_cc_stdc=no
12442 ac_save_CC=$CC
12443 cat >conftest.$ac_ext <<_ACEOF
12444 /* confdefs.h.  */
12445 _ACEOF
12446 cat confdefs.h >>conftest.$ac_ext
12447 cat >>conftest.$ac_ext <<_ACEOF
12448 /* end confdefs.h.  */
12449 #include <stdarg.h>
12450 #include <stdio.h>
12451 #include <sys/types.h>
12452 #include <sys/stat.h>
12453 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12454 struct buf { int x; };
12455 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12456 static char *e (p, i)
12457      char **p;
12458      int i;
12459 {
12460   return p[i];
12461 }
12462 static char *f (char * (*g) (char **, int), char **p, ...)
12463 {
12464   char *s;
12465   va_list v;
12466   va_start (v,p);
12467   s = g (p, va_arg (v,int));
12468   va_end (v);
12469   return s;
12470 }
12471
12472 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
12473    function prototypes and stuff, but not '\xHH' hex character constants.
12474    These don't provoke an error unfortunately, instead are silently treated
12475    as 'x'.  The following induces an error, until -std1 is added to get
12476    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
12477    array size at least.  It's necessary to write '\x00'==0 to get something
12478    that's true only with -std1.  */
12479 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
12480
12481 int test (int i, double x);
12482 struct s1 {int (*f) (int a);};
12483 struct s2 {int (*f) (double a);};
12484 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12485 int argc;
12486 char **argv;
12487 int
12488 main ()
12489 {
12490 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12491   ;
12492   return 0;
12493 }
12494 _ACEOF
12495 # Don't try gcc -ansi; that turns off useful extensions and
12496 # breaks some systems' header files.
12497 # AIX                   -qlanglvl=ansi
12498 # Ultrix and OSF/1      -std1
12499 # HP-UX 10.20 and later -Ae
12500 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12501 # SVR4                  -Xc -D__EXTENSIONS__
12502 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12503 do
12504   CC="$ac_save_CC $ac_arg"
12505   rm -f conftest.$ac_objext
12506 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12507   (eval $ac_compile) 2>conftest.er1
12508   ac_status=$?
12509   grep -v '^ *+' conftest.er1 >conftest.err
12510   rm -f conftest.er1
12511   cat conftest.err >&5
12512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12513   (exit $ac_status); } &&
12514          { ac_try='test -z "$ac_c_werror_flag"
12515                          || test ! -s conftest.err'
12516   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12517   (eval $ac_try) 2>&5
12518   ac_status=$?
12519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12520   (exit $ac_status); }; } &&
12521          { ac_try='test -s conftest.$ac_objext'
12522   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12523   (eval $ac_try) 2>&5
12524   ac_status=$?
12525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12526   (exit $ac_status); }; }; then
12527   ac_cv_prog_cc_stdc=$ac_arg
12528 break
12529 else
12530   echo "$as_me: failed program was:" >&5
12531 sed 's/^/| /' conftest.$ac_ext >&5
12532
12533 fi
12534 rm -f conftest.err conftest.$ac_objext
12535 done
12536 rm -f conftest.$ac_ext conftest.$ac_objext
12537 CC=$ac_save_CC
12538
12539 fi
12540
12541 case "x$ac_cv_prog_cc_stdc" in
12542   x|xno)
12543     echo "$as_me:$LINENO: result: none needed" >&5
12544 echo "${ECHO_T}none needed" >&6 ;;
12545   *)
12546     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
12547 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12548     CC="$CC $ac_cv_prog_cc_stdc" ;;
12549 esac
12550
12551 # Some people use a C++ compiler to compile C.  Since we use `exit',
12552 # in C++ we need to declare it.  In case someone uses the same compiler
12553 # for both compiling C and C++ we need to have the C++ compiler decide
12554 # the declaration of exit, since it's the most demanding environment.
12555 cat >conftest.$ac_ext <<_ACEOF
12556 #ifndef __cplusplus
12557   choke me
12558 #endif
12559 _ACEOF
12560 rm -f conftest.$ac_objext
12561 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12562   (eval $ac_compile) 2>conftest.er1
12563   ac_status=$?
12564   grep -v '^ *+' conftest.er1 >conftest.err
12565   rm -f conftest.er1
12566   cat conftest.err >&5
12567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12568   (exit $ac_status); } &&
12569          { ac_try='test -z "$ac_c_werror_flag"
12570                          || test ! -s conftest.err'
12571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12572   (eval $ac_try) 2>&5
12573   ac_status=$?
12574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12575   (exit $ac_status); }; } &&
12576          { ac_try='test -s conftest.$ac_objext'
12577   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12578   (eval $ac_try) 2>&5
12579   ac_status=$?
12580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12581   (exit $ac_status); }; }; then
12582   for ac_declaration in \
12583    '' \
12584    'extern "C" void std::exit (int) throw (); using std::exit;' \
12585    'extern "C" void std::exit (int); using std::exit;' \
12586    'extern "C" void exit (int) throw ();' \
12587    'extern "C" void exit (int);' \
12588    'void exit (int);'
12589 do
12590   cat >conftest.$ac_ext <<_ACEOF
12591 /* confdefs.h.  */
12592 _ACEOF
12593 cat confdefs.h >>conftest.$ac_ext
12594 cat >>conftest.$ac_ext <<_ACEOF
12595 /* end confdefs.h.  */
12596 $ac_declaration
12597 #include <stdlib.h>
12598 int
12599 main ()
12600 {
12601 exit (42);
12602   ;
12603   return 0;
12604 }
12605 _ACEOF
12606 rm -f conftest.$ac_objext
12607 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12608   (eval $ac_compile) 2>conftest.er1
12609   ac_status=$?
12610   grep -v '^ *+' conftest.er1 >conftest.err
12611   rm -f conftest.er1
12612   cat conftest.err >&5
12613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12614   (exit $ac_status); } &&
12615          { ac_try='test -z "$ac_c_werror_flag"
12616                          || test ! -s conftest.err'
12617   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12618   (eval $ac_try) 2>&5
12619   ac_status=$?
12620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12621   (exit $ac_status); }; } &&
12622          { ac_try='test -s conftest.$ac_objext'
12623   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12624   (eval $ac_try) 2>&5
12625   ac_status=$?
12626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12627   (exit $ac_status); }; }; then
12628   :
12629 else
12630   echo "$as_me: failed program was:" >&5
12631 sed 's/^/| /' conftest.$ac_ext >&5
12632
12633 continue
12634 fi
12635 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12636   cat >conftest.$ac_ext <<_ACEOF
12637 /* confdefs.h.  */
12638 _ACEOF
12639 cat confdefs.h >>conftest.$ac_ext
12640 cat >>conftest.$ac_ext <<_ACEOF
12641 /* end confdefs.h.  */
12642 $ac_declaration
12643 int
12644 main ()
12645 {
12646 exit (42);
12647   ;
12648   return 0;
12649 }
12650 _ACEOF
12651 rm -f conftest.$ac_objext
12652 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12653   (eval $ac_compile) 2>conftest.er1
12654   ac_status=$?
12655   grep -v '^ *+' conftest.er1 >conftest.err
12656   rm -f conftest.er1
12657   cat conftest.err >&5
12658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12659   (exit $ac_status); } &&
12660          { ac_try='test -z "$ac_c_werror_flag"
12661                          || test ! -s conftest.err'
12662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12663   (eval $ac_try) 2>&5
12664   ac_status=$?
12665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12666   (exit $ac_status); }; } &&
12667          { ac_try='test -s conftest.$ac_objext'
12668   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12669   (eval $ac_try) 2>&5
12670   ac_status=$?
12671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12672   (exit $ac_status); }; }; then
12673   break
12674 else
12675   echo "$as_me: failed program was:" >&5
12676 sed 's/^/| /' conftest.$ac_ext >&5
12677
12678 fi
12679 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12680 done
12681 rm -f conftest*
12682 if test -n "$ac_declaration"; then
12683   echo '#ifdef __cplusplus' >>confdefs.h
12684   echo $ac_declaration      >>confdefs.h
12685   echo '#endif'             >>confdefs.h
12686 fi
12687
12688 else
12689   echo "$as_me: failed program was:" >&5
12690 sed 's/^/| /' conftest.$ac_ext >&5
12691
12692 fi
12693 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12694 ac_ext=c
12695 ac_cpp='$CPP $CPPFLAGS'
12696 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12697 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12698 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12699
12700 depcc="$CC"   am_compiler_list=
12701
12702 echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
12703 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
12704 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
12705   echo $ECHO_N "(cached) $ECHO_C" >&6
12706 else
12707   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
12708   # We make a subdir and do the tests there.  Otherwise we can end up
12709   # making bogus files that we don't know about and never remove.  For
12710   # instance it was reported that on HP-UX the gcc test will end up
12711   # making a dummy file named `D' -- because `-MD' means `put the output
12712   # in D'.
12713   mkdir conftest.dir
12714   # Copy depcomp to subdir because otherwise we won't find it if we're
12715   # using a relative directory.
12716   cp "$am_depcomp" conftest.dir
12717   cd conftest.dir
12718   # We will build objects and dependencies in a subdirectory because
12719   # it helps to detect inapplicable dependency modes.  For instance
12720   # both Tru64's cc and ICC support -MD to output dependencies as a
12721   # side effect of compilation, but ICC will put the dependencies in
12722   # the current directory while Tru64 will put them in the object
12723   # directory.
12724   mkdir sub
12725
12726   am_cv_CC_dependencies_compiler_type=none
12727   if test "$am_compiler_list" = ""; then
12728      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
12729   fi
12730   for depmode in $am_compiler_list; do
12731     # Setup a source with many dependencies, because some compilers
12732     # like to wrap large dependency lists on column 80 (with \), and
12733     # we should not choose a depcomp mode which is confused by this.
12734     #
12735     # We need to recreate these files for each test, as the compiler may
12736     # overwrite some of them when testing with obscure command lines.
12737     # This happens at least with the AIX C compiler.
12738     : > sub/conftest.c
12739     for i in 1 2 3 4 5 6; do
12740       echo '#include "conftst'$i'.h"' >> sub/conftest.c
12741       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
12742       # Solaris 8's {/usr,}/bin/sh.
12743       touch sub/conftst$i.h
12744     done
12745     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
12746
12747     case $depmode in
12748     nosideeffect)
12749       # after this tag, mechanisms are not by side-effect, so they'll
12750       # only be used when explicitly requested
12751       if test "x$enable_dependency_tracking" = xyes; then
12752         continue
12753       else
12754         break
12755       fi
12756       ;;
12757     none) break ;;
12758     esac
12759     # We check with `-c' and `-o' for the sake of the "dashmstdout"
12760     # mode.  It turns out that the SunPro C++ compiler does not properly
12761     # handle `-M -o', and we need to detect this.
12762     if depmode=$depmode \
12763        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
12764        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
12765        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
12766          >/dev/null 2>conftest.err &&
12767        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
12768        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
12769        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
12770       # icc doesn't choke on unknown options, it will just issue warnings
12771       # or remarks (even with -Werror).  So we grep stderr for any message
12772       # that says an option was ignored or not supported.
12773       # When given -MP, icc 7.0 and 7.1 complain thusly:
12774       #   icc: Command line warning: ignoring option '-M'; no argument required
12775       # The diagnosis changed in icc 8.0:
12776       #   icc: Command line remark: option '-MP' not supported
12777       if (grep 'ignoring option' conftest.err ||
12778           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
12779         am_cv_CC_dependencies_compiler_type=$depmode
12780         break
12781       fi
12782     fi
12783   done
12784
12785   cd ..
12786   rm -rf conftest.dir
12787 else
12788   am_cv_CC_dependencies_compiler_type=none
12789 fi
12790
12791 fi
12792 echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
12793 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
12794 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
12795
12796
12797
12798 if
12799   test "x$enable_dependency_tracking" != xno \
12800   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
12801   am__fastdepCC_TRUE=
12802   am__fastdepCC_FALSE='#'
12803 else
12804   am__fastdepCC_TRUE='#'
12805   am__fastdepCC_FALSE=
12806 fi
12807
12808
12809 if test "X${ac_cv_prog_cc_stdc}" = "Xno" ; then
12810         { { echo "$as_me:$LINENO: error: OpenLDAP requires compiler to support STDC constructs." >&5
12811 echo "$as_me: error: OpenLDAP requires compiler to support STDC constructs." >&2;}
12812    { (exit 1); exit 1; }; }
12813 fi
12814
12815 # test for make depend flag
12816 OL_MKDEP=
12817 OL_MKDEP_FLAGS=
12818 if test -z "${MKDEP}"; then
12819         OL_MKDEP="${CC-cc}"
12820         if test -z "${MKDEP_FLAGS}"; then
12821                 echo "$as_me:$LINENO: checking for ${OL_MKDEP} depend flag" >&5
12822 echo $ECHO_N "checking for ${OL_MKDEP} depend flag... $ECHO_C" >&6
12823 if test "${ol_cv_mkdep+set}" = set; then
12824   echo $ECHO_N "(cached) $ECHO_C" >&6
12825 else
12826
12827                         ol_cv_mkdep=no
12828                         for flag in "-M" "-xM"; do
12829                                 cat > conftest.c <<EOF
12830  noCode;
12831 EOF
12832                                 if { ac_try='$OL_MKDEP $flag conftest.c'
12833   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12834   (eval $ac_try) 2>&5
12835   ac_status=$?
12836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12837   (exit $ac_status); }; } \
12838                                         | grep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
12839                                 then
12840                                         if test ! -f conftest."${ac_object}" ; then
12841                                                 ol_cv_mkdep=$flag
12842                                                 OL_MKDEP_FLAGS="$flag"
12843                                                 break
12844                                         fi
12845                                 fi
12846                         done
12847                         rm -f conftest*
12848
12849 fi
12850 echo "$as_me:$LINENO: result: $ol_cv_mkdep" >&5
12851 echo "${ECHO_T}$ol_cv_mkdep" >&6
12852         else
12853                 cc_cv_mkdep=yes
12854                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
12855         fi
12856 else
12857         cc_cv_mkdep=yes
12858         OL_MKDEP="${MKDEP}"
12859         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
12860 fi
12861
12862
12863
12864 if test "${ol_cv_mkdep}" = no ; then
12865         # this will soon become an error
12866         { echo "$as_me:$LINENO: WARNING: do not know how to generate dependencies" >&5
12867 echo "$as_me: WARNING: do not know how to generate dependencies" >&2;}
12868 fi
12869
12870 echo "$as_me:$LINENO: checking for afopen in -ls" >&5
12871 echo $ECHO_N "checking for afopen in -ls... $ECHO_C" >&6
12872 if test "${ac_cv_lib_s_afopen+set}" = set; then
12873   echo $ECHO_N "(cached) $ECHO_C" >&6
12874 else
12875   ac_check_lib_save_LIBS=$LIBS
12876 LIBS="-ls  $LIBS"
12877 cat >conftest.$ac_ext <<_ACEOF
12878 /* confdefs.h.  */
12879 _ACEOF
12880 cat confdefs.h >>conftest.$ac_ext
12881 cat >>conftest.$ac_ext <<_ACEOF
12882 /* end confdefs.h.  */
12883
12884 /* Override any gcc2 internal prototype to avoid an error.  */
12885 #ifdef __cplusplus
12886 extern "C"
12887 #endif
12888 /* We use char because int might match the return type of a gcc2
12889    builtin and then its argument prototype would still apply.  */
12890 char afopen ();
12891 int
12892 main ()
12893 {
12894 afopen ();
12895   ;
12896   return 0;
12897 }
12898 _ACEOF
12899 rm -f conftest.$ac_objext conftest$ac_exeext
12900 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12901   (eval $ac_link) 2>conftest.er1
12902   ac_status=$?
12903   grep -v '^ *+' conftest.er1 >conftest.err
12904   rm -f conftest.er1
12905   cat conftest.err >&5
12906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12907   (exit $ac_status); } &&
12908          { ac_try='test -z "$ac_c_werror_flag"
12909                          || test ! -s conftest.err'
12910   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12911   (eval $ac_try) 2>&5
12912   ac_status=$?
12913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12914   (exit $ac_status); }; } &&
12915          { ac_try='test -s conftest$ac_exeext'
12916   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12917   (eval $ac_try) 2>&5
12918   ac_status=$?
12919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12920   (exit $ac_status); }; }; then
12921   ac_cv_lib_s_afopen=yes
12922 else
12923   echo "$as_me: failed program was:" >&5
12924 sed 's/^/| /' conftest.$ac_ext >&5
12925
12926 ac_cv_lib_s_afopen=no
12927 fi
12928 rm -f conftest.err conftest.$ac_objext \
12929       conftest$ac_exeext conftest.$ac_ext
12930 LIBS=$ac_check_lib_save_LIBS
12931 fi
12932 echo "$as_me:$LINENO: result: $ac_cv_lib_s_afopen" >&5
12933 echo "${ECHO_T}$ac_cv_lib_s_afopen" >&6
12934 if test $ac_cv_lib_s_afopen = yes; then
12935
12936         AUTH_LIBS=-ls
12937
12938 cat >>confdefs.h <<\_ACEOF
12939 #define HAVE_AIX_SECURITY 1
12940 _ACEOF
12941
12942
12943 fi
12944
12945
12946 case "$target" in
12947 *-ibm-openedition)
12948         ac_cv_func_getopt=no
12949
12950 cat >>confdefs.h <<\_ACEOF
12951 #define BOTH_STRINGS_H 1
12952 _ACEOF
12953
12954         ;;
12955 esac
12956
12957 ol_link_modules=no
12958 WITH_MODULES_ENABLED=no
12959 if test $ol_enable_modules != no ; then
12960
12961 for ac_header in ltdl.h
12962 do
12963 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12964 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12965   echo "$as_me:$LINENO: checking for $ac_header" >&5
12966 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12967 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12968   echo $ECHO_N "(cached) $ECHO_C" >&6
12969 fi
12970 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12971 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12972 else
12973   # Is the header compilable?
12974 echo "$as_me:$LINENO: checking $ac_header usability" >&5
12975 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12976 cat >conftest.$ac_ext <<_ACEOF
12977 /* confdefs.h.  */
12978 _ACEOF
12979 cat confdefs.h >>conftest.$ac_ext
12980 cat >>conftest.$ac_ext <<_ACEOF
12981 /* end confdefs.h.  */
12982 $ac_includes_default
12983 #include <$ac_header>
12984 _ACEOF
12985 rm -f conftest.$ac_objext
12986 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12987   (eval $ac_compile) 2>conftest.er1
12988   ac_status=$?
12989   grep -v '^ *+' conftest.er1 >conftest.err
12990   rm -f conftest.er1
12991   cat conftest.err >&5
12992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12993   (exit $ac_status); } &&
12994          { ac_try='test -z "$ac_c_werror_flag"
12995                          || test ! -s conftest.err'
12996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12997   (eval $ac_try) 2>&5
12998   ac_status=$?
12999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13000   (exit $ac_status); }; } &&
13001          { ac_try='test -s conftest.$ac_objext'
13002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13003   (eval $ac_try) 2>&5
13004   ac_status=$?
13005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13006   (exit $ac_status); }; }; then
13007   ac_header_compiler=yes
13008 else
13009   echo "$as_me: failed program was:" >&5
13010 sed 's/^/| /' conftest.$ac_ext >&5
13011
13012 ac_header_compiler=no
13013 fi
13014 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13015 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13016 echo "${ECHO_T}$ac_header_compiler" >&6
13017
13018 # Is the header present?
13019 echo "$as_me:$LINENO: checking $ac_header presence" >&5
13020 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13021 cat >conftest.$ac_ext <<_ACEOF
13022 /* confdefs.h.  */
13023 _ACEOF
13024 cat confdefs.h >>conftest.$ac_ext
13025 cat >>conftest.$ac_ext <<_ACEOF
13026 /* end confdefs.h.  */
13027 #include <$ac_header>
13028 _ACEOF
13029 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13030   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13031   ac_status=$?
13032   grep -v '^ *+' conftest.er1 >conftest.err
13033   rm -f conftest.er1
13034   cat conftest.err >&5
13035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13036   (exit $ac_status); } >/dev/null; then
13037   if test -s conftest.err; then
13038     ac_cpp_err=$ac_c_preproc_warn_flag
13039     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13040   else
13041     ac_cpp_err=
13042   fi
13043 else
13044   ac_cpp_err=yes
13045 fi
13046 if test -z "$ac_cpp_err"; then
13047   ac_header_preproc=yes
13048 else
13049   echo "$as_me: failed program was:" >&5
13050 sed 's/^/| /' conftest.$ac_ext >&5
13051
13052   ac_header_preproc=no
13053 fi
13054 rm -f conftest.err conftest.$ac_ext
13055 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13056 echo "${ECHO_T}$ac_header_preproc" >&6
13057
13058 # So?  What about this header?
13059 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13060   yes:no: )
13061     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13062 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13063     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13064 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13065     ac_header_preproc=yes
13066     ;;
13067   no:yes:* )
13068     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13069 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13070     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13071 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13072     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13073 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13074     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13075 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13076     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13077 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13078     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13079 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13080     (
13081       cat <<\_ASBOX
13082 ## --------------------------------------------- ##
13083 ## Report this to <http://www.openldap.org/its/> ##
13084 ## --------------------------------------------- ##
13085 _ASBOX
13086     ) |
13087       sed "s/^/$as_me: WARNING:     /" >&2
13088     ;;
13089 esac
13090 echo "$as_me:$LINENO: checking for $ac_header" >&5
13091 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13092 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13093   echo $ECHO_N "(cached) $ECHO_C" >&6
13094 else
13095   eval "$as_ac_Header=\$ac_header_preproc"
13096 fi
13097 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13098 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13099
13100 fi
13101 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13102   cat >>confdefs.h <<_ACEOF
13103 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13104 _ACEOF
13105
13106 fi
13107
13108 done
13109
13110
13111         if test $ac_cv_header_ltdl_h = no ; then
13112                 { { echo "$as_me:$LINENO: error: could not locate libtool ltdl.h" >&5
13113 echo "$as_me: error: could not locate libtool ltdl.h" >&2;}
13114    { (exit 1); exit 1; }; }
13115         fi
13116
13117         echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
13118 echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6
13119 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
13120   echo $ECHO_N "(cached) $ECHO_C" >&6
13121 else
13122   ac_check_lib_save_LIBS=$LIBS
13123 LIBS="-lltdl  $LIBS"
13124 cat >conftest.$ac_ext <<_ACEOF
13125 /* confdefs.h.  */
13126 _ACEOF
13127 cat confdefs.h >>conftest.$ac_ext
13128 cat >>conftest.$ac_ext <<_ACEOF
13129 /* end confdefs.h.  */
13130
13131 /* Override any gcc2 internal prototype to avoid an error.  */
13132 #ifdef __cplusplus
13133 extern "C"
13134 #endif
13135 /* We use char because int might match the return type of a gcc2
13136    builtin and then its argument prototype would still apply.  */
13137 char lt_dlinit ();
13138 int
13139 main ()
13140 {
13141 lt_dlinit ();
13142   ;
13143   return 0;
13144 }
13145 _ACEOF
13146 rm -f conftest.$ac_objext conftest$ac_exeext
13147 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13148   (eval $ac_link) 2>conftest.er1
13149   ac_status=$?
13150   grep -v '^ *+' conftest.er1 >conftest.err
13151   rm -f conftest.er1
13152   cat conftest.err >&5
13153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13154   (exit $ac_status); } &&
13155          { ac_try='test -z "$ac_c_werror_flag"
13156                          || test ! -s conftest.err'
13157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13158   (eval $ac_try) 2>&5
13159   ac_status=$?
13160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13161   (exit $ac_status); }; } &&
13162          { ac_try='test -s conftest$ac_exeext'
13163   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13164   (eval $ac_try) 2>&5
13165   ac_status=$?
13166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13167   (exit $ac_status); }; }; then
13168   ac_cv_lib_ltdl_lt_dlinit=yes
13169 else
13170   echo "$as_me: failed program was:" >&5
13171 sed 's/^/| /' conftest.$ac_ext >&5
13172
13173 ac_cv_lib_ltdl_lt_dlinit=no
13174 fi
13175 rm -f conftest.err conftest.$ac_objext \
13176       conftest$ac_exeext conftest.$ac_ext
13177 LIBS=$ac_check_lib_save_LIBS
13178 fi
13179 echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
13180 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6
13181 if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
13182
13183                 MODULES_LIBS=-lltdl
13184
13185 cat >>confdefs.h <<\_ACEOF
13186 #define HAVE_LIBLTDL 1
13187 _ACEOF
13188
13189
13190 fi
13191
13192
13193         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
13194                 { { echo "$as_me:$LINENO: error: could not locate libtool -lltdl" >&5
13195 echo "$as_me: error: could not locate libtool -lltdl" >&2;}
13196    { (exit 1); exit 1; }; }
13197         fi
13198         ol_link_modules=yes
13199         WITH_MODULES_ENABLED=yes
13200
13201 else
13202         for i in $Backends; do
13203                 eval "ol_tmp=\$ol_enable_$i"
13204                 if test $ol_tmp = mod ; then
13205                         { echo "$as_me:$LINENO: WARNING: building static $i backend" >&5
13206 echo "$as_me: WARNING: building static $i backend" >&2;}
13207                         eval "ol_enable_$i=yes"
13208                 fi
13209         done
13210         for i in $Overlays; do
13211                 eval "ol_tmp=\$ol_enable_$i"
13212                 if test $ol_tmp = mod ; then
13213                         { echo "$as_me:$LINENO: WARNING: building static $i overlay" >&5
13214 echo "$as_me: WARNING: building static $i overlay" >&2;}
13215                         eval "ol_enable_$i=yes"
13216                 fi
13217         done
13218 fi
13219
13220 # test for EBCDIC
13221 echo "$as_me:$LINENO: checking for EBCDIC" >&5
13222 echo $ECHO_N "checking for EBCDIC... $ECHO_C" >&6
13223 if test "${ol_cv_cpp_ebcdic+set}" = set; then
13224   echo $ECHO_N "(cached) $ECHO_C" >&6
13225 else
13226
13227         cat >conftest.$ac_ext <<_ACEOF
13228 /* confdefs.h.  */
13229 _ACEOF
13230 cat confdefs.h >>conftest.$ac_ext
13231 cat >>conftest.$ac_ext <<_ACEOF
13232 /* end confdefs.h.  */
13233
13234 #if !('M' == 0xd4)
13235 #include <__ASCII__/generate_error.h>
13236 #endif
13237
13238 _ACEOF
13239 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13240   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13241   ac_status=$?
13242   grep -v '^ *+' conftest.er1 >conftest.err
13243   rm -f conftest.er1
13244   cat conftest.err >&5
13245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13246   (exit $ac_status); } >/dev/null; then
13247   if test -s conftest.err; then
13248     ac_cpp_err=$ac_c_preproc_warn_flag
13249     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13250   else
13251     ac_cpp_err=
13252   fi
13253 else
13254   ac_cpp_err=yes
13255 fi
13256 if test -z "$ac_cpp_err"; then
13257   ol_cv_cpp_ebcdic=yes
13258 else
13259   echo "$as_me: failed program was:" >&5
13260 sed 's/^/| /' conftest.$ac_ext >&5
13261
13262   ol_cv_cpp_ebcdic=no
13263 fi
13264 rm -f conftest.err conftest.$ac_ext
13265 fi
13266 echo "$as_me:$LINENO: result: $ol_cv_cpp_ebcdic" >&5
13267 echo "${ECHO_T}$ol_cv_cpp_ebcdic" >&6
13268 if test $ol_cv_cpp_ebcdic = yes ; then
13269
13270 cat >>confdefs.h <<\_ACEOF
13271 #define HAVE_EBCDIC 1
13272 _ACEOF
13273
13274 fi
13275
13276 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
13277 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13278 if test "${ol_cv_header_stdc+set}" = set; then
13279   echo $ECHO_N "(cached) $ECHO_C" >&6
13280 else
13281   cat >conftest.$ac_ext <<_ACEOF
13282 /* confdefs.h.  */
13283 _ACEOF
13284 cat confdefs.h >>conftest.$ac_ext
13285 cat >>conftest.$ac_ext <<_ACEOF
13286 /* end confdefs.h.  */
13287 #include <stdlib.h>
13288 #include <stdarg.h>
13289 #include <string.h>
13290 #include <float.h>
13291 _ACEOF
13292 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13293   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13294   ac_status=$?
13295   grep -v '^ *+' conftest.er1 >conftest.err
13296   rm -f conftest.er1
13297   cat conftest.err >&5
13298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13299   (exit $ac_status); } >/dev/null; then
13300   if test -s conftest.err; then
13301     ac_cpp_err=$ac_c_preproc_warn_flag
13302     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13303   else
13304     ac_cpp_err=
13305   fi
13306 else
13307   ac_cpp_err=yes
13308 fi
13309 if test -z "$ac_cpp_err"; then
13310   ol_cv_header_stdc=yes
13311 else
13312   echo "$as_me: failed program was:" >&5
13313 sed 's/^/| /' conftest.$ac_ext >&5
13314
13315   ol_cv_header_stdc=no
13316 fi
13317 rm -f conftest.err conftest.$ac_ext
13318
13319 if test $ol_cv_header_stdc = yes; then
13320   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13321 cat >conftest.$ac_ext <<_ACEOF
13322 /* confdefs.h.  */
13323 _ACEOF
13324 cat confdefs.h >>conftest.$ac_ext
13325 cat >>conftest.$ac_ext <<_ACEOF
13326 /* end confdefs.h.  */
13327 #include <string.h>
13328
13329 _ACEOF
13330 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13331   $EGREP "memchr" >/dev/null 2>&1; then
13332   :
13333 else
13334   ol_cv_header_stdc=no
13335 fi
13336 rm -f conftest*
13337
13338 fi
13339
13340 if test $ol_cv_header_stdc = yes; then
13341   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13342 cat >conftest.$ac_ext <<_ACEOF
13343 /* confdefs.h.  */
13344 _ACEOF
13345 cat confdefs.h >>conftest.$ac_ext
13346 cat >>conftest.$ac_ext <<_ACEOF
13347 /* end confdefs.h.  */
13348 #include <stdlib.h>
13349
13350 _ACEOF
13351 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13352   $EGREP "free" >/dev/null 2>&1; then
13353   :
13354 else
13355   ol_cv_header_stdc=no
13356 fi
13357 rm -f conftest*
13358
13359 fi
13360
13361 if test $ol_cv_header_stdc = yes; then
13362   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13363 if test "$cross_compiling" = yes; then
13364   :
13365 else
13366   cat >conftest.$ac_ext <<_ACEOF
13367 /* confdefs.h.  */
13368 _ACEOF
13369 cat confdefs.h >>conftest.$ac_ext
13370 cat >>conftest.$ac_ext <<_ACEOF
13371 /* end confdefs.h.  */
13372 #include <ctype.h>
13373 #ifndef HAVE_EBCDIC
13374 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13375 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13376 #else
13377 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13378                 || ('j' <= (c) && (c) <= 'r') \
13379                 || ('s' <= (c) && (c) <= 'z'))
13380 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
13381 #endif
13382 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13383 int main () { int i; for (i = 0; i < 256; i++)
13384 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13385 exit (0); }
13386
13387 _ACEOF
13388 rm -f conftest$ac_exeext
13389 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13390   (eval $ac_link) 2>&5
13391   ac_status=$?
13392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13393   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13394   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13395   (eval $ac_try) 2>&5
13396   ac_status=$?
13397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13398   (exit $ac_status); }; }; then
13399   :
13400 else
13401   echo "$as_me: program exited with status $ac_status" >&5
13402 echo "$as_me: failed program was:" >&5
13403 sed 's/^/| /' conftest.$ac_ext >&5
13404
13405 ( exit $ac_status )
13406 ol_cv_header_stdc=no
13407 fi
13408 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13409 fi
13410 fi
13411 fi
13412 echo "$as_me:$LINENO: result: $ol_cv_header_stdc" >&5
13413 echo "${ECHO_T}$ol_cv_header_stdc" >&6
13414 if test $ol_cv_header_stdc = yes; then
13415   cat >>confdefs.h <<\_ACEOF
13416 #define STDC_HEADERS 1
13417 _ACEOF
13418
13419 fi
13420 ac_cv_header_stdc=disable
13421
13422
13423 if test $ol_cv_header_stdc != yes; then
13424         { echo "$as_me:$LINENO: WARNING: could not locate Standard C compliant headers" >&5
13425 echo "$as_me: WARNING: could not locate Standard C compliant headers" >&2;}
13426 fi
13427
13428
13429
13430
13431
13432
13433 ac_header_dirent=no
13434 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13435   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13436 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
13437 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13438 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13439   echo $ECHO_N "(cached) $ECHO_C" >&6
13440 else
13441   cat >conftest.$ac_ext <<_ACEOF
13442 /* confdefs.h.  */
13443 _ACEOF
13444 cat confdefs.h >>conftest.$ac_ext
13445 cat >>conftest.$ac_ext <<_ACEOF
13446 /* end confdefs.h.  */
13447 #include <sys/types.h>
13448 #include <$ac_hdr>
13449
13450 int
13451 main ()
13452 {
13453 if ((DIR *) 0)
13454 return 0;
13455   ;
13456   return 0;
13457 }
13458 _ACEOF
13459 rm -f conftest.$ac_objext
13460 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13461   (eval $ac_compile) 2>conftest.er1
13462   ac_status=$?
13463   grep -v '^ *+' conftest.er1 >conftest.err
13464   rm -f conftest.er1
13465   cat conftest.err >&5
13466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13467   (exit $ac_status); } &&
13468          { ac_try='test -z "$ac_c_werror_flag"
13469                          || test ! -s conftest.err'
13470   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13471   (eval $ac_try) 2>&5
13472   ac_status=$?
13473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13474   (exit $ac_status); }; } &&
13475          { ac_try='test -s conftest.$ac_objext'
13476   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13477   (eval $ac_try) 2>&5
13478   ac_status=$?
13479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13480   (exit $ac_status); }; }; then
13481   eval "$as_ac_Header=yes"
13482 else
13483   echo "$as_me: failed program was:" >&5
13484 sed 's/^/| /' conftest.$ac_ext >&5
13485
13486 eval "$as_ac_Header=no"
13487 fi
13488 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13489 fi
13490 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13491 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13492 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13493   cat >>confdefs.h <<_ACEOF
13494 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13495 _ACEOF
13496
13497 ac_header_dirent=$ac_hdr; break
13498 fi
13499
13500 done
13501 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13502 if test $ac_header_dirent = dirent.h; then
13503   echo "$as_me:$LINENO: checking for library containing opendir" >&5
13504 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
13505 if test "${ac_cv_search_opendir+set}" = set; then
13506   echo $ECHO_N "(cached) $ECHO_C" >&6
13507 else
13508   ac_func_search_save_LIBS=$LIBS
13509 ac_cv_search_opendir=no
13510 cat >conftest.$ac_ext <<_ACEOF
13511 /* confdefs.h.  */
13512 _ACEOF
13513 cat confdefs.h >>conftest.$ac_ext
13514 cat >>conftest.$ac_ext <<_ACEOF
13515 /* end confdefs.h.  */
13516
13517 /* Override any gcc2 internal prototype to avoid an error.  */
13518 #ifdef __cplusplus
13519 extern "C"
13520 #endif
13521 /* We use char because int might match the return type of a gcc2
13522    builtin and then its argument prototype would still apply.  */
13523 char opendir ();
13524 int
13525 main ()
13526 {
13527 opendir ();
13528   ;
13529   return 0;
13530 }
13531 _ACEOF
13532 rm -f conftest.$ac_objext conftest$ac_exeext
13533 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13534   (eval $ac_link) 2>conftest.er1
13535   ac_status=$?
13536   grep -v '^ *+' conftest.er1 >conftest.err
13537   rm -f conftest.er1
13538   cat conftest.err >&5
13539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13540   (exit $ac_status); } &&
13541          { ac_try='test -z "$ac_c_werror_flag"
13542                          || test ! -s conftest.err'
13543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13544   (eval $ac_try) 2>&5
13545   ac_status=$?
13546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13547   (exit $ac_status); }; } &&
13548          { ac_try='test -s conftest$ac_exeext'
13549   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13550   (eval $ac_try) 2>&5
13551   ac_status=$?
13552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13553   (exit $ac_status); }; }; then
13554   ac_cv_search_opendir="none required"
13555 else
13556   echo "$as_me: failed program was:" >&5
13557 sed 's/^/| /' conftest.$ac_ext >&5
13558
13559 fi
13560 rm -f conftest.err conftest.$ac_objext \
13561       conftest$ac_exeext conftest.$ac_ext
13562 if test "$ac_cv_search_opendir" = no; then
13563   for ac_lib in dir; do
13564     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13565     cat >conftest.$ac_ext <<_ACEOF
13566 /* confdefs.h.  */
13567 _ACEOF
13568 cat confdefs.h >>conftest.$ac_ext
13569 cat >>conftest.$ac_ext <<_ACEOF
13570 /* end confdefs.h.  */
13571
13572 /* Override any gcc2 internal prototype to avoid an error.  */
13573 #ifdef __cplusplus
13574 extern "C"
13575 #endif
13576 /* We use char because int might match the return type of a gcc2
13577    builtin and then its argument prototype would still apply.  */
13578 char opendir ();
13579 int
13580 main ()
13581 {
13582 opendir ();
13583   ;
13584   return 0;
13585 }
13586 _ACEOF
13587 rm -f conftest.$ac_objext conftest$ac_exeext
13588 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13589   (eval $ac_link) 2>conftest.er1
13590   ac_status=$?
13591   grep -v '^ *+' conftest.er1 >conftest.err
13592   rm -f conftest.er1
13593   cat conftest.err >&5
13594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13595   (exit $ac_status); } &&
13596          { ac_try='test -z "$ac_c_werror_flag"
13597                          || test ! -s conftest.err'
13598   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13599   (eval $ac_try) 2>&5
13600   ac_status=$?
13601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13602   (exit $ac_status); }; } &&
13603          { ac_try='test -s conftest$ac_exeext'
13604   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13605   (eval $ac_try) 2>&5
13606   ac_status=$?
13607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13608   (exit $ac_status); }; }; then
13609   ac_cv_search_opendir="-l$ac_lib"
13610 break
13611 else
13612   echo "$as_me: failed program was:" >&5
13613 sed 's/^/| /' conftest.$ac_ext >&5
13614
13615 fi
13616 rm -f conftest.err conftest.$ac_objext \
13617       conftest$ac_exeext conftest.$ac_ext
13618   done
13619 fi
13620 LIBS=$ac_func_search_save_LIBS
13621 fi
13622 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
13623 echo "${ECHO_T}$ac_cv_search_opendir" >&6
13624 if test "$ac_cv_search_opendir" != no; then
13625   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
13626
13627 fi
13628
13629 else
13630   echo "$as_me:$LINENO: checking for library containing opendir" >&5
13631 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
13632 if test "${ac_cv_search_opendir+set}" = set; then
13633   echo $ECHO_N "(cached) $ECHO_C" >&6
13634 else
13635   ac_func_search_save_LIBS=$LIBS
13636 ac_cv_search_opendir=no
13637 cat >conftest.$ac_ext <<_ACEOF
13638 /* confdefs.h.  */
13639 _ACEOF
13640 cat confdefs.h >>conftest.$ac_ext
13641 cat >>conftest.$ac_ext <<_ACEOF
13642 /* end confdefs.h.  */
13643
13644 /* Override any gcc2 internal prototype to avoid an error.  */
13645 #ifdef __cplusplus
13646 extern "C"
13647 #endif
13648 /* We use char because int might match the return type of a gcc2
13649    builtin and then its argument prototype would still apply.  */
13650 char opendir ();
13651 int
13652 main ()
13653 {
13654 opendir ();
13655   ;
13656   return 0;
13657 }
13658 _ACEOF
13659 rm -f conftest.$ac_objext conftest$ac_exeext
13660 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13661   (eval $ac_link) 2>conftest.er1
13662   ac_status=$?
13663   grep -v '^ *+' conftest.er1 >conftest.err
13664   rm -f conftest.er1
13665   cat conftest.err >&5
13666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13667   (exit $ac_status); } &&
13668          { ac_try='test -z "$ac_c_werror_flag"
13669                          || test ! -s conftest.err'
13670   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13671   (eval $ac_try) 2>&5
13672   ac_status=$?
13673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13674   (exit $ac_status); }; } &&
13675          { ac_try='test -s conftest$ac_exeext'
13676   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13677   (eval $ac_try) 2>&5
13678   ac_status=$?
13679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13680   (exit $ac_status); }; }; then
13681   ac_cv_search_opendir="none required"
13682 else
13683   echo "$as_me: failed program was:" >&5
13684 sed 's/^/| /' conftest.$ac_ext >&5
13685
13686 fi
13687 rm -f conftest.err conftest.$ac_objext \
13688       conftest$ac_exeext conftest.$ac_ext
13689 if test "$ac_cv_search_opendir" = no; then
13690   for ac_lib in x; do
13691     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13692     cat >conftest.$ac_ext <<_ACEOF
13693 /* confdefs.h.  */
13694 _ACEOF
13695 cat confdefs.h >>conftest.$ac_ext
13696 cat >>conftest.$ac_ext <<_ACEOF
13697 /* end confdefs.h.  */
13698
13699 /* Override any gcc2 internal prototype to avoid an error.  */
13700 #ifdef __cplusplus
13701 extern "C"
13702 #endif
13703 /* We use char because int might match the return type of a gcc2
13704    builtin and then its argument prototype would still apply.  */
13705 char opendir ();
13706 int
13707 main ()
13708 {
13709 opendir ();
13710   ;
13711   return 0;
13712 }
13713 _ACEOF
13714 rm -f conftest.$ac_objext conftest$ac_exeext
13715 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13716   (eval $ac_link) 2>conftest.er1
13717   ac_status=$?
13718   grep -v '^ *+' conftest.er1 >conftest.err
13719   rm -f conftest.er1
13720   cat conftest.err >&5
13721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13722   (exit $ac_status); } &&
13723          { ac_try='test -z "$ac_c_werror_flag"
13724                          || test ! -s conftest.err'
13725   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13726   (eval $ac_try) 2>&5
13727   ac_status=$?
13728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13729   (exit $ac_status); }; } &&
13730          { ac_try='test -s conftest$ac_exeext'
13731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13732   (eval $ac_try) 2>&5
13733   ac_status=$?
13734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13735   (exit $ac_status); }; }; then
13736   ac_cv_search_opendir="-l$ac_lib"
13737 break
13738 else
13739   echo "$as_me: failed program was:" >&5
13740 sed 's/^/| /' conftest.$ac_ext >&5
13741
13742 fi
13743 rm -f conftest.err conftest.$ac_objext \
13744       conftest$ac_exeext conftest.$ac_ext
13745   done
13746 fi
13747 LIBS=$ac_func_search_save_LIBS
13748 fi
13749 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
13750 echo "${ECHO_T}$ac_cv_search_opendir" >&6
13751 if test "$ac_cv_search_opendir" != no; then
13752   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
13753
13754 fi
13755
13756 fi
13757
13758 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
13759 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
13760 if test "${ac_cv_header_sys_wait_h+set}" = set; then
13761   echo $ECHO_N "(cached) $ECHO_C" >&6
13762 else
13763   cat >conftest.$ac_ext <<_ACEOF
13764 /* confdefs.h.  */
13765 _ACEOF
13766 cat confdefs.h >>conftest.$ac_ext
13767 cat >>conftest.$ac_ext <<_ACEOF
13768 /* end confdefs.h.  */
13769 #include <sys/types.h>
13770 #include <sys/wait.h>
13771 #ifndef WEXITSTATUS
13772 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
13773 #endif
13774 #ifndef WIFEXITED
13775 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
13776 #endif
13777
13778 int
13779 main ()
13780 {
13781   int s;
13782   wait (&s);
13783   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
13784   ;
13785   return 0;
13786 }
13787 _ACEOF
13788 rm -f conftest.$ac_objext
13789 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13790   (eval $ac_compile) 2>conftest.er1
13791   ac_status=$?
13792   grep -v '^ *+' conftest.er1 >conftest.err
13793   rm -f conftest.er1
13794   cat conftest.err >&5
13795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13796   (exit $ac_status); } &&
13797          { ac_try='test -z "$ac_c_werror_flag"
13798                          || test ! -s conftest.err'
13799   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13800   (eval $ac_try) 2>&5
13801   ac_status=$?
13802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13803   (exit $ac_status); }; } &&
13804          { ac_try='test -s conftest.$ac_objext'
13805   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13806   (eval $ac_try) 2>&5
13807   ac_status=$?
13808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13809   (exit $ac_status); }; }; then
13810   ac_cv_header_sys_wait_h=yes
13811 else
13812   echo "$as_me: failed program was:" >&5
13813 sed 's/^/| /' conftest.$ac_ext >&5
13814
13815 ac_cv_header_sys_wait_h=no
13816 fi
13817 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13818 fi
13819 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
13820 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
13821 if test $ac_cv_header_sys_wait_h = yes; then
13822
13823 cat >>confdefs.h <<\_ACEOF
13824 #define HAVE_SYS_WAIT_H 1
13825 _ACEOF
13826
13827 fi
13828
13829 echo "$as_me:$LINENO: checking whether termios.h defines TIOCGWINSZ" >&5
13830 echo $ECHO_N "checking whether termios.h defines TIOCGWINSZ... $ECHO_C" >&6
13831 if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then
13832   echo $ECHO_N "(cached) $ECHO_C" >&6
13833 else
13834   cat >conftest.$ac_ext <<_ACEOF
13835 /* confdefs.h.  */
13836 _ACEOF
13837 cat confdefs.h >>conftest.$ac_ext
13838 cat >>conftest.$ac_ext <<_ACEOF
13839 /* end confdefs.h.  */
13840 #include <sys/types.h>
13841 #include <termios.h>
13842 #ifdef TIOCGWINSZ
13843   yes
13844 #endif
13845
13846 _ACEOF
13847 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13848   $EGREP "yes" >/dev/null 2>&1; then
13849   ac_cv_sys_tiocgwinsz_in_termios_h=yes
13850 else
13851   ac_cv_sys_tiocgwinsz_in_termios_h=no
13852 fi
13853 rm -f conftest*
13854
13855 fi
13856 echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
13857 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_termios_h" >&6
13858
13859 if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
13860   echo "$as_me:$LINENO: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
13861 echo $ECHO_N "checking whether sys/ioctl.h defines TIOCGWINSZ... $ECHO_C" >&6
13862 if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then
13863   echo $ECHO_N "(cached) $ECHO_C" >&6
13864 else
13865   cat >conftest.$ac_ext <<_ACEOF
13866 /* confdefs.h.  */
13867 _ACEOF
13868 cat confdefs.h >>conftest.$ac_ext
13869 cat >>conftest.$ac_ext <<_ACEOF
13870 /* end confdefs.h.  */
13871 #include <sys/types.h>
13872 #include <sys/ioctl.h>
13873 #ifdef TIOCGWINSZ
13874   yes
13875 #endif
13876
13877 _ACEOF
13878 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13879   $EGREP "yes" >/dev/null 2>&1; then
13880   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
13881 else
13882   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
13883 fi
13884 rm -f conftest*
13885
13886 fi
13887 echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
13888 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6
13889
13890   if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
13891
13892 cat >>confdefs.h <<\_ACEOF
13893 #define GWINSZ_IN_SYS_IOCTL 1
13894 _ACEOF
13895
13896   fi
13897 fi
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944 for ac_header in \
13945         arpa/inet.h             \
13946         arpa/nameser.h  \
13947         assert.h                \
13948         bits/types.h    \
13949         conio.h                 \
13950         crypt.h                 \
13951         direct.h                \
13952         errno.h                 \
13953         fcntl.h                 \
13954         filio.h                 \
13955         getopt.h                \
13956         grp.h                   \
13957         io.h                    \
13958         libutil.h               \
13959         limits.h                \
13960         locale.h                \
13961         malloc.h                \
13962         memory.h                \
13963         psap.h                  \
13964         pwd.h                   \
13965         process.h               \
13966         sgtty.h                 \
13967         shadow.h                \
13968         stddef.h                \
13969         string.h                \
13970         strings.h               \
13971         sysexits.h              \
13972         sys/file.h              \
13973         sys/filio.h             \
13974         sys/errno.h             \
13975         sys/ioctl.h             \
13976         sys/param.h             \
13977         sys/resource.h  \
13978         sys/select.h    \
13979         sys/socket.h    \
13980         sys/stat.h              \
13981         sys/syslog.h    \
13982         sys/time.h              \
13983         sys/types.h             \
13984         sys/uio.h               \
13985         syslog.h                \
13986         termios.h               \
13987         unistd.h                \
13988         utime.h                 \
13989
13990 do
13991 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13992 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13993   echo "$as_me:$LINENO: checking for $ac_header" >&5
13994 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13995 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13996   echo $ECHO_N "(cached) $ECHO_C" >&6
13997 fi
13998 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13999 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14000 else
14001   # Is the header compilable?
14002 echo "$as_me:$LINENO: checking $ac_header usability" >&5
14003 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14004 cat >conftest.$ac_ext <<_ACEOF
14005 /* confdefs.h.  */
14006 _ACEOF
14007 cat confdefs.h >>conftest.$ac_ext
14008 cat >>conftest.$ac_ext <<_ACEOF
14009 /* end confdefs.h.  */
14010 $ac_includes_default
14011 #include <$ac_header>
14012 _ACEOF
14013 rm -f conftest.$ac_objext
14014 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14015   (eval $ac_compile) 2>conftest.er1
14016   ac_status=$?
14017   grep -v '^ *+' conftest.er1 >conftest.err
14018   rm -f conftest.er1
14019   cat conftest.err >&5
14020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14021   (exit $ac_status); } &&
14022          { ac_try='test -z "$ac_c_werror_flag"
14023                          || test ! -s conftest.err'
14024   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14025   (eval $ac_try) 2>&5
14026   ac_status=$?
14027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14028   (exit $ac_status); }; } &&
14029          { ac_try='test -s conftest.$ac_objext'
14030   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14031   (eval $ac_try) 2>&5
14032   ac_status=$?
14033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14034   (exit $ac_status); }; }; then
14035   ac_header_compiler=yes
14036 else
14037   echo "$as_me: failed program was:" >&5
14038 sed 's/^/| /' conftest.$ac_ext >&5
14039
14040 ac_header_compiler=no
14041 fi
14042 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14043 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14044 echo "${ECHO_T}$ac_header_compiler" >&6
14045
14046 # Is the header present?
14047 echo "$as_me:$LINENO: checking $ac_header presence" >&5
14048 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14049 cat >conftest.$ac_ext <<_ACEOF
14050 /* confdefs.h.  */
14051 _ACEOF
14052 cat confdefs.h >>conftest.$ac_ext
14053 cat >>conftest.$ac_ext <<_ACEOF
14054 /* end confdefs.h.  */
14055 #include <$ac_header>
14056 _ACEOF
14057 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14058   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14059   ac_status=$?
14060   grep -v '^ *+' conftest.er1 >conftest.err
14061   rm -f conftest.er1
14062   cat conftest.err >&5
14063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14064   (exit $ac_status); } >/dev/null; then
14065   if test -s conftest.err; then
14066     ac_cpp_err=$ac_c_preproc_warn_flag
14067     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
14068   else
14069     ac_cpp_err=
14070   fi
14071 else
14072   ac_cpp_err=yes
14073 fi
14074 if test -z "$ac_cpp_err"; then
14075   ac_header_preproc=yes
14076 else
14077   echo "$as_me: failed program was:" >&5
14078 sed 's/^/| /' conftest.$ac_ext >&5
14079
14080   ac_header_preproc=no
14081 fi
14082 rm -f conftest.err conftest.$ac_ext
14083 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14084 echo "${ECHO_T}$ac_header_preproc" >&6
14085
14086 # So?  What about this header?
14087 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14088   yes:no: )
14089     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14090 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14091     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14092 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14093     ac_header_preproc=yes
14094     ;;
14095   no:yes:* )
14096     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14097 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14098     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
14099 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
14100     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14101 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14102     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
14103 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
14104     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14105 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14106     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14107 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14108     (
14109       cat <<\_ASBOX
14110 ## --------------------------------------------- ##
14111 ## Report this to <http://www.openldap.org/its/> ##
14112 ## --------------------------------------------- ##
14113 _ASBOX
14114     ) |
14115       sed "s/^/$as_me: WARNING:     /" >&2
14116     ;;
14117 esac
14118 echo "$as_me:$LINENO: checking for $ac_header" >&5
14119 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14120 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14121   echo $ECHO_N "(cached) $ECHO_C" >&6
14122 else
14123   eval "$as_ac_Header=\$ac_header_preproc"
14124 fi
14125 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14126 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14127
14128 fi
14129 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14130   cat >>confdefs.h <<_ACEOF
14131 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14132 _ACEOF
14133
14134 fi
14135
14136 done
14137
14138
14139 if test "$ac_cv_mingw32" = yes ; then
14140
14141
14142 for ac_header in winsock.h winsock2.h
14143 do
14144 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14145 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14146   echo "$as_me:$LINENO: checking for $ac_header" >&5
14147 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14148 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14149   echo $ECHO_N "(cached) $ECHO_C" >&6
14150 fi
14151 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14152 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14153 else
14154   # Is the header compilable?
14155 echo "$as_me:$LINENO: checking $ac_header usability" >&5
14156 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14157 cat >conftest.$ac_ext <<_ACEOF
14158 /* confdefs.h.  */
14159 _ACEOF
14160 cat confdefs.h >>conftest.$ac_ext
14161 cat >>conftest.$ac_ext <<_ACEOF
14162 /* end confdefs.h.  */
14163 $ac_includes_default
14164 #include <$ac_header>
14165 _ACEOF
14166 rm -f conftest.$ac_objext
14167 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14168   (eval $ac_compile) 2>conftest.er1
14169   ac_status=$?
14170   grep -v '^ *+' conftest.er1 >conftest.err
14171   rm -f conftest.er1
14172   cat conftest.err >&5
14173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14174   (exit $ac_status); } &&
14175          { ac_try='test -z "$ac_c_werror_flag"
14176                          || test ! -s conftest.err'
14177   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14178   (eval $ac_try) 2>&5
14179   ac_status=$?
14180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14181   (exit $ac_status); }; } &&
14182          { ac_try='test -s conftest.$ac_objext'
14183   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14184   (eval $ac_try) 2>&5
14185   ac_status=$?
14186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14187   (exit $ac_status); }; }; then
14188   ac_header_compiler=yes
14189 else
14190   echo "$as_me: failed program was:" >&5
14191 sed 's/^/| /' conftest.$ac_ext >&5
14192
14193 ac_header_compiler=no
14194 fi
14195 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14196 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14197 echo "${ECHO_T}$ac_header_compiler" >&6
14198
14199 # Is the header present?
14200 echo "$as_me:$LINENO: checking $ac_header presence" >&5
14201 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14202 cat >conftest.$ac_ext <<_ACEOF
14203 /* confdefs.h.  */
14204 _ACEOF
14205 cat confdefs.h >>conftest.$ac_ext
14206 cat >>conftest.$ac_ext <<_ACEOF
14207 /* end confdefs.h.  */
14208 #include <$ac_header>
14209 _ACEOF
14210 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14211   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14212   ac_status=$?
14213   grep -v '^ *+' conftest.er1 >conftest.err
14214   rm -f conftest.er1
14215   cat conftest.err >&5
14216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14217   (exit $ac_status); } >/dev/null; then
14218   if test -s conftest.err; then
14219     ac_cpp_err=$ac_c_preproc_warn_flag
14220     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
14221   else
14222     ac_cpp_err=
14223   fi
14224 else
14225   ac_cpp_err=yes
14226 fi
14227 if test -z "$ac_cpp_err"; then
14228   ac_header_preproc=yes
14229 else
14230   echo "$as_me: failed program was:" >&5
14231 sed 's/^/| /' conftest.$ac_ext >&5
14232
14233   ac_header_preproc=no
14234 fi
14235 rm -f conftest.err conftest.$ac_ext
14236 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14237 echo "${ECHO_T}$ac_header_preproc" >&6
14238
14239 # So?  What about this header?
14240 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14241   yes:no: )
14242     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14243 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14244     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14245 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14246     ac_header_preproc=yes
14247     ;;
14248   no:yes:* )
14249     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14250 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14251     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
14252 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
14253     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14254 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14255     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
14256 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
14257     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14258 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14259     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14260 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14261     (
14262       cat <<\_ASBOX
14263 ## --------------------------------------------- ##
14264 ## Report this to <http://www.openldap.org/its/> ##
14265 ## --------------------------------------------- ##
14266 _ASBOX
14267     ) |
14268       sed "s/^/$as_me: WARNING:     /" >&2
14269     ;;
14270 esac
14271 echo "$as_me:$LINENO: checking for $ac_header" >&5
14272 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14273 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14274   echo $ECHO_N "(cached) $ECHO_C" >&6
14275 else
14276   eval "$as_ac_Header=\$ac_header_preproc"
14277 fi
14278 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14279 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14280
14281 fi
14282 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14283   cat >>confdefs.h <<_ACEOF
14284 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14285 _ACEOF
14286
14287 fi
14288
14289 done
14290
14291 fi
14292
14293
14294 for ac_header in resolv.h
14295 do
14296 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14297 echo "$as_me:$LINENO: checking for $ac_header" >&5
14298 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14299 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14300   echo $ECHO_N "(cached) $ECHO_C" >&6
14301 else
14302   cat >conftest.$ac_ext <<_ACEOF
14303 /* confdefs.h.  */
14304 _ACEOF
14305 cat confdefs.h >>conftest.$ac_ext
14306 cat >>conftest.$ac_ext <<_ACEOF
14307 /* end confdefs.h.  */
14308 $ac_includes_default
14309 #include <netinet/in.h>
14310
14311
14312 #include <$ac_header>
14313 _ACEOF
14314 rm -f conftest.$ac_objext
14315 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14316   (eval $ac_compile) 2>conftest.er1
14317   ac_status=$?
14318   grep -v '^ *+' conftest.er1 >conftest.err
14319   rm -f conftest.er1
14320   cat conftest.err >&5
14321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14322   (exit $ac_status); } &&
14323          { ac_try='test -z "$ac_c_werror_flag"
14324                          || test ! -s conftest.err'
14325   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14326   (eval $ac_try) 2>&5
14327   ac_status=$?
14328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14329   (exit $ac_status); }; } &&
14330          { ac_try='test -s conftest.$ac_objext'
14331   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14332   (eval $ac_try) 2>&5
14333   ac_status=$?
14334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14335   (exit $ac_status); }; }; then
14336   eval "$as_ac_Header=yes"
14337 else
14338   echo "$as_me: failed program was:" >&5
14339 sed 's/^/| /' conftest.$ac_ext >&5
14340
14341 eval "$as_ac_Header=no"
14342 fi
14343 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14344 fi
14345 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14346 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14347 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14348   cat >>confdefs.h <<_ACEOF
14349 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14350 _ACEOF
14351
14352 fi
14353
14354 done
14355
14356
14357
14358 for ac_header in netinet/tcp.h
14359 do
14360 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14361 echo "$as_me:$LINENO: checking for $ac_header" >&5
14362 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14363 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14364   echo $ECHO_N "(cached) $ECHO_C" >&6
14365 else
14366   cat >conftest.$ac_ext <<_ACEOF
14367 /* confdefs.h.  */
14368 _ACEOF
14369 cat confdefs.h >>conftest.$ac_ext
14370 cat >>conftest.$ac_ext <<_ACEOF
14371 /* end confdefs.h.  */
14372 $ac_includes_default
14373 #include <netinet/in.h>
14374
14375
14376 #include <$ac_header>
14377 _ACEOF
14378 rm -f conftest.$ac_objext
14379 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14380   (eval $ac_compile) 2>conftest.er1
14381   ac_status=$?
14382   grep -v '^ *+' conftest.er1 >conftest.err
14383   rm -f conftest.er1
14384   cat conftest.err >&5
14385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14386   (exit $ac_status); } &&
14387          { ac_try='test -z "$ac_c_werror_flag"
14388                          || test ! -s conftest.err'
14389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14390   (eval $ac_try) 2>&5
14391   ac_status=$?
14392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14393   (exit $ac_status); }; } &&
14394          { ac_try='test -s conftest.$ac_objext'
14395   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14396   (eval $ac_try) 2>&5
14397   ac_status=$?
14398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14399   (exit $ac_status); }; }; then
14400   eval "$as_ac_Header=yes"
14401 else
14402   echo "$as_me: failed program was:" >&5
14403 sed 's/^/| /' conftest.$ac_ext >&5
14404
14405 eval "$as_ac_Header=no"
14406 fi
14407 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14408 fi
14409 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14410 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14411 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14412   cat >>confdefs.h <<_ACEOF
14413 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14414 _ACEOF
14415
14416 fi
14417
14418 done
14419
14420
14421
14422 for ac_header in sys/ucred.h
14423 do
14424 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14425 echo "$as_me:$LINENO: checking for $ac_header" >&5
14426 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14427 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14428   echo $ECHO_N "(cached) $ECHO_C" >&6
14429 else
14430   cat >conftest.$ac_ext <<_ACEOF
14431 /* confdefs.h.  */
14432 _ACEOF
14433 cat confdefs.h >>conftest.$ac_ext
14434 cat >>conftest.$ac_ext <<_ACEOF
14435 /* end confdefs.h.  */
14436 $ac_includes_default
14437 #ifdef HAVE_SYS_PARAM_H
14438 #include <sys/param.h>
14439 #endif
14440
14441
14442 #include <$ac_header>
14443 _ACEOF
14444 rm -f conftest.$ac_objext
14445 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14446   (eval $ac_compile) 2>conftest.er1
14447   ac_status=$?
14448   grep -v '^ *+' conftest.er1 >conftest.err
14449   rm -f conftest.er1
14450   cat conftest.err >&5
14451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14452   (exit $ac_status); } &&
14453          { ac_try='test -z "$ac_c_werror_flag"
14454                          || test ! -s conftest.err'
14455   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14456   (eval $ac_try) 2>&5
14457   ac_status=$?
14458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14459   (exit $ac_status); }; } &&
14460          { ac_try='test -s conftest.$ac_objext'
14461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14462   (eval $ac_try) 2>&5
14463   ac_status=$?
14464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14465   (exit $ac_status); }; }; then
14466   eval "$as_ac_Header=yes"
14467 else
14468   echo "$as_me: failed program was:" >&5
14469 sed 's/^/| /' conftest.$ac_ext >&5
14470
14471 eval "$as_ac_Header=no"
14472 fi
14473 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14474 fi
14475 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14476 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14477 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14478   cat >>confdefs.h <<_ACEOF
14479 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14480 _ACEOF
14481
14482 fi
14483
14484 done
14485
14486
14487
14488
14489
14490 for ac_func in sigaction sigset
14491 do
14492 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14493 echo "$as_me:$LINENO: checking for $ac_func" >&5
14494 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14495 if eval "test \"\${$as_ac_var+set}\" = set"; then
14496   echo $ECHO_N "(cached) $ECHO_C" >&6
14497 else
14498   cat >conftest.$ac_ext <<_ACEOF
14499 /* confdefs.h.  */
14500 _ACEOF
14501 cat confdefs.h >>conftest.$ac_ext
14502 cat >>conftest.$ac_ext <<_ACEOF
14503 /* end confdefs.h.  */
14504 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14505    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14506 #define $ac_func innocuous_$ac_func
14507
14508 /* System header to define __stub macros and hopefully few prototypes,
14509     which can conflict with char $ac_func (); below.
14510     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14511     <limits.h> exists even on freestanding compilers.  */
14512
14513 #ifdef __STDC__
14514 # include <limits.h>
14515 #else
14516 # include <assert.h>
14517 #endif
14518
14519 #undef $ac_func
14520
14521 /* Override any gcc2 internal prototype to avoid an error.  */
14522 #ifdef __cplusplus
14523 extern "C"
14524 {
14525 #endif
14526 /* We use char because int might match the return type of a gcc2
14527    builtin and then its argument prototype would still apply.  */
14528 char $ac_func ();
14529 /* The GNU C library defines this for functions which it implements
14530     to always fail with ENOSYS.  Some functions are actually named
14531     something starting with __ and the normal name is an alias.  */
14532 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14533 choke me
14534 #else
14535 char (*f) () = $ac_func;
14536 #endif
14537 #ifdef __cplusplus
14538 }
14539 #endif
14540
14541 int
14542 main ()
14543 {
14544 return f != $ac_func;
14545   ;
14546   return 0;
14547 }
14548 _ACEOF
14549 rm -f conftest.$ac_objext conftest$ac_exeext
14550 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14551   (eval $ac_link) 2>conftest.er1
14552   ac_status=$?
14553   grep -v '^ *+' conftest.er1 >conftest.err
14554   rm -f conftest.er1
14555   cat conftest.err >&5
14556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14557   (exit $ac_status); } &&
14558          { ac_try='test -z "$ac_c_werror_flag"
14559                          || test ! -s conftest.err'
14560   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14561   (eval $ac_try) 2>&5
14562   ac_status=$?
14563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14564   (exit $ac_status); }; } &&
14565          { ac_try='test -s conftest$ac_exeext'
14566   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14567   (eval $ac_try) 2>&5
14568   ac_status=$?
14569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14570   (exit $ac_status); }; }; then
14571   eval "$as_ac_var=yes"
14572 else
14573   echo "$as_me: failed program was:" >&5
14574 sed 's/^/| /' conftest.$ac_ext >&5
14575
14576 eval "$as_ac_var=no"
14577 fi
14578 rm -f conftest.err conftest.$ac_objext \
14579       conftest$ac_exeext conftest.$ac_ext
14580 fi
14581 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14582 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14583 if test `eval echo '${'$as_ac_var'}'` = yes; then
14584   cat >>confdefs.h <<_ACEOF
14585 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14586 _ACEOF
14587
14588 fi
14589 done
14590
14591
14592 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
14593
14594 echo "$as_me:$LINENO: checking for sigset in -lV3" >&5
14595 echo $ECHO_N "checking for sigset in -lV3... $ECHO_C" >&6
14596 if test "${ac_cv_lib_V3_sigset+set}" = set; then
14597   echo $ECHO_N "(cached) $ECHO_C" >&6
14598 else
14599   ac_check_lib_save_LIBS=$LIBS
14600 LIBS="-lV3  $LIBS"
14601 cat >conftest.$ac_ext <<_ACEOF
14602 /* confdefs.h.  */
14603 _ACEOF
14604 cat confdefs.h >>conftest.$ac_ext
14605 cat >>conftest.$ac_ext <<_ACEOF
14606 /* end confdefs.h.  */
14607
14608 /* Override any gcc2 internal prototype to avoid an error.  */
14609 #ifdef __cplusplus
14610 extern "C"
14611 #endif
14612 /* We use char because int might match the return type of a gcc2
14613    builtin and then its argument prototype would still apply.  */
14614 char sigset ();
14615 int
14616 main ()
14617 {
14618 sigset ();
14619   ;
14620   return 0;
14621 }
14622 _ACEOF
14623 rm -f conftest.$ac_objext conftest$ac_exeext
14624 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14625   (eval $ac_link) 2>conftest.er1
14626   ac_status=$?
14627   grep -v '^ *+' conftest.er1 >conftest.err
14628   rm -f conftest.er1
14629   cat conftest.err >&5
14630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14631   (exit $ac_status); } &&
14632          { ac_try='test -z "$ac_c_werror_flag"
14633                          || test ! -s conftest.err'
14634   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14635   (eval $ac_try) 2>&5
14636   ac_status=$?
14637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14638   (exit $ac_status); }; } &&
14639          { ac_try='test -s conftest$ac_exeext'
14640   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14641   (eval $ac_try) 2>&5
14642   ac_status=$?
14643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14644   (exit $ac_status); }; }; then
14645   ac_cv_lib_V3_sigset=yes
14646 else
14647   echo "$as_me: failed program was:" >&5
14648 sed 's/^/| /' conftest.$ac_ext >&5
14649
14650 ac_cv_lib_V3_sigset=no
14651 fi
14652 rm -f conftest.err conftest.$ac_objext \
14653       conftest$ac_exeext conftest.$ac_ext
14654 LIBS=$ac_check_lib_save_LIBS
14655 fi
14656 echo "$as_me:$LINENO: result: $ac_cv_lib_V3_sigset" >&5
14657 echo "${ECHO_T}$ac_cv_lib_V3_sigset" >&6
14658 if test $ac_cv_lib_V3_sigset = yes; then
14659   cat >>confdefs.h <<_ACEOF
14660 #define HAVE_LIBV3 1
14661 _ACEOF
14662
14663   LIBS="-lV3 $LIBS"
14664
14665 fi
14666
14667 fi
14668
14669 if test "$ac_cv_header_winsock_h" = yes; then
14670 echo "$as_me:$LINENO: checking for winsock" >&5
14671 echo $ECHO_N "checking for winsock... $ECHO_C" >&6
14672 if test "${ol_cv_winsock+set}" = set; then
14673   echo $ECHO_N "(cached) $ECHO_C" >&6
14674 else
14675   save_LIBS="$LIBS"
14676 for curlib in ws2_32 wsock32; do
14677         LIBS="$LIBS -l$curlib"
14678         cat >conftest.$ac_ext <<_ACEOF
14679 /* confdefs.h.  */
14680 _ACEOF
14681 cat confdefs.h >>conftest.$ac_ext
14682 cat >>conftest.$ac_ext <<_ACEOF
14683 /* end confdefs.h.  */
14684 #include <winsock.h>
14685
14686 int
14687 main ()
14688 {
14689
14690                         socket(0,0,0);
14691                         select(0,NULL,NULL,NULL,NULL);
14692                         closesocket(0);
14693                         gethostname(NULL,0);
14694
14695   ;
14696   return 0;
14697 }
14698 _ACEOF
14699 rm -f conftest.$ac_objext conftest$ac_exeext
14700 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14701   (eval $ac_link) 2>conftest.er1
14702   ac_status=$?
14703   grep -v '^ *+' conftest.er1 >conftest.err
14704   rm -f conftest.er1
14705   cat conftest.err >&5
14706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14707   (exit $ac_status); } &&
14708          { ac_try='test -z "$ac_c_werror_flag"
14709                          || test ! -s conftest.err'
14710   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14711   (eval $ac_try) 2>&5
14712   ac_status=$?
14713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14714   (exit $ac_status); }; } &&
14715          { ac_try='test -s conftest$ac_exeext'
14716   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14717   (eval $ac_try) 2>&5
14718   ac_status=$?
14719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14720   (exit $ac_status); }; }; then
14721   ol_cv_winsock=yes
14722 else
14723   echo "$as_me: failed program was:" >&5
14724 sed 's/^/| /' conftest.$ac_ext >&5
14725
14726 ol_cv_winsock=no
14727 fi
14728 rm -f conftest.err conftest.$ac_objext \
14729       conftest$ac_exeext conftest.$ac_ext
14730
14731         if test $ol_cv_winsock = yes; then
14732
14733 cat >>confdefs.h <<\_ACEOF
14734 #define HAVE_WINSOCK 1
14735 _ACEOF
14736
14737                 ac_cv_func_socket=yes
14738                 ac_cv_func_select=yes
14739                 ac_cv_func_closesocket=yes
14740                 ac_cv_func_gethostname=yes
14741                 if test $curlib = ws2_32; then
14742                         ol_cv_winsock=winsock2
14743
14744 cat >>confdefs.h <<\_ACEOF
14745 #define HAVE_WINSOCK2 1
14746 _ACEOF
14747
14748                 fi
14749                 break
14750         fi
14751         LIBS="$save_LIBS"
14752 done
14753 fi
14754 echo "$as_me:$LINENO: result: $ol_cv_winsock" >&5
14755 echo "${ECHO_T}$ol_cv_winsock" >&6
14756 fi
14757
14758
14759 echo "$as_me:$LINENO: checking for socket" >&5
14760 echo $ECHO_N "checking for socket... $ECHO_C" >&6
14761 if test "${ac_cv_func_socket+set}" = set; then
14762   echo $ECHO_N "(cached) $ECHO_C" >&6
14763 else
14764   cat >conftest.$ac_ext <<_ACEOF
14765 /* confdefs.h.  */
14766 _ACEOF
14767 cat confdefs.h >>conftest.$ac_ext
14768 cat >>conftest.$ac_ext <<_ACEOF
14769 /* end confdefs.h.  */
14770 /* Define socket to an innocuous variant, in case <limits.h> declares socket.
14771    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14772 #define socket innocuous_socket
14773
14774 /* System header to define __stub macros and hopefully few prototypes,
14775     which can conflict with char socket (); below.
14776     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14777     <limits.h> exists even on freestanding compilers.  */
14778
14779 #ifdef __STDC__
14780 # include <limits.h>
14781 #else
14782 # include <assert.h>
14783 #endif
14784
14785 #undef socket
14786
14787 /* Override any gcc2 internal prototype to avoid an error.  */
14788 #ifdef __cplusplus
14789 extern "C"
14790 {
14791 #endif
14792 /* We use char because int might match the return type of a gcc2
14793    builtin and then its argument prototype would still apply.  */
14794 char socket ();
14795 /* The GNU C library defines this for functions which it implements
14796     to always fail with ENOSYS.  Some functions are actually named
14797     something starting with __ and the normal name is an alias.  */
14798 #if defined (__stub_socket) || defined (__stub___socket)
14799 choke me
14800 #else
14801 char (*f) () = socket;
14802 #endif
14803 #ifdef __cplusplus
14804 }
14805 #endif
14806
14807 int
14808 main ()
14809 {
14810 return f != socket;
14811   ;
14812   return 0;
14813 }
14814 _ACEOF
14815 rm -f conftest.$ac_objext conftest$ac_exeext
14816 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14817   (eval $ac_link) 2>conftest.er1
14818   ac_status=$?
14819   grep -v '^ *+' conftest.er1 >conftest.err
14820   rm -f conftest.er1
14821   cat conftest.err >&5
14822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14823   (exit $ac_status); } &&
14824          { ac_try='test -z "$ac_c_werror_flag"
14825                          || test ! -s conftest.err'
14826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14827   (eval $ac_try) 2>&5
14828   ac_status=$?
14829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14830   (exit $ac_status); }; } &&
14831          { ac_try='test -s conftest$ac_exeext'
14832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14833   (eval $ac_try) 2>&5
14834   ac_status=$?
14835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14836   (exit $ac_status); }; }; then
14837   ac_cv_func_socket=yes
14838 else
14839   echo "$as_me: failed program was:" >&5
14840 sed 's/^/| /' conftest.$ac_ext >&5
14841
14842 ac_cv_func_socket=no
14843 fi
14844 rm -f conftest.err conftest.$ac_objext \
14845       conftest$ac_exeext conftest.$ac_ext
14846 fi
14847 echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
14848 echo "${ECHO_T}$ac_cv_func_socket" >&6
14849 if test $ac_cv_func_socket = yes; then
14850   :
14851 else
14852
14853
14854 echo "$as_me:$LINENO: checking for main in -lsocket" >&5
14855 echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
14856 if test "${ac_cv_lib_socket_main+set}" = set; then
14857   echo $ECHO_N "(cached) $ECHO_C" >&6
14858 else
14859   ac_check_lib_save_LIBS=$LIBS
14860 LIBS="-lsocket  $LIBS"
14861 cat >conftest.$ac_ext <<_ACEOF
14862 /* confdefs.h.  */
14863 _ACEOF
14864 cat confdefs.h >>conftest.$ac_ext
14865 cat >>conftest.$ac_ext <<_ACEOF
14866 /* end confdefs.h.  */
14867
14868
14869 int
14870 main ()
14871 {
14872 main ();
14873   ;
14874   return 0;
14875 }
14876 _ACEOF
14877 rm -f conftest.$ac_objext conftest$ac_exeext
14878 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14879   (eval $ac_link) 2>conftest.er1
14880   ac_status=$?
14881   grep -v '^ *+' conftest.er1 >conftest.err
14882   rm -f conftest.er1
14883   cat conftest.err >&5
14884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14885   (exit $ac_status); } &&
14886          { ac_try='test -z "$ac_c_werror_flag"
14887                          || test ! -s conftest.err'
14888   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14889   (eval $ac_try) 2>&5
14890   ac_status=$?
14891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14892   (exit $ac_status); }; } &&
14893          { ac_try='test -s conftest$ac_exeext'
14894   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14895   (eval $ac_try) 2>&5
14896   ac_status=$?
14897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14898   (exit $ac_status); }; }; then
14899   ac_cv_lib_socket_main=yes
14900 else
14901   echo "$as_me: failed program was:" >&5
14902 sed 's/^/| /' conftest.$ac_ext >&5
14903
14904 ac_cv_lib_socket_main=no
14905 fi
14906 rm -f conftest.err conftest.$ac_objext \
14907       conftest$ac_exeext conftest.$ac_ext
14908 LIBS=$ac_check_lib_save_LIBS
14909 fi
14910 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
14911 echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
14912 if test $ac_cv_lib_socket_main = yes; then
14913   cat >>confdefs.h <<_ACEOF
14914 #define HAVE_LIBSOCKET 1
14915 _ACEOF
14916
14917   LIBS="-lsocket $LIBS"
14918
14919 fi
14920
14921
14922 echo "$as_me:$LINENO: checking for main in -lnet" >&5
14923 echo $ECHO_N "checking for main in -lnet... $ECHO_C" >&6
14924 if test "${ac_cv_lib_net_main+set}" = set; then
14925   echo $ECHO_N "(cached) $ECHO_C" >&6
14926 else
14927   ac_check_lib_save_LIBS=$LIBS
14928 LIBS="-lnet  $LIBS"
14929 cat >conftest.$ac_ext <<_ACEOF
14930 /* confdefs.h.  */
14931 _ACEOF
14932 cat confdefs.h >>conftest.$ac_ext
14933 cat >>conftest.$ac_ext <<_ACEOF
14934 /* end confdefs.h.  */
14935
14936
14937 int
14938 main ()
14939 {
14940 main ();
14941   ;
14942   return 0;
14943 }
14944 _ACEOF
14945 rm -f conftest.$ac_objext conftest$ac_exeext
14946 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14947   (eval $ac_link) 2>conftest.er1
14948   ac_status=$?
14949   grep -v '^ *+' conftest.er1 >conftest.err
14950   rm -f conftest.er1
14951   cat conftest.err >&5
14952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14953   (exit $ac_status); } &&
14954          { ac_try='test -z "$ac_c_werror_flag"
14955                          || test ! -s conftest.err'
14956   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14957   (eval $ac_try) 2>&5
14958   ac_status=$?
14959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14960   (exit $ac_status); }; } &&
14961          { ac_try='test -s conftest$ac_exeext'
14962   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14963   (eval $ac_try) 2>&5
14964   ac_status=$?
14965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14966   (exit $ac_status); }; }; then
14967   ac_cv_lib_net_main=yes
14968 else
14969   echo "$as_me: failed program was:" >&5
14970 sed 's/^/| /' conftest.$ac_ext >&5
14971
14972 ac_cv_lib_net_main=no
14973 fi
14974 rm -f conftest.err conftest.$ac_objext \
14975       conftest$ac_exeext conftest.$ac_ext
14976 LIBS=$ac_check_lib_save_LIBS
14977 fi
14978 echo "$as_me:$LINENO: result: $ac_cv_lib_net_main" >&5
14979 echo "${ECHO_T}$ac_cv_lib_net_main" >&6
14980 if test $ac_cv_lib_net_main = yes; then
14981   cat >>confdefs.h <<_ACEOF
14982 #define HAVE_LIBNET 1
14983 _ACEOF
14984
14985   LIBS="-lnet $LIBS"
14986
14987 fi
14988
14989
14990 echo "$as_me:$LINENO: checking for main in -lnsl_s" >&5
14991 echo $ECHO_N "checking for main in -lnsl_s... $ECHO_C" >&6
14992 if test "${ac_cv_lib_nsl_s_main+set}" = set; then
14993   echo $ECHO_N "(cached) $ECHO_C" >&6
14994 else
14995   ac_check_lib_save_LIBS=$LIBS
14996 LIBS="-lnsl_s  $LIBS"
14997 cat >conftest.$ac_ext <<_ACEOF
14998 /* confdefs.h.  */
14999 _ACEOF
15000 cat confdefs.h >>conftest.$ac_ext
15001 cat >>conftest.$ac_ext <<_ACEOF
15002 /* end confdefs.h.  */
15003
15004
15005 int
15006 main ()
15007 {
15008 main ();
15009   ;
15010   return 0;
15011 }
15012 _ACEOF
15013 rm -f conftest.$ac_objext conftest$ac_exeext
15014 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15015   (eval $ac_link) 2>conftest.er1
15016   ac_status=$?
15017   grep -v '^ *+' conftest.er1 >conftest.err
15018   rm -f conftest.er1
15019   cat conftest.err >&5
15020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15021   (exit $ac_status); } &&
15022          { ac_try='test -z "$ac_c_werror_flag"
15023                          || test ! -s conftest.err'
15024   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15025   (eval $ac_try) 2>&5
15026   ac_status=$?
15027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15028   (exit $ac_status); }; } &&
15029          { ac_try='test -s conftest$ac_exeext'
15030   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15031   (eval $ac_try) 2>&5
15032   ac_status=$?
15033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15034   (exit $ac_status); }; }; then
15035   ac_cv_lib_nsl_s_main=yes
15036 else
15037   echo "$as_me: failed program was:" >&5
15038 sed 's/^/| /' conftest.$ac_ext >&5
15039
15040 ac_cv_lib_nsl_s_main=no
15041 fi
15042 rm -f conftest.err conftest.$ac_objext \
15043       conftest$ac_exeext conftest.$ac_ext
15044 LIBS=$ac_check_lib_save_LIBS
15045 fi
15046 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_s_main" >&5
15047 echo "${ECHO_T}$ac_cv_lib_nsl_s_main" >&6
15048 if test $ac_cv_lib_nsl_s_main = yes; then
15049   cat >>confdefs.h <<_ACEOF
15050 #define HAVE_LIBNSL_S 1
15051 _ACEOF
15052
15053   LIBS="-lnsl_s $LIBS"
15054
15055 fi
15056
15057
15058 echo "$as_me:$LINENO: checking for main in -lnsl" >&5
15059 echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
15060 if test "${ac_cv_lib_nsl_main+set}" = set; then
15061   echo $ECHO_N "(cached) $ECHO_C" >&6
15062 else
15063   ac_check_lib_save_LIBS=$LIBS
15064 LIBS="-lnsl  $LIBS"
15065 cat >conftest.$ac_ext <<_ACEOF
15066 /* confdefs.h.  */
15067 _ACEOF
15068 cat confdefs.h >>conftest.$ac_ext
15069 cat >>conftest.$ac_ext <<_ACEOF
15070 /* end confdefs.h.  */
15071
15072
15073 int
15074 main ()
15075 {
15076 main ();
15077   ;
15078   return 0;
15079 }
15080 _ACEOF
15081 rm -f conftest.$ac_objext conftest$ac_exeext
15082 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15083   (eval $ac_link) 2>conftest.er1
15084   ac_status=$?
15085   grep -v '^ *+' conftest.er1 >conftest.err
15086   rm -f conftest.er1
15087   cat conftest.err >&5
15088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15089   (exit $ac_status); } &&
15090          { ac_try='test -z "$ac_c_werror_flag"
15091                          || test ! -s conftest.err'
15092   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15093   (eval $ac_try) 2>&5
15094   ac_status=$?
15095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15096   (exit $ac_status); }; } &&
15097          { ac_try='test -s conftest$ac_exeext'
15098   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15099   (eval $ac_try) 2>&5
15100   ac_status=$?
15101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15102   (exit $ac_status); }; }; then
15103   ac_cv_lib_nsl_main=yes
15104 else
15105   echo "$as_me: failed program was:" >&5
15106 sed 's/^/| /' conftest.$ac_ext >&5
15107
15108 ac_cv_lib_nsl_main=no
15109 fi
15110 rm -f conftest.err conftest.$ac_objext \
15111       conftest$ac_exeext conftest.$ac_ext
15112 LIBS=$ac_check_lib_save_LIBS
15113 fi
15114 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
15115 echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
15116 if test $ac_cv_lib_nsl_main = yes; then
15117   cat >>confdefs.h <<_ACEOF
15118 #define HAVE_LIBNSL 1
15119 _ACEOF
15120
15121   LIBS="-lnsl $LIBS"
15122
15123 fi
15124
15125
15126 echo "$as_me:$LINENO: checking for socket in -linet" >&5
15127 echo $ECHO_N "checking for socket in -linet... $ECHO_C" >&6
15128 if test "${ac_cv_lib_inet_socket+set}" = set; then
15129   echo $ECHO_N "(cached) $ECHO_C" >&6
15130 else
15131   ac_check_lib_save_LIBS=$LIBS
15132 LIBS="-linet  $LIBS"
15133 cat >conftest.$ac_ext <<_ACEOF
15134 /* confdefs.h.  */
15135 _ACEOF
15136 cat confdefs.h >>conftest.$ac_ext
15137 cat >>conftest.$ac_ext <<_ACEOF
15138 /* end confdefs.h.  */
15139
15140 /* Override any gcc2 internal prototype to avoid an error.  */
15141 #ifdef __cplusplus
15142 extern "C"
15143 #endif
15144 /* We use char because int might match the return type of a gcc2
15145    builtin and then its argument prototype would still apply.  */
15146 char socket ();
15147 int
15148 main ()
15149 {
15150 socket ();
15151   ;
15152   return 0;
15153 }
15154 _ACEOF
15155 rm -f conftest.$ac_objext conftest$ac_exeext
15156 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15157   (eval $ac_link) 2>conftest.er1
15158   ac_status=$?
15159   grep -v '^ *+' conftest.er1 >conftest.err
15160   rm -f conftest.er1
15161   cat conftest.err >&5
15162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15163   (exit $ac_status); } &&
15164          { ac_try='test -z "$ac_c_werror_flag"
15165                          || test ! -s conftest.err'
15166   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15167   (eval $ac_try) 2>&5
15168   ac_status=$?
15169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15170   (exit $ac_status); }; } &&
15171          { ac_try='test -s conftest$ac_exeext'
15172   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15173   (eval $ac_try) 2>&5
15174   ac_status=$?
15175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15176   (exit $ac_status); }; }; then
15177   ac_cv_lib_inet_socket=yes
15178 else
15179   echo "$as_me: failed program was:" >&5
15180 sed 's/^/| /' conftest.$ac_ext >&5
15181
15182 ac_cv_lib_inet_socket=no
15183 fi
15184 rm -f conftest.err conftest.$ac_objext \
15185       conftest$ac_exeext conftest.$ac_ext
15186 LIBS=$ac_check_lib_save_LIBS
15187 fi
15188 echo "$as_me:$LINENO: result: $ac_cv_lib_inet_socket" >&5
15189 echo "${ECHO_T}$ac_cv_lib_inet_socket" >&6
15190 if test $ac_cv_lib_inet_socket = yes; then
15191   cat >>confdefs.h <<_ACEOF
15192 #define HAVE_LIBINET 1
15193 _ACEOF
15194
15195   LIBS="-linet $LIBS"
15196
15197 fi
15198
15199
15200 echo "$as_me:$LINENO: checking for main in -lgen" >&5
15201 echo $ECHO_N "checking for main in -lgen... $ECHO_C" >&6
15202 if test "${ac_cv_lib_gen_main+set}" = set; then
15203   echo $ECHO_N "(cached) $ECHO_C" >&6
15204 else
15205   ac_check_lib_save_LIBS=$LIBS
15206 LIBS="-lgen  $LIBS"
15207 cat >conftest.$ac_ext <<_ACEOF
15208 /* confdefs.h.  */
15209 _ACEOF
15210 cat confdefs.h >>conftest.$ac_ext
15211 cat >>conftest.$ac_ext <<_ACEOF
15212 /* end confdefs.h.  */
15213
15214
15215 int
15216 main ()
15217 {
15218 main ();
15219   ;
15220   return 0;
15221 }
15222 _ACEOF
15223 rm -f conftest.$ac_objext conftest$ac_exeext
15224 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15225   (eval $ac_link) 2>conftest.er1
15226   ac_status=$?
15227   grep -v '^ *+' conftest.er1 >conftest.err
15228   rm -f conftest.er1
15229   cat conftest.err >&5
15230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15231   (exit $ac_status); } &&
15232          { ac_try='test -z "$ac_c_werror_flag"
15233                          || test ! -s conftest.err'
15234   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15235   (eval $ac_try) 2>&5
15236   ac_status=$?
15237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15238   (exit $ac_status); }; } &&
15239          { ac_try='test -s conftest$ac_exeext'
15240   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15241   (eval $ac_try) 2>&5
15242   ac_status=$?
15243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15244   (exit $ac_status); }; }; then
15245   ac_cv_lib_gen_main=yes
15246 else
15247   echo "$as_me: failed program was:" >&5
15248 sed 's/^/| /' conftest.$ac_ext >&5
15249
15250 ac_cv_lib_gen_main=no
15251 fi
15252 rm -f conftest.err conftest.$ac_objext \
15253       conftest$ac_exeext conftest.$ac_ext
15254 LIBS=$ac_check_lib_save_LIBS
15255 fi
15256 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_main" >&5
15257 echo "${ECHO_T}$ac_cv_lib_gen_main" >&6
15258 if test $ac_cv_lib_gen_main = yes; then
15259   cat >>confdefs.h <<_ACEOF
15260 #define HAVE_LIBGEN 1
15261 _ACEOF
15262
15263   LIBS="-lgen $LIBS"
15264
15265 fi
15266
15267
15268 fi
15269
15270
15271 echo "$as_me:$LINENO: checking for select" >&5
15272 echo $ECHO_N "checking for select... $ECHO_C" >&6
15273 if test "${ac_cv_func_select+set}" = set; then
15274   echo $ECHO_N "(cached) $ECHO_C" >&6
15275 else
15276   cat >conftest.$ac_ext <<_ACEOF
15277 /* confdefs.h.  */
15278 _ACEOF
15279 cat confdefs.h >>conftest.$ac_ext
15280 cat >>conftest.$ac_ext <<_ACEOF
15281 /* end confdefs.h.  */
15282 /* Define select to an innocuous variant, in case <limits.h> declares select.
15283    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15284 #define select innocuous_select
15285
15286 /* System header to define __stub macros and hopefully few prototypes,
15287     which can conflict with char select (); below.
15288     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15289     <limits.h> exists even on freestanding compilers.  */
15290
15291 #ifdef __STDC__
15292 # include <limits.h>
15293 #else
15294 # include <assert.h>
15295 #endif
15296
15297 #undef select
15298
15299 /* Override any gcc2 internal prototype to avoid an error.  */
15300 #ifdef __cplusplus
15301 extern "C"
15302 {
15303 #endif
15304 /* We use char because int might match the return type of a gcc2
15305    builtin and then its argument prototype would still apply.  */
15306 char select ();
15307 /* The GNU C library defines this for functions which it implements
15308     to always fail with ENOSYS.  Some functions are actually named
15309     something starting with __ and the normal name is an alias.  */
15310 #if defined (__stub_select) || defined (__stub___select)
15311 choke me
15312 #else
15313 char (*f) () = select;
15314 #endif
15315 #ifdef __cplusplus
15316 }
15317 #endif
15318
15319 int
15320 main ()
15321 {
15322 return f != select;
15323   ;
15324   return 0;
15325 }
15326 _ACEOF
15327 rm -f conftest.$ac_objext conftest$ac_exeext
15328 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15329   (eval $ac_link) 2>conftest.er1
15330   ac_status=$?
15331   grep -v '^ *+' conftest.er1 >conftest.err
15332   rm -f conftest.er1
15333   cat conftest.err >&5
15334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15335   (exit $ac_status); } &&
15336          { ac_try='test -z "$ac_c_werror_flag"
15337                          || test ! -s conftest.err'
15338   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15339   (eval $ac_try) 2>&5
15340   ac_status=$?
15341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15342   (exit $ac_status); }; } &&
15343          { ac_try='test -s conftest$ac_exeext'
15344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15345   (eval $ac_try) 2>&5
15346   ac_status=$?
15347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15348   (exit $ac_status); }; }; then
15349   ac_cv_func_select=yes
15350 else
15351   echo "$as_me: failed program was:" >&5
15352 sed 's/^/| /' conftest.$ac_ext >&5
15353
15354 ac_cv_func_select=no
15355 fi
15356 rm -f conftest.err conftest.$ac_objext \
15357       conftest$ac_exeext conftest.$ac_ext
15358 fi
15359 echo "$as_me:$LINENO: result: $ac_cv_func_select" >&5
15360 echo "${ECHO_T}$ac_cv_func_select" >&6
15361 if test $ac_cv_func_select = yes; then
15362   :
15363 else
15364   { { echo "$as_me:$LINENO: error: select() required." >&5
15365 echo "$as_me: error: select() required." >&2;}
15366    { (exit 1); exit 1; }; }
15367 fi
15368
15369
15370 if test "${ac_cv_header_winsock_h}" != yes; then
15371
15372
15373 for ac_header in sys/select.h sys/socket.h
15374 do
15375 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15376 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15377   echo "$as_me:$LINENO: checking for $ac_header" >&5
15378 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15379 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15380   echo $ECHO_N "(cached) $ECHO_C" >&6
15381 fi
15382 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15383 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15384 else
15385   # Is the header compilable?
15386 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15387 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15388 cat >conftest.$ac_ext <<_ACEOF
15389 /* confdefs.h.  */
15390 _ACEOF
15391 cat confdefs.h >>conftest.$ac_ext
15392 cat >>conftest.$ac_ext <<_ACEOF
15393 /* end confdefs.h.  */
15394 $ac_includes_default
15395 #include <$ac_header>
15396 _ACEOF
15397 rm -f conftest.$ac_objext
15398 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15399   (eval $ac_compile) 2>conftest.er1
15400   ac_status=$?
15401   grep -v '^ *+' conftest.er1 >conftest.err
15402   rm -f conftest.er1
15403   cat conftest.err >&5
15404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15405   (exit $ac_status); } &&
15406          { ac_try='test -z "$ac_c_werror_flag"
15407                          || test ! -s conftest.err'
15408   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15409   (eval $ac_try) 2>&5
15410   ac_status=$?
15411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15412   (exit $ac_status); }; } &&
15413          { ac_try='test -s conftest.$ac_objext'
15414   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15415   (eval $ac_try) 2>&5
15416   ac_status=$?
15417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15418   (exit $ac_status); }; }; then
15419   ac_header_compiler=yes
15420 else
15421   echo "$as_me: failed program was:" >&5
15422 sed 's/^/| /' conftest.$ac_ext >&5
15423
15424 ac_header_compiler=no
15425 fi
15426 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15427 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15428 echo "${ECHO_T}$ac_header_compiler" >&6
15429
15430 # Is the header present?
15431 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15432 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15433 cat >conftest.$ac_ext <<_ACEOF
15434 /* confdefs.h.  */
15435 _ACEOF
15436 cat confdefs.h >>conftest.$ac_ext
15437 cat >>conftest.$ac_ext <<_ACEOF
15438 /* end confdefs.h.  */
15439 #include <$ac_header>
15440 _ACEOF
15441 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15442   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15443   ac_status=$?
15444   grep -v '^ *+' conftest.er1 >conftest.err
15445   rm -f conftest.er1
15446   cat conftest.err >&5
15447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15448   (exit $ac_status); } >/dev/null; then
15449   if test -s conftest.err; then
15450     ac_cpp_err=$ac_c_preproc_warn_flag
15451     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15452   else
15453     ac_cpp_err=
15454   fi
15455 else
15456   ac_cpp_err=yes
15457 fi
15458 if test -z "$ac_cpp_err"; then
15459   ac_header_preproc=yes
15460 else
15461   echo "$as_me: failed program was:" >&5
15462 sed 's/^/| /' conftest.$ac_ext >&5
15463
15464   ac_header_preproc=no
15465 fi
15466 rm -f conftest.err conftest.$ac_ext
15467 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15468 echo "${ECHO_T}$ac_header_preproc" >&6
15469
15470 # So?  What about this header?
15471 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15472   yes:no: )
15473     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15474 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15475     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15476 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15477     ac_header_preproc=yes
15478     ;;
15479   no:yes:* )
15480     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15481 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15482     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15483 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15484     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15485 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15486     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15487 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15488     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15489 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15490     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15491 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15492     (
15493       cat <<\_ASBOX
15494 ## --------------------------------------------- ##
15495 ## Report this to <http://www.openldap.org/its/> ##
15496 ## --------------------------------------------- ##
15497 _ASBOX
15498     ) |
15499       sed "s/^/$as_me: WARNING:     /" >&2
15500     ;;
15501 esac
15502 echo "$as_me:$LINENO: checking for $ac_header" >&5
15503 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15504 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15505   echo $ECHO_N "(cached) $ECHO_C" >&6
15506 else
15507   eval "$as_ac_Header=\$ac_header_preproc"
15508 fi
15509 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15510 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15511
15512 fi
15513 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15514   cat >>confdefs.h <<_ACEOF
15515 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15516 _ACEOF
15517
15518 fi
15519
15520 done
15521
15522 echo "$as_me:$LINENO: checking types of arguments for select" >&5
15523 echo $ECHO_N "checking types of arguments for select... $ECHO_C" >&6
15524 if test "${ac_cv_func_select_args+set}" = set; then
15525   echo $ECHO_N "(cached) $ECHO_C" >&6
15526 else
15527   for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
15528  for ac_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
15529   for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
15530    cat >conftest.$ac_ext <<_ACEOF
15531 /* confdefs.h.  */
15532 _ACEOF
15533 cat confdefs.h >>conftest.$ac_ext
15534 cat >>conftest.$ac_ext <<_ACEOF
15535 /* end confdefs.h.  */
15536 $ac_includes_default
15537 #if HAVE_SYS_SELECT_H
15538 # include <sys/select.h>
15539 #endif
15540 #if HAVE_SYS_SOCKET_H
15541 # include <sys/socket.h>
15542 #endif
15543
15544 int
15545 main ()
15546 {
15547 extern int select ($ac_arg1,
15548                                             $ac_arg234, $ac_arg234, $ac_arg234,
15549                                             $ac_arg5);
15550   ;
15551   return 0;
15552 }
15553 _ACEOF
15554 rm -f conftest.$ac_objext
15555 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15556   (eval $ac_compile) 2>conftest.er1
15557   ac_status=$?
15558   grep -v '^ *+' conftest.er1 >conftest.err
15559   rm -f conftest.er1
15560   cat conftest.err >&5
15561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15562   (exit $ac_status); } &&
15563          { ac_try='test -z "$ac_c_werror_flag"
15564                          || test ! -s conftest.err'
15565   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15566   (eval $ac_try) 2>&5
15567   ac_status=$?
15568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15569   (exit $ac_status); }; } &&
15570          { ac_try='test -s conftest.$ac_objext'
15571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15572   (eval $ac_try) 2>&5
15573   ac_status=$?
15574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15575   (exit $ac_status); }; }; then
15576   ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
15577 else
15578   echo "$as_me: failed program was:" >&5
15579 sed 's/^/| /' conftest.$ac_ext >&5
15580
15581 fi
15582 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15583   done
15584  done
15585 done
15586 # Provide a safe default value.
15587 : ${ac_cv_func_select_args='int,int *,struct timeval *'}
15588
15589 fi
15590 echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5
15591 echo "${ECHO_T}$ac_cv_func_select_args" >&6
15592 ac_save_IFS=$IFS; IFS=','
15593 set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
15594 IFS=$ac_save_IFS
15595 shift
15596
15597 cat >>confdefs.h <<_ACEOF
15598 #define SELECT_TYPE_ARG1 $1
15599 _ACEOF
15600
15601
15602 cat >>confdefs.h <<_ACEOF
15603 #define SELECT_TYPE_ARG234 ($2)
15604 _ACEOF
15605
15606
15607 cat >>confdefs.h <<_ACEOF
15608 #define SELECT_TYPE_ARG5 ($3)
15609 _ACEOF
15610
15611 rm -f conftest*
15612
15613 fi
15614
15615
15616
15617 for ac_func in poll
15618 do
15619 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15620 echo "$as_me:$LINENO: checking for $ac_func" >&5
15621 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15622 if eval "test \"\${$as_ac_var+set}\" = set"; then
15623   echo $ECHO_N "(cached) $ECHO_C" >&6
15624 else
15625   cat >conftest.$ac_ext <<_ACEOF
15626 /* confdefs.h.  */
15627 _ACEOF
15628 cat confdefs.h >>conftest.$ac_ext
15629 cat >>conftest.$ac_ext <<_ACEOF
15630 /* end confdefs.h.  */
15631 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15632    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15633 #define $ac_func innocuous_$ac_func
15634
15635 /* System header to define __stub macros and hopefully few prototypes,
15636     which can conflict with char $ac_func (); below.
15637     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15638     <limits.h> exists even on freestanding compilers.  */
15639
15640 #ifdef __STDC__
15641 # include <limits.h>
15642 #else
15643 # include <assert.h>
15644 #endif
15645
15646 #undef $ac_func
15647
15648 /* Override any gcc2 internal prototype to avoid an error.  */
15649 #ifdef __cplusplus
15650 extern "C"
15651 {
15652 #endif
15653 /* We use char because int might match the return type of a gcc2
15654    builtin and then its argument prototype would still apply.  */
15655 char $ac_func ();
15656 /* The GNU C library defines this for functions which it implements
15657     to always fail with ENOSYS.  Some functions are actually named
15658     something starting with __ and the normal name is an alias.  */
15659 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15660 choke me
15661 #else
15662 char (*f) () = $ac_func;
15663 #endif
15664 #ifdef __cplusplus
15665 }
15666 #endif
15667
15668 int
15669 main ()
15670 {
15671 return f != $ac_func;
15672   ;
15673   return 0;
15674 }
15675 _ACEOF
15676 rm -f conftest.$ac_objext conftest$ac_exeext
15677 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15678   (eval $ac_link) 2>conftest.er1
15679   ac_status=$?
15680   grep -v '^ *+' conftest.er1 >conftest.err
15681   rm -f conftest.er1
15682   cat conftest.err >&5
15683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15684   (exit $ac_status); } &&
15685          { ac_try='test -z "$ac_c_werror_flag"
15686                          || test ! -s conftest.err'
15687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15688   (eval $ac_try) 2>&5
15689   ac_status=$?
15690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15691   (exit $ac_status); }; } &&
15692          { ac_try='test -s conftest$ac_exeext'
15693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15694   (eval $ac_try) 2>&5
15695   ac_status=$?
15696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15697   (exit $ac_status); }; }; then
15698   eval "$as_ac_var=yes"
15699 else
15700   echo "$as_me: failed program was:" >&5
15701 sed 's/^/| /' conftest.$ac_ext >&5
15702
15703 eval "$as_ac_var=no"
15704 fi
15705 rm -f conftest.err conftest.$ac_objext \
15706       conftest$ac_exeext conftest.$ac_ext
15707 fi
15708 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15709 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15710 if test `eval echo '${'$as_ac_var'}'` = yes; then
15711   cat >>confdefs.h <<_ACEOF
15712 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15713 _ACEOF
15714
15715 fi
15716 done
15717
15718
15719 for ac_header in poll.h
15720 do
15721 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15722 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15723   echo "$as_me:$LINENO: checking for $ac_header" >&5
15724 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15725 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15726   echo $ECHO_N "(cached) $ECHO_C" >&6
15727 fi
15728 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15729 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15730 else
15731   # Is the header compilable?
15732 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15733 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15734 cat >conftest.$ac_ext <<_ACEOF
15735 /* confdefs.h.  */
15736 _ACEOF
15737 cat confdefs.h >>conftest.$ac_ext
15738 cat >>conftest.$ac_ext <<_ACEOF
15739 /* end confdefs.h.  */
15740 $ac_includes_default
15741 #include <$ac_header>
15742 _ACEOF
15743 rm -f conftest.$ac_objext
15744 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15745   (eval $ac_compile) 2>conftest.er1
15746   ac_status=$?
15747   grep -v '^ *+' conftest.er1 >conftest.err
15748   rm -f conftest.er1
15749   cat conftest.err >&5
15750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15751   (exit $ac_status); } &&
15752          { ac_try='test -z "$ac_c_werror_flag"
15753                          || test ! -s conftest.err'
15754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15755   (eval $ac_try) 2>&5
15756   ac_status=$?
15757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15758   (exit $ac_status); }; } &&
15759          { ac_try='test -s conftest.$ac_objext'
15760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15761   (eval $ac_try) 2>&5
15762   ac_status=$?
15763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15764   (exit $ac_status); }; }; then
15765   ac_header_compiler=yes
15766 else
15767   echo "$as_me: failed program was:" >&5
15768 sed 's/^/| /' conftest.$ac_ext >&5
15769
15770 ac_header_compiler=no
15771 fi
15772 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15773 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15774 echo "${ECHO_T}$ac_header_compiler" >&6
15775
15776 # Is the header present?
15777 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15778 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15779 cat >conftest.$ac_ext <<_ACEOF
15780 /* confdefs.h.  */
15781 _ACEOF
15782 cat confdefs.h >>conftest.$ac_ext
15783 cat >>conftest.$ac_ext <<_ACEOF
15784 /* end confdefs.h.  */
15785 #include <$ac_header>
15786 _ACEOF
15787 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15788   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15789   ac_status=$?
15790   grep -v '^ *+' conftest.er1 >conftest.err
15791   rm -f conftest.er1
15792   cat conftest.err >&5
15793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15794   (exit $ac_status); } >/dev/null; then
15795   if test -s conftest.err; then
15796     ac_cpp_err=$ac_c_preproc_warn_flag
15797     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15798   else
15799     ac_cpp_err=
15800   fi
15801 else
15802   ac_cpp_err=yes
15803 fi
15804 if test -z "$ac_cpp_err"; then
15805   ac_header_preproc=yes
15806 else
15807   echo "$as_me: failed program was:" >&5
15808 sed 's/^/| /' conftest.$ac_ext >&5
15809
15810   ac_header_preproc=no
15811 fi
15812 rm -f conftest.err conftest.$ac_ext
15813 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15814 echo "${ECHO_T}$ac_header_preproc" >&6
15815
15816 # So?  What about this header?
15817 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15818   yes:no: )
15819     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15820 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15821     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15822 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15823     ac_header_preproc=yes
15824     ;;
15825   no:yes:* )
15826     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15827 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15828     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15829 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15830     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15831 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15832     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15833 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15834     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15835 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15836     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15837 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15838     (
15839       cat <<\_ASBOX
15840 ## --------------------------------------------- ##
15841 ## Report this to <http://www.openldap.org/its/> ##
15842 ## --------------------------------------------- ##
15843 _ASBOX
15844     ) |
15845       sed "s/^/$as_me: WARNING:     /" >&2
15846     ;;
15847 esac
15848 echo "$as_me:$LINENO: checking for $ac_header" >&5
15849 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15850 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15851   echo $ECHO_N "(cached) $ECHO_C" >&6
15852 else
15853   eval "$as_ac_Header=\$ac_header_preproc"
15854 fi
15855 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15856 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15857
15858 fi
15859 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15860   cat >>confdefs.h <<_ACEOF
15861 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15862 _ACEOF
15863
15864 fi
15865
15866 done
15867
15868
15869
15870 for ac_header in sys/epoll.h
15871 do
15872 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15873 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15874   echo "$as_me:$LINENO: checking for $ac_header" >&5
15875 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15876 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15877   echo $ECHO_N "(cached) $ECHO_C" >&6
15878 fi
15879 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15880 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15881 else
15882   # Is the header compilable?
15883 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15884 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15885 cat >conftest.$ac_ext <<_ACEOF
15886 /* confdefs.h.  */
15887 _ACEOF
15888 cat confdefs.h >>conftest.$ac_ext
15889 cat >>conftest.$ac_ext <<_ACEOF
15890 /* end confdefs.h.  */
15891 $ac_includes_default
15892 #include <$ac_header>
15893 _ACEOF
15894 rm -f conftest.$ac_objext
15895 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15896   (eval $ac_compile) 2>conftest.er1
15897   ac_status=$?
15898   grep -v '^ *+' conftest.er1 >conftest.err
15899   rm -f conftest.er1
15900   cat conftest.err >&5
15901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15902   (exit $ac_status); } &&
15903          { ac_try='test -z "$ac_c_werror_flag"
15904                          || test ! -s conftest.err'
15905   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15906   (eval $ac_try) 2>&5
15907   ac_status=$?
15908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15909   (exit $ac_status); }; } &&
15910          { ac_try='test -s conftest.$ac_objext'
15911   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15912   (eval $ac_try) 2>&5
15913   ac_status=$?
15914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15915   (exit $ac_status); }; }; then
15916   ac_header_compiler=yes
15917 else
15918   echo "$as_me: failed program was:" >&5
15919 sed 's/^/| /' conftest.$ac_ext >&5
15920
15921 ac_header_compiler=no
15922 fi
15923 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15924 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15925 echo "${ECHO_T}$ac_header_compiler" >&6
15926
15927 # Is the header present?
15928 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15929 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15930 cat >conftest.$ac_ext <<_ACEOF
15931 /* confdefs.h.  */
15932 _ACEOF
15933 cat confdefs.h >>conftest.$ac_ext
15934 cat >>conftest.$ac_ext <<_ACEOF
15935 /* end confdefs.h.  */
15936 #include <$ac_header>
15937 _ACEOF
15938 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15939   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15940   ac_status=$?
15941   grep -v '^ *+' conftest.er1 >conftest.err
15942   rm -f conftest.er1
15943   cat conftest.err >&5
15944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15945   (exit $ac_status); } >/dev/null; then
15946   if test -s conftest.err; then
15947     ac_cpp_err=$ac_c_preproc_warn_flag
15948     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15949   else
15950     ac_cpp_err=
15951   fi
15952 else
15953   ac_cpp_err=yes
15954 fi
15955 if test -z "$ac_cpp_err"; then
15956   ac_header_preproc=yes
15957 else
15958   echo "$as_me: failed program was:" >&5
15959 sed 's/^/| /' conftest.$ac_ext >&5
15960
15961   ac_header_preproc=no
15962 fi
15963 rm -f conftest.err conftest.$ac_ext
15964 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15965 echo "${ECHO_T}$ac_header_preproc" >&6
15966
15967 # So?  What about this header?
15968 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15969   yes:no: )
15970     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15971 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15972     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15973 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15974     ac_header_preproc=yes
15975     ;;
15976   no:yes:* )
15977     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15978 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15979     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15980 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15981     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15982 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15983     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15984 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15985     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15986 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15987     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15988 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15989     (
15990       cat <<\_ASBOX
15991 ## --------------------------------------------- ##
15992 ## Report this to <http://www.openldap.org/its/> ##
15993 ## --------------------------------------------- ##
15994 _ASBOX
15995     ) |
15996       sed "s/^/$as_me: WARNING:     /" >&2
15997     ;;
15998 esac
15999 echo "$as_me:$LINENO: checking for $ac_header" >&5
16000 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16001 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16002   echo $ECHO_N "(cached) $ECHO_C" >&6
16003 else
16004   eval "$as_ac_Header=\$ac_header_preproc"
16005 fi
16006 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16007 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16008
16009 fi
16010 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16011   cat >>confdefs.h <<_ACEOF
16012 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16013 _ACEOF
16014
16015 fi
16016
16017 done
16018
16019 if test "${ac_cv_header_sys_epoll_h}" = yes; then
16020 echo "$as_me:$LINENO: checking for epoll system call" >&5
16021 echo $ECHO_N "checking for epoll system call... $ECHO_C" >&6
16022 if test "$cross_compiling" = yes; then
16023   echo "$as_me:$LINENO: result: no" >&5
16024 echo "${ECHO_T}no" >&6
16025 else
16026   cat >conftest.$ac_ext <<_ACEOF
16027 /* confdefs.h.  */
16028 _ACEOF
16029 cat confdefs.h >>conftest.$ac_ext
16030 cat >>conftest.$ac_ext <<_ACEOF
16031 /* end confdefs.h.  */
16032 int main(int argc, char *argv)
16033 {
16034         int epfd = epoll_create(256);
16035         exit (epfd == -1 ? 1 : 0);
16036 }
16037 _ACEOF
16038 rm -f conftest$ac_exeext
16039 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16040   (eval $ac_link) 2>&5
16041   ac_status=$?
16042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16043   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16045   (eval $ac_try) 2>&5
16046   ac_status=$?
16047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16048   (exit $ac_status); }; }; then
16049   echo "$as_me:$LINENO: result: yes" >&5
16050 echo "${ECHO_T}yes" >&6
16051
16052 cat >>confdefs.h <<\_ACEOF
16053 #define HAVE_EPOLL 1
16054 _ACEOF
16055
16056 else
16057   echo "$as_me: program exited with status $ac_status" >&5
16058 echo "$as_me: failed program was:" >&5
16059 sed 's/^/| /' conftest.$ac_ext >&5
16060
16061 ( exit $ac_status )
16062 echo "$as_me:$LINENO: result: no" >&5
16063 echo "${ECHO_T}no" >&6
16064 fi
16065 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16066 fi
16067 fi
16068
16069 # strerror checks
16070 echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5
16071 echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6
16072 if test "${ol_cv_dcl_sys_errlist+set}" = set; then
16073   echo $ECHO_N "(cached) $ECHO_C" >&6
16074 else
16075
16076         cat >conftest.$ac_ext <<_ACEOF
16077 /* confdefs.h.  */
16078 _ACEOF
16079 cat confdefs.h >>conftest.$ac_ext
16080 cat >>conftest.$ac_ext <<_ACEOF
16081 /* end confdefs.h.  */
16082
16083 #include <stdio.h>
16084 #include <sys/types.h>
16085 #include <errno.h>
16086 #ifdef WINNT
16087 #include <stdlib.h>
16088 #endif
16089 int
16090 main ()
16091 {
16092 char *c = (char *) *sys_errlist
16093   ;
16094   return 0;
16095 }
16096 _ACEOF
16097 rm -f conftest.$ac_objext
16098 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16099   (eval $ac_compile) 2>conftest.er1
16100   ac_status=$?
16101   grep -v '^ *+' conftest.er1 >conftest.err
16102   rm -f conftest.er1
16103   cat conftest.err >&5
16104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16105   (exit $ac_status); } &&
16106          { ac_try='test -z "$ac_c_werror_flag"
16107                          || test ! -s conftest.err'
16108   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16109   (eval $ac_try) 2>&5
16110   ac_status=$?
16111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16112   (exit $ac_status); }; } &&
16113          { ac_try='test -s conftest.$ac_objext'
16114   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16115   (eval $ac_try) 2>&5
16116   ac_status=$?
16117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16118   (exit $ac_status); }; }; then
16119   ol_cv_dcl_sys_errlist=yes
16120         ol_cv_have_sys_errlist=yes
16121 else
16122   echo "$as_me: failed program was:" >&5
16123 sed 's/^/| /' conftest.$ac_ext >&5
16124
16125 ol_cv_dcl_sys_errlist=no
16126 fi
16127 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16128 fi
16129 echo "$as_me:$LINENO: result: $ol_cv_dcl_sys_errlist" >&5
16130 echo "${ECHO_T}$ol_cv_dcl_sys_errlist" >&6
16131 #
16132 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16133 if test $ol_cv_dcl_sys_errlist = no ; then
16134
16135 cat >>confdefs.h <<\_ACEOF
16136 #define DECL_SYS_ERRLIST 1
16137 _ACEOF
16138
16139
16140         echo "$as_me:$LINENO: checking existence of sys_errlist" >&5
16141 echo $ECHO_N "checking existence of sys_errlist... $ECHO_C" >&6
16142 if test "${ol_cv_have_sys_errlist+set}" = set; then
16143   echo $ECHO_N "(cached) $ECHO_C" >&6
16144 else
16145
16146                 cat >conftest.$ac_ext <<_ACEOF
16147 /* confdefs.h.  */
16148 _ACEOF
16149 cat confdefs.h >>conftest.$ac_ext
16150 cat >>conftest.$ac_ext <<_ACEOF
16151 /* end confdefs.h.  */
16152 #include <errno.h>
16153 int
16154 main ()
16155 {
16156 char *c = (char *) *sys_errlist
16157   ;
16158   return 0;
16159 }
16160 _ACEOF
16161 rm -f conftest.$ac_objext conftest$ac_exeext
16162 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16163   (eval $ac_link) 2>conftest.er1
16164   ac_status=$?
16165   grep -v '^ *+' conftest.er1 >conftest.err
16166   rm -f conftest.er1
16167   cat conftest.err >&5
16168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16169   (exit $ac_status); } &&
16170          { ac_try='test -z "$ac_c_werror_flag"
16171                          || test ! -s conftest.err'
16172   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16173   (eval $ac_try) 2>&5
16174   ac_status=$?
16175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16176   (exit $ac_status); }; } &&
16177          { ac_try='test -s conftest$ac_exeext'
16178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16179   (eval $ac_try) 2>&5
16180   ac_status=$?
16181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16182   (exit $ac_status); }; }; then
16183   ol_cv_have_sys_errlist=yes
16184 else
16185   echo "$as_me: failed program was:" >&5
16186 sed 's/^/| /' conftest.$ac_ext >&5
16187
16188 ol_cv_have_sys_errlist=no
16189 fi
16190 rm -f conftest.err conftest.$ac_objext \
16191       conftest$ac_exeext conftest.$ac_ext
16192 fi
16193 echo "$as_me:$LINENO: result: $ol_cv_have_sys_errlist" >&5
16194 echo "${ECHO_T}$ol_cv_have_sys_errlist" >&6
16195 fi
16196 if test $ol_cv_have_sys_errlist = yes ; then
16197
16198 cat >>confdefs.h <<\_ACEOF
16199 #define HAVE_SYS_ERRLIST 1
16200 _ACEOF
16201
16202 fi
16203
16204
16205 for ac_func in strerror strerror_r
16206 do
16207 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16208 echo "$as_me:$LINENO: checking for $ac_func" >&5
16209 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16210 if eval "test \"\${$as_ac_var+set}\" = set"; then
16211   echo $ECHO_N "(cached) $ECHO_C" >&6
16212 else
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 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16220    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16221 #define $ac_func innocuous_$ac_func
16222
16223 /* System header to define __stub macros and hopefully few prototypes,
16224     which can conflict with char $ac_func (); below.
16225     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16226     <limits.h> exists even on freestanding compilers.  */
16227
16228 #ifdef __STDC__
16229 # include <limits.h>
16230 #else
16231 # include <assert.h>
16232 #endif
16233
16234 #undef $ac_func
16235
16236 /* Override any gcc2 internal prototype to avoid an error.  */
16237 #ifdef __cplusplus
16238 extern "C"
16239 {
16240 #endif
16241 /* We use char because int might match the return type of a gcc2
16242    builtin and then its argument prototype would still apply.  */
16243 char $ac_func ();
16244 /* The GNU C library defines this for functions which it implements
16245     to always fail with ENOSYS.  Some functions are actually named
16246     something starting with __ and the normal name is an alias.  */
16247 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16248 choke me
16249 #else
16250 char (*f) () = $ac_func;
16251 #endif
16252 #ifdef __cplusplus
16253 }
16254 #endif
16255
16256 int
16257 main ()
16258 {
16259 return f != $ac_func;
16260   ;
16261   return 0;
16262 }
16263 _ACEOF
16264 rm -f conftest.$ac_objext conftest$ac_exeext
16265 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16266   (eval $ac_link) 2>conftest.er1
16267   ac_status=$?
16268   grep -v '^ *+' conftest.er1 >conftest.err
16269   rm -f conftest.er1
16270   cat conftest.err >&5
16271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16272   (exit $ac_status); } &&
16273          { ac_try='test -z "$ac_c_werror_flag"
16274                          || test ! -s conftest.err'
16275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16276   (eval $ac_try) 2>&5
16277   ac_status=$?
16278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16279   (exit $ac_status); }; } &&
16280          { ac_try='test -s conftest$ac_exeext'
16281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16282   (eval $ac_try) 2>&5
16283   ac_status=$?
16284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16285   (exit $ac_status); }; }; then
16286   eval "$as_ac_var=yes"
16287 else
16288   echo "$as_me: failed program was:" >&5
16289 sed 's/^/| /' conftest.$ac_ext >&5
16290
16291 eval "$as_ac_var=no"
16292 fi
16293 rm -f conftest.err conftest.$ac_objext \
16294       conftest$ac_exeext conftest.$ac_ext
16295 fi
16296 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16297 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16298 if test `eval echo '${'$as_ac_var'}'` = yes; then
16299   cat >>confdefs.h <<_ACEOF
16300 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16301 _ACEOF
16302
16303 fi
16304 done
16305
16306 ol_cv_func_strerror_r=no
16307 if test "${ac_cv_func_strerror_r}" = yes ; then
16308         echo "$as_me:$LINENO: checking non-posix strerror_r" >&5
16309 echo $ECHO_N "checking non-posix strerror_r... $ECHO_C" >&6
16310 if test "${ol_cv_nonposix_strerror_r+set}" = set; then
16311   echo $ECHO_N "(cached) $ECHO_C" >&6
16312 else
16313
16314         cat >conftest.$ac_ext <<_ACEOF
16315 /* confdefs.h.  */
16316 _ACEOF
16317 cat confdefs.h >>conftest.$ac_ext
16318 cat >>conftest.$ac_ext <<_ACEOF
16319 /* end confdefs.h.  */
16320 #include <string.h>
16321 _ACEOF
16322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16323   $EGREP "strerror_r" >/dev/null 2>&1; then
16324   ol_decl_strerror_r=yes
16325 else
16326   ol_decl_strerror_r=no
16327 fi
16328 rm -f conftest*
16329
16330         if test $ol_decl_strerror_r = yes ; then
16331                 cat >conftest.$ac_ext <<_ACEOF
16332 /* confdefs.h.  */
16333 _ACEOF
16334 cat confdefs.h >>conftest.$ac_ext
16335 cat >>conftest.$ac_ext <<_ACEOF
16336 /* end confdefs.h.  */
16337 #include <string.h>
16338 int
16339 main ()
16340 {
16341    /* from autoconf 2.59 */
16342                                 char buf[100];
16343                                 char x = *strerror_r (0, buf, sizeof buf);
16344                                 char *p = strerror_r (0, buf, sizeof buf);
16345
16346   ;
16347   return 0;
16348 }
16349 _ACEOF
16350 rm -f conftest.$ac_objext
16351 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16352   (eval $ac_compile) 2>conftest.er1
16353   ac_status=$?
16354   grep -v '^ *+' conftest.er1 >conftest.err
16355   rm -f conftest.er1
16356   cat conftest.err >&5
16357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16358   (exit $ac_status); } &&
16359          { ac_try='test -z "$ac_c_werror_flag"
16360                          || test ! -s conftest.err'
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); }; } &&
16366          { ac_try='test -s conftest.$ac_objext'
16367   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16368   (eval $ac_try) 2>&5
16369   ac_status=$?
16370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16371   (exit $ac_status); }; }; then
16372   ol_cv_nonposix_strerror_r=yes
16373 else
16374   echo "$as_me: failed program was:" >&5
16375 sed 's/^/| /' conftest.$ac_ext >&5
16376
16377 ol_cv_nonposix_strerror_r=no
16378 fi
16379 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16380         else
16381                 if test "$cross_compiling" = yes; then
16382   ol_cv_nonposix_strerror=no
16383 else
16384   cat >conftest.$ac_ext <<_ACEOF
16385 /* confdefs.h.  */
16386 _ACEOF
16387 cat confdefs.h >>conftest.$ac_ext
16388 cat >>conftest.$ac_ext <<_ACEOF
16389 /* end confdefs.h.  */
16390
16391                         main() {
16392                                 char buf[100];
16393                                 buf[0] = 0;
16394                                 strerror_r( 1, buf, sizeof buf );
16395                                 exit( buf[0] == 0 );
16396                         }
16397
16398 _ACEOF
16399 rm -f conftest$ac_exeext
16400 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16401   (eval $ac_link) 2>&5
16402   ac_status=$?
16403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16404   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16405   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16406   (eval $ac_try) 2>&5
16407   ac_status=$?
16408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16409   (exit $ac_status); }; }; then
16410   ol_cv_nonposix_strerror_r=yes
16411 else
16412   echo "$as_me: program exited with status $ac_status" >&5
16413 echo "$as_me: failed program was:" >&5
16414 sed 's/^/| /' conftest.$ac_ext >&5
16415
16416 ( exit $ac_status )
16417 ol_cv_nonposix_strerror=no
16418 fi
16419 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16420 fi
16421         fi
16422
16423 fi
16424 echo "$as_me:$LINENO: result: $ol_cv_nonposix_strerror_r" >&5
16425 echo "${ECHO_T}$ol_cv_nonposix_strerror_r" >&6
16426 if test $ol_cv_nonposix_strerror_r = yes ; then
16427
16428 cat >>confdefs.h <<\_ACEOF
16429 #define HAVE_NONPOSIX_STRERROR_R 1
16430 _ACEOF
16431
16432 fi
16433
16434 elif test "${ac_cv_func_strerror}" = no ; then
16435         echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5
16436 echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6
16437 if test "${ol_cv_dcl_sys_errlist+set}" = set; then
16438   echo $ECHO_N "(cached) $ECHO_C" >&6
16439 else
16440
16441         cat >conftest.$ac_ext <<_ACEOF
16442 /* confdefs.h.  */
16443 _ACEOF
16444 cat confdefs.h >>conftest.$ac_ext
16445 cat >>conftest.$ac_ext <<_ACEOF
16446 /* end confdefs.h.  */
16447
16448 #include <stdio.h>
16449 #include <sys/types.h>
16450 #include <errno.h>
16451 #ifdef WINNT
16452 #include <stdlib.h>
16453 #endif
16454 int
16455 main ()
16456 {
16457 char *c = (char *) *sys_errlist
16458   ;
16459   return 0;
16460 }
16461 _ACEOF
16462 rm -f conftest.$ac_objext
16463 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16464   (eval $ac_compile) 2>conftest.er1
16465   ac_status=$?
16466   grep -v '^ *+' conftest.er1 >conftest.err
16467   rm -f conftest.er1
16468   cat conftest.err >&5
16469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16470   (exit $ac_status); } &&
16471          { ac_try='test -z "$ac_c_werror_flag"
16472                          || test ! -s conftest.err'
16473   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16474   (eval $ac_try) 2>&5
16475   ac_status=$?
16476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16477   (exit $ac_status); }; } &&
16478          { ac_try='test -s conftest.$ac_objext'
16479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16480   (eval $ac_try) 2>&5
16481   ac_status=$?
16482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16483   (exit $ac_status); }; }; then
16484   ol_cv_dcl_sys_errlist=yes
16485         ol_cv_have_sys_errlist=yes
16486 else
16487   echo "$as_me: failed program was:" >&5
16488 sed 's/^/| /' conftest.$ac_ext >&5
16489
16490 ol_cv_dcl_sys_errlist=no
16491 fi
16492 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16493 fi
16494 echo "$as_me:$LINENO: result: $ol_cv_dcl_sys_errlist" >&5
16495 echo "${ECHO_T}$ol_cv_dcl_sys_errlist" >&6
16496 #
16497 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16498 if test $ol_cv_dcl_sys_errlist = no ; then
16499
16500 cat >>confdefs.h <<\_ACEOF
16501 #define DECL_SYS_ERRLIST 1
16502 _ACEOF
16503
16504
16505         echo "$as_me:$LINENO: checking existence of sys_errlist" >&5
16506 echo $ECHO_N "checking existence of sys_errlist... $ECHO_C" >&6
16507 if test "${ol_cv_have_sys_errlist+set}" = set; then
16508   echo $ECHO_N "(cached) $ECHO_C" >&6
16509 else
16510
16511                 cat >conftest.$ac_ext <<_ACEOF
16512 /* confdefs.h.  */
16513 _ACEOF
16514 cat confdefs.h >>conftest.$ac_ext
16515 cat >>conftest.$ac_ext <<_ACEOF
16516 /* end confdefs.h.  */
16517 #include <errno.h>
16518 int
16519 main ()
16520 {
16521 char *c = (char *) *sys_errlist
16522   ;
16523   return 0;
16524 }
16525 _ACEOF
16526 rm -f conftest.$ac_objext conftest$ac_exeext
16527 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16528   (eval $ac_link) 2>conftest.er1
16529   ac_status=$?
16530   grep -v '^ *+' conftest.er1 >conftest.err
16531   rm -f conftest.er1
16532   cat conftest.err >&5
16533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16534   (exit $ac_status); } &&
16535          { ac_try='test -z "$ac_c_werror_flag"
16536                          || test ! -s conftest.err'
16537   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16538   (eval $ac_try) 2>&5
16539   ac_status=$?
16540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16541   (exit $ac_status); }; } &&
16542          { ac_try='test -s conftest$ac_exeext'
16543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16544   (eval $ac_try) 2>&5
16545   ac_status=$?
16546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16547   (exit $ac_status); }; }; then
16548   ol_cv_have_sys_errlist=yes
16549 else
16550   echo "$as_me: failed program was:" >&5
16551 sed 's/^/| /' conftest.$ac_ext >&5
16552
16553 ol_cv_have_sys_errlist=no
16554 fi
16555 rm -f conftest.err conftest.$ac_objext \
16556       conftest$ac_exeext conftest.$ac_ext
16557 fi
16558 echo "$as_me:$LINENO: result: $ol_cv_have_sys_errlist" >&5
16559 echo "${ECHO_T}$ol_cv_have_sys_errlist" >&6
16560 fi
16561 if test $ol_cv_have_sys_errlist = yes ; then
16562
16563 cat >>confdefs.h <<\_ACEOF
16564 #define HAVE_SYS_ERRLIST 1
16565 _ACEOF
16566
16567 fi
16568
16569 fi
16570
16571
16572
16573 for ac_header in regex.h
16574 do
16575 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16576 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16577   echo "$as_me:$LINENO: checking for $ac_header" >&5
16578 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16579 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16580   echo $ECHO_N "(cached) $ECHO_C" >&6
16581 fi
16582 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16583 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16584 else
16585   # Is the header compilable?
16586 echo "$as_me:$LINENO: checking $ac_header usability" >&5
16587 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16588 cat >conftest.$ac_ext <<_ACEOF
16589 /* confdefs.h.  */
16590 _ACEOF
16591 cat confdefs.h >>conftest.$ac_ext
16592 cat >>conftest.$ac_ext <<_ACEOF
16593 /* end confdefs.h.  */
16594 $ac_includes_default
16595 #include <$ac_header>
16596 _ACEOF
16597 rm -f conftest.$ac_objext
16598 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16599   (eval $ac_compile) 2>conftest.er1
16600   ac_status=$?
16601   grep -v '^ *+' conftest.er1 >conftest.err
16602   rm -f conftest.er1
16603   cat conftest.err >&5
16604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16605   (exit $ac_status); } &&
16606          { ac_try='test -z "$ac_c_werror_flag"
16607                          || test ! -s conftest.err'
16608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16609   (eval $ac_try) 2>&5
16610   ac_status=$?
16611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16612   (exit $ac_status); }; } &&
16613          { ac_try='test -s conftest.$ac_objext'
16614   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16615   (eval $ac_try) 2>&5
16616   ac_status=$?
16617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16618   (exit $ac_status); }; }; then
16619   ac_header_compiler=yes
16620 else
16621   echo "$as_me: failed program was:" >&5
16622 sed 's/^/| /' conftest.$ac_ext >&5
16623
16624 ac_header_compiler=no
16625 fi
16626 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16627 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16628 echo "${ECHO_T}$ac_header_compiler" >&6
16629
16630 # Is the header present?
16631 echo "$as_me:$LINENO: checking $ac_header presence" >&5
16632 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16633 cat >conftest.$ac_ext <<_ACEOF
16634 /* confdefs.h.  */
16635 _ACEOF
16636 cat confdefs.h >>conftest.$ac_ext
16637 cat >>conftest.$ac_ext <<_ACEOF
16638 /* end confdefs.h.  */
16639 #include <$ac_header>
16640 _ACEOF
16641 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16642   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16643   ac_status=$?
16644   grep -v '^ *+' conftest.er1 >conftest.err
16645   rm -f conftest.er1
16646   cat conftest.err >&5
16647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16648   (exit $ac_status); } >/dev/null; then
16649   if test -s conftest.err; then
16650     ac_cpp_err=$ac_c_preproc_warn_flag
16651     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16652   else
16653     ac_cpp_err=
16654   fi
16655 else
16656   ac_cpp_err=yes
16657 fi
16658 if test -z "$ac_cpp_err"; then
16659   ac_header_preproc=yes
16660 else
16661   echo "$as_me: failed program was:" >&5
16662 sed 's/^/| /' conftest.$ac_ext >&5
16663
16664   ac_header_preproc=no
16665 fi
16666 rm -f conftest.err conftest.$ac_ext
16667 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16668 echo "${ECHO_T}$ac_header_preproc" >&6
16669
16670 # So?  What about this header?
16671 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16672   yes:no: )
16673     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16674 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16675     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16676 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16677     ac_header_preproc=yes
16678     ;;
16679   no:yes:* )
16680     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16681 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16682     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
16683 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
16684     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16685 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16686     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
16687 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
16688     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16689 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16690     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16691 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
16692     (
16693       cat <<\_ASBOX
16694 ## --------------------------------------------- ##
16695 ## Report this to <http://www.openldap.org/its/> ##
16696 ## --------------------------------------------- ##
16697 _ASBOX
16698     ) |
16699       sed "s/^/$as_me: WARNING:     /" >&2
16700     ;;
16701 esac
16702 echo "$as_me:$LINENO: checking for $ac_header" >&5
16703 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16704 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16705   echo $ECHO_N "(cached) $ECHO_C" >&6
16706 else
16707   eval "$as_ac_Header=\$ac_header_preproc"
16708 fi
16709 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16710 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16711
16712 fi
16713 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16714   cat >>confdefs.h <<_ACEOF
16715 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16716 _ACEOF
16717
16718 fi
16719
16720 done
16721
16722 if test "$ac_cv_header_regex_h" != yes ; then
16723         { { echo "$as_me:$LINENO: error: POSIX regex.h required." >&5
16724 echo "$as_me: error: POSIX regex.h required." >&2;}
16725    { (exit 1); exit 1; }; }
16726 fi
16727 echo "$as_me:$LINENO: checking for library containing regfree" >&5
16728 echo $ECHO_N "checking for library containing regfree... $ECHO_C" >&6
16729 if test "${ac_cv_search_regfree+set}" = set; then
16730   echo $ECHO_N "(cached) $ECHO_C" >&6
16731 else
16732   ac_func_search_save_LIBS=$LIBS
16733 ac_cv_search_regfree=no
16734 cat >conftest.$ac_ext <<_ACEOF
16735 /* confdefs.h.  */
16736 _ACEOF
16737 cat confdefs.h >>conftest.$ac_ext
16738 cat >>conftest.$ac_ext <<_ACEOF
16739 /* end confdefs.h.  */
16740
16741 /* Override any gcc2 internal prototype to avoid an error.  */
16742 #ifdef __cplusplus
16743 extern "C"
16744 #endif
16745 /* We use char because int might match the return type of a gcc2
16746    builtin and then its argument prototype would still apply.  */
16747 char regfree ();
16748 int
16749 main ()
16750 {
16751 regfree ();
16752   ;
16753   return 0;
16754 }
16755 _ACEOF
16756 rm -f conftest.$ac_objext conftest$ac_exeext
16757 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16758   (eval $ac_link) 2>conftest.er1
16759   ac_status=$?
16760   grep -v '^ *+' conftest.er1 >conftest.err
16761   rm -f conftest.er1
16762   cat conftest.err >&5
16763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16764   (exit $ac_status); } &&
16765          { ac_try='test -z "$ac_c_werror_flag"
16766                          || test ! -s conftest.err'
16767   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16768   (eval $ac_try) 2>&5
16769   ac_status=$?
16770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16771   (exit $ac_status); }; } &&
16772          { ac_try='test -s conftest$ac_exeext'
16773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16774   (eval $ac_try) 2>&5
16775   ac_status=$?
16776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16777   (exit $ac_status); }; }; then
16778   ac_cv_search_regfree="none required"
16779 else
16780   echo "$as_me: failed program was:" >&5
16781 sed 's/^/| /' conftest.$ac_ext >&5
16782
16783 fi
16784 rm -f conftest.err conftest.$ac_objext \
16785       conftest$ac_exeext conftest.$ac_ext
16786 if test "$ac_cv_search_regfree" = no; then
16787   for ac_lib in regex gnuregex; do
16788     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16789     cat >conftest.$ac_ext <<_ACEOF
16790 /* confdefs.h.  */
16791 _ACEOF
16792 cat confdefs.h >>conftest.$ac_ext
16793 cat >>conftest.$ac_ext <<_ACEOF
16794 /* end confdefs.h.  */
16795
16796 /* Override any gcc2 internal prototype to avoid an error.  */
16797 #ifdef __cplusplus
16798 extern "C"
16799 #endif
16800 /* We use char because int might match the return type of a gcc2
16801    builtin and then its argument prototype would still apply.  */
16802 char regfree ();
16803 int
16804 main ()
16805 {
16806 regfree ();
16807   ;
16808   return 0;
16809 }
16810 _ACEOF
16811 rm -f conftest.$ac_objext conftest$ac_exeext
16812 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16813   (eval $ac_link) 2>conftest.er1
16814   ac_status=$?
16815   grep -v '^ *+' conftest.er1 >conftest.err
16816   rm -f conftest.er1
16817   cat conftest.err >&5
16818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16819   (exit $ac_status); } &&
16820          { ac_try='test -z "$ac_c_werror_flag"
16821                          || test ! -s conftest.err'
16822   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16823   (eval $ac_try) 2>&5
16824   ac_status=$?
16825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16826   (exit $ac_status); }; } &&
16827          { ac_try='test -s conftest$ac_exeext'
16828   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16829   (eval $ac_try) 2>&5
16830   ac_status=$?
16831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16832   (exit $ac_status); }; }; then
16833   ac_cv_search_regfree="-l$ac_lib"
16834 break
16835 else
16836   echo "$as_me: failed program was:" >&5
16837 sed 's/^/| /' conftest.$ac_ext >&5
16838
16839 fi
16840 rm -f conftest.err conftest.$ac_objext \
16841       conftest$ac_exeext conftest.$ac_ext
16842   done
16843 fi
16844 LIBS=$ac_func_search_save_LIBS
16845 fi
16846 echo "$as_me:$LINENO: result: $ac_cv_search_regfree" >&5
16847 echo "${ECHO_T}$ac_cv_search_regfree" >&6
16848 if test "$ac_cv_search_regfree" != no; then
16849   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
16850   :
16851 else
16852   { { echo "$as_me:$LINENO: error: POSIX regex required." >&5
16853 echo "$as_me: error: POSIX regex required." >&2;}
16854    { (exit 1); exit 1; }; }
16855 fi
16856
16857
16858
16859 echo "$as_me:$LINENO: checking for compatible POSIX regex" >&5
16860 echo $ECHO_N "checking for compatible POSIX regex... $ECHO_C" >&6
16861 if test "${ol_cv_c_posix_regex+set}" = set; then
16862   echo $ECHO_N "(cached) $ECHO_C" >&6
16863 else
16864
16865         if test "$cross_compiling" = yes; then
16866   ol_cv_c_posix_regex=cross
16867 else
16868   cat >conftest.$ac_ext <<_ACEOF
16869 /* confdefs.h.  */
16870 _ACEOF
16871 cat confdefs.h >>conftest.$ac_ext
16872 cat >>conftest.$ac_ext <<_ACEOF
16873 /* end confdefs.h.  */
16874
16875 #include <sys/types.h>
16876 #include <regex.h>
16877 static char *pattern, *string;
16878 main()
16879 {
16880         int rc;
16881         regex_t re;
16882
16883         pattern = "^A";
16884
16885         if(regcomp(&re, pattern, 0)) {
16886                 return -1;
16887         }
16888
16889         string = "ALL MATCH";
16890
16891         rc = regexec(&re, string, 0, (void*)0, 0);
16892
16893         regfree(&re);
16894
16895         return rc;
16896 }
16897 _ACEOF
16898 rm -f conftest$ac_exeext
16899 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16900   (eval $ac_link) 2>&5
16901   ac_status=$?
16902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16903   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16904   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16905   (eval $ac_try) 2>&5
16906   ac_status=$?
16907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16908   (exit $ac_status); }; }; then
16909   ol_cv_c_posix_regex=yes
16910 else
16911   echo "$as_me: program exited with status $ac_status" >&5
16912 echo "$as_me: failed program was:" >&5
16913 sed 's/^/| /' conftest.$ac_ext >&5
16914
16915 ( exit $ac_status )
16916 ol_cv_c_posix_regex=no
16917 fi
16918 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16919 fi
16920 fi
16921 echo "$as_me:$LINENO: result: $ol_cv_c_posix_regex" >&5
16922 echo "${ECHO_T}$ol_cv_c_posix_regex" >&6
16923
16924 if test "$ol_cv_c_posix_regex" = no ; then
16925         { { echo "$as_me:$LINENO: error: broken POSIX regex!" >&5
16926 echo "$as_me: error: broken POSIX regex!" >&2;}
16927    { (exit 1); exit 1; }; }
16928 fi
16929
16930
16931 have_uuid=no
16932
16933 for ac_header in sys/uuid.h
16934 do
16935 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16936 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16937   echo "$as_me:$LINENO: checking for $ac_header" >&5
16938 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16939 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16940   echo $ECHO_N "(cached) $ECHO_C" >&6
16941 fi
16942 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16943 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16944 else
16945   # Is the header compilable?
16946 echo "$as_me:$LINENO: checking $ac_header usability" >&5
16947 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16948 cat >conftest.$ac_ext <<_ACEOF
16949 /* confdefs.h.  */
16950 _ACEOF
16951 cat confdefs.h >>conftest.$ac_ext
16952 cat >>conftest.$ac_ext <<_ACEOF
16953 /* end confdefs.h.  */
16954 $ac_includes_default
16955 #include <$ac_header>
16956 _ACEOF
16957 rm -f conftest.$ac_objext
16958 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16959   (eval $ac_compile) 2>conftest.er1
16960   ac_status=$?
16961   grep -v '^ *+' conftest.er1 >conftest.err
16962   rm -f conftest.er1
16963   cat conftest.err >&5
16964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16965   (exit $ac_status); } &&
16966          { ac_try='test -z "$ac_c_werror_flag"
16967                          || test ! -s conftest.err'
16968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16969   (eval $ac_try) 2>&5
16970   ac_status=$?
16971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16972   (exit $ac_status); }; } &&
16973          { ac_try='test -s conftest.$ac_objext'
16974   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16975   (eval $ac_try) 2>&5
16976   ac_status=$?
16977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16978   (exit $ac_status); }; }; then
16979   ac_header_compiler=yes
16980 else
16981   echo "$as_me: failed program was:" >&5
16982 sed 's/^/| /' conftest.$ac_ext >&5
16983
16984 ac_header_compiler=no
16985 fi
16986 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16987 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16988 echo "${ECHO_T}$ac_header_compiler" >&6
16989
16990 # Is the header present?
16991 echo "$as_me:$LINENO: checking $ac_header presence" >&5
16992 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16993 cat >conftest.$ac_ext <<_ACEOF
16994 /* confdefs.h.  */
16995 _ACEOF
16996 cat confdefs.h >>conftest.$ac_ext
16997 cat >>conftest.$ac_ext <<_ACEOF
16998 /* end confdefs.h.  */
16999 #include <$ac_header>
17000 _ACEOF
17001 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17002   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17003   ac_status=$?
17004   grep -v '^ *+' conftest.er1 >conftest.err
17005   rm -f conftest.er1
17006   cat conftest.err >&5
17007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17008   (exit $ac_status); } >/dev/null; then
17009   if test -s conftest.err; then
17010     ac_cpp_err=$ac_c_preproc_warn_flag
17011     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17012   else
17013     ac_cpp_err=
17014   fi
17015 else
17016   ac_cpp_err=yes
17017 fi
17018 if test -z "$ac_cpp_err"; then
17019   ac_header_preproc=yes
17020 else
17021   echo "$as_me: failed program was:" >&5
17022 sed 's/^/| /' conftest.$ac_ext >&5
17023
17024   ac_header_preproc=no
17025 fi
17026 rm -f conftest.err conftest.$ac_ext
17027 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17028 echo "${ECHO_T}$ac_header_preproc" >&6
17029
17030 # So?  What about this header?
17031 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17032   yes:no: )
17033     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17034 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17035     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17036 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17037     ac_header_preproc=yes
17038     ;;
17039   no:yes:* )
17040     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17041 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17042     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17043 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17044     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17045 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17046     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17047 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17048     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17049 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17050     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17051 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17052     (
17053       cat <<\_ASBOX
17054 ## --------------------------------------------- ##
17055 ## Report this to <http://www.openldap.org/its/> ##
17056 ## --------------------------------------------- ##
17057 _ASBOX
17058     ) |
17059       sed "s/^/$as_me: WARNING:     /" >&2
17060     ;;
17061 esac
17062 echo "$as_me:$LINENO: checking for $ac_header" >&5
17063 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17064 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17065   echo $ECHO_N "(cached) $ECHO_C" >&6
17066 else
17067   eval "$as_ac_Header=\$ac_header_preproc"
17068 fi
17069 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17070 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17071
17072 fi
17073 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17074   cat >>confdefs.h <<_ACEOF
17075 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17076 _ACEOF
17077
17078 fi
17079
17080 done
17081
17082 if test $ac_cv_header_sys_uuid_h = yes ; then
17083         save_LIBS="$LIBS"
17084         echo "$as_me:$LINENO: checking for library containing uuid_to_str" >&5
17085 echo $ECHO_N "checking for library containing uuid_to_str... $ECHO_C" >&6
17086 if test "${ac_cv_search_uuid_to_str+set}" = set; then
17087   echo $ECHO_N "(cached) $ECHO_C" >&6
17088 else
17089   ac_func_search_save_LIBS=$LIBS
17090 ac_cv_search_uuid_to_str=no
17091 cat >conftest.$ac_ext <<_ACEOF
17092 /* confdefs.h.  */
17093 _ACEOF
17094 cat confdefs.h >>conftest.$ac_ext
17095 cat >>conftest.$ac_ext <<_ACEOF
17096 /* end confdefs.h.  */
17097
17098 /* Override any gcc2 internal prototype to avoid an error.  */
17099 #ifdef __cplusplus
17100 extern "C"
17101 #endif
17102 /* We use char because int might match the return type of a gcc2
17103    builtin and then its argument prototype would still apply.  */
17104 char uuid_to_str ();
17105 int
17106 main ()
17107 {
17108 uuid_to_str ();
17109   ;
17110   return 0;
17111 }
17112 _ACEOF
17113 rm -f conftest.$ac_objext conftest$ac_exeext
17114 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17115   (eval $ac_link) 2>conftest.er1
17116   ac_status=$?
17117   grep -v '^ *+' conftest.er1 >conftest.err
17118   rm -f conftest.er1
17119   cat conftest.err >&5
17120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17121   (exit $ac_status); } &&
17122          { ac_try='test -z "$ac_c_werror_flag"
17123                          || test ! -s conftest.err'
17124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17125   (eval $ac_try) 2>&5
17126   ac_status=$?
17127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17128   (exit $ac_status); }; } &&
17129          { ac_try='test -s conftest$ac_exeext'
17130   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17131   (eval $ac_try) 2>&5
17132   ac_status=$?
17133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17134   (exit $ac_status); }; }; then
17135   ac_cv_search_uuid_to_str="none required"
17136 else
17137   echo "$as_me: failed program was:" >&5
17138 sed 's/^/| /' conftest.$ac_ext >&5
17139
17140 fi
17141 rm -f conftest.err conftest.$ac_objext \
17142       conftest$ac_exeext conftest.$ac_ext
17143 if test "$ac_cv_search_uuid_to_str" = no; then
17144   for ac_lib in uuid; do
17145     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17146     cat >conftest.$ac_ext <<_ACEOF
17147 /* confdefs.h.  */
17148 _ACEOF
17149 cat confdefs.h >>conftest.$ac_ext
17150 cat >>conftest.$ac_ext <<_ACEOF
17151 /* end confdefs.h.  */
17152
17153 /* Override any gcc2 internal prototype to avoid an error.  */
17154 #ifdef __cplusplus
17155 extern "C"
17156 #endif
17157 /* We use char because int might match the return type of a gcc2
17158    builtin and then its argument prototype would still apply.  */
17159 char uuid_to_str ();
17160 int
17161 main ()
17162 {
17163 uuid_to_str ();
17164   ;
17165   return 0;
17166 }
17167 _ACEOF
17168 rm -f conftest.$ac_objext conftest$ac_exeext
17169 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17170   (eval $ac_link) 2>conftest.er1
17171   ac_status=$?
17172   grep -v '^ *+' conftest.er1 >conftest.err
17173   rm -f conftest.er1
17174   cat conftest.err >&5
17175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17176   (exit $ac_status); } &&
17177          { ac_try='test -z "$ac_c_werror_flag"
17178                          || test ! -s conftest.err'
17179   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17180   (eval $ac_try) 2>&5
17181   ac_status=$?
17182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17183   (exit $ac_status); }; } &&
17184          { ac_try='test -s conftest$ac_exeext'
17185   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17186   (eval $ac_try) 2>&5
17187   ac_status=$?
17188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17189   (exit $ac_status); }; }; then
17190   ac_cv_search_uuid_to_str="-l$ac_lib"
17191 break
17192 else
17193   echo "$as_me: failed program was:" >&5
17194 sed 's/^/| /' conftest.$ac_ext >&5
17195
17196 fi
17197 rm -f conftest.err conftest.$ac_objext \
17198       conftest$ac_exeext conftest.$ac_ext
17199   done
17200 fi
17201 LIBS=$ac_func_search_save_LIBS
17202 fi
17203 echo "$as_me:$LINENO: result: $ac_cv_search_uuid_to_str" >&5
17204 echo "${ECHO_T}$ac_cv_search_uuid_to_str" >&6
17205 if test "$ac_cv_search_uuid_to_str" != no; then
17206   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
17207   have_uuid=yes
17208 else
17209   :
17210 fi
17211
17212         LIBS="$save_LIBS"
17213
17214         if test have_uuid = yes ; then
17215
17216 cat >>confdefs.h <<\_ACEOF
17217 #define HAVE_UUID_TO_STR 1
17218 _ACEOF
17219
17220
17221                 test "$ac_cv_search_uuid_to_str" = "none required" || \
17222                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
17223         fi
17224 fi
17225
17226 if test $have_uuid = no ; then
17227         echo "$as_me:$LINENO: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
17228 echo $ECHO_N "checking to see if -lrpcrt4 is needed for win32 UUID support... $ECHO_C" >&6
17229         save_LIBS="$LIBS"
17230         LIBS="$LIBS -lrpcrt4"
17231         cat >conftest.$ac_ext <<_ACEOF
17232 /* confdefs.h.  */
17233 _ACEOF
17234 cat confdefs.h >>conftest.$ac_ext
17235 cat >>conftest.$ac_ext <<_ACEOF
17236 /* end confdefs.h.  */
17237
17238                 int __stdcall UuidCreate(void *);
17239                 int __stdcall UuidToStringA(void *,void **);
17240
17241 int
17242 main ()
17243 {
17244
17245                 UuidCreate(0);
17246                 UuidToStringA(0,0);
17247
17248   ;
17249   return 0;
17250 }
17251 _ACEOF
17252 rm -f conftest.$ac_objext conftest$ac_exeext
17253 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17254   (eval $ac_link) 2>conftest.er1
17255   ac_status=$?
17256   grep -v '^ *+' conftest.er1 >conftest.err
17257   rm -f conftest.er1
17258   cat conftest.err >&5
17259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17260   (exit $ac_status); } &&
17261          { ac_try='test -z "$ac_c_werror_flag"
17262                          || test ! -s conftest.err'
17263   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17264   (eval $ac_try) 2>&5
17265   ac_status=$?
17266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17267   (exit $ac_status); }; } &&
17268          { ac_try='test -s conftest$ac_exeext'
17269   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17270   (eval $ac_try) 2>&5
17271   ac_status=$?
17272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17273   (exit $ac_status); }; }; then
17274   need_rpcrt=yes
17275 else
17276   echo "$as_me: failed program was:" >&5
17277 sed 's/^/| /' conftest.$ac_ext >&5
17278
17279 need_rpcrt=no
17280 fi
17281 rm -f conftest.err conftest.$ac_objext \
17282       conftest$ac_exeext conftest.$ac_ext
17283         if test $need_rpcrt = yes; then
17284                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
17285         fi
17286         LIBS="$save_LIBS"
17287         echo "$as_me:$LINENO: result: $need_rpcrt" >&5
17288 echo "${ECHO_T}$need_rpcrt" >&6
17289 fi
17290
17291 ol_cv_lib_resolver=no
17292 if test $ol_cv_lib_resolver = no ; then
17293         echo "$as_me:$LINENO: checking for resolver link (default)" >&5
17294 echo $ECHO_N "checking for resolver link (default)... $ECHO_C" >&6
17295 if test "${ol_cv_resolver_none+set}" = set; then
17296   echo $ECHO_N "(cached) $ECHO_C" >&6
17297 else
17298
17299         ol_RESOLVER_LIB=
17300         ol_LIBS=$LIBS
17301         LIBS="$ol_RESOLVER_LIB $LIBS"
17302
17303         cat >conftest.$ac_ext <<_ACEOF
17304 /* confdefs.h.  */
17305 _ACEOF
17306 cat confdefs.h >>conftest.$ac_ext
17307 cat >>conftest.$ac_ext <<_ACEOF
17308 /* end confdefs.h.  */
17309
17310 #ifdef HAVE_SYS_TYPES_H
17311 #       include <sys/types.h>
17312 #endif
17313 #include <netinet/in.h>
17314 #ifdef HAVE_ARPA_NAMESER_H
17315 #       include <arpa/nameser.h>
17316 #endif
17317 #ifdef HAVE_RESOLV_H
17318 #       include <resolv.h>
17319 #endif
17320
17321 int
17322 main ()
17323 {
17324 {
17325         int len, status;
17326         char *request = NULL;
17327         unsigned char reply[64*1024];
17328         unsigned char host[64*1024];
17329         unsigned char *p;
17330
17331 #ifdef NS_HFIXEDSZ
17332         /* Bind 8/9 interface */
17333         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17334 #else
17335         /* Bind 4 interface */
17336 # ifndef T_SRV
17337 #  define T_SRV 33
17338 # endif
17339         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17340 #endif
17341         p = reply;
17342 #ifdef NS_HFIXEDSZ
17343         /* Bind 8/9 interface */
17344         p += NS_HFIXEDSZ;
17345 #elif defined(HFIXEDSZ)
17346         /* Bind 4 interface w/ HFIXEDSZ */
17347         p += HFIXEDSZ;
17348 #else
17349         /* Bind 4 interface w/o HFIXEDSZ */
17350         p += sizeof(HEADER);
17351 #endif
17352         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17353 }
17354   ;
17355   return 0;
17356 }
17357 _ACEOF
17358 rm -f conftest.$ac_objext conftest$ac_exeext
17359 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17360   (eval $ac_link) 2>conftest.er1
17361   ac_status=$?
17362   grep -v '^ *+' conftest.er1 >conftest.err
17363   rm -f conftest.er1
17364   cat conftest.err >&5
17365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17366   (exit $ac_status); } &&
17367          { ac_try='test -z "$ac_c_werror_flag"
17368                          || test ! -s conftest.err'
17369   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17370   (eval $ac_try) 2>&5
17371   ac_status=$?
17372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17373   (exit $ac_status); }; } &&
17374          { ac_try='test -s conftest$ac_exeext'
17375   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17376   (eval $ac_try) 2>&5
17377   ac_status=$?
17378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17379   (exit $ac_status); }; }; then
17380   ol_cv_resolver_none=yes
17381 else
17382   echo "$as_me: failed program was:" >&5
17383 sed 's/^/| /' conftest.$ac_ext >&5
17384
17385 ol_cv_resolver_none=no
17386 fi
17387 rm -f conftest.err conftest.$ac_objext \
17388       conftest$ac_exeext conftest.$ac_ext
17389
17390         LIBS="$ol_LIBS"
17391
17392 fi
17393 echo "$as_me:$LINENO: result: $ol_cv_resolver_none" >&5
17394 echo "${ECHO_T}$ol_cv_resolver_none" >&6
17395
17396         if test $ol_cv_resolver_none = yes ; then
17397                 ol_cv_lib_resolver=yes
17398         fi
17399 fi
17400
17401 if test $ol_cv_lib_resolver = no ; then
17402         echo "$as_me:$LINENO: checking for resolver link (-lresolv)" >&5
17403 echo $ECHO_N "checking for resolver link (-lresolv)... $ECHO_C" >&6
17404 if test "${ol_cv_resolver_resolv+set}" = set; then
17405   echo $ECHO_N "(cached) $ECHO_C" >&6
17406 else
17407
17408         ol_RESOLVER_LIB=-lresolv
17409         ol_LIBS=$LIBS
17410         LIBS="$ol_RESOLVER_LIB $LIBS"
17411
17412         cat >conftest.$ac_ext <<_ACEOF
17413 /* confdefs.h.  */
17414 _ACEOF
17415 cat confdefs.h >>conftest.$ac_ext
17416 cat >>conftest.$ac_ext <<_ACEOF
17417 /* end confdefs.h.  */
17418
17419 #ifdef HAVE_SYS_TYPES_H
17420 #       include <sys/types.h>
17421 #endif
17422 #include <netinet/in.h>
17423 #ifdef HAVE_ARPA_NAMESER_H
17424 #       include <arpa/nameser.h>
17425 #endif
17426 #ifdef HAVE_RESOLV_H
17427 #       include <resolv.h>
17428 #endif
17429
17430 int
17431 main ()
17432 {
17433 {
17434         int len, status;
17435         char *request = NULL;
17436         unsigned char reply[64*1024];
17437         unsigned char host[64*1024];
17438         unsigned char *p;
17439
17440 #ifdef NS_HFIXEDSZ
17441         /* Bind 8/9 interface */
17442         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17443 #else
17444         /* Bind 4 interface */
17445 # ifndef T_SRV
17446 #  define T_SRV 33
17447 # endif
17448         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17449 #endif
17450         p = reply;
17451 #ifdef NS_HFIXEDSZ
17452         /* Bind 8/9 interface */
17453         p += NS_HFIXEDSZ;
17454 #elif defined(HFIXEDSZ)
17455         /* Bind 4 interface w/ HFIXEDSZ */
17456         p += HFIXEDSZ;
17457 #else
17458         /* Bind 4 interface w/o HFIXEDSZ */
17459         p += sizeof(HEADER);
17460 #endif
17461         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17462 }
17463   ;
17464   return 0;
17465 }
17466 _ACEOF
17467 rm -f conftest.$ac_objext conftest$ac_exeext
17468 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17469   (eval $ac_link) 2>conftest.er1
17470   ac_status=$?
17471   grep -v '^ *+' conftest.er1 >conftest.err
17472   rm -f conftest.er1
17473   cat conftest.err >&5
17474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17475   (exit $ac_status); } &&
17476          { ac_try='test -z "$ac_c_werror_flag"
17477                          || test ! -s conftest.err'
17478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17479   (eval $ac_try) 2>&5
17480   ac_status=$?
17481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17482   (exit $ac_status); }; } &&
17483          { ac_try='test -s conftest$ac_exeext'
17484   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17485   (eval $ac_try) 2>&5
17486   ac_status=$?
17487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17488   (exit $ac_status); }; }; then
17489   ol_cv_resolver_resolv=yes
17490 else
17491   echo "$as_me: failed program was:" >&5
17492 sed 's/^/| /' conftest.$ac_ext >&5
17493
17494 ol_cv_resolver_resolv=no
17495 fi
17496 rm -f conftest.err conftest.$ac_objext \
17497       conftest$ac_exeext conftest.$ac_ext
17498
17499         LIBS="$ol_LIBS"
17500
17501 fi
17502 echo "$as_me:$LINENO: result: $ol_cv_resolver_resolv" >&5
17503 echo "${ECHO_T}$ol_cv_resolver_resolv" >&6
17504
17505         if test $ol_cv_resolver_resolv = yes ; then
17506                 ol_cv_lib_resolver=-lresolv
17507         fi
17508 fi
17509
17510 if test $ol_cv_lib_resolver = no ; then
17511         echo "$as_me:$LINENO: checking for resolver link (-lbind)" >&5
17512 echo $ECHO_N "checking for resolver link (-lbind)... $ECHO_C" >&6
17513 if test "${ol_cv_resolver_bind+set}" = set; then
17514   echo $ECHO_N "(cached) $ECHO_C" >&6
17515 else
17516
17517         ol_RESOLVER_LIB=-lbind
17518         ol_LIBS=$LIBS
17519         LIBS="$ol_RESOLVER_LIB $LIBS"
17520
17521         cat >conftest.$ac_ext <<_ACEOF
17522 /* confdefs.h.  */
17523 _ACEOF
17524 cat confdefs.h >>conftest.$ac_ext
17525 cat >>conftest.$ac_ext <<_ACEOF
17526 /* end confdefs.h.  */
17527
17528 #ifdef HAVE_SYS_TYPES_H
17529 #       include <sys/types.h>
17530 #endif
17531 #include <netinet/in.h>
17532 #ifdef HAVE_ARPA_NAMESER_H
17533 #       include <arpa/nameser.h>
17534 #endif
17535 #ifdef HAVE_RESOLV_H
17536 #       include <resolv.h>
17537 #endif
17538
17539 int
17540 main ()
17541 {
17542 {
17543         int len, status;
17544         char *request = NULL;
17545         unsigned char reply[64*1024];
17546         unsigned char host[64*1024];
17547         unsigned char *p;
17548
17549 #ifdef NS_HFIXEDSZ
17550         /* Bind 8/9 interface */
17551         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17552 #else
17553         /* Bind 4 interface */
17554 # ifndef T_SRV
17555 #  define T_SRV 33
17556 # endif
17557         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17558 #endif
17559         p = reply;
17560 #ifdef NS_HFIXEDSZ
17561         /* Bind 8/9 interface */
17562         p += NS_HFIXEDSZ;
17563 #elif defined(HFIXEDSZ)
17564         /* Bind 4 interface w/ HFIXEDSZ */
17565         p += HFIXEDSZ;
17566 #else
17567         /* Bind 4 interface w/o HFIXEDSZ */
17568         p += sizeof(HEADER);
17569 #endif
17570         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17571 }
17572   ;
17573   return 0;
17574 }
17575 _ACEOF
17576 rm -f conftest.$ac_objext conftest$ac_exeext
17577 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17578   (eval $ac_link) 2>conftest.er1
17579   ac_status=$?
17580   grep -v '^ *+' conftest.er1 >conftest.err
17581   rm -f conftest.er1
17582   cat conftest.err >&5
17583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17584   (exit $ac_status); } &&
17585          { ac_try='test -z "$ac_c_werror_flag"
17586                          || test ! -s conftest.err'
17587   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17588   (eval $ac_try) 2>&5
17589   ac_status=$?
17590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17591   (exit $ac_status); }; } &&
17592          { ac_try='test -s conftest$ac_exeext'
17593   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17594   (eval $ac_try) 2>&5
17595   ac_status=$?
17596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17597   (exit $ac_status); }; }; then
17598   ol_cv_resolver_bind=yes
17599 else
17600   echo "$as_me: failed program was:" >&5
17601 sed 's/^/| /' conftest.$ac_ext >&5
17602
17603 ol_cv_resolver_bind=no
17604 fi
17605 rm -f conftest.err conftest.$ac_objext \
17606       conftest$ac_exeext conftest.$ac_ext
17607
17608         LIBS="$ol_LIBS"
17609
17610 fi
17611 echo "$as_me:$LINENO: result: $ol_cv_resolver_bind" >&5
17612 echo "${ECHO_T}$ol_cv_resolver_bind" >&6
17613
17614         if test $ol_cv_resolver_bind = yes ; then
17615                 ol_cv_lib_resolver=-lbind
17616         fi
17617 fi
17618
17619
17620
17621 ol_link_dnssrv=no
17622 if test "$ol_cv_lib_resolver" != no ; then
17623
17624 cat >>confdefs.h <<\_ACEOF
17625 #define HAVE_RES_QUERY 1
17626 _ACEOF
17627
17628
17629         if test "$ol_enable_dnssrv" != no ; then
17630                 ol_link_dnssrv=yes
17631         fi
17632
17633         if test "$ol_cv_lib_resolver" != yes ; then
17634                 LIBS="$ol_cv_lib_resolver $LIBS"
17635         fi
17636 fi
17637
17638 if test "$ol_enable_dnssrv" = yes || test "$ol_enable_dnssrv" = mod ; then
17639         if test "$ol_link_dnssrv" = no ; then
17640                 { { echo "$as_me:$LINENO: error: DNSSRV requires res_query()" >&5
17641 echo "$as_me: error: DNSSRV requires res_query()" >&2;}
17642    { (exit 1); exit 1; }; }
17643         fi
17644 else
17645         ol_enable_dnssrv=no
17646 fi
17647
17648
17649 for ac_func in hstrerror
17650 do
17651 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17652 echo "$as_me:$LINENO: checking for $ac_func" >&5
17653 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17654 if eval "test \"\${$as_ac_var+set}\" = set"; then
17655   echo $ECHO_N "(cached) $ECHO_C" >&6
17656 else
17657   cat >conftest.$ac_ext <<_ACEOF
17658 /* confdefs.h.  */
17659 _ACEOF
17660 cat confdefs.h >>conftest.$ac_ext
17661 cat >>conftest.$ac_ext <<_ACEOF
17662 /* end confdefs.h.  */
17663 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17664    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17665 #define $ac_func innocuous_$ac_func
17666
17667 /* System header to define __stub macros and hopefully few prototypes,
17668     which can conflict with char $ac_func (); below.
17669     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17670     <limits.h> exists even on freestanding compilers.  */
17671
17672 #ifdef __STDC__
17673 # include <limits.h>
17674 #else
17675 # include <assert.h>
17676 #endif
17677
17678 #undef $ac_func
17679
17680 /* Override any gcc2 internal prototype to avoid an error.  */
17681 #ifdef __cplusplus
17682 extern "C"
17683 {
17684 #endif
17685 /* We use char because int might match the return type of a gcc2
17686    builtin and then its argument prototype would still apply.  */
17687 char $ac_func ();
17688 /* The GNU C library defines this for functions which it implements
17689     to always fail with ENOSYS.  Some functions are actually named
17690     something starting with __ and the normal name is an alias.  */
17691 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17692 choke me
17693 #else
17694 char (*f) () = $ac_func;
17695 #endif
17696 #ifdef __cplusplus
17697 }
17698 #endif
17699
17700 int
17701 main ()
17702 {
17703 return f != $ac_func;
17704   ;
17705   return 0;
17706 }
17707 _ACEOF
17708 rm -f conftest.$ac_objext conftest$ac_exeext
17709 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17710   (eval $ac_link) 2>conftest.er1
17711   ac_status=$?
17712   grep -v '^ *+' conftest.er1 >conftest.err
17713   rm -f conftest.er1
17714   cat conftest.err >&5
17715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17716   (exit $ac_status); } &&
17717          { ac_try='test -z "$ac_c_werror_flag"
17718                          || test ! -s conftest.err'
17719   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17720   (eval $ac_try) 2>&5
17721   ac_status=$?
17722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17723   (exit $ac_status); }; } &&
17724          { ac_try='test -s conftest$ac_exeext'
17725   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17726   (eval $ac_try) 2>&5
17727   ac_status=$?
17728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17729   (exit $ac_status); }; }; then
17730   eval "$as_ac_var=yes"
17731 else
17732   echo "$as_me: failed program was:" >&5
17733 sed 's/^/| /' conftest.$ac_ext >&5
17734
17735 eval "$as_ac_var=no"
17736 fi
17737 rm -f conftest.err conftest.$ac_objext \
17738       conftest$ac_exeext conftest.$ac_ext
17739 fi
17740 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17741 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17742 if test `eval echo '${'$as_ac_var'}'` = yes; then
17743   cat >>confdefs.h <<_ACEOF
17744 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17745 _ACEOF
17746
17747 fi
17748 done
17749
17750
17751
17752
17753
17754
17755 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop
17756 do
17757 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17758 echo "$as_me:$LINENO: checking for $ac_func" >&5
17759 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17760 if eval "test \"\${$as_ac_var+set}\" = set"; then
17761   echo $ECHO_N "(cached) $ECHO_C" >&6
17762 else
17763   cat >conftest.$ac_ext <<_ACEOF
17764 /* confdefs.h.  */
17765 _ACEOF
17766 cat confdefs.h >>conftest.$ac_ext
17767 cat >>conftest.$ac_ext <<_ACEOF
17768 /* end confdefs.h.  */
17769 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17770    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17771 #define $ac_func innocuous_$ac_func
17772
17773 /* System header to define __stub macros and hopefully few prototypes,
17774     which can conflict with char $ac_func (); below.
17775     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17776     <limits.h> exists even on freestanding compilers.  */
17777
17778 #ifdef __STDC__
17779 # include <limits.h>
17780 #else
17781 # include <assert.h>
17782 #endif
17783
17784 #undef $ac_func
17785
17786 /* Override any gcc2 internal prototype to avoid an error.  */
17787 #ifdef __cplusplus
17788 extern "C"
17789 {
17790 #endif
17791 /* We use char because int might match the return type of a gcc2
17792    builtin and then its argument prototype would still apply.  */
17793 char $ac_func ();
17794 /* The GNU C library defines this for functions which it implements
17795     to always fail with ENOSYS.  Some functions are actually named
17796     something starting with __ and the normal name is an alias.  */
17797 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17798 choke me
17799 #else
17800 char (*f) () = $ac_func;
17801 #endif
17802 #ifdef __cplusplus
17803 }
17804 #endif
17805
17806 int
17807 main ()
17808 {
17809 return f != $ac_func;
17810   ;
17811   return 0;
17812 }
17813 _ACEOF
17814 rm -f conftest.$ac_objext conftest$ac_exeext
17815 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17816   (eval $ac_link) 2>conftest.er1
17817   ac_status=$?
17818   grep -v '^ *+' conftest.er1 >conftest.err
17819   rm -f conftest.er1
17820   cat conftest.err >&5
17821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17822   (exit $ac_status); } &&
17823          { ac_try='test -z "$ac_c_werror_flag"
17824                          || test ! -s conftest.err'
17825   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17826   (eval $ac_try) 2>&5
17827   ac_status=$?
17828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17829   (exit $ac_status); }; } &&
17830          { ac_try='test -s conftest$ac_exeext'
17831   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17832   (eval $ac_try) 2>&5
17833   ac_status=$?
17834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17835   (exit $ac_status); }; }; then
17836   eval "$as_ac_var=yes"
17837 else
17838   echo "$as_me: failed program was:" >&5
17839 sed 's/^/| /' conftest.$ac_ext >&5
17840
17841 eval "$as_ac_var=no"
17842 fi
17843 rm -f conftest.err conftest.$ac_objext \
17844       conftest$ac_exeext conftest.$ac_ext
17845 fi
17846 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17847 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17848 if test `eval echo '${'$as_ac_var'}'` = yes; then
17849   cat >>confdefs.h <<_ACEOF
17850 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17851 _ACEOF
17852
17853 fi
17854 done
17855
17856
17857 ol_link_ipv6=no
17858 if test $ac_cv_func_getaddrinfo = no || test $ac_cv_func_inet_ntop = no ; then
17859         if test $ol_enable_ipv6 = yes ; then
17860                 { { echo "$as_me:$LINENO: error: IPv6 support requires getaddrinfo() and inet_ntop()" >&5
17861 echo "$as_me: error: IPv6 support requires getaddrinfo() and inet_ntop()" >&2;}
17862    { (exit 1); exit 1; }; }
17863         fi
17864 elif test $ol_enable_ipv6 != no ; then
17865         echo "$as_me:$LINENO: checking INET6_ADDRSTRLEN" >&5
17866 echo $ECHO_N "checking INET6_ADDRSTRLEN... $ECHO_C" >&6
17867 if test "${ol_cv_inet6_addrstrlen+set}" = set; then
17868   echo $ECHO_N "(cached) $ECHO_C" >&6
17869 else
17870
17871                 cat >conftest.$ac_ext <<_ACEOF
17872 /* confdefs.h.  */
17873 _ACEOF
17874 cat confdefs.h >>conftest.$ac_ext
17875 cat >>conftest.$ac_ext <<_ACEOF
17876 /* end confdefs.h.  */
17877
17878 #                       include <netinet/in.h>
17879 #                       ifdef INET6_ADDRSTRLEN
17880                                 __has_inet6_addrstrlen__;
17881 #                       endif
17882
17883 _ACEOF
17884 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17885   $EGREP "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
17886   ol_cv_inet6_addrstrlen=yes
17887 else
17888   ol_cv_inet6_addrstrlen=no
17889 fi
17890 rm -f conftest*
17891
17892 fi
17893 echo "$as_me:$LINENO: result: $ol_cv_inet6_addrstrlen" >&5
17894 echo "${ECHO_T}$ol_cv_inet6_addrstrlen" >&6
17895
17896
17897         echo "$as_me:$LINENO: checking struct sockaddr_storage" >&5
17898 echo $ECHO_N "checking struct sockaddr_storage... $ECHO_C" >&6
17899 if test "${ol_cv_struct_sockaddr_storage+set}" = set; then
17900   echo $ECHO_N "(cached) $ECHO_C" >&6
17901 else
17902
17903                 cat >conftest.$ac_ext <<_ACEOF
17904 /* confdefs.h.  */
17905 _ACEOF
17906 cat confdefs.h >>conftest.$ac_ext
17907 cat >>conftest.$ac_ext <<_ACEOF
17908 /* end confdefs.h.  */
17909
17910 #include <sys/types.h>
17911 #include <sys/socket.h>
17912
17913 int
17914 main ()
17915 {
17916
17917                         struct sockaddr_storage ss;
17918
17919   ;
17920   return 0;
17921 }
17922 _ACEOF
17923 rm -f conftest.$ac_objext
17924 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17925   (eval $ac_compile) 2>conftest.er1
17926   ac_status=$?
17927   grep -v '^ *+' conftest.er1 >conftest.err
17928   rm -f conftest.er1
17929   cat conftest.err >&5
17930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17931   (exit $ac_status); } &&
17932          { ac_try='test -z "$ac_c_werror_flag"
17933                          || test ! -s conftest.err'
17934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17935   (eval $ac_try) 2>&5
17936   ac_status=$?
17937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17938   (exit $ac_status); }; } &&
17939          { ac_try='test -s conftest.$ac_objext'
17940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17941   (eval $ac_try) 2>&5
17942   ac_status=$?
17943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17944   (exit $ac_status); }; }; then
17945   ol_cv_struct_sockaddr_storage=yes
17946 else
17947   echo "$as_me: failed program was:" >&5
17948 sed 's/^/| /' conftest.$ac_ext >&5
17949
17950 ol_cv_struct_sockaddr_storage=no
17951 fi
17952 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17953 fi
17954 echo "$as_me:$LINENO: result: $ol_cv_struct_sockaddr_storage" >&5
17955 echo "${ECHO_T}$ol_cv_struct_sockaddr_storage" >&6
17956
17957         if test $ol_cv_inet6_addrstrlen = yes &&
17958            test $ol_cv_struct_sockaddr_storage = yes ; then
17959                 ol_link_ipv6=yes
17960         elif test $ol_enable_ipv6 = yes &&
17961              test $ol_cv_inet6_addrstrlen = no ; then
17962                 { { echo "$as_me:$LINENO: error: IPv6 support requires INET6_ADDRSTRLEN" >&5
17963 echo "$as_me: error: IPv6 support requires INET6_ADDRSTRLEN" >&2;}
17964    { (exit 1); exit 1; }; }
17965         elif test $ol_enable_ipv6 = yes &&
17966              test $ol_cv_struct_sockaddr_storage = no ; then
17967                 { { echo "$as_me:$LINENO: error: IPv6 support requires struct sockaddr_storage" >&5
17968 echo "$as_me: error: IPv6 support requires struct sockaddr_storage" >&2;}
17969    { (exit 1); exit 1; }; }
17970         fi
17971 fi
17972
17973 if test $ol_enable_local != no ; then
17974
17975 for ac_header in sys/un.h
17976 do
17977 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17978 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17979   echo "$as_me:$LINENO: checking for $ac_header" >&5
17980 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17981 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17982   echo $ECHO_N "(cached) $ECHO_C" >&6
17983 fi
17984 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17985 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17986 else
17987   # Is the header compilable?
17988 echo "$as_me:$LINENO: checking $ac_header usability" >&5
17989 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17990 cat >conftest.$ac_ext <<_ACEOF
17991 /* confdefs.h.  */
17992 _ACEOF
17993 cat confdefs.h >>conftest.$ac_ext
17994 cat >>conftest.$ac_ext <<_ACEOF
17995 /* end confdefs.h.  */
17996 $ac_includes_default
17997 #include <$ac_header>
17998 _ACEOF
17999 rm -f conftest.$ac_objext
18000 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18001   (eval $ac_compile) 2>conftest.er1
18002   ac_status=$?
18003   grep -v '^ *+' conftest.er1 >conftest.err
18004   rm -f conftest.er1
18005   cat conftest.err >&5
18006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18007   (exit $ac_status); } &&
18008          { ac_try='test -z "$ac_c_werror_flag"
18009                          || test ! -s conftest.err'
18010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18011   (eval $ac_try) 2>&5
18012   ac_status=$?
18013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18014   (exit $ac_status); }; } &&
18015          { ac_try='test -s conftest.$ac_objext'
18016   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18017   (eval $ac_try) 2>&5
18018   ac_status=$?
18019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18020   (exit $ac_status); }; }; then
18021   ac_header_compiler=yes
18022 else
18023   echo "$as_me: failed program was:" >&5
18024 sed 's/^/| /' conftest.$ac_ext >&5
18025
18026 ac_header_compiler=no
18027 fi
18028 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18029 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18030 echo "${ECHO_T}$ac_header_compiler" >&6
18031
18032 # Is the header present?
18033 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18034 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18035 cat >conftest.$ac_ext <<_ACEOF
18036 /* confdefs.h.  */
18037 _ACEOF
18038 cat confdefs.h >>conftest.$ac_ext
18039 cat >>conftest.$ac_ext <<_ACEOF
18040 /* end confdefs.h.  */
18041 #include <$ac_header>
18042 _ACEOF
18043 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18044   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18045   ac_status=$?
18046   grep -v '^ *+' conftest.er1 >conftest.err
18047   rm -f conftest.er1
18048   cat conftest.err >&5
18049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18050   (exit $ac_status); } >/dev/null; then
18051   if test -s conftest.err; then
18052     ac_cpp_err=$ac_c_preproc_warn_flag
18053     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18054   else
18055     ac_cpp_err=
18056   fi
18057 else
18058   ac_cpp_err=yes
18059 fi
18060 if test -z "$ac_cpp_err"; then
18061   ac_header_preproc=yes
18062 else
18063   echo "$as_me: failed program was:" >&5
18064 sed 's/^/| /' conftest.$ac_ext >&5
18065
18066   ac_header_preproc=no
18067 fi
18068 rm -f conftest.err conftest.$ac_ext
18069 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18070 echo "${ECHO_T}$ac_header_preproc" >&6
18071
18072 # So?  What about this header?
18073 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18074   yes:no: )
18075     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18076 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18077     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18078 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18079     ac_header_preproc=yes
18080     ;;
18081   no:yes:* )
18082     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18083 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18084     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18085 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18086     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18087 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18088     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18089 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18090     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18091 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18092     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18093 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18094     (
18095       cat <<\_ASBOX
18096 ## --------------------------------------------- ##
18097 ## Report this to <http://www.openldap.org/its/> ##
18098 ## --------------------------------------------- ##
18099 _ASBOX
18100     ) |
18101       sed "s/^/$as_me: WARNING:     /" >&2
18102     ;;
18103 esac
18104 echo "$as_me:$LINENO: checking for $ac_header" >&5
18105 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18106 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18107   echo $ECHO_N "(cached) $ECHO_C" >&6
18108 else
18109   eval "$as_ac_Header=\$ac_header_preproc"
18110 fi
18111 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18112 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18113
18114 fi
18115 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18116   cat >>confdefs.h <<_ACEOF
18117 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18118 _ACEOF
18119
18120 fi
18121
18122 done
18123
18124
18125         if test $ol_enable_local = auto ; then
18126                 ol_enable_local=$ac_cv_header_sys_un_h
18127         elif test $ac_cv_header_sys_un_h = no ; then
18128                 { { echo "$as_me:$LINENO: error: AF_LOCAL domain support requires sys/un.h" >&5
18129 echo "$as_me: error: AF_LOCAL domain support requires sys/un.h" >&2;}
18130    { (exit 1); exit 1; }; }
18131         fi
18132 fi
18133
18134 ol_link_kbind=no
18135 ol_link_krb5=no
18136 ol_link_krb4=no
18137
18138 case $ol_with_kerberos in yes | auto | k5 | k5only | k425)
18139
18140
18141 for ac_header in krb5.h
18142 do
18143 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18144 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18145   echo "$as_me:$LINENO: checking for $ac_header" >&5
18146 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18147 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18148   echo $ECHO_N "(cached) $ECHO_C" >&6
18149 fi
18150 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18151 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18152 else
18153   # Is the header compilable?
18154 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18155 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18156 cat >conftest.$ac_ext <<_ACEOF
18157 /* confdefs.h.  */
18158 _ACEOF
18159 cat confdefs.h >>conftest.$ac_ext
18160 cat >>conftest.$ac_ext <<_ACEOF
18161 /* end confdefs.h.  */
18162 $ac_includes_default
18163 #include <$ac_header>
18164 _ACEOF
18165 rm -f conftest.$ac_objext
18166 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18167   (eval $ac_compile) 2>conftest.er1
18168   ac_status=$?
18169   grep -v '^ *+' conftest.er1 >conftest.err
18170   rm -f conftest.er1
18171   cat conftest.err >&5
18172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18173   (exit $ac_status); } &&
18174          { ac_try='test -z "$ac_c_werror_flag"
18175                          || test ! -s conftest.err'
18176   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18177   (eval $ac_try) 2>&5
18178   ac_status=$?
18179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18180   (exit $ac_status); }; } &&
18181          { ac_try='test -s conftest.$ac_objext'
18182   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18183   (eval $ac_try) 2>&5
18184   ac_status=$?
18185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18186   (exit $ac_status); }; }; then
18187   ac_header_compiler=yes
18188 else
18189   echo "$as_me: failed program was:" >&5
18190 sed 's/^/| /' conftest.$ac_ext >&5
18191
18192 ac_header_compiler=no
18193 fi
18194 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18195 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18196 echo "${ECHO_T}$ac_header_compiler" >&6
18197
18198 # Is the header present?
18199 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18200 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18201 cat >conftest.$ac_ext <<_ACEOF
18202 /* confdefs.h.  */
18203 _ACEOF
18204 cat confdefs.h >>conftest.$ac_ext
18205 cat >>conftest.$ac_ext <<_ACEOF
18206 /* end confdefs.h.  */
18207 #include <$ac_header>
18208 _ACEOF
18209 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18210   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18211   ac_status=$?
18212   grep -v '^ *+' conftest.er1 >conftest.err
18213   rm -f conftest.er1
18214   cat conftest.err >&5
18215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18216   (exit $ac_status); } >/dev/null; then
18217   if test -s conftest.err; then
18218     ac_cpp_err=$ac_c_preproc_warn_flag
18219     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18220   else
18221     ac_cpp_err=
18222   fi
18223 else
18224   ac_cpp_err=yes
18225 fi
18226 if test -z "$ac_cpp_err"; then
18227   ac_header_preproc=yes
18228 else
18229   echo "$as_me: failed program was:" >&5
18230 sed 's/^/| /' conftest.$ac_ext >&5
18231
18232   ac_header_preproc=no
18233 fi
18234 rm -f conftest.err conftest.$ac_ext
18235 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18236 echo "${ECHO_T}$ac_header_preproc" >&6
18237
18238 # So?  What about this header?
18239 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18240   yes:no: )
18241     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18242 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18243     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18244 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18245     ac_header_preproc=yes
18246     ;;
18247   no:yes:* )
18248     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18249 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18250     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18251 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18252     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18253 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18254     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18255 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18256     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18257 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18258     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18259 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18260     (
18261       cat <<\_ASBOX
18262 ## --------------------------------------------- ##
18263 ## Report this to <http://www.openldap.org/its/> ##
18264 ## --------------------------------------------- ##
18265 _ASBOX
18266     ) |
18267       sed "s/^/$as_me: WARNING:     /" >&2
18268     ;;
18269 esac
18270 echo "$as_me:$LINENO: checking for $ac_header" >&5
18271 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18272 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18273   echo $ECHO_N "(cached) $ECHO_C" >&6
18274 else
18275   eval "$as_ac_Header=\$ac_header_preproc"
18276 fi
18277 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18278 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18279
18280 fi
18281 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18282   cat >>confdefs.h <<_ACEOF
18283 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18284 _ACEOF
18285
18286 fi
18287
18288 done
18289
18290
18291         if test $ac_cv_header_krb5_h = yes ; then
18292
18293 for ac_header in heim_err.h
18294 do
18295 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18296 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18297   echo "$as_me:$LINENO: checking for $ac_header" >&5
18298 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18299 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18300   echo $ECHO_N "(cached) $ECHO_C" >&6
18301 fi
18302 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18303 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18304 else
18305   # Is the header compilable?
18306 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18307 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18308 cat >conftest.$ac_ext <<_ACEOF
18309 /* confdefs.h.  */
18310 _ACEOF
18311 cat confdefs.h >>conftest.$ac_ext
18312 cat >>conftest.$ac_ext <<_ACEOF
18313 /* end confdefs.h.  */
18314 $ac_includes_default
18315 #include <$ac_header>
18316 _ACEOF
18317 rm -f conftest.$ac_objext
18318 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18319   (eval $ac_compile) 2>conftest.er1
18320   ac_status=$?
18321   grep -v '^ *+' conftest.er1 >conftest.err
18322   rm -f conftest.er1
18323   cat conftest.err >&5
18324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18325   (exit $ac_status); } &&
18326          { ac_try='test -z "$ac_c_werror_flag"
18327                          || test ! -s conftest.err'
18328   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18329   (eval $ac_try) 2>&5
18330   ac_status=$?
18331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18332   (exit $ac_status); }; } &&
18333          { ac_try='test -s conftest.$ac_objext'
18334   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18335   (eval $ac_try) 2>&5
18336   ac_status=$?
18337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18338   (exit $ac_status); }; }; then
18339   ac_header_compiler=yes
18340 else
18341   echo "$as_me: failed program was:" >&5
18342 sed 's/^/| /' conftest.$ac_ext >&5
18343
18344 ac_header_compiler=no
18345 fi
18346 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18347 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18348 echo "${ECHO_T}$ac_header_compiler" >&6
18349
18350 # Is the header present?
18351 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18352 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18353 cat >conftest.$ac_ext <<_ACEOF
18354 /* confdefs.h.  */
18355 _ACEOF
18356 cat confdefs.h >>conftest.$ac_ext
18357 cat >>conftest.$ac_ext <<_ACEOF
18358 /* end confdefs.h.  */
18359 #include <$ac_header>
18360 _ACEOF
18361 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18362   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18363   ac_status=$?
18364   grep -v '^ *+' conftest.er1 >conftest.err
18365   rm -f conftest.er1
18366   cat conftest.err >&5
18367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18368   (exit $ac_status); } >/dev/null; then
18369   if test -s conftest.err; then
18370     ac_cpp_err=$ac_c_preproc_warn_flag
18371     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18372   else
18373     ac_cpp_err=
18374   fi
18375 else
18376   ac_cpp_err=yes
18377 fi
18378 if test -z "$ac_cpp_err"; then
18379   ac_header_preproc=yes
18380 else
18381   echo "$as_me: failed program was:" >&5
18382 sed 's/^/| /' conftest.$ac_ext >&5
18383
18384   ac_header_preproc=no
18385 fi
18386 rm -f conftest.err conftest.$ac_ext
18387 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18388 echo "${ECHO_T}$ac_header_preproc" >&6
18389
18390 # So?  What about this header?
18391 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18392   yes:no: )
18393     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18394 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18395     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18396 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18397     ac_header_preproc=yes
18398     ;;
18399   no:yes:* )
18400     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18401 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18402     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18403 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18404     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18405 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18406     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18407 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18408     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18409 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18410     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18411 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18412     (
18413       cat <<\_ASBOX
18414 ## --------------------------------------------- ##
18415 ## Report this to <http://www.openldap.org/its/> ##
18416 ## --------------------------------------------- ##
18417 _ASBOX
18418     ) |
18419       sed "s/^/$as_me: WARNING:     /" >&2
18420     ;;
18421 esac
18422 echo "$as_me:$LINENO: checking for $ac_header" >&5
18423 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18424 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18425   echo $ECHO_N "(cached) $ECHO_C" >&6
18426 else
18427   eval "$as_ac_Header=\$ac_header_preproc"
18428 fi
18429 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18430 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18431
18432 fi
18433 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18434   cat >>confdefs.h <<_ACEOF
18435 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18436 _ACEOF
18437
18438 fi
18439
18440 done
18441
18442                 if test $ac_cv_header_heim_err_h = yes ; then
18443                         krb5_impl=heimdal
18444                 else
18445                         krb5_impl=mit
18446                 fi
18447
18448                 if test $krb5_impl = mit; then
18449                         echo "$as_me:$LINENO: checking for main in -lk5crypto" >&5
18450 echo $ECHO_N "checking for main in -lk5crypto... $ECHO_C" >&6
18451 if test "${ac_cv_lib_k5crypto_main+set}" = set; then
18452   echo $ECHO_N "(cached) $ECHO_C" >&6
18453 else
18454   ac_check_lib_save_LIBS=$LIBS
18455 LIBS="-lk5crypto  $LIBS"
18456 cat >conftest.$ac_ext <<_ACEOF
18457 /* confdefs.h.  */
18458 _ACEOF
18459 cat confdefs.h >>conftest.$ac_ext
18460 cat >>conftest.$ac_ext <<_ACEOF
18461 /* end confdefs.h.  */
18462
18463
18464 int
18465 main ()
18466 {
18467 main ();
18468   ;
18469   return 0;
18470 }
18471 _ACEOF
18472 rm -f conftest.$ac_objext conftest$ac_exeext
18473 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18474   (eval $ac_link) 2>conftest.er1
18475   ac_status=$?
18476   grep -v '^ *+' conftest.er1 >conftest.err
18477   rm -f conftest.er1
18478   cat conftest.err >&5
18479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18480   (exit $ac_status); } &&
18481          { ac_try='test -z "$ac_c_werror_flag"
18482                          || test ! -s conftest.err'
18483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18484   (eval $ac_try) 2>&5
18485   ac_status=$?
18486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18487   (exit $ac_status); }; } &&
18488          { ac_try='test -s conftest$ac_exeext'
18489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18490   (eval $ac_try) 2>&5
18491   ac_status=$?
18492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18493   (exit $ac_status); }; }; then
18494   ac_cv_lib_k5crypto_main=yes
18495 else
18496   echo "$as_me: failed program was:" >&5
18497 sed 's/^/| /' conftest.$ac_ext >&5
18498
18499 ac_cv_lib_k5crypto_main=no
18500 fi
18501 rm -f conftest.err conftest.$ac_objext \
18502       conftest$ac_exeext conftest.$ac_ext
18503 LIBS=$ac_check_lib_save_LIBS
18504 fi
18505 echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_main" >&5
18506 echo "${ECHO_T}$ac_cv_lib_k5crypto_main" >&6
18507 if test $ac_cv_lib_k5crypto_main = yes; then
18508   krb5crypto=k5crypto
18509 else
18510   krb5crypto=crypto
18511 fi
18512
18513
18514                         echo "$as_me:$LINENO: checking for main in -lkrb5" >&5
18515 echo $ECHO_N "checking for main in -lkrb5... $ECHO_C" >&6
18516 if test "${ac_cv_lib_krb5_main+set}" = set; then
18517   echo $ECHO_N "(cached) $ECHO_C" >&6
18518 else
18519   ac_check_lib_save_LIBS=$LIBS
18520 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
18521 cat >conftest.$ac_ext <<_ACEOF
18522 /* confdefs.h.  */
18523 _ACEOF
18524 cat confdefs.h >>conftest.$ac_ext
18525 cat >>conftest.$ac_ext <<_ACEOF
18526 /* end confdefs.h.  */
18527
18528
18529 int
18530 main ()
18531 {
18532 main ();
18533   ;
18534   return 0;
18535 }
18536 _ACEOF
18537 rm -f conftest.$ac_objext conftest$ac_exeext
18538 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18539   (eval $ac_link) 2>conftest.er1
18540   ac_status=$?
18541   grep -v '^ *+' conftest.er1 >conftest.err
18542   rm -f conftest.er1
18543   cat conftest.err >&5
18544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18545   (exit $ac_status); } &&
18546          { ac_try='test -z "$ac_c_werror_flag"
18547                          || test ! -s conftest.err'
18548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18549   (eval $ac_try) 2>&5
18550   ac_status=$?
18551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18552   (exit $ac_status); }; } &&
18553          { ac_try='test -s conftest$ac_exeext'
18554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18555   (eval $ac_try) 2>&5
18556   ac_status=$?
18557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18558   (exit $ac_status); }; }; then
18559   ac_cv_lib_krb5_main=yes
18560 else
18561   echo "$as_me: failed program was:" >&5
18562 sed 's/^/| /' conftest.$ac_ext >&5
18563
18564 ac_cv_lib_krb5_main=no
18565 fi
18566 rm -f conftest.err conftest.$ac_objext \
18567       conftest$ac_exeext conftest.$ac_ext
18568 LIBS=$ac_check_lib_save_LIBS
18569 fi
18570 echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_main" >&5
18571 echo "${ECHO_T}$ac_cv_lib_krb5_main" >&6
18572 if test $ac_cv_lib_krb5_main = yes; then
18573   have_krb5=yes
18574                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
18575 else
18576   have_krb5=no
18577 fi
18578
18579
18580                 elif test $krb5_impl = heimdal; then
18581                         echo "$as_me:$LINENO: checking for main in -ldes" >&5
18582 echo $ECHO_N "checking for main in -ldes... $ECHO_C" >&6
18583 if test "${ac_cv_lib_des_main+set}" = set; then
18584   echo $ECHO_N "(cached) $ECHO_C" >&6
18585 else
18586   ac_check_lib_save_LIBS=$LIBS
18587 LIBS="-ldes  $LIBS"
18588 cat >conftest.$ac_ext <<_ACEOF
18589 /* confdefs.h.  */
18590 _ACEOF
18591 cat confdefs.h >>conftest.$ac_ext
18592 cat >>conftest.$ac_ext <<_ACEOF
18593 /* end confdefs.h.  */
18594
18595
18596 int
18597 main ()
18598 {
18599 main ();
18600   ;
18601   return 0;
18602 }
18603 _ACEOF
18604 rm -f conftest.$ac_objext conftest$ac_exeext
18605 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18606   (eval $ac_link) 2>conftest.er1
18607   ac_status=$?
18608   grep -v '^ *+' conftest.er1 >conftest.err
18609   rm -f conftest.er1
18610   cat conftest.err >&5
18611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18612   (exit $ac_status); } &&
18613          { ac_try='test -z "$ac_c_werror_flag"
18614                          || test ! -s conftest.err'
18615   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18616   (eval $ac_try) 2>&5
18617   ac_status=$?
18618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18619   (exit $ac_status); }; } &&
18620          { ac_try='test -s conftest$ac_exeext'
18621   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18622   (eval $ac_try) 2>&5
18623   ac_status=$?
18624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18625   (exit $ac_status); }; }; then
18626   ac_cv_lib_des_main=yes
18627 else
18628   echo "$as_me: failed program was:" >&5
18629 sed 's/^/| /' conftest.$ac_ext >&5
18630
18631 ac_cv_lib_des_main=no
18632 fi
18633 rm -f conftest.err conftest.$ac_objext \
18634       conftest$ac_exeext conftest.$ac_ext
18635 LIBS=$ac_check_lib_save_LIBS
18636 fi
18637 echo "$as_me:$LINENO: result: $ac_cv_lib_des_main" >&5
18638 echo "${ECHO_T}$ac_cv_lib_des_main" >&6
18639 if test $ac_cv_lib_des_main = yes; then
18640   krb5crypto=des
18641 else
18642   krb5crypto=crypto
18643 fi
18644
18645
18646                         echo "$as_me:$LINENO: checking for main in -lkrb5" >&5
18647 echo $ECHO_N "checking for main in -lkrb5... $ECHO_C" >&6
18648 if test "${ac_cv_lib_krb5_main+set}" = set; then
18649   echo $ECHO_N "(cached) $ECHO_C" >&6
18650 else
18651   ac_check_lib_save_LIBS=$LIBS
18652 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
18653 cat >conftest.$ac_ext <<_ACEOF
18654 /* confdefs.h.  */
18655 _ACEOF
18656 cat confdefs.h >>conftest.$ac_ext
18657 cat >>conftest.$ac_ext <<_ACEOF
18658 /* end confdefs.h.  */
18659
18660
18661 int
18662 main ()
18663 {
18664 main ();
18665   ;
18666   return 0;
18667 }
18668 _ACEOF
18669 rm -f conftest.$ac_objext conftest$ac_exeext
18670 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18671   (eval $ac_link) 2>conftest.er1
18672   ac_status=$?
18673   grep -v '^ *+' conftest.er1 >conftest.err
18674   rm -f conftest.er1
18675   cat conftest.err >&5
18676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18677   (exit $ac_status); } &&
18678          { ac_try='test -z "$ac_c_werror_flag"
18679                          || test ! -s conftest.err'
18680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18681   (eval $ac_try) 2>&5
18682   ac_status=$?
18683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18684   (exit $ac_status); }; } &&
18685          { ac_try='test -s conftest$ac_exeext'
18686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18687   (eval $ac_try) 2>&5
18688   ac_status=$?
18689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18690   (exit $ac_status); }; }; then
18691   ac_cv_lib_krb5_main=yes
18692 else
18693   echo "$as_me: failed program was:" >&5
18694 sed 's/^/| /' conftest.$ac_ext >&5
18695
18696 ac_cv_lib_krb5_main=no
18697 fi
18698 rm -f conftest.err conftest.$ac_objext \
18699       conftest$ac_exeext conftest.$ac_ext
18700 LIBS=$ac_check_lib_save_LIBS
18701 fi
18702 echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_main" >&5
18703 echo "${ECHO_T}$ac_cv_lib_krb5_main" >&6
18704 if test $ac_cv_lib_krb5_main = yes; then
18705   have_krb5=yes
18706                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
18707 else
18708   have_krb5=no
18709 fi
18710
18711
18712
18713 cat >>confdefs.h <<\_ACEOF
18714 #define HAVE_HEIMDAL_KERBEROS 1
18715 _ACEOF
18716
18717
18718                 else
18719                         have_krb5=no
18720                         { echo "$as_me:$LINENO: WARNING: Unrecognized Kerberos5 Implementation" >&5
18721 echo "$as_me: WARNING: Unrecognized Kerberos5 Implementation" >&2;}
18722                 fi
18723
18724                 if test $have_krb5 = yes ; then
18725                         ol_link_krb5=yes
18726
18727
18728 cat >>confdefs.h <<\_ACEOF
18729 #define HAVE_KRB5 1
18730 _ACEOF
18731
18732
18733                         if test $ol_with_kerberos = k5only ; then
18734                                 ol_with_kerberos=found
18735                         fi
18736
18737                 elif test $ol_with_kerberos != auto ; then
18738                         { { echo "$as_me:$LINENO: error: Required Kerberos 5 support not available" >&5
18739 echo "$as_me: error: Required Kerberos 5 support not available" >&2;}
18740    { (exit 1); exit 1; }; }
18741                 fi
18742
18743         fi
18744         ;;
18745 esac
18746
18747 if test $ol_link_krb5 = yes &&
18748    { test $ol_with_kerberos = yes ||
18749      test $ol_with_kerberos = auto ||
18750      test $ol_with_kerberos = k425; }; then
18751
18752
18753
18754 for ac_header in kerberosIV/krb.h kerberosIV/des.h
18755 do
18756 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18757 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18758   echo "$as_me:$LINENO: checking for $ac_header" >&5
18759 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18760 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18761   echo $ECHO_N "(cached) $ECHO_C" >&6
18762 fi
18763 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18764 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18765 else
18766   # Is the header compilable?
18767 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18768 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18769 cat >conftest.$ac_ext <<_ACEOF
18770 /* confdefs.h.  */
18771 _ACEOF
18772 cat confdefs.h >>conftest.$ac_ext
18773 cat >>conftest.$ac_ext <<_ACEOF
18774 /* end confdefs.h.  */
18775 $ac_includes_default
18776 #include <$ac_header>
18777 _ACEOF
18778 rm -f conftest.$ac_objext
18779 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18780   (eval $ac_compile) 2>conftest.er1
18781   ac_status=$?
18782   grep -v '^ *+' conftest.er1 >conftest.err
18783   rm -f conftest.er1
18784   cat conftest.err >&5
18785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18786   (exit $ac_status); } &&
18787          { ac_try='test -z "$ac_c_werror_flag"
18788                          || test ! -s conftest.err'
18789   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18790   (eval $ac_try) 2>&5
18791   ac_status=$?
18792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18793   (exit $ac_status); }; } &&
18794          { ac_try='test -s conftest.$ac_objext'
18795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18796   (eval $ac_try) 2>&5
18797   ac_status=$?
18798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18799   (exit $ac_status); }; }; then
18800   ac_header_compiler=yes
18801 else
18802   echo "$as_me: failed program was:" >&5
18803 sed 's/^/| /' conftest.$ac_ext >&5
18804
18805 ac_header_compiler=no
18806 fi
18807 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18808 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18809 echo "${ECHO_T}$ac_header_compiler" >&6
18810
18811 # Is the header present?
18812 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18813 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18814 cat >conftest.$ac_ext <<_ACEOF
18815 /* confdefs.h.  */
18816 _ACEOF
18817 cat confdefs.h >>conftest.$ac_ext
18818 cat >>conftest.$ac_ext <<_ACEOF
18819 /* end confdefs.h.  */
18820 #include <$ac_header>
18821 _ACEOF
18822 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18823   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18824   ac_status=$?
18825   grep -v '^ *+' conftest.er1 >conftest.err
18826   rm -f conftest.er1
18827   cat conftest.err >&5
18828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18829   (exit $ac_status); } >/dev/null; then
18830   if test -s conftest.err; then
18831     ac_cpp_err=$ac_c_preproc_warn_flag
18832     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18833   else
18834     ac_cpp_err=
18835   fi
18836 else
18837   ac_cpp_err=yes
18838 fi
18839 if test -z "$ac_cpp_err"; then
18840   ac_header_preproc=yes
18841 else
18842   echo "$as_me: failed program was:" >&5
18843 sed 's/^/| /' conftest.$ac_ext >&5
18844
18845   ac_header_preproc=no
18846 fi
18847 rm -f conftest.err conftest.$ac_ext
18848 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18849 echo "${ECHO_T}$ac_header_preproc" >&6
18850
18851 # So?  What about this header?
18852 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18853   yes:no: )
18854     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18855 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18856     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18857 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18858     ac_header_preproc=yes
18859     ;;
18860   no:yes:* )
18861     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18862 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18863     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18864 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18865     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18866 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18867     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18868 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18869     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18870 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18871     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18872 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18873     (
18874       cat <<\_ASBOX
18875 ## --------------------------------------------- ##
18876 ## Report this to <http://www.openldap.org/its/> ##
18877 ## --------------------------------------------- ##
18878 _ASBOX
18879     ) |
18880       sed "s/^/$as_me: WARNING:     /" >&2
18881     ;;
18882 esac
18883 echo "$as_me:$LINENO: checking for $ac_header" >&5
18884 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18885 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18886   echo $ECHO_N "(cached) $ECHO_C" >&6
18887 else
18888   eval "$as_ac_Header=\$ac_header_preproc"
18889 fi
18890 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18891 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18892
18893 fi
18894 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18895   cat >>confdefs.h <<_ACEOF
18896 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18897 _ACEOF
18898
18899 fi
18900
18901 done
18902
18903
18904         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
18905                 if test $krb5_impl = mit; then
18906                         echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
18907 echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6
18908 if test "${ac_cv_lib_krb4_main+set}" = set; then
18909   echo $ECHO_N "(cached) $ECHO_C" >&6
18910 else
18911   ac_check_lib_save_LIBS=$LIBS
18912 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
18913 cat >conftest.$ac_ext <<_ACEOF
18914 /* confdefs.h.  */
18915 _ACEOF
18916 cat confdefs.h >>conftest.$ac_ext
18917 cat >>conftest.$ac_ext <<_ACEOF
18918 /* end confdefs.h.  */
18919
18920
18921 int
18922 main ()
18923 {
18924 main ();
18925   ;
18926   return 0;
18927 }
18928 _ACEOF
18929 rm -f conftest.$ac_objext conftest$ac_exeext
18930 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18931   (eval $ac_link) 2>conftest.er1
18932   ac_status=$?
18933   grep -v '^ *+' conftest.er1 >conftest.err
18934   rm -f conftest.er1
18935   cat conftest.err >&5
18936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18937   (exit $ac_status); } &&
18938          { ac_try='test -z "$ac_c_werror_flag"
18939                          || test ! -s conftest.err'
18940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18941   (eval $ac_try) 2>&5
18942   ac_status=$?
18943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18944   (exit $ac_status); }; } &&
18945          { ac_try='test -s conftest$ac_exeext'
18946   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18947   (eval $ac_try) 2>&5
18948   ac_status=$?
18949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18950   (exit $ac_status); }; }; then
18951   ac_cv_lib_krb4_main=yes
18952 else
18953   echo "$as_me: failed program was:" >&5
18954 sed 's/^/| /' conftest.$ac_ext >&5
18955
18956 ac_cv_lib_krb4_main=no
18957 fi
18958 rm -f conftest.err conftest.$ac_objext \
18959       conftest$ac_exeext conftest.$ac_ext
18960 LIBS=$ac_check_lib_save_LIBS
18961 fi
18962 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5
18963 echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6
18964 if test $ac_cv_lib_krb4_main = yes; then
18965   have_k425=yes
18966                                 KRB4_LIBS="-lkrb4 -ldes425"
18967 else
18968   have_k425=no
18969 fi
18970
18971
18972                 elif test $krb5_impl = heimdal; then
18973                         echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
18974 echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6
18975 if test "${ac_cv_lib_krb4_main+set}" = set; then
18976   echo $ECHO_N "(cached) $ECHO_C" >&6
18977 else
18978   ac_check_lib_save_LIBS=$LIBS
18979 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
18980 cat >conftest.$ac_ext <<_ACEOF
18981 /* confdefs.h.  */
18982 _ACEOF
18983 cat confdefs.h >>conftest.$ac_ext
18984 cat >>conftest.$ac_ext <<_ACEOF
18985 /* end confdefs.h.  */
18986
18987
18988 int
18989 main ()
18990 {
18991 main ();
18992   ;
18993   return 0;
18994 }
18995 _ACEOF
18996 rm -f conftest.$ac_objext conftest$ac_exeext
18997 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18998   (eval $ac_link) 2>conftest.er1
18999   ac_status=$?
19000   grep -v '^ *+' conftest.er1 >conftest.err
19001   rm -f conftest.er1
19002   cat conftest.err >&5
19003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19004   (exit $ac_status); } &&
19005          { ac_try='test -z "$ac_c_werror_flag"
19006                          || test ! -s conftest.err'
19007   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19008   (eval $ac_try) 2>&5
19009   ac_status=$?
19010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19011   (exit $ac_status); }; } &&
19012          { ac_try='test -s conftest$ac_exeext'
19013   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19014   (eval $ac_try) 2>&5
19015   ac_status=$?
19016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19017   (exit $ac_status); }; }; then
19018   ac_cv_lib_krb4_main=yes
19019 else
19020   echo "$as_me: failed program was:" >&5
19021 sed 's/^/| /' conftest.$ac_ext >&5
19022
19023 ac_cv_lib_krb4_main=no
19024 fi
19025 rm -f conftest.err conftest.$ac_objext \
19026       conftest$ac_exeext conftest.$ac_ext
19027 LIBS=$ac_check_lib_save_LIBS
19028 fi
19029 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5
19030 echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6
19031 if test $ac_cv_lib_krb4_main = yes; then
19032   have_k425=yes
19033                                 KRB4_LIBS="-lkrb4"
19034 else
19035   have_k425=no
19036 fi
19037
19038
19039                 else
19040                         have_425=no
19041                         { echo "$as_me:$LINENO: WARNING: Unrecongized Kerberos V Implementation" >&5
19042 echo "$as_me: WARNING: Unrecongized Kerberos V Implementation" >&2;}
19043                 fi
19044
19045                 if test $have_k425 = yes ; then
19046                         ol_with_kerberos=found
19047                         ol_link_krb4=yes
19048
19049
19050 cat >>confdefs.h <<\_ACEOF
19051 #define HAVE_KRB425 1
19052 _ACEOF
19053
19054
19055 cat >>confdefs.h <<\_ACEOF
19056 #define HAVE_KRB4 1
19057 _ACEOF
19058
19059
19060                         echo "$as_me:$LINENO: checking for des_debug in Kerberos libraries" >&5
19061 echo $ECHO_N "checking for des_debug in Kerberos libraries... $ECHO_C" >&6
19062 if test "${ol_cv_var_des_debug+set}" = set; then
19063   echo $ECHO_N "(cached) $ECHO_C" >&6
19064 else
19065
19066                                                                 save_LIBS="$LIBS"
19067                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
19068                                 cat >conftest.$ac_ext <<_ACEOF
19069 /* confdefs.h.  */
19070 _ACEOF
19071 cat confdefs.h >>conftest.$ac_ext
19072 cat >>conftest.$ac_ext <<_ACEOF
19073 /* end confdefs.h.  */
19074
19075 #include <kerberosIV/krb.h>
19076 #include <kerberosIV/des.h>
19077 extern int des_debug;
19078
19079 int
19080 main ()
19081 {
19082
19083 des_debug = 1;
19084
19085   ;
19086   return 0;
19087 }
19088 _ACEOF
19089 rm -f conftest.$ac_objext conftest$ac_exeext
19090 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19091   (eval $ac_link) 2>conftest.er1
19092   ac_status=$?
19093   grep -v '^ *+' conftest.er1 >conftest.err
19094   rm -f conftest.er1
19095   cat conftest.err >&5
19096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19097   (exit $ac_status); } &&
19098          { ac_try='test -z "$ac_c_werror_flag"
19099                          || test ! -s conftest.err'
19100   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19101   (eval $ac_try) 2>&5
19102   ac_status=$?
19103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19104   (exit $ac_status); }; } &&
19105          { ac_try='test -s conftest$ac_exeext'
19106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19107   (eval $ac_try) 2>&5
19108   ac_status=$?
19109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19110   (exit $ac_status); }; }; then
19111   ol_cv_var_des_debug=yes
19112 else
19113   echo "$as_me: failed program was:" >&5
19114 sed 's/^/| /' conftest.$ac_ext >&5
19115
19116 ol_cv_var_des_debug=no
19117 fi
19118 rm -f conftest.err conftest.$ac_objext \
19119       conftest$ac_exeext conftest.$ac_ext
19120                                                                 LIBS="$save_LIBS"
19121
19122 fi
19123 echo "$as_me:$LINENO: result: $ol_cv_var_des_debug" >&5
19124 echo "${ECHO_T}$ol_cv_var_des_debug" >&6
19125
19126                         if test $ol_cv_var_des_debug = yes ; then
19127
19128 cat >>confdefs.h <<\_ACEOF
19129 #define HAVE_DES_DEBUG 1
19130 _ACEOF
19131
19132                         fi
19133
19134                         LIBS="$save_LIBS"
19135                 fi
19136         fi
19137 fi
19138
19139 if test $ol_link_krb5 = yes ; then
19140         ol_with_kerberos=found
19141 fi
19142
19143 case $ol_with_kerberos in yes | auto | k4 | kth)
19144
19145
19146
19147
19148 for ac_header in krb.h des.h krb-archaeology.h
19149 do
19150 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19151 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19152   echo "$as_me:$LINENO: checking for $ac_header" >&5
19153 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19154 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19155   echo $ECHO_N "(cached) $ECHO_C" >&6
19156 fi
19157 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19158 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19159 else
19160   # Is the header compilable?
19161 echo "$as_me:$LINENO: checking $ac_header usability" >&5
19162 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19163 cat >conftest.$ac_ext <<_ACEOF
19164 /* confdefs.h.  */
19165 _ACEOF
19166 cat confdefs.h >>conftest.$ac_ext
19167 cat >>conftest.$ac_ext <<_ACEOF
19168 /* end confdefs.h.  */
19169 $ac_includes_default
19170 #include <$ac_header>
19171 _ACEOF
19172 rm -f conftest.$ac_objext
19173 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19174   (eval $ac_compile) 2>conftest.er1
19175   ac_status=$?
19176   grep -v '^ *+' conftest.er1 >conftest.err
19177   rm -f conftest.er1
19178   cat conftest.err >&5
19179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19180   (exit $ac_status); } &&
19181          { ac_try='test -z "$ac_c_werror_flag"
19182                          || test ! -s conftest.err'
19183   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19184   (eval $ac_try) 2>&5
19185   ac_status=$?
19186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19187   (exit $ac_status); }; } &&
19188          { ac_try='test -s conftest.$ac_objext'
19189   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19190   (eval $ac_try) 2>&5
19191   ac_status=$?
19192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19193   (exit $ac_status); }; }; then
19194   ac_header_compiler=yes
19195 else
19196   echo "$as_me: failed program was:" >&5
19197 sed 's/^/| /' conftest.$ac_ext >&5
19198
19199 ac_header_compiler=no
19200 fi
19201 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19202 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19203 echo "${ECHO_T}$ac_header_compiler" >&6
19204
19205 # Is the header present?
19206 echo "$as_me:$LINENO: checking $ac_header presence" >&5
19207 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19208 cat >conftest.$ac_ext <<_ACEOF
19209 /* confdefs.h.  */
19210 _ACEOF
19211 cat confdefs.h >>conftest.$ac_ext
19212 cat >>conftest.$ac_ext <<_ACEOF
19213 /* end confdefs.h.  */
19214 #include <$ac_header>
19215 _ACEOF
19216 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19217   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19218   ac_status=$?
19219   grep -v '^ *+' conftest.er1 >conftest.err
19220   rm -f conftest.er1
19221   cat conftest.err >&5
19222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19223   (exit $ac_status); } >/dev/null; then
19224   if test -s conftest.err; then
19225     ac_cpp_err=$ac_c_preproc_warn_flag
19226     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19227   else
19228     ac_cpp_err=
19229   fi
19230 else
19231   ac_cpp_err=yes
19232 fi
19233 if test -z "$ac_cpp_err"; then
19234   ac_header_preproc=yes
19235 else
19236   echo "$as_me: failed program was:" >&5
19237 sed 's/^/| /' conftest.$ac_ext >&5
19238
19239   ac_header_preproc=no
19240 fi
19241 rm -f conftest.err conftest.$ac_ext
19242 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19243 echo "${ECHO_T}$ac_header_preproc" >&6
19244
19245 # So?  What about this header?
19246 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19247   yes:no: )
19248     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19249 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19250     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19251 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19252     ac_header_preproc=yes
19253     ;;
19254   no:yes:* )
19255     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19256 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19257     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19258 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19259     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19260 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19261     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19262 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19263     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19264 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19265     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19266 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19267     (
19268       cat <<\_ASBOX
19269 ## --------------------------------------------- ##
19270 ## Report this to <http://www.openldap.org/its/> ##
19271 ## --------------------------------------------- ##
19272 _ASBOX
19273     ) |
19274       sed "s/^/$as_me: WARNING:     /" >&2
19275     ;;
19276 esac
19277 echo "$as_me:$LINENO: checking for $ac_header" >&5
19278 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19279 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19280   echo $ECHO_N "(cached) $ECHO_C" >&6
19281 else
19282   eval "$as_ac_Header=\$ac_header_preproc"
19283 fi
19284 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19285 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19286
19287 fi
19288 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19289   cat >>confdefs.h <<_ACEOF
19290 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19291 _ACEOF
19292
19293 fi
19294
19295 done
19296
19297
19298         if test $ac_cv_header_krb_h = yes ; then
19299                 echo "$as_me:$LINENO: checking for main in -lkrb" >&5
19300 echo $ECHO_N "checking for main in -lkrb... $ECHO_C" >&6
19301 if test "${ac_cv_lib_krb_main+set}" = set; then
19302   echo $ECHO_N "(cached) $ECHO_C" >&6
19303 else
19304   ac_check_lib_save_LIBS=$LIBS
19305 LIBS="-lkrb -ldes $LIBS"
19306 cat >conftest.$ac_ext <<_ACEOF
19307 /* confdefs.h.  */
19308 _ACEOF
19309 cat confdefs.h >>conftest.$ac_ext
19310 cat >>conftest.$ac_ext <<_ACEOF
19311 /* end confdefs.h.  */
19312
19313
19314 int
19315 main ()
19316 {
19317 main ();
19318   ;
19319   return 0;
19320 }
19321 _ACEOF
19322 rm -f conftest.$ac_objext conftest$ac_exeext
19323 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19324   (eval $ac_link) 2>conftest.er1
19325   ac_status=$?
19326   grep -v '^ *+' conftest.er1 >conftest.err
19327   rm -f conftest.er1
19328   cat conftest.err >&5
19329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19330   (exit $ac_status); } &&
19331          { ac_try='test -z "$ac_c_werror_flag"
19332                          || test ! -s conftest.err'
19333   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19334   (eval $ac_try) 2>&5
19335   ac_status=$?
19336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19337   (exit $ac_status); }; } &&
19338          { ac_try='test -s conftest$ac_exeext'
19339   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19340   (eval $ac_try) 2>&5
19341   ac_status=$?
19342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19343   (exit $ac_status); }; }; then
19344   ac_cv_lib_krb_main=yes
19345 else
19346   echo "$as_me: failed program was:" >&5
19347 sed 's/^/| /' conftest.$ac_ext >&5
19348
19349 ac_cv_lib_krb_main=no
19350 fi
19351 rm -f conftest.err conftest.$ac_objext \
19352       conftest$ac_exeext conftest.$ac_ext
19353 LIBS=$ac_check_lib_save_LIBS
19354 fi
19355 echo "$as_me:$LINENO: result: $ac_cv_lib_krb_main" >&5
19356 echo "${ECHO_T}$ac_cv_lib_krb_main" >&6
19357 if test $ac_cv_lib_krb_main = yes; then
19358   have_k4=yes
19359 else
19360   have_k4=no
19361 fi
19362
19363
19364                 if test $have_k4 = yes ; then
19365                         ol_with_kerberos=found
19366                         ol_link_krb4=yes
19367
19368
19369 cat >>confdefs.h <<\_ACEOF
19370 #define HAVE_KRB4 1
19371 _ACEOF
19372
19373
19374                         KRB4_LIBS="-lkrb -ldes"
19375
19376                         if test $ac_cv_header_krb_archaeology_h = yes ; then
19377
19378 cat >>confdefs.h <<\_ACEOF
19379 #define HAVE_KTH_KERBEROS 1
19380 _ACEOF
19381
19382                         fi
19383                 fi
19384         fi
19385         ;;
19386 esac
19387
19388 if test $ol_link_krb4 = yes && test $ol_enable_kbind != no ; then
19389         ol_link_kbind=yes
19390
19391 elif test $ol_enable_kbind = yes ; then
19392         { { echo "$as_me:$LINENO: error: Kerberos IV detection failed" >&5
19393 echo "$as_me: error: Kerberos IV detection failed" >&2;}
19394    { (exit 1); exit 1; }; }
19395 fi
19396
19397 if test $ol_link_krb4 = yes || test $ol_link_krb5 = yes ; then
19398
19399 cat >>confdefs.h <<\_ACEOF
19400 #define HAVE_KERBEROS 1
19401 _ACEOF
19402
19403
19404 elif test $ol_with_kerberos != auto && test $ol_with_kerberos != no ; then
19405         { { echo "$as_me:$LINENO: error: Kerberos detection failed" >&5
19406 echo "$as_me: error: Kerberos detection failed" >&2;}
19407    { (exit 1); exit 1; }; }
19408 fi
19409
19410
19411 ol_link_tls=no
19412 if test $ol_with_tls != no ; then
19413
19414 for ac_header in openssl/ssl.h
19415 do
19416 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19417 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19418   echo "$as_me:$LINENO: checking for $ac_header" >&5
19419 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19420 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19421   echo $ECHO_N "(cached) $ECHO_C" >&6
19422 fi
19423 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19424 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19425 else
19426   # Is the header compilable?
19427 echo "$as_me:$LINENO: checking $ac_header usability" >&5
19428 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19429 cat >conftest.$ac_ext <<_ACEOF
19430 /* confdefs.h.  */
19431 _ACEOF
19432 cat confdefs.h >>conftest.$ac_ext
19433 cat >>conftest.$ac_ext <<_ACEOF
19434 /* end confdefs.h.  */
19435 $ac_includes_default
19436 #include <$ac_header>
19437 _ACEOF
19438 rm -f conftest.$ac_objext
19439 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19440   (eval $ac_compile) 2>conftest.er1
19441   ac_status=$?
19442   grep -v '^ *+' conftest.er1 >conftest.err
19443   rm -f conftest.er1
19444   cat conftest.err >&5
19445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19446   (exit $ac_status); } &&
19447          { ac_try='test -z "$ac_c_werror_flag"
19448                          || test ! -s conftest.err'
19449   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19450   (eval $ac_try) 2>&5
19451   ac_status=$?
19452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19453   (exit $ac_status); }; } &&
19454          { ac_try='test -s conftest.$ac_objext'
19455   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19456   (eval $ac_try) 2>&5
19457   ac_status=$?
19458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19459   (exit $ac_status); }; }; then
19460   ac_header_compiler=yes
19461 else
19462   echo "$as_me: failed program was:" >&5
19463 sed 's/^/| /' conftest.$ac_ext >&5
19464
19465 ac_header_compiler=no
19466 fi
19467 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19468 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19469 echo "${ECHO_T}$ac_header_compiler" >&6
19470
19471 # Is the header present?
19472 echo "$as_me:$LINENO: checking $ac_header presence" >&5
19473 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19474 cat >conftest.$ac_ext <<_ACEOF
19475 /* confdefs.h.  */
19476 _ACEOF
19477 cat confdefs.h >>conftest.$ac_ext
19478 cat >>conftest.$ac_ext <<_ACEOF
19479 /* end confdefs.h.  */
19480 #include <$ac_header>
19481 _ACEOF
19482 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19483   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19484   ac_status=$?
19485   grep -v '^ *+' conftest.er1 >conftest.err
19486   rm -f conftest.er1
19487   cat conftest.err >&5
19488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19489   (exit $ac_status); } >/dev/null; then
19490   if test -s conftest.err; then
19491     ac_cpp_err=$ac_c_preproc_warn_flag
19492     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19493   else
19494     ac_cpp_err=
19495   fi
19496 else
19497   ac_cpp_err=yes
19498 fi
19499 if test -z "$ac_cpp_err"; then
19500   ac_header_preproc=yes
19501 else
19502   echo "$as_me: failed program was:" >&5
19503 sed 's/^/| /' conftest.$ac_ext >&5
19504
19505   ac_header_preproc=no
19506 fi
19507 rm -f conftest.err conftest.$ac_ext
19508 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19509 echo "${ECHO_T}$ac_header_preproc" >&6
19510
19511 # So?  What about this header?
19512 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19513   yes:no: )
19514     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19515 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19516     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19517 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19518     ac_header_preproc=yes
19519     ;;
19520   no:yes:* )
19521     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19522 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19523     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19524 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19525     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19526 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19527     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19528 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19529     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19530 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19531     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19532 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19533     (
19534       cat <<\_ASBOX
19535 ## --------------------------------------------- ##
19536 ## Report this to <http://www.openldap.org/its/> ##
19537 ## --------------------------------------------- ##
19538 _ASBOX
19539     ) |
19540       sed "s/^/$as_me: WARNING:     /" >&2
19541     ;;
19542 esac
19543 echo "$as_me:$LINENO: checking for $ac_header" >&5
19544 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19545 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19546   echo $ECHO_N "(cached) $ECHO_C" >&6
19547 else
19548   eval "$as_ac_Header=\$ac_header_preproc"
19549 fi
19550 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19551 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19552
19553 fi
19554 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19555   cat >>confdefs.h <<_ACEOF
19556 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19557 _ACEOF
19558
19559 fi
19560
19561 done
19562
19563
19564         if test $ac_cv_header_openssl_ssl_h = yes ; then
19565                 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
19566 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
19567 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
19568   echo $ECHO_N "(cached) $ECHO_C" >&6
19569 else
19570   ac_check_lib_save_LIBS=$LIBS
19571 LIBS="-lssl -lcrypto $LIBS"
19572 cat >conftest.$ac_ext <<_ACEOF
19573 /* confdefs.h.  */
19574 _ACEOF
19575 cat confdefs.h >>conftest.$ac_ext
19576 cat >>conftest.$ac_ext <<_ACEOF
19577 /* end confdefs.h.  */
19578
19579 /* Override any gcc2 internal prototype to avoid an error.  */
19580 #ifdef __cplusplus
19581 extern "C"
19582 #endif
19583 /* We use char because int might match the return type of a gcc2
19584    builtin and then its argument prototype would still apply.  */
19585 char SSL_library_init ();
19586 int
19587 main ()
19588 {
19589 SSL_library_init ();
19590   ;
19591   return 0;
19592 }
19593 _ACEOF
19594 rm -f conftest.$ac_objext conftest$ac_exeext
19595 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19596   (eval $ac_link) 2>conftest.er1
19597   ac_status=$?
19598   grep -v '^ *+' conftest.er1 >conftest.err
19599   rm -f conftest.er1
19600   cat conftest.err >&5
19601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19602   (exit $ac_status); } &&
19603          { ac_try='test -z "$ac_c_werror_flag"
19604                          || test ! -s conftest.err'
19605   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19606   (eval $ac_try) 2>&5
19607   ac_status=$?
19608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19609   (exit $ac_status); }; } &&
19610          { ac_try='test -s conftest$ac_exeext'
19611   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19612   (eval $ac_try) 2>&5
19613   ac_status=$?
19614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19615   (exit $ac_status); }; }; then
19616   ac_cv_lib_ssl_SSL_library_init=yes
19617 else
19618   echo "$as_me: failed program was:" >&5
19619 sed 's/^/| /' conftest.$ac_ext >&5
19620
19621 ac_cv_lib_ssl_SSL_library_init=no
19622 fi
19623 rm -f conftest.err conftest.$ac_objext \
19624       conftest$ac_exeext conftest.$ac_ext
19625 LIBS=$ac_check_lib_save_LIBS
19626 fi
19627 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
19628 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
19629 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
19630   have_openssl=yes
19631                         need_rsaref=no
19632 else
19633   have_openssl=no
19634 fi
19635
19636
19637                 if test $have_openssl = no ; then
19638                         echo "$as_me:$LINENO: checking for ssl3_accept in -lssl" >&5
19639 echo $ECHO_N "checking for ssl3_accept in -lssl... $ECHO_C" >&6
19640 if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then
19641   echo $ECHO_N "(cached) $ECHO_C" >&6
19642 else
19643   ac_check_lib_save_LIBS=$LIBS
19644 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
19645 cat >conftest.$ac_ext <<_ACEOF
19646 /* confdefs.h.  */
19647 _ACEOF
19648 cat confdefs.h >>conftest.$ac_ext
19649 cat >>conftest.$ac_ext <<_ACEOF
19650 /* end confdefs.h.  */
19651
19652 /* Override any gcc2 internal prototype to avoid an error.  */
19653 #ifdef __cplusplus
19654 extern "C"
19655 #endif
19656 /* We use char because int might match the return type of a gcc2
19657    builtin and then its argument prototype would still apply.  */
19658 char ssl3_accept ();
19659 int
19660 main ()
19661 {
19662 ssl3_accept ();
19663   ;
19664   return 0;
19665 }
19666 _ACEOF
19667 rm -f conftest.$ac_objext conftest$ac_exeext
19668 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19669   (eval $ac_link) 2>conftest.er1
19670   ac_status=$?
19671   grep -v '^ *+' conftest.er1 >conftest.err
19672   rm -f conftest.er1
19673   cat conftest.err >&5
19674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19675   (exit $ac_status); } &&
19676          { ac_try='test -z "$ac_c_werror_flag"
19677                          || test ! -s conftest.err'
19678   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19679   (eval $ac_try) 2>&5
19680   ac_status=$?
19681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19682   (exit $ac_status); }; } &&
19683          { ac_try='test -s conftest$ac_exeext'
19684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19685   (eval $ac_try) 2>&5
19686   ac_status=$?
19687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19688   (exit $ac_status); }; }; then
19689   ac_cv_lib_ssl_ssl3_accept=yes
19690 else
19691   echo "$as_me: failed program was:" >&5
19692 sed 's/^/| /' conftest.$ac_ext >&5
19693
19694 ac_cv_lib_ssl_ssl3_accept=no
19695 fi
19696 rm -f conftest.err conftest.$ac_objext \
19697       conftest$ac_exeext conftest.$ac_ext
19698 LIBS=$ac_check_lib_save_LIBS
19699 fi
19700 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_ssl3_accept" >&5
19701 echo "${ECHO_T}$ac_cv_lib_ssl_ssl3_accept" >&6
19702 if test $ac_cv_lib_ssl_ssl3_accept = yes; then
19703   have_openssl=yes
19704                                 need_rsaref=yes
19705 else
19706   have_openssl=no
19707 fi
19708
19709                 fi
19710
19711                 if test $have_openssl = yes ; then
19712                         ol_with_tls=found
19713                         ol_link_tls=yes
19714
19715
19716 cat >>confdefs.h <<\_ACEOF
19717 #define HAVE_OPENSSL 1
19718 _ACEOF
19719
19720
19721                         if test $need_rsaref = yes; then
19722
19723 cat >>confdefs.h <<\_ACEOF
19724 #define HAVE_RSAREF 1
19725 _ACEOF
19726
19727
19728                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
19729                         else
19730                                 TLS_LIBS="-lssl -lcrypto"
19731                         fi
19732                 fi
19733                 echo "$as_me:$LINENO: checking OpenSSL library version (CRL checking capability)" >&5
19734 echo $ECHO_N "checking OpenSSL library version (CRL checking capability)... $ECHO_C" >&6
19735 if test "${ol_cv_ssl_crl_compat+set}" = set; then
19736   echo $ECHO_N "(cached) $ECHO_C" >&6
19737 else
19738
19739         cat >conftest.$ac_ext <<_ACEOF
19740 /* confdefs.h.  */
19741 _ACEOF
19742 cat confdefs.h >>conftest.$ac_ext
19743 cat >>conftest.$ac_ext <<_ACEOF
19744 /* end confdefs.h.  */
19745
19746 #ifdef HAVE_OPENSSL_SSL_H
19747 #include <openssl/ssl.h>
19748 #else
19749 #include <ssl.h>
19750 #endif
19751
19752 /* Require 0.9.7d+ */
19753 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
19754         char *__ssl_compat = "0.9.7d";
19755 #endif
19756
19757 _ACEOF
19758 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19759   $EGREP "__ssl_compat" >/dev/null 2>&1; then
19760   ol_cv_ssl_crl_compat=yes
19761 else
19762   ol_cv_ssl_crl_compat=no
19763 fi
19764 rm -f conftest*
19765
19766 fi
19767 echo "$as_me:$LINENO: result: $ol_cv_ssl_crl_compat" >&5
19768 echo "${ECHO_T}$ol_cv_ssl_crl_compat" >&6
19769
19770                 if test $ol_cv_ssl_crl_compat = no ; then
19771                         ol_link_ssl=no
19772                 else
19773
19774 cat >>confdefs.h <<\_ACEOF
19775 #define HAVE_OPENSSL_CRL 1
19776 _ACEOF
19777
19778                 fi
19779         fi
19780
19781 else
19782         { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5
19783 echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
19784 fi
19785
19786 WITH_TLS=no
19787 if test $ol_link_tls = yes ; then
19788
19789 cat >>confdefs.h <<\_ACEOF
19790 #define HAVE_TLS 1
19791 _ACEOF
19792
19793         WITH_TLS=yes
19794
19795 elif test $ol_with_tls = auto ; then
19796         { echo "$as_me:$LINENO: WARNING: Could not locate TLS/SSL package" >&5
19797 echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;}
19798         { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5
19799 echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
19800
19801 elif test $ol_with_tls != no ; then
19802         { { echo "$as_me:$LINENO: error: Could not locate TLS/SSL package" >&5
19803 echo "$as_me: error: Could not locate TLS/SSL package" >&2;}
19804    { (exit 1); exit 1; }; }
19805 fi
19806
19807 if test $ol_enable_lmpasswd != no; then
19808         if test $ol_link_tls != yes ; then
19809                 { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5
19810 echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;}
19811    { (exit 1); exit 1; }; }
19812         fi
19813
19814
19815 cat >>confdefs.h <<\_ACEOF
19816 #define SLAPD_LMHASH 1
19817 _ACEOF
19818
19819 fi
19820
19821 ol_link_threads=no
19822
19823 case $ol_with_threads in auto | yes | nt)
19824
19825
19826         echo "$as_me:$LINENO: checking for _beginthread" >&5
19827 echo $ECHO_N "checking for _beginthread... $ECHO_C" >&6
19828 if test "${ac_cv_func__beginthread+set}" = set; then
19829   echo $ECHO_N "(cached) $ECHO_C" >&6
19830 else
19831   cat >conftest.$ac_ext <<_ACEOF
19832 /* confdefs.h.  */
19833 _ACEOF
19834 cat confdefs.h >>conftest.$ac_ext
19835 cat >>conftest.$ac_ext <<_ACEOF
19836 /* end confdefs.h.  */
19837 /* Define _beginthread to an innocuous variant, in case <limits.h> declares _beginthread.
19838    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19839 #define _beginthread innocuous__beginthread
19840
19841 /* System header to define __stub macros and hopefully few prototypes,
19842     which can conflict with char _beginthread (); below.
19843     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19844     <limits.h> exists even on freestanding compilers.  */
19845
19846 #ifdef __STDC__
19847 # include <limits.h>
19848 #else
19849 # include <assert.h>
19850 #endif
19851
19852 #undef _beginthread
19853
19854 /* Override any gcc2 internal prototype to avoid an error.  */
19855 #ifdef __cplusplus
19856 extern "C"
19857 {
19858 #endif
19859 /* We use char because int might match the return type of a gcc2
19860    builtin and then its argument prototype would still apply.  */
19861 char _beginthread ();
19862 /* The GNU C library defines this for functions which it implements
19863     to always fail with ENOSYS.  Some functions are actually named
19864     something starting with __ and the normal name is an alias.  */
19865 #if defined (__stub__beginthread) || defined (__stub____beginthread)
19866 choke me
19867 #else
19868 char (*f) () = _beginthread;
19869 #endif
19870 #ifdef __cplusplus
19871 }
19872 #endif
19873
19874 int
19875 main ()
19876 {
19877 return f != _beginthread;
19878   ;
19879   return 0;
19880 }
19881 _ACEOF
19882 rm -f conftest.$ac_objext conftest$ac_exeext
19883 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19884   (eval $ac_link) 2>conftest.er1
19885   ac_status=$?
19886   grep -v '^ *+' conftest.er1 >conftest.err
19887   rm -f conftest.er1
19888   cat conftest.err >&5
19889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19890   (exit $ac_status); } &&
19891          { ac_try='test -z "$ac_c_werror_flag"
19892                          || test ! -s conftest.err'
19893   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19894   (eval $ac_try) 2>&5
19895   ac_status=$?
19896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19897   (exit $ac_status); }; } &&
19898          { ac_try='test -s conftest$ac_exeext'
19899   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19900   (eval $ac_try) 2>&5
19901   ac_status=$?
19902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19903   (exit $ac_status); }; }; then
19904   ac_cv_func__beginthread=yes
19905 else
19906   echo "$as_me: failed program was:" >&5
19907 sed 's/^/| /' conftest.$ac_ext >&5
19908
19909 ac_cv_func__beginthread=no
19910 fi
19911 rm -f conftest.err conftest.$ac_objext \
19912       conftest$ac_exeext conftest.$ac_ext
19913 fi
19914 echo "$as_me:$LINENO: result: $ac_cv_func__beginthread" >&5
19915 echo "${ECHO_T}$ac_cv_func__beginthread" >&6
19916
19917
19918         if test $ac_cv_func__beginthread = yes ; then
19919
19920 cat >>confdefs.h <<\_ACEOF
19921 #define HAVE_NT_THREADS 1
19922 _ACEOF
19923
19924                 ol_cv_nt_threads=yes
19925         fi
19926
19927
19928         if test "$ol_cv_nt_threads" = yes ; then
19929                 ol_link_threads=nt
19930                 ol_with_threads=found
19931                 ol_with_yielding_select=yes
19932
19933
19934 cat >>confdefs.h <<\_ACEOF
19935 #define HAVE_NT_SERVICE_MANAGER 1
19936 _ACEOF
19937
19938
19939 cat >>confdefs.h <<\_ACEOF
19940 #define HAVE_NT_EVENT_LOG 1
19941 _ACEOF
19942
19943         fi
19944
19945         if test $ol_with_threads = nt ; then
19946                 { { echo "$as_me:$LINENO: error: could not locate NT Threads" >&5
19947 echo "$as_me: error: could not locate NT Threads" >&2;}
19948    { (exit 1); exit 1; }; }
19949         fi
19950         ;;
19951 esac
19952
19953 case $ol_with_threads in auto | yes | posix)
19954
19955
19956 for ac_header in pthread.h
19957 do
19958 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19959 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19960   echo "$as_me:$LINENO: checking for $ac_header" >&5
19961 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19962 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19963   echo $ECHO_N "(cached) $ECHO_C" >&6
19964 fi
19965 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19966 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19967 else
19968   # Is the header compilable?
19969 echo "$as_me:$LINENO: checking $ac_header usability" >&5
19970 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19971 cat >conftest.$ac_ext <<_ACEOF
19972 /* confdefs.h.  */
19973 _ACEOF
19974 cat confdefs.h >>conftest.$ac_ext
19975 cat >>conftest.$ac_ext <<_ACEOF
19976 /* end confdefs.h.  */
19977 $ac_includes_default
19978 #include <$ac_header>
19979 _ACEOF
19980 rm -f conftest.$ac_objext
19981 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19982   (eval $ac_compile) 2>conftest.er1
19983   ac_status=$?
19984   grep -v '^ *+' conftest.er1 >conftest.err
19985   rm -f conftest.er1
19986   cat conftest.err >&5
19987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19988   (exit $ac_status); } &&
19989          { ac_try='test -z "$ac_c_werror_flag"
19990                          || test ! -s conftest.err'
19991   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19992   (eval $ac_try) 2>&5
19993   ac_status=$?
19994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19995   (exit $ac_status); }; } &&
19996          { ac_try='test -s conftest.$ac_objext'
19997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19998   (eval $ac_try) 2>&5
19999   ac_status=$?
20000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20001   (exit $ac_status); }; }; then
20002   ac_header_compiler=yes
20003 else
20004   echo "$as_me: failed program was:" >&5
20005 sed 's/^/| /' conftest.$ac_ext >&5
20006
20007 ac_header_compiler=no
20008 fi
20009 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20010 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20011 echo "${ECHO_T}$ac_header_compiler" >&6
20012
20013 # Is the header present?
20014 echo "$as_me:$LINENO: checking $ac_header presence" >&5
20015 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20016 cat >conftest.$ac_ext <<_ACEOF
20017 /* confdefs.h.  */
20018 _ACEOF
20019 cat confdefs.h >>conftest.$ac_ext
20020 cat >>conftest.$ac_ext <<_ACEOF
20021 /* end confdefs.h.  */
20022 #include <$ac_header>
20023 _ACEOF
20024 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20025   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20026   ac_status=$?
20027   grep -v '^ *+' conftest.er1 >conftest.err
20028   rm -f conftest.er1
20029   cat conftest.err >&5
20030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20031   (exit $ac_status); } >/dev/null; then
20032   if test -s conftest.err; then
20033     ac_cpp_err=$ac_c_preproc_warn_flag
20034     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20035   else
20036     ac_cpp_err=
20037   fi
20038 else
20039   ac_cpp_err=yes
20040 fi
20041 if test -z "$ac_cpp_err"; then
20042   ac_header_preproc=yes
20043 else
20044   echo "$as_me: failed program was:" >&5
20045 sed 's/^/| /' conftest.$ac_ext >&5
20046
20047   ac_header_preproc=no
20048 fi
20049 rm -f conftest.err conftest.$ac_ext
20050 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20051 echo "${ECHO_T}$ac_header_preproc" >&6
20052
20053 # So?  What about this header?
20054 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20055   yes:no: )
20056     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20057 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
20058     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20059 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20060     ac_header_preproc=yes
20061     ;;
20062   no:yes:* )
20063     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20064 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
20065     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
20066 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
20067     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20068 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20069     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
20070 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
20071     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20072 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
20073     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20074 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
20075     (
20076       cat <<\_ASBOX
20077 ## --------------------------------------------- ##
20078 ## Report this to <http://www.openldap.org/its/> ##
20079 ## --------------------------------------------- ##
20080 _ASBOX
20081     ) |
20082       sed "s/^/$as_me: WARNING:     /" >&2
20083     ;;
20084 esac
20085 echo "$as_me:$LINENO: checking for $ac_header" >&5
20086 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20087 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20088   echo $ECHO_N "(cached) $ECHO_C" >&6
20089 else
20090   eval "$as_ac_Header=\$ac_header_preproc"
20091 fi
20092 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20093 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20094
20095 fi
20096 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20097   cat >>confdefs.h <<_ACEOF
20098 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20099 _ACEOF
20100
20101 fi
20102
20103 done
20104
20105
20106         if test $ac_cv_header_pthread_h = yes ; then
20107                 echo "$as_me:$LINENO: checking POSIX thread version" >&5
20108 echo $ECHO_N "checking POSIX thread version... $ECHO_C" >&6
20109 if test "${ol_cv_pthread_version+set}" = set; then
20110   echo $ECHO_N "(cached) $ECHO_C" >&6
20111 else
20112
20113         cat >conftest.$ac_ext <<_ACEOF
20114 /* confdefs.h.  */
20115 _ACEOF
20116 cat confdefs.h >>conftest.$ac_ext
20117 cat >>conftest.$ac_ext <<_ACEOF
20118 /* end confdefs.h.  */
20119
20120 #               include <pthread.h>
20121
20122 int
20123 main ()
20124 {
20125
20126                 int i = PTHREAD_CREATE_JOINABLE;
20127
20128   ;
20129   return 0;
20130 }
20131 _ACEOF
20132 rm -f conftest.$ac_objext
20133 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20134   (eval $ac_compile) 2>conftest.er1
20135   ac_status=$?
20136   grep -v '^ *+' conftest.er1 >conftest.err
20137   rm -f conftest.er1
20138   cat conftest.err >&5
20139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20140   (exit $ac_status); } &&
20141          { ac_try='test -z "$ac_c_werror_flag"
20142                          || test ! -s conftest.err'
20143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20144   (eval $ac_try) 2>&5
20145   ac_status=$?
20146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20147   (exit $ac_status); }; } &&
20148          { ac_try='test -s conftest.$ac_objext'
20149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20150   (eval $ac_try) 2>&5
20151   ac_status=$?
20152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20153   (exit $ac_status); }; }; then
20154
20155         cat >conftest.$ac_ext <<_ACEOF
20156 /* confdefs.h.  */
20157 _ACEOF
20158 cat confdefs.h >>conftest.$ac_ext
20159 cat >>conftest.$ac_ext <<_ACEOF
20160 /* end confdefs.h.  */
20161 #include <pthread.h>
20162
20163 _ACEOF
20164 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20165   $EGREP "pthread_detach" >/dev/null 2>&1; then
20166   ol_cv_pthread_version=10
20167 else
20168   ol_cv_pthread_version=8
20169 fi
20170 rm -f conftest*
20171
20172 else
20173   echo "$as_me: failed program was:" >&5
20174 sed 's/^/| /' conftest.$ac_ext >&5
20175
20176
20177         cat >conftest.$ac_ext <<_ACEOF
20178 /* confdefs.h.  */
20179 _ACEOF
20180 cat confdefs.h >>conftest.$ac_ext
20181 cat >>conftest.$ac_ext <<_ACEOF
20182 /* end confdefs.h.  */
20183
20184 #               include <pthread.h>
20185 #               ifdef PTHREAD_CREATE_UNDETACHED
20186                 draft7
20187 #               endif
20188
20189 _ACEOF
20190 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20191   $EGREP "draft7" >/dev/null 2>&1; then
20192   ol_cv_pthread_version=7
20193 else
20194
20195         cat >conftest.$ac_ext <<_ACEOF
20196 /* confdefs.h.  */
20197 _ACEOF
20198 cat confdefs.h >>conftest.$ac_ext
20199 cat >>conftest.$ac_ext <<_ACEOF
20200 /* end confdefs.h.  */
20201 #include <pthread.h>
20202
20203 _ACEOF
20204 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20205   $EGREP "pthread_attr_init" >/dev/null 2>&1; then
20206   ol_cv_pthread_version=6
20207 else
20208
20209         cat >conftest.$ac_ext <<_ACEOF
20210 /* confdefs.h.  */
20211 _ACEOF
20212 cat confdefs.h >>conftest.$ac_ext
20213 cat >>conftest.$ac_ext <<_ACEOF
20214 /* end confdefs.h.  */
20215
20216 #               include <pthread.h>
20217 #ifdef          PTHREAD_MUTEX_INITIALIZER
20218                 draft5
20219 #endif
20220
20221 _ACEOF
20222 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20223   $EGREP "draft5" >/dev/null 2>&1; then
20224   ol_cv_pthread_version=5
20225 else
20226   ol_cv_pthread_version=4
20227 fi
20228 rm -f conftest*
20229
20230 fi
20231 rm -f conftest*
20232
20233 fi
20234 rm -f conftest*
20235
20236 fi
20237 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20238
20239 fi
20240 echo "$as_me:$LINENO: result: $ol_cv_pthread_version" >&5
20241 echo "${ECHO_T}$ol_cv_pthread_version" >&6
20242
20243
20244                 if test $ol_cv_pthread_version != 0 ; then
20245
20246 cat >>confdefs.h <<_ACEOF
20247 #define HAVE_PTHREADS $ol_cv_pthread_version
20248 _ACEOF
20249
20250                 else
20251                         { { echo "$as_me:$LINENO: error: unknown pthread version" >&5
20252 echo "$as_me: error: unknown pthread version" >&2;}
20253    { (exit 1); exit 1; }; }
20254                 fi
20255
20256                 # consider threads found
20257                 ol_with_threads=found
20258
20259
20260         echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5
20261 echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6
20262 if test "${ol_cv_header_linux_threads+set}" = set; then
20263   echo $ECHO_N "(cached) $ECHO_C" >&6
20264 else
20265   cat >conftest.$ac_ext <<_ACEOF
20266 /* confdefs.h.  */
20267 _ACEOF
20268 cat confdefs.h >>conftest.$ac_ext
20269 cat >>conftest.$ac_ext <<_ACEOF
20270 /* end confdefs.h.  */
20271 #include <pthread.h>
20272 _ACEOF
20273 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20274   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then
20275   ol_cv_header_linux_threads=yes
20276 else
20277   ol_cv_header_linux_threads=no
20278 fi
20279 rm -f conftest*
20280
20281
20282 fi
20283 echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5
20284 echo "${ECHO_T}$ol_cv_header_linux_threads" >&6
20285         if test $ol_cv_header_linux_threads = yes; then
20286
20287 cat >>confdefs.h <<\_ACEOF
20288 #define HAVE_LINUX_THREADS 1
20289 _ACEOF
20290
20291         fi
20292
20293
20294         echo "$as_me:$LINENO: checking for GNU Pth pthread.h" >&5
20295 echo $ECHO_N "checking for GNU Pth pthread.h... $ECHO_C" >&6
20296 if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then
20297   echo $ECHO_N "(cached) $ECHO_C" >&6
20298 else
20299   cat >conftest.$ac_ext <<_ACEOF
20300 /* confdefs.h.  */
20301 _ACEOF
20302 cat confdefs.h >>conftest.$ac_ext
20303 cat >>conftest.$ac_ext <<_ACEOF
20304 /* end confdefs.h.  */
20305 #include <pthread.h>
20306 #ifdef _POSIX_THREAD_IS_GNU_PTH
20307         __gnu_pth__;
20308 #endif
20309
20310 _ACEOF
20311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20312   $EGREP "__gnu_pth__" >/dev/null 2>&1; then
20313   ol_cv_header_gnu_pth_pthread_h=yes
20314 else
20315   ol_cv_header_gnu_pth_pthread_h=no
20316 fi
20317 rm -f conftest*
20318
20319
20320 fi
20321 echo "$as_me:$LINENO: result: $ol_cv_header_gnu_pth_pthread_h" >&5
20322 echo "${ECHO_T}$ol_cv_header_gnu_pth_pthread_h" >&6
20323
20324
20325                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
20326
20327 for ac_header in sched.h
20328 do
20329 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20330 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20331   echo "$as_me:$LINENO: checking for $ac_header" >&5
20332 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20333 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20334   echo $ECHO_N "(cached) $ECHO_C" >&6
20335 fi
20336 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20337 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20338 else
20339   # Is the header compilable?
20340 echo "$as_me:$LINENO: checking $ac_header usability" >&5
20341 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20342 cat >conftest.$ac_ext <<_ACEOF
20343 /* confdefs.h.  */
20344 _ACEOF
20345 cat confdefs.h >>conftest.$ac_ext
20346 cat >>conftest.$ac_ext <<_ACEOF
20347 /* end confdefs.h.  */
20348 $ac_includes_default
20349 #include <$ac_header>
20350 _ACEOF
20351 rm -f conftest.$ac_objext
20352 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20353   (eval $ac_compile) 2>conftest.er1
20354   ac_status=$?
20355   grep -v '^ *+' conftest.er1 >conftest.err
20356   rm -f conftest.er1
20357   cat conftest.err >&5
20358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20359   (exit $ac_status); } &&
20360          { ac_try='test -z "$ac_c_werror_flag"
20361                          || test ! -s conftest.err'
20362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20363   (eval $ac_try) 2>&5
20364   ac_status=$?
20365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20366   (exit $ac_status); }; } &&
20367          { ac_try='test -s conftest.$ac_objext'
20368   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20369   (eval $ac_try) 2>&5
20370   ac_status=$?
20371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20372   (exit $ac_status); }; }; then
20373   ac_header_compiler=yes
20374 else
20375   echo "$as_me: failed program was:" >&5
20376 sed 's/^/| /' conftest.$ac_ext >&5
20377
20378 ac_header_compiler=no
20379 fi
20380 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20381 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20382 echo "${ECHO_T}$ac_header_compiler" >&6
20383
20384 # Is the header present?
20385 echo "$as_me:$LINENO: checking $ac_header presence" >&5
20386 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20387 cat >conftest.$ac_ext <<_ACEOF
20388 /* confdefs.h.  */
20389 _ACEOF
20390 cat confdefs.h >>conftest.$ac_ext
20391 cat >>conftest.$ac_ext <<_ACEOF
20392 /* end confdefs.h.  */
20393 #include <$ac_header>
20394 _ACEOF
20395 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20396   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20397   ac_status=$?
20398   grep -v '^ *+' conftest.er1 >conftest.err
20399   rm -f conftest.er1
20400   cat conftest.err >&5
20401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20402   (exit $ac_status); } >/dev/null; then
20403   if test -s conftest.err; then
20404     ac_cpp_err=$ac_c_preproc_warn_flag
20405     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20406   else
20407     ac_cpp_err=
20408   fi
20409 else
20410   ac_cpp_err=yes
20411 fi
20412 if test -z "$ac_cpp_err"; then
20413   ac_header_preproc=yes
20414 else
20415   echo "$as_me: failed program was:" >&5
20416 sed 's/^/| /' conftest.$ac_ext >&5
20417
20418   ac_header_preproc=no
20419 fi
20420 rm -f conftest.err conftest.$ac_ext
20421 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20422 echo "${ECHO_T}$ac_header_preproc" >&6
20423
20424 # So?  What about this header?
20425 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20426   yes:no: )
20427     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20428 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
20429     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20430 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20431     ac_header_preproc=yes
20432     ;;
20433   no:yes:* )
20434     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20435 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
20436     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
20437 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
20438     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20439 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20440     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
20441 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
20442     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20443 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
20444     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20445 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
20446     (
20447       cat <<\_ASBOX
20448 ## --------------------------------------------- ##
20449 ## Report this to <http://www.openldap.org/its/> ##
20450 ## --------------------------------------------- ##
20451 _ASBOX
20452     ) |
20453       sed "s/^/$as_me: WARNING:     /" >&2
20454     ;;
20455 esac
20456 echo "$as_me:$LINENO: checking for $ac_header" >&5
20457 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20458 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20459   echo $ECHO_N "(cached) $ECHO_C" >&6
20460 else
20461   eval "$as_ac_Header=\$ac_header_preproc"
20462 fi
20463 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20464 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20465
20466 fi
20467 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20468   cat >>confdefs.h <<_ACEOF
20469 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20470 _ACEOF
20471
20472 fi
20473
20474 done
20475
20476                 fi
20477
20478
20479                                 echo "$as_me:$LINENO: checking for pthread_create in default libraries" >&5
20480 echo $ECHO_N "checking for pthread_create in default libraries... $ECHO_C" >&6
20481 if test "${ol_cv_pthread_create+set}" = set; then
20482   echo $ECHO_N "(cached) $ECHO_C" >&6
20483 else
20484
20485                         if test "$cross_compiling" = yes; then
20486   cat >conftest.$ac_ext <<_ACEOF
20487 /* confdefs.h.  */
20488 _ACEOF
20489 cat confdefs.h >>conftest.$ac_ext
20490 cat >>conftest.$ac_ext <<_ACEOF
20491 /* end confdefs.h.  */
20492
20493 /* pthread test headers */
20494 #include <pthread.h>
20495 #if HAVE_PTHREADS < 7
20496 #include <errno.h>
20497 #endif
20498 #ifndef NULL
20499 #define NULL (void*)0
20500 #endif
20501
20502 static void *task(p)
20503         void *p;
20504 {
20505         return (void *) (p == NULL);
20506 }
20507
20508 int
20509 main ()
20510 {
20511
20512         /* pthread test function */
20513 #ifndef PTHREAD_CREATE_DETACHED
20514 #define PTHREAD_CREATE_DETACHED 1
20515 #endif
20516         pthread_t t;
20517         int status;
20518         int detach = PTHREAD_CREATE_DETACHED;
20519
20520 #if HAVE_PTHREADS > 4
20521         /* Final pthreads */
20522         pthread_attr_t attr;
20523
20524         status = pthread_attr_init(&attr);
20525         if( status ) return status;
20526
20527 #if HAVE_PTHREADS < 7
20528         status = pthread_attr_setdetachstate(&attr, &detach);
20529         if( status < 0 ) status = errno;
20530 #else
20531         status = pthread_attr_setdetachstate(&attr, detach);
20532 #endif
20533         if( status ) return status;
20534         status = pthread_create( &t, &attr, task, NULL );
20535 #if HAVE_PTHREADS < 7
20536         if( status < 0 ) status = errno;
20537 #endif
20538         if( status ) return status;
20539 #else
20540         /* Draft 4 pthreads */
20541         status = pthread_create( &t, pthread_attr_default, task, NULL );
20542         if( status ) return errno;
20543
20544         /* give thread a chance to complete */
20545         /* it should remain joinable and hence detachable */
20546         sleep( 1 );
20547
20548         status = pthread_detach( &t );
20549         if( status ) return errno;
20550 #endif
20551
20552 #ifdef HAVE_LINUX_THREADS
20553         pthread_kill_other_threads_np();
20554 #endif
20555
20556         return 0;
20557
20558   ;
20559   return 0;
20560 }
20561 _ACEOF
20562 rm -f conftest.$ac_objext conftest$ac_exeext
20563 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20564   (eval $ac_link) 2>conftest.er1
20565   ac_status=$?
20566   grep -v '^ *+' conftest.er1 >conftest.err
20567   rm -f conftest.er1
20568   cat conftest.err >&5
20569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20570   (exit $ac_status); } &&
20571          { ac_try='test -z "$ac_c_werror_flag"
20572                          || test ! -s conftest.err'
20573   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20574   (eval $ac_try) 2>&5
20575   ac_status=$?
20576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20577   (exit $ac_status); }; } &&
20578          { ac_try='test -s conftest$ac_exeext'
20579   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20580   (eval $ac_try) 2>&5
20581   ac_status=$?
20582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20583   (exit $ac_status); }; }; then
20584   ol_cv_pthread_create=yes
20585 else
20586   echo "$as_me: failed program was:" >&5
20587 sed 's/^/| /' conftest.$ac_ext >&5
20588
20589 ol_cv_pthread_create=no
20590 fi
20591 rm -f conftest.err conftest.$ac_objext \
20592       conftest$ac_exeext conftest.$ac_ext
20593 else
20594   cat >conftest.$ac_ext <<_ACEOF
20595 /* confdefs.h.  */
20596 _ACEOF
20597 cat confdefs.h >>conftest.$ac_ext
20598 cat >>conftest.$ac_ext <<_ACEOF
20599 /* end confdefs.h.  */
20600
20601 /* pthread test headers */
20602 #include <pthread.h>
20603 #if HAVE_PTHREADS < 7
20604 #include <errno.h>
20605 #endif
20606 #ifndef NULL
20607 #define NULL (void*)0
20608 #endif
20609
20610 static void *task(p)
20611         void *p;
20612 {
20613         return (void *) (p == NULL);
20614 }
20615
20616
20617 int main(argc, argv)
20618         int argc;
20619         char **argv;
20620 {
20621
20622         /* pthread test function */
20623 #ifndef PTHREAD_CREATE_DETACHED
20624 #define PTHREAD_CREATE_DETACHED 1
20625 #endif
20626         pthread_t t;
20627         int status;
20628         int detach = PTHREAD_CREATE_DETACHED;
20629
20630 #if HAVE_PTHREADS > 4
20631         /* Final pthreads */
20632         pthread_attr_t attr;
20633
20634         status = pthread_attr_init(&attr);
20635         if( status ) return status;
20636
20637 #if HAVE_PTHREADS < 7
20638         status = pthread_attr_setdetachstate(&attr, &detach);
20639         if( status < 0 ) status = errno;
20640 #else
20641         status = pthread_attr_setdetachstate(&attr, detach);
20642 #endif
20643         if( status ) return status;
20644         status = pthread_create( &t, &attr, task, NULL );
20645 #if HAVE_PTHREADS < 7
20646         if( status < 0 ) status = errno;
20647 #endif
20648         if( status ) return status;
20649 #else
20650         /* Draft 4 pthreads */
20651         status = pthread_create( &t, pthread_attr_default, task, NULL );
20652         if( status ) return errno;
20653
20654         /* give thread a chance to complete */
20655         /* it should remain joinable and hence detachable */
20656         sleep( 1 );
20657
20658         status = pthread_detach( &t );
20659         if( status ) return errno;
20660 #endif
20661
20662 #ifdef HAVE_LINUX_THREADS
20663         pthread_kill_other_threads_np();
20664 #endif
20665
20666         return 0;
20667
20668 }
20669
20670 _ACEOF
20671 rm -f conftest$ac_exeext
20672 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20673   (eval $ac_link) 2>&5
20674   ac_status=$?
20675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20676   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20677   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20678   (eval $ac_try) 2>&5
20679   ac_status=$?
20680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20681   (exit $ac_status); }; }; then
20682   ol_cv_pthread_create=yes
20683 else
20684   echo "$as_me: program exited with status $ac_status" >&5
20685 echo "$as_me: failed program was:" >&5
20686 sed 's/^/| /' conftest.$ac_ext >&5
20687
20688 ( exit $ac_status )
20689 ol_cv_pthread_create=no
20690 fi
20691 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20692 fi
20693 fi
20694 echo "$as_me:$LINENO: result: $ol_cv_pthread_create" >&5
20695 echo "${ECHO_T}$ol_cv_pthread_create" >&6
20696
20697                 if test $ol_cv_pthread_create != no ; then
20698                         ol_link_threads=posix
20699                         ol_link_pthreads=""
20700                 fi
20701
20702                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
20703 if test "$ol_link_threads" = no ; then
20704         # try -kthread
20705         echo "$as_me:$LINENO: checking for pthread link with -kthread" >&5
20706 echo $ECHO_N "checking for pthread link with -kthread... $ECHO_C" >&6
20707 if test "${ol_cv_pthread_kthread+set}" = set; then
20708   echo $ECHO_N "(cached) $ECHO_C" >&6
20709 else
20710
20711                 # save the flags
20712                 ol_LIBS="$LIBS"
20713                 LIBS="-kthread $LIBS"
20714
20715                 if test "$cross_compiling" = yes; then
20716   cat >conftest.$ac_ext <<_ACEOF
20717 /* confdefs.h.  */
20718 _ACEOF
20719 cat confdefs.h >>conftest.$ac_ext
20720 cat >>conftest.$ac_ext <<_ACEOF
20721 /* end confdefs.h.  */
20722
20723 /* pthread test headers */
20724 #include <pthread.h>
20725 #if HAVE_PTHREADS < 7
20726 #include <errno.h>
20727 #endif
20728 #ifndef NULL
20729 #define NULL (void*)0
20730 #endif
20731
20732 static void *task(p)
20733         void *p;
20734 {
20735         return (void *) (p == NULL);
20736 }
20737
20738 int
20739 main ()
20740 {
20741
20742         /* pthread test function */
20743 #ifndef PTHREAD_CREATE_DETACHED
20744 #define PTHREAD_CREATE_DETACHED 1
20745 #endif
20746         pthread_t t;
20747         int status;
20748         int detach = PTHREAD_CREATE_DETACHED;
20749
20750 #if HAVE_PTHREADS > 4
20751         /* Final pthreads */
20752         pthread_attr_t attr;
20753
20754         status = pthread_attr_init(&attr);
20755         if( status ) return status;
20756
20757 #if HAVE_PTHREADS < 7
20758         status = pthread_attr_setdetachstate(&attr, &detach);
20759         if( status < 0 ) status = errno;
20760 #else
20761         status = pthread_attr_setdetachstate(&attr, detach);
20762 #endif
20763         if( status ) return status;
20764         status = pthread_create( &t, &attr, task, NULL );
20765 #if HAVE_PTHREADS < 7
20766         if( status < 0 ) status = errno;
20767 #endif
20768         if( status ) return status;
20769 #else
20770         /* Draft 4 pthreads */
20771         status = pthread_create( &t, pthread_attr_default, task, NULL );
20772         if( status ) return errno;
20773
20774         /* give thread a chance to complete */
20775         /* it should remain joinable and hence detachable */
20776         sleep( 1 );
20777
20778         status = pthread_detach( &t );
20779         if( status ) return errno;
20780 #endif
20781
20782 #ifdef HAVE_LINUX_THREADS
20783         pthread_kill_other_threads_np();
20784 #endif
20785
20786         return 0;
20787
20788   ;
20789   return 0;
20790 }
20791 _ACEOF
20792 rm -f conftest.$ac_objext conftest$ac_exeext
20793 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20794   (eval $ac_link) 2>conftest.er1
20795   ac_status=$?
20796   grep -v '^ *+' conftest.er1 >conftest.err
20797   rm -f conftest.er1
20798   cat conftest.err >&5
20799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20800   (exit $ac_status); } &&
20801          { ac_try='test -z "$ac_c_werror_flag"
20802                          || test ! -s conftest.err'
20803   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20804   (eval $ac_try) 2>&5
20805   ac_status=$?
20806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20807   (exit $ac_status); }; } &&
20808          { ac_try='test -s conftest$ac_exeext'
20809   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20810   (eval $ac_try) 2>&5
20811   ac_status=$?
20812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20813   (exit $ac_status); }; }; then
20814   ol_cv_pthread_kthread=yes
20815 else
20816   echo "$as_me: failed program was:" >&5
20817 sed 's/^/| /' conftest.$ac_ext >&5
20818
20819 ol_cv_pthread_kthread=no
20820 fi
20821 rm -f conftest.err conftest.$ac_objext \
20822       conftest$ac_exeext conftest.$ac_ext
20823 else
20824   cat >conftest.$ac_ext <<_ACEOF
20825 /* confdefs.h.  */
20826 _ACEOF
20827 cat confdefs.h >>conftest.$ac_ext
20828 cat >>conftest.$ac_ext <<_ACEOF
20829 /* end confdefs.h.  */
20830
20831 /* pthread test headers */
20832 #include <pthread.h>
20833 #if HAVE_PTHREADS < 7
20834 #include <errno.h>
20835 #endif
20836 #ifndef NULL
20837 #define NULL (void*)0
20838 #endif
20839
20840 static void *task(p)
20841         void *p;
20842 {
20843         return (void *) (p == NULL);
20844 }
20845
20846
20847 int main(argc, argv)
20848         int argc;
20849         char **argv;
20850 {
20851
20852         /* pthread test function */
20853 #ifndef PTHREAD_CREATE_DETACHED
20854 #define PTHREAD_CREATE_DETACHED 1
20855 #endif
20856         pthread_t t;
20857         int status;
20858         int detach = PTHREAD_CREATE_DETACHED;
20859
20860 #if HAVE_PTHREADS > 4
20861         /* Final pthreads */
20862         pthread_attr_t attr;
20863
20864         status = pthread_attr_init(&attr);
20865         if( status ) return status;
20866
20867 #if HAVE_PTHREADS < 7
20868         status = pthread_attr_setdetachstate(&attr, &detach);
20869         if( status < 0 ) status = errno;
20870 #else
20871         status = pthread_attr_setdetachstate(&attr, detach);
20872 #endif
20873         if( status ) return status;
20874         status = pthread_create( &t, &attr, task, NULL );
20875 #if HAVE_PTHREADS < 7
20876         if( status < 0 ) status = errno;
20877 #endif
20878         if( status ) return status;
20879 #else
20880         /* Draft 4 pthreads */
20881         status = pthread_create( &t, pthread_attr_default, task, NULL );
20882         if( status ) return errno;
20883
20884         /* give thread a chance to complete */
20885         /* it should remain joinable and hence detachable */
20886         sleep( 1 );
20887
20888         status = pthread_detach( &t );
20889         if( status ) return errno;
20890 #endif
20891
20892 #ifdef HAVE_LINUX_THREADS
20893         pthread_kill_other_threads_np();
20894 #endif
20895
20896         return 0;
20897
20898 }
20899
20900 _ACEOF
20901 rm -f conftest$ac_exeext
20902 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20903   (eval $ac_link) 2>&5
20904   ac_status=$?
20905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20906   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20907   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20908   (eval $ac_try) 2>&5
20909   ac_status=$?
20910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20911   (exit $ac_status); }; }; then
20912   ol_cv_pthread_kthread=yes
20913 else
20914   echo "$as_me: program exited with status $ac_status" >&5
20915 echo "$as_me: failed program was:" >&5
20916 sed 's/^/| /' conftest.$ac_ext >&5
20917
20918 ( exit $ac_status )
20919 ol_cv_pthread_kthread=no
20920 fi
20921 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20922 fi
20923
20924                 # restore the LIBS
20925                 LIBS="$ol_LIBS"
20926
20927 fi
20928 echo "$as_me:$LINENO: result: $ol_cv_pthread_kthread" >&5
20929 echo "${ECHO_T}$ol_cv_pthread_kthread" >&6
20930
20931         if test $ol_cv_pthread_kthread = yes ; then
20932                 ol_link_pthreads="-kthread"
20933                 ol_link_threads=posix
20934         fi
20935 fi
20936
20937                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
20938 if test "$ol_link_threads" = no ; then
20939         # try -pthread
20940         echo "$as_me:$LINENO: checking for pthread link with -pthread" >&5
20941 echo $ECHO_N "checking for pthread link with -pthread... $ECHO_C" >&6
20942 if test "${ol_cv_pthread_pthread+set}" = set; then
20943   echo $ECHO_N "(cached) $ECHO_C" >&6
20944 else
20945
20946                 # save the flags
20947                 ol_LIBS="$LIBS"
20948                 LIBS="-pthread $LIBS"
20949
20950                 if test "$cross_compiling" = yes; then
20951   cat >conftest.$ac_ext <<_ACEOF
20952 /* confdefs.h.  */
20953 _ACEOF
20954 cat confdefs.h >>conftest.$ac_ext
20955 cat >>conftest.$ac_ext <<_ACEOF
20956 /* end confdefs.h.  */
20957
20958 /* pthread test headers */
20959 #include <pthread.h>
20960 #if HAVE_PTHREADS < 7
20961 #include <errno.h>
20962 #endif
20963 #ifndef NULL
20964 #define NULL (void*)0
20965 #endif
20966
20967 static void *task(p)
20968         void *p;
20969 {
20970         return (void *) (p == NULL);
20971 }
20972
20973 int
20974 main ()
20975 {
20976
20977         /* pthread test function */
20978 #ifndef PTHREAD_CREATE_DETACHED
20979 #define PTHREAD_CREATE_DETACHED 1
20980 #endif
20981         pthread_t t;
20982         int status;
20983         int detach = PTHREAD_CREATE_DETACHED;
20984
20985 #if HAVE_PTHREADS > 4
20986         /* Final pthreads */
20987         pthread_attr_t attr;
20988
20989         status = pthread_attr_init(&attr);
20990         if( status ) return status;
20991
20992 #if HAVE_PTHREADS < 7
20993         status = pthread_attr_setdetachstate(&attr, &detach);
20994         if( status < 0 ) status = errno;
20995 #else
20996         status = pthread_attr_setdetachstate(&attr, detach);
20997 #endif
20998         if( status ) return status;
20999         status = pthread_create( &t, &attr, task, NULL );
21000 #if HAVE_PTHREADS < 7
21001         if( status < 0 ) status = errno;
21002 #endif
21003         if( status ) return status;
21004 #else
21005         /* Draft 4 pthreads */
21006         status = pthread_create( &t, pthread_attr_default, task, NULL );
21007         if( status ) return errno;
21008
21009         /* give thread a chance to complete */
21010         /* it should remain joinable and hence detachable */
21011         sleep( 1 );
21012
21013         status = pthread_detach( &t );
21014         if( status ) return errno;
21015 #endif
21016
21017 #ifdef HAVE_LINUX_THREADS
21018         pthread_kill_other_threads_np();
21019 #endif
21020
21021         return 0;
21022
21023   ;
21024   return 0;
21025 }
21026 _ACEOF
21027 rm -f conftest.$ac_objext conftest$ac_exeext
21028 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21029   (eval $ac_link) 2>conftest.er1
21030   ac_status=$?
21031   grep -v '^ *+' conftest.er1 >conftest.err
21032   rm -f conftest.er1
21033   cat conftest.err >&5
21034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21035   (exit $ac_status); } &&
21036          { ac_try='test -z "$ac_c_werror_flag"
21037                          || test ! -s conftest.err'
21038   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21039   (eval $ac_try) 2>&5
21040   ac_status=$?
21041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21042   (exit $ac_status); }; } &&
21043          { ac_try='test -s conftest$ac_exeext'
21044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21045   (eval $ac_try) 2>&5
21046   ac_status=$?
21047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21048   (exit $ac_status); }; }; then
21049   ol_cv_pthread_pthread=yes
21050 else
21051   echo "$as_me: failed program was:" >&5
21052 sed 's/^/| /' conftest.$ac_ext >&5
21053
21054 ol_cv_pthread_pthread=no
21055 fi
21056 rm -f conftest.err conftest.$ac_objext \
21057       conftest$ac_exeext conftest.$ac_ext
21058 else
21059   cat >conftest.$ac_ext <<_ACEOF
21060 /* confdefs.h.  */
21061 _ACEOF
21062 cat confdefs.h >>conftest.$ac_ext
21063 cat >>conftest.$ac_ext <<_ACEOF
21064 /* end confdefs.h.  */
21065
21066 /* pthread test headers */
21067 #include <pthread.h>
21068 #if HAVE_PTHREADS < 7
21069 #include <errno.h>
21070 #endif
21071 #ifndef NULL
21072 #define NULL (void*)0
21073 #endif
21074
21075 static void *task(p)
21076         void *p;
21077 {
21078         return (void *) (p == NULL);
21079 }
21080
21081
21082 int main(argc, argv)
21083         int argc;
21084         char **argv;
21085 {
21086
21087         /* pthread test function */
21088 #ifndef PTHREAD_CREATE_DETACHED
21089 #define PTHREAD_CREATE_DETACHED 1
21090 #endif
21091         pthread_t t;
21092         int status;
21093         int detach = PTHREAD_CREATE_DETACHED;
21094
21095 #if HAVE_PTHREADS > 4
21096         /* Final pthreads */
21097         pthread_attr_t attr;
21098
21099         status = pthread_attr_init(&attr);
21100         if( status ) return status;
21101
21102 #if HAVE_PTHREADS < 7
21103         status = pthread_attr_setdetachstate(&attr, &detach);
21104         if( status < 0 ) status = errno;
21105 #else
21106         status = pthread_attr_setdetachstate(&attr, detach);
21107 #endif
21108         if( status ) return status;
21109         status = pthread_create( &t, &attr, task, NULL );
21110 #if HAVE_PTHREADS < 7
21111         if( status < 0 ) status = errno;
21112 #endif
21113         if( status ) return status;
21114 #else
21115         /* Draft 4 pthreads */
21116         status = pthread_create( &t, pthread_attr_default, task, NULL );
21117         if( status ) return errno;
21118
21119         /* give thread a chance to complete */
21120         /* it should remain joinable and hence detachable */
21121         sleep( 1 );
21122
21123         status = pthread_detach( &t );
21124         if( status ) return errno;
21125 #endif
21126
21127 #ifdef HAVE_LINUX_THREADS
21128         pthread_kill_other_threads_np();
21129 #endif
21130
21131         return 0;
21132
21133 }
21134
21135 _ACEOF
21136 rm -f conftest$ac_exeext
21137 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21138   (eval $ac_link) 2>&5
21139   ac_status=$?
21140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21141   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21142   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21143   (eval $ac_try) 2>&5
21144   ac_status=$?
21145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21146   (exit $ac_status); }; }; then
21147   ol_cv_pthread_pthread=yes
21148 else
21149   echo "$as_me: program exited with status $ac_status" >&5
21150 echo "$as_me: failed program was:" >&5
21151 sed 's/^/| /' conftest.$ac_ext >&5
21152
21153 ( exit $ac_status )
21154 ol_cv_pthread_pthread=no
21155 fi
21156 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21157 fi
21158
21159                 # restore the LIBS
21160                 LIBS="$ol_LIBS"
21161
21162 fi
21163 echo "$as_me:$LINENO: result: $ol_cv_pthread_pthread" >&5
21164 echo "${ECHO_T}$ol_cv_pthread_pthread" >&6
21165
21166         if test $ol_cv_pthread_pthread = yes ; then
21167                 ol_link_pthreads="-pthread"
21168                 ol_link_threads=posix
21169         fi
21170 fi
21171
21172                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
21173 if test "$ol_link_threads" = no ; then
21174         # try -pthreads
21175         echo "$as_me:$LINENO: checking for pthread link with -pthreads" >&5
21176 echo $ECHO_N "checking for pthread link with -pthreads... $ECHO_C" >&6
21177 if test "${ol_cv_pthread_pthreads+set}" = set; then
21178   echo $ECHO_N "(cached) $ECHO_C" >&6
21179 else
21180
21181                 # save the flags
21182                 ol_LIBS="$LIBS"
21183                 LIBS="-pthreads $LIBS"
21184
21185                 if test "$cross_compiling" = yes; then
21186   cat >conftest.$ac_ext <<_ACEOF
21187 /* confdefs.h.  */
21188 _ACEOF
21189 cat confdefs.h >>conftest.$ac_ext
21190 cat >>conftest.$ac_ext <<_ACEOF
21191 /* end confdefs.h.  */
21192
21193 /* pthread test headers */
21194 #include <pthread.h>
21195 #if HAVE_PTHREADS < 7
21196 #include <errno.h>
21197 #endif
21198 #ifndef NULL
21199 #define NULL (void*)0
21200 #endif
21201
21202 static void *task(p)
21203         void *p;
21204 {
21205         return (void *) (p == NULL);
21206 }
21207
21208 int
21209 main ()
21210 {
21211
21212         /* pthread test function */
21213 #ifndef PTHREAD_CREATE_DETACHED
21214 #define PTHREAD_CREATE_DETACHED 1
21215 #endif
21216         pthread_t t;
21217         int status;
21218         int detach = PTHREAD_CREATE_DETACHED;
21219
21220 #if HAVE_PTHREADS > 4
21221         /* Final pthreads */
21222         pthread_attr_t attr;
21223
21224         status = pthread_attr_init(&attr);
21225         if( status ) return status;
21226
21227 #if HAVE_PTHREADS < 7
21228         status = pthread_attr_setdetachstate(&attr, &detach);
21229         if( status < 0 ) status = errno;
21230 #else
21231         status = pthread_attr_setdetachstate(&attr, detach);
21232 #endif
21233         if( status ) return status;
21234         status = pthread_create( &t, &attr, task, NULL );
21235 #if HAVE_PTHREADS < 7
21236         if( status < 0 ) status = errno;
21237 #endif
21238         if( status ) return status;
21239 #else
21240         /* Draft 4 pthreads */
21241         status = pthread_create( &t, pthread_attr_default, task, NULL );
21242         if( status ) return errno;
21243
21244         /* give thread a chance to complete */
21245         /* it should remain joinable and hence detachable */
21246         sleep( 1 );
21247
21248         status = pthread_detach( &t );
21249         if( status ) return errno;
21250 #endif
21251
21252 #ifdef HAVE_LINUX_THREADS
21253         pthread_kill_other_threads_np();
21254 #endif
21255
21256         return 0;
21257
21258   ;
21259   return 0;
21260 }
21261 _ACEOF
21262 rm -f conftest.$ac_objext conftest$ac_exeext
21263 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21264   (eval $ac_link) 2>conftest.er1
21265   ac_status=$?
21266   grep -v '^ *+' conftest.er1 >conftest.err
21267   rm -f conftest.er1
21268   cat conftest.err >&5
21269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21270   (exit $ac_status); } &&
21271          { ac_try='test -z "$ac_c_werror_flag"
21272                          || test ! -s conftest.err'
21273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21274   (eval $ac_try) 2>&5
21275   ac_status=$?
21276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21277   (exit $ac_status); }; } &&
21278          { ac_try='test -s conftest$ac_exeext'
21279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21280   (eval $ac_try) 2>&5
21281   ac_status=$?
21282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21283   (exit $ac_status); }; }; then
21284   ol_cv_pthread_pthreads=yes
21285 else
21286   echo "$as_me: failed program was:" >&5
21287 sed 's/^/| /' conftest.$ac_ext >&5
21288
21289 ol_cv_pthread_pthreads=no
21290 fi
21291 rm -f conftest.err conftest.$ac_objext \
21292       conftest$ac_exeext conftest.$ac_ext
21293 else
21294   cat >conftest.$ac_ext <<_ACEOF
21295 /* confdefs.h.  */
21296 _ACEOF
21297 cat confdefs.h >>conftest.$ac_ext
21298 cat >>conftest.$ac_ext <<_ACEOF
21299 /* end confdefs.h.  */
21300
21301 /* pthread test headers */
21302 #include <pthread.h>
21303 #if HAVE_PTHREADS < 7
21304 #include <errno.h>
21305 #endif
21306 #ifndef NULL
21307 #define NULL (void*)0
21308 #endif
21309
21310 static void *task(p)
21311         void *p;
21312 {
21313         return (void *) (p == NULL);
21314 }
21315
21316
21317 int main(argc, argv)
21318         int argc;
21319         char **argv;
21320 {
21321
21322         /* pthread test function */
21323 #ifndef PTHREAD_CREATE_DETACHED
21324 #define PTHREAD_CREATE_DETACHED 1
21325 #endif
21326         pthread_t t;
21327         int status;
21328         int detach = PTHREAD_CREATE_DETACHED;
21329
21330 #if HAVE_PTHREADS > 4
21331         /* Final pthreads */
21332         pthread_attr_t attr;
21333
21334         status = pthread_attr_init(&attr);
21335         if( status ) return status;
21336
21337 #if HAVE_PTHREADS < 7
21338         status = pthread_attr_setdetachstate(&attr, &detach);
21339         if( status < 0 ) status = errno;
21340 #else
21341         status = pthread_attr_setdetachstate(&attr, detach);
21342 #endif
21343         if( status ) return status;
21344         status = pthread_create( &t, &attr, task, NULL );
21345 #if HAVE_PTHREADS < 7
21346         if( status < 0 ) status = errno;
21347 #endif
21348         if( status ) return status;
21349 #else
21350         /* Draft 4 pthreads */
21351         status = pthread_create( &t, pthread_attr_default, task, NULL );
21352         if( status ) return errno;
21353
21354         /* give thread a chance to complete */
21355         /* it should remain joinable and hence detachable */
21356         sleep( 1 );
21357
21358         status = pthread_detach( &t );
21359         if( status ) return errno;
21360 #endif
21361
21362 #ifdef HAVE_LINUX_THREADS
21363         pthread_kill_other_threads_np();
21364 #endif
21365
21366         return 0;
21367
21368 }
21369
21370 _ACEOF
21371 rm -f conftest$ac_exeext
21372 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21373   (eval $ac_link) 2>&5
21374   ac_status=$?
21375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21376   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21377   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21378   (eval $ac_try) 2>&5
21379   ac_status=$?
21380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21381   (exit $ac_status); }; }; then
21382   ol_cv_pthread_pthreads=yes
21383 else
21384   echo "$as_me: program exited with status $ac_status" >&5
21385 echo "$as_me: failed program was:" >&5
21386 sed 's/^/| /' conftest.$ac_ext >&5
21387
21388 ( exit $ac_status )
21389 ol_cv_pthread_pthreads=no
21390 fi
21391 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21392 fi
21393
21394                 # restore the LIBS
21395                 LIBS="$ol_LIBS"
21396
21397 fi
21398 echo "$as_me:$LINENO: result: $ol_cv_pthread_pthreads" >&5
21399 echo "${ECHO_T}$ol_cv_pthread_pthreads" >&6
21400
21401         if test $ol_cv_pthread_pthreads = yes ; then
21402                 ol_link_pthreads="-pthreads"
21403                 ol_link_threads=posix
21404         fi
21405 fi
21406
21407                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
21408 if test "$ol_link_threads" = no ; then
21409         # try -mthreads
21410         echo "$as_me:$LINENO: checking for pthread link with -mthreads" >&5
21411 echo $ECHO_N "checking for pthread link with -mthreads... $ECHO_C" >&6
21412 if test "${ol_cv_pthread_mthreads+set}" = set; then
21413   echo $ECHO_N "(cached) $ECHO_C" >&6
21414 else
21415
21416                 # save the flags
21417                 ol_LIBS="$LIBS"
21418                 LIBS="-mthreads $LIBS"
21419
21420                 if test "$cross_compiling" = yes; then
21421   cat >conftest.$ac_ext <<_ACEOF
21422 /* confdefs.h.  */
21423 _ACEOF
21424 cat confdefs.h >>conftest.$ac_ext
21425 cat >>conftest.$ac_ext <<_ACEOF
21426 /* end confdefs.h.  */
21427
21428 /* pthread test headers */
21429 #include <pthread.h>
21430 #if HAVE_PTHREADS < 7
21431 #include <errno.h>
21432 #endif
21433 #ifndef NULL
21434 #define NULL (void*)0
21435 #endif
21436
21437 static void *task(p)
21438         void *p;
21439 {
21440         return (void *) (p == NULL);
21441 }
21442
21443 int
21444 main ()
21445 {
21446
21447         /* pthread test function */
21448 #ifndef PTHREAD_CREATE_DETACHED
21449 #define PTHREAD_CREATE_DETACHED 1
21450 #endif
21451         pthread_t t;
21452         int status;
21453         int detach = PTHREAD_CREATE_DETACHED;
21454
21455 #if HAVE_PTHREADS > 4
21456         /* Final pthreads */
21457         pthread_attr_t attr;
21458
21459         status = pthread_attr_init(&attr);
21460         if( status ) return status;
21461
21462 #if HAVE_PTHREADS < 7
21463         status = pthread_attr_setdetachstate(&attr, &detach);
21464         if( status < 0 ) status = errno;
21465 #else
21466         status = pthread_attr_setdetachstate(&attr, detach);
21467 #endif
21468         if( status ) return status;
21469         status = pthread_create( &t, &attr, task, NULL );
21470 #if HAVE_PTHREADS < 7
21471         if( status < 0 ) status = errno;
21472 #endif
21473         if( status ) return status;
21474 #else
21475         /* Draft 4 pthreads */
21476         status = pthread_create( &t, pthread_attr_default, task, NULL );
21477         if( status ) return errno;
21478
21479         /* give thread a chance to complete */
21480         /* it should remain joinable and hence detachable */
21481         sleep( 1 );
21482
21483         status = pthread_detach( &t );
21484         if( status ) return errno;
21485 #endif
21486
21487 #ifdef HAVE_LINUX_THREADS
21488         pthread_kill_other_threads_np();
21489 #endif
21490
21491         return 0;
21492
21493   ;
21494   return 0;
21495 }
21496 _ACEOF
21497 rm -f conftest.$ac_objext conftest$ac_exeext
21498 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21499   (eval $ac_link) 2>conftest.er1
21500   ac_status=$?
21501   grep -v '^ *+' conftest.er1 >conftest.err
21502   rm -f conftest.er1
21503   cat conftest.err >&5
21504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21505   (exit $ac_status); } &&
21506          { ac_try='test -z "$ac_c_werror_flag"
21507                          || test ! -s conftest.err'
21508   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21509   (eval $ac_try) 2>&5
21510   ac_status=$?
21511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21512   (exit $ac_status); }; } &&
21513          { ac_try='test -s conftest$ac_exeext'
21514   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21515   (eval $ac_try) 2>&5
21516   ac_status=$?
21517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21518   (exit $ac_status); }; }; then
21519   ol_cv_pthread_mthreads=yes
21520 else
21521   echo "$as_me: failed program was:" >&5
21522 sed 's/^/| /' conftest.$ac_ext >&5
21523
21524 ol_cv_pthread_mthreads=no
21525 fi
21526 rm -f conftest.err conftest.$ac_objext \
21527       conftest$ac_exeext conftest.$ac_ext
21528 else
21529   cat >conftest.$ac_ext <<_ACEOF
21530 /* confdefs.h.  */
21531 _ACEOF
21532 cat confdefs.h >>conftest.$ac_ext
21533 cat >>conftest.$ac_ext <<_ACEOF
21534 /* end confdefs.h.  */
21535
21536 /* pthread test headers */
21537 #include <pthread.h>
21538 #if HAVE_PTHREADS < 7
21539 #include <errno.h>
21540 #endif
21541 #ifndef NULL
21542 #define NULL (void*)0
21543 #endif
21544
21545 static void *task(p)
21546         void *p;
21547 {
21548         return (void *) (p == NULL);
21549 }
21550
21551
21552 int main(argc, argv)
21553         int argc;
21554         char **argv;
21555 {
21556
21557         /* pthread test function */
21558 #ifndef PTHREAD_CREATE_DETACHED
21559 #define PTHREAD_CREATE_DETACHED 1
21560 #endif
21561         pthread_t t;
21562         int status;
21563         int detach = PTHREAD_CREATE_DETACHED;
21564
21565 #if HAVE_PTHREADS > 4
21566         /* Final pthreads */
21567         pthread_attr_t attr;
21568
21569         status = pthread_attr_init(&attr);
21570         if( status ) return status;
21571
21572 #if HAVE_PTHREADS < 7
21573         status = pthread_attr_setdetachstate(&attr, &detach);
21574         if( status < 0 ) status = errno;
21575 #else
21576         status = pthread_attr_setdetachstate(&attr, detach);
21577 #endif
21578         if( status ) return status;
21579         status = pthread_create( &t, &attr, task, NULL );
21580 #if HAVE_PTHREADS < 7
21581         if( status < 0 ) status = errno;
21582 #endif
21583         if( status ) return status;
21584 #else
21585         /* Draft 4 pthreads */
21586         status = pthread_create( &t, pthread_attr_default, task, NULL );
21587         if( status ) return errno;
21588
21589         /* give thread a chance to complete */
21590         /* it should remain joinable and hence detachable */
21591         sleep( 1 );
21592
21593         status = pthread_detach( &t );
21594         if( status ) return errno;
21595 #endif
21596
21597 #ifdef HAVE_LINUX_THREADS
21598         pthread_kill_other_threads_np();
21599 #endif
21600
21601         return 0;
21602
21603 }
21604
21605 _ACEOF
21606 rm -f conftest$ac_exeext
21607 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21608   (eval $ac_link) 2>&5
21609   ac_status=$?
21610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21611   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21613   (eval $ac_try) 2>&5
21614   ac_status=$?
21615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21616   (exit $ac_status); }; }; then
21617   ol_cv_pthread_mthreads=yes
21618 else
21619   echo "$as_me: program exited with status $ac_status" >&5
21620 echo "$as_me: failed program was:" >&5
21621 sed 's/^/| /' conftest.$ac_ext >&5
21622
21623 ( exit $ac_status )
21624 ol_cv_pthread_mthreads=no
21625 fi
21626 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21627 fi
21628
21629                 # restore the LIBS
21630                 LIBS="$ol_LIBS"
21631
21632 fi
21633 echo "$as_me:$LINENO: result: $ol_cv_pthread_mthreads" >&5
21634 echo "${ECHO_T}$ol_cv_pthread_mthreads" >&6
21635
21636         if test $ol_cv_pthread_mthreads = yes ; then
21637                 ol_link_pthreads="-mthreads"
21638                 ol_link_threads=posix
21639         fi
21640 fi
21641
21642                 # Pthread try link: -thread (ol_cv_pthread_thread)
21643 if test "$ol_link_threads" = no ; then
21644         # try -thread
21645         echo "$as_me:$LINENO: checking for pthread link with -thread" >&5
21646 echo $ECHO_N "checking for pthread link with -thread... $ECHO_C" >&6
21647 if test "${ol_cv_pthread_thread+set}" = set; then
21648   echo $ECHO_N "(cached) $ECHO_C" >&6
21649 else
21650
21651                 # save the flags
21652                 ol_LIBS="$LIBS"
21653                 LIBS="-thread $LIBS"
21654
21655                 if test "$cross_compiling" = yes; then
21656   cat >conftest.$ac_ext <<_ACEOF
21657 /* confdefs.h.  */
21658 _ACEOF
21659 cat confdefs.h >>conftest.$ac_ext
21660 cat >>conftest.$ac_ext <<_ACEOF
21661 /* end confdefs.h.  */
21662
21663 /* pthread test headers */
21664 #include <pthread.h>
21665 #if HAVE_PTHREADS < 7
21666 #include <errno.h>
21667 #endif
21668 #ifndef NULL
21669 #define NULL (void*)0
21670 #endif
21671
21672 static void *task(p)
21673         void *p;
21674 {
21675         return (void *) (p == NULL);
21676 }
21677
21678 int
21679 main ()
21680 {
21681
21682         /* pthread test function */
21683 #ifndef PTHREAD_CREATE_DETACHED
21684 #define PTHREAD_CREATE_DETACHED 1
21685 #endif
21686         pthread_t t;
21687         int status;
21688         int detach = PTHREAD_CREATE_DETACHED;
21689
21690 #if HAVE_PTHREADS > 4
21691         /* Final pthreads */
21692         pthread_attr_t attr;
21693
21694         status = pthread_attr_init(&attr);
21695         if( status ) return status;
21696
21697 #if HAVE_PTHREADS < 7
21698         status = pthread_attr_setdetachstate(&attr, &detach);
21699         if( status < 0 ) status = errno;
21700 #else
21701         status = pthread_attr_setdetachstate(&attr, detach);
21702 #endif
21703         if( status ) return status;
21704         status = pthread_create( &t, &attr, task, NULL );
21705 #if HAVE_PTHREADS < 7
21706         if( status < 0 ) status = errno;
21707 #endif
21708         if( status ) return status;
21709 #else
21710         /* Draft 4 pthreads */
21711         status = pthread_create( &t, pthread_attr_default, task, NULL );
21712         if( status ) return errno;
21713
21714         /* give thread a chance to complete */
21715         /* it should remain joinable and hence detachable */
21716         sleep( 1 );
21717
21718         status = pthread_detach( &t );
21719         if( status ) return errno;
21720 #endif
21721
21722 #ifdef HAVE_LINUX_THREADS
21723         pthread_kill_other_threads_np();
21724 #endif
21725
21726         return 0;
21727
21728   ;
21729   return 0;
21730 }
21731 _ACEOF
21732 rm -f conftest.$ac_objext conftest$ac_exeext
21733 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21734   (eval $ac_link) 2>conftest.er1
21735   ac_status=$?
21736   grep -v '^ *+' conftest.er1 >conftest.err
21737   rm -f conftest.er1
21738   cat conftest.err >&5
21739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21740   (exit $ac_status); } &&
21741          { ac_try='test -z "$ac_c_werror_flag"
21742                          || test ! -s conftest.err'
21743   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21744   (eval $ac_try) 2>&5
21745   ac_status=$?
21746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21747   (exit $ac_status); }; } &&
21748          { ac_try='test -s conftest$ac_exeext'
21749   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21750   (eval $ac_try) 2>&5
21751   ac_status=$?
21752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21753   (exit $ac_status); }; }; then
21754   ol_cv_pthread_thread=yes
21755 else
21756   echo "$as_me: failed program was:" >&5
21757 sed 's/^/| /' conftest.$ac_ext >&5
21758
21759 ol_cv_pthread_thread=no
21760 fi
21761 rm -f conftest.err conftest.$ac_objext \
21762       conftest$ac_exeext conftest.$ac_ext
21763 else
21764   cat >conftest.$ac_ext <<_ACEOF
21765 /* confdefs.h.  */
21766 _ACEOF
21767 cat confdefs.h >>conftest.$ac_ext
21768 cat >>conftest.$ac_ext <<_ACEOF
21769 /* end confdefs.h.  */
21770
21771 /* pthread test headers */
21772 #include <pthread.h>
21773 #if HAVE_PTHREADS < 7
21774 #include <errno.h>
21775 #endif
21776 #ifndef NULL
21777 #define NULL (void*)0
21778 #endif
21779
21780 static void *task(p)
21781         void *p;
21782 {
21783         return (void *) (p == NULL);
21784 }
21785
21786
21787 int main(argc, argv)
21788         int argc;
21789         char **argv;
21790 {
21791
21792         /* pthread test function */
21793 #ifndef PTHREAD_CREATE_DETACHED
21794 #define PTHREAD_CREATE_DETACHED 1
21795 #endif
21796         pthread_t t;
21797         int status;
21798         int detach = PTHREAD_CREATE_DETACHED;
21799
21800 #if HAVE_PTHREADS > 4
21801         /* Final pthreads */
21802         pthread_attr_t attr;
21803
21804         status = pthread_attr_init(&attr);
21805         if( status ) return status;
21806
21807 #if HAVE_PTHREADS < 7
21808         status = pthread_attr_setdetachstate(&attr, &detach);
21809         if( status < 0 ) status = errno;
21810 #else
21811         status = pthread_attr_setdetachstate(&attr, detach);
21812 #endif
21813         if( status ) return status;
21814         status = pthread_create( &t, &attr, task, NULL );
21815 #if HAVE_PTHREADS < 7
21816         if( status < 0 ) status = errno;
21817 #endif
21818         if( status ) return status;
21819 #else
21820         /* Draft 4 pthreads */
21821         status = pthread_create( &t, pthread_attr_default, task, NULL );
21822         if( status ) return errno;
21823
21824         /* give thread a chance to complete */
21825         /* it should remain joinable and hence detachable */
21826         sleep( 1 );
21827
21828         status = pthread_detach( &t );
21829         if( status ) return errno;
21830 #endif
21831
21832 #ifdef HAVE_LINUX_THREADS
21833         pthread_kill_other_threads_np();
21834 #endif
21835
21836         return 0;
21837
21838 }
21839
21840 _ACEOF
21841 rm -f conftest$ac_exeext
21842 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21843   (eval $ac_link) 2>&5
21844   ac_status=$?
21845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21846   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21847   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21848   (eval $ac_try) 2>&5
21849   ac_status=$?
21850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21851   (exit $ac_status); }; }; then
21852   ol_cv_pthread_thread=yes
21853 else
21854   echo "$as_me: program exited with status $ac_status" >&5
21855 echo "$as_me: failed program was:" >&5
21856 sed 's/^/| /' conftest.$ac_ext >&5
21857
21858 ( exit $ac_status )
21859 ol_cv_pthread_thread=no
21860 fi
21861 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21862 fi
21863
21864                 # restore the LIBS
21865                 LIBS="$ol_LIBS"
21866
21867 fi
21868 echo "$as_me:$LINENO: result: $ol_cv_pthread_thread" >&5
21869 echo "${ECHO_T}$ol_cv_pthread_thread" >&6
21870
21871         if test $ol_cv_pthread_thread = yes ; then
21872                 ol_link_pthreads="-thread"
21873                 ol_link_threads=posix
21874         fi
21875 fi
21876
21877
21878                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
21879 if test "$ol_link_threads" = no ; then
21880         # try -lpthread -lmach -lexc -lc_r
21881         echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
21882 echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc -lc_r... $ECHO_C" >&6
21883 if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then
21884   echo $ECHO_N "(cached) $ECHO_C" >&6
21885 else
21886
21887                 # save the flags
21888                 ol_LIBS="$LIBS"
21889                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
21890
21891                 if test "$cross_compiling" = yes; then
21892   cat >conftest.$ac_ext <<_ACEOF
21893 /* confdefs.h.  */
21894 _ACEOF
21895 cat confdefs.h >>conftest.$ac_ext
21896 cat >>conftest.$ac_ext <<_ACEOF
21897 /* end confdefs.h.  */
21898
21899 /* pthread test headers */
21900 #include <pthread.h>
21901 #if HAVE_PTHREADS < 7
21902 #include <errno.h>
21903 #endif
21904 #ifndef NULL
21905 #define NULL (void*)0
21906 #endif
21907
21908 static void *task(p)
21909         void *p;
21910 {
21911         return (void *) (p == NULL);
21912 }
21913
21914 int
21915 main ()
21916 {
21917
21918         /* pthread test function */
21919 #ifndef PTHREAD_CREATE_DETACHED
21920 #define PTHREAD_CREATE_DETACHED 1
21921 #endif
21922         pthread_t t;
21923         int status;
21924         int detach = PTHREAD_CREATE_DETACHED;
21925
21926 #if HAVE_PTHREADS > 4
21927         /* Final pthreads */
21928         pthread_attr_t attr;
21929
21930         status = pthread_attr_init(&attr);
21931         if( status ) return status;
21932
21933 #if HAVE_PTHREADS < 7
21934         status = pthread_attr_setdetachstate(&attr, &detach);
21935         if( status < 0 ) status = errno;
21936 #else
21937         status = pthread_attr_setdetachstate(&attr, detach);
21938 #endif
21939         if( status ) return status;
21940         status = pthread_create( &t, &attr, task, NULL );
21941 #if HAVE_PTHREADS < 7
21942         if( status < 0 ) status = errno;
21943 #endif
21944         if( status ) return status;
21945 #else
21946         /* Draft 4 pthreads */
21947         status = pthread_create( &t, pthread_attr_default, task, NULL );
21948         if( status ) return errno;
21949
21950         /* give thread a chance to complete */
21951         /* it should remain joinable and hence detachable */
21952         sleep( 1 );
21953
21954         status = pthread_detach( &t );
21955         if( status ) return errno;
21956 #endif
21957
21958 #ifdef HAVE_LINUX_THREADS
21959         pthread_kill_other_threads_np();
21960 #endif
21961
21962         return 0;
21963
21964   ;
21965   return 0;
21966 }
21967 _ACEOF
21968 rm -f conftest.$ac_objext conftest$ac_exeext
21969 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21970   (eval $ac_link) 2>conftest.er1
21971   ac_status=$?
21972   grep -v '^ *+' conftest.er1 >conftest.err
21973   rm -f conftest.er1
21974   cat conftest.err >&5
21975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21976   (exit $ac_status); } &&
21977          { ac_try='test -z "$ac_c_werror_flag"
21978                          || test ! -s conftest.err'
21979   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21980   (eval $ac_try) 2>&5
21981   ac_status=$?
21982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21983   (exit $ac_status); }; } &&
21984          { ac_try='test -s conftest$ac_exeext'
21985   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21986   (eval $ac_try) 2>&5
21987   ac_status=$?
21988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21989   (exit $ac_status); }; }; then
21990   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
21991 else
21992   echo "$as_me: failed program was:" >&5
21993 sed 's/^/| /' conftest.$ac_ext >&5
21994
21995 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
21996 fi
21997 rm -f conftest.err conftest.$ac_objext \
21998       conftest$ac_exeext conftest.$ac_ext
21999 else
22000   cat >conftest.$ac_ext <<_ACEOF
22001 /* confdefs.h.  */
22002 _ACEOF
22003 cat confdefs.h >>conftest.$ac_ext
22004 cat >>conftest.$ac_ext <<_ACEOF
22005 /* end confdefs.h.  */
22006
22007 /* pthread test headers */
22008 #include <pthread.h>
22009 #if HAVE_PTHREADS < 7
22010 #include <errno.h>
22011 #endif
22012 #ifndef NULL
22013 #define NULL (void*)0
22014 #endif
22015
22016 static void *task(p)
22017         void *p;
22018 {
22019         return (void *) (p == NULL);
22020 }
22021
22022
22023 int main(argc, argv)
22024         int argc;
22025         char **argv;
22026 {
22027
22028         /* pthread test function */
22029 #ifndef PTHREAD_CREATE_DETACHED
22030 #define PTHREAD_CREATE_DETACHED 1
22031 #endif
22032         pthread_t t;
22033         int status;
22034         int detach = PTHREAD_CREATE_DETACHED;
22035
22036 #if HAVE_PTHREADS > 4
22037         /* Final pthreads */
22038         pthread_attr_t attr;
22039
22040         status = pthread_attr_init(&attr);
22041         if( status ) return status;
22042
22043 #if HAVE_PTHREADS < 7
22044         status = pthread_attr_setdetachstate(&attr, &detach);
22045         if( status < 0 ) status = errno;
22046 #else
22047         status = pthread_attr_setdetachstate(&attr, detach);
22048 #endif
22049         if( status ) return status;
22050         status = pthread_create( &t, &attr, task, NULL );
22051 #if HAVE_PTHREADS < 7
22052         if( status < 0 ) status = errno;
22053 #endif
22054         if( status ) return status;
22055 #else
22056         /* Draft 4 pthreads */
22057         status = pthread_create( &t, pthread_attr_default, task, NULL );
22058         if( status ) return errno;
22059
22060         /* give thread a chance to complete */
22061         /* it should remain joinable and hence detachable */
22062         sleep( 1 );
22063
22064         status = pthread_detach( &t );
22065         if( status ) return errno;
22066 #endif
22067
22068 #ifdef HAVE_LINUX_THREADS
22069         pthread_kill_other_threads_np();
22070 #endif
22071
22072         return 0;
22073
22074 }
22075
22076 _ACEOF
22077 rm -f conftest$ac_exeext
22078 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22079   (eval $ac_link) 2>&5
22080   ac_status=$?
22081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22082   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22083   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22084   (eval $ac_try) 2>&5
22085   ac_status=$?
22086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22087   (exit $ac_status); }; }; then
22088   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
22089 else
22090   echo "$as_me: program exited with status $ac_status" >&5
22091 echo "$as_me: failed program was:" >&5
22092 sed 's/^/| /' conftest.$ac_ext >&5
22093
22094 ( exit $ac_status )
22095 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
22096 fi
22097 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22098 fi
22099
22100                 # restore the LIBS
22101                 LIBS="$ol_LIBS"
22102
22103 fi
22104 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
22105 echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6
22106
22107         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
22108                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
22109                 ol_link_threads=posix
22110         fi
22111 fi
22112
22113                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
22114 if test "$ol_link_threads" = no ; then
22115         # try -lpthread -lmach -lexc
22116         echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc" >&5
22117 echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc... $ECHO_C" >&6
22118 if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then
22119   echo $ECHO_N "(cached) $ECHO_C" >&6
22120 else
22121
22122                 # save the flags
22123                 ol_LIBS="$LIBS"
22124                 LIBS="-lpthread -lmach -lexc $LIBS"
22125
22126                 if test "$cross_compiling" = yes; then
22127   cat >conftest.$ac_ext <<_ACEOF
22128 /* confdefs.h.  */
22129 _ACEOF
22130 cat confdefs.h >>conftest.$ac_ext
22131 cat >>conftest.$ac_ext <<_ACEOF
22132 /* end confdefs.h.  */
22133
22134 /* pthread test headers */
22135 #include <pthread.h>
22136 #if HAVE_PTHREADS < 7
22137 #include <errno.h>
22138 #endif
22139 #ifndef NULL
22140 #define NULL (void*)0
22141 #endif
22142
22143 static void *task(p)
22144         void *p;
22145 {
22146         return (void *) (p == NULL);
22147 }
22148
22149 int
22150 main ()
22151 {
22152
22153         /* pthread test function */
22154 #ifndef PTHREAD_CREATE_DETACHED
22155 #define PTHREAD_CREATE_DETACHED 1
22156 #endif
22157         pthread_t t;
22158         int status;
22159         int detach = PTHREAD_CREATE_DETACHED;
22160
22161 #if HAVE_PTHREADS > 4
22162         /* Final pthreads */
22163         pthread_attr_t attr;
22164
22165         status = pthread_attr_init(&attr);
22166         if( status ) return status;
22167
22168 #if HAVE_PTHREADS < 7
22169         status = pthread_attr_setdetachstate(&attr, &detach);
22170         if( status < 0 ) status = errno;
22171 #else
22172         status = pthread_attr_setdetachstate(&attr, detach);
22173 #endif
22174         if( status ) return status;
22175         status = pthread_create( &t, &attr, task, NULL );
22176 #if HAVE_PTHREADS < 7
22177         if( status < 0 ) status = errno;
22178 #endif
22179         if( status ) return status;
22180 #else
22181         /* Draft 4 pthreads */
22182         status = pthread_create( &t, pthread_attr_default, task, NULL );
22183         if( status ) return errno;
22184
22185         /* give thread a chance to complete */
22186         /* it should remain joinable and hence detachable */
22187         sleep( 1 );
22188
22189         status = pthread_detach( &t );
22190         if( status ) return errno;
22191 #endif
22192
22193 #ifdef HAVE_LINUX_THREADS
22194         pthread_kill_other_threads_np();
22195 #endif
22196
22197         return 0;
22198
22199   ;
22200   return 0;
22201 }
22202 _ACEOF
22203 rm -f conftest.$ac_objext conftest$ac_exeext
22204 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22205   (eval $ac_link) 2>conftest.er1
22206   ac_status=$?
22207   grep -v '^ *+' conftest.er1 >conftest.err
22208   rm -f conftest.er1
22209   cat conftest.err >&5
22210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22211   (exit $ac_status); } &&
22212          { ac_try='test -z "$ac_c_werror_flag"
22213                          || test ! -s conftest.err'
22214   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22215   (eval $ac_try) 2>&5
22216   ac_status=$?
22217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22218   (exit $ac_status); }; } &&
22219          { ac_try='test -s conftest$ac_exeext'
22220   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22221   (eval $ac_try) 2>&5
22222   ac_status=$?
22223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22224   (exit $ac_status); }; }; then
22225   ol_cv_pthread_lpthread_lmach_lexc=yes
22226 else
22227   echo "$as_me: failed program was:" >&5
22228 sed 's/^/| /' conftest.$ac_ext >&5
22229
22230 ol_cv_pthread_lpthread_lmach_lexc=no
22231 fi
22232 rm -f conftest.err conftest.$ac_objext \
22233       conftest$ac_exeext conftest.$ac_ext
22234 else
22235   cat >conftest.$ac_ext <<_ACEOF
22236 /* confdefs.h.  */
22237 _ACEOF
22238 cat confdefs.h >>conftest.$ac_ext
22239 cat >>conftest.$ac_ext <<_ACEOF
22240 /* end confdefs.h.  */
22241
22242 /* pthread test headers */
22243 #include <pthread.h>
22244 #if HAVE_PTHREADS < 7
22245 #include <errno.h>
22246 #endif
22247 #ifndef NULL
22248 #define NULL (void*)0
22249 #endif
22250
22251 static void *task(p)
22252         void *p;
22253 {
22254         return (void *) (p == NULL);
22255 }
22256
22257
22258 int main(argc, argv)
22259         int argc;
22260         char **argv;
22261 {
22262
22263         /* pthread test function */
22264 #ifndef PTHREAD_CREATE_DETACHED
22265 #define PTHREAD_CREATE_DETACHED 1
22266 #endif
22267         pthread_t t;
22268         int status;
22269         int detach = PTHREAD_CREATE_DETACHED;
22270
22271 #if HAVE_PTHREADS > 4
22272         /* Final pthreads */
22273         pthread_attr_t attr;
22274
22275         status = pthread_attr_init(&attr);
22276         if( status ) return status;
22277
22278 #if HAVE_PTHREADS < 7
22279         status = pthread_attr_setdetachstate(&attr, &detach);
22280         if( status < 0 ) status = errno;
22281 #else
22282         status = pthread_attr_setdetachstate(&attr, detach);
22283 #endif
22284         if( status ) return status;
22285         status = pthread_create( &t, &attr, task, NULL );
22286 #if HAVE_PTHREADS < 7
22287         if( status < 0 ) status = errno;
22288 #endif
22289         if( status ) return status;
22290 #else
22291         /* Draft 4 pthreads */
22292         status = pthread_create( &t, pthread_attr_default, task, NULL );
22293         if( status ) return errno;
22294
22295         /* give thread a chance to complete */
22296         /* it should remain joinable and hence detachable */
22297         sleep( 1 );
22298
22299         status = pthread_detach( &t );
22300         if( status ) return errno;
22301 #endif
22302
22303 #ifdef HAVE_LINUX_THREADS
22304         pthread_kill_other_threads_np();
22305 #endif
22306
22307         return 0;
22308
22309 }
22310
22311 _ACEOF
22312 rm -f conftest$ac_exeext
22313 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22314   (eval $ac_link) 2>&5
22315   ac_status=$?
22316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22317   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22319   (eval $ac_try) 2>&5
22320   ac_status=$?
22321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22322   (exit $ac_status); }; }; then
22323   ol_cv_pthread_lpthread_lmach_lexc=yes
22324 else
22325   echo "$as_me: program exited with status $ac_status" >&5
22326 echo "$as_me: failed program was:" >&5
22327 sed 's/^/| /' conftest.$ac_ext >&5
22328
22329 ( exit $ac_status )
22330 ol_cv_pthread_lpthread_lmach_lexc=no
22331 fi
22332 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22333 fi
22334
22335                 # restore the LIBS
22336                 LIBS="$ol_LIBS"
22337
22338 fi
22339 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
22340 echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc" >&6
22341
22342         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
22343                 ol_link_pthreads="-lpthread -lmach -lexc"
22344                 ol_link_threads=posix
22345         fi
22346 fi
22347
22348
22349                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
22350 if test "$ol_link_threads" = no ; then
22351         # try -lpthread -Wl,-woff,85
22352         echo "$as_me:$LINENO: checking for pthread link with -lpthread -Wl,-woff,85" >&5
22353 echo $ECHO_N "checking for pthread link with -lpthread -Wl,-woff,85... $ECHO_C" >&6
22354 if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then
22355   echo $ECHO_N "(cached) $ECHO_C" >&6
22356 else
22357
22358                 # save the flags
22359                 ol_LIBS="$LIBS"
22360                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
22361
22362                 if test "$cross_compiling" = yes; then
22363   cat >conftest.$ac_ext <<_ACEOF
22364 /* confdefs.h.  */
22365 _ACEOF
22366 cat confdefs.h >>conftest.$ac_ext
22367 cat >>conftest.$ac_ext <<_ACEOF
22368 /* end confdefs.h.  */
22369
22370 /* pthread test headers */
22371 #include <pthread.h>
22372 #if HAVE_PTHREADS < 7
22373 #include <errno.h>
22374 #endif
22375 #ifndef NULL
22376 #define NULL (void*)0
22377 #endif
22378
22379 static void *task(p)
22380         void *p;
22381 {
22382         return (void *) (p == NULL);
22383 }
22384
22385 int
22386 main ()
22387 {
22388
22389         /* pthread test function */
22390 #ifndef PTHREAD_CREATE_DETACHED
22391 #define PTHREAD_CREATE_DETACHED 1
22392 #endif
22393         pthread_t t;
22394         int status;
22395         int detach = PTHREAD_CREATE_DETACHED;
22396
22397 #if HAVE_PTHREADS > 4
22398         /* Final pthreads */
22399         pthread_attr_t attr;
22400
22401         status = pthread_attr_init(&attr);
22402         if( status ) return status;
22403
22404 #if HAVE_PTHREADS < 7
22405         status = pthread_attr_setdetachstate(&attr, &detach);
22406         if( status < 0 ) status = errno;
22407 #else
22408         status = pthread_attr_setdetachstate(&attr, detach);
22409 #endif
22410         if( status ) return status;
22411         status = pthread_create( &t, &attr, task, NULL );
22412 #if HAVE_PTHREADS < 7
22413         if( status < 0 ) status = errno;
22414 #endif
22415         if( status ) return status;
22416 #else
22417         /* Draft 4 pthreads */
22418         status = pthread_create( &t, pthread_attr_default, task, NULL );
22419         if( status ) return errno;
22420
22421         /* give thread a chance to complete */
22422         /* it should remain joinable and hence detachable */
22423         sleep( 1 );
22424
22425         status = pthread_detach( &t );
22426         if( status ) return errno;
22427 #endif
22428
22429 #ifdef HAVE_LINUX_THREADS
22430         pthread_kill_other_threads_np();
22431 #endif
22432
22433         return 0;
22434
22435   ;
22436   return 0;
22437 }
22438 _ACEOF
22439 rm -f conftest.$ac_objext conftest$ac_exeext
22440 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22441   (eval $ac_link) 2>conftest.er1
22442   ac_status=$?
22443   grep -v '^ *+' conftest.er1 >conftest.err
22444   rm -f conftest.er1
22445   cat conftest.err >&5
22446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22447   (exit $ac_status); } &&
22448          { ac_try='test -z "$ac_c_werror_flag"
22449                          || test ! -s conftest.err'
22450   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22451   (eval $ac_try) 2>&5
22452   ac_status=$?
22453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22454   (exit $ac_status); }; } &&
22455          { ac_try='test -s conftest$ac_exeext'
22456   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22457   (eval $ac_try) 2>&5
22458   ac_status=$?
22459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22460   (exit $ac_status); }; }; then
22461   ol_cv_pthread_lib_lpthread_woff=yes
22462 else
22463   echo "$as_me: failed program was:" >&5
22464 sed 's/^/| /' conftest.$ac_ext >&5
22465
22466 ol_cv_pthread_lib_lpthread_woff=no
22467 fi
22468 rm -f conftest.err conftest.$ac_objext \
22469       conftest$ac_exeext conftest.$ac_ext
22470 else
22471   cat >conftest.$ac_ext <<_ACEOF
22472 /* confdefs.h.  */
22473 _ACEOF
22474 cat confdefs.h >>conftest.$ac_ext
22475 cat >>conftest.$ac_ext <<_ACEOF
22476 /* end confdefs.h.  */
22477
22478 /* pthread test headers */
22479 #include <pthread.h>
22480 #if HAVE_PTHREADS < 7
22481 #include <errno.h>
22482 #endif
22483 #ifndef NULL
22484 #define NULL (void*)0
22485 #endif
22486
22487 static void *task(p)
22488         void *p;
22489 {
22490         return (void *) (p == NULL);
22491 }
22492
22493
22494 int main(argc, argv)
22495         int argc;
22496         char **argv;
22497 {
22498
22499         /* pthread test function */
22500 #ifndef PTHREAD_CREATE_DETACHED
22501 #define PTHREAD_CREATE_DETACHED 1
22502 #endif
22503         pthread_t t;
22504         int status;
22505         int detach = PTHREAD_CREATE_DETACHED;
22506
22507 #if HAVE_PTHREADS > 4
22508         /* Final pthreads */
22509         pthread_attr_t attr;
22510
22511         status = pthread_attr_init(&attr);
22512         if( status ) return status;
22513
22514 #if HAVE_PTHREADS < 7
22515         status = pthread_attr_setdetachstate(&attr, &detach);
22516         if( status < 0 ) status = errno;
22517 #else
22518         status = pthread_attr_setdetachstate(&attr, detach);
22519 #endif
22520         if( status ) return status;
22521         status = pthread_create( &t, &attr, task, NULL );
22522 #if HAVE_PTHREADS < 7
22523         if( status < 0 ) status = errno;
22524 #endif
22525         if( status ) return status;
22526 #else
22527         /* Draft 4 pthreads */
22528         status = pthread_create( &t, pthread_attr_default, task, NULL );
22529         if( status ) return errno;
22530
22531         /* give thread a chance to complete */
22532         /* it should remain joinable and hence detachable */
22533         sleep( 1 );
22534
22535         status = pthread_detach( &t );
22536         if( status ) return errno;
22537 #endif
22538
22539 #ifdef HAVE_LINUX_THREADS
22540         pthread_kill_other_threads_np();
22541 #endif
22542
22543         return 0;
22544
22545 }
22546
22547 _ACEOF
22548 rm -f conftest$ac_exeext
22549 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22550   (eval $ac_link) 2>&5
22551   ac_status=$?
22552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22553   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22555   (eval $ac_try) 2>&5
22556   ac_status=$?
22557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22558   (exit $ac_status); }; }; then
22559   ol_cv_pthread_lib_lpthread_woff=yes
22560 else
22561   echo "$as_me: program exited with status $ac_status" >&5
22562 echo "$as_me: failed program was:" >&5
22563 sed 's/^/| /' conftest.$ac_ext >&5
22564
22565 ( exit $ac_status )
22566 ol_cv_pthread_lib_lpthread_woff=no
22567 fi
22568 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22569 fi
22570
22571                 # restore the LIBS
22572                 LIBS="$ol_LIBS"
22573
22574 fi
22575 echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthread_woff" >&5
22576 echo "${ECHO_T}$ol_cv_pthread_lib_lpthread_woff" >&6
22577
22578         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
22579                 ol_link_pthreads="-lpthread -Wl,-woff,85"
22580                 ol_link_threads=posix
22581         fi
22582 fi
22583
22584
22585                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
22586 if test "$ol_link_threads" = no ; then
22587         # try -lpthread
22588         echo "$as_me:$LINENO: checking for pthread link with -lpthread" >&5
22589 echo $ECHO_N "checking for pthread link with -lpthread... $ECHO_C" >&6
22590 if test "${ol_cv_pthread_lpthread+set}" = set; then
22591   echo $ECHO_N "(cached) $ECHO_C" >&6
22592 else
22593
22594                 # save the flags
22595                 ol_LIBS="$LIBS"
22596                 LIBS="-lpthread $LIBS"
22597
22598                 if test "$cross_compiling" = yes; then
22599   cat >conftest.$ac_ext <<_ACEOF
22600 /* confdefs.h.  */
22601 _ACEOF
22602 cat confdefs.h >>conftest.$ac_ext
22603 cat >>conftest.$ac_ext <<_ACEOF
22604 /* end confdefs.h.  */
22605
22606 /* pthread test headers */
22607 #include <pthread.h>
22608 #if HAVE_PTHREADS < 7
22609 #include <errno.h>
22610 #endif
22611 #ifndef NULL
22612 #define NULL (void*)0
22613 #endif
22614
22615 static void *task(p)
22616         void *p;
22617 {
22618         return (void *) (p == NULL);
22619 }
22620
22621 int
22622 main ()
22623 {
22624
22625         /* pthread test function */
22626 #ifndef PTHREAD_CREATE_DETACHED
22627 #define PTHREAD_CREATE_DETACHED 1
22628 #endif
22629         pthread_t t;
22630         int status;
22631         int detach = PTHREAD_CREATE_DETACHED;
22632
22633 #if HAVE_PTHREADS > 4
22634         /* Final pthreads */
22635         pthread_attr_t attr;
22636
22637         status = pthread_attr_init(&attr);
22638         if( status ) return status;
22639
22640 #if HAVE_PTHREADS < 7
22641         status = pthread_attr_setdetachstate(&attr, &detach);
22642         if( status < 0 ) status = errno;
22643 #else
22644         status = pthread_attr_setdetachstate(&attr, detach);
22645 #endif
22646         if( status ) return status;
22647         status = pthread_create( &t, &attr, task, NULL );
22648 #if HAVE_PTHREADS < 7
22649         if( status < 0 ) status = errno;
22650 #endif
22651         if( status ) return status;
22652 #else
22653         /* Draft 4 pthreads */
22654         status = pthread_create( &t, pthread_attr_default, task, NULL );
22655         if( status ) return errno;
22656
22657         /* give thread a chance to complete */
22658         /* it should remain joinable and hence detachable */
22659         sleep( 1 );
22660
22661         status = pthread_detach( &t );
22662         if( status ) return errno;
22663 #endif
22664
22665 #ifdef HAVE_LINUX_THREADS
22666         pthread_kill_other_threads_np();
22667 #endif
22668
22669         return 0;
22670
22671   ;
22672   return 0;
22673 }
22674 _ACEOF
22675 rm -f conftest.$ac_objext conftest$ac_exeext
22676 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22677   (eval $ac_link) 2>conftest.er1
22678   ac_status=$?
22679   grep -v '^ *+' conftest.er1 >conftest.err
22680   rm -f conftest.er1
22681   cat conftest.err >&5
22682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22683   (exit $ac_status); } &&
22684          { ac_try='test -z "$ac_c_werror_flag"
22685                          || test ! -s conftest.err'
22686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22687   (eval $ac_try) 2>&5
22688   ac_status=$?
22689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22690   (exit $ac_status); }; } &&
22691          { ac_try='test -s conftest$ac_exeext'
22692   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22693   (eval $ac_try) 2>&5
22694   ac_status=$?
22695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22696   (exit $ac_status); }; }; then
22697   ol_cv_pthread_lpthread=yes
22698 else
22699   echo "$as_me: failed program was:" >&5
22700 sed 's/^/| /' conftest.$ac_ext >&5
22701
22702 ol_cv_pthread_lpthread=no
22703 fi
22704 rm -f conftest.err conftest.$ac_objext \
22705       conftest$ac_exeext conftest.$ac_ext
22706 else
22707   cat >conftest.$ac_ext <<_ACEOF
22708 /* confdefs.h.  */
22709 _ACEOF
22710 cat confdefs.h >>conftest.$ac_ext
22711 cat >>conftest.$ac_ext <<_ACEOF
22712 /* end confdefs.h.  */
22713
22714 /* pthread test headers */
22715 #include <pthread.h>
22716 #if HAVE_PTHREADS < 7
22717 #include <errno.h>
22718 #endif
22719 #ifndef NULL
22720 #define NULL (void*)0
22721 #endif
22722
22723 static void *task(p)
22724         void *p;
22725 {
22726         return (void *) (p == NULL);
22727 }
22728
22729
22730 int main(argc, argv)
22731         int argc;
22732         char **argv;
22733 {
22734
22735         /* pthread test function */
22736 #ifndef PTHREAD_CREATE_DETACHED
22737 #define PTHREAD_CREATE_DETACHED 1
22738 #endif
22739         pthread_t t;
22740         int status;
22741         int detach = PTHREAD_CREATE_DETACHED;
22742
22743 #if HAVE_PTHREADS > 4
22744         /* Final pthreads */
22745         pthread_attr_t attr;
22746
22747         status = pthread_attr_init(&attr);
22748         if( status ) return status;
22749
22750 #if HAVE_PTHREADS < 7
22751         status = pthread_attr_setdetachstate(&attr, &detach);
22752         if( status < 0 ) status = errno;
22753 #else
22754         status = pthread_attr_setdetachstate(&attr, detach);
22755 #endif
22756         if( status ) return status;
22757         status = pthread_create( &t, &attr, task, NULL );
22758 #if HAVE_PTHREADS < 7
22759         if( status < 0 ) status = errno;
22760 #endif
22761         if( status ) return status;
22762 #else
22763         /* Draft 4 pthreads */
22764         status = pthread_create( &t, pthread_attr_default, task, NULL );
22765         if( status ) return errno;
22766
22767         /* give thread a chance to complete */
22768         /* it should remain joinable and hence detachable */
22769         sleep( 1 );
22770
22771         status = pthread_detach( &t );
22772         if( status ) return errno;
22773 #endif
22774
22775 #ifdef HAVE_LINUX_THREADS
22776         pthread_kill_other_threads_np();
22777 #endif
22778
22779         return 0;
22780
22781 }
22782
22783 _ACEOF
22784 rm -f conftest$ac_exeext
22785 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22786   (eval $ac_link) 2>&5
22787   ac_status=$?
22788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22789   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22791   (eval $ac_try) 2>&5
22792   ac_status=$?
22793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22794   (exit $ac_status); }; }; then
22795   ol_cv_pthread_lpthread=yes
22796 else
22797   echo "$as_me: program exited with status $ac_status" >&5
22798 echo "$as_me: failed program was:" >&5
22799 sed 's/^/| /' conftest.$ac_ext >&5
22800
22801 ( exit $ac_status )
22802 ol_cv_pthread_lpthread=no
22803 fi
22804 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22805 fi
22806
22807                 # restore the LIBS
22808                 LIBS="$ol_LIBS"
22809
22810 fi
22811 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread" >&5
22812 echo "${ECHO_T}$ol_cv_pthread_lpthread" >&6
22813
22814         if test $ol_cv_pthread_lpthread = yes ; then
22815                 ol_link_pthreads="-lpthread"
22816                 ol_link_threads=posix
22817         fi
22818 fi
22819
22820                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
22821 if test "$ol_link_threads" = no ; then
22822         # try -lc_r
22823         echo "$as_me:$LINENO: checking for pthread link with -lc_r" >&5
22824 echo $ECHO_N "checking for pthread link with -lc_r... $ECHO_C" >&6
22825 if test "${ol_cv_pthread_lc_r+set}" = set; then
22826   echo $ECHO_N "(cached) $ECHO_C" >&6
22827 else
22828
22829                 # save the flags
22830                 ol_LIBS="$LIBS"
22831                 LIBS="-lc_r $LIBS"
22832
22833                 if test "$cross_compiling" = yes; then
22834   cat >conftest.$ac_ext <<_ACEOF
22835 /* confdefs.h.  */
22836 _ACEOF
22837 cat confdefs.h >>conftest.$ac_ext
22838 cat >>conftest.$ac_ext <<_ACEOF
22839 /* end confdefs.h.  */
22840
22841 /* pthread test headers */
22842 #include <pthread.h>
22843 #if HAVE_PTHREADS < 7
22844 #include <errno.h>
22845 #endif
22846 #ifndef NULL
22847 #define NULL (void*)0
22848 #endif
22849
22850 static void *task(p)
22851         void *p;
22852 {
22853         return (void *) (p == NULL);
22854 }
22855
22856 int
22857 main ()
22858 {
22859
22860         /* pthread test function */
22861 #ifndef PTHREAD_CREATE_DETACHED
22862 #define PTHREAD_CREATE_DETACHED 1
22863 #endif
22864         pthread_t t;
22865         int status;
22866         int detach = PTHREAD_CREATE_DETACHED;
22867
22868 #if HAVE_PTHREADS > 4
22869         /* Final pthreads */
22870         pthread_attr_t attr;
22871
22872         status = pthread_attr_init(&attr);
22873         if( status ) return status;
22874
22875 #if HAVE_PTHREADS < 7
22876         status = pthread_attr_setdetachstate(&attr, &detach);
22877         if( status < 0 ) status = errno;
22878 #else
22879         status = pthread_attr_setdetachstate(&attr, detach);
22880 #endif
22881         if( status ) return status;
22882         status = pthread_create( &t, &attr, task, NULL );
22883 #if HAVE_PTHREADS < 7
22884         if( status < 0 ) status = errno;
22885 #endif
22886         if( status ) return status;
22887 #else
22888         /* Draft 4 pthreads */
22889         status = pthread_create( &t, pthread_attr_default, task, NULL );
22890         if( status ) return errno;
22891
22892         /* give thread a chance to complete */
22893         /* it should remain joinable and hence detachable */
22894         sleep( 1 );
22895
22896         status = pthread_detach( &t );
22897         if( status ) return errno;
22898 #endif
22899
22900 #ifdef HAVE_LINUX_THREADS
22901         pthread_kill_other_threads_np();
22902 #endif
22903
22904         return 0;
22905
22906   ;
22907   return 0;
22908 }
22909 _ACEOF
22910 rm -f conftest.$ac_objext conftest$ac_exeext
22911 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22912   (eval $ac_link) 2>conftest.er1
22913   ac_status=$?
22914   grep -v '^ *+' conftest.er1 >conftest.err
22915   rm -f conftest.er1
22916   cat conftest.err >&5
22917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22918   (exit $ac_status); } &&
22919          { ac_try='test -z "$ac_c_werror_flag"
22920                          || test ! -s conftest.err'
22921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22922   (eval $ac_try) 2>&5
22923   ac_status=$?
22924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22925   (exit $ac_status); }; } &&
22926          { ac_try='test -s conftest$ac_exeext'
22927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22928   (eval $ac_try) 2>&5
22929   ac_status=$?
22930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22931   (exit $ac_status); }; }; then
22932   ol_cv_pthread_lc_r=yes
22933 else
22934   echo "$as_me: failed program was:" >&5
22935 sed 's/^/| /' conftest.$ac_ext >&5
22936
22937 ol_cv_pthread_lc_r=no
22938 fi
22939 rm -f conftest.err conftest.$ac_objext \
22940       conftest$ac_exeext conftest.$ac_ext
22941 else
22942   cat >conftest.$ac_ext <<_ACEOF
22943 /* confdefs.h.  */
22944 _ACEOF
22945 cat confdefs.h >>conftest.$ac_ext
22946 cat >>conftest.$ac_ext <<_ACEOF
22947 /* end confdefs.h.  */
22948
22949 /* pthread test headers */
22950 #include <pthread.h>
22951 #if HAVE_PTHREADS < 7
22952 #include <errno.h>
22953 #endif
22954 #ifndef NULL
22955 #define NULL (void*)0
22956 #endif
22957
22958 static void *task(p)
22959         void *p;
22960 {
22961         return (void *) (p == NULL);
22962 }
22963
22964
22965 int main(argc, argv)
22966         int argc;
22967         char **argv;
22968 {
22969
22970         /* pthread test function */
22971 #ifndef PTHREAD_CREATE_DETACHED
22972 #define PTHREAD_CREATE_DETACHED 1
22973 #endif
22974         pthread_t t;
22975         int status;
22976         int detach = PTHREAD_CREATE_DETACHED;
22977
22978 #if HAVE_PTHREADS > 4
22979         /* Final pthreads */
22980         pthread_attr_t attr;
22981
22982         status = pthread_attr_init(&attr);
22983         if( status ) return status;
22984
22985 #if HAVE_PTHREADS < 7
22986         status = pthread_attr_setdetachstate(&attr, &detach);
22987         if( status < 0 ) status = errno;
22988 #else
22989         status = pthread_attr_setdetachstate(&attr, detach);
22990 #endif
22991         if( status ) return status;
22992         status = pthread_create( &t, &attr, task, NULL );
22993 #if HAVE_PTHREADS < 7
22994         if( status < 0 ) status = errno;
22995 #endif
22996         if( status ) return status;
22997 #else
22998         /* Draft 4 pthreads */
22999         status = pthread_create( &t, pthread_attr_default, task, NULL );
23000         if( status ) return errno;
23001
23002         /* give thread a chance to complete */
23003         /* it should remain joinable and hence detachable */
23004         sleep( 1 );
23005
23006         status = pthread_detach( &t );
23007         if( status ) return errno;
23008 #endif
23009
23010 #ifdef HAVE_LINUX_THREADS
23011         pthread_kill_other_threads_np();
23012 #endif
23013
23014         return 0;
23015
23016 }
23017
23018 _ACEOF
23019 rm -f conftest$ac_exeext
23020 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23021   (eval $ac_link) 2>&5
23022   ac_status=$?
23023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23024   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23025   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23026   (eval $ac_try) 2>&5
23027   ac_status=$?
23028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23029   (exit $ac_status); }; }; then
23030   ol_cv_pthread_lc_r=yes
23031 else
23032   echo "$as_me: program exited with status $ac_status" >&5
23033 echo "$as_me: failed program was:" >&5
23034 sed 's/^/| /' conftest.$ac_ext >&5
23035
23036 ( exit $ac_status )
23037 ol_cv_pthread_lc_r=no
23038 fi
23039 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23040 fi
23041
23042                 # restore the LIBS
23043                 LIBS="$ol_LIBS"
23044
23045 fi
23046 echo "$as_me:$LINENO: result: $ol_cv_pthread_lc_r" >&5
23047 echo "${ECHO_T}$ol_cv_pthread_lc_r" >&6
23048
23049         if test $ol_cv_pthread_lc_r = yes ; then
23050                 ol_link_pthreads="-lc_r"
23051                 ol_link_threads=posix
23052         fi
23053 fi
23054
23055
23056                 # Pthread try link: -threads (ol_cv_pthread_threads)
23057 if test "$ol_link_threads" = no ; then
23058         # try -threads
23059         echo "$as_me:$LINENO: checking for pthread link with -threads" >&5
23060 echo $ECHO_N "checking for pthread link with -threads... $ECHO_C" >&6
23061 if test "${ol_cv_pthread_threads+set}" = set; then
23062   echo $ECHO_N "(cached) $ECHO_C" >&6
23063 else
23064
23065                 # save the flags
23066                 ol_LIBS="$LIBS"
23067                 LIBS="-threads $LIBS"
23068
23069                 if test "$cross_compiling" = yes; then
23070   cat >conftest.$ac_ext <<_ACEOF
23071 /* confdefs.h.  */
23072 _ACEOF
23073 cat confdefs.h >>conftest.$ac_ext
23074 cat >>conftest.$ac_ext <<_ACEOF
23075 /* end confdefs.h.  */
23076
23077 /* pthread test headers */
23078 #include <pthread.h>
23079 #if HAVE_PTHREADS < 7
23080 #include <errno.h>
23081 #endif
23082 #ifndef NULL
23083 #define NULL (void*)0
23084 #endif
23085
23086 static void *task(p)
23087         void *p;
23088 {
23089         return (void *) (p == NULL);
23090 }
23091
23092 int
23093 main ()
23094 {
23095
23096         /* pthread test function */
23097 #ifndef PTHREAD_CREATE_DETACHED
23098 #define PTHREAD_CREATE_DETACHED 1
23099 #endif
23100         pthread_t t;
23101         int status;
23102         int detach = PTHREAD_CREATE_DETACHED;
23103
23104 #if HAVE_PTHREADS > 4
23105         /* Final pthreads */
23106         pthread_attr_t attr;
23107
23108         status = pthread_attr_init(&attr);
23109         if( status ) return status;
23110
23111 #if HAVE_PTHREADS < 7
23112         status = pthread_attr_setdetachstate(&attr, &detach);
23113         if( status < 0 ) status = errno;
23114 #else
23115         status = pthread_attr_setdetachstate(&attr, detach);
23116 #endif
23117         if( status ) return status;
23118         status = pthread_create( &t, &attr, task, NULL );
23119 #if HAVE_PTHREADS < 7
23120         if( status < 0 ) status = errno;
23121 #endif
23122         if( status ) return status;
23123 #else
23124         /* Draft 4 pthreads */
23125         status = pthread_create( &t, pthread_attr_default, task, NULL );
23126         if( status ) return errno;
23127
23128         /* give thread a chance to complete */
23129         /* it should remain joinable and hence detachable */
23130         sleep( 1 );
23131
23132         status = pthread_detach( &t );
23133         if( status ) return errno;
23134 #endif
23135
23136 #ifdef HAVE_LINUX_THREADS
23137         pthread_kill_other_threads_np();
23138 #endif
23139
23140         return 0;
23141
23142   ;
23143   return 0;
23144 }
23145 _ACEOF
23146 rm -f conftest.$ac_objext conftest$ac_exeext
23147 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23148   (eval $ac_link) 2>conftest.er1
23149   ac_status=$?
23150   grep -v '^ *+' conftest.er1 >conftest.err
23151   rm -f conftest.er1
23152   cat conftest.err >&5
23153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23154   (exit $ac_status); } &&
23155          { ac_try='test -z "$ac_c_werror_flag"
23156                          || test ! -s conftest.err'
23157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23158   (eval $ac_try) 2>&5
23159   ac_status=$?
23160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23161   (exit $ac_status); }; } &&
23162          { ac_try='test -s conftest$ac_exeext'
23163   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23164   (eval $ac_try) 2>&5
23165   ac_status=$?
23166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23167   (exit $ac_status); }; }; then
23168   ol_cv_pthread_threads=yes
23169 else
23170   echo "$as_me: failed program was:" >&5
23171 sed 's/^/| /' conftest.$ac_ext >&5
23172
23173 ol_cv_pthread_threads=no
23174 fi
23175 rm -f conftest.err conftest.$ac_objext \
23176       conftest$ac_exeext conftest.$ac_ext
23177 else
23178   cat >conftest.$ac_ext <<_ACEOF
23179 /* confdefs.h.  */
23180 _ACEOF
23181 cat confdefs.h >>conftest.$ac_ext
23182 cat >>conftest.$ac_ext <<_ACEOF
23183 /* end confdefs.h.  */
23184
23185 /* pthread test headers */
23186 #include <pthread.h>
23187 #if HAVE_PTHREADS < 7
23188 #include <errno.h>
23189 #endif
23190 #ifndef NULL
23191 #define NULL (void*)0
23192 #endif
23193
23194 static void *task(p)
23195         void *p;
23196 {
23197         return (void *) (p == NULL);
23198 }
23199
23200
23201 int main(argc, argv)
23202         int argc;
23203         char **argv;
23204 {
23205
23206         /* pthread test function */
23207 #ifndef PTHREAD_CREATE_DETACHED
23208 #define PTHREAD_CREATE_DETACHED 1
23209 #endif
23210         pthread_t t;
23211         int status;
23212         int detach = PTHREAD_CREATE_DETACHED;
23213
23214 #if HAVE_PTHREADS > 4
23215         /* Final pthreads */
23216         pthread_attr_t attr;
23217
23218         status = pthread_attr_init(&attr);
23219         if( status ) return status;
23220
23221 #if HAVE_PTHREADS < 7
23222         status = pthread_attr_setdetachstate(&attr, &detach);
23223         if( status < 0 ) status = errno;
23224 #else
23225         status = pthread_attr_setdetachstate(&attr, detach);
23226 #endif
23227         if( status ) return status;
23228         status = pthread_create( &t, &attr, task, NULL );
23229 #if HAVE_PTHREADS < 7
23230         if( status < 0 ) status = errno;
23231 #endif
23232         if( status ) return status;
23233 #else
23234         /* Draft 4 pthreads */
23235         status = pthread_create( &t, pthread_attr_default, task, NULL );
23236         if( status ) return errno;
23237
23238         /* give thread a chance to complete */
23239         /* it should remain joinable and hence detachable */
23240         sleep( 1 );
23241
23242         status = pthread_detach( &t );
23243         if( status ) return errno;
23244 #endif
23245
23246 #ifdef HAVE_LINUX_THREADS
23247         pthread_kill_other_threads_np();
23248 #endif
23249
23250         return 0;
23251
23252 }
23253
23254 _ACEOF
23255 rm -f conftest$ac_exeext
23256 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23257   (eval $ac_link) 2>&5
23258   ac_status=$?
23259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23260   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23261   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23262   (eval $ac_try) 2>&5
23263   ac_status=$?
23264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23265   (exit $ac_status); }; }; then
23266   ol_cv_pthread_threads=yes
23267 else
23268   echo "$as_me: program exited with status $ac_status" >&5
23269 echo "$as_me: failed program was:" >&5
23270 sed 's/^/| /' conftest.$ac_ext >&5
23271
23272 ( exit $ac_status )
23273 ol_cv_pthread_threads=no
23274 fi
23275 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23276 fi
23277
23278                 # restore the LIBS
23279                 LIBS="$ol_LIBS"
23280
23281 fi
23282 echo "$as_me:$LINENO: result: $ol_cv_pthread_threads" >&5
23283 echo "${ECHO_T}$ol_cv_pthread_threads" >&6
23284
23285         if test $ol_cv_pthread_threads = yes ; then
23286                 ol_link_pthreads="-threads"
23287                 ol_link_threads=posix
23288         fi
23289 fi
23290
23291
23292                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
23293 if test "$ol_link_threads" = no ; then
23294         # try -lpthreads -lmach -lexc -lc_r
23295         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
23296 echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc -lc_r... $ECHO_C" >&6
23297 if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then
23298   echo $ECHO_N "(cached) $ECHO_C" >&6
23299 else
23300
23301                 # save the flags
23302                 ol_LIBS="$LIBS"
23303                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
23304
23305                 if test "$cross_compiling" = yes; then
23306   cat >conftest.$ac_ext <<_ACEOF
23307 /* confdefs.h.  */
23308 _ACEOF
23309 cat confdefs.h >>conftest.$ac_ext
23310 cat >>conftest.$ac_ext <<_ACEOF
23311 /* end confdefs.h.  */
23312
23313 /* pthread test headers */
23314 #include <pthread.h>
23315 #if HAVE_PTHREADS < 7
23316 #include <errno.h>
23317 #endif
23318 #ifndef NULL
23319 #define NULL (void*)0
23320 #endif
23321
23322 static void *task(p)
23323         void *p;
23324 {
23325         return (void *) (p == NULL);
23326 }
23327
23328 int
23329 main ()
23330 {
23331
23332         /* pthread test function */
23333 #ifndef PTHREAD_CREATE_DETACHED
23334 #define PTHREAD_CREATE_DETACHED 1
23335 #endif
23336         pthread_t t;
23337         int status;
23338         int detach = PTHREAD_CREATE_DETACHED;
23339
23340 #if HAVE_PTHREADS > 4
23341         /* Final pthreads */
23342         pthread_attr_t attr;
23343
23344         status = pthread_attr_init(&attr);
23345         if( status ) return status;
23346
23347 #if HAVE_PTHREADS < 7
23348         status = pthread_attr_setdetachstate(&attr, &detach);
23349         if( status < 0 ) status = errno;
23350 #else
23351         status = pthread_attr_setdetachstate(&attr, detach);
23352 #endif
23353         if( status ) return status;
23354         status = pthread_create( &t, &attr, task, NULL );
23355 #if HAVE_PTHREADS < 7
23356         if( status < 0 ) status = errno;
23357 #endif
23358         if( status ) return status;
23359 #else
23360         /* Draft 4 pthreads */
23361         status = pthread_create( &t, pthread_attr_default, task, NULL );
23362         if( status ) return errno;
23363
23364         /* give thread a chance to complete */
23365         /* it should remain joinable and hence detachable */
23366         sleep( 1 );
23367
23368         status = pthread_detach( &t );
23369         if( status ) return errno;
23370 #endif
23371
23372 #ifdef HAVE_LINUX_THREADS
23373         pthread_kill_other_threads_np();
23374 #endif
23375
23376         return 0;
23377
23378   ;
23379   return 0;
23380 }
23381 _ACEOF
23382 rm -f conftest.$ac_objext conftest$ac_exeext
23383 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23384   (eval $ac_link) 2>conftest.er1
23385   ac_status=$?
23386   grep -v '^ *+' conftest.er1 >conftest.err
23387   rm -f conftest.er1
23388   cat conftest.err >&5
23389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23390   (exit $ac_status); } &&
23391          { ac_try='test -z "$ac_c_werror_flag"
23392                          || test ! -s conftest.err'
23393   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23394   (eval $ac_try) 2>&5
23395   ac_status=$?
23396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23397   (exit $ac_status); }; } &&
23398          { ac_try='test -s conftest$ac_exeext'
23399   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23400   (eval $ac_try) 2>&5
23401   ac_status=$?
23402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23403   (exit $ac_status); }; }; then
23404   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
23405 else
23406   echo "$as_me: failed program was:" >&5
23407 sed 's/^/| /' conftest.$ac_ext >&5
23408
23409 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
23410 fi
23411 rm -f conftest.err conftest.$ac_objext \
23412       conftest$ac_exeext conftest.$ac_ext
23413 else
23414   cat >conftest.$ac_ext <<_ACEOF
23415 /* confdefs.h.  */
23416 _ACEOF
23417 cat confdefs.h >>conftest.$ac_ext
23418 cat >>conftest.$ac_ext <<_ACEOF
23419 /* end confdefs.h.  */
23420
23421 /* pthread test headers */
23422 #include <pthread.h>
23423 #if HAVE_PTHREADS < 7
23424 #include <errno.h>
23425 #endif
23426 #ifndef NULL
23427 #define NULL (void*)0
23428 #endif
23429
23430 static void *task(p)
23431         void *p;
23432 {
23433         return (void *) (p == NULL);
23434 }
23435
23436
23437 int main(argc, argv)
23438         int argc;
23439         char **argv;
23440 {
23441
23442         /* pthread test function */
23443 #ifndef PTHREAD_CREATE_DETACHED
23444 #define PTHREAD_CREATE_DETACHED 1
23445 #endif
23446         pthread_t t;
23447         int status;
23448         int detach = PTHREAD_CREATE_DETACHED;
23449
23450 #if HAVE_PTHREADS > 4
23451         /* Final pthreads */
23452         pthread_attr_t attr;
23453
23454         status = pthread_attr_init(&attr);
23455         if( status ) return status;
23456
23457 #if HAVE_PTHREADS < 7
23458         status = pthread_attr_setdetachstate(&attr, &detach);
23459         if( status < 0 ) status = errno;
23460 #else
23461         status = pthread_attr_setdetachstate(&attr, detach);
23462 #endif
23463         if( status ) return status;
23464         status = pthread_create( &t, &attr, task, NULL );
23465 #if HAVE_PTHREADS < 7
23466         if( status < 0 ) status = errno;
23467 #endif
23468         if( status ) return status;
23469 #else
23470         /* Draft 4 pthreads */
23471         status = pthread_create( &t, pthread_attr_default, task, NULL );
23472         if( status ) return errno;
23473
23474         /* give thread a chance to complete */
23475         /* it should remain joinable and hence detachable */
23476         sleep( 1 );
23477
23478         status = pthread_detach( &t );
23479         if( status ) return errno;
23480 #endif
23481
23482 #ifdef HAVE_LINUX_THREADS
23483         pthread_kill_other_threads_np();
23484 #endif
23485
23486         return 0;
23487
23488 }
23489
23490 _ACEOF
23491 rm -f conftest$ac_exeext
23492 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23493   (eval $ac_link) 2>&5
23494   ac_status=$?
23495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23496   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23497   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23498   (eval $ac_try) 2>&5
23499   ac_status=$?
23500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23501   (exit $ac_status); }; }; then
23502   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
23503 else
23504   echo "$as_me: program exited with status $ac_status" >&5
23505 echo "$as_me: failed program was:" >&5
23506 sed 's/^/| /' conftest.$ac_ext >&5
23507
23508 ( exit $ac_status )
23509 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
23510 fi
23511 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23512 fi
23513
23514                 # restore the LIBS
23515                 LIBS="$ol_LIBS"
23516
23517 fi
23518 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
23519 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6
23520
23521         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
23522                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
23523                 ol_link_threads=posix
23524         fi
23525 fi
23526
23527                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
23528 if test "$ol_link_threads" = no ; then
23529         # try -lpthreads -lmach -lexc
23530         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc" >&5
23531 echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc... $ECHO_C" >&6
23532 if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then
23533   echo $ECHO_N "(cached) $ECHO_C" >&6
23534 else
23535
23536                 # save the flags
23537                 ol_LIBS="$LIBS"
23538                 LIBS="-lpthreads -lmach -lexc $LIBS"
23539
23540                 if test "$cross_compiling" = yes; then
23541   cat >conftest.$ac_ext <<_ACEOF
23542 /* confdefs.h.  */
23543 _ACEOF
23544 cat confdefs.h >>conftest.$ac_ext
23545 cat >>conftest.$ac_ext <<_ACEOF
23546 /* end confdefs.h.  */
23547
23548 /* pthread test headers */
23549 #include <pthread.h>
23550 #if HAVE_PTHREADS < 7
23551 #include <errno.h>
23552 #endif
23553 #ifndef NULL
23554 #define NULL (void*)0
23555 #endif
23556
23557 static void *task(p)
23558         void *p;
23559 {
23560         return (void *) (p == NULL);
23561 }
23562
23563 int
23564 main ()
23565 {
23566
23567         /* pthread test function */
23568 #ifndef PTHREAD_CREATE_DETACHED
23569 #define PTHREAD_CREATE_DETACHED 1
23570 #endif
23571         pthread_t t;
23572         int status;
23573         int detach = PTHREAD_CREATE_DETACHED;
23574
23575 #if HAVE_PTHREADS > 4
23576         /* Final pthreads */
23577         pthread_attr_t attr;
23578
23579         status = pthread_attr_init(&attr);
23580         if( status ) return status;
23581
23582 #if HAVE_PTHREADS < 7
23583         status = pthread_attr_setdetachstate(&attr, &detach);
23584         if( status < 0 ) status = errno;
23585 #else
23586         status = pthread_attr_setdetachstate(&attr, detach);
23587 #endif
23588         if( status ) return status;
23589         status = pthread_create( &t, &attr, task, NULL );
23590 #if HAVE_PTHREADS < 7
23591         if( status < 0 ) status = errno;
23592 #endif
23593         if( status ) return status;
23594 #else
23595         /* Draft 4 pthreads */
23596         status = pthread_create( &t, pthread_attr_default, task, NULL );
23597         if( status ) return errno;
23598
23599         /* give thread a chance to complete */
23600         /* it should remain joinable and hence detachable */
23601         sleep( 1 );
23602
23603         status = pthread_detach( &t );
23604         if( status ) return errno;
23605 #endif
23606
23607 #ifdef HAVE_LINUX_THREADS
23608         pthread_kill_other_threads_np();
23609 #endif
23610
23611         return 0;
23612
23613   ;
23614   return 0;
23615 }
23616 _ACEOF
23617 rm -f conftest.$ac_objext conftest$ac_exeext
23618 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23619   (eval $ac_link) 2>conftest.er1
23620   ac_status=$?
23621   grep -v '^ *+' conftest.er1 >conftest.err
23622   rm -f conftest.er1
23623   cat conftest.err >&5
23624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23625   (exit $ac_status); } &&
23626          { ac_try='test -z "$ac_c_werror_flag"
23627                          || test ! -s conftest.err'
23628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23629   (eval $ac_try) 2>&5
23630   ac_status=$?
23631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23632   (exit $ac_status); }; } &&
23633          { ac_try='test -s conftest$ac_exeext'
23634   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23635   (eval $ac_try) 2>&5
23636   ac_status=$?
23637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23638   (exit $ac_status); }; }; then
23639   ol_cv_pthread_lpthreads_lmach_lexc=yes
23640 else
23641   echo "$as_me: failed program was:" >&5
23642 sed 's/^/| /' conftest.$ac_ext >&5
23643
23644 ol_cv_pthread_lpthreads_lmach_lexc=no
23645 fi
23646 rm -f conftest.err conftest.$ac_objext \
23647       conftest$ac_exeext conftest.$ac_ext
23648 else
23649   cat >conftest.$ac_ext <<_ACEOF
23650 /* confdefs.h.  */
23651 _ACEOF
23652 cat confdefs.h >>conftest.$ac_ext
23653 cat >>conftest.$ac_ext <<_ACEOF
23654 /* end confdefs.h.  */
23655
23656 /* pthread test headers */
23657 #include <pthread.h>
23658 #if HAVE_PTHREADS < 7
23659 #include <errno.h>
23660 #endif
23661 #ifndef NULL
23662 #define NULL (void*)0
23663 #endif
23664
23665 static void *task(p)
23666         void *p;
23667 {
23668         return (void *) (p == NULL);
23669 }
23670
23671
23672 int main(argc, argv)
23673         int argc;
23674         char **argv;
23675 {
23676
23677         /* pthread test function */
23678 #ifndef PTHREAD_CREATE_DETACHED
23679 #define PTHREAD_CREATE_DETACHED 1
23680 #endif
23681         pthread_t t;
23682         int status;
23683         int detach = PTHREAD_CREATE_DETACHED;
23684
23685 #if HAVE_PTHREADS > 4
23686         /* Final pthreads */
23687         pthread_attr_t attr;
23688
23689         status = pthread_attr_init(&attr);
23690         if( status ) return status;
23691
23692 #if HAVE_PTHREADS < 7
23693         status = pthread_attr_setdetachstate(&attr, &detach);
23694         if( status < 0 ) status = errno;
23695 #else
23696         status = pthread_attr_setdetachstate(&attr, detach);
23697 #endif
23698         if( status ) return status;
23699         status = pthread_create( &t, &attr, task, NULL );
23700 #if HAVE_PTHREADS < 7
23701         if( status < 0 ) status = errno;
23702 #endif
23703         if( status ) return status;
23704 #else
23705         /* Draft 4 pthreads */
23706         status = pthread_create( &t, pthread_attr_default, task, NULL );
23707         if( status ) return errno;
23708
23709         /* give thread a chance to complete */
23710         /* it should remain joinable and hence detachable */
23711         sleep( 1 );
23712
23713         status = pthread_detach( &t );
23714         if( status ) return errno;
23715 #endif
23716
23717 #ifdef HAVE_LINUX_THREADS
23718         pthread_kill_other_threads_np();
23719 #endif
23720
23721         return 0;
23722
23723 }
23724
23725 _ACEOF
23726 rm -f conftest$ac_exeext
23727 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23728   (eval $ac_link) 2>&5
23729   ac_status=$?
23730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23731   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23732   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23733   (eval $ac_try) 2>&5
23734   ac_status=$?
23735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23736   (exit $ac_status); }; }; then
23737   ol_cv_pthread_lpthreads_lmach_lexc=yes
23738 else
23739   echo "$as_me: program exited with status $ac_status" >&5
23740 echo "$as_me: failed program was:" >&5
23741 sed 's/^/| /' conftest.$ac_ext >&5
23742
23743 ( exit $ac_status )
23744 ol_cv_pthread_lpthreads_lmach_lexc=no
23745 fi
23746 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23747 fi
23748
23749                 # restore the LIBS
23750                 LIBS="$ol_LIBS"
23751
23752 fi
23753 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
23754 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc" >&6
23755
23756         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
23757                 ol_link_pthreads="-lpthreads -lmach -lexc"
23758                 ol_link_threads=posix
23759         fi
23760 fi
23761
23762                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
23763 if test "$ol_link_threads" = no ; then
23764         # try -lpthreads -lexc
23765         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lexc" >&5
23766 echo $ECHO_N "checking for pthread link with -lpthreads -lexc... $ECHO_C" >&6
23767 if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then
23768   echo $ECHO_N "(cached) $ECHO_C" >&6
23769 else
23770
23771                 # save the flags
23772                 ol_LIBS="$LIBS"
23773                 LIBS="-lpthreads -lexc $LIBS"
23774
23775                 if test "$cross_compiling" = yes; then
23776   cat >conftest.$ac_ext <<_ACEOF
23777 /* confdefs.h.  */
23778 _ACEOF
23779 cat confdefs.h >>conftest.$ac_ext
23780 cat >>conftest.$ac_ext <<_ACEOF
23781 /* end confdefs.h.  */
23782
23783 /* pthread test headers */
23784 #include <pthread.h>
23785 #if HAVE_PTHREADS < 7
23786 #include <errno.h>
23787 #endif
23788 #ifndef NULL
23789 #define NULL (void*)0
23790 #endif
23791
23792 static void *task(p)
23793         void *p;
23794 {
23795         return (void *) (p == NULL);
23796 }
23797
23798 int
23799 main ()
23800 {
23801
23802         /* pthread test function */
23803 #ifndef PTHREAD_CREATE_DETACHED
23804 #define PTHREAD_CREATE_DETACHED 1
23805 #endif
23806         pthread_t t;
23807         int status;
23808         int detach = PTHREAD_CREATE_DETACHED;
23809
23810 #if HAVE_PTHREADS > 4
23811         /* Final pthreads */
23812         pthread_attr_t attr;
23813
23814         status = pthread_attr_init(&attr);
23815         if( status ) return status;
23816
23817 #if HAVE_PTHREADS < 7
23818         status = pthread_attr_setdetachstate(&attr, &detach);
23819         if( status < 0 ) status = errno;
23820 #else
23821         status = pthread_attr_setdetachstate(&attr, detach);
23822 #endif
23823         if( status ) return status;
23824         status = pthread_create( &t, &attr, task, NULL );
23825 #if HAVE_PTHREADS < 7
23826         if( status < 0 ) status = errno;
23827 #endif
23828         if( status ) return status;
23829 #else
23830         /* Draft 4 pthreads */
23831         status = pthread_create( &t, pthread_attr_default, task, NULL );
23832         if( status ) return errno;
23833
23834         /* give thread a chance to complete */
23835         /* it should remain joinable and hence detachable */
23836         sleep( 1 );
23837
23838         status = pthread_detach( &t );
23839         if( status ) return errno;
23840 #endif
23841
23842 #ifdef HAVE_LINUX_THREADS
23843         pthread_kill_other_threads_np();
23844 #endif
23845
23846         return 0;
23847
23848   ;
23849   return 0;
23850 }
23851 _ACEOF
23852 rm -f conftest.$ac_objext conftest$ac_exeext
23853 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23854   (eval $ac_link) 2>conftest.er1
23855   ac_status=$?
23856   grep -v '^ *+' conftest.er1 >conftest.err
23857   rm -f conftest.er1
23858   cat conftest.err >&5
23859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23860   (exit $ac_status); } &&
23861          { ac_try='test -z "$ac_c_werror_flag"
23862                          || test ! -s conftest.err'
23863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23864   (eval $ac_try) 2>&5
23865   ac_status=$?
23866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23867   (exit $ac_status); }; } &&
23868          { ac_try='test -s conftest$ac_exeext'
23869   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23870   (eval $ac_try) 2>&5
23871   ac_status=$?
23872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23873   (exit $ac_status); }; }; then
23874   ol_cv_pthread_lpthreads_lexc=yes
23875 else
23876   echo "$as_me: failed program was:" >&5
23877 sed 's/^/| /' conftest.$ac_ext >&5
23878
23879 ol_cv_pthread_lpthreads_lexc=no
23880 fi
23881 rm -f conftest.err conftest.$ac_objext \
23882       conftest$ac_exeext conftest.$ac_ext
23883 else
23884   cat >conftest.$ac_ext <<_ACEOF
23885 /* confdefs.h.  */
23886 _ACEOF
23887 cat confdefs.h >>conftest.$ac_ext
23888 cat >>conftest.$ac_ext <<_ACEOF
23889 /* end confdefs.h.  */
23890
23891 /* pthread test headers */
23892 #include <pthread.h>
23893 #if HAVE_PTHREADS < 7
23894 #include <errno.h>
23895 #endif
23896 #ifndef NULL
23897 #define NULL (void*)0
23898 #endif
23899
23900 static void *task(p)
23901         void *p;
23902 {
23903         return (void *) (p == NULL);
23904 }
23905
23906
23907 int main(argc, argv)
23908         int argc;
23909         char **argv;
23910 {
23911
23912         /* pthread test function */
23913 #ifndef PTHREAD_CREATE_DETACHED
23914 #define PTHREAD_CREATE_DETACHED 1
23915 #endif
23916         pthread_t t;
23917         int status;
23918         int detach = PTHREAD_CREATE_DETACHED;
23919
23920 #if HAVE_PTHREADS > 4
23921         /* Final pthreads */
23922         pthread_attr_t attr;
23923
23924         status = pthread_attr_init(&attr);
23925         if( status ) return status;
23926
23927 #if HAVE_PTHREADS < 7
23928         status = pthread_attr_setdetachstate(&attr, &detach);
23929         if( status < 0 ) status = errno;
23930 #else
23931         status = pthread_attr_setdetachstate(&attr, detach);
23932 #endif
23933         if( status ) return status;
23934         status = pthread_create( &t, &attr, task, NULL );
23935 #if HAVE_PTHREADS < 7
23936         if( status < 0 ) status = errno;
23937 #endif
23938         if( status ) return status;
23939 #else
23940         /* Draft 4 pthreads */
23941         status = pthread_create( &t, pthread_attr_default, task, NULL );
23942         if( status ) return errno;
23943
23944         /* give thread a chance to complete */
23945         /* it should remain joinable and hence detachable */
23946         sleep( 1 );
23947
23948         status = pthread_detach( &t );
23949         if( status ) return errno;
23950 #endif
23951
23952 #ifdef HAVE_LINUX_THREADS
23953         pthread_kill_other_threads_np();
23954 #endif
23955
23956         return 0;
23957
23958 }
23959
23960 _ACEOF
23961 rm -f conftest$ac_exeext
23962 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23963   (eval $ac_link) 2>&5
23964   ac_status=$?
23965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23966   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23968   (eval $ac_try) 2>&5
23969   ac_status=$?
23970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23971   (exit $ac_status); }; }; then
23972   ol_cv_pthread_lpthreads_lexc=yes
23973 else
23974   echo "$as_me: program exited with status $ac_status" >&5
23975 echo "$as_me: failed program was:" >&5
23976 sed 's/^/| /' conftest.$ac_ext >&5
23977
23978 ( exit $ac_status )
23979 ol_cv_pthread_lpthreads_lexc=no
23980 fi
23981 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23982 fi
23983
23984                 # restore the LIBS
23985                 LIBS="$ol_LIBS"
23986
23987 fi
23988 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lexc" >&5
23989 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lexc" >&6
23990
23991         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
23992                 ol_link_pthreads="-lpthreads -lexc"
23993                 ol_link_threads=posix
23994         fi
23995 fi
23996
23997
23998                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
23999 if test "$ol_link_threads" = no ; then
24000         # try -lpthreads
24001         echo "$as_me:$LINENO: checking for pthread link with -lpthreads" >&5
24002 echo $ECHO_N "checking for pthread link with -lpthreads... $ECHO_C" >&6
24003 if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then
24004   echo $ECHO_N "(cached) $ECHO_C" >&6
24005 else
24006
24007                 # save the flags
24008                 ol_LIBS="$LIBS"
24009                 LIBS="-lpthreads $LIBS"
24010
24011                 if test "$cross_compiling" = yes; then
24012   cat >conftest.$ac_ext <<_ACEOF
24013 /* confdefs.h.  */
24014 _ACEOF
24015 cat confdefs.h >>conftest.$ac_ext
24016 cat >>conftest.$ac_ext <<_ACEOF
24017 /* end confdefs.h.  */
24018
24019 /* pthread test headers */
24020 #include <pthread.h>
24021 #if HAVE_PTHREADS < 7
24022 #include <errno.h>
24023 #endif
24024 #ifndef NULL
24025 #define NULL (void*)0
24026 #endif
24027
24028 static void *task(p)
24029         void *p;
24030 {
24031         return (void *) (p == NULL);
24032 }
24033
24034 int
24035 main ()
24036 {
24037
24038         /* pthread test function */
24039 #ifndef PTHREAD_CREATE_DETACHED
24040 #define PTHREAD_CREATE_DETACHED 1
24041 #endif
24042         pthread_t t;
24043         int status;
24044         int detach = PTHREAD_CREATE_DETACHED;
24045
24046 #if HAVE_PTHREADS > 4
24047         /* Final pthreads */
24048         pthread_attr_t attr;
24049
24050         status = pthread_attr_init(&attr);
24051         if( status ) return status;
24052
24053 #if HAVE_PTHREADS < 7
24054         status = pthread_attr_setdetachstate(&attr, &detach);
24055         if( status < 0 ) status = errno;
24056 #else
24057         status = pthread_attr_setdetachstate(&attr, detach);
24058 #endif
24059         if( status ) return status;
24060         status = pthread_create( &t, &attr, task, NULL );
24061 #if HAVE_PTHREADS < 7
24062         if( status < 0 ) status = errno;
24063 #endif
24064         if( status ) return status;
24065 #else
24066         /* Draft 4 pthreads */
24067         status = pthread_create( &t, pthread_attr_default, task, NULL );
24068         if( status ) return errno;
24069
24070         /* give thread a chance to complete */
24071         /* it should remain joinable and hence detachable */
24072         sleep( 1 );
24073
24074         status = pthread_detach( &t );
24075         if( status ) return errno;
24076 #endif
24077
24078 #ifdef HAVE_LINUX_THREADS
24079         pthread_kill_other_threads_np();
24080 #endif
24081
24082         return 0;
24083
24084   ;
24085   return 0;
24086 }
24087 _ACEOF
24088 rm -f conftest.$ac_objext conftest$ac_exeext
24089 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24090   (eval $ac_link) 2>conftest.er1
24091   ac_status=$?
24092   grep -v '^ *+' conftest.er1 >conftest.err
24093   rm -f conftest.er1
24094   cat conftest.err >&5
24095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24096   (exit $ac_status); } &&
24097          { ac_try='test -z "$ac_c_werror_flag"
24098                          || test ! -s conftest.err'
24099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24100   (eval $ac_try) 2>&5
24101   ac_status=$?
24102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24103   (exit $ac_status); }; } &&
24104          { ac_try='test -s conftest$ac_exeext'
24105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24106   (eval $ac_try) 2>&5
24107   ac_status=$?
24108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24109   (exit $ac_status); }; }; then
24110   ol_cv_pthread_lib_lpthreads=yes
24111 else
24112   echo "$as_me: failed program was:" >&5
24113 sed 's/^/| /' conftest.$ac_ext >&5
24114
24115 ol_cv_pthread_lib_lpthreads=no
24116 fi
24117 rm -f conftest.err conftest.$ac_objext \
24118       conftest$ac_exeext conftest.$ac_ext
24119 else
24120   cat >conftest.$ac_ext <<_ACEOF
24121 /* confdefs.h.  */
24122 _ACEOF
24123 cat confdefs.h >>conftest.$ac_ext
24124 cat >>conftest.$ac_ext <<_ACEOF
24125 /* end confdefs.h.  */
24126
24127 /* pthread test headers */
24128 #include <pthread.h>
24129 #if HAVE_PTHREADS < 7
24130 #include <errno.h>
24131 #endif
24132 #ifndef NULL
24133 #define NULL (void*)0
24134 #endif
24135
24136 static void *task(p)
24137         void *p;
24138 {
24139         return (void *) (p == NULL);
24140 }
24141
24142
24143 int main(argc, argv)
24144         int argc;
24145         char **argv;
24146 {
24147
24148         /* pthread test function */
24149 #ifndef PTHREAD_CREATE_DETACHED
24150 #define PTHREAD_CREATE_DETACHED 1
24151 #endif
24152         pthread_t t;
24153         int status;
24154         int detach = PTHREAD_CREATE_DETACHED;
24155
24156 #if HAVE_PTHREADS > 4
24157         /* Final pthreads */
24158         pthread_attr_t attr;
24159
24160         status = pthread_attr_init(&attr);
24161         if( status ) return status;
24162
24163 #if HAVE_PTHREADS < 7
24164         status = pthread_attr_setdetachstate(&attr, &detach);
24165         if( status < 0 ) status = errno;
24166 #else
24167         status = pthread_attr_setdetachstate(&attr, detach);
24168 #endif
24169         if( status ) return status;
24170         status = pthread_create( &t, &attr, task, NULL );
24171 #if HAVE_PTHREADS < 7
24172         if( status < 0 ) status = errno;
24173 #endif
24174         if( status ) return status;
24175 #else
24176         /* Draft 4 pthreads */
24177         status = pthread_create( &t, pthread_attr_default, task, NULL );
24178         if( status ) return errno;
24179
24180         /* give thread a chance to complete */
24181         /* it should remain joinable and hence detachable */
24182         sleep( 1 );
24183
24184         status = pthread_detach( &t );
24185         if( status ) return errno;
24186 #endif
24187
24188 #ifdef HAVE_LINUX_THREADS
24189         pthread_kill_other_threads_np();
24190 #endif
24191
24192         return 0;
24193
24194 }
24195
24196 _ACEOF
24197 rm -f conftest$ac_exeext
24198 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24199   (eval $ac_link) 2>&5
24200   ac_status=$?
24201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24202   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24204   (eval $ac_try) 2>&5
24205   ac_status=$?
24206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24207   (exit $ac_status); }; }; then
24208   ol_cv_pthread_lib_lpthreads=yes
24209 else
24210   echo "$as_me: program exited with status $ac_status" >&5
24211 echo "$as_me: failed program was:" >&5
24212 sed 's/^/| /' conftest.$ac_ext >&5
24213
24214 ( exit $ac_status )
24215 ol_cv_pthread_lib_lpthreads=no
24216 fi
24217 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24218 fi
24219
24220                 # restore the LIBS
24221                 LIBS="$ol_LIBS"
24222
24223 fi
24224 echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthreads" >&5
24225 echo "${ECHO_T}$ol_cv_pthread_lib_lpthreads" >&6
24226
24227         if test $ol_cv_pthread_lib_lpthreads = yes ; then
24228                 ol_link_pthreads="-lpthreads"
24229                 ol_link_threads=posix
24230         fi
24231 fi
24232
24233
24234                 if test $ol_link_threads != no ; then
24235                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
24236
24237                                                 save_CPPFLAGS="$CPPFLAGS"
24238                         save_LIBS="$LIBS"
24239                         LIBS="$LTHREAD_LIBS $LIBS"
24240
24241
24242
24243
24244 for ac_func in sched_yield pthread_yield thr_yield
24245 do
24246 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24247 echo "$as_me:$LINENO: checking for $ac_func" >&5
24248 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24249 if eval "test \"\${$as_ac_var+set}\" = set"; then
24250   echo $ECHO_N "(cached) $ECHO_C" >&6
24251 else
24252   cat >conftest.$ac_ext <<_ACEOF
24253 /* confdefs.h.  */
24254 _ACEOF
24255 cat confdefs.h >>conftest.$ac_ext
24256 cat >>conftest.$ac_ext <<_ACEOF
24257 /* end confdefs.h.  */
24258 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24259    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24260 #define $ac_func innocuous_$ac_func
24261
24262 /* System header to define __stub macros and hopefully few prototypes,
24263     which can conflict with char $ac_func (); below.
24264     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24265     <limits.h> exists even on freestanding compilers.  */
24266
24267 #ifdef __STDC__
24268 # include <limits.h>
24269 #else
24270 # include <assert.h>
24271 #endif
24272
24273 #undef $ac_func
24274
24275 /* Override any gcc2 internal prototype to avoid an error.  */
24276 #ifdef __cplusplus
24277 extern "C"
24278 {
24279 #endif
24280 /* We use char because int might match the return type of a gcc2
24281    builtin and then its argument prototype would still apply.  */
24282 char $ac_func ();
24283 /* The GNU C library defines this for functions which it implements
24284     to always fail with ENOSYS.  Some functions are actually named
24285     something starting with __ and the normal name is an alias.  */
24286 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24287 choke me
24288 #else
24289 char (*f) () = $ac_func;
24290 #endif
24291 #ifdef __cplusplus
24292 }
24293 #endif
24294
24295 int
24296 main ()
24297 {
24298 return f != $ac_func;
24299   ;
24300   return 0;
24301 }
24302 _ACEOF
24303 rm -f conftest.$ac_objext conftest$ac_exeext
24304 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24305   (eval $ac_link) 2>conftest.er1
24306   ac_status=$?
24307   grep -v '^ *+' conftest.er1 >conftest.err
24308   rm -f conftest.er1
24309   cat conftest.err >&5
24310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24311   (exit $ac_status); } &&
24312          { ac_try='test -z "$ac_c_werror_flag"
24313                          || test ! -s conftest.err'
24314   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24315   (eval $ac_try) 2>&5
24316   ac_status=$?
24317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24318   (exit $ac_status); }; } &&
24319          { ac_try='test -s conftest$ac_exeext'
24320   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24321   (eval $ac_try) 2>&5
24322   ac_status=$?
24323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24324   (exit $ac_status); }; }; then
24325   eval "$as_ac_var=yes"
24326 else
24327   echo "$as_me: failed program was:" >&5
24328 sed 's/^/| /' conftest.$ac_ext >&5
24329
24330 eval "$as_ac_var=no"
24331 fi
24332 rm -f conftest.err conftest.$ac_objext \
24333       conftest$ac_exeext conftest.$ac_ext
24334 fi
24335 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24336 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24337 if test `eval echo '${'$as_ac_var'}'` = yes; then
24338   cat >>confdefs.h <<_ACEOF
24339 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24340 _ACEOF
24341
24342 fi
24343 done
24344
24345
24346                         if test $ac_cv_func_sched_yield = no &&
24347                            test $ac_cv_func_pthread_yield = no &&
24348                            test $ac_cv_func_thr_yield = no ; then
24349                                                                 echo "$as_me:$LINENO: checking for sched_yield in -lrt" >&5
24350 echo $ECHO_N "checking for sched_yield in -lrt... $ECHO_C" >&6
24351 if test "${ac_cv_lib_rt_sched_yield+set}" = set; then
24352   echo $ECHO_N "(cached) $ECHO_C" >&6
24353 else
24354   ac_check_lib_save_LIBS=$LIBS
24355 LIBS="-lrt  $LIBS"
24356 cat >conftest.$ac_ext <<_ACEOF
24357 /* confdefs.h.  */
24358 _ACEOF
24359 cat confdefs.h >>conftest.$ac_ext
24360 cat >>conftest.$ac_ext <<_ACEOF
24361 /* end confdefs.h.  */
24362
24363 /* Override any gcc2 internal prototype to avoid an error.  */
24364 #ifdef __cplusplus
24365 extern "C"
24366 #endif
24367 /* We use char because int might match the return type of a gcc2
24368    builtin and then its argument prototype would still apply.  */
24369 char sched_yield ();
24370 int
24371 main ()
24372 {
24373 sched_yield ();
24374   ;
24375   return 0;
24376 }
24377 _ACEOF
24378 rm -f conftest.$ac_objext conftest$ac_exeext
24379 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24380   (eval $ac_link) 2>conftest.er1
24381   ac_status=$?
24382   grep -v '^ *+' conftest.er1 >conftest.err
24383   rm -f conftest.er1
24384   cat conftest.err >&5
24385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24386   (exit $ac_status); } &&
24387          { ac_try='test -z "$ac_c_werror_flag"
24388                          || test ! -s conftest.err'
24389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24390   (eval $ac_try) 2>&5
24391   ac_status=$?
24392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24393   (exit $ac_status); }; } &&
24394          { ac_try='test -s conftest$ac_exeext'
24395   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24396   (eval $ac_try) 2>&5
24397   ac_status=$?
24398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24399   (exit $ac_status); }; }; then
24400   ac_cv_lib_rt_sched_yield=yes
24401 else
24402   echo "$as_me: failed program was:" >&5
24403 sed 's/^/| /' conftest.$ac_ext >&5
24404
24405 ac_cv_lib_rt_sched_yield=no
24406 fi
24407 rm -f conftest.err conftest.$ac_objext \
24408       conftest$ac_exeext conftest.$ac_ext
24409 LIBS=$ac_check_lib_save_LIBS
24410 fi
24411 echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_yield" >&5
24412 echo "${ECHO_T}$ac_cv_lib_rt_sched_yield" >&6
24413 if test $ac_cv_lib_rt_sched_yield = yes; then
24414   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
24415
24416 cat >>confdefs.h <<\_ACEOF
24417 #define HAVE_SCHED_YIELD 1
24418 _ACEOF
24419
24420                                         ac_cv_func_sched_yield=yes
24421 else
24422   ac_cv_func_sched_yield=no
24423 fi
24424
24425                         fi
24426                         if test $ac_cv_func_sched_yield = no &&
24427                            test $ac_cv_func_pthread_yield = no &&
24428                            test "$ac_cv_func_thr_yield" = no ; then
24429                                 { echo "$as_me:$LINENO: WARNING: could not locate sched_yield() or pthread_yield()" >&5
24430 echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
24431                         fi
24432
24433
24434
24435 for ac_func in pthread_kill pthread_rwlock_destroy
24436 do
24437 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24438 echo "$as_me:$LINENO: checking for $ac_func" >&5
24439 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24440 if eval "test \"\${$as_ac_var+set}\" = set"; then
24441   echo $ECHO_N "(cached) $ECHO_C" >&6
24442 else
24443   cat >conftest.$ac_ext <<_ACEOF
24444 /* confdefs.h.  */
24445 _ACEOF
24446 cat confdefs.h >>conftest.$ac_ext
24447 cat >>conftest.$ac_ext <<_ACEOF
24448 /* end confdefs.h.  */
24449 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24450    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24451 #define $ac_func innocuous_$ac_func
24452
24453 /* System header to define __stub macros and hopefully few prototypes,
24454     which can conflict with char $ac_func (); below.
24455     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24456     <limits.h> exists even on freestanding compilers.  */
24457
24458 #ifdef __STDC__
24459 # include <limits.h>
24460 #else
24461 # include <assert.h>
24462 #endif
24463
24464 #undef $ac_func
24465
24466 /* Override any gcc2 internal prototype to avoid an error.  */
24467 #ifdef __cplusplus
24468 extern "C"
24469 {
24470 #endif
24471 /* We use char because int might match the return type of a gcc2
24472    builtin and then its argument prototype would still apply.  */
24473 char $ac_func ();
24474 /* The GNU C library defines this for functions which it implements
24475     to always fail with ENOSYS.  Some functions are actually named
24476     something starting with __ and the normal name is an alias.  */
24477 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24478 choke me
24479 #else
24480 char (*f) () = $ac_func;
24481 #endif
24482 #ifdef __cplusplus
24483 }
24484 #endif
24485
24486 int
24487 main ()
24488 {
24489 return f != $ac_func;
24490   ;
24491   return 0;
24492 }
24493 _ACEOF
24494 rm -f conftest.$ac_objext conftest$ac_exeext
24495 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24496   (eval $ac_link) 2>conftest.er1
24497   ac_status=$?
24498   grep -v '^ *+' conftest.er1 >conftest.err
24499   rm -f conftest.er1
24500   cat conftest.err >&5
24501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24502   (exit $ac_status); } &&
24503          { ac_try='test -z "$ac_c_werror_flag"
24504                          || test ! -s conftest.err'
24505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24506   (eval $ac_try) 2>&5
24507   ac_status=$?
24508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24509   (exit $ac_status); }; } &&
24510          { ac_try='test -s conftest$ac_exeext'
24511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24512   (eval $ac_try) 2>&5
24513   ac_status=$?
24514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24515   (exit $ac_status); }; }; then
24516   eval "$as_ac_var=yes"
24517 else
24518   echo "$as_me: failed program was:" >&5
24519 sed 's/^/| /' conftest.$ac_ext >&5
24520
24521 eval "$as_ac_var=no"
24522 fi
24523 rm -f conftest.err conftest.$ac_objext \
24524       conftest$ac_exeext conftest.$ac_ext
24525 fi
24526 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24527 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24528 if test `eval echo '${'$as_ac_var'}'` = yes; then
24529   cat >>confdefs.h <<_ACEOF
24530 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24531 _ACEOF
24532
24533 fi
24534 done
24535
24536
24537                                                                         echo "$as_me:$LINENO: checking for pthread_detach with <pthread.h>" >&5
24538 echo $ECHO_N "checking for pthread_detach with <pthread.h>... $ECHO_C" >&6
24539 if test "${ol_cv_func_pthread_detach+set}" = set; then
24540   echo $ECHO_N "(cached) $ECHO_C" >&6
24541 else
24542
24543                                                                 cat >conftest.$ac_ext <<_ACEOF
24544 /* confdefs.h.  */
24545 _ACEOF
24546 cat confdefs.h >>conftest.$ac_ext
24547 cat >>conftest.$ac_ext <<_ACEOF
24548 /* end confdefs.h.  */
24549
24550 #include <pthread.h>
24551 #ifndef NULL
24552 #define NULL (void*)0
24553 #endif
24554
24555 int
24556 main ()
24557 {
24558 pthread_detach(NULL);
24559   ;
24560   return 0;
24561 }
24562 _ACEOF
24563 rm -f conftest.$ac_objext conftest$ac_exeext
24564 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24565   (eval $ac_link) 2>conftest.er1
24566   ac_status=$?
24567   grep -v '^ *+' conftest.er1 >conftest.err
24568   rm -f conftest.er1
24569   cat conftest.err >&5
24570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24571   (exit $ac_status); } &&
24572          { ac_try='test -z "$ac_c_werror_flag"
24573                          || test ! -s conftest.err'
24574   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24575   (eval $ac_try) 2>&5
24576   ac_status=$?
24577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24578   (exit $ac_status); }; } &&
24579          { ac_try='test -s conftest$ac_exeext'
24580   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24581   (eval $ac_try) 2>&5
24582   ac_status=$?
24583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24584   (exit $ac_status); }; }; then
24585   ol_cv_func_pthread_detach=yes
24586 else
24587   echo "$as_me: failed program was:" >&5
24588 sed 's/^/| /' conftest.$ac_ext >&5
24589
24590 ol_cv_func_pthread_detach=no
24591 fi
24592 rm -f conftest.err conftest.$ac_objext \
24593       conftest$ac_exeext conftest.$ac_ext
24594
24595 fi
24596 echo "$as_me:$LINENO: result: $ol_cv_func_pthread_detach" >&5
24597 echo "${ECHO_T}$ol_cv_func_pthread_detach" >&6
24598
24599                         if test $ol_cv_func_pthread_detach = no ; then
24600                                 { { echo "$as_me:$LINENO: error: could not locate pthread_detach()" >&5
24601 echo "$as_me: error: could not locate pthread_detach()" >&2;}
24602    { (exit 1); exit 1; }; }
24603                         fi
24604
24605
24606 cat >>confdefs.h <<\_ACEOF
24607 #define HAVE_PTHREAD_DETACH 1
24608 _ACEOF
24609
24610
24611
24612
24613
24614
24615 for ac_func in \
24616                                 pthread_setconcurrency \
24617                                 pthread_getconcurrency \
24618                                 thr_setconcurrency \
24619                                 thr_getconcurrency \
24620
24621 do
24622 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24623 echo "$as_me:$LINENO: checking for $ac_func" >&5
24624 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24625 if eval "test \"\${$as_ac_var+set}\" = set"; then
24626   echo $ECHO_N "(cached) $ECHO_C" >&6
24627 else
24628   cat >conftest.$ac_ext <<_ACEOF
24629 /* confdefs.h.  */
24630 _ACEOF
24631 cat confdefs.h >>conftest.$ac_ext
24632 cat >>conftest.$ac_ext <<_ACEOF
24633 /* end confdefs.h.  */
24634 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24635    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24636 #define $ac_func innocuous_$ac_func
24637
24638 /* System header to define __stub macros and hopefully few prototypes,
24639     which can conflict with char $ac_func (); below.
24640     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24641     <limits.h> exists even on freestanding compilers.  */
24642
24643 #ifdef __STDC__
24644 # include <limits.h>
24645 #else
24646 # include <assert.h>
24647 #endif
24648
24649 #undef $ac_func
24650
24651 /* Override any gcc2 internal prototype to avoid an error.  */
24652 #ifdef __cplusplus
24653 extern "C"
24654 {
24655 #endif
24656 /* We use char because int might match the return type of a gcc2
24657    builtin and then its argument prototype would still apply.  */
24658 char $ac_func ();
24659 /* The GNU C library defines this for functions which it implements
24660     to always fail with ENOSYS.  Some functions are actually named
24661     something starting with __ and the normal name is an alias.  */
24662 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24663 choke me
24664 #else
24665 char (*f) () = $ac_func;
24666 #endif
24667 #ifdef __cplusplus
24668 }
24669 #endif
24670
24671 int
24672 main ()
24673 {
24674 return f != $ac_func;
24675   ;
24676   return 0;
24677 }
24678 _ACEOF
24679 rm -f conftest.$ac_objext conftest$ac_exeext
24680 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24681   (eval $ac_link) 2>conftest.er1
24682   ac_status=$?
24683   grep -v '^ *+' conftest.er1 >conftest.err
24684   rm -f conftest.er1
24685   cat conftest.err >&5
24686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24687   (exit $ac_status); } &&
24688          { ac_try='test -z "$ac_c_werror_flag"
24689                          || test ! -s conftest.err'
24690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24691   (eval $ac_try) 2>&5
24692   ac_status=$?
24693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24694   (exit $ac_status); }; } &&
24695          { ac_try='test -s conftest$ac_exeext'
24696   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24697   (eval $ac_try) 2>&5
24698   ac_status=$?
24699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24700   (exit $ac_status); }; }; then
24701   eval "$as_ac_var=yes"
24702 else
24703   echo "$as_me: failed program was:" >&5
24704 sed 's/^/| /' conftest.$ac_ext >&5
24705
24706 eval "$as_ac_var=no"
24707 fi
24708 rm -f conftest.err conftest.$ac_objext \
24709       conftest$ac_exeext conftest.$ac_ext
24710 fi
24711 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24712 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24713 if test `eval echo '${'$as_ac_var'}'` = yes; then
24714   cat >>confdefs.h <<_ACEOF
24715 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24716 _ACEOF
24717
24718 fi
24719 done
24720
24721
24722
24723
24724 for ac_func in pthread_kill_other_threads_np
24725 do
24726 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24727 echo "$as_me:$LINENO: checking for $ac_func" >&5
24728 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24729 if eval "test \"\${$as_ac_var+set}\" = set"; then
24730   echo $ECHO_N "(cached) $ECHO_C" >&6
24731 else
24732   cat >conftest.$ac_ext <<_ACEOF
24733 /* confdefs.h.  */
24734 _ACEOF
24735 cat confdefs.h >>conftest.$ac_ext
24736 cat >>conftest.$ac_ext <<_ACEOF
24737 /* end confdefs.h.  */
24738 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24739    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24740 #define $ac_func innocuous_$ac_func
24741
24742 /* System header to define __stub macros and hopefully few prototypes,
24743     which can conflict with char $ac_func (); below.
24744     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24745     <limits.h> exists even on freestanding compilers.  */
24746
24747 #ifdef __STDC__
24748 # include <limits.h>
24749 #else
24750 # include <assert.h>
24751 #endif
24752
24753 #undef $ac_func
24754
24755 /* Override any gcc2 internal prototype to avoid an error.  */
24756 #ifdef __cplusplus
24757 extern "C"
24758 {
24759 #endif
24760 /* We use char because int might match the return type of a gcc2
24761    builtin and then its argument prototype would still apply.  */
24762 char $ac_func ();
24763 /* The GNU C library defines this for functions which it implements
24764     to always fail with ENOSYS.  Some functions are actually named
24765     something starting with __ and the normal name is an alias.  */
24766 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24767 choke me
24768 #else
24769 char (*f) () = $ac_func;
24770 #endif
24771 #ifdef __cplusplus
24772 }
24773 #endif
24774
24775 int
24776 main ()
24777 {
24778 return f != $ac_func;
24779   ;
24780   return 0;
24781 }
24782 _ACEOF
24783 rm -f conftest.$ac_objext conftest$ac_exeext
24784 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24785   (eval $ac_link) 2>conftest.er1
24786   ac_status=$?
24787   grep -v '^ *+' conftest.er1 >conftest.err
24788   rm -f conftest.er1
24789   cat conftest.err >&5
24790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24791   (exit $ac_status); } &&
24792          { ac_try='test -z "$ac_c_werror_flag"
24793                          || test ! -s conftest.err'
24794   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24795   (eval $ac_try) 2>&5
24796   ac_status=$?
24797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24798   (exit $ac_status); }; } &&
24799          { ac_try='test -s conftest$ac_exeext'
24800   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24801   (eval $ac_try) 2>&5
24802   ac_status=$?
24803   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24804   (exit $ac_status); }; }; then
24805   eval "$as_ac_var=yes"
24806 else
24807   echo "$as_me: failed program was:" >&5
24808 sed 's/^/| /' conftest.$ac_ext >&5
24809
24810 eval "$as_ac_var=no"
24811 fi
24812 rm -f conftest.err conftest.$ac_objext \
24813       conftest$ac_exeext conftest.$ac_ext
24814 fi
24815 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24816 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24817 if test `eval echo '${'$as_ac_var'}'` = yes; then
24818   cat >>confdefs.h <<_ACEOF
24819 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24820 _ACEOF
24821
24822 fi
24823 done
24824
24825         echo "$as_me:$LINENO: checking for LinuxThreads implementation" >&5
24826 echo $ECHO_N "checking for LinuxThreads implementation... $ECHO_C" >&6
24827 if test "${ol_cv_sys_linux_threads+set}" = set; then
24828   echo $ECHO_N "(cached) $ECHO_C" >&6
24829 else
24830   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
24831 fi
24832 echo "$as_me:$LINENO: result: $ol_cv_sys_linux_threads" >&5
24833 echo "${ECHO_T}$ol_cv_sys_linux_threads" >&6
24834
24835
24836
24837
24838         echo "$as_me:$LINENO: checking for LinuxThreads consistency" >&5
24839 echo $ECHO_N "checking for LinuxThreads consistency... $ECHO_C" >&6
24840 if test "${ol_cv_linux_threads+set}" = set; then
24841   echo $ECHO_N "(cached) $ECHO_C" >&6
24842 else
24843
24844                 if test $ol_cv_header_linux_threads = yes &&
24845                    test $ol_cv_sys_linux_threads = yes; then
24846                         ol_cv_linux_threads=yes
24847                 elif test $ol_cv_header_linux_threads = no &&
24848                      test $ol_cv_sys_linux_threads = no; then
24849                         ol_cv_linux_threads=no
24850                 else
24851                         ol_cv_linux_threads=error
24852                 fi
24853
24854 fi
24855 echo "$as_me:$LINENO: result: $ol_cv_linux_threads" >&5
24856 echo "${ECHO_T}$ol_cv_linux_threads" >&6
24857
24858
24859                         if test $ol_cv_linux_threads = error; then
24860                                 { { echo "$as_me:$LINENO: error: LinuxThreads header/library mismatch" >&5
24861 echo "$as_me: error: LinuxThreads header/library mismatch" >&2;}
24862    { (exit 1); exit 1; }; };
24863                         fi
24864
24865                         echo "$as_me:$LINENO: checking if pthread_create() works" >&5
24866 echo $ECHO_N "checking if pthread_create() works... $ECHO_C" >&6
24867 if test "${ol_cv_pthread_create_works+set}" = set; then
24868   echo $ECHO_N "(cached) $ECHO_C" >&6
24869 else
24870
24871                         if test "$cross_compiling" = yes; then
24872                                 ol_cv_pthread_create_works=yes
24873 else
24874   cat >conftest.$ac_ext <<_ACEOF
24875 /* confdefs.h.  */
24876 _ACEOF
24877 cat confdefs.h >>conftest.$ac_ext
24878 cat >>conftest.$ac_ext <<_ACEOF
24879 /* end confdefs.h.  */
24880
24881 /* pthread test headers */
24882 #include <pthread.h>
24883 #if HAVE_PTHREADS < 7
24884 #include <errno.h>
24885 #endif
24886 #ifndef NULL
24887 #define NULL (void*)0
24888 #endif
24889
24890 static void *task(p)
24891         void *p;
24892 {
24893         return (void *) (p == NULL);
24894 }
24895
24896
24897 int main(argc, argv)
24898         int argc;
24899         char **argv;
24900 {
24901
24902         /* pthread test function */
24903 #ifndef PTHREAD_CREATE_DETACHED
24904 #define PTHREAD_CREATE_DETACHED 1
24905 #endif
24906         pthread_t t;
24907         int status;
24908         int detach = PTHREAD_CREATE_DETACHED;
24909
24910 #if HAVE_PTHREADS > 4
24911         /* Final pthreads */
24912         pthread_attr_t attr;
24913
24914         status = pthread_attr_init(&attr);
24915         if( status ) return status;
24916
24917 #if HAVE_PTHREADS < 7
24918         status = pthread_attr_setdetachstate(&attr, &detach);
24919         if( status < 0 ) status = errno;
24920 #else
24921         status = pthread_attr_setdetachstate(&attr, detach);
24922 #endif
24923         if( status ) return status;
24924         status = pthread_create( &t, &attr, task, NULL );
24925 #if HAVE_PTHREADS < 7
24926         if( status < 0 ) status = errno;
24927 #endif
24928         if( status ) return status;
24929 #else
24930         /* Draft 4 pthreads */
24931         status = pthread_create( &t, pthread_attr_default, task, NULL );
24932         if( status ) return errno;
24933
24934         /* give thread a chance to complete */
24935         /* it should remain joinable and hence detachable */
24936         sleep( 1 );
24937
24938         status = pthread_detach( &t );
24939         if( status ) return errno;
24940 #endif
24941
24942 #ifdef HAVE_LINUX_THREADS
24943         pthread_kill_other_threads_np();
24944 #endif
24945
24946         return 0;
24947
24948 }
24949
24950 _ACEOF
24951 rm -f conftest$ac_exeext
24952 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24953   (eval $ac_link) 2>&5
24954   ac_status=$?
24955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24956   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24957   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24958   (eval $ac_try) 2>&5
24959   ac_status=$?
24960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24961   (exit $ac_status); }; }; then
24962   ol_cv_pthread_create_works=yes
24963 else
24964   echo "$as_me: program exited with status $ac_status" >&5
24965 echo "$as_me: failed program was:" >&5
24966 sed 's/^/| /' conftest.$ac_ext >&5
24967
24968 ( exit $ac_status )
24969 ol_cv_pthread_create_works=no
24970 fi
24971 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24972 fi
24973 fi
24974 echo "$as_me:$LINENO: result: $ol_cv_pthread_create_works" >&5
24975 echo "${ECHO_T}$ol_cv_pthread_create_works" >&6
24976
24977                         if test $ol_cv_pthread_create_works = no ; then
24978                                 { { echo "$as_me:$LINENO: error: pthread_create is not usable, check environment settings" >&5
24979 echo "$as_me: error: pthread_create is not usable, check environment settings" >&2;}
24980    { (exit 1); exit 1; }; }
24981                         fi
24982
24983                         ol_replace_broken_yield=no
24984
24985                         if test $ol_replace_broken_yield = yes ; then
24986
24987 cat >>confdefs.h <<\_ACEOF
24988 #define REPLACE_BROKEN_YIELD 1
24989 _ACEOF
24990
24991                         fi
24992
24993                                                 if test $ol_with_yielding_select = auto ; then
24994                                 echo "$as_me:$LINENO: checking if select yields when using pthreads" >&5
24995 echo $ECHO_N "checking if select yields when using pthreads... $ECHO_C" >&6
24996 if test "${ol_cv_pthread_select_yields+set}" = set; then
24997   echo $ECHO_N "(cached) $ECHO_C" >&6
24998 else
24999
25000                                 if test "$cross_compiling" = yes; then
25001   ol_cv_pthread_select_yields=cross
25002 else
25003   cat >conftest.$ac_ext <<_ACEOF
25004 /* confdefs.h.  */
25005 _ACEOF
25006 cat confdefs.h >>conftest.$ac_ext
25007 cat >>conftest.$ac_ext <<_ACEOF
25008 /* end confdefs.h.  */
25009
25010 #include <sys/types.h>
25011 #include <sys/time.h>
25012 #include <unistd.h>
25013 #include <pthread.h>
25014 #ifndef NULL
25015 #define NULL (void*) 0
25016 #endif
25017
25018 static int fildes[2];
25019
25020 static void *task(p)
25021         void *p;
25022 {
25023         int i;
25024         struct timeval tv;
25025
25026         fd_set rfds;
25027
25028         tv.tv_sec=10;
25029         tv.tv_usec=0;
25030
25031         FD_ZERO(&rfds);
25032         FD_SET(fildes[0], &rfds);
25033
25034         /* we're not interested in any fds */
25035         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
25036
25037         if(i < 0) {
25038                 perror("select");
25039                 exit(10);
25040         }
25041
25042         exit(0); /* if we exit here, the select blocked the whole process */
25043 }
25044
25045 int main(argc, argv)
25046         int argc;
25047         char **argv;
25048 {
25049         pthread_t t;
25050
25051         /* create a pipe to select */
25052         if(pipe(&fildes[0])) {
25053                 perror("select");
25054                 exit(1);
25055         }
25056
25057 #ifdef HAVE_PTHREAD_SETCONCURRENCY
25058         (void) pthread_setconcurrency(2);
25059 #else
25060 #ifdef HAVE_THR_SETCONCURRENCY
25061         /* Set Solaris LWP concurrency to 2 */
25062         thr_setconcurrency(2);
25063 #endif
25064 #endif
25065
25066 #if HAVE_PTHREADS < 6
25067         pthread_create(&t, pthread_attr_default, task, NULL);
25068 #else
25069         pthread_create(&t, NULL, task, NULL);
25070 #endif
25071
25072         /* make sure task runs first */
25073 #if HAVE_THR_YIELD
25074         thr_yield();
25075 #elif defined( HAVE_SCHED_YIELD )
25076         sched_yield();
25077 #elif defined( HAVE_PTHREAD_YIELD )
25078         pthread_yield();
25079 #endif
25080
25081         exit(2);
25082 }
25083 _ACEOF
25084 rm -f conftest$ac_exeext
25085 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25086   (eval $ac_link) 2>&5
25087   ac_status=$?
25088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25089   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25090   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25091   (eval $ac_try) 2>&5
25092   ac_status=$?
25093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25094   (exit $ac_status); }; }; then
25095   ol_cv_pthread_select_yields=no
25096 else
25097   echo "$as_me: program exited with status $ac_status" >&5
25098 echo "$as_me: failed program was:" >&5
25099 sed 's/^/| /' conftest.$ac_ext >&5
25100
25101 ( exit $ac_status )
25102 ol_cv_pthread_select_yields=yes
25103 fi
25104 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25105 fi
25106 fi
25107 echo "$as_me:$LINENO: result: $ol_cv_pthread_select_yields" >&5
25108 echo "${ECHO_T}$ol_cv_pthread_select_yields" >&6
25109
25110                                 if test $ol_cv_pthread_select_yields = cross ; then
25111                                         { { echo "$as_me:$LINENO: error: crossing compiling: use --with-yielding_select=yes|no|manual" >&5
25112 echo "$as_me: error: crossing compiling: use --with-yielding_select=yes|no|manual" >&2;}
25113    { (exit 1); exit 1; }; }
25114                                 fi
25115
25116                                 if test $ol_cv_pthread_select_yields = yes ; then
25117                                         ol_with_yielding_select=yes
25118                                 fi
25119                         fi
25120
25121                                                 CPPFLAGS="$save_CPPFLAGS"
25122                         LIBS="$save_LIBS"
25123                 else
25124                         { { echo "$as_me:$LINENO: error: could not locate usable POSIX Threads" >&5
25125 echo "$as_me: error: could not locate usable POSIX Threads" >&2;}
25126    { (exit 1); exit 1; }; }
25127                 fi
25128         fi
25129
25130         if test $ol_with_threads = posix ; then
25131                 { { echo "$as_me:$LINENO: error: could not locate POSIX Threads" >&5
25132 echo "$as_me: error: could not locate POSIX Threads" >&2;}
25133    { (exit 1); exit 1; }; }
25134         fi
25135         ;;
25136 esac
25137
25138 case $ol_with_threads in auto | yes | mach)
25139
25140
25141
25142 for ac_header in mach/cthreads.h cthreads.h
25143 do
25144 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25145 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25146   echo "$as_me:$LINENO: checking for $ac_header" >&5
25147 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25148 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25149   echo $ECHO_N "(cached) $ECHO_C" >&6
25150 fi
25151 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25152 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25153 else
25154   # Is the header compilable?
25155 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25156 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25157 cat >conftest.$ac_ext <<_ACEOF
25158 /* confdefs.h.  */
25159 _ACEOF
25160 cat confdefs.h >>conftest.$ac_ext
25161 cat >>conftest.$ac_ext <<_ACEOF
25162 /* end confdefs.h.  */
25163 $ac_includes_default
25164 #include <$ac_header>
25165 _ACEOF
25166 rm -f conftest.$ac_objext
25167 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25168   (eval $ac_compile) 2>conftest.er1
25169   ac_status=$?
25170   grep -v '^ *+' conftest.er1 >conftest.err
25171   rm -f conftest.er1
25172   cat conftest.err >&5
25173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25174   (exit $ac_status); } &&
25175          { ac_try='test -z "$ac_c_werror_flag"
25176                          || test ! -s conftest.err'
25177   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25178   (eval $ac_try) 2>&5
25179   ac_status=$?
25180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25181   (exit $ac_status); }; } &&
25182          { ac_try='test -s conftest.$ac_objext'
25183   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25184   (eval $ac_try) 2>&5
25185   ac_status=$?
25186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25187   (exit $ac_status); }; }; then
25188   ac_header_compiler=yes
25189 else
25190   echo "$as_me: failed program was:" >&5
25191 sed 's/^/| /' conftest.$ac_ext >&5
25192
25193 ac_header_compiler=no
25194 fi
25195 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25196 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25197 echo "${ECHO_T}$ac_header_compiler" >&6
25198
25199 # Is the header present?
25200 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25201 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
25202 cat >conftest.$ac_ext <<_ACEOF
25203 /* confdefs.h.  */
25204 _ACEOF
25205 cat confdefs.h >>conftest.$ac_ext
25206 cat >>conftest.$ac_ext <<_ACEOF
25207 /* end confdefs.h.  */
25208 #include <$ac_header>
25209 _ACEOF
25210 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25211   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25212   ac_status=$?
25213   grep -v '^ *+' conftest.er1 >conftest.err
25214   rm -f conftest.er1
25215   cat conftest.err >&5
25216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25217   (exit $ac_status); } >/dev/null; then
25218   if test -s conftest.err; then
25219     ac_cpp_err=$ac_c_preproc_warn_flag
25220     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25221   else
25222     ac_cpp_err=
25223   fi
25224 else
25225   ac_cpp_err=yes
25226 fi
25227 if test -z "$ac_cpp_err"; then
25228   ac_header_preproc=yes
25229 else
25230   echo "$as_me: failed program was:" >&5
25231 sed 's/^/| /' conftest.$ac_ext >&5
25232
25233   ac_header_preproc=no
25234 fi
25235 rm -f conftest.err conftest.$ac_ext
25236 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25237 echo "${ECHO_T}$ac_header_preproc" >&6
25238
25239 # So?  What about this header?
25240 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25241   yes:no: )
25242     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25243 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25244     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25245 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25246     ac_header_preproc=yes
25247     ;;
25248   no:yes:* )
25249     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25250 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25251     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25252 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25253     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25254 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25255     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25256 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25257     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25258 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25259     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25260 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25261     (
25262       cat <<\_ASBOX
25263 ## --------------------------------------------- ##
25264 ## Report this to <http://www.openldap.org/its/> ##
25265 ## --------------------------------------------- ##
25266 _ASBOX
25267     ) |
25268       sed "s/^/$as_me: WARNING:     /" >&2
25269     ;;
25270 esac
25271 echo "$as_me:$LINENO: checking for $ac_header" >&5
25272 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25273 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25274   echo $ECHO_N "(cached) $ECHO_C" >&6
25275 else
25276   eval "$as_ac_Header=\$ac_header_preproc"
25277 fi
25278 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25279 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25280
25281 fi
25282 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25283   cat >>confdefs.h <<_ACEOF
25284 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25285 _ACEOF
25286
25287 fi
25288
25289 done
25290
25291         if test $ac_cv_header_mach_cthreads_h = yes ; then
25292                 ol_with_threads=found
25293
25294                                 echo "$as_me:$LINENO: checking for cthread_fork" >&5
25295 echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6
25296 if test "${ac_cv_func_cthread_fork+set}" = set; then
25297   echo $ECHO_N "(cached) $ECHO_C" >&6
25298 else
25299   cat >conftest.$ac_ext <<_ACEOF
25300 /* confdefs.h.  */
25301 _ACEOF
25302 cat confdefs.h >>conftest.$ac_ext
25303 cat >>conftest.$ac_ext <<_ACEOF
25304 /* end confdefs.h.  */
25305 /* Define cthread_fork to an innocuous variant, in case <limits.h> declares cthread_fork.
25306    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
25307 #define cthread_fork innocuous_cthread_fork
25308
25309 /* System header to define __stub macros and hopefully few prototypes,
25310     which can conflict with char cthread_fork (); below.
25311     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25312     <limits.h> exists even on freestanding compilers.  */
25313
25314 #ifdef __STDC__
25315 # include <limits.h>
25316 #else
25317 # include <assert.h>
25318 #endif
25319
25320 #undef cthread_fork
25321
25322 /* Override any gcc2 internal prototype to avoid an error.  */
25323 #ifdef __cplusplus
25324 extern "C"
25325 {
25326 #endif
25327 /* We use char because int might match the return type of a gcc2
25328    builtin and then its argument prototype would still apply.  */
25329 char cthread_fork ();
25330 /* The GNU C library defines this for functions which it implements
25331     to always fail with ENOSYS.  Some functions are actually named
25332     something starting with __ and the normal name is an alias.  */
25333 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
25334 choke me
25335 #else
25336 char (*f) () = cthread_fork;
25337 #endif
25338 #ifdef __cplusplus
25339 }
25340 #endif
25341
25342 int
25343 main ()
25344 {
25345 return f != cthread_fork;
25346   ;
25347   return 0;
25348 }
25349 _ACEOF
25350 rm -f conftest.$ac_objext conftest$ac_exeext
25351 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25352   (eval $ac_link) 2>conftest.er1
25353   ac_status=$?
25354   grep -v '^ *+' conftest.er1 >conftest.err
25355   rm -f conftest.er1
25356   cat conftest.err >&5
25357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25358   (exit $ac_status); } &&
25359          { ac_try='test -z "$ac_c_werror_flag"
25360                          || test ! -s conftest.err'
25361   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25362   (eval $ac_try) 2>&5
25363   ac_status=$?
25364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25365   (exit $ac_status); }; } &&
25366          { ac_try='test -s conftest$ac_exeext'
25367   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25368   (eval $ac_try) 2>&5
25369   ac_status=$?
25370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25371   (exit $ac_status); }; }; then
25372   ac_cv_func_cthread_fork=yes
25373 else
25374   echo "$as_me: failed program was:" >&5
25375 sed 's/^/| /' conftest.$ac_ext >&5
25376
25377 ac_cv_func_cthread_fork=no
25378 fi
25379 rm -f conftest.err conftest.$ac_objext \
25380       conftest$ac_exeext conftest.$ac_ext
25381 fi
25382 echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5
25383 echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6
25384 if test $ac_cv_func_cthread_fork = yes; then
25385   ol_link_threads=yes
25386 fi
25387
25388
25389                 if test $ol_link_threads = no ; then
25390                                                                         echo "$as_me:$LINENO: checking for cthread_fork with -all_load" >&5
25391 echo $ECHO_N "checking for cthread_fork with -all_load... $ECHO_C" >&6
25392 if test "${ol_cv_cthread_all_load+set}" = set; then
25393   echo $ECHO_N "(cached) $ECHO_C" >&6
25394 else
25395
25396                                                                 save_LIBS="$LIBS"
25397                                 LIBS="-all_load $LIBS"
25398                                 cat >conftest.$ac_ext <<_ACEOF
25399 /* confdefs.h.  */
25400 _ACEOF
25401 cat confdefs.h >>conftest.$ac_ext
25402 cat >>conftest.$ac_ext <<_ACEOF
25403 /* end confdefs.h.  */
25404 #include <mach/cthreads.h>
25405 int
25406 main ()
25407 {
25408
25409                                         cthread_fork((void *)0, (void *)0);
25410
25411   ;
25412   return 0;
25413 }
25414 _ACEOF
25415 rm -f conftest.$ac_objext conftest$ac_exeext
25416 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25417   (eval $ac_link) 2>conftest.er1
25418   ac_status=$?
25419   grep -v '^ *+' conftest.er1 >conftest.err
25420   rm -f conftest.er1
25421   cat conftest.err >&5
25422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25423   (exit $ac_status); } &&
25424          { ac_try='test -z "$ac_c_werror_flag"
25425                          || test ! -s conftest.err'
25426   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25427   (eval $ac_try) 2>&5
25428   ac_status=$?
25429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25430   (exit $ac_status); }; } &&
25431          { ac_try='test -s conftest$ac_exeext'
25432   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25433   (eval $ac_try) 2>&5
25434   ac_status=$?
25435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25436   (exit $ac_status); }; }; then
25437   ol_cv_cthread_all_load=yes
25438 else
25439   echo "$as_me: failed program was:" >&5
25440 sed 's/^/| /' conftest.$ac_ext >&5
25441
25442 ol_cv_cthread_all_load=no
25443 fi
25444 rm -f conftest.err conftest.$ac_objext \
25445       conftest$ac_exeext conftest.$ac_ext
25446                                                                 LIBS="$save_LIBS"
25447
25448 fi
25449 echo "$as_me:$LINENO: result: $ol_cv_cthread_all_load" >&5
25450 echo "${ECHO_T}$ol_cv_cthread_all_load" >&6
25451
25452                         if test $ol_cv_cthread_all_load = yes ; then
25453                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
25454                                 ol_link_threads=mach
25455                                 ol_with_threads=found
25456                         fi
25457                 fi
25458
25459         elif test $ac_cv_header_cthreads_h = yes ; then
25460
25461                 ol_with_threads=found
25462
25463                                 save_LIBS="$LIBS"
25464                 LIBS="$LIBS -lthreads"
25465                 echo "$as_me:$LINENO: checking for cthread_fork" >&5
25466 echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6
25467 if test "${ac_cv_func_cthread_fork+set}" = set; then
25468   echo $ECHO_N "(cached) $ECHO_C" >&6
25469 else
25470   cat >conftest.$ac_ext <<_ACEOF
25471 /* confdefs.h.  */
25472 _ACEOF
25473 cat confdefs.h >>conftest.$ac_ext
25474 cat >>conftest.$ac_ext <<_ACEOF
25475 /* end confdefs.h.  */
25476 /* Define cthread_fork to an innocuous variant, in case <limits.h> declares cthread_fork.
25477    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
25478 #define cthread_fork innocuous_cthread_fork
25479
25480 /* System header to define __stub macros and hopefully few prototypes,
25481     which can conflict with char cthread_fork (); below.
25482     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25483     <limits.h> exists even on freestanding compilers.  */
25484
25485 #ifdef __STDC__
25486 # include <limits.h>
25487 #else
25488 # include <assert.h>
25489 #endif
25490
25491 #undef cthread_fork
25492
25493 /* Override any gcc2 internal prototype to avoid an error.  */
25494 #ifdef __cplusplus
25495 extern "C"
25496 {
25497 #endif
25498 /* We use char because int might match the return type of a gcc2
25499    builtin and then its argument prototype would still apply.  */
25500 char cthread_fork ();
25501 /* The GNU C library defines this for functions which it implements
25502     to always fail with ENOSYS.  Some functions are actually named
25503     something starting with __ and the normal name is an alias.  */
25504 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
25505 choke me
25506 #else
25507 char (*f) () = cthread_fork;
25508 #endif
25509 #ifdef __cplusplus
25510 }
25511 #endif
25512
25513 int
25514 main ()
25515 {
25516 return f != cthread_fork;
25517   ;
25518   return 0;
25519 }
25520 _ACEOF
25521 rm -f conftest.$ac_objext conftest$ac_exeext
25522 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25523   (eval $ac_link) 2>conftest.er1
25524   ac_status=$?
25525   grep -v '^ *+' conftest.er1 >conftest.err
25526   rm -f conftest.er1
25527   cat conftest.err >&5
25528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25529   (exit $ac_status); } &&
25530          { ac_try='test -z "$ac_c_werror_flag"
25531                          || test ! -s conftest.err'
25532   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25533   (eval $ac_try) 2>&5
25534   ac_status=$?
25535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25536   (exit $ac_status); }; } &&
25537          { ac_try='test -s conftest$ac_exeext'
25538   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25539   (eval $ac_try) 2>&5
25540   ac_status=$?
25541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25542   (exit $ac_status); }; }; then
25543   ac_cv_func_cthread_fork=yes
25544 else
25545   echo "$as_me: failed program was:" >&5
25546 sed 's/^/| /' conftest.$ac_ext >&5
25547
25548 ac_cv_func_cthread_fork=no
25549 fi
25550 rm -f conftest.err conftest.$ac_objext \
25551       conftest$ac_exeext conftest.$ac_ext
25552 fi
25553 echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5
25554 echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6
25555 if test $ac_cv_func_cthread_fork = yes; then
25556   ol_link_threads=yes
25557 fi
25558
25559                 LIBS="$save_LIBS"
25560
25561                 if test $ol_link_threads = yes ; then
25562                         LTHREAD_LIBS="-lthreads"
25563                         ol_link_threads=mach
25564                         ol_with_threads=found
25565                 else
25566                         { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5
25567 echo "$as_me: error: could not link with Mach CThreads" >&2;}
25568    { (exit 1); exit 1; }; }
25569                 fi
25570
25571         elif test $ol_with_threads = mach ; then
25572                 { { echo "$as_me:$LINENO: error: could not locate Mach CThreads" >&5
25573 echo "$as_me: error: could not locate Mach CThreads" >&2;}
25574    { (exit 1); exit 1; }; }
25575         fi
25576
25577         if test $ol_link_threads = mach ; then
25578
25579 cat >>confdefs.h <<\_ACEOF
25580 #define HAVE_MACH_CTHREADS 1
25581 _ACEOF
25582
25583         elif test $ol_with_threads = found ; then
25584                 { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5
25585 echo "$as_me: error: could not link with Mach CThreads" >&2;}
25586    { (exit 1); exit 1; }; }
25587         fi
25588         ;;
25589 esac
25590
25591 case $ol_with_threads in auto | yes | pth)
25592
25593
25594 for ac_header in pth.h
25595 do
25596 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25597 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25598   echo "$as_me:$LINENO: checking for $ac_header" >&5
25599 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25600 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25601   echo $ECHO_N "(cached) $ECHO_C" >&6
25602 fi
25603 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25604 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25605 else
25606   # Is the header compilable?
25607 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25608 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25609 cat >conftest.$ac_ext <<_ACEOF
25610 /* confdefs.h.  */
25611 _ACEOF
25612 cat confdefs.h >>conftest.$ac_ext
25613 cat >>conftest.$ac_ext <<_ACEOF
25614 /* end confdefs.h.  */
25615 $ac_includes_default
25616 #include <$ac_header>
25617 _ACEOF
25618 rm -f conftest.$ac_objext
25619 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25620   (eval $ac_compile) 2>conftest.er1
25621   ac_status=$?
25622   grep -v '^ *+' conftest.er1 >conftest.err
25623   rm -f conftest.er1
25624   cat conftest.err >&5
25625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25626   (exit $ac_status); } &&
25627          { ac_try='test -z "$ac_c_werror_flag"
25628                          || test ! -s conftest.err'
25629   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25630   (eval $ac_try) 2>&5
25631   ac_status=$?
25632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25633   (exit $ac_status); }; } &&
25634          { ac_try='test -s conftest.$ac_objext'
25635   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25636   (eval $ac_try) 2>&5
25637   ac_status=$?
25638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25639   (exit $ac_status); }; }; then
25640   ac_header_compiler=yes
25641 else
25642   echo "$as_me: failed program was:" >&5
25643 sed 's/^/| /' conftest.$ac_ext >&5
25644
25645 ac_header_compiler=no
25646 fi
25647 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25648 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25649 echo "${ECHO_T}$ac_header_compiler" >&6
25650
25651 # Is the header present?
25652 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25653 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
25654 cat >conftest.$ac_ext <<_ACEOF
25655 /* confdefs.h.  */
25656 _ACEOF
25657 cat confdefs.h >>conftest.$ac_ext
25658 cat >>conftest.$ac_ext <<_ACEOF
25659 /* end confdefs.h.  */
25660 #include <$ac_header>
25661 _ACEOF
25662 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25663   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25664   ac_status=$?
25665   grep -v '^ *+' conftest.er1 >conftest.err
25666   rm -f conftest.er1
25667   cat conftest.err >&5
25668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25669   (exit $ac_status); } >/dev/null; then
25670   if test -s conftest.err; then
25671     ac_cpp_err=$ac_c_preproc_warn_flag
25672     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25673   else
25674     ac_cpp_err=
25675   fi
25676 else
25677   ac_cpp_err=yes
25678 fi
25679 if test -z "$ac_cpp_err"; then
25680   ac_header_preproc=yes
25681 else
25682   echo "$as_me: failed program was:" >&5
25683 sed 's/^/| /' conftest.$ac_ext >&5
25684
25685   ac_header_preproc=no
25686 fi
25687 rm -f conftest.err conftest.$ac_ext
25688 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25689 echo "${ECHO_T}$ac_header_preproc" >&6
25690
25691 # So?  What about this header?
25692 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25693   yes:no: )
25694     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25695 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25696     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25697 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25698     ac_header_preproc=yes
25699     ;;
25700   no:yes:* )
25701     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25702 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25703     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25704 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25705     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25706 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25707     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25708 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25709     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25710 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25711     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25712 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25713     (
25714       cat <<\_ASBOX
25715 ## --------------------------------------------- ##
25716 ## Report this to <http://www.openldap.org/its/> ##
25717 ## --------------------------------------------- ##
25718 _ASBOX
25719     ) |
25720       sed "s/^/$as_me: WARNING:     /" >&2
25721     ;;
25722 esac
25723 echo "$as_me:$LINENO: checking for $ac_header" >&5
25724 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25725 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25726   echo $ECHO_N "(cached) $ECHO_C" >&6
25727 else
25728   eval "$as_ac_Header=\$ac_header_preproc"
25729 fi
25730 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25731 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25732
25733 fi
25734 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25735   cat >>confdefs.h <<_ACEOF
25736 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25737 _ACEOF
25738
25739 fi
25740
25741 done
25742
25743
25744         if test $ac_cv_header_pth_h = yes ; then
25745                 echo "$as_me:$LINENO: checking for pth_version in -lpth" >&5
25746 echo $ECHO_N "checking for pth_version in -lpth... $ECHO_C" >&6
25747 if test "${ac_cv_lib_pth_pth_version+set}" = set; then
25748   echo $ECHO_N "(cached) $ECHO_C" >&6
25749 else
25750   ac_check_lib_save_LIBS=$LIBS
25751 LIBS="-lpth  $LIBS"
25752 cat >conftest.$ac_ext <<_ACEOF
25753 /* confdefs.h.  */
25754 _ACEOF
25755 cat confdefs.h >>conftest.$ac_ext
25756 cat >>conftest.$ac_ext <<_ACEOF
25757 /* end confdefs.h.  */
25758
25759 /* Override any gcc2 internal prototype to avoid an error.  */
25760 #ifdef __cplusplus
25761 extern "C"
25762 #endif
25763 /* We use char because int might match the return type of a gcc2
25764    builtin and then its argument prototype would still apply.  */
25765 char pth_version ();
25766 int
25767 main ()
25768 {
25769 pth_version ();
25770   ;
25771   return 0;
25772 }
25773 _ACEOF
25774 rm -f conftest.$ac_objext conftest$ac_exeext
25775 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25776   (eval $ac_link) 2>conftest.er1
25777   ac_status=$?
25778   grep -v '^ *+' conftest.er1 >conftest.err
25779   rm -f conftest.er1
25780   cat conftest.err >&5
25781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25782   (exit $ac_status); } &&
25783          { ac_try='test -z "$ac_c_werror_flag"
25784                          || test ! -s conftest.err'
25785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25786   (eval $ac_try) 2>&5
25787   ac_status=$?
25788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25789   (exit $ac_status); }; } &&
25790          { ac_try='test -s conftest$ac_exeext'
25791   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25792   (eval $ac_try) 2>&5
25793   ac_status=$?
25794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25795   (exit $ac_status); }; }; then
25796   ac_cv_lib_pth_pth_version=yes
25797 else
25798   echo "$as_me: failed program was:" >&5
25799 sed 's/^/| /' conftest.$ac_ext >&5
25800
25801 ac_cv_lib_pth_pth_version=no
25802 fi
25803 rm -f conftest.err conftest.$ac_objext \
25804       conftest$ac_exeext conftest.$ac_ext
25805 LIBS=$ac_check_lib_save_LIBS
25806 fi
25807 echo "$as_me:$LINENO: result: $ac_cv_lib_pth_pth_version" >&5
25808 echo "${ECHO_T}$ac_cv_lib_pth_pth_version" >&6
25809 if test $ac_cv_lib_pth_pth_version = yes; then
25810   have_pth=yes
25811 else
25812   have_pth=no
25813 fi
25814
25815
25816                 if test $have_pth = yes ; then
25817
25818 cat >>confdefs.h <<\_ACEOF
25819 #define HAVE_GNU_PTH 1
25820 _ACEOF
25821
25822                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
25823                         ol_link_threads=pth
25824                         ol_with_threads=found
25825
25826                         if test $ol_with_yielding_select = auto ; then
25827                                 ol_with_yielding_select=yes
25828                         fi
25829                 fi
25830         fi
25831         ;;
25832 esac
25833
25834 case $ol_with_threads in auto | yes | lwp)
25835
25836
25837
25838 for ac_header in thread.h synch.h
25839 do
25840 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25841 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25842   echo "$as_me:$LINENO: checking for $ac_header" >&5
25843 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25844 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25845   echo $ECHO_N "(cached) $ECHO_C" >&6
25846 fi
25847 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25848 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25849 else
25850   # Is the header compilable?
25851 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25852 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25853 cat >conftest.$ac_ext <<_ACEOF
25854 /* confdefs.h.  */
25855 _ACEOF
25856 cat confdefs.h >>conftest.$ac_ext
25857 cat >>conftest.$ac_ext <<_ACEOF
25858 /* end confdefs.h.  */
25859 $ac_includes_default
25860 #include <$ac_header>
25861 _ACEOF
25862 rm -f conftest.$ac_objext
25863 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25864   (eval $ac_compile) 2>conftest.er1
25865   ac_status=$?
25866   grep -v '^ *+' conftest.er1 >conftest.err
25867   rm -f conftest.er1
25868   cat conftest.err >&5
25869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25870   (exit $ac_status); } &&
25871          { ac_try='test -z "$ac_c_werror_flag"
25872                          || test ! -s conftest.err'
25873   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25874   (eval $ac_try) 2>&5
25875   ac_status=$?
25876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25877   (exit $ac_status); }; } &&
25878          { ac_try='test -s conftest.$ac_objext'
25879   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25880   (eval $ac_try) 2>&5
25881   ac_status=$?
25882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25883   (exit $ac_status); }; }; then
25884   ac_header_compiler=yes
25885 else
25886   echo "$as_me: failed program was:" >&5
25887 sed 's/^/| /' conftest.$ac_ext >&5
25888
25889 ac_header_compiler=no
25890 fi
25891 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25892 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25893 echo "${ECHO_T}$ac_header_compiler" >&6
25894
25895 # Is the header present?
25896 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25897 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
25898 cat >conftest.$ac_ext <<_ACEOF
25899 /* confdefs.h.  */
25900 _ACEOF
25901 cat confdefs.h >>conftest.$ac_ext
25902 cat >>conftest.$ac_ext <<_ACEOF
25903 /* end confdefs.h.  */
25904 #include <$ac_header>
25905 _ACEOF
25906 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25907   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25908   ac_status=$?
25909   grep -v '^ *+' conftest.er1 >conftest.err
25910   rm -f conftest.er1
25911   cat conftest.err >&5
25912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25913   (exit $ac_status); } >/dev/null; then
25914   if test -s conftest.err; then
25915     ac_cpp_err=$ac_c_preproc_warn_flag
25916     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25917   else
25918     ac_cpp_err=
25919   fi
25920 else
25921   ac_cpp_err=yes
25922 fi
25923 if test -z "$ac_cpp_err"; then
25924   ac_header_preproc=yes
25925 else
25926   echo "$as_me: failed program was:" >&5
25927 sed 's/^/| /' conftest.$ac_ext >&5
25928
25929   ac_header_preproc=no
25930 fi
25931 rm -f conftest.err conftest.$ac_ext
25932 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25933 echo "${ECHO_T}$ac_header_preproc" >&6
25934
25935 # So?  What about this header?
25936 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25937   yes:no: )
25938     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25939 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25940     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25941 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25942     ac_header_preproc=yes
25943     ;;
25944   no:yes:* )
25945     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25946 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25947     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25948 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25949     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25950 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25951     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25952 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25953     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25954 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25955     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25956 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25957     (
25958       cat <<\_ASBOX
25959 ## --------------------------------------------- ##
25960 ## Report this to <http://www.openldap.org/its/> ##
25961 ## --------------------------------------------- ##
25962 _ASBOX
25963     ) |
25964       sed "s/^/$as_me: WARNING:     /" >&2
25965     ;;
25966 esac
25967 echo "$as_me:$LINENO: checking for $ac_header" >&5
25968 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25969 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25970   echo $ECHO_N "(cached) $ECHO_C" >&6
25971 else
25972   eval "$as_ac_Header=\$ac_header_preproc"
25973 fi
25974 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25975 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25976
25977 fi
25978 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25979   cat >>confdefs.h <<_ACEOF
25980 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25981 _ACEOF
25982
25983 fi
25984
25985 done
25986
25987         if test $ac_cv_header_thread_h = yes &&
25988            test $ac_cv_header_synch_h = yes ; then
25989                 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
25990 echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
25991 if test "${ac_cv_lib_thread_thr_create+set}" = set; then
25992   echo $ECHO_N "(cached) $ECHO_C" >&6
25993 else
25994   ac_check_lib_save_LIBS=$LIBS
25995 LIBS="-lthread  $LIBS"
25996 cat >conftest.$ac_ext <<_ACEOF
25997 /* confdefs.h.  */
25998 _ACEOF
25999 cat confdefs.h >>conftest.$ac_ext
26000 cat >>conftest.$ac_ext <<_ACEOF
26001 /* end confdefs.h.  */
26002
26003 /* Override any gcc2 internal prototype to avoid an error.  */
26004 #ifdef __cplusplus
26005 extern "C"
26006 #endif
26007 /* We use char because int might match the return type of a gcc2
26008    builtin and then its argument prototype would still apply.  */
26009 char thr_create ();
26010 int
26011 main ()
26012 {
26013 thr_create ();
26014   ;
26015   return 0;
26016 }
26017 _ACEOF
26018 rm -f conftest.$ac_objext conftest$ac_exeext
26019 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26020   (eval $ac_link) 2>conftest.er1
26021   ac_status=$?
26022   grep -v '^ *+' conftest.er1 >conftest.err
26023   rm -f conftest.er1
26024   cat conftest.err >&5
26025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26026   (exit $ac_status); } &&
26027          { ac_try='test -z "$ac_c_werror_flag"
26028                          || test ! -s conftest.err'
26029   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26030   (eval $ac_try) 2>&5
26031   ac_status=$?
26032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26033   (exit $ac_status); }; } &&
26034          { ac_try='test -s conftest$ac_exeext'
26035   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26036   (eval $ac_try) 2>&5
26037   ac_status=$?
26038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26039   (exit $ac_status); }; }; then
26040   ac_cv_lib_thread_thr_create=yes
26041 else
26042   echo "$as_me: failed program was:" >&5
26043 sed 's/^/| /' conftest.$ac_ext >&5
26044
26045 ac_cv_lib_thread_thr_create=no
26046 fi
26047 rm -f conftest.err conftest.$ac_objext \
26048       conftest$ac_exeext conftest.$ac_ext
26049 LIBS=$ac_check_lib_save_LIBS
26050 fi
26051 echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
26052 echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
26053 if test $ac_cv_lib_thread_thr_create = yes; then
26054   have_thr=yes
26055 else
26056   have_thr=no
26057 fi
26058
26059
26060                 if test $have_thr = yes ; then
26061
26062 cat >>confdefs.h <<\_ACEOF
26063 #define HAVE_THR 1
26064 _ACEOF
26065
26066                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
26067                         ol_link_threads=thr
26068
26069                         if test $ol_with_yielding_select = auto ; then
26070                                 ol_with_yielding_select=yes
26071                         fi
26072
26073
26074
26075 for ac_func in \
26076                                 thr_setconcurrency \
26077                                 thr_getconcurrency \
26078
26079 do
26080 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
26081 echo "$as_me:$LINENO: checking for $ac_func" >&5
26082 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
26083 if eval "test \"\${$as_ac_var+set}\" = set"; then
26084   echo $ECHO_N "(cached) $ECHO_C" >&6
26085 else
26086   cat >conftest.$ac_ext <<_ACEOF
26087 /* confdefs.h.  */
26088 _ACEOF
26089 cat confdefs.h >>conftest.$ac_ext
26090 cat >>conftest.$ac_ext <<_ACEOF
26091 /* end confdefs.h.  */
26092 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
26093    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
26094 #define $ac_func innocuous_$ac_func
26095
26096 /* System header to define __stub macros and hopefully few prototypes,
26097     which can conflict with char $ac_func (); below.
26098     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
26099     <limits.h> exists even on freestanding compilers.  */
26100
26101 #ifdef __STDC__
26102 # include <limits.h>
26103 #else
26104 # include <assert.h>
26105 #endif
26106
26107 #undef $ac_func
26108
26109 /* Override any gcc2 internal prototype to avoid an error.  */
26110 #ifdef __cplusplus
26111 extern "C"
26112 {
26113 #endif
26114 /* We use char because int might match the return type of a gcc2
26115    builtin and then its argument prototype would still apply.  */
26116 char $ac_func ();
26117 /* The GNU C library defines this for functions which it implements
26118     to always fail with ENOSYS.  Some functions are actually named
26119     something starting with __ and the normal name is an alias.  */
26120 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
26121 choke me
26122 #else
26123 char (*f) () = $ac_func;
26124 #endif
26125 #ifdef __cplusplus
26126 }
26127 #endif
26128
26129 int
26130 main ()
26131 {
26132 return f != $ac_func;
26133   ;
26134   return 0;
26135 }
26136 _ACEOF
26137 rm -f conftest.$ac_objext conftest$ac_exeext
26138 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26139   (eval $ac_link) 2>conftest.er1
26140   ac_status=$?
26141   grep -v '^ *+' conftest.er1 >conftest.err
26142   rm -f conftest.er1
26143   cat conftest.err >&5
26144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26145   (exit $ac_status); } &&
26146          { ac_try='test -z "$ac_c_werror_flag"
26147                          || test ! -s conftest.err'
26148   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26149   (eval $ac_try) 2>&5
26150   ac_status=$?
26151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26152   (exit $ac_status); }; } &&
26153          { ac_try='test -s conftest$ac_exeext'
26154   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26155   (eval $ac_try) 2>&5
26156   ac_status=$?
26157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26158   (exit $ac_status); }; }; then
26159   eval "$as_ac_var=yes"
26160 else
26161   echo "$as_me: failed program was:" >&5
26162 sed 's/^/| /' conftest.$ac_ext >&5
26163
26164 eval "$as_ac_var=no"
26165 fi
26166 rm -f conftest.err conftest.$ac_objext \
26167       conftest$ac_exeext conftest.$ac_ext
26168 fi
26169 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
26170 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
26171 if test `eval echo '${'$as_ac_var'}'` = yes; then
26172   cat >>confdefs.h <<_ACEOF
26173 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
26174 _ACEOF
26175
26176 fi
26177 done
26178
26179                 fi
26180         fi
26181
26182
26183 for ac_header in lwp/lwp.h
26184 do
26185 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26186 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26187   echo "$as_me:$LINENO: checking for $ac_header" >&5
26188 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26189 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26190   echo $ECHO_N "(cached) $ECHO_C" >&6
26191 fi
26192 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26193 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26194 else
26195   # Is the header compilable?
26196 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26197 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26198 cat >conftest.$ac_ext <<_ACEOF
26199 /* confdefs.h.  */
26200 _ACEOF
26201 cat confdefs.h >>conftest.$ac_ext
26202 cat >>conftest.$ac_ext <<_ACEOF
26203 /* end confdefs.h.  */
26204 $ac_includes_default
26205 #include <$ac_header>
26206 _ACEOF
26207 rm -f conftest.$ac_objext
26208 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26209   (eval $ac_compile) 2>conftest.er1
26210   ac_status=$?
26211   grep -v '^ *+' conftest.er1 >conftest.err
26212   rm -f conftest.er1
26213   cat conftest.err >&5
26214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26215   (exit $ac_status); } &&
26216          { ac_try='test -z "$ac_c_werror_flag"
26217                          || test ! -s conftest.err'
26218   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26219   (eval $ac_try) 2>&5
26220   ac_status=$?
26221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26222   (exit $ac_status); }; } &&
26223          { ac_try='test -s conftest.$ac_objext'
26224   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26225   (eval $ac_try) 2>&5
26226   ac_status=$?
26227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26228   (exit $ac_status); }; }; then
26229   ac_header_compiler=yes
26230 else
26231   echo "$as_me: failed program was:" >&5
26232 sed 's/^/| /' conftest.$ac_ext >&5
26233
26234 ac_header_compiler=no
26235 fi
26236 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26237 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26238 echo "${ECHO_T}$ac_header_compiler" >&6
26239
26240 # Is the header present?
26241 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26242 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26243 cat >conftest.$ac_ext <<_ACEOF
26244 /* confdefs.h.  */
26245 _ACEOF
26246 cat confdefs.h >>conftest.$ac_ext
26247 cat >>conftest.$ac_ext <<_ACEOF
26248 /* end confdefs.h.  */
26249 #include <$ac_header>
26250 _ACEOF
26251 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26252   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26253   ac_status=$?
26254   grep -v '^ *+' conftest.er1 >conftest.err
26255   rm -f conftest.er1
26256   cat conftest.err >&5
26257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26258   (exit $ac_status); } >/dev/null; then
26259   if test -s conftest.err; then
26260     ac_cpp_err=$ac_c_preproc_warn_flag
26261     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26262   else
26263     ac_cpp_err=
26264   fi
26265 else
26266   ac_cpp_err=yes
26267 fi
26268 if test -z "$ac_cpp_err"; then
26269   ac_header_preproc=yes
26270 else
26271   echo "$as_me: failed program was:" >&5
26272 sed 's/^/| /' conftest.$ac_ext >&5
26273
26274   ac_header_preproc=no
26275 fi
26276 rm -f conftest.err conftest.$ac_ext
26277 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26278 echo "${ECHO_T}$ac_header_preproc" >&6
26279
26280 # So?  What about this header?
26281 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26282   yes:no: )
26283     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26284 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26285     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26286 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26287     ac_header_preproc=yes
26288     ;;
26289   no:yes:* )
26290     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26291 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26292     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26293 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26294     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26295 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26296     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26297 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26298     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26299 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26300     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26301 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26302     (
26303       cat <<\_ASBOX
26304 ## --------------------------------------------- ##
26305 ## Report this to <http://www.openldap.org/its/> ##
26306 ## --------------------------------------------- ##
26307 _ASBOX
26308     ) |
26309       sed "s/^/$as_me: WARNING:     /" >&2
26310     ;;
26311 esac
26312 echo "$as_me:$LINENO: checking for $ac_header" >&5
26313 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26314 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26315   echo $ECHO_N "(cached) $ECHO_C" >&6
26316 else
26317   eval "$as_ac_Header=\$ac_header_preproc"
26318 fi
26319 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26320 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26321
26322 fi
26323 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26324   cat >>confdefs.h <<_ACEOF
26325 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26326 _ACEOF
26327
26328 fi
26329
26330 done
26331
26332         if test $ac_cv_header_lwp_lwp_h = yes ; then
26333                 echo "$as_me:$LINENO: checking for lwp_create in -llwp" >&5
26334 echo $ECHO_N "checking for lwp_create in -llwp... $ECHO_C" >&6
26335 if test "${ac_cv_lib_lwp_lwp_create+set}" = set; then
26336   echo $ECHO_N "(cached) $ECHO_C" >&6
26337 else
26338   ac_check_lib_save_LIBS=$LIBS
26339 LIBS="-llwp  $LIBS"
26340 cat >conftest.$ac_ext <<_ACEOF
26341 /* confdefs.h.  */
26342 _ACEOF
26343 cat confdefs.h >>conftest.$ac_ext
26344 cat >>conftest.$ac_ext <<_ACEOF
26345 /* end confdefs.h.  */
26346
26347 /* Override any gcc2 internal prototype to avoid an error.  */
26348 #ifdef __cplusplus
26349 extern "C"
26350 #endif
26351 /* We use char because int might match the return type of a gcc2
26352    builtin and then its argument prototype would still apply.  */
26353 char lwp_create ();
26354 int
26355 main ()
26356 {
26357 lwp_create ();
26358   ;
26359   return 0;
26360 }
26361 _ACEOF
26362 rm -f conftest.$ac_objext conftest$ac_exeext
26363 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26364   (eval $ac_link) 2>conftest.er1
26365   ac_status=$?
26366   grep -v '^ *+' conftest.er1 >conftest.err
26367   rm -f conftest.er1
26368   cat conftest.err >&5
26369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26370   (exit $ac_status); } &&
26371          { ac_try='test -z "$ac_c_werror_flag"
26372                          || test ! -s conftest.err'
26373   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26374   (eval $ac_try) 2>&5
26375   ac_status=$?
26376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26377   (exit $ac_status); }; } &&
26378          { ac_try='test -s conftest$ac_exeext'
26379   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26380   (eval $ac_try) 2>&5
26381   ac_status=$?
26382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26383   (exit $ac_status); }; }; then
26384   ac_cv_lib_lwp_lwp_create=yes
26385 else
26386   echo "$as_me: failed program was:" >&5
26387 sed 's/^/| /' conftest.$ac_ext >&5
26388
26389 ac_cv_lib_lwp_lwp_create=no
26390 fi
26391 rm -f conftest.err conftest.$ac_objext \
26392       conftest$ac_exeext conftest.$ac_ext
26393 LIBS=$ac_check_lib_save_LIBS
26394 fi
26395 echo "$as_me:$LINENO: result: $ac_cv_lib_lwp_lwp_create" >&5
26396 echo "${ECHO_T}$ac_cv_lib_lwp_lwp_create" >&6
26397 if test $ac_cv_lib_lwp_lwp_create = yes; then
26398   have_lwp=yes
26399 else
26400   have_lwp=no
26401 fi
26402
26403
26404                 if test $have_lwp = yes ; then
26405
26406 cat >>confdefs.h <<\_ACEOF
26407 #define HAVE_LWP 1
26408 _ACEOF
26409
26410                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
26411                         ol_link_threads=lwp
26412
26413                         if test $ol_with_yielding_select = auto ; then
26414                                 ol_with_yielding_select=no
26415                         fi
26416                 fi
26417         fi
26418         ;;
26419 esac
26420
26421 if test $ol_with_yielding_select = yes ; then
26422
26423 cat >>confdefs.h <<\_ACEOF
26424 #define HAVE_YIELDING_SELECT 1
26425 _ACEOF
26426
26427 fi
26428
26429 if test $ol_with_threads = manual ; then
26430                 ol_link_threads=yes
26431
26432         { echo "$as_me:$LINENO: WARNING: thread defines and link options must be set manually" >&5
26433 echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
26434
26435
26436
26437 for ac_header in pthread.h sched.h
26438 do
26439 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26440 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26441   echo "$as_me:$LINENO: checking for $ac_header" >&5
26442 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26443 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26444   echo $ECHO_N "(cached) $ECHO_C" >&6
26445 fi
26446 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26447 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26448 else
26449   # Is the header compilable?
26450 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26451 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26452 cat >conftest.$ac_ext <<_ACEOF
26453 /* confdefs.h.  */
26454 _ACEOF
26455 cat confdefs.h >>conftest.$ac_ext
26456 cat >>conftest.$ac_ext <<_ACEOF
26457 /* end confdefs.h.  */
26458 $ac_includes_default
26459 #include <$ac_header>
26460 _ACEOF
26461 rm -f conftest.$ac_objext
26462 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26463   (eval $ac_compile) 2>conftest.er1
26464   ac_status=$?
26465   grep -v '^ *+' conftest.er1 >conftest.err
26466   rm -f conftest.er1
26467   cat conftest.err >&5
26468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26469   (exit $ac_status); } &&
26470          { ac_try='test -z "$ac_c_werror_flag"
26471                          || test ! -s conftest.err'
26472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26473   (eval $ac_try) 2>&5
26474   ac_status=$?
26475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26476   (exit $ac_status); }; } &&
26477          { ac_try='test -s conftest.$ac_objext'
26478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26479   (eval $ac_try) 2>&5
26480   ac_status=$?
26481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26482   (exit $ac_status); }; }; then
26483   ac_header_compiler=yes
26484 else
26485   echo "$as_me: failed program was:" >&5
26486 sed 's/^/| /' conftest.$ac_ext >&5
26487
26488 ac_header_compiler=no
26489 fi
26490 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26491 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26492 echo "${ECHO_T}$ac_header_compiler" >&6
26493
26494 # Is the header present?
26495 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26496 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26497 cat >conftest.$ac_ext <<_ACEOF
26498 /* confdefs.h.  */
26499 _ACEOF
26500 cat confdefs.h >>conftest.$ac_ext
26501 cat >>conftest.$ac_ext <<_ACEOF
26502 /* end confdefs.h.  */
26503 #include <$ac_header>
26504 _ACEOF
26505 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26506   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26507   ac_status=$?
26508   grep -v '^ *+' conftest.er1 >conftest.err
26509   rm -f conftest.er1
26510   cat conftest.err >&5
26511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26512   (exit $ac_status); } >/dev/null; then
26513   if test -s conftest.err; then
26514     ac_cpp_err=$ac_c_preproc_warn_flag
26515     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26516   else
26517     ac_cpp_err=
26518   fi
26519 else
26520   ac_cpp_err=yes
26521 fi
26522 if test -z "$ac_cpp_err"; then
26523   ac_header_preproc=yes
26524 else
26525   echo "$as_me: failed program was:" >&5
26526 sed 's/^/| /' conftest.$ac_ext >&5
26527
26528   ac_header_preproc=no
26529 fi
26530 rm -f conftest.err conftest.$ac_ext
26531 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26532 echo "${ECHO_T}$ac_header_preproc" >&6
26533
26534 # So?  What about this header?
26535 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26536   yes:no: )
26537     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26538 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26539     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26540 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26541     ac_header_preproc=yes
26542     ;;
26543   no:yes:* )
26544     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26545 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26546     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26547 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26548     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26549 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26550     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26551 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26552     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26553 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26554     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26555 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26556     (
26557       cat <<\_ASBOX
26558 ## --------------------------------------------- ##
26559 ## Report this to <http://www.openldap.org/its/> ##
26560 ## --------------------------------------------- ##
26561 _ASBOX
26562     ) |
26563       sed "s/^/$as_me: WARNING:     /" >&2
26564     ;;
26565 esac
26566 echo "$as_me:$LINENO: checking for $ac_header" >&5
26567 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26568 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26569   echo $ECHO_N "(cached) $ECHO_C" >&6
26570 else
26571   eval "$as_ac_Header=\$ac_header_preproc"
26572 fi
26573 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26574 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26575
26576 fi
26577 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26578   cat >>confdefs.h <<_ACEOF
26579 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26580 _ACEOF
26581
26582 fi
26583
26584 done
26585
26586
26587
26588 for ac_func in sched_yield pthread_yield
26589 do
26590 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
26591 echo "$as_me:$LINENO: checking for $ac_func" >&5
26592 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
26593 if eval "test \"\${$as_ac_var+set}\" = set"; then
26594   echo $ECHO_N "(cached) $ECHO_C" >&6
26595 else
26596   cat >conftest.$ac_ext <<_ACEOF
26597 /* confdefs.h.  */
26598 _ACEOF
26599 cat confdefs.h >>conftest.$ac_ext
26600 cat >>conftest.$ac_ext <<_ACEOF
26601 /* end confdefs.h.  */
26602 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
26603    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
26604 #define $ac_func innocuous_$ac_func
26605
26606 /* System header to define __stub macros and hopefully few prototypes,
26607     which can conflict with char $ac_func (); below.
26608     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
26609     <limits.h> exists even on freestanding compilers.  */
26610
26611 #ifdef __STDC__
26612 # include <limits.h>
26613 #else
26614 # include <assert.h>
26615 #endif
26616
26617 #undef $ac_func
26618
26619 /* Override any gcc2 internal prototype to avoid an error.  */
26620 #ifdef __cplusplus
26621 extern "C"
26622 {
26623 #endif
26624 /* We use char because int might match the return type of a gcc2
26625    builtin and then its argument prototype would still apply.  */
26626 char $ac_func ();
26627 /* The GNU C library defines this for functions which it implements
26628     to always fail with ENOSYS.  Some functions are actually named
26629     something starting with __ and the normal name is an alias.  */
26630 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
26631 choke me
26632 #else
26633 char (*f) () = $ac_func;
26634 #endif
26635 #ifdef __cplusplus
26636 }
26637 #endif
26638
26639 int
26640 main ()
26641 {
26642 return f != $ac_func;
26643   ;
26644   return 0;
26645 }
26646 _ACEOF
26647 rm -f conftest.$ac_objext conftest$ac_exeext
26648 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26649   (eval $ac_link) 2>conftest.er1
26650   ac_status=$?
26651   grep -v '^ *+' conftest.er1 >conftest.err
26652   rm -f conftest.er1
26653   cat conftest.err >&5
26654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26655   (exit $ac_status); } &&
26656          { ac_try='test -z "$ac_c_werror_flag"
26657                          || test ! -s conftest.err'
26658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26659   (eval $ac_try) 2>&5
26660   ac_status=$?
26661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26662   (exit $ac_status); }; } &&
26663          { ac_try='test -s conftest$ac_exeext'
26664   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26665   (eval $ac_try) 2>&5
26666   ac_status=$?
26667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26668   (exit $ac_status); }; }; then
26669   eval "$as_ac_var=yes"
26670 else
26671   echo "$as_me: failed program was:" >&5
26672 sed 's/^/| /' conftest.$ac_ext >&5
26673
26674 eval "$as_ac_var=no"
26675 fi
26676 rm -f conftest.err conftest.$ac_objext \
26677       conftest$ac_exeext conftest.$ac_ext
26678 fi
26679 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
26680 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
26681 if test `eval echo '${'$as_ac_var'}'` = yes; then
26682   cat >>confdefs.h <<_ACEOF
26683 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
26684 _ACEOF
26685
26686 fi
26687 done
26688
26689
26690         echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5
26691 echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6
26692 if test "${ol_cv_header_linux_threads+set}" = set; then
26693   echo $ECHO_N "(cached) $ECHO_C" >&6
26694 else
26695   cat >conftest.$ac_ext <<_ACEOF
26696 /* confdefs.h.  */
26697 _ACEOF
26698 cat confdefs.h >>conftest.$ac_ext
26699 cat >>conftest.$ac_ext <<_ACEOF
26700 /* end confdefs.h.  */
26701 #include <pthread.h>
26702 _ACEOF
26703 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26704   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then
26705   ol_cv_header_linux_threads=yes
26706 else
26707   ol_cv_header_linux_threads=no
26708 fi
26709 rm -f conftest*
26710
26711
26712 fi
26713 echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5
26714 echo "${ECHO_T}$ol_cv_header_linux_threads" >&6
26715         if test $ol_cv_header_linux_threads = yes; then
26716
26717 cat >>confdefs.h <<\_ACEOF
26718 #define HAVE_LINUX_THREADS 1
26719 _ACEOF
26720
26721         fi
26722
26723
26724
26725 for ac_header in mach/cthreads.h
26726 do
26727 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26728 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26729   echo "$as_me:$LINENO: checking for $ac_header" >&5
26730 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26731 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26732   echo $ECHO_N "(cached) $ECHO_C" >&6
26733 fi
26734 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26735 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26736 else
26737   # Is the header compilable?
26738 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26739 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26740 cat >conftest.$ac_ext <<_ACEOF
26741 /* confdefs.h.  */
26742 _ACEOF
26743 cat confdefs.h >>conftest.$ac_ext
26744 cat >>conftest.$ac_ext <<_ACEOF
26745 /* end confdefs.h.  */
26746 $ac_includes_default
26747 #include <$ac_header>
26748 _ACEOF
26749 rm -f conftest.$ac_objext
26750 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26751   (eval $ac_compile) 2>conftest.er1
26752   ac_status=$?
26753   grep -v '^ *+' conftest.er1 >conftest.err
26754   rm -f conftest.er1
26755   cat conftest.err >&5
26756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26757   (exit $ac_status); } &&
26758          { ac_try='test -z "$ac_c_werror_flag"
26759                          || test ! -s conftest.err'
26760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26761   (eval $ac_try) 2>&5
26762   ac_status=$?
26763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26764   (exit $ac_status); }; } &&
26765          { ac_try='test -s conftest.$ac_objext'
26766   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26767   (eval $ac_try) 2>&5
26768   ac_status=$?
26769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26770   (exit $ac_status); }; }; then
26771   ac_header_compiler=yes
26772 else
26773   echo "$as_me: failed program was:" >&5
26774 sed 's/^/| /' conftest.$ac_ext >&5
26775
26776 ac_header_compiler=no
26777 fi
26778 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26779 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26780 echo "${ECHO_T}$ac_header_compiler" >&6
26781
26782 # Is the header present?
26783 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26784 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26785 cat >conftest.$ac_ext <<_ACEOF
26786 /* confdefs.h.  */
26787 _ACEOF
26788 cat confdefs.h >>conftest.$ac_ext
26789 cat >>conftest.$ac_ext <<_ACEOF
26790 /* end confdefs.h.  */
26791 #include <$ac_header>
26792 _ACEOF
26793 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26794   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26795   ac_status=$?
26796   grep -v '^ *+' conftest.er1 >conftest.err
26797   rm -f conftest.er1
26798   cat conftest.err >&5
26799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26800   (exit $ac_status); } >/dev/null; then
26801   if test -s conftest.err; then
26802     ac_cpp_err=$ac_c_preproc_warn_flag
26803     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26804   else
26805     ac_cpp_err=
26806   fi
26807 else
26808   ac_cpp_err=yes
26809 fi
26810 if test -z "$ac_cpp_err"; then
26811   ac_header_preproc=yes
26812 else
26813   echo "$as_me: failed program was:" >&5
26814 sed 's/^/| /' conftest.$ac_ext >&5
26815
26816   ac_header_preproc=no
26817 fi
26818 rm -f conftest.err conftest.$ac_ext
26819 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26820 echo "${ECHO_T}$ac_header_preproc" >&6
26821
26822 # So?  What about this header?
26823 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26824   yes:no: )
26825     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26826 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26827     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26828 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26829     ac_header_preproc=yes
26830     ;;
26831   no:yes:* )
26832     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26833 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26834     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26835 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26836     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26837 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26838     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26839 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26840     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26841 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26842     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26843 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26844     (
26845       cat <<\_ASBOX
26846 ## --------------------------------------------- ##
26847 ## Report this to <http://www.openldap.org/its/> ##
26848 ## --------------------------------------------- ##
26849 _ASBOX
26850     ) |
26851       sed "s/^/$as_me: WARNING:     /" >&2
26852     ;;
26853 esac
26854 echo "$as_me:$LINENO: checking for $ac_header" >&5
26855 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26856 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26857   echo $ECHO_N "(cached) $ECHO_C" >&6
26858 else
26859   eval "$as_ac_Header=\$ac_header_preproc"
26860 fi
26861 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26862 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26863
26864 fi
26865 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26866   cat >>confdefs.h <<_ACEOF
26867 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26868 _ACEOF
26869
26870 fi
26871
26872 done
26873
26874
26875 for ac_header in lwp/lwp.h
26876 do
26877 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26878 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26879   echo "$as_me:$LINENO: checking for $ac_header" >&5
26880 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26881 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26882   echo $ECHO_N "(cached) $ECHO_C" >&6
26883 fi
26884 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26885 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26886 else
26887   # Is the header compilable?
26888 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26889 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26890 cat >conftest.$ac_ext <<_ACEOF
26891 /* confdefs.h.  */
26892 _ACEOF
26893 cat confdefs.h >>conftest.$ac_ext
26894 cat >>conftest.$ac_ext <<_ACEOF
26895 /* end confdefs.h.  */
26896 $ac_includes_default
26897 #include <$ac_header>
26898 _ACEOF
26899 rm -f conftest.$ac_objext
26900 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26901   (eval $ac_compile) 2>conftest.er1
26902   ac_status=$?
26903   grep -v '^ *+' conftest.er1 >conftest.err
26904   rm -f conftest.er1
26905   cat conftest.err >&5
26906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26907   (exit $ac_status); } &&
26908          { ac_try='test -z "$ac_c_werror_flag"
26909                          || test ! -s conftest.err'
26910   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26911   (eval $ac_try) 2>&5
26912   ac_status=$?
26913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26914   (exit $ac_status); }; } &&
26915          { ac_try='test -s conftest.$ac_objext'
26916   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26917   (eval $ac_try) 2>&5
26918   ac_status=$?
26919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26920   (exit $ac_status); }; }; then
26921   ac_header_compiler=yes
26922 else
26923   echo "$as_me: failed program was:" >&5
26924 sed 's/^/| /' conftest.$ac_ext >&5
26925
26926 ac_header_compiler=no
26927 fi
26928 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26929 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26930 echo "${ECHO_T}$ac_header_compiler" >&6
26931
26932 # Is the header present?
26933 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26934 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26935 cat >conftest.$ac_ext <<_ACEOF
26936 /* confdefs.h.  */
26937 _ACEOF
26938 cat confdefs.h >>conftest.$ac_ext
26939 cat >>conftest.$ac_ext <<_ACEOF
26940 /* end confdefs.h.  */
26941 #include <$ac_header>
26942 _ACEOF
26943 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26944   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26945   ac_status=$?
26946   grep -v '^ *+' conftest.er1 >conftest.err
26947   rm -f conftest.er1
26948   cat conftest.err >&5
26949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26950   (exit $ac_status); } >/dev/null; then
26951   if test -s conftest.err; then
26952     ac_cpp_err=$ac_c_preproc_warn_flag
26953     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26954   else
26955     ac_cpp_err=
26956   fi
26957 else
26958   ac_cpp_err=yes
26959 fi
26960 if test -z "$ac_cpp_err"; then
26961   ac_header_preproc=yes
26962 else
26963   echo "$as_me: failed program was:" >&5
26964 sed 's/^/| /' conftest.$ac_ext >&5
26965
26966   ac_header_preproc=no
26967 fi
26968 rm -f conftest.err conftest.$ac_ext
26969 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26970 echo "${ECHO_T}$ac_header_preproc" >&6
26971
26972 # So?  What about this header?
26973 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26974   yes:no: )
26975     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26976 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26977     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26978 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26979     ac_header_preproc=yes
26980     ;;
26981   no:yes:* )
26982     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26983 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26984     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26985 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26986     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26987 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26988     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26989 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26990     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26991 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26992     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26993 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26994     (
26995       cat <<\_ASBOX
26996 ## --------------------------------------------- ##
26997 ## Report this to <http://www.openldap.org/its/> ##
26998 ## --------------------------------------------- ##
26999 _ASBOX
27000     ) |
27001       sed "s/^/$as_me: WARNING:     /" >&2
27002     ;;
27003 esac
27004 echo "$as_me:$LINENO: checking for $ac_header" >&5
27005 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27006 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27007   echo $ECHO_N "(cached) $ECHO_C" >&6
27008 else
27009   eval "$as_ac_Header=\$ac_header_preproc"
27010 fi
27011 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27012 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27013
27014 fi
27015 if test `eval echo '${'$as_ac_Header'}'` = yes; then
27016   cat >>confdefs.h <<_ACEOF
27017 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
27018 _ACEOF
27019
27020 fi
27021
27022 done
27023
27024
27025
27026 for ac_header in thread.h synch.h
27027 do
27028 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
27029 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27030   echo "$as_me:$LINENO: checking for $ac_header" >&5
27031 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27032 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27033   echo $ECHO_N "(cached) $ECHO_C" >&6
27034 fi
27035 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27036 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27037 else
27038   # Is the header compilable?
27039 echo "$as_me:$LINENO: checking $ac_header usability" >&5
27040 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
27041 cat >conftest.$ac_ext <<_ACEOF
27042 /* confdefs.h.  */
27043 _ACEOF
27044 cat confdefs.h >>conftest.$ac_ext
27045 cat >>conftest.$ac_ext <<_ACEOF
27046 /* end confdefs.h.  */
27047 $ac_includes_default
27048 #include <$ac_header>
27049 _ACEOF
27050 rm -f conftest.$ac_objext
27051 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27052   (eval $ac_compile) 2>conftest.er1
27053   ac_status=$?
27054   grep -v '^ *+' conftest.er1 >conftest.err
27055   rm -f conftest.er1
27056   cat conftest.err >&5
27057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27058   (exit $ac_status); } &&
27059          { ac_try='test -z "$ac_c_werror_flag"
27060                          || test ! -s conftest.err'
27061   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27062   (eval $ac_try) 2>&5
27063   ac_status=$?
27064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27065   (exit $ac_status); }; } &&
27066          { ac_try='test -s conftest.$ac_objext'
27067   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27068   (eval $ac_try) 2>&5
27069   ac_status=$?
27070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27071   (exit $ac_status); }; }; then
27072   ac_header_compiler=yes
27073 else
27074   echo "$as_me: failed program was:" >&5
27075 sed 's/^/| /' conftest.$ac_ext >&5
27076
27077 ac_header_compiler=no
27078 fi
27079 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27080 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27081 echo "${ECHO_T}$ac_header_compiler" >&6
27082
27083 # Is the header present?
27084 echo "$as_me:$LINENO: checking $ac_header presence" >&5
27085 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
27086 cat >conftest.$ac_ext <<_ACEOF
27087 /* confdefs.h.  */
27088 _ACEOF
27089 cat confdefs.h >>conftest.$ac_ext
27090 cat >>conftest.$ac_ext <<_ACEOF
27091 /* end confdefs.h.  */
27092 #include <$ac_header>
27093 _ACEOF
27094 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
27095   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
27096   ac_status=$?
27097   grep -v '^ *+' conftest.er1 >conftest.err
27098   rm -f conftest.er1
27099   cat conftest.err >&5
27100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27101   (exit $ac_status); } >/dev/null; then
27102   if test -s conftest.err; then
27103     ac_cpp_err=$ac_c_preproc_warn_flag
27104     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
27105   else
27106     ac_cpp_err=
27107   fi
27108 else
27109   ac_cpp_err=yes
27110 fi
27111 if test -z "$ac_cpp_err"; then
27112   ac_header_preproc=yes
27113 else
27114   echo "$as_me: failed program was:" >&5
27115 sed 's/^/| /' conftest.$ac_ext >&5
27116
27117   ac_header_preproc=no
27118 fi
27119 rm -f conftest.err conftest.$ac_ext
27120 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27121 echo "${ECHO_T}$ac_header_preproc" >&6
27122
27123 # So?  What about this header?
27124 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
27125   yes:no: )
27126     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27127 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27128     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
27129 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
27130     ac_header_preproc=yes
27131     ;;
27132   no:yes:* )
27133     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27134 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27135     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
27136 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
27137     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
27138 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
27139     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
27140 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
27141     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27142 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27143     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
27144 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
27145     (
27146       cat <<\_ASBOX
27147 ## --------------------------------------------- ##
27148 ## Report this to <http://www.openldap.org/its/> ##
27149 ## --------------------------------------------- ##
27150 _ASBOX
27151     ) |
27152       sed "s/^/$as_me: WARNING:     /" >&2
27153     ;;
27154 esac
27155 echo "$as_me:$LINENO: checking for $ac_header" >&5
27156 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27157 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27158   echo $ECHO_N "(cached) $ECHO_C" >&6
27159 else
27160   eval "$as_ac_Header=\$ac_header_preproc"
27161 fi
27162 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27163 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27164
27165 fi
27166 if test `eval echo '${'$as_ac_Header'}'` = yes; then
27167   cat >>confdefs.h <<_ACEOF
27168 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
27169 _ACEOF
27170
27171 fi
27172
27173 done
27174
27175 fi
27176
27177 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
27178                         cat >>confdefs.h <<\_ACEOF
27179 #define REENTRANT 1
27180 _ACEOF
27181
27182         cat >>confdefs.h <<\_ACEOF
27183 #define _REENTRANT 1
27184 _ACEOF
27185
27186         cat >>confdefs.h <<\_ACEOF
27187 #define THREAD_SAFE 1
27188 _ACEOF
27189
27190         cat >>confdefs.h <<\_ACEOF
27191 #define _THREAD_SAFE 1
27192 _ACEOF
27193
27194         cat >>confdefs.h <<\_ACEOF
27195 #define THREADSAFE 1
27196 _ACEOF
27197
27198         cat >>confdefs.h <<\_ACEOF
27199 #define _THREADSAFE 1
27200 _ACEOF
27201
27202         cat >>confdefs.h <<\_ACEOF
27203 #define _SGI_MP_SOURCE 1
27204 _ACEOF
27205
27206
27207                         echo "$as_me:$LINENO: checking for thread specific errno" >&5
27208 echo $ECHO_N "checking for thread specific errno... $ECHO_C" >&6
27209 if test "${ol_cv_errno_thread_specific+set}" = set; then
27210   echo $ECHO_N "(cached) $ECHO_C" >&6
27211 else
27212
27213                 cat >conftest.$ac_ext <<_ACEOF
27214 /* confdefs.h.  */
27215 _ACEOF
27216 cat confdefs.h >>conftest.$ac_ext
27217 cat >>conftest.$ac_ext <<_ACEOF
27218 /* end confdefs.h.  */
27219 #include <errno.h>
27220 int
27221 main ()
27222 {
27223 errno = 0;
27224   ;
27225   return 0;
27226 }
27227 _ACEOF
27228 rm -f conftest.$ac_objext conftest$ac_exeext
27229 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27230   (eval $ac_link) 2>conftest.er1
27231   ac_status=$?
27232   grep -v '^ *+' conftest.er1 >conftest.err
27233   rm -f conftest.er1
27234   cat conftest.err >&5
27235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27236   (exit $ac_status); } &&
27237          { ac_try='test -z "$ac_c_werror_flag"
27238                          || test ! -s conftest.err'
27239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27240   (eval $ac_try) 2>&5
27241   ac_status=$?
27242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27243   (exit $ac_status); }; } &&
27244          { ac_try='test -s conftest$ac_exeext'
27245   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27246   (eval $ac_try) 2>&5
27247   ac_status=$?
27248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27249   (exit $ac_status); }; }; then
27250   ol_cv_errno_thread_specific=yes
27251 else
27252   echo "$as_me: failed program was:" >&5
27253 sed 's/^/| /' conftest.$ac_ext >&5
27254
27255 ol_cv_errno_thread_specific=no
27256 fi
27257 rm -f conftest.err conftest.$ac_objext \
27258       conftest$ac_exeext conftest.$ac_ext
27259
27260 fi
27261 echo "$as_me:$LINENO: result: $ol_cv_errno_thread_specific" >&5
27262 echo "${ECHO_T}$ol_cv_errno_thread_specific" >&6
27263
27264                         echo "$as_me:$LINENO: checking for thread specific h_errno" >&5
27265 echo $ECHO_N "checking for thread specific h_errno... $ECHO_C" >&6
27266 if test "${ol_cv_h_errno_thread_specific+set}" = set; then
27267   echo $ECHO_N "(cached) $ECHO_C" >&6
27268 else
27269
27270                 cat >conftest.$ac_ext <<_ACEOF
27271 /* confdefs.h.  */
27272 _ACEOF
27273 cat confdefs.h >>conftest.$ac_ext
27274 cat >>conftest.$ac_ext <<_ACEOF
27275 /* end confdefs.h.  */
27276 #include <netdb.h>
27277 int
27278 main ()
27279 {
27280 h_errno = 0;
27281   ;
27282   return 0;
27283 }
27284 _ACEOF
27285 rm -f conftest.$ac_objext conftest$ac_exeext
27286 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27287   (eval $ac_link) 2>conftest.er1
27288   ac_status=$?
27289   grep -v '^ *+' conftest.er1 >conftest.err
27290   rm -f conftest.er1
27291   cat conftest.err >&5
27292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27293   (exit $ac_status); } &&
27294          { ac_try='test -z "$ac_c_werror_flag"
27295                          || test ! -s conftest.err'
27296   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27297   (eval $ac_try) 2>&5
27298   ac_status=$?
27299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27300   (exit $ac_status); }; } &&
27301          { ac_try='test -s conftest$ac_exeext'
27302   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27303   (eval $ac_try) 2>&5
27304   ac_status=$?
27305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27306   (exit $ac_status); }; }; then
27307   ol_cv_h_errno_thread_specific=yes
27308 else
27309   echo "$as_me: failed program was:" >&5
27310 sed 's/^/| /' conftest.$ac_ext >&5
27311
27312 ol_cv_h_errno_thread_specific=no
27313 fi
27314 rm -f conftest.err conftest.$ac_objext \
27315       conftest$ac_exeext conftest.$ac_ext
27316
27317 fi
27318 echo "$as_me:$LINENO: result: $ol_cv_h_errno_thread_specific" >&5
27319 echo "${ECHO_T}$ol_cv_h_errno_thread_specific" >&6
27320
27321         if test $ol_cv_errno_thread_specific != yes ||
27322            test $ol_cv_h_errno_thread_specific != yes ; then
27323                 LIBS="$LTHREAD_LIBS $LIBS"
27324                 LTHREAD_LIBS=""
27325         fi
27326
27327 fi
27328
27329 if test $ol_link_threads = no ; then
27330         if test $ol_with_threads = yes ; then
27331                 { { echo "$as_me:$LINENO: error: no suitable thread support" >&5
27332 echo "$as_me: error: no suitable thread support" >&2;}
27333    { (exit 1); exit 1; }; }
27334         fi
27335
27336         if test $ol_with_threads = auto ; then
27337                 { echo "$as_me:$LINENO: WARNING: no suitable thread support, disabling threads" >&5
27338 echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
27339                 ol_with_threads=no
27340         fi
27341
27342
27343 cat >>confdefs.h <<\_ACEOF
27344 #define NO_THREADS 1
27345 _ACEOF
27346
27347         LTHREAD_LIBS=""
27348         BUILD_THREAD=no
27349 else
27350         BUILD_THREAD=yes
27351 fi
27352
27353 if test $ol_link_threads != no ; then
27354
27355 cat >>confdefs.h <<\_ACEOF
27356 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
27357 _ACEOF
27358
27359 fi
27360
27361
27362
27363
27364 for ac_func in \
27365         ctime_r                 \
27366         gethostbyname_r gethostbyaddr_r \
27367
27368 do
27369 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
27370 echo "$as_me:$LINENO: checking for $ac_func" >&5
27371 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
27372 if eval "test \"\${$as_ac_var+set}\" = set"; then
27373   echo $ECHO_N "(cached) $ECHO_C" >&6
27374 else
27375   cat >conftest.$ac_ext <<_ACEOF
27376 /* confdefs.h.  */
27377 _ACEOF
27378 cat confdefs.h >>conftest.$ac_ext
27379 cat >>conftest.$ac_ext <<_ACEOF
27380 /* end confdefs.h.  */
27381 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
27382    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
27383 #define $ac_func innocuous_$ac_func
27384
27385 /* System header to define __stub macros and hopefully few prototypes,
27386     which can conflict with char $ac_func (); below.
27387     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
27388     <limits.h> exists even on freestanding compilers.  */
27389
27390 #ifdef __STDC__
27391 # include <limits.h>
27392 #else
27393 # include <assert.h>
27394 #endif
27395
27396 #undef $ac_func
27397
27398 /* Override any gcc2 internal prototype to avoid an error.  */
27399 #ifdef __cplusplus
27400 extern "C"
27401 {
27402 #endif
27403 /* We use char because int might match the return type of a gcc2
27404    builtin and then its argument prototype would still apply.  */
27405 char $ac_func ();
27406 /* The GNU C library defines this for functions which it implements
27407     to always fail with ENOSYS.  Some functions are actually named
27408     something starting with __ and the normal name is an alias.  */
27409 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
27410 choke me
27411 #else
27412 char (*f) () = $ac_func;
27413 #endif
27414 #ifdef __cplusplus
27415 }
27416 #endif
27417
27418 int
27419 main ()
27420 {
27421 return f != $ac_func;
27422   ;
27423   return 0;
27424 }
27425 _ACEOF
27426 rm -f conftest.$ac_objext conftest$ac_exeext
27427 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27428   (eval $ac_link) 2>conftest.er1
27429   ac_status=$?
27430   grep -v '^ *+' conftest.er1 >conftest.err
27431   rm -f conftest.er1
27432   cat conftest.err >&5
27433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27434   (exit $ac_status); } &&
27435          { ac_try='test -z "$ac_c_werror_flag"
27436                          || test ! -s conftest.err'
27437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27438   (eval $ac_try) 2>&5
27439   ac_status=$?
27440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27441   (exit $ac_status); }; } &&
27442          { ac_try='test -s conftest$ac_exeext'
27443   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27444   (eval $ac_try) 2>&5
27445   ac_status=$?
27446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27447   (exit $ac_status); }; }; then
27448   eval "$as_ac_var=yes"
27449 else
27450   echo "$as_me: failed program was:" >&5
27451 sed 's/^/| /' conftest.$ac_ext >&5
27452
27453 eval "$as_ac_var=no"
27454 fi
27455 rm -f conftest.err conftest.$ac_objext \
27456       conftest$ac_exeext conftest.$ac_ext
27457 fi
27458 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
27459 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
27460 if test `eval echo '${'$as_ac_var'}'` = yes; then
27461   cat >>confdefs.h <<_ACEOF
27462 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
27463 _ACEOF
27464
27465 fi
27466 done
27467
27468
27469 if test "$ac_cv_func_ctime_r" = no ; then
27470         ol_cv_func_ctime_r_nargs=0
27471 else
27472         echo "$as_me:$LINENO: checking number of arguments of ctime_r" >&5
27473 echo $ECHO_N "checking number of arguments of ctime_r... $ECHO_C" >&6
27474 if test "${ol_cv_func_ctime_r_nargs+set}" = set; then
27475   echo $ECHO_N "(cached) $ECHO_C" >&6
27476 else
27477   cat >conftest.$ac_ext <<_ACEOF
27478 /* confdefs.h.  */
27479 _ACEOF
27480 cat confdefs.h >>conftest.$ac_ext
27481 cat >>conftest.$ac_ext <<_ACEOF
27482 /* end confdefs.h.  */
27483 #include <time.h>
27484 int
27485 main ()
27486 {
27487 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
27488   ;
27489   return 0;
27490 }
27491 _ACEOF
27492 rm -f conftest.$ac_objext
27493 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27494   (eval $ac_compile) 2>conftest.er1
27495   ac_status=$?
27496   grep -v '^ *+' conftest.er1 >conftest.err
27497   rm -f conftest.er1
27498   cat conftest.err >&5
27499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27500   (exit $ac_status); } &&
27501          { ac_try='test -z "$ac_c_werror_flag"
27502                          || test ! -s conftest.err'
27503   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27504   (eval $ac_try) 2>&5
27505   ac_status=$?
27506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27507   (exit $ac_status); }; } &&
27508          { ac_try='test -s conftest.$ac_objext'
27509   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27510   (eval $ac_try) 2>&5
27511   ac_status=$?
27512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27513   (exit $ac_status); }; }; then
27514   ol_cv_func_ctime_r_nargs3=yes
27515 else
27516   echo "$as_me: failed program was:" >&5
27517 sed 's/^/| /' conftest.$ac_ext >&5
27518
27519 ol_cv_func_ctime_r_nargs3=no
27520 fi
27521 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27522
27523         cat >conftest.$ac_ext <<_ACEOF
27524 /* confdefs.h.  */
27525 _ACEOF
27526 cat confdefs.h >>conftest.$ac_ext
27527 cat >>conftest.$ac_ext <<_ACEOF
27528 /* end confdefs.h.  */
27529 #include <time.h>
27530 int
27531 main ()
27532 {
27533 time_t ti; char *buffer; ctime_r(&ti,buffer);
27534   ;
27535   return 0;
27536 }
27537 _ACEOF
27538 rm -f conftest.$ac_objext
27539 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27540   (eval $ac_compile) 2>conftest.er1
27541   ac_status=$?
27542   grep -v '^ *+' conftest.er1 >conftest.err
27543   rm -f conftest.er1
27544   cat conftest.err >&5
27545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27546   (exit $ac_status); } &&
27547          { ac_try='test -z "$ac_c_werror_flag"
27548                          || test ! -s conftest.err'
27549   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27550   (eval $ac_try) 2>&5
27551   ac_status=$?
27552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27553   (exit $ac_status); }; } &&
27554          { ac_try='test -s conftest.$ac_objext'
27555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27556   (eval $ac_try) 2>&5
27557   ac_status=$?
27558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27559   (exit $ac_status); }; }; then
27560   ol_cv_func_ctime_r_nargs2=yes
27561 else
27562   echo "$as_me: failed program was:" >&5
27563 sed 's/^/| /' conftest.$ac_ext >&5
27564
27565 ol_cv_func_ctime_r_nargs2=no
27566 fi
27567 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27568
27569         if test $ol_cv_func_ctime_r_nargs3 = yes &&
27570            test $ol_cv_func_ctime_r_nargs2 = no ; then
27571
27572                 ol_cv_func_ctime_r_nargs=3
27573
27574         elif test $ol_cv_func_ctime_r_nargs3 = no &&
27575              test $ol_cv_func_ctime_r_nargs2 = yes ; then
27576
27577                 ol_cv_func_ctime_r_nargs=2
27578
27579         else
27580                 ol_cv_func_ctime_r_nargs=0
27581         fi
27582
27583 fi
27584 echo "$as_me:$LINENO: result: $ol_cv_func_ctime_r_nargs" >&5
27585 echo "${ECHO_T}$ol_cv_func_ctime_r_nargs" >&6
27586
27587   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
27588
27589 cat >>confdefs.h <<_ACEOF
27590 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
27591 _ACEOF
27592
27593   fi
27594
27595 fi
27596
27597 if test "$ac_cv_func_gethostbyname_r" = yes ; then
27598         echo "$as_me:$LINENO: checking number of arguments of gethostbyname_r" >&5
27599 echo $ECHO_N "checking number of arguments of gethostbyname_r... $ECHO_C" >&6
27600 if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then
27601   echo $ECHO_N "(cached) $ECHO_C" >&6
27602 else
27603   cat >conftest.$ac_ext <<_ACEOF
27604 /* confdefs.h.  */
27605 _ACEOF
27606 cat confdefs.h >>conftest.$ac_ext
27607 cat >>conftest.$ac_ext <<_ACEOF
27608 /* end confdefs.h.  */
27609 #include <sys/types.h>
27610 #include <sys/socket.h>
27611 #include <netinet/in.h>
27612 #include <netdb.h>
27613 #define BUFSIZE (sizeof(struct hostent)+10)
27614 int
27615 main ()
27616 {
27617 struct hostent hent; char buffer[BUFSIZE];
27618                 int bufsize=BUFSIZE;int h_errno;
27619                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
27620                         buffer, bufsize, &h_errno);
27621   ;
27622   return 0;
27623 }
27624 _ACEOF
27625 rm -f conftest.$ac_objext
27626 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27627   (eval $ac_compile) 2>conftest.er1
27628   ac_status=$?
27629   grep -v '^ *+' conftest.er1 >conftest.err
27630   rm -f conftest.er1
27631   cat conftest.err >&5
27632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27633   (exit $ac_status); } &&
27634          { ac_try='test -z "$ac_c_werror_flag"
27635                          || test ! -s conftest.err'
27636   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27637   (eval $ac_try) 2>&5
27638   ac_status=$?
27639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27640   (exit $ac_status); }; } &&
27641          { ac_try='test -s conftest.$ac_objext'
27642   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27643   (eval $ac_try) 2>&5
27644   ac_status=$?
27645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27646   (exit $ac_status); }; }; then
27647   ol_cv_func_gethostbyname_r_nargs5=yes
27648 else
27649   echo "$as_me: failed program was:" >&5
27650 sed 's/^/| /' conftest.$ac_ext >&5
27651
27652 ol_cv_func_gethostbyname_r_nargs5=no
27653 fi
27654 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27655
27656         cat >conftest.$ac_ext <<_ACEOF
27657 /* confdefs.h.  */
27658 _ACEOF
27659 cat confdefs.h >>conftest.$ac_ext
27660 cat >>conftest.$ac_ext <<_ACEOF
27661 /* end confdefs.h.  */
27662 #include <sys/types.h>
27663 #include <sys/socket.h>
27664 #include <netinet/in.h>
27665 #include <netdb.h>
27666 #define BUFSIZE (sizeof(struct hostent)+10)
27667 int
27668 main ()
27669 {
27670 struct hostent hent;struct hostent *rhent;
27671                 char buffer[BUFSIZE];
27672                 int bufsize=BUFSIZE;int h_errno;
27673                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
27674                         &rhent, &h_errno);
27675   ;
27676   return 0;
27677 }
27678 _ACEOF
27679 rm -f conftest.$ac_objext
27680 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27681   (eval $ac_compile) 2>conftest.er1
27682   ac_status=$?
27683   grep -v '^ *+' conftest.er1 >conftest.err
27684   rm -f conftest.er1
27685   cat conftest.err >&5
27686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27687   (exit $ac_status); } &&
27688          { ac_try='test -z "$ac_c_werror_flag"
27689                          || test ! -s conftest.err'
27690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27691   (eval $ac_try) 2>&5
27692   ac_status=$?
27693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27694   (exit $ac_status); }; } &&
27695          { ac_try='test -s conftest.$ac_objext'
27696   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27697   (eval $ac_try) 2>&5
27698   ac_status=$?
27699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27700   (exit $ac_status); }; }; then
27701   ol_cv_func_gethostbyname_r_nargs6=yes
27702 else
27703   echo "$as_me: failed program was:" >&5
27704 sed 's/^/| /' conftest.$ac_ext >&5
27705
27706 ol_cv_func_gethostbyname_r_nargs6=no
27707 fi
27708 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27709
27710         if test $ol_cv_func_gethostbyname_r_nargs5 = yes &&
27711            test $ol_cv_func_gethostbyname_r_nargs6 = no ; then
27712
27713                 ol_cv_func_gethostbyname_r_nargs=5
27714
27715         elif test $ol_cv_func_gethostbyname_r_nargs5 = no &&
27716              test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
27717
27718                 ol_cv_func_gethostbyname_r_nargs=6
27719
27720         else
27721                 ol_cv_func_gethostbyname_r_nargs=0
27722         fi
27723
27724 fi
27725 echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyname_r_nargs" >&5
27726 echo "${ECHO_T}$ol_cv_func_gethostbyname_r_nargs" >&6
27727   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
27728
27729 cat >>confdefs.h <<_ACEOF
27730 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
27731 _ACEOF
27732
27733   fi
27734
27735 else
27736         ol_cv_func_gethostbyname_r_nargs=0
27737 fi
27738
27739 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
27740         echo "$as_me:$LINENO: checking number of arguments of gethostbyaddr_r" >&5
27741 echo $ECHO_N "checking number of arguments of gethostbyaddr_r... $ECHO_C" >&6
27742 if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then
27743   echo $ECHO_N "(cached) $ECHO_C" >&6
27744 else
27745   cat >conftest.$ac_ext <<_ACEOF
27746 /* confdefs.h.  */
27747 _ACEOF
27748 cat confdefs.h >>conftest.$ac_ext
27749 cat >>conftest.$ac_ext <<_ACEOF
27750 /* end confdefs.h.  */
27751 #include <sys/types.h>
27752 #include <sys/socket.h>
27753 #include <netinet/in.h>
27754 #include <netdb.h>
27755 #define BUFSIZE (sizeof(struct hostent)+10)
27756 int
27757 main ()
27758 {
27759 struct hostent hent; char buffer[BUFSIZE];
27760             struct in_addr add;
27761             size_t alen=sizeof(struct in_addr);
27762             int bufsize=BUFSIZE;int h_errno;
27763                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
27764                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
27765   ;
27766   return 0;
27767 }
27768 _ACEOF
27769 rm -f conftest.$ac_objext
27770 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27771   (eval $ac_compile) 2>conftest.er1
27772   ac_status=$?
27773   grep -v '^ *+' conftest.er1 >conftest.err
27774   rm -f conftest.er1
27775   cat conftest.err >&5
27776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27777   (exit $ac_status); } &&
27778          { ac_try='test -z "$ac_c_werror_flag"
27779                          || test ! -s conftest.err'
27780   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27781   (eval $ac_try) 2>&5
27782   ac_status=$?
27783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27784   (exit $ac_status); }; } &&
27785          { ac_try='test -s conftest.$ac_objext'
27786   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27787   (eval $ac_try) 2>&5
27788   ac_status=$?
27789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27790   (exit $ac_status); }; }; then
27791   ol_cv_func_gethostbyaddr_r_nargs7=yes
27792 else
27793   echo "$as_me: failed program was:" >&5
27794 sed 's/^/| /' conftest.$ac_ext >&5
27795
27796 ol_cv_func_gethostbyaddr_r_nargs7=no
27797 fi
27798 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27799
27800         cat >conftest.$ac_ext <<_ACEOF
27801 /* confdefs.h.  */
27802 _ACEOF
27803 cat confdefs.h >>conftest.$ac_ext
27804 cat >>conftest.$ac_ext <<_ACEOF
27805 /* end confdefs.h.  */
27806 #include <sys/types.h>
27807 #include <sys/socket.h>
27808 #include <netinet/in.h>
27809 #include <netdb.h>
27810 #define BUFSIZE (sizeof(struct hostent)+10)
27811 int
27812 main ()
27813 {
27814 struct hostent hent;
27815                 struct hostent *rhent; char buffer[BUFSIZE];
27816                 struct in_addr add;
27817                 size_t alen=sizeof(struct in_addr);
27818                 int bufsize=BUFSIZE;int h_errno;
27819                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
27820                         alen, AF_INET, &hent, buffer, bufsize,
27821                         &rhent, &h_errno);
27822   ;
27823   return 0;
27824 }
27825 _ACEOF
27826 rm -f conftest.$ac_objext
27827 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27828   (eval $ac_compile) 2>conftest.er1
27829   ac_status=$?
27830   grep -v '^ *+' conftest.er1 >conftest.err
27831   rm -f conftest.er1
27832   cat conftest.err >&5
27833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27834   (exit $ac_status); } &&
27835          { ac_try='test -z "$ac_c_werror_flag"
27836                          || test ! -s conftest.err'
27837   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27838   (eval $ac_try) 2>&5
27839   ac_status=$?
27840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27841   (exit $ac_status); }; } &&
27842          { ac_try='test -s conftest.$ac_objext'
27843   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27844   (eval $ac_try) 2>&5
27845   ac_status=$?
27846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27847   (exit $ac_status); }; }; then
27848   ol_cv_func_gethostbyaddr_r_nargs8=yes
27849 else
27850   echo "$as_me: failed program was:" >&5
27851 sed 's/^/| /' conftest.$ac_ext >&5
27852
27853 ol_cv_func_gethostbyaddr_r_nargs8=no
27854 fi
27855 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27856
27857         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes &&
27858            test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
27859
27860                 ol_cv_func_gethostbyaddr_r_nargs=7
27861
27862         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no &&
27863              test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
27864
27865                 ol_cv_func_gethostbyaddr_r_nargs=8
27866
27867         else
27868                 ol_cv_func_gethostbyaddr_r_nargs=0
27869         fi
27870
27871 fi
27872 echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5
27873 echo "${ECHO_T}$ol_cv_func_gethostbyaddr_r_nargs" >&6
27874   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
27875
27876 cat >>confdefs.h <<_ACEOF
27877 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
27878 _ACEOF
27879
27880   fi
27881
27882 else
27883         ol_cv_func_gethostbyaddr_r_nargs=0
27884 fi
27885
27886 ol_link_ldbm=no
27887
27888 case $ol_enable_ldbm_api in auto | berkeley | bcompat)
27889
27890         if test $ol_enable_ldbm_api = bcompat; then \
27891
27892
27893 for ac_header in db_185.h db.h
27894 do
27895 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
27896 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27897   echo "$as_me:$LINENO: checking for $ac_header" >&5
27898 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27899 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27900   echo $ECHO_N "(cached) $ECHO_C" >&6
27901 fi
27902 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27903 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27904 else
27905   # Is the header compilable?
27906 echo "$as_me:$LINENO: checking $ac_header usability" >&5
27907 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
27908 cat >conftest.$ac_ext <<_ACEOF
27909 /* confdefs.h.  */
27910 _ACEOF
27911 cat confdefs.h >>conftest.$ac_ext
27912 cat >>conftest.$ac_ext <<_ACEOF
27913 /* end confdefs.h.  */
27914 $ac_includes_default
27915 #include <$ac_header>
27916 _ACEOF
27917 rm -f conftest.$ac_objext
27918 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27919   (eval $ac_compile) 2>conftest.er1
27920   ac_status=$?
27921   grep -v '^ *+' conftest.er1 >conftest.err
27922   rm -f conftest.er1
27923   cat conftest.err >&5
27924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27925   (exit $ac_status); } &&
27926          { ac_try='test -z "$ac_c_werror_flag"
27927                          || test ! -s conftest.err'
27928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27929   (eval $ac_try) 2>&5
27930   ac_status=$?
27931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27932   (exit $ac_status); }; } &&
27933          { ac_try='test -s conftest.$ac_objext'
27934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27935   (eval $ac_try) 2>&5
27936   ac_status=$?
27937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27938   (exit $ac_status); }; }; then
27939   ac_header_compiler=yes
27940 else
27941   echo "$as_me: failed program was:" >&5
27942 sed 's/^/| /' conftest.$ac_ext >&5
27943
27944 ac_header_compiler=no
27945 fi
27946 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27947 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27948 echo "${ECHO_T}$ac_header_compiler" >&6
27949
27950 # Is the header present?
27951 echo "$as_me:$LINENO: checking $ac_header presence" >&5
27952 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
27953 cat >conftest.$ac_ext <<_ACEOF
27954 /* confdefs.h.  */
27955 _ACEOF
27956 cat confdefs.h >>conftest.$ac_ext
27957 cat >>conftest.$ac_ext <<_ACEOF
27958 /* end confdefs.h.  */
27959 #include <$ac_header>
27960 _ACEOF
27961 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
27962   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
27963   ac_status=$?
27964   grep -v '^ *+' conftest.er1 >conftest.err
27965   rm -f conftest.er1
27966   cat conftest.err >&5
27967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27968   (exit $ac_status); } >/dev/null; then
27969   if test -s conftest.err; then
27970     ac_cpp_err=$ac_c_preproc_warn_flag
27971     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
27972   else
27973     ac_cpp_err=
27974   fi
27975 else
27976   ac_cpp_err=yes
27977 fi
27978 if test -z "$ac_cpp_err"; then
27979   ac_header_preproc=yes
27980 else
27981   echo "$as_me: failed program was:" >&5
27982 sed 's/^/| /' conftest.$ac_ext >&5
27983
27984   ac_header_preproc=no
27985 fi
27986 rm -f conftest.err conftest.$ac_ext
27987 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27988 echo "${ECHO_T}$ac_header_preproc" >&6
27989
27990 # So?  What about this header?
27991 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
27992   yes:no: )
27993     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27994 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27995     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
27996 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
27997     ac_header_preproc=yes
27998     ;;
27999   no:yes:* )
28000     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
28001 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
28002     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
28003 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
28004     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
28005 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
28006     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
28007 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
28008     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
28009 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
28010     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
28011 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
28012     (
28013       cat <<\_ASBOX
28014 ## --------------------------------------------- ##
28015 ## Report this to <http://www.openldap.org/its/> ##
28016 ## --------------------------------------------- ##
28017 _ASBOX
28018     ) |
28019       sed "s/^/$as_me: WARNING:     /" >&2
28020     ;;
28021 esac
28022 echo "$as_me:$LINENO: checking for $ac_header" >&5
28023 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
28024 if eval "test \"\${$as_ac_Header+set}\" = set"; then
28025   echo $ECHO_N "(cached) $ECHO_C" >&6
28026 else
28027   eval "$as_ac_Header=\$ac_header_preproc"
28028 fi
28029 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
28030 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
28031
28032 fi
28033 if test `eval echo '${'$as_ac_Header'}'` = yes; then
28034   cat >>confdefs.h <<_ACEOF
28035 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
28036 _ACEOF
28037
28038 fi
28039
28040 done
28041
28042 if test $ac_cv_header_db_185_h = yes || test $ac_cv_header_db_h = yes; then
28043         echo "$as_me:$LINENO: checking if Berkeley DB header compatibility" >&5
28044 echo $ECHO_N "checking if Berkeley DB header compatibility... $ECHO_C" >&6
28045 if test "${ol_cv_header_db1+set}" = set; then
28046   echo $ECHO_N "(cached) $ECHO_C" >&6
28047 else
28048
28049                 cat >conftest.$ac_ext <<_ACEOF
28050 /* confdefs.h.  */
28051 _ACEOF
28052 cat confdefs.h >>conftest.$ac_ext
28053 cat >>conftest.$ac_ext <<_ACEOF
28054 /* end confdefs.h.  */
28055
28056 #if HAVE_DB_185_H
28057 #       include <db_185.h>
28058 #else
28059 #       include <db.h>
28060 #endif
28061
28062  /* this check could be improved */
28063 #ifndef DB_VERSION_MAJOR
28064 #       define DB_VERSION_MAJOR 1
28065 #endif
28066
28067 #if DB_VERSION_MAJOR == 1
28068         __db_version_1
28069 #endif
28070
28071 _ACEOF
28072 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28073   $EGREP "__db_version_1" >/dev/null 2>&1; then
28074   ol_cv_header_db1=yes
28075 else
28076   ol_cv_header_db1=no
28077 fi
28078 rm -f conftest*
28079
28080 fi
28081 echo "$as_me:$LINENO: result: $ol_cv_header_db1" >&5
28082 echo "${ECHO_T}$ol_cv_header_db1" >&6
28083
28084         if test $ol_cv_header_db1 = yes ; then
28085                 ol_cv_lib_db=no
28086
28087 echo "$as_me:$LINENO: checking for Berkeley DB major version" >&5
28088 echo $ECHO_N "checking for Berkeley DB major version... $ECHO_C" >&6
28089 if test "${ol_cv_bdb_major+set}" = set; then
28090   echo $ECHO_N "(cached) $ECHO_C" >&6
28091 else
28092
28093         ol_cv_bdb_major=0
28094         if test $ol_cv_bdb_major = 0 ; then
28095                 cat >conftest.$ac_ext <<_ACEOF
28096 /* confdefs.h.  */
28097 _ACEOF
28098 cat confdefs.h >>conftest.$ac_ext
28099 cat >>conftest.$ac_ext <<_ACEOF
28100 /* end confdefs.h.  */
28101
28102 #include <db.h>
28103 #ifndef DB_VERSION_MAJOR
28104 #       define DB_VERSION_MAJOR 1
28105 #endif
28106 #if DB_VERSION_MAJOR == 4
28107 __db_version
28108 #endif
28109
28110 _ACEOF
28111 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28112   $EGREP "__db_version" >/dev/null 2>&1; then
28113   ol_cv_bdb_major=4
28114 else
28115   :
28116 fi
28117 rm -f conftest*
28118
28119         fi
28120         if test $ol_cv_bdb_major = 0 ; then
28121                 cat >conftest.$ac_ext <<_ACEOF
28122 /* confdefs.h.  */
28123 _ACEOF
28124 cat confdefs.h >>conftest.$ac_ext
28125 cat >>conftest.$ac_ext <<_ACEOF
28126 /* end confdefs.h.  */
28127
28128 #include <db.h>
28129 #ifndef DB_VERSION_MAJOR
28130 #       define DB_VERSION_MAJOR 1
28131 #endif
28132 #if DB_VERSION_MAJOR == 3
28133 __db_version
28134 #endif
28135
28136 _ACEOF
28137 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28138   $EGREP "__db_version" >/dev/null 2>&1; then
28139   ol_cv_bdb_major=3
28140 else
28141   :
28142 fi
28143 rm -f conftest*
28144
28145         fi
28146         if test $ol_cv_bdb_major = 0 ; then
28147                 cat >conftest.$ac_ext <<_ACEOF
28148 /* confdefs.h.  */
28149 _ACEOF
28150 cat confdefs.h >>conftest.$ac_ext
28151 cat >>conftest.$ac_ext <<_ACEOF
28152 /* end confdefs.h.  */
28153
28154 #include <db.h>
28155 #ifndef DB_VERSION_MAJOR
28156 #       define DB_VERSION_MAJOR 1
28157 #endif
28158 #if DB_VERSION_MAJOR == 2
28159 __db_version
28160 #endif
28161
28162 _ACEOF
28163 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28164   $EGREP "__db_version" >/dev/null 2>&1; then
28165   ol_cv_bdb_major=2
28166 else
28167   :
28168 fi
28169 rm -f conftest*
28170
28171         fi
28172         if test $ol_cv_bdb_major = 0 ; then
28173                 cat >conftest.$ac_ext <<_ACEOF
28174 /* confdefs.h.  */
28175 _ACEOF
28176 cat confdefs.h >>conftest.$ac_ext
28177 cat >>conftest.$ac_ext <<_ACEOF
28178 /* end confdefs.h.  */
28179
28180 #include <db.h>
28181 #ifndef DB_VERSION_MAJOR
28182 #       define DB_VERSION_MAJOR 1
28183 #endif
28184 #if DB_VERSION_MAJOR == 1
28185 __db_version
28186 #endif
28187
28188 _ACEOF
28189 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28190   $EGREP "__db_version" >/dev/null 2>&1; then
28191   ol_cv_bdb_major=1
28192 else
28193   :
28194 fi
28195 rm -f conftest*
28196
28197         fi
28198
28199         if test $ol_cv_bdb_major = 0 ; then
28200                 { { echo "$as_me:$LINENO: error: Unknown Berkeley DB major version" >&5
28201 echo "$as_me: error: Unknown Berkeley DB major version" >&2;}
28202    { (exit 1); exit 1; }; }
28203         fi
28204
28205 fi
28206 echo "$as_me:$LINENO: result: $ol_cv_bdb_major" >&5
28207 echo "${ECHO_T}$ol_cv_bdb_major" >&6
28208
28209 echo "$as_me:$LINENO: checking for Berkeley DB minor version" >&5
28210 echo $ECHO_N "checking for Berkeley DB minor version... $ECHO_C" >&6
28211 if test "${ol_cv_bdb_minor+set}" = set; then
28212   echo $ECHO_N "(cached) $ECHO_C" >&6
28213 else
28214
28215         ol_cv_bdb_minor=0
28216         if test $ol_cv_bdb_minor = 0 ; then
28217                 cat >conftest.$ac_ext <<_ACEOF
28218 /* confdefs.h.  */
28219 _ACEOF
28220 cat confdefs.h >>conftest.$ac_ext
28221 cat >>conftest.$ac_ext <<_ACEOF
28222 /* end confdefs.h.  */
28223
28224 #include <db.h>
28225 #ifndef DB_VERSION_MINOR
28226 #       define DB_VERSION_MINOR 0
28227 #endif
28228 #if DB_VERSION_MINOR == 9
28229 __db_version
28230 #endif
28231
28232 _ACEOF
28233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28234   $EGREP "__db_version" >/dev/null 2>&1; then
28235   ol_cv_bdb_minor=9
28236 else
28237   :
28238 fi
28239 rm -f conftest*
28240
28241         fi
28242         if test $ol_cv_bdb_minor = 0 ; then
28243                 cat >conftest.$ac_ext <<_ACEOF
28244 /* confdefs.h.  */
28245 _ACEOF
28246 cat confdefs.h >>conftest.$ac_ext
28247 cat >>conftest.$ac_ext <<_ACEOF
28248 /* end confdefs.h.  */
28249
28250 #include <db.h>
28251 #ifndef DB_VERSION_MINOR
28252 #       define DB_VERSION_MINOR 0
28253 #endif
28254 #if DB_VERSION_MINOR == 8
28255 __db_version
28256 #endif
28257
28258 _ACEOF
28259 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28260   $EGREP "__db_version" >/dev/null 2>&1; then
28261   ol_cv_bdb_minor=8
28262 else
28263   :
28264 fi
28265 rm -f conftest*
28266
28267         fi
28268         if test $ol_cv_bdb_minor = 0 ; then
28269                 cat >conftest.$ac_ext <<_ACEOF
28270 /* confdefs.h.  */
28271 _ACEOF
28272 cat confdefs.h >>conftest.$ac_ext
28273 cat >>conftest.$ac_ext <<_ACEOF
28274 /* end confdefs.h.  */
28275
28276 #include <db.h>
28277 #ifndef DB_VERSION_MINOR
28278 #       define DB_VERSION_MINOR 0
28279 #endif
28280 #if DB_VERSION_MINOR == 7
28281 __db_version
28282 #endif
28283
28284 _ACEOF
28285 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28286   $EGREP "__db_version" >/dev/null 2>&1; then
28287   ol_cv_bdb_minor=7
28288 else
28289   :
28290 fi
28291 rm -f conftest*
28292
28293         fi
28294         if test $ol_cv_bdb_minor = 0 ; then
28295                 cat >conftest.$ac_ext <<_ACEOF
28296 /* confdefs.h.  */
28297 _ACEOF
28298 cat confdefs.h >>conftest.$ac_ext
28299 cat >>conftest.$ac_ext <<_ACEOF
28300 /* end confdefs.h.  */
28301
28302 #include <db.h>
28303 #ifndef DB_VERSION_MINOR
28304 #       define DB_VERSION_MINOR 0
28305 #endif
28306 #if DB_VERSION_MINOR == 6
28307 __db_version
28308 #endif
28309
28310 _ACEOF
28311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28312   $EGREP "__db_version" >/dev/null 2>&1; then
28313   ol_cv_bdb_minor=6
28314 else
28315   :
28316 fi
28317 rm -f conftest*
28318
28319         fi
28320         if test $ol_cv_bdb_minor = 0 ; then
28321                 cat >conftest.$ac_ext <<_ACEOF
28322 /* confdefs.h.  */
28323 _ACEOF
28324 cat confdefs.h >>conftest.$ac_ext
28325 cat >>conftest.$ac_ext <<_ACEOF
28326 /* end confdefs.h.  */
28327
28328 #include <db.h>
28329 #ifndef DB_VERSION_MINOR
28330 #       define DB_VERSION_MINOR 0
28331 #endif
28332 #if DB_VERSION_MINOR == 5
28333 __db_version
28334 #endif
28335
28336 _ACEOF
28337 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28338   $EGREP "__db_version" >/dev/null 2>&1; then
28339   ol_cv_bdb_minor=5
28340 else
28341   :
28342 fi
28343 rm -f conftest*
28344
28345         fi
28346         if test $ol_cv_bdb_minor = 0 ; then
28347                 cat >conftest.$ac_ext <<_ACEOF
28348 /* confdefs.h.  */
28349 _ACEOF
28350 cat confdefs.h >>conftest.$ac_ext
28351 cat >>conftest.$ac_ext <<_ACEOF
28352 /* end confdefs.h.  */
28353
28354 #include <db.h>
28355 #ifndef DB_VERSION_MINOR
28356 #       define DB_VERSION_MINOR 0
28357 #endif
28358 #if DB_VERSION_MINOR == 4
28359 __db_version
28360 #endif
28361
28362 _ACEOF
28363 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28364   $EGREP "__db_version" >/dev/null 2>&1; then
28365   ol_cv_bdb_minor=4
28366 else
28367   :
28368 fi
28369 rm -f conftest*
28370
28371         fi
28372         if test $ol_cv_bdb_minor = 0 ; then
28373                 cat >conftest.$ac_ext <<_ACEOF
28374 /* confdefs.h.  */
28375 _ACEOF
28376 cat confdefs.h >>conftest.$ac_ext
28377 cat >>conftest.$ac_ext <<_ACEOF
28378 /* end confdefs.h.  */
28379
28380 #include <db.h>
28381 #ifndef DB_VERSION_MINOR
28382 #       define DB_VERSION_MINOR 0
28383 #endif
28384 #if DB_VERSION_MINOR == 3
28385 __db_version
28386 #endif
28387
28388 _ACEOF
28389 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28390   $EGREP "__db_version" >/dev/null 2>&1; then
28391   ol_cv_bdb_minor=3
28392 else
28393   :
28394 fi
28395 rm -f conftest*
28396
28397         fi
28398         if test $ol_cv_bdb_minor = 0 ; then
28399                 cat >conftest.$ac_ext <<_ACEOF
28400 /* confdefs.h.  */
28401 _ACEOF
28402 cat confdefs.h >>conftest.$ac_ext
28403 cat >>conftest.$ac_ext <<_ACEOF
28404 /* end confdefs.h.  */
28405
28406 #include <db.h>
28407 #ifndef DB_VERSION_MINOR
28408 #       define DB_VERSION_MINOR 0
28409 #endif
28410 #if DB_VERSION_MINOR == 2
28411 __db_version
28412 #endif
28413
28414 _ACEOF
28415 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28416   $EGREP "__db_version" >/dev/null 2>&1; then
28417   ol_cv_bdb_minor=2
28418 else
28419   :
28420 fi
28421 rm -f conftest*
28422
28423         fi
28424         if test $ol_cv_bdb_minor = 0 ; then
28425                 cat >conftest.$ac_ext <<_ACEOF
28426 /* confdefs.h.  */
28427 _ACEOF
28428 cat confdefs.h >>conftest.$ac_ext
28429 cat >>conftest.$ac_ext <<_ACEOF
28430 /* end confdefs.h.  */
28431
28432 #include <db.h>
28433 #ifndef DB_VERSION_MINOR
28434 #       define DB_VERSION_MINOR 0
28435 #endif
28436 #if DB_VERSION_MINOR == 1
28437 __db_version
28438 #endif
28439
28440 _ACEOF
28441 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28442   $EGREP "__db_version" >/dev/null 2>&1; then
28443   ol_cv_bdb_minor=1
28444 else
28445   :
28446 fi
28447 rm -f conftest*
28448
28449         fi
28450
28451 fi
28452 echo "$as_me:$LINENO: result: $ol_cv_bdb_minor" >&5
28453 echo "${ECHO_T}$ol_cv_bdb_minor" >&6
28454
28455 if test $ol_cv_bdb_major = 4 ; then
28456         if test $ol_cv_bdb_minor = 4 ; then
28457                 if test $ol_cv_lib_db = no ; then
28458         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb44)" >&5
28459 echo $ECHO_N "checking for Berkeley DB link (-ldb44)... $ECHO_C" >&6
28460 if test "${ol_cv_db_db44+set}" = set; then
28461   echo $ECHO_N "(cached) $ECHO_C" >&6
28462 else
28463
28464         ol_DB_LIB=-ldb44
28465         ol_LIBS=$LIBS
28466         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28467
28468         cat >conftest.$ac_ext <<_ACEOF
28469 /* confdefs.h.  */
28470 _ACEOF
28471 cat confdefs.h >>conftest.$ac_ext
28472 cat >>conftest.$ac_ext <<_ACEOF
28473 /* end confdefs.h.  */
28474
28475 #ifdef HAVE_DB_185_H
28476 # include <db_185.h>
28477 #else
28478 # include <db.h>
28479 #endif
28480
28481 #ifndef DB_VERSION_MAJOR
28482 # define DB_VERSION_MAJOR 1
28483 #endif
28484
28485 #ifndef NULL
28486 #define NULL ((void*)0)
28487 #endif
28488
28489 int
28490 main ()
28491 {
28492
28493 #if DB_VERSION_MAJOR > 1
28494         {
28495                 char *version;
28496                 int major, minor, patch;
28497
28498                 version = db_version( &major, &minor, &patch );
28499
28500                 if( major != DB_VERSION_MAJOR ||
28501                         minor < DB_VERSION_MINOR )
28502                 {
28503                         printf("Berkeley DB version mismatch\n"
28504                                 "\theader: %s\n\tlibrary: %s\n",
28505                                 DB_VERSION_STRING, version);
28506                         return 1;
28507                 }
28508         }
28509 #endif
28510
28511 #if DB_VERSION_MAJOR > 2
28512         db_env_create( NULL, 0 );
28513 #elif DB_VERSION_MAJOR > 1
28514         db_appexit( NULL );
28515 #else
28516         (void) dbopen( NULL, 0, 0, 0, NULL);
28517 #endif
28518
28519   ;
28520   return 0;
28521 }
28522 _ACEOF
28523 rm -f conftest.$ac_objext conftest$ac_exeext
28524 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28525   (eval $ac_link) 2>conftest.er1
28526   ac_status=$?
28527   grep -v '^ *+' conftest.er1 >conftest.err
28528   rm -f conftest.er1
28529   cat conftest.err >&5
28530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28531   (exit $ac_status); } &&
28532          { ac_try='test -z "$ac_c_werror_flag"
28533                          || test ! -s conftest.err'
28534   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28535   (eval $ac_try) 2>&5
28536   ac_status=$?
28537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28538   (exit $ac_status); }; } &&
28539          { ac_try='test -s conftest$ac_exeext'
28540   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28541   (eval $ac_try) 2>&5
28542   ac_status=$?
28543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28544   (exit $ac_status); }; }; then
28545   ol_cv_db_db44=yes
28546 else
28547   echo "$as_me: failed program was:" >&5
28548 sed 's/^/| /' conftest.$ac_ext >&5
28549
28550 ol_cv_db_db44=no
28551 fi
28552 rm -f conftest.err conftest.$ac_objext \
28553       conftest$ac_exeext conftest.$ac_ext
28554
28555         LIBS="$ol_LIBS"
28556
28557 fi
28558 echo "$as_me:$LINENO: result: $ol_cv_db_db44" >&5
28559 echo "${ECHO_T}$ol_cv_db_db44" >&6
28560
28561         if test $ol_cv_db_db44 = yes ; then
28562                 ol_cv_lib_db=-ldb44
28563         fi
28564 fi
28565
28566                 if test $ol_cv_lib_db = no ; then
28567         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-44)" >&5
28568 echo $ECHO_N "checking for Berkeley DB link (-ldb-44)... $ECHO_C" >&6
28569 if test "${ol_cv_db_db_44+set}" = set; then
28570   echo $ECHO_N "(cached) $ECHO_C" >&6
28571 else
28572
28573         ol_DB_LIB=-ldb-44
28574         ol_LIBS=$LIBS
28575         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28576
28577         cat >conftest.$ac_ext <<_ACEOF
28578 /* confdefs.h.  */
28579 _ACEOF
28580 cat confdefs.h >>conftest.$ac_ext
28581 cat >>conftest.$ac_ext <<_ACEOF
28582 /* end confdefs.h.  */
28583
28584 #ifdef HAVE_DB_185_H
28585 # include <db_185.h>
28586 #else
28587 # include <db.h>
28588 #endif
28589
28590 #ifndef DB_VERSION_MAJOR
28591 # define DB_VERSION_MAJOR 1
28592 #endif
28593
28594 #ifndef NULL
28595 #define NULL ((void*)0)
28596 #endif
28597
28598 int
28599 main ()
28600 {
28601
28602 #if DB_VERSION_MAJOR > 1
28603         {
28604                 char *version;
28605                 int major, minor, patch;
28606
28607                 version = db_version( &major, &minor, &patch );
28608
28609                 if( major != DB_VERSION_MAJOR ||
28610                         minor < DB_VERSION_MINOR )
28611                 {
28612                         printf("Berkeley DB version mismatch\n"
28613                                 "\theader: %s\n\tlibrary: %s\n",
28614                                 DB_VERSION_STRING, version);
28615                         return 1;
28616                 }
28617         }
28618 #endif
28619
28620 #if DB_VERSION_MAJOR > 2
28621         db_env_create( NULL, 0 );
28622 #elif DB_VERSION_MAJOR > 1
28623         db_appexit( NULL );
28624 #else
28625         (void) dbopen( NULL, 0, 0, 0, NULL);
28626 #endif
28627
28628   ;
28629   return 0;
28630 }
28631 _ACEOF
28632 rm -f conftest.$ac_objext conftest$ac_exeext
28633 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28634   (eval $ac_link) 2>conftest.er1
28635   ac_status=$?
28636   grep -v '^ *+' conftest.er1 >conftest.err
28637   rm -f conftest.er1
28638   cat conftest.err >&5
28639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28640   (exit $ac_status); } &&
28641          { ac_try='test -z "$ac_c_werror_flag"
28642                          || test ! -s conftest.err'
28643   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28644   (eval $ac_try) 2>&5
28645   ac_status=$?
28646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28647   (exit $ac_status); }; } &&
28648          { ac_try='test -s conftest$ac_exeext'
28649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28650   (eval $ac_try) 2>&5
28651   ac_status=$?
28652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28653   (exit $ac_status); }; }; then
28654   ol_cv_db_db_44=yes
28655 else
28656   echo "$as_me: failed program was:" >&5
28657 sed 's/^/| /' conftest.$ac_ext >&5
28658
28659 ol_cv_db_db_44=no
28660 fi
28661 rm -f conftest.err conftest.$ac_objext \
28662       conftest$ac_exeext conftest.$ac_ext
28663
28664         LIBS="$ol_LIBS"
28665
28666 fi
28667 echo "$as_me:$LINENO: result: $ol_cv_db_db_44" >&5
28668 echo "${ECHO_T}$ol_cv_db_db_44" >&6
28669
28670         if test $ol_cv_db_db_44 = yes ; then
28671                 ol_cv_lib_db=-ldb-44
28672         fi
28673 fi
28674
28675                 if test $ol_cv_lib_db = no ; then
28676         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.4)" >&5
28677 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.4)... $ECHO_C" >&6
28678 if test "${ol_cv_db_db_4_dot_4+set}" = set; then
28679   echo $ECHO_N "(cached) $ECHO_C" >&6
28680 else
28681
28682         ol_DB_LIB=-ldb-4.4
28683         ol_LIBS=$LIBS
28684         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28685
28686         cat >conftest.$ac_ext <<_ACEOF
28687 /* confdefs.h.  */
28688 _ACEOF
28689 cat confdefs.h >>conftest.$ac_ext
28690 cat >>conftest.$ac_ext <<_ACEOF
28691 /* end confdefs.h.  */
28692
28693 #ifdef HAVE_DB_185_H
28694 # include <db_185.h>
28695 #else
28696 # include <db.h>
28697 #endif
28698
28699 #ifndef DB_VERSION_MAJOR
28700 # define DB_VERSION_MAJOR 1
28701 #endif
28702
28703 #ifndef NULL
28704 #define NULL ((void*)0)
28705 #endif
28706
28707 int
28708 main ()
28709 {
28710
28711 #if DB_VERSION_MAJOR > 1
28712         {
28713                 char *version;
28714                 int major, minor, patch;
28715
28716                 version = db_version( &major, &minor, &patch );
28717
28718                 if( major != DB_VERSION_MAJOR ||
28719                         minor < DB_VERSION_MINOR )
28720                 {
28721                         printf("Berkeley DB version mismatch\n"
28722                                 "\theader: %s\n\tlibrary: %s\n",
28723                                 DB_VERSION_STRING, version);
28724                         return 1;
28725                 }
28726         }
28727 #endif
28728
28729 #if DB_VERSION_MAJOR > 2
28730         db_env_create( NULL, 0 );
28731 #elif DB_VERSION_MAJOR > 1
28732         db_appexit( NULL );
28733 #else
28734         (void) dbopen( NULL, 0, 0, 0, NULL);
28735 #endif
28736
28737   ;
28738   return 0;
28739 }
28740 _ACEOF
28741 rm -f conftest.$ac_objext conftest$ac_exeext
28742 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28743   (eval $ac_link) 2>conftest.er1
28744   ac_status=$?
28745   grep -v '^ *+' conftest.er1 >conftest.err
28746   rm -f conftest.er1
28747   cat conftest.err >&5
28748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28749   (exit $ac_status); } &&
28750          { ac_try='test -z "$ac_c_werror_flag"
28751                          || test ! -s conftest.err'
28752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28753   (eval $ac_try) 2>&5
28754   ac_status=$?
28755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28756   (exit $ac_status); }; } &&
28757          { ac_try='test -s conftest$ac_exeext'
28758   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28759   (eval $ac_try) 2>&5
28760   ac_status=$?
28761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28762   (exit $ac_status); }; }; then
28763   ol_cv_db_db_4_dot_4=yes
28764 else
28765   echo "$as_me: failed program was:" >&5
28766 sed 's/^/| /' conftest.$ac_ext >&5
28767
28768 ol_cv_db_db_4_dot_4=no
28769 fi
28770 rm -f conftest.err conftest.$ac_objext \
28771       conftest$ac_exeext conftest.$ac_ext
28772
28773         LIBS="$ol_LIBS"
28774
28775 fi
28776 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_4" >&5
28777 echo "${ECHO_T}$ol_cv_db_db_4_dot_4" >&6
28778
28779         if test $ol_cv_db_db_4_dot_4 = yes ; then
28780                 ol_cv_lib_db=-ldb-4.4
28781         fi
28782 fi
28783
28784                 if test $ol_cv_lib_db = no ; then
28785         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-4)" >&5
28786 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-4)... $ECHO_C" >&6
28787 if test "${ol_cv_db_db_4_4+set}" = set; then
28788   echo $ECHO_N "(cached) $ECHO_C" >&6
28789 else
28790
28791         ol_DB_LIB=-ldb-4-4
28792         ol_LIBS=$LIBS
28793         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28794
28795         cat >conftest.$ac_ext <<_ACEOF
28796 /* confdefs.h.  */
28797 _ACEOF
28798 cat confdefs.h >>conftest.$ac_ext
28799 cat >>conftest.$ac_ext <<_ACEOF
28800 /* end confdefs.h.  */
28801
28802 #ifdef HAVE_DB_185_H
28803 # include <db_185.h>
28804 #else
28805 # include <db.h>
28806 #endif
28807
28808 #ifndef DB_VERSION_MAJOR
28809 # define DB_VERSION_MAJOR 1
28810 #endif
28811
28812 #ifndef NULL
28813 #define NULL ((void*)0)
28814 #endif
28815
28816 int
28817 main ()
28818 {
28819
28820 #if DB_VERSION_MAJOR > 1
28821         {
28822                 char *version;
28823                 int major, minor, patch;
28824
28825                 version = db_version( &major, &minor, &patch );
28826
28827                 if( major != DB_VERSION_MAJOR ||
28828                         minor < DB_VERSION_MINOR )
28829                 {
28830                         printf("Berkeley DB version mismatch\n"
28831                                 "\theader: %s\n\tlibrary: %s\n",
28832                                 DB_VERSION_STRING, version);
28833                         return 1;
28834                 }
28835         }
28836 #endif
28837
28838 #if DB_VERSION_MAJOR > 2
28839         db_env_create( NULL, 0 );
28840 #elif DB_VERSION_MAJOR > 1
28841         db_appexit( NULL );
28842 #else
28843         (void) dbopen( NULL, 0, 0, 0, NULL);
28844 #endif
28845
28846   ;
28847   return 0;
28848 }
28849 _ACEOF
28850 rm -f conftest.$ac_objext conftest$ac_exeext
28851 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28852   (eval $ac_link) 2>conftest.er1
28853   ac_status=$?
28854   grep -v '^ *+' conftest.er1 >conftest.err
28855   rm -f conftest.er1
28856   cat conftest.err >&5
28857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28858   (exit $ac_status); } &&
28859          { ac_try='test -z "$ac_c_werror_flag"
28860                          || test ! -s conftest.err'
28861   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28862   (eval $ac_try) 2>&5
28863   ac_status=$?
28864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28865   (exit $ac_status); }; } &&
28866          { ac_try='test -s conftest$ac_exeext'
28867   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28868   (eval $ac_try) 2>&5
28869   ac_status=$?
28870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28871   (exit $ac_status); }; }; then
28872   ol_cv_db_db_4_4=yes
28873 else
28874   echo "$as_me: failed program was:" >&5
28875 sed 's/^/| /' conftest.$ac_ext >&5
28876
28877 ol_cv_db_db_4_4=no
28878 fi
28879 rm -f conftest.err conftest.$ac_objext \
28880       conftest$ac_exeext conftest.$ac_ext
28881
28882         LIBS="$ol_LIBS"
28883
28884 fi
28885 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_4" >&5
28886 echo "${ECHO_T}$ol_cv_db_db_4_4" >&6
28887
28888         if test $ol_cv_db_db_4_4 = yes ; then
28889                 ol_cv_lib_db=-ldb-4-4
28890         fi
28891 fi
28892
28893         elif test $ol_cv_bdb_minor = 3 ; then
28894                 if test $ol_cv_lib_db = no ; then
28895         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb43)" >&5
28896 echo $ECHO_N "checking for Berkeley DB link (-ldb43)... $ECHO_C" >&6
28897 if test "${ol_cv_db_db43+set}" = set; then
28898   echo $ECHO_N "(cached) $ECHO_C" >&6
28899 else
28900
28901         ol_DB_LIB=-ldb43
28902         ol_LIBS=$LIBS
28903         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28904
28905         cat >conftest.$ac_ext <<_ACEOF
28906 /* confdefs.h.  */
28907 _ACEOF
28908 cat confdefs.h >>conftest.$ac_ext
28909 cat >>conftest.$ac_ext <<_ACEOF
28910 /* end confdefs.h.  */
28911
28912 #ifdef HAVE_DB_185_H
28913 # include <db_185.h>
28914 #else
28915 # include <db.h>
28916 #endif
28917
28918 #ifndef DB_VERSION_MAJOR
28919 # define DB_VERSION_MAJOR 1
28920 #endif
28921
28922 #ifndef NULL
28923 #define NULL ((void*)0)
28924 #endif
28925
28926 int
28927 main ()
28928 {
28929
28930 #if DB_VERSION_MAJOR > 1
28931         {
28932                 char *version;
28933                 int major, minor, patch;
28934
28935                 version = db_version( &major, &minor, &patch );
28936
28937                 if( major != DB_VERSION_MAJOR ||
28938                         minor < DB_VERSION_MINOR )
28939                 {
28940                         printf("Berkeley DB version mismatch\n"
28941                                 "\theader: %s\n\tlibrary: %s\n",
28942                                 DB_VERSION_STRING, version);
28943                         return 1;
28944                 }
28945         }
28946 #endif
28947
28948 #if DB_VERSION_MAJOR > 2
28949         db_env_create( NULL, 0 );
28950 #elif DB_VERSION_MAJOR > 1
28951         db_appexit( NULL );
28952 #else
28953         (void) dbopen( NULL, 0, 0, 0, NULL);
28954 #endif
28955
28956   ;
28957   return 0;
28958 }
28959 _ACEOF
28960 rm -f conftest.$ac_objext conftest$ac_exeext
28961 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28962   (eval $ac_link) 2>conftest.er1
28963   ac_status=$?
28964   grep -v '^ *+' conftest.er1 >conftest.err
28965   rm -f conftest.er1
28966   cat conftest.err >&5
28967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28968   (exit $ac_status); } &&
28969          { ac_try='test -z "$ac_c_werror_flag"
28970                          || test ! -s conftest.err'
28971   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28972   (eval $ac_try) 2>&5
28973   ac_status=$?
28974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28975   (exit $ac_status); }; } &&
28976          { ac_try='test -s conftest$ac_exeext'
28977   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28978   (eval $ac_try) 2>&5
28979   ac_status=$?
28980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28981   (exit $ac_status); }; }; then
28982   ol_cv_db_db43=yes
28983 else
28984   echo "$as_me: failed program was:" >&5
28985 sed 's/^/| /' conftest.$ac_ext >&5
28986
28987 ol_cv_db_db43=no
28988 fi
28989 rm -f conftest.err conftest.$ac_objext \
28990       conftest$ac_exeext conftest.$ac_ext
28991
28992         LIBS="$ol_LIBS"
28993
28994 fi
28995 echo "$as_me:$LINENO: result: $ol_cv_db_db43" >&5
28996 echo "${ECHO_T}$ol_cv_db_db43" >&6
28997
28998         if test $ol_cv_db_db43 = yes ; then
28999                 ol_cv_lib_db=-ldb43
29000         fi
29001 fi
29002
29003                 if test $ol_cv_lib_db = no ; then
29004         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-43)" >&5
29005 echo $ECHO_N "checking for Berkeley DB link (-ldb-43)... $ECHO_C" >&6
29006 if test "${ol_cv_db_db_43+set}" = set; then
29007   echo $ECHO_N "(cached) $ECHO_C" >&6
29008 else
29009
29010         ol_DB_LIB=-ldb-43
29011         ol_LIBS=$LIBS
29012         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29013
29014         cat >conftest.$ac_ext <<_ACEOF
29015 /* confdefs.h.  */
29016 _ACEOF
29017 cat confdefs.h >>conftest.$ac_ext
29018 cat >>conftest.$ac_ext <<_ACEOF
29019 /* end confdefs.h.  */
29020
29021 #ifdef HAVE_DB_185_H
29022 # include <db_185.h>
29023 #else
29024 # include <db.h>
29025 #endif
29026
29027 #ifndef DB_VERSION_MAJOR
29028 # define DB_VERSION_MAJOR 1
29029 #endif
29030
29031 #ifndef NULL
29032 #define NULL ((void*)0)
29033 #endif
29034
29035 int
29036 main ()
29037 {
29038
29039 #if DB_VERSION_MAJOR > 1
29040         {
29041                 char *version;
29042                 int major, minor, patch;
29043
29044                 version = db_version( &major, &minor, &patch );
29045
29046                 if( major != DB_VERSION_MAJOR ||
29047                         minor < DB_VERSION_MINOR )
29048                 {
29049                         printf("Berkeley DB version mismatch\n"
29050                                 "\theader: %s\n\tlibrary: %s\n",
29051                                 DB_VERSION_STRING, version);
29052                         return 1;
29053                 }
29054         }
29055 #endif
29056
29057 #if DB_VERSION_MAJOR > 2
29058         db_env_create( NULL, 0 );
29059 #elif DB_VERSION_MAJOR > 1
29060         db_appexit( NULL );
29061 #else
29062         (void) dbopen( NULL, 0, 0, 0, NULL);
29063 #endif
29064
29065   ;
29066   return 0;
29067 }
29068 _ACEOF
29069 rm -f conftest.$ac_objext conftest$ac_exeext
29070 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29071   (eval $ac_link) 2>conftest.er1
29072   ac_status=$?
29073   grep -v '^ *+' conftest.er1 >conftest.err
29074   rm -f conftest.er1
29075   cat conftest.err >&5
29076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29077   (exit $ac_status); } &&
29078          { ac_try='test -z "$ac_c_werror_flag"
29079                          || test ! -s conftest.err'
29080   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29081   (eval $ac_try) 2>&5
29082   ac_status=$?
29083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29084   (exit $ac_status); }; } &&
29085          { ac_try='test -s conftest$ac_exeext'
29086   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29087   (eval $ac_try) 2>&5
29088   ac_status=$?
29089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29090   (exit $ac_status); }; }; then
29091   ol_cv_db_db_43=yes
29092 else
29093   echo "$as_me: failed program was:" >&5
29094 sed 's/^/| /' conftest.$ac_ext >&5
29095
29096 ol_cv_db_db_43=no
29097 fi
29098 rm -f conftest.err conftest.$ac_objext \
29099       conftest$ac_exeext conftest.$ac_ext
29100
29101         LIBS="$ol_LIBS"
29102
29103 fi
29104 echo "$as_me:$LINENO: result: $ol_cv_db_db_43" >&5
29105 echo "${ECHO_T}$ol_cv_db_db_43" >&6
29106
29107         if test $ol_cv_db_db_43 = yes ; then
29108                 ol_cv_lib_db=-ldb-43
29109         fi
29110 fi
29111
29112                 if test $ol_cv_lib_db = no ; then
29113         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.3)" >&5
29114 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.3)... $ECHO_C" >&6
29115 if test "${ol_cv_db_db_4_dot_3+set}" = set; then
29116   echo $ECHO_N "(cached) $ECHO_C" >&6
29117 else
29118
29119         ol_DB_LIB=-ldb-4.3
29120         ol_LIBS=$LIBS
29121         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29122
29123         cat >conftest.$ac_ext <<_ACEOF
29124 /* confdefs.h.  */
29125 _ACEOF
29126 cat confdefs.h >>conftest.$ac_ext
29127 cat >>conftest.$ac_ext <<_ACEOF
29128 /* end confdefs.h.  */
29129
29130 #ifdef HAVE_DB_185_H
29131 # include <db_185.h>
29132 #else
29133 # include <db.h>
29134 #endif
29135
29136 #ifndef DB_VERSION_MAJOR
29137 # define DB_VERSION_MAJOR 1
29138 #endif
29139
29140 #ifndef NULL
29141 #define NULL ((void*)0)
29142 #endif
29143
29144 int
29145 main ()
29146 {
29147
29148 #if DB_VERSION_MAJOR > 1
29149         {
29150                 char *version;
29151                 int major, minor, patch;
29152
29153                 version = db_version( &major, &minor, &patch );
29154
29155                 if( major != DB_VERSION_MAJOR ||
29156                         minor < DB_VERSION_MINOR )
29157                 {
29158                         printf("Berkeley DB version mismatch\n"
29159                                 "\theader: %s\n\tlibrary: %s\n",
29160                                 DB_VERSION_STRING, version);
29161                         return 1;
29162                 }
29163         }
29164 #endif
29165
29166 #if DB_VERSION_MAJOR > 2
29167         db_env_create( NULL, 0 );
29168 #elif DB_VERSION_MAJOR > 1
29169         db_appexit( NULL );
29170 #else
29171         (void) dbopen( NULL, 0, 0, 0, NULL);
29172 #endif
29173
29174   ;
29175   return 0;
29176 }
29177 _ACEOF
29178 rm -f conftest.$ac_objext conftest$ac_exeext
29179 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29180   (eval $ac_link) 2>conftest.er1
29181   ac_status=$?
29182   grep -v '^ *+' conftest.er1 >conftest.err
29183   rm -f conftest.er1
29184   cat conftest.err >&5
29185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29186   (exit $ac_status); } &&
29187          { ac_try='test -z "$ac_c_werror_flag"
29188                          || test ! -s conftest.err'
29189   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29190   (eval $ac_try) 2>&5
29191   ac_status=$?
29192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29193   (exit $ac_status); }; } &&
29194          { ac_try='test -s conftest$ac_exeext'
29195   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29196   (eval $ac_try) 2>&5
29197   ac_status=$?
29198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29199   (exit $ac_status); }; }; then
29200   ol_cv_db_db_4_dot_3=yes
29201 else
29202   echo "$as_me: failed program was:" >&5
29203 sed 's/^/| /' conftest.$ac_ext >&5
29204
29205 ol_cv_db_db_4_dot_3=no
29206 fi
29207 rm -f conftest.err conftest.$ac_objext \
29208       conftest$ac_exeext conftest.$ac_ext
29209
29210         LIBS="$ol_LIBS"
29211
29212 fi
29213 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_3" >&5
29214 echo "${ECHO_T}$ol_cv_db_db_4_dot_3" >&6
29215
29216         if test $ol_cv_db_db_4_dot_3 = yes ; then
29217                 ol_cv_lib_db=-ldb-4.3
29218         fi
29219 fi
29220
29221                 if test $ol_cv_lib_db = no ; then
29222         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-3)" >&5
29223 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-3)... $ECHO_C" >&6
29224 if test "${ol_cv_db_db_4_3+set}" = set; then
29225   echo $ECHO_N "(cached) $ECHO_C" >&6
29226 else
29227
29228         ol_DB_LIB=-ldb-4-3
29229         ol_LIBS=$LIBS
29230         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29231
29232         cat >conftest.$ac_ext <<_ACEOF
29233 /* confdefs.h.  */
29234 _ACEOF
29235 cat confdefs.h >>conftest.$ac_ext
29236 cat >>conftest.$ac_ext <<_ACEOF
29237 /* end confdefs.h.  */
29238
29239 #ifdef HAVE_DB_185_H
29240 # include <db_185.h>
29241 #else
29242 # include <db.h>
29243 #endif
29244
29245 #ifndef DB_VERSION_MAJOR
29246 # define DB_VERSION_MAJOR 1
29247 #endif
29248
29249 #ifndef NULL
29250 #define NULL ((void*)0)
29251 #endif
29252
29253 int
29254 main ()
29255 {
29256
29257 #if DB_VERSION_MAJOR > 1
29258         {
29259                 char *version;
29260                 int major, minor, patch;
29261
29262                 version = db_version( &major, &minor, &patch );
29263
29264                 if( major != DB_VERSION_MAJOR ||
29265                         minor < DB_VERSION_MINOR )
29266                 {
29267                         printf("Berkeley DB version mismatch\n"
29268                                 "\theader: %s\n\tlibrary: %s\n",
29269                                 DB_VERSION_STRING, version);
29270                         return 1;
29271                 }
29272         }
29273 #endif
29274
29275 #if DB_VERSION_MAJOR > 2
29276         db_env_create( NULL, 0 );
29277 #elif DB_VERSION_MAJOR > 1
29278         db_appexit( NULL );
29279 #else
29280         (void) dbopen( NULL, 0, 0, 0, NULL);
29281 #endif
29282
29283   ;
29284   return 0;
29285 }
29286 _ACEOF
29287 rm -f conftest.$ac_objext conftest$ac_exeext
29288 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29289   (eval $ac_link) 2>conftest.er1
29290   ac_status=$?
29291   grep -v '^ *+' conftest.er1 >conftest.err
29292   rm -f conftest.er1
29293   cat conftest.err >&5
29294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29295   (exit $ac_status); } &&
29296          { ac_try='test -z "$ac_c_werror_flag"
29297                          || test ! -s conftest.err'
29298   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29299   (eval $ac_try) 2>&5
29300   ac_status=$?
29301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29302   (exit $ac_status); }; } &&
29303          { ac_try='test -s conftest$ac_exeext'
29304   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29305   (eval $ac_try) 2>&5
29306   ac_status=$?
29307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29308   (exit $ac_status); }; }; then
29309   ol_cv_db_db_4_3=yes
29310 else
29311   echo "$as_me: failed program was:" >&5
29312 sed 's/^/| /' conftest.$ac_ext >&5
29313
29314 ol_cv_db_db_4_3=no
29315 fi
29316 rm -f conftest.err conftest.$ac_objext \
29317       conftest$ac_exeext conftest.$ac_ext
29318
29319         LIBS="$ol_LIBS"
29320
29321 fi
29322 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_3" >&5
29323 echo "${ECHO_T}$ol_cv_db_db_4_3" >&6
29324
29325         if test $ol_cv_db_db_4_3 = yes ; then
29326                 ol_cv_lib_db=-ldb-4-3
29327         fi
29328 fi
29329
29330         elif test $ol_cv_bdb_minor = 2 ; then
29331                 if test $ol_cv_lib_db = no ; then
29332         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb42)" >&5
29333 echo $ECHO_N "checking for Berkeley DB link (-ldb42)... $ECHO_C" >&6
29334 if test "${ol_cv_db_db42+set}" = set; then
29335   echo $ECHO_N "(cached) $ECHO_C" >&6
29336 else
29337
29338         ol_DB_LIB=-ldb42
29339         ol_LIBS=$LIBS
29340         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29341
29342         cat >conftest.$ac_ext <<_ACEOF
29343 /* confdefs.h.  */
29344 _ACEOF
29345 cat confdefs.h >>conftest.$ac_ext
29346 cat >>conftest.$ac_ext <<_ACEOF
29347 /* end confdefs.h.  */
29348
29349 #ifdef HAVE_DB_185_H
29350 # include <db_185.h>
29351 #else
29352 # include <db.h>
29353 #endif
29354
29355 #ifndef DB_VERSION_MAJOR
29356 # define DB_VERSION_MAJOR 1
29357 #endif
29358
29359 #ifndef NULL
29360 #define NULL ((void*)0)
29361 #endif
29362
29363 int
29364 main ()
29365 {
29366
29367 #if DB_VERSION_MAJOR > 1
29368         {
29369                 char *version;
29370                 int major, minor, patch;
29371
29372                 version = db_version( &major, &minor, &patch );
29373
29374                 if( major != DB_VERSION_MAJOR ||
29375                         minor < DB_VERSION_MINOR )
29376                 {
29377                         printf("Berkeley DB version mismatch\n"
29378                                 "\theader: %s\n\tlibrary: %s\n",
29379                                 DB_VERSION_STRING, version);
29380                         return 1;
29381                 }
29382         }
29383 #endif
29384
29385 #if DB_VERSION_MAJOR > 2
29386         db_env_create( NULL, 0 );
29387 #elif DB_VERSION_MAJOR > 1
29388         db_appexit( NULL );
29389 #else
29390         (void) dbopen( NULL, 0, 0, 0, NULL);
29391 #endif
29392
29393   ;
29394   return 0;
29395 }
29396 _ACEOF
29397 rm -f conftest.$ac_objext conftest$ac_exeext
29398 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29399   (eval $ac_link) 2>conftest.er1
29400   ac_status=$?
29401   grep -v '^ *+' conftest.er1 >conftest.err
29402   rm -f conftest.er1
29403   cat conftest.err >&5
29404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29405   (exit $ac_status); } &&
29406          { ac_try='test -z "$ac_c_werror_flag"
29407                          || test ! -s conftest.err'
29408   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29409   (eval $ac_try) 2>&5
29410   ac_status=$?
29411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29412   (exit $ac_status); }; } &&
29413          { ac_try='test -s conftest$ac_exeext'
29414   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29415   (eval $ac_try) 2>&5
29416   ac_status=$?
29417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29418   (exit $ac_status); }; }; then
29419   ol_cv_db_db42=yes
29420 else
29421   echo "$as_me: failed program was:" >&5
29422 sed 's/^/| /' conftest.$ac_ext >&5
29423
29424 ol_cv_db_db42=no
29425 fi
29426 rm -f conftest.err conftest.$ac_objext \
29427       conftest$ac_exeext conftest.$ac_ext
29428
29429         LIBS="$ol_LIBS"
29430
29431 fi
29432 echo "$as_me:$LINENO: result: $ol_cv_db_db42" >&5
29433 echo "${ECHO_T}$ol_cv_db_db42" >&6
29434
29435         if test $ol_cv_db_db42 = yes ; then
29436                 ol_cv_lib_db=-ldb42
29437         fi
29438 fi
29439
29440                 if test $ol_cv_lib_db = no ; then
29441         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-42)" >&5
29442 echo $ECHO_N "checking for Berkeley DB link (-ldb-42)... $ECHO_C" >&6
29443 if test "${ol_cv_db_db_42+set}" = set; then
29444   echo $ECHO_N "(cached) $ECHO_C" >&6
29445 else
29446
29447         ol_DB_LIB=-ldb-42
29448         ol_LIBS=$LIBS
29449         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29450
29451         cat >conftest.$ac_ext <<_ACEOF
29452 /* confdefs.h.  */
29453 _ACEOF
29454 cat confdefs.h >>conftest.$ac_ext
29455 cat >>conftest.$ac_ext <<_ACEOF
29456 /* end confdefs.h.  */
29457
29458 #ifdef HAVE_DB_185_H
29459 # include <db_185.h>
29460 #else
29461 # include <db.h>
29462 #endif
29463
29464 #ifndef DB_VERSION_MAJOR
29465 # define DB_VERSION_MAJOR 1
29466 #endif
29467
29468 #ifndef NULL
29469 #define NULL ((void*)0)
29470 #endif
29471
29472 int
29473 main ()
29474 {
29475
29476 #if DB_VERSION_MAJOR > 1
29477         {
29478                 char *version;
29479                 int major, minor, patch;
29480
29481                 version = db_version( &major, &minor, &patch );
29482
29483                 if( major != DB_VERSION_MAJOR ||
29484                         minor < DB_VERSION_MINOR )
29485                 {
29486                         printf("Berkeley DB version mismatch\n"
29487                                 "\theader: %s\n\tlibrary: %s\n",
29488                                 DB_VERSION_STRING, version);
29489                         return 1;
29490                 }
29491         }
29492 #endif
29493
29494 #if DB_VERSION_MAJOR > 2
29495         db_env_create( NULL, 0 );
29496 #elif DB_VERSION_MAJOR > 1
29497         db_appexit( NULL );
29498 #else
29499         (void) dbopen( NULL, 0, 0, 0, NULL);
29500 #endif
29501
29502   ;
29503   return 0;
29504 }
29505 _ACEOF
29506 rm -f conftest.$ac_objext conftest$ac_exeext
29507 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29508   (eval $ac_link) 2>conftest.er1
29509   ac_status=$?
29510   grep -v '^ *+' conftest.er1 >conftest.err
29511   rm -f conftest.er1
29512   cat conftest.err >&5
29513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29514   (exit $ac_status); } &&
29515          { ac_try='test -z "$ac_c_werror_flag"
29516                          || test ! -s conftest.err'
29517   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29518   (eval $ac_try) 2>&5
29519   ac_status=$?
29520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29521   (exit $ac_status); }; } &&
29522          { ac_try='test -s conftest$ac_exeext'
29523   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29524   (eval $ac_try) 2>&5
29525   ac_status=$?
29526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29527   (exit $ac_status); }; }; then
29528   ol_cv_db_db_42=yes
29529 else
29530   echo "$as_me: failed program was:" >&5
29531 sed 's/^/| /' conftest.$ac_ext >&5
29532
29533 ol_cv_db_db_42=no
29534 fi
29535 rm -f conftest.err conftest.$ac_objext \
29536       conftest$ac_exeext conftest.$ac_ext
29537
29538         LIBS="$ol_LIBS"
29539
29540 fi
29541 echo "$as_me:$LINENO: result: $ol_cv_db_db_42" >&5
29542 echo "${ECHO_T}$ol_cv_db_db_42" >&6
29543
29544         if test $ol_cv_db_db_42 = yes ; then
29545                 ol_cv_lib_db=-ldb-42
29546         fi
29547 fi
29548
29549                 if test $ol_cv_lib_db = no ; then
29550         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.2)" >&5
29551 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.2)... $ECHO_C" >&6
29552 if test "${ol_cv_db_db_4_dot_2+set}" = set; then
29553   echo $ECHO_N "(cached) $ECHO_C" >&6
29554 else
29555
29556         ol_DB_LIB=-ldb-4.2
29557         ol_LIBS=$LIBS
29558         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29559
29560         cat >conftest.$ac_ext <<_ACEOF
29561 /* confdefs.h.  */
29562 _ACEOF
29563 cat confdefs.h >>conftest.$ac_ext
29564 cat >>conftest.$ac_ext <<_ACEOF
29565 /* end confdefs.h.  */
29566
29567 #ifdef HAVE_DB_185_H
29568 # include <db_185.h>
29569 #else
29570 # include <db.h>
29571 #endif
29572
29573 #ifndef DB_VERSION_MAJOR
29574 # define DB_VERSION_MAJOR 1
29575 #endif
29576
29577 #ifndef NULL
29578 #define NULL ((void*)0)
29579 #endif
29580
29581 int
29582 main ()
29583 {
29584
29585 #if DB_VERSION_MAJOR > 1
29586         {
29587                 char *version;
29588                 int major, minor, patch;
29589
29590                 version = db_version( &major, &minor, &patch );
29591
29592                 if( major != DB_VERSION_MAJOR ||
29593                         minor < DB_VERSION_MINOR )
29594                 {
29595                         printf("Berkeley DB version mismatch\n"
29596                                 "\theader: %s\n\tlibrary: %s\n",
29597                                 DB_VERSION_STRING, version);
29598                         return 1;
29599                 }
29600         }
29601 #endif
29602
29603 #if DB_VERSION_MAJOR > 2
29604         db_env_create( NULL, 0 );
29605 #elif DB_VERSION_MAJOR > 1
29606         db_appexit( NULL );
29607 #else
29608         (void) dbopen( NULL, 0, 0, 0, NULL);
29609 #endif
29610
29611   ;
29612   return 0;
29613 }
29614 _ACEOF
29615 rm -f conftest.$ac_objext conftest$ac_exeext
29616 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29617   (eval $ac_link) 2>conftest.er1
29618   ac_status=$?
29619   grep -v '^ *+' conftest.er1 >conftest.err
29620   rm -f conftest.er1
29621   cat conftest.err >&5
29622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29623   (exit $ac_status); } &&
29624          { ac_try='test -z "$ac_c_werror_flag"
29625                          || test ! -s conftest.err'
29626   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29627   (eval $ac_try) 2>&5
29628   ac_status=$?
29629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29630   (exit $ac_status); }; } &&
29631          { ac_try='test -s conftest$ac_exeext'
29632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29633   (eval $ac_try) 2>&5
29634   ac_status=$?
29635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29636   (exit $ac_status); }; }; then
29637   ol_cv_db_db_4_dot_2=yes
29638 else
29639   echo "$as_me: failed program was:" >&5
29640 sed 's/^/| /' conftest.$ac_ext >&5
29641
29642 ol_cv_db_db_4_dot_2=no
29643 fi
29644 rm -f conftest.err conftest.$ac_objext \
29645       conftest$ac_exeext conftest.$ac_ext
29646
29647         LIBS="$ol_LIBS"
29648
29649 fi
29650 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_2" >&5
29651 echo "${ECHO_T}$ol_cv_db_db_4_dot_2" >&6
29652
29653         if test $ol_cv_db_db_4_dot_2 = yes ; then
29654                 ol_cv_lib_db=-ldb-4.2
29655         fi
29656 fi
29657
29658                 if test $ol_cv_lib_db = no ; then
29659         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-2)" >&5
29660 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-2)... $ECHO_C" >&6
29661 if test "${ol_cv_db_db_4_2+set}" = set; then
29662   echo $ECHO_N "(cached) $ECHO_C" >&6
29663 else
29664
29665         ol_DB_LIB=-ldb-4-2
29666         ol_LIBS=$LIBS
29667         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29668
29669         cat >conftest.$ac_ext <<_ACEOF
29670 /* confdefs.h.  */
29671 _ACEOF
29672 cat confdefs.h >>conftest.$ac_ext
29673 cat >>conftest.$ac_ext <<_ACEOF
29674 /* end confdefs.h.  */
29675
29676 #ifdef HAVE_DB_185_H
29677 # include <db_185.h>
29678 #else
29679 # include <db.h>
29680 #endif
29681
29682 #ifndef DB_VERSION_MAJOR
29683 # define DB_VERSION_MAJOR 1
29684 #endif
29685
29686 #ifndef NULL
29687 #define NULL ((void*)0)
29688 #endif
29689
29690 int
29691 main ()
29692 {
29693
29694 #if DB_VERSION_MAJOR > 1
29695         {
29696                 char *version;
29697                 int major, minor, patch;
29698
29699                 version = db_version( &major, &minor, &patch );
29700
29701                 if( major != DB_VERSION_MAJOR ||
29702                         minor < DB_VERSION_MINOR )
29703                 {
29704                         printf("Berkeley DB version mismatch\n"
29705                                 "\theader: %s\n\tlibrary: %s\n",
29706                                 DB_VERSION_STRING, version);
29707                         return 1;
29708                 }
29709         }
29710 #endif
29711
29712 #if DB_VERSION_MAJOR > 2
29713         db_env_create( NULL, 0 );
29714 #elif DB_VERSION_MAJOR > 1
29715         db_appexit( NULL );
29716 #else
29717         (void) dbopen( NULL, 0, 0, 0, NULL);
29718 #endif
29719
29720   ;
29721   return 0;
29722 }
29723 _ACEOF
29724 rm -f conftest.$ac_objext conftest$ac_exeext
29725 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29726   (eval $ac_link) 2>conftest.er1
29727   ac_status=$?
29728   grep -v '^ *+' conftest.er1 >conftest.err
29729   rm -f conftest.er1
29730   cat conftest.err >&5
29731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29732   (exit $ac_status); } &&
29733          { ac_try='test -z "$ac_c_werror_flag"
29734                          || test ! -s conftest.err'
29735   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29736   (eval $ac_try) 2>&5
29737   ac_status=$?
29738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29739   (exit $ac_status); }; } &&
29740          { ac_try='test -s conftest$ac_exeext'
29741   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29742   (eval $ac_try) 2>&5
29743   ac_status=$?
29744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29745   (exit $ac_status); }; }; then
29746   ol_cv_db_db_4_2=yes
29747 else
29748   echo "$as_me: failed program was:" >&5
29749 sed 's/^/| /' conftest.$ac_ext >&5
29750
29751 ol_cv_db_db_4_2=no
29752 fi
29753 rm -f conftest.err conftest.$ac_objext \
29754       conftest$ac_exeext conftest.$ac_ext
29755
29756         LIBS="$ol_LIBS"
29757
29758 fi
29759 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_2" >&5
29760 echo "${ECHO_T}$ol_cv_db_db_4_2" >&6
29761
29762         if test $ol_cv_db_db_4_2 = yes ; then
29763                 ol_cv_lib_db=-ldb-4-2
29764         fi
29765 fi
29766
29767         elif test $ol_cv_bdb_minor = 1 ; then
29768                 if test $ol_cv_lib_db = no ; then
29769         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb41)" >&5
29770 echo $ECHO_N "checking for Berkeley DB link (-ldb41)... $ECHO_C" >&6
29771 if test "${ol_cv_db_db41+set}" = set; then
29772   echo $ECHO_N "(cached) $ECHO_C" >&6
29773 else
29774
29775         ol_DB_LIB=-ldb41
29776         ol_LIBS=$LIBS
29777         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29778
29779         cat >conftest.$ac_ext <<_ACEOF
29780 /* confdefs.h.  */
29781 _ACEOF
29782 cat confdefs.h >>conftest.$ac_ext
29783 cat >>conftest.$ac_ext <<_ACEOF
29784 /* end confdefs.h.  */
29785
29786 #ifdef HAVE_DB_185_H
29787 # include <db_185.h>
29788 #else
29789 # include <db.h>
29790 #endif
29791
29792 #ifndef DB_VERSION_MAJOR
29793 # define DB_VERSION_MAJOR 1
29794 #endif
29795
29796 #ifndef NULL
29797 #define NULL ((void*)0)
29798 #endif
29799
29800 int
29801 main ()
29802 {
29803
29804 #if DB_VERSION_MAJOR > 1
29805         {
29806                 char *version;
29807                 int major, minor, patch;
29808
29809                 version = db_version( &major, &minor, &patch );
29810
29811                 if( major != DB_VERSION_MAJOR ||
29812                         minor < DB_VERSION_MINOR )
29813                 {
29814                         printf("Berkeley DB version mismatch\n"
29815                                 "\theader: %s\n\tlibrary: %s\n",
29816                                 DB_VERSION_STRING, version);
29817                         return 1;
29818                 }
29819         }
29820 #endif
29821
29822 #if DB_VERSION_MAJOR > 2
29823         db_env_create( NULL, 0 );
29824 #elif DB_VERSION_MAJOR > 1
29825         db_appexit( NULL );
29826 #else
29827         (void) dbopen( NULL, 0, 0, 0, NULL);
29828 #endif
29829
29830   ;
29831   return 0;
29832 }
29833 _ACEOF
29834 rm -f conftest.$ac_objext conftest$ac_exeext
29835 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29836   (eval $ac_link) 2>conftest.er1
29837   ac_status=$?
29838   grep -v '^ *+' conftest.er1 >conftest.err
29839   rm -f conftest.er1
29840   cat conftest.err >&5
29841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29842   (exit $ac_status); } &&
29843          { ac_try='test -z "$ac_c_werror_flag"
29844                          || test ! -s conftest.err'
29845   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29846   (eval $ac_try) 2>&5
29847   ac_status=$?
29848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29849   (exit $ac_status); }; } &&
29850          { ac_try='test -s conftest$ac_exeext'
29851   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29852   (eval $ac_try) 2>&5
29853   ac_status=$?
29854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29855   (exit $ac_status); }; }; then
29856   ol_cv_db_db41=yes
29857 else
29858   echo "$as_me: failed program was:" >&5
29859 sed 's/^/| /' conftest.$ac_ext >&5
29860
29861 ol_cv_db_db41=no
29862 fi
29863 rm -f conftest.err conftest.$ac_objext \
29864       conftest$ac_exeext conftest.$ac_ext
29865
29866         LIBS="$ol_LIBS"
29867
29868 fi
29869 echo "$as_me:$LINENO: result: $ol_cv_db_db41" >&5
29870 echo "${ECHO_T}$ol_cv_db_db41" >&6
29871
29872         if test $ol_cv_db_db41 = yes ; then
29873                 ol_cv_lib_db=-ldb41
29874         fi
29875 fi
29876
29877                 if test $ol_cv_lib_db = no ; then
29878         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-41)" >&5
29879 echo $ECHO_N "checking for Berkeley DB link (-ldb-41)... $ECHO_C" >&6
29880 if test "${ol_cv_db_db_41+set}" = set; then
29881   echo $ECHO_N "(cached) $ECHO_C" >&6
29882 else
29883
29884         ol_DB_LIB=-ldb-41
29885         ol_LIBS=$LIBS
29886         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29887
29888         cat >conftest.$ac_ext <<_ACEOF
29889 /* confdefs.h.  */
29890 _ACEOF
29891 cat confdefs.h >>conftest.$ac_ext
29892 cat >>conftest.$ac_ext <<_ACEOF
29893 /* end confdefs.h.  */
29894
29895 #ifdef HAVE_DB_185_H
29896 # include <db_185.h>
29897 #else
29898 # include <db.h>
29899 #endif
29900
29901 #ifndef DB_VERSION_MAJOR
29902 # define DB_VERSION_MAJOR 1
29903 #endif
29904
29905 #ifndef NULL
29906 #define NULL ((void*)0)
29907 #endif
29908
29909 int
29910 main ()
29911 {
29912
29913 #if DB_VERSION_MAJOR > 1
29914         {
29915                 char *version;
29916                 int major, minor, patch;
29917
29918                 version = db_version( &major, &minor, &patch );
29919
29920                 if( major != DB_VERSION_MAJOR ||
29921                         minor < DB_VERSION_MINOR )
29922                 {
29923                         printf("Berkeley DB version mismatch\n"
29924                                 "\theader: %s\n\tlibrary: %s\n",
29925                                 DB_VERSION_STRING, version);
29926                         return 1;
29927                 }
29928         }
29929 #endif
29930
29931 #if DB_VERSION_MAJOR > 2
29932         db_env_create( NULL, 0 );
29933 #elif DB_VERSION_MAJOR > 1
29934         db_appexit( NULL );
29935 #else
29936         (void) dbopen( NULL, 0, 0, 0, NULL);
29937 #endif
29938
29939   ;
29940   return 0;
29941 }
29942 _ACEOF
29943 rm -f conftest.$ac_objext conftest$ac_exeext
29944 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29945   (eval $ac_link) 2>conftest.er1
29946   ac_status=$?
29947   grep -v '^ *+' conftest.er1 >conftest.err
29948   rm -f conftest.er1
29949   cat conftest.err >&5
29950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29951   (exit $ac_status); } &&
29952          { ac_try='test -z "$ac_c_werror_flag"
29953                          || test ! -s conftest.err'
29954   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29955   (eval $ac_try) 2>&5
29956   ac_status=$?
29957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29958   (exit $ac_status); }; } &&
29959          { ac_try='test -s conftest$ac_exeext'
29960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29961   (eval $ac_try) 2>&5
29962   ac_status=$?
29963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29964   (exit $ac_status); }; }; then
29965   ol_cv_db_db_41=yes
29966 else
29967   echo "$as_me: failed program was:" >&5
29968 sed 's/^/| /' conftest.$ac_ext >&5
29969
29970 ol_cv_db_db_41=no
29971 fi
29972 rm -f conftest.err conftest.$ac_objext \
29973       conftest$ac_exeext conftest.$ac_ext
29974
29975         LIBS="$ol_LIBS"
29976
29977 fi
29978 echo "$as_me:$LINENO: result: $ol_cv_db_db_41" >&5
29979 echo "${ECHO_T}$ol_cv_db_db_41" >&6
29980
29981         if test $ol_cv_db_db_41 = yes ; then
29982                 ol_cv_lib_db=-ldb-41
29983         fi
29984 fi
29985
29986                 if test $ol_cv_lib_db = no ; then
29987         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.1)" >&5
29988 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.1)... $ECHO_C" >&6
29989 if test "${ol_cv_db_db_4_dot_1+set}" = set; then
29990   echo $ECHO_N "(cached) $ECHO_C" >&6
29991 else
29992
29993         ol_DB_LIB=-ldb-4.1
29994         ol_LIBS=$LIBS
29995         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29996
29997         cat >conftest.$ac_ext <<_ACEOF
29998 /* confdefs.h.  */
29999 _ACEOF
30000 cat confdefs.h >>conftest.$ac_ext
30001 cat >>conftest.$ac_ext <<_ACEOF
30002 /* end confdefs.h.  */
30003
30004 #ifdef HAVE_DB_185_H
30005 # include <db_185.h>
30006 #else
30007 # include <db.h>
30008 #endif
30009
30010 #ifndef DB_VERSION_MAJOR
30011 # define DB_VERSION_MAJOR 1
30012 #endif
30013
30014 #ifndef NULL
30015 #define NULL ((void*)0)
30016 #endif
30017
30018 int
30019 main ()
30020 {
30021
30022 #if DB_VERSION_MAJOR > 1
30023         {
30024                 char *version;
30025                 int major, minor, patch;
30026
30027                 version = db_version( &major, &minor, &patch );
30028
30029                 if( major != DB_VERSION_MAJOR ||
30030                         minor < DB_VERSION_MINOR )
30031                 {
30032                         printf("Berkeley DB version mismatch\n"
30033                                 "\theader: %s\n\tlibrary: %s\n",
30034                                 DB_VERSION_STRING, version);
30035                         return 1;
30036                 }
30037         }
30038 #endif
30039
30040 #if DB_VERSION_MAJOR > 2
30041         db_env_create( NULL, 0 );
30042 #elif DB_VERSION_MAJOR > 1
30043         db_appexit( NULL );
30044 #else
30045         (void) dbopen( NULL, 0, 0, 0, NULL);
30046 #endif
30047
30048   ;
30049   return 0;
30050 }
30051 _ACEOF
30052 rm -f conftest.$ac_objext conftest$ac_exeext
30053 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30054   (eval $ac_link) 2>conftest.er1
30055   ac_status=$?
30056   grep -v '^ *+' conftest.er1 >conftest.err
30057   rm -f conftest.er1
30058   cat conftest.err >&5
30059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30060   (exit $ac_status); } &&
30061          { ac_try='test -z "$ac_c_werror_flag"
30062                          || test ! -s conftest.err'
30063   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30064   (eval $ac_try) 2>&5
30065   ac_status=$?
30066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30067   (exit $ac_status); }; } &&
30068          { ac_try='test -s conftest$ac_exeext'
30069   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30070   (eval $ac_try) 2>&5
30071   ac_status=$?
30072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30073   (exit $ac_status); }; }; then
30074   ol_cv_db_db_4_dot_1=yes
30075 else
30076   echo "$as_me: failed program was:" >&5
30077 sed 's/^/| /' conftest.$ac_ext >&5
30078
30079 ol_cv_db_db_4_dot_1=no
30080 fi
30081 rm -f conftest.err conftest.$ac_objext \
30082       conftest$ac_exeext conftest.$ac_ext
30083
30084         LIBS="$ol_LIBS"
30085
30086 fi
30087 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_1" >&5
30088 echo "${ECHO_T}$ol_cv_db_db_4_dot_1" >&6
30089
30090         if test $ol_cv_db_db_4_dot_1 = yes ; then
30091                 ol_cv_lib_db=-ldb-4.1
30092         fi
30093 fi
30094
30095                 if test $ol_cv_lib_db = no ; then
30096         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-1)" >&5
30097 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-1)... $ECHO_C" >&6
30098 if test "${ol_cv_db_db_4_1+set}" = set; then
30099   echo $ECHO_N "(cached) $ECHO_C" >&6
30100 else
30101
30102         ol_DB_LIB=-ldb-4-1
30103         ol_LIBS=$LIBS
30104         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30105
30106         cat >conftest.$ac_ext <<_ACEOF
30107 /* confdefs.h.  */
30108 _ACEOF
30109 cat confdefs.h >>conftest.$ac_ext
30110 cat >>conftest.$ac_ext <<_ACEOF
30111 /* end confdefs.h.  */
30112
30113 #ifdef HAVE_DB_185_H
30114 # include <db_185.h>
30115 #else
30116 # include <db.h>
30117 #endif
30118
30119 #ifndef DB_VERSION_MAJOR
30120 # define DB_VERSION_MAJOR 1
30121 #endif
30122
30123 #ifndef NULL
30124 #define NULL ((void*)0)
30125 #endif
30126
30127 int
30128 main ()
30129 {
30130
30131 #if DB_VERSION_MAJOR > 1
30132         {
30133                 char *version;
30134                 int major, minor, patch;
30135
30136                 version = db_version( &major, &minor, &patch );
30137
30138                 if( major != DB_VERSION_MAJOR ||
30139                         minor < DB_VERSION_MINOR )
30140                 {
30141                         printf("Berkeley DB version mismatch\n"
30142                                 "\theader: %s\n\tlibrary: %s\n",
30143                                 DB_VERSION_STRING, version);
30144                         return 1;
30145                 }
30146         }
30147 #endif
30148
30149 #if DB_VERSION_MAJOR > 2
30150         db_env_create( NULL, 0 );
30151 #elif DB_VERSION_MAJOR > 1
30152         db_appexit( NULL );
30153 #else
30154         (void) dbopen( NULL, 0, 0, 0, NULL);
30155 #endif
30156
30157   ;
30158   return 0;
30159 }
30160 _ACEOF
30161 rm -f conftest.$ac_objext conftest$ac_exeext
30162 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30163   (eval $ac_link) 2>conftest.er1
30164   ac_status=$?
30165   grep -v '^ *+' conftest.er1 >conftest.err
30166   rm -f conftest.er1
30167   cat conftest.err >&5
30168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30169   (exit $ac_status); } &&
30170          { ac_try='test -z "$ac_c_werror_flag"
30171                          || test ! -s conftest.err'
30172   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30173   (eval $ac_try) 2>&5
30174   ac_status=$?
30175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30176   (exit $ac_status); }; } &&
30177          { ac_try='test -s conftest$ac_exeext'
30178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30179   (eval $ac_try) 2>&5
30180   ac_status=$?
30181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30182   (exit $ac_status); }; }; then
30183   ol_cv_db_db_4_1=yes
30184 else
30185   echo "$as_me: failed program was:" >&5
30186 sed 's/^/| /' conftest.$ac_ext >&5
30187
30188 ol_cv_db_db_4_1=no
30189 fi
30190 rm -f conftest.err conftest.$ac_objext \
30191       conftest$ac_exeext conftest.$ac_ext
30192
30193         LIBS="$ol_LIBS"
30194
30195 fi
30196 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_1" >&5
30197 echo "${ECHO_T}$ol_cv_db_db_4_1" >&6
30198
30199         if test $ol_cv_db_db_4_1 = yes ; then
30200                 ol_cv_lib_db=-ldb-4-1
30201         fi
30202 fi
30203
30204         fi
30205         if test $ol_cv_lib_db = no ; then
30206         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4)" >&5
30207 echo $ECHO_N "checking for Berkeley DB link (-ldb-4)... $ECHO_C" >&6
30208 if test "${ol_cv_db_db_4+set}" = set; then
30209   echo $ECHO_N "(cached) $ECHO_C" >&6
30210 else
30211
30212         ol_DB_LIB=-ldb-4
30213         ol_LIBS=$LIBS
30214         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30215
30216         cat >conftest.$ac_ext <<_ACEOF
30217 /* confdefs.h.  */
30218 _ACEOF
30219 cat confdefs.h >>conftest.$ac_ext
30220 cat >>conftest.$ac_ext <<_ACEOF
30221 /* end confdefs.h.  */
30222
30223 #ifdef HAVE_DB_185_H
30224 # include <db_185.h>
30225 #else
30226 # include <db.h>
30227 #endif
30228
30229 #ifndef DB_VERSION_MAJOR
30230 # define DB_VERSION_MAJOR 1
30231 #endif
30232
30233 #ifndef NULL
30234 #define NULL ((void*)0)
30235 #endif
30236
30237 int
30238 main ()
30239 {
30240
30241 #if DB_VERSION_MAJOR > 1
30242         {
30243                 char *version;
30244                 int major, minor, patch;
30245
30246                 version = db_version( &major, &minor, &patch );
30247
30248                 if( major != DB_VERSION_MAJOR ||
30249                         minor < DB_VERSION_MINOR )
30250                 {
30251                         printf("Berkeley DB version mismatch\n"
30252                                 "\theader: %s\n\tlibrary: %s\n",
30253                                 DB_VERSION_STRING, version);
30254                         return 1;
30255                 }
30256         }
30257 #endif
30258
30259 #if DB_VERSION_MAJOR > 2
30260         db_env_create( NULL, 0 );
30261 #elif DB_VERSION_MAJOR > 1
30262         db_appexit( NULL );
30263 #else
30264         (void) dbopen( NULL, 0, 0, 0, NULL);
30265 #endif
30266
30267   ;
30268   return 0;
30269 }
30270 _ACEOF
30271 rm -f conftest.$ac_objext conftest$ac_exeext
30272 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30273   (eval $ac_link) 2>conftest.er1
30274   ac_status=$?
30275   grep -v '^ *+' conftest.er1 >conftest.err
30276   rm -f conftest.er1
30277   cat conftest.err >&5
30278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30279   (exit $ac_status); } &&
30280          { ac_try='test -z "$ac_c_werror_flag"
30281                          || test ! -s conftest.err'
30282   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30283   (eval $ac_try) 2>&5
30284   ac_status=$?
30285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30286   (exit $ac_status); }; } &&
30287          { ac_try='test -s conftest$ac_exeext'
30288   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30289   (eval $ac_try) 2>&5
30290   ac_status=$?
30291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30292   (exit $ac_status); }; }; then
30293   ol_cv_db_db_4=yes
30294 else
30295   echo "$as_me: failed program was:" >&5
30296 sed 's/^/| /' conftest.$ac_ext >&5
30297
30298 ol_cv_db_db_4=no
30299 fi
30300 rm -f conftest.err conftest.$ac_objext \
30301       conftest$ac_exeext conftest.$ac_ext
30302
30303         LIBS="$ol_LIBS"
30304
30305 fi
30306 echo "$as_me:$LINENO: result: $ol_cv_db_db_4" >&5
30307 echo "${ECHO_T}$ol_cv_db_db_4" >&6
30308
30309         if test $ol_cv_db_db_4 = yes ; then
30310                 ol_cv_lib_db=-ldb-4
30311         fi
30312 fi
30313
30314         if test $ol_cv_lib_db = no ; then
30315         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb4)" >&5
30316 echo $ECHO_N "checking for Berkeley DB link (-ldb4)... $ECHO_C" >&6
30317 if test "${ol_cv_db_db4+set}" = set; then
30318   echo $ECHO_N "(cached) $ECHO_C" >&6
30319 else
30320
30321         ol_DB_LIB=-ldb4
30322         ol_LIBS=$LIBS
30323         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30324
30325         cat >conftest.$ac_ext <<_ACEOF
30326 /* confdefs.h.  */
30327 _ACEOF
30328 cat confdefs.h >>conftest.$ac_ext
30329 cat >>conftest.$ac_ext <<_ACEOF
30330 /* end confdefs.h.  */
30331
30332 #ifdef HAVE_DB_185_H
30333 # include <db_185.h>
30334 #else
30335 # include <db.h>
30336 #endif
30337
30338 #ifndef DB_VERSION_MAJOR
30339 # define DB_VERSION_MAJOR 1
30340 #endif
30341
30342 #ifndef NULL
30343 #define NULL ((void*)0)
30344 #endif
30345
30346 int
30347 main ()
30348 {
30349
30350 #if DB_VERSION_MAJOR > 1
30351         {
30352                 char *version;
30353                 int major, minor, patch;
30354
30355                 version = db_version( &major, &minor, &patch );
30356
30357                 if( major != DB_VERSION_MAJOR ||
30358                         minor < DB_VERSION_MINOR )
30359                 {
30360                         printf("Berkeley DB version mismatch\n"
30361                                 "\theader: %s\n\tlibrary: %s\n",
30362                                 DB_VERSION_STRING, version);
30363                         return 1;
30364                 }
30365         }
30366 #endif
30367
30368 #if DB_VERSION_MAJOR > 2
30369         db_env_create( NULL, 0 );
30370 #elif DB_VERSION_MAJOR > 1
30371         db_appexit( NULL );
30372 #else
30373         (void) dbopen( NULL, 0, 0, 0, NULL);
30374 #endif
30375
30376   ;
30377   return 0;
30378 }
30379 _ACEOF
30380 rm -f conftest.$ac_objext conftest$ac_exeext
30381 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30382   (eval $ac_link) 2>conftest.er1
30383   ac_status=$?
30384   grep -v '^ *+' conftest.er1 >conftest.err
30385   rm -f conftest.er1
30386   cat conftest.err >&5
30387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30388   (exit $ac_status); } &&
30389          { ac_try='test -z "$ac_c_werror_flag"
30390                          || test ! -s conftest.err'
30391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30392   (eval $ac_try) 2>&5
30393   ac_status=$?
30394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30395   (exit $ac_status); }; } &&
30396          { ac_try='test -s conftest$ac_exeext'
30397   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30398   (eval $ac_try) 2>&5
30399   ac_status=$?
30400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30401   (exit $ac_status); }; }; then
30402   ol_cv_db_db4=yes
30403 else
30404   echo "$as_me: failed program was:" >&5
30405 sed 's/^/| /' conftest.$ac_ext >&5
30406
30407 ol_cv_db_db4=no
30408 fi
30409 rm -f conftest.err conftest.$ac_objext \
30410       conftest$ac_exeext conftest.$ac_ext
30411
30412         LIBS="$ol_LIBS"
30413
30414 fi
30415 echo "$as_me:$LINENO: result: $ol_cv_db_db4" >&5
30416 echo "${ECHO_T}$ol_cv_db_db4" >&6
30417
30418         if test $ol_cv_db_db4 = yes ; then
30419                 ol_cv_lib_db=-ldb4
30420         fi
30421 fi
30422
30423         if test $ol_cv_lib_db = no ; then
30424         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb)" >&5
30425 echo $ECHO_N "checking for Berkeley DB link (-ldb)... $ECHO_C" >&6
30426 if test "${ol_cv_db_db+set}" = set; then
30427   echo $ECHO_N "(cached) $ECHO_C" >&6
30428 else
30429
30430         ol_DB_LIB=-ldb
30431         ol_LIBS=$LIBS
30432         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30433
30434         cat >conftest.$ac_ext <<_ACEOF
30435 /* confdefs.h.  */
30436 _ACEOF
30437 cat confdefs.h >>conftest.$ac_ext
30438 cat >>conftest.$ac_ext <<_ACEOF
30439 /* end confdefs.h.  */
30440
30441 #ifdef HAVE_DB_185_H
30442 # include <db_185.h>
30443 #else
30444 # include <db.h>
30445 #endif
30446
30447 #ifndef DB_VERSION_MAJOR
30448 # define DB_VERSION_MAJOR 1
30449 #endif
30450
30451 #ifndef NULL
30452 #define NULL ((void*)0)
30453 #endif
30454
30455 int
30456 main ()
30457 {
30458
30459 #if DB_VERSION_MAJOR > 1
30460         {
30461                 char *version;
30462                 int major, minor, patch;
30463
30464                 version = db_version( &major, &minor, &patch );
30465
30466                 if( major != DB_VERSION_MAJOR ||
30467                         minor < DB_VERSION_MINOR )
30468                 {
30469                         printf("Berkeley DB version mismatch\n"
30470                                 "\theader: %s\n\tlibrary: %s\n",
30471                                 DB_VERSION_STRING, version);
30472                         return 1;
30473                 }
30474         }
30475 #endif
30476
30477 #if DB_VERSION_MAJOR > 2
30478         db_env_create( NULL, 0 );
30479 #elif DB_VERSION_MAJOR > 1
30480         db_appexit( NULL );
30481 #else
30482         (void) dbopen( NULL, 0, 0, 0, NULL);
30483 #endif
30484
30485   ;
30486   return 0;
30487 }
30488 _ACEOF
30489 rm -f conftest.$ac_objext conftest$ac_exeext
30490 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30491   (eval $ac_link) 2>conftest.er1
30492   ac_status=$?
30493   grep -v '^ *+' conftest.er1 >conftest.err
30494   rm -f conftest.er1
30495   cat conftest.err >&5
30496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30497   (exit $ac_status); } &&
30498          { ac_try='test -z "$ac_c_werror_flag"
30499                          || test ! -s conftest.err'
30500   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30501   (eval $ac_try) 2>&5
30502   ac_status=$?
30503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30504   (exit $ac_status); }; } &&
30505          { ac_try='test -s conftest$ac_exeext'
30506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30507   (eval $ac_try) 2>&5
30508   ac_status=$?
30509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30510   (exit $ac_status); }; }; then
30511   ol_cv_db_db=yes
30512 else
30513   echo "$as_me: failed program was:" >&5
30514 sed 's/^/| /' conftest.$ac_ext >&5
30515
30516 ol_cv_db_db=no
30517 fi
30518 rm -f conftest.err conftest.$ac_objext \
30519       conftest$ac_exeext conftest.$ac_ext
30520
30521         LIBS="$ol_LIBS"
30522
30523 fi
30524 echo "$as_me:$LINENO: result: $ol_cv_db_db" >&5
30525 echo "${ECHO_T}$ol_cv_db_db" >&6
30526
30527         if test $ol_cv_db_db = yes ; then
30528                 ol_cv_lib_db=-ldb
30529         fi
30530 fi
30531
30532
30533 elif test $ol_cv_bdb_major = 3 ; then
30534         if test $ol_cv_lib_db = no ; then
30535         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb3)" >&5
30536 echo $ECHO_N "checking for Berkeley DB link (-ldb3)... $ECHO_C" >&6
30537 if test "${ol_cv_db_db3+set}" = set; then
30538   echo $ECHO_N "(cached) $ECHO_C" >&6
30539 else
30540
30541         ol_DB_LIB=-ldb3
30542         ol_LIBS=$LIBS
30543         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30544
30545         cat >conftest.$ac_ext <<_ACEOF
30546 /* confdefs.h.  */
30547 _ACEOF
30548 cat confdefs.h >>conftest.$ac_ext
30549 cat >>conftest.$ac_ext <<_ACEOF
30550 /* end confdefs.h.  */
30551
30552 #ifdef HAVE_DB_185_H
30553 # include <db_185.h>
30554 #else
30555 # include <db.h>
30556 #endif
30557
30558 #ifndef DB_VERSION_MAJOR
30559 # define DB_VERSION_MAJOR 1
30560 #endif
30561
30562 #ifndef NULL
30563 #define NULL ((void*)0)
30564 #endif
30565
30566 int
30567 main ()
30568 {
30569
30570 #if DB_VERSION_MAJOR > 1
30571         {
30572                 char *version;
30573                 int major, minor, patch;
30574
30575                 version = db_version( &major, &minor, &patch );
30576
30577                 if( major != DB_VERSION_MAJOR ||
30578                         minor < DB_VERSION_MINOR )
30579                 {
30580                         printf("Berkeley DB version mismatch\n"
30581                                 "\theader: %s\n\tlibrary: %s\n",
30582                                 DB_VERSION_STRING, version);
30583                         return 1;
30584                 }
30585         }
30586 #endif
30587
30588 #if DB_VERSION_MAJOR > 2
30589         db_env_create( NULL, 0 );
30590 #elif DB_VERSION_MAJOR > 1
30591         db_appexit( NULL );
30592 #else
30593         (void) dbopen( NULL, 0, 0, 0, NULL);
30594 #endif
30595
30596   ;
30597   return 0;
30598 }
30599 _ACEOF
30600 rm -f conftest.$ac_objext conftest$ac_exeext
30601 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30602   (eval $ac_link) 2>conftest.er1
30603   ac_status=$?
30604   grep -v '^ *+' conftest.er1 >conftest.err
30605   rm -f conftest.er1
30606   cat conftest.err >&5
30607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30608   (exit $ac_status); } &&
30609          { ac_try='test -z "$ac_c_werror_flag"
30610                          || test ! -s conftest.err'
30611   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30612   (eval $ac_try) 2>&5
30613   ac_status=$?
30614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30615   (exit $ac_status); }; } &&
30616          { ac_try='test -s conftest$ac_exeext'
30617   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30618   (eval $ac_try) 2>&5
30619   ac_status=$?
30620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30621   (exit $ac_status); }; }; then
30622   ol_cv_db_db3=yes
30623 else
30624   echo "$as_me: failed program was:" >&5
30625 sed 's/^/| /' conftest.$ac_ext >&5
30626
30627 ol_cv_db_db3=no
30628 fi
30629 rm -f conftest.err conftest.$ac_objext \
30630       conftest$ac_exeext conftest.$ac_ext
30631
30632         LIBS="$ol_LIBS"
30633
30634 fi
30635 echo "$as_me:$LINENO: result: $ol_cv_db_db3" >&5
30636 echo "${ECHO_T}$ol_cv_db_db3" >&6
30637
30638         if test $ol_cv_db_db3 = yes ; then
30639                 ol_cv_lib_db=-ldb3
30640         fi
30641 fi
30642
30643         if test $ol_cv_lib_db = no ; then
30644         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-3)" >&5
30645 echo $ECHO_N "checking for Berkeley DB link (-ldb-3)... $ECHO_C" >&6
30646 if test "${ol_cv_db_db_3+set}" = set; then
30647   echo $ECHO_N "(cached) $ECHO_C" >&6
30648 else
30649
30650         ol_DB_LIB=-ldb-3
30651         ol_LIBS=$LIBS
30652         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30653
30654         cat >conftest.$ac_ext <<_ACEOF
30655 /* confdefs.h.  */
30656 _ACEOF
30657 cat confdefs.h >>conftest.$ac_ext
30658 cat >>conftest.$ac_ext <<_ACEOF
30659 /* end confdefs.h.  */
30660
30661 #ifdef HAVE_DB_185_H
30662 # include <db_185.h>
30663 #else
30664 # include <db.h>
30665 #endif
30666
30667 #ifndef DB_VERSION_MAJOR
30668 # define DB_VERSION_MAJOR 1
30669 #endif
30670
30671 #ifndef NULL
30672 #define NULL ((void*)0)
30673 #endif
30674
30675 int
30676 main ()
30677 {
30678
30679 #if DB_VERSION_MAJOR > 1
30680         {
30681                 char *version;
30682                 int major, minor, patch;
30683
30684                 version = db_version( &major, &minor, &patch );
30685
30686                 if( major != DB_VERSION_MAJOR ||
30687                         minor < DB_VERSION_MINOR )
30688                 {
30689                         printf("Berkeley DB version mismatch\n"
30690                                 "\theader: %s\n\tlibrary: %s\n",
30691                                 DB_VERSION_STRING, version);
30692                         return 1;
30693                 }
30694         }
30695 #endif
30696
30697 #if DB_VERSION_MAJOR > 2
30698         db_env_create( NULL, 0 );
30699 #elif DB_VERSION_MAJOR > 1
30700         db_appexit( NULL );
30701 #else
30702         (void) dbopen( NULL, 0, 0, 0, NULL);
30703 #endif
30704
30705   ;
30706   return 0;
30707 }
30708 _ACEOF
30709 rm -f conftest.$ac_objext conftest$ac_exeext
30710 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30711   (eval $ac_link) 2>conftest.er1
30712   ac_status=$?
30713   grep -v '^ *+' conftest.er1 >conftest.err
30714   rm -f conftest.er1
30715   cat conftest.err >&5
30716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30717   (exit $ac_status); } &&
30718          { ac_try='test -z "$ac_c_werror_flag"
30719                          || test ! -s conftest.err'
30720   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30721   (eval $ac_try) 2>&5
30722   ac_status=$?
30723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30724   (exit $ac_status); }; } &&
30725          { ac_try='test -s conftest$ac_exeext'
30726   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30727   (eval $ac_try) 2>&5
30728   ac_status=$?
30729   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30730   (exit $ac_status); }; }; then
30731   ol_cv_db_db_3=yes
30732 else
30733   echo "$as_me: failed program was:" >&5
30734 sed 's/^/| /' conftest.$ac_ext >&5
30735
30736 ol_cv_db_db_3=no
30737 fi
30738 rm -f conftest.err conftest.$ac_objext \
30739       conftest$ac_exeext conftest.$ac_ext
30740
30741         LIBS="$ol_LIBS"
30742
30743 fi
30744 echo "$as_me:$LINENO: result: $ol_cv_db_db_3" >&5
30745 echo "${ECHO_T}$ol_cv_db_db_3" >&6
30746
30747         if test $ol_cv_db_db_3 = yes ; then
30748                 ol_cv_lib_db=-ldb-3
30749         fi
30750 fi
30751
30752
30753 elif test $ol_cv_bdb_major = 2 ; then
30754         if test $ol_cv_lib_db = no ; then
30755         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb2)" >&5
30756 echo $ECHO_N "checking for Berkeley DB link (-ldb2)... $ECHO_C" >&6
30757 if test "${ol_cv_db_db2+set}" = set; then
30758   echo $ECHO_N "(cached) $ECHO_C" >&6
30759 else
30760
30761         ol_DB_LIB=-ldb2
30762         ol_LIBS=$LIBS
30763         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30764
30765         cat >conftest.$ac_ext <<_ACEOF
30766 /* confdefs.h.  */
30767 _ACEOF
30768 cat confdefs.h >>conftest.$ac_ext
30769 cat >>conftest.$ac_ext <<_ACEOF
30770 /* end confdefs.h.  */
30771
30772 #ifdef HAVE_DB_185_H
30773 # include <db_185.h>
30774 #else
30775 # include <db.h>
30776 #endif
30777
30778 #ifndef DB_VERSION_MAJOR
30779 # define DB_VERSION_MAJOR 1
30780 #endif
30781
30782 #ifndef NULL
30783 #define NULL ((void*)0)
30784 #endif
30785
30786 int
30787 main ()
30788 {
30789
30790 #if DB_VERSION_MAJOR > 1
30791         {
30792                 char *version;
30793                 int major, minor, patch;
30794
30795                 version = db_version( &major, &minor, &patch );
30796
30797                 if( major != DB_VERSION_MAJOR ||
30798                         minor < DB_VERSION_MINOR )
30799                 {
30800                         printf("Berkeley DB version mismatch\n"
30801                                 "\theader: %s\n\tlibrary: %s\n",
30802                                 DB_VERSION_STRING, version);
30803                         return 1;
30804                 }
30805         }
30806 #endif
30807
30808 #if DB_VERSION_MAJOR > 2
30809         db_env_create( NULL, 0 );
30810 #elif DB_VERSION_MAJOR > 1
30811         db_appexit( NULL );
30812 #else
30813         (void) dbopen( NULL, 0, 0, 0, NULL);
30814 #endif
30815
30816   ;
30817   return 0;
30818 }
30819 _ACEOF
30820 rm -f conftest.$ac_objext conftest$ac_exeext
30821 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30822   (eval $ac_link) 2>conftest.er1
30823   ac_status=$?
30824   grep -v '^ *+' conftest.er1 >conftest.err
30825   rm -f conftest.er1
30826   cat conftest.err >&5
30827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30828   (exit $ac_status); } &&
30829          { ac_try='test -z "$ac_c_werror_flag"
30830                          || test ! -s conftest.err'
30831   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30832   (eval $ac_try) 2>&5
30833   ac_status=$?
30834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30835   (exit $ac_status); }; } &&
30836          { ac_try='test -s conftest$ac_exeext'
30837   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30838   (eval $ac_try) 2>&5
30839   ac_status=$?
30840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30841   (exit $ac_status); }; }; then
30842   ol_cv_db_db2=yes
30843 else
30844   echo "$as_me: failed program was:" >&5
30845 sed 's/^/| /' conftest.$ac_ext >&5
30846
30847 ol_cv_db_db2=no
30848 fi
30849 rm -f conftest.err conftest.$ac_objext \
30850       conftest$ac_exeext conftest.$ac_ext
30851
30852         LIBS="$ol_LIBS"
30853
30854 fi
30855 echo "$as_me:$LINENO: result: $ol_cv_db_db2" >&5
30856 echo "${ECHO_T}$ol_cv_db_db2" >&6
30857
30858         if test $ol_cv_db_db2 = yes ; then
30859                 ol_cv_lib_db=-ldb2
30860         fi
30861 fi
30862
30863         if test $ol_cv_lib_db = no ; then
30864         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-2)" >&5
30865 echo $ECHO_N "checking for Berkeley DB link (-ldb-2)... $ECHO_C" >&6
30866 if test "${ol_cv_db_db_2+set}" = set; then
30867   echo $ECHO_N "(cached) $ECHO_C" >&6
30868 else
30869
30870         ol_DB_LIB=-ldb-2
30871         ol_LIBS=$LIBS
30872         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30873
30874         cat >conftest.$ac_ext <<_ACEOF
30875 /* confdefs.h.  */
30876 _ACEOF
30877 cat confdefs.h >>conftest.$ac_ext
30878 cat >>conftest.$ac_ext <<_ACEOF
30879 /* end confdefs.h.  */
30880
30881 #ifdef HAVE_DB_185_H
30882 # include <db_185.h>
30883 #else
30884 # include <db.h>
30885 #endif
30886
30887 #ifndef DB_VERSION_MAJOR
30888 # define DB_VERSION_MAJOR 1
30889 #endif
30890
30891 #ifndef NULL
30892 #define NULL ((void*)0)
30893 #endif
30894
30895 int
30896 main ()
30897 {
30898
30899 #if DB_VERSION_MAJOR > 1
30900         {
30901                 char *version;
30902                 int major, minor, patch;
30903
30904                 version = db_version( &major, &minor, &patch );
30905
30906                 if( major != DB_VERSION_MAJOR ||
30907                         minor < DB_VERSION_MINOR )
30908                 {
30909                         printf("Berkeley DB version mismatch\n"
30910                                 "\theader: %s\n\tlibrary: %s\n",
30911                                 DB_VERSION_STRING, version);
30912                         return 1;
30913                 }
30914         }
30915 #endif
30916
30917 #if DB_VERSION_MAJOR > 2
30918         db_env_create( NULL, 0 );
30919 #elif DB_VERSION_MAJOR > 1
30920         db_appexit( NULL );
30921 #else
30922         (void) dbopen( NULL, 0, 0, 0, NULL);
30923 #endif
30924
30925   ;
30926   return 0;
30927 }
30928 _ACEOF
30929 rm -f conftest.$ac_objext conftest$ac_exeext
30930 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30931   (eval $ac_link) 2>conftest.er1
30932   ac_status=$?
30933   grep -v '^ *+' conftest.er1 >conftest.err
30934   rm -f conftest.er1
30935   cat conftest.err >&5
30936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30937   (exit $ac_status); } &&
30938          { ac_try='test -z "$ac_c_werror_flag"
30939                          || test ! -s conftest.err'
30940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30941   (eval $ac_try) 2>&5
30942   ac_status=$?
30943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30944   (exit $ac_status); }; } &&
30945          { ac_try='test -s conftest$ac_exeext'
30946   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30947   (eval $ac_try) 2>&5
30948   ac_status=$?
30949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30950   (exit $ac_status); }; }; then
30951   ol_cv_db_db_2=yes
30952 else
30953   echo "$as_me: failed program was:" >&5
30954 sed 's/^/| /' conftest.$ac_ext >&5
30955
30956 ol_cv_db_db_2=no
30957 fi
30958 rm -f conftest.err conftest.$ac_objext \
30959       conftest$ac_exeext conftest.$ac_ext
30960
30961         LIBS="$ol_LIBS"
30962
30963 fi
30964 echo "$as_me:$LINENO: result: $ol_cv_db_db_2" >&5
30965 echo "${ECHO_T}$ol_cv_db_db_2" >&6
30966
30967         if test $ol_cv_db_db_2 = yes ; then
30968                 ol_cv_lib_db=-ldb-2
30969         fi
30970 fi
30971
30972
30973 elif test $ol_cv_bdb_major = 1 ; then
30974         if test $ol_cv_lib_db = no ; then
30975         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb1)" >&5
30976 echo $ECHO_N "checking for Berkeley DB link (-ldb1)... $ECHO_C" >&6
30977 if test "${ol_cv_db_db1+set}" = set; then
30978   echo $ECHO_N "(cached) $ECHO_C" >&6
30979 else
30980
30981         ol_DB_LIB=-ldb1
30982         ol_LIBS=$LIBS
30983         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30984
30985         cat >conftest.$ac_ext <<_ACEOF
30986 /* confdefs.h.  */
30987 _ACEOF
30988 cat confdefs.h >>conftest.$ac_ext
30989 cat >>conftest.$ac_ext <<_ACEOF
30990 /* end confdefs.h.  */
30991
30992 #ifdef HAVE_DB_185_H
30993 # include <db_185.h>
30994 #else
30995 # include <db.h>
30996 #endif
30997
30998 #ifndef DB_VERSION_MAJOR
30999 # define DB_VERSION_MAJOR 1
31000 #endif
31001
31002 #ifndef NULL
31003 #define NULL ((void*)0)
31004 #endif
31005
31006 int
31007 main ()
31008 {
31009
31010 #if DB_VERSION_MAJOR > 1
31011         {
31012                 char *version;
31013                 int major, minor, patch;
31014
31015                 version = db_version( &major, &minor, &patch );
31016
31017                 if( major != DB_VERSION_MAJOR ||
31018                         minor < DB_VERSION_MINOR )
31019                 {
31020                         printf("Berkeley DB version mismatch\n"
31021                                 "\theader: %s\n\tlibrary: %s\n",
31022                                 DB_VERSION_STRING, version);
31023                         return 1;
31024                 }
31025         }
31026 #endif
31027
31028 #if DB_VERSION_MAJOR > 2
31029         db_env_create( NULL, 0 );
31030 #elif DB_VERSION_MAJOR > 1
31031         db_appexit( NULL );
31032 #else
31033         (void) dbopen( NULL, 0, 0, 0, NULL);
31034 #endif
31035
31036   ;
31037   return 0;
31038 }
31039 _ACEOF
31040 rm -f conftest.$ac_objext conftest$ac_exeext
31041 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31042   (eval $ac_link) 2>conftest.er1
31043   ac_status=$?
31044   grep -v '^ *+' conftest.er1 >conftest.err
31045   rm -f conftest.er1
31046   cat conftest.err >&5
31047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31048   (exit $ac_status); } &&
31049          { ac_try='test -z "$ac_c_werror_flag"
31050                          || test ! -s conftest.err'
31051   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31052   (eval $ac_try) 2>&5
31053   ac_status=$?
31054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31055   (exit $ac_status); }; } &&
31056          { ac_try='test -s conftest$ac_exeext'
31057   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31058   (eval $ac_try) 2>&5
31059   ac_status=$?
31060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31061   (exit $ac_status); }; }; then
31062   ol_cv_db_db1=yes
31063 else
31064   echo "$as_me: failed program was:" >&5
31065 sed 's/^/| /' conftest.$ac_ext >&5
31066
31067 ol_cv_db_db1=no
31068 fi
31069 rm -f conftest.err conftest.$ac_objext \
31070       conftest$ac_exeext conftest.$ac_ext
31071
31072         LIBS="$ol_LIBS"
31073
31074 fi
31075 echo "$as_me:$LINENO: result: $ol_cv_db_db1" >&5
31076 echo "${ECHO_T}$ol_cv_db_db1" >&6
31077
31078         if test $ol_cv_db_db1 = yes ; then
31079                 ol_cv_lib_db=-ldb1
31080         fi
31081 fi
31082
31083         if test $ol_cv_lib_db = no ; then
31084         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-1)" >&5
31085 echo $ECHO_N "checking for Berkeley DB link (-ldb-1)... $ECHO_C" >&6
31086 if test "${ol_cv_db_db_1+set}" = set; then
31087   echo $ECHO_N "(cached) $ECHO_C" >&6
31088 else
31089
31090         ol_DB_LIB=-ldb-1
31091         ol_LIBS=$LIBS
31092         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31093
31094         cat >conftest.$ac_ext <<_ACEOF
31095 /* confdefs.h.  */
31096 _ACEOF
31097 cat confdefs.h >>conftest.$ac_ext
31098 cat >>conftest.$ac_ext <<_ACEOF
31099 /* end confdefs.h.  */
31100
31101 #ifdef HAVE_DB_185_H
31102 # include <db_185.h>
31103 #else
31104 # include <db.h>
31105 #endif
31106
31107 #ifndef DB_VERSION_MAJOR
31108 # define DB_VERSION_MAJOR 1
31109 #endif
31110
31111 #ifndef NULL
31112 #define NULL ((void*)0)
31113 #endif
31114
31115 int
31116 main ()
31117 {
31118
31119 #if DB_VERSION_MAJOR > 1
31120         {
31121                 char *version;
31122                 int major, minor, patch;
31123
31124                 version = db_version( &major, &minor, &patch );
31125
31126                 if( major != DB_VERSION_MAJOR ||
31127                         minor < DB_VERSION_MINOR )
31128                 {
31129                         printf("Berkeley DB version mismatch\n"
31130                                 "\theader: %s\n\tlibrary: %s\n",
31131                                 DB_VERSION_STRING, version);
31132                         return 1;
31133                 }
31134         }
31135 #endif
31136
31137 #if DB_VERSION_MAJOR > 2
31138         db_env_create( NULL, 0 );
31139 #elif DB_VERSION_MAJOR > 1
31140         db_appexit( NULL );
31141 #else
31142         (void) dbopen( NULL, 0, 0, 0, NULL);
31143 #endif
31144
31145   ;
31146   return 0;
31147 }
31148 _ACEOF
31149 rm -f conftest.$ac_objext conftest$ac_exeext
31150 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31151   (eval $ac_link) 2>conftest.er1
31152   ac_status=$?
31153   grep -v '^ *+' conftest.er1 >conftest.err
31154   rm -f conftest.er1
31155   cat conftest.err >&5
31156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31157   (exit $ac_status); } &&
31158          { ac_try='test -z "$ac_c_werror_flag"
31159                          || test ! -s conftest.err'
31160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31161   (eval $ac_try) 2>&5
31162   ac_status=$?
31163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31164   (exit $ac_status); }; } &&
31165          { ac_try='test -s conftest$ac_exeext'
31166   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31167   (eval $ac_try) 2>&5
31168   ac_status=$?
31169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31170   (exit $ac_status); }; }; then
31171   ol_cv_db_db_1=yes
31172 else
31173   echo "$as_me: failed program was:" >&5
31174 sed 's/^/| /' conftest.$ac_ext >&5
31175
31176 ol_cv_db_db_1=no
31177 fi
31178 rm -f conftest.err conftest.$ac_objext \
31179       conftest$ac_exeext conftest.$ac_ext
31180
31181         LIBS="$ol_LIBS"
31182
31183 fi
31184 echo "$as_me:$LINENO: result: $ol_cv_db_db_1" >&5
31185 echo "${ECHO_T}$ol_cv_db_db_1" >&6
31186
31187         if test $ol_cv_db_db_1 = yes ; then
31188                 ol_cv_lib_db=-ldb-1
31189         fi
31190 fi
31191
31192 fi
31193 if test $ol_cv_lib_db = no ; then
31194         echo "$as_me:$LINENO: checking for Berkeley DB link (default)" >&5
31195 echo $ECHO_N "checking for Berkeley DB link (default)... $ECHO_C" >&6
31196 if test "${ol_cv_db_none+set}" = set; then
31197   echo $ECHO_N "(cached) $ECHO_C" >&6
31198 else
31199
31200         ol_DB_LIB=
31201         ol_LIBS=$LIBS
31202         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31203
31204         cat >conftest.$ac_ext <<_ACEOF
31205 /* confdefs.h.  */
31206 _ACEOF
31207 cat confdefs.h >>conftest.$ac_ext
31208 cat >>conftest.$ac_ext <<_ACEOF
31209 /* end confdefs.h.  */
31210
31211 #ifdef HAVE_DB_185_H
31212 # include <db_185.h>
31213 #else
31214 # include <db.h>
31215 #endif
31216
31217 #ifndef DB_VERSION_MAJOR
31218 # define DB_VERSION_MAJOR 1
31219 #endif
31220
31221 #ifndef NULL
31222 #define NULL ((void*)0)
31223 #endif
31224
31225 int
31226 main ()
31227 {
31228
31229 #if DB_VERSION_MAJOR > 1
31230         {
31231                 char *version;
31232                 int major, minor, patch;
31233
31234                 version = db_version( &major, &minor, &patch );
31235
31236                 if( major != DB_VERSION_MAJOR ||
31237                         minor < DB_VERSION_MINOR )
31238                 {
31239                         printf("Berkeley DB version mismatch\n"
31240                                 "\theader: %s\n\tlibrary: %s\n",
31241                                 DB_VERSION_STRING, version);
31242                         return 1;
31243                 }
31244         }
31245 #endif
31246
31247 #if DB_VERSION_MAJOR > 2
31248         db_env_create( NULL, 0 );
31249 #elif DB_VERSION_MAJOR > 1
31250         db_appexit( NULL );
31251 #else
31252         (void) dbopen( NULL, 0, 0, 0, NULL);
31253 #endif
31254
31255   ;
31256   return 0;
31257 }
31258 _ACEOF
31259 rm -f conftest.$ac_objext conftest$ac_exeext
31260 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31261   (eval $ac_link) 2>conftest.er1
31262   ac_status=$?
31263   grep -v '^ *+' conftest.er1 >conftest.err
31264   rm -f conftest.er1
31265   cat conftest.err >&5
31266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31267   (exit $ac_status); } &&
31268          { ac_try='test -z "$ac_c_werror_flag"
31269                          || test ! -s conftest.err'
31270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31271   (eval $ac_try) 2>&5
31272   ac_status=$?
31273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31274   (exit $ac_status); }; } &&
31275          { ac_try='test -s conftest$ac_exeext'
31276   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31277   (eval $ac_try) 2>&5
31278   ac_status=$?
31279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31280   (exit $ac_status); }; }; then
31281   ol_cv_db_none=yes
31282 else
31283   echo "$as_me: failed program was:" >&5
31284 sed 's/^/| /' conftest.$ac_ext >&5
31285
31286 ol_cv_db_none=no
31287 fi
31288 rm -f conftest.err conftest.$ac_objext \
31289       conftest$ac_exeext conftest.$ac_ext
31290
31291         LIBS="$ol_LIBS"
31292
31293 fi
31294 echo "$as_me:$LINENO: result: $ol_cv_db_none" >&5
31295 echo "${ECHO_T}$ol_cv_db_none" >&6
31296
31297         if test $ol_cv_db_none = yes ; then
31298                 ol_cv_lib_db=yes
31299         fi
31300 fi
31301
31302
31303                 if test "$ol_cv_lib_db" != no ; then
31304                         ol_cv_berkeley_db=yes
31305                 fi
31306         fi
31307 fi
31308
31309         else
31310                 ol_cv_berkeley_db=no
31311
31312 for ac_header in db.h
31313 do
31314 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
31315 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31316   echo "$as_me:$LINENO: checking for $ac_header" >&5
31317 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31318 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31319   echo $ECHO_N "(cached) $ECHO_C" >&6
31320 fi
31321 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
31322 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
31323 else
31324   # Is the header compilable?
31325 echo "$as_me:$LINENO: checking $ac_header usability" >&5
31326 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
31327 cat >conftest.$ac_ext <<_ACEOF
31328 /* confdefs.h.  */
31329 _ACEOF
31330 cat confdefs.h >>conftest.$ac_ext
31331 cat >>conftest.$ac_ext <<_ACEOF
31332 /* end confdefs.h.  */
31333 $ac_includes_default
31334 #include <$ac_header>
31335 _ACEOF
31336 rm -f conftest.$ac_objext
31337 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
31338   (eval $ac_compile) 2>conftest.er1
31339   ac_status=$?
31340   grep -v '^ *+' conftest.er1 >conftest.err
31341   rm -f conftest.er1
31342   cat conftest.err >&5
31343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31344   (exit $ac_status); } &&
31345          { ac_try='test -z "$ac_c_werror_flag"
31346                          || test ! -s conftest.err'
31347   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31348   (eval $ac_try) 2>&5
31349   ac_status=$?
31350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31351   (exit $ac_status); }; } &&
31352          { ac_try='test -s conftest.$ac_objext'
31353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31354   (eval $ac_try) 2>&5
31355   ac_status=$?
31356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31357   (exit $ac_status); }; }; then
31358   ac_header_compiler=yes
31359 else
31360   echo "$as_me: failed program was:" >&5
31361 sed 's/^/| /' conftest.$ac_ext >&5
31362
31363 ac_header_compiler=no
31364 fi
31365 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
31366 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
31367 echo "${ECHO_T}$ac_header_compiler" >&6
31368
31369 # Is the header present?
31370 echo "$as_me:$LINENO: checking $ac_header presence" >&5
31371 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
31372 cat >conftest.$ac_ext <<_ACEOF
31373 /* confdefs.h.  */
31374 _ACEOF
31375 cat confdefs.h >>conftest.$ac_ext
31376 cat >>conftest.$ac_ext <<_ACEOF
31377 /* end confdefs.h.  */
31378 #include <$ac_header>
31379 _ACEOF
31380 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
31381   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
31382   ac_status=$?
31383   grep -v '^ *+' conftest.er1 >conftest.err
31384   rm -f conftest.er1
31385   cat conftest.err >&5
31386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31387   (exit $ac_status); } >/dev/null; then
31388   if test -s conftest.err; then
31389     ac_cpp_err=$ac_c_preproc_warn_flag
31390     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
31391   else
31392     ac_cpp_err=
31393   fi
31394 else
31395   ac_cpp_err=yes
31396 fi
31397 if test -z "$ac_cpp_err"; then
31398   ac_header_preproc=yes
31399 else
31400   echo "$as_me: failed program was:" >&5
31401 sed 's/^/| /' conftest.$ac_ext >&5
31402
31403   ac_header_preproc=no
31404 fi
31405 rm -f conftest.err conftest.$ac_ext
31406 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
31407 echo "${ECHO_T}$ac_header_preproc" >&6
31408
31409 # So?  What about this header?
31410 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
31411   yes:no: )
31412     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
31413 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
31414     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
31415 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
31416     ac_header_preproc=yes
31417     ;;
31418   no:yes:* )
31419     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
31420 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
31421     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
31422 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
31423     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
31424 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
31425     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
31426 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
31427     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
31428 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
31429     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
31430 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
31431     (
31432       cat <<\_ASBOX
31433 ## --------------------------------------------- ##
31434 ## Report this to <http://www.openldap.org/its/> ##
31435 ## --------------------------------------------- ##
31436 _ASBOX
31437     ) |
31438       sed "s/^/$as_me: WARNING:     /" >&2
31439     ;;
31440 esac
31441 echo "$as_me:$LINENO: checking for $ac_header" >&5
31442 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31443 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31444   echo $ECHO_N "(cached) $ECHO_C" >&6
31445 else
31446   eval "$as_ac_Header=\$ac_header_preproc"
31447 fi
31448 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
31449 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
31450
31451 fi
31452 if test `eval echo '${'$as_ac_Header'}'` = yes; then
31453   cat >>confdefs.h <<_ACEOF
31454 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
31455 _ACEOF
31456
31457 fi
31458
31459 done
31460
31461 if test $ac_cv_header_db_h = yes; then
31462         ol_cv_lib_db=no
31463
31464 echo "$as_me:$LINENO: checking for Berkeley DB major version" >&5
31465 echo $ECHO_N "checking for Berkeley DB major version... $ECHO_C" >&6
31466 if test "${ol_cv_bdb_major+set}" = set; then
31467   echo $ECHO_N "(cached) $ECHO_C" >&6
31468 else
31469
31470         ol_cv_bdb_major=0
31471         if test $ol_cv_bdb_major = 0 ; then
31472                 cat >conftest.$ac_ext <<_ACEOF
31473 /* confdefs.h.  */
31474 _ACEOF
31475 cat confdefs.h >>conftest.$ac_ext
31476 cat >>conftest.$ac_ext <<_ACEOF
31477 /* end confdefs.h.  */
31478
31479 #include <db.h>
31480 #ifndef DB_VERSION_MAJOR
31481 #       define DB_VERSION_MAJOR 1
31482 #endif
31483 #if DB_VERSION_MAJOR == 4
31484 __db_version
31485 #endif
31486
31487 _ACEOF
31488 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31489   $EGREP "__db_version" >/dev/null 2>&1; then
31490   ol_cv_bdb_major=4
31491 else
31492   :
31493 fi
31494 rm -f conftest*
31495
31496         fi
31497         if test $ol_cv_bdb_major = 0 ; then
31498                 cat >conftest.$ac_ext <<_ACEOF
31499 /* confdefs.h.  */
31500 _ACEOF
31501 cat confdefs.h >>conftest.$ac_ext
31502 cat >>conftest.$ac_ext <<_ACEOF
31503 /* end confdefs.h.  */
31504
31505 #include <db.h>
31506 #ifndef DB_VERSION_MAJOR
31507 #       define DB_VERSION_MAJOR 1
31508 #endif
31509 #if DB_VERSION_MAJOR == 3
31510 __db_version
31511 #endif
31512
31513 _ACEOF
31514 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31515   $EGREP "__db_version" >/dev/null 2>&1; then
31516   ol_cv_bdb_major=3
31517 else
31518   :
31519 fi
31520 rm -f conftest*
31521
31522         fi
31523         if test $ol_cv_bdb_major = 0 ; then
31524                 cat >conftest.$ac_ext <<_ACEOF
31525 /* confdefs.h.  */
31526 _ACEOF
31527 cat confdefs.h >>conftest.$ac_ext
31528 cat >>conftest.$ac_ext <<_ACEOF
31529 /* end confdefs.h.  */
31530
31531 #include <db.h>
31532 #ifndef DB_VERSION_MAJOR
31533 #       define DB_VERSION_MAJOR 1
31534 #endif
31535 #if DB_VERSION_MAJOR == 2
31536 __db_version
31537 #endif
31538
31539 _ACEOF
31540 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31541   $EGREP "__db_version" >/dev/null 2>&1; then
31542   ol_cv_bdb_major=2
31543 else
31544   :
31545 fi
31546 rm -f conftest*
31547
31548         fi
31549         if test $ol_cv_bdb_major = 0 ; then
31550                 cat >conftest.$ac_ext <<_ACEOF
31551 /* confdefs.h.  */
31552 _ACEOF
31553 cat confdefs.h >>conftest.$ac_ext
31554 cat >>conftest.$ac_ext <<_ACEOF
31555 /* end confdefs.h.  */
31556
31557 #include <db.h>
31558 #ifndef DB_VERSION_MAJOR
31559 #       define DB_VERSION_MAJOR 1
31560 #endif
31561 #if DB_VERSION_MAJOR == 1
31562 __db_version
31563 #endif
31564
31565 _ACEOF
31566 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31567   $EGREP "__db_version" >/dev/null 2>&1; then
31568   ol_cv_bdb_major=1
31569 else
31570   :
31571 fi
31572 rm -f conftest*
31573
31574         fi
31575
31576         if test $ol_cv_bdb_major = 0 ; then
31577                 { { echo "$as_me:$LINENO: error: Unknown Berkeley DB major version" >&5
31578 echo "$as_me: error: Unknown Berkeley DB major version" >&2;}
31579    { (exit 1); exit 1; }; }
31580         fi
31581
31582 fi
31583 echo "$as_me:$LINENO: result: $ol_cv_bdb_major" >&5
31584 echo "${ECHO_T}$ol_cv_bdb_major" >&6
31585
31586 echo "$as_me:$LINENO: checking for Berkeley DB minor version" >&5
31587 echo $ECHO_N "checking for Berkeley DB minor version... $ECHO_C" >&6
31588 if test "${ol_cv_bdb_minor+set}" = set; then
31589   echo $ECHO_N "(cached) $ECHO_C" >&6
31590 else
31591
31592         ol_cv_bdb_minor=0
31593         if test $ol_cv_bdb_minor = 0 ; then
31594                 cat >conftest.$ac_ext <<_ACEOF
31595 /* confdefs.h.  */
31596 _ACEOF
31597 cat confdefs.h >>conftest.$ac_ext
31598 cat >>conftest.$ac_ext <<_ACEOF
31599 /* end confdefs.h.  */
31600
31601 #include <db.h>
31602 #ifndef DB_VERSION_MINOR
31603 #       define DB_VERSION_MINOR 0
31604 #endif
31605 #if DB_VERSION_MINOR == 9
31606 __db_version
31607 #endif
31608
31609 _ACEOF
31610 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31611   $EGREP "__db_version" >/dev/null 2>&1; then
31612   ol_cv_bdb_minor=9
31613 else
31614   :
31615 fi
31616 rm -f conftest*
31617
31618         fi
31619         if test $ol_cv_bdb_minor = 0 ; then
31620                 cat >conftest.$ac_ext <<_ACEOF
31621 /* confdefs.h.  */
31622 _ACEOF
31623 cat confdefs.h >>conftest.$ac_ext
31624 cat >>conftest.$ac_ext <<_ACEOF
31625 /* end confdefs.h.  */
31626
31627 #include <db.h>
31628 #ifndef DB_VERSION_MINOR
31629 #       define DB_VERSION_MINOR 0
31630 #endif
31631 #if DB_VERSION_MINOR == 8
31632 __db_version
31633 #endif
31634
31635 _ACEOF
31636 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31637   $EGREP "__db_version" >/dev/null 2>&1; then
31638   ol_cv_bdb_minor=8
31639 else
31640   :
31641 fi
31642 rm -f conftest*
31643
31644         fi
31645         if test $ol_cv_bdb_minor = 0 ; then
31646                 cat >conftest.$ac_ext <<_ACEOF
31647 /* confdefs.h.  */
31648 _ACEOF
31649 cat confdefs.h >>conftest.$ac_ext
31650 cat >>conftest.$ac_ext <<_ACEOF
31651 /* end confdefs.h.  */
31652
31653 #include <db.h>
31654 #ifndef DB_VERSION_MINOR
31655 #       define DB_VERSION_MINOR 0
31656 #endif
31657 #if DB_VERSION_MINOR == 7
31658 __db_version
31659 #endif
31660
31661 _ACEOF
31662 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31663   $EGREP "__db_version" >/dev/null 2>&1; then
31664   ol_cv_bdb_minor=7
31665 else
31666   :
31667 fi
31668 rm -f conftest*
31669
31670         fi
31671         if test $ol_cv_bdb_minor = 0 ; then
31672                 cat >conftest.$ac_ext <<_ACEOF
31673 /* confdefs.h.  */
31674 _ACEOF
31675 cat confdefs.h >>conftest.$ac_ext
31676 cat >>conftest.$ac_ext <<_ACEOF
31677 /* end confdefs.h.  */
31678
31679 #include <db.h>
31680 #ifndef DB_VERSION_MINOR
31681 #       define DB_VERSION_MINOR 0
31682 #endif
31683 #if DB_VERSION_MINOR == 6
31684 __db_version
31685 #endif
31686
31687 _ACEOF
31688 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31689   $EGREP "__db_version" >/dev/null 2>&1; then
31690   ol_cv_bdb_minor=6
31691 else
31692   :
31693 fi
31694 rm -f conftest*
31695
31696         fi
31697         if test $ol_cv_bdb_minor = 0 ; then
31698                 cat >conftest.$ac_ext <<_ACEOF
31699 /* confdefs.h.  */
31700 _ACEOF
31701 cat confdefs.h >>conftest.$ac_ext
31702 cat >>conftest.$ac_ext <<_ACEOF
31703 /* end confdefs.h.  */
31704
31705 #include <db.h>
31706 #ifndef DB_VERSION_MINOR
31707 #       define DB_VERSION_MINOR 0
31708 #endif
31709 #if DB_VERSION_MINOR == 5
31710 __db_version
31711 #endif
31712
31713 _ACEOF
31714 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31715   $EGREP "__db_version" >/dev/null 2>&1; then
31716   ol_cv_bdb_minor=5
31717 else
31718   :
31719 fi
31720 rm -f conftest*
31721
31722         fi
31723         if test $ol_cv_bdb_minor = 0 ; then
31724                 cat >conftest.$ac_ext <<_ACEOF
31725 /* confdefs.h.  */
31726 _ACEOF
31727 cat confdefs.h >>conftest.$ac_ext
31728 cat >>conftest.$ac_ext <<_ACEOF
31729 /* end confdefs.h.  */
31730
31731 #include <db.h>
31732 #ifndef DB_VERSION_MINOR
31733 #       define DB_VERSION_MINOR 0
31734 #endif
31735 #if DB_VERSION_MINOR == 4
31736 __db_version
31737 #endif
31738
31739 _ACEOF
31740 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31741   $EGREP "__db_version" >/dev/null 2>&1; then
31742   ol_cv_bdb_minor=4
31743 else
31744   :
31745 fi
31746 rm -f conftest*
31747
31748         fi
31749         if test $ol_cv_bdb_minor = 0 ; then
31750                 cat >conftest.$ac_ext <<_ACEOF
31751 /* confdefs.h.  */
31752 _ACEOF
31753 cat confdefs.h >>conftest.$ac_ext
31754 cat >>conftest.$ac_ext <<_ACEOF
31755 /* end confdefs.h.  */
31756
31757 #include <db.h>
31758 #ifndef DB_VERSION_MINOR
31759 #       define DB_VERSION_MINOR 0
31760 #endif
31761 #if DB_VERSION_MINOR == 3
31762 __db_version
31763 #endif
31764
31765 _ACEOF
31766 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31767   $EGREP "__db_version" >/dev/null 2>&1; then
31768   ol_cv_bdb_minor=3
31769 else
31770   :
31771 fi
31772 rm -f conftest*
31773
31774         fi
31775         if test $ol_cv_bdb_minor = 0 ; then
31776                 cat >conftest.$ac_ext <<_ACEOF
31777 /* confdefs.h.  */
31778 _ACEOF
31779 cat confdefs.h >>conftest.$ac_ext
31780 cat >>conftest.$ac_ext <<_ACEOF
31781 /* end confdefs.h.  */
31782
31783 #include <db.h>
31784 #ifndef DB_VERSION_MINOR
31785 #       define DB_VERSION_MINOR 0
31786 #endif
31787 #if DB_VERSION_MINOR == 2
31788 __db_version
31789 #endif
31790
31791 _ACEOF
31792 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31793   $EGREP "__db_version" >/dev/null 2>&1; then
31794   ol_cv_bdb_minor=2
31795 else
31796   :
31797 fi
31798 rm -f conftest*
31799
31800         fi
31801         if test $ol_cv_bdb_minor = 0 ; then
31802                 cat >conftest.$ac_ext <<_ACEOF
31803 /* confdefs.h.  */
31804 _ACEOF
31805 cat confdefs.h >>conftest.$ac_ext
31806 cat >>conftest.$ac_ext <<_ACEOF
31807 /* end confdefs.h.  */
31808
31809 #include <db.h>
31810 #ifndef DB_VERSION_MINOR
31811 #       define DB_VERSION_MINOR 0
31812 #endif
31813 #if DB_VERSION_MINOR == 1
31814 __db_version
31815 #endif
31816
31817 _ACEOF
31818 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31819   $EGREP "__db_version" >/dev/null 2>&1; then
31820   ol_cv_bdb_minor=1
31821 else
31822   :
31823 fi
31824 rm -f conftest*
31825
31826         fi
31827
31828 fi
31829 echo "$as_me:$LINENO: result: $ol_cv_bdb_minor" >&5
31830 echo "${ECHO_T}$ol_cv_bdb_minor" >&6
31831
31832 if test $ol_cv_bdb_major = 4 ; then
31833         if test $ol_cv_bdb_minor = 4 ; then
31834                 if test $ol_cv_lib_db = no ; then
31835         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb44)" >&5
31836 echo $ECHO_N "checking for Berkeley DB link (-ldb44)... $ECHO_C" >&6
31837 if test "${ol_cv_db_db44+set}" = set; then
31838   echo $ECHO_N "(cached) $ECHO_C" >&6
31839 else
31840
31841         ol_DB_LIB=-ldb44
31842         ol_LIBS=$LIBS
31843         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31844
31845         cat >conftest.$ac_ext <<_ACEOF
31846 /* confdefs.h.  */
31847 _ACEOF
31848 cat confdefs.h >>conftest.$ac_ext
31849 cat >>conftest.$ac_ext <<_ACEOF
31850 /* end confdefs.h.  */
31851
31852 #ifdef HAVE_DB_185_H
31853 # include <db_185.h>
31854 #else
31855 # include <db.h>
31856 #endif
31857
31858 #ifndef DB_VERSION_MAJOR
31859 # define DB_VERSION_MAJOR 1
31860 #endif
31861
31862 #ifndef NULL
31863 #define NULL ((void*)0)
31864 #endif
31865
31866 int
31867 main ()
31868 {
31869
31870 #if DB_VERSION_MAJOR > 1
31871         {
31872                 char *version;
31873                 int major, minor, patch;
31874
31875                 version = db_version( &major, &minor, &patch );
31876
31877                 if( major != DB_VERSION_MAJOR ||
31878                         minor < DB_VERSION_MINOR )
31879                 {
31880                         printf("Berkeley DB version mismatch\n"
31881                                 "\theader: %s\n\tlibrary: %s\n",
31882                                 DB_VERSION_STRING, version);
31883                         return 1;
31884                 }
31885         }
31886 #endif
31887
31888 #if DB_VERSION_MAJOR > 2
31889         db_env_create( NULL, 0 );
31890 #elif DB_VERSION_MAJOR > 1
31891         db_appexit( NULL );
31892 #else
31893         (void) dbopen( NULL, 0, 0, 0, NULL);
31894 #endif
31895
31896   ;
31897   return 0;
31898 }
31899 _ACEOF
31900 rm -f conftest.$ac_objext conftest$ac_exeext
31901 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31902   (eval $ac_link) 2>conftest.er1
31903   ac_status=$?
31904   grep -v '^ *+' conftest.er1 >conftest.err
31905   rm -f conftest.er1
31906   cat conftest.err >&5
31907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31908   (exit $ac_status); } &&
31909          { ac_try='test -z "$ac_c_werror_flag"
31910                          || test ! -s conftest.err'
31911   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31912   (eval $ac_try) 2>&5
31913   ac_status=$?
31914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31915   (exit $ac_status); }; } &&
31916          { ac_try='test -s conftest$ac_exeext'
31917   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31918   (eval $ac_try) 2>&5
31919   ac_status=$?
31920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31921   (exit $ac_status); }; }; then
31922   ol_cv_db_db44=yes
31923 else
31924   echo "$as_me: failed program was:" >&5
31925 sed 's/^/| /' conftest.$ac_ext >&5
31926
31927 ol_cv_db_db44=no
31928 fi
31929 rm -f conftest.err conftest.$ac_objext \
31930       conftest$ac_exeext conftest.$ac_ext
31931
31932         LIBS="$ol_LIBS"
31933
31934 fi
31935 echo "$as_me:$LINENO: result: $ol_cv_db_db44" >&5
31936 echo "${ECHO_T}$ol_cv_db_db44" >&6
31937
31938         if test $ol_cv_db_db44 = yes ; then
31939                 ol_cv_lib_db=-ldb44
31940         fi
31941 fi
31942
31943                 if test $ol_cv_lib_db = no ; then
31944         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-44)" >&5
31945 echo $ECHO_N "checking for Berkeley DB link (-ldb-44)... $ECHO_C" >&6
31946 if test "${ol_cv_db_db_44+set}" = set; then
31947   echo $ECHO_N "(cached) $ECHO_C" >&6
31948 else
31949
31950         ol_DB_LIB=-ldb-44
31951         ol_LIBS=$LIBS
31952         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31953
31954         cat >conftest.$ac_ext <<_ACEOF
31955 /* confdefs.h.  */
31956 _ACEOF
31957 cat confdefs.h >>conftest.$ac_ext
31958 cat >>conftest.$ac_ext <<_ACEOF
31959 /* end confdefs.h.  */
31960
31961 #ifdef HAVE_DB_185_H
31962 # include <db_185.h>
31963 #else
31964 # include <db.h>
31965 #endif
31966
31967 #ifndef DB_VERSION_MAJOR
31968 # define DB_VERSION_MAJOR 1
31969 #endif
31970
31971 #ifndef NULL
31972 #define NULL ((void*)0)
31973 #endif
31974
31975 int
31976 main ()
31977 {
31978
31979 #if DB_VERSION_MAJOR > 1
31980         {
31981                 char *version;
31982                 int major, minor, patch;
31983
31984                 version = db_version( &major, &minor, &patch );
31985
31986                 if( major != DB_VERSION_MAJOR ||
31987                         minor < DB_VERSION_MINOR )
31988                 {
31989                         printf("Berkeley DB version mismatch\n"
31990                                 "\theader: %s\n\tlibrary: %s\n",
31991                                 DB_VERSION_STRING, version);
31992                         return 1;
31993                 }
31994         }
31995 #endif
31996
31997 #if DB_VERSION_MAJOR > 2
31998         db_env_create( NULL, 0 );
31999 #elif DB_VERSION_MAJOR > 1
32000         db_appexit( NULL );
32001 #else
32002         (void) dbopen( NULL, 0, 0, 0, NULL);
32003 #endif
32004
32005   ;
32006   return 0;
32007 }
32008 _ACEOF
32009 rm -f conftest.$ac_objext conftest$ac_exeext
32010 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32011   (eval $ac_link) 2>conftest.er1
32012   ac_status=$?
32013   grep -v '^ *+' conftest.er1 >conftest.err
32014   rm -f conftest.er1
32015   cat conftest.err >&5
32016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32017   (exit $ac_status); } &&
32018          { ac_try='test -z "$ac_c_werror_flag"
32019                          || test ! -s conftest.err'
32020   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32021   (eval $ac_try) 2>&5
32022   ac_status=$?
32023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32024   (exit $ac_status); }; } &&
32025          { ac_try='test -s conftest$ac_exeext'
32026   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32027   (eval $ac_try) 2>&5
32028   ac_status=$?
32029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32030   (exit $ac_status); }; }; then
32031   ol_cv_db_db_44=yes
32032 else
32033   echo "$as_me: failed program was:" >&5
32034 sed 's/^/| /' conftest.$ac_ext >&5
32035
32036 ol_cv_db_db_44=no
32037 fi
32038 rm -f conftest.err conftest.$ac_objext \
32039       conftest$ac_exeext conftest.$ac_ext
32040
32041         LIBS="$ol_LIBS"
32042
32043 fi
32044 echo "$as_me:$LINENO: result: $ol_cv_db_db_44" >&5
32045 echo "${ECHO_T}$ol_cv_db_db_44" >&6
32046
32047         if test $ol_cv_db_db_44 = yes ; then
32048                 ol_cv_lib_db=-ldb-44
32049         fi
32050 fi
32051
32052                 if test $ol_cv_lib_db = no ; then
32053         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.4)" >&5
32054 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.4)... $ECHO_C" >&6
32055 if test "${ol_cv_db_db_4_dot_4+set}" = set; then
32056   echo $ECHO_N "(cached) $ECHO_C" >&6
32057 else
32058
32059         ol_DB_LIB=-ldb-4.4
32060         ol_LIBS=$LIBS
32061         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32062
32063         cat >conftest.$ac_ext <<_ACEOF
32064 /* confdefs.h.  */
32065 _ACEOF
32066 cat confdefs.h >>conftest.$ac_ext
32067 cat >>conftest.$ac_ext <<_ACEOF
32068 /* end confdefs.h.  */
32069
32070 #ifdef HAVE_DB_185_H
32071 # include <db_185.h>
32072 #else
32073 # include <db.h>
32074 #endif
32075
32076 #ifndef DB_VERSION_MAJOR
32077 # define DB_VERSION_MAJOR 1
32078 #endif
32079
32080 #ifndef NULL
32081 #define NULL ((void*)0)
32082 #endif
32083
32084 int
32085 main ()
32086 {
32087
32088 #if DB_VERSION_MAJOR > 1
32089         {
32090                 char *version;
32091                 int major, minor, patch;
32092
32093                 version = db_version( &major, &minor, &patch );
32094
32095                 if( major != DB_VERSION_MAJOR ||
32096                         minor < DB_VERSION_MINOR )
32097                 {
32098                         printf("Berkeley DB version mismatch\n"
32099                                 "\theader: %s\n\tlibrary: %s\n",
32100                                 DB_VERSION_STRING, version);
32101                         return 1;
32102                 }
32103         }
32104 #endif
32105
32106 #if DB_VERSION_MAJOR > 2
32107         db_env_create( NULL, 0 );
32108 #elif DB_VERSION_MAJOR > 1
32109         db_appexit( NULL );
32110 #else
32111         (void) dbopen( NULL, 0, 0, 0, NULL);
32112 #endif
32113
32114   ;
32115   return 0;
32116 }
32117 _ACEOF
32118 rm -f conftest.$ac_objext conftest$ac_exeext
32119 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32120   (eval $ac_link) 2>conftest.er1
32121   ac_status=$?
32122   grep -v '^ *+' conftest.er1 >conftest.err
32123   rm -f conftest.er1
32124   cat conftest.err >&5
32125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32126   (exit $ac_status); } &&
32127          { ac_try='test -z "$ac_c_werror_flag"
32128                          || test ! -s conftest.err'
32129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32130   (eval $ac_try) 2>&5
32131   ac_status=$?
32132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32133   (exit $ac_status); }; } &&
32134          { ac_try='test -s conftest$ac_exeext'
32135   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32136   (eval $ac_try) 2>&5
32137   ac_status=$?
32138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32139   (exit $ac_status); }; }; then
32140   ol_cv_db_db_4_dot_4=yes
32141 else
32142   echo "$as_me: failed program was:" >&5
32143 sed 's/^/| /' conftest.$ac_ext >&5
32144
32145 ol_cv_db_db_4_dot_4=no
32146 fi
32147 rm -f conftest.err conftest.$ac_objext \
32148       conftest$ac_exeext conftest.$ac_ext
32149
32150         LIBS="$ol_LIBS"
32151
32152 fi
32153 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_4" >&5
32154 echo "${ECHO_T}$ol_cv_db_db_4_dot_4" >&6
32155
32156         if test $ol_cv_db_db_4_dot_4 = yes ; then
32157                 ol_cv_lib_db=-ldb-4.4
32158         fi
32159 fi
32160
32161                 if test $ol_cv_lib_db = no ; then
32162         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-4)" >&5
32163 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-4)... $ECHO_C" >&6
32164 if test "${ol_cv_db_db_4_4+set}" = set; then
32165   echo $ECHO_N "(cached) $ECHO_C" >&6
32166 else
32167
32168         ol_DB_LIB=-ldb-4-4
32169         ol_LIBS=$LIBS
32170         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32171
32172         cat >conftest.$ac_ext <<_ACEOF
32173 /* confdefs.h.  */
32174 _ACEOF
32175 cat confdefs.h >>conftest.$ac_ext
32176 cat >>conftest.$ac_ext <<_ACEOF
32177 /* end confdefs.h.  */
32178
32179 #ifdef HAVE_DB_185_H
32180 # include <db_185.h>
32181 #else
32182 # include <db.h>
32183 #endif
32184
32185 #ifndef DB_VERSION_MAJOR
32186 # define DB_VERSION_MAJOR 1
32187 #endif
32188
32189 #ifndef NULL
32190 #define NULL ((void*)0)
32191 #endif
32192
32193 int
32194 main ()
32195 {
32196
32197 #if DB_VERSION_MAJOR > 1
32198         {
32199                 char *version;
32200                 int major, minor, patch;
32201
32202                 version = db_version( &major, &minor, &patch );
32203
32204                 if( major != DB_VERSION_MAJOR ||
32205                         minor < DB_VERSION_MINOR )
32206                 {
32207                         printf("Berkeley DB version mismatch\n"
32208                                 "\theader: %s\n\tlibrary: %s\n",
32209                                 DB_VERSION_STRING, version);
32210                         return 1;
32211                 }
32212         }
32213 #endif
32214
32215 #if DB_VERSION_MAJOR > 2
32216         db_env_create( NULL, 0 );
32217 #elif DB_VERSION_MAJOR > 1
32218         db_appexit( NULL );
32219 #else
32220         (void) dbopen( NULL, 0, 0, 0, NULL);
32221 #endif
32222
32223   ;
32224   return 0;
32225 }
32226 _ACEOF
32227 rm -f conftest.$ac_objext conftest$ac_exeext
32228 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32229   (eval $ac_link) 2>conftest.er1
32230   ac_status=$?
32231   grep -v '^ *+' conftest.er1 >conftest.err
32232   rm -f conftest.er1
32233   cat conftest.err >&5
32234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32235   (exit $ac_status); } &&
32236          { ac_try='test -z "$ac_c_werror_flag"
32237                          || test ! -s conftest.err'
32238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32239   (eval $ac_try) 2>&5
32240   ac_status=$?
32241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32242   (exit $ac_status); }; } &&
32243          { ac_try='test -s conftest$ac_exeext'
32244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32245   (eval $ac_try) 2>&5
32246   ac_status=$?
32247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32248   (exit $ac_status); }; }; then
32249   ol_cv_db_db_4_4=yes
32250 else
32251   echo "$as_me: failed program was:" >&5
32252 sed 's/^/| /' conftest.$ac_ext >&5
32253
32254 ol_cv_db_db_4_4=no
32255 fi
32256 rm -f conftest.err conftest.$ac_objext \
32257       conftest$ac_exeext conftest.$ac_ext
32258
32259         LIBS="$ol_LIBS"
32260
32261 fi
32262 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_4" >&5
32263 echo "${ECHO_T}$ol_cv_db_db_4_4" >&6
32264
32265         if test $ol_cv_db_db_4_4 = yes ; then
32266                 ol_cv_lib_db=-ldb-4-4
32267         fi
32268 fi
32269
32270         elif test $ol_cv_bdb_minor = 3 ; then
32271                 if test $ol_cv_lib_db = no ; then
32272         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb43)" >&5
32273 echo $ECHO_N "checking for Berkeley DB link (-ldb43)... $ECHO_C" >&6
32274 if test "${ol_cv_db_db43+set}" = set; then
32275   echo $ECHO_N "(cached) $ECHO_C" >&6
32276 else
32277
32278         ol_DB_LIB=-ldb43
32279         ol_LIBS=$LIBS
32280         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32281
32282         cat >conftest.$ac_ext <<_ACEOF
32283 /* confdefs.h.  */
32284 _ACEOF
32285 cat confdefs.h >>conftest.$ac_ext
32286 cat >>conftest.$ac_ext <<_ACEOF
32287 /* end confdefs.h.  */
32288
32289 #ifdef HAVE_DB_185_H
32290 # include <db_185.h>
32291 #else
32292 # include <db.h>
32293 #endif
32294
32295 #ifndef DB_VERSION_MAJOR
32296 # define DB_VERSION_MAJOR 1
32297 #endif
32298
32299 #ifndef NULL
32300 #define NULL ((void*)0)
32301 #endif
32302
32303 int
32304 main ()
32305 {
32306
32307 #if DB_VERSION_MAJOR > 1
32308         {
32309                 char *version;
32310                 int major, minor, patch;
32311
32312                 version = db_version( &major, &minor, &patch );
32313
32314                 if( major != DB_VERSION_MAJOR ||
32315                         minor < DB_VERSION_MINOR )
32316                 {
32317                         printf("Berkeley DB version mismatch\n"
32318                                 "\theader: %s\n\tlibrary: %s\n",
32319                                 DB_VERSION_STRING, version);
32320                         return 1;
32321                 }
32322         }
32323 #endif
32324
32325 #if DB_VERSION_MAJOR > 2
32326         db_env_create( NULL, 0 );
32327 #elif DB_VERSION_MAJOR > 1
32328         db_appexit( NULL );
32329 #else
32330         (void) dbopen( NULL, 0, 0, 0, NULL);
32331 #endif
32332
32333   ;
32334   return 0;
32335 }
32336 _ACEOF
32337 rm -f conftest.$ac_objext conftest$ac_exeext
32338 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32339   (eval $ac_link) 2>conftest.er1
32340   ac_status=$?
32341   grep -v '^ *+' conftest.er1 >conftest.err
32342   rm -f conftest.er1
32343   cat conftest.err >&5
32344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32345   (exit $ac_status); } &&
32346          { ac_try='test -z "$ac_c_werror_flag"
32347                          || test ! -s conftest.err'
32348   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32349   (eval $ac_try) 2>&5
32350   ac_status=$?
32351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32352   (exit $ac_status); }; } &&
32353          { ac_try='test -s conftest$ac_exeext'
32354   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32355   (eval $ac_try) 2>&5
32356   ac_status=$?
32357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32358   (exit $ac_status); }; }; then
32359   ol_cv_db_db43=yes
32360 else
32361   echo "$as_me: failed program was:" >&5
32362 sed 's/^/| /' conftest.$ac_ext >&5
32363
32364 ol_cv_db_db43=no
32365 fi
32366 rm -f conftest.err conftest.$ac_objext \
32367       conftest$ac_exeext conftest.$ac_ext
32368
32369         LIBS="$ol_LIBS"
32370
32371 fi
32372 echo "$as_me:$LINENO: result: $ol_cv_db_db43" >&5
32373 echo "${ECHO_T}$ol_cv_db_db43" >&6
32374
32375         if test $ol_cv_db_db43 = yes ; then
32376                 ol_cv_lib_db=-ldb43
32377         fi
32378 fi
32379
32380                 if test $ol_cv_lib_db = no ; then
32381         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-43)" >&5
32382 echo $ECHO_N "checking for Berkeley DB link (-ldb-43)... $ECHO_C" >&6
32383 if test "${ol_cv_db_db_43+set}" = set; then
32384   echo $ECHO_N "(cached) $ECHO_C" >&6
32385 else
32386
32387         ol_DB_LIB=-ldb-43
32388         ol_LIBS=$LIBS
32389         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32390
32391         cat >conftest.$ac_ext <<_ACEOF
32392 /* confdefs.h.  */
32393 _ACEOF
32394 cat confdefs.h >>conftest.$ac_ext
32395 cat >>conftest.$ac_ext <<_ACEOF
32396 /* end confdefs.h.  */
32397
32398 #ifdef HAVE_DB_185_H
32399 # include <db_185.h>
32400 #else
32401 # include <db.h>
32402 #endif
32403
32404 #ifndef DB_VERSION_MAJOR
32405 # define DB_VERSION_MAJOR 1
32406 #endif
32407
32408 #ifndef NULL
32409 #define NULL ((void*)0)
32410 #endif
32411
32412 int
32413 main ()
32414 {
32415
32416 #if DB_VERSION_MAJOR > 1
32417         {
32418                 char *version;
32419                 int major, minor, patch;
32420
32421                 version = db_version( &major, &minor, &patch );
32422
32423                 if( major != DB_VERSION_MAJOR ||
32424                         minor < DB_VERSION_MINOR )
32425                 {
32426                         printf("Berkeley DB version mismatch\n"
32427                                 "\theader: %s\n\tlibrary: %s\n",
32428                                 DB_VERSION_STRING, version);
32429                         return 1;
32430                 }
32431         }
32432 #endif
32433
32434 #if DB_VERSION_MAJOR > 2
32435         db_env_create( NULL, 0 );
32436 #elif DB_VERSION_MAJOR > 1
32437         db_appexit( NULL );
32438 #else
32439         (void) dbopen( NULL, 0, 0, 0, NULL);
32440 #endif
32441
32442   ;
32443   return 0;
32444 }
32445 _ACEOF
32446 rm -f conftest.$ac_objext conftest$ac_exeext
32447 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32448   (eval $ac_link) 2>conftest.er1
32449   ac_status=$?
32450   grep -v '^ *+' conftest.er1 >conftest.err
32451   rm -f conftest.er1
32452   cat conftest.err >&5
32453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32454   (exit $ac_status); } &&
32455          { ac_try='test -z "$ac_c_werror_flag"
32456                          || test ! -s conftest.err'
32457   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32458   (eval $ac_try) 2>&5
32459   ac_status=$?
32460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32461   (exit $ac_status); }; } &&
32462          { ac_try='test -s conftest$ac_exeext'
32463   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32464   (eval $ac_try) 2>&5
32465   ac_status=$?
32466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32467   (exit $ac_status); }; }; then
32468   ol_cv_db_db_43=yes
32469 else
32470   echo "$as_me: failed program was:" >&5
32471 sed 's/^/| /' conftest.$ac_ext >&5
32472
32473 ol_cv_db_db_43=no
32474 fi
32475 rm -f conftest.err conftest.$ac_objext \
32476       conftest$ac_exeext conftest.$ac_ext
32477
32478         LIBS="$ol_LIBS"
32479
32480 fi
32481 echo "$as_me:$LINENO: result: $ol_cv_db_db_43" >&5
32482 echo "${ECHO_T}$ol_cv_db_db_43" >&6
32483
32484         if test $ol_cv_db_db_43 = yes ; then
32485                 ol_cv_lib_db=-ldb-43
32486         fi
32487 fi
32488
32489                 if test $ol_cv_lib_db = no ; then
32490         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.3)" >&5
32491 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.3)... $ECHO_C" >&6
32492 if test "${ol_cv_db_db_4_dot_3+set}" = set; then
32493   echo $ECHO_N "(cached) $ECHO_C" >&6
32494 else
32495
32496         ol_DB_LIB=-ldb-4.3
32497         ol_LIBS=$LIBS
32498         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32499
32500         cat >conftest.$ac_ext <<_ACEOF
32501 /* confdefs.h.  */
32502 _ACEOF
32503 cat confdefs.h >>conftest.$ac_ext
32504 cat >>conftest.$ac_ext <<_ACEOF
32505 /* end confdefs.h.  */
32506
32507 #ifdef HAVE_DB_185_H
32508 # include <db_185.h>
32509 #else
32510 # include <db.h>
32511 #endif
32512
32513 #ifndef DB_VERSION_MAJOR
32514 # define DB_VERSION_MAJOR 1
32515 #endif
32516
32517 #ifndef NULL
32518 #define NULL ((void*)0)
32519 #endif
32520
32521 int
32522 main ()
32523 {
32524
32525 #if DB_VERSION_MAJOR > 1
32526         {
32527                 char *version;
32528                 int major, minor, patch;
32529
32530                 version = db_version( &major, &minor, &patch );
32531
32532                 if( major != DB_VERSION_MAJOR ||
32533                         minor < DB_VERSION_MINOR )
32534                 {
32535                         printf("Berkeley DB version mismatch\n"
32536                                 "\theader: %s\n\tlibrary: %s\n",
32537                                 DB_VERSION_STRING, version);
32538                         return 1;
32539                 }
32540         }
32541 #endif
32542
32543 #if DB_VERSION_MAJOR > 2
32544         db_env_create( NULL, 0 );
32545 #elif DB_VERSION_MAJOR > 1
32546         db_appexit( NULL );
32547 #else
32548         (void) dbopen( NULL, 0, 0, 0, NULL);
32549 #endif
32550
32551   ;
32552   return 0;
32553 }
32554 _ACEOF
32555 rm -f conftest.$ac_objext conftest$ac_exeext
32556 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32557   (eval $ac_link) 2>conftest.er1
32558   ac_status=$?
32559   grep -v '^ *+' conftest.er1 >conftest.err
32560   rm -f conftest.er1
32561   cat conftest.err >&5
32562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32563   (exit $ac_status); } &&
32564          { ac_try='test -z "$ac_c_werror_flag"
32565                          || test ! -s conftest.err'
32566   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32567   (eval $ac_try) 2>&5
32568   ac_status=$?
32569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32570   (exit $ac_status); }; } &&
32571          { ac_try='test -s conftest$ac_exeext'
32572   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32573   (eval $ac_try) 2>&5
32574   ac_status=$?
32575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32576   (exit $ac_status); }; }; then
32577   ol_cv_db_db_4_dot_3=yes
32578 else
32579   echo "$as_me: failed program was:" >&5
32580 sed 's/^/| /' conftest.$ac_ext >&5
32581
32582 ol_cv_db_db_4_dot_3=no
32583 fi
32584 rm -f conftest.err conftest.$ac_objext \
32585       conftest$ac_exeext conftest.$ac_ext
32586
32587         LIBS="$ol_LIBS"
32588
32589 fi
32590 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_3" >&5
32591 echo "${ECHO_T}$ol_cv_db_db_4_dot_3" >&6
32592
32593         if test $ol_cv_db_db_4_dot_3 = yes ; then
32594                 ol_cv_lib_db=-ldb-4.3
32595         fi
32596 fi
32597
32598                 if test $ol_cv_lib_db = no ; then
32599         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-3)" >&5
32600 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-3)... $ECHO_C" >&6
32601 if test "${ol_cv_db_db_4_3+set}" = set; then
32602   echo $ECHO_N "(cached) $ECHO_C" >&6
32603 else
32604
32605         ol_DB_LIB=-ldb-4-3
32606         ol_LIBS=$LIBS
32607         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32608
32609         cat >conftest.$ac_ext <<_ACEOF
32610 /* confdefs.h.  */
32611 _ACEOF
32612 cat confdefs.h >>conftest.$ac_ext
32613 cat >>conftest.$ac_ext <<_ACEOF
32614 /* end confdefs.h.  */
32615
32616 #ifdef HAVE_DB_185_H
32617 # include <db_185.h>
32618 #else
32619 # include <db.h>
32620 #endif
32621
32622 #ifndef DB_VERSION_MAJOR
32623 # define DB_VERSION_MAJOR 1
32624 #endif
32625
32626 #ifndef NULL
32627 #define NULL ((void*)0)
32628 #endif
32629
32630 int
32631 main ()
32632 {
32633
32634 #if DB_VERSION_MAJOR > 1
32635         {
32636                 char *version;
32637                 int major, minor, patch;
32638
32639                 version = db_version( &major, &minor, &patch );
32640
32641                 if( major != DB_VERSION_MAJOR ||
32642                         minor < DB_VERSION_MINOR )
32643                 {
32644                         printf("Berkeley DB version mismatch\n"
32645                                 "\theader: %s\n\tlibrary: %s\n",
32646                                 DB_VERSION_STRING, version);
32647                         return 1;
32648                 }
32649         }
32650 #endif
32651
32652 #if DB_VERSION_MAJOR > 2
32653         db_env_create( NULL, 0 );
32654 #elif DB_VERSION_MAJOR > 1
32655         db_appexit( NULL );
32656 #else
32657         (void) dbopen( NULL, 0, 0, 0, NULL);
32658 #endif
32659
32660   ;
32661   return 0;
32662 }
32663 _ACEOF
32664 rm -f conftest.$ac_objext conftest$ac_exeext
32665 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32666   (eval $ac_link) 2>conftest.er1
32667   ac_status=$?
32668   grep -v '^ *+' conftest.er1 >conftest.err
32669   rm -f conftest.er1
32670   cat conftest.err >&5
32671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32672   (exit $ac_status); } &&
32673          { ac_try='test -z "$ac_c_werror_flag"
32674                          || test ! -s conftest.err'
32675   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32676   (eval $ac_try) 2>&5
32677   ac_status=$?
32678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32679   (exit $ac_status); }; } &&
32680          { ac_try='test -s conftest$ac_exeext'
32681   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32682   (eval $ac_try) 2>&5
32683   ac_status=$?
32684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32685   (exit $ac_status); }; }; then
32686   ol_cv_db_db_4_3=yes
32687 else
32688   echo "$as_me: failed program was:" >&5
32689 sed 's/^/| /' conftest.$ac_ext >&5
32690
32691 ol_cv_db_db_4_3=no
32692 fi
32693 rm -f conftest.err conftest.$ac_objext \
32694       conftest$ac_exeext conftest.$ac_ext
32695
32696         LIBS="$ol_LIBS"
32697
32698 fi
32699 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_3" >&5
32700 echo "${ECHO_T}$ol_cv_db_db_4_3" >&6
32701
32702         if test $ol_cv_db_db_4_3 = yes ; then
32703                 ol_cv_lib_db=-ldb-4-3
32704         fi
32705 fi
32706
32707         elif test $ol_cv_bdb_minor = 2 ; then
32708                 if test $ol_cv_lib_db = no ; then
32709         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb42)" >&5
32710 echo $ECHO_N "checking for Berkeley DB link (-ldb42)... $ECHO_C" >&6
32711 if test "${ol_cv_db_db42+set}" = set; then
32712   echo $ECHO_N "(cached) $ECHO_C" >&6
32713 else
32714
32715         ol_DB_LIB=-ldb42
32716         ol_LIBS=$LIBS
32717         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32718
32719         cat >conftest.$ac_ext <<_ACEOF
32720 /* confdefs.h.  */
32721 _ACEOF
32722 cat confdefs.h >>conftest.$ac_ext
32723 cat >>conftest.$ac_ext <<_ACEOF
32724 /* end confdefs.h.  */
32725
32726 #ifdef HAVE_DB_185_H
32727 # include <db_185.h>
32728 #else
32729 # include <db.h>
32730 #endif
32731
32732 #ifndef DB_VERSION_MAJOR
32733 # define DB_VERSION_MAJOR 1
32734 #endif
32735
32736 #ifndef NULL
32737 #define NULL ((void*)0)
32738 #endif
32739
32740 int
32741 main ()
32742 {
32743
32744 #if DB_VERSION_MAJOR > 1
32745         {
32746                 char *version;
32747                 int major, minor, patch;
32748
32749                 version = db_version( &major, &minor, &patch );
32750
32751                 if( major != DB_VERSION_MAJOR ||
32752                         minor < DB_VERSION_MINOR )
32753                 {
32754                         printf("Berkeley DB version mismatch\n"
32755                                 "\theader: %s\n\tlibrary: %s\n",
32756                                 DB_VERSION_STRING, version);
32757                         return 1;
32758                 }
32759         }
32760 #endif
32761
32762 #if DB_VERSION_MAJOR > 2
32763         db_env_create( NULL, 0 );
32764 #elif DB_VERSION_MAJOR > 1
32765         db_appexit( NULL );
32766 #else
32767         (void) dbopen( NULL, 0, 0, 0, NULL);
32768 #endif
32769
32770   ;
32771   return 0;
32772 }
32773 _ACEOF
32774 rm -f conftest.$ac_objext conftest$ac_exeext
32775 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32776   (eval $ac_link) 2>conftest.er1
32777   ac_status=$?
32778   grep -v '^ *+' conftest.er1 >conftest.err
32779   rm -f conftest.er1
32780   cat conftest.err >&5
32781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32782   (exit $ac_status); } &&
32783          { ac_try='test -z "$ac_c_werror_flag"
32784                          || test ! -s conftest.err'
32785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32786   (eval $ac_try) 2>&5
32787   ac_status=$?
32788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32789   (exit $ac_status); }; } &&
32790          { ac_try='test -s conftest$ac_exeext'
32791   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32792   (eval $ac_try) 2>&5
32793   ac_status=$?
32794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32795   (exit $ac_status); }; }; then
32796   ol_cv_db_db42=yes
32797 else
32798   echo "$as_me: failed program was:" >&5
32799 sed 's/^/| /' conftest.$ac_ext >&5
32800
32801 ol_cv_db_db42=no
32802 fi
32803 rm -f conftest.err conftest.$ac_objext \
32804       conftest$ac_exeext conftest.$ac_ext
32805
32806         LIBS="$ol_LIBS"
32807
32808 fi
32809 echo "$as_me:$LINENO: result: $ol_cv_db_db42" >&5
32810 echo "${ECHO_T}$ol_cv_db_db42" >&6
32811
32812         if test $ol_cv_db_db42 = yes ; then
32813                 ol_cv_lib_db=-ldb42
32814         fi
32815 fi
32816
32817                 if test $ol_cv_lib_db = no ; then
32818         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-42)" >&5
32819 echo $ECHO_N "checking for Berkeley DB link (-ldb-42)... $ECHO_C" >&6
32820 if test "${ol_cv_db_db_42+set}" = set; then
32821   echo $ECHO_N "(cached) $ECHO_C" >&6
32822 else
32823
32824         ol_DB_LIB=-ldb-42
32825         ol_LIBS=$LIBS
32826         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32827
32828         cat >conftest.$ac_ext <<_ACEOF
32829 /* confdefs.h.  */
32830 _ACEOF
32831 cat confdefs.h >>conftest.$ac_ext
32832 cat >>conftest.$ac_ext <<_ACEOF
32833 /* end confdefs.h.  */
32834
32835 #ifdef HAVE_DB_185_H
32836 # include <db_185.h>
32837 #else
32838 # include <db.h>
32839 #endif
32840
32841 #ifndef DB_VERSION_MAJOR
32842 # define DB_VERSION_MAJOR 1
32843 #endif
32844
32845 #ifndef NULL
32846 #define NULL ((void*)0)
32847 #endif
32848
32849 int
32850 main ()
32851 {
32852
32853 #if DB_VERSION_MAJOR > 1
32854         {
32855                 char *version;
32856                 int major, minor, patch;
32857
32858                 version = db_version( &major, &minor, &patch );
32859
32860                 if( major != DB_VERSION_MAJOR ||
32861                         minor < DB_VERSION_MINOR )
32862                 {
32863                         printf("Berkeley DB version mismatch\n"
32864                                 "\theader: %s\n\tlibrary: %s\n",
32865                                 DB_VERSION_STRING, version);
32866                         return 1;
32867                 }
32868         }
32869 #endif
32870
32871 #if DB_VERSION_MAJOR > 2
32872         db_env_create( NULL, 0 );
32873 #elif DB_VERSION_MAJOR > 1
32874         db_appexit( NULL );
32875 #else
32876         (void) dbopen( NULL, 0, 0, 0, NULL);
32877 #endif
32878
32879   ;
32880   return 0;
32881 }
32882 _ACEOF
32883 rm -f conftest.$ac_objext conftest$ac_exeext
32884 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32885   (eval $ac_link) 2>conftest.er1
32886   ac_status=$?
32887   grep -v '^ *+' conftest.er1 >conftest.err
32888   rm -f conftest.er1
32889   cat conftest.err >&5
32890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32891   (exit $ac_status); } &&
32892          { ac_try='test -z "$ac_c_werror_flag"
32893                          || test ! -s conftest.err'
32894   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32895   (eval $ac_try) 2>&5
32896   ac_status=$?
32897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32898   (exit $ac_status); }; } &&
32899          { ac_try='test -s conftest$ac_exeext'
32900   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32901   (eval $ac_try) 2>&5
32902   ac_status=$?
32903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32904   (exit $ac_status); }; }; then
32905   ol_cv_db_db_42=yes
32906 else
32907   echo "$as_me: failed program was:" >&5
32908 sed 's/^/| /' conftest.$ac_ext >&5
32909
32910 ol_cv_db_db_42=no
32911 fi
32912 rm -f conftest.err conftest.$ac_objext \
32913       conftest$ac_exeext conftest.$ac_ext
32914
32915         LIBS="$ol_LIBS"
32916
32917 fi
32918 echo "$as_me:$LINENO: result: $ol_cv_db_db_42" >&5
32919 echo "${ECHO_T}$ol_cv_db_db_42" >&6
32920
32921         if test $ol_cv_db_db_42 = yes ; then
32922                 ol_cv_lib_db=-ldb-42
32923         fi
32924 fi
32925
32926                 if test $ol_cv_lib_db = no ; then
32927         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.2)" >&5
32928 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.2)... $ECHO_C" >&6
32929 if test "${ol_cv_db_db_4_dot_2+set}" = set; then
32930   echo $ECHO_N "(cached) $ECHO_C" >&6
32931 else
32932
32933         ol_DB_LIB=-ldb-4.2
32934         ol_LIBS=$LIBS
32935         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32936
32937         cat >conftest.$ac_ext <<_ACEOF
32938 /* confdefs.h.  */
32939 _ACEOF
32940 cat confdefs.h >>conftest.$ac_ext
32941 cat >>conftest.$ac_ext <<_ACEOF
32942 /* end confdefs.h.  */
32943
32944 #ifdef HAVE_DB_185_H
32945 # include <db_185.h>
32946 #else
32947 # include <db.h>
32948 #endif
32949
32950 #ifndef DB_VERSION_MAJOR
32951 # define DB_VERSION_MAJOR 1
32952 #endif
32953
32954 #ifndef NULL
32955 #define NULL ((void*)0)
32956 #endif
32957
32958 int
32959 main ()
32960 {
32961
32962 #if DB_VERSION_MAJOR > 1
32963         {
32964                 char *version;
32965                 int major, minor, patch;
32966
32967                 version = db_version( &major, &minor, &patch );
32968
32969                 if( major != DB_VERSION_MAJOR ||
32970                         minor < DB_VERSION_MINOR )
32971                 {
32972                         printf("Berkeley DB version mismatch\n"
32973                                 "\theader: %s\n\tlibrary: %s\n",
32974                                 DB_VERSION_STRING, version);
32975                         return 1;
32976                 }
32977         }
32978 #endif
32979
32980 #if DB_VERSION_MAJOR > 2
32981         db_env_create( NULL, 0 );
32982 #elif DB_VERSION_MAJOR > 1
32983         db_appexit( NULL );
32984 #else
32985         (void) dbopen( NULL, 0, 0, 0, NULL);
32986 #endif
32987
32988   ;
32989   return 0;
32990 }
32991 _ACEOF
32992 rm -f conftest.$ac_objext conftest$ac_exeext
32993 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32994   (eval $ac_link) 2>conftest.er1
32995   ac_status=$?
32996   grep -v '^ *+' conftest.er1 >conftest.err
32997   rm -f conftest.er1
32998   cat conftest.err >&5
32999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33000   (exit $ac_status); } &&
33001          { ac_try='test -z "$ac_c_werror_flag"
33002                          || test ! -s conftest.err'
33003   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33004   (eval $ac_try) 2>&5
33005   ac_status=$?
33006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33007   (exit $ac_status); }; } &&
33008          { ac_try='test -s conftest$ac_exeext'
33009   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33010   (eval $ac_try) 2>&5
33011   ac_status=$?
33012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33013   (exit $ac_status); }; }; then
33014   ol_cv_db_db_4_dot_2=yes
33015 else
33016   echo "$as_me: failed program was:" >&5
33017 sed 's/^/| /' conftest.$ac_ext >&5
33018
33019 ol_cv_db_db_4_dot_2=no
33020 fi
33021 rm -f conftest.err conftest.$ac_objext \
33022       conftest$ac_exeext conftest.$ac_ext
33023
33024         LIBS="$ol_LIBS"
33025
33026 fi
33027 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_2" >&5
33028 echo "${ECHO_T}$ol_cv_db_db_4_dot_2" >&6
33029
33030         if test $ol_cv_db_db_4_dot_2 = yes ; then
33031                 ol_cv_lib_db=-ldb-4.2
33032         fi
33033 fi
33034
33035                 if test $ol_cv_lib_db = no ; then
33036         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-2)" >&5
33037 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-2)... $ECHO_C" >&6
33038 if test "${ol_cv_db_db_4_2+set}" = set; then
33039   echo $ECHO_N "(cached) $ECHO_C" >&6
33040 else
33041
33042         ol_DB_LIB=-ldb-4-2
33043         ol_LIBS=$LIBS
33044         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33045
33046         cat >conftest.$ac_ext <<_ACEOF
33047 /* confdefs.h.  */
33048 _ACEOF
33049 cat confdefs.h >>conftest.$ac_ext
33050 cat >>conftest.$ac_ext <<_ACEOF
33051 /* end confdefs.h.  */
33052
33053 #ifdef HAVE_DB_185_H
33054 # include <db_185.h>
33055 #else
33056 # include <db.h>
33057 #endif
33058
33059 #ifndef DB_VERSION_MAJOR
33060 # define DB_VERSION_MAJOR 1
33061 #endif
33062
33063 #ifndef NULL
33064 #define NULL ((void*)0)
33065 #endif
33066
33067 int
33068 main ()
33069 {
33070
33071 #if DB_VERSION_MAJOR > 1
33072         {
33073                 char *version;
33074                 int major, minor, patch;
33075
33076                 version = db_version( &major, &minor, &patch );
33077
33078                 if( major != DB_VERSION_MAJOR ||
33079                         minor < DB_VERSION_MINOR )
33080                 {
33081                         printf("Berkeley DB version mismatch\n"
33082                                 "\theader: %s\n\tlibrary: %s\n",
33083                                 DB_VERSION_STRING, version);
33084                         return 1;
33085                 }
33086         }
33087 #endif
33088
33089 #if DB_VERSION_MAJOR > 2
33090         db_env_create( NULL, 0 );
33091 #elif DB_VERSION_MAJOR > 1
33092         db_appexit( NULL );
33093 #else
33094         (void) dbopen( NULL, 0, 0, 0, NULL);
33095 #endif
33096
33097   ;
33098   return 0;
33099 }
33100 _ACEOF
33101 rm -f conftest.$ac_objext conftest$ac_exeext
33102 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33103   (eval $ac_link) 2>conftest.er1
33104   ac_status=$?
33105   grep -v '^ *+' conftest.er1 >conftest.err
33106   rm -f conftest.er1
33107   cat conftest.err >&5
33108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33109   (exit $ac_status); } &&
33110          { ac_try='test -z "$ac_c_werror_flag"
33111                          || test ! -s conftest.err'
33112   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33113   (eval $ac_try) 2>&5
33114   ac_status=$?
33115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33116   (exit $ac_status); }; } &&
33117          { ac_try='test -s conftest$ac_exeext'
33118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33119   (eval $ac_try) 2>&5
33120   ac_status=$?
33121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33122   (exit $ac_status); }; }; then
33123   ol_cv_db_db_4_2=yes
33124 else
33125   echo "$as_me: failed program was:" >&5
33126 sed 's/^/| /' conftest.$ac_ext >&5
33127
33128 ol_cv_db_db_4_2=no
33129 fi
33130 rm -f conftest.err conftest.$ac_objext \
33131       conftest$ac_exeext conftest.$ac_ext
33132
33133         LIBS="$ol_LIBS"
33134
33135 fi
33136 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_2" >&5
33137 echo "${ECHO_T}$ol_cv_db_db_4_2" >&6
33138
33139         if test $ol_cv_db_db_4_2 = yes ; then
33140                 ol_cv_lib_db=-ldb-4-2
33141         fi
33142 fi
33143
33144         elif test $ol_cv_bdb_minor = 1 ; then
33145                 if test $ol_cv_lib_db = no ; then
33146         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb41)" >&5
33147 echo $ECHO_N "checking for Berkeley DB link (-ldb41)... $ECHO_C" >&6
33148 if test "${ol_cv_db_db41+set}" = set; then
33149   echo $ECHO_N "(cached) $ECHO_C" >&6
33150 else
33151
33152         ol_DB_LIB=-ldb41
33153         ol_LIBS=$LIBS
33154         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33155
33156         cat >conftest.$ac_ext <<_ACEOF
33157 /* confdefs.h.  */
33158 _ACEOF
33159 cat confdefs.h >>conftest.$ac_ext
33160 cat >>conftest.$ac_ext <<_ACEOF
33161 /* end confdefs.h.  */
33162
33163 #ifdef HAVE_DB_185_H
33164 # include <db_185.h>
33165 #else
33166 # include <db.h>
33167 #endif
33168
33169 #ifndef DB_VERSION_MAJOR
33170 # define DB_VERSION_MAJOR 1
33171 #endif
33172
33173 #ifndef NULL
33174 #define NULL ((void*)0)
33175 #endif
33176
33177 int
33178 main ()
33179 {
33180
33181 #if DB_VERSION_MAJOR > 1
33182         {
33183                 char *version;
33184                 int major, minor, patch;
33185
33186                 version = db_version( &major, &minor, &patch );
33187
33188                 if( major != DB_VERSION_MAJOR ||
33189                         minor < DB_VERSION_MINOR )
33190                 {
33191                         printf("Berkeley DB version mismatch\n"
33192                                 "\theader: %s\n\tlibrary: %s\n",
33193                                 DB_VERSION_STRING, version);
33194                         return 1;
33195                 }
33196         }
33197 #endif
33198
33199 #if DB_VERSION_MAJOR > 2
33200         db_env_create( NULL, 0 );
33201 #elif DB_VERSION_MAJOR > 1
33202         db_appexit( NULL );
33203 #else
33204         (void) dbopen( NULL, 0, 0, 0, NULL);
33205 #endif
33206
33207   ;
33208   return 0;
33209 }
33210 _ACEOF
33211 rm -f conftest.$ac_objext conftest$ac_exeext
33212 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33213   (eval $ac_link) 2>conftest.er1
33214   ac_status=$?
33215   grep -v '^ *+' conftest.er1 >conftest.err
33216   rm -f conftest.er1
33217   cat conftest.err >&5
33218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33219   (exit $ac_status); } &&
33220          { ac_try='test -z "$ac_c_werror_flag"
33221                          || test ! -s conftest.err'
33222   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33223   (eval $ac_try) 2>&5
33224   ac_status=$?
33225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33226   (exit $ac_status); }; } &&
33227          { ac_try='test -s conftest$ac_exeext'
33228   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33229   (eval $ac_try) 2>&5
33230   ac_status=$?
33231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33232   (exit $ac_status); }; }; then
33233   ol_cv_db_db41=yes
33234 else
33235   echo "$as_me: failed program was:" >&5
33236 sed 's/^/| /' conftest.$ac_ext >&5
33237
33238 ol_cv_db_db41=no
33239 fi
33240 rm -f conftest.err conftest.$ac_objext \
33241       conftest$ac_exeext conftest.$ac_ext
33242
33243         LIBS="$ol_LIBS"
33244
33245 fi
33246 echo "$as_me:$LINENO: result: $ol_cv_db_db41" >&5
33247 echo "${ECHO_T}$ol_cv_db_db41" >&6
33248
33249         if test $ol_cv_db_db41 = yes ; then
33250                 ol_cv_lib_db=-ldb41
33251         fi
33252 fi
33253
33254                 if test $ol_cv_lib_db = no ; then
33255         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-41)" >&5
33256 echo $ECHO_N "checking for Berkeley DB link (-ldb-41)... $ECHO_C" >&6
33257 if test "${ol_cv_db_db_41+set}" = set; then
33258   echo $ECHO_N "(cached) $ECHO_C" >&6
33259 else
33260
33261         ol_DB_LIB=-ldb-41
33262         ol_LIBS=$LIBS
33263         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33264
33265         cat >conftest.$ac_ext <<_ACEOF
33266 /* confdefs.h.  */
33267 _ACEOF
33268 cat confdefs.h >>conftest.$ac_ext
33269 cat >>conftest.$ac_ext <<_ACEOF
33270 /* end confdefs.h.  */
33271
33272 #ifdef HAVE_DB_185_H
33273 # include <db_185.h>
33274 #else
33275 # include <db.h>
33276 #endif
33277
33278 #ifndef DB_VERSION_MAJOR
33279 # define DB_VERSION_MAJOR 1
33280 #endif
33281
33282 #ifndef NULL
33283 #define NULL ((void*)0)
33284 #endif
33285
33286 int
33287 main ()
33288 {
33289
33290 #if DB_VERSION_MAJOR > 1
33291         {
33292                 char *version;
33293                 int major, minor, patch;
33294
33295                 version = db_version( &major, &minor, &patch );
33296
33297                 if( major != DB_VERSION_MAJOR ||
33298                         minor < DB_VERSION_MINOR )
33299                 {
33300                         printf("Berkeley DB version mismatch\n"
33301                                 "\theader: %s\n\tlibrary: %s\n",
33302                                 DB_VERSION_STRING, version);
33303                         return 1;
33304                 }
33305         }
33306 #endif
33307
33308 #if DB_VERSION_MAJOR > 2
33309         db_env_create( NULL, 0 );
33310 #elif DB_VERSION_MAJOR > 1
33311         db_appexit( NULL );
33312 #else
33313         (void) dbopen( NULL, 0, 0, 0, NULL);
33314 #endif
33315
33316   ;
33317   return 0;
33318 }
33319 _ACEOF
33320 rm -f conftest.$ac_objext conftest$ac_exeext
33321 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33322   (eval $ac_link) 2>conftest.er1
33323   ac_status=$?
33324   grep -v '^ *+' conftest.er1 >conftest.err
33325   rm -f conftest.er1
33326   cat conftest.err >&5
33327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33328   (exit $ac_status); } &&
33329          { ac_try='test -z "$ac_c_werror_flag"
33330                          || test ! -s conftest.err'
33331   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33332   (eval $ac_try) 2>&5
33333   ac_status=$?
33334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33335   (exit $ac_status); }; } &&
33336          { ac_try='test -s conftest$ac_exeext'
33337   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33338   (eval $ac_try) 2>&5
33339   ac_status=$?
33340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33341   (exit $ac_status); }; }; then
33342   ol_cv_db_db_41=yes
33343 else
33344   echo "$as_me: failed program was:" >&5
33345 sed 's/^/| /' conftest.$ac_ext >&5
33346
33347 ol_cv_db_db_41=no
33348 fi
33349 rm -f conftest.err conftest.$ac_objext \
33350       conftest$ac_exeext conftest.$ac_ext
33351
33352         LIBS="$ol_LIBS"
33353
33354 fi
33355 echo "$as_me:$LINENO: result: $ol_cv_db_db_41" >&5
33356 echo "${ECHO_T}$ol_cv_db_db_41" >&6
33357
33358         if test $ol_cv_db_db_41 = yes ; then
33359                 ol_cv_lib_db=-ldb-41
33360         fi
33361 fi
33362
33363                 if test $ol_cv_lib_db = no ; then
33364         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.1)" >&5
33365 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.1)... $ECHO_C" >&6
33366 if test "${ol_cv_db_db_4_dot_1+set}" = set; then
33367   echo $ECHO_N "(cached) $ECHO_C" >&6
33368 else
33369
33370         ol_DB_LIB=-ldb-4.1
33371         ol_LIBS=$LIBS
33372         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33373
33374         cat >conftest.$ac_ext <<_ACEOF
33375 /* confdefs.h.  */
33376 _ACEOF
33377 cat confdefs.h >>conftest.$ac_ext
33378 cat >>conftest.$ac_ext <<_ACEOF
33379 /* end confdefs.h.  */
33380
33381 #ifdef HAVE_DB_185_H
33382 # include <db_185.h>
33383 #else
33384 # include <db.h>
33385 #endif
33386
33387 #ifndef DB_VERSION_MAJOR
33388 # define DB_VERSION_MAJOR 1
33389 #endif
33390
33391 #ifndef NULL
33392 #define NULL ((void*)0)
33393 #endif
33394
33395 int
33396 main ()
33397 {
33398
33399 #if DB_VERSION_MAJOR > 1
33400         {
33401                 char *version;
33402                 int major, minor, patch;
33403
33404                 version = db_version( &major, &minor, &patch );
33405
33406                 if( major != DB_VERSION_MAJOR ||
33407                         minor < DB_VERSION_MINOR )
33408                 {
33409                         printf("Berkeley DB version mismatch\n"
33410                                 "\theader: %s\n\tlibrary: %s\n",
33411                                 DB_VERSION_STRING, version);
33412                         return 1;
33413                 }
33414         }
33415 #endif
33416
33417 #if DB_VERSION_MAJOR > 2
33418         db_env_create( NULL, 0 );
33419 #elif DB_VERSION_MAJOR > 1
33420         db_appexit( NULL );
33421 #else
33422         (void) dbopen( NULL, 0, 0, 0, NULL);
33423 #endif
33424
33425   ;
33426   return 0;
33427 }
33428 _ACEOF
33429 rm -f conftest.$ac_objext conftest$ac_exeext
33430 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33431   (eval $ac_link) 2>conftest.er1
33432   ac_status=$?
33433   grep -v '^ *+' conftest.er1 >conftest.err
33434   rm -f conftest.er1
33435   cat conftest.err >&5
33436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33437   (exit $ac_status); } &&
33438          { ac_try='test -z "$ac_c_werror_flag"
33439                          || test ! -s conftest.err'
33440   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33441   (eval $ac_try) 2>&5
33442   ac_status=$?
33443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33444   (exit $ac_status); }; } &&
33445          { ac_try='test -s conftest$ac_exeext'
33446   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33447   (eval $ac_try) 2>&5
33448   ac_status=$?
33449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33450   (exit $ac_status); }; }; then
33451   ol_cv_db_db_4_dot_1=yes
33452 else
33453   echo "$as_me: failed program was:" >&5
33454 sed 's/^/| /' conftest.$ac_ext >&5
33455
33456 ol_cv_db_db_4_dot_1=no
33457 fi
33458 rm -f conftest.err conftest.$ac_objext \
33459       conftest$ac_exeext conftest.$ac_ext
33460
33461         LIBS="$ol_LIBS"
33462
33463 fi
33464 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_1" >&5
33465 echo "${ECHO_T}$ol_cv_db_db_4_dot_1" >&6
33466
33467         if test $ol_cv_db_db_4_dot_1 = yes ; then
33468                 ol_cv_lib_db=-ldb-4.1
33469         fi
33470 fi
33471
33472                 if test $ol_cv_lib_db = no ; then
33473         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-1)" >&5
33474 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-1)... $ECHO_C" >&6
33475 if test "${ol_cv_db_db_4_1+set}" = set; then
33476   echo $ECHO_N "(cached) $ECHO_C" >&6
33477 else
33478
33479         ol_DB_LIB=-ldb-4-1
33480         ol_LIBS=$LIBS
33481         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33482
33483         cat >conftest.$ac_ext <<_ACEOF
33484 /* confdefs.h.  */
33485 _ACEOF
33486 cat confdefs.h >>conftest.$ac_ext
33487 cat >>conftest.$ac_ext <<_ACEOF
33488 /* end confdefs.h.  */
33489
33490 #ifdef HAVE_DB_185_H
33491 # include <db_185.h>
33492 #else
33493 # include <db.h>
33494 #endif
33495
33496 #ifndef DB_VERSION_MAJOR
33497 # define DB_VERSION_MAJOR 1
33498 #endif
33499
33500 #ifndef NULL
33501 #define NULL ((void*)0)
33502 #endif
33503
33504 int
33505 main ()
33506 {
33507
33508 #if DB_VERSION_MAJOR > 1
33509         {
33510                 char *version;
33511                 int major, minor, patch;
33512
33513                 version = db_version( &major, &minor, &patch );
33514
33515                 if( major != DB_VERSION_MAJOR ||
33516                         minor < DB_VERSION_MINOR )
33517                 {
33518                         printf("Berkeley DB version mismatch\n"
33519                                 "\theader: %s\n\tlibrary: %s\n",
33520                                 DB_VERSION_STRING, version);
33521                         return 1;
33522                 }
33523         }
33524 #endif
33525
33526 #if DB_VERSION_MAJOR > 2
33527         db_env_create( NULL, 0 );
33528 #elif DB_VERSION_MAJOR > 1
33529         db_appexit( NULL );
33530 #else
33531         (void) dbopen( NULL, 0, 0, 0, NULL);
33532 #endif
33533
33534   ;
33535   return 0;
33536 }
33537 _ACEOF
33538 rm -f conftest.$ac_objext conftest$ac_exeext
33539 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33540   (eval $ac_link) 2>conftest.er1
33541   ac_status=$?
33542   grep -v '^ *+' conftest.er1 >conftest.err
33543   rm -f conftest.er1
33544   cat conftest.err >&5
33545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33546   (exit $ac_status); } &&
33547          { ac_try='test -z "$ac_c_werror_flag"
33548                          || test ! -s conftest.err'
33549   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33550   (eval $ac_try) 2>&5
33551   ac_status=$?
33552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33553   (exit $ac_status); }; } &&
33554          { ac_try='test -s conftest$ac_exeext'
33555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33556   (eval $ac_try) 2>&5
33557   ac_status=$?
33558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33559   (exit $ac_status); }; }; then
33560   ol_cv_db_db_4_1=yes
33561 else
33562   echo "$as_me: failed program was:" >&5
33563 sed 's/^/| /' conftest.$ac_ext >&5
33564
33565 ol_cv_db_db_4_1=no
33566 fi
33567 rm -f conftest.err conftest.$ac_objext \
33568       conftest$ac_exeext conftest.$ac_ext
33569
33570         LIBS="$ol_LIBS"
33571
33572 fi
33573 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_1" >&5
33574 echo "${ECHO_T}$ol_cv_db_db_4_1" >&6
33575
33576         if test $ol_cv_db_db_4_1 = yes ; then
33577                 ol_cv_lib_db=-ldb-4-1
33578         fi
33579 fi
33580
33581         fi
33582         if test $ol_cv_lib_db = no ; then
33583         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4)" >&5
33584 echo $ECHO_N "checking for Berkeley DB link (-ldb-4)... $ECHO_C" >&6
33585 if test "${ol_cv_db_db_4+set}" = set; then
33586   echo $ECHO_N "(cached) $ECHO_C" >&6
33587 else
33588
33589         ol_DB_LIB=-ldb-4
33590         ol_LIBS=$LIBS
33591         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33592
33593         cat >conftest.$ac_ext <<_ACEOF
33594 /* confdefs.h.  */
33595 _ACEOF
33596 cat confdefs.h >>conftest.$ac_ext
33597 cat >>conftest.$ac_ext <<_ACEOF
33598 /* end confdefs.h.  */
33599
33600 #ifdef HAVE_DB_185_H
33601 # include <db_185.h>
33602 #else
33603 # include <db.h>
33604 #endif
33605
33606 #ifndef DB_VERSION_MAJOR
33607 # define DB_VERSION_MAJOR 1
33608 #endif
33609
33610 #ifndef NULL
33611 #define NULL ((void*)0)
33612 #endif
33613
33614 int
33615 main ()
33616 {
33617
33618 #if DB_VERSION_MAJOR > 1
33619         {
33620                 char *version;
33621                 int major, minor, patch;
33622
33623                 version = db_version( &major, &minor, &patch );
33624
33625                 if( major != DB_VERSION_MAJOR ||
33626                         minor < DB_VERSION_MINOR )
33627                 {
33628                         printf("Berkeley DB version mismatch\n"
33629                                 "\theader: %s\n\tlibrary: %s\n",
33630                                 DB_VERSION_STRING, version);
33631                         return 1;
33632                 }
33633         }
33634 #endif
33635
33636 #if DB_VERSION_MAJOR > 2
33637         db_env_create( NULL, 0 );
33638 #elif DB_VERSION_MAJOR > 1
33639         db_appexit( NULL );
33640 #else
33641         (void) dbopen( NULL, 0, 0, 0, NULL);
33642 #endif
33643
33644   ;
33645   return 0;
33646 }
33647 _ACEOF
33648 rm -f conftest.$ac_objext conftest$ac_exeext
33649 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33650   (eval $ac_link) 2>conftest.er1
33651   ac_status=$?
33652   grep -v '^ *+' conftest.er1 >conftest.err
33653   rm -f conftest.er1
33654   cat conftest.err >&5
33655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33656   (exit $ac_status); } &&
33657          { ac_try='test -z "$ac_c_werror_flag"
33658                          || test ! -s conftest.err'
33659   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33660   (eval $ac_try) 2>&5
33661   ac_status=$?
33662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33663   (exit $ac_status); }; } &&
33664          { ac_try='test -s conftest$ac_exeext'
33665   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33666   (eval $ac_try) 2>&5
33667   ac_status=$?
33668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33669   (exit $ac_status); }; }; then
33670   ol_cv_db_db_4=yes
33671 else
33672   echo "$as_me: failed program was:" >&5
33673 sed 's/^/| /' conftest.$ac_ext >&5
33674
33675 ol_cv_db_db_4=no
33676 fi
33677 rm -f conftest.err conftest.$ac_objext \
33678       conftest$ac_exeext conftest.$ac_ext
33679
33680         LIBS="$ol_LIBS"
33681
33682 fi
33683 echo "$as_me:$LINENO: result: $ol_cv_db_db_4" >&5
33684 echo "${ECHO_T}$ol_cv_db_db_4" >&6
33685
33686         if test $ol_cv_db_db_4 = yes ; then
33687                 ol_cv_lib_db=-ldb-4
33688         fi
33689 fi
33690
33691         if test $ol_cv_lib_db = no ; then
33692         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb4)" >&5
33693 echo $ECHO_N "checking for Berkeley DB link (-ldb4)... $ECHO_C" >&6
33694 if test "${ol_cv_db_db4+set}" = set; then
33695   echo $ECHO_N "(cached) $ECHO_C" >&6
33696 else
33697
33698         ol_DB_LIB=-ldb4
33699         ol_LIBS=$LIBS
33700         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33701
33702         cat >conftest.$ac_ext <<_ACEOF
33703 /* confdefs.h.  */
33704 _ACEOF
33705 cat confdefs.h >>conftest.$ac_ext
33706 cat >>conftest.$ac_ext <<_ACEOF
33707 /* end confdefs.h.  */
33708
33709 #ifdef HAVE_DB_185_H
33710 # include <db_185.h>
33711 #else
33712 # include <db.h>
33713 #endif
33714
33715 #ifndef DB_VERSION_MAJOR
33716 # define DB_VERSION_MAJOR 1
33717 #endif
33718
33719 #ifndef NULL
33720 #define NULL ((void*)0)
33721 #endif
33722
33723 int
33724 main ()
33725 {
33726
33727 #if DB_VERSION_MAJOR > 1
33728         {
33729                 char *version;
33730                 int major, minor, patch;
33731
33732                 version = db_version( &major, &minor, &patch );
33733
33734                 if( major != DB_VERSION_MAJOR ||
33735                         minor < DB_VERSION_MINOR )
33736                 {
33737                         printf("Berkeley DB version mismatch\n"
33738                                 "\theader: %s\n\tlibrary: %s\n",
33739                                 DB_VERSION_STRING, version);
33740                         return 1;
33741                 }
33742         }
33743 #endif
33744
33745 #if DB_VERSION_MAJOR > 2
33746         db_env_create( NULL, 0 );
33747 #elif DB_VERSION_MAJOR > 1
33748         db_appexit( NULL );
33749 #else
33750         (void) dbopen( NULL, 0, 0, 0, NULL);
33751 #endif
33752
33753   ;
33754   return 0;
33755 }
33756 _ACEOF
33757 rm -f conftest.$ac_objext conftest$ac_exeext
33758 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33759   (eval $ac_link) 2>conftest.er1
33760   ac_status=$?
33761   grep -v '^ *+' conftest.er1 >conftest.err
33762   rm -f conftest.er1
33763   cat conftest.err >&5
33764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33765   (exit $ac_status); } &&
33766          { ac_try='test -z "$ac_c_werror_flag"
33767                          || test ! -s conftest.err'
33768   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33769   (eval $ac_try) 2>&5
33770   ac_status=$?
33771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33772   (exit $ac_status); }; } &&
33773          { ac_try='test -s conftest$ac_exeext'
33774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33775   (eval $ac_try) 2>&5
33776   ac_status=$?
33777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33778   (exit $ac_status); }; }; then
33779   ol_cv_db_db4=yes
33780 else
33781   echo "$as_me: failed program was:" >&5
33782 sed 's/^/| /' conftest.$ac_ext >&5
33783
33784 ol_cv_db_db4=no
33785 fi
33786 rm -f conftest.err conftest.$ac_objext \
33787       conftest$ac_exeext conftest.$ac_ext
33788
33789         LIBS="$ol_LIBS"
33790
33791 fi
33792 echo "$as_me:$LINENO: result: $ol_cv_db_db4" >&5
33793 echo "${ECHO_T}$ol_cv_db_db4" >&6
33794
33795         if test $ol_cv_db_db4 = yes ; then
33796                 ol_cv_lib_db=-ldb4
33797         fi
33798 fi
33799
33800         if test $ol_cv_lib_db = no ; then
33801         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb)" >&5
33802 echo $ECHO_N "checking for Berkeley DB link (-ldb)... $ECHO_C" >&6
33803 if test "${ol_cv_db_db+set}" = set; then
33804   echo $ECHO_N "(cached) $ECHO_C" >&6
33805 else
33806
33807         ol_DB_LIB=-ldb
33808         ol_LIBS=$LIBS
33809         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33810
33811         cat >conftest.$ac_ext <<_ACEOF
33812 /* confdefs.h.  */
33813 _ACEOF
33814 cat confdefs.h >>conftest.$ac_ext
33815 cat >>conftest.$ac_ext <<_ACEOF
33816 /* end confdefs.h.  */
33817
33818 #ifdef HAVE_DB_185_H
33819 # include <db_185.h>
33820 #else
33821 # include <db.h>
33822 #endif
33823
33824 #ifndef DB_VERSION_MAJOR
33825 # define DB_VERSION_MAJOR 1
33826 #endif
33827
33828 #ifndef NULL
33829 #define NULL ((void*)0)
33830 #endif
33831
33832 int
33833 main ()
33834 {
33835
33836 #if DB_VERSION_MAJOR > 1
33837         {
33838                 char *version;
33839                 int major, minor, patch;
33840
33841                 version = db_version( &major, &minor, &patch );
33842
33843                 if( major != DB_VERSION_MAJOR ||
33844                         minor < DB_VERSION_MINOR )
33845                 {
33846                         printf("Berkeley DB version mismatch\n"
33847                                 "\theader: %s\n\tlibrary: %s\n",
33848                                 DB_VERSION_STRING, version);
33849                         return 1;
33850                 }
33851         }
33852 #endif
33853
33854 #if DB_VERSION_MAJOR > 2
33855         db_env_create( NULL, 0 );
33856 #elif DB_VERSION_MAJOR > 1
33857         db_appexit( NULL );
33858 #else
33859         (void) dbopen( NULL, 0, 0, 0, NULL);
33860 #endif
33861
33862   ;
33863   return 0;
33864 }
33865 _ACEOF
33866 rm -f conftest.$ac_objext conftest$ac_exeext
33867 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33868   (eval $ac_link) 2>conftest.er1
33869   ac_status=$?
33870   grep -v '^ *+' conftest.er1 >conftest.err
33871   rm -f conftest.er1
33872   cat conftest.err >&5
33873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33874   (exit $ac_status); } &&
33875          { ac_try='test -z "$ac_c_werror_flag"
33876                          || test ! -s conftest.err'
33877   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33878   (eval $ac_try) 2>&5
33879   ac_status=$?
33880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33881   (exit $ac_status); }; } &&
33882          { ac_try='test -s conftest$ac_exeext'
33883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33884   (eval $ac_try) 2>&5
33885   ac_status=$?
33886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33887   (exit $ac_status); }; }; then
33888   ol_cv_db_db=yes
33889 else
33890   echo "$as_me: failed program was:" >&5
33891 sed 's/^/| /' conftest.$ac_ext >&5
33892
33893 ol_cv_db_db=no
33894 fi
33895 rm -f conftest.err conftest.$ac_objext \
33896       conftest$ac_exeext conftest.$ac_ext
33897
33898         LIBS="$ol_LIBS"
33899
33900 fi
33901 echo "$as_me:$LINENO: result: $ol_cv_db_db" >&5
33902 echo "${ECHO_T}$ol_cv_db_db" >&6
33903
33904         if test $ol_cv_db_db = yes ; then
33905                 ol_cv_lib_db=-ldb
33906         fi
33907 fi
33908
33909
33910 elif test $ol_cv_bdb_major = 3 ; then
33911         if test $ol_cv_lib_db = no ; then
33912         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb3)" >&5
33913 echo $ECHO_N "checking for Berkeley DB link (-ldb3)... $ECHO_C" >&6
33914 if test "${ol_cv_db_db3+set}" = set; then
33915   echo $ECHO_N "(cached) $ECHO_C" >&6
33916 else
33917
33918         ol_DB_LIB=-ldb3
33919         ol_LIBS=$LIBS
33920         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33921
33922         cat >conftest.$ac_ext <<_ACEOF
33923 /* confdefs.h.  */
33924 _ACEOF
33925 cat confdefs.h >>conftest.$ac_ext
33926 cat >>conftest.$ac_ext <<_ACEOF
33927 /* end confdefs.h.  */
33928
33929 #ifdef HAVE_DB_185_H
33930 # include <db_185.h>
33931 #else
33932 # include <db.h>
33933 #endif
33934
33935 #ifndef DB_VERSION_MAJOR
33936 # define DB_VERSION_MAJOR 1
33937 #endif
33938
33939 #ifndef NULL
33940 #define NULL ((void*)0)
33941 #endif
33942
33943 int
33944 main ()
33945 {
33946
33947 #if DB_VERSION_MAJOR > 1
33948         {
33949                 char *version;
33950                 int major, minor, patch;
33951
33952                 version = db_version( &major, &minor, &patch );
33953
33954                 if( major != DB_VERSION_MAJOR ||
33955                         minor < DB_VERSION_MINOR )
33956                 {
33957                         printf("Berkeley DB version mismatch\n"
33958                                 "\theader: %s\n\tlibrary: %s\n",
33959                                 DB_VERSION_STRING, version);
33960                         return 1;
33961                 }
33962         }
33963 #endif
33964
33965 #if DB_VERSION_MAJOR > 2
33966         db_env_create( NULL, 0 );
33967 #elif DB_VERSION_MAJOR > 1
33968         db_appexit( NULL );
33969 #else
33970         (void) dbopen( NULL, 0, 0, 0, NULL);
33971 #endif
33972
33973   ;
33974   return 0;
33975 }
33976 _ACEOF
33977 rm -f conftest.$ac_objext conftest$ac_exeext
33978 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33979   (eval $ac_link) 2>conftest.er1
33980   ac_status=$?
33981   grep -v '^ *+' conftest.er1 >conftest.err
33982   rm -f conftest.er1
33983   cat conftest.err >&5
33984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33985   (exit $ac_status); } &&
33986          { ac_try='test -z "$ac_c_werror_flag"
33987                          || test ! -s conftest.err'
33988   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33989   (eval $ac_try) 2>&5
33990   ac_status=$?
33991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33992   (exit $ac_status); }; } &&
33993          { ac_try='test -s conftest$ac_exeext'
33994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33995   (eval $ac_try) 2>&5
33996   ac_status=$?
33997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33998   (exit $ac_status); }; }; then
33999   ol_cv_db_db3=yes
34000 else
34001   echo "$as_me: failed program was:" >&5
34002 sed 's/^/| /' conftest.$ac_ext >&5
34003
34004 ol_cv_db_db3=no
34005 fi
34006 rm -f conftest.err conftest.$ac_objext \
34007       conftest$ac_exeext conftest.$ac_ext
34008
34009         LIBS="$ol_LIBS"
34010
34011 fi
34012 echo "$as_me:$LINENO: result: $ol_cv_db_db3" >&5
34013 echo "${ECHO_T}$ol_cv_db_db3" >&6
34014
34015         if test $ol_cv_db_db3 = yes ; then
34016                 ol_cv_lib_db=-ldb3
34017         fi
34018 fi
34019
34020         if test $ol_cv_lib_db = no ; then
34021         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-3)" >&5
34022 echo $ECHO_N "checking for Berkeley DB link (-ldb-3)... $ECHO_C" >&6
34023 if test "${ol_cv_db_db_3+set}" = set; then
34024   echo $ECHO_N "(cached) $ECHO_C" >&6
34025 else
34026
34027         ol_DB_LIB=-ldb-3
34028         ol_LIBS=$LIBS
34029         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34030
34031         cat >conftest.$ac_ext <<_ACEOF
34032 /* confdefs.h.  */
34033 _ACEOF
34034 cat confdefs.h >>conftest.$ac_ext
34035 cat >>conftest.$ac_ext <<_ACEOF
34036 /* end confdefs.h.  */
34037
34038 #ifdef HAVE_DB_185_H
34039 # include <db_185.h>
34040 #else
34041 # include <db.h>
34042 #endif
34043
34044 #ifndef DB_VERSION_MAJOR
34045 # define DB_VERSION_MAJOR 1
34046 #endif
34047
34048 #ifndef NULL
34049 #define NULL ((void*)0)
34050 #endif
34051
34052 int
34053 main ()
34054 {
34055
34056 #if DB_VERSION_MAJOR > 1
34057         {
34058                 char *version;
34059                 int major, minor, patch;
34060
34061                 version = db_version( &major, &minor, &patch );
34062
34063                 if( major != DB_VERSION_MAJOR ||
34064                         minor < DB_VERSION_MINOR )
34065                 {
34066                         printf("Berkeley DB version mismatch\n"
34067                                 "\theader: %s\n\tlibrary: %s\n",
34068                                 DB_VERSION_STRING, version);
34069                         return 1;
34070                 }
34071         }
34072 #endif
34073
34074 #if DB_VERSION_MAJOR > 2
34075         db_env_create( NULL, 0 );
34076 #elif DB_VERSION_MAJOR > 1
34077         db_appexit( NULL );
34078 #else
34079         (void) dbopen( NULL, 0, 0, 0, NULL);
34080 #endif
34081
34082   ;
34083   return 0;
34084 }
34085 _ACEOF
34086 rm -f conftest.$ac_objext conftest$ac_exeext
34087 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34088   (eval $ac_link) 2>conftest.er1
34089   ac_status=$?
34090   grep -v '^ *+' conftest.er1 >conftest.err
34091   rm -f conftest.er1
34092   cat conftest.err >&5
34093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34094   (exit $ac_status); } &&
34095          { ac_try='test -z "$ac_c_werror_flag"
34096                          || test ! -s conftest.err'
34097   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34098   (eval $ac_try) 2>&5
34099   ac_status=$?
34100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34101   (exit $ac_status); }; } &&
34102          { ac_try='test -s conftest$ac_exeext'
34103   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34104   (eval $ac_try) 2>&5
34105   ac_status=$?
34106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34107   (exit $ac_status); }; }; then
34108   ol_cv_db_db_3=yes
34109 else
34110   echo "$as_me: failed program was:" >&5
34111 sed 's/^/| /' conftest.$ac_ext >&5
34112
34113 ol_cv_db_db_3=no
34114 fi
34115 rm -f conftest.err conftest.$ac_objext \
34116       conftest$ac_exeext conftest.$ac_ext
34117
34118         LIBS="$ol_LIBS"
34119
34120 fi
34121 echo "$as_me:$LINENO: result: $ol_cv_db_db_3" >&5
34122 echo "${ECHO_T}$ol_cv_db_db_3" >&6
34123
34124         if test $ol_cv_db_db_3 = yes ; then
34125                 ol_cv_lib_db=-ldb-3
34126         fi
34127 fi
34128
34129
34130 elif test $ol_cv_bdb_major = 2 ; then
34131         if test $ol_cv_lib_db = no ; then
34132         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb2)" >&5
34133 echo $ECHO_N "checking for Berkeley DB link (-ldb2)... $ECHO_C" >&6
34134 if test "${ol_cv_db_db2+set}" = set; then
34135   echo $ECHO_N "(cached) $ECHO_C" >&6
34136 else
34137
34138         ol_DB_LIB=-ldb2
34139         ol_LIBS=$LIBS
34140         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34141
34142         cat >conftest.$ac_ext <<_ACEOF
34143 /* confdefs.h.  */
34144 _ACEOF
34145 cat confdefs.h >>conftest.$ac_ext
34146 cat >>conftest.$ac_ext <<_ACEOF
34147 /* end confdefs.h.  */
34148
34149 #ifdef HAVE_DB_185_H
34150 # include <db_185.h>
34151 #else
34152 # include <db.h>
34153 #endif
34154
34155 #ifndef DB_VERSION_MAJOR
34156 # define DB_VERSION_MAJOR 1
34157 #endif
34158
34159 #ifndef NULL
34160 #define NULL ((void*)0)
34161 #endif
34162
34163 int
34164 main ()
34165 {
34166
34167 #if DB_VERSION_MAJOR > 1
34168         {
34169                 char *version;
34170                 int major, minor, patch;
34171
34172                 version = db_version( &major, &minor, &patch );
34173
34174                 if( major != DB_VERSION_MAJOR ||
34175                         minor < DB_VERSION_MINOR )
34176                 {
34177                         printf("Berkeley DB version mismatch\n"
34178                                 "\theader: %s\n\tlibrary: %s\n",
34179                                 DB_VERSION_STRING, version);
34180                         return 1;
34181                 }
34182         }
34183 #endif
34184
34185 #if DB_VERSION_MAJOR > 2
34186         db_env_create( NULL, 0 );
34187 #elif DB_VERSION_MAJOR > 1
34188         db_appexit( NULL );
34189 #else
34190         (void) dbopen( NULL, 0, 0, 0, NULL);
34191 #endif
34192
34193   ;
34194   return 0;
34195 }
34196 _ACEOF
34197 rm -f conftest.$ac_objext conftest$ac_exeext
34198 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34199   (eval $ac_link) 2>conftest.er1
34200   ac_status=$?
34201   grep -v '^ *+' conftest.er1 >conftest.err
34202   rm -f conftest.er1
34203   cat conftest.err >&5
34204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34205   (exit $ac_status); } &&
34206          { ac_try='test -z "$ac_c_werror_flag"
34207                          || test ! -s conftest.err'
34208   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34209   (eval $ac_try) 2>&5
34210   ac_status=$?
34211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34212   (exit $ac_status); }; } &&
34213          { ac_try='test -s conftest$ac_exeext'
34214   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34215   (eval $ac_try) 2>&5
34216   ac_status=$?
34217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34218   (exit $ac_status); }; }; then
34219   ol_cv_db_db2=yes
34220 else
34221   echo "$as_me: failed program was:" >&5
34222 sed 's/^/| /' conftest.$ac_ext >&5
34223
34224 ol_cv_db_db2=no
34225 fi
34226 rm -f conftest.err conftest.$ac_objext \
34227       conftest$ac_exeext conftest.$ac_ext
34228
34229         LIBS="$ol_LIBS"
34230
34231 fi
34232 echo "$as_me:$LINENO: result: $ol_cv_db_db2" >&5
34233 echo "${ECHO_T}$ol_cv_db_db2" >&6
34234
34235         if test $ol_cv_db_db2 = yes ; then
34236                 ol_cv_lib_db=-ldb2
34237         fi
34238 fi
34239
34240         if test $ol_cv_lib_db = no ; then
34241         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-2)" >&5
34242 echo $ECHO_N "checking for Berkeley DB link (-ldb-2)... $ECHO_C" >&6
34243 if test "${ol_cv_db_db_2+set}" = set; then
34244   echo $ECHO_N "(cached) $ECHO_C" >&6
34245 else
34246
34247         ol_DB_LIB=-ldb-2
34248         ol_LIBS=$LIBS
34249         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34250
34251         cat >conftest.$ac_ext <<_ACEOF
34252 /* confdefs.h.  */
34253 _ACEOF
34254 cat confdefs.h >>conftest.$ac_ext
34255 cat >>conftest.$ac_ext <<_ACEOF
34256 /* end confdefs.h.  */
34257
34258 #ifdef HAVE_DB_185_H
34259 # include <db_185.h>
34260 #else
34261 # include <db.h>
34262 #endif
34263
34264 #ifndef DB_VERSION_MAJOR
34265 # define DB_VERSION_MAJOR 1
34266 #endif
34267
34268 #ifndef NULL
34269 #define NULL ((void*)0)
34270 #endif
34271
34272 int
34273 main ()
34274 {
34275
34276 #if DB_VERSION_MAJOR > 1
34277         {
34278                 char *version;
34279                 int major, minor, patch;
34280
34281                 version = db_version( &major, &minor, &patch );
34282
34283                 if( major != DB_VERSION_MAJOR ||
34284                         minor < DB_VERSION_MINOR )
34285                 {
34286                         printf("Berkeley DB version mismatch\n"
34287                                 "\theader: %s\n\tlibrary: %s\n",
34288                                 DB_VERSION_STRING, version);
34289                         return 1;
34290                 }
34291         }
34292 #endif
34293
34294 #if DB_VERSION_MAJOR > 2
34295         db_env_create( NULL, 0 );
34296 #elif DB_VERSION_MAJOR > 1
34297         db_appexit( NULL );
34298 #else
34299         (void) dbopen( NULL, 0, 0, 0, NULL);
34300 #endif
34301
34302   ;
34303   return 0;
34304 }
34305 _ACEOF
34306 rm -f conftest.$ac_objext conftest$ac_exeext
34307 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34308   (eval $ac_link) 2>conftest.er1
34309   ac_status=$?
34310   grep -v '^ *+' conftest.er1 >conftest.err
34311   rm -f conftest.er1
34312   cat conftest.err >&5
34313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34314   (exit $ac_status); } &&
34315          { ac_try='test -z "$ac_c_werror_flag"
34316                          || test ! -s conftest.err'
34317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34318   (eval $ac_try) 2>&5
34319   ac_status=$?
34320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34321   (exit $ac_status); }; } &&
34322          { ac_try='test -s conftest$ac_exeext'
34323   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34324   (eval $ac_try) 2>&5
34325   ac_status=$?
34326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34327   (exit $ac_status); }; }; then
34328   ol_cv_db_db_2=yes
34329 else
34330   echo "$as_me: failed program was:" >&5
34331 sed 's/^/| /' conftest.$ac_ext >&5
34332
34333 ol_cv_db_db_2=no
34334 fi
34335 rm -f conftest.err conftest.$ac_objext \
34336       conftest$ac_exeext conftest.$ac_ext
34337
34338         LIBS="$ol_LIBS"
34339
34340 fi
34341 echo "$as_me:$LINENO: result: $ol_cv_db_db_2" >&5
34342 echo "${ECHO_T}$ol_cv_db_db_2" >&6
34343
34344         if test $ol_cv_db_db_2 = yes ; then
34345                 ol_cv_lib_db=-ldb-2
34346         fi
34347 fi
34348
34349
34350 elif test $ol_cv_bdb_major = 1 ; then
34351         if test $ol_cv_lib_db = no ; then
34352         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb1)" >&5
34353 echo $ECHO_N "checking for Berkeley DB link (-ldb1)... $ECHO_C" >&6
34354 if test "${ol_cv_db_db1+set}" = set; then
34355   echo $ECHO_N "(cached) $ECHO_C" >&6
34356 else
34357
34358         ol_DB_LIB=-ldb1
34359         ol_LIBS=$LIBS
34360         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34361
34362         cat >conftest.$ac_ext <<_ACEOF
34363 /* confdefs.h.  */
34364 _ACEOF
34365 cat confdefs.h >>conftest.$ac_ext
34366 cat >>conftest.$ac_ext <<_ACEOF
34367 /* end confdefs.h.  */
34368
34369 #ifdef HAVE_DB_185_H
34370 # include <db_185.h>
34371 #else
34372 # include <db.h>
34373 #endif
34374
34375 #ifndef DB_VERSION_MAJOR
34376 # define DB_VERSION_MAJOR 1
34377 #endif
34378
34379 #ifndef NULL
34380 #define NULL ((void*)0)
34381 #endif
34382
34383 int
34384 main ()
34385 {
34386
34387 #if DB_VERSION_MAJOR > 1
34388         {
34389                 char *version;
34390                 int major, minor, patch;
34391
34392                 version = db_version( &major, &minor, &patch );
34393
34394                 if( major != DB_VERSION_MAJOR ||
34395                         minor < DB_VERSION_MINOR )
34396                 {
34397                         printf("Berkeley DB version mismatch\n"
34398                                 "\theader: %s\n\tlibrary: %s\n",
34399                                 DB_VERSION_STRING, version);
34400                         return 1;
34401                 }
34402         }
34403 #endif
34404
34405 #if DB_VERSION_MAJOR > 2
34406         db_env_create( NULL, 0 );
34407 #elif DB_VERSION_MAJOR > 1
34408         db_appexit( NULL );
34409 #else
34410         (void) dbopen( NULL, 0, 0, 0, NULL);
34411 #endif
34412
34413   ;
34414   return 0;
34415 }
34416 _ACEOF
34417 rm -f conftest.$ac_objext conftest$ac_exeext
34418 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34419   (eval $ac_link) 2>conftest.er1
34420   ac_status=$?
34421   grep -v '^ *+' conftest.er1 >conftest.err
34422   rm -f conftest.er1
34423   cat conftest.err >&5
34424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34425   (exit $ac_status); } &&
34426          { ac_try='test -z "$ac_c_werror_flag"
34427                          || test ! -s conftest.err'
34428   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34429   (eval $ac_try) 2>&5
34430   ac_status=$?
34431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34432   (exit $ac_status); }; } &&
34433          { ac_try='test -s conftest$ac_exeext'
34434   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34435   (eval $ac_try) 2>&5
34436   ac_status=$?
34437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34438   (exit $ac_status); }; }; then
34439   ol_cv_db_db1=yes
34440 else
34441   echo "$as_me: failed program was:" >&5
34442 sed 's/^/| /' conftest.$ac_ext >&5
34443
34444 ol_cv_db_db1=no
34445 fi
34446 rm -f conftest.err conftest.$ac_objext \
34447       conftest$ac_exeext conftest.$ac_ext
34448
34449         LIBS="$ol_LIBS"
34450
34451 fi
34452 echo "$as_me:$LINENO: result: $ol_cv_db_db1" >&5
34453 echo "${ECHO_T}$ol_cv_db_db1" >&6
34454
34455         if test $ol_cv_db_db1 = yes ; then
34456                 ol_cv_lib_db=-ldb1
34457         fi
34458 fi
34459
34460         if test $ol_cv_lib_db = no ; then
34461         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-1)" >&5
34462 echo $ECHO_N "checking for Berkeley DB link (-ldb-1)... $ECHO_C" >&6
34463 if test "${ol_cv_db_db_1+set}" = set; then
34464   echo $ECHO_N "(cached) $ECHO_C" >&6
34465 else
34466
34467         ol_DB_LIB=-ldb-1
34468         ol_LIBS=$LIBS
34469         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34470
34471         cat >conftest.$ac_ext <<_ACEOF
34472 /* confdefs.h.  */
34473 _ACEOF
34474 cat confdefs.h >>conftest.$ac_ext
34475 cat >>conftest.$ac_ext <<_ACEOF
34476 /* end confdefs.h.  */
34477
34478 #ifdef HAVE_DB_185_H
34479 # include <db_185.h>
34480 #else
34481 # include <db.h>
34482 #endif
34483
34484 #ifndef DB_VERSION_MAJOR
34485 # define DB_VERSION_MAJOR 1
34486 #endif
34487
34488 #ifndef NULL
34489 #define NULL ((void*)0)
34490 #endif
34491
34492 int
34493 main ()
34494 {
34495
34496 #if DB_VERSION_MAJOR > 1
34497         {
34498                 char *version;
34499                 int major, minor, patch;
34500
34501                 version = db_version( &major, &minor, &patch );
34502
34503                 if( major != DB_VERSION_MAJOR ||
34504                         minor < DB_VERSION_MINOR )
34505                 {
34506                         printf("Berkeley DB version mismatch\n"
34507                                 "\theader: %s\n\tlibrary: %s\n",
34508                                 DB_VERSION_STRING, version);
34509                         return 1;
34510                 }
34511         }
34512 #endif
34513
34514 #if DB_VERSION_MAJOR > 2
34515         db_env_create( NULL, 0 );
34516 #elif DB_VERSION_MAJOR > 1
34517         db_appexit( NULL );
34518 #else
34519         (void) dbopen( NULL, 0, 0, 0, NULL);
34520 #endif
34521
34522   ;
34523   return 0;
34524 }
34525 _ACEOF
34526 rm -f conftest.$ac_objext conftest$ac_exeext
34527 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34528   (eval $ac_link) 2>conftest.er1
34529   ac_status=$?
34530   grep -v '^ *+' conftest.er1 >conftest.err
34531   rm -f conftest.er1
34532   cat conftest.err >&5
34533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34534   (exit $ac_status); } &&
34535          { ac_try='test -z "$ac_c_werror_flag"
34536                          || test ! -s conftest.err'
34537   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34538   (eval $ac_try) 2>&5
34539   ac_status=$?
34540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34541   (exit $ac_status); }; } &&
34542          { ac_try='test -s conftest$ac_exeext'
34543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34544   (eval $ac_try) 2>&5
34545   ac_status=$?
34546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34547   (exit $ac_status); }; }; then
34548   ol_cv_db_db_1=yes
34549 else
34550   echo "$as_me: failed program was:" >&5
34551 sed 's/^/| /' conftest.$ac_ext >&5
34552
34553 ol_cv_db_db_1=no
34554 fi
34555 rm -f conftest.err conftest.$ac_objext \
34556       conftest$ac_exeext conftest.$ac_ext
34557
34558         LIBS="$ol_LIBS"
34559
34560 fi
34561 echo "$as_me:$LINENO: result: $ol_cv_db_db_1" >&5
34562 echo "${ECHO_T}$ol_cv_db_db_1" >&6
34563
34564         if test $ol_cv_db_db_1 = yes ; then
34565                 ol_cv_lib_db=-ldb-1
34566         fi
34567 fi
34568
34569 fi
34570 if test $ol_cv_lib_db = no ; then
34571         echo "$as_me:$LINENO: checking for Berkeley DB link (default)" >&5
34572 echo $ECHO_N "checking for Berkeley DB link (default)... $ECHO_C" >&6
34573 if test "${ol_cv_db_none+set}" = set; then
34574   echo $ECHO_N "(cached) $ECHO_C" >&6
34575 else
34576
34577         ol_DB_LIB=
34578         ol_LIBS=$LIBS
34579         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34580
34581         cat >conftest.$ac_ext <<_ACEOF
34582 /* confdefs.h.  */
34583 _ACEOF
34584 cat confdefs.h >>conftest.$ac_ext
34585 cat >>conftest.$ac_ext <<_ACEOF
34586 /* end confdefs.h.  */
34587
34588 #ifdef HAVE_DB_185_H
34589 # include <db_185.h>
34590 #else
34591 # include <db.h>
34592 #endif
34593
34594 #ifndef DB_VERSION_MAJOR
34595 # define DB_VERSION_MAJOR 1
34596 #endif
34597
34598 #ifndef NULL
34599 #define NULL ((void*)0)
34600 #endif
34601
34602 int
34603 main ()
34604 {
34605
34606 #if DB_VERSION_MAJOR > 1
34607         {
34608                 char *version;
34609                 int major, minor, patch;
34610
34611                 version = db_version( &major, &minor, &patch );
34612
34613                 if( major != DB_VERSION_MAJOR ||
34614                         minor < DB_VERSION_MINOR )
34615                 {
34616                         printf("Berkeley DB version mismatch\n"
34617                                 "\theader: %s\n\tlibrary: %s\n",
34618                                 DB_VERSION_STRING, version);
34619                         return 1;
34620                 }
34621         }
34622 #endif
34623
34624 #if DB_VERSION_MAJOR > 2
34625         db_env_create( NULL, 0 );
34626 #elif DB_VERSION_MAJOR > 1
34627         db_appexit( NULL );
34628 #else
34629         (void) dbopen( NULL, 0, 0, 0, NULL);
34630 #endif
34631
34632   ;
34633   return 0;
34634 }
34635 _ACEOF
34636 rm -f conftest.$ac_objext conftest$ac_exeext
34637 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34638   (eval $ac_link) 2>conftest.er1
34639   ac_status=$?
34640   grep -v '^ *+' conftest.er1 >conftest.err
34641   rm -f conftest.er1
34642   cat conftest.err >&5
34643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34644   (exit $ac_status); } &&
34645          { ac_try='test -z "$ac_c_werror_flag"
34646                          || test ! -s conftest.err'
34647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34648   (eval $ac_try) 2>&5
34649   ac_status=$?
34650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34651   (exit $ac_status); }; } &&
34652          { ac_try='test -s conftest$ac_exeext'
34653   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34654   (eval $ac_try) 2>&5
34655   ac_status=$?
34656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34657   (exit $ac_status); }; }; then
34658   ol_cv_db_none=yes
34659 else
34660   echo "$as_me: failed program was:" >&5
34661 sed 's/^/| /' conftest.$ac_ext >&5
34662
34663 ol_cv_db_none=no
34664 fi
34665 rm -f conftest.err conftest.$ac_objext \
34666       conftest$ac_exeext conftest.$ac_ext
34667
34668         LIBS="$ol_LIBS"
34669
34670 fi
34671 echo "$as_me:$LINENO: result: $ol_cv_db_none" >&5
34672 echo "${ECHO_T}$ol_cv_db_none" >&6
34673
34674         if test $ol_cv_db_none = yes ; then
34675                 ol_cv_lib_db=yes
34676         fi
34677 fi
34678
34679
34680         if test "$ol_cv_lib_db" != no ; then
34681                 ol_cv_berkeley_db=yes
34682                 echo "$as_me:$LINENO: checking for Berkeley DB version match" >&5
34683 echo $ECHO_N "checking for Berkeley DB version match... $ECHO_C" >&6
34684 if test "${ol_cv_berkeley_db_version+set}" = set; then
34685   echo $ECHO_N "(cached) $ECHO_C" >&6
34686 else
34687
34688         ol_LIBS="$LIBS"
34689         LIBS="$LTHREAD_LIBS $LIBS"
34690         if test $ol_cv_lib_db != yes ; then
34691                 LIBS="$ol_cv_lib_db $LIBS"
34692         fi
34693
34694         if test "$cross_compiling" = yes; then
34695   ol_cv_berkeley_db_version=cross
34696 else
34697   cat >conftest.$ac_ext <<_ACEOF
34698 /* confdefs.h.  */
34699 _ACEOF
34700 cat confdefs.h >>conftest.$ac_ext
34701 cat >>conftest.$ac_ext <<_ACEOF
34702 /* end confdefs.h.  */
34703
34704 #ifdef HAVE_DB_185_H
34705         choke me;
34706 #else
34707 #include <db.h>
34708 #endif
34709 #ifndef DB_VERSION_MAJOR
34710 # define DB_VERSION_MAJOR 1
34711 #endif
34712 #ifndef NULL
34713 #define NULL ((void *)0)
34714 #endif
34715 main()
34716 {
34717 #if DB_VERSION_MAJOR > 1
34718         char *version;
34719         int major, minor, patch;
34720
34721         version = db_version( &major, &minor, &patch );
34722
34723         if( major != DB_VERSION_MAJOR ||
34724                 minor != DB_VERSION_MINOR ||
34725                 patch != DB_VERSION_PATCH )
34726         {
34727                 printf("Berkeley DB version mismatch\n"
34728                         "\theader: %s\n\tlibrary: %s\n",
34729                         DB_VERSION_STRING, version);
34730                 return 1;
34731         }
34732 #endif
34733
34734         return 0;
34735 }
34736 _ACEOF
34737 rm -f conftest$ac_exeext
34738 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34739   (eval $ac_link) 2>&5
34740   ac_status=$?
34741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34742   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
34743   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34744   (eval $ac_try) 2>&5
34745   ac_status=$?
34746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34747   (exit $ac_status); }; }; then
34748   ol_cv_berkeley_db_version=yes
34749 else
34750   echo "$as_me: program exited with status $ac_status" >&5
34751 echo "$as_me: failed program was:" >&5
34752 sed 's/^/| /' conftest.$ac_ext >&5
34753
34754 ( exit $ac_status )
34755 ol_cv_berkeley_db_version=no
34756 fi
34757 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
34758 fi
34759
34760         LIBS="$ol_LIBS"
34761
34762 fi
34763 echo "$as_me:$LINENO: result: $ol_cv_berkeley_db_version" >&5
34764 echo "${ECHO_T}$ol_cv_berkeley_db_version" >&6
34765
34766         if test $ol_cv_berkeley_db_version = no ; then
34767                 { { echo "$as_me:$LINENO: error: Berkeley DB version mismatch" >&5
34768 echo "$as_me: error: Berkeley DB version mismatch" >&2;}
34769    { (exit 1); exit 1; }; }
34770         fi
34771
34772                 echo "$as_me:$LINENO: checking for Berkeley DB thread support" >&5
34773 echo $ECHO_N "checking for Berkeley DB thread support... $ECHO_C" >&6
34774 if test "${ol_cv_berkeley_db_thread+set}" = set; then
34775   echo $ECHO_N "(cached) $ECHO_C" >&6
34776 else
34777
34778         ol_LIBS="$LIBS"
34779         LIBS="$LTHREAD_LIBS $LIBS"
34780         if test $ol_cv_lib_db != yes ; then
34781                 LIBS="$ol_cv_lib_db $LIBS"
34782         fi
34783
34784         if test "$cross_compiling" = yes; then
34785   ol_cv_berkeley_db_thread=cross
34786 else
34787   cat >conftest.$ac_ext <<_ACEOF
34788 /* confdefs.h.  */
34789 _ACEOF
34790 cat confdefs.h >>conftest.$ac_ext
34791 cat >>conftest.$ac_ext <<_ACEOF
34792 /* end confdefs.h.  */
34793
34794 #ifdef HAVE_DB_185_H
34795         choke me;
34796 #else
34797 #include <db.h>
34798 #endif
34799 #ifndef NULL
34800 #define NULL ((void *)0)
34801 #endif
34802 main()
34803 {
34804         int rc;
34805         u_int32_t flags = DB_CREATE |
34806 #ifdef DB_PRIVATE
34807                 DB_PRIVATE |
34808 #endif
34809                 DB_THREAD;
34810
34811 #if DB_VERSION_MAJOR > 2
34812         DB_ENV *env = NULL;
34813
34814         rc = db_env_create( &env, 0 );
34815
34816         flags |= DB_INIT_MPOOL;
34817 #ifdef DB_MPOOL_PRIVATE
34818         flags |= DB_MPOOL_PRIVATE;
34819 #endif
34820
34821         if( rc ) {
34822                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
34823                 return rc;
34824         }
34825
34826 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
34827         rc = env->open( env, NULL, flags, 0 );
34828 #else
34829         rc = env->open( env, NULL, NULL, flags, 0 );
34830 #endif
34831
34832         if ( rc == 0 ) {
34833                 rc = env->close( env, 0 );
34834         }
34835
34836         if( rc ) {
34837                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
34838                 return rc;
34839         }
34840
34841 #else
34842         DB_ENV env;
34843         memset( &env, '\0', sizeof(env) );
34844
34845         rc = db_appinit( NULL, NULL, &env, flags );
34846
34847         if( rc == 0 ) {
34848                 db_appexit( &env );
34849         }
34850
34851         unlink("__db_mpool.share");
34852         unlink("__db_lock.share");
34853 #endif
34854
34855         return rc;
34856 }
34857 _ACEOF
34858 rm -f conftest$ac_exeext
34859 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34860   (eval $ac_link) 2>&5
34861   ac_status=$?
34862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34863   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
34864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34865   (eval $ac_try) 2>&5
34866   ac_status=$?
34867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34868   (exit $ac_status); }; }; then
34869   ol_cv_berkeley_db_thread=yes
34870 else
34871   echo "$as_me: program exited with status $ac_status" >&5
34872 echo "$as_me: failed program was:" >&5
34873 sed 's/^/| /' conftest.$ac_ext >&5
34874
34875 ( exit $ac_status )
34876 ol_cv_berkeley_db_thread=no
34877 fi
34878 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
34879 fi
34880
34881         LIBS="$ol_LIBS"
34882
34883 fi
34884 echo "$as_me:$LINENO: result: $ol_cv_berkeley_db_thread" >&5
34885 echo "${ECHO_T}$ol_cv_berkeley_db_thread" >&6
34886
34887         if test $ol_cv_berkeley_db_thread != no ; then
34888
34889 cat >>confdefs.h <<\_ACEOF
34890 #define HAVE_BERKELEY_DB_THREAD 1
34891 _ACEOF
34892
34893         fi
34894
34895         fi
34896 fi
34897
34898         fi
34899
34900         if test $ol_cv_berkeley_db != no ; then
34901
34902 cat >>confdefs.h <<\_ACEOF
34903 #define HAVE_BERKELEY_DB 1
34904 _ACEOF
34905
34906
34907                 ol_link_ldbm=berkeley
34908                 ol_enable_ldbm_api=berkeley
34909
34910                 if test $ol_enable_ldbm_type = hash ; then
34911
34912 cat >>confdefs.h <<\_ACEOF
34913 #define LDBM_USE_DBHASH 1
34914 _ACEOF
34915
34916                 else
34917
34918 cat >>confdefs.h <<\_ACEOF
34919 #define LDBM_USE_DBBTREE 1
34920 _ACEOF
34921
34922                 fi
34923
34924                                                 if test $ol_cv_lib_db != yes ; then
34925                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
34926                 fi
34927         fi
34928         ;;
34929 esac
34930
34931 if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
34932         if test $ol_link_ldbm != berkeley ; then
34933                 { { echo "$as_me:$LINENO: error: BDB/HDB: BerkeleyDB not available" >&5
34934 echo "$as_me: error: BDB/HDB: BerkeleyDB not available" >&2;}
34935    { (exit 1); exit 1; }; }
34936         else
34937                 echo "$as_me:$LINENO: checking Berkeley DB version for BDB/HDB backends" >&5
34938 echo $ECHO_N "checking Berkeley DB version for BDB/HDB backends... $ECHO_C" >&6
34939 if test "${ol_cv_bdb_compat+set}" = set; then
34940   echo $ECHO_N "(cached) $ECHO_C" >&6
34941 else
34942
34943         cat >conftest.$ac_ext <<_ACEOF
34944 /* confdefs.h.  */
34945 _ACEOF
34946 cat confdefs.h >>conftest.$ac_ext
34947 cat >>conftest.$ac_ext <<_ACEOF
34948 /* end confdefs.h.  */
34949
34950 #include <db.h>
34951
34952  /* this check could be improved */
34953 #ifndef DB_VERSION_MAJOR
34954 #       define DB_VERSION_MAJOR 1
34955 #endif
34956 #ifndef DB_VERSION_MINOR
34957 #       define DB_VERSION_MINOR 0
34958 #endif
34959
34960 /* require 4.2 or later */
34961 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
34962         __db_version_compat
34963 #endif
34964
34965 _ACEOF
34966 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34967   $EGREP "__db_version_compat" >/dev/null 2>&1; then
34968   ol_cv_bdb_compat=yes
34969 else
34970   ol_cv_bdb_compat=no
34971 fi
34972 rm -f conftest*
34973
34974 fi
34975 echo "$as_me:$LINENO: result: $ol_cv_bdb_compat" >&5
34976 echo "${ECHO_T}$ol_cv_bdb_compat" >&6
34977
34978
34979                 if test $ol_cv_bdb_compat != yes ; then
34980                         { { echo "$as_me:$LINENO: error: BDB/HDB: BerkeleyDB version incompatible" >&5
34981 echo "$as_me: error: BDB/HDB: BerkeleyDB version incompatible" >&2;}
34982    { (exit 1); exit 1; }; }
34983                 fi
34984         fi
34985 fi
34986
34987 if test $ol_link_ldbm = no && test $ol_enable_ldbm_type = btree ; then
34988         { echo "$as_me:$LINENO: WARNING: Could not find LDBM with BTREE support" >&5
34989 echo "$as_me: WARNING: Could not find LDBM with BTREE support" >&2;}
34990         ol_enable_ldbm_api=none
34991 fi
34992
34993 if test $ol_enable_ldbm_api = auto || test $ol_enable_ldbm_api = mdbm ; then
34994         echo "$as_me:$LINENO: checking for MDBM library" >&5
34995 echo $ECHO_N "checking for MDBM library... $ECHO_C" >&6
34996 if test "${ol_cv_lib_mdbm+set}" = set; then
34997   echo $ECHO_N "(cached) $ECHO_C" >&6
34998 else
34999         ol_LIBS="$LIBS"
35000         echo "$as_me:$LINENO: checking for mdbm_set_chain" >&5
35001 echo $ECHO_N "checking for mdbm_set_chain... $ECHO_C" >&6
35002 if test "${ac_cv_func_mdbm_set_chain+set}" = set; then
35003   echo $ECHO_N "(cached) $ECHO_C" >&6
35004 else
35005   cat >conftest.$ac_ext <<_ACEOF
35006 /* confdefs.h.  */
35007 _ACEOF
35008 cat confdefs.h >>conftest.$ac_ext
35009 cat >>conftest.$ac_ext <<_ACEOF
35010 /* end confdefs.h.  */
35011 /* Define mdbm_set_chain to an innocuous variant, in case <limits.h> declares mdbm_set_chain.
35012    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
35013 #define mdbm_set_chain innocuous_mdbm_set_chain
35014
35015 /* System header to define __stub macros and hopefully few prototypes,
35016     which can conflict with char mdbm_set_chain (); below.
35017     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35018     <limits.h> exists even on freestanding compilers.  */
35019
35020 #ifdef __STDC__
35021 # include <limits.h>
35022 #else
35023 # include <assert.h>
35024 #endif
35025
35026 #undef mdbm_set_chain
35027
35028 /* Override any gcc2 internal prototype to avoid an error.  */
35029 #ifdef __cplusplus
35030 extern "C"
35031 {
35032 #endif
35033 /* We use char because int might match the return type of a gcc2
35034    builtin and then its argument prototype would still apply.  */
35035 char mdbm_set_chain ();
35036 /* The GNU C library defines this for functions which it implements
35037     to always fail with ENOSYS.  Some functions are actually named
35038     something starting with __ and the normal name is an alias.  */
35039 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
35040 choke me
35041 #else
35042 char (*f) () = mdbm_set_chain;
35043 #endif
35044 #ifdef __cplusplus
35045 }
35046 #endif
35047
35048 int
35049 main ()
35050 {
35051 return f != mdbm_set_chain;
35052   ;
35053   return 0;
35054 }
35055 _ACEOF
35056 rm -f conftest.$ac_objext conftest$ac_exeext
35057 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35058   (eval $ac_link) 2>conftest.er1
35059   ac_status=$?
35060   grep -v '^ *+' conftest.er1 >conftest.err
35061   rm -f conftest.er1
35062   cat conftest.err >&5
35063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35064   (exit $ac_status); } &&
35065          { ac_try='test -z "$ac_c_werror_flag"
35066                          || test ! -s conftest.err'
35067   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35068   (eval $ac_try) 2>&5
35069   ac_status=$?
35070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35071   (exit $ac_status); }; } &&
35072          { ac_try='test -s conftest$ac_exeext'
35073   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35074   (eval $ac_try) 2>&5
35075   ac_status=$?
35076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35077   (exit $ac_status); }; }; then
35078   ac_cv_func_mdbm_set_chain=yes
35079 else
35080   echo "$as_me: failed program was:" >&5
35081 sed 's/^/| /' conftest.$ac_ext >&5
35082
35083 ac_cv_func_mdbm_set_chain=no
35084 fi
35085 rm -f conftest.err conftest.$ac_objext \
35086       conftest$ac_exeext conftest.$ac_ext
35087 fi
35088 echo "$as_me:$LINENO: result: $ac_cv_func_mdbm_set_chain" >&5
35089 echo "${ECHO_T}$ac_cv_func_mdbm_set_chain" >&6
35090 if test $ac_cv_func_mdbm_set_chain = yes; then
35091   ol_cv_lib_mdbm=yes
35092 else
35093
35094                 echo "$as_me:$LINENO: checking for mdbm_set_chain in -lmdbm" >&5
35095 echo $ECHO_N "checking for mdbm_set_chain in -lmdbm... $ECHO_C" >&6
35096 if test "${ac_cv_lib_mdbm_mdbm_set_chain+set}" = set; then
35097   echo $ECHO_N "(cached) $ECHO_C" >&6
35098 else
35099   ac_check_lib_save_LIBS=$LIBS
35100 LIBS="-lmdbm  $LIBS"
35101 cat >conftest.$ac_ext <<_ACEOF
35102 /* confdefs.h.  */
35103 _ACEOF
35104 cat confdefs.h >>conftest.$ac_ext
35105 cat >>conftest.$ac_ext <<_ACEOF
35106 /* end confdefs.h.  */
35107
35108 /* Override any gcc2 internal prototype to avoid an error.  */
35109 #ifdef __cplusplus
35110 extern "C"
35111 #endif
35112 /* We use char because int might match the return type of a gcc2
35113    builtin and then its argument prototype would still apply.  */
35114 char mdbm_set_chain ();
35115 int
35116 main ()
35117 {
35118 mdbm_set_chain ();
35119   ;
35120   return 0;
35121 }
35122 _ACEOF
35123 rm -f conftest.$ac_objext conftest$ac_exeext
35124 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35125   (eval $ac_link) 2>conftest.er1
35126   ac_status=$?
35127   grep -v '^ *+' conftest.er1 >conftest.err
35128   rm -f conftest.er1
35129   cat conftest.err >&5
35130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35131   (exit $ac_status); } &&
35132          { ac_try='test -z "$ac_c_werror_flag"
35133                          || test ! -s conftest.err'
35134   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35135   (eval $ac_try) 2>&5
35136   ac_status=$?
35137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35138   (exit $ac_status); }; } &&
35139          { ac_try='test -s conftest$ac_exeext'
35140   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35141   (eval $ac_try) 2>&5
35142   ac_status=$?
35143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35144   (exit $ac_status); }; }; then
35145   ac_cv_lib_mdbm_mdbm_set_chain=yes
35146 else
35147   echo "$as_me: failed program was:" >&5
35148 sed 's/^/| /' conftest.$ac_ext >&5
35149
35150 ac_cv_lib_mdbm_mdbm_set_chain=no
35151 fi
35152 rm -f conftest.err conftest.$ac_objext \
35153       conftest$ac_exeext conftest.$ac_ext
35154 LIBS=$ac_check_lib_save_LIBS
35155 fi
35156 echo "$as_me:$LINENO: result: $ac_cv_lib_mdbm_mdbm_set_chain" >&5
35157 echo "${ECHO_T}$ac_cv_lib_mdbm_mdbm_set_chain" >&6
35158 if test $ac_cv_lib_mdbm_mdbm_set_chain = yes; then
35159   ol_cv_lib_mdbm=-lmdbm
35160 else
35161   ol_cv_lib_mdbm=no
35162 fi
35163
35164
35165 fi
35166
35167         LIBS="$ol_LIBS"
35168
35169 fi
35170 echo "$as_me:$LINENO: result: $ol_cv_lib_mdbm" >&5
35171 echo "${ECHO_T}$ol_cv_lib_mdbm" >&6
35172
35173
35174
35175 for ac_header in mdbm.h
35176 do
35177 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
35178 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35179   echo "$as_me:$LINENO: checking for $ac_header" >&5
35180 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35181 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35182   echo $ECHO_N "(cached) $ECHO_C" >&6
35183 fi
35184 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35185 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35186 else
35187   # Is the header compilable?
35188 echo "$as_me:$LINENO: checking $ac_header usability" >&5
35189 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
35190 cat >conftest.$ac_ext <<_ACEOF
35191 /* confdefs.h.  */
35192 _ACEOF
35193 cat confdefs.h >>conftest.$ac_ext
35194 cat >>conftest.$ac_ext <<_ACEOF
35195 /* end confdefs.h.  */
35196 $ac_includes_default
35197 #include <$ac_header>
35198 _ACEOF
35199 rm -f conftest.$ac_objext
35200 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35201   (eval $ac_compile) 2>conftest.er1
35202   ac_status=$?
35203   grep -v '^ *+' conftest.er1 >conftest.err
35204   rm -f conftest.er1
35205   cat conftest.err >&5
35206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35207   (exit $ac_status); } &&
35208          { ac_try='test -z "$ac_c_werror_flag"
35209                          || test ! -s conftest.err'
35210   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35211   (eval $ac_try) 2>&5
35212   ac_status=$?
35213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35214   (exit $ac_status); }; } &&
35215          { ac_try='test -s conftest.$ac_objext'
35216   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35217   (eval $ac_try) 2>&5
35218   ac_status=$?
35219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35220   (exit $ac_status); }; }; then
35221   ac_header_compiler=yes
35222 else
35223   echo "$as_me: failed program was:" >&5
35224 sed 's/^/| /' conftest.$ac_ext >&5
35225
35226 ac_header_compiler=no
35227 fi
35228 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35229 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
35230 echo "${ECHO_T}$ac_header_compiler" >&6
35231
35232 # Is the header present?
35233 echo "$as_me:$LINENO: checking $ac_header presence" >&5
35234 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
35235 cat >conftest.$ac_ext <<_ACEOF
35236 /* confdefs.h.  */
35237 _ACEOF
35238 cat confdefs.h >>conftest.$ac_ext
35239 cat >>conftest.$ac_ext <<_ACEOF
35240 /* end confdefs.h.  */
35241 #include <$ac_header>
35242 _ACEOF
35243 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
35244   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
35245   ac_status=$?
35246   grep -v '^ *+' conftest.er1 >conftest.err
35247   rm -f conftest.er1
35248   cat conftest.err >&5
35249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35250   (exit $ac_status); } >/dev/null; then
35251   if test -s conftest.err; then
35252     ac_cpp_err=$ac_c_preproc_warn_flag
35253     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
35254   else
35255     ac_cpp_err=
35256   fi
35257 else
35258   ac_cpp_err=yes
35259 fi
35260 if test -z "$ac_cpp_err"; then
35261   ac_header_preproc=yes
35262 else
35263   echo "$as_me: failed program was:" >&5
35264 sed 's/^/| /' conftest.$ac_ext >&5
35265
35266   ac_header_preproc=no
35267 fi
35268 rm -f conftest.err conftest.$ac_ext
35269 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
35270 echo "${ECHO_T}$ac_header_preproc" >&6
35271
35272 # So?  What about this header?
35273 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
35274   yes:no: )
35275     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
35276 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35277     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
35278 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
35279     ac_header_preproc=yes
35280     ;;
35281   no:yes:* )
35282     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
35283 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35284     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
35285 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
35286     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
35287 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
35288     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
35289 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
35290     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
35291 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35292     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
35293 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
35294     (
35295       cat <<\_ASBOX
35296 ## --------------------------------------------- ##
35297 ## Report this to <http://www.openldap.org/its/> ##
35298 ## --------------------------------------------- ##
35299 _ASBOX
35300     ) |
35301       sed "s/^/$as_me: WARNING:     /" >&2
35302     ;;
35303 esac
35304 echo "$as_me:$LINENO: checking for $ac_header" >&5
35305 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35306 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35307   echo $ECHO_N "(cached) $ECHO_C" >&6
35308 else
35309   eval "$as_ac_Header=\$ac_header_preproc"
35310 fi
35311 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35312 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35313
35314 fi
35315 if test `eval echo '${'$as_ac_Header'}'` = yes; then
35316   cat >>confdefs.h <<_ACEOF
35317 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
35318 _ACEOF
35319
35320 fi
35321
35322 done
35323
35324  echo "$as_me:$LINENO: checking for db" >&5
35325 echo $ECHO_N "checking for db... $ECHO_C" >&6
35326 if test "${ol_cv_mdbm+set}" = set; then
35327   echo $ECHO_N "(cached) $ECHO_C" >&6
35328 else
35329
35330         if test $ol_cv_lib_mdbm = no || test $ac_cv_header_mdbm_h = no ; then
35331                 ol_cv_mdbm=no
35332         else
35333                 ol_cv_mdbm=yes
35334         fi
35335
35336 fi
35337 echo "$as_me:$LINENO: result: $ol_cv_mdbm" >&5
35338 echo "${ECHO_T}$ol_cv_mdbm" >&6
35339  if test $ol_cv_mdbm = yes ; then
35340
35341 cat >>confdefs.h <<\_ACEOF
35342 #define HAVE_MDBM 1
35343 _ACEOF
35344
35345  fi
35346
35347
35348         if test $ol_cv_mdbm = yes ; then
35349                 ol_link_ldbm=mdbm
35350                 ol_enable_ldbm_api=mdbm
35351                 if test $ol_cv_lib_mdbm != yes ; then
35352                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
35353                 fi
35354         fi
35355 fi
35356
35357 if test $ol_enable_ldbm_api = auto || test $ol_enable_ldbm_api = gdbm ; then
35358         echo "$as_me:$LINENO: checking for GDBM library" >&5
35359 echo $ECHO_N "checking for GDBM library... $ECHO_C" >&6
35360 if test "${ol_cv_lib_gdbm+set}" = set; then
35361   echo $ECHO_N "(cached) $ECHO_C" >&6
35362 else
35363         ol_LIBS="$LIBS"
35364         echo "$as_me:$LINENO: checking for gdbm_open" >&5
35365 echo $ECHO_N "checking for gdbm_open... $ECHO_C" >&6
35366 if test "${ac_cv_func_gdbm_open+set}" = set; then
35367   echo $ECHO_N "(cached) $ECHO_C" >&6
35368 else
35369   cat >conftest.$ac_ext <<_ACEOF
35370 /* confdefs.h.  */
35371 _ACEOF
35372 cat confdefs.h >>conftest.$ac_ext
35373 cat >>conftest.$ac_ext <<_ACEOF
35374 /* end confdefs.h.  */
35375 /* Define gdbm_open to an innocuous variant, in case <limits.h> declares gdbm_open.
35376    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
35377 #define gdbm_open innocuous_gdbm_open
35378
35379 /* System header to define __stub macros and hopefully few prototypes,
35380     which can conflict with char gdbm_open (); below.
35381     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35382     <limits.h> exists even on freestanding compilers.  */
35383
35384 #ifdef __STDC__
35385 # include <limits.h>
35386 #else
35387 # include <assert.h>
35388 #endif
35389
35390 #undef gdbm_open
35391
35392 /* Override any gcc2 internal prototype to avoid an error.  */
35393 #ifdef __cplusplus
35394 extern "C"
35395 {
35396 #endif
35397 /* We use char because int might match the return type of a gcc2
35398    builtin and then its argument prototype would still apply.  */
35399 char gdbm_open ();
35400 /* The GNU C library defines this for functions which it implements
35401     to always fail with ENOSYS.  Some functions are actually named
35402     something starting with __ and the normal name is an alias.  */
35403 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
35404 choke me
35405 #else
35406 char (*f) () = gdbm_open;
35407 #endif
35408 #ifdef __cplusplus
35409 }
35410 #endif
35411
35412 int
35413 main ()
35414 {
35415 return f != gdbm_open;
35416   ;
35417   return 0;
35418 }
35419 _ACEOF
35420 rm -f conftest.$ac_objext conftest$ac_exeext
35421 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35422   (eval $ac_link) 2>conftest.er1
35423   ac_status=$?
35424   grep -v '^ *+' conftest.er1 >conftest.err
35425   rm -f conftest.er1
35426   cat conftest.err >&5
35427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35428   (exit $ac_status); } &&
35429          { ac_try='test -z "$ac_c_werror_flag"
35430                          || test ! -s conftest.err'
35431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35432   (eval $ac_try) 2>&5
35433   ac_status=$?
35434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35435   (exit $ac_status); }; } &&
35436          { ac_try='test -s conftest$ac_exeext'
35437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35438   (eval $ac_try) 2>&5
35439   ac_status=$?
35440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35441   (exit $ac_status); }; }; then
35442   ac_cv_func_gdbm_open=yes
35443 else
35444   echo "$as_me: failed program was:" >&5
35445 sed 's/^/| /' conftest.$ac_ext >&5
35446
35447 ac_cv_func_gdbm_open=no
35448 fi
35449 rm -f conftest.err conftest.$ac_objext \
35450       conftest$ac_exeext conftest.$ac_ext
35451 fi
35452 echo "$as_me:$LINENO: result: $ac_cv_func_gdbm_open" >&5
35453 echo "${ECHO_T}$ac_cv_func_gdbm_open" >&6
35454 if test $ac_cv_func_gdbm_open = yes; then
35455   ol_cv_lib_gdbm=yes
35456 else
35457
35458                 echo "$as_me:$LINENO: checking for gdbm_open in -lgdbm" >&5
35459 echo $ECHO_N "checking for gdbm_open in -lgdbm... $ECHO_C" >&6
35460 if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then
35461   echo $ECHO_N "(cached) $ECHO_C" >&6
35462 else
35463   ac_check_lib_save_LIBS=$LIBS
35464 LIBS="-lgdbm  $LIBS"
35465 cat >conftest.$ac_ext <<_ACEOF
35466 /* confdefs.h.  */
35467 _ACEOF
35468 cat confdefs.h >>conftest.$ac_ext
35469 cat >>conftest.$ac_ext <<_ACEOF
35470 /* end confdefs.h.  */
35471
35472 /* Override any gcc2 internal prototype to avoid an error.  */
35473 #ifdef __cplusplus
35474 extern "C"
35475 #endif
35476 /* We use char because int might match the return type of a gcc2
35477    builtin and then its argument prototype would still apply.  */
35478 char gdbm_open ();
35479 int
35480 main ()
35481 {
35482 gdbm_open ();
35483   ;
35484   return 0;
35485 }
35486 _ACEOF
35487 rm -f conftest.$ac_objext conftest$ac_exeext
35488 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35489   (eval $ac_link) 2>conftest.er1
35490   ac_status=$?
35491   grep -v '^ *+' conftest.er1 >conftest.err
35492   rm -f conftest.er1
35493   cat conftest.err >&5
35494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35495   (exit $ac_status); } &&
35496          { ac_try='test -z "$ac_c_werror_flag"
35497                          || test ! -s conftest.err'
35498   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35499   (eval $ac_try) 2>&5
35500   ac_status=$?
35501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35502   (exit $ac_status); }; } &&
35503          { ac_try='test -s conftest$ac_exeext'
35504   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35505   (eval $ac_try) 2>&5
35506   ac_status=$?
35507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35508   (exit $ac_status); }; }; then
35509   ac_cv_lib_gdbm_gdbm_open=yes
35510 else
35511   echo "$as_me: failed program was:" >&5
35512 sed 's/^/| /' conftest.$ac_ext >&5
35513
35514 ac_cv_lib_gdbm_gdbm_open=no
35515 fi
35516 rm -f conftest.err conftest.$ac_objext \
35517       conftest$ac_exeext conftest.$ac_ext
35518 LIBS=$ac_check_lib_save_LIBS
35519 fi
35520 echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_gdbm_open" >&5
35521 echo "${ECHO_T}$ac_cv_lib_gdbm_gdbm_open" >&6
35522 if test $ac_cv_lib_gdbm_gdbm_open = yes; then
35523   ol_cv_lib_gdbm=-lgdbm
35524 else
35525   ol_cv_lib_gdbm=no
35526 fi
35527
35528
35529 fi
35530
35531         LIBS="$ol_LIBS"
35532
35533 fi
35534 echo "$as_me:$LINENO: result: $ol_cv_lib_gdbm" >&5
35535 echo "${ECHO_T}$ol_cv_lib_gdbm" >&6
35536
35537
35538
35539 for ac_header in gdbm.h
35540 do
35541 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
35542 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35543   echo "$as_me:$LINENO: checking for $ac_header" >&5
35544 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35545 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35546   echo $ECHO_N "(cached) $ECHO_C" >&6
35547 fi
35548 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35549 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35550 else
35551   # Is the header compilable?
35552 echo "$as_me:$LINENO: checking $ac_header usability" >&5
35553 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
35554 cat >conftest.$ac_ext <<_ACEOF
35555 /* confdefs.h.  */
35556 _ACEOF
35557 cat confdefs.h >>conftest.$ac_ext
35558 cat >>conftest.$ac_ext <<_ACEOF
35559 /* end confdefs.h.  */
35560 $ac_includes_default
35561 #include <$ac_header>
35562 _ACEOF
35563 rm -f conftest.$ac_objext
35564 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35565   (eval $ac_compile) 2>conftest.er1
35566   ac_status=$?
35567   grep -v '^ *+' conftest.er1 >conftest.err
35568   rm -f conftest.er1
35569   cat conftest.err >&5
35570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35571   (exit $ac_status); } &&
35572          { ac_try='test -z "$ac_c_werror_flag"
35573                          || test ! -s conftest.err'
35574   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35575   (eval $ac_try) 2>&5
35576   ac_status=$?
35577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35578   (exit $ac_status); }; } &&
35579          { ac_try='test -s conftest.$ac_objext'
35580   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35581   (eval $ac_try) 2>&5
35582   ac_status=$?
35583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35584   (exit $ac_status); }; }; then
35585   ac_header_compiler=yes
35586 else
35587   echo "$as_me: failed program was:" >&5
35588 sed 's/^/| /' conftest.$ac_ext >&5
35589
35590 ac_header_compiler=no
35591 fi
35592 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35593 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
35594 echo "${ECHO_T}$ac_header_compiler" >&6
35595
35596 # Is the header present?
35597 echo "$as_me:$LINENO: checking $ac_header presence" >&5
35598 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
35599 cat >conftest.$ac_ext <<_ACEOF
35600 /* confdefs.h.  */
35601 _ACEOF
35602 cat confdefs.h >>conftest.$ac_ext
35603 cat >>conftest.$ac_ext <<_ACEOF
35604 /* end confdefs.h.  */
35605 #include <$ac_header>
35606 _ACEOF
35607 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
35608   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
35609   ac_status=$?
35610   grep -v '^ *+' conftest.er1 >conftest.err
35611   rm -f conftest.er1
35612   cat conftest.err >&5
35613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35614   (exit $ac_status); } >/dev/null; then
35615   if test -s conftest.err; then
35616     ac_cpp_err=$ac_c_preproc_warn_flag
35617     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
35618   else
35619     ac_cpp_err=
35620   fi
35621 else
35622   ac_cpp_err=yes
35623 fi
35624 if test -z "$ac_cpp_err"; then
35625   ac_header_preproc=yes
35626 else
35627   echo "$as_me: failed program was:" >&5
35628 sed 's/^/| /' conftest.$ac_ext >&5
35629
35630   ac_header_preproc=no
35631 fi
35632 rm -f conftest.err conftest.$ac_ext
35633 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
35634 echo "${ECHO_T}$ac_header_preproc" >&6
35635
35636 # So?  What about this header?
35637 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
35638   yes:no: )
35639     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
35640 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35641     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
35642 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
35643     ac_header_preproc=yes
35644     ;;
35645   no:yes:* )
35646     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
35647 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35648     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
35649 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
35650     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
35651 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
35652     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
35653 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
35654     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
35655 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35656     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
35657 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
35658     (
35659       cat <<\_ASBOX
35660 ## --------------------------------------------- ##
35661 ## Report this to <http://www.openldap.org/its/> ##
35662 ## --------------------------------------------- ##
35663 _ASBOX
35664     ) |
35665       sed "s/^/$as_me: WARNING:     /" >&2
35666     ;;
35667 esac
35668 echo "$as_me:$LINENO: checking for $ac_header" >&5
35669 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35670 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35671   echo $ECHO_N "(cached) $ECHO_C" >&6
35672 else
35673   eval "$as_ac_Header=\$ac_header_preproc"
35674 fi
35675 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35676 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35677
35678 fi
35679 if test `eval echo '${'$as_ac_Header'}'` = yes; then
35680   cat >>confdefs.h <<_ACEOF
35681 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
35682 _ACEOF
35683
35684 fi
35685
35686 done
35687
35688  echo "$as_me:$LINENO: checking for db" >&5
35689 echo $ECHO_N "checking for db... $ECHO_C" >&6
35690 if test "${ol_cv_gdbm+set}" = set; then
35691   echo $ECHO_N "(cached) $ECHO_C" >&6
35692 else
35693
35694         if test $ol_cv_lib_gdbm = no || test $ac_cv_header_gdbm_h = no ; then
35695                 ol_cv_gdbm=no
35696         else
35697                 ol_cv_gdbm=yes
35698         fi
35699
35700 fi
35701 echo "$as_me:$LINENO: result: $ol_cv_gdbm" >&5
35702 echo "${ECHO_T}$ol_cv_gdbm" >&6
35703  if test $ol_cv_gdbm = yes ; then
35704
35705 cat >>confdefs.h <<\_ACEOF
35706 #define HAVE_GDBM 1
35707 _ACEOF
35708
35709  fi
35710
35711
35712         if test $ol_cv_gdbm = yes ; then
35713                 ol_link_ldbm=gdbm
35714                 ol_enable_ldbm_api=gdbm
35715
35716                 if test $ol_cv_lib_gdbm != yes ; then
35717                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
35718                 fi
35719         fi
35720 fi
35721
35722 if test $ol_enable_ldbm_api = ndbm ; then
35723         echo "$as_me:$LINENO: checking for NDBM library" >&5
35724 echo $ECHO_N "checking for NDBM library... $ECHO_C" >&6
35725 if test "${ol_cv_lib_ndbm+set}" = set; then
35726   echo $ECHO_N "(cached) $ECHO_C" >&6
35727 else
35728         ol_LIBS="$LIBS"
35729         echo "$as_me:$LINENO: checking for dbm_open" >&5
35730 echo $ECHO_N "checking for dbm_open... $ECHO_C" >&6
35731 if test "${ac_cv_func_dbm_open+set}" = set; then
35732   echo $ECHO_N "(cached) $ECHO_C" >&6
35733 else
35734   cat >conftest.$ac_ext <<_ACEOF
35735 /* confdefs.h.  */
35736 _ACEOF
35737 cat confdefs.h >>conftest.$ac_ext
35738 cat >>conftest.$ac_ext <<_ACEOF
35739 /* end confdefs.h.  */
35740 /* Define dbm_open to an innocuous variant, in case <limits.h> declares dbm_open.
35741    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
35742 #define dbm_open innocuous_dbm_open
35743
35744 /* System header to define __stub macros and hopefully few prototypes,
35745     which can conflict with char dbm_open (); below.
35746     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35747     <limits.h> exists even on freestanding compilers.  */
35748
35749 #ifdef __STDC__
35750 # include <limits.h>
35751 #else
35752 # include <assert.h>
35753 #endif
35754
35755 #undef dbm_open
35756
35757 /* Override any gcc2 internal prototype to avoid an error.  */
35758 #ifdef __cplusplus
35759 extern "C"
35760 {
35761 #endif
35762 /* We use char because int might match the return type of a gcc2
35763    builtin and then its argument prototype would still apply.  */
35764 char dbm_open ();
35765 /* The GNU C library defines this for functions which it implements
35766     to always fail with ENOSYS.  Some functions are actually named
35767     something starting with __ and the normal name is an alias.  */
35768 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
35769 choke me
35770 #else
35771 char (*f) () = dbm_open;
35772 #endif
35773 #ifdef __cplusplus
35774 }
35775 #endif
35776
35777 int
35778 main ()
35779 {
35780 return f != dbm_open;
35781   ;
35782   return 0;
35783 }
35784 _ACEOF
35785 rm -f conftest.$ac_objext conftest$ac_exeext
35786 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35787   (eval $ac_link) 2>conftest.er1
35788   ac_status=$?
35789   grep -v '^ *+' conftest.er1 >conftest.err
35790   rm -f conftest.er1
35791   cat conftest.err >&5
35792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35793   (exit $ac_status); } &&
35794          { ac_try='test -z "$ac_c_werror_flag"
35795                          || test ! -s conftest.err'
35796   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35797   (eval $ac_try) 2>&5
35798   ac_status=$?
35799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35800   (exit $ac_status); }; } &&
35801          { ac_try='test -s conftest$ac_exeext'
35802   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35803   (eval $ac_try) 2>&5
35804   ac_status=$?
35805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35806   (exit $ac_status); }; }; then
35807   ac_cv_func_dbm_open=yes
35808 else
35809   echo "$as_me: failed program was:" >&5
35810 sed 's/^/| /' conftest.$ac_ext >&5
35811
35812 ac_cv_func_dbm_open=no
35813 fi
35814 rm -f conftest.err conftest.$ac_objext \
35815       conftest$ac_exeext conftest.$ac_ext
35816 fi
35817 echo "$as_me:$LINENO: result: $ac_cv_func_dbm_open" >&5
35818 echo "${ECHO_T}$ac_cv_func_dbm_open" >&6
35819 if test $ac_cv_func_dbm_open = yes; then
35820   ol_cv_lib_ndbm=yes
35821 else
35822
35823                 echo "$as_me:$LINENO: checking for dbm_open in -lndbm" >&5
35824 echo $ECHO_N "checking for dbm_open in -lndbm... $ECHO_C" >&6
35825 if test "${ac_cv_lib_ndbm_dbm_open+set}" = set; then
35826   echo $ECHO_N "(cached) $ECHO_C" >&6
35827 else
35828   ac_check_lib_save_LIBS=$LIBS
35829 LIBS="-lndbm  $LIBS"
35830 cat >conftest.$ac_ext <<_ACEOF
35831 /* confdefs.h.  */
35832 _ACEOF
35833 cat confdefs.h >>conftest.$ac_ext
35834 cat >>conftest.$ac_ext <<_ACEOF
35835 /* end confdefs.h.  */
35836
35837 /* Override any gcc2 internal prototype to avoid an error.  */
35838 #ifdef __cplusplus
35839 extern "C"
35840 #endif
35841 /* We use char because int might match the return type of a gcc2
35842    builtin and then its argument prototype would still apply.  */
35843 char dbm_open ();
35844 int
35845 main ()
35846 {
35847 dbm_open ();
35848   ;
35849   return 0;
35850 }
35851 _ACEOF
35852 rm -f conftest.$ac_objext conftest$ac_exeext
35853 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35854   (eval $ac_link) 2>conftest.er1
35855   ac_status=$?
35856   grep -v '^ *+' conftest.er1 >conftest.err
35857   rm -f conftest.er1
35858   cat conftest.err >&5
35859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35860   (exit $ac_status); } &&
35861          { ac_try='test -z "$ac_c_werror_flag"
35862                          || test ! -s conftest.err'
35863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35864   (eval $ac_try) 2>&5
35865   ac_status=$?
35866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35867   (exit $ac_status); }; } &&
35868          { ac_try='test -s conftest$ac_exeext'
35869   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35870   (eval $ac_try) 2>&5
35871   ac_status=$?
35872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35873   (exit $ac_status); }; }; then
35874   ac_cv_lib_ndbm_dbm_open=yes
35875 else
35876   echo "$as_me: failed program was:" >&5
35877 sed 's/^/| /' conftest.$ac_ext >&5
35878
35879 ac_cv_lib_ndbm_dbm_open=no
35880 fi
35881 rm -f conftest.err conftest.$ac_objext \
35882       conftest$ac_exeext conftest.$ac_ext
35883 LIBS=$ac_check_lib_save_LIBS
35884 fi
35885 echo "$as_me:$LINENO: result: $ac_cv_lib_ndbm_dbm_open" >&5
35886 echo "${ECHO_T}$ac_cv_lib_ndbm_dbm_open" >&6
35887 if test $ac_cv_lib_ndbm_dbm_open = yes; then
35888   ol_cv_lib_ndbm=-lndbm
35889 else
35890
35891                         echo "$as_me:$LINENO: checking for dbm_open in -ldbm" >&5
35892 echo $ECHO_N "checking for dbm_open in -ldbm... $ECHO_C" >&6
35893 if test "${ac_cv_lib_dbm_dbm_open+set}" = set; then
35894   echo $ECHO_N "(cached) $ECHO_C" >&6
35895 else
35896   ac_check_lib_save_LIBS=$LIBS
35897 LIBS="-ldbm  $LIBS"
35898 cat >conftest.$ac_ext <<_ACEOF
35899 /* confdefs.h.  */
35900 _ACEOF
35901 cat confdefs.h >>conftest.$ac_ext
35902 cat >>conftest.$ac_ext <<_ACEOF
35903 /* end confdefs.h.  */
35904
35905 /* Override any gcc2 internal prototype to avoid an error.  */
35906 #ifdef __cplusplus
35907 extern "C"
35908 #endif
35909 /* We use char because int might match the return type of a gcc2
35910    builtin and then its argument prototype would still apply.  */
35911 char dbm_open ();
35912 int
35913 main ()
35914 {
35915 dbm_open ();
35916   ;
35917   return 0;
35918 }
35919 _ACEOF
35920 rm -f conftest.$ac_objext conftest$ac_exeext
35921 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35922   (eval $ac_link) 2>conftest.er1
35923   ac_status=$?
35924   grep -v '^ *+' conftest.er1 >conftest.err
35925   rm -f conftest.er1
35926   cat conftest.err >&5
35927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35928   (exit $ac_status); } &&
35929          { ac_try='test -z "$ac_c_werror_flag"
35930                          || test ! -s conftest.err'
35931   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35932   (eval $ac_try) 2>&5
35933   ac_status=$?
35934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35935   (exit $ac_status); }; } &&
35936          { ac_try='test -s conftest$ac_exeext'
35937   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35938   (eval $ac_try) 2>&5
35939   ac_status=$?
35940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35941   (exit $ac_status); }; }; then
35942   ac_cv_lib_dbm_dbm_open=yes
35943 else
35944   echo "$as_me: failed program was:" >&5
35945 sed 's/^/| /' conftest.$ac_ext >&5
35946
35947 ac_cv_lib_dbm_dbm_open=no
35948 fi
35949 rm -f conftest.err conftest.$ac_objext \
35950       conftest$ac_exeext conftest.$ac_ext
35951 LIBS=$ac_check_lib_save_LIBS
35952 fi
35953 echo "$as_me:$LINENO: result: $ac_cv_lib_dbm_dbm_open" >&5
35954 echo "${ECHO_T}$ac_cv_lib_dbm_dbm_open" >&6
35955 if test $ac_cv_lib_dbm_dbm_open = yes; then
35956   ol_cv_lib_ndbm=-ldbm
35957 else
35958   ol_cv_lib_ndbm=no
35959 fi
35960
35961 fi
35962
35963
35964 fi
35965
35966         LIBS="$ol_LIBS"
35967
35968 fi
35969 echo "$as_me:$LINENO: result: $ol_cv_lib_ndbm" >&5
35970 echo "${ECHO_T}$ol_cv_lib_ndbm" >&6
35971
35972
35973
35974 for ac_header in ndbm.h
35975 do
35976 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
35977 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35978   echo "$as_me:$LINENO: checking for $ac_header" >&5
35979 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35980 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35981   echo $ECHO_N "(cached) $ECHO_C" >&6
35982 fi
35983 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35984 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35985 else
35986   # Is the header compilable?
35987 echo "$as_me:$LINENO: checking $ac_header usability" >&5
35988 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
35989 cat >conftest.$ac_ext <<_ACEOF
35990 /* confdefs.h.  */
35991 _ACEOF
35992 cat confdefs.h >>conftest.$ac_ext
35993 cat >>conftest.$ac_ext <<_ACEOF
35994 /* end confdefs.h.  */
35995 $ac_includes_default
35996 #include <$ac_header>
35997 _ACEOF
35998 rm -f conftest.$ac_objext
35999 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36000   (eval $ac_compile) 2>conftest.er1
36001   ac_status=$?
36002   grep -v '^ *+' conftest.er1 >conftest.err
36003   rm -f conftest.er1
36004   cat conftest.err >&5
36005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36006   (exit $ac_status); } &&
36007          { ac_try='test -z "$ac_c_werror_flag"
36008                          || test ! -s conftest.err'
36009   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36010   (eval $ac_try) 2>&5
36011   ac_status=$?
36012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36013   (exit $ac_status); }; } &&
36014          { ac_try='test -s conftest.$ac_objext'
36015   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36016   (eval $ac_try) 2>&5
36017   ac_status=$?
36018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36019   (exit $ac_status); }; }; then
36020   ac_header_compiler=yes
36021 else
36022   echo "$as_me: failed program was:" >&5
36023 sed 's/^/| /' conftest.$ac_ext >&5
36024
36025 ac_header_compiler=no
36026 fi
36027 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36028 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
36029 echo "${ECHO_T}$ac_header_compiler" >&6
36030
36031 # Is the header present?
36032 echo "$as_me:$LINENO: checking $ac_header presence" >&5
36033 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
36034 cat >conftest.$ac_ext <<_ACEOF
36035 /* confdefs.h.  */
36036 _ACEOF
36037 cat confdefs.h >>conftest.$ac_ext
36038 cat >>conftest.$ac_ext <<_ACEOF
36039 /* end confdefs.h.  */
36040 #include <$ac_header>
36041 _ACEOF
36042 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
36043   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
36044   ac_status=$?
36045   grep -v '^ *+' conftest.er1 >conftest.err
36046   rm -f conftest.er1
36047   cat conftest.err >&5
36048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36049   (exit $ac_status); } >/dev/null; then
36050   if test -s conftest.err; then
36051     ac_cpp_err=$ac_c_preproc_warn_flag
36052     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
36053   else
36054     ac_cpp_err=
36055   fi
36056 else
36057   ac_cpp_err=yes
36058 fi
36059 if test -z "$ac_cpp_err"; then
36060   ac_header_preproc=yes
36061 else
36062   echo "$as_me: failed program was:" >&5
36063 sed 's/^/| /' conftest.$ac_ext >&5
36064
36065   ac_header_preproc=no
36066 fi
36067 rm -f conftest.err conftest.$ac_ext
36068 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
36069 echo "${ECHO_T}$ac_header_preproc" >&6
36070
36071 # So?  What about this header?
36072 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
36073   yes:no: )
36074     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
36075 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
36076     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
36077 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
36078     ac_header_preproc=yes
36079     ;;
36080   no:yes:* )
36081     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
36082 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
36083     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
36084 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
36085     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
36086 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
36087     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
36088 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
36089     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
36090 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
36091     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
36092 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
36093     (
36094       cat <<\_ASBOX
36095 ## --------------------------------------------- ##
36096 ## Report this to <http://www.openldap.org/its/> ##
36097 ## --------------------------------------------- ##
36098 _ASBOX
36099     ) |
36100       sed "s/^/$as_me: WARNING:     /" >&2
36101     ;;
36102 esac
36103 echo "$as_me:$LINENO: checking for $ac_header" >&5
36104 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36105 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36106   echo $ECHO_N "(cached) $ECHO_C" >&6
36107 else
36108   eval "$as_ac_Header=\$ac_header_preproc"
36109 fi
36110 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36111 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36112
36113 fi
36114 if test `eval echo '${'$as_ac_Header'}'` = yes; then
36115   cat >>confdefs.h <<_ACEOF
36116 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
36117 _ACEOF
36118
36119 fi
36120
36121 done
36122
36123  echo "$as_me:$LINENO: checking for db" >&5
36124 echo $ECHO_N "checking for db... $ECHO_C" >&6
36125 if test "${ol_cv_ndbm+set}" = set; then
36126   echo $ECHO_N "(cached) $ECHO_C" >&6
36127 else
36128
36129         if test $ol_cv_lib_ndbm = no || test $ac_cv_header_ndbm_h = no ; then
36130                 ol_cv_ndbm=no
36131         else
36132                 ol_cv_ndbm=yes
36133         fi
36134
36135 fi
36136 echo "$as_me:$LINENO: result: $ol_cv_ndbm" >&5
36137 echo "${ECHO_T}$ol_cv_ndbm" >&6
36138  if test $ol_cv_ndbm = yes ; then
36139
36140 cat >>confdefs.h <<\_ACEOF
36141 #define HAVE_NDBM 1
36142 _ACEOF
36143
36144  fi
36145
36146
36147         if test $ol_cv_ndbm = yes ; then
36148                 ol_link_ldbm=ndbm
36149                 ol_enable_ldbm_api=ndbm
36150
36151                 if test $ol_cv_lib_ndbm != yes ; then
36152                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
36153                 fi
36154         fi
36155 fi
36156
36157 if test $ol_link_ldbm = no && test $ol_enable_ldbm != no ; then
36158         { { echo "$as_me:$LINENO: error: could not find suitable LDBM backend" >&5
36159 echo "$as_me: error: could not find suitable LDBM backend" >&2;}
36160    { (exit 1); exit 1; }; }
36161 fi
36162
36163 if test $ol_enable_bdb = yes ||
36164    test $ol_enable_hdb = yes ||
36165    test $ol_enable_ldbm = yes ; then
36166         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
36167 fi
36168
36169
36170 if test $ol_enable_dynamic = yes && test $enable_shared = yes ; then
36171         BUILD_LIBS_DYNAMIC=shared
36172
36173 cat >>confdefs.h <<\_ACEOF
36174 #define LDAP_LIBS_DYNAMIC 1
36175 _ACEOF
36176
36177         LTSTATIC=""
36178 else
36179         BUILD_LIBS_DYNAMIC=static
36180         LTSTATIC="-static"
36181 fi
36182
36183 if test $ol_enable_wrappers != no ; then
36184
36185 for ac_header in tcpd.h
36186 do
36187 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
36188 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36189   echo "$as_me:$LINENO: checking for $ac_header" >&5
36190 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36191 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36192   echo $ECHO_N "(cached) $ECHO_C" >&6
36193 fi
36194 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36195 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36196 else
36197   # Is the header compilable?
36198 echo "$as_me:$LINENO: checking $ac_header usability" >&5
36199 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
36200 cat >conftest.$ac_ext <<_ACEOF
36201 /* confdefs.h.  */
36202 _ACEOF
36203 cat confdefs.h >>conftest.$ac_ext
36204 cat >>conftest.$ac_ext <<_ACEOF
36205 /* end confdefs.h.  */
36206 $ac_includes_default
36207 #include <$ac_header>
36208 _ACEOF
36209 rm -f conftest.$ac_objext
36210 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36211   (eval $ac_compile) 2>conftest.er1
36212   ac_status=$?
36213   grep -v '^ *+' conftest.er1 >conftest.err
36214   rm -f conftest.er1
36215   cat conftest.err >&5
36216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36217   (exit $ac_status); } &&
36218          { ac_try='test -z "$ac_c_werror_flag"
36219                          || test ! -s conftest.err'
36220   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36221   (eval $ac_try) 2>&5
36222   ac_status=$?
36223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36224   (exit $ac_status); }; } &&
36225          { ac_try='test -s conftest.$ac_objext'
36226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36227   (eval $ac_try) 2>&5
36228   ac_status=$?
36229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36230   (exit $ac_status); }; }; then
36231   ac_header_compiler=yes
36232 else
36233   echo "$as_me: failed program was:" >&5
36234 sed 's/^/| /' conftest.$ac_ext >&5
36235
36236 ac_header_compiler=no
36237 fi
36238 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36239 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
36240 echo "${ECHO_T}$ac_header_compiler" >&6
36241
36242 # Is the header present?
36243 echo "$as_me:$LINENO: checking $ac_header presence" >&5
36244 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
36245 cat >conftest.$ac_ext <<_ACEOF
36246 /* confdefs.h.  */
36247 _ACEOF
36248 cat confdefs.h >>conftest.$ac_ext
36249 cat >>conftest.$ac_ext <<_ACEOF
36250 /* end confdefs.h.  */
36251 #include <$ac_header>
36252 _ACEOF
36253 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
36254   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
36255   ac_status=$?
36256   grep -v '^ *+' conftest.er1 >conftest.err
36257   rm -f conftest.er1
36258   cat conftest.err >&5
36259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36260   (exit $ac_status); } >/dev/null; then
36261   if test -s conftest.err; then
36262     ac_cpp_err=$ac_c_preproc_warn_flag
36263     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
36264   else
36265     ac_cpp_err=
36266   fi
36267 else
36268   ac_cpp_err=yes
36269 fi
36270 if test -z "$ac_cpp_err"; then
36271   ac_header_preproc=yes
36272 else
36273   echo "$as_me: failed program was:" >&5
36274 sed 's/^/| /' conftest.$ac_ext >&5
36275
36276   ac_header_preproc=no
36277 fi
36278 rm -f conftest.err conftest.$ac_ext
36279 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
36280 echo "${ECHO_T}$ac_header_preproc" >&6
36281
36282 # So?  What about this header?
36283 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
36284   yes:no: )
36285     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
36286 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
36287     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
36288 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
36289     ac_header_preproc=yes
36290     ;;
36291   no:yes:* )
36292     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
36293 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
36294     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
36295 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
36296     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
36297 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
36298     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
36299 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
36300     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
36301 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
36302     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
36303 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
36304     (
36305       cat <<\_ASBOX
36306 ## --------------------------------------------- ##
36307 ## Report this to <http://www.openldap.org/its/> ##
36308 ## --------------------------------------------- ##
36309 _ASBOX
36310     ) |
36311       sed "s/^/$as_me: WARNING:     /" >&2
36312     ;;
36313 esac
36314 echo "$as_me:$LINENO: checking for $ac_header" >&5
36315 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36316 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36317   echo $ECHO_N "(cached) $ECHO_C" >&6
36318 else
36319   eval "$as_ac_Header=\$ac_header_preproc"
36320 fi
36321 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36322 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36323
36324 fi
36325 if test `eval echo '${'$as_ac_Header'}'` = yes; then
36326   cat >>confdefs.h <<_ACEOF
36327 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
36328 _ACEOF
36329
36330                 echo "$as_me:$LINENO: checking for TCP wrappers library" >&5
36331 echo $ECHO_N "checking for TCP wrappers library... $ECHO_C" >&6
36332                 save_LIBS="$LIBS"
36333                 LIBS="$LIBS -lwrap"
36334                 cat >conftest.$ac_ext <<_ACEOF
36335 /* confdefs.h.  */
36336 _ACEOF
36337 cat confdefs.h >>conftest.$ac_ext
36338 cat >>conftest.$ac_ext <<_ACEOF
36339 /* end confdefs.h.  */
36340
36341 #include <tcpd.h>
36342 int allow_severity = 0;
36343 int deny_severity  = 0;
36344
36345 struct request_info *req;
36346
36347 int
36348 main ()
36349 {
36350
36351 hosts_access(req)
36352
36353   ;
36354   return 0;
36355 }
36356 _ACEOF
36357 rm -f conftest.$ac_objext conftest$ac_exeext
36358 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36359   (eval $ac_link) 2>conftest.er1
36360   ac_status=$?
36361   grep -v '^ *+' conftest.er1 >conftest.err
36362   rm -f conftest.er1
36363   cat conftest.err >&5
36364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36365   (exit $ac_status); } &&
36366          { ac_try='test -z "$ac_c_werror_flag"
36367                          || test ! -s conftest.err'
36368   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36369   (eval $ac_try) 2>&5
36370   ac_status=$?
36371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36372   (exit $ac_status); }; } &&
36373          { ac_try='test -s conftest$ac_exeext'
36374   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36375   (eval $ac_try) 2>&5
36376   ac_status=$?
36377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36378   (exit $ac_status); }; }; then
36379   echo "$as_me:$LINENO: result: -lwrap" >&5
36380 echo "${ECHO_T}-lwrap" >&6
36381                 have_wrappers=yes
36382                 LIBS="$save_LIBS"
36383 else
36384   echo "$as_me: failed program was:" >&5
36385 sed 's/^/| /' conftest.$ac_ext >&5
36386
36387
36388                                 LIBS="$LIBS -lnsl"
36389                 cat >conftest.$ac_ext <<_ACEOF
36390 /* confdefs.h.  */
36391 _ACEOF
36392 cat confdefs.h >>conftest.$ac_ext
36393 cat >>conftest.$ac_ext <<_ACEOF
36394 /* end confdefs.h.  */
36395
36396 #include <tcpd.h>
36397 int allow_severity = 0;
36398 int deny_severity  = 0;
36399
36400 struct request_info *req;
36401
36402 int
36403 main ()
36404 {
36405
36406 hosts_access(req)
36407
36408   ;
36409   return 0;
36410 }
36411 _ACEOF
36412 rm -f conftest.$ac_objext conftest$ac_exeext
36413 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36414   (eval $ac_link) 2>conftest.er1
36415   ac_status=$?
36416   grep -v '^ *+' conftest.er1 >conftest.err
36417   rm -f conftest.er1
36418   cat conftest.err >&5
36419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36420   (exit $ac_status); } &&
36421          { ac_try='test -z "$ac_c_werror_flag"
36422                          || test ! -s conftest.err'
36423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36424   (eval $ac_try) 2>&5
36425   ac_status=$?
36426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36427   (exit $ac_status); }; } &&
36428          { ac_try='test -s conftest$ac_exeext'
36429   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36430   (eval $ac_try) 2>&5
36431   ac_status=$?
36432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36433   (exit $ac_status); }; }; then
36434   echo "$as_me:$LINENO: result: -lwrap -lnsl" >&5
36435 echo "${ECHO_T}-lwrap -lnsl" >&6
36436                 have_wrappers=yes
36437                 LIBS="$save_LIBS -lnsl"
36438 else
36439   echo "$as_me: failed program was:" >&5
36440 sed 's/^/| /' conftest.$ac_ext >&5
36441
36442
36443                 echo "$as_me:$LINENO: result: no" >&5
36444 echo "${ECHO_T}no" >&6
36445                 have_wrappers=no
36446                 LIBS=$save_LIBS
36447 fi
36448 rm -f conftest.err conftest.$ac_objext \
36449       conftest$ac_exeext conftest.$ac_ext
36450 fi
36451 rm -f conftest.err conftest.$ac_objext \
36452       conftest$ac_exeext conftest.$ac_ext
36453 else
36454   have_wrappers=no
36455 fi
36456
36457 done
36458
36459
36460         if test $have_wrappers = yes ; then
36461
36462 cat >>confdefs.h <<\_ACEOF
36463 #define HAVE_TCPD 1
36464 _ACEOF
36465
36466                 WRAP_LIBS="-lwrap"
36467         elif test $ol_enable_wrappers = yes ; then
36468                 { { echo "$as_me:$LINENO: error: could not find TCP wrappers, select apppropriate options or disable" >&5
36469 echo "$as_me: error: could not find TCP wrappers, select apppropriate options or disable" >&2;}
36470    { (exit 1); exit 1; }; }
36471         else
36472                 { echo "$as_me:$LINENO: WARNING: could not find TCP wrappers, support disabled" >&5
36473 echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
36474                 WRAP_LIBS=""
36475         fi
36476 fi
36477
36478 if test $ol_enable_syslog != no ; then
36479         echo "$as_me:$LINENO: checking for openlog" >&5
36480 echo $ECHO_N "checking for openlog... $ECHO_C" >&6
36481 if test "${ac_cv_func_openlog+set}" = set; then
36482   echo $ECHO_N "(cached) $ECHO_C" >&6
36483 else
36484   cat >conftest.$ac_ext <<_ACEOF
36485 /* confdefs.h.  */
36486 _ACEOF
36487 cat confdefs.h >>conftest.$ac_ext
36488 cat >>conftest.$ac_ext <<_ACEOF
36489 /* end confdefs.h.  */
36490 /* Define openlog to an innocuous variant, in case <limits.h> declares openlog.
36491    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
36492 #define openlog innocuous_openlog
36493
36494 /* System header to define __stub macros and hopefully few prototypes,
36495     which can conflict with char openlog (); below.
36496     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36497     <limits.h> exists even on freestanding compilers.  */
36498
36499 #ifdef __STDC__
36500 # include <limits.h>
36501 #else
36502 # include <assert.h>
36503 #endif
36504
36505 #undef openlog
36506
36507 /* Override any gcc2 internal prototype to avoid an error.  */
36508 #ifdef __cplusplus
36509 extern "C"
36510 {
36511 #endif
36512 /* We use char because int might match the return type of a gcc2
36513    builtin and then its argument prototype would still apply.  */
36514 char openlog ();
36515 /* The GNU C library defines this for functions which it implements
36516     to always fail with ENOSYS.  Some functions are actually named
36517     something starting with __ and the normal name is an alias.  */
36518 #if defined (__stub_openlog) || defined (__stub___openlog)
36519 choke me
36520 #else
36521 char (*f) () = openlog;
36522 #endif
36523 #ifdef __cplusplus
36524 }
36525 #endif
36526
36527 int
36528 main ()
36529 {
36530 return f != openlog;
36531   ;
36532   return 0;
36533 }
36534 _ACEOF
36535 rm -f conftest.$ac_objext conftest$ac_exeext
36536 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36537   (eval $ac_link) 2>conftest.er1
36538   ac_status=$?
36539   grep -v '^ *+' conftest.er1 >conftest.err
36540   rm -f conftest.er1
36541   cat conftest.err >&5
36542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36543   (exit $ac_status); } &&
36544          { ac_try='test -z "$ac_c_werror_flag"
36545                          || test ! -s conftest.err'
36546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36547   (eval $ac_try) 2>&5
36548   ac_status=$?
36549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36550   (exit $ac_status); }; } &&
36551          { ac_try='test -s conftest$ac_exeext'
36552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36553   (eval $ac_try) 2>&5
36554   ac_status=$?
36555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36556   (exit $ac_status); }; }; then
36557   ac_cv_func_openlog=yes
36558 else
36559   echo "$as_me: failed program was:" >&5
36560 sed 's/^/| /' conftest.$ac_ext >&5
36561
36562 ac_cv_func_openlog=no
36563 fi
36564 rm -f conftest.err conftest.$ac_objext \
36565       conftest$ac_exeext conftest.$ac_ext
36566 fi
36567 echo "$as_me:$LINENO: result: $ac_cv_func_openlog" >&5
36568 echo "${ECHO_T}$ac_cv_func_openlog" >&6
36569
36570         if test $ac_cv_func_openlog = no && test $ol_enable_syslog = yes; then
36571                 { { echo "$as_me:$LINENO: error: could not find syslog" >&5
36572 echo "$as_me: error: could not find syslog" >&2;}
36573    { (exit select appropriate options or disable); exit select appropriate options or disable; }; }
36574         fi
36575         ol_enable_syslog=$ac_cv_func_openlog
36576 fi
36577
36578 ol_link_sql=no
36579 if test $ol_enable_sql != no ; then
36580
36581
36582 for ac_header in sql.h sqlext.h
36583 do
36584 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
36585 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36586   echo "$as_me:$LINENO: checking for $ac_header" >&5
36587 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36588 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36589   echo $ECHO_N "(cached) $ECHO_C" >&6
36590 fi
36591 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36592 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36593 else
36594   # Is the header compilable?
36595 echo "$as_me:$LINENO: checking $ac_header usability" >&5
36596 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
36597 cat >conftest.$ac_ext <<_ACEOF
36598 /* confdefs.h.  */
36599 _ACEOF
36600 cat confdefs.h >>conftest.$ac_ext
36601 cat >>conftest.$ac_ext <<_ACEOF
36602 /* end confdefs.h.  */
36603 $ac_includes_default
36604 #include <$ac_header>
36605 _ACEOF
36606 rm -f conftest.$ac_objext
36607 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36608   (eval $ac_compile) 2>conftest.er1
36609   ac_status=$?
36610   grep -v '^ *+' conftest.er1 >conftest.err
36611   rm -f conftest.er1
36612   cat conftest.err >&5
36613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36614   (exit $ac_status); } &&
36615          { ac_try='test -z "$ac_c_werror_flag"
36616                          || test ! -s conftest.err'
36617   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36618   (eval $ac_try) 2>&5
36619   ac_status=$?
36620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36621   (exit $ac_status); }; } &&
36622          { ac_try='test -s conftest.$ac_objext'
36623   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36624   (eval $ac_try) 2>&5
36625   ac_status=$?
36626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36627   (exit $ac_status); }; }; then
36628   ac_header_compiler=yes
36629 else
36630   echo "$as_me: failed program was:" >&5
36631 sed 's/^/| /' conftest.$ac_ext >&5
36632
36633 ac_header_compiler=no
36634 fi
36635 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36636 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
36637 echo "${ECHO_T}$ac_header_compiler" >&6
36638
36639 # Is the header present?
36640 echo "$as_me:$LINENO: checking $ac_header presence" >&5
36641 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
36642 cat >conftest.$ac_ext <<_ACEOF
36643 /* confdefs.h.  */
36644 _ACEOF
36645 cat confdefs.h >>conftest.$ac_ext
36646 cat >>conftest.$ac_ext <<_ACEOF
36647 /* end confdefs.h.  */
36648 #include <$ac_header>
36649 _ACEOF
36650 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
36651   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
36652   ac_status=$?
36653   grep -v '^ *+' conftest.er1 >conftest.err
36654   rm -f conftest.er1
36655   cat conftest.err >&5
36656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36657   (exit $ac_status); } >/dev/null; then
36658   if test -s conftest.err; then
36659     ac_cpp_err=$ac_c_preproc_warn_flag
36660     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
36661   else
36662     ac_cpp_err=
36663   fi
36664 else
36665   ac_cpp_err=yes
36666 fi
36667 if test -z "$ac_cpp_err"; then
36668   ac_header_preproc=yes
36669 else
36670   echo "$as_me: failed program was:" >&5
36671 sed 's/^/| /' conftest.$ac_ext >&5
36672
36673   ac_header_preproc=no
36674 fi
36675 rm -f conftest.err conftest.$ac_ext
36676 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
36677 echo "${ECHO_T}$ac_header_preproc" >&6
36678
36679 # So?  What about this header?
36680 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
36681   yes:no: )
36682     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
36683 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
36684     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
36685 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
36686     ac_header_preproc=yes
36687     ;;
36688   no:yes:* )
36689     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
36690 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
36691     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
36692 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
36693     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
36694 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
36695     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
36696 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
36697     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
36698 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
36699     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
36700 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
36701     (
36702       cat <<\_ASBOX
36703 ## --------------------------------------------- ##
36704 ## Report this to <http://www.openldap.org/its/> ##
36705 ## --------------------------------------------- ##
36706 _ASBOX
36707     ) |
36708       sed "s/^/$as_me: WARNING:     /" >&2
36709     ;;
36710 esac
36711 echo "$as_me:$LINENO: checking for $ac_header" >&5
36712 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36713 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36714   echo $ECHO_N "(cached) $ECHO_C" >&6
36715 else
36716   eval "$as_ac_Header=\$ac_header_preproc"
36717 fi
36718 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36719 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36720
36721 fi
36722 if test `eval echo '${'$as_ac_Header'}'` = yes; then
36723   cat >>confdefs.h <<_ACEOF
36724 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
36725 _ACEOF
36726
36727 else
36728
36729                 { { echo "$as_me:$LINENO: error: could not locate SQL headers" >&5
36730 echo "$as_me: error: could not locate SQL headers" >&2;}
36731    { (exit 1); exit 1; }; }
36732
36733 fi
36734
36735 done
36736
36737
36738         sql_LIBS="$LIBS"
36739         LIBS="$LTHREAD_LIBS"
36740
36741         echo "$as_me:$LINENO: checking for SQLDriverConnect in -liodbc" >&5
36742 echo $ECHO_N "checking for SQLDriverConnect in -liodbc... $ECHO_C" >&6
36743 if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then
36744   echo $ECHO_N "(cached) $ECHO_C" >&6
36745 else
36746   ac_check_lib_save_LIBS=$LIBS
36747 LIBS="-liodbc  $LIBS"
36748 cat >conftest.$ac_ext <<_ACEOF
36749 /* confdefs.h.  */
36750 _ACEOF
36751 cat confdefs.h >>conftest.$ac_ext
36752 cat >>conftest.$ac_ext <<_ACEOF
36753 /* end confdefs.h.  */
36754
36755 /* Override any gcc2 internal prototype to avoid an error.  */
36756 #ifdef __cplusplus
36757 extern "C"
36758 #endif
36759 /* We use char because int might match the return type of a gcc2
36760    builtin and then its argument prototype would still apply.  */
36761 char SQLDriverConnect ();
36762 int
36763 main ()
36764 {
36765 SQLDriverConnect ();
36766   ;
36767   return 0;
36768 }
36769 _ACEOF
36770 rm -f conftest.$ac_objext conftest$ac_exeext
36771 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36772   (eval $ac_link) 2>conftest.er1
36773   ac_status=$?
36774   grep -v '^ *+' conftest.er1 >conftest.err
36775   rm -f conftest.er1
36776   cat conftest.err >&5
36777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36778   (exit $ac_status); } &&
36779          { ac_try='test -z "$ac_c_werror_flag"
36780                          || test ! -s conftest.err'
36781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36782   (eval $ac_try) 2>&5
36783   ac_status=$?
36784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36785   (exit $ac_status); }; } &&
36786          { ac_try='test -s conftest$ac_exeext'
36787   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36788   (eval $ac_try) 2>&5
36789   ac_status=$?
36790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36791   (exit $ac_status); }; }; then
36792   ac_cv_lib_iodbc_SQLDriverConnect=yes
36793 else
36794   echo "$as_me: failed program was:" >&5
36795 sed 's/^/| /' conftest.$ac_ext >&5
36796
36797 ac_cv_lib_iodbc_SQLDriverConnect=no
36798 fi
36799 rm -f conftest.err conftest.$ac_objext \
36800       conftest$ac_exeext conftest.$ac_ext
36801 LIBS=$ac_check_lib_save_LIBS
36802 fi
36803 echo "$as_me:$LINENO: result: $ac_cv_lib_iodbc_SQLDriverConnect" >&5
36804 echo "${ECHO_T}$ac_cv_lib_iodbc_SQLDriverConnect" >&6
36805 if test $ac_cv_lib_iodbc_SQLDriverConnect = yes; then
36806   have_iodbc=yes
36807 else
36808   have_iodbc=no
36809 fi
36810
36811         if test $have_iodbc = yes ; then
36812                 ol_link_sql="-liodbc"
36813         else
36814                 echo "$as_me:$LINENO: checking for SQLDriverConnect in -lodbc" >&5
36815 echo $ECHO_N "checking for SQLDriverConnect in -lodbc... $ECHO_C" >&6
36816 if test "${ac_cv_lib_odbc_SQLDriverConnect+set}" = set; then
36817   echo $ECHO_N "(cached) $ECHO_C" >&6
36818 else
36819   ac_check_lib_save_LIBS=$LIBS
36820 LIBS="-lodbc  $LIBS"
36821 cat >conftest.$ac_ext <<_ACEOF
36822 /* confdefs.h.  */
36823 _ACEOF
36824 cat confdefs.h >>conftest.$ac_ext
36825 cat >>conftest.$ac_ext <<_ACEOF
36826 /* end confdefs.h.  */
36827
36828 /* Override any gcc2 internal prototype to avoid an error.  */
36829 #ifdef __cplusplus
36830 extern "C"
36831 #endif
36832 /* We use char because int might match the return type of a gcc2
36833    builtin and then its argument prototype would still apply.  */
36834 char SQLDriverConnect ();
36835 int
36836 main ()
36837 {
36838 SQLDriverConnect ();
36839   ;
36840   return 0;
36841 }
36842 _ACEOF
36843 rm -f conftest.$ac_objext conftest$ac_exeext
36844 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36845   (eval $ac_link) 2>conftest.er1
36846   ac_status=$?
36847   grep -v '^ *+' conftest.er1 >conftest.err
36848   rm -f conftest.er1
36849   cat conftest.err >&5
36850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36851   (exit $ac_status); } &&
36852          { ac_try='test -z "$ac_c_werror_flag"
36853                          || test ! -s conftest.err'
36854   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36855   (eval $ac_try) 2>&5
36856   ac_status=$?
36857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36858   (exit $ac_status); }; } &&
36859          { ac_try='test -s conftest$ac_exeext'
36860   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36861   (eval $ac_try) 2>&5
36862   ac_status=$?
36863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36864   (exit $ac_status); }; }; then
36865   ac_cv_lib_odbc_SQLDriverConnect=yes
36866 else
36867   echo "$as_me: failed program was:" >&5
36868 sed 's/^/| /' conftest.$ac_ext >&5
36869
36870 ac_cv_lib_odbc_SQLDriverConnect=no
36871 fi
36872 rm -f conftest.err conftest.$ac_objext \
36873       conftest$ac_exeext conftest.$ac_ext
36874 LIBS=$ac_check_lib_save_LIBS
36875 fi
36876 echo "$as_me:$LINENO: result: $ac_cv_lib_odbc_SQLDriverConnect" >&5
36877 echo "${ECHO_T}$ac_cv_lib_odbc_SQLDriverConnect" >&6
36878 if test $ac_cv_lib_odbc_SQLDriverConnect = yes; then
36879   have_odbc=yes
36880 else
36881   have_odbc=no
36882 fi
36883
36884                 if test $have_odbc = yes ; then
36885                         ol_link_sql="-lodbc"
36886                 fi
36887         fi
36888
36889         LIBS="$sql_LIBS"
36890
36891         if test $ol_link_sql != no ; then
36892                 SLAPD_SQL_LIBS="$ol_link_sql"
36893
36894         elif test $ol_enable_sql != auto ; then
36895                 { { echo "$as_me:$LINENO: error: could not locate suitable ODBC library" >&5
36896 echo "$as_me: error: could not locate suitable ODBC library" >&2;}
36897    { (exit 1); exit 1; }; }
36898         fi
36899 fi
36900
36901 WITH_SASL=no
36902 ol_link_sasl=no
36903 ol_link_spasswd=no
36904 if test $ol_with_cyrus_sasl != no ; then
36905
36906
36907 for ac_header in sasl/sasl.h sasl.h
36908 do
36909 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
36910 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36911   echo "$as_me:$LINENO: checking for $ac_header" >&5
36912 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36913 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36914   echo $ECHO_N "(cached) $ECHO_C" >&6
36915 fi
36916 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36917 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36918 else
36919   # Is the header compilable?
36920 echo "$as_me:$LINENO: checking $ac_header usability" >&5
36921 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
36922 cat >conftest.$ac_ext <<_ACEOF
36923 /* confdefs.h.  */
36924 _ACEOF
36925 cat confdefs.h >>conftest.$ac_ext
36926 cat >>conftest.$ac_ext <<_ACEOF
36927 /* end confdefs.h.  */
36928 $ac_includes_default
36929 #include <$ac_header>
36930 _ACEOF
36931 rm -f conftest.$ac_objext
36932 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36933   (eval $ac_compile) 2>conftest.er1
36934   ac_status=$?
36935   grep -v '^ *+' conftest.er1 >conftest.err
36936   rm -f conftest.er1
36937   cat conftest.err >&5
36938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36939   (exit $ac_status); } &&
36940          { ac_try='test -z "$ac_c_werror_flag"
36941                          || test ! -s conftest.err'
36942   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36943   (eval $ac_try) 2>&5
36944   ac_status=$?
36945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36946   (exit $ac_status); }; } &&
36947          { ac_try='test -s conftest.$ac_objext'
36948   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36949   (eval $ac_try) 2>&5
36950   ac_status=$?
36951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36952   (exit $ac_status); }; }; then
36953   ac_header_compiler=yes
36954 else
36955   echo "$as_me: failed program was:" >&5
36956 sed 's/^/| /' conftest.$ac_ext >&5
36957
36958 ac_header_compiler=no
36959 fi
36960 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36961 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
36962 echo "${ECHO_T}$ac_header_compiler" >&6
36963
36964 # Is the header present?
36965 echo "$as_me:$LINENO: checking $ac_header presence" >&5
36966 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
36967 cat >conftest.$ac_ext <<_ACEOF
36968 /* confdefs.h.  */
36969 _ACEOF
36970 cat confdefs.h >>conftest.$ac_ext
36971 cat >>conftest.$ac_ext <<_ACEOF
36972 /* end confdefs.h.  */
36973 #include <$ac_header>
36974 _ACEOF
36975 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
36976   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
36977   ac_status=$?
36978   grep -v '^ *+' conftest.er1 >conftest.err
36979   rm -f conftest.er1
36980   cat conftest.err >&5
36981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36982   (exit $ac_status); } >/dev/null; then
36983   if test -s conftest.err; then
36984     ac_cpp_err=$ac_c_preproc_warn_flag
36985     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
36986   else
36987     ac_cpp_err=
36988   fi
36989 else
36990   ac_cpp_err=yes
36991 fi
36992 if test -z "$ac_cpp_err"; then
36993   ac_header_preproc=yes
36994 else
36995   echo "$as_me: failed program was:" >&5
36996 sed 's/^/| /' conftest.$ac_ext >&5
36997
36998   ac_header_preproc=no
36999 fi
37000 rm -f conftest.err conftest.$ac_ext
37001 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
37002 echo "${ECHO_T}$ac_header_preproc" >&6
37003
37004 # So?  What about this header?
37005 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
37006   yes:no: )
37007     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
37008 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
37009     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
37010 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
37011     ac_header_preproc=yes
37012     ;;
37013   no:yes:* )
37014     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
37015 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
37016     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
37017 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
37018     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
37019 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
37020     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
37021 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
37022     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
37023 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
37024     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
37025 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
37026     (
37027       cat <<\_ASBOX
37028 ## --------------------------------------------- ##
37029 ## Report this to <http://www.openldap.org/its/> ##
37030 ## --------------------------------------------- ##
37031 _ASBOX
37032     ) |
37033       sed "s/^/$as_me: WARNING:     /" >&2
37034     ;;
37035 esac
37036 echo "$as_me:$LINENO: checking for $ac_header" >&5
37037 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37038 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37039   echo $ECHO_N "(cached) $ECHO_C" >&6
37040 else
37041   eval "$as_ac_Header=\$ac_header_preproc"
37042 fi
37043 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37044 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37045
37046 fi
37047 if test `eval echo '${'$as_ac_Header'}'` = yes; then
37048   cat >>confdefs.h <<_ACEOF
37049 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
37050 _ACEOF
37051
37052 fi
37053
37054 done
37055
37056
37057         if test $ac_cv_header_sasl_sasl_h = yes ||
37058            test $ac_cv_header_sasl_h = yes; then
37059                 echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl2" >&5
37060 echo $ECHO_N "checking for sasl_client_init in -lsasl2... $ECHO_C" >&6
37061 if test "${ac_cv_lib_sasl2_sasl_client_init+set}" = set; then
37062   echo $ECHO_N "(cached) $ECHO_C" >&6
37063 else
37064   ac_check_lib_save_LIBS=$LIBS
37065 LIBS="-lsasl2  $LIBS"
37066 cat >conftest.$ac_ext <<_ACEOF
37067 /* confdefs.h.  */
37068 _ACEOF
37069 cat confdefs.h >>conftest.$ac_ext
37070 cat >>conftest.$ac_ext <<_ACEOF
37071 /* end confdefs.h.  */
37072
37073 /* Override any gcc2 internal prototype to avoid an error.  */
37074 #ifdef __cplusplus
37075 extern "C"
37076 #endif
37077 /* We use char because int might match the return type of a gcc2
37078    builtin and then its argument prototype would still apply.  */
37079 char sasl_client_init ();
37080 int
37081 main ()
37082 {
37083 sasl_client_init ();
37084   ;
37085   return 0;
37086 }
37087 _ACEOF
37088 rm -f conftest.$ac_objext conftest$ac_exeext
37089 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37090   (eval $ac_link) 2>conftest.er1
37091   ac_status=$?
37092   grep -v '^ *+' conftest.er1 >conftest.err
37093   rm -f conftest.er1
37094   cat conftest.err >&5
37095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37096   (exit $ac_status); } &&
37097          { ac_try='test -z "$ac_c_werror_flag"
37098                          || test ! -s conftest.err'
37099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37100   (eval $ac_try) 2>&5
37101   ac_status=$?
37102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37103   (exit $ac_status); }; } &&
37104          { ac_try='test -s conftest$ac_exeext'
37105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37106   (eval $ac_try) 2>&5
37107   ac_status=$?
37108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37109   (exit $ac_status); }; }; then
37110   ac_cv_lib_sasl2_sasl_client_init=yes
37111 else
37112   echo "$as_me: failed program was:" >&5
37113 sed 's/^/| /' conftest.$ac_ext >&5
37114
37115 ac_cv_lib_sasl2_sasl_client_init=no
37116 fi
37117 rm -f conftest.err conftest.$ac_objext \
37118       conftest$ac_exeext conftest.$ac_ext
37119 LIBS=$ac_check_lib_save_LIBS
37120 fi
37121 echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_sasl_client_init" >&5
37122 echo "${ECHO_T}$ac_cv_lib_sasl2_sasl_client_init" >&6
37123 if test $ac_cv_lib_sasl2_sasl_client_init = yes; then
37124   ol_link_sasl="-lsasl2"
37125 else
37126   echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl" >&5
37127 echo $ECHO_N "checking for sasl_client_init in -lsasl... $ECHO_C" >&6
37128 if test "${ac_cv_lib_sasl_sasl_client_init+set}" = set; then
37129   echo $ECHO_N "(cached) $ECHO_C" >&6
37130 else
37131   ac_check_lib_save_LIBS=$LIBS
37132 LIBS="-lsasl  $LIBS"
37133 cat >conftest.$ac_ext <<_ACEOF
37134 /* confdefs.h.  */
37135 _ACEOF
37136 cat confdefs.h >>conftest.$ac_ext
37137 cat >>conftest.$ac_ext <<_ACEOF
37138 /* end confdefs.h.  */
37139
37140 /* Override any gcc2 internal prototype to avoid an error.  */
37141 #ifdef __cplusplus
37142 extern "C"
37143 #endif
37144 /* We use char because int might match the return type of a gcc2
37145    builtin and then its argument prototype would still apply.  */
37146 char sasl_client_init ();
37147 int
37148 main ()
37149 {
37150 sasl_client_init ();
37151   ;
37152   return 0;
37153 }
37154 _ACEOF
37155 rm -f conftest.$ac_objext conftest$ac_exeext
37156 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37157   (eval $ac_link) 2>conftest.er1
37158   ac_status=$?
37159   grep -v '^ *+' conftest.er1 >conftest.err
37160   rm -f conftest.er1
37161   cat conftest.err >&5
37162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37163   (exit $ac_status); } &&
37164          { ac_try='test -z "$ac_c_werror_flag"
37165                          || test ! -s conftest.err'
37166   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37167   (eval $ac_try) 2>&5
37168   ac_status=$?
37169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37170   (exit $ac_status); }; } &&
37171          { ac_try='test -s conftest$ac_exeext'
37172   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37173   (eval $ac_try) 2>&5
37174   ac_status=$?
37175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37176   (exit $ac_status); }; }; then
37177   ac_cv_lib_sasl_sasl_client_init=yes
37178 else
37179   echo "$as_me: failed program was:" >&5
37180 sed 's/^/| /' conftest.$ac_ext >&5
37181
37182 ac_cv_lib_sasl_sasl_client_init=no
37183 fi
37184 rm -f conftest.err conftest.$ac_objext \
37185       conftest$ac_exeext conftest.$ac_ext
37186 LIBS=$ac_check_lib_save_LIBS
37187 fi
37188 echo "$as_me:$LINENO: result: $ac_cv_lib_sasl_sasl_client_init" >&5
37189 echo "${ECHO_T}$ac_cv_lib_sasl_sasl_client_init" >&6
37190 if test $ac_cv_lib_sasl_sasl_client_init = yes; then
37191   ol_link_sasl="-lsasl"
37192 fi
37193
37194 fi
37195
37196         fi
37197
37198         if test $ol_link_sasl = no ; then
37199                 if test $ol_with_cyrus_sasl != auto ; then
37200                         { { echo "$as_me:$LINENO: error: Could not locate Cyrus SASL" >&5
37201 echo "$as_me: error: Could not locate Cyrus SASL" >&2;}
37202    { (exit 1); exit 1; }; }
37203                 else
37204                         { echo "$as_me:$LINENO: WARNING: Could not locate Cyrus SASL" >&5
37205 echo "$as_me: WARNING: Could not locate Cyrus SASL" >&2;}
37206                         { echo "$as_me:$LINENO: WARNING: SASL authentication not supported!" >&5
37207 echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
37208                         if test $ol_link_tls = no ; then
37209                                 { echo "$as_me:$LINENO: WARNING: Strong authentication not supported!" >&5
37210 echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
37211                         fi
37212                 fi
37213         else
37214                 echo "$as_me:$LINENO: checking Cyrus SASL library version" >&5
37215 echo $ECHO_N "checking Cyrus SASL library version... $ECHO_C" >&6
37216 if test "${ol_cv_sasl_compat+set}" = set; then
37217   echo $ECHO_N "(cached) $ECHO_C" >&6
37218 else
37219
37220         cat >conftest.$ac_ext <<_ACEOF
37221 /* confdefs.h.  */
37222 _ACEOF
37223 cat confdefs.h >>conftest.$ac_ext
37224 cat >>conftest.$ac_ext <<_ACEOF
37225 /* end confdefs.h.  */
37226
37227 #ifdef HAVE_SASL_SASL_H
37228 #include <sasl/sasl.h>
37229 #else
37230 #include <sasl.h>
37231 #endif
37232
37233 /* Require 2.1.15+ */
37234 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
37235         char *__sasl_compat = "2.2+ or better okay (we guess)";
37236 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
37237         && SASL_VERSION_STEP >=15
37238         char *__sasl_compat = "2.1.15+ or better okay";
37239 #endif
37240
37241 _ACEOF
37242 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37243   $EGREP "__sasl_compat" >/dev/null 2>&1; then
37244   ol_cv_sasl_compat=yes
37245 else
37246   ol_cv_sasl_compat=no
37247 fi
37248 rm -f conftest*
37249
37250 fi
37251 echo "$as_me:$LINENO: result: $ol_cv_sasl_compat" >&5
37252 echo "${ECHO_T}$ol_cv_sasl_compat" >&6
37253
37254                 if test $ol_cv_sasl_compat = no ; then
37255                         ol_link_sasl=no
37256                         { { echo "$as_me:$LINENO: error: Cyrus SASL library located but is incompatible" >&5
37257 echo "$as_me: error: Cyrus SASL library located but is incompatible" >&2;}
37258    { (exit 1); exit 1; }; }
37259                 fi
37260
37261
37262 cat >>confdefs.h <<\_ACEOF
37263 #define HAVE_CYRUS_SASL 1
37264 _ACEOF
37265
37266                 SASL_LIBS="$ol_link_sasl"
37267                 if test $ol_enable_spasswd != no ; then
37268                         ol_link_spasswd=yes
37269                 fi
37270
37271                 ac_save_LIBS="$LIBS"
37272                 LIBS="$LIBS $ol_link_sasl"
37273                 echo "$as_me:$LINENO: checking for sasl_version" >&5
37274 echo $ECHO_N "checking for sasl_version... $ECHO_C" >&6
37275 if test "${ac_cv_func_sasl_version+set}" = set; then
37276   echo $ECHO_N "(cached) $ECHO_C" >&6
37277 else
37278   cat >conftest.$ac_ext <<_ACEOF
37279 /* confdefs.h.  */
37280 _ACEOF
37281 cat confdefs.h >>conftest.$ac_ext
37282 cat >>conftest.$ac_ext <<_ACEOF
37283 /* end confdefs.h.  */
37284 /* Define sasl_version to an innocuous variant, in case <limits.h> declares sasl_version.
37285    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
37286 #define sasl_version innocuous_sasl_version
37287
37288 /* System header to define __stub macros and hopefully few prototypes,
37289     which can conflict with char sasl_version (); below.
37290     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
37291     <limits.h> exists even on freestanding compilers.  */
37292
37293 #ifdef __STDC__
37294 # include <limits.h>
37295 #else
37296 # include <assert.h>
37297 #endif
37298
37299 #undef sasl_version
37300
37301 /* Override any gcc2 internal prototype to avoid an error.  */
37302 #ifdef __cplusplus
37303 extern "C"
37304 {
37305 #endif
37306 /* We use char because int might match the return type of a gcc2
37307    builtin and then its argument prototype would still apply.  */
37308 char sasl_version ();
37309 /* The GNU C library defines this for functions which it implements
37310     to always fail with ENOSYS.  Some functions are actually named
37311     something starting with __ and the normal name is an alias.  */
37312 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
37313 choke me
37314 #else
37315 char (*f) () = sasl_version;
37316 #endif
37317 #ifdef __cplusplus
37318 }
37319 #endif
37320
37321 int
37322 main ()
37323 {
37324 return f != sasl_version;
37325   ;
37326   return 0;
37327 }
37328 _ACEOF
37329 rm -f conftest.$ac_objext conftest$ac_exeext
37330 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37331   (eval $ac_link) 2>conftest.er1
37332   ac_status=$?
37333   grep -v '^ *+' conftest.er1 >conftest.err
37334   rm -f conftest.er1
37335   cat conftest.err >&5
37336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37337   (exit $ac_status); } &&
37338          { ac_try='test -z "$ac_c_werror_flag"
37339                          || test ! -s conftest.err'
37340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37341   (eval $ac_try) 2>&5
37342   ac_status=$?
37343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37344   (exit $ac_status); }; } &&
37345          { ac_try='test -s conftest$ac_exeext'
37346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37347   (eval $ac_try) 2>&5
37348   ac_status=$?
37349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37350   (exit $ac_status); }; }; then
37351   ac_cv_func_sasl_version=yes
37352 else
37353   echo "$as_me: failed program was:" >&5
37354 sed 's/^/| /' conftest.$ac_ext >&5
37355
37356 ac_cv_func_sasl_version=no
37357 fi
37358 rm -f conftest.err conftest.$ac_objext \
37359       conftest$ac_exeext conftest.$ac_ext
37360 fi
37361 echo "$as_me:$LINENO: result: $ac_cv_func_sasl_version" >&5
37362 echo "${ECHO_T}$ac_cv_func_sasl_version" >&6
37363 if test $ac_cv_func_sasl_version = yes; then
37364
37365 cat >>confdefs.h <<\_ACEOF
37366 #define HAVE_SASL_VERSION 1
37367 _ACEOF
37368
37369 fi
37370
37371                 LIBS="$ac_save_LIBS"
37372
37373                 WITH_SASL=yes
37374         fi
37375
37376 else
37377         { echo "$as_me:$LINENO: WARNING: SASL authentication not supported!" >&5
37378 echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
37379         if test $ol_link_tls = no ; then
37380                 { echo "$as_me:$LINENO: WARNING: Strong authentication not supported!" >&5
37381 echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
37382         fi
37383 fi
37384
37385 if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
37386         dev=no
37387         if test -r /dev/urandom ; then
37388                 dev="/dev/urandom";
37389         elif test -r /idev/urandom ; then
37390                 dev="/idev/urandom";
37391         elif test -r /dev/srandom ; then
37392                 dev="/dev/srandom";
37393         elif test -r /dev/random ; then
37394                 dev="/dev/random";
37395         elif test -r /idev/random ; then
37396                 dev="/idev/random";
37397         fi
37398
37399         if test $dev != no ; then
37400
37401 cat >>confdefs.h <<_ACEOF
37402 #define URANDOM_DEVICE "$dev"
37403 _ACEOF
37404
37405         fi
37406 fi
37407
37408 ol_link_fetch=no
37409 if test $ol_with_fetch != no ; then
37410         ol_LIBS=$LIBS
37411 LIBS="-lfetch -lcom_err $LIBS"
37412 echo "$as_me:$LINENO: checking fetch(3) library" >&5
37413 echo $ECHO_N "checking fetch(3) library... $ECHO_C" >&6
37414 if test "${ol_cv_lib_fetch+set}" = set; then
37415   echo $ECHO_N "(cached) $ECHO_C" >&6
37416 else
37417
37418         cat >conftest.$ac_ext <<_ACEOF
37419 /* confdefs.h.  */
37420 _ACEOF
37421 cat confdefs.h >>conftest.$ac_ext
37422 cat >>conftest.$ac_ext <<_ACEOF
37423 /* end confdefs.h.  */
37424
37425 #include <sys/param.h>
37426 #include <stdio.h>
37427 #include <fetch.h>
37428 int
37429 main ()
37430 {
37431 struct url *u = fetchParseURL("file:///");
37432   ;
37433   return 0;
37434 }
37435 _ACEOF
37436 rm -f conftest.$ac_objext conftest$ac_exeext
37437 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37438   (eval $ac_link) 2>conftest.er1
37439   ac_status=$?
37440   grep -v '^ *+' conftest.er1 >conftest.err
37441   rm -f conftest.er1
37442   cat conftest.err >&5
37443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37444   (exit $ac_status); } &&
37445          { ac_try='test -z "$ac_c_werror_flag"
37446                          || test ! -s conftest.err'
37447   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37448   (eval $ac_try) 2>&5
37449   ac_status=$?
37450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37451   (exit $ac_status); }; } &&
37452          { ac_try='test -s conftest$ac_exeext'
37453   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37454   (eval $ac_try) 2>&5
37455   ac_status=$?
37456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37457   (exit $ac_status); }; }; then
37458   ol_cv_lib_fetch=yes
37459 else
37460   echo "$as_me: failed program was:" >&5
37461 sed 's/^/| /' conftest.$ac_ext >&5
37462
37463 ol_cv_lib_fetch=no
37464 fi
37465 rm -f conftest.err conftest.$ac_objext \
37466       conftest$ac_exeext conftest.$ac_ext
37467 fi
37468 echo "$as_me:$LINENO: result: $ol_cv_lib_fetch" >&5
37469 echo "${ECHO_T}$ol_cv_lib_fetch" >&6
37470 LIBS=$ol_LIBS
37471 if test $ol_cv_lib_fetch != no ; then
37472         ol_link_fetch="-lfetch -lcom_err"
37473
37474 cat >>confdefs.h <<\_ACEOF
37475 #define HAVE_FETCH 1
37476 _ACEOF
37477
37478 fi
37479
37480
37481         if test $ol_cv_lib_fetch != no ; then
37482                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
37483                 ol_link_fetch=freebsd
37484
37485         elif test $ol_with_fetch != auto ; then
37486                 { { echo "$as_me:$LINENO: error: no suitable API for --with-fetch=$ol_with_fetch" >&5
37487 echo "$as_me: error: no suitable API for --with-fetch=$ol_with_fetch" >&2;}
37488    { (exit 1); exit 1; }; }
37489         fi
37490 fi
37491
37492 if test $ol_enable_crypt != no ; then
37493         save_LIBS="$LIBS"
37494         LIBS="$TLS_LIBS $LIBS"
37495
37496         echo "$as_me:$LINENO: checking for crypt" >&5
37497 echo $ECHO_N "checking for crypt... $ECHO_C" >&6
37498 if test "${ac_cv_func_crypt+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 crypt to an innocuous variant, in case <limits.h> declares crypt.
37508    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
37509 #define crypt innocuous_crypt
37510
37511 /* System header to define __stub macros and hopefully few prototypes,
37512     which can conflict with char crypt (); 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 crypt
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 crypt ();
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_crypt) || defined (__stub___crypt)
37536 choke me
37537 #else
37538 char (*f) () = crypt;
37539 #endif
37540 #ifdef __cplusplus
37541 }
37542 #endif
37543
37544 int
37545 main ()
37546 {
37547 return f != crypt;
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_crypt=yes
37575 else
37576   echo "$as_me: failed program was:" >&5
37577 sed 's/^/| /' conftest.$ac_ext >&5
37578
37579 ac_cv_func_crypt=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_crypt" >&5
37585 echo "${ECHO_T}$ac_cv_func_crypt" >&6
37586 if test $ac_cv_func_crypt = yes; then
37587   have_crypt=yes
37588 else
37589
37590                 LIBS="$save_LIBS"
37591                 echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
37592 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
37593 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
37594   echo $ECHO_N "(cached) $ECHO_C" >&6
37595 else
37596   ac_check_lib_save_LIBS=$LIBS
37597 LIBS="-lcrypt  $LIBS"
37598 cat >conftest.$ac_ext <<_ACEOF
37599 /* confdefs.h.  */
37600 _ACEOF
37601 cat confdefs.h >>conftest.$ac_ext
37602 cat >>conftest.$ac_ext <<_ACEOF
37603 /* end confdefs.h.  */
37604
37605 /* Override any gcc2 internal prototype to avoid an error.  */
37606 #ifdef __cplusplus
37607 extern "C"
37608 #endif
37609 /* We use char because int might match the return type of a gcc2
37610    builtin and then its argument prototype would still apply.  */
37611 char crypt ();
37612 int
37613 main ()
37614 {
37615 crypt ();
37616   ;
37617   return 0;
37618 }
37619 _ACEOF
37620 rm -f conftest.$ac_objext conftest$ac_exeext
37621 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37622   (eval $ac_link) 2>conftest.er1
37623   ac_status=$?
37624   grep -v '^ *+' conftest.er1 >conftest.err
37625   rm -f conftest.er1
37626   cat conftest.err >&5
37627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37628   (exit $ac_status); } &&
37629          { ac_try='test -z "$ac_c_werror_flag"
37630                          || test ! -s conftest.err'
37631   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37632   (eval $ac_try) 2>&5
37633   ac_status=$?
37634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37635   (exit $ac_status); }; } &&
37636          { ac_try='test -s conftest$ac_exeext'
37637   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37638   (eval $ac_try) 2>&5
37639   ac_status=$?
37640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37641   (exit $ac_status); }; }; then
37642   ac_cv_lib_crypt_crypt=yes
37643 else
37644   echo "$as_me: failed program was:" >&5
37645 sed 's/^/| /' conftest.$ac_ext >&5
37646
37647 ac_cv_lib_crypt_crypt=no
37648 fi
37649 rm -f conftest.err conftest.$ac_objext \
37650       conftest$ac_exeext conftest.$ac_ext
37651 LIBS=$ac_check_lib_save_LIBS
37652 fi
37653 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
37654 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
37655 if test $ac_cv_lib_crypt_crypt = yes; then
37656   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
37657                         have_crypt=yes
37658 else
37659   have_crypt=no
37660 fi
37661
37662 fi
37663
37664
37665         LIBS="$save_LIBS"
37666
37667         if test $have_crypt = yes ; then
37668
37669 cat >>confdefs.h <<\_ACEOF
37670 #define HAVE_CRYPT 1
37671 _ACEOF
37672
37673         else
37674                 { echo "$as_me:$LINENO: WARNING: could not find crypt" >&5
37675 echo "$as_me: WARNING: could not find crypt" >&2;}
37676                 if test $ol_enable_crypt = yes ; then
37677                         { { echo "$as_me:$LINENO: error: could not find crypt, select appropriate options or disable" >&5
37678 echo "$as_me: error: could not find crypt, select appropriate options or disable" >&2;}
37679    { (exit 1); exit 1; }; }
37680                 fi
37681
37682                 { echo "$as_me:$LINENO: WARNING: disabling crypt support" >&5
37683 echo "$as_me: WARNING: disabling crypt support" >&2;}
37684                 ol_enable_crypt=no
37685         fi
37686 fi
37687
37688 if test $ol_enable_proctitle != no ; then
37689         echo "$as_me:$LINENO: checking for setproctitle" >&5
37690 echo $ECHO_N "checking for setproctitle... $ECHO_C" >&6
37691 if test "${ac_cv_func_setproctitle+set}" = set; then
37692   echo $ECHO_N "(cached) $ECHO_C" >&6
37693 else
37694   cat >conftest.$ac_ext <<_ACEOF
37695 /* confdefs.h.  */
37696 _ACEOF
37697 cat confdefs.h >>conftest.$ac_ext
37698 cat >>conftest.$ac_ext <<_ACEOF
37699 /* end confdefs.h.  */
37700 /* Define setproctitle to an innocuous variant, in case <limits.h> declares setproctitle.
37701    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
37702 #define setproctitle innocuous_setproctitle
37703
37704 /* System header to define __stub macros and hopefully few prototypes,
37705     which can conflict with char setproctitle (); below.
37706     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
37707     <limits.h> exists even on freestanding compilers.  */
37708
37709 #ifdef __STDC__
37710 # include <limits.h>
37711 #else
37712 # include <assert.h>
37713 #endif
37714
37715 #undef setproctitle
37716
37717 /* Override any gcc2 internal prototype to avoid an error.  */
37718 #ifdef __cplusplus
37719 extern "C"
37720 {
37721 #endif
37722 /* We use char because int might match the return type of a gcc2
37723    builtin and then its argument prototype would still apply.  */
37724 char setproctitle ();
37725 /* The GNU C library defines this for functions which it implements
37726     to always fail with ENOSYS.  Some functions are actually named
37727     something starting with __ and the normal name is an alias.  */
37728 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
37729 choke me
37730 #else
37731 char (*f) () = setproctitle;
37732 #endif
37733 #ifdef __cplusplus
37734 }
37735 #endif
37736
37737 int
37738 main ()
37739 {
37740 return f != setproctitle;
37741   ;
37742   return 0;
37743 }
37744 _ACEOF
37745 rm -f conftest.$ac_objext conftest$ac_exeext
37746 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37747   (eval $ac_link) 2>conftest.er1
37748   ac_status=$?
37749   grep -v '^ *+' conftest.er1 >conftest.err
37750   rm -f conftest.er1
37751   cat conftest.err >&5
37752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37753   (exit $ac_status); } &&
37754          { ac_try='test -z "$ac_c_werror_flag"
37755                          || test ! -s conftest.err'
37756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37757   (eval $ac_try) 2>&5
37758   ac_status=$?
37759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37760   (exit $ac_status); }; } &&
37761          { ac_try='test -s conftest$ac_exeext'
37762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37763   (eval $ac_try) 2>&5
37764   ac_status=$?
37765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37766   (exit $ac_status); }; }; then
37767   ac_cv_func_setproctitle=yes
37768 else
37769   echo "$as_me: failed program was:" >&5
37770 sed 's/^/| /' conftest.$ac_ext >&5
37771
37772 ac_cv_func_setproctitle=no
37773 fi
37774 rm -f conftest.err conftest.$ac_objext \
37775       conftest$ac_exeext conftest.$ac_ext
37776 fi
37777 echo "$as_me:$LINENO: result: $ac_cv_func_setproctitle" >&5
37778 echo "${ECHO_T}$ac_cv_func_setproctitle" >&6
37779 if test $ac_cv_func_setproctitle = yes; then
37780   have_setproctitle=yes
37781 else
37782
37783                 echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
37784 echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
37785 if test "${ac_cv_lib_util_setproctitle+set}" = set; then
37786   echo $ECHO_N "(cached) $ECHO_C" >&6
37787 else
37788   ac_check_lib_save_LIBS=$LIBS
37789 LIBS="-lutil  $LIBS"
37790 cat >conftest.$ac_ext <<_ACEOF
37791 /* confdefs.h.  */
37792 _ACEOF
37793 cat confdefs.h >>conftest.$ac_ext
37794 cat >>conftest.$ac_ext <<_ACEOF
37795 /* end confdefs.h.  */
37796
37797 /* Override any gcc2 internal prototype to avoid an error.  */
37798 #ifdef __cplusplus
37799 extern "C"
37800 #endif
37801 /* We use char because int might match the return type of a gcc2
37802    builtin and then its argument prototype would still apply.  */
37803 char setproctitle ();
37804 int
37805 main ()
37806 {
37807 setproctitle ();
37808   ;
37809   return 0;
37810 }
37811 _ACEOF
37812 rm -f conftest.$ac_objext conftest$ac_exeext
37813 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37814   (eval $ac_link) 2>conftest.er1
37815   ac_status=$?
37816   grep -v '^ *+' conftest.er1 >conftest.err
37817   rm -f conftest.er1
37818   cat conftest.err >&5
37819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37820   (exit $ac_status); } &&
37821          { ac_try='test -z "$ac_c_werror_flag"
37822                          || test ! -s conftest.err'
37823   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37824   (eval $ac_try) 2>&5
37825   ac_status=$?
37826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37827   (exit $ac_status); }; } &&
37828          { ac_try='test -s conftest$ac_exeext'
37829   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37830   (eval $ac_try) 2>&5
37831   ac_status=$?
37832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37833   (exit $ac_status); }; }; then
37834   ac_cv_lib_util_setproctitle=yes
37835 else
37836   echo "$as_me: failed program was:" >&5
37837 sed 's/^/| /' conftest.$ac_ext >&5
37838
37839 ac_cv_lib_util_setproctitle=no
37840 fi
37841 rm -f conftest.err conftest.$ac_objext \
37842       conftest$ac_exeext conftest.$ac_ext
37843 LIBS=$ac_check_lib_save_LIBS
37844 fi
37845 echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
37846 echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
37847 if test $ac_cv_lib_util_setproctitle = yes; then
37848   have_setproctitle=yes
37849                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
37850 else
37851   have_setproctitle=no
37852                         case $LIBOBJS in
37853     "setproctitle.$ac_objext"   | \
37854   *" setproctitle.$ac_objext"   | \
37855     "setproctitle.$ac_objext "* | \
37856   *" setproctitle.$ac_objext "* ) ;;
37857   *) LIBOBJS="$LIBOBJS setproctitle.$ac_objext" ;;
37858 esac
37859
37860                         LIBSRCS="$LIBSRCS setproctitle.c"
37861 fi
37862
37863 fi
37864
37865
37866         if test $have_setproctitle = yes ; then
37867
37868 cat >>confdefs.h <<\_ACEOF
37869 #define HAVE_SETPROCTITLE 1
37870 _ACEOF
37871
37872         fi
37873 fi
37874
37875 if test $ol_enable_slp != no ; then
37876
37877 for ac_header in slp.h
37878 do
37879 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
37880 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37881   echo "$as_me:$LINENO: checking for $ac_header" >&5
37882 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37883 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37884   echo $ECHO_N "(cached) $ECHO_C" >&6
37885 fi
37886 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37887 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37888 else
37889   # Is the header compilable?
37890 echo "$as_me:$LINENO: checking $ac_header usability" >&5
37891 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
37892 cat >conftest.$ac_ext <<_ACEOF
37893 /* confdefs.h.  */
37894 _ACEOF
37895 cat confdefs.h >>conftest.$ac_ext
37896 cat >>conftest.$ac_ext <<_ACEOF
37897 /* end confdefs.h.  */
37898 $ac_includes_default
37899 #include <$ac_header>
37900 _ACEOF
37901 rm -f conftest.$ac_objext
37902 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37903   (eval $ac_compile) 2>conftest.er1
37904   ac_status=$?
37905   grep -v '^ *+' conftest.er1 >conftest.err
37906   rm -f conftest.er1
37907   cat conftest.err >&5
37908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37909   (exit $ac_status); } &&
37910          { ac_try='test -z "$ac_c_werror_flag"
37911                          || test ! -s conftest.err'
37912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37913   (eval $ac_try) 2>&5
37914   ac_status=$?
37915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37916   (exit $ac_status); }; } &&
37917          { ac_try='test -s conftest.$ac_objext'
37918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37919   (eval $ac_try) 2>&5
37920   ac_status=$?
37921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37922   (exit $ac_status); }; }; then
37923   ac_header_compiler=yes
37924 else
37925   echo "$as_me: failed program was:" >&5
37926 sed 's/^/| /' conftest.$ac_ext >&5
37927
37928 ac_header_compiler=no
37929 fi
37930 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37931 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
37932 echo "${ECHO_T}$ac_header_compiler" >&6
37933
37934 # Is the header present?
37935 echo "$as_me:$LINENO: checking $ac_header presence" >&5
37936 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
37937 cat >conftest.$ac_ext <<_ACEOF
37938 /* confdefs.h.  */
37939 _ACEOF
37940 cat confdefs.h >>conftest.$ac_ext
37941 cat >>conftest.$ac_ext <<_ACEOF
37942 /* end confdefs.h.  */
37943 #include <$ac_header>
37944 _ACEOF
37945 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
37946   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
37947   ac_status=$?
37948   grep -v '^ *+' conftest.er1 >conftest.err
37949   rm -f conftest.er1
37950   cat conftest.err >&5
37951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37952   (exit $ac_status); } >/dev/null; then
37953   if test -s conftest.err; then
37954     ac_cpp_err=$ac_c_preproc_warn_flag
37955     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
37956   else
37957     ac_cpp_err=
37958   fi
37959 else
37960   ac_cpp_err=yes
37961 fi
37962 if test -z "$ac_cpp_err"; then
37963   ac_header_preproc=yes
37964 else
37965   echo "$as_me: failed program was:" >&5
37966 sed 's/^/| /' conftest.$ac_ext >&5
37967
37968   ac_header_preproc=no
37969 fi
37970 rm -f conftest.err conftest.$ac_ext
37971 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
37972 echo "${ECHO_T}$ac_header_preproc" >&6
37973
37974 # So?  What about this header?
37975 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
37976   yes:no: )
37977     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
37978 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
37979     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
37980 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
37981     ac_header_preproc=yes
37982     ;;
37983   no:yes:* )
37984     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
37985 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
37986     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
37987 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
37988     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
37989 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
37990     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
37991 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
37992     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
37993 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
37994     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
37995 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
37996     (
37997       cat <<\_ASBOX
37998 ## --------------------------------------------- ##
37999 ## Report this to <http://www.openldap.org/its/> ##
38000 ## --------------------------------------------- ##
38001 _ASBOX
38002     ) |
38003       sed "s/^/$as_me: WARNING:     /" >&2
38004     ;;
38005 esac
38006 echo "$as_me:$LINENO: checking for $ac_header" >&5
38007 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
38008 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38009   echo $ECHO_N "(cached) $ECHO_C" >&6
38010 else
38011   eval "$as_ac_Header=\$ac_header_preproc"
38012 fi
38013 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
38014 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
38015
38016 fi
38017 if test `eval echo '${'$as_ac_Header'}'` = yes; then
38018   cat >>confdefs.h <<_ACEOF
38019 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
38020 _ACEOF
38021
38022 fi
38023
38024 done
38025
38026
38027         if test $ac_cv_header_slp_h = yes ; then
38028                 echo "$as_me:$LINENO: checking for SLPOpen in -lslp" >&5
38029 echo $ECHO_N "checking for SLPOpen in -lslp... $ECHO_C" >&6
38030 if test "${ac_cv_lib_slp_SLPOpen+set}" = set; then
38031   echo $ECHO_N "(cached) $ECHO_C" >&6
38032 else
38033   ac_check_lib_save_LIBS=$LIBS
38034 LIBS="-lslp  $LIBS"
38035 cat >conftest.$ac_ext <<_ACEOF
38036 /* confdefs.h.  */
38037 _ACEOF
38038 cat confdefs.h >>conftest.$ac_ext
38039 cat >>conftest.$ac_ext <<_ACEOF
38040 /* end confdefs.h.  */
38041
38042 /* Override any gcc2 internal prototype to avoid an error.  */
38043 #ifdef __cplusplus
38044 extern "C"
38045 #endif
38046 /* We use char because int might match the return type of a gcc2
38047    builtin and then its argument prototype would still apply.  */
38048 char SLPOpen ();
38049 int
38050 main ()
38051 {
38052 SLPOpen ();
38053   ;
38054   return 0;
38055 }
38056 _ACEOF
38057 rm -f conftest.$ac_objext conftest$ac_exeext
38058 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38059   (eval $ac_link) 2>conftest.er1
38060   ac_status=$?
38061   grep -v '^ *+' conftest.er1 >conftest.err
38062   rm -f conftest.er1
38063   cat conftest.err >&5
38064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38065   (exit $ac_status); } &&
38066          { ac_try='test -z "$ac_c_werror_flag"
38067                          || test ! -s conftest.err'
38068   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38069   (eval $ac_try) 2>&5
38070   ac_status=$?
38071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38072   (exit $ac_status); }; } &&
38073          { ac_try='test -s conftest$ac_exeext'
38074   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38075   (eval $ac_try) 2>&5
38076   ac_status=$?
38077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38078   (exit $ac_status); }; }; then
38079   ac_cv_lib_slp_SLPOpen=yes
38080 else
38081   echo "$as_me: failed program was:" >&5
38082 sed 's/^/| /' conftest.$ac_ext >&5
38083
38084 ac_cv_lib_slp_SLPOpen=no
38085 fi
38086 rm -f conftest.err conftest.$ac_objext \
38087       conftest$ac_exeext conftest.$ac_ext
38088 LIBS=$ac_check_lib_save_LIBS
38089 fi
38090 echo "$as_me:$LINENO: result: $ac_cv_lib_slp_SLPOpen" >&5
38091 echo "${ECHO_T}$ac_cv_lib_slp_SLPOpen" >&6
38092 if test $ac_cv_lib_slp_SLPOpen = yes; then
38093   have_slp=yes
38094 else
38095   have_slp=no
38096 fi
38097
38098                 if test $have_slp = yes ; then
38099
38100 cat >>confdefs.h <<\_ACEOF
38101 #define HAVE_SLP 1
38102 _ACEOF
38103
38104                         SLAPD_SLP_LIBS=-lslp
38105                 fi
38106
38107         elif test $ol_enable_slp = yes ; then
38108                 { { echo "$as_me:$LINENO: error: SLP not found" >&5
38109 echo "$as_me: error: SLP not found" >&2;}
38110    { (exit 1); exit 1; }; }
38111         fi
38112 fi
38113
38114
38115 echo "$as_me:$LINENO: checking for mode_t" >&5
38116 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
38117 if test "${ac_cv_type_mode_t+set}" = set; then
38118   echo $ECHO_N "(cached) $ECHO_C" >&6
38119 else
38120   cat >conftest.$ac_ext <<_ACEOF
38121 /* confdefs.h.  */
38122 _ACEOF
38123 cat confdefs.h >>conftest.$ac_ext
38124 cat >>conftest.$ac_ext <<_ACEOF
38125 /* end confdefs.h.  */
38126 $ac_includes_default
38127 int
38128 main ()
38129 {
38130 if ((mode_t *) 0)
38131   return 0;
38132 if (sizeof (mode_t))
38133   return 0;
38134   ;
38135   return 0;
38136 }
38137 _ACEOF
38138 rm -f conftest.$ac_objext
38139 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38140   (eval $ac_compile) 2>conftest.er1
38141   ac_status=$?
38142   grep -v '^ *+' conftest.er1 >conftest.err
38143   rm -f conftest.er1
38144   cat conftest.err >&5
38145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38146   (exit $ac_status); } &&
38147          { ac_try='test -z "$ac_c_werror_flag"
38148                          || test ! -s conftest.err'
38149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38150   (eval $ac_try) 2>&5
38151   ac_status=$?
38152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38153   (exit $ac_status); }; } &&
38154          { ac_try='test -s conftest.$ac_objext'
38155   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38156   (eval $ac_try) 2>&5
38157   ac_status=$?
38158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38159   (exit $ac_status); }; }; then
38160   ac_cv_type_mode_t=yes
38161 else
38162   echo "$as_me: failed program was:" >&5
38163 sed 's/^/| /' conftest.$ac_ext >&5
38164
38165 ac_cv_type_mode_t=no
38166 fi
38167 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38168 fi
38169 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
38170 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
38171 if test $ac_cv_type_mode_t = yes; then
38172   :
38173 else
38174
38175 cat >>confdefs.h <<_ACEOF
38176 #define mode_t int
38177 _ACEOF
38178
38179 fi
38180
38181 echo "$as_me:$LINENO: checking for off_t" >&5
38182 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
38183 if test "${ac_cv_type_off_t+set}" = set; then
38184   echo $ECHO_N "(cached) $ECHO_C" >&6
38185 else
38186   cat >conftest.$ac_ext <<_ACEOF
38187 /* confdefs.h.  */
38188 _ACEOF
38189 cat confdefs.h >>conftest.$ac_ext
38190 cat >>conftest.$ac_ext <<_ACEOF
38191 /* end confdefs.h.  */
38192 $ac_includes_default
38193 int
38194 main ()
38195 {
38196 if ((off_t *) 0)
38197   return 0;
38198 if (sizeof (off_t))
38199   return 0;
38200   ;
38201   return 0;
38202 }
38203 _ACEOF
38204 rm -f conftest.$ac_objext
38205 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38206   (eval $ac_compile) 2>conftest.er1
38207   ac_status=$?
38208   grep -v '^ *+' conftest.er1 >conftest.err
38209   rm -f conftest.er1
38210   cat conftest.err >&5
38211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38212   (exit $ac_status); } &&
38213          { ac_try='test -z "$ac_c_werror_flag"
38214                          || test ! -s conftest.err'
38215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38216   (eval $ac_try) 2>&5
38217   ac_status=$?
38218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38219   (exit $ac_status); }; } &&
38220          { ac_try='test -s conftest.$ac_objext'
38221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38222   (eval $ac_try) 2>&5
38223   ac_status=$?
38224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38225   (exit $ac_status); }; }; then
38226   ac_cv_type_off_t=yes
38227 else
38228   echo "$as_me: failed program was:" >&5
38229 sed 's/^/| /' conftest.$ac_ext >&5
38230
38231 ac_cv_type_off_t=no
38232 fi
38233 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38234 fi
38235 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
38236 echo "${ECHO_T}$ac_cv_type_off_t" >&6
38237 if test $ac_cv_type_off_t = yes; then
38238   :
38239 else
38240
38241 cat >>confdefs.h <<_ACEOF
38242 #define off_t long
38243 _ACEOF
38244
38245 fi
38246
38247 echo "$as_me:$LINENO: checking for pid_t" >&5
38248 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
38249 if test "${ac_cv_type_pid_t+set}" = set; then
38250   echo $ECHO_N "(cached) $ECHO_C" >&6
38251 else
38252   cat >conftest.$ac_ext <<_ACEOF
38253 /* confdefs.h.  */
38254 _ACEOF
38255 cat confdefs.h >>conftest.$ac_ext
38256 cat >>conftest.$ac_ext <<_ACEOF
38257 /* end confdefs.h.  */
38258 $ac_includes_default
38259 int
38260 main ()
38261 {
38262 if ((pid_t *) 0)
38263   return 0;
38264 if (sizeof (pid_t))
38265   return 0;
38266   ;
38267   return 0;
38268 }
38269 _ACEOF
38270 rm -f conftest.$ac_objext
38271 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38272   (eval $ac_compile) 2>conftest.er1
38273   ac_status=$?
38274   grep -v '^ *+' conftest.er1 >conftest.err
38275   rm -f conftest.er1
38276   cat conftest.err >&5
38277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38278   (exit $ac_status); } &&
38279          { ac_try='test -z "$ac_c_werror_flag"
38280                          || test ! -s conftest.err'
38281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38282   (eval $ac_try) 2>&5
38283   ac_status=$?
38284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38285   (exit $ac_status); }; } &&
38286          { ac_try='test -s conftest.$ac_objext'
38287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38288   (eval $ac_try) 2>&5
38289   ac_status=$?
38290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38291   (exit $ac_status); }; }; then
38292   ac_cv_type_pid_t=yes
38293 else
38294   echo "$as_me: failed program was:" >&5
38295 sed 's/^/| /' conftest.$ac_ext >&5
38296
38297 ac_cv_type_pid_t=no
38298 fi
38299 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38300 fi
38301 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
38302 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
38303 if test $ac_cv_type_pid_t = yes; then
38304   :
38305 else
38306
38307 cat >>confdefs.h <<_ACEOF
38308 #define pid_t int
38309 _ACEOF
38310
38311 fi
38312
38313 echo "$as_me:$LINENO: checking for ssize_t" >&5
38314 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
38315 if test "${ac_cv_type_ssize_t+set}" = set; then
38316   echo $ECHO_N "(cached) $ECHO_C" >&6
38317 else
38318   cat >conftest.$ac_ext <<_ACEOF
38319 /* confdefs.h.  */
38320 _ACEOF
38321 cat confdefs.h >>conftest.$ac_ext
38322 cat >>conftest.$ac_ext <<_ACEOF
38323 /* end confdefs.h.  */
38324 $ac_includes_default
38325 int
38326 main ()
38327 {
38328 if ((ssize_t *) 0)
38329   return 0;
38330 if (sizeof (ssize_t))
38331   return 0;
38332   ;
38333   return 0;
38334 }
38335 _ACEOF
38336 rm -f conftest.$ac_objext
38337 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38338   (eval $ac_compile) 2>conftest.er1
38339   ac_status=$?
38340   grep -v '^ *+' conftest.er1 >conftest.err
38341   rm -f conftest.er1
38342   cat conftest.err >&5
38343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38344   (exit $ac_status); } &&
38345          { ac_try='test -z "$ac_c_werror_flag"
38346                          || test ! -s conftest.err'
38347   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38348   (eval $ac_try) 2>&5
38349   ac_status=$?
38350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38351   (exit $ac_status); }; } &&
38352          { ac_try='test -s conftest.$ac_objext'
38353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38354   (eval $ac_try) 2>&5
38355   ac_status=$?
38356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38357   (exit $ac_status); }; }; then
38358   ac_cv_type_ssize_t=yes
38359 else
38360   echo "$as_me: failed program was:" >&5
38361 sed 's/^/| /' conftest.$ac_ext >&5
38362
38363 ac_cv_type_ssize_t=no
38364 fi
38365 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38366 fi
38367 echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
38368 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
38369 if test $ac_cv_type_ssize_t = yes; then
38370   :
38371 else
38372
38373 cat >>confdefs.h <<_ACEOF
38374 #define ssize_t signed int
38375 _ACEOF
38376
38377 fi
38378
38379 echo "$as_me:$LINENO: checking for caddr_t" >&5
38380 echo $ECHO_N "checking for caddr_t... $ECHO_C" >&6
38381 if test "${ac_cv_type_caddr_t+set}" = set; then
38382   echo $ECHO_N "(cached) $ECHO_C" >&6
38383 else
38384   cat >conftest.$ac_ext <<_ACEOF
38385 /* confdefs.h.  */
38386 _ACEOF
38387 cat confdefs.h >>conftest.$ac_ext
38388 cat >>conftest.$ac_ext <<_ACEOF
38389 /* end confdefs.h.  */
38390 $ac_includes_default
38391 int
38392 main ()
38393 {
38394 if ((caddr_t *) 0)
38395   return 0;
38396 if (sizeof (caddr_t))
38397   return 0;
38398   ;
38399   return 0;
38400 }
38401 _ACEOF
38402 rm -f conftest.$ac_objext
38403 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38404   (eval $ac_compile) 2>conftest.er1
38405   ac_status=$?
38406   grep -v '^ *+' conftest.er1 >conftest.err
38407   rm -f conftest.er1
38408   cat conftest.err >&5
38409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38410   (exit $ac_status); } &&
38411          { ac_try='test -z "$ac_c_werror_flag"
38412                          || test ! -s conftest.err'
38413   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38414   (eval $ac_try) 2>&5
38415   ac_status=$?
38416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38417   (exit $ac_status); }; } &&
38418          { ac_try='test -s conftest.$ac_objext'
38419   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38420   (eval $ac_try) 2>&5
38421   ac_status=$?
38422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38423   (exit $ac_status); }; }; then
38424   ac_cv_type_caddr_t=yes
38425 else
38426   echo "$as_me: failed program was:" >&5
38427 sed 's/^/| /' conftest.$ac_ext >&5
38428
38429 ac_cv_type_caddr_t=no
38430 fi
38431 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38432 fi
38433 echo "$as_me:$LINENO: result: $ac_cv_type_caddr_t" >&5
38434 echo "${ECHO_T}$ac_cv_type_caddr_t" >&6
38435 if test $ac_cv_type_caddr_t = yes; then
38436   :
38437 else
38438
38439 cat >>confdefs.h <<_ACEOF
38440 #define caddr_t char *
38441 _ACEOF
38442
38443 fi
38444
38445 echo "$as_me:$LINENO: checking for size_t" >&5
38446 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
38447 if test "${ac_cv_type_size_t+set}" = set; then
38448   echo $ECHO_N "(cached) $ECHO_C" >&6
38449 else
38450   cat >conftest.$ac_ext <<_ACEOF
38451 /* confdefs.h.  */
38452 _ACEOF
38453 cat confdefs.h >>conftest.$ac_ext
38454 cat >>conftest.$ac_ext <<_ACEOF
38455 /* end confdefs.h.  */
38456 $ac_includes_default
38457 int
38458 main ()
38459 {
38460 if ((size_t *) 0)
38461   return 0;
38462 if (sizeof (size_t))
38463   return 0;
38464   ;
38465   return 0;
38466 }
38467 _ACEOF
38468 rm -f conftest.$ac_objext
38469 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38470   (eval $ac_compile) 2>conftest.er1
38471   ac_status=$?
38472   grep -v '^ *+' conftest.er1 >conftest.err
38473   rm -f conftest.er1
38474   cat conftest.err >&5
38475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38476   (exit $ac_status); } &&
38477          { ac_try='test -z "$ac_c_werror_flag"
38478                          || test ! -s conftest.err'
38479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38480   (eval $ac_try) 2>&5
38481   ac_status=$?
38482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38483   (exit $ac_status); }; } &&
38484          { ac_try='test -s conftest.$ac_objext'
38485   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38486   (eval $ac_try) 2>&5
38487   ac_status=$?
38488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38489   (exit $ac_status); }; }; then
38490   ac_cv_type_size_t=yes
38491 else
38492   echo "$as_me: failed program was:" >&5
38493 sed 's/^/| /' conftest.$ac_ext >&5
38494
38495 ac_cv_type_size_t=no
38496 fi
38497 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38498 fi
38499 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
38500 echo "${ECHO_T}$ac_cv_type_size_t" >&6
38501 if test $ac_cv_type_size_t = yes; then
38502   :
38503 else
38504
38505 cat >>confdefs.h <<_ACEOF
38506 #define size_t unsigned
38507 _ACEOF
38508
38509 fi
38510
38511
38512 echo "$as_me:$LINENO: checking for long long" >&5
38513 echo $ECHO_N "checking for long long... $ECHO_C" >&6
38514 if test "${ac_cv_type_long_long+set}" = set; then
38515   echo $ECHO_N "(cached) $ECHO_C" >&6
38516 else
38517   cat >conftest.$ac_ext <<_ACEOF
38518 /* confdefs.h.  */
38519 _ACEOF
38520 cat confdefs.h >>conftest.$ac_ext
38521 cat >>conftest.$ac_ext <<_ACEOF
38522 /* end confdefs.h.  */
38523 $ac_includes_default
38524 int
38525 main ()
38526 {
38527 if ((long long *) 0)
38528   return 0;
38529 if (sizeof (long long))
38530   return 0;
38531   ;
38532   return 0;
38533 }
38534 _ACEOF
38535 rm -f conftest.$ac_objext
38536 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38537   (eval $ac_compile) 2>conftest.er1
38538   ac_status=$?
38539   grep -v '^ *+' conftest.er1 >conftest.err
38540   rm -f conftest.er1
38541   cat conftest.err >&5
38542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38543   (exit $ac_status); } &&
38544          { ac_try='test -z "$ac_c_werror_flag"
38545                          || test ! -s conftest.err'
38546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38547   (eval $ac_try) 2>&5
38548   ac_status=$?
38549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38550   (exit $ac_status); }; } &&
38551          { ac_try='test -s conftest.$ac_objext'
38552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38553   (eval $ac_try) 2>&5
38554   ac_status=$?
38555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38556   (exit $ac_status); }; }; then
38557   ac_cv_type_long_long=yes
38558 else
38559   echo "$as_me: failed program was:" >&5
38560 sed 's/^/| /' conftest.$ac_ext >&5
38561
38562 ac_cv_type_long_long=no
38563 fi
38564 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38565 fi
38566 echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
38567 echo "${ECHO_T}$ac_cv_type_long_long" >&6
38568 if test $ac_cv_type_long_long = yes; then
38569
38570 cat >>confdefs.h <<_ACEOF
38571 #define HAVE_LONG_LONG 1
38572 _ACEOF
38573
38574
38575 fi
38576
38577 echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
38578 echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
38579 if test "${ac_cv_type_ptrdiff_t+set}" = set; then
38580   echo $ECHO_N "(cached) $ECHO_C" >&6
38581 else
38582   cat >conftest.$ac_ext <<_ACEOF
38583 /* confdefs.h.  */
38584 _ACEOF
38585 cat confdefs.h >>conftest.$ac_ext
38586 cat >>conftest.$ac_ext <<_ACEOF
38587 /* end confdefs.h.  */
38588 $ac_includes_default
38589 int
38590 main ()
38591 {
38592 if ((ptrdiff_t *) 0)
38593   return 0;
38594 if (sizeof (ptrdiff_t))
38595   return 0;
38596   ;
38597   return 0;
38598 }
38599 _ACEOF
38600 rm -f conftest.$ac_objext
38601 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38602   (eval $ac_compile) 2>conftest.er1
38603   ac_status=$?
38604   grep -v '^ *+' conftest.er1 >conftest.err
38605   rm -f conftest.er1
38606   cat conftest.err >&5
38607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38608   (exit $ac_status); } &&
38609          { ac_try='test -z "$ac_c_werror_flag"
38610                          || test ! -s conftest.err'
38611   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38612   (eval $ac_try) 2>&5
38613   ac_status=$?
38614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38615   (exit $ac_status); }; } &&
38616          { ac_try='test -s conftest.$ac_objext'
38617   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38618   (eval $ac_try) 2>&5
38619   ac_status=$?
38620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38621   (exit $ac_status); }; }; then
38622   ac_cv_type_ptrdiff_t=yes
38623 else
38624   echo "$as_me: failed program was:" >&5
38625 sed 's/^/| /' conftest.$ac_ext >&5
38626
38627 ac_cv_type_ptrdiff_t=no
38628 fi
38629 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38630 fi
38631 echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
38632 echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6
38633 if test $ac_cv_type_ptrdiff_t = yes; then
38634
38635 cat >>confdefs.h <<_ACEOF
38636 #define HAVE_PTRDIFF_T 1
38637 _ACEOF
38638
38639
38640 fi
38641
38642
38643 echo "$as_me:$LINENO: checking for socklen_t" >&5
38644 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
38645 if test "${ac_cv_type_socklen_t+set}" = set; then
38646   echo $ECHO_N "(cached) $ECHO_C" >&6
38647 else
38648   cat >conftest.$ac_ext <<_ACEOF
38649 /* confdefs.h.  */
38650 _ACEOF
38651 cat confdefs.h >>conftest.$ac_ext
38652 cat >>conftest.$ac_ext <<_ACEOF
38653 /* end confdefs.h.  */
38654 $ac_includes_default
38655 #ifdef HAVE_SYS_SOCKET_H
38656 #include <sys/socket.h>
38657 #endif
38658
38659
38660 int
38661 main ()
38662 {
38663 if ((socklen_t *) 0)
38664   return 0;
38665 if (sizeof (socklen_t))
38666   return 0;
38667   ;
38668   return 0;
38669 }
38670 _ACEOF
38671 rm -f conftest.$ac_objext
38672 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38673   (eval $ac_compile) 2>conftest.er1
38674   ac_status=$?
38675   grep -v '^ *+' conftest.er1 >conftest.err
38676   rm -f conftest.er1
38677   cat conftest.err >&5
38678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38679   (exit $ac_status); } &&
38680          { ac_try='test -z "$ac_c_werror_flag"
38681                          || test ! -s conftest.err'
38682   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38683   (eval $ac_try) 2>&5
38684   ac_status=$?
38685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38686   (exit $ac_status); }; } &&
38687          { ac_try='test -s conftest.$ac_objext'
38688   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38689   (eval $ac_try) 2>&5
38690   ac_status=$?
38691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38692   (exit $ac_status); }; }; then
38693   ac_cv_type_socklen_t=yes
38694 else
38695   echo "$as_me: failed program was:" >&5
38696 sed 's/^/| /' conftest.$ac_ext >&5
38697
38698 ac_cv_type_socklen_t=no
38699 fi
38700 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38701 fi
38702 echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
38703 echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
38704 if test $ac_cv_type_socklen_t = yes; then
38705   :
38706 else
38707
38708 cat >>confdefs.h <<_ACEOF
38709 #define socklen_t int
38710 _ACEOF
38711
38712 fi
38713
38714
38715 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
38716 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
38717 if test "${ac_cv_type_signal+set}" = set; then
38718   echo $ECHO_N "(cached) $ECHO_C" >&6
38719 else
38720   cat >conftest.$ac_ext <<_ACEOF
38721 /* confdefs.h.  */
38722 _ACEOF
38723 cat confdefs.h >>conftest.$ac_ext
38724 cat >>conftest.$ac_ext <<_ACEOF
38725 /* end confdefs.h.  */
38726 #include <sys/types.h>
38727 #include <signal.h>
38728 #ifdef signal
38729 # undef signal
38730 #endif
38731 #ifdef __cplusplus
38732 extern "C" void (*signal (int, void (*)(int)))(int);
38733 #else
38734 void (*signal ()) ();
38735 #endif
38736
38737 int
38738 main ()
38739 {
38740 int i;
38741   ;
38742   return 0;
38743 }
38744 _ACEOF
38745 rm -f conftest.$ac_objext
38746 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38747   (eval $ac_compile) 2>conftest.er1
38748   ac_status=$?
38749   grep -v '^ *+' conftest.er1 >conftest.err
38750   rm -f conftest.er1
38751   cat conftest.err >&5
38752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38753   (exit $ac_status); } &&
38754          { ac_try='test -z "$ac_c_werror_flag"
38755                          || test ! -s conftest.err'
38756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38757   (eval $ac_try) 2>&5
38758   ac_status=$?
38759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38760   (exit $ac_status); }; } &&
38761          { ac_try='test -s conftest.$ac_objext'
38762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38763   (eval $ac_try) 2>&5
38764   ac_status=$?
38765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38766   (exit $ac_status); }; }; then
38767   ac_cv_type_signal=void
38768 else
38769   echo "$as_me: failed program was:" >&5
38770 sed 's/^/| /' conftest.$ac_ext >&5
38771
38772 ac_cv_type_signal=int
38773 fi
38774 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38775 fi
38776 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
38777 echo "${ECHO_T}$ac_cv_type_signal" >&6
38778
38779 cat >>confdefs.h <<_ACEOF
38780 #define RETSIGTYPE $ac_cv_type_signal
38781 _ACEOF
38782
38783
38784
38785 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
38786 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
38787 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
38788   echo $ECHO_N "(cached) $ECHO_C" >&6
38789 else
38790   cat >conftest.$ac_ext <<_ACEOF
38791 /* confdefs.h.  */
38792 _ACEOF
38793 cat confdefs.h >>conftest.$ac_ext
38794 cat >>conftest.$ac_ext <<_ACEOF
38795 /* end confdefs.h.  */
38796 $ac_includes_default
38797 #include <signal.h>
38798
38799
38800 int
38801 main ()
38802 {
38803 if ((sig_atomic_t *) 0)
38804   return 0;
38805 if (sizeof (sig_atomic_t))
38806   return 0;
38807   ;
38808   return 0;
38809 }
38810 _ACEOF
38811 rm -f conftest.$ac_objext
38812 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38813   (eval $ac_compile) 2>conftest.er1
38814   ac_status=$?
38815   grep -v '^ *+' conftest.er1 >conftest.err
38816   rm -f conftest.er1
38817   cat conftest.err >&5
38818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38819   (exit $ac_status); } &&
38820          { ac_try='test -z "$ac_c_werror_flag"
38821                          || test ! -s conftest.err'
38822   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38823   (eval $ac_try) 2>&5
38824   ac_status=$?
38825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38826   (exit $ac_status); }; } &&
38827          { ac_try='test -s conftest.$ac_objext'
38828   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38829   (eval $ac_try) 2>&5
38830   ac_status=$?
38831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38832   (exit $ac_status); }; }; then
38833   ac_cv_type_sig_atomic_t=yes
38834 else
38835   echo "$as_me: failed program was:" >&5
38836 sed 's/^/| /' conftest.$ac_ext >&5
38837
38838 ac_cv_type_sig_atomic_t=no
38839 fi
38840 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38841 fi
38842 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
38843 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
38844 if test $ac_cv_type_sig_atomic_t = yes; then
38845   :
38846 else
38847
38848 cat >>confdefs.h <<_ACEOF
38849 #define sig_atomic_t int
38850 _ACEOF
38851
38852 fi
38853
38854
38855 echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
38856 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
38857 if test "${ac_cv_type_uid_t+set}" = set; then
38858   echo $ECHO_N "(cached) $ECHO_C" >&6
38859 else
38860   cat >conftest.$ac_ext <<_ACEOF
38861 /* confdefs.h.  */
38862 _ACEOF
38863 cat confdefs.h >>conftest.$ac_ext
38864 cat >>conftest.$ac_ext <<_ACEOF
38865 /* end confdefs.h.  */
38866 #include <sys/types.h>
38867
38868 _ACEOF
38869 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
38870   $EGREP "uid_t" >/dev/null 2>&1; then
38871   ac_cv_type_uid_t=yes
38872 else
38873   ac_cv_type_uid_t=no
38874 fi
38875 rm -f conftest*
38876
38877 fi
38878 echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
38879 echo "${ECHO_T}$ac_cv_type_uid_t" >&6
38880 if test $ac_cv_type_uid_t = no; then
38881
38882 cat >>confdefs.h <<\_ACEOF
38883 #define uid_t int
38884 _ACEOF
38885
38886
38887 cat >>confdefs.h <<\_ACEOF
38888 #define gid_t int
38889 _ACEOF
38890
38891 fi
38892
38893
38894 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
38895 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
38896 if test "${ac_cv_header_time+set}" = set; then
38897   echo $ECHO_N "(cached) $ECHO_C" >&6
38898 else
38899   cat >conftest.$ac_ext <<_ACEOF
38900 /* confdefs.h.  */
38901 _ACEOF
38902 cat confdefs.h >>conftest.$ac_ext
38903 cat >>conftest.$ac_ext <<_ACEOF
38904 /* end confdefs.h.  */
38905 #include <sys/types.h>
38906 #include <sys/time.h>
38907 #include <time.h>
38908
38909 int
38910 main ()
38911 {
38912 if ((struct tm *) 0)
38913 return 0;
38914   ;
38915   return 0;
38916 }
38917 _ACEOF
38918 rm -f conftest.$ac_objext
38919 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38920   (eval $ac_compile) 2>conftest.er1
38921   ac_status=$?
38922   grep -v '^ *+' conftest.er1 >conftest.err
38923   rm -f conftest.er1
38924   cat conftest.err >&5
38925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38926   (exit $ac_status); } &&
38927          { ac_try='test -z "$ac_c_werror_flag"
38928                          || test ! -s conftest.err'
38929   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38930   (eval $ac_try) 2>&5
38931   ac_status=$?
38932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38933   (exit $ac_status); }; } &&
38934          { ac_try='test -s conftest.$ac_objext'
38935   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38936   (eval $ac_try) 2>&5
38937   ac_status=$?
38938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38939   (exit $ac_status); }; }; then
38940   ac_cv_header_time=yes
38941 else
38942   echo "$as_me: failed program was:" >&5
38943 sed 's/^/| /' conftest.$ac_ext >&5
38944
38945 ac_cv_header_time=no
38946 fi
38947 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38948 fi
38949 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
38950 echo "${ECHO_T}$ac_cv_header_time" >&6
38951 if test $ac_cv_header_time = yes; then
38952
38953 cat >>confdefs.h <<\_ACEOF
38954 #define TIME_WITH_SYS_TIME 1
38955 _ACEOF
38956
38957 fi
38958
38959 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
38960 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
38961 if test "${ac_cv_struct_tm+set}" = set; then
38962   echo $ECHO_N "(cached) $ECHO_C" >&6
38963 else
38964   cat >conftest.$ac_ext <<_ACEOF
38965 /* confdefs.h.  */
38966 _ACEOF
38967 cat confdefs.h >>conftest.$ac_ext
38968 cat >>conftest.$ac_ext <<_ACEOF
38969 /* end confdefs.h.  */
38970 #include <sys/types.h>
38971 #include <time.h>
38972
38973 int
38974 main ()
38975 {
38976 struct tm *tp; tp->tm_sec;
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_struct_tm=time.h
39004 else
39005   echo "$as_me: failed program was:" >&5
39006 sed 's/^/| /' conftest.$ac_ext >&5
39007
39008 ac_cv_struct_tm=sys/time.h
39009 fi
39010 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39011 fi
39012 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
39013 echo "${ECHO_T}$ac_cv_struct_tm" >&6
39014 if test $ac_cv_struct_tm = sys/time.h; then
39015
39016 cat >>confdefs.h <<\_ACEOF
39017 #define TM_IN_SYS_TIME 1
39018 _ACEOF
39019
39020 fi
39021
39022 echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
39023 echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
39024 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
39025   echo $ECHO_N "(cached) $ECHO_C" >&6
39026 else
39027   cat >conftest.$ac_ext <<_ACEOF
39028 /* confdefs.h.  */
39029 _ACEOF
39030 cat confdefs.h >>conftest.$ac_ext
39031 cat >>conftest.$ac_ext <<_ACEOF
39032 /* end confdefs.h.  */
39033 $ac_includes_default
39034 int
39035 main ()
39036 {
39037 static struct stat ac_aggr;
39038 if (ac_aggr.st_blksize)
39039 return 0;
39040   ;
39041   return 0;
39042 }
39043 _ACEOF
39044 rm -f conftest.$ac_objext
39045 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39046   (eval $ac_compile) 2>conftest.er1
39047   ac_status=$?
39048   grep -v '^ *+' conftest.er1 >conftest.err
39049   rm -f conftest.er1
39050   cat conftest.err >&5
39051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39052   (exit $ac_status); } &&
39053          { ac_try='test -z "$ac_c_werror_flag"
39054                          || test ! -s conftest.err'
39055   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39056   (eval $ac_try) 2>&5
39057   ac_status=$?
39058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39059   (exit $ac_status); }; } &&
39060          { ac_try='test -s conftest.$ac_objext'
39061   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39062   (eval $ac_try) 2>&5
39063   ac_status=$?
39064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39065   (exit $ac_status); }; }; then
39066   ac_cv_member_struct_stat_st_blksize=yes
39067 else
39068   echo "$as_me: failed program was:" >&5
39069 sed 's/^/| /' conftest.$ac_ext >&5
39070
39071 cat >conftest.$ac_ext <<_ACEOF
39072 /* confdefs.h.  */
39073 _ACEOF
39074 cat confdefs.h >>conftest.$ac_ext
39075 cat >>conftest.$ac_ext <<_ACEOF
39076 /* end confdefs.h.  */
39077 $ac_includes_default
39078 int
39079 main ()
39080 {
39081 static struct stat ac_aggr;
39082 if (sizeof ac_aggr.st_blksize)
39083 return 0;
39084   ;
39085   return 0;
39086 }
39087 _ACEOF
39088 rm -f conftest.$ac_objext
39089 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39090   (eval $ac_compile) 2>conftest.er1
39091   ac_status=$?
39092   grep -v '^ *+' conftest.er1 >conftest.err
39093   rm -f conftest.er1
39094   cat conftest.err >&5
39095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39096   (exit $ac_status); } &&
39097          { ac_try='test -z "$ac_c_werror_flag"
39098                          || test ! -s conftest.err'
39099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39100   (eval $ac_try) 2>&5
39101   ac_status=$?
39102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39103   (exit $ac_status); }; } &&
39104          { ac_try='test -s conftest.$ac_objext'
39105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39106   (eval $ac_try) 2>&5
39107   ac_status=$?
39108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39109   (exit $ac_status); }; }; then
39110   ac_cv_member_struct_stat_st_blksize=yes
39111 else
39112   echo "$as_me: failed program was:" >&5
39113 sed 's/^/| /' conftest.$ac_ext >&5
39114
39115 ac_cv_member_struct_stat_st_blksize=no
39116 fi
39117 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39118 fi
39119 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39120 fi
39121 echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
39122 echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
39123 if test $ac_cv_member_struct_stat_st_blksize = yes; then
39124
39125 cat >>confdefs.h <<_ACEOF
39126 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
39127 _ACEOF
39128
39129
39130 fi
39131
39132 echo "$as_me:$LINENO: checking for struct passwd.pw_gecos" >&5
39133 echo $ECHO_N "checking for struct passwd.pw_gecos... $ECHO_C" >&6
39134 if test "${ac_cv_member_struct_passwd_pw_gecos+set}" = set; then
39135   echo $ECHO_N "(cached) $ECHO_C" >&6
39136 else
39137   cat >conftest.$ac_ext <<_ACEOF
39138 /* confdefs.h.  */
39139 _ACEOF
39140 cat confdefs.h >>conftest.$ac_ext
39141 cat >>conftest.$ac_ext <<_ACEOF
39142 /* end confdefs.h.  */
39143 $ac_includes_default
39144 #include <pwd.h>
39145
39146 int
39147 main ()
39148 {
39149 static struct passwd ac_aggr;
39150 if (ac_aggr.pw_gecos)
39151 return 0;
39152   ;
39153   return 0;
39154 }
39155 _ACEOF
39156 rm -f conftest.$ac_objext
39157 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39158   (eval $ac_compile) 2>conftest.er1
39159   ac_status=$?
39160   grep -v '^ *+' conftest.er1 >conftest.err
39161   rm -f conftest.er1
39162   cat conftest.err >&5
39163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39164   (exit $ac_status); } &&
39165          { ac_try='test -z "$ac_c_werror_flag"
39166                          || test ! -s conftest.err'
39167   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39168   (eval $ac_try) 2>&5
39169   ac_status=$?
39170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39171   (exit $ac_status); }; } &&
39172          { ac_try='test -s conftest.$ac_objext'
39173   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39174   (eval $ac_try) 2>&5
39175   ac_status=$?
39176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39177   (exit $ac_status); }; }; then
39178   ac_cv_member_struct_passwd_pw_gecos=yes
39179 else
39180   echo "$as_me: failed program was:" >&5
39181 sed 's/^/| /' conftest.$ac_ext >&5
39182
39183 cat >conftest.$ac_ext <<_ACEOF
39184 /* confdefs.h.  */
39185 _ACEOF
39186 cat confdefs.h >>conftest.$ac_ext
39187 cat >>conftest.$ac_ext <<_ACEOF
39188 /* end confdefs.h.  */
39189 $ac_includes_default
39190 #include <pwd.h>
39191
39192 int
39193 main ()
39194 {
39195 static struct passwd ac_aggr;
39196 if (sizeof ac_aggr.pw_gecos)
39197 return 0;
39198   ;
39199   return 0;
39200 }
39201 _ACEOF
39202 rm -f conftest.$ac_objext
39203 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39204   (eval $ac_compile) 2>conftest.er1
39205   ac_status=$?
39206   grep -v '^ *+' conftest.er1 >conftest.err
39207   rm -f conftest.er1
39208   cat conftest.err >&5
39209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39210   (exit $ac_status); } &&
39211          { ac_try='test -z "$ac_c_werror_flag"
39212                          || test ! -s conftest.err'
39213   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39214   (eval $ac_try) 2>&5
39215   ac_status=$?
39216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39217   (exit $ac_status); }; } &&
39218          { ac_try='test -s conftest.$ac_objext'
39219   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39220   (eval $ac_try) 2>&5
39221   ac_status=$?
39222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39223   (exit $ac_status); }; }; then
39224   ac_cv_member_struct_passwd_pw_gecos=yes
39225 else
39226   echo "$as_me: failed program was:" >&5
39227 sed 's/^/| /' conftest.$ac_ext >&5
39228
39229 ac_cv_member_struct_passwd_pw_gecos=no
39230 fi
39231 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39232 fi
39233 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39234 fi
39235 echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_gecos" >&5
39236 echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_gecos" >&6
39237 if test $ac_cv_member_struct_passwd_pw_gecos = yes; then
39238
39239 cat >>confdefs.h <<_ACEOF
39240 #define HAVE_STRUCT_PASSWD_PW_GECOS 1
39241 _ACEOF
39242
39243
39244 fi
39245
39246 echo "$as_me:$LINENO: checking for struct passwd.pw_passwd" >&5
39247 echo $ECHO_N "checking for struct passwd.pw_passwd... $ECHO_C" >&6
39248 if test "${ac_cv_member_struct_passwd_pw_passwd+set}" = set; then
39249   echo $ECHO_N "(cached) $ECHO_C" >&6
39250 else
39251   cat >conftest.$ac_ext <<_ACEOF
39252 /* confdefs.h.  */
39253 _ACEOF
39254 cat confdefs.h >>conftest.$ac_ext
39255 cat >>conftest.$ac_ext <<_ACEOF
39256 /* end confdefs.h.  */
39257 $ac_includes_default
39258 #include <pwd.h>
39259
39260 int
39261 main ()
39262 {
39263 static struct passwd ac_aggr;
39264 if (ac_aggr.pw_passwd)
39265 return 0;
39266   ;
39267   return 0;
39268 }
39269 _ACEOF
39270 rm -f conftest.$ac_objext
39271 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39272   (eval $ac_compile) 2>conftest.er1
39273   ac_status=$?
39274   grep -v '^ *+' conftest.er1 >conftest.err
39275   rm -f conftest.er1
39276   cat conftest.err >&5
39277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39278   (exit $ac_status); } &&
39279          { ac_try='test -z "$ac_c_werror_flag"
39280                          || test ! -s conftest.err'
39281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39282   (eval $ac_try) 2>&5
39283   ac_status=$?
39284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39285   (exit $ac_status); }; } &&
39286          { ac_try='test -s conftest.$ac_objext'
39287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39288   (eval $ac_try) 2>&5
39289   ac_status=$?
39290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39291   (exit $ac_status); }; }; then
39292   ac_cv_member_struct_passwd_pw_passwd=yes
39293 else
39294   echo "$as_me: failed program was:" >&5
39295 sed 's/^/| /' conftest.$ac_ext >&5
39296
39297 cat >conftest.$ac_ext <<_ACEOF
39298 /* confdefs.h.  */
39299 _ACEOF
39300 cat confdefs.h >>conftest.$ac_ext
39301 cat >>conftest.$ac_ext <<_ACEOF
39302 /* end confdefs.h.  */
39303 $ac_includes_default
39304 #include <pwd.h>
39305
39306 int
39307 main ()
39308 {
39309 static struct passwd ac_aggr;
39310 if (sizeof ac_aggr.pw_passwd)
39311 return 0;
39312   ;
39313   return 0;
39314 }
39315 _ACEOF
39316 rm -f conftest.$ac_objext
39317 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39318   (eval $ac_compile) 2>conftest.er1
39319   ac_status=$?
39320   grep -v '^ *+' conftest.er1 >conftest.err
39321   rm -f conftest.er1
39322   cat conftest.err >&5
39323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39324   (exit $ac_status); } &&
39325          { ac_try='test -z "$ac_c_werror_flag"
39326                          || test ! -s conftest.err'
39327   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39328   (eval $ac_try) 2>&5
39329   ac_status=$?
39330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39331   (exit $ac_status); }; } &&
39332          { ac_try='test -s conftest.$ac_objext'
39333   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39334   (eval $ac_try) 2>&5
39335   ac_status=$?
39336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39337   (exit $ac_status); }; }; then
39338   ac_cv_member_struct_passwd_pw_passwd=yes
39339 else
39340   echo "$as_me: failed program was:" >&5
39341 sed 's/^/| /' conftest.$ac_ext >&5
39342
39343 ac_cv_member_struct_passwd_pw_passwd=no
39344 fi
39345 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39346 fi
39347 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39348 fi
39349 echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_passwd" >&5
39350 echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_passwd" >&6
39351 if test $ac_cv_member_struct_passwd_pw_passwd = yes; then
39352
39353 cat >>confdefs.h <<_ACEOF
39354 #define HAVE_STRUCT_PASSWD_PW_PASSWD 1
39355 _ACEOF
39356
39357
39358 fi
39359
39360
39361 echo "$as_me:$LINENO: checking if toupper() requires islower()" >&5
39362 echo $ECHO_N "checking if toupper() requires islower()... $ECHO_C" >&6
39363 if test "${ol_cv_c_upper_lower+set}" = set; then
39364   echo $ECHO_N "(cached) $ECHO_C" >&6
39365 else
39366
39367         if test "$cross_compiling" = yes; then
39368   ol_cv_c_upper_lower=safe
39369 else
39370   cat >conftest.$ac_ext <<_ACEOF
39371 /* confdefs.h.  */
39372 _ACEOF
39373 cat confdefs.h >>conftest.$ac_ext
39374 cat >>conftest.$ac_ext <<_ACEOF
39375 /* end confdefs.h.  */
39376
39377 #include <ctype.h>
39378 main()
39379 {
39380         if ('C' == toupper('C'))
39381                 exit(0);
39382         else
39383                 exit(1);
39384 }
39385 _ACEOF
39386 rm -f conftest$ac_exeext
39387 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
39388   (eval $ac_link) 2>&5
39389   ac_status=$?
39390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39391   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
39392   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39393   (eval $ac_try) 2>&5
39394   ac_status=$?
39395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39396   (exit $ac_status); }; }; then
39397   ol_cv_c_upper_lower=no
39398 else
39399   echo "$as_me: program exited with status $ac_status" >&5
39400 echo "$as_me: failed program was:" >&5
39401 sed 's/^/| /' conftest.$ac_ext >&5
39402
39403 ( exit $ac_status )
39404 ol_cv_c_upper_lower=yes
39405 fi
39406 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39407 fi
39408 fi
39409 echo "$as_me:$LINENO: result: $ol_cv_c_upper_lower" >&5
39410 echo "${ECHO_T}$ol_cv_c_upper_lower" >&6
39411 if test $ol_cv_c_upper_lower != no ; then
39412
39413 cat >>confdefs.h <<\_ACEOF
39414 #define C_UPPER_LOWER 1
39415 _ACEOF
39416
39417 fi
39418
39419 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
39420 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
39421 if test "${ac_cv_c_const+set}" = set; then
39422   echo $ECHO_N "(cached) $ECHO_C" >&6
39423 else
39424   cat >conftest.$ac_ext <<_ACEOF
39425 /* confdefs.h.  */
39426 _ACEOF
39427 cat confdefs.h >>conftest.$ac_ext
39428 cat >>conftest.$ac_ext <<_ACEOF
39429 /* end confdefs.h.  */
39430
39431 int
39432 main ()
39433 {
39434 /* FIXME: Include the comments suggested by Paul. */
39435 #ifndef __cplusplus
39436   /* Ultrix mips cc rejects this.  */
39437   typedef int charset[2];
39438   const charset x;
39439   /* SunOS 4.1.1 cc rejects this.  */
39440   char const *const *ccp;
39441   char **p;
39442   /* NEC SVR4.0.2 mips cc rejects this.  */
39443   struct point {int x, y;};
39444   static struct point const zero = {0,0};
39445   /* AIX XL C 1.02.0.0 rejects this.
39446      It does not let you subtract one const X* pointer from another in
39447      an arm of an if-expression whose if-part is not a constant
39448      expression */
39449   const char *g = "string";
39450   ccp = &g + (g ? g-g : 0);
39451   /* HPUX 7.0 cc rejects these. */
39452   ++ccp;
39453   p = (char**) ccp;
39454   ccp = (char const *const *) p;
39455   { /* SCO 3.2v4 cc rejects this.  */
39456     char *t;
39457     char const *s = 0 ? (char *) 0 : (char const *) 0;
39458
39459     *t++ = 0;
39460   }
39461   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
39462     int x[] = {25, 17};
39463     const int *foo = &x[0];
39464     ++foo;
39465   }
39466   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
39467     typedef const int *iptr;
39468     iptr p = 0;
39469     ++p;
39470   }
39471   { /* AIX XL C 1.02.0.0 rejects this saying
39472        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
39473     struct s { int j; const int *ap[3]; };
39474     struct s *b; b->j = 5;
39475   }
39476   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
39477     const int foo = 10;
39478   }
39479 #endif
39480
39481   ;
39482   return 0;
39483 }
39484 _ACEOF
39485 rm -f conftest.$ac_objext
39486 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39487   (eval $ac_compile) 2>conftest.er1
39488   ac_status=$?
39489   grep -v '^ *+' conftest.er1 >conftest.err
39490   rm -f conftest.er1
39491   cat conftest.err >&5
39492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39493   (exit $ac_status); } &&
39494          { ac_try='test -z "$ac_c_werror_flag"
39495                          || test ! -s conftest.err'
39496   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39497   (eval $ac_try) 2>&5
39498   ac_status=$?
39499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39500   (exit $ac_status); }; } &&
39501          { ac_try='test -s conftest.$ac_objext'
39502   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39503   (eval $ac_try) 2>&5
39504   ac_status=$?
39505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39506   (exit $ac_status); }; }; then
39507   ac_cv_c_const=yes
39508 else
39509   echo "$as_me: failed program was:" >&5
39510 sed 's/^/| /' conftest.$ac_ext >&5
39511
39512 ac_cv_c_const=no
39513 fi
39514 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39515 fi
39516 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
39517 echo "${ECHO_T}$ac_cv_c_const" >&6
39518 if test $ac_cv_c_const = no; then
39519
39520 cat >>confdefs.h <<\_ACEOF
39521 #define const
39522 _ACEOF
39523
39524 fi
39525
39526 echo "$as_me:$LINENO: checking if compiler understands volatile" >&5
39527 echo $ECHO_N "checking if compiler understands volatile... $ECHO_C" >&6
39528 if test "${ol_cv_c_volatile+set}" = set; then
39529   echo $ECHO_N "(cached) $ECHO_C" >&6
39530 else
39531   cat >conftest.$ac_ext <<_ACEOF
39532 /* confdefs.h.  */
39533 _ACEOF
39534 cat confdefs.h >>conftest.$ac_ext
39535 cat >>conftest.$ac_ext <<_ACEOF
39536 /* end confdefs.h.  */
39537 int x, y, z;
39538 int
39539 main ()
39540 {
39541 volatile int a; int * volatile b = x ? &y : &z;
39542       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
39543       *b = 0;
39544   ;
39545   return 0;
39546 }
39547 _ACEOF
39548 rm -f conftest.$ac_objext
39549 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39550   (eval $ac_compile) 2>conftest.er1
39551   ac_status=$?
39552   grep -v '^ *+' conftest.er1 >conftest.err
39553   rm -f conftest.er1
39554   cat conftest.err >&5
39555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39556   (exit $ac_status); } &&
39557          { ac_try='test -z "$ac_c_werror_flag"
39558                          || test ! -s conftest.err'
39559   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39560   (eval $ac_try) 2>&5
39561   ac_status=$?
39562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39563   (exit $ac_status); }; } &&
39564          { ac_try='test -s conftest.$ac_objext'
39565   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39566   (eval $ac_try) 2>&5
39567   ac_status=$?
39568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39569   (exit $ac_status); }; }; then
39570   ol_cv_c_volatile=yes
39571 else
39572   echo "$as_me: failed program was:" >&5
39573 sed 's/^/| /' conftest.$ac_ext >&5
39574
39575 ol_cv_c_volatile=no
39576 fi
39577 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39578 fi
39579 echo "$as_me:$LINENO: result: $ol_cv_c_volatile" >&5
39580 echo "${ECHO_T}$ol_cv_c_volatile" >&6
39581   if test $ol_cv_c_volatile = yes; then
39582     :
39583   else
39584
39585 cat >>confdefs.h <<\_ACEOF
39586 #define volatile
39587 _ACEOF
39588
39589   fi
39590
39591
39592 if test $cross_compiling = yes ; then
39593         { echo "$as_me:$LINENO: WARNING: Crossing compiling... all bets are off!" >&5
39594 echo "$as_me: WARNING: Crossing compiling... all bets are off!" >&2;}
39595
39596 cat >>confdefs.h <<\_ACEOF
39597 #define CROSS_COMPILING 1
39598 _ACEOF
39599
39600 else
39601         echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
39602 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
39603 if test "${ac_cv_c_bigendian+set}" = set; then
39604   echo $ECHO_N "(cached) $ECHO_C" >&6
39605 else
39606   # See if sys/param.h defines the BYTE_ORDER macro.
39607 cat >conftest.$ac_ext <<_ACEOF
39608 /* confdefs.h.  */
39609 _ACEOF
39610 cat confdefs.h >>conftest.$ac_ext
39611 cat >>conftest.$ac_ext <<_ACEOF
39612 /* end confdefs.h.  */
39613 #include <sys/types.h>
39614 #include <sys/param.h>
39615
39616 int
39617 main ()
39618 {
39619 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
39620  bogus endian macros
39621 #endif
39622
39623   ;
39624   return 0;
39625 }
39626 _ACEOF
39627 rm -f conftest.$ac_objext
39628 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39629   (eval $ac_compile) 2>conftest.er1
39630   ac_status=$?
39631   grep -v '^ *+' conftest.er1 >conftest.err
39632   rm -f conftest.er1
39633   cat conftest.err >&5
39634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39635   (exit $ac_status); } &&
39636          { ac_try='test -z "$ac_c_werror_flag"
39637                          || test ! -s conftest.err'
39638   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39639   (eval $ac_try) 2>&5
39640   ac_status=$?
39641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39642   (exit $ac_status); }; } &&
39643          { ac_try='test -s conftest.$ac_objext'
39644   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39645   (eval $ac_try) 2>&5
39646   ac_status=$?
39647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39648   (exit $ac_status); }; }; then
39649   # It does; now see whether it defined to BIG_ENDIAN or not.
39650 cat >conftest.$ac_ext <<_ACEOF
39651 /* confdefs.h.  */
39652 _ACEOF
39653 cat confdefs.h >>conftest.$ac_ext
39654 cat >>conftest.$ac_ext <<_ACEOF
39655 /* end confdefs.h.  */
39656 #include <sys/types.h>
39657 #include <sys/param.h>
39658
39659 int
39660 main ()
39661 {
39662 #if BYTE_ORDER != BIG_ENDIAN
39663  not big endian
39664 #endif
39665
39666   ;
39667   return 0;
39668 }
39669 _ACEOF
39670 rm -f conftest.$ac_objext
39671 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39672   (eval $ac_compile) 2>conftest.er1
39673   ac_status=$?
39674   grep -v '^ *+' conftest.er1 >conftest.err
39675   rm -f conftest.er1
39676   cat conftest.err >&5
39677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39678   (exit $ac_status); } &&
39679          { ac_try='test -z "$ac_c_werror_flag"
39680                          || test ! -s conftest.err'
39681   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39682   (eval $ac_try) 2>&5
39683   ac_status=$?
39684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39685   (exit $ac_status); }; } &&
39686          { ac_try='test -s conftest.$ac_objext'
39687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39688   (eval $ac_try) 2>&5
39689   ac_status=$?
39690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39691   (exit $ac_status); }; }; then
39692   ac_cv_c_bigendian=yes
39693 else
39694   echo "$as_me: failed program was:" >&5
39695 sed 's/^/| /' conftest.$ac_ext >&5
39696
39697 ac_cv_c_bigendian=no
39698 fi
39699 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39700 else
39701   echo "$as_me: failed program was:" >&5
39702 sed 's/^/| /' conftest.$ac_ext >&5
39703
39704 # It does not; compile a test program.
39705 if test "$cross_compiling" = yes; then
39706   # try to guess the endianness by grepping values into an object file
39707   ac_cv_c_bigendian=unknown
39708   cat >conftest.$ac_ext <<_ACEOF
39709 /* confdefs.h.  */
39710 _ACEOF
39711 cat confdefs.h >>conftest.$ac_ext
39712 cat >>conftest.$ac_ext <<_ACEOF
39713 /* end confdefs.h.  */
39714 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
39715 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
39716 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
39717 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
39718 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
39719 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
39720 int
39721 main ()
39722 {
39723  _ascii (); _ebcdic ();
39724   ;
39725   return 0;
39726 }
39727 _ACEOF
39728 rm -f conftest.$ac_objext
39729 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39730   (eval $ac_compile) 2>conftest.er1
39731   ac_status=$?
39732   grep -v '^ *+' conftest.er1 >conftest.err
39733   rm -f conftest.er1
39734   cat conftest.err >&5
39735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39736   (exit $ac_status); } &&
39737          { ac_try='test -z "$ac_c_werror_flag"
39738                          || test ! -s conftest.err'
39739   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39740   (eval $ac_try) 2>&5
39741   ac_status=$?
39742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39743   (exit $ac_status); }; } &&
39744          { ac_try='test -s conftest.$ac_objext'
39745   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39746   (eval $ac_try) 2>&5
39747   ac_status=$?
39748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39749   (exit $ac_status); }; }; then
39750   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
39751   ac_cv_c_bigendian=yes
39752 fi
39753 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
39754   if test "$ac_cv_c_bigendian" = unknown; then
39755     ac_cv_c_bigendian=no
39756   else
39757     # finding both strings is unlikely to happen, but who knows?
39758     ac_cv_c_bigendian=unknown
39759   fi
39760 fi
39761 else
39762   echo "$as_me: failed program was:" >&5
39763 sed 's/^/| /' conftest.$ac_ext >&5
39764
39765 fi
39766 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39767 else
39768   cat >conftest.$ac_ext <<_ACEOF
39769 /* confdefs.h.  */
39770 _ACEOF
39771 cat confdefs.h >>conftest.$ac_ext
39772 cat >>conftest.$ac_ext <<_ACEOF
39773 /* end confdefs.h.  */
39774 int
39775 main ()
39776 {
39777   /* Are we little or big endian?  From Harbison&Steele.  */
39778   union
39779   {
39780     long l;
39781     char c[sizeof (long)];
39782   } u;
39783   u.l = 1;
39784   exit (u.c[sizeof (long) - 1] == 1);
39785 }
39786 _ACEOF
39787 rm -f conftest$ac_exeext
39788 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
39789   (eval $ac_link) 2>&5
39790   ac_status=$?
39791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39792   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
39793   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39794   (eval $ac_try) 2>&5
39795   ac_status=$?
39796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39797   (exit $ac_status); }; }; then
39798   ac_cv_c_bigendian=no
39799 else
39800   echo "$as_me: program exited with status $ac_status" >&5
39801 echo "$as_me: failed program was:" >&5
39802 sed 's/^/| /' conftest.$ac_ext >&5
39803
39804 ( exit $ac_status )
39805 ac_cv_c_bigendian=yes
39806 fi
39807 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39808 fi
39809 fi
39810 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39811 fi
39812 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
39813 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
39814 case $ac_cv_c_bigendian in
39815   yes)
39816
39817 cat >>confdefs.h <<\_ACEOF
39818 #define WORDS_BIGENDIAN 1
39819 _ACEOF
39820  ;;
39821   no)
39822      ;;
39823   *)
39824     { { echo "$as_me:$LINENO: error: unknown endianness
39825 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
39826 echo "$as_me: error: unknown endianness
39827 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
39828    { (exit 1); exit 1; }; } ;;
39829 esac
39830
39831 fi
39832
39833 echo "$as_me:$LINENO: checking for short" >&5
39834 echo $ECHO_N "checking for short... $ECHO_C" >&6
39835 if test "${ac_cv_type_short+set}" = set; then
39836   echo $ECHO_N "(cached) $ECHO_C" >&6
39837 else
39838   cat >conftest.$ac_ext <<_ACEOF
39839 /* confdefs.h.  */
39840 _ACEOF
39841 cat confdefs.h >>conftest.$ac_ext
39842 cat >>conftest.$ac_ext <<_ACEOF
39843 /* end confdefs.h.  */
39844 $ac_includes_default
39845 int
39846 main ()
39847 {
39848 if ((short *) 0)
39849   return 0;
39850 if (sizeof (short))
39851   return 0;
39852   ;
39853   return 0;
39854 }
39855 _ACEOF
39856 rm -f conftest.$ac_objext
39857 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39858   (eval $ac_compile) 2>conftest.er1
39859   ac_status=$?
39860   grep -v '^ *+' conftest.er1 >conftest.err
39861   rm -f conftest.er1
39862   cat conftest.err >&5
39863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39864   (exit $ac_status); } &&
39865          { ac_try='test -z "$ac_c_werror_flag"
39866                          || test ! -s conftest.err'
39867   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39868   (eval $ac_try) 2>&5
39869   ac_status=$?
39870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39871   (exit $ac_status); }; } &&
39872          { ac_try='test -s conftest.$ac_objext'
39873   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39874   (eval $ac_try) 2>&5
39875   ac_status=$?
39876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39877   (exit $ac_status); }; }; then
39878   ac_cv_type_short=yes
39879 else
39880   echo "$as_me: failed program was:" >&5
39881 sed 's/^/| /' conftest.$ac_ext >&5
39882
39883 ac_cv_type_short=no
39884 fi
39885 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39886 fi
39887 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
39888 echo "${ECHO_T}$ac_cv_type_short" >&6
39889
39890 echo "$as_me:$LINENO: checking size of short" >&5
39891 echo $ECHO_N "checking size of short... $ECHO_C" >&6
39892 if test "${ac_cv_sizeof_short+set}" = set; then
39893   echo $ECHO_N "(cached) $ECHO_C" >&6
39894 else
39895   if test "$ac_cv_type_short" = yes; then
39896   # The cast to unsigned long works around a bug in the HP C Compiler
39897   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
39898   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
39899   # This bug is HP SR number 8606223364.
39900   if test "$cross_compiling" = yes; then
39901   # Depending upon the size, compute the lo and hi bounds.
39902 cat >conftest.$ac_ext <<_ACEOF
39903 /* confdefs.h.  */
39904 _ACEOF
39905 cat confdefs.h >>conftest.$ac_ext
39906 cat >>conftest.$ac_ext <<_ACEOF
39907 /* end confdefs.h.  */
39908 $ac_includes_default
39909 int
39910 main ()
39911 {
39912 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
39913 test_array [0] = 0
39914
39915   ;
39916   return 0;
39917 }
39918 _ACEOF
39919 rm -f conftest.$ac_objext
39920 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39921   (eval $ac_compile) 2>conftest.er1
39922   ac_status=$?
39923   grep -v '^ *+' conftest.er1 >conftest.err
39924   rm -f conftest.er1
39925   cat conftest.err >&5
39926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39927   (exit $ac_status); } &&
39928          { ac_try='test -z "$ac_c_werror_flag"
39929                          || test ! -s conftest.err'
39930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39931   (eval $ac_try) 2>&5
39932   ac_status=$?
39933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39934   (exit $ac_status); }; } &&
39935          { ac_try='test -s conftest.$ac_objext'
39936   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39937   (eval $ac_try) 2>&5
39938   ac_status=$?
39939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39940   (exit $ac_status); }; }; then
39941   ac_lo=0 ac_mid=0
39942   while :; do
39943     cat >conftest.$ac_ext <<_ACEOF
39944 /* confdefs.h.  */
39945 _ACEOF
39946 cat confdefs.h >>conftest.$ac_ext
39947 cat >>conftest.$ac_ext <<_ACEOF
39948 /* end confdefs.h.  */
39949 $ac_includes_default
39950 int
39951 main ()
39952 {
39953 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
39954 test_array [0] = 0
39955
39956   ;
39957   return 0;
39958 }
39959 _ACEOF
39960 rm -f conftest.$ac_objext
39961 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39962   (eval $ac_compile) 2>conftest.er1
39963   ac_status=$?
39964   grep -v '^ *+' conftest.er1 >conftest.err
39965   rm -f conftest.er1
39966   cat conftest.err >&5
39967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39968   (exit $ac_status); } &&
39969          { ac_try='test -z "$ac_c_werror_flag"
39970                          || test ! -s conftest.err'
39971   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39972   (eval $ac_try) 2>&5
39973   ac_status=$?
39974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39975   (exit $ac_status); }; } &&
39976          { ac_try='test -s conftest.$ac_objext'
39977   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39978   (eval $ac_try) 2>&5
39979   ac_status=$?
39980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39981   (exit $ac_status); }; }; then
39982   ac_hi=$ac_mid; break
39983 else
39984   echo "$as_me: failed program was:" >&5
39985 sed 's/^/| /' conftest.$ac_ext >&5
39986
39987 ac_lo=`expr $ac_mid + 1`
39988                     if test $ac_lo -le $ac_mid; then
39989                       ac_lo= ac_hi=
39990                       break
39991                     fi
39992                     ac_mid=`expr 2 '*' $ac_mid + 1`
39993 fi
39994 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39995   done
39996 else
39997   echo "$as_me: failed program was:" >&5
39998 sed 's/^/| /' conftest.$ac_ext >&5
39999
40000 cat >conftest.$ac_ext <<_ACEOF
40001 /* confdefs.h.  */
40002 _ACEOF
40003 cat confdefs.h >>conftest.$ac_ext
40004 cat >>conftest.$ac_ext <<_ACEOF
40005 /* end confdefs.h.  */
40006 $ac_includes_default
40007 int
40008 main ()
40009 {
40010 static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
40011 test_array [0] = 0
40012
40013   ;
40014   return 0;
40015 }
40016 _ACEOF
40017 rm -f conftest.$ac_objext
40018 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40019   (eval $ac_compile) 2>conftest.er1
40020   ac_status=$?
40021   grep -v '^ *+' conftest.er1 >conftest.err
40022   rm -f conftest.er1
40023   cat conftest.err >&5
40024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40025   (exit $ac_status); } &&
40026          { ac_try='test -z "$ac_c_werror_flag"
40027                          || test ! -s conftest.err'
40028   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40029   (eval $ac_try) 2>&5
40030   ac_status=$?
40031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40032   (exit $ac_status); }; } &&
40033          { ac_try='test -s conftest.$ac_objext'
40034   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40035   (eval $ac_try) 2>&5
40036   ac_status=$?
40037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40038   (exit $ac_status); }; }; then
40039   ac_hi=-1 ac_mid=-1
40040   while :; do
40041     cat >conftest.$ac_ext <<_ACEOF
40042 /* confdefs.h.  */
40043 _ACEOF
40044 cat confdefs.h >>conftest.$ac_ext
40045 cat >>conftest.$ac_ext <<_ACEOF
40046 /* end confdefs.h.  */
40047 $ac_includes_default
40048 int
40049 main ()
40050 {
40051 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
40052 test_array [0] = 0
40053
40054   ;
40055   return 0;
40056 }
40057 _ACEOF
40058 rm -f conftest.$ac_objext
40059 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40060   (eval $ac_compile) 2>conftest.er1
40061   ac_status=$?
40062   grep -v '^ *+' conftest.er1 >conftest.err
40063   rm -f conftest.er1
40064   cat conftest.err >&5
40065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40066   (exit $ac_status); } &&
40067          { ac_try='test -z "$ac_c_werror_flag"
40068                          || test ! -s conftest.err'
40069   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40070   (eval $ac_try) 2>&5
40071   ac_status=$?
40072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40073   (exit $ac_status); }; } &&
40074          { ac_try='test -s conftest.$ac_objext'
40075   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40076   (eval $ac_try) 2>&5
40077   ac_status=$?
40078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40079   (exit $ac_status); }; }; then
40080   ac_lo=$ac_mid; break
40081 else
40082   echo "$as_me: failed program was:" >&5
40083 sed 's/^/| /' conftest.$ac_ext >&5
40084
40085 ac_hi=`expr '(' $ac_mid ')' - 1`
40086                        if test $ac_mid -le $ac_hi; then
40087                          ac_lo= ac_hi=
40088                          break
40089                        fi
40090                        ac_mid=`expr 2 '*' $ac_mid`
40091 fi
40092 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40093   done
40094 else
40095   echo "$as_me: failed program was:" >&5
40096 sed 's/^/| /' conftest.$ac_ext >&5
40097
40098 ac_lo= ac_hi=
40099 fi
40100 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40101 fi
40102 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40103 # Binary search between lo and hi bounds.
40104 while test "x$ac_lo" != "x$ac_hi"; do
40105   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
40106   cat >conftest.$ac_ext <<_ACEOF
40107 /* confdefs.h.  */
40108 _ACEOF
40109 cat confdefs.h >>conftest.$ac_ext
40110 cat >>conftest.$ac_ext <<_ACEOF
40111 /* end confdefs.h.  */
40112 $ac_includes_default
40113 int
40114 main ()
40115 {
40116 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
40117 test_array [0] = 0
40118
40119   ;
40120   return 0;
40121 }
40122 _ACEOF
40123 rm -f conftest.$ac_objext
40124 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40125   (eval $ac_compile) 2>conftest.er1
40126   ac_status=$?
40127   grep -v '^ *+' conftest.er1 >conftest.err
40128   rm -f conftest.er1
40129   cat conftest.err >&5
40130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40131   (exit $ac_status); } &&
40132          { ac_try='test -z "$ac_c_werror_flag"
40133                          || test ! -s conftest.err'
40134   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40135   (eval $ac_try) 2>&5
40136   ac_status=$?
40137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40138   (exit $ac_status); }; } &&
40139          { ac_try='test -s conftest.$ac_objext'
40140   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40141   (eval $ac_try) 2>&5
40142   ac_status=$?
40143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40144   (exit $ac_status); }; }; then
40145   ac_hi=$ac_mid
40146 else
40147   echo "$as_me: failed program was:" >&5
40148 sed 's/^/| /' conftest.$ac_ext >&5
40149
40150 ac_lo=`expr '(' $ac_mid ')' + 1`
40151 fi
40152 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40153 done
40154 case $ac_lo in
40155 ?*) ac_cv_sizeof_short=$ac_lo;;
40156 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
40157 See \`config.log' for more details." >&5
40158 echo "$as_me: error: cannot compute sizeof (short), 77
40159 See \`config.log' for more details." >&2;}
40160    { (exit 1); exit 1; }; } ;;
40161 esac
40162 else
40163   if test "$cross_compiling" = yes; then
40164   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
40165 See \`config.log' for more details." >&5
40166 echo "$as_me: error: cannot run test program while cross compiling
40167 See \`config.log' for more details." >&2;}
40168    { (exit 1); exit 1; }; }
40169 else
40170   cat >conftest.$ac_ext <<_ACEOF
40171 /* confdefs.h.  */
40172 _ACEOF
40173 cat confdefs.h >>conftest.$ac_ext
40174 cat >>conftest.$ac_ext <<_ACEOF
40175 /* end confdefs.h.  */
40176 $ac_includes_default
40177 long longval () { return (long) (sizeof (short)); }
40178 unsigned long ulongval () { return (long) (sizeof (short)); }
40179 #include <stdio.h>
40180 #include <stdlib.h>
40181 int
40182 main ()
40183 {
40184
40185   FILE *f = fopen ("conftest.val", "w");
40186   if (! f)
40187     exit (1);
40188   if (((long) (sizeof (short))) < 0)
40189     {
40190       long i = longval ();
40191       if (i != ((long) (sizeof (short))))
40192         exit (1);
40193       fprintf (f, "%ld\n", i);
40194     }
40195   else
40196     {
40197       unsigned long i = ulongval ();
40198       if (i != ((long) (sizeof (short))))
40199         exit (1);
40200       fprintf (f, "%lu\n", i);
40201     }
40202   exit (ferror (f) || fclose (f) != 0);
40203
40204   ;
40205   return 0;
40206 }
40207 _ACEOF
40208 rm -f conftest$ac_exeext
40209 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
40210   (eval $ac_link) 2>&5
40211   ac_status=$?
40212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40213   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
40214   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40215   (eval $ac_try) 2>&5
40216   ac_status=$?
40217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40218   (exit $ac_status); }; }; then
40219   ac_cv_sizeof_short=`cat conftest.val`
40220 else
40221   echo "$as_me: program exited with status $ac_status" >&5
40222 echo "$as_me: failed program was:" >&5
40223 sed 's/^/| /' conftest.$ac_ext >&5
40224
40225 ( exit $ac_status )
40226 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
40227 See \`config.log' for more details." >&5
40228 echo "$as_me: error: cannot compute sizeof (short), 77
40229 See \`config.log' for more details." >&2;}
40230    { (exit 1); exit 1; }; }
40231 fi
40232 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
40233 fi
40234 fi
40235 rm -f conftest.val
40236 else
40237   ac_cv_sizeof_short=0
40238 fi
40239 fi
40240 echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
40241 echo "${ECHO_T}$ac_cv_sizeof_short" >&6
40242 cat >>confdefs.h <<_ACEOF
40243 #define SIZEOF_SHORT $ac_cv_sizeof_short
40244 _ACEOF
40245
40246
40247 echo "$as_me:$LINENO: checking for int" >&5
40248 echo $ECHO_N "checking for int... $ECHO_C" >&6
40249 if test "${ac_cv_type_int+set}" = set; then
40250   echo $ECHO_N "(cached) $ECHO_C" >&6
40251 else
40252   cat >conftest.$ac_ext <<_ACEOF
40253 /* confdefs.h.  */
40254 _ACEOF
40255 cat confdefs.h >>conftest.$ac_ext
40256 cat >>conftest.$ac_ext <<_ACEOF
40257 /* end confdefs.h.  */
40258 $ac_includes_default
40259 int
40260 main ()
40261 {
40262 if ((int *) 0)
40263   return 0;
40264 if (sizeof (int))
40265   return 0;
40266   ;
40267   return 0;
40268 }
40269 _ACEOF
40270 rm -f conftest.$ac_objext
40271 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40272   (eval $ac_compile) 2>conftest.er1
40273   ac_status=$?
40274   grep -v '^ *+' conftest.er1 >conftest.err
40275   rm -f conftest.er1
40276   cat conftest.err >&5
40277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40278   (exit $ac_status); } &&
40279          { ac_try='test -z "$ac_c_werror_flag"
40280                          || test ! -s conftest.err'
40281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40282   (eval $ac_try) 2>&5
40283   ac_status=$?
40284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40285   (exit $ac_status); }; } &&
40286          { ac_try='test -s conftest.$ac_objext'
40287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40288   (eval $ac_try) 2>&5
40289   ac_status=$?
40290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40291   (exit $ac_status); }; }; then
40292   ac_cv_type_int=yes
40293 else
40294   echo "$as_me: failed program was:" >&5
40295 sed 's/^/| /' conftest.$ac_ext >&5
40296
40297 ac_cv_type_int=no
40298 fi
40299 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40300 fi
40301 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
40302 echo "${ECHO_T}$ac_cv_type_int" >&6
40303
40304 echo "$as_me:$LINENO: checking size of int" >&5
40305 echo $ECHO_N "checking size of int... $ECHO_C" >&6
40306 if test "${ac_cv_sizeof_int+set}" = set; then
40307   echo $ECHO_N "(cached) $ECHO_C" >&6
40308 else
40309   if test "$ac_cv_type_int" = yes; then
40310   # The cast to unsigned long works around a bug in the HP C Compiler
40311   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40312   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40313   # This bug is HP SR number 8606223364.
40314   if test "$cross_compiling" = yes; then
40315   # Depending upon the size, compute the lo and hi bounds.
40316 cat >conftest.$ac_ext <<_ACEOF
40317 /* confdefs.h.  */
40318 _ACEOF
40319 cat confdefs.h >>conftest.$ac_ext
40320 cat >>conftest.$ac_ext <<_ACEOF
40321 /* end confdefs.h.  */
40322 $ac_includes_default
40323 int
40324 main ()
40325 {
40326 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
40327 test_array [0] = 0
40328
40329   ;
40330   return 0;
40331 }
40332 _ACEOF
40333 rm -f conftest.$ac_objext
40334 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40335   (eval $ac_compile) 2>conftest.er1
40336   ac_status=$?
40337   grep -v '^ *+' conftest.er1 >conftest.err
40338   rm -f conftest.er1
40339   cat conftest.err >&5
40340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40341   (exit $ac_status); } &&
40342          { ac_try='test -z "$ac_c_werror_flag"
40343                          || test ! -s conftest.err'
40344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40345   (eval $ac_try) 2>&5
40346   ac_status=$?
40347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40348   (exit $ac_status); }; } &&
40349          { ac_try='test -s conftest.$ac_objext'
40350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40351   (eval $ac_try) 2>&5
40352   ac_status=$?
40353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40354   (exit $ac_status); }; }; then
40355   ac_lo=0 ac_mid=0
40356   while :; do
40357     cat >conftest.$ac_ext <<_ACEOF
40358 /* confdefs.h.  */
40359 _ACEOF
40360 cat confdefs.h >>conftest.$ac_ext
40361 cat >>conftest.$ac_ext <<_ACEOF
40362 /* end confdefs.h.  */
40363 $ac_includes_default
40364 int
40365 main ()
40366 {
40367 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
40368 test_array [0] = 0
40369
40370   ;
40371   return 0;
40372 }
40373 _ACEOF
40374 rm -f conftest.$ac_objext
40375 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40376   (eval $ac_compile) 2>conftest.er1
40377   ac_status=$?
40378   grep -v '^ *+' conftest.er1 >conftest.err
40379   rm -f conftest.er1
40380   cat conftest.err >&5
40381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40382   (exit $ac_status); } &&
40383          { ac_try='test -z "$ac_c_werror_flag"
40384                          || test ! -s conftest.err'
40385   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40386   (eval $ac_try) 2>&5
40387   ac_status=$?
40388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40389   (exit $ac_status); }; } &&
40390          { ac_try='test -s conftest.$ac_objext'
40391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40392   (eval $ac_try) 2>&5
40393   ac_status=$?
40394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40395   (exit $ac_status); }; }; then
40396   ac_hi=$ac_mid; break
40397 else
40398   echo "$as_me: failed program was:" >&5
40399 sed 's/^/| /' conftest.$ac_ext >&5
40400
40401 ac_lo=`expr $ac_mid + 1`
40402                     if test $ac_lo -le $ac_mid; then
40403                       ac_lo= ac_hi=
40404                       break
40405                     fi
40406                     ac_mid=`expr 2 '*' $ac_mid + 1`
40407 fi
40408 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40409   done
40410 else
40411   echo "$as_me: failed program was:" >&5
40412 sed 's/^/| /' conftest.$ac_ext >&5
40413
40414 cat >conftest.$ac_ext <<_ACEOF
40415 /* confdefs.h.  */
40416 _ACEOF
40417 cat confdefs.h >>conftest.$ac_ext
40418 cat >>conftest.$ac_ext <<_ACEOF
40419 /* end confdefs.h.  */
40420 $ac_includes_default
40421 int
40422 main ()
40423 {
40424 static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
40425 test_array [0] = 0
40426
40427   ;
40428   return 0;
40429 }
40430 _ACEOF
40431 rm -f conftest.$ac_objext
40432 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40433   (eval $ac_compile) 2>conftest.er1
40434   ac_status=$?
40435   grep -v '^ *+' conftest.er1 >conftest.err
40436   rm -f conftest.er1
40437   cat conftest.err >&5
40438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40439   (exit $ac_status); } &&
40440          { ac_try='test -z "$ac_c_werror_flag"
40441                          || test ! -s conftest.err'
40442   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40443   (eval $ac_try) 2>&5
40444   ac_status=$?
40445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40446   (exit $ac_status); }; } &&
40447          { ac_try='test -s conftest.$ac_objext'
40448   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40449   (eval $ac_try) 2>&5
40450   ac_status=$?
40451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40452   (exit $ac_status); }; }; then
40453   ac_hi=-1 ac_mid=-1
40454   while :; do
40455     cat >conftest.$ac_ext <<_ACEOF
40456 /* confdefs.h.  */
40457 _ACEOF
40458 cat confdefs.h >>conftest.$ac_ext
40459 cat >>conftest.$ac_ext <<_ACEOF
40460 /* end confdefs.h.  */
40461 $ac_includes_default
40462 int
40463 main ()
40464 {
40465 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
40466 test_array [0] = 0
40467
40468   ;
40469   return 0;
40470 }
40471 _ACEOF
40472 rm -f conftest.$ac_objext
40473 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40474   (eval $ac_compile) 2>conftest.er1
40475   ac_status=$?
40476   grep -v '^ *+' conftest.er1 >conftest.err
40477   rm -f conftest.er1
40478   cat conftest.err >&5
40479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40480   (exit $ac_status); } &&
40481          { ac_try='test -z "$ac_c_werror_flag"
40482                          || test ! -s conftest.err'
40483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40484   (eval $ac_try) 2>&5
40485   ac_status=$?
40486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40487   (exit $ac_status); }; } &&
40488          { ac_try='test -s conftest.$ac_objext'
40489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40490   (eval $ac_try) 2>&5
40491   ac_status=$?
40492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40493   (exit $ac_status); }; }; then
40494   ac_lo=$ac_mid; break
40495 else
40496   echo "$as_me: failed program was:" >&5
40497 sed 's/^/| /' conftest.$ac_ext >&5
40498
40499 ac_hi=`expr '(' $ac_mid ')' - 1`
40500                        if test $ac_mid -le $ac_hi; then
40501                          ac_lo= ac_hi=
40502                          break
40503                        fi
40504                        ac_mid=`expr 2 '*' $ac_mid`
40505 fi
40506 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40507   done
40508 else
40509   echo "$as_me: failed program was:" >&5
40510 sed 's/^/| /' conftest.$ac_ext >&5
40511
40512 ac_lo= ac_hi=
40513 fi
40514 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40515 fi
40516 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40517 # Binary search between lo and hi bounds.
40518 while test "x$ac_lo" != "x$ac_hi"; do
40519   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
40520   cat >conftest.$ac_ext <<_ACEOF
40521 /* confdefs.h.  */
40522 _ACEOF
40523 cat confdefs.h >>conftest.$ac_ext
40524 cat >>conftest.$ac_ext <<_ACEOF
40525 /* end confdefs.h.  */
40526 $ac_includes_default
40527 int
40528 main ()
40529 {
40530 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
40531 test_array [0] = 0
40532
40533   ;
40534   return 0;
40535 }
40536 _ACEOF
40537 rm -f conftest.$ac_objext
40538 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40539   (eval $ac_compile) 2>conftest.er1
40540   ac_status=$?
40541   grep -v '^ *+' conftest.er1 >conftest.err
40542   rm -f conftest.er1
40543   cat conftest.err >&5
40544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40545   (exit $ac_status); } &&
40546          { ac_try='test -z "$ac_c_werror_flag"
40547                          || test ! -s conftest.err'
40548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40549   (eval $ac_try) 2>&5
40550   ac_status=$?
40551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40552   (exit $ac_status); }; } &&
40553          { ac_try='test -s conftest.$ac_objext'
40554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40555   (eval $ac_try) 2>&5
40556   ac_status=$?
40557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40558   (exit $ac_status); }; }; then
40559   ac_hi=$ac_mid
40560 else
40561   echo "$as_me: failed program was:" >&5
40562 sed 's/^/| /' conftest.$ac_ext >&5
40563
40564 ac_lo=`expr '(' $ac_mid ')' + 1`
40565 fi
40566 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40567 done
40568 case $ac_lo in
40569 ?*) ac_cv_sizeof_int=$ac_lo;;
40570 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
40571 See \`config.log' for more details." >&5
40572 echo "$as_me: error: cannot compute sizeof (int), 77
40573 See \`config.log' for more details." >&2;}
40574    { (exit 1); exit 1; }; } ;;
40575 esac
40576 else
40577   if test "$cross_compiling" = yes; then
40578   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
40579 See \`config.log' for more details." >&5
40580 echo "$as_me: error: cannot run test program while cross compiling
40581 See \`config.log' for more details." >&2;}
40582    { (exit 1); exit 1; }; }
40583 else
40584   cat >conftest.$ac_ext <<_ACEOF
40585 /* confdefs.h.  */
40586 _ACEOF
40587 cat confdefs.h >>conftest.$ac_ext
40588 cat >>conftest.$ac_ext <<_ACEOF
40589 /* end confdefs.h.  */
40590 $ac_includes_default
40591 long longval () { return (long) (sizeof (int)); }
40592 unsigned long ulongval () { return (long) (sizeof (int)); }
40593 #include <stdio.h>
40594 #include <stdlib.h>
40595 int
40596 main ()
40597 {
40598
40599   FILE *f = fopen ("conftest.val", "w");
40600   if (! f)
40601     exit (1);
40602   if (((long) (sizeof (int))) < 0)
40603     {
40604       long i = longval ();
40605       if (i != ((long) (sizeof (int))))
40606         exit (1);
40607       fprintf (f, "%ld\n", i);
40608     }
40609   else
40610     {
40611       unsigned long i = ulongval ();
40612       if (i != ((long) (sizeof (int))))
40613         exit (1);
40614       fprintf (f, "%lu\n", i);
40615     }
40616   exit (ferror (f) || fclose (f) != 0);
40617
40618   ;
40619   return 0;
40620 }
40621 _ACEOF
40622 rm -f conftest$ac_exeext
40623 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
40624   (eval $ac_link) 2>&5
40625   ac_status=$?
40626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40627   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
40628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40629   (eval $ac_try) 2>&5
40630   ac_status=$?
40631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40632   (exit $ac_status); }; }; then
40633   ac_cv_sizeof_int=`cat conftest.val`
40634 else
40635   echo "$as_me: program exited with status $ac_status" >&5
40636 echo "$as_me: failed program was:" >&5
40637 sed 's/^/| /' conftest.$ac_ext >&5
40638
40639 ( exit $ac_status )
40640 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
40641 See \`config.log' for more details." >&5
40642 echo "$as_me: error: cannot compute sizeof (int), 77
40643 See \`config.log' for more details." >&2;}
40644    { (exit 1); exit 1; }; }
40645 fi
40646 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
40647 fi
40648 fi
40649 rm -f conftest.val
40650 else
40651   ac_cv_sizeof_int=0
40652 fi
40653 fi
40654 echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
40655 echo "${ECHO_T}$ac_cv_sizeof_int" >&6
40656 cat >>confdefs.h <<_ACEOF
40657 #define SIZEOF_INT $ac_cv_sizeof_int
40658 _ACEOF
40659
40660
40661 echo "$as_me:$LINENO: checking for long" >&5
40662 echo $ECHO_N "checking for long... $ECHO_C" >&6
40663 if test "${ac_cv_type_long+set}" = set; then
40664   echo $ECHO_N "(cached) $ECHO_C" >&6
40665 else
40666   cat >conftest.$ac_ext <<_ACEOF
40667 /* confdefs.h.  */
40668 _ACEOF
40669 cat confdefs.h >>conftest.$ac_ext
40670 cat >>conftest.$ac_ext <<_ACEOF
40671 /* end confdefs.h.  */
40672 $ac_includes_default
40673 int
40674 main ()
40675 {
40676 if ((long *) 0)
40677   return 0;
40678 if (sizeof (long))
40679   return 0;
40680   ;
40681   return 0;
40682 }
40683 _ACEOF
40684 rm -f conftest.$ac_objext
40685 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40686   (eval $ac_compile) 2>conftest.er1
40687   ac_status=$?
40688   grep -v '^ *+' conftest.er1 >conftest.err
40689   rm -f conftest.er1
40690   cat conftest.err >&5
40691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40692   (exit $ac_status); } &&
40693          { ac_try='test -z "$ac_c_werror_flag"
40694                          || test ! -s conftest.err'
40695   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40696   (eval $ac_try) 2>&5
40697   ac_status=$?
40698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40699   (exit $ac_status); }; } &&
40700          { ac_try='test -s conftest.$ac_objext'
40701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40702   (eval $ac_try) 2>&5
40703   ac_status=$?
40704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40705   (exit $ac_status); }; }; then
40706   ac_cv_type_long=yes
40707 else
40708   echo "$as_me: failed program was:" >&5
40709 sed 's/^/| /' conftest.$ac_ext >&5
40710
40711 ac_cv_type_long=no
40712 fi
40713 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40714 fi
40715 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
40716 echo "${ECHO_T}$ac_cv_type_long" >&6
40717
40718 echo "$as_me:$LINENO: checking size of long" >&5
40719 echo $ECHO_N "checking size of long... $ECHO_C" >&6
40720 if test "${ac_cv_sizeof_long+set}" = set; then
40721   echo $ECHO_N "(cached) $ECHO_C" >&6
40722 else
40723   if test "$ac_cv_type_long" = yes; then
40724   # The cast to unsigned long works around a bug in the HP C Compiler
40725   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40726   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40727   # This bug is HP SR number 8606223364.
40728   if test "$cross_compiling" = yes; then
40729   # Depending upon the size, compute the lo and hi bounds.
40730 cat >conftest.$ac_ext <<_ACEOF
40731 /* confdefs.h.  */
40732 _ACEOF
40733 cat confdefs.h >>conftest.$ac_ext
40734 cat >>conftest.$ac_ext <<_ACEOF
40735 /* end confdefs.h.  */
40736 $ac_includes_default
40737 int
40738 main ()
40739 {
40740 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
40741 test_array [0] = 0
40742
40743   ;
40744   return 0;
40745 }
40746 _ACEOF
40747 rm -f conftest.$ac_objext
40748 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40749   (eval $ac_compile) 2>conftest.er1
40750   ac_status=$?
40751   grep -v '^ *+' conftest.er1 >conftest.err
40752   rm -f conftest.er1
40753   cat conftest.err >&5
40754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40755   (exit $ac_status); } &&
40756          { ac_try='test -z "$ac_c_werror_flag"
40757                          || test ! -s conftest.err'
40758   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40759   (eval $ac_try) 2>&5
40760   ac_status=$?
40761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40762   (exit $ac_status); }; } &&
40763          { ac_try='test -s conftest.$ac_objext'
40764   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40765   (eval $ac_try) 2>&5
40766   ac_status=$?
40767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40768   (exit $ac_status); }; }; then
40769   ac_lo=0 ac_mid=0
40770   while :; do
40771     cat >conftest.$ac_ext <<_ACEOF
40772 /* confdefs.h.  */
40773 _ACEOF
40774 cat confdefs.h >>conftest.$ac_ext
40775 cat >>conftest.$ac_ext <<_ACEOF
40776 /* end confdefs.h.  */
40777 $ac_includes_default
40778 int
40779 main ()
40780 {
40781 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
40782 test_array [0] = 0
40783
40784   ;
40785   return 0;
40786 }
40787 _ACEOF
40788 rm -f conftest.$ac_objext
40789 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40790   (eval $ac_compile) 2>conftest.er1
40791   ac_status=$?
40792   grep -v '^ *+' conftest.er1 >conftest.err
40793   rm -f conftest.er1
40794   cat conftest.err >&5
40795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40796   (exit $ac_status); } &&
40797          { ac_try='test -z "$ac_c_werror_flag"
40798                          || test ! -s conftest.err'
40799   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40800   (eval $ac_try) 2>&5
40801   ac_status=$?
40802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40803   (exit $ac_status); }; } &&
40804          { ac_try='test -s conftest.$ac_objext'
40805   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40806   (eval $ac_try) 2>&5
40807   ac_status=$?
40808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40809   (exit $ac_status); }; }; then
40810   ac_hi=$ac_mid; break
40811 else
40812   echo "$as_me: failed program was:" >&5
40813 sed 's/^/| /' conftest.$ac_ext >&5
40814
40815 ac_lo=`expr $ac_mid + 1`
40816                     if test $ac_lo -le $ac_mid; then
40817                       ac_lo= ac_hi=
40818                       break
40819                     fi
40820                     ac_mid=`expr 2 '*' $ac_mid + 1`
40821 fi
40822 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40823   done
40824 else
40825   echo "$as_me: failed program was:" >&5
40826 sed 's/^/| /' conftest.$ac_ext >&5
40827
40828 cat >conftest.$ac_ext <<_ACEOF
40829 /* confdefs.h.  */
40830 _ACEOF
40831 cat confdefs.h >>conftest.$ac_ext
40832 cat >>conftest.$ac_ext <<_ACEOF
40833 /* end confdefs.h.  */
40834 $ac_includes_default
40835 int
40836 main ()
40837 {
40838 static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
40839 test_array [0] = 0
40840
40841   ;
40842   return 0;
40843 }
40844 _ACEOF
40845 rm -f conftest.$ac_objext
40846 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40847   (eval $ac_compile) 2>conftest.er1
40848   ac_status=$?
40849   grep -v '^ *+' conftest.er1 >conftest.err
40850   rm -f conftest.er1
40851   cat conftest.err >&5
40852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40853   (exit $ac_status); } &&
40854          { ac_try='test -z "$ac_c_werror_flag"
40855                          || test ! -s conftest.err'
40856   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40857   (eval $ac_try) 2>&5
40858   ac_status=$?
40859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40860   (exit $ac_status); }; } &&
40861          { ac_try='test -s conftest.$ac_objext'
40862   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40863   (eval $ac_try) 2>&5
40864   ac_status=$?
40865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40866   (exit $ac_status); }; }; then
40867   ac_hi=-1 ac_mid=-1
40868   while :; do
40869     cat >conftest.$ac_ext <<_ACEOF
40870 /* confdefs.h.  */
40871 _ACEOF
40872 cat confdefs.h >>conftest.$ac_ext
40873 cat >>conftest.$ac_ext <<_ACEOF
40874 /* end confdefs.h.  */
40875 $ac_includes_default
40876 int
40877 main ()
40878 {
40879 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
40880 test_array [0] = 0
40881
40882   ;
40883   return 0;
40884 }
40885 _ACEOF
40886 rm -f conftest.$ac_objext
40887 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40888   (eval $ac_compile) 2>conftest.er1
40889   ac_status=$?
40890   grep -v '^ *+' conftest.er1 >conftest.err
40891   rm -f conftest.er1
40892   cat conftest.err >&5
40893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40894   (exit $ac_status); } &&
40895          { ac_try='test -z "$ac_c_werror_flag"
40896                          || test ! -s conftest.err'
40897   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40898   (eval $ac_try) 2>&5
40899   ac_status=$?
40900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40901   (exit $ac_status); }; } &&
40902          { ac_try='test -s conftest.$ac_objext'
40903   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40904   (eval $ac_try) 2>&5
40905   ac_status=$?
40906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40907   (exit $ac_status); }; }; then
40908   ac_lo=$ac_mid; break
40909 else
40910   echo "$as_me: failed program was:" >&5
40911 sed 's/^/| /' conftest.$ac_ext >&5
40912
40913 ac_hi=`expr '(' $ac_mid ')' - 1`
40914                        if test $ac_mid -le $ac_hi; then
40915                          ac_lo= ac_hi=
40916                          break
40917                        fi
40918                        ac_mid=`expr 2 '*' $ac_mid`
40919 fi
40920 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40921   done
40922 else
40923   echo "$as_me: failed program was:" >&5
40924 sed 's/^/| /' conftest.$ac_ext >&5
40925
40926 ac_lo= ac_hi=
40927 fi
40928 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40929 fi
40930 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40931 # Binary search between lo and hi bounds.
40932 while test "x$ac_lo" != "x$ac_hi"; do
40933   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
40934   cat >conftest.$ac_ext <<_ACEOF
40935 /* confdefs.h.  */
40936 _ACEOF
40937 cat confdefs.h >>conftest.$ac_ext
40938 cat >>conftest.$ac_ext <<_ACEOF
40939 /* end confdefs.h.  */
40940 $ac_includes_default
40941 int
40942 main ()
40943 {
40944 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
40945 test_array [0] = 0
40946
40947   ;
40948   return 0;
40949 }
40950 _ACEOF
40951 rm -f conftest.$ac_objext
40952 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40953   (eval $ac_compile) 2>conftest.er1
40954   ac_status=$?
40955   grep -v '^ *+' conftest.er1 >conftest.err
40956   rm -f conftest.er1
40957   cat conftest.err >&5
40958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40959   (exit $ac_status); } &&
40960          { ac_try='test -z "$ac_c_werror_flag"
40961                          || test ! -s conftest.err'
40962   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40963   (eval $ac_try) 2>&5
40964   ac_status=$?
40965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40966   (exit $ac_status); }; } &&
40967          { ac_try='test -s conftest.$ac_objext'
40968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40969   (eval $ac_try) 2>&5
40970   ac_status=$?
40971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40972   (exit $ac_status); }; }; then
40973   ac_hi=$ac_mid
40974 else
40975   echo "$as_me: failed program was:" >&5
40976 sed 's/^/| /' conftest.$ac_ext >&5
40977
40978 ac_lo=`expr '(' $ac_mid ')' + 1`
40979 fi
40980 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40981 done
40982 case $ac_lo in
40983 ?*) ac_cv_sizeof_long=$ac_lo;;
40984 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
40985 See \`config.log' for more details." >&5
40986 echo "$as_me: error: cannot compute sizeof (long), 77
40987 See \`config.log' for more details." >&2;}
40988    { (exit 1); exit 1; }; } ;;
40989 esac
40990 else
40991   if test "$cross_compiling" = yes; then
40992   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
40993 See \`config.log' for more details." >&5
40994 echo "$as_me: error: cannot run test program while cross compiling
40995 See \`config.log' for more details." >&2;}
40996    { (exit 1); exit 1; }; }
40997 else
40998   cat >conftest.$ac_ext <<_ACEOF
40999 /* confdefs.h.  */
41000 _ACEOF
41001 cat confdefs.h >>conftest.$ac_ext
41002 cat >>conftest.$ac_ext <<_ACEOF
41003 /* end confdefs.h.  */
41004 $ac_includes_default
41005 long longval () { return (long) (sizeof (long)); }
41006 unsigned long ulongval () { return (long) (sizeof (long)); }
41007 #include <stdio.h>
41008 #include <stdlib.h>
41009 int
41010 main ()
41011 {
41012
41013   FILE *f = fopen ("conftest.val", "w");
41014   if (! f)
41015     exit (1);
41016   if (((long) (sizeof (long))) < 0)
41017     {
41018       long i = longval ();
41019       if (i != ((long) (sizeof (long))))
41020         exit (1);
41021       fprintf (f, "%ld\n", i);
41022     }
41023   else
41024     {
41025       unsigned long i = ulongval ();
41026       if (i != ((long) (sizeof (long))))
41027         exit (1);
41028       fprintf (f, "%lu\n", i);
41029     }
41030   exit (ferror (f) || fclose (f) != 0);
41031
41032   ;
41033   return 0;
41034 }
41035 _ACEOF
41036 rm -f conftest$ac_exeext
41037 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
41038   (eval $ac_link) 2>&5
41039   ac_status=$?
41040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41041   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
41042   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41043   (eval $ac_try) 2>&5
41044   ac_status=$?
41045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41046   (exit $ac_status); }; }; then
41047   ac_cv_sizeof_long=`cat conftest.val`
41048 else
41049   echo "$as_me: program exited with status $ac_status" >&5
41050 echo "$as_me: failed program was:" >&5
41051 sed 's/^/| /' conftest.$ac_ext >&5
41052
41053 ( exit $ac_status )
41054 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
41055 See \`config.log' for more details." >&5
41056 echo "$as_me: error: cannot compute sizeof (long), 77
41057 See \`config.log' for more details." >&2;}
41058    { (exit 1); exit 1; }; }
41059 fi
41060 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
41061 fi
41062 fi
41063 rm -f conftest.val
41064 else
41065   ac_cv_sizeof_long=0
41066 fi
41067 fi
41068 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
41069 echo "${ECHO_T}$ac_cv_sizeof_long" >&6
41070 cat >>confdefs.h <<_ACEOF
41071 #define SIZEOF_LONG $ac_cv_sizeof_long
41072 _ACEOF
41073
41074
41075 echo "$as_me:$LINENO: checking for long long" >&5
41076 echo $ECHO_N "checking for long long... $ECHO_C" >&6
41077 if test "${ac_cv_type_long_long+set}" = set; then
41078   echo $ECHO_N "(cached) $ECHO_C" >&6
41079 else
41080   cat >conftest.$ac_ext <<_ACEOF
41081 /* confdefs.h.  */
41082 _ACEOF
41083 cat confdefs.h >>conftest.$ac_ext
41084 cat >>conftest.$ac_ext <<_ACEOF
41085 /* end confdefs.h.  */
41086 $ac_includes_default
41087 int
41088 main ()
41089 {
41090 if ((long long *) 0)
41091   return 0;
41092 if (sizeof (long long))
41093   return 0;
41094   ;
41095   return 0;
41096 }
41097 _ACEOF
41098 rm -f conftest.$ac_objext
41099 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41100   (eval $ac_compile) 2>conftest.er1
41101   ac_status=$?
41102   grep -v '^ *+' conftest.er1 >conftest.err
41103   rm -f conftest.er1
41104   cat conftest.err >&5
41105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41106   (exit $ac_status); } &&
41107          { ac_try='test -z "$ac_c_werror_flag"
41108                          || test ! -s conftest.err'
41109   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41110   (eval $ac_try) 2>&5
41111   ac_status=$?
41112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41113   (exit $ac_status); }; } &&
41114          { ac_try='test -s conftest.$ac_objext'
41115   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41116   (eval $ac_try) 2>&5
41117   ac_status=$?
41118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41119   (exit $ac_status); }; }; then
41120   ac_cv_type_long_long=yes
41121 else
41122   echo "$as_me: failed program was:" >&5
41123 sed 's/^/| /' conftest.$ac_ext >&5
41124
41125 ac_cv_type_long_long=no
41126 fi
41127 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41128 fi
41129 echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
41130 echo "${ECHO_T}$ac_cv_type_long_long" >&6
41131
41132 echo "$as_me:$LINENO: checking size of long long" >&5
41133 echo $ECHO_N "checking size of long long... $ECHO_C" >&6
41134 if test "${ac_cv_sizeof_long_long+set}" = set; then
41135   echo $ECHO_N "(cached) $ECHO_C" >&6
41136 else
41137   if test "$ac_cv_type_long_long" = yes; then
41138   # The cast to unsigned long works around a bug in the HP C Compiler
41139   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41140   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41141   # This bug is HP SR number 8606223364.
41142   if test "$cross_compiling" = yes; then
41143   # Depending upon the size, compute the lo and hi bounds.
41144 cat >conftest.$ac_ext <<_ACEOF
41145 /* confdefs.h.  */
41146 _ACEOF
41147 cat confdefs.h >>conftest.$ac_ext
41148 cat >>conftest.$ac_ext <<_ACEOF
41149 /* end confdefs.h.  */
41150 $ac_includes_default
41151 int
41152 main ()
41153 {
41154 static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
41155 test_array [0] = 0
41156
41157   ;
41158   return 0;
41159 }
41160 _ACEOF
41161 rm -f conftest.$ac_objext
41162 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41163   (eval $ac_compile) 2>conftest.er1
41164   ac_status=$?
41165   grep -v '^ *+' conftest.er1 >conftest.err
41166   rm -f conftest.er1
41167   cat conftest.err >&5
41168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41169   (exit $ac_status); } &&
41170          { ac_try='test -z "$ac_c_werror_flag"
41171                          || test ! -s conftest.err'
41172   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41173   (eval $ac_try) 2>&5
41174   ac_status=$?
41175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41176   (exit $ac_status); }; } &&
41177          { ac_try='test -s conftest.$ac_objext'
41178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41179   (eval $ac_try) 2>&5
41180   ac_status=$?
41181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41182   (exit $ac_status); }; }; then
41183   ac_lo=0 ac_mid=0
41184   while :; do
41185     cat >conftest.$ac_ext <<_ACEOF
41186 /* confdefs.h.  */
41187 _ACEOF
41188 cat confdefs.h >>conftest.$ac_ext
41189 cat >>conftest.$ac_ext <<_ACEOF
41190 /* end confdefs.h.  */
41191 $ac_includes_default
41192 int
41193 main ()
41194 {
41195 static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
41196 test_array [0] = 0
41197
41198   ;
41199   return 0;
41200 }
41201 _ACEOF
41202 rm -f conftest.$ac_objext
41203 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41204   (eval $ac_compile) 2>conftest.er1
41205   ac_status=$?
41206   grep -v '^ *+' conftest.er1 >conftest.err
41207   rm -f conftest.er1
41208   cat conftest.err >&5
41209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41210   (exit $ac_status); } &&
41211          { ac_try='test -z "$ac_c_werror_flag"
41212                          || test ! -s conftest.err'
41213   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41214   (eval $ac_try) 2>&5
41215   ac_status=$?
41216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41217   (exit $ac_status); }; } &&
41218          { ac_try='test -s conftest.$ac_objext'
41219   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41220   (eval $ac_try) 2>&5
41221   ac_status=$?
41222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41223   (exit $ac_status); }; }; then
41224   ac_hi=$ac_mid; break
41225 else
41226   echo "$as_me: failed program was:" >&5
41227 sed 's/^/| /' conftest.$ac_ext >&5
41228
41229 ac_lo=`expr $ac_mid + 1`
41230                     if test $ac_lo -le $ac_mid; then
41231                       ac_lo= ac_hi=
41232                       break
41233                     fi
41234                     ac_mid=`expr 2 '*' $ac_mid + 1`
41235 fi
41236 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41237   done
41238 else
41239   echo "$as_me: failed program was:" >&5
41240 sed 's/^/| /' conftest.$ac_ext >&5
41241
41242 cat >conftest.$ac_ext <<_ACEOF
41243 /* confdefs.h.  */
41244 _ACEOF
41245 cat confdefs.h >>conftest.$ac_ext
41246 cat >>conftest.$ac_ext <<_ACEOF
41247 /* end confdefs.h.  */
41248 $ac_includes_default
41249 int
41250 main ()
41251 {
41252 static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
41253 test_array [0] = 0
41254
41255   ;
41256   return 0;
41257 }
41258 _ACEOF
41259 rm -f conftest.$ac_objext
41260 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41261   (eval $ac_compile) 2>conftest.er1
41262   ac_status=$?
41263   grep -v '^ *+' conftest.er1 >conftest.err
41264   rm -f conftest.er1
41265   cat conftest.err >&5
41266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41267   (exit $ac_status); } &&
41268          { ac_try='test -z "$ac_c_werror_flag"
41269                          || test ! -s conftest.err'
41270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41271   (eval $ac_try) 2>&5
41272   ac_status=$?
41273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41274   (exit $ac_status); }; } &&
41275          { ac_try='test -s conftest.$ac_objext'
41276   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41277   (eval $ac_try) 2>&5
41278   ac_status=$?
41279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41280   (exit $ac_status); }; }; then
41281   ac_hi=-1 ac_mid=-1
41282   while :; do
41283     cat >conftest.$ac_ext <<_ACEOF
41284 /* confdefs.h.  */
41285 _ACEOF
41286 cat confdefs.h >>conftest.$ac_ext
41287 cat >>conftest.$ac_ext <<_ACEOF
41288 /* end confdefs.h.  */
41289 $ac_includes_default
41290 int
41291 main ()
41292 {
41293 static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
41294 test_array [0] = 0
41295
41296   ;
41297   return 0;
41298 }
41299 _ACEOF
41300 rm -f conftest.$ac_objext
41301 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41302   (eval $ac_compile) 2>conftest.er1
41303   ac_status=$?
41304   grep -v '^ *+' conftest.er1 >conftest.err
41305   rm -f conftest.er1
41306   cat conftest.err >&5
41307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41308   (exit $ac_status); } &&
41309          { ac_try='test -z "$ac_c_werror_flag"
41310                          || test ! -s conftest.err'
41311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41312   (eval $ac_try) 2>&5
41313   ac_status=$?
41314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41315   (exit $ac_status); }; } &&
41316          { ac_try='test -s conftest.$ac_objext'
41317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41318   (eval $ac_try) 2>&5
41319   ac_status=$?
41320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41321   (exit $ac_status); }; }; then
41322   ac_lo=$ac_mid; break
41323 else
41324   echo "$as_me: failed program was:" >&5
41325 sed 's/^/| /' conftest.$ac_ext >&5
41326
41327 ac_hi=`expr '(' $ac_mid ')' - 1`
41328                        if test $ac_mid -le $ac_hi; then
41329                          ac_lo= ac_hi=
41330                          break
41331                        fi
41332                        ac_mid=`expr 2 '*' $ac_mid`
41333 fi
41334 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41335   done
41336 else
41337   echo "$as_me: failed program was:" >&5
41338 sed 's/^/| /' conftest.$ac_ext >&5
41339
41340 ac_lo= ac_hi=
41341 fi
41342 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41343 fi
41344 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41345 # Binary search between lo and hi bounds.
41346 while test "x$ac_lo" != "x$ac_hi"; do
41347   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
41348   cat >conftest.$ac_ext <<_ACEOF
41349 /* confdefs.h.  */
41350 _ACEOF
41351 cat confdefs.h >>conftest.$ac_ext
41352 cat >>conftest.$ac_ext <<_ACEOF
41353 /* end confdefs.h.  */
41354 $ac_includes_default
41355 int
41356 main ()
41357 {
41358 static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
41359 test_array [0] = 0
41360
41361   ;
41362   return 0;
41363 }
41364 _ACEOF
41365 rm -f conftest.$ac_objext
41366 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41367   (eval $ac_compile) 2>conftest.er1
41368   ac_status=$?
41369   grep -v '^ *+' conftest.er1 >conftest.err
41370   rm -f conftest.er1
41371   cat conftest.err >&5
41372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41373   (exit $ac_status); } &&
41374          { ac_try='test -z "$ac_c_werror_flag"
41375                          || test ! -s conftest.err'
41376   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41377   (eval $ac_try) 2>&5
41378   ac_status=$?
41379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41380   (exit $ac_status); }; } &&
41381          { ac_try='test -s conftest.$ac_objext'
41382   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41383   (eval $ac_try) 2>&5
41384   ac_status=$?
41385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41386   (exit $ac_status); }; }; then
41387   ac_hi=$ac_mid
41388 else
41389   echo "$as_me: failed program was:" >&5
41390 sed 's/^/| /' conftest.$ac_ext >&5
41391
41392 ac_lo=`expr '(' $ac_mid ')' + 1`
41393 fi
41394 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41395 done
41396 case $ac_lo in
41397 ?*) ac_cv_sizeof_long_long=$ac_lo;;
41398 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
41399 See \`config.log' for more details." >&5
41400 echo "$as_me: error: cannot compute sizeof (long long), 77
41401 See \`config.log' for more details." >&2;}
41402    { (exit 1); exit 1; }; } ;;
41403 esac
41404 else
41405   if test "$cross_compiling" = yes; then
41406   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
41407 See \`config.log' for more details." >&5
41408 echo "$as_me: error: cannot run test program while cross compiling
41409 See \`config.log' for more details." >&2;}
41410    { (exit 1); exit 1; }; }
41411 else
41412   cat >conftest.$ac_ext <<_ACEOF
41413 /* confdefs.h.  */
41414 _ACEOF
41415 cat confdefs.h >>conftest.$ac_ext
41416 cat >>conftest.$ac_ext <<_ACEOF
41417 /* end confdefs.h.  */
41418 $ac_includes_default
41419 long longval () { return (long) (sizeof (long long)); }
41420 unsigned long ulongval () { return (long) (sizeof (long long)); }
41421 #include <stdio.h>
41422 #include <stdlib.h>
41423 int
41424 main ()
41425 {
41426
41427   FILE *f = fopen ("conftest.val", "w");
41428   if (! f)
41429     exit (1);
41430   if (((long) (sizeof (long long))) < 0)
41431     {
41432       long i = longval ();
41433       if (i != ((long) (sizeof (long long))))
41434         exit (1);
41435       fprintf (f, "%ld\n", i);
41436     }
41437   else
41438     {
41439       unsigned long i = ulongval ();
41440       if (i != ((long) (sizeof (long long))))
41441         exit (1);
41442       fprintf (f, "%lu\n", i);
41443     }
41444   exit (ferror (f) || fclose (f) != 0);
41445
41446   ;
41447   return 0;
41448 }
41449 _ACEOF
41450 rm -f conftest$ac_exeext
41451 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
41452   (eval $ac_link) 2>&5
41453   ac_status=$?
41454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41455   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
41456   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41457   (eval $ac_try) 2>&5
41458   ac_status=$?
41459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41460   (exit $ac_status); }; }; then
41461   ac_cv_sizeof_long_long=`cat conftest.val`
41462 else
41463   echo "$as_me: program exited with status $ac_status" >&5
41464 echo "$as_me: failed program was:" >&5
41465 sed 's/^/| /' conftest.$ac_ext >&5
41466
41467 ( exit $ac_status )
41468 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
41469 See \`config.log' for more details." >&5
41470 echo "$as_me: error: cannot compute sizeof (long long), 77
41471 See \`config.log' for more details." >&2;}
41472    { (exit 1); exit 1; }; }
41473 fi
41474 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
41475 fi
41476 fi
41477 rm -f conftest.val
41478 else
41479   ac_cv_sizeof_long_long=0
41480 fi
41481 fi
41482 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
41483 echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
41484 cat >>confdefs.h <<_ACEOF
41485 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
41486 _ACEOF
41487
41488
41489 echo "$as_me:$LINENO: checking for wchar_t" >&5
41490 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
41491 if test "${ac_cv_type_wchar_t+set}" = set; then
41492   echo $ECHO_N "(cached) $ECHO_C" >&6
41493 else
41494   cat >conftest.$ac_ext <<_ACEOF
41495 /* confdefs.h.  */
41496 _ACEOF
41497 cat confdefs.h >>conftest.$ac_ext
41498 cat >>conftest.$ac_ext <<_ACEOF
41499 /* end confdefs.h.  */
41500 $ac_includes_default
41501 int
41502 main ()
41503 {
41504 if ((wchar_t *) 0)
41505   return 0;
41506 if (sizeof (wchar_t))
41507   return 0;
41508   ;
41509   return 0;
41510 }
41511 _ACEOF
41512 rm -f conftest.$ac_objext
41513 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41514   (eval $ac_compile) 2>conftest.er1
41515   ac_status=$?
41516   grep -v '^ *+' conftest.er1 >conftest.err
41517   rm -f conftest.er1
41518   cat conftest.err >&5
41519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41520   (exit $ac_status); } &&
41521          { ac_try='test -z "$ac_c_werror_flag"
41522                          || test ! -s conftest.err'
41523   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41524   (eval $ac_try) 2>&5
41525   ac_status=$?
41526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41527   (exit $ac_status); }; } &&
41528          { ac_try='test -s conftest.$ac_objext'
41529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41530   (eval $ac_try) 2>&5
41531   ac_status=$?
41532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41533   (exit $ac_status); }; }; then
41534   ac_cv_type_wchar_t=yes
41535 else
41536   echo "$as_me: failed program was:" >&5
41537 sed 's/^/| /' conftest.$ac_ext >&5
41538
41539 ac_cv_type_wchar_t=no
41540 fi
41541 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41542 fi
41543 echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
41544 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
41545
41546 echo "$as_me:$LINENO: checking size of wchar_t" >&5
41547 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
41548 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
41549   echo $ECHO_N "(cached) $ECHO_C" >&6
41550 else
41551   if test "$ac_cv_type_wchar_t" = yes; then
41552   # The cast to unsigned long works around a bug in the HP C Compiler
41553   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41554   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41555   # This bug is HP SR number 8606223364.
41556   if test "$cross_compiling" = yes; then
41557   # Depending upon the size, compute the lo and hi bounds.
41558 cat >conftest.$ac_ext <<_ACEOF
41559 /* confdefs.h.  */
41560 _ACEOF
41561 cat confdefs.h >>conftest.$ac_ext
41562 cat >>conftest.$ac_ext <<_ACEOF
41563 /* end confdefs.h.  */
41564 $ac_includes_default
41565 int
41566 main ()
41567 {
41568 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
41569 test_array [0] = 0
41570
41571   ;
41572   return 0;
41573 }
41574 _ACEOF
41575 rm -f conftest.$ac_objext
41576 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41577   (eval $ac_compile) 2>conftest.er1
41578   ac_status=$?
41579   grep -v '^ *+' conftest.er1 >conftest.err
41580   rm -f conftest.er1
41581   cat conftest.err >&5
41582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41583   (exit $ac_status); } &&
41584          { ac_try='test -z "$ac_c_werror_flag"
41585                          || test ! -s conftest.err'
41586   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41587   (eval $ac_try) 2>&5
41588   ac_status=$?
41589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41590   (exit $ac_status); }; } &&
41591          { ac_try='test -s conftest.$ac_objext'
41592   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41593   (eval $ac_try) 2>&5
41594   ac_status=$?
41595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41596   (exit $ac_status); }; }; then
41597   ac_lo=0 ac_mid=0
41598   while :; do
41599     cat >conftest.$ac_ext <<_ACEOF
41600 /* confdefs.h.  */
41601 _ACEOF
41602 cat confdefs.h >>conftest.$ac_ext
41603 cat >>conftest.$ac_ext <<_ACEOF
41604 /* end confdefs.h.  */
41605 $ac_includes_default
41606 int
41607 main ()
41608 {
41609 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
41610 test_array [0] = 0
41611
41612   ;
41613   return 0;
41614 }
41615 _ACEOF
41616 rm -f conftest.$ac_objext
41617 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41618   (eval $ac_compile) 2>conftest.er1
41619   ac_status=$?
41620   grep -v '^ *+' conftest.er1 >conftest.err
41621   rm -f conftest.er1
41622   cat conftest.err >&5
41623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41624   (exit $ac_status); } &&
41625          { ac_try='test -z "$ac_c_werror_flag"
41626                          || test ! -s conftest.err'
41627   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41628   (eval $ac_try) 2>&5
41629   ac_status=$?
41630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41631   (exit $ac_status); }; } &&
41632          { ac_try='test -s conftest.$ac_objext'
41633   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41634   (eval $ac_try) 2>&5
41635   ac_status=$?
41636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41637   (exit $ac_status); }; }; then
41638   ac_hi=$ac_mid; break
41639 else
41640   echo "$as_me: failed program was:" >&5
41641 sed 's/^/| /' conftest.$ac_ext >&5
41642
41643 ac_lo=`expr $ac_mid + 1`
41644                     if test $ac_lo -le $ac_mid; then
41645                       ac_lo= ac_hi=
41646                       break
41647                     fi
41648                     ac_mid=`expr 2 '*' $ac_mid + 1`
41649 fi
41650 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41651   done
41652 else
41653   echo "$as_me: failed program was:" >&5
41654 sed 's/^/| /' conftest.$ac_ext >&5
41655
41656 cat >conftest.$ac_ext <<_ACEOF
41657 /* confdefs.h.  */
41658 _ACEOF
41659 cat confdefs.h >>conftest.$ac_ext
41660 cat >>conftest.$ac_ext <<_ACEOF
41661 /* end confdefs.h.  */
41662 $ac_includes_default
41663 int
41664 main ()
41665 {
41666 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
41667 test_array [0] = 0
41668
41669   ;
41670   return 0;
41671 }
41672 _ACEOF
41673 rm -f conftest.$ac_objext
41674 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41675   (eval $ac_compile) 2>conftest.er1
41676   ac_status=$?
41677   grep -v '^ *+' conftest.er1 >conftest.err
41678   rm -f conftest.er1
41679   cat conftest.err >&5
41680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41681   (exit $ac_status); } &&
41682          { ac_try='test -z "$ac_c_werror_flag"
41683                          || test ! -s conftest.err'
41684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41685   (eval $ac_try) 2>&5
41686   ac_status=$?
41687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41688   (exit $ac_status); }; } &&
41689          { ac_try='test -s conftest.$ac_objext'
41690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41691   (eval $ac_try) 2>&5
41692   ac_status=$?
41693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41694   (exit $ac_status); }; }; then
41695   ac_hi=-1 ac_mid=-1
41696   while :; do
41697     cat >conftest.$ac_ext <<_ACEOF
41698 /* confdefs.h.  */
41699 _ACEOF
41700 cat confdefs.h >>conftest.$ac_ext
41701 cat >>conftest.$ac_ext <<_ACEOF
41702 /* end confdefs.h.  */
41703 $ac_includes_default
41704 int
41705 main ()
41706 {
41707 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
41708 test_array [0] = 0
41709
41710   ;
41711   return 0;
41712 }
41713 _ACEOF
41714 rm -f conftest.$ac_objext
41715 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41716   (eval $ac_compile) 2>conftest.er1
41717   ac_status=$?
41718   grep -v '^ *+' conftest.er1 >conftest.err
41719   rm -f conftest.er1
41720   cat conftest.err >&5
41721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41722   (exit $ac_status); } &&
41723          { ac_try='test -z "$ac_c_werror_flag"
41724                          || test ! -s conftest.err'
41725   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41726   (eval $ac_try) 2>&5
41727   ac_status=$?
41728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41729   (exit $ac_status); }; } &&
41730          { ac_try='test -s conftest.$ac_objext'
41731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41732   (eval $ac_try) 2>&5
41733   ac_status=$?
41734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41735   (exit $ac_status); }; }; then
41736   ac_lo=$ac_mid; break
41737 else
41738   echo "$as_me: failed program was:" >&5
41739 sed 's/^/| /' conftest.$ac_ext >&5
41740
41741 ac_hi=`expr '(' $ac_mid ')' - 1`
41742                        if test $ac_mid -le $ac_hi; then
41743                          ac_lo= ac_hi=
41744                          break
41745                        fi
41746                        ac_mid=`expr 2 '*' $ac_mid`
41747 fi
41748 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41749   done
41750 else
41751   echo "$as_me: failed program was:" >&5
41752 sed 's/^/| /' conftest.$ac_ext >&5
41753
41754 ac_lo= ac_hi=
41755 fi
41756 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41757 fi
41758 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41759 # Binary search between lo and hi bounds.
41760 while test "x$ac_lo" != "x$ac_hi"; do
41761   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
41762   cat >conftest.$ac_ext <<_ACEOF
41763 /* confdefs.h.  */
41764 _ACEOF
41765 cat confdefs.h >>conftest.$ac_ext
41766 cat >>conftest.$ac_ext <<_ACEOF
41767 /* end confdefs.h.  */
41768 $ac_includes_default
41769 int
41770 main ()
41771 {
41772 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
41773 test_array [0] = 0
41774
41775   ;
41776   return 0;
41777 }
41778 _ACEOF
41779 rm -f conftest.$ac_objext
41780 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41781   (eval $ac_compile) 2>conftest.er1
41782   ac_status=$?
41783   grep -v '^ *+' conftest.er1 >conftest.err
41784   rm -f conftest.er1
41785   cat conftest.err >&5
41786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41787   (exit $ac_status); } &&
41788          { ac_try='test -z "$ac_c_werror_flag"
41789                          || test ! -s conftest.err'
41790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41791   (eval $ac_try) 2>&5
41792   ac_status=$?
41793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41794   (exit $ac_status); }; } &&
41795          { ac_try='test -s conftest.$ac_objext'
41796   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41797   (eval $ac_try) 2>&5
41798   ac_status=$?
41799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41800   (exit $ac_status); }; }; then
41801   ac_hi=$ac_mid
41802 else
41803   echo "$as_me: failed program was:" >&5
41804 sed 's/^/| /' conftest.$ac_ext >&5
41805
41806 ac_lo=`expr '(' $ac_mid ')' + 1`
41807 fi
41808 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41809 done
41810 case $ac_lo in
41811 ?*) ac_cv_sizeof_wchar_t=$ac_lo;;
41812 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
41813 See \`config.log' for more details." >&5
41814 echo "$as_me: error: cannot compute sizeof (wchar_t), 77
41815 See \`config.log' for more details." >&2;}
41816    { (exit 1); exit 1; }; } ;;
41817 esac
41818 else
41819   if test "$cross_compiling" = yes; then
41820   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
41821 See \`config.log' for more details." >&5
41822 echo "$as_me: error: cannot run test program while cross compiling
41823 See \`config.log' for more details." >&2;}
41824    { (exit 1); exit 1; }; }
41825 else
41826   cat >conftest.$ac_ext <<_ACEOF
41827 /* confdefs.h.  */
41828 _ACEOF
41829 cat confdefs.h >>conftest.$ac_ext
41830 cat >>conftest.$ac_ext <<_ACEOF
41831 /* end confdefs.h.  */
41832 $ac_includes_default
41833 long longval () { return (long) (sizeof (wchar_t)); }
41834 unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
41835 #include <stdio.h>
41836 #include <stdlib.h>
41837 int
41838 main ()
41839 {
41840
41841   FILE *f = fopen ("conftest.val", "w");
41842   if (! f)
41843     exit (1);
41844   if (((long) (sizeof (wchar_t))) < 0)
41845     {
41846       long i = longval ();
41847       if (i != ((long) (sizeof (wchar_t))))
41848         exit (1);
41849       fprintf (f, "%ld\n", i);
41850     }
41851   else
41852     {
41853       unsigned long i = ulongval ();
41854       if (i != ((long) (sizeof (wchar_t))))
41855         exit (1);
41856       fprintf (f, "%lu\n", i);
41857     }
41858   exit (ferror (f) || fclose (f) != 0);
41859
41860   ;
41861   return 0;
41862 }
41863 _ACEOF
41864 rm -f conftest$ac_exeext
41865 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
41866   (eval $ac_link) 2>&5
41867   ac_status=$?
41868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41869   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
41870   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41871   (eval $ac_try) 2>&5
41872   ac_status=$?
41873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41874   (exit $ac_status); }; }; then
41875   ac_cv_sizeof_wchar_t=`cat conftest.val`
41876 else
41877   echo "$as_me: program exited with status $ac_status" >&5
41878 echo "$as_me: failed program was:" >&5
41879 sed 's/^/| /' conftest.$ac_ext >&5
41880
41881 ( exit $ac_status )
41882 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
41883 See \`config.log' for more details." >&5
41884 echo "$as_me: error: cannot compute sizeof (wchar_t), 77
41885 See \`config.log' for more details." >&2;}
41886    { (exit 1); exit 1; }; }
41887 fi
41888 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
41889 fi
41890 fi
41891 rm -f conftest.val
41892 else
41893   ac_cv_sizeof_wchar_t=0
41894 fi
41895 fi
41896 echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
41897 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
41898 cat >>confdefs.h <<_ACEOF
41899 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
41900 _ACEOF
41901
41902
41903
41904 if test "$ac_cv_sizeof_int" -lt 4 ; then
41905         { echo "$as_me:$LINENO: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&5
41906 echo "$as_me: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&2;}
41907
41908
41909 cat >>confdefs.h <<\_ACEOF
41910 #define LBER_INT_T long
41911 _ACEOF
41912
41913 else
41914
41915 cat >>confdefs.h <<\_ACEOF
41916 #define LBER_INT_T int
41917 _ACEOF
41918
41919 fi
41920
41921
41922 cat >>confdefs.h <<\_ACEOF
41923 #define LBER_LEN_T long
41924 _ACEOF
41925
41926
41927 cat >>confdefs.h <<\_ACEOF
41928 #define LBER_SOCKET_T int
41929 _ACEOF
41930
41931
41932 cat >>confdefs.h <<\_ACEOF
41933 #define LBER_TAG_T long
41934 _ACEOF
41935
41936
41937 if test $ol_with_mp = longlong || test $ol_with_mp = auto ; then
41938         if test $ac_cv_sizeof_long_long -gt 4 ; then
41939                 ol_with_mp=longlong
41940
41941 cat >>confdefs.h <<\_ACEOF
41942 #define USE_MP_LONG_LONG 1
41943 _ACEOF
41944
41945         elif test $ol_with_mp = longlong ; then
41946                 { { echo "$as_me:$LINENO: error: long long unusable for multiple precision" >&5
41947 echo "$as_me: error: long long unusable for multiple precision" >&2;}
41948    { (exit 1); exit 1; }; }
41949         fi
41950 fi
41951 if test $ol_with_mp = long || test $ol_with_mp = auto ; then
41952         if test $ac_cv_sizeof_long -gt 4 ; then
41953                 ol_with_mp=long
41954
41955 cat >>confdefs.h <<\_ACEOF
41956 #define USE_MP_LONG 1
41957 _ACEOF
41958
41959         elif test $ol_with_mp = long ; then
41960                 { { echo "$as_me:$LINENO: error: long unusable for multiple precision" >&5
41961 echo "$as_me: error: long unusable for multiple precision" >&2;}
41962    { (exit 1); exit 1; }; }
41963         fi
41964 fi
41965 if test $ol_with_mp = bignum || test $ol_with_mp = auto ; then
41966
41967 for ac_header in openssl/bn.h
41968 do
41969 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
41970 if eval "test \"\${$as_ac_Header+set}\" = set"; then
41971   echo "$as_me:$LINENO: checking for $ac_header" >&5
41972 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
41973 if eval "test \"\${$as_ac_Header+set}\" = set"; then
41974   echo $ECHO_N "(cached) $ECHO_C" >&6
41975 fi
41976 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
41977 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
41978 else
41979   # Is the header compilable?
41980 echo "$as_me:$LINENO: checking $ac_header usability" >&5
41981 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
41982 cat >conftest.$ac_ext <<_ACEOF
41983 /* confdefs.h.  */
41984 _ACEOF
41985 cat confdefs.h >>conftest.$ac_ext
41986 cat >>conftest.$ac_ext <<_ACEOF
41987 /* end confdefs.h.  */
41988 $ac_includes_default
41989 #include <$ac_header>
41990 _ACEOF
41991 rm -f conftest.$ac_objext
41992 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41993   (eval $ac_compile) 2>conftest.er1
41994   ac_status=$?
41995   grep -v '^ *+' conftest.er1 >conftest.err
41996   rm -f conftest.er1
41997   cat conftest.err >&5
41998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41999   (exit $ac_status); } &&
42000          { ac_try='test -z "$ac_c_werror_flag"
42001                          || test ! -s conftest.err'
42002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42003   (eval $ac_try) 2>&5
42004   ac_status=$?
42005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42006   (exit $ac_status); }; } &&
42007          { ac_try='test -s conftest.$ac_objext'
42008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42009   (eval $ac_try) 2>&5
42010   ac_status=$?
42011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42012   (exit $ac_status); }; }; then
42013   ac_header_compiler=yes
42014 else
42015   echo "$as_me: failed program was:" >&5
42016 sed 's/^/| /' conftest.$ac_ext >&5
42017
42018 ac_header_compiler=no
42019 fi
42020 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42021 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
42022 echo "${ECHO_T}$ac_header_compiler" >&6
42023
42024 # Is the header present?
42025 echo "$as_me:$LINENO: checking $ac_header presence" >&5
42026 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
42027 cat >conftest.$ac_ext <<_ACEOF
42028 /* confdefs.h.  */
42029 _ACEOF
42030 cat confdefs.h >>conftest.$ac_ext
42031 cat >>conftest.$ac_ext <<_ACEOF
42032 /* end confdefs.h.  */
42033 #include <$ac_header>
42034 _ACEOF
42035 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
42036   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
42037   ac_status=$?
42038   grep -v '^ *+' conftest.er1 >conftest.err
42039   rm -f conftest.er1
42040   cat conftest.err >&5
42041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42042   (exit $ac_status); } >/dev/null; then
42043   if test -s conftest.err; then
42044     ac_cpp_err=$ac_c_preproc_warn_flag
42045     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
42046   else
42047     ac_cpp_err=
42048   fi
42049 else
42050   ac_cpp_err=yes
42051 fi
42052 if test -z "$ac_cpp_err"; then
42053   ac_header_preproc=yes
42054 else
42055   echo "$as_me: failed program was:" >&5
42056 sed 's/^/| /' conftest.$ac_ext >&5
42057
42058   ac_header_preproc=no
42059 fi
42060 rm -f conftest.err conftest.$ac_ext
42061 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
42062 echo "${ECHO_T}$ac_header_preproc" >&6
42063
42064 # So?  What about this header?
42065 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
42066   yes:no: )
42067     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
42068 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
42069     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
42070 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
42071     ac_header_preproc=yes
42072     ;;
42073   no:yes:* )
42074     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
42075 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
42076     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
42077 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
42078     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
42079 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
42080     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
42081 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
42082     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
42083 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
42084     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
42085 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
42086     (
42087       cat <<\_ASBOX
42088 ## --------------------------------------------- ##
42089 ## Report this to <http://www.openldap.org/its/> ##
42090 ## --------------------------------------------- ##
42091 _ASBOX
42092     ) |
42093       sed "s/^/$as_me: WARNING:     /" >&2
42094     ;;
42095 esac
42096 echo "$as_me:$LINENO: checking for $ac_header" >&5
42097 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
42098 if eval "test \"\${$as_ac_Header+set}\" = set"; then
42099   echo $ECHO_N "(cached) $ECHO_C" >&6
42100 else
42101   eval "$as_ac_Header=\$ac_header_preproc"
42102 fi
42103 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
42104 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
42105
42106 fi
42107 if test `eval echo '${'$as_ac_Header'}'` = yes; then
42108   cat >>confdefs.h <<_ACEOF
42109 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
42110 _ACEOF
42111
42112 fi
42113
42114 done
42115
42116
42117 for ac_header in openssl/crypto.h
42118 do
42119 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
42120 if eval "test \"\${$as_ac_Header+set}\" = set"; then
42121   echo "$as_me:$LINENO: checking for $ac_header" >&5
42122 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
42123 if eval "test \"\${$as_ac_Header+set}\" = set"; then
42124   echo $ECHO_N "(cached) $ECHO_C" >&6
42125 fi
42126 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
42127 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
42128 else
42129   # Is the header compilable?
42130 echo "$as_me:$LINENO: checking $ac_header usability" >&5
42131 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
42132 cat >conftest.$ac_ext <<_ACEOF
42133 /* confdefs.h.  */
42134 _ACEOF
42135 cat confdefs.h >>conftest.$ac_ext
42136 cat >>conftest.$ac_ext <<_ACEOF
42137 /* end confdefs.h.  */
42138 $ac_includes_default
42139 #include <$ac_header>
42140 _ACEOF
42141 rm -f conftest.$ac_objext
42142 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42143   (eval $ac_compile) 2>conftest.er1
42144   ac_status=$?
42145   grep -v '^ *+' conftest.er1 >conftest.err
42146   rm -f conftest.er1
42147   cat conftest.err >&5
42148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42149   (exit $ac_status); } &&
42150          { ac_try='test -z "$ac_c_werror_flag"
42151                          || test ! -s conftest.err'
42152   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42153   (eval $ac_try) 2>&5
42154   ac_status=$?
42155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42156   (exit $ac_status); }; } &&
42157          { ac_try='test -s conftest.$ac_objext'
42158   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42159   (eval $ac_try) 2>&5
42160   ac_status=$?
42161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42162   (exit $ac_status); }; }; then
42163   ac_header_compiler=yes
42164 else
42165   echo "$as_me: failed program was:" >&5
42166 sed 's/^/| /' conftest.$ac_ext >&5
42167
42168 ac_header_compiler=no
42169 fi
42170 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42171 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
42172 echo "${ECHO_T}$ac_header_compiler" >&6
42173
42174 # Is the header present?
42175 echo "$as_me:$LINENO: checking $ac_header presence" >&5
42176 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
42177 cat >conftest.$ac_ext <<_ACEOF
42178 /* confdefs.h.  */
42179 _ACEOF
42180 cat confdefs.h >>conftest.$ac_ext
42181 cat >>conftest.$ac_ext <<_ACEOF
42182 /* end confdefs.h.  */
42183 #include <$ac_header>
42184 _ACEOF
42185 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
42186   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
42187   ac_status=$?
42188   grep -v '^ *+' conftest.er1 >conftest.err
42189   rm -f conftest.er1
42190   cat conftest.err >&5
42191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42192   (exit $ac_status); } >/dev/null; then
42193   if test -s conftest.err; then
42194     ac_cpp_err=$ac_c_preproc_warn_flag
42195     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
42196   else
42197     ac_cpp_err=
42198   fi
42199 else
42200   ac_cpp_err=yes
42201 fi
42202 if test -z "$ac_cpp_err"; then
42203   ac_header_preproc=yes
42204 else
42205   echo "$as_me: failed program was:" >&5
42206 sed 's/^/| /' conftest.$ac_ext >&5
42207
42208   ac_header_preproc=no
42209 fi
42210 rm -f conftest.err conftest.$ac_ext
42211 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
42212 echo "${ECHO_T}$ac_header_preproc" >&6
42213
42214 # So?  What about this header?
42215 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
42216   yes:no: )
42217     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
42218 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
42219     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
42220 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
42221     ac_header_preproc=yes
42222     ;;
42223   no:yes:* )
42224     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
42225 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
42226     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
42227 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
42228     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
42229 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
42230     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
42231 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
42232     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
42233 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
42234     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
42235 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
42236     (
42237       cat <<\_ASBOX
42238 ## --------------------------------------------- ##
42239 ## Report this to <http://www.openldap.org/its/> ##
42240 ## --------------------------------------------- ##
42241 _ASBOX
42242     ) |
42243       sed "s/^/$as_me: WARNING:     /" >&2
42244     ;;
42245 esac
42246 echo "$as_me:$LINENO: checking for $ac_header" >&5
42247 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
42248 if eval "test \"\${$as_ac_Header+set}\" = set"; then
42249   echo $ECHO_N "(cached) $ECHO_C" >&6
42250 else
42251   eval "$as_ac_Header=\$ac_header_preproc"
42252 fi
42253 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
42254 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
42255
42256 fi
42257 if test `eval echo '${'$as_ac_Header'}'` = yes; then
42258   cat >>confdefs.h <<_ACEOF
42259 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
42260 _ACEOF
42261
42262 fi
42263
42264 done
42265
42266         if test "$ac_cv_header_openssl_bn_h" = "yes" &&
42267                 test "$ac_cv_header_openssl_crypto_h" = "yes" &&
42268                 test "$ol_with_tls" = "found" ; then
42269                 ol_with_mp=bignum
42270
42271 cat >>confdefs.h <<\_ACEOF
42272 #define USE_MP_BIGNUM 1
42273 _ACEOF
42274
42275         elif test $ol_with_mp = bignum ; then
42276                 { { echo "$as_me:$LINENO: error: bignum not available" >&5
42277 echo "$as_me: error: bignum not available" >&2;}
42278    { (exit 1); exit 1; }; }
42279         fi
42280 fi
42281 if test $ol_with_mp = gmp || test $ol_with_mp = auto ; then
42282
42283 for ac_header in gmp.h
42284 do
42285 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
42286 if eval "test \"\${$as_ac_Header+set}\" = set"; then
42287   echo "$as_me:$LINENO: checking for $ac_header" >&5
42288 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
42289 if eval "test \"\${$as_ac_Header+set}\" = set"; then
42290   echo $ECHO_N "(cached) $ECHO_C" >&6
42291 fi
42292 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
42293 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
42294 else
42295   # Is the header compilable?
42296 echo "$as_me:$LINENO: checking $ac_header usability" >&5
42297 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
42298 cat >conftest.$ac_ext <<_ACEOF
42299 /* confdefs.h.  */
42300 _ACEOF
42301 cat confdefs.h >>conftest.$ac_ext
42302 cat >>conftest.$ac_ext <<_ACEOF
42303 /* end confdefs.h.  */
42304 $ac_includes_default
42305 #include <$ac_header>
42306 _ACEOF
42307 rm -f conftest.$ac_objext
42308 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42309   (eval $ac_compile) 2>conftest.er1
42310   ac_status=$?
42311   grep -v '^ *+' conftest.er1 >conftest.err
42312   rm -f conftest.er1
42313   cat conftest.err >&5
42314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42315   (exit $ac_status); } &&
42316          { ac_try='test -z "$ac_c_werror_flag"
42317                          || test ! -s conftest.err'
42318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42319   (eval $ac_try) 2>&5
42320   ac_status=$?
42321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42322   (exit $ac_status); }; } &&
42323          { ac_try='test -s conftest.$ac_objext'
42324   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42325   (eval $ac_try) 2>&5
42326   ac_status=$?
42327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42328   (exit $ac_status); }; }; then
42329   ac_header_compiler=yes
42330 else
42331   echo "$as_me: failed program was:" >&5
42332 sed 's/^/| /' conftest.$ac_ext >&5
42333
42334 ac_header_compiler=no
42335 fi
42336 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42337 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
42338 echo "${ECHO_T}$ac_header_compiler" >&6
42339
42340 # Is the header present?
42341 echo "$as_me:$LINENO: checking $ac_header presence" >&5
42342 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
42343 cat >conftest.$ac_ext <<_ACEOF
42344 /* confdefs.h.  */
42345 _ACEOF
42346 cat confdefs.h >>conftest.$ac_ext
42347 cat >>conftest.$ac_ext <<_ACEOF
42348 /* end confdefs.h.  */
42349 #include <$ac_header>
42350 _ACEOF
42351 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
42352   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
42353   ac_status=$?
42354   grep -v '^ *+' conftest.er1 >conftest.err
42355   rm -f conftest.er1
42356   cat conftest.err >&5
42357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42358   (exit $ac_status); } >/dev/null; then
42359   if test -s conftest.err; then
42360     ac_cpp_err=$ac_c_preproc_warn_flag
42361     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
42362   else
42363     ac_cpp_err=
42364   fi
42365 else
42366   ac_cpp_err=yes
42367 fi
42368 if test -z "$ac_cpp_err"; then
42369   ac_header_preproc=yes
42370 else
42371   echo "$as_me: failed program was:" >&5
42372 sed 's/^/| /' conftest.$ac_ext >&5
42373
42374   ac_header_preproc=no
42375 fi
42376 rm -f conftest.err conftest.$ac_ext
42377 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
42378 echo "${ECHO_T}$ac_header_preproc" >&6
42379
42380 # So?  What about this header?
42381 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
42382   yes:no: )
42383     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
42384 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
42385     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
42386 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
42387     ac_header_preproc=yes
42388     ;;
42389   no:yes:* )
42390     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
42391 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
42392     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
42393 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
42394     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
42395 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
42396     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
42397 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
42398     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
42399 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
42400     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
42401 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
42402     (
42403       cat <<\_ASBOX
42404 ## --------------------------------------------- ##
42405 ## Report this to <http://www.openldap.org/its/> ##
42406 ## --------------------------------------------- ##
42407 _ASBOX
42408     ) |
42409       sed "s/^/$as_me: WARNING:     /" >&2
42410     ;;
42411 esac
42412 echo "$as_me:$LINENO: checking for $ac_header" >&5
42413 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
42414 if eval "test \"\${$as_ac_Header+set}\" = set"; then
42415   echo $ECHO_N "(cached) $ECHO_C" >&6
42416 else
42417   eval "$as_ac_Header=\$ac_header_preproc"
42418 fi
42419 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
42420 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
42421
42422 fi
42423 if test `eval echo '${'$as_ac_Header'}'` = yes; then
42424   cat >>confdefs.h <<_ACEOF
42425 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
42426 _ACEOF
42427
42428 fi
42429
42430 done
42431
42432
42433 echo "$as_me:$LINENO: checking for __gmpz_add_ui in -lgmp" >&5
42434 echo $ECHO_N "checking for __gmpz_add_ui in -lgmp... $ECHO_C" >&6
42435 if test "${ac_cv_lib_gmp___gmpz_add_ui+set}" = set; then
42436   echo $ECHO_N "(cached) $ECHO_C" >&6
42437 else
42438   ac_check_lib_save_LIBS=$LIBS
42439 LIBS="-lgmp  $LIBS"
42440 cat >conftest.$ac_ext <<_ACEOF
42441 /* confdefs.h.  */
42442 _ACEOF
42443 cat confdefs.h >>conftest.$ac_ext
42444 cat >>conftest.$ac_ext <<_ACEOF
42445 /* end confdefs.h.  */
42446
42447 /* Override any gcc2 internal prototype to avoid an error.  */
42448 #ifdef __cplusplus
42449 extern "C"
42450 #endif
42451 /* We use char because int might match the return type of a gcc2
42452    builtin and then its argument prototype would still apply.  */
42453 char __gmpz_add_ui ();
42454 int
42455 main ()
42456 {
42457 __gmpz_add_ui ();
42458   ;
42459   return 0;
42460 }
42461 _ACEOF
42462 rm -f conftest.$ac_objext conftest$ac_exeext
42463 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42464   (eval $ac_link) 2>conftest.er1
42465   ac_status=$?
42466   grep -v '^ *+' conftest.er1 >conftest.err
42467   rm -f conftest.er1
42468   cat conftest.err >&5
42469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42470   (exit $ac_status); } &&
42471          { ac_try='test -z "$ac_c_werror_flag"
42472                          || test ! -s conftest.err'
42473   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42474   (eval $ac_try) 2>&5
42475   ac_status=$?
42476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42477   (exit $ac_status); }; } &&
42478          { ac_try='test -s conftest$ac_exeext'
42479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42480   (eval $ac_try) 2>&5
42481   ac_status=$?
42482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42483   (exit $ac_status); }; }; then
42484   ac_cv_lib_gmp___gmpz_add_ui=yes
42485 else
42486   echo "$as_me: failed program was:" >&5
42487 sed 's/^/| /' conftest.$ac_ext >&5
42488
42489 ac_cv_lib_gmp___gmpz_add_ui=no
42490 fi
42491 rm -f conftest.err conftest.$ac_objext \
42492       conftest$ac_exeext conftest.$ac_ext
42493 LIBS=$ac_check_lib_save_LIBS
42494 fi
42495 echo "$as_me:$LINENO: result: $ac_cv_lib_gmp___gmpz_add_ui" >&5
42496 echo "${ECHO_T}$ac_cv_lib_gmp___gmpz_add_ui" >&6
42497 if test $ac_cv_lib_gmp___gmpz_add_ui = yes; then
42498   cat >>confdefs.h <<_ACEOF
42499 #define HAVE_LIBGMP 1
42500 _ACEOF
42501
42502   LIBS="-lgmp $LIBS"
42503
42504 fi
42505
42506         if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp___gmpz_add_ui = yes ; then
42507
42508 cat >>confdefs.h <<\_ACEOF
42509 #define USE_MP_GMP 1
42510 _ACEOF
42511
42512                 ol_with_mp=gmp
42513         elif test $ol_with_mp = gmp ; then
42514                 { { echo "$as_me:$LINENO: error: gmp not available" >&5
42515 echo "$as_me: error: gmp not available" >&2;}
42516    { (exit 1); exit 1; }; }
42517         fi
42518 fi
42519 if test $ol_with_mp = auto ; then
42520         ol_with_mp=no
42521 fi
42522
42523 echo "$as_me:$LINENO: checking for working memcmp" >&5
42524 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
42525 if test "${ac_cv_func_memcmp_working+set}" = set; then
42526   echo $ECHO_N "(cached) $ECHO_C" >&6
42527 else
42528   if test "$cross_compiling" = yes; then
42529   ac_cv_func_memcmp_working=no
42530 else
42531   cat >conftest.$ac_ext <<_ACEOF
42532 /* confdefs.h.  */
42533 _ACEOF
42534 cat confdefs.h >>conftest.$ac_ext
42535 cat >>conftest.$ac_ext <<_ACEOF
42536 /* end confdefs.h.  */
42537 $ac_includes_default
42538 int
42539 main ()
42540 {
42541
42542   /* Some versions of memcmp are not 8-bit clean.  */
42543   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
42544   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
42545     exit (1);
42546
42547   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
42548      or more and with at least one buffer not starting on a 4-byte boundary.
42549      William Lewis provided this test program.   */
42550   {
42551     char foo[21];
42552     char bar[21];
42553     int i;
42554     for (i = 0; i < 4; i++)
42555       {
42556         char *a = foo + i;
42557         char *b = bar + i;
42558         strcpy (a, "--------01111111");
42559         strcpy (b, "--------10000000");
42560         if (memcmp (a, b, 16) >= 0)
42561           exit (1);
42562       }
42563     exit (0);
42564   }
42565
42566   ;
42567   return 0;
42568 }
42569 _ACEOF
42570 rm -f conftest$ac_exeext
42571 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42572   (eval $ac_link) 2>&5
42573   ac_status=$?
42574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42575   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
42576   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42577   (eval $ac_try) 2>&5
42578   ac_status=$?
42579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42580   (exit $ac_status); }; }; then
42581   ac_cv_func_memcmp_working=yes
42582 else
42583   echo "$as_me: program exited with status $ac_status" >&5
42584 echo "$as_me: failed program was:" >&5
42585 sed 's/^/| /' conftest.$ac_ext >&5
42586
42587 ( exit $ac_status )
42588 ac_cv_func_memcmp_working=no
42589 fi
42590 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
42591 fi
42592 fi
42593 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
42594 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
42595 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
42596     "memcmp.$ac_objext"   | \
42597   *" memcmp.$ac_objext"   | \
42598     "memcmp.$ac_objext "* | \
42599   *" memcmp.$ac_objext "* ) ;;
42600   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
42601 esac
42602
42603
42604
42605 if test $ac_cv_func_memcmp_working = no ; then
42606
42607 cat >>confdefs.h <<\_ACEOF
42608 #define NEED_MEMCMP_REPLACEMENT 1
42609 _ACEOF
42610
42611 fi
42612
42613
42614 for ac_func in strftime
42615 do
42616 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
42617 echo "$as_me:$LINENO: checking for $ac_func" >&5
42618 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
42619 if eval "test \"\${$as_ac_var+set}\" = set"; then
42620   echo $ECHO_N "(cached) $ECHO_C" >&6
42621 else
42622   cat >conftest.$ac_ext <<_ACEOF
42623 /* confdefs.h.  */
42624 _ACEOF
42625 cat confdefs.h >>conftest.$ac_ext
42626 cat >>conftest.$ac_ext <<_ACEOF
42627 /* end confdefs.h.  */
42628 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
42629    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
42630 #define $ac_func innocuous_$ac_func
42631
42632 /* System header to define __stub macros and hopefully few prototypes,
42633     which can conflict with char $ac_func (); below.
42634     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
42635     <limits.h> exists even on freestanding compilers.  */
42636
42637 #ifdef __STDC__
42638 # include <limits.h>
42639 #else
42640 # include <assert.h>
42641 #endif
42642
42643 #undef $ac_func
42644
42645 /* Override any gcc2 internal prototype to avoid an error.  */
42646 #ifdef __cplusplus
42647 extern "C"
42648 {
42649 #endif
42650 /* We use char because int might match the return type of a gcc2
42651    builtin and then its argument prototype would still apply.  */
42652 char $ac_func ();
42653 /* The GNU C library defines this for functions which it implements
42654     to always fail with ENOSYS.  Some functions are actually named
42655     something starting with __ and the normal name is an alias.  */
42656 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
42657 choke me
42658 #else
42659 char (*f) () = $ac_func;
42660 #endif
42661 #ifdef __cplusplus
42662 }
42663 #endif
42664
42665 int
42666 main ()
42667 {
42668 return f != $ac_func;
42669   ;
42670   return 0;
42671 }
42672 _ACEOF
42673 rm -f conftest.$ac_objext conftest$ac_exeext
42674 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42675   (eval $ac_link) 2>conftest.er1
42676   ac_status=$?
42677   grep -v '^ *+' conftest.er1 >conftest.err
42678   rm -f conftest.er1
42679   cat conftest.err >&5
42680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42681   (exit $ac_status); } &&
42682          { ac_try='test -z "$ac_c_werror_flag"
42683                          || test ! -s conftest.err'
42684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42685   (eval $ac_try) 2>&5
42686   ac_status=$?
42687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42688   (exit $ac_status); }; } &&
42689          { ac_try='test -s conftest$ac_exeext'
42690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42691   (eval $ac_try) 2>&5
42692   ac_status=$?
42693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42694   (exit $ac_status); }; }; then
42695   eval "$as_ac_var=yes"
42696 else
42697   echo "$as_me: failed program was:" >&5
42698 sed 's/^/| /' conftest.$ac_ext >&5
42699
42700 eval "$as_ac_var=no"
42701 fi
42702 rm -f conftest.err conftest.$ac_objext \
42703       conftest$ac_exeext conftest.$ac_ext
42704 fi
42705 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
42706 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
42707 if test `eval echo '${'$as_ac_var'}'` = yes; then
42708   cat >>confdefs.h <<_ACEOF
42709 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
42710 _ACEOF
42711
42712 else
42713   # strftime is in -lintl on SCO UNIX.
42714 echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
42715 echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
42716 if test "${ac_cv_lib_intl_strftime+set}" = set; then
42717   echo $ECHO_N "(cached) $ECHO_C" >&6
42718 else
42719   ac_check_lib_save_LIBS=$LIBS
42720 LIBS="-lintl  $LIBS"
42721 cat >conftest.$ac_ext <<_ACEOF
42722 /* confdefs.h.  */
42723 _ACEOF
42724 cat confdefs.h >>conftest.$ac_ext
42725 cat >>conftest.$ac_ext <<_ACEOF
42726 /* end confdefs.h.  */
42727
42728 /* Override any gcc2 internal prototype to avoid an error.  */
42729 #ifdef __cplusplus
42730 extern "C"
42731 #endif
42732 /* We use char because int might match the return type of a gcc2
42733    builtin and then its argument prototype would still apply.  */
42734 char strftime ();
42735 int
42736 main ()
42737 {
42738 strftime ();
42739   ;
42740   return 0;
42741 }
42742 _ACEOF
42743 rm -f conftest.$ac_objext conftest$ac_exeext
42744 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42745   (eval $ac_link) 2>conftest.er1
42746   ac_status=$?
42747   grep -v '^ *+' conftest.er1 >conftest.err
42748   rm -f conftest.er1
42749   cat conftest.err >&5
42750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42751   (exit $ac_status); } &&
42752          { ac_try='test -z "$ac_c_werror_flag"
42753                          || test ! -s conftest.err'
42754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42755   (eval $ac_try) 2>&5
42756   ac_status=$?
42757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42758   (exit $ac_status); }; } &&
42759          { ac_try='test -s conftest$ac_exeext'
42760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42761   (eval $ac_try) 2>&5
42762   ac_status=$?
42763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42764   (exit $ac_status); }; }; then
42765   ac_cv_lib_intl_strftime=yes
42766 else
42767   echo "$as_me: failed program was:" >&5
42768 sed 's/^/| /' conftest.$ac_ext >&5
42769
42770 ac_cv_lib_intl_strftime=no
42771 fi
42772 rm -f conftest.err conftest.$ac_objext \
42773       conftest$ac_exeext conftest.$ac_ext
42774 LIBS=$ac_check_lib_save_LIBS
42775 fi
42776 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
42777 echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
42778 if test $ac_cv_lib_intl_strftime = yes; then
42779   cat >>confdefs.h <<\_ACEOF
42780 #define HAVE_STRFTIME 1
42781 _ACEOF
42782
42783 LIBS="-lintl $LIBS"
42784 fi
42785
42786 fi
42787 done
42788
42789
42790 echo "$as_me:$LINENO: checking for inet_aton()" >&5
42791 echo $ECHO_N "checking for inet_aton()... $ECHO_C" >&6
42792 if test "${ol_cv_func_inet_aton+set}" = set; then
42793   echo $ECHO_N "(cached) $ECHO_C" >&6
42794 else
42795   cat >conftest.$ac_ext <<_ACEOF
42796 /* confdefs.h.  */
42797 _ACEOF
42798 cat confdefs.h >>conftest.$ac_ext
42799 cat >>conftest.$ac_ext <<_ACEOF
42800 /* end confdefs.h.  */
42801
42802 #ifdef HAVE_SYS_TYPES_H
42803 #       include <sys/types.h>
42804 #endif
42805 #ifdef HAVE_SYS_SOCKET_H
42806 #       include <sys/socket.h>
42807 #       ifdef HAVE_SYS_SELECT_H
42808 #               include <sys/select.h>
42809 #       endif
42810 #       include <netinet/in.h>
42811 #       ifdef HAVE_ARPA_INET_H
42812 #               include <arpa/inet.h>
42813 #       endif
42814 #endif
42815
42816 int
42817 main ()
42818 {
42819 struct in_addr in;
42820 int rc = inet_aton( "255.255.255.255", &in );
42821   ;
42822   return 0;
42823 }
42824 _ACEOF
42825 rm -f conftest.$ac_objext conftest$ac_exeext
42826 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42827   (eval $ac_link) 2>conftest.er1
42828   ac_status=$?
42829   grep -v '^ *+' conftest.er1 >conftest.err
42830   rm -f conftest.er1
42831   cat conftest.err >&5
42832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42833   (exit $ac_status); } &&
42834          { ac_try='test -z "$ac_c_werror_flag"
42835                          || test ! -s conftest.err'
42836   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42837   (eval $ac_try) 2>&5
42838   ac_status=$?
42839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42840   (exit $ac_status); }; } &&
42841          { ac_try='test -s conftest$ac_exeext'
42842   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42843   (eval $ac_try) 2>&5
42844   ac_status=$?
42845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42846   (exit $ac_status); }; }; then
42847   ol_cv_func_inet_aton=yes
42848 else
42849   echo "$as_me: failed program was:" >&5
42850 sed 's/^/| /' conftest.$ac_ext >&5
42851
42852 ol_cv_func_inet_aton=no
42853 fi
42854 rm -f conftest.err conftest.$ac_objext \
42855       conftest$ac_exeext conftest.$ac_ext
42856 fi
42857 echo "$as_me:$LINENO: result: $ol_cv_func_inet_aton" >&5
42858 echo "${ECHO_T}$ol_cv_func_inet_aton" >&6
42859   if test $ol_cv_func_inet_aton != no; then
42860
42861 cat >>confdefs.h <<\_ACEOF
42862 #define HAVE_INET_ATON 1
42863 _ACEOF
42864
42865   fi
42866
42867
42868 echo "$as_me:$LINENO: checking for _spawnlp" >&5
42869 echo $ECHO_N "checking for _spawnlp... $ECHO_C" >&6
42870 if test "${ac_cv_func__spawnlp+set}" = set; then
42871   echo $ECHO_N "(cached) $ECHO_C" >&6
42872 else
42873   cat >conftest.$ac_ext <<_ACEOF
42874 /* confdefs.h.  */
42875 _ACEOF
42876 cat confdefs.h >>conftest.$ac_ext
42877 cat >>conftest.$ac_ext <<_ACEOF
42878 /* end confdefs.h.  */
42879 /* Define _spawnlp to an innocuous variant, in case <limits.h> declares _spawnlp.
42880    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
42881 #define _spawnlp innocuous__spawnlp
42882
42883 /* System header to define __stub macros and hopefully few prototypes,
42884     which can conflict with char _spawnlp (); below.
42885     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
42886     <limits.h> exists even on freestanding compilers.  */
42887
42888 #ifdef __STDC__
42889 # include <limits.h>
42890 #else
42891 # include <assert.h>
42892 #endif
42893
42894 #undef _spawnlp
42895
42896 /* Override any gcc2 internal prototype to avoid an error.  */
42897 #ifdef __cplusplus
42898 extern "C"
42899 {
42900 #endif
42901 /* We use char because int might match the return type of a gcc2
42902    builtin and then its argument prototype would still apply.  */
42903 char _spawnlp ();
42904 /* The GNU C library defines this for functions which it implements
42905     to always fail with ENOSYS.  Some functions are actually named
42906     something starting with __ and the normal name is an alias.  */
42907 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
42908 choke me
42909 #else
42910 char (*f) () = _spawnlp;
42911 #endif
42912 #ifdef __cplusplus
42913 }
42914 #endif
42915
42916 int
42917 main ()
42918 {
42919 return f != _spawnlp;
42920   ;
42921   return 0;
42922 }
42923 _ACEOF
42924 rm -f conftest.$ac_objext conftest$ac_exeext
42925 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42926   (eval $ac_link) 2>conftest.er1
42927   ac_status=$?
42928   grep -v '^ *+' conftest.er1 >conftest.err
42929   rm -f conftest.er1
42930   cat conftest.err >&5
42931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42932   (exit $ac_status); } &&
42933          { ac_try='test -z "$ac_c_werror_flag"
42934                          || test ! -s conftest.err'
42935   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42936   (eval $ac_try) 2>&5
42937   ac_status=$?
42938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42939   (exit $ac_status); }; } &&
42940          { ac_try='test -s conftest$ac_exeext'
42941   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42942   (eval $ac_try) 2>&5
42943   ac_status=$?
42944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42945   (exit $ac_status); }; }; then
42946   ac_cv_func__spawnlp=yes
42947 else
42948   echo "$as_me: failed program was:" >&5
42949 sed 's/^/| /' conftest.$ac_ext >&5
42950
42951 ac_cv_func__spawnlp=no
42952 fi
42953 rm -f conftest.err conftest.$ac_objext \
42954       conftest$ac_exeext conftest.$ac_ext
42955 fi
42956 echo "$as_me:$LINENO: result: $ac_cv_func__spawnlp" >&5
42957 echo "${ECHO_T}$ac_cv_func__spawnlp" >&6
42958 if test $ac_cv_func__spawnlp = yes; then
42959
42960 cat >>confdefs.h <<\_ACEOF
42961 #define HAVE_SPAWNLP 1
42962 _ACEOF
42963
42964 fi
42965
42966
42967 echo "$as_me:$LINENO: checking for _snprintf" >&5
42968 echo $ECHO_N "checking for _snprintf... $ECHO_C" >&6
42969 if test "${ac_cv_func__snprintf+set}" = set; then
42970   echo $ECHO_N "(cached) $ECHO_C" >&6
42971 else
42972   cat >conftest.$ac_ext <<_ACEOF
42973 /* confdefs.h.  */
42974 _ACEOF
42975 cat confdefs.h >>conftest.$ac_ext
42976 cat >>conftest.$ac_ext <<_ACEOF
42977 /* end confdefs.h.  */
42978 /* Define _snprintf to an innocuous variant, in case <limits.h> declares _snprintf.
42979    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
42980 #define _snprintf innocuous__snprintf
42981
42982 /* System header to define __stub macros and hopefully few prototypes,
42983     which can conflict with char _snprintf (); below.
42984     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
42985     <limits.h> exists even on freestanding compilers.  */
42986
42987 #ifdef __STDC__
42988 # include <limits.h>
42989 #else
42990 # include <assert.h>
42991 #endif
42992
42993 #undef _snprintf
42994
42995 /* Override any gcc2 internal prototype to avoid an error.  */
42996 #ifdef __cplusplus
42997 extern "C"
42998 {
42999 #endif
43000 /* We use char because int might match the return type of a gcc2
43001    builtin and then its argument prototype would still apply.  */
43002 char _snprintf ();
43003 /* The GNU C library defines this for functions which it implements
43004     to always fail with ENOSYS.  Some functions are actually named
43005     something starting with __ and the normal name is an alias.  */
43006 #if defined (__stub__snprintf) || defined (__stub____snprintf)
43007 choke me
43008 #else
43009 char (*f) () = _snprintf;
43010 #endif
43011 #ifdef __cplusplus
43012 }
43013 #endif
43014
43015 int
43016 main ()
43017 {
43018 return f != _snprintf;
43019   ;
43020   return 0;
43021 }
43022 _ACEOF
43023 rm -f conftest.$ac_objext conftest$ac_exeext
43024 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43025   (eval $ac_link) 2>conftest.er1
43026   ac_status=$?
43027   grep -v '^ *+' conftest.er1 >conftest.err
43028   rm -f conftest.er1
43029   cat conftest.err >&5
43030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43031   (exit $ac_status); } &&
43032          { ac_try='test -z "$ac_c_werror_flag"
43033                          || test ! -s conftest.err'
43034   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43035   (eval $ac_try) 2>&5
43036   ac_status=$?
43037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43038   (exit $ac_status); }; } &&
43039          { ac_try='test -s conftest$ac_exeext'
43040   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43041   (eval $ac_try) 2>&5
43042   ac_status=$?
43043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43044   (exit $ac_status); }; }; then
43045   ac_cv_func__snprintf=yes
43046 else
43047   echo "$as_me: failed program was:" >&5
43048 sed 's/^/| /' conftest.$ac_ext >&5
43049
43050 ac_cv_func__snprintf=no
43051 fi
43052 rm -f conftest.err conftest.$ac_objext \
43053       conftest$ac_exeext conftest.$ac_ext
43054 fi
43055 echo "$as_me:$LINENO: result: $ac_cv_func__snprintf" >&5
43056 echo "${ECHO_T}$ac_cv_func__snprintf" >&6
43057 if test $ac_cv_func__snprintf = yes; then
43058   ac_cv_func_snprintf=yes
43059
43060 cat >>confdefs.h <<\_ACEOF
43061 #define snprintf _snprintf
43062 _ACEOF
43063
43064
43065 fi
43066
43067
43068 echo "$as_me:$LINENO: checking for _vsnprintf" >&5
43069 echo $ECHO_N "checking for _vsnprintf... $ECHO_C" >&6
43070 if test "${ac_cv_func__vsnprintf+set}" = set; then
43071   echo $ECHO_N "(cached) $ECHO_C" >&6
43072 else
43073   cat >conftest.$ac_ext <<_ACEOF
43074 /* confdefs.h.  */
43075 _ACEOF
43076 cat confdefs.h >>conftest.$ac_ext
43077 cat >>conftest.$ac_ext <<_ACEOF
43078 /* end confdefs.h.  */
43079 /* Define _vsnprintf to an innocuous variant, in case <limits.h> declares _vsnprintf.
43080    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43081 #define _vsnprintf innocuous__vsnprintf
43082
43083 /* System header to define __stub macros and hopefully few prototypes,
43084     which can conflict with char _vsnprintf (); below.
43085     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43086     <limits.h> exists even on freestanding compilers.  */
43087
43088 #ifdef __STDC__
43089 # include <limits.h>
43090 #else
43091 # include <assert.h>
43092 #endif
43093
43094 #undef _vsnprintf
43095
43096 /* Override any gcc2 internal prototype to avoid an error.  */
43097 #ifdef __cplusplus
43098 extern "C"
43099 {
43100 #endif
43101 /* We use char because int might match the return type of a gcc2
43102    builtin and then its argument prototype would still apply.  */
43103 char _vsnprintf ();
43104 /* The GNU C library defines this for functions which it implements
43105     to always fail with ENOSYS.  Some functions are actually named
43106     something starting with __ and the normal name is an alias.  */
43107 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
43108 choke me
43109 #else
43110 char (*f) () = _vsnprintf;
43111 #endif
43112 #ifdef __cplusplus
43113 }
43114 #endif
43115
43116 int
43117 main ()
43118 {
43119 return f != _vsnprintf;
43120   ;
43121   return 0;
43122 }
43123 _ACEOF
43124 rm -f conftest.$ac_objext conftest$ac_exeext
43125 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43126   (eval $ac_link) 2>conftest.er1
43127   ac_status=$?
43128   grep -v '^ *+' conftest.er1 >conftest.err
43129   rm -f conftest.er1
43130   cat conftest.err >&5
43131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43132   (exit $ac_status); } &&
43133          { ac_try='test -z "$ac_c_werror_flag"
43134                          || test ! -s conftest.err'
43135   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43136   (eval $ac_try) 2>&5
43137   ac_status=$?
43138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43139   (exit $ac_status); }; } &&
43140          { ac_try='test -s conftest$ac_exeext'
43141   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43142   (eval $ac_try) 2>&5
43143   ac_status=$?
43144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43145   (exit $ac_status); }; }; then
43146   ac_cv_func__vsnprintf=yes
43147 else
43148   echo "$as_me: failed program was:" >&5
43149 sed 's/^/| /' conftest.$ac_ext >&5
43150
43151 ac_cv_func__vsnprintf=no
43152 fi
43153 rm -f conftest.err conftest.$ac_objext \
43154       conftest$ac_exeext conftest.$ac_ext
43155 fi
43156 echo "$as_me:$LINENO: result: $ac_cv_func__vsnprintf" >&5
43157 echo "${ECHO_T}$ac_cv_func__vsnprintf" >&6
43158 if test $ac_cv_func__vsnprintf = yes; then
43159   ac_cv_func_vsnprintf=yes
43160
43161 cat >>confdefs.h <<\_ACEOF
43162 #define vsnprintf _vsnprintf
43163 _ACEOF
43164
43165
43166 fi
43167
43168
43169
43170 for ac_func in vprintf
43171 do
43172 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
43173 echo "$as_me:$LINENO: checking for $ac_func" >&5
43174 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
43175 if eval "test \"\${$as_ac_var+set}\" = set"; then
43176   echo $ECHO_N "(cached) $ECHO_C" >&6
43177 else
43178   cat >conftest.$ac_ext <<_ACEOF
43179 /* confdefs.h.  */
43180 _ACEOF
43181 cat confdefs.h >>conftest.$ac_ext
43182 cat >>conftest.$ac_ext <<_ACEOF
43183 /* end confdefs.h.  */
43184 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
43185    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43186 #define $ac_func innocuous_$ac_func
43187
43188 /* System header to define __stub macros and hopefully few prototypes,
43189     which can conflict with char $ac_func (); below.
43190     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43191     <limits.h> exists even on freestanding compilers.  */
43192
43193 #ifdef __STDC__
43194 # include <limits.h>
43195 #else
43196 # include <assert.h>
43197 #endif
43198
43199 #undef $ac_func
43200
43201 /* Override any gcc2 internal prototype to avoid an error.  */
43202 #ifdef __cplusplus
43203 extern "C"
43204 {
43205 #endif
43206 /* We use char because int might match the return type of a gcc2
43207    builtin and then its argument prototype would still apply.  */
43208 char $ac_func ();
43209 /* The GNU C library defines this for functions which it implements
43210     to always fail with ENOSYS.  Some functions are actually named
43211     something starting with __ and the normal name is an alias.  */
43212 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
43213 choke me
43214 #else
43215 char (*f) () = $ac_func;
43216 #endif
43217 #ifdef __cplusplus
43218 }
43219 #endif
43220
43221 int
43222 main ()
43223 {
43224 return f != $ac_func;
43225   ;
43226   return 0;
43227 }
43228 _ACEOF
43229 rm -f conftest.$ac_objext conftest$ac_exeext
43230 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43231   (eval $ac_link) 2>conftest.er1
43232   ac_status=$?
43233   grep -v '^ *+' conftest.er1 >conftest.err
43234   rm -f conftest.er1
43235   cat conftest.err >&5
43236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43237   (exit $ac_status); } &&
43238          { ac_try='test -z "$ac_c_werror_flag"
43239                          || test ! -s conftest.err'
43240   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43241   (eval $ac_try) 2>&5
43242   ac_status=$?
43243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43244   (exit $ac_status); }; } &&
43245          { ac_try='test -s conftest$ac_exeext'
43246   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43247   (eval $ac_try) 2>&5
43248   ac_status=$?
43249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43250   (exit $ac_status); }; }; then
43251   eval "$as_ac_var=yes"
43252 else
43253   echo "$as_me: failed program was:" >&5
43254 sed 's/^/| /' conftest.$ac_ext >&5
43255
43256 eval "$as_ac_var=no"
43257 fi
43258 rm -f conftest.err conftest.$ac_objext \
43259       conftest$ac_exeext conftest.$ac_ext
43260 fi
43261 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
43262 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
43263 if test `eval echo '${'$as_ac_var'}'` = yes; then
43264   cat >>confdefs.h <<_ACEOF
43265 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
43266 _ACEOF
43267
43268 echo "$as_me:$LINENO: checking for _doprnt" >&5
43269 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
43270 if test "${ac_cv_func__doprnt+set}" = set; then
43271   echo $ECHO_N "(cached) $ECHO_C" >&6
43272 else
43273   cat >conftest.$ac_ext <<_ACEOF
43274 /* confdefs.h.  */
43275 _ACEOF
43276 cat confdefs.h >>conftest.$ac_ext
43277 cat >>conftest.$ac_ext <<_ACEOF
43278 /* end confdefs.h.  */
43279 /* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
43280    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43281 #define _doprnt innocuous__doprnt
43282
43283 /* System header to define __stub macros and hopefully few prototypes,
43284     which can conflict with char _doprnt (); below.
43285     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43286     <limits.h> exists even on freestanding compilers.  */
43287
43288 #ifdef __STDC__
43289 # include <limits.h>
43290 #else
43291 # include <assert.h>
43292 #endif
43293
43294 #undef _doprnt
43295
43296 /* Override any gcc2 internal prototype to avoid an error.  */
43297 #ifdef __cplusplus
43298 extern "C"
43299 {
43300 #endif
43301 /* We use char because int might match the return type of a gcc2
43302    builtin and then its argument prototype would still apply.  */
43303 char _doprnt ();
43304 /* The GNU C library defines this for functions which it implements
43305     to always fail with ENOSYS.  Some functions are actually named
43306     something starting with __ and the normal name is an alias.  */
43307 #if defined (__stub__doprnt) || defined (__stub____doprnt)
43308 choke me
43309 #else
43310 char (*f) () = _doprnt;
43311 #endif
43312 #ifdef __cplusplus
43313 }
43314 #endif
43315
43316 int
43317 main ()
43318 {
43319 return f != _doprnt;
43320   ;
43321   return 0;
43322 }
43323 _ACEOF
43324 rm -f conftest.$ac_objext conftest$ac_exeext
43325 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43326   (eval $ac_link) 2>conftest.er1
43327   ac_status=$?
43328   grep -v '^ *+' conftest.er1 >conftest.err
43329   rm -f conftest.er1
43330   cat conftest.err >&5
43331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43332   (exit $ac_status); } &&
43333          { ac_try='test -z "$ac_c_werror_flag"
43334                          || test ! -s conftest.err'
43335   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43336   (eval $ac_try) 2>&5
43337   ac_status=$?
43338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43339   (exit $ac_status); }; } &&
43340          { ac_try='test -s conftest$ac_exeext'
43341   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43342   (eval $ac_try) 2>&5
43343   ac_status=$?
43344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43345   (exit $ac_status); }; }; then
43346   ac_cv_func__doprnt=yes
43347 else
43348   echo "$as_me: failed program was:" >&5
43349 sed 's/^/| /' conftest.$ac_ext >&5
43350
43351 ac_cv_func__doprnt=no
43352 fi
43353 rm -f conftest.err conftest.$ac_objext \
43354       conftest$ac_exeext conftest.$ac_ext
43355 fi
43356 echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
43357 echo "${ECHO_T}$ac_cv_func__doprnt" >&6
43358 if test $ac_cv_func__doprnt = yes; then
43359
43360 cat >>confdefs.h <<\_ACEOF
43361 #define HAVE_DOPRNT 1
43362 _ACEOF
43363
43364 fi
43365
43366 fi
43367 done
43368
43369
43370
43371 if test $ac_cv_func_vprintf = yes ; then
43372
43373
43374 for ac_func in snprintf vsnprintf
43375 do
43376 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
43377 echo "$as_me:$LINENO: checking for $ac_func" >&5
43378 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
43379 if eval "test \"\${$as_ac_var+set}\" = set"; then
43380   echo $ECHO_N "(cached) $ECHO_C" >&6
43381 else
43382   cat >conftest.$ac_ext <<_ACEOF
43383 /* confdefs.h.  */
43384 _ACEOF
43385 cat confdefs.h >>conftest.$ac_ext
43386 cat >>conftest.$ac_ext <<_ACEOF
43387 /* end confdefs.h.  */
43388 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
43389    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43390 #define $ac_func innocuous_$ac_func
43391
43392 /* System header to define __stub macros and hopefully few prototypes,
43393     which can conflict with char $ac_func (); below.
43394     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43395     <limits.h> exists even on freestanding compilers.  */
43396
43397 #ifdef __STDC__
43398 # include <limits.h>
43399 #else
43400 # include <assert.h>
43401 #endif
43402
43403 #undef $ac_func
43404
43405 /* Override any gcc2 internal prototype to avoid an error.  */
43406 #ifdef __cplusplus
43407 extern "C"
43408 {
43409 #endif
43410 /* We use char because int might match the return type of a gcc2
43411    builtin and then its argument prototype would still apply.  */
43412 char $ac_func ();
43413 /* The GNU C library defines this for functions which it implements
43414     to always fail with ENOSYS.  Some functions are actually named
43415     something starting with __ and the normal name is an alias.  */
43416 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
43417 choke me
43418 #else
43419 char (*f) () = $ac_func;
43420 #endif
43421 #ifdef __cplusplus
43422 }
43423 #endif
43424
43425 int
43426 main ()
43427 {
43428 return f != $ac_func;
43429   ;
43430   return 0;
43431 }
43432 _ACEOF
43433 rm -f conftest.$ac_objext conftest$ac_exeext
43434 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43435   (eval $ac_link) 2>conftest.er1
43436   ac_status=$?
43437   grep -v '^ *+' conftest.er1 >conftest.err
43438   rm -f conftest.er1
43439   cat conftest.err >&5
43440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43441   (exit $ac_status); } &&
43442          { ac_try='test -z "$ac_c_werror_flag"
43443                          || test ! -s conftest.err'
43444   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43445   (eval $ac_try) 2>&5
43446   ac_status=$?
43447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43448   (exit $ac_status); }; } &&
43449          { ac_try='test -s conftest$ac_exeext'
43450   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43451   (eval $ac_try) 2>&5
43452   ac_status=$?
43453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43454   (exit $ac_status); }; }; then
43455   eval "$as_ac_var=yes"
43456 else
43457   echo "$as_me: failed program was:" >&5
43458 sed 's/^/| /' conftest.$ac_ext >&5
43459
43460 eval "$as_ac_var=no"
43461 fi
43462 rm -f conftest.err conftest.$ac_objext \
43463       conftest$ac_exeext conftest.$ac_ext
43464 fi
43465 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
43466 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
43467 if test `eval echo '${'$as_ac_var'}'` = yes; then
43468   cat >>confdefs.h <<_ACEOF
43469 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
43470 _ACEOF
43471
43472 fi
43473 done
43474
43475 fi
43476
43477
43478
43479
43480
43481
43482
43483
43484
43485
43486
43487
43488
43489
43490
43491
43492
43493
43494
43495
43496
43497
43498
43499
43500
43501
43502
43503
43504
43505
43506
43507
43508
43509
43510
43511
43512
43513
43514
43515
43516
43517
43518
43519
43520
43521
43522
43523
43524
43525
43526
43527
43528
43529
43530
43531 for ac_func in \
43532         bcopy                   \
43533         closesocket             \
43534         chroot                  \
43535         endgrent                \
43536         endpwent                \
43537         fcntl                   \
43538         flock                   \
43539         fstat                   \
43540         getdtablesize   \
43541         getgrgid                \
43542         gethostname             \
43543         getpass                 \
43544         getpassphrase   \
43545         getpwuid                \
43546         getpwnam                \
43547         getspnam                \
43548         gettimeofday    \
43549         initgroups              \
43550         inet_ntoa_b             \
43551         lockf                   \
43552         memcpy                  \
43553         memmove                 \
43554         memrchr                 \
43555         mkstemp                 \
43556         mktemp                  \
43557         pipe                    \
43558         read                    \
43559         recv                    \
43560         recvfrom                \
43561         setpwfile               \
43562         setgid                  \
43563         setegid                 \
43564         setsid                  \
43565         setuid                  \
43566         seteuid                 \
43567         signal                  \
43568         strdup                  \
43569         strpbrk                 \
43570         strrchr                 \
43571         strsep                  \
43572         strstr                  \
43573         strtol                  \
43574         strtoul                 \
43575         strtoq                  \
43576         strtouq                 \
43577         strtoll                 \
43578         strspn                  \
43579         sysconf                 \
43580         waitpid                 \
43581         wait4                   \
43582         write                   \
43583         send                    \
43584         sendmsg                 \
43585         sendto                  \
43586
43587 do
43588 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
43589 echo "$as_me:$LINENO: checking for $ac_func" >&5
43590 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
43591 if eval "test \"\${$as_ac_var+set}\" = set"; then
43592   echo $ECHO_N "(cached) $ECHO_C" >&6
43593 else
43594   cat >conftest.$ac_ext <<_ACEOF
43595 /* confdefs.h.  */
43596 _ACEOF
43597 cat confdefs.h >>conftest.$ac_ext
43598 cat >>conftest.$ac_ext <<_ACEOF
43599 /* end confdefs.h.  */
43600 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
43601    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43602 #define $ac_func innocuous_$ac_func
43603
43604 /* System header to define __stub macros and hopefully few prototypes,
43605     which can conflict with char $ac_func (); below.
43606     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43607     <limits.h> exists even on freestanding compilers.  */
43608
43609 #ifdef __STDC__
43610 # include <limits.h>
43611 #else
43612 # include <assert.h>
43613 #endif
43614
43615 #undef $ac_func
43616
43617 /* Override any gcc2 internal prototype to avoid an error.  */
43618 #ifdef __cplusplus
43619 extern "C"
43620 {
43621 #endif
43622 /* We use char because int might match the return type of a gcc2
43623    builtin and then its argument prototype would still apply.  */
43624 char $ac_func ();
43625 /* The GNU C library defines this for functions which it implements
43626     to always fail with ENOSYS.  Some functions are actually named
43627     something starting with __ and the normal name is an alias.  */
43628 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
43629 choke me
43630 #else
43631 char (*f) () = $ac_func;
43632 #endif
43633 #ifdef __cplusplus
43634 }
43635 #endif
43636
43637 int
43638 main ()
43639 {
43640 return f != $ac_func;
43641   ;
43642   return 0;
43643 }
43644 _ACEOF
43645 rm -f conftest.$ac_objext conftest$ac_exeext
43646 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43647   (eval $ac_link) 2>conftest.er1
43648   ac_status=$?
43649   grep -v '^ *+' conftest.er1 >conftest.err
43650   rm -f conftest.er1
43651   cat conftest.err >&5
43652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43653   (exit $ac_status); } &&
43654          { ac_try='test -z "$ac_c_werror_flag"
43655                          || test ! -s conftest.err'
43656   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43657   (eval $ac_try) 2>&5
43658   ac_status=$?
43659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43660   (exit $ac_status); }; } &&
43661          { ac_try='test -s conftest$ac_exeext'
43662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43663   (eval $ac_try) 2>&5
43664   ac_status=$?
43665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43666   (exit $ac_status); }; }; then
43667   eval "$as_ac_var=yes"
43668 else
43669   echo "$as_me: failed program was:" >&5
43670 sed 's/^/| /' conftest.$ac_ext >&5
43671
43672 eval "$as_ac_var=no"
43673 fi
43674 rm -f conftest.err conftest.$ac_objext \
43675       conftest$ac_exeext conftest.$ac_ext
43676 fi
43677 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
43678 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
43679 if test `eval echo '${'$as_ac_var'}'` = yes; then
43680   cat >>confdefs.h <<_ACEOF
43681 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
43682 _ACEOF
43683
43684 fi
43685 done
43686
43687
43688
43689
43690 for ac_func in getopt getpeereid
43691 do
43692 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
43693 echo "$as_me:$LINENO: checking for $ac_func" >&5
43694 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
43695 if eval "test \"\${$as_ac_var+set}\" = set"; then
43696   echo $ECHO_N "(cached) $ECHO_C" >&6
43697 else
43698   cat >conftest.$ac_ext <<_ACEOF
43699 /* confdefs.h.  */
43700 _ACEOF
43701 cat confdefs.h >>conftest.$ac_ext
43702 cat >>conftest.$ac_ext <<_ACEOF
43703 /* end confdefs.h.  */
43704 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
43705    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43706 #define $ac_func innocuous_$ac_func
43707
43708 /* System header to define __stub macros and hopefully few prototypes,
43709     which can conflict with char $ac_func (); below.
43710     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43711     <limits.h> exists even on freestanding compilers.  */
43712
43713 #ifdef __STDC__
43714 # include <limits.h>
43715 #else
43716 # include <assert.h>
43717 #endif
43718
43719 #undef $ac_func
43720
43721 /* Override any gcc2 internal prototype to avoid an error.  */
43722 #ifdef __cplusplus
43723 extern "C"
43724 {
43725 #endif
43726 /* We use char because int might match the return type of a gcc2
43727    builtin and then its argument prototype would still apply.  */
43728 char $ac_func ();
43729 /* The GNU C library defines this for functions which it implements
43730     to always fail with ENOSYS.  Some functions are actually named
43731     something starting with __ and the normal name is an alias.  */
43732 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
43733 choke me
43734 #else
43735 char (*f) () = $ac_func;
43736 #endif
43737 #ifdef __cplusplus
43738 }
43739 #endif
43740
43741 int
43742 main ()
43743 {
43744 return f != $ac_func;
43745   ;
43746   return 0;
43747 }
43748 _ACEOF
43749 rm -f conftest.$ac_objext conftest$ac_exeext
43750 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43751   (eval $ac_link) 2>conftest.er1
43752   ac_status=$?
43753   grep -v '^ *+' conftest.er1 >conftest.err
43754   rm -f conftest.er1
43755   cat conftest.err >&5
43756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43757   (exit $ac_status); } &&
43758          { ac_try='test -z "$ac_c_werror_flag"
43759                          || test ! -s conftest.err'
43760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43761   (eval $ac_try) 2>&5
43762   ac_status=$?
43763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43764   (exit $ac_status); }; } &&
43765          { ac_try='test -s conftest$ac_exeext'
43766   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43767   (eval $ac_try) 2>&5
43768   ac_status=$?
43769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43770   (exit $ac_status); }; }; then
43771   eval "$as_ac_var=yes"
43772 else
43773   echo "$as_me: failed program was:" >&5
43774 sed 's/^/| /' conftest.$ac_ext >&5
43775
43776 eval "$as_ac_var=no"
43777 fi
43778 rm -f conftest.err conftest.$ac_objext \
43779       conftest$ac_exeext conftest.$ac_ext
43780 fi
43781 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
43782 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
43783 if test `eval echo '${'$as_ac_var'}'` = yes; then
43784   cat >>confdefs.h <<_ACEOF
43785 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
43786 _ACEOF
43787
43788 else
43789   case $LIBOBJS in
43790     "$ac_func.$ac_objext"   | \
43791   *" $ac_func.$ac_objext"   | \
43792     "$ac_func.$ac_objext "* | \
43793   *" $ac_func.$ac_objext "* ) ;;
43794   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
43795 esac
43796
43797 fi
43798 done
43799
43800
43801
43802 if test "$ac_cv_func_getopt" != yes; then
43803         LIBSRCS="$LIBSRCS getopt.c"
43804 fi
43805 if test "$ac_cv_func_getpeereid" != yes; then
43806         echo "$as_me:$LINENO: checking for struct msghdr.msg_accrightslen" >&5
43807 echo $ECHO_N "checking for struct msghdr.msg_accrightslen... $ECHO_C" >&6
43808 if test "${ac_cv_member_struct_msghdr_msg_accrightslen+set}" = set; then
43809   echo $ECHO_N "(cached) $ECHO_C" >&6
43810 else
43811   cat >conftest.$ac_ext <<_ACEOF
43812 /* confdefs.h.  */
43813 _ACEOF
43814 cat confdefs.h >>conftest.$ac_ext
43815 cat >>conftest.$ac_ext <<_ACEOF
43816 /* end confdefs.h.  */
43817 $ac_includes_default
43818 #ifdef HAVE_SYS_SOCKET_H
43819 #include <sys/socket.h>
43820 #endif
43821
43822 int
43823 main ()
43824 {
43825 static struct msghdr ac_aggr;
43826 if (ac_aggr.msg_accrightslen)
43827 return 0;
43828   ;
43829   return 0;
43830 }
43831 _ACEOF
43832 rm -f conftest.$ac_objext
43833 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
43834   (eval $ac_compile) 2>conftest.er1
43835   ac_status=$?
43836   grep -v '^ *+' conftest.er1 >conftest.err
43837   rm -f conftest.er1
43838   cat conftest.err >&5
43839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43840   (exit $ac_status); } &&
43841          { ac_try='test -z "$ac_c_werror_flag"
43842                          || test ! -s conftest.err'
43843   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43844   (eval $ac_try) 2>&5
43845   ac_status=$?
43846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43847   (exit $ac_status); }; } &&
43848          { ac_try='test -s conftest.$ac_objext'
43849   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43850   (eval $ac_try) 2>&5
43851   ac_status=$?
43852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43853   (exit $ac_status); }; }; then
43854   ac_cv_member_struct_msghdr_msg_accrightslen=yes
43855 else
43856   echo "$as_me: failed program was:" >&5
43857 sed 's/^/| /' conftest.$ac_ext >&5
43858
43859 cat >conftest.$ac_ext <<_ACEOF
43860 /* confdefs.h.  */
43861 _ACEOF
43862 cat confdefs.h >>conftest.$ac_ext
43863 cat >>conftest.$ac_ext <<_ACEOF
43864 /* end confdefs.h.  */
43865 $ac_includes_default
43866 #ifdef HAVE_SYS_SOCKET_H
43867 #include <sys/socket.h>
43868 #endif
43869
43870 int
43871 main ()
43872 {
43873 static struct msghdr ac_aggr;
43874 if (sizeof ac_aggr.msg_accrightslen)
43875 return 0;
43876   ;
43877   return 0;
43878 }
43879 _ACEOF
43880 rm -f conftest.$ac_objext
43881 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
43882   (eval $ac_compile) 2>conftest.er1
43883   ac_status=$?
43884   grep -v '^ *+' conftest.er1 >conftest.err
43885   rm -f conftest.er1
43886   cat conftest.err >&5
43887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43888   (exit $ac_status); } &&
43889          { ac_try='test -z "$ac_c_werror_flag"
43890                          || test ! -s conftest.err'
43891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43892   (eval $ac_try) 2>&5
43893   ac_status=$?
43894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43895   (exit $ac_status); }; } &&
43896          { ac_try='test -s conftest.$ac_objext'
43897   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43898   (eval $ac_try) 2>&5
43899   ac_status=$?
43900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43901   (exit $ac_status); }; }; then
43902   ac_cv_member_struct_msghdr_msg_accrightslen=yes
43903 else
43904   echo "$as_me: failed program was:" >&5
43905 sed 's/^/| /' conftest.$ac_ext >&5
43906
43907 ac_cv_member_struct_msghdr_msg_accrightslen=no
43908 fi
43909 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
43910 fi
43911 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
43912 fi
43913 echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_accrightslen" >&5
43914 echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_accrightslen" >&6
43915 if test $ac_cv_member_struct_msghdr_msg_accrightslen = yes; then
43916
43917 cat >>confdefs.h <<_ACEOF
43918 #define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTSLEN 1
43919 _ACEOF
43920
43921
43922 fi
43923
43924         if test "$ac_cv_member_struct_msghdr_msg_accrightslen" != yes; then
43925                 echo "$as_me:$LINENO: checking for struct msghdr.msg_control" >&5
43926 echo $ECHO_N "checking for struct msghdr.msg_control... $ECHO_C" >&6
43927 if test "${ac_cv_member_struct_msghdr_msg_control+set}" = set; then
43928   echo $ECHO_N "(cached) $ECHO_C" >&6
43929 else
43930   cat >conftest.$ac_ext <<_ACEOF
43931 /* confdefs.h.  */
43932 _ACEOF
43933 cat confdefs.h >>conftest.$ac_ext
43934 cat >>conftest.$ac_ext <<_ACEOF
43935 /* end confdefs.h.  */
43936 $ac_includes_default
43937 #ifdef HAVE_SYS_SOCKET_H
43938 #include <sys/socket.h>
43939 #endif
43940
43941 int
43942 main ()
43943 {
43944 static struct msghdr ac_aggr;
43945 if (ac_aggr.msg_control)
43946 return 0;
43947   ;
43948   return 0;
43949 }
43950 _ACEOF
43951 rm -f conftest.$ac_objext
43952 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
43953   (eval $ac_compile) 2>conftest.er1
43954   ac_status=$?
43955   grep -v '^ *+' conftest.er1 >conftest.err
43956   rm -f conftest.er1
43957   cat conftest.err >&5
43958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43959   (exit $ac_status); } &&
43960          { ac_try='test -z "$ac_c_werror_flag"
43961                          || test ! -s conftest.err'
43962   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43963   (eval $ac_try) 2>&5
43964   ac_status=$?
43965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43966   (exit $ac_status); }; } &&
43967          { ac_try='test -s conftest.$ac_objext'
43968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43969   (eval $ac_try) 2>&5
43970   ac_status=$?
43971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43972   (exit $ac_status); }; }; then
43973   ac_cv_member_struct_msghdr_msg_control=yes
43974 else
43975   echo "$as_me: failed program was:" >&5
43976 sed 's/^/| /' conftest.$ac_ext >&5
43977
43978 cat >conftest.$ac_ext <<_ACEOF
43979 /* confdefs.h.  */
43980 _ACEOF
43981 cat confdefs.h >>conftest.$ac_ext
43982 cat >>conftest.$ac_ext <<_ACEOF
43983 /* end confdefs.h.  */
43984 $ac_includes_default
43985 #ifdef HAVE_SYS_SOCKET_H
43986 #include <sys/socket.h>
43987 #endif
43988
43989 int
43990 main ()
43991 {
43992 static struct msghdr ac_aggr;
43993 if (sizeof ac_aggr.msg_control)
43994 return 0;
43995   ;
43996   return 0;
43997 }
43998 _ACEOF
43999 rm -f conftest.$ac_objext
44000 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
44001   (eval $ac_compile) 2>conftest.er1
44002   ac_status=$?
44003   grep -v '^ *+' conftest.er1 >conftest.err
44004   rm -f conftest.er1
44005   cat conftest.err >&5
44006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44007   (exit $ac_status); } &&
44008          { ac_try='test -z "$ac_c_werror_flag"
44009                          || test ! -s conftest.err'
44010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44011   (eval $ac_try) 2>&5
44012   ac_status=$?
44013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44014   (exit $ac_status); }; } &&
44015          { ac_try='test -s conftest.$ac_objext'
44016   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44017   (eval $ac_try) 2>&5
44018   ac_status=$?
44019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44020   (exit $ac_status); }; }; then
44021   ac_cv_member_struct_msghdr_msg_control=yes
44022 else
44023   echo "$as_me: failed program was:" >&5
44024 sed 's/^/| /' conftest.$ac_ext >&5
44025
44026 ac_cv_member_struct_msghdr_msg_control=no
44027 fi
44028 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
44029 fi
44030 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
44031 fi
44032 echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_control" >&5
44033 echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_control" >&6
44034 if test $ac_cv_member_struct_msghdr_msg_control = yes; then
44035
44036 cat >>confdefs.h <<_ACEOF
44037 #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
44038 _ACEOF
44039
44040
44041 fi
44042
44043         fi
44044         LIBSRCS="$LIBSRCS getpeereid.c"
44045 fi
44046 if test "$ac_cv_func_snprintf" != yes ||
44047    test "$ac_cv_func_vsnprintf" != yes; then
44048         if test "$ac_cv_func_snprintf" != yes; then
44049
44050 cat >>confdefs.h <<\_ACEOF
44051 #define snprintf ber_pvt_snprintf
44052 _ACEOF
44053
44054         fi
44055         if test "$ac_cv_func_vsnprintf" != yes; then
44056
44057 cat >>confdefs.h <<\_ACEOF
44058 #define vsnprintf ber_pvt_vsnprintf
44059 _ACEOF
44060
44061         fi
44062 fi
44063
44064
44065 if test "$ol_enable_slapi" != no ; then
44066
44067 for ac_header in ltdl.h
44068 do
44069 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
44070 if eval "test \"\${$as_ac_Header+set}\" = set"; then
44071   echo "$as_me:$LINENO: checking for $ac_header" >&5
44072 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
44073 if eval "test \"\${$as_ac_Header+set}\" = set"; then
44074   echo $ECHO_N "(cached) $ECHO_C" >&6
44075 fi
44076 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
44077 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
44078 else
44079   # Is the header compilable?
44080 echo "$as_me:$LINENO: checking $ac_header usability" >&5
44081 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
44082 cat >conftest.$ac_ext <<_ACEOF
44083 /* confdefs.h.  */
44084 _ACEOF
44085 cat confdefs.h >>conftest.$ac_ext
44086 cat >>conftest.$ac_ext <<_ACEOF
44087 /* end confdefs.h.  */
44088 $ac_includes_default
44089 #include <$ac_header>
44090 _ACEOF
44091 rm -f conftest.$ac_objext
44092 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
44093   (eval $ac_compile) 2>conftest.er1
44094   ac_status=$?
44095   grep -v '^ *+' conftest.er1 >conftest.err
44096   rm -f conftest.er1
44097   cat conftest.err >&5
44098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44099   (exit $ac_status); } &&
44100          { ac_try='test -z "$ac_c_werror_flag"
44101                          || test ! -s conftest.err'
44102   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44103   (eval $ac_try) 2>&5
44104   ac_status=$?
44105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44106   (exit $ac_status); }; } &&
44107          { ac_try='test -s conftest.$ac_objext'
44108   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44109   (eval $ac_try) 2>&5
44110   ac_status=$?
44111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44112   (exit $ac_status); }; }; then
44113   ac_header_compiler=yes
44114 else
44115   echo "$as_me: failed program was:" >&5
44116 sed 's/^/| /' conftest.$ac_ext >&5
44117
44118 ac_header_compiler=no
44119 fi
44120 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
44121 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
44122 echo "${ECHO_T}$ac_header_compiler" >&6
44123
44124 # Is the header present?
44125 echo "$as_me:$LINENO: checking $ac_header presence" >&5
44126 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
44127 cat >conftest.$ac_ext <<_ACEOF
44128 /* confdefs.h.  */
44129 _ACEOF
44130 cat confdefs.h >>conftest.$ac_ext
44131 cat >>conftest.$ac_ext <<_ACEOF
44132 /* end confdefs.h.  */
44133 #include <$ac_header>
44134 _ACEOF
44135 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
44136   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
44137   ac_status=$?
44138   grep -v '^ *+' conftest.er1 >conftest.err
44139   rm -f conftest.er1
44140   cat conftest.err >&5
44141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44142   (exit $ac_status); } >/dev/null; then
44143   if test -s conftest.err; then
44144     ac_cpp_err=$ac_c_preproc_warn_flag
44145     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
44146   else
44147     ac_cpp_err=
44148   fi
44149 else
44150   ac_cpp_err=yes
44151 fi
44152 if test -z "$ac_cpp_err"; then
44153   ac_header_preproc=yes
44154 else
44155   echo "$as_me: failed program was:" >&5
44156 sed 's/^/| /' conftest.$ac_ext >&5
44157
44158   ac_header_preproc=no
44159 fi
44160 rm -f conftest.err conftest.$ac_ext
44161 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
44162 echo "${ECHO_T}$ac_header_preproc" >&6
44163
44164 # So?  What about this header?
44165 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
44166   yes:no: )
44167     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
44168 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
44169     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
44170 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
44171     ac_header_preproc=yes
44172     ;;
44173   no:yes:* )
44174     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
44175 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
44176     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
44177 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
44178     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
44179 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
44180     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
44181 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
44182     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
44183 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
44184     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
44185 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
44186     (
44187       cat <<\_ASBOX
44188 ## --------------------------------------------- ##
44189 ## Report this to <http://www.openldap.org/its/> ##
44190 ## --------------------------------------------- ##
44191 _ASBOX
44192     ) |
44193       sed "s/^/$as_me: WARNING:     /" >&2
44194     ;;
44195 esac
44196 echo "$as_me:$LINENO: checking for $ac_header" >&5
44197 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
44198 if eval "test \"\${$as_ac_Header+set}\" = set"; then
44199   echo $ECHO_N "(cached) $ECHO_C" >&6
44200 else
44201   eval "$as_ac_Header=\$ac_header_preproc"
44202 fi
44203 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
44204 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
44205
44206 fi
44207 if test `eval echo '${'$as_ac_Header'}'` = yes; then
44208   cat >>confdefs.h <<_ACEOF
44209 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
44210 _ACEOF
44211
44212 fi
44213
44214 done
44215
44216
44217         if test $ac_cv_header_ltdl_h != yes ; then
44218                 { { echo "$as_me:$LINENO: error: could not locate <ltdl.h>" >&5
44219 echo "$as_me: error: could not locate <ltdl.h>" >&2;}
44220    { (exit 1); exit 1; }; }
44221         fi
44222         echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
44223 echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6
44224 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
44225   echo $ECHO_N "(cached) $ECHO_C" >&6
44226 else
44227   ac_check_lib_save_LIBS=$LIBS
44228 LIBS="-lltdl  $LIBS"
44229 cat >conftest.$ac_ext <<_ACEOF
44230 /* confdefs.h.  */
44231 _ACEOF
44232 cat confdefs.h >>conftest.$ac_ext
44233 cat >>conftest.$ac_ext <<_ACEOF
44234 /* end confdefs.h.  */
44235
44236 /* Override any gcc2 internal prototype to avoid an error.  */
44237 #ifdef __cplusplus
44238 extern "C"
44239 #endif
44240 /* We use char because int might match the return type of a gcc2
44241    builtin and then its argument prototype would still apply.  */
44242 char lt_dlinit ();
44243 int
44244 main ()
44245 {
44246 lt_dlinit ();
44247   ;
44248   return 0;
44249 }
44250 _ACEOF
44251 rm -f conftest.$ac_objext conftest$ac_exeext
44252 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
44253   (eval $ac_link) 2>conftest.er1
44254   ac_status=$?
44255   grep -v '^ *+' conftest.er1 >conftest.err
44256   rm -f conftest.er1
44257   cat conftest.err >&5
44258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44259   (exit $ac_status); } &&
44260          { ac_try='test -z "$ac_c_werror_flag"
44261                          || test ! -s conftest.err'
44262   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44263   (eval $ac_try) 2>&5
44264   ac_status=$?
44265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44266   (exit $ac_status); }; } &&
44267          { ac_try='test -s conftest$ac_exeext'
44268   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44269   (eval $ac_try) 2>&5
44270   ac_status=$?
44271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44272   (exit $ac_status); }; }; then
44273   ac_cv_lib_ltdl_lt_dlinit=yes
44274 else
44275   echo "$as_me: failed program was:" >&5
44276 sed 's/^/| /' conftest.$ac_ext >&5
44277
44278 ac_cv_lib_ltdl_lt_dlinit=no
44279 fi
44280 rm -f conftest.err conftest.$ac_objext \
44281       conftest$ac_exeext conftest.$ac_ext
44282 LIBS=$ac_check_lib_save_LIBS
44283 fi
44284 echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
44285 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6
44286 if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
44287
44288                 SLAPI_LIBS=-lltdl
44289                 LIBSLAPI=libslapi.a
44290                 LIBSLAPITOOLS=../libslapi.a
44291
44292 cat >>confdefs.h <<\_ACEOF
44293 #define HAVE_LIBLTDL 1
44294 _ACEOF
44295
44296
44297 else
44298   { { echo "$as_me:$LINENO: error: could not locate libtool -lltdl" >&5
44299 echo "$as_me: error: could not locate libtool -lltdl" >&2;}
44300    { (exit 1); exit 1; }; }
44301 fi
44302
44303
44304
44305 cat >>confdefs.h <<\_ACEOF
44306 #define LDAP_SLAPI 1
44307 _ACEOF
44308
44309 fi
44310
44311 if test "$ol_enable_debug" != no ; then
44312
44313 cat >>confdefs.h <<\_ACEOF
44314 #define LDAP_DEBUG 1
44315 _ACEOF
44316
44317 fi
44318 if test "$ol_enable_syslog" = yes ; then
44319
44320 cat >>confdefs.h <<\_ACEOF
44321 #define LDAP_SYSLOG 1
44322 _ACEOF
44323
44324 fi
44325 if test "$ol_link_kbind" != no ; then
44326
44327 cat >>confdefs.h <<\_ACEOF
44328 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
44329 _ACEOF
44330
44331 fi
44332 if test "$ol_enable_proctitle" != no ; then
44333
44334 cat >>confdefs.h <<\_ACEOF
44335 #define LDAP_PROCTITLE 1
44336 _ACEOF
44337
44338 fi
44339 if test "$ol_enable_referrals" != no ; then
44340
44341 cat >>confdefs.h <<\_ACEOF
44342 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
44343 _ACEOF
44344
44345 fi
44346 if test "$ol_enable_local" != no; then
44347
44348 cat >>confdefs.h <<\_ACEOF
44349 #define LDAP_PF_LOCAL 1
44350 _ACEOF
44351
44352 fi
44353 if test "$ol_link_ipv6" != no; then
44354
44355 cat >>confdefs.h <<\_ACEOF
44356 #define LDAP_PF_INET6 1
44357 _ACEOF
44358
44359 fi
44360 if test "$ol_enable_cleartext" != no ; then
44361
44362 cat >>confdefs.h <<\_ACEOF
44363 #define SLAPD_CLEARTEXT 1
44364 _ACEOF
44365
44366 fi
44367 if test "$ol_enable_crypt" != no ; then
44368
44369 cat >>confdefs.h <<\_ACEOF
44370 #define SLAPD_CRYPT 1
44371 _ACEOF
44372
44373 fi
44374 if test "$ol_link_spasswd" != no ; then
44375
44376 cat >>confdefs.h <<\_ACEOF
44377 #define SLAPD_SPASSWD 1
44378 _ACEOF
44379
44380 fi
44381 if test "$ol_enable_multimaster" != no ; then
44382
44383 cat >>confdefs.h <<\_ACEOF
44384 #define SLAPD_MULTIMASTER 1
44385 _ACEOF
44386
44387 fi
44388 if test "$ol_enable_rlookups" != no ; then
44389
44390 cat >>confdefs.h <<\_ACEOF
44391 #define SLAPD_RLOOKUPS 1
44392 _ACEOF
44393
44394 fi
44395 if test "$ol_enable_aci" != no ; then
44396
44397 cat >>confdefs.h <<\_ACEOF
44398 #define SLAPD_ACI_ENABLED 1
44399 _ACEOF
44400
44401         WITH_ACI_ENABLED=yes
44402 else
44403         WITH_ACI_ENABLED=no
44404 fi
44405
44406 if test "$ol_link_modules" != no ; then
44407
44408 cat >>confdefs.h <<\_ACEOF
44409 #define SLAPD_MODULES 1
44410 _ACEOF
44411
44412         BUILD_SLAPD=yes
44413         SLAPD_MODULES_LDFLAGS="-dlopen self"
44414 fi
44415
44416
44417 cat >>confdefs.h <<\_ACEOF
44418 #define SLAPD_MOD_STATIC 1
44419 _ACEOF
44420
44421
44422 cat >>confdefs.h <<\_ACEOF
44423 #define SLAPD_MOD_DYNAMIC 2
44424 _ACEOF
44425
44426
44427 if test "$ol_enable_bdb" != no ; then
44428         BUILD_SLAPD=yes
44429         BUILD_BDB=$ol_enable_bdb
44430         if test "$ol_enable_bdb" = mod ; then
44431                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
44432                 MFLAG=SLAPD_MOD_DYNAMIC
44433         else
44434                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
44435                 MFLAG=SLAPD_MOD_STATIC
44436         fi
44437
44438 cat >>confdefs.h <<_ACEOF
44439 #define SLAPD_BDB $MFLAG
44440 _ACEOF
44441
44442 fi
44443
44444 if test "$ol_enable_dnssrv" != no ; then
44445         BUILD_SLAPD=yes
44446         BUILD_DNSSRV=$ol_enable_dnssrv
44447         if test "$ol_enable_dnssrv" = mod ; then
44448                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
44449                 MFLAG=SLAPD_MOD_DYNAMIC
44450         else
44451                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
44452                 MFLAG=SLAPD_MOD_STATIC
44453         fi
44454
44455 cat >>confdefs.h <<_ACEOF
44456 #define SLAPD_DNSSRV $MFLAG
44457 _ACEOF
44458
44459 fi
44460
44461 if test "$ol_enable_hdb" != no ; then
44462         BUILD_SLAPD=yes
44463         BUILD_HDB=$ol_enable_hdb
44464         if test "$ol_enable_hdb" = mod ; then
44465                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
44466                 MFLAG=SLAPD_MOD_DYNAMIC
44467         else
44468                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
44469                 MFLAG=SLAPD_MOD_STATIC
44470         fi
44471
44472 cat >>confdefs.h <<_ACEOF
44473 #define SLAPD_HDB $MFLAG
44474 _ACEOF
44475
44476 fi
44477
44478 if test "$ol_enable_ldap" != no ; then
44479         BUILD_SLAPD=yes
44480         BUILD_LDAP=$ol_enable_ldap
44481         if test "$ol_enable_ldap" = mod ; then
44482                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
44483                 MFLAG=SLAPD_MOD_DYNAMIC
44484         else
44485                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
44486                 MFLAG=SLAPD_MOD_STATIC
44487         fi
44488
44489 cat >>confdefs.h <<_ACEOF
44490 #define SLAPD_LDAP $MFLAG
44491 _ACEOF
44492
44493 fi
44494
44495 if test "$ol_link_ldbm" != no && test $ol_enable_ldbm != no; then
44496         BUILD_SLAPD=yes
44497         BUILD_LDBM=$ol_enable_ldbm
44498         if test "$ol_enable_ldbm" = mod ; then
44499                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
44500                 MFLAG=SLAPD_MOD_DYNAMIC
44501         else
44502                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
44503                 MFLAG=SLAPD_MOD_STATIC
44504         fi
44505
44506 cat >>confdefs.h <<_ACEOF
44507 #define SLAPD_LDBM $MFLAG
44508 _ACEOF
44509
44510 fi
44511
44512 if test "$ol_enable_meta" != no ; then
44513         BUILD_SLAPD=yes
44514         BUILD_META=$ol_enable_meta
44515         BUILD_REWRITE=yes
44516         if test "$ol_enable_meta" = mod ; then
44517                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
44518                 MFLAG=SLAPD_MOD_DYNAMIC
44519         else
44520                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
44521                 MFLAG=SLAPD_MOD_STATIC
44522         fi
44523
44524 cat >>confdefs.h <<_ACEOF
44525 #define SLAPD_META $MFLAG
44526 _ACEOF
44527
44528 fi
44529
44530 if test "$ol_enable_monitor" != no ; then
44531         BUILD_SLAPD=yes
44532         BUILD_MONITOR=$ol_enable_monitor
44533         if test "$ol_enable_monitor" = mod ; then
44534                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
44535                 MFLAG=SLAPD_MOD_DYNAMIC
44536         else
44537                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
44538                 MFLAG=SLAPD_MOD_STATIC
44539         fi
44540
44541 cat >>confdefs.h <<_ACEOF
44542 #define SLAPD_MONITOR $MFLAG
44543 _ACEOF
44544
44545 fi
44546
44547 if test "$ol_enable_null" != no ; then
44548         BUILD_SLAPD=yes
44549         BUILD_NULL=$ol_enable_null
44550         if test "$ol_enable_null" = mod ; then
44551                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
44552                 MFLAG=SLAPD_MOD_DYNAMIC
44553         else
44554                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
44555                 MFLAG=SLAPD_MOD_STATIC
44556         fi
44557
44558 cat >>confdefs.h <<_ACEOF
44559 #define SLAPD_NULL $MFLAG
44560 _ACEOF
44561
44562 fi
44563
44564 if test "$ol_enable_passwd" != no ; then
44565         BUILD_SLAPD=yes
44566         BUILD_PASSWD=$ol_enable_passwd
44567         if test "$ol_enable_passwd" = mod ; then
44568                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
44569                 MFLAG=SLAPD_MOD_DYNAMIC
44570         else
44571                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
44572                 MFLAG=SLAPD_MOD_STATIC
44573         fi
44574
44575 cat >>confdefs.h <<_ACEOF
44576 #define SLAPD_PASSWD $MFLAG
44577 _ACEOF
44578
44579 fi
44580
44581 if test "$ol_link_perl" != no ; then
44582         BUILD_SLAPD=yes
44583         BUILD_PERL=$ol_enable_perl
44584         if test "$ol_enable_perl" = mod ; then
44585                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
44586                 MFLAG=SLAPD_MOD_DYNAMIC
44587         else
44588                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
44589                 MFLAG=SLAPD_MOD_STATIC
44590         fi
44591
44592 cat >>confdefs.h <<_ACEOF
44593 #define SLAPD_PERL $MFLAG
44594 _ACEOF
44595
44596 fi
44597
44598 if test "$ol_enable_relay" != no ; then
44599         BUILD_SLAPD=yes
44600         BUILD_RELAY=$ol_enable_relay
44601         if test "$ol_enable_relay" = mod ; then
44602                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
44603                 MFLAG=SLAPD_MOD_DYNAMIC
44604         else
44605                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
44606                 MFLAG=SLAPD_MOD_STATIC
44607         fi
44608
44609 cat >>confdefs.h <<_ACEOF
44610 #define SLAPD_RELAY $MFLAG
44611 _ACEOF
44612
44613 fi
44614
44615 if test "$ol_enable_shell" != no ; then
44616         if test "$ol_link_threads" != no ; then
44617                 { echo "$as_me:$LINENO: WARNING: Use of --without-threads is recommended with back-shell" >&5
44618 echo "$as_me: WARNING: Use of --without-threads is recommended with back-shell" >&2;}
44619         fi
44620         BUILD_SLAPD=yes
44621         BUILD_SHELL=$ol_enable_shell
44622         if test "$ol_enable_shell" = mod ; then
44623                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
44624                 MFLAG=SLAPD_MOD_DYNAMIC
44625         else
44626                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
44627                 MFLAG=SLAPD_MOD_STATIC
44628         fi
44629
44630 cat >>confdefs.h <<_ACEOF
44631 #define SLAPD_SHELL $MFLAG
44632 _ACEOF
44633
44634 fi
44635
44636 if test "$ol_link_sql" != no ; then
44637         BUILD_SLAPD=yes
44638         BUILD_SQL=$ol_enable_sql
44639         if test "$ol_enable_sql" = mod; then
44640                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
44641                 MFLAG=SLAPD_MOD_DYNAMIC
44642         else
44643                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
44644                 MFLAG=SLAPD_MOD_STATIC
44645         fi
44646
44647 cat >>confdefs.h <<_ACEOF
44648 #define SLAPD_SQL $MFLAG
44649 _ACEOF
44650
44651 fi
44652
44653 if test "$ol_enable_accesslog" != no ; then
44654         BUILD_ACCESSLOG=$ol_enable_accesslog
44655         if test "$ol_enable_accesslog" = mod ; then
44656                 MFLAG=SLAPD_MOD_DYNAMIC
44657                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
44658         else
44659                 MFLAG=SLAPD_MOD_STATIC
44660                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
44661         fi
44662
44663 cat >>confdefs.h <<_ACEOF
44664 #define SLAPD_OVER_ACCESSLOG $MFLAG
44665 _ACEOF
44666
44667 fi
44668
44669 if test "$ol_enable_auditlog" != no ; then
44670         BUILD_AUDITLOG=$ol_enable_auditlog
44671         if test "$ol_enable_auditlog" = mod ; then
44672                 MFLAG=SLAPD_MOD_DYNAMIC
44673                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS auditlog.la"
44674         else
44675                 MFLAG=SLAPD_MOD_STATIC
44676                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS auditlog.o"
44677         fi
44678
44679 cat >>confdefs.h <<_ACEOF
44680 #define SLAPD_OVER_AUDITLOG $MFLAG
44681 _ACEOF
44682
44683 fi
44684
44685 if test "$ol_enable_denyop" != no ; then
44686         BUILD_DENYOP=$ol_enable_denyop
44687         if test "$ol_enable_denyop" = mod ; then
44688                 MFLAG=SLAPD_MOD_DYNAMIC
44689                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
44690         else
44691                 MFLAG=SLAPD_MOD_STATIC
44692                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS denyop.o"
44693         fi
44694
44695 cat >>confdefs.h <<_ACEOF
44696 #define SLAPD_OVER_DENYOP $MFLAG
44697 _ACEOF
44698
44699 fi
44700
44701 if test "$ol_enable_dyngroup" != no ; then
44702         BUILD_DYNGROUP=$ol_enable_dyngroup
44703         if test "$ol_enable_dyngroup" = mod ; then
44704                 MFLAG=SLAPD_MOD_DYNAMIC
44705                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
44706         else
44707                 MFLAG=SLAPD_MOD_STATIC
44708                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
44709         fi
44710
44711 cat >>confdefs.h <<_ACEOF
44712 #define SLAPD_OVER_DYNGROUP $MFLAG
44713 _ACEOF
44714
44715 fi
44716
44717 if test "$ol_enable_dynlist" != no ; then
44718         BUILD_DYNLIST=$ol_enable_dynlist
44719         if test "$ol_enable_dynlist" = mod ; then
44720                 MFLAG=SLAPD_MOD_DYNAMIC
44721                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
44722         else
44723                 MFLAG=SLAPD_MOD_STATIC
44724                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
44725         fi
44726
44727 cat >>confdefs.h <<_ACEOF
44728 #define SLAPD_OVER_DYNLIST $MFLAG
44729 _ACEOF
44730
44731 fi
44732
44733 if test "$ol_enable_lastmod" != no ; then
44734         BUILD_LASTMOD=$ol_enable_lastmod
44735         if test "$ol_enable_lastmod" = mod ; then
44736                 MFLAG=SLAPD_MOD_DYNAMIC
44737                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
44738         else
44739                 MFLAG=SLAPD_MOD_STATIC
44740                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS lastmod.o"
44741         fi
44742
44743 cat >>confdefs.h <<_ACEOF
44744 #define SLAPD_OVER_LASTMOD $MFLAG
44745 _ACEOF
44746
44747 fi
44748
44749 if test "$ol_enable_ppolicy" != no ; then
44750         BUILD_PPOLICY=$ol_enable_ppolicy
44751         if test "$ol_enable_ppolicy" = mod ; then
44752                 MFLAG=SLAPD_MOD_DYNAMIC
44753                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
44754         else
44755                 MFLAG=SLAPD_MOD_STATIC
44756                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
44757         fi
44758
44759 cat >>confdefs.h <<_ACEOF
44760 #define SLAPD_OVER_PPOLICY $MFLAG
44761 _ACEOF
44762
44763 fi
44764
44765 if test "$ol_enable_proxycache" != no ; then
44766         BUILD_PROXYCACHE=$ol_enable_proxycache
44767         if test "$ol_enable_proxycache" = mod ; then
44768                 MFLAG=SLAPD_MOD_DYNAMIC
44769                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
44770         else
44771                 MFLAG=SLAPD_MOD_STATIC
44772                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
44773         fi
44774
44775 cat >>confdefs.h <<_ACEOF
44776 #define SLAPD_OVER_PROXYCACHE $MFLAG
44777 _ACEOF
44778
44779 fi
44780
44781 if test "$ol_enable_refint" != no ; then
44782         BUILD_REFINT=$ol_enable_refint
44783         if test "$ol_enable_refint" = mod ; then
44784                 MFLAG=SLAPD_MOD_DYNAMIC
44785                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
44786         else
44787                 MFLAG=SLAPD_MOD_STATIC
44788                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
44789         fi
44790
44791 cat >>confdefs.h <<_ACEOF
44792 #define SLAPD_OVER_REFINT $MFLAG
44793 _ACEOF
44794
44795 fi
44796
44797 if test "$ol_enable_retcode" != no ; then
44798         BUILD_RETCODE=$ol_enable_retcode
44799         if test "$ol_enable_retcode" = mod ; then
44800                 MFLAG=SLAPD_MOD_DYNAMIC
44801                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
44802         else
44803                 MFLAG=SLAPD_MOD_STATIC
44804                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
44805         fi
44806
44807 cat >>confdefs.h <<_ACEOF
44808 #define SLAPD_OVER_RETCODE $MFLAG
44809 _ACEOF
44810
44811 fi
44812
44813 if test "$ol_enable_rwm" != no ; then
44814         BUILD_REWRITE=yes
44815         BUILD_RWM=$ol_enable_rwm
44816         if test "$ol_enable_rwm" = mod ; then
44817                 MFLAG=SLAPD_MOD_DYNAMIC
44818                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
44819         else
44820                 MFLAG=SLAPD_MOD_STATIC
44821                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
44822         fi
44823
44824 cat >>confdefs.h <<_ACEOF
44825 #define SLAPD_OVER_RWM $MFLAG
44826 _ACEOF
44827
44828 fi
44829
44830 if test "$ol_enable_syncprov" != no ; then
44831         BUILD_SYNCPROV=$ol_enable_syncprov
44832         if test "$ol_enable_syncprov" = mod ; then
44833                 MFLAG=SLAPD_MOD_DYNAMIC
44834                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
44835         else
44836                 MFLAG=SLAPD_MOD_STATIC
44837                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
44838         fi
44839
44840 cat >>confdefs.h <<_ACEOF
44841 #define SLAPD_OVER_SYNCPROV $MFLAG
44842 _ACEOF
44843
44844 fi
44845
44846 if test "$ol_enable_translucent" != no ; then
44847         BUILD_TRANSLUCENT=$ol_enable_translucent
44848         if test "$ol_enable_translucent" = mod ; then
44849                 MFLAG=SLAPD_MOD_DYNAMIC
44850                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
44851         else
44852                 MFLAG=SLAPD_MOD_STATIC
44853                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
44854         fi
44855
44856 cat >>confdefs.h <<_ACEOF
44857 #define SLAPD_OVER_TRANSLUCENT $MFLAG
44858 _ACEOF
44859
44860 fi
44861
44862 if test "$ol_enable_unique" != no ; then
44863         BUILD_UNIQUE=$ol_enable_unique
44864         if test "$ol_enable_unique" = mod ; then
44865                 MFLAG=SLAPD_MOD_DYNAMIC
44866                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
44867         else
44868                 MFLAG=SLAPD_MOD_STATIC
44869                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
44870         fi
44871
44872 cat >>confdefs.h <<_ACEOF
44873 #define SLAPD_OVER_UNIQUE $MFLAG
44874 _ACEOF
44875
44876 fi
44877
44878 if test "$ol_enable_valsort" != no ; then
44879         BUILD_VALSORT=$ol_enable_valsort
44880         if test "$ol_enable_valsort" = mod ; then
44881                 MFLAG=SLAPD_MOD_DYNAMIC
44882                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS valsort.la"
44883         else
44884                 MFLAG=SLAPD_MOD_STATIC
44885                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS valsort.o"
44886         fi
44887
44888 cat >>confdefs.h <<_ACEOF
44889 #define SLAPD_OVER_VALSORT $MFLAG
44890 _ACEOF
44891
44892 fi
44893
44894 if test "$ol_enable_slurpd" != no &&
44895    test "$ol_link_threads" != no &&
44896    test $BUILD_SLAPD = yes ; then
44897         BUILD_SLURPD=yes
44898 fi
44899
44900 if test "$ol_enable_rewrite" != no ; then
44901
44902 cat >>confdefs.h <<\_ACEOF
44903 #define ENABLE_REWRITE 1
44904 _ACEOF
44905
44906         BUILD_REWRITE=yes
44907 fi
44908
44909 if test "$ol_enable_slapi" != no ; then
44910
44911 cat >>confdefs.h <<\_ACEOF
44912 #define ENABLE_SLAPI 1
44913 _ACEOF
44914
44915         BUILD_SLAPI=yes
44916         SLAPD_SLAPI_DEPEND=libslapi.a
44917 fi
44918
44919
44920
44921 if test "$ac_cv_mingw32" = yes ; then
44922         PLAT=NT
44923         SLAPD_MODULES_LDFLAGS=
44924 else
44925         PLAT=UNIX
44926 fi
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
44987
44988
44989
44990
44991
44992
44993
44994
44995
44996
44997
44998
44999
45000
45001
45002
45003
45004
45005
45006
45007
45008
45009 # Check whether --with-xxinstall or --without-xxinstall was given.
45010 if test "${with_xxinstall+set}" = set; then
45011   withval="$with_xxinstall"
45012
45013 fi;
45014
45015
45016                                                                                                                                                                                                                                                                                                                                                                                                                 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"
45017
45018
45019           ac_config_commands="$ac_config_commands default"
45020
45021
45022
45023 test "x$prefix" = xNONE && prefix=$ac_default_prefix
45024 # Let make expand exec_prefix.
45025 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
45026
45027 # VPATH may cause trouble with some makes, so we remove $(srcdir),
45028 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
45029 # trailing colons and then remove the whole line if VPATH becomes empty
45030 # (actually we leave an empty line to preserve line numbers).
45031 if test "x$srcdir" = x.; then
45032   ac_vpsub='/^[  ]*VPATH[        ]*=/{
45033 s/:*\$(srcdir):*/:/;
45034 s/:*\${srcdir}:*/:/;
45035 s/:*@srcdir@:*/:/;
45036 s/^\([^=]*=[     ]*\):*/\1/;
45037 s/:*$//;
45038 s/^[^=]*=[       ]*$//;
45039 }'
45040 fi
45041
45042 DEFS=-DHAVE_CONFIG_H
45043
45044 ac_libobjs=
45045 ac_ltlibobjs=
45046 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
45047   # 1. Remove the extension, and $U if already installed.
45048   ac_i=`echo "$ac_i" |
45049          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
45050   # 2. Add them.
45051   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
45052   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
45053 done
45054 LIBOBJS=$ac_libobjs
45055
45056 LTLIBOBJS=$ac_ltlibobjs
45057
45058
45059 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
45060   { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
45061 Usually this means the macro was only invoked conditionally." >&5
45062 echo "$as_me: error: conditional \"AMDEP\" was never defined.
45063 Usually this means the macro was only invoked conditionally." >&2;}
45064    { (exit 1); exit 1; }; }
45065 fi
45066 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
45067   { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
45068 Usually this means the macro was only invoked conditionally." >&5
45069 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
45070 Usually this means the macro was only invoked conditionally." >&2;}
45071    { (exit 1); exit 1; }; }
45072 fi
45073 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
45074   { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
45075 Usually this means the macro was only invoked conditionally." >&5
45076 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
45077 Usually this means the macro was only invoked conditionally." >&2;}
45078    { (exit 1); exit 1; }; }
45079 fi
45080
45081 : ${CONFIG_STATUS=./config.status}
45082 ac_clean_files_save=$ac_clean_files
45083 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
45084 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
45085 echo "$as_me: creating $CONFIG_STATUS" >&6;}
45086 cat >$CONFIG_STATUS <<_ACEOF
45087 #! $SHELL
45088 # Generated by $as_me.
45089 # Run this file to recreate the current configuration.
45090 # Compiler output produced by configure, useful for debugging
45091 # configure, is in config.log if it exists.
45092
45093 debug=false
45094 ac_cs_recheck=false
45095 ac_cs_silent=false
45096 SHELL=\${CONFIG_SHELL-$SHELL}
45097 _ACEOF
45098
45099 cat >>$CONFIG_STATUS <<\_ACEOF
45100 ## --------------------- ##
45101 ## M4sh Initialization.  ##
45102 ## --------------------- ##
45103
45104 # Be Bourne compatible
45105 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
45106   emulate sh
45107   NULLCMD=:
45108   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
45109   # is contrary to our usage.  Disable this feature.
45110   alias -g '${1+"$@"}'='"$@"'
45111 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
45112   set -o posix
45113 fi
45114 DUALCASE=1; export DUALCASE # for MKS sh
45115
45116 # Support unset when possible.
45117 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
45118   as_unset=unset
45119 else
45120   as_unset=false
45121 fi
45122
45123
45124 # Work around bugs in pre-3.0 UWIN ksh.
45125 $as_unset ENV MAIL MAILPATH
45126 PS1='$ '
45127 PS2='> '
45128 PS4='+ '
45129
45130 # NLS nuisances.
45131 for as_var in \
45132   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
45133   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
45134   LC_TELEPHONE LC_TIME
45135 do
45136   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
45137     eval $as_var=C; export $as_var
45138   else
45139     $as_unset $as_var
45140   fi
45141 done
45142
45143 # Required to use basename.
45144 if expr a : '\(a\)' >/dev/null 2>&1; then
45145   as_expr=expr
45146 else
45147   as_expr=false
45148 fi
45149
45150 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
45151   as_basename=basename
45152 else
45153   as_basename=false
45154 fi
45155
45156
45157 # Name of the executable.
45158 as_me=`$as_basename "$0" ||
45159 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
45160          X"$0" : 'X\(//\)$' \| \
45161          X"$0" : 'X\(/\)$' \| \
45162          .     : '\(.\)' 2>/dev/null ||
45163 echo X/"$0" |
45164     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
45165           /^X\/\(\/\/\)$/{ s//\1/; q; }
45166           /^X\/\(\/\).*/{ s//\1/; q; }
45167           s/.*/./; q'`
45168
45169
45170 # PATH needs CR, and LINENO needs CR and PATH.
45171 # Avoid depending upon Character Ranges.
45172 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
45173 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
45174 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
45175 as_cr_digits='0123456789'
45176 as_cr_alnum=$as_cr_Letters$as_cr_digits
45177
45178 # The user is always right.
45179 if test "${PATH_SEPARATOR+set}" != set; then
45180   echo "#! /bin/sh" >conf$$.sh
45181   echo  "exit 0"   >>conf$$.sh
45182   chmod +x conf$$.sh
45183   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
45184     PATH_SEPARATOR=';'
45185   else
45186     PATH_SEPARATOR=:
45187   fi
45188   rm -f conf$$.sh
45189 fi
45190
45191
45192   as_lineno_1=$LINENO
45193   as_lineno_2=$LINENO
45194   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
45195   test "x$as_lineno_1" != "x$as_lineno_2" &&
45196   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
45197   # Find who we are.  Look in the path if we contain no path at all
45198   # relative or not.
45199   case $0 in
45200     *[\\/]* ) as_myself=$0 ;;
45201     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45202 for as_dir in $PATH
45203 do
45204   IFS=$as_save_IFS
45205   test -z "$as_dir" && as_dir=.
45206   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
45207 done
45208
45209        ;;
45210   esac
45211   # We did not find ourselves, most probably we were run as `sh COMMAND'
45212   # in which case we are not to be found in the path.
45213   if test "x$as_myself" = x; then
45214     as_myself=$0
45215   fi
45216   if test ! -f "$as_myself"; then
45217     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
45218 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
45219    { (exit 1); exit 1; }; }
45220   fi
45221   case $CONFIG_SHELL in
45222   '')
45223     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45224 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
45225 do
45226   IFS=$as_save_IFS
45227   test -z "$as_dir" && as_dir=.
45228   for as_base in sh bash ksh sh5; do
45229          case $as_dir in
45230          /*)
45231            if ("$as_dir/$as_base" -c '
45232   as_lineno_1=$LINENO
45233   as_lineno_2=$LINENO
45234   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
45235   test "x$as_lineno_1" != "x$as_lineno_2" &&
45236   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
45237              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
45238              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
45239              CONFIG_SHELL=$as_dir/$as_base
45240              export CONFIG_SHELL
45241              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
45242            fi;;
45243          esac
45244        done
45245 done
45246 ;;
45247   esac
45248
45249   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
45250   # uniformly replaced by the line number.  The first 'sed' inserts a
45251   # line-number line before each line; the second 'sed' does the real
45252   # work.  The second script uses 'N' to pair each line-number line
45253   # with the numbered line, and appends trailing '-' during
45254   # substitution so that $LINENO is not a special case at line end.
45255   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
45256   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
45257   sed '=' <$as_myself |
45258     sed '
45259       N
45260       s,$,-,
45261       : loop
45262       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
45263       t loop
45264       s,-$,,
45265       s,^['$as_cr_digits']*\n,,
45266     ' >$as_me.lineno &&
45267   chmod +x $as_me.lineno ||
45268     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
45269 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
45270    { (exit 1); exit 1; }; }
45271
45272   # Don't try to exec as it changes $[0], causing all sort of problems
45273   # (the dirname of $[0] is not the place where we might find the
45274   # original and so on.  Autoconf is especially sensible to this).
45275   . ./$as_me.lineno
45276   # Exit status is that of the last command.
45277   exit
45278 }
45279
45280
45281 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
45282   *c*,-n*) ECHO_N= ECHO_C='
45283 ' ECHO_T='      ' ;;
45284   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
45285   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
45286 esac
45287
45288 if expr a : '\(a\)' >/dev/null 2>&1; then
45289   as_expr=expr
45290 else
45291   as_expr=false
45292 fi
45293
45294 rm -f conf$$ conf$$.exe conf$$.file
45295 echo >conf$$.file
45296 if ln -s conf$$.file conf$$ 2>/dev/null; then
45297   # We could just check for DJGPP; but this test a) works b) is more generic
45298   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45299   if test -f conf$$.exe; then
45300     # Don't use ln at all; we don't have any links
45301     as_ln_s='cp -p'
45302   else
45303     as_ln_s='ln -s'
45304   fi
45305 elif ln conf$$.file conf$$ 2>/dev/null; then
45306   as_ln_s=ln
45307 else
45308   as_ln_s='cp -p'
45309 fi
45310 rm -f conf$$ conf$$.exe conf$$.file
45311
45312 if mkdir -p . 2>/dev/null; then
45313   as_mkdir_p=:
45314 else
45315   test -d ./-p && rmdir ./-p
45316   as_mkdir_p=false
45317 fi
45318
45319 as_executable_p="test -f"
45320
45321 # Sed expression to map a string onto a valid CPP name.
45322 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
45323
45324 # Sed expression to map a string onto a valid variable name.
45325 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
45326
45327
45328 # IFS
45329 # We need space, tab and new line, in precisely that order.
45330 as_nl='
45331 '
45332 IFS="   $as_nl"
45333
45334 # CDPATH.
45335 $as_unset CDPATH
45336
45337 exec 6>&1
45338
45339 # Open the log real soon, to keep \$[0] and so on meaningful, and to
45340 # report actual input values of CONFIG_FILES etc. instead of their
45341 # values after options handling.  Logging --version etc. is OK.
45342 exec 5>>config.log
45343 {
45344   echo
45345   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
45346 ## Running $as_me. ##
45347 _ASBOX
45348 } >&5
45349 cat >&5 <<_CSEOF
45350
45351 This file was extended by $as_me, which was
45352 generated by GNU Autoconf 2.59.  Invocation command line was
45353
45354   CONFIG_FILES    = $CONFIG_FILES
45355   CONFIG_HEADERS  = $CONFIG_HEADERS
45356   CONFIG_LINKS    = $CONFIG_LINKS
45357   CONFIG_COMMANDS = $CONFIG_COMMANDS
45358   $ $0 $@
45359
45360 _CSEOF
45361 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
45362 echo >&5
45363 _ACEOF
45364
45365 # Files that config.status was made for.
45366 if test -n "$ac_config_files"; then
45367   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
45368 fi
45369
45370 if test -n "$ac_config_headers"; then
45371   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
45372 fi
45373
45374 if test -n "$ac_config_links"; then
45375   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
45376 fi
45377
45378 if test -n "$ac_config_commands"; then
45379   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
45380 fi
45381
45382 cat >>$CONFIG_STATUS <<\_ACEOF
45383
45384 ac_cs_usage="\
45385 \`$as_me' instantiates files from templates according to the
45386 current configuration.
45387
45388 Usage: $0 [OPTIONS] [FILE]...
45389
45390   -h, --help       print this help, then exit
45391   -V, --version    print version number, then exit
45392   -q, --quiet      do not print progress messages
45393   -d, --debug      don't remove temporary files
45394       --recheck    update $as_me by reconfiguring in the same conditions
45395   --file=FILE[:TEMPLATE]
45396                    instantiate the configuration file FILE
45397   --header=FILE[:TEMPLATE]
45398                    instantiate the configuration header FILE
45399
45400 Configuration files:
45401 $config_files
45402
45403 Configuration headers:
45404 $config_headers
45405
45406 Configuration commands:
45407 $config_commands
45408
45409 Report bugs to <bug-autoconf@gnu.org>."
45410 _ACEOF
45411
45412 cat >>$CONFIG_STATUS <<_ACEOF
45413 ac_cs_version="\\
45414 config.status
45415 configured by $0, generated by GNU Autoconf 2.59,
45416   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
45417
45418 Copyright (C) 2003 Free Software Foundation, Inc.
45419 This config.status script is free software; the Free Software Foundation
45420 gives unlimited permission to copy, distribute and modify it."
45421 srcdir=$srcdir
45422 INSTALL="$INSTALL"
45423 _ACEOF
45424
45425 cat >>$CONFIG_STATUS <<\_ACEOF
45426 # If no file are specified by the user, then we need to provide default
45427 # value.  By we need to know if files were specified by the user.
45428 ac_need_defaults=:
45429 while test $# != 0
45430 do
45431   case $1 in
45432   --*=*)
45433     ac_option=`expr "x$1" : 'x\([^=]*\)='`
45434     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
45435     ac_shift=:
45436     ;;
45437   -*)
45438     ac_option=$1
45439     ac_optarg=$2
45440     ac_shift=shift
45441     ;;
45442   *) # This is not an option, so the user has probably given explicit
45443      # arguments.
45444      ac_option=$1
45445      ac_need_defaults=false;;
45446   esac
45447
45448   case $ac_option in
45449   # Handling of the options.
45450 _ACEOF
45451 cat >>$CONFIG_STATUS <<\_ACEOF
45452   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
45453     ac_cs_recheck=: ;;
45454   --version | --vers* | -V )
45455     echo "$ac_cs_version"; exit 0 ;;
45456   --he | --h)
45457     # Conflict between --help and --header
45458     { { echo "$as_me:$LINENO: error: ambiguous option: $1
45459 Try \`$0 --help' for more information." >&5
45460 echo "$as_me: error: ambiguous option: $1
45461 Try \`$0 --help' for more information." >&2;}
45462    { (exit 1); exit 1; }; };;
45463   --help | --hel | -h )
45464     echo "$ac_cs_usage"; exit 0 ;;
45465   --debug | --d* | -d )
45466     debug=: ;;
45467   --file | --fil | --fi | --f )
45468     $ac_shift
45469     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
45470     ac_need_defaults=false;;
45471   --header | --heade | --head | --hea )
45472     $ac_shift
45473     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
45474     ac_need_defaults=false;;
45475   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
45476   | -silent | --silent | --silen | --sile | --sil | --si | --s)
45477     ac_cs_silent=: ;;
45478
45479   # This is an error.
45480   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
45481 Try \`$0 --help' for more information." >&5
45482 echo "$as_me: error: unrecognized option: $1
45483 Try \`$0 --help' for more information." >&2;}
45484    { (exit 1); exit 1; }; } ;;
45485
45486   *) ac_config_targets="$ac_config_targets $1" ;;
45487
45488   esac
45489   shift
45490 done
45491
45492 ac_configure_extra_args=
45493
45494 if $ac_cs_silent; then
45495   exec 6>/dev/null
45496   ac_configure_extra_args="$ac_configure_extra_args --silent"
45497 fi
45498
45499 _ACEOF
45500 cat >>$CONFIG_STATUS <<_ACEOF
45501 if \$ac_cs_recheck; then
45502   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
45503   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
45504 fi
45505
45506 _ACEOF
45507
45508 cat >>$CONFIG_STATUS <<_ACEOF
45509 #
45510 # INIT-COMMANDS section.
45511 #
45512
45513 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
45514
45515 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
45516 STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS"
45517
45518
45519 _ACEOF
45520
45521
45522
45523 cat >>$CONFIG_STATUS <<\_ACEOF
45524 for ac_config_target in $ac_config_targets
45525 do
45526   case "$ac_config_target" in
45527   # Handling of arguments.
45528   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:build/top.mk:Makefile.in:build/dir.mk" ;;
45529   "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk" ;;
45530   "doc/man/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk" ;;
45531   "doc/man/man1/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk" ;;
45532   "doc/man/man3/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk" ;;
45533   "doc/man/man5/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk" ;;
45534   "doc/man/man8/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk" ;;
45535   "clients/Makefile" ) CONFIG_FILES="$CONFIG_FILES clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk" ;;
45536   "clients/tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk" ;;
45537   "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile:build/top.mk:include/Makefile.in" ;;
45538   "libraries/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk" ;;
45539   "libraries/liblber/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
45540   "libraries/libldap/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
45541   "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" ;;
45542   "libraries/liblunicode/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
45543   "libraries/liblutil/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
45544   "libraries/librewrite/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
45545   "servers/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk" ;;
45546   "servers/slapd/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk" ;;
45547   "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" ;;
45548   "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" ;;
45549   "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" ;;
45550   "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" ;;
45551   "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" ;;
45552   "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" ;;
45553   "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" ;;
45554   "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" ;;
45555   "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" ;;
45556   "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" ;;
45557   "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" ;;
45558   "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" ;;
45559   "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" ;;
45560   "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" ;;
45561   "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" ;;
45562   "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" ;;
45563   "servers/slapd/overlays/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk" ;;
45564   "servers/slurpd/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk" ;;
45565   "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;;
45566   "tests/run" ) CONFIG_FILES="$CONFIG_FILES tests/run" ;;
45567   "tests/progs/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;;
45568   "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
45569   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
45570   "include/portable.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h:include/portable.hin" ;;
45571   "include/ldap_features.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h:include/ldap_features.hin" ;;
45572   "include/lber_types.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h:include/lber_types.hin" ;;
45573   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
45574 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
45575    { (exit 1); exit 1; }; };;
45576   esac
45577 done
45578
45579 # If the user did not use the arguments to specify the items to instantiate,
45580 # then the envvar interface is used.  Set only those that are not.
45581 # We use the long form for the default assignment because of an extremely
45582 # bizarre bug on SunOS 4.1.3.
45583 if $ac_need_defaults; then
45584   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
45585   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
45586   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
45587 fi
45588
45589 # Have a temporary directory for convenience.  Make it in the build tree
45590 # simply because there is no reason to put it here, and in addition,
45591 # creating and moving files from /tmp can sometimes cause problems.
45592 # Create a temporary directory, and hook for its removal unless debugging.
45593 $debug ||
45594 {
45595   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
45596   trap '{ (exit 1); exit 1; }' 1 2 13 15
45597 }
45598
45599 # Create a (secure) tmp directory for tmp files.
45600
45601 {
45602   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
45603   test -n "$tmp" && test -d "$tmp"
45604 }  ||
45605 {
45606   tmp=./confstat$$-$RANDOM
45607   (umask 077 && mkdir $tmp)
45608 } ||
45609 {
45610    echo "$me: cannot create a temporary directory in ." >&2
45611    { (exit 1); exit 1; }
45612 }
45613
45614 _ACEOF
45615
45616 cat >>$CONFIG_STATUS <<_ACEOF
45617
45618 #
45619 # CONFIG_FILES section.
45620 #
45621
45622 # No need to generate the scripts if there are no CONFIG_FILES.
45623 # This happens for instance when ./config.status config.h
45624 if test -n "\$CONFIG_FILES"; then
45625   # Protect against being on the right side of a sed subst in config.status.
45626   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
45627    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
45628 s,@SHELL@,$SHELL,;t t
45629 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
45630 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
45631 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
45632 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
45633 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
45634 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
45635 s,@exec_prefix@,$exec_prefix,;t t
45636 s,@prefix@,$prefix,;t t
45637 s,@program_transform_name@,$program_transform_name,;t t
45638 s,@bindir@,$bindir,;t t
45639 s,@sbindir@,$sbindir,;t t
45640 s,@libexecdir@,$libexecdir,;t t
45641 s,@datadir@,$datadir,;t t
45642 s,@sysconfdir@,$sysconfdir,;t t
45643 s,@sharedstatedir@,$sharedstatedir,;t t
45644 s,@localstatedir@,$localstatedir,;t t
45645 s,@libdir@,$libdir,;t t
45646 s,@includedir@,$includedir,;t t
45647 s,@oldincludedir@,$oldincludedir,;t t
45648 s,@infodir@,$infodir,;t t
45649 s,@mandir@,$mandir,;t t
45650 s,@build_alias@,$build_alias,;t t
45651 s,@host_alias@,$host_alias,;t t
45652 s,@target_alias@,$target_alias,;t t
45653 s,@DEFS@,$DEFS,;t t
45654 s,@ECHO_C@,$ECHO_C,;t t
45655 s,@ECHO_N@,$ECHO_N,;t t
45656 s,@ECHO_T@,$ECHO_T,;t t
45657 s,@LIBS@,$LIBS,;t t
45658 s,@build@,$build,;t t
45659 s,@build_cpu@,$build_cpu,;t t
45660 s,@build_vendor@,$build_vendor,;t t
45661 s,@build_os@,$build_os,;t t
45662 s,@host@,$host,;t t
45663 s,@host_cpu@,$host_cpu,;t t
45664 s,@host_vendor@,$host_vendor,;t t
45665 s,@host_os@,$host_os,;t t
45666 s,@target@,$target,;t t
45667 s,@target_cpu@,$target_cpu,;t t
45668 s,@target_vendor@,$target_vendor,;t t
45669 s,@target_os@,$target_os,;t t
45670 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
45671 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
45672 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
45673 s,@CYGPATH_W@,$CYGPATH_W,;t t
45674 s,@PACKAGE@,$PACKAGE,;t t
45675 s,@VERSION@,$VERSION,;t t
45676 s,@ACLOCAL@,$ACLOCAL,;t t
45677 s,@AUTOCONF@,$AUTOCONF,;t t
45678 s,@AUTOMAKE@,$AUTOMAKE,;t t
45679 s,@AUTOHEADER@,$AUTOHEADER,;t t
45680 s,@MAKEINFO@,$MAKEINFO,;t t
45681 s,@install_sh@,$install_sh,;t t
45682 s,@STRIP@,$STRIP,;t t
45683 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
45684 s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
45685 s,@mkdir_p@,$mkdir_p,;t t
45686 s,@AWK@,$AWK,;t t
45687 s,@SET_MAKE@,$SET_MAKE,;t t
45688 s,@am__leading_dot@,$am__leading_dot,;t t
45689 s,@AMTAR@,$AMTAR,;t t
45690 s,@am__tar@,$am__tar,;t t
45691 s,@am__untar@,$am__untar,;t t
45692 s,@OPENLDAP_LIBRELEASE@,$OPENLDAP_LIBRELEASE,;t t
45693 s,@OPENLDAP_LIBVERSION@,$OPENLDAP_LIBVERSION,;t t
45694 s,@OPENLDAP_RELEASE_DATE@,$OPENLDAP_RELEASE_DATE,;t t
45695 s,@top_builddir@,$top_builddir,;t t
45696 s,@ldap_subdir@,$ldap_subdir,;t t
45697 s,@CC@,$CC,;t t
45698 s,@AR@,$AR,;t t
45699 s,@CFLAGS@,$CFLAGS,;t t
45700 s,@LDFLAGS@,$LDFLAGS,;t t
45701 s,@CPPFLAGS@,$CPPFLAGS,;t t
45702 s,@ac_ct_CC@,$ac_ct_CC,;t t
45703 s,@EXEEXT@,$EXEEXT,;t t
45704 s,@OBJEXT@,$OBJEXT,;t t
45705 s,@DEPDIR@,$DEPDIR,;t t
45706 s,@am__include@,$am__include,;t t
45707 s,@am__quote@,$am__quote,;t t
45708 s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
45709 s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
45710 s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
45711 s,@CCDEPMODE@,$CCDEPMODE,;t t
45712 s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
45713 s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
45714 s,@EGREP@,$EGREP,;t t
45715 s,@LN_S@,$LN_S,;t t
45716 s,@ECHO@,$ECHO,;t t
45717 s,@ac_ct_AR@,$ac_ct_AR,;t t
45718 s,@RANLIB@,$RANLIB,;t t
45719 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
45720 s,@DLLTOOL@,$DLLTOOL,;t t
45721 s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
45722 s,@AS@,$AS,;t t
45723 s,@ac_ct_AS@,$ac_ct_AS,;t t
45724 s,@OBJDUMP@,$OBJDUMP,;t t
45725 s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t
45726 s,@CPP@,$CPP,;t t
45727 s,@LIBTOOL@,$LIBTOOL,;t t
45728 s,@PERLBIN@,$PERLBIN,;t t
45729 s,@OL_MKDEP@,$OL_MKDEP,;t t
45730 s,@OL_MKDEP_FLAGS@,$OL_MKDEP_FLAGS,;t t
45731 s,@LTSTATIC@,$LTSTATIC,;t t
45732 s,@LIBOBJS@,$LIBOBJS,;t t
45733 s,@LIBSRCS@,$LIBSRCS,;t t
45734 s,@PLAT@,$PLAT,;t t
45735 s,@WITH_SASL@,$WITH_SASL,;t t
45736 s,@WITH_TLS@,$WITH_TLS,;t t
45737 s,@WITH_MODULES_ENABLED@,$WITH_MODULES_ENABLED,;t t
45738 s,@WITH_ACI_ENABLED@,$WITH_ACI_ENABLED,;t t
45739 s,@BUILD_THREAD@,$BUILD_THREAD,;t t
45740 s,@BUILD_LIBS_DYNAMIC@,$BUILD_LIBS_DYNAMIC,;t t
45741 s,@BUILD_SLAPD@,$BUILD_SLAPD,;t t
45742 s,@BUILD_SLAPI@,$BUILD_SLAPI,;t t
45743 s,@SLAPD_SLAPI_DEPEND@,$SLAPD_SLAPI_DEPEND,;t t
45744 s,@BUILD_BDB@,$BUILD_BDB,;t t
45745 s,@BUILD_DNSSRV@,$BUILD_DNSSRV,;t t
45746 s,@BUILD_HDB@,$BUILD_HDB,;t t
45747 s,@BUILD_LDAP@,$BUILD_LDAP,;t t
45748 s,@BUILD_LDBM@,$BUILD_LDBM,;t t
45749 s,@BUILD_META@,$BUILD_META,;t t
45750 s,@BUILD_MONITOR@,$BUILD_MONITOR,;t t
45751 s,@BUILD_NULL@,$BUILD_NULL,;t t
45752 s,@BUILD_PASSWD@,$BUILD_PASSWD,;t t
45753 s,@BUILD_RELAY@,$BUILD_RELAY,;t t
45754 s,@BUILD_PERL@,$BUILD_PERL,;t t
45755 s,@BUILD_SHELL@,$BUILD_SHELL,;t t
45756 s,@BUILD_SQL@,$BUILD_SQL,;t t
45757 s,@BUILD_ACCESSLOG@,$BUILD_ACCESSLOG,;t t
45758 s,@BUILD_AUDITLOG@,$BUILD_AUDITLOG,;t t
45759 s,@BUILD_DENYOP@,$BUILD_DENYOP,;t t
45760 s,@BUILD_DYNGROUP@,$BUILD_DYNGROUP,;t t
45761 s,@BUILD_DYNLIST@,$BUILD_DYNLIST,;t t
45762 s,@BUILD_LASTMOD@,$BUILD_LASTMOD,;t t
45763 s,@BUILD_PPOLICY@,$BUILD_PPOLICY,;t t
45764 s,@BUILD_PROXYCACHE@,$BUILD_PROXYCACHE,;t t
45765 s,@BUILD_REFINT@,$BUILD_REFINT,;t t
45766 s,@BUILD_RETCODE@,$BUILD_RETCODE,;t t
45767 s,@BUILD_RWM@,$BUILD_RWM,;t t
45768 s,@BUILD_SYNCPROV@,$BUILD_SYNCPROV,;t t
45769 s,@BUILD_TRANSLUCENT@,$BUILD_TRANSLUCENT,;t t
45770 s,@BUILD_UNIQUE@,$BUILD_UNIQUE,;t t
45771 s,@BUILD_VALSORT@,$BUILD_VALSORT,;t t
45772 s,@BUILD_SLURPD@,$BUILD_SLURPD,;t t
45773 s,@LDAP_LIBS@,$LDAP_LIBS,;t t
45774 s,@SLAPD_LIBS@,$SLAPD_LIBS,;t t
45775 s,@SLURPD_LIBS@,$SLURPD_LIBS,;t t
45776 s,@LDBM_LIBS@,$LDBM_LIBS,;t t
45777 s,@LTHREAD_LIBS@,$LTHREAD_LIBS,;t t
45778 s,@LUTIL_LIBS@,$LUTIL_LIBS,;t t
45779 s,@WRAP_LIBS@,$WRAP_LIBS,;t t
45780 s,@SLAPD_MODULES_CPPFLAGS@,$SLAPD_MODULES_CPPFLAGS,;t t
45781 s,@SLAPD_MODULES_LDFLAGS@,$SLAPD_MODULES_LDFLAGS,;t t
45782 s,@SLAPD_NO_STATIC@,$SLAPD_NO_STATIC,;t t
45783 s,@SLAPD_STATIC_BACKENDS@,$SLAPD_STATIC_BACKENDS,;t t
45784 s,@SLAPD_DYNAMIC_BACKENDS@,$SLAPD_DYNAMIC_BACKENDS,;t t
45785 s,@SLAPD_STATIC_OVERLAYS@,$SLAPD_STATIC_OVERLAYS,;t t
45786 s,@SLAPD_DYNAMIC_OVERLAYS@,$SLAPD_DYNAMIC_OVERLAYS,;t t
45787 s,@PERL_CPPFLAGS@,$PERL_CPPFLAGS,;t t
45788 s,@SLAPD_PERL_LDFLAGS@,$SLAPD_PERL_LDFLAGS,;t t
45789 s,@MOD_PERL_LDFLAGS@,$MOD_PERL_LDFLAGS,;t t
45790 s,@KRB4_LIBS@,$KRB4_LIBS,;t t
45791 s,@KRB5_LIBS@,$KRB5_LIBS,;t t
45792 s,@SASL_LIBS@,$SASL_LIBS,;t t
45793 s,@TLS_LIBS@,$TLS_LIBS,;t t
45794 s,@MODULES_LIBS@,$MODULES_LIBS,;t t
45795 s,@SLAPI_LIBS@,$SLAPI_LIBS,;t t
45796 s,@LIBSLAPI@,$LIBSLAPI,;t t
45797 s,@LIBSLAPITOOLS@,$LIBSLAPITOOLS,;t t
45798 s,@AUTH_LIBS@,$AUTH_LIBS,;t t
45799 s,@SLAPD_SLP_LIBS@,$SLAPD_SLP_LIBS,;t t
45800 s,@SLAPD_GMP_LIBS@,$SLAPD_GMP_LIBS,;t t
45801 s,@SLAPD_SQL_LDFLAGS@,$SLAPD_SQL_LDFLAGS,;t t
45802 s,@SLAPD_SQL_LIBS@,$SLAPD_SQL_LIBS,;t t
45803 s,@SLAPD_SQL_INCLUDES@,$SLAPD_SQL_INCLUDES,;t t
45804 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
45805 CEOF
45806
45807 _ACEOF
45808
45809   cat >>$CONFIG_STATUS <<\_ACEOF
45810   # Split the substitutions into bite-sized pieces for seds with
45811   # small command number limits, like on Digital OSF/1 and HP-UX.
45812   ac_max_sed_lines=48
45813   ac_sed_frag=1 # Number of current file.
45814   ac_beg=1 # First line for current file.
45815   ac_end=$ac_max_sed_lines # Line after last line for current file.
45816   ac_more_lines=:
45817   ac_sed_cmds=
45818   while $ac_more_lines; do
45819     if test $ac_beg -gt 1; then
45820       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
45821     else
45822       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
45823     fi
45824     if test ! -s $tmp/subs.frag; then
45825       ac_more_lines=false
45826     else
45827       # The purpose of the label and of the branching condition is to
45828       # speed up the sed processing (if there are no `@' at all, there
45829       # is no need to browse any of the substitutions).
45830       # These are the two extra sed commands mentioned above.
45831       (echo ':t
45832   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
45833       if test -z "$ac_sed_cmds"; then
45834         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
45835       else
45836         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
45837       fi
45838       ac_sed_frag=`expr $ac_sed_frag + 1`
45839       ac_beg=$ac_end
45840       ac_end=`expr $ac_end + $ac_max_sed_lines`
45841     fi
45842   done
45843   if test -z "$ac_sed_cmds"; then
45844     ac_sed_cmds=cat
45845   fi
45846 fi # test -n "$CONFIG_FILES"
45847
45848 _ACEOF
45849 cat >>$CONFIG_STATUS <<\_ACEOF
45850 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
45851   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
45852   case $ac_file in
45853   - | *:- | *:-:* ) # input from stdin
45854         cat >$tmp/stdin
45855         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
45856         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
45857   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
45858         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
45859   * )   ac_file_in=$ac_file.in ;;
45860   esac
45861
45862   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
45863   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
45864 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
45865          X"$ac_file" : 'X\(//\)[^/]' \| \
45866          X"$ac_file" : 'X\(//\)$' \| \
45867          X"$ac_file" : 'X\(/\)' \| \
45868          .     : '\(.\)' 2>/dev/null ||
45869 echo X"$ac_file" |
45870     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
45871           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
45872           /^X\(\/\/\)$/{ s//\1/; q; }
45873           /^X\(\/\).*/{ s//\1/; q; }
45874           s/.*/./; q'`
45875   { if $as_mkdir_p; then
45876     mkdir -p "$ac_dir"
45877   else
45878     as_dir="$ac_dir"
45879     as_dirs=
45880     while test ! -d "$as_dir"; do
45881       as_dirs="$as_dir $as_dirs"
45882       as_dir=`(dirname "$as_dir") 2>/dev/null ||
45883 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
45884          X"$as_dir" : 'X\(//\)[^/]' \| \
45885          X"$as_dir" : 'X\(//\)$' \| \
45886          X"$as_dir" : 'X\(/\)' \| \
45887          .     : '\(.\)' 2>/dev/null ||
45888 echo X"$as_dir" |
45889     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
45890           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
45891           /^X\(\/\/\)$/{ s//\1/; q; }
45892           /^X\(\/\).*/{ s//\1/; q; }
45893           s/.*/./; q'`
45894     done
45895     test ! -n "$as_dirs" || mkdir $as_dirs
45896   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
45897 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
45898    { (exit 1); exit 1; }; }; }
45899
45900   ac_builddir=.
45901
45902 if test "$ac_dir" != .; then
45903   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
45904   # A "../" for each directory in $ac_dir_suffix.
45905   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
45906 else
45907   ac_dir_suffix= ac_top_builddir=
45908 fi
45909
45910 case $srcdir in
45911   .)  # No --srcdir option.  We are building in place.
45912     ac_srcdir=.
45913     if test -z "$ac_top_builddir"; then
45914        ac_top_srcdir=.
45915     else
45916        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
45917     fi ;;
45918   [\\/]* | ?:[\\/]* )  # Absolute path.
45919     ac_srcdir=$srcdir$ac_dir_suffix;
45920     ac_top_srcdir=$srcdir ;;
45921   *) # Relative path.
45922     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
45923     ac_top_srcdir=$ac_top_builddir$srcdir ;;
45924 esac
45925
45926 # Do not use `cd foo && pwd` to compute absolute paths, because
45927 # the directories may not exist.
45928 case `pwd` in
45929 .) ac_abs_builddir="$ac_dir";;
45930 *)
45931   case "$ac_dir" in
45932   .) ac_abs_builddir=`pwd`;;
45933   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
45934   *) ac_abs_builddir=`pwd`/"$ac_dir";;
45935   esac;;
45936 esac
45937 case $ac_abs_builddir in
45938 .) ac_abs_top_builddir=${ac_top_builddir}.;;
45939 *)
45940   case ${ac_top_builddir}. in
45941   .) ac_abs_top_builddir=$ac_abs_builddir;;
45942   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
45943   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
45944   esac;;
45945 esac
45946 case $ac_abs_builddir in
45947 .) ac_abs_srcdir=$ac_srcdir;;
45948 *)
45949   case $ac_srcdir in
45950   .) ac_abs_srcdir=$ac_abs_builddir;;
45951   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
45952   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
45953   esac;;
45954 esac
45955 case $ac_abs_builddir in
45956 .) ac_abs_top_srcdir=$ac_top_srcdir;;
45957 *)
45958   case $ac_top_srcdir in
45959   .) ac_abs_top_srcdir=$ac_abs_builddir;;
45960   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
45961   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
45962   esac;;
45963 esac
45964
45965
45966   case $INSTALL in
45967   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
45968   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
45969   esac
45970
45971   if test x"$ac_file" != x-; then
45972     { echo "$as_me:$LINENO: creating $ac_file" >&5
45973 echo "$as_me: creating $ac_file" >&6;}
45974     rm -f "$ac_file"
45975   fi
45976   # Let's still pretend it is `configure' which instantiates (i.e., don't
45977   # use $as_me), people would be surprised to read:
45978   #    /* config.h.  Generated by config.status.  */
45979   if test x"$ac_file" = x-; then
45980     configure_input=
45981   else
45982     configure_input="$ac_file.  "
45983   fi
45984   configure_input=$configure_input"Generated from `echo $ac_file_in |
45985                                      sed 's,.*/,,'` by configure."
45986
45987   # First look for the input files in the build tree, otherwise in the
45988   # src tree.
45989   ac_file_inputs=`IFS=:
45990     for f in $ac_file_in; do
45991       case $f in
45992       -) echo $tmp/stdin ;;
45993       [\\/$]*)
45994          # Absolute (can't be DOS-style, as IFS=:)
45995          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
45996 echo "$as_me: error: cannot find input file: $f" >&2;}
45997    { (exit 1); exit 1; }; }
45998          echo "$f";;
45999       *) # Relative
46000          if test -f "$f"; then
46001            # Build tree
46002            echo "$f"
46003          elif test -f "$srcdir/$f"; then
46004            # Source tree
46005            echo "$srcdir/$f"
46006          else
46007            # /dev/null tree
46008            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
46009 echo "$as_me: error: cannot find input file: $f" >&2;}
46010    { (exit 1); exit 1; }; }
46011          fi;;
46012       esac
46013     done` || { (exit 1); exit 1; }
46014 _ACEOF
46015 cat >>$CONFIG_STATUS <<_ACEOF
46016   sed "$ac_vpsub
46017 $extrasub
46018 _ACEOF
46019 cat >>$CONFIG_STATUS <<\_ACEOF
46020 :t
46021 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
46022 s,@configure_input@,$configure_input,;t t
46023 s,@srcdir@,$ac_srcdir,;t t
46024 s,@abs_srcdir@,$ac_abs_srcdir,;t t
46025 s,@top_srcdir@,$ac_top_srcdir,;t t
46026 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
46027 s,@builddir@,$ac_builddir,;t t
46028 s,@abs_builddir@,$ac_abs_builddir,;t t
46029 s,@top_builddir@,$ac_top_builddir,;t t
46030 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
46031 s,@INSTALL@,$ac_INSTALL,;t t
46032 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
46033   rm -f $tmp/stdin
46034   if test x"$ac_file" != x-; then
46035     mv $tmp/out $ac_file
46036   else
46037     cat $tmp/out
46038     rm -f $tmp/out
46039   fi
46040
46041 done
46042 _ACEOF
46043 cat >>$CONFIG_STATUS <<\_ACEOF
46044
46045 #
46046 # CONFIG_HEADER section.
46047 #
46048
46049 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
46050 # NAME is the cpp macro being defined and VALUE is the value it is being given.
46051 #
46052 # ac_d sets the value in "#define NAME VALUE" lines.
46053 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
46054 ac_dB='[         ].*$,\1#\2'
46055 ac_dC=' '
46056 ac_dD=',;t'
46057 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
46058 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
46059 ac_uB='$,\1#\2define\3'
46060 ac_uC=' '
46061 ac_uD=',;t'
46062
46063 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
46064   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
46065   case $ac_file in
46066   - | *:- | *:-:* ) # input from stdin
46067         cat >$tmp/stdin
46068         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
46069         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
46070   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
46071         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
46072   * )   ac_file_in=$ac_file.in ;;
46073   esac
46074
46075   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
46076 echo "$as_me: creating $ac_file" >&6;}
46077
46078   # First look for the input files in the build tree, otherwise in the
46079   # src tree.
46080   ac_file_inputs=`IFS=:
46081     for f in $ac_file_in; do
46082       case $f in
46083       -) echo $tmp/stdin ;;
46084       [\\/$]*)
46085          # Absolute (can't be DOS-style, as IFS=:)
46086          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
46087 echo "$as_me: error: cannot find input file: $f" >&2;}
46088    { (exit 1); exit 1; }; }
46089          # Do quote $f, to prevent DOS paths from being IFS'd.
46090          echo "$f";;
46091       *) # Relative
46092          if test -f "$f"; then
46093            # Build tree
46094            echo "$f"
46095          elif test -f "$srcdir/$f"; then
46096            # Source tree
46097            echo "$srcdir/$f"
46098          else
46099            # /dev/null tree
46100            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
46101 echo "$as_me: error: cannot find input file: $f" >&2;}
46102    { (exit 1); exit 1; }; }
46103          fi;;
46104       esac
46105     done` || { (exit 1); exit 1; }
46106   # Remove the trailing spaces.
46107   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
46108
46109 _ACEOF
46110
46111 # Transform confdefs.h into two sed scripts, `conftest.defines' and
46112 # `conftest.undefs', that substitutes the proper values into
46113 # config.h.in to produce config.h.  The first handles `#define'
46114 # templates, and the second `#undef' templates.
46115 # And first: Protect against being on the right side of a sed subst in
46116 # config.status.  Protect against being in an unquoted here document
46117 # in config.status.
46118 rm -f conftest.defines conftest.undefs
46119 # Using a here document instead of a string reduces the quoting nightmare.
46120 # Putting comments in sed scripts is not portable.
46121 #
46122 # `end' is used to avoid that the second main sed command (meant for
46123 # 0-ary CPP macros) applies to n-ary macro definitions.
46124 # See the Autoconf documentation for `clear'.
46125 cat >confdef2sed.sed <<\_ACEOF
46126 s/[\\&,]/\\&/g
46127 s,[\\$`],\\&,g
46128 t clear
46129 : clear
46130 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
46131 t end
46132 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
46133 : end
46134 _ACEOF
46135 # If some macros were called several times there might be several times
46136 # the same #defines, which is useless.  Nevertheless, we may not want to
46137 # sort them, since we want the *last* AC-DEFINE to be honored.
46138 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
46139 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
46140 rm -f confdef2sed.sed
46141
46142 # This sed command replaces #undef with comments.  This is necessary, for
46143 # example, in the case of _POSIX_SOURCE, which is predefined and required
46144 # on some systems where configure will not decide to define it.
46145 cat >>conftest.undefs <<\_ACEOF
46146 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
46147 _ACEOF
46148
46149 # Break up conftest.defines because some shells have a limit on the size
46150 # of here documents, and old seds have small limits too (100 cmds).
46151 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
46152 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
46153 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
46154 echo '  :' >>$CONFIG_STATUS
46155 rm -f conftest.tail
46156 while grep . conftest.defines >/dev/null
46157 do
46158   # Write a limited-size here document to $tmp/defines.sed.
46159   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
46160   # Speed up: don't consider the non `#define' lines.
46161   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
46162   # Work around the forget-to-reset-the-flag bug.
46163   echo 't clr' >>$CONFIG_STATUS
46164   echo ': clr' >>$CONFIG_STATUS
46165   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
46166   echo 'CEOF
46167   sed -f $tmp/defines.sed $tmp/in >$tmp/out
46168   rm -f $tmp/in
46169   mv $tmp/out $tmp/in
46170 ' >>$CONFIG_STATUS
46171   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
46172   rm -f conftest.defines
46173   mv conftest.tail conftest.defines
46174 done
46175 rm -f conftest.defines
46176 echo '  fi # grep' >>$CONFIG_STATUS
46177 echo >>$CONFIG_STATUS
46178
46179 # Break up conftest.undefs because some shells have a limit on the size
46180 # of here documents, and old seds have small limits too (100 cmds).
46181 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
46182 rm -f conftest.tail
46183 while grep . conftest.undefs >/dev/null
46184 do
46185   # Write a limited-size here document to $tmp/undefs.sed.
46186   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
46187   # Speed up: don't consider the non `#undef'
46188   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
46189   # Work around the forget-to-reset-the-flag bug.
46190   echo 't clr' >>$CONFIG_STATUS
46191   echo ': clr' >>$CONFIG_STATUS
46192   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
46193   echo 'CEOF
46194   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
46195   rm -f $tmp/in
46196   mv $tmp/out $tmp/in
46197 ' >>$CONFIG_STATUS
46198   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
46199   rm -f conftest.undefs
46200   mv conftest.tail conftest.undefs
46201 done
46202 rm -f conftest.undefs
46203
46204 cat >>$CONFIG_STATUS <<\_ACEOF
46205   # Let's still pretend it is `configure' which instantiates (i.e., don't
46206   # use $as_me), people would be surprised to read:
46207   #    /* config.h.  Generated by config.status.  */
46208   if test x"$ac_file" = x-; then
46209     echo "/* Generated by configure.  */" >$tmp/config.h
46210   else
46211     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
46212   fi
46213   cat $tmp/in >>$tmp/config.h
46214   rm -f $tmp/in
46215   if test x"$ac_file" != x-; then
46216     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
46217       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
46218 echo "$as_me: $ac_file is unchanged" >&6;}
46219     else
46220       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
46221 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46222          X"$ac_file" : 'X\(//\)[^/]' \| \
46223          X"$ac_file" : 'X\(//\)$' \| \
46224          X"$ac_file" : 'X\(/\)' \| \
46225          .     : '\(.\)' 2>/dev/null ||
46226 echo X"$ac_file" |
46227     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46228           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46229           /^X\(\/\/\)$/{ s//\1/; q; }
46230           /^X\(\/\).*/{ s//\1/; q; }
46231           s/.*/./; q'`
46232       { if $as_mkdir_p; then
46233     mkdir -p "$ac_dir"
46234   else
46235     as_dir="$ac_dir"
46236     as_dirs=
46237     while test ! -d "$as_dir"; do
46238       as_dirs="$as_dir $as_dirs"
46239       as_dir=`(dirname "$as_dir") 2>/dev/null ||
46240 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46241          X"$as_dir" : 'X\(//\)[^/]' \| \
46242          X"$as_dir" : 'X\(//\)$' \| \
46243          X"$as_dir" : 'X\(/\)' \| \
46244          .     : '\(.\)' 2>/dev/null ||
46245 echo X"$as_dir" |
46246     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46247           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46248           /^X\(\/\/\)$/{ s//\1/; q; }
46249           /^X\(\/\).*/{ s//\1/; q; }
46250           s/.*/./; q'`
46251     done
46252     test ! -n "$as_dirs" || mkdir $as_dirs
46253   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
46254 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
46255    { (exit 1); exit 1; }; }; }
46256
46257       rm -f $ac_file
46258       mv $tmp/config.h $ac_file
46259     fi
46260   else
46261     cat $tmp/config.h
46262     rm -f $tmp/config.h
46263   fi
46264 # Compute $ac_file's index in $config_headers.
46265 _am_stamp_count=1
46266 for _am_header in $config_headers :; do
46267   case $_am_header in
46268     $ac_file | $ac_file:* )
46269       break ;;
46270     * )
46271       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
46272   esac
46273 done
46274 echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
46275 $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46276          X$ac_file : 'X\(//\)[^/]' \| \
46277          X$ac_file : 'X\(//\)$' \| \
46278          X$ac_file : 'X\(/\)' \| \
46279          .     : '\(.\)' 2>/dev/null ||
46280 echo X$ac_file |
46281     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46282           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46283           /^X\(\/\/\)$/{ s//\1/; q; }
46284           /^X\(\/\).*/{ s//\1/; q; }
46285           s/.*/./; q'`/stamp-h$_am_stamp_count
46286 done
46287 _ACEOF
46288 cat >>$CONFIG_STATUS <<\_ACEOF
46289
46290 #
46291 # CONFIG_COMMANDS section.
46292 #
46293 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
46294   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
46295   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
46296   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
46297 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46298          X"$ac_dest" : 'X\(//\)[^/]' \| \
46299          X"$ac_dest" : 'X\(//\)$' \| \
46300          X"$ac_dest" : 'X\(/\)' \| \
46301          .     : '\(.\)' 2>/dev/null ||
46302 echo X"$ac_dest" |
46303     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46304           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46305           /^X\(\/\/\)$/{ s//\1/; q; }
46306           /^X\(\/\).*/{ s//\1/; q; }
46307           s/.*/./; q'`
46308   { if $as_mkdir_p; then
46309     mkdir -p "$ac_dir"
46310   else
46311     as_dir="$ac_dir"
46312     as_dirs=
46313     while test ! -d "$as_dir"; do
46314       as_dirs="$as_dir $as_dirs"
46315       as_dir=`(dirname "$as_dir") 2>/dev/null ||
46316 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46317          X"$as_dir" : 'X\(//\)[^/]' \| \
46318          X"$as_dir" : 'X\(//\)$' \| \
46319          X"$as_dir" : 'X\(/\)' \| \
46320          .     : '\(.\)' 2>/dev/null ||
46321 echo X"$as_dir" |
46322     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46323           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46324           /^X\(\/\/\)$/{ s//\1/; q; }
46325           /^X\(\/\).*/{ s//\1/; q; }
46326           s/.*/./; q'`
46327     done
46328     test ! -n "$as_dirs" || mkdir $as_dirs
46329   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
46330 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
46331    { (exit 1); exit 1; }; }; }
46332
46333   ac_builddir=.
46334
46335 if test "$ac_dir" != .; then
46336   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
46337   # A "../" for each directory in $ac_dir_suffix.
46338   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
46339 else
46340   ac_dir_suffix= ac_top_builddir=
46341 fi
46342
46343 case $srcdir in
46344   .)  # No --srcdir option.  We are building in place.
46345     ac_srcdir=.
46346     if test -z "$ac_top_builddir"; then
46347        ac_top_srcdir=.
46348     else
46349        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
46350     fi ;;
46351   [\\/]* | ?:[\\/]* )  # Absolute path.
46352     ac_srcdir=$srcdir$ac_dir_suffix;
46353     ac_top_srcdir=$srcdir ;;
46354   *) # Relative path.
46355     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
46356     ac_top_srcdir=$ac_top_builddir$srcdir ;;
46357 esac
46358
46359 # Do not use `cd foo && pwd` to compute absolute paths, because
46360 # the directories may not exist.
46361 case `pwd` in
46362 .) ac_abs_builddir="$ac_dir";;
46363 *)
46364   case "$ac_dir" in
46365   .) ac_abs_builddir=`pwd`;;
46366   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
46367   *) ac_abs_builddir=`pwd`/"$ac_dir";;
46368   esac;;
46369 esac
46370 case $ac_abs_builddir in
46371 .) ac_abs_top_builddir=${ac_top_builddir}.;;
46372 *)
46373   case ${ac_top_builddir}. in
46374   .) ac_abs_top_builddir=$ac_abs_builddir;;
46375   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
46376   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
46377   esac;;
46378 esac
46379 case $ac_abs_builddir in
46380 .) ac_abs_srcdir=$ac_srcdir;;
46381 *)
46382   case $ac_srcdir in
46383   .) ac_abs_srcdir=$ac_abs_builddir;;
46384   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
46385   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
46386   esac;;
46387 esac
46388 case $ac_abs_builddir in
46389 .) ac_abs_top_srcdir=$ac_top_srcdir;;
46390 *)
46391   case $ac_top_srcdir in
46392   .) ac_abs_top_srcdir=$ac_abs_builddir;;
46393   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
46394   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
46395   esac;;
46396 esac
46397
46398
46399   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
46400 echo "$as_me: executing $ac_dest commands" >&6;}
46401   case $ac_dest in
46402     depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
46403   # Strip MF so we end up with the name of the file.
46404   mf=`echo "$mf" | sed -e 's/:.*$//'`
46405   # Check whether this is an Automake generated Makefile or not.
46406   # We used to match only the files named `Makefile.in', but
46407   # some people rename them; so instead we look at the file content.
46408   # Grep'ing the first line is not enough: some people post-process
46409   # each Makefile.in and add a new line on top of each file to say so.
46410   # So let's grep whole file.
46411   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
46412     dirpart=`(dirname "$mf") 2>/dev/null ||
46413 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46414          X"$mf" : 'X\(//\)[^/]' \| \
46415          X"$mf" : 'X\(//\)$' \| \
46416          X"$mf" : 'X\(/\)' \| \
46417          .     : '\(.\)' 2>/dev/null ||
46418 echo X"$mf" |
46419     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46420           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46421           /^X\(\/\/\)$/{ s//\1/; q; }
46422           /^X\(\/\).*/{ s//\1/; q; }
46423           s/.*/./; q'`
46424   else
46425     continue
46426   fi
46427   # Extract the definition of DEPDIR, am__include, and am__quote
46428   # from the Makefile without running `make'.
46429   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
46430   test -z "$DEPDIR" && continue
46431   am__include=`sed -n 's/^am__include = //p' < "$mf"`
46432   test -z "am__include" && continue
46433   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
46434   # When using ansi2knr, U may be empty or an underscore; expand it
46435   U=`sed -n 's/^U = //p' < "$mf"`
46436   # Find all dependency output files, they are included files with
46437   # $(DEPDIR) in their names.  We invoke sed twice because it is the
46438   # simplest approach to changing $(DEPDIR) to its actual value in the
46439   # expansion.
46440   for file in `sed -n "
46441     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
46442        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
46443     # Make sure the directory exists.
46444     test -f "$dirpart/$file" && continue
46445     fdir=`(dirname "$file") 2>/dev/null ||
46446 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46447          X"$file" : 'X\(//\)[^/]' \| \
46448          X"$file" : 'X\(//\)$' \| \
46449          X"$file" : 'X\(/\)' \| \
46450          .     : '\(.\)' 2>/dev/null ||
46451 echo X"$file" |
46452     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46453           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46454           /^X\(\/\/\)$/{ s//\1/; q; }
46455           /^X\(\/\).*/{ s//\1/; q; }
46456           s/.*/./; q'`
46457     { if $as_mkdir_p; then
46458     mkdir -p $dirpart/$fdir
46459   else
46460     as_dir=$dirpart/$fdir
46461     as_dirs=
46462     while test ! -d "$as_dir"; do
46463       as_dirs="$as_dir $as_dirs"
46464       as_dir=`(dirname "$as_dir") 2>/dev/null ||
46465 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46466          X"$as_dir" : 'X\(//\)[^/]' \| \
46467          X"$as_dir" : 'X\(//\)$' \| \
46468          X"$as_dir" : 'X\(/\)' \| \
46469          .     : '\(.\)' 2>/dev/null ||
46470 echo X"$as_dir" |
46471     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46472           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46473           /^X\(\/\/\)$/{ s//\1/; q; }
46474           /^X\(\/\).*/{ s//\1/; q; }
46475           s/.*/./; q'`
46476     done
46477     test ! -n "$as_dirs" || mkdir $as_dirs
46478   fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
46479 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
46480    { (exit 1); exit 1; }; }; }
46481
46482     # echo "creating $dirpart/$file"
46483     echo '# dummy' > "$dirpart/$file"
46484   done
46485 done
46486  ;;
46487     default )
46488 chmod +x tests/run
46489 date > stamp-h
46490 BACKENDSC="servers/slapd/backends.c"
46491 echo "Making $BACKENDSC"
46492 rm -f $BACKENDSC
46493 cat > $BACKENDSC << ENDX
46494 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
46495  *
46496  * Copyright 1998-2006 The OpenLDAP Foundation.
46497  * All rights reserved.
46498  *
46499  * Redistribution and use in source and binary forms, with or without
46500  * modification, are permitted only as authorized by the OpenLDAP
46501  * Public License.
46502  *
46503  * A copy of this license is available in the file LICENSE in the
46504  * top-level directory of the distribution or, alternatively, at
46505  * <http://www.OpenLDAP.org/license.html>.
46506  */
46507 /* This file is automatically generated by configure; please do not edit. */
46508
46509 #include "portable.h"
46510 #include "slap.h"
46511
46512 ENDX
46513 if test "${STATIC_BACKENDS}"; then
46514         for b in config ${STATIC_BACKENDS}; do
46515                 bb=`echo "${b}" | sed -e 's/back-//'`
46516                 cat >> $BACKENDSC << ENDX
46517 extern BI_init ${bb}_back_initialize;
46518 ENDX
46519         done
46520
46521         cat >> $BACKENDSC << ENDX
46522
46523 BackendInfo slap_binfo[] = {
46524 ENDX
46525
46526         for b in config ${STATIC_BACKENDS}; do
46527                 bb=`echo "${b}" | sed -e 's/back-//'`
46528                 echo "    Add ${bb} ..."
46529                 cat >> $BACKENDSC << ENDX
46530         { "${bb}", ${bb}_back_initialize },
46531 ENDX
46532         done
46533
46534         cat >> $BACKENDSC << ENDX
46535         { NULL, NULL },
46536 };
46537
46538 /* end of generated file */
46539 ENDX
46540 fi
46541 OVERLAYSC="servers/slapd/overlays/statover.c"
46542 echo "Making $OVERLAYSC"
46543 rm -f $OVERLAYSC
46544 cat > $OVERLAYSC << ENDX
46545 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
46546  *
46547  * Copyright 1998-2006 The OpenLDAP Foundation.
46548  * All rights reserved.
46549  *
46550  * Redistribution and use in source and binary forms, with or without
46551  * modification, are permitted only as authorized by the OpenLDAP
46552  * Public License.
46553  *
46554  * A copy of this license is available in the file LICENSE in the
46555  * top-level directory of the distribution or, alternatively, at
46556  * <http://www.OpenLDAP.org/license.html>.
46557  */
46558 /* This file is automatically generated by configure; please do not edit. */
46559
46560 #include "portable.h"
46561 #include "slap.h"
46562
46563 ENDX
46564 if test "${STATIC_OVERLAYS}"; then
46565         for o in ${STATIC_OVERLAYS}; do
46566                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
46567                 cat >> $OVERLAYSC << ENDX
46568 extern OV_init ${oo}_initialize;
46569 ENDX
46570         done
46571 fi
46572
46573 cat >> $OVERLAYSC << ENDX
46574
46575 OverlayInit slap_oinfo[] = {
46576 ENDX
46577
46578 if test "${STATIC_OVERLAYS}"; then
46579         for o in ${STATIC_OVERLAYS}; do
46580                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
46581                 echo "    Add ${oo} ..."
46582                 cat >> $OVERLAYSC << ENDX
46583         { "${oo}", ${oo}_initialize },
46584 ENDX
46585         done
46586 fi
46587
46588         cat >> $OVERLAYSC << ENDX
46589         { NULL, NULL },
46590 };
46591
46592 /* end of generated file */
46593 ENDX
46594
46595 echo Please run \"make depend\" to build dependencies
46596  ;;
46597   esac
46598 done
46599 _ACEOF
46600
46601 cat >>$CONFIG_STATUS <<\_ACEOF
46602
46603 { (exit 0); exit 0; }
46604 _ACEOF
46605 chmod +x $CONFIG_STATUS
46606 ac_clean_files=$ac_clean_files_save
46607
46608
46609 # configure is writing to config.log, and then calls config.status.
46610 # config.status does its own redirection, appending to config.log.
46611 # Unfortunately, on DOS this fails, as config.log is still kept open
46612 # by configure, so config.status won't be able to write to it; its
46613 # output is simply discarded.  So we exec the FD to /dev/null,
46614 # effectively closing config.log, so it can be properly (re)opened and
46615 # appended to by config.status.  When coming back to configure, we
46616 # need to make the FD available again.
46617 if test "$no_create" != yes; then
46618   ac_cs_success=:
46619   ac_config_status_args=
46620   test "$silent" = yes &&
46621     ac_config_status_args="$ac_config_status_args --quiet"
46622   exec 5>/dev/null
46623   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
46624   exec 5>>config.log
46625   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
46626   # would make configure fail if this is the last instruction.
46627   $ac_cs_success || { (exit 1); exit 1; }
46628 fi
46629