]> git.sur5r.net Git - openldap/blob - configure
71b7c3901fceff959af2dd3ef6aca5a950012c12
[openldap] / configure
1 #! /bin/sh
2 # From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.560.2.26 2006/02/13 17:35:52 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_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-denyop       Deny Operation overlay no|yes|mod [no]
1052     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]
1053     --enable-dynlist      Dynamic List overlay no|yes|mod [no]
1054     --enable-lastmod      Last Modification overlay no|yes|mod [no]
1055     --enable-ppolicy      Password Policy overlay no|yes|mod [no]
1056     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]
1057     --enable-refint       Referential Integrity overlay no|yes|mod [no]
1058     --enable-retcode      Return Code testing overlay no|yes|mod [no]
1059     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]
1060     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [yes]
1061     --enable-translucent  Translucent Proxy overlay no|yes|mod [no]
1062     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]
1063     --enable-valsort      Value Sorting overlay no|yes|mod [no]
1064
1065 SLURPD (Replication Daemon) Options:
1066   --enable-slurpd         enable building slurpd [auto]
1067
1068 Library Generation & Linking Options
1069   --enable-static[=PKGS]
1070                           build static libraries [default=yes]
1071   --enable-shared[=PKGS]
1072                           build shared libraries [default=yes]
1073   --enable-fast-install[=PKGS]
1074                           optimize for fast installation [default=yes]
1075   --disable-dependency-tracking  speeds up one-time build
1076   --enable-dependency-tracking   do not reject slow dependency extractors
1077   --disable-libtool-lock  avoid locking (might break parallel builds)
1078
1079 Optional Packages:
1080   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1081   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1082   --with-subdir=DIR       change default subdirectory used for installs
1083   --with-cyrus-sasl       with Cyrus SASL support [auto]
1084   --with-fetch            with fetch(3) URL support [auto]
1085   --with-threads          with threads [auto]
1086   --with-tls              with TLS/SSL support [auto]
1087   --with-yielding-select  with implicitly yielding select [auto]
1088   --with-multiple-precision
1089                           multiple precision support for statistics
1090                           auto|bignum|gmp [auto]
1091
1092   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1093   --with-pic              try to use only PIC/non-PIC objects [default=use
1094                           both]
1095   --with-tags[=TAGS]
1096                           include additional configurations [automatic]
1097
1098 See INSTALL file for further details.
1099
1100 Some influential environment variables:
1101   CC          C compiler command
1102   CFLAGS      C compiler flags
1103   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1104               nonstandard directory <lib dir>
1105   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
1106               headers in a nonstandard directory <include dir>
1107   CPP         C preprocessor
1108
1109 Use these variables to override the choices made by `configure' or to help
1110 it to find libraries and programs with nonstandard names/locations.
1111
1112 _ACEOF
1113 fi
1114
1115 if test "$ac_init_help" = "recursive"; then
1116   # If there are subdirs, report their specific --help.
1117   ac_popdir=`pwd`
1118   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1119     test -d $ac_dir || continue
1120     ac_builddir=.
1121
1122 if test "$ac_dir" != .; then
1123   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1124   # A "../" for each directory in $ac_dir_suffix.
1125   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
1126 else
1127   ac_dir_suffix= ac_top_builddir=
1128 fi
1129
1130 case $srcdir in
1131   .)  # No --srcdir option.  We are building in place.
1132     ac_srcdir=.
1133     if test -z "$ac_top_builddir"; then
1134        ac_top_srcdir=.
1135     else
1136        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
1137     fi ;;
1138   [\\/]* | ?:[\\/]* )  # Absolute path.
1139     ac_srcdir=$srcdir$ac_dir_suffix;
1140     ac_top_srcdir=$srcdir ;;
1141   *) # Relative path.
1142     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
1143     ac_top_srcdir=$ac_top_builddir$srcdir ;;
1144 esac
1145
1146 # Do not use `cd foo && pwd` to compute absolute paths, because
1147 # the directories may not exist.
1148 case `pwd` in
1149 .) ac_abs_builddir="$ac_dir";;
1150 *)
1151   case "$ac_dir" in
1152   .) ac_abs_builddir=`pwd`;;
1153   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
1154   *) ac_abs_builddir=`pwd`/"$ac_dir";;
1155   esac;;
1156 esac
1157 case $ac_abs_builddir in
1158 .) ac_abs_top_builddir=${ac_top_builddir}.;;
1159 *)
1160   case ${ac_top_builddir}. in
1161   .) ac_abs_top_builddir=$ac_abs_builddir;;
1162   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
1163   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
1164   esac;;
1165 esac
1166 case $ac_abs_builddir in
1167 .) ac_abs_srcdir=$ac_srcdir;;
1168 *)
1169   case $ac_srcdir in
1170   .) ac_abs_srcdir=$ac_abs_builddir;;
1171   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1172   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1173   esac;;
1174 esac
1175 case $ac_abs_builddir in
1176 .) ac_abs_top_srcdir=$ac_top_srcdir;;
1177 *)
1178   case $ac_top_srcdir in
1179   .) ac_abs_top_srcdir=$ac_abs_builddir;;
1180   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1181   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1182   esac;;
1183 esac
1184
1185     cd $ac_dir
1186     # Check for guested configure; otherwise get Cygnus style configure.
1187     if test -f $ac_srcdir/configure.gnu; then
1188       echo
1189       $SHELL $ac_srcdir/configure.gnu  --help=recursive
1190     elif test -f $ac_srcdir/configure; then
1191       echo
1192       $SHELL $ac_srcdir/configure  --help=recursive
1193     elif test -f $ac_srcdir/configure.ac ||
1194            test -f $ac_srcdir/configure.in; then
1195       echo
1196       $ac_configure --help
1197     else
1198       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1199     fi
1200     cd $ac_popdir
1201   done
1202 fi
1203
1204 test -n "$ac_init_help" && exit 0
1205 if $ac_init_version; then
1206   cat <<\_ACEOF
1207
1208 Copyright (C) 2003 Free Software Foundation, Inc.
1209 This configure script is free software; the Free Software Foundation
1210 gives unlimited permission to copy, distribute and modify it.
1211
1212 Copyright 1998-2006 The OpenLDAP Foundation. All rights reserved.
1213 Restrictions apply, see COPYRIGHT and LICENSE files.
1214 _ACEOF
1215   exit 0
1216 fi
1217 exec 5>config.log
1218 cat >&5 <<_ACEOF
1219 This file contains any messages produced by compilers while
1220 running configure, to aid debugging if configure makes a mistake.
1221
1222 It was created by $as_me, which was
1223 generated by GNU Autoconf 2.59.  Invocation command line was
1224
1225   $ $0 $@
1226
1227 _ACEOF
1228 {
1229 cat <<_ASUNAME
1230 ## --------- ##
1231 ## Platform. ##
1232 ## --------- ##
1233
1234 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1235 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1236 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1237 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1238 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1239
1240 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1241 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1242
1243 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1244 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1245 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1246 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1247 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1248 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1249 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1250
1251 _ASUNAME
1252
1253 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1254 for as_dir in $PATH
1255 do
1256   IFS=$as_save_IFS
1257   test -z "$as_dir" && as_dir=.
1258   echo "PATH: $as_dir"
1259 done
1260
1261 } >&5
1262
1263 cat >&5 <<_ACEOF
1264
1265
1266 ## ----------- ##
1267 ## Core tests. ##
1268 ## ----------- ##
1269
1270 _ACEOF
1271
1272
1273 # Keep a trace of the command line.
1274 # Strip out --no-create and --no-recursion so they do not pile up.
1275 # Strip out --silent because we don't want to record it for future runs.
1276 # Also quote any args containing shell meta-characters.
1277 # Make two passes to allow for proper duplicate-argument suppression.
1278 ac_configure_args=
1279 ac_configure_args0=
1280 ac_configure_args1=
1281 ac_sep=
1282 ac_must_keep_next=false
1283 for ac_pass in 1 2
1284 do
1285   for ac_arg
1286   do
1287     case $ac_arg in
1288     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1289     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1290     | -silent | --silent | --silen | --sile | --sil)
1291       continue ;;
1292     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1293       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1294     esac
1295     case $ac_pass in
1296     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1297     2)
1298       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1299       if test $ac_must_keep_next = true; then
1300         ac_must_keep_next=false # Got value, back to normal.
1301       else
1302         case $ac_arg in
1303           *=* | --config-cache | -C | -disable-* | --disable-* \
1304           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1305           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1306           | -with-* | --with-* | -without-* | --without-* | --x)
1307             case "$ac_configure_args0 " in
1308               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1309             esac
1310             ;;
1311           -* ) ac_must_keep_next=true ;;
1312         esac
1313       fi
1314       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1315       # Get rid of the leading space.
1316       ac_sep=" "
1317       ;;
1318     esac
1319   done
1320 done
1321 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1322 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1323
1324 # When interrupted or exit'd, cleanup temporary files, and complete
1325 # config.log.  We remove comments because anyway the quotes in there
1326 # would cause problems or look ugly.
1327 # WARNING: Be sure not to use single quotes in there, as some shells,
1328 # such as our DU 5.0 friend, will then `close' the trap.
1329 trap 'exit_status=$?
1330   # Save into config.log some information that might help in debugging.
1331   {
1332     echo
1333
1334     cat <<\_ASBOX
1335 ## ---------------- ##
1336 ## Cache variables. ##
1337 ## ---------------- ##
1338 _ASBOX
1339     echo
1340     # The following way of writing the cache mishandles newlines in values,
1341 {
1342   (set) 2>&1 |
1343     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1344     *ac_space=\ *)
1345       sed -n \
1346         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1347           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1348       ;;
1349     *)
1350       sed -n \
1351         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1352       ;;
1353     esac;
1354 }
1355     echo
1356
1357     cat <<\_ASBOX
1358 ## ----------------- ##
1359 ## Output variables. ##
1360 ## ----------------- ##
1361 _ASBOX
1362     echo
1363     for ac_var in $ac_subst_vars
1364     do
1365       eval ac_val=$`echo $ac_var`
1366       echo "$ac_var='"'"'$ac_val'"'"'"
1367     done | sort
1368     echo
1369
1370     if test -n "$ac_subst_files"; then
1371       cat <<\_ASBOX
1372 ## ------------- ##
1373 ## Output files. ##
1374 ## ------------- ##
1375 _ASBOX
1376       echo
1377       for ac_var in $ac_subst_files
1378       do
1379         eval ac_val=$`echo $ac_var`
1380         echo "$ac_var='"'"'$ac_val'"'"'"
1381       done | sort
1382       echo
1383     fi
1384
1385     if test -s confdefs.h; then
1386       cat <<\_ASBOX
1387 ## ----------- ##
1388 ## confdefs.h. ##
1389 ## ----------- ##
1390 _ASBOX
1391       echo
1392       sed "/^$/d" confdefs.h | sort
1393       echo
1394     fi
1395     test "$ac_signal" != 0 &&
1396       echo "$as_me: caught signal $ac_signal"
1397     echo "$as_me: exit $exit_status"
1398   } >&5
1399   rm -f core *.core &&
1400   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1401     exit $exit_status
1402      ' 0
1403 for ac_signal in 1 2 13 15; do
1404   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1405 done
1406 ac_signal=0
1407
1408 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1409 rm -rf conftest* confdefs.h
1410 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1411 echo >confdefs.h
1412
1413 # Predefined preprocessor variables.
1414
1415 cat >>confdefs.h <<_ACEOF
1416 #define PACKAGE_NAME "$PACKAGE_NAME"
1417 _ACEOF
1418
1419
1420 cat >>confdefs.h <<_ACEOF
1421 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1422 _ACEOF
1423
1424
1425 cat >>confdefs.h <<_ACEOF
1426 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1427 _ACEOF
1428
1429
1430 cat >>confdefs.h <<_ACEOF
1431 #define PACKAGE_STRING "$PACKAGE_STRING"
1432 _ACEOF
1433
1434
1435 cat >>confdefs.h <<_ACEOF
1436 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1437 _ACEOF
1438
1439
1440 # Let the site file select an alternate cache file if it wants to.
1441 # Prefer explicitly selected file to automatically selected ones.
1442 if test -z "$CONFIG_SITE"; then
1443   if test "x$prefix" != xNONE; then
1444     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1445   else
1446     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1447   fi
1448 fi
1449 for ac_site_file in $CONFIG_SITE; do
1450   if test -r "$ac_site_file"; then
1451     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1452 echo "$as_me: loading site script $ac_site_file" >&6;}
1453     sed 's/^/| /' "$ac_site_file" >&5
1454     . "$ac_site_file"
1455   fi
1456 done
1457
1458
1459 # Check that the precious variables saved in the cache have kept the same
1460 # value.
1461 ac_cache_corrupted=false
1462 for ac_var in `(set) 2>&1 |
1463                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1464   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1465   eval ac_new_set=\$ac_env_${ac_var}_set
1466   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1467   eval ac_new_val="\$ac_env_${ac_var}_value"
1468   case $ac_old_set,$ac_new_set in
1469     set,)
1470       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1471 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1472       ac_cache_corrupted=: ;;
1473     ,set)
1474       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1475 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1476       ac_cache_corrupted=: ;;
1477     ,);;
1478     *)
1479       if test "x$ac_old_val" != "x$ac_new_val"; then
1480         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1481 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1482         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1483 echo "$as_me:   former value:  $ac_old_val" >&2;}
1484         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1485 echo "$as_me:   current value: $ac_new_val" >&2;}
1486         ac_cache_corrupted=:
1487       fi;;
1488   esac
1489   # Pass precious variables to config.status.
1490   if test "$ac_new_set" = set; then
1491     case $ac_new_val in
1492     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1493       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1494     *) ac_arg=$ac_var=$ac_new_val ;;
1495     esac
1496     case " $ac_configure_args " in
1497       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1498       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1499     esac
1500   fi
1501 done
1502 if $ac_cache_corrupted; then
1503   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1504 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1505   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1506 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1507    { (exit 1); exit 1; }; }
1508 fi
1509
1510 ac_ext=c
1511 ac_cpp='$CPP $CPPFLAGS'
1512 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1513 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1514 ac_compiler_gnu=$ac_cv_c_compiler_gnu
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
1558 ac_aux_dir=
1559 for ac_dir in build $srcdir/build; do
1560   if test -f $ac_dir/install-sh; then
1561     ac_aux_dir=$ac_dir
1562     ac_install_sh="$ac_aux_dir/install-sh -c"
1563     break
1564   elif test -f $ac_dir/install.sh; then
1565     ac_aux_dir=$ac_dir
1566     ac_install_sh="$ac_aux_dir/install.sh -c"
1567     break
1568   elif test -f $ac_dir/shtool; then
1569     ac_aux_dir=$ac_dir
1570     ac_install_sh="$ac_aux_dir/shtool install -c"
1571     break
1572   fi
1573 done
1574 if test -z "$ac_aux_dir"; then
1575   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build $srcdir/build" >&5
1576 echo "$as_me: error: cannot find install-sh or install.sh in build $srcdir/build" >&2;}
1577    { (exit 1); exit 1; }; }
1578 fi
1579 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1580 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1581 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1582
1583 eval `$ac_aux_dir/version.sh`
1584 if test -z "$OL_STRING"; then
1585         { { echo "$as_me:$LINENO: error: could not determine version" >&5
1586 echo "$as_me: error: could not determine version" >&2;}
1587    { (exit 1); exit 1; }; }
1588 fi
1589
1590 if test -f "$ac_aux_dir/shtool" && test ! -d $ac_aux_dir/shtool; then
1591         ac_cv_shtool="$ac_aux_dir/shtool"
1592 else
1593         { { echo "$as_me:$LINENO: error: no shtool found in $ac_aux_dir" >&5
1594 echo "$as_me: error: no shtool found in $ac_aux_dir" >&2;}
1595    { (exit 1); exit 1; }; }
1596 fi
1597
1598 SHTOOL="$ac_cv_shtool"
1599
1600 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
1601 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
1602
1603 OPENLDAP_CVS=""
1604 if test -d $ac_aux_dir/CVS; then
1605         OPENLDAP_CVS="(from CVS sources) "
1606 fi
1607
1608 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
1609
1610 # Make sure we can run config.sub.
1611 $ac_config_sub sun4 >/dev/null 2>&1 ||
1612   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1613 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1614    { (exit 1); exit 1; }; }
1615
1616 echo "$as_me:$LINENO: checking build system type" >&5
1617 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1618 if test "${ac_cv_build+set}" = set; then
1619   echo $ECHO_N "(cached) $ECHO_C" >&6
1620 else
1621   ac_cv_build_alias=$build_alias
1622 test -z "$ac_cv_build_alias" &&
1623   ac_cv_build_alias=`$ac_config_guess`
1624 test -z "$ac_cv_build_alias" &&
1625   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1626 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1627    { (exit 1); exit 1; }; }
1628 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1629   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1630 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1631    { (exit 1); exit 1; }; }
1632
1633 fi
1634 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1635 echo "${ECHO_T}$ac_cv_build" >&6
1636 build=$ac_cv_build
1637 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1638 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1639 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1640
1641
1642 echo "$as_me:$LINENO: checking host system type" >&5
1643 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1644 if test "${ac_cv_host+set}" = set; then
1645   echo $ECHO_N "(cached) $ECHO_C" >&6
1646 else
1647   ac_cv_host_alias=$host_alias
1648 test -z "$ac_cv_host_alias" &&
1649   ac_cv_host_alias=$ac_cv_build_alias
1650 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1651   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1652 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1653    { (exit 1); exit 1; }; }
1654
1655 fi
1656 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1657 echo "${ECHO_T}$ac_cv_host" >&6
1658 host=$ac_cv_host
1659 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1660 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1661 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1662
1663
1664 echo "$as_me:$LINENO: checking target system type" >&5
1665 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1666 if test "${ac_cv_target+set}" = set; then
1667   echo $ECHO_N "(cached) $ECHO_C" >&6
1668 else
1669   ac_cv_target_alias=$target_alias
1670 test "x$ac_cv_target_alias" = "x" &&
1671   ac_cv_target_alias=$ac_cv_host_alias
1672 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1673   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1674 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1675    { (exit 1); exit 1; }; }
1676
1677 fi
1678 echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1679 echo "${ECHO_T}$ac_cv_target" >&6
1680 target=$ac_cv_target
1681 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1682 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1683 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1684
1685
1686 # The aliases save the names the user supplied, while $host etc.
1687 # will get canonicalized.
1688 test -n "$target_alias" &&
1689   test "$program_prefix$program_suffix$program_transform_name" = \
1690     NONENONEs,x,x, &&
1691   program_prefix=${target_alias}-
1692
1693 am__api_version="1.9"
1694 # Find a good install program.  We prefer a C program (faster),
1695 # so one script is as good as another.  But avoid the broken or
1696 # incompatible versions:
1697 # SysV /etc/install, /usr/sbin/install
1698 # SunOS /usr/etc/install
1699 # IRIX /sbin/install
1700 # AIX /bin/install
1701 # AmigaOS /C/install, which installs bootblocks on floppy discs
1702 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1703 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1704 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1705 # OS/2's system install, which has a completely different semantic
1706 # ./install, which can be erroneously created by make from ./install.sh.
1707 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
1708 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
1709 if test -z "$INSTALL"; then
1710 if test "${ac_cv_path_install+set}" = set; then
1711   echo $ECHO_N "(cached) $ECHO_C" >&6
1712 else
1713   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1714 for as_dir in $PATH
1715 do
1716   IFS=$as_save_IFS
1717   test -z "$as_dir" && as_dir=.
1718   # Account for people who put trailing slashes in PATH elements.
1719 case $as_dir/ in
1720   ./ | .// | /cC/* | \
1721   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
1722   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
1723   /usr/ucb/* ) ;;
1724   *)
1725     # OSF1 and SCO ODT 3.0 have their own names for install.
1726     # Don't use installbsd from OSF since it installs stuff as root
1727     # by default.
1728     for ac_prog in ginstall scoinst install; do
1729       for ac_exec_ext in '' $ac_executable_extensions; do
1730         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
1731           if test $ac_prog = install &&
1732             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
1733             # AIX install.  It has an incompatible calling convention.
1734             :
1735           elif test $ac_prog = install &&
1736             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
1737             # program-specific install script used by HP pwplus--don't use.
1738             :
1739           else
1740             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
1741             break 3
1742           fi
1743         fi
1744       done
1745     done
1746     ;;
1747 esac
1748 done
1749
1750
1751 fi
1752   if test "${ac_cv_path_install+set}" = set; then
1753     INSTALL=$ac_cv_path_install
1754   else
1755     # As a last resort, use the slow shell script.  We don't cache a
1756     # path for INSTALL within a source directory, because that will
1757     # break other packages using the cache if that directory is
1758     # removed, or if the path is relative.
1759     INSTALL=$ac_install_sh
1760   fi
1761 fi
1762 echo "$as_me:$LINENO: result: $INSTALL" >&5
1763 echo "${ECHO_T}$INSTALL" >&6
1764
1765 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1766 # It thinks the first close brace ends the variable substitution.
1767 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1768
1769 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1770
1771 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1772
1773 echo "$as_me:$LINENO: checking whether build environment is sane" >&5
1774 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
1775 # Just in case
1776 sleep 1
1777 echo timestamp > conftest.file
1778 # Do `set' in a subshell so we don't clobber the current shell's
1779 # arguments.  Must try -L first in case configure is actually a
1780 # symlink; some systems play weird games with the mod time of symlinks
1781 # (eg FreeBSD returns the mod time of the symlink's containing
1782 # directory).
1783 if (
1784    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1785    if test "$*" = "X"; then
1786       # -L didn't work.
1787       set X `ls -t $srcdir/configure conftest.file`
1788    fi
1789    rm -f conftest.file
1790    if test "$*" != "X $srcdir/configure conftest.file" \
1791       && test "$*" != "X conftest.file $srcdir/configure"; then
1792
1793       # If neither matched, then we have a broken ls.  This can happen
1794       # if, for instance, CONFIG_SHELL is bash and it inherits a
1795       # broken ls alias from the environment.  This has actually
1796       # happened.  Such a system could not be considered "sane".
1797       { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
1798 alias in your environment" >&5
1799 echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
1800 alias in your environment" >&2;}
1801    { (exit 1); exit 1; }; }
1802    fi
1803
1804    test "$2" = conftest.file
1805    )
1806 then
1807    # Ok.
1808    :
1809 else
1810    { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
1811 Check your system clock" >&5
1812 echo "$as_me: error: newly created file is older than distributed files!
1813 Check your system clock" >&2;}
1814    { (exit 1); exit 1; }; }
1815 fi
1816 echo "$as_me:$LINENO: result: yes" >&5
1817 echo "${ECHO_T}yes" >&6
1818 test "$program_prefix" != NONE &&
1819   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1820 # Use a double $ so make ignores it.
1821 test "$program_suffix" != NONE &&
1822   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1823 # Double any \ or $.  echo might interpret backslashes.
1824 # By default was `s,x,x', remove it if useless.
1825 cat <<\_ACEOF >conftest.sed
1826 s/[\\$]/&&/g;s/;s,x,x,$//
1827 _ACEOF
1828 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1829 rm conftest.sed
1830
1831 # expand $ac_aux_dir to an absolute path
1832 am_aux_dir=`cd $ac_aux_dir && pwd`
1833
1834 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
1835 # Use eval to expand $SHELL
1836 if eval "$MISSING --run true"; then
1837   am_missing_run="$MISSING --run "
1838 else
1839   am_missing_run=
1840   { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
1841 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
1842 fi
1843
1844 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
1845   # We used to keeping the `.' as first argument, in order to
1846   # allow $(mkdir_p) to be used without argument.  As in
1847   #   $(mkdir_p) $(somedir)
1848   # where $(somedir) is conditionally defined.  However this is wrong
1849   # for two reasons:
1850   #  1. if the package is installed by a user who cannot write `.'
1851   #     make install will fail,
1852   #  2. the above comment should most certainly read
1853   #     $(mkdir_p) $(DESTDIR)$(somedir)
1854   #     so it does not work when $(somedir) is undefined and
1855   #     $(DESTDIR) is not.
1856   #  To support the latter case, we have to write
1857   #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
1858   #  so the `.' trick is pointless.
1859   mkdir_p='mkdir -p --'
1860 else
1861   # On NextStep and OpenStep, the `mkdir' command does not
1862   # recognize any option.  It will interpret all options as
1863   # directories to create, and then abort because `.' already
1864   # exists.
1865   for d in ./-p ./--version;
1866   do
1867     test -d $d && rmdir $d
1868   done
1869   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
1870   if test -f "$ac_aux_dir/mkinstalldirs"; then
1871     mkdir_p='$(mkinstalldirs)'
1872   else
1873     mkdir_p='$(install_sh) -d'
1874   fi
1875 fi
1876
1877 for ac_prog in gawk mawk nawk awk
1878 do
1879   # Extract the first word of "$ac_prog", so it can be a program name with args.
1880 set dummy $ac_prog; ac_word=$2
1881 echo "$as_me:$LINENO: checking for $ac_word" >&5
1882 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1883 if test "${ac_cv_prog_AWK+set}" = set; then
1884   echo $ECHO_N "(cached) $ECHO_C" >&6
1885 else
1886   if test -n "$AWK"; then
1887   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1888 else
1889 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1890 for as_dir in $PATH
1891 do
1892   IFS=$as_save_IFS
1893   test -z "$as_dir" && as_dir=.
1894   for ac_exec_ext in '' $ac_executable_extensions; do
1895   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1896     ac_cv_prog_AWK="$ac_prog"
1897     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1898     break 2
1899   fi
1900 done
1901 done
1902
1903 fi
1904 fi
1905 AWK=$ac_cv_prog_AWK
1906 if test -n "$AWK"; then
1907   echo "$as_me:$LINENO: result: $AWK" >&5
1908 echo "${ECHO_T}$AWK" >&6
1909 else
1910   echo "$as_me:$LINENO: result: no" >&5
1911 echo "${ECHO_T}no" >&6
1912 fi
1913
1914   test -n "$AWK" && break
1915 done
1916
1917 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
1918 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
1919 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
1920 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1921   echo $ECHO_N "(cached) $ECHO_C" >&6
1922 else
1923   cat >conftest.make <<\_ACEOF
1924 all:
1925         @echo 'ac_maketemp="$(MAKE)"'
1926 _ACEOF
1927 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1928 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1929 if test -n "$ac_maketemp"; then
1930   eval ac_cv_prog_make_${ac_make}_set=yes
1931 else
1932   eval ac_cv_prog_make_${ac_make}_set=no
1933 fi
1934 rm -f conftest.make
1935 fi
1936 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1937   echo "$as_me:$LINENO: result: yes" >&5
1938 echo "${ECHO_T}yes" >&6
1939   SET_MAKE=
1940 else
1941   echo "$as_me:$LINENO: result: no" >&5
1942 echo "${ECHO_T}no" >&6
1943   SET_MAKE="MAKE=${MAKE-make}"
1944 fi
1945
1946 rm -rf .tst 2>/dev/null
1947 mkdir .tst 2>/dev/null
1948 if test -d .tst; then
1949   am__leading_dot=.
1950 else
1951   am__leading_dot=_
1952 fi
1953 rmdir .tst 2>/dev/null
1954
1955 # test to see if srcdir already configured
1956 if test "`cd $srcdir && pwd`" != "`pwd`" &&
1957    test -f $srcdir/config.status; then
1958   { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
1959 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
1960    { (exit 1); exit 1; }; }
1961 fi
1962
1963 # test whether we have cygpath
1964 if test -z "$CYGPATH_W"; then
1965   if (cygpath --version) >/dev/null 2>/dev/null; then
1966     CYGPATH_W='cygpath -w'
1967   else
1968     CYGPATH_W=echo
1969   fi
1970 fi
1971
1972
1973 # Define the identity of the package.
1974  PACKAGE=$OL_PACKAGE
1975  VERSION=$OL_VERSION
1976
1977
1978 # Some tools Automake needs.
1979
1980 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
1981
1982
1983 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
1984
1985
1986 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
1987
1988
1989 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
1990
1991
1992 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
1993
1994 install_sh=${install_sh-"$am_aux_dir/install-sh"}
1995
1996 # Installed binaries are usually stripped using `strip' when the user
1997 # run `make install-strip'.  However `strip' might not be the right
1998 # tool to use in cross-compilation environments, therefore Automake
1999 # will honor the `STRIP' environment variable to overrule this program.
2000 if test "$cross_compiling" != no; then
2001   if test -n "$ac_tool_prefix"; then
2002   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2003 set dummy ${ac_tool_prefix}strip; ac_word=$2
2004 echo "$as_me:$LINENO: checking for $ac_word" >&5
2005 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2006 if test "${ac_cv_prog_STRIP+set}" = set; then
2007   echo $ECHO_N "(cached) $ECHO_C" >&6
2008 else
2009   if test -n "$STRIP"; then
2010   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2011 else
2012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2013 for as_dir in $PATH
2014 do
2015   IFS=$as_save_IFS
2016   test -z "$as_dir" && as_dir=.
2017   for ac_exec_ext in '' $ac_executable_extensions; do
2018   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2019     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2020     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2021     break 2
2022   fi
2023 done
2024 done
2025
2026 fi
2027 fi
2028 STRIP=$ac_cv_prog_STRIP
2029 if test -n "$STRIP"; then
2030   echo "$as_me:$LINENO: result: $STRIP" >&5
2031 echo "${ECHO_T}$STRIP" >&6
2032 else
2033   echo "$as_me:$LINENO: result: no" >&5
2034 echo "${ECHO_T}no" >&6
2035 fi
2036
2037 fi
2038 if test -z "$ac_cv_prog_STRIP"; then
2039   ac_ct_STRIP=$STRIP
2040   # Extract the first word of "strip", so it can be a program name with args.
2041 set dummy strip; ac_word=$2
2042 echo "$as_me:$LINENO: checking for $ac_word" >&5
2043 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2044 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
2045   echo $ECHO_N "(cached) $ECHO_C" >&6
2046 else
2047   if test -n "$ac_ct_STRIP"; then
2048   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2049 else
2050 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2051 for as_dir in $PATH
2052 do
2053   IFS=$as_save_IFS
2054   test -z "$as_dir" && as_dir=.
2055   for ac_exec_ext in '' $ac_executable_extensions; do
2056   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2057     ac_cv_prog_ac_ct_STRIP="strip"
2058     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2059     break 2
2060   fi
2061 done
2062 done
2063
2064   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
2065 fi
2066 fi
2067 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2068 if test -n "$ac_ct_STRIP"; then
2069   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
2070 echo "${ECHO_T}$ac_ct_STRIP" >&6
2071 else
2072   echo "$as_me:$LINENO: result: no" >&5
2073 echo "${ECHO_T}no" >&6
2074 fi
2075
2076   STRIP=$ac_ct_STRIP
2077 else
2078   STRIP="$ac_cv_prog_STRIP"
2079 fi
2080
2081 fi
2082 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
2083
2084 # We need awk for the "check" target.  The system "awk" is bad on
2085 # some platforms.
2086 # Always define AMTAR for backward compatibility.
2087
2088 AMTAR=${AMTAR-"${am_missing_run}tar"}
2089
2090 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
2091
2092
2093
2094
2095
2096 cat >>confdefs.h <<_ACEOF
2097 #define OPENLDAP_PACKAGE "$PACKAGE"
2098 _ACEOF
2099
2100
2101 cat >>confdefs.h <<_ACEOF
2102 #define OPENLDAP_VERSION "$VERSION"
2103 _ACEOF
2104
2105
2106
2107 cat >>confdefs.h <<_ACEOF
2108 #define LDAP_VENDOR_VERSION $OL_API_INC
2109 _ACEOF
2110
2111
2112 cat >>confdefs.h <<_ACEOF
2113 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
2114 _ACEOF
2115
2116
2117 cat >>confdefs.h <<_ACEOF
2118 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
2119 _ACEOF
2120
2121
2122 cat >>confdefs.h <<_ACEOF
2123 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
2124 _ACEOF
2125
2126
2127 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
2128
2129 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
2130
2131 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
2132
2133
2134
2135
2136
2137
2138
2139           ac_config_headers="$ac_config_headers include/portable.h:include/portable.hin"
2140
2141           ac_config_headers="$ac_config_headers include/ldap_features.h:include/ldap_features.hin"
2142
2143           ac_config_headers="$ac_config_headers include/lber_types.h:include/lber_types.hin"
2144
2145
2146 echo "$as_me:$LINENO: checking configure arguments" >&5
2147 echo $ECHO_N "checking configure arguments... $ECHO_C" >&6
2148
2149
2150 top_builddir=`pwd`
2151
2152 ldap_subdir="/openldap"
2153
2154
2155 # Check whether --with-subdir or --without-subdir was given.
2156 if test "${with_subdir+set}" = set; then
2157   withval="$with_subdir"
2158   case "$withval" in
2159         no) ldap_subdir=""
2160                 ;;
2161         yes)
2162                 ;;
2163         /*|\\*)
2164                 ldap_subdir="$withval"
2165                 ;;
2166         *)
2167                 ldap_subdir="/$withval"
2168                 ;;
2169 esac
2170
2171 fi;
2172
2173 # OpenLDAP --enable-debug
2174
2175         # Check whether --enable-debug or --disable-debug was given.
2176 if test "${enable_debug+set}" = set; then
2177   enableval="$enable_debug"
2178
2179         ol_arg=invalid
2180         for ol_val in auto yes no ; do
2181                 if test "$enableval" = "$ol_val" ; then
2182                         ol_arg="$ol_val"
2183                 fi
2184         done
2185         if test "$ol_arg" = "invalid" ; then
2186                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-debug" >&5
2187 echo "$as_me: error: bad value $enableval for --enable-debug" >&2;}
2188    { (exit 1); exit 1; }; }
2189         fi
2190         ol_enable_debug="$ol_arg"
2191
2192 else
2193         ol_enable_debug=yes
2194 fi;
2195 # end --enable-debug
2196 # OpenLDAP --enable-dynamic
2197
2198         # Check whether --enable-dynamic or --disable-dynamic was given.
2199 if test "${enable_dynamic+set}" = set; then
2200   enableval="$enable_dynamic"
2201
2202         ol_arg=invalid
2203         for ol_val in auto yes no ; do
2204                 if test "$enableval" = "$ol_val" ; then
2205                         ol_arg="$ol_val"
2206                 fi
2207         done
2208         if test "$ol_arg" = "invalid" ; then
2209                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dynamic" >&5
2210 echo "$as_me: error: bad value $enableval for --enable-dynamic" >&2;}
2211    { (exit 1); exit 1; }; }
2212         fi
2213         ol_enable_dynamic="$ol_arg"
2214
2215 else
2216         ol_enable_dynamic=no
2217 fi;
2218 # end --enable-dynamic
2219 # OpenLDAP --enable-syslog
2220
2221         # Check whether --enable-syslog or --disable-syslog was given.
2222 if test "${enable_syslog+set}" = set; then
2223   enableval="$enable_syslog"
2224
2225         ol_arg=invalid
2226         for ol_val in auto yes no ; do
2227                 if test "$enableval" = "$ol_val" ; then
2228                         ol_arg="$ol_val"
2229                 fi
2230         done
2231         if test "$ol_arg" = "invalid" ; then
2232                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-syslog" >&5
2233 echo "$as_me: error: bad value $enableval for --enable-syslog" >&2;}
2234    { (exit 1); exit 1; }; }
2235         fi
2236         ol_enable_syslog="$ol_arg"
2237
2238 else
2239         ol_enable_syslog=auto
2240 fi;
2241 # end --enable-syslog
2242 # OpenLDAP --enable-proctitle
2243
2244         # Check whether --enable-proctitle or --disable-proctitle was given.
2245 if test "${enable_proctitle+set}" = set; then
2246   enableval="$enable_proctitle"
2247
2248         ol_arg=invalid
2249         for ol_val in auto yes no ; do
2250                 if test "$enableval" = "$ol_val" ; then
2251                         ol_arg="$ol_val"
2252                 fi
2253         done
2254         if test "$ol_arg" = "invalid" ; then
2255                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-proctitle" >&5
2256 echo "$as_me: error: bad value $enableval for --enable-proctitle" >&2;}
2257    { (exit 1); exit 1; }; }
2258         fi
2259         ol_enable_proctitle="$ol_arg"
2260
2261 else
2262         ol_enable_proctitle=yes
2263 fi;
2264 # end --enable-proctitle
2265 ol_enable_referrals=${ol_enable_referrals-no}
2266 ol_enable_kbind=${ol_enable_kbind-no}
2267 # OpenLDAP --enable-ipv6
2268
2269         # Check whether --enable-ipv6 or --disable-ipv6 was given.
2270 if test "${enable_ipv6+set}" = set; then
2271   enableval="$enable_ipv6"
2272
2273         ol_arg=invalid
2274         for ol_val in auto yes no ; do
2275                 if test "$enableval" = "$ol_val" ; then
2276                         ol_arg="$ol_val"
2277                 fi
2278         done
2279         if test "$ol_arg" = "invalid" ; then
2280                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ipv6" >&5
2281 echo "$as_me: error: bad value $enableval for --enable-ipv6" >&2;}
2282    { (exit 1); exit 1; }; }
2283         fi
2284         ol_enable_ipv6="$ol_arg"
2285
2286 else
2287         ol_enable_ipv6=auto
2288 fi;
2289 # end --enable-ipv6
2290 # OpenLDAP --enable-local
2291
2292         # Check whether --enable-local or --disable-local was given.
2293 if test "${enable_local+set}" = set; then
2294   enableval="$enable_local"
2295
2296         ol_arg=invalid
2297         for ol_val in auto yes no ; do
2298                 if test "$enableval" = "$ol_val" ; then
2299                         ol_arg="$ol_val"
2300                 fi
2301         done
2302         if test "$ol_arg" = "invalid" ; then
2303                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-local" >&5
2304 echo "$as_me: error: bad value $enableval for --enable-local" >&2;}
2305    { (exit 1); exit 1; }; }
2306         fi
2307         ol_enable_local="$ol_arg"
2308
2309 else
2310         ol_enable_local=auto
2311 fi;
2312 # end --enable-local
2313
2314 # OpenLDAP --with-cyrus_sasl
2315
2316 # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
2317 if test "${with_cyrus_sasl+set}" = set; then
2318   withval="$with_cyrus_sasl"
2319
2320         ol_arg=invalid
2321         for ol_val in auto yes no  ; do
2322                 if test "$withval" = "$ol_val" ; then
2323                         ol_arg="$ol_val"
2324                 fi
2325         done
2326         if test "$ol_arg" = "invalid" ; then
2327                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-cyrus_sasl" >&5
2328 echo "$as_me: error: bad value $withval for --with-cyrus_sasl" >&2;}
2329    { (exit 1); exit 1; }; }
2330         fi
2331         ol_with_cyrus_sasl="$ol_arg"
2332
2333 else
2334         ol_with_cyrus_sasl="auto"
2335 fi; # end --with-cyrus_sasl
2336
2337 # OpenLDAP --with-fetch
2338
2339 # Check whether --with-fetch or --without-fetch was given.
2340 if test "${with_fetch+set}" = set; then
2341   withval="$with_fetch"
2342
2343         ol_arg=invalid
2344         for ol_val in auto yes no  ; do
2345                 if test "$withval" = "$ol_val" ; then
2346                         ol_arg="$ol_val"
2347                 fi
2348         done
2349         if test "$ol_arg" = "invalid" ; then
2350                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-fetch" >&5
2351 echo "$as_me: error: bad value $withval for --with-fetch" >&2;}
2352    { (exit 1); exit 1; }; }
2353         fi
2354         ol_with_fetch="$ol_arg"
2355
2356 else
2357         ol_with_fetch="auto"
2358 fi; # end --with-fetch
2359
2360 ol_with_kerberos=${ol_with_kerberos-auto}
2361 # OpenLDAP --with-threads
2362
2363 # Check whether --with-threads or --without-threads was given.
2364 if test "${with_threads+set}" = set; then
2365   withval="$with_threads"
2366
2367         ol_arg=invalid
2368         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
2369                 if test "$withval" = "$ol_val" ; then
2370                         ol_arg="$ol_val"
2371                 fi
2372         done
2373         if test "$ol_arg" = "invalid" ; then
2374                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-threads" >&5
2375 echo "$as_me: error: bad value $withval for --with-threads" >&2;}
2376    { (exit 1); exit 1; }; }
2377         fi
2378         ol_with_threads="$ol_arg"
2379
2380 else
2381         ol_with_threads="auto"
2382 fi; # end --with-threads
2383
2384 # OpenLDAP --with-tls
2385
2386 # Check whether --with-tls or --without-tls was given.
2387 if test "${with_tls+set}" = set; then
2388   withval="$with_tls"
2389
2390         ol_arg=invalid
2391         for ol_val in auto openssl yes no  ; do
2392                 if test "$withval" = "$ol_val" ; then
2393                         ol_arg="$ol_val"
2394                 fi
2395         done
2396         if test "$ol_arg" = "invalid" ; then
2397                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-tls" >&5
2398 echo "$as_me: error: bad value $withval for --with-tls" >&2;}
2399    { (exit 1); exit 1; }; }
2400         fi
2401         ol_with_tls="$ol_arg"
2402
2403 else
2404         ol_with_tls="auto"
2405 fi; # end --with-tls
2406
2407 # OpenLDAP --with-yielding_select
2408
2409 # Check whether --with-yielding_select or --without-yielding_select was given.
2410 if test "${with_yielding_select+set}" = set; then
2411   withval="$with_yielding_select"
2412
2413         ol_arg=invalid
2414         for ol_val in auto yes no manual  ; do
2415                 if test "$withval" = "$ol_val" ; then
2416                         ol_arg="$ol_val"
2417                 fi
2418         done
2419         if test "$ol_arg" = "invalid" ; then
2420                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-yielding_select" >&5
2421 echo "$as_me: error: bad value $withval for --with-yielding_select" >&2;}
2422    { (exit 1); exit 1; }; }
2423         fi
2424         ol_with_yielding_select="$ol_arg"
2425
2426 else
2427         ol_with_yielding_select="auto"
2428 fi; # end --with-yielding_select
2429
2430 # OpenLDAP --with-multiple_precision
2431
2432 # Check whether --with-multiple_precision or --without-multiple_precision was given.
2433 if test "${with_multiple_precision+set}" = set; then
2434   withval="$with_multiple_precision"
2435
2436         ol_arg=invalid
2437         for ol_val in auto bignum gmp yes no  ; do
2438                 if test "$withval" = "$ol_val" ; then
2439                         ol_arg="$ol_val"
2440                 fi
2441         done
2442         if test "$ol_arg" = "invalid" ; then
2443                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-multiple_precision" >&5
2444 echo "$as_me: error: bad value $withval for --with-multiple_precision" >&2;}
2445    { (exit 1); exit 1; }; }
2446         fi
2447         ol_with_multiple_precision="$ol_arg"
2448
2449 else
2450         ol_with_multiple_precision="auto"
2451 fi; # end --with-multiple_precision
2452
2453
2454
2455 # Check whether --enable-xxslapdoptions or --disable-xxslapdoptions was given.
2456 if test "${enable_xxslapdoptions+set}" = set; then
2457   enableval="$enable_xxslapdoptions"
2458
2459 fi;
2460 # OpenLDAP --enable-slapd
2461
2462         # Check whether --enable-slapd or --disable-slapd was given.
2463 if test "${enable_slapd+set}" = set; then
2464   enableval="$enable_slapd"
2465
2466         ol_arg=invalid
2467         for ol_val in auto yes no ; do
2468                 if test "$enableval" = "$ol_val" ; then
2469                         ol_arg="$ol_val"
2470                 fi
2471         done
2472         if test "$ol_arg" = "invalid" ; then
2473                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slapd" >&5
2474 echo "$as_me: error: bad value $enableval for --enable-slapd" >&2;}
2475    { (exit 1); exit 1; }; }
2476         fi
2477         ol_enable_slapd="$ol_arg"
2478
2479 else
2480         ol_enable_slapd=yes
2481 fi;
2482 # end --enable-slapd
2483 # OpenLDAP --enable-aci
2484
2485         # Check whether --enable-aci or --disable-aci was given.
2486 if test "${enable_aci+set}" = set; then
2487   enableval="$enable_aci"
2488
2489         ol_arg=invalid
2490         for ol_val in auto yes no ; do
2491                 if test "$enableval" = "$ol_val" ; then
2492                         ol_arg="$ol_val"
2493                 fi
2494         done
2495         if test "$ol_arg" = "invalid" ; then
2496                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-aci" >&5
2497 echo "$as_me: error: bad value $enableval for --enable-aci" >&2;}
2498    { (exit 1); exit 1; }; }
2499         fi
2500         ol_enable_aci="$ol_arg"
2501
2502 else
2503         ol_enable_aci=no
2504 fi;
2505 # end --enable-aci
2506 # OpenLDAP --enable-cleartext
2507
2508         # Check whether --enable-cleartext or --disable-cleartext was given.
2509 if test "${enable_cleartext+set}" = set; then
2510   enableval="$enable_cleartext"
2511
2512         ol_arg=invalid
2513         for ol_val in auto yes no ; do
2514                 if test "$enableval" = "$ol_val" ; then
2515                         ol_arg="$ol_val"
2516                 fi
2517         done
2518         if test "$ol_arg" = "invalid" ; then
2519                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-cleartext" >&5
2520 echo "$as_me: error: bad value $enableval for --enable-cleartext" >&2;}
2521    { (exit 1); exit 1; }; }
2522         fi
2523         ol_enable_cleartext="$ol_arg"
2524
2525 else
2526         ol_enable_cleartext=yes
2527 fi;
2528 # end --enable-cleartext
2529 # OpenLDAP --enable-crypt
2530
2531         # Check whether --enable-crypt or --disable-crypt was given.
2532 if test "${enable_crypt+set}" = set; then
2533   enableval="$enable_crypt"
2534
2535         ol_arg=invalid
2536         for ol_val in auto yes no ; do
2537                 if test "$enableval" = "$ol_val" ; then
2538                         ol_arg="$ol_val"
2539                 fi
2540         done
2541         if test "$ol_arg" = "invalid" ; then
2542                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-crypt" >&5
2543 echo "$as_me: error: bad value $enableval for --enable-crypt" >&2;}
2544    { (exit 1); exit 1; }; }
2545         fi
2546         ol_enable_crypt="$ol_arg"
2547
2548 else
2549         ol_enable_crypt=no
2550 fi;
2551 # end --enable-crypt
2552 # OpenLDAP --enable-lmpasswd
2553
2554         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
2555 if test "${enable_lmpasswd+set}" = set; then
2556   enableval="$enable_lmpasswd"
2557
2558         ol_arg=invalid
2559         for ol_val in auto yes no ; do
2560                 if test "$enableval" = "$ol_val" ; then
2561                         ol_arg="$ol_val"
2562                 fi
2563         done
2564         if test "$ol_arg" = "invalid" ; then
2565                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-lmpasswd" >&5
2566 echo "$as_me: error: bad value $enableval for --enable-lmpasswd" >&2;}
2567    { (exit 1); exit 1; }; }
2568         fi
2569         ol_enable_lmpasswd="$ol_arg"
2570
2571 else
2572         ol_enable_lmpasswd=no
2573 fi;
2574 # end --enable-lmpasswd
2575 # OpenLDAP --enable-spasswd
2576
2577         # Check whether --enable-spasswd or --disable-spasswd was given.
2578 if test "${enable_spasswd+set}" = set; then
2579   enableval="$enable_spasswd"
2580
2581         ol_arg=invalid
2582         for ol_val in auto yes no ; do
2583                 if test "$enableval" = "$ol_val" ; then
2584                         ol_arg="$ol_val"
2585                 fi
2586         done
2587         if test "$ol_arg" = "invalid" ; then
2588                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-spasswd" >&5
2589 echo "$as_me: error: bad value $enableval for --enable-spasswd" >&2;}
2590    { (exit 1); exit 1; }; }
2591         fi
2592         ol_enable_spasswd="$ol_arg"
2593
2594 else
2595         ol_enable_spasswd=no
2596 fi;
2597 # end --enable-spasswd
2598 # OpenLDAP --enable-modules
2599
2600         # Check whether --enable-modules or --disable-modules was given.
2601 if test "${enable_modules+set}" = set; then
2602   enableval="$enable_modules"
2603
2604         ol_arg=invalid
2605         for ol_val in auto yes no ; do
2606                 if test "$enableval" = "$ol_val" ; then
2607                         ol_arg="$ol_val"
2608                 fi
2609         done
2610         if test "$ol_arg" = "invalid" ; then
2611                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-modules" >&5
2612 echo "$as_me: error: bad value $enableval for --enable-modules" >&2;}
2613    { (exit 1); exit 1; }; }
2614         fi
2615         ol_enable_modules="$ol_arg"
2616
2617 else
2618         ol_enable_modules=no
2619 fi;
2620 # end --enable-modules
2621 ol_enable_multimaster=${ol_enable_multimaster-no}
2622 # OpenLDAP --enable-rewrite
2623
2624         # Check whether --enable-rewrite or --disable-rewrite was given.
2625 if test "${enable_rewrite+set}" = set; then
2626   enableval="$enable_rewrite"
2627
2628         ol_arg=invalid
2629         for ol_val in auto yes no ; do
2630                 if test "$enableval" = "$ol_val" ; then
2631                         ol_arg="$ol_val"
2632                 fi
2633         done
2634         if test "$ol_arg" = "invalid" ; then
2635                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rewrite" >&5
2636 echo "$as_me: error: bad value $enableval for --enable-rewrite" >&2;}
2637    { (exit 1); exit 1; }; }
2638         fi
2639         ol_enable_rewrite="$ol_arg"
2640
2641 else
2642         ol_enable_rewrite=auto
2643 fi;
2644 # end --enable-rewrite
2645 # OpenLDAP --enable-rlookups
2646
2647         # Check whether --enable-rlookups or --disable-rlookups was given.
2648 if test "${enable_rlookups+set}" = set; then
2649   enableval="$enable_rlookups"
2650
2651         ol_arg=invalid
2652         for ol_val in auto yes no ; do
2653                 if test "$enableval" = "$ol_val" ; then
2654                         ol_arg="$ol_val"
2655                 fi
2656         done
2657         if test "$ol_arg" = "invalid" ; then
2658                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rlookups" >&5
2659 echo "$as_me: error: bad value $enableval for --enable-rlookups" >&2;}
2660    { (exit 1); exit 1; }; }
2661         fi
2662         ol_enable_rlookups="$ol_arg"
2663
2664 else
2665         ol_enable_rlookups=no
2666 fi;
2667 # end --enable-rlookups
2668 # OpenLDAP --enable-slapi
2669
2670         # Check whether --enable-slapi or --disable-slapi was given.
2671 if test "${enable_slapi+set}" = set; then
2672   enableval="$enable_slapi"
2673
2674         ol_arg=invalid
2675         for ol_val in auto yes no ; do
2676                 if test "$enableval" = "$ol_val" ; then
2677                         ol_arg="$ol_val"
2678                 fi
2679         done
2680         if test "$ol_arg" = "invalid" ; then
2681                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slapi" >&5
2682 echo "$as_me: error: bad value $enableval for --enable-slapi" >&2;}
2683    { (exit 1); exit 1; }; }
2684         fi
2685         ol_enable_slapi="$ol_arg"
2686
2687 else
2688         ol_enable_slapi=no
2689 fi;
2690 # end --enable-slapi
2691 # OpenLDAP --enable-slp
2692
2693         # Check whether --enable-slp or --disable-slp was given.
2694 if test "${enable_slp+set}" = set; then
2695   enableval="$enable_slp"
2696
2697         ol_arg=invalid
2698         for ol_val in auto yes no ; do
2699                 if test "$enableval" = "$ol_val" ; then
2700                         ol_arg="$ol_val"
2701                 fi
2702         done
2703         if test "$ol_arg" = "invalid" ; then
2704                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slp" >&5
2705 echo "$as_me: error: bad value $enableval for --enable-slp" >&2;}
2706    { (exit 1); exit 1; }; }
2707         fi
2708         ol_enable_slp="$ol_arg"
2709
2710 else
2711         ol_enable_slp=no
2712 fi;
2713 # end --enable-slp
2714 # OpenLDAP --enable-wrappers
2715
2716         # Check whether --enable-wrappers or --disable-wrappers was given.
2717 if test "${enable_wrappers+set}" = set; then
2718   enableval="$enable_wrappers"
2719
2720         ol_arg=invalid
2721         for ol_val in auto yes no ; do
2722                 if test "$enableval" = "$ol_val" ; then
2723                         ol_arg="$ol_val"
2724                 fi
2725         done
2726         if test "$ol_arg" = "invalid" ; then
2727                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-wrappers" >&5
2728 echo "$as_me: error: bad value $enableval for --enable-wrappers" >&2;}
2729    { (exit 1); exit 1; }; }
2730         fi
2731         ol_enable_wrappers="$ol_arg"
2732
2733 else
2734         ol_enable_wrappers=no
2735 fi;
2736 # end --enable-wrappers
2737
2738 Backends="bdb \
2739         dnssrv \
2740         hdb \
2741         ldap \
2742         ldbm \
2743         meta \
2744         monitor \
2745         null \
2746         passwd \
2747         perl \
2748         relay \
2749         shell \
2750         sql"
2751
2752 # Check whether --enable-xxslapbackends or --disable-xxslapbackends was given.
2753 if test "${enable_xxslapbackends+set}" = set; then
2754   enableval="$enable_xxslapbackends"
2755
2756 fi;
2757
2758 # OpenLDAP --enable-backends
2759
2760         # Check whether --enable-backends or --disable-backends was given.
2761 if test "${enable_backends+set}" = set; then
2762   enableval="$enable_backends"
2763
2764         ol_arg=invalid
2765         for ol_val in no yes mod ; do
2766                 if test "$enableval" = "$ol_val" ; then
2767                         ol_arg="$ol_val"
2768                 fi
2769         done
2770         if test "$ol_arg" = "invalid" ; then
2771                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-backends" >&5
2772 echo "$as_me: error: bad value $enableval for --enable-backends" >&2;}
2773    { (exit 1); exit 1; }; }
2774         fi
2775         ol_enable_backends="$ol_arg"
2776
2777 fi;
2778 # end --enable-backends
2779 # OpenLDAP --enable-bdb
2780
2781         # Check whether --enable-bdb or --disable-bdb was given.
2782 if test "${enable_bdb+set}" = set; then
2783   enableval="$enable_bdb"
2784
2785         ol_arg=invalid
2786         for ol_val in no yes mod ; do
2787                 if test "$enableval" = "$ol_val" ; then
2788                         ol_arg="$ol_val"
2789                 fi
2790         done
2791         if test "$ol_arg" = "invalid" ; then
2792                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-bdb" >&5
2793 echo "$as_me: error: bad value $enableval for --enable-bdb" >&2;}
2794    { (exit 1); exit 1; }; }
2795         fi
2796         ol_enable_bdb="$ol_arg"
2797
2798 else
2799         ol_enable_bdb=${ol_enable_backends:-yes}
2800 fi;
2801 # end --enable-bdb
2802 # OpenLDAP --enable-dnssrv
2803
2804         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2805 if test "${enable_dnssrv+set}" = set; then
2806   enableval="$enable_dnssrv"
2807
2808         ol_arg=invalid
2809         for ol_val in no yes mod ; do
2810                 if test "$enableval" = "$ol_val" ; then
2811                         ol_arg="$ol_val"
2812                 fi
2813         done
2814         if test "$ol_arg" = "invalid" ; then
2815                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dnssrv" >&5
2816 echo "$as_me: error: bad value $enableval for --enable-dnssrv" >&2;}
2817    { (exit 1); exit 1; }; }
2818         fi
2819         ol_enable_dnssrv="$ol_arg"
2820
2821 else
2822         ol_enable_dnssrv=${ol_enable_backends:-no}
2823 fi;
2824 # end --enable-dnssrv
2825 # OpenLDAP --enable-hdb
2826
2827         # Check whether --enable-hdb or --disable-hdb was given.
2828 if test "${enable_hdb+set}" = set; then
2829   enableval="$enable_hdb"
2830
2831         ol_arg=invalid
2832         for ol_val in no yes mod ; do
2833                 if test "$enableval" = "$ol_val" ; then
2834                         ol_arg="$ol_val"
2835                 fi
2836         done
2837         if test "$ol_arg" = "invalid" ; then
2838                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-hdb" >&5
2839 echo "$as_me: error: bad value $enableval for --enable-hdb" >&2;}
2840    { (exit 1); exit 1; }; }
2841         fi
2842         ol_enable_hdb="$ol_arg"
2843
2844 else
2845         ol_enable_hdb=${ol_enable_backends:-yes}
2846 fi;
2847 # end --enable-hdb
2848 # OpenLDAP --enable-ldap
2849
2850         # Check whether --enable-ldap or --disable-ldap was given.
2851 if test "${enable_ldap+set}" = set; then
2852   enableval="$enable_ldap"
2853
2854         ol_arg=invalid
2855         for ol_val in no yes mod ; do
2856                 if test "$enableval" = "$ol_val" ; then
2857                         ol_arg="$ol_val"
2858                 fi
2859         done
2860         if test "$ol_arg" = "invalid" ; then
2861                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldap" >&5
2862 echo "$as_me: error: bad value $enableval for --enable-ldap" >&2;}
2863    { (exit 1); exit 1; }; }
2864         fi
2865         ol_enable_ldap="$ol_arg"
2866
2867 else
2868         ol_enable_ldap=${ol_enable_backends:-no}
2869 fi;
2870 # end --enable-ldap
2871 # OpenLDAP --enable-ldbm
2872
2873         # Check whether --enable-ldbm or --disable-ldbm was given.
2874 if test "${enable_ldbm+set}" = set; then
2875   enableval="$enable_ldbm"
2876
2877         ol_arg=invalid
2878         for ol_val in no yes mod ; do
2879                 if test "$enableval" = "$ol_val" ; then
2880                         ol_arg="$ol_val"
2881                 fi
2882         done
2883         if test "$ol_arg" = "invalid" ; then
2884                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldbm" >&5
2885 echo "$as_me: error: bad value $enableval for --enable-ldbm" >&2;}
2886    { (exit 1); exit 1; }; }
2887         fi
2888         ol_enable_ldbm="$ol_arg"
2889
2890 else
2891         ol_enable_ldbm=${ol_enable_backends:-no}
2892 fi;
2893 # end --enable-ldbm
2894
2895 # Check whether --with-ldbm_api or --without-ldbm_api was given.
2896 if test "${with_ldbm_api+set}" = set; then
2897   withval="$with_ldbm_api"
2898
2899         { echo "$as_me:$LINENO: WARNING: Please use --enable-ldbm-api instead of --with-ldbm-api" >&5
2900 echo "$as_me: WARNING: Please use --enable-ldbm-api instead of --with-ldbm-api" >&2;}
2901         enable_ldbm_api="$with_ldbm_api"
2902 fi;
2903 # OpenLDAP --enable-ldbm_api
2904
2905         # Check whether --enable-ldbm_api or --disable-ldbm_api was given.
2906 if test "${enable_ldbm_api+set}" = set; then
2907   enableval="$enable_ldbm_api"
2908
2909         ol_arg=invalid
2910         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2911                 if test "$enableval" = "$ol_val" ; then
2912                         ol_arg="$ol_val"
2913                 fi
2914         done
2915         if test "$ol_arg" = "invalid" ; then
2916                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldbm_api" >&5
2917 echo "$as_me: error: bad value $enableval for --enable-ldbm_api" >&2;}
2918    { (exit 1); exit 1; }; }
2919         fi
2920         ol_enable_ldbm_api="$ol_arg"
2921
2922 else
2923         ol_enable_ldbm_api=auto
2924 fi;
2925 # end --enable-ldbm_api
2926
2927
2928 # Check whether --with-ldbm_type or --without-ldbm_type was given.
2929 if test "${with_ldbm_type+set}" = set; then
2930   withval="$with_ldbm_type"
2931
2932         { echo "$as_me:$LINENO: WARNING: Please use --enable-ldbm-type instead of --with-ldbm-type" >&5
2933 echo "$as_me: WARNING: Please use --enable-ldbm-type instead of --with-ldbm-type" >&2;}
2934         enable_ldbm_type="$with_ldbm_type"
2935 fi;
2936 # OpenLDAP --enable-ldbm_type
2937
2938         # Check whether --enable-ldbm_type or --disable-ldbm_type was given.
2939 if test "${enable_ldbm_type+set}" = set; then
2940   enableval="$enable_ldbm_type"
2941
2942         ol_arg=invalid
2943         for ol_val in auto btree hash ; do
2944                 if test "$enableval" = "$ol_val" ; then
2945                         ol_arg="$ol_val"
2946                 fi
2947         done
2948         if test "$ol_arg" = "invalid" ; then
2949                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldbm_type" >&5
2950 echo "$as_me: error: bad value $enableval for --enable-ldbm_type" >&2;}
2951    { (exit 1); exit 1; }; }
2952         fi
2953         ol_enable_ldbm_type="$ol_arg"
2954
2955 else
2956         ol_enable_ldbm_type=auto
2957 fi;
2958 # end --enable-ldbm_type
2959
2960 # OpenLDAP --enable-meta
2961
2962         # Check whether --enable-meta or --disable-meta was given.
2963 if test "${enable_meta+set}" = set; then
2964   enableval="$enable_meta"
2965
2966         ol_arg=invalid
2967         for ol_val in no yes mod ; do
2968                 if test "$enableval" = "$ol_val" ; then
2969                         ol_arg="$ol_val"
2970                 fi
2971         done
2972         if test "$ol_arg" = "invalid" ; then
2973                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-meta" >&5
2974 echo "$as_me: error: bad value $enableval for --enable-meta" >&2;}
2975    { (exit 1); exit 1; }; }
2976         fi
2977         ol_enable_meta="$ol_arg"
2978
2979 else
2980         ol_enable_meta=${ol_enable_backends:-no}
2981 fi;
2982 # end --enable-meta
2983 # OpenLDAP --enable-monitor
2984
2985         # Check whether --enable-monitor or --disable-monitor was given.
2986 if test "${enable_monitor+set}" = set; then
2987   enableval="$enable_monitor"
2988
2989         ol_arg=invalid
2990         for ol_val in no yes mod ; do
2991                 if test "$enableval" = "$ol_val" ; then
2992                         ol_arg="$ol_val"
2993                 fi
2994         done
2995         if test "$ol_arg" = "invalid" ; then
2996                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-monitor" >&5
2997 echo "$as_me: error: bad value $enableval for --enable-monitor" >&2;}
2998    { (exit 1); exit 1; }; }
2999         fi
3000         ol_enable_monitor="$ol_arg"
3001
3002 else
3003         ol_enable_monitor=${ol_enable_backends:-yes}
3004 fi;
3005 # end --enable-monitor
3006 # OpenLDAP --enable-null
3007
3008         # Check whether --enable-null or --disable-null was given.
3009 if test "${enable_null+set}" = set; then
3010   enableval="$enable_null"
3011
3012         ol_arg=invalid
3013         for ol_val in no yes mod ; do
3014                 if test "$enableval" = "$ol_val" ; then
3015                         ol_arg="$ol_val"
3016                 fi
3017         done
3018         if test "$ol_arg" = "invalid" ; then
3019                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-null" >&5
3020 echo "$as_me: error: bad value $enableval for --enable-null" >&2;}
3021    { (exit 1); exit 1; }; }
3022         fi
3023         ol_enable_null="$ol_arg"
3024
3025 else
3026         ol_enable_null=${ol_enable_backends:-no}
3027 fi;
3028 # end --enable-null
3029 # OpenLDAP --enable-passwd
3030
3031         # Check whether --enable-passwd or --disable-passwd was given.
3032 if test "${enable_passwd+set}" = set; then
3033   enableval="$enable_passwd"
3034
3035         ol_arg=invalid
3036         for ol_val in no yes mod ; do
3037                 if test "$enableval" = "$ol_val" ; then
3038                         ol_arg="$ol_val"
3039                 fi
3040         done
3041         if test "$ol_arg" = "invalid" ; then
3042                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-passwd" >&5
3043 echo "$as_me: error: bad value $enableval for --enable-passwd" >&2;}
3044    { (exit 1); exit 1; }; }
3045         fi
3046         ol_enable_passwd="$ol_arg"
3047
3048 else
3049         ol_enable_passwd=${ol_enable_backends:-no}
3050 fi;
3051 # end --enable-passwd
3052 # OpenLDAP --enable-perl
3053
3054         # Check whether --enable-perl or --disable-perl was given.
3055 if test "${enable_perl+set}" = set; then
3056   enableval="$enable_perl"
3057
3058         ol_arg=invalid
3059         for ol_val in no yes mod ; do
3060                 if test "$enableval" = "$ol_val" ; then
3061                         ol_arg="$ol_val"
3062                 fi
3063         done
3064         if test "$ol_arg" = "invalid" ; then
3065                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-perl" >&5
3066 echo "$as_me: error: bad value $enableval for --enable-perl" >&2;}
3067    { (exit 1); exit 1; }; }
3068         fi
3069         ol_enable_perl="$ol_arg"
3070
3071 else
3072         ol_enable_perl=${ol_enable_backends:-no}
3073 fi;
3074 # end --enable-perl
3075 # OpenLDAP --enable-relay
3076
3077         # Check whether --enable-relay or --disable-relay was given.
3078 if test "${enable_relay+set}" = set; then
3079   enableval="$enable_relay"
3080
3081         ol_arg=invalid
3082         for ol_val in no yes mod ; do
3083                 if test "$enableval" = "$ol_val" ; then
3084                         ol_arg="$ol_val"
3085                 fi
3086         done
3087         if test "$ol_arg" = "invalid" ; then
3088                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-relay" >&5
3089 echo "$as_me: error: bad value $enableval for --enable-relay" >&2;}
3090    { (exit 1); exit 1; }; }
3091         fi
3092         ol_enable_relay="$ol_arg"
3093
3094 else
3095         ol_enable_relay=${ol_enable_backends:-yes}
3096 fi;
3097 # end --enable-relay
3098 # OpenLDAP --enable-shell
3099
3100         # Check whether --enable-shell or --disable-shell was given.
3101 if test "${enable_shell+set}" = set; then
3102   enableval="$enable_shell"
3103
3104         ol_arg=invalid
3105         for ol_val in no yes mod ; do
3106                 if test "$enableval" = "$ol_val" ; then
3107                         ol_arg="$ol_val"
3108                 fi
3109         done
3110         if test "$ol_arg" = "invalid" ; then
3111                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-shell" >&5
3112 echo "$as_me: error: bad value $enableval for --enable-shell" >&2;}
3113    { (exit 1); exit 1; }; }
3114         fi
3115         ol_enable_shell="$ol_arg"
3116
3117 else
3118         ol_enable_shell=${ol_enable_backends:-no}
3119 fi;
3120 # end --enable-shell
3121 # OpenLDAP --enable-sql
3122
3123         # Check whether --enable-sql or --disable-sql was given.
3124 if test "${enable_sql+set}" = set; then
3125   enableval="$enable_sql"
3126
3127         ol_arg=invalid
3128         for ol_val in no yes mod ; do
3129                 if test "$enableval" = "$ol_val" ; then
3130                         ol_arg="$ol_val"
3131                 fi
3132         done
3133         if test "$ol_arg" = "invalid" ; then
3134                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-sql" >&5
3135 echo "$as_me: error: bad value $enableval for --enable-sql" >&2;}
3136    { (exit 1); exit 1; }; }
3137         fi
3138         ol_enable_sql="$ol_arg"
3139
3140 else
3141         ol_enable_sql=${ol_enable_backends:-no}
3142 fi;
3143 # end --enable-sql
3144
3145 Overlays="accesslog \
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-denyop
3212
3213         # Check whether --enable-denyop or --disable-denyop was given.
3214 if test "${enable_denyop+set}" = set; then
3215   enableval="$enable_denyop"
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-denyop" >&5
3225 echo "$as_me: error: bad value $enableval for --enable-denyop" >&2;}
3226    { (exit 1); exit 1; }; }
3227         fi
3228         ol_enable_denyop="$ol_arg"
3229
3230 else
3231         ol_enable_denyop=${ol_enable_overlays:-no}
3232 fi;
3233 # end --enable-denyop
3234
3235 # OpenLDAP --enable-dyngroup
3236
3237         # Check whether --enable-dyngroup or --disable-dyngroup was given.
3238 if test "${enable_dyngroup+set}" = set; then
3239   enableval="$enable_dyngroup"
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-dyngroup" >&5
3249 echo "$as_me: error: bad value $enableval for --enable-dyngroup" >&2;}
3250    { (exit 1); exit 1; }; }
3251         fi
3252         ol_enable_dyngroup="$ol_arg"
3253
3254 else
3255         ol_enable_dyngroup=${ol_enable_overlays:-no}
3256 fi;
3257 # end --enable-dyngroup
3258
3259 # OpenLDAP --enable-dynlist
3260
3261         # Check whether --enable-dynlist or --disable-dynlist was given.
3262 if test "${enable_dynlist+set}" = set; then
3263   enableval="$enable_dynlist"
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-dynlist" >&5
3273 echo "$as_me: error: bad value $enableval for --enable-dynlist" >&2;}
3274    { (exit 1); exit 1; }; }
3275         fi
3276         ol_enable_dynlist="$ol_arg"
3277
3278 else
3279         ol_enable_dynlist=${ol_enable_overlays:-no}
3280 fi;
3281 # end --enable-dynlist
3282
3283 # OpenLDAP --enable-lastmod
3284
3285         # Check whether --enable-lastmod or --disable-lastmod was given.
3286 if test "${enable_lastmod+set}" = set; then
3287   enableval="$enable_lastmod"
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-lastmod" >&5
3297 echo "$as_me: error: bad value $enableval for --enable-lastmod" >&2;}
3298    { (exit 1); exit 1; }; }
3299         fi
3300         ol_enable_lastmod="$ol_arg"
3301
3302 else
3303         ol_enable_lastmod=${ol_enable_overlays:-no}
3304 fi;
3305 # end --enable-lastmod
3306
3307 # OpenLDAP --enable-ppolicy
3308
3309         # Check whether --enable-ppolicy or --disable-ppolicy was given.
3310 if test "${enable_ppolicy+set}" = set; then
3311   enableval="$enable_ppolicy"
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-ppolicy" >&5
3321 echo "$as_me: error: bad value $enableval for --enable-ppolicy" >&2;}
3322    { (exit 1); exit 1; }; }
3323         fi
3324         ol_enable_ppolicy="$ol_arg"
3325
3326 else
3327         ol_enable_ppolicy=${ol_enable_overlays:-no}
3328 fi;
3329 # end --enable-ppolicy
3330
3331 # OpenLDAP --enable-proxycache
3332
3333         # Check whether --enable-proxycache or --disable-proxycache was given.
3334 if test "${enable_proxycache+set}" = set; then
3335   enableval="$enable_proxycache"
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-proxycache" >&5
3345 echo "$as_me: error: bad value $enableval for --enable-proxycache" >&2;}
3346    { (exit 1); exit 1; }; }
3347         fi
3348         ol_enable_proxycache="$ol_arg"
3349
3350 else
3351         ol_enable_proxycache=${ol_enable_overlays:-no}
3352 fi;
3353 # end --enable-proxycache
3354
3355 # OpenLDAP --enable-refint
3356
3357         # Check whether --enable-refint or --disable-refint was given.
3358 if test "${enable_refint+set}" = set; then
3359   enableval="$enable_refint"
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-refint" >&5
3369 echo "$as_me: error: bad value $enableval for --enable-refint" >&2;}
3370    { (exit 1); exit 1; }; }
3371         fi
3372         ol_enable_refint="$ol_arg"
3373
3374 else
3375         ol_enable_refint=${ol_enable_overlays:-no}
3376 fi;
3377 # end --enable-refint
3378
3379 # OpenLDAP --enable-retcode
3380
3381         # Check whether --enable-retcode or --disable-retcode was given.
3382 if test "${enable_retcode+set}" = set; then
3383   enableval="$enable_retcode"
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-retcode" >&5
3393 echo "$as_me: error: bad value $enableval for --enable-retcode" >&2;}
3394    { (exit 1); exit 1; }; }
3395         fi
3396         ol_enable_retcode="$ol_arg"
3397
3398 else
3399         ol_enable_retcode=${ol_enable_overlays:-no}
3400 fi;
3401 # end --enable-retcode
3402
3403 # OpenLDAP --enable-rwm
3404
3405         # Check whether --enable-rwm or --disable-rwm was given.
3406 if test "${enable_rwm+set}" = set; then
3407   enableval="$enable_rwm"
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-rwm" >&5
3417 echo "$as_me: error: bad value $enableval for --enable-rwm" >&2;}
3418    { (exit 1); exit 1; }; }
3419         fi
3420         ol_enable_rwm="$ol_arg"
3421
3422 else
3423         ol_enable_rwm=${ol_enable_overlays:-no}
3424 fi;
3425 # end --enable-rwm
3426
3427 # OpenLDAP --enable-syncprov
3428
3429         # Check whether --enable-syncprov or --disable-syncprov was given.
3430 if test "${enable_syncprov+set}" = set; then
3431   enableval="$enable_syncprov"
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-syncprov" >&5
3441 echo "$as_me: error: bad value $enableval for --enable-syncprov" >&2;}
3442    { (exit 1); exit 1; }; }
3443         fi
3444         ol_enable_syncprov="$ol_arg"
3445
3446 else
3447         ol_enable_syncprov=${ol_enable_overlays:-yes}
3448 fi;
3449 # end --enable-syncprov
3450
3451 # OpenLDAP --enable-translucent
3452
3453         # Check whether --enable-translucent or --disable-translucent was given.
3454 if test "${enable_translucent+set}" = set; then
3455   enableval="$enable_translucent"
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-translucent" >&5
3465 echo "$as_me: error: bad value $enableval for --enable-translucent" >&2;}
3466    { (exit 1); exit 1; }; }
3467         fi
3468         ol_enable_translucent="$ol_arg"
3469
3470 else
3471         ol_enable_translucent=${ol_enable_overlays:-no}
3472 fi;
3473 # end --enable-translucent
3474
3475 # OpenLDAP --enable-unique
3476
3477         # Check whether --enable-unique or --disable-unique was given.
3478 if test "${enable_unique+set}" = set; then
3479   enableval="$enable_unique"
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-unique" >&5
3489 echo "$as_me: error: bad value $enableval for --enable-unique" >&2;}
3490    { (exit 1); exit 1; }; }
3491         fi
3492         ol_enable_unique="$ol_arg"
3493
3494 else
3495         ol_enable_unique=${ol_enable_overlays:-no}
3496 fi;
3497 # end --enable-unique
3498
3499 # OpenLDAP --enable-valsort
3500
3501         # Check whether --enable-valsort or --disable-valsort was given.
3502 if test "${enable_valsort+set}" = set; then
3503   enableval="$enable_valsort"
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-valsort" >&5
3513 echo "$as_me: error: bad value $enableval for --enable-valsort" >&2;}
3514    { (exit 1); exit 1; }; }
3515         fi
3516         ol_enable_valsort="$ol_arg"
3517
3518 else
3519         ol_enable_valsort=${ol_enable_overlays:-no}
3520 fi;
3521 # end --enable-valsort
3522
3523
3524 # Check whether --enable-xxslurpdoptions or --disable-xxslurpdoptions was given.
3525 if test "${enable_xxslurpdoptions+set}" = set; then
3526   enableval="$enable_xxslurpdoptions"
3527
3528 fi;
3529 # OpenLDAP --enable-slurpd
3530
3531         # Check whether --enable-slurpd or --disable-slurpd was given.
3532 if test "${enable_slurpd+set}" = set; then
3533   enableval="$enable_slurpd"
3534
3535         ol_arg=invalid
3536         for ol_val in auto yes no ; do
3537                 if test "$enableval" = "$ol_val" ; then
3538                         ol_arg="$ol_val"
3539                 fi
3540         done
3541         if test "$ol_arg" = "invalid" ; then
3542                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slurpd" >&5
3543 echo "$as_me: error: bad value $enableval for --enable-slurpd" >&2;}
3544    { (exit 1); exit 1; }; }
3545         fi
3546         ol_enable_slurpd="$ol_arg"
3547
3548 else
3549         ol_enable_slurpd=auto
3550 fi;
3551 # end --enable-slurpd
3552
3553 # Check whether --enable-xxliboptions or --disable-xxliboptions was given.
3554 if test "${enable_xxliboptions+set}" = set; then
3555   enableval="$enable_xxliboptions"
3556
3557 fi;
3558 # Check whether --enable-static or --disable-static was given.
3559 if test "${enable_static+set}" = set; then
3560   enableval="$enable_static"
3561   p=${PACKAGE-default}
3562     case $enableval in
3563     yes) enable_static=yes ;;
3564     no) enable_static=no ;;
3565     *)
3566      enable_static=no
3567       # Look at the argument we got.  We use all the common list separators.
3568       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3569       for pkg in $enableval; do
3570         IFS="$lt_save_ifs"
3571         if test "X$pkg" = "X$p"; then
3572           enable_static=yes
3573         fi
3574       done
3575       IFS="$lt_save_ifs"
3576       ;;
3577     esac
3578 else
3579   enable_static=yes
3580 fi;
3581
3582 # Check whether --enable-shared or --disable-shared was given.
3583 if test "${enable_shared+set}" = set; then
3584   enableval="$enable_shared"
3585   p=${PACKAGE-default}
3586     case $enableval in
3587     yes) enable_shared=yes ;;
3588     no) enable_shared=no ;;
3589     *)
3590       enable_shared=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_shared=yes
3597         fi
3598       done
3599       IFS="$lt_save_ifs"
3600       ;;
3601     esac
3602 else
3603   enable_shared=yes
3604 fi;
3605
3606
3607
3608 # validate options
3609 if test $ol_enable_slapd = no ; then
3610                 if test $ol_enable_slapi = yes ; then
3611                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-slapi argument" >&5
3612 echo "$as_me: WARNING: slapd disabled, ignoring --enable-slapi argument" >&2;}
3613         fi
3614         case "$ol_enable_backends" in yes | mod)
3615                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-backends argument" >&5
3616 echo "$as_me: WARNING: slapd disabled, ignoring --enable-backends argument" >&2;}
3617         esac
3618         for i in $Backends; do
3619                 eval "ol_tmp=\$ol_enable_$i"
3620                 if test $ol_tmp != no ; then
3621                         { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
3622 echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
3623                         eval "ol_enable_$i=no"
3624                 fi
3625         done
3626         if test $ol_enable_modules = yes ; then
3627                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-modules argument" >&5
3628 echo "$as_me: WARNING: slapd disabled, ignoring --enable-modules argument" >&2;}
3629         fi
3630         if test $ol_enable_multimaster = yes ; then
3631                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-multimaster argument" >&5
3632 echo "$as_me: WARNING: slapd disabled, ignoring --enable-multimaster argument" >&2;}
3633         fi
3634         if test $ol_enable_wrappers = yes ; then
3635                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&5
3636 echo "$as_me: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&2;}
3637         fi
3638         if test $ol_enable_rlookups = yes ; then
3639                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&5
3640 echo "$as_me: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&2;}
3641         fi
3642         if test $ol_enable_aci = yes ; then
3643                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-aci argument" >&5
3644 echo "$as_me: WARNING: slapd disabled, ignoring --enable-aci argument" >&2;}
3645         fi
3646         if test $ol_enable_ldbm_api != auto ; then
3647                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-ldbm-api argument" >&5
3648 echo "$as_me: WARNING: slapd disabled, ignoring --enable-ldbm-api argument" >&2;}
3649         fi
3650         if test $ol_enable_ldbm_type != auto ; then
3651                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-ldbm-type argument" >&5
3652 echo "$as_me: WARNING: slapd disabled, ignoring --enable-ldbm-type argument" >&2;}
3653         fi
3654         if test $ol_enable_slurpd = yes ; then
3655                 { { echo "$as_me:$LINENO: error: slurpd requires slapd" >&5
3656 echo "$as_me: error: slurpd requires slapd" >&2;}
3657    { (exit 1); exit 1; }; }
3658         fi
3659         if test $ol_enable_rewrite = yes ; then
3660                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&5
3661 echo "$as_me: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&2;}
3662         fi
3663                 case "$ol_enable_overlays" in yes | mod)
3664                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-overlays argument" >&5
3665 echo "$as_me: WARNING: slapd disabled, ignoring --enable-overlays argument" >&2;}
3666         esac
3667         for i in $Overlays; do
3668                 eval "ol_tmp=\$ol_enable_$i"
3669                 if test $ol_tmp != no ; then
3670                         { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
3671 echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
3672                         eval "ol_enable_$i=no"
3673                 fi
3674         done
3675
3676         # force settings to no
3677         ol_enable_slapi=no
3678
3679         ol_enable_backends=
3680         ol_enable_overlays=
3681         ol_enable_modules=no
3682         ol_enable_multimaster=no
3683         ol_enable_rlookups=no
3684         ol_enable_aci=no
3685         ol_enable_wrappers=no
3686
3687         ol_enable_ldbm_api=no
3688         ol_enable_ldbm_type=no
3689
3690         ol_enable_slurpd=no
3691
3692         ol_enable_rewrite=no
3693
3694 elif test $ol_enable_ldbm = no ; then
3695
3696         if test $ol_enable_ldbm_api != auto ; then
3697                 { echo "$as_me:$LINENO: WARNING: LDBM disabled, ignoring --enable-ldbm-api argument" >&5
3698 echo "$as_me: WARNING: LDBM disabled, ignoring --enable-ldbm-api argument" >&2;}
3699         fi
3700
3701         if test $ol_enable_ldbm_type != auto ; then
3702                 { echo "$as_me:$LINENO: WARNING: LDBM disabled, ignoring --enable-ldbm-type argument" >&5
3703 echo "$as_me: WARNING: LDBM disabled, ignoring --enable-ldbm-type argument" >&2;}
3704         fi
3705
3706         if test $ol_enable_modules != yes &&
3707            test $ol_enable_bdb = no &&
3708            test $ol_enable_dnssrv = no &&
3709            test $ol_enable_hdb = no &&
3710            test $ol_enable_ldap = no &&
3711            test $ol_enable_meta = no &&
3712            test $ol_enable_monitor = no &&
3713            test $ol_enable_null = no &&
3714            test $ol_enable_passwd = no &&
3715            test $ol_enable_perl = no &&
3716            test $ol_enable_relay = no &&
3717            test $ol_enable_shell = no &&
3718            test $ol_enable_sql = no ; then
3719
3720                 if test $ol_enable_slapd = yes ; then
3721                         { { echo "$as_me:$LINENO: error: slapd requires a backend" >&5
3722 echo "$as_me: error: slapd requires a backend" >&2;}
3723    { (exit 1); exit 1; }; }
3724                 else
3725                         { echo "$as_me:$LINENO: WARNING: skipping slapd, no backend specified" >&5
3726 echo "$as_me: WARNING: skipping slapd, no backend specified" >&2;}
3727                         ol_enable_slapd=no
3728                 fi
3729         fi
3730
3731         ol_enable_ldbm_api=no
3732         ol_enable_ldbm_type=no
3733
3734         if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
3735                 ol_enable_ldbm_api=berkeley
3736         fi
3737
3738 else
3739                 if test $ol_enable_ldbm_api = gdbm &&
3740            test $ol_enable_ldbm_type = btree ; then
3741                 { { echo "$as_me:$LINENO: error: GDBM only supports LDBM type hash" >&5
3742 echo "$as_me: error: GDBM only supports LDBM type hash" >&2;}
3743    { (exit 1); exit 1; }; }
3744         fi
3745         if test $ol_enable_ldbm_api = mdbm &&
3746            test $ol_enable_ldbm_type = btree ; then
3747                 { { echo "$as_me:$LINENO: error: MDBM only supports LDBM type hash" >&5
3748 echo "$as_me: error: MDBM only supports LDBM type hash" >&2;}
3749    { (exit 1); exit 1; }; }
3750         fi
3751         if test $ol_enable_ldbm_api = ndbm &&
3752            test $ol_enable_ldbm_type = btree ; then
3753                 { { echo "$as_me:$LINENO: error: NDBM only supports LDBM type hash" >&5
3754 echo "$as_me: error: NDBM only supports LDBM type hash" >&2;}
3755    { (exit 1); exit 1; }; }
3756         fi
3757
3758         if test $ol_enable_bdb/$ol_enable_hdb != no/no ; then
3759                 if test $ol_enable_ldbm_api = auto ; then
3760                         ol_enable_ldbm_api=berkeley
3761                 elif test $ol_enable_ldbm_api != berkeley ; then
3762                         { { echo "$as_me:$LINENO: error: LDBM API not compatible with BDB/HDB" >&5
3763 echo "$as_me: error: LDBM API not compatible with BDB/HDB" >&2;}
3764    { (exit 1); exit 1; }; }
3765                 fi
3766         fi
3767 fi
3768
3769 if test $ol_enable_meta/$ol_enable_ldap = yes/no ; then
3770         { { echo "$as_me:$LINENO: error: --enable-meta requires --enable-ldap" >&5
3771 echo "$as_me: error: --enable-meta requires --enable-ldap" >&2;}
3772    { (exit 1); exit 1; }; }
3773 fi
3774
3775 if test $ol_enable_slurpd = yes ; then
3776                 if test $ol_with_threads = no ; then
3777                 { { echo "$as_me:$LINENO: error: slurpd requires threads" >&5
3778 echo "$as_me: error: slurpd requires threads" >&2;}
3779    { (exit 1); exit 1; }; }
3780         fi
3781 fi
3782
3783 if test $ol_enable_lmpasswd = yes ; then
3784         if test $ol_with_tls = no ; then
3785                 { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5
3786 echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;}
3787    { (exit 1); exit 1; }; }
3788         fi
3789 fi
3790
3791 if test $ol_enable_kbind = yes ; then
3792         if test $ol_with_kerberos = no ; then
3793                 { { echo "$as_me:$LINENO: error: options require --with-kerberos" >&5
3794 echo "$as_me: error: options require --with-kerberos" >&2;}
3795    { (exit 1); exit 1; }; }
3796         elif test $ol_with_kerberos = auto ; then
3797                 ol_with_kerberos=yes
3798         fi
3799
3800 elif test $ol_enable_kbind = no ; then
3801         if test $ol_with_kerberos = auto ; then
3802                 ol_with_kerberos=no
3803         elif test $ol_with_kerberos != no ; then
3804                 { echo "$as_me:$LINENO: WARNING: Kerberos detection enabled unnecessarily" >&5
3805 echo "$as_me: WARNING: Kerberos detection enabled unnecessarily" >&2;};
3806                 ol_with_kerberos=no
3807         fi
3808 fi
3809
3810 if test $ol_enable_spasswd = yes ; then
3811         if test $ol_with_cyrus_sasl = no ; then
3812                 { { echo "$as_me:$LINENO: error: options require --with-cyrus-sasl" >&5
3813 echo "$as_me: error: options require --with-cyrus-sasl" >&2;}
3814    { (exit 1); exit 1; }; }
3815         fi
3816         ol_with_cyrus_sasl=yes
3817 fi
3818
3819 echo "$as_me:$LINENO: result: done" >&5
3820 echo "${ECHO_T}done" >&6
3821
3822 LDAP_LIBS=
3823 LDBM_LIBS=
3824 LTHREAD_LIBS=
3825 LUTIL_LIBS=
3826
3827 SLAPD_LIBS=
3828 SLURPD_LIBS=
3829
3830 BUILD_SLAPD=no
3831 BUILD_SLURPD=no
3832
3833 BUILD_THREAD=no
3834
3835 BUILD_SLAPI=no
3836 SLAPD_SLAPI_DEPEND=
3837
3838 BUILD_BDB=no
3839 BUILD_DNSSRV=no
3840 BUILD_HDB=no
3841 BUILD_LDAP=no
3842 BUILD_LDBM=no
3843 BUILD_META=no
3844 BUILD_MONITOR=no
3845 BUILD_NULL=no
3846 BUILD_PASSWD=no
3847 BUILD_PERL=no
3848 BUILD_RELAY=no
3849 BUILD_SHELL=no
3850 BUILD_SQL=no
3851
3852 BUILD_ACCESSLOG=no
3853 BUILD_DENYOP=no
3854 BUILD_DYNGROUP=no
3855 BUILD_DYNLIST=no
3856 BUILD_LASTMOD=no
3857 BUILD_PPOLICY=no
3858 BUILD_PROXYCACHE=no
3859 BUILD_REFINT=no
3860 BUILD_RETCODE=no
3861 BUILD_RWM=no
3862 BUILD_SYNCPROV=no
3863 BUILD_TRANSLUCENT=no
3864 BUILD_UNIQUE=no
3865 BUILD_VALSORT=no
3866
3867 SLAPD_STATIC_OVERLAYS=
3868 SLAPD_DYNAMIC_OVERLAYS=
3869
3870 SLAPD_MODULES_LDFLAGS=
3871 SLAPD_MODULES_CPPFLAGS=
3872
3873 SLAPD_STATIC_BACKENDS=back-ldif
3874 SLAPD_DYNAMIC_BACKENDS=
3875
3876 SLAPD_PERL_LDFLAGS=
3877 MOD_PERL_LDFLAGS=
3878 PERL_CPPFLAGS=
3879
3880 SLAPD_SQL_LDFLAGS=
3881 SLAPD_SQL_LIBS=
3882 SLAPD_SQL_INCLUDES=
3883
3884 KRB4_LIBS=
3885 KRB5_LIBS=
3886 SASL_LIBS=
3887 TLS_LIBS=
3888 MODULES_LIBS=
3889 SLAPI_LIBS=
3890 LIBSLAPI=
3891 LIBSLAPITOOLS=
3892 AUTH_LIBS=
3893
3894 SLAPD_SLP_LIBS=
3895 SLAPD_GMP_LIBS=
3896
3897
3898
3899 cat >>confdefs.h <<\_ACEOF
3900 #define HAVE_MKVERSION 1
3901 _ACEOF
3902
3903
3904
3905
3906 ol_aix_threads=no
3907 case "$target" in
3908 *-*-aix*)       if test -z "$CC" ; then
3909                 case "$ol_with_threads" in
3910                 auto | yes |  posix) ol_aix_threads=yes ;;
3911                 esac
3912         fi
3913 ;;
3914 esac
3915
3916 if test $ol_aix_threads = yes ; then
3917         if test -z "${CC}" ; then
3918                 for ac_prog in cc_r xlc_r cc
3919 do
3920   # Extract the first word of "$ac_prog", so it can be a program name with args.
3921 set dummy $ac_prog; ac_word=$2
3922 echo "$as_me:$LINENO: checking for $ac_word" >&5
3923 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3924 if test "${ac_cv_prog_CC+set}" = set; then
3925   echo $ECHO_N "(cached) $ECHO_C" >&6
3926 else
3927   if test -n "$CC"; then
3928   ac_cv_prog_CC="$CC" # Let the user override the test.
3929 else
3930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3931 for as_dir in $PATH
3932 do
3933   IFS=$as_save_IFS
3934   test -z "$as_dir" && as_dir=.
3935   for ac_exec_ext in '' $ac_executable_extensions; do
3936   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3937     ac_cv_prog_CC="$ac_prog"
3938     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3939     break 2
3940   fi
3941 done
3942 done
3943
3944 fi
3945 fi
3946 CC=$ac_cv_prog_CC
3947 if test -n "$CC"; then
3948   echo "$as_me:$LINENO: result: $CC" >&5
3949 echo "${ECHO_T}$CC" >&6
3950 else
3951   echo "$as_me:$LINENO: result: no" >&5
3952 echo "${ECHO_T}no" >&6
3953 fi
3954
3955   test -n "$CC" && break
3956 done
3957
3958
3959                 if test "$CC" = cc ; then
3960                                                 if test $ol_with_threads != auto ; then
3961                                 { { echo "$as_me:$LINENO: error: --with-threads requires cc_r (or other suitable compiler) on AIX" >&5
3962 echo "$as_me: error: --with-threads requires cc_r (or other suitable compiler) on AIX" >&2;}
3963    { (exit 1); exit 1; }; }
3964                         else
3965                                 { echo "$as_me:$LINENO: WARNING: disabling threads, no cc_r on AIX" >&5
3966 echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
3967                         fi
3968                         ol_with_threads=no
3969                 fi
3970         fi
3971
3972         case ${CC} in cc_r | xlc_r)
3973                 ol_with_threads=posix
3974                 ol_cv_pthread_create=yes
3975                 ;;
3976         esac
3977 fi
3978
3979 if test -z "${CC}"; then
3980         for ac_prog in cc gcc
3981 do
3982   # Extract the first word of "$ac_prog", so it can be a program name with args.
3983 set dummy $ac_prog; ac_word=$2
3984 echo "$as_me:$LINENO: checking for $ac_word" >&5
3985 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3986 if test "${ac_cv_prog_CC+set}" = set; then
3987   echo $ECHO_N "(cached) $ECHO_C" >&6
3988 else
3989   if test -n "$CC"; then
3990   ac_cv_prog_CC="$CC" # Let the user override the test.
3991 else
3992 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3993 for as_dir in $PATH
3994 do
3995   IFS=$as_save_IFS
3996   test -z "$as_dir" && as_dir=.
3997   for ac_exec_ext in '' $ac_executable_extensions; do
3998   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3999     ac_cv_prog_CC="$ac_prog"
4000     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4001     break 2
4002   fi
4003 done
4004 done
4005
4006 fi
4007 fi
4008 CC=$ac_cv_prog_CC
4009 if test -n "$CC"; then
4010   echo "$as_me:$LINENO: result: $CC" >&5
4011 echo "${ECHO_T}$CC" >&6
4012 else
4013   echo "$as_me:$LINENO: result: no" >&5
4014 echo "${ECHO_T}no" >&6
4015 fi
4016
4017   test -n "$CC" && break
4018 done
4019 test -n "$CC" || CC="missing"
4020
4021
4022         if test "${CC}" = "missing" ; then
4023                 { { echo "$as_me:$LINENO: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." >&5
4024 echo "$as_me: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." >&2;}
4025    { (exit 1); exit 1; }; }
4026         fi
4027 fi
4028
4029 if test -z "${AR}"; then
4030         for ac_prog in ar gar
4031 do
4032   # Extract the first word of "$ac_prog", so it can be a program name with args.
4033 set dummy $ac_prog; ac_word=$2
4034 echo "$as_me:$LINENO: checking for $ac_word" >&5
4035 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4036 if test "${ac_cv_prog_AR+set}" = set; then
4037   echo $ECHO_N "(cached) $ECHO_C" >&6
4038 else
4039   if test -n "$AR"; then
4040   ac_cv_prog_AR="$AR" # Let the user override the test.
4041 else
4042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4043 for as_dir in $PATH
4044 do
4045   IFS=$as_save_IFS
4046   test -z "$as_dir" && as_dir=.
4047   for ac_exec_ext in '' $ac_executable_extensions; do
4048   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4049     ac_cv_prog_AR="$ac_prog"
4050     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4051     break 2
4052   fi
4053 done
4054 done
4055
4056 fi
4057 fi
4058 AR=$ac_cv_prog_AR
4059 if test -n "$AR"; then
4060   echo "$as_me:$LINENO: result: $AR" >&5
4061 echo "${ECHO_T}$AR" >&6
4062 else
4063   echo "$as_me:$LINENO: result: no" >&5
4064 echo "${ECHO_T}no" >&6
4065 fi
4066
4067   test -n "$AR" && break
4068 done
4069 test -n "$AR" || AR="missing"
4070
4071
4072         if test "${AR}" = "missing" ; then
4073                 { { echo "$as_me:$LINENO: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." >&5
4074 echo "$as_me: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." >&2;}
4075    { (exit 1); exit 1; }; }
4076         fi
4077 fi
4078
4079
4080
4081
4082
4083 # Check whether --enable-fast-install or --disable-fast-install was given.
4084 if test "${enable_fast_install+set}" = set; then
4085   enableval="$enable_fast_install"
4086   p=${PACKAGE-default}
4087     case $enableval in
4088     yes) enable_fast_install=yes ;;
4089     no) enable_fast_install=no ;;
4090     *)
4091       enable_fast_install=no
4092       # Look at the argument we got.  We use all the common list separators.
4093       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4094       for pkg in $enableval; do
4095         IFS="$lt_save_ifs"
4096         if test "X$pkg" = "X$p"; then
4097           enable_fast_install=yes
4098         fi
4099       done
4100       IFS="$lt_save_ifs"
4101       ;;
4102     esac
4103 else
4104   enable_fast_install=yes
4105 fi;
4106
4107 DEPDIR="${am__leading_dot}deps"
4108
4109           ac_config_commands="$ac_config_commands depfiles"
4110
4111
4112 am_make=${MAKE-make}
4113 cat > confinc << 'END'
4114 am__doit:
4115         @echo done
4116 .PHONY: am__doit
4117 END
4118 # If we don't find an include directive, just comment out the code.
4119 echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
4120 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
4121 am__include="#"
4122 am__quote=
4123 _am_result=none
4124 # First try GNU make style include.
4125 echo "include confinc" > confmf
4126 # We grep out `Entering directory' and `Leaving directory'
4127 # messages which can occur if `w' ends up in MAKEFLAGS.
4128 # In particular we don't look at `^make:' because GNU make might
4129 # be invoked under some other name (usually "gmake"), in which
4130 # case it prints its new name instead of `make'.
4131 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
4132    am__include=include
4133    am__quote=
4134    _am_result=GNU
4135 fi
4136 # Now try BSD make style include.
4137 if test "$am__include" = "#"; then
4138    echo '.include "confinc"' > confmf
4139    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
4140       am__include=.include
4141       am__quote="\""
4142       _am_result=BSD
4143    fi
4144 fi
4145
4146
4147 echo "$as_me:$LINENO: result: $_am_result" >&5
4148 echo "${ECHO_T}$_am_result" >&6
4149 rm -f confinc confmf
4150
4151 # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
4152 if test "${enable_dependency_tracking+set}" = set; then
4153   enableval="$enable_dependency_tracking"
4154
4155 fi;
4156 if test "x$enable_dependency_tracking" != xno; then
4157   am_depcomp="$ac_aux_dir/depcomp"
4158   AMDEPBACKSLASH='\'
4159 fi
4160
4161
4162 if test "x$enable_dependency_tracking" != xno; then
4163   AMDEP_TRUE=
4164   AMDEP_FALSE='#'
4165 else
4166   AMDEP_TRUE='#'
4167   AMDEP_FALSE=
4168 fi
4169
4170
4171
4172 ac_ext=c
4173 ac_cpp='$CPP $CPPFLAGS'
4174 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4175 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4176 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4177 if test -n "$ac_tool_prefix"; then
4178   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4179 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4180 echo "$as_me:$LINENO: checking for $ac_word" >&5
4181 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4182 if test "${ac_cv_prog_CC+set}" = set; then
4183   echo $ECHO_N "(cached) $ECHO_C" >&6
4184 else
4185   if test -n "$CC"; then
4186   ac_cv_prog_CC="$CC" # Let the user override the test.
4187 else
4188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4189 for as_dir in $PATH
4190 do
4191   IFS=$as_save_IFS
4192   test -z "$as_dir" && as_dir=.
4193   for ac_exec_ext in '' $ac_executable_extensions; do
4194   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4195     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4196     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4197     break 2
4198   fi
4199 done
4200 done
4201
4202 fi
4203 fi
4204 CC=$ac_cv_prog_CC
4205 if test -n "$CC"; then
4206   echo "$as_me:$LINENO: result: $CC" >&5
4207 echo "${ECHO_T}$CC" >&6
4208 else
4209   echo "$as_me:$LINENO: result: no" >&5
4210 echo "${ECHO_T}no" >&6
4211 fi
4212
4213 fi
4214 if test -z "$ac_cv_prog_CC"; then
4215   ac_ct_CC=$CC
4216   # Extract the first word of "gcc", so it can be a program name with args.
4217 set dummy gcc; ac_word=$2
4218 echo "$as_me:$LINENO: checking for $ac_word" >&5
4219 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4220 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4221   echo $ECHO_N "(cached) $ECHO_C" >&6
4222 else
4223   if test -n "$ac_ct_CC"; then
4224   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4225 else
4226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4227 for as_dir in $PATH
4228 do
4229   IFS=$as_save_IFS
4230   test -z "$as_dir" && as_dir=.
4231   for ac_exec_ext in '' $ac_executable_extensions; do
4232   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4233     ac_cv_prog_ac_ct_CC="gcc"
4234     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4235     break 2
4236   fi
4237 done
4238 done
4239
4240 fi
4241 fi
4242 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4243 if test -n "$ac_ct_CC"; then
4244   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4245 echo "${ECHO_T}$ac_ct_CC" >&6
4246 else
4247   echo "$as_me:$LINENO: result: no" >&5
4248 echo "${ECHO_T}no" >&6
4249 fi
4250
4251   CC=$ac_ct_CC
4252 else
4253   CC="$ac_cv_prog_CC"
4254 fi
4255
4256 if test -z "$CC"; then
4257   if test -n "$ac_tool_prefix"; then
4258   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4259 set dummy ${ac_tool_prefix}cc; ac_word=$2
4260 echo "$as_me:$LINENO: checking for $ac_word" >&5
4261 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4262 if test "${ac_cv_prog_CC+set}" = set; then
4263   echo $ECHO_N "(cached) $ECHO_C" >&6
4264 else
4265   if test -n "$CC"; then
4266   ac_cv_prog_CC="$CC" # Let the user override the test.
4267 else
4268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4269 for as_dir in $PATH
4270 do
4271   IFS=$as_save_IFS
4272   test -z "$as_dir" && as_dir=.
4273   for ac_exec_ext in '' $ac_executable_extensions; do
4274   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4275     ac_cv_prog_CC="${ac_tool_prefix}cc"
4276     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4277     break 2
4278   fi
4279 done
4280 done
4281
4282 fi
4283 fi
4284 CC=$ac_cv_prog_CC
4285 if test -n "$CC"; then
4286   echo "$as_me:$LINENO: result: $CC" >&5
4287 echo "${ECHO_T}$CC" >&6
4288 else
4289   echo "$as_me:$LINENO: result: no" >&5
4290 echo "${ECHO_T}no" >&6
4291 fi
4292
4293 fi
4294 if test -z "$ac_cv_prog_CC"; then
4295   ac_ct_CC=$CC
4296   # Extract the first word of "cc", so it can be a program name with args.
4297 set dummy cc; ac_word=$2
4298 echo "$as_me:$LINENO: checking for $ac_word" >&5
4299 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4300 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4301   echo $ECHO_N "(cached) $ECHO_C" >&6
4302 else
4303   if test -n "$ac_ct_CC"; then
4304   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4305 else
4306 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4307 for as_dir in $PATH
4308 do
4309   IFS=$as_save_IFS
4310   test -z "$as_dir" && as_dir=.
4311   for ac_exec_ext in '' $ac_executable_extensions; do
4312   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4313     ac_cv_prog_ac_ct_CC="cc"
4314     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4315     break 2
4316   fi
4317 done
4318 done
4319
4320 fi
4321 fi
4322 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4323 if test -n "$ac_ct_CC"; then
4324   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4325 echo "${ECHO_T}$ac_ct_CC" >&6
4326 else
4327   echo "$as_me:$LINENO: result: no" >&5
4328 echo "${ECHO_T}no" >&6
4329 fi
4330
4331   CC=$ac_ct_CC
4332 else
4333   CC="$ac_cv_prog_CC"
4334 fi
4335
4336 fi
4337 if test -z "$CC"; then
4338   # Extract the first word of "cc", so it can be a program name with args.
4339 set dummy cc; ac_word=$2
4340 echo "$as_me:$LINENO: checking for $ac_word" >&5
4341 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4342 if test "${ac_cv_prog_CC+set}" = set; then
4343   echo $ECHO_N "(cached) $ECHO_C" >&6
4344 else
4345   if test -n "$CC"; then
4346   ac_cv_prog_CC="$CC" # Let the user override the test.
4347 else
4348   ac_prog_rejected=no
4349 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4350 for as_dir in $PATH
4351 do
4352   IFS=$as_save_IFS
4353   test -z "$as_dir" && as_dir=.
4354   for ac_exec_ext in '' $ac_executable_extensions; do
4355   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4356     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4357        ac_prog_rejected=yes
4358        continue
4359      fi
4360     ac_cv_prog_CC="cc"
4361     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4362     break 2
4363   fi
4364 done
4365 done
4366
4367 if test $ac_prog_rejected = yes; then
4368   # We found a bogon in the path, so make sure we never use it.
4369   set dummy $ac_cv_prog_CC
4370   shift
4371   if test $# != 0; then
4372     # We chose a different compiler from the bogus one.
4373     # However, it has the same basename, so the bogon will be chosen
4374     # first if we set CC to just the basename; use the full file name.
4375     shift
4376     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4377   fi
4378 fi
4379 fi
4380 fi
4381 CC=$ac_cv_prog_CC
4382 if test -n "$CC"; then
4383   echo "$as_me:$LINENO: result: $CC" >&5
4384 echo "${ECHO_T}$CC" >&6
4385 else
4386   echo "$as_me:$LINENO: result: no" >&5
4387 echo "${ECHO_T}no" >&6
4388 fi
4389
4390 fi
4391 if test -z "$CC"; then
4392   if test -n "$ac_tool_prefix"; then
4393   for ac_prog in cl
4394   do
4395     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4396 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4397 echo "$as_me:$LINENO: checking for $ac_word" >&5
4398 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4399 if test "${ac_cv_prog_CC+set}" = set; then
4400   echo $ECHO_N "(cached) $ECHO_C" >&6
4401 else
4402   if test -n "$CC"; then
4403   ac_cv_prog_CC="$CC" # Let the user override the test.
4404 else
4405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4406 for as_dir in $PATH
4407 do
4408   IFS=$as_save_IFS
4409   test -z "$as_dir" && as_dir=.
4410   for ac_exec_ext in '' $ac_executable_extensions; do
4411   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4412     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4413     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4414     break 2
4415   fi
4416 done
4417 done
4418
4419 fi
4420 fi
4421 CC=$ac_cv_prog_CC
4422 if test -n "$CC"; then
4423   echo "$as_me:$LINENO: result: $CC" >&5
4424 echo "${ECHO_T}$CC" >&6
4425 else
4426   echo "$as_me:$LINENO: result: no" >&5
4427 echo "${ECHO_T}no" >&6
4428 fi
4429
4430     test -n "$CC" && break
4431   done
4432 fi
4433 if test -z "$CC"; then
4434   ac_ct_CC=$CC
4435   for ac_prog in cl
4436 do
4437   # Extract the first word of "$ac_prog", so it can be a program name with args.
4438 set dummy $ac_prog; ac_word=$2
4439 echo "$as_me:$LINENO: checking for $ac_word" >&5
4440 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4441 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4442   echo $ECHO_N "(cached) $ECHO_C" >&6
4443 else
4444   if test -n "$ac_ct_CC"; then
4445   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4446 else
4447 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4448 for as_dir in $PATH
4449 do
4450   IFS=$as_save_IFS
4451   test -z "$as_dir" && as_dir=.
4452   for ac_exec_ext in '' $ac_executable_extensions; do
4453   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4454     ac_cv_prog_ac_ct_CC="$ac_prog"
4455     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4456     break 2
4457   fi
4458 done
4459 done
4460
4461 fi
4462 fi
4463 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4464 if test -n "$ac_ct_CC"; then
4465   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4466 echo "${ECHO_T}$ac_ct_CC" >&6
4467 else
4468   echo "$as_me:$LINENO: result: no" >&5
4469 echo "${ECHO_T}no" >&6
4470 fi
4471
4472   test -n "$ac_ct_CC" && break
4473 done
4474
4475   CC=$ac_ct_CC
4476 fi
4477
4478 fi
4479
4480
4481 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
4482 See \`config.log' for more details." >&5
4483 echo "$as_me: error: no acceptable C compiler found in \$PATH
4484 See \`config.log' for more details." >&2;}
4485    { (exit 1); exit 1; }; }
4486
4487 # Provide some information about the compiler.
4488 echo "$as_me:$LINENO:" \
4489      "checking for C compiler version" >&5
4490 ac_compiler=`set X $ac_compile; echo $2`
4491 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
4492   (eval $ac_compiler --version </dev/null >&5) 2>&5
4493   ac_status=$?
4494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4495   (exit $ac_status); }
4496 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
4497   (eval $ac_compiler -v </dev/null >&5) 2>&5
4498   ac_status=$?
4499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4500   (exit $ac_status); }
4501 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
4502   (eval $ac_compiler -V </dev/null >&5) 2>&5
4503   ac_status=$?
4504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4505   (exit $ac_status); }
4506
4507 cat >conftest.$ac_ext <<_ACEOF
4508 /* confdefs.h.  */
4509 _ACEOF
4510 cat confdefs.h >>conftest.$ac_ext
4511 cat >>conftest.$ac_ext <<_ACEOF
4512 /* end confdefs.h.  */
4513
4514 int
4515 main ()
4516 {
4517
4518   ;
4519   return 0;
4520 }
4521 _ACEOF
4522 ac_clean_files_save=$ac_clean_files
4523 ac_clean_files="$ac_clean_files a.out a.exe b.out"
4524 # Try to create an executable without -o first, disregard a.out.
4525 # It will help us diagnose broken compilers, and finding out an intuition
4526 # of exeext.
4527 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
4528 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
4529 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4530 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
4531   (eval $ac_link_default) 2>&5
4532   ac_status=$?
4533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4534   (exit $ac_status); }; then
4535   # Find the output, starting from the most likely.  This scheme is
4536 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
4537 # resort.
4538
4539 # Be careful to initialize this variable, since it used to be cached.
4540 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
4541 ac_cv_exeext=
4542 # b.out is created by i960 compilers.
4543 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
4544 do
4545   test -f "$ac_file" || continue
4546   case $ac_file in
4547     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
4548         ;;
4549     conftest.$ac_ext )
4550         # This is the source file.
4551         ;;
4552     [ab].out )
4553         # We found the default executable, but exeext='' is most
4554         # certainly right.
4555         break;;
4556     *.* )
4557         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4558         # FIXME: I believe we export ac_cv_exeext for Libtool,
4559         # but it would be cool to find out if it's true.  Does anybody
4560         # maintain Libtool? --akim.
4561         export ac_cv_exeext
4562         break;;
4563     * )
4564         break;;
4565   esac
4566 done
4567 else
4568   echo "$as_me: failed program was:" >&5
4569 sed 's/^/| /' conftest.$ac_ext >&5
4570
4571 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
4572 See \`config.log' for more details." >&5
4573 echo "$as_me: error: C compiler cannot create executables
4574 See \`config.log' for more details." >&2;}
4575    { (exit 77); exit 77; }; }
4576 fi
4577
4578 ac_exeext=$ac_cv_exeext
4579 echo "$as_me:$LINENO: result: $ac_file" >&5
4580 echo "${ECHO_T}$ac_file" >&6
4581
4582 # Check the compiler produces executables we can run.  If not, either
4583 # the compiler is broken, or we cross compile.
4584 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
4585 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
4586 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
4587 # If not cross compiling, check that we can run a simple program.
4588 if test "$cross_compiling" != yes; then
4589   if { ac_try='./$ac_file'
4590   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4591   (eval $ac_try) 2>&5
4592   ac_status=$?
4593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4594   (exit $ac_status); }; }; then
4595     cross_compiling=no
4596   else
4597     if test "$cross_compiling" = maybe; then
4598         cross_compiling=yes
4599     else
4600         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
4601 If you meant to cross compile, use \`--host'.
4602 See \`config.log' for more details." >&5
4603 echo "$as_me: error: cannot run C compiled programs.
4604 If you meant to cross compile, use \`--host'.
4605 See \`config.log' for more details." >&2;}
4606    { (exit 1); exit 1; }; }
4607     fi
4608   fi
4609 fi
4610 echo "$as_me:$LINENO: result: yes" >&5
4611 echo "${ECHO_T}yes" >&6
4612
4613 rm -f a.out a.exe conftest$ac_cv_exeext b.out
4614 ac_clean_files=$ac_clean_files_save
4615 # Check the compiler produces executables we can run.  If not, either
4616 # the compiler is broken, or we cross compile.
4617 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
4618 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
4619 echo "$as_me:$LINENO: result: $cross_compiling" >&5
4620 echo "${ECHO_T}$cross_compiling" >&6
4621
4622 echo "$as_me:$LINENO: checking for suffix of executables" >&5
4623 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
4624 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4625   (eval $ac_link) 2>&5
4626   ac_status=$?
4627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4628   (exit $ac_status); }; then
4629   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4630 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4631 # work properly (i.e., refer to `conftest.exe'), while it won't with
4632 # `rm'.
4633 for ac_file in conftest.exe conftest conftest.*; do
4634   test -f "$ac_file" || continue
4635   case $ac_file in
4636     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
4637     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4638           export ac_cv_exeext
4639           break;;
4640     * ) break;;
4641   esac
4642 done
4643 else
4644   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
4645 See \`config.log' for more details." >&5
4646 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
4647 See \`config.log' for more details." >&2;}
4648    { (exit 1); exit 1; }; }
4649 fi
4650
4651 rm -f conftest$ac_cv_exeext
4652 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
4653 echo "${ECHO_T}$ac_cv_exeext" >&6
4654
4655 rm -f conftest.$ac_ext
4656 EXEEXT=$ac_cv_exeext
4657 ac_exeext=$EXEEXT
4658 echo "$as_me:$LINENO: checking for suffix of object files" >&5
4659 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
4660 if test "${ac_cv_objext+set}" = set; then
4661   echo $ECHO_N "(cached) $ECHO_C" >&6
4662 else
4663   cat >conftest.$ac_ext <<_ACEOF
4664 /* confdefs.h.  */
4665 _ACEOF
4666 cat confdefs.h >>conftest.$ac_ext
4667 cat >>conftest.$ac_ext <<_ACEOF
4668 /* end confdefs.h.  */
4669
4670 int
4671 main ()
4672 {
4673
4674   ;
4675   return 0;
4676 }
4677 _ACEOF
4678 rm -f conftest.o conftest.obj
4679 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4680   (eval $ac_compile) 2>&5
4681   ac_status=$?
4682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4683   (exit $ac_status); }; then
4684   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
4685   case $ac_file in
4686     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
4687     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4688        break;;
4689   esac
4690 done
4691 else
4692   echo "$as_me: failed program was:" >&5
4693 sed 's/^/| /' conftest.$ac_ext >&5
4694
4695 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
4696 See \`config.log' for more details." >&5
4697 echo "$as_me: error: cannot compute suffix of object files: cannot compile
4698 See \`config.log' for more details." >&2;}
4699    { (exit 1); exit 1; }; }
4700 fi
4701
4702 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4703 fi
4704 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
4705 echo "${ECHO_T}$ac_cv_objext" >&6
4706 OBJEXT=$ac_cv_objext
4707 ac_objext=$OBJEXT
4708 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
4709 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
4710 if test "${ac_cv_c_compiler_gnu+set}" = set; then
4711   echo $ECHO_N "(cached) $ECHO_C" >&6
4712 else
4713   cat >conftest.$ac_ext <<_ACEOF
4714 /* confdefs.h.  */
4715 _ACEOF
4716 cat confdefs.h >>conftest.$ac_ext
4717 cat >>conftest.$ac_ext <<_ACEOF
4718 /* end confdefs.h.  */
4719
4720 int
4721 main ()
4722 {
4723 #ifndef __GNUC__
4724        choke me
4725 #endif
4726
4727   ;
4728   return 0;
4729 }
4730 _ACEOF
4731 rm -f conftest.$ac_objext
4732 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4733   (eval $ac_compile) 2>conftest.er1
4734   ac_status=$?
4735   grep -v '^ *+' conftest.er1 >conftest.err
4736   rm -f conftest.er1
4737   cat conftest.err >&5
4738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4739   (exit $ac_status); } &&
4740          { ac_try='test -z "$ac_c_werror_flag"
4741                          || test ! -s conftest.err'
4742   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4743   (eval $ac_try) 2>&5
4744   ac_status=$?
4745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4746   (exit $ac_status); }; } &&
4747          { ac_try='test -s conftest.$ac_objext'
4748   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4749   (eval $ac_try) 2>&5
4750   ac_status=$?
4751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4752   (exit $ac_status); }; }; then
4753   ac_compiler_gnu=yes
4754 else
4755   echo "$as_me: failed program was:" >&5
4756 sed 's/^/| /' conftest.$ac_ext >&5
4757
4758 ac_compiler_gnu=no
4759 fi
4760 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4761 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4762
4763 fi
4764 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
4765 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
4766 GCC=`test $ac_compiler_gnu = yes && echo yes`
4767 ac_test_CFLAGS=${CFLAGS+set}
4768 ac_save_CFLAGS=$CFLAGS
4769 CFLAGS="-g"
4770 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
4771 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
4772 if test "${ac_cv_prog_cc_g+set}" = set; then
4773   echo $ECHO_N "(cached) $ECHO_C" >&6
4774 else
4775   cat >conftest.$ac_ext <<_ACEOF
4776 /* confdefs.h.  */
4777 _ACEOF
4778 cat confdefs.h >>conftest.$ac_ext
4779 cat >>conftest.$ac_ext <<_ACEOF
4780 /* end confdefs.h.  */
4781
4782 int
4783 main ()
4784 {
4785
4786   ;
4787   return 0;
4788 }
4789 _ACEOF
4790 rm -f conftest.$ac_objext
4791 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4792   (eval $ac_compile) 2>conftest.er1
4793   ac_status=$?
4794   grep -v '^ *+' conftest.er1 >conftest.err
4795   rm -f conftest.er1
4796   cat conftest.err >&5
4797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4798   (exit $ac_status); } &&
4799          { ac_try='test -z "$ac_c_werror_flag"
4800                          || test ! -s conftest.err'
4801   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4802   (eval $ac_try) 2>&5
4803   ac_status=$?
4804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4805   (exit $ac_status); }; } &&
4806          { ac_try='test -s conftest.$ac_objext'
4807   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4808   (eval $ac_try) 2>&5
4809   ac_status=$?
4810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4811   (exit $ac_status); }; }; then
4812   ac_cv_prog_cc_g=yes
4813 else
4814   echo "$as_me: failed program was:" >&5
4815 sed 's/^/| /' conftest.$ac_ext >&5
4816
4817 ac_cv_prog_cc_g=no
4818 fi
4819 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4820 fi
4821 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
4822 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
4823 if test "$ac_test_CFLAGS" = set; then
4824   CFLAGS=$ac_save_CFLAGS
4825 elif test $ac_cv_prog_cc_g = yes; then
4826   if test "$GCC" = yes; then
4827     CFLAGS="-g -O2"
4828   else
4829     CFLAGS="-g"
4830   fi
4831 else
4832   if test "$GCC" = yes; then
4833     CFLAGS="-O2"
4834   else
4835     CFLAGS=
4836   fi
4837 fi
4838 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
4839 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
4840 if test "${ac_cv_prog_cc_stdc+set}" = set; then
4841   echo $ECHO_N "(cached) $ECHO_C" >&6
4842 else
4843   ac_cv_prog_cc_stdc=no
4844 ac_save_CC=$CC
4845 cat >conftest.$ac_ext <<_ACEOF
4846 /* confdefs.h.  */
4847 _ACEOF
4848 cat confdefs.h >>conftest.$ac_ext
4849 cat >>conftest.$ac_ext <<_ACEOF
4850 /* end confdefs.h.  */
4851 #include <stdarg.h>
4852 #include <stdio.h>
4853 #include <sys/types.h>
4854 #include <sys/stat.h>
4855 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4856 struct buf { int x; };
4857 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4858 static char *e (p, i)
4859      char **p;
4860      int i;
4861 {
4862   return p[i];
4863 }
4864 static char *f (char * (*g) (char **, int), char **p, ...)
4865 {
4866   char *s;
4867   va_list v;
4868   va_start (v,p);
4869   s = g (p, va_arg (v,int));
4870   va_end (v);
4871   return s;
4872 }
4873
4874 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4875    function prototypes and stuff, but not '\xHH' hex character constants.
4876    These don't provoke an error unfortunately, instead are silently treated
4877    as 'x'.  The following induces an error, until -std1 is added to get
4878    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4879    array size at least.  It's necessary to write '\x00'==0 to get something
4880    that's true only with -std1.  */
4881 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4882
4883 int test (int i, double x);
4884 struct s1 {int (*f) (int a);};
4885 struct s2 {int (*f) (double a);};
4886 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4887 int argc;
4888 char **argv;
4889 int
4890 main ()
4891 {
4892 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4893   ;
4894   return 0;
4895 }
4896 _ACEOF
4897 # Don't try gcc -ansi; that turns off useful extensions and
4898 # breaks some systems' header files.
4899 # AIX                   -qlanglvl=ansi
4900 # Ultrix and OSF/1      -std1
4901 # HP-UX 10.20 and later -Ae
4902 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4903 # SVR4                  -Xc -D__EXTENSIONS__
4904 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4905 do
4906   CC="$ac_save_CC $ac_arg"
4907   rm -f conftest.$ac_objext
4908 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4909   (eval $ac_compile) 2>conftest.er1
4910   ac_status=$?
4911   grep -v '^ *+' conftest.er1 >conftest.err
4912   rm -f conftest.er1
4913   cat conftest.err >&5
4914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4915   (exit $ac_status); } &&
4916          { ac_try='test -z "$ac_c_werror_flag"
4917                          || test ! -s conftest.err'
4918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4919   (eval $ac_try) 2>&5
4920   ac_status=$?
4921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4922   (exit $ac_status); }; } &&
4923          { ac_try='test -s conftest.$ac_objext'
4924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4925   (eval $ac_try) 2>&5
4926   ac_status=$?
4927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4928   (exit $ac_status); }; }; then
4929   ac_cv_prog_cc_stdc=$ac_arg
4930 break
4931 else
4932   echo "$as_me: failed program was:" >&5
4933 sed 's/^/| /' conftest.$ac_ext >&5
4934
4935 fi
4936 rm -f conftest.err conftest.$ac_objext
4937 done
4938 rm -f conftest.$ac_ext conftest.$ac_objext
4939 CC=$ac_save_CC
4940
4941 fi
4942
4943 case "x$ac_cv_prog_cc_stdc" in
4944   x|xno)
4945     echo "$as_me:$LINENO: result: none needed" >&5
4946 echo "${ECHO_T}none needed" >&6 ;;
4947   *)
4948     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
4949 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
4950     CC="$CC $ac_cv_prog_cc_stdc" ;;
4951 esac
4952
4953 # Some people use a C++ compiler to compile C.  Since we use `exit',
4954 # in C++ we need to declare it.  In case someone uses the same compiler
4955 # for both compiling C and C++ we need to have the C++ compiler decide
4956 # the declaration of exit, since it's the most demanding environment.
4957 cat >conftest.$ac_ext <<_ACEOF
4958 #ifndef __cplusplus
4959   choke me
4960 #endif
4961 _ACEOF
4962 rm -f conftest.$ac_objext
4963 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4964   (eval $ac_compile) 2>conftest.er1
4965   ac_status=$?
4966   grep -v '^ *+' conftest.er1 >conftest.err
4967   rm -f conftest.er1
4968   cat conftest.err >&5
4969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4970   (exit $ac_status); } &&
4971          { ac_try='test -z "$ac_c_werror_flag"
4972                          || test ! -s conftest.err'
4973   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4974   (eval $ac_try) 2>&5
4975   ac_status=$?
4976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4977   (exit $ac_status); }; } &&
4978          { ac_try='test -s conftest.$ac_objext'
4979   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4980   (eval $ac_try) 2>&5
4981   ac_status=$?
4982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4983   (exit $ac_status); }; }; then
4984   for ac_declaration in \
4985    '' \
4986    'extern "C" void std::exit (int) throw (); using std::exit;' \
4987    'extern "C" void std::exit (int); using std::exit;' \
4988    'extern "C" void exit (int) throw ();' \
4989    'extern "C" void exit (int);' \
4990    'void exit (int);'
4991 do
4992   cat >conftest.$ac_ext <<_ACEOF
4993 /* confdefs.h.  */
4994 _ACEOF
4995 cat confdefs.h >>conftest.$ac_ext
4996 cat >>conftest.$ac_ext <<_ACEOF
4997 /* end confdefs.h.  */
4998 $ac_declaration
4999 #include <stdlib.h>
5000 int
5001 main ()
5002 {
5003 exit (42);
5004   ;
5005   return 0;
5006 }
5007 _ACEOF
5008 rm -f conftest.$ac_objext
5009 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5010   (eval $ac_compile) 2>conftest.er1
5011   ac_status=$?
5012   grep -v '^ *+' conftest.er1 >conftest.err
5013   rm -f conftest.er1
5014   cat conftest.err >&5
5015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5016   (exit $ac_status); } &&
5017          { ac_try='test -z "$ac_c_werror_flag"
5018                          || test ! -s conftest.err'
5019   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5020   (eval $ac_try) 2>&5
5021   ac_status=$?
5022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5023   (exit $ac_status); }; } &&
5024          { ac_try='test -s conftest.$ac_objext'
5025   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5026   (eval $ac_try) 2>&5
5027   ac_status=$?
5028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5029   (exit $ac_status); }; }; then
5030   :
5031 else
5032   echo "$as_me: failed program was:" >&5
5033 sed 's/^/| /' conftest.$ac_ext >&5
5034
5035 continue
5036 fi
5037 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5038   cat >conftest.$ac_ext <<_ACEOF
5039 /* confdefs.h.  */
5040 _ACEOF
5041 cat confdefs.h >>conftest.$ac_ext
5042 cat >>conftest.$ac_ext <<_ACEOF
5043 /* end confdefs.h.  */
5044 $ac_declaration
5045 int
5046 main ()
5047 {
5048 exit (42);
5049   ;
5050   return 0;
5051 }
5052 _ACEOF
5053 rm -f conftest.$ac_objext
5054 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5055   (eval $ac_compile) 2>conftest.er1
5056   ac_status=$?
5057   grep -v '^ *+' conftest.er1 >conftest.err
5058   rm -f conftest.er1
5059   cat conftest.err >&5
5060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5061   (exit $ac_status); } &&
5062          { ac_try='test -z "$ac_c_werror_flag"
5063                          || test ! -s conftest.err'
5064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5065   (eval $ac_try) 2>&5
5066   ac_status=$?
5067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5068   (exit $ac_status); }; } &&
5069          { ac_try='test -s conftest.$ac_objext'
5070   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5071   (eval $ac_try) 2>&5
5072   ac_status=$?
5073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5074   (exit $ac_status); }; }; then
5075   break
5076 else
5077   echo "$as_me: failed program was:" >&5
5078 sed 's/^/| /' conftest.$ac_ext >&5
5079
5080 fi
5081 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5082 done
5083 rm -f conftest*
5084 if test -n "$ac_declaration"; then
5085   echo '#ifdef __cplusplus' >>confdefs.h
5086   echo $ac_declaration      >>confdefs.h
5087   echo '#endif'             >>confdefs.h
5088 fi
5089
5090 else
5091   echo "$as_me: failed program was:" >&5
5092 sed 's/^/| /' conftest.$ac_ext >&5
5093
5094 fi
5095 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5096 ac_ext=c
5097 ac_cpp='$CPP $CPPFLAGS'
5098 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5099 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5100 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5101
5102 depcc="$CC"   am_compiler_list=
5103
5104 echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
5105 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
5106 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
5107   echo $ECHO_N "(cached) $ECHO_C" >&6
5108 else
5109   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5110   # We make a subdir and do the tests there.  Otherwise we can end up
5111   # making bogus files that we don't know about and never remove.  For
5112   # instance it was reported that on HP-UX the gcc test will end up
5113   # making a dummy file named `D' -- because `-MD' means `put the output
5114   # in D'.
5115   mkdir conftest.dir
5116   # Copy depcomp to subdir because otherwise we won't find it if we're
5117   # using a relative directory.
5118   cp "$am_depcomp" conftest.dir
5119   cd conftest.dir
5120   # We will build objects and dependencies in a subdirectory because
5121   # it helps to detect inapplicable dependency modes.  For instance
5122   # both Tru64's cc and ICC support -MD to output dependencies as a
5123   # side effect of compilation, but ICC will put the dependencies in
5124   # the current directory while Tru64 will put them in the object
5125   # directory.
5126   mkdir sub
5127
5128   am_cv_CC_dependencies_compiler_type=none
5129   if test "$am_compiler_list" = ""; then
5130      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5131   fi
5132   for depmode in $am_compiler_list; do
5133     # Setup a source with many dependencies, because some compilers
5134     # like to wrap large dependency lists on column 80 (with \), and
5135     # we should not choose a depcomp mode which is confused by this.
5136     #
5137     # We need to recreate these files for each test, as the compiler may
5138     # overwrite some of them when testing with obscure command lines.
5139     # This happens at least with the AIX C compiler.
5140     : > sub/conftest.c
5141     for i in 1 2 3 4 5 6; do
5142       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5143       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5144       # Solaris 8's {/usr,}/bin/sh.
5145       touch sub/conftst$i.h
5146     done
5147     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5148
5149     case $depmode in
5150     nosideeffect)
5151       # after this tag, mechanisms are not by side-effect, so they'll
5152       # only be used when explicitly requested
5153       if test "x$enable_dependency_tracking" = xyes; then
5154         continue
5155       else
5156         break
5157       fi
5158       ;;
5159     none) break ;;
5160     esac
5161     # We check with `-c' and `-o' for the sake of the "dashmstdout"
5162     # mode.  It turns out that the SunPro C++ compiler does not properly
5163     # handle `-M -o', and we need to detect this.
5164     if depmode=$depmode \
5165        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5166        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5167        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
5168          >/dev/null 2>conftest.err &&
5169        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5170        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
5171        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5172       # icc doesn't choke on unknown options, it will just issue warnings
5173       # or remarks (even with -Werror).  So we grep stderr for any message
5174       # that says an option was ignored or not supported.
5175       # When given -MP, icc 7.0 and 7.1 complain thusly:
5176       #   icc: Command line warning: ignoring option '-M'; no argument required
5177       # The diagnosis changed in icc 8.0:
5178       #   icc: Command line remark: option '-MP' not supported
5179       if (grep 'ignoring option' conftest.err ||
5180           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5181         am_cv_CC_dependencies_compiler_type=$depmode
5182         break
5183       fi
5184     fi
5185   done
5186
5187   cd ..
5188   rm -rf conftest.dir
5189 else
5190   am_cv_CC_dependencies_compiler_type=none
5191 fi
5192
5193 fi
5194 echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
5195 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
5196 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5197
5198
5199
5200 if
5201   test "x$enable_dependency_tracking" != xno \
5202   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5203   am__fastdepCC_TRUE=
5204   am__fastdepCC_FALSE='#'
5205 else
5206   am__fastdepCC_TRUE='#'
5207   am__fastdepCC_FALSE=
5208 fi
5209
5210
5211 echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
5212 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
5213 if test "${lt_cv_path_SED+set}" = set; then
5214   echo $ECHO_N "(cached) $ECHO_C" >&6
5215 else
5216   # Loop through the user's path and test for sed and gsed.
5217 # Then use that list of sed's as ones to test for truncation.
5218 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5219 for as_dir in $PATH
5220 do
5221   IFS=$as_save_IFS
5222   test -z "$as_dir" && as_dir=.
5223   for lt_ac_prog in sed gsed; do
5224     for ac_exec_ext in '' $ac_executable_extensions; do
5225       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
5226         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
5227       fi
5228     done
5229   done
5230 done
5231 lt_ac_max=0
5232 lt_ac_count=0
5233 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
5234 # along with /bin/sed that truncates output.
5235 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
5236   test ! -f $lt_ac_sed && continue
5237   cat /dev/null > conftest.in
5238   lt_ac_count=0
5239   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
5240   # Check for GNU sed and select it if it is found.
5241   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
5242     lt_cv_path_SED=$lt_ac_sed
5243     break
5244   fi
5245   while true; do
5246     cat conftest.in conftest.in >conftest.tmp
5247     mv conftest.tmp conftest.in
5248     cp conftest.in conftest.nl
5249     echo >>conftest.nl
5250     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
5251     cmp -s conftest.out conftest.nl || break
5252     # 10000 chars as input seems more than enough
5253     test $lt_ac_count -gt 10 && break
5254     lt_ac_count=`expr $lt_ac_count + 1`
5255     if test $lt_ac_count -gt $lt_ac_max; then
5256       lt_ac_max=$lt_ac_count
5257       lt_cv_path_SED=$lt_ac_sed
5258     fi
5259   done
5260 done
5261
5262 fi
5263
5264 SED=$lt_cv_path_SED
5265 echo "$as_me:$LINENO: result: $SED" >&5
5266 echo "${ECHO_T}$SED" >&6
5267
5268 echo "$as_me:$LINENO: checking for egrep" >&5
5269 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
5270 if test "${ac_cv_prog_egrep+set}" = set; then
5271   echo $ECHO_N "(cached) $ECHO_C" >&6
5272 else
5273   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
5274     then ac_cv_prog_egrep='grep -E'
5275     else ac_cv_prog_egrep='egrep'
5276     fi
5277 fi
5278 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
5279 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
5280  EGREP=$ac_cv_prog_egrep
5281
5282
5283
5284 # Check whether --with-gnu-ld or --without-gnu-ld was given.
5285 if test "${with_gnu_ld+set}" = set; then
5286   withval="$with_gnu_ld"
5287   test "$withval" = no || with_gnu_ld=yes
5288 else
5289   with_gnu_ld=no
5290 fi;
5291 ac_prog=ld
5292 if test "$GCC" = yes; then
5293   # Check if gcc -print-prog-name=ld gives a path.
5294   echo "$as_me:$LINENO: checking for ld used by $CC" >&5
5295 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
5296   case $host in
5297   *-*-mingw*)
5298     # gcc leaves a trailing carriage return which upsets mingw
5299     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5300   *)
5301     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5302   esac
5303   case $ac_prog in
5304     # Accept absolute paths.
5305     [\\/]* | ?:[\\/]*)
5306       re_direlt='/[^/][^/]*/\.\./'
5307       # Canonicalize the pathname of ld
5308       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
5309       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5310         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
5311       done
5312       test -z "$LD" && LD="$ac_prog"
5313       ;;
5314   "")
5315     # If it fails, then pretend we aren't using GCC.
5316     ac_prog=ld
5317     ;;
5318   *)
5319     # If it is relative, then search for the first ld in PATH.
5320     with_gnu_ld=unknown
5321     ;;
5322   esac
5323 elif test "$with_gnu_ld" = yes; then
5324   echo "$as_me:$LINENO: checking for GNU ld" >&5
5325 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
5326 else
5327   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
5328 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
5329 fi
5330 if test "${lt_cv_path_LD+set}" = set; then
5331   echo $ECHO_N "(cached) $ECHO_C" >&6
5332 else
5333   if test -z "$LD"; then
5334   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5335   for ac_dir in $PATH; do
5336     IFS="$lt_save_ifs"
5337     test -z "$ac_dir" && ac_dir=.
5338     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5339       lt_cv_path_LD="$ac_dir/$ac_prog"
5340       # Check to see if the program is GNU ld.  I'd rather use --version,
5341       # but apparently some variants of GNU ld only accept -v.
5342       # Break only if it was the GNU/non-GNU ld that we prefer.
5343       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5344       *GNU* | *'with BFD'*)
5345         test "$with_gnu_ld" != no && break
5346         ;;
5347       *)
5348         test "$with_gnu_ld" != yes && break
5349         ;;
5350       esac
5351     fi
5352   done
5353   IFS="$lt_save_ifs"
5354 else
5355   lt_cv_path_LD="$LD" # Let the user override the test with a path.
5356 fi
5357 fi
5358
5359 LD="$lt_cv_path_LD"
5360 if test -n "$LD"; then
5361   echo "$as_me:$LINENO: result: $LD" >&5
5362 echo "${ECHO_T}$LD" >&6
5363 else
5364   echo "$as_me:$LINENO: result: no" >&5
5365 echo "${ECHO_T}no" >&6
5366 fi
5367 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
5368 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
5369    { (exit 1); exit 1; }; }
5370 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
5371 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
5372 if test "${lt_cv_prog_gnu_ld+set}" = set; then
5373   echo $ECHO_N "(cached) $ECHO_C" >&6
5374 else
5375   # I'd rather use --version here, but apparently some GNU lds only accept -v.
5376 case `$LD -v 2>&1 </dev/null` in
5377 *GNU* | *'with BFD'*)
5378   lt_cv_prog_gnu_ld=yes
5379   ;;
5380 *)
5381   lt_cv_prog_gnu_ld=no
5382   ;;
5383 esac
5384 fi
5385 echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
5386 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
5387 with_gnu_ld=$lt_cv_prog_gnu_ld
5388
5389
5390 echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
5391 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
5392 if test "${lt_cv_ld_reload_flag+set}" = set; then
5393   echo $ECHO_N "(cached) $ECHO_C" >&6
5394 else
5395   lt_cv_ld_reload_flag='-r'
5396 fi
5397 echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
5398 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
5399 reload_flag=$lt_cv_ld_reload_flag
5400 case $reload_flag in
5401 "" | " "*) ;;
5402 *) reload_flag=" $reload_flag" ;;
5403 esac
5404 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5405 case $host_os in
5406   darwin*)
5407     if test "$GCC" = yes; then
5408       reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
5409     else
5410       reload_cmds='$LD$reload_flag -o $output$reload_objs'
5411     fi
5412     ;;
5413 esac
5414
5415 echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
5416 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
5417 if test "${lt_cv_path_NM+set}" = set; then
5418   echo $ECHO_N "(cached) $ECHO_C" >&6
5419 else
5420   if test -n "$NM"; then
5421   # Let the user override the test.
5422   lt_cv_path_NM="$NM"
5423 else
5424   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5425   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
5426     IFS="$lt_save_ifs"
5427     test -z "$ac_dir" && ac_dir=.
5428     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
5429     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5430       # Check to see if the nm accepts a BSD-compat flag.
5431       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5432       #   nm: unknown option "B" ignored
5433       # Tru64's nm complains that /dev/null is an invalid object file
5434       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5435       */dev/null* | *'Invalid file or object type'*)
5436         lt_cv_path_NM="$tmp_nm -B"
5437         break
5438         ;;
5439       *)
5440         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5441         */dev/null*)
5442           lt_cv_path_NM="$tmp_nm -p"
5443           break
5444           ;;
5445         *)
5446           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5447           continue # so that we can try to find one that supports BSD flags
5448           ;;
5449         esac
5450       esac
5451     fi
5452   done
5453   IFS="$lt_save_ifs"
5454   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
5455 fi
5456 fi
5457 echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
5458 echo "${ECHO_T}$lt_cv_path_NM" >&6
5459 NM="$lt_cv_path_NM"
5460
5461 echo "$as_me:$LINENO: checking whether ln -s works" >&5
5462 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
5463 LN_S=$as_ln_s
5464 if test "$LN_S" = "ln -s"; then
5465   echo "$as_me:$LINENO: result: yes" >&5
5466 echo "${ECHO_T}yes" >&6
5467 else
5468   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
5469 echo "${ECHO_T}no, using $LN_S" >&6
5470 fi
5471
5472 echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
5473 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
5474 if test "${lt_cv_deplibs_check_method+set}" = set; then
5475   echo $ECHO_N "(cached) $ECHO_C" >&6
5476 else
5477   lt_cv_file_magic_cmd='$MAGIC_CMD'
5478 lt_cv_file_magic_test_file=
5479 lt_cv_deplibs_check_method='unknown'
5480 # Need to set the preceding variable on all platforms that support
5481 # interlibrary dependencies.
5482 # 'none' -- dependencies not supported.
5483 # `unknown' -- same as none, but documents that we really don't know.
5484 # 'pass_all' -- all dependencies passed with no checks.
5485 # 'test_compile' -- check by making test program.
5486 # 'file_magic [[regex]]' -- check by looking for files in library path
5487 # which responds to the $file_magic_cmd with a given extended regex.
5488 # If you have `file' or equivalent on your system and you're not sure
5489 # whether `pass_all' will *always* work, you probably want this one.
5490
5491 case $host_os in
5492 aix4* | aix5*)
5493   lt_cv_deplibs_check_method=pass_all
5494   ;;
5495
5496 beos*)
5497   lt_cv_deplibs_check_method=pass_all
5498   ;;
5499
5500 bsdi[45]*)
5501   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
5502   lt_cv_file_magic_cmd='/usr/bin/file -L'
5503   lt_cv_file_magic_test_file=/shlib/libc.so
5504   ;;
5505
5506 cygwin*)
5507   # func_win32_libid is a shell function defined in ltmain.sh
5508   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5509   lt_cv_file_magic_cmd='func_win32_libid'
5510   ;;
5511
5512 mingw* | pw32*)
5513   # Base MSYS/MinGW do not provide the 'file' command needed by
5514   # func_win32_libid shell function, so use a weaker test based on 'objdump'.
5515   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
5516   lt_cv_file_magic_cmd='$OBJDUMP -f'
5517   ;;
5518
5519 darwin* | rhapsody*)
5520   lt_cv_deplibs_check_method=pass_all
5521   ;;
5522
5523 freebsd* | kfreebsd*-gnu | dragonfly*)
5524   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5525     case $host_cpu in
5526     i*86 )
5527       # Not sure whether the presence of OpenBSD here was a mistake.
5528       # Let's accept both of them until this is cleared up.
5529       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
5530       lt_cv_file_magic_cmd=/usr/bin/file
5531       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5532       ;;
5533     esac
5534   else
5535     lt_cv_deplibs_check_method=pass_all
5536   fi
5537   ;;
5538
5539 gnu*)
5540   lt_cv_deplibs_check_method=pass_all
5541   ;;
5542
5543 hpux10.20* | hpux11*)
5544   lt_cv_file_magic_cmd=/usr/bin/file
5545   case $host_cpu in
5546   ia64*)
5547     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
5548     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5549     ;;
5550   hppa*64*)
5551     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]'
5552     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5553     ;;
5554   *)
5555     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
5556     lt_cv_file_magic_test_file=/usr/lib/libc.sl
5557     ;;
5558   esac
5559   ;;
5560
5561 irix5* | irix6* | nonstopux*)
5562   case $LD in
5563   *-32|*"-32 ") libmagic=32-bit;;
5564   *-n32|*"-n32 ") libmagic=N32;;
5565   *-64|*"-64 ") libmagic=64-bit;;
5566   *) libmagic=never-match;;
5567   esac
5568   lt_cv_deplibs_check_method=pass_all
5569   ;;
5570
5571 # This must be Linux ELF.
5572 linux*)
5573   lt_cv_deplibs_check_method=pass_all
5574   ;;
5575
5576 netbsd*)
5577   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5578     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5579   else
5580     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
5581   fi
5582   ;;
5583
5584 newos6*)
5585   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
5586   lt_cv_file_magic_cmd=/usr/bin/file
5587   lt_cv_file_magic_test_file=/usr/lib/libnls.so
5588   ;;
5589
5590 nto-qnx*)
5591   lt_cv_deplibs_check_method=unknown
5592   ;;
5593
5594 openbsd*)
5595   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5596     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
5597   else
5598     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5599   fi
5600   ;;
5601
5602 osf3* | osf4* | osf5*)
5603   lt_cv_deplibs_check_method=pass_all
5604   ;;
5605
5606 sco3.2v5*)
5607   lt_cv_deplibs_check_method=pass_all
5608   ;;
5609
5610 solaris*)
5611   lt_cv_deplibs_check_method=pass_all
5612   ;;
5613
5614 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5615   case $host_vendor in
5616   motorola)
5617     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]'
5618     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5619     ;;
5620   ncr)
5621     lt_cv_deplibs_check_method=pass_all
5622     ;;
5623   sequent)
5624     lt_cv_file_magic_cmd='/bin/file'
5625     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
5626     ;;
5627   sni)
5628     lt_cv_file_magic_cmd='/bin/file'
5629     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
5630     lt_cv_file_magic_test_file=/lib/libc.so
5631     ;;
5632   siemens)
5633     lt_cv_deplibs_check_method=pass_all
5634     ;;
5635   esac
5636   ;;
5637
5638 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
5639   lt_cv_deplibs_check_method=pass_all
5640   ;;
5641 esac
5642
5643 fi
5644 echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
5645 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
5646 file_magic_cmd=$lt_cv_file_magic_cmd
5647 deplibs_check_method=$lt_cv_deplibs_check_method
5648 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5649
5650
5651
5652
5653 # If no C compiler was specified, use CC.
5654 LTCC=${LTCC-"$CC"}
5655
5656 # Allow CC to be a program name with arguments.
5657 compiler=$CC
5658
5659
5660 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
5661 if test "${enable_libtool_lock+set}" = set; then
5662   enableval="$enable_libtool_lock"
5663
5664 fi;
5665 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5666
5667 # Some flags need to be propagated to the compiler or linker for good
5668 # libtool support.
5669 case $host in
5670 ia64-*-hpux*)
5671   # Find out which ABI we are using.
5672   echo 'int i;' > conftest.$ac_ext
5673   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5674   (eval $ac_compile) 2>&5
5675   ac_status=$?
5676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5677   (exit $ac_status); }; then
5678     case `/usr/bin/file conftest.$ac_objext` in
5679     *ELF-32*)
5680       HPUX_IA64_MODE="32"
5681       ;;
5682     *ELF-64*)
5683       HPUX_IA64_MODE="64"
5684       ;;
5685     esac
5686   fi
5687   rm -rf conftest*
5688   ;;
5689 *-*-irix6*)
5690   # Find out which ABI we are using.
5691   echo '#line 5691 "configure"' > conftest.$ac_ext
5692   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5693   (eval $ac_compile) 2>&5
5694   ac_status=$?
5695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5696   (exit $ac_status); }; then
5697    if test "$lt_cv_prog_gnu_ld" = yes; then
5698     case `/usr/bin/file conftest.$ac_objext` in
5699     *32-bit*)
5700       LD="${LD-ld} -melf32bsmip"
5701       ;;
5702     *N32*)
5703       LD="${LD-ld} -melf32bmipn32"
5704       ;;
5705     *64-bit*)
5706       LD="${LD-ld} -melf64bmip"
5707       ;;
5708     esac
5709    else
5710     case `/usr/bin/file conftest.$ac_objext` in
5711     *32-bit*)
5712       LD="${LD-ld} -32"
5713       ;;
5714     *N32*)
5715       LD="${LD-ld} -n32"
5716       ;;
5717     *64-bit*)
5718       LD="${LD-ld} -64"
5719       ;;
5720     esac
5721    fi
5722   fi
5723   rm -rf conftest*
5724   ;;
5725
5726 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
5727   # Find out which ABI we are using.
5728   echo 'int i;' > conftest.$ac_ext
5729   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5730   (eval $ac_compile) 2>&5
5731   ac_status=$?
5732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5733   (exit $ac_status); }; then
5734     case `/usr/bin/file conftest.o` in
5735     *32-bit*)
5736       case $host in
5737         x86_64-*linux*)
5738           LD="${LD-ld} -m elf_i386"
5739           ;;
5740         ppc64-*linux*|powerpc64-*linux*)
5741           LD="${LD-ld} -m elf32ppclinux"
5742           ;;
5743         s390x-*linux*)
5744           LD="${LD-ld} -m elf_s390"
5745           ;;
5746         sparc64-*linux*)
5747           LD="${LD-ld} -m elf32_sparc"
5748           ;;
5749       esac
5750       ;;
5751     *64-bit*)
5752       case $host in
5753         x86_64-*linux*)
5754           LD="${LD-ld} -m elf_x86_64"
5755           ;;
5756         ppc*-*linux*|powerpc*-*linux*)
5757           LD="${LD-ld} -m elf64ppc"
5758           ;;
5759         s390*-*linux*)
5760           LD="${LD-ld} -m elf64_s390"
5761           ;;
5762         sparc*-*linux*)
5763           LD="${LD-ld} -m elf64_sparc"
5764           ;;
5765       esac
5766       ;;
5767     esac
5768   fi
5769   rm -rf conftest*
5770   ;;
5771
5772 *-*-sco3.2v5*)
5773   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
5774   SAVE_CFLAGS="$CFLAGS"
5775   CFLAGS="$CFLAGS -belf"
5776   echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
5777 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
5778 if test "${lt_cv_cc_needs_belf+set}" = set; then
5779   echo $ECHO_N "(cached) $ECHO_C" >&6
5780 else
5781   ac_ext=c
5782 ac_cpp='$CPP $CPPFLAGS'
5783 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5784 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5785 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5786
5787      cat >conftest.$ac_ext <<_ACEOF
5788 /* confdefs.h.  */
5789 _ACEOF
5790 cat confdefs.h >>conftest.$ac_ext
5791 cat >>conftest.$ac_ext <<_ACEOF
5792 /* end confdefs.h.  */
5793
5794 int
5795 main ()
5796 {
5797
5798   ;
5799   return 0;
5800 }
5801 _ACEOF
5802 rm -f conftest.$ac_objext conftest$ac_exeext
5803 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5804   (eval $ac_link) 2>conftest.er1
5805   ac_status=$?
5806   grep -v '^ *+' conftest.er1 >conftest.err
5807   rm -f conftest.er1
5808   cat conftest.err >&5
5809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5810   (exit $ac_status); } &&
5811          { ac_try='test -z "$ac_c_werror_flag"
5812                          || test ! -s conftest.err'
5813   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5814   (eval $ac_try) 2>&5
5815   ac_status=$?
5816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5817   (exit $ac_status); }; } &&
5818          { ac_try='test -s conftest$ac_exeext'
5819   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5820   (eval $ac_try) 2>&5
5821   ac_status=$?
5822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5823   (exit $ac_status); }; }; then
5824   lt_cv_cc_needs_belf=yes
5825 else
5826   echo "$as_me: failed program was:" >&5
5827 sed 's/^/| /' conftest.$ac_ext >&5
5828
5829 lt_cv_cc_needs_belf=no
5830 fi
5831 rm -f conftest.err conftest.$ac_objext \
5832       conftest$ac_exeext conftest.$ac_ext
5833      ac_ext=c
5834 ac_cpp='$CPP $CPPFLAGS'
5835 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5836 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5837 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5838
5839 fi
5840 echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
5841 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
5842   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5843     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5844     CFLAGS="$SAVE_CFLAGS"
5845   fi
5846   ;;
5847 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
5848   if test -n "$ac_tool_prefix"; then
5849   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5850 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
5851 echo "$as_me:$LINENO: checking for $ac_word" >&5
5852 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5853 if test "${ac_cv_prog_DLLTOOL+set}" = set; then
5854   echo $ECHO_N "(cached) $ECHO_C" >&6
5855 else
5856   if test -n "$DLLTOOL"; then
5857   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
5858 else
5859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5860 for as_dir in $PATH
5861 do
5862   IFS=$as_save_IFS
5863   test -z "$as_dir" && as_dir=.
5864   for ac_exec_ext in '' $ac_executable_extensions; do
5865   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5866     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
5867     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5868     break 2
5869   fi
5870 done
5871 done
5872
5873 fi
5874 fi
5875 DLLTOOL=$ac_cv_prog_DLLTOOL
5876 if test -n "$DLLTOOL"; then
5877   echo "$as_me:$LINENO: result: $DLLTOOL" >&5
5878 echo "${ECHO_T}$DLLTOOL" >&6
5879 else
5880   echo "$as_me:$LINENO: result: no" >&5
5881 echo "${ECHO_T}no" >&6
5882 fi
5883
5884 fi
5885 if test -z "$ac_cv_prog_DLLTOOL"; then
5886   ac_ct_DLLTOOL=$DLLTOOL
5887   # Extract the first word of "dlltool", so it can be a program name with args.
5888 set dummy dlltool; ac_word=$2
5889 echo "$as_me:$LINENO: checking for $ac_word" >&5
5890 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5891 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
5892   echo $ECHO_N "(cached) $ECHO_C" >&6
5893 else
5894   if test -n "$ac_ct_DLLTOOL"; then
5895   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
5896 else
5897 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5898 for as_dir in $PATH
5899 do
5900   IFS=$as_save_IFS
5901   test -z "$as_dir" && as_dir=.
5902   for ac_exec_ext in '' $ac_executable_extensions; do
5903   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5904     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
5905     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5906     break 2
5907   fi
5908 done
5909 done
5910
5911   test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="false"
5912 fi
5913 fi
5914 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
5915 if test -n "$ac_ct_DLLTOOL"; then
5916   echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
5917 echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
5918 else
5919   echo "$as_me:$LINENO: result: no" >&5
5920 echo "${ECHO_T}no" >&6
5921 fi
5922
5923   DLLTOOL=$ac_ct_DLLTOOL
5924 else
5925   DLLTOOL="$ac_cv_prog_DLLTOOL"
5926 fi
5927
5928   if test -n "$ac_tool_prefix"; then
5929   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
5930 set dummy ${ac_tool_prefix}as; ac_word=$2
5931 echo "$as_me:$LINENO: checking for $ac_word" >&5
5932 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5933 if test "${ac_cv_prog_AS+set}" = set; then
5934   echo $ECHO_N "(cached) $ECHO_C" >&6
5935 else
5936   if test -n "$AS"; then
5937   ac_cv_prog_AS="$AS" # Let the user override the test.
5938 else
5939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5940 for as_dir in $PATH
5941 do
5942   IFS=$as_save_IFS
5943   test -z "$as_dir" && as_dir=.
5944   for ac_exec_ext in '' $ac_executable_extensions; do
5945   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5946     ac_cv_prog_AS="${ac_tool_prefix}as"
5947     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5948     break 2
5949   fi
5950 done
5951 done
5952
5953 fi
5954 fi
5955 AS=$ac_cv_prog_AS
5956 if test -n "$AS"; then
5957   echo "$as_me:$LINENO: result: $AS" >&5
5958 echo "${ECHO_T}$AS" >&6
5959 else
5960   echo "$as_me:$LINENO: result: no" >&5
5961 echo "${ECHO_T}no" >&6
5962 fi
5963
5964 fi
5965 if test -z "$ac_cv_prog_AS"; then
5966   ac_ct_AS=$AS
5967   # Extract the first word of "as", so it can be a program name with args.
5968 set dummy as; ac_word=$2
5969 echo "$as_me:$LINENO: checking for $ac_word" >&5
5970 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5971 if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
5972   echo $ECHO_N "(cached) $ECHO_C" >&6
5973 else
5974   if test -n "$ac_ct_AS"; then
5975   ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
5976 else
5977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5978 for as_dir in $PATH
5979 do
5980   IFS=$as_save_IFS
5981   test -z "$as_dir" && as_dir=.
5982   for ac_exec_ext in '' $ac_executable_extensions; do
5983   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5984     ac_cv_prog_ac_ct_AS="as"
5985     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5986     break 2
5987   fi
5988 done
5989 done
5990
5991   test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="false"
5992 fi
5993 fi
5994 ac_ct_AS=$ac_cv_prog_ac_ct_AS
5995 if test -n "$ac_ct_AS"; then
5996   echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
5997 echo "${ECHO_T}$ac_ct_AS" >&6
5998 else
5999   echo "$as_me:$LINENO: result: no" >&5
6000 echo "${ECHO_T}no" >&6
6001 fi
6002
6003   AS=$ac_ct_AS
6004 else
6005   AS="$ac_cv_prog_AS"
6006 fi
6007
6008   if test -n "$ac_tool_prefix"; then
6009   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
6010 set dummy ${ac_tool_prefix}objdump; ac_word=$2
6011 echo "$as_me:$LINENO: checking for $ac_word" >&5
6012 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6013 if test "${ac_cv_prog_OBJDUMP+set}" = set; then
6014   echo $ECHO_N "(cached) $ECHO_C" >&6
6015 else
6016   if test -n "$OBJDUMP"; then
6017   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
6018 else
6019 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6020 for as_dir in $PATH
6021 do
6022   IFS=$as_save_IFS
6023   test -z "$as_dir" && as_dir=.
6024   for ac_exec_ext in '' $ac_executable_extensions; do
6025   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6026     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
6027     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6028     break 2
6029   fi
6030 done
6031 done
6032
6033 fi
6034 fi
6035 OBJDUMP=$ac_cv_prog_OBJDUMP
6036 if test -n "$OBJDUMP"; then
6037   echo "$as_me:$LINENO: result: $OBJDUMP" >&5
6038 echo "${ECHO_T}$OBJDUMP" >&6
6039 else
6040   echo "$as_me:$LINENO: result: no" >&5
6041 echo "${ECHO_T}no" >&6
6042 fi
6043
6044 fi
6045 if test -z "$ac_cv_prog_OBJDUMP"; then
6046   ac_ct_OBJDUMP=$OBJDUMP
6047   # Extract the first word of "objdump", so it can be a program name with args.
6048 set dummy objdump; ac_word=$2
6049 echo "$as_me:$LINENO: checking for $ac_word" >&5
6050 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6051 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
6052   echo $ECHO_N "(cached) $ECHO_C" >&6
6053 else
6054   if test -n "$ac_ct_OBJDUMP"; then
6055   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
6056 else
6057 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6058 for as_dir in $PATH
6059 do
6060   IFS=$as_save_IFS
6061   test -z "$as_dir" && as_dir=.
6062   for ac_exec_ext in '' $ac_executable_extensions; do
6063   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6064     ac_cv_prog_ac_ct_OBJDUMP="objdump"
6065     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6066     break 2
6067   fi
6068 done
6069 done
6070
6071   test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false"
6072 fi
6073 fi
6074 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
6075 if test -n "$ac_ct_OBJDUMP"; then
6076   echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
6077 echo "${ECHO_T}$ac_ct_OBJDUMP" >&6
6078 else
6079   echo "$as_me:$LINENO: result: no" >&5
6080 echo "${ECHO_T}no" >&6
6081 fi
6082
6083   OBJDUMP=$ac_ct_OBJDUMP
6084 else
6085   OBJDUMP="$ac_cv_prog_OBJDUMP"
6086 fi
6087
6088   ;;
6089
6090 esac
6091
6092 need_locks="$enable_libtool_lock"
6093
6094
6095 ac_ext=c
6096 ac_cpp='$CPP $CPPFLAGS'
6097 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6098 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6099 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6100 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
6101 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
6102 # On Suns, sometimes $CPP names a directory.
6103 if test -n "$CPP" && test -d "$CPP"; then
6104   CPP=
6105 fi
6106 if test -z "$CPP"; then
6107   if test "${ac_cv_prog_CPP+set}" = set; then
6108   echo $ECHO_N "(cached) $ECHO_C" >&6
6109 else
6110       # Double quotes because CPP needs to be expanded
6111     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6112     do
6113       ac_preproc_ok=false
6114 for ac_c_preproc_warn_flag in '' yes
6115 do
6116   # Use a header file that comes with gcc, so configuring glibc
6117   # with a fresh cross-compiler works.
6118   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6119   # <limits.h> exists even on freestanding compilers.
6120   # On the NeXT, cc -E runs the code through the compiler's parser,
6121   # not just through cpp. "Syntax error" is here to catch this case.
6122   cat >conftest.$ac_ext <<_ACEOF
6123 /* confdefs.h.  */
6124 _ACEOF
6125 cat confdefs.h >>conftest.$ac_ext
6126 cat >>conftest.$ac_ext <<_ACEOF
6127 /* end confdefs.h.  */
6128 #ifdef __STDC__
6129 # include <limits.h>
6130 #else
6131 # include <assert.h>
6132 #endif
6133                      Syntax error
6134 _ACEOF
6135 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6136   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6137   ac_status=$?
6138   grep -v '^ *+' conftest.er1 >conftest.err
6139   rm -f conftest.er1
6140   cat conftest.err >&5
6141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6142   (exit $ac_status); } >/dev/null; then
6143   if test -s conftest.err; then
6144     ac_cpp_err=$ac_c_preproc_warn_flag
6145     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6146   else
6147     ac_cpp_err=
6148   fi
6149 else
6150   ac_cpp_err=yes
6151 fi
6152 if test -z "$ac_cpp_err"; then
6153   :
6154 else
6155   echo "$as_me: failed program was:" >&5
6156 sed 's/^/| /' conftest.$ac_ext >&5
6157
6158   # Broken: fails on valid input.
6159 continue
6160 fi
6161 rm -f conftest.err conftest.$ac_ext
6162
6163   # OK, works on sane cases.  Now check whether non-existent headers
6164   # can be detected and how.
6165   cat >conftest.$ac_ext <<_ACEOF
6166 /* confdefs.h.  */
6167 _ACEOF
6168 cat confdefs.h >>conftest.$ac_ext
6169 cat >>conftest.$ac_ext <<_ACEOF
6170 /* end confdefs.h.  */
6171 #include <ac_nonexistent.h>
6172 _ACEOF
6173 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6174   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6175   ac_status=$?
6176   grep -v '^ *+' conftest.er1 >conftest.err
6177   rm -f conftest.er1
6178   cat conftest.err >&5
6179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6180   (exit $ac_status); } >/dev/null; then
6181   if test -s conftest.err; then
6182     ac_cpp_err=$ac_c_preproc_warn_flag
6183     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6184   else
6185     ac_cpp_err=
6186   fi
6187 else
6188   ac_cpp_err=yes
6189 fi
6190 if test -z "$ac_cpp_err"; then
6191   # Broken: success on invalid input.
6192 continue
6193 else
6194   echo "$as_me: failed program was:" >&5
6195 sed 's/^/| /' conftest.$ac_ext >&5
6196
6197   # Passes both tests.
6198 ac_preproc_ok=:
6199 break
6200 fi
6201 rm -f conftest.err conftest.$ac_ext
6202
6203 done
6204 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6205 rm -f conftest.err conftest.$ac_ext
6206 if $ac_preproc_ok; then
6207   break
6208 fi
6209
6210     done
6211     ac_cv_prog_CPP=$CPP
6212
6213 fi
6214   CPP=$ac_cv_prog_CPP
6215 else
6216   ac_cv_prog_CPP=$CPP
6217 fi
6218 echo "$as_me:$LINENO: result: $CPP" >&5
6219 echo "${ECHO_T}$CPP" >&6
6220 ac_preproc_ok=false
6221 for ac_c_preproc_warn_flag in '' yes
6222 do
6223   # Use a header file that comes with gcc, so configuring glibc
6224   # with a fresh cross-compiler works.
6225   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6226   # <limits.h> exists even on freestanding compilers.
6227   # On the NeXT, cc -E runs the code through the compiler's parser,
6228   # not just through cpp. "Syntax error" is here to catch this case.
6229   cat >conftest.$ac_ext <<_ACEOF
6230 /* confdefs.h.  */
6231 _ACEOF
6232 cat confdefs.h >>conftest.$ac_ext
6233 cat >>conftest.$ac_ext <<_ACEOF
6234 /* end confdefs.h.  */
6235 #ifdef __STDC__
6236 # include <limits.h>
6237 #else
6238 # include <assert.h>
6239 #endif
6240                      Syntax error
6241 _ACEOF
6242 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6243   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6244   ac_status=$?
6245   grep -v '^ *+' conftest.er1 >conftest.err
6246   rm -f conftest.er1
6247   cat conftest.err >&5
6248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6249   (exit $ac_status); } >/dev/null; then
6250   if test -s conftest.err; then
6251     ac_cpp_err=$ac_c_preproc_warn_flag
6252     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6253   else
6254     ac_cpp_err=
6255   fi
6256 else
6257   ac_cpp_err=yes
6258 fi
6259 if test -z "$ac_cpp_err"; then
6260   :
6261 else
6262   echo "$as_me: failed program was:" >&5
6263 sed 's/^/| /' conftest.$ac_ext >&5
6264
6265   # Broken: fails on valid input.
6266 continue
6267 fi
6268 rm -f conftest.err conftest.$ac_ext
6269
6270   # OK, works on sane cases.  Now check whether non-existent headers
6271   # can be detected and how.
6272   cat >conftest.$ac_ext <<_ACEOF
6273 /* confdefs.h.  */
6274 _ACEOF
6275 cat confdefs.h >>conftest.$ac_ext
6276 cat >>conftest.$ac_ext <<_ACEOF
6277 /* end confdefs.h.  */
6278 #include <ac_nonexistent.h>
6279 _ACEOF
6280 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6281   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6282   ac_status=$?
6283   grep -v '^ *+' conftest.er1 >conftest.err
6284   rm -f conftest.er1
6285   cat conftest.err >&5
6286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6287   (exit $ac_status); } >/dev/null; then
6288   if test -s conftest.err; then
6289     ac_cpp_err=$ac_c_preproc_warn_flag
6290     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6291   else
6292     ac_cpp_err=
6293   fi
6294 else
6295   ac_cpp_err=yes
6296 fi
6297 if test -z "$ac_cpp_err"; then
6298   # Broken: success on invalid input.
6299 continue
6300 else
6301   echo "$as_me: failed program was:" >&5
6302 sed 's/^/| /' conftest.$ac_ext >&5
6303
6304   # Passes both tests.
6305 ac_preproc_ok=:
6306 break
6307 fi
6308 rm -f conftest.err conftest.$ac_ext
6309
6310 done
6311 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6312 rm -f conftest.err conftest.$ac_ext
6313 if $ac_preproc_ok; then
6314   :
6315 else
6316   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
6317 See \`config.log' for more details." >&5
6318 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
6319 See \`config.log' for more details." >&2;}
6320    { (exit 1); exit 1; }; }
6321 fi
6322
6323 ac_ext=c
6324 ac_cpp='$CPP $CPPFLAGS'
6325 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6326 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6327 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6328
6329
6330 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6331 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6332 if test "${ac_cv_header_stdc+set}" = set; then
6333   echo $ECHO_N "(cached) $ECHO_C" >&6
6334 else
6335   cat >conftest.$ac_ext <<_ACEOF
6336 /* confdefs.h.  */
6337 _ACEOF
6338 cat confdefs.h >>conftest.$ac_ext
6339 cat >>conftest.$ac_ext <<_ACEOF
6340 /* end confdefs.h.  */
6341 #include <stdlib.h>
6342 #include <stdarg.h>
6343 #include <string.h>
6344 #include <float.h>
6345
6346 int
6347 main ()
6348 {
6349
6350   ;
6351   return 0;
6352 }
6353 _ACEOF
6354 rm -f conftest.$ac_objext
6355 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6356   (eval $ac_compile) 2>conftest.er1
6357   ac_status=$?
6358   grep -v '^ *+' conftest.er1 >conftest.err
6359   rm -f conftest.er1
6360   cat conftest.err >&5
6361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6362   (exit $ac_status); } &&
6363          { ac_try='test -z "$ac_c_werror_flag"
6364                          || test ! -s conftest.err'
6365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6366   (eval $ac_try) 2>&5
6367   ac_status=$?
6368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6369   (exit $ac_status); }; } &&
6370          { ac_try='test -s conftest.$ac_objext'
6371   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6372   (eval $ac_try) 2>&5
6373   ac_status=$?
6374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6375   (exit $ac_status); }; }; then
6376   ac_cv_header_stdc=yes
6377 else
6378   echo "$as_me: failed program was:" >&5
6379 sed 's/^/| /' conftest.$ac_ext >&5
6380
6381 ac_cv_header_stdc=no
6382 fi
6383 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6384
6385 if test $ac_cv_header_stdc = yes; then
6386   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6387   cat >conftest.$ac_ext <<_ACEOF
6388 /* confdefs.h.  */
6389 _ACEOF
6390 cat confdefs.h >>conftest.$ac_ext
6391 cat >>conftest.$ac_ext <<_ACEOF
6392 /* end confdefs.h.  */
6393 #include <string.h>
6394
6395 _ACEOF
6396 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6397   $EGREP "memchr" >/dev/null 2>&1; then
6398   :
6399 else
6400   ac_cv_header_stdc=no
6401 fi
6402 rm -f conftest*
6403
6404 fi
6405
6406 if test $ac_cv_header_stdc = yes; then
6407   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6408   cat >conftest.$ac_ext <<_ACEOF
6409 /* confdefs.h.  */
6410 _ACEOF
6411 cat confdefs.h >>conftest.$ac_ext
6412 cat >>conftest.$ac_ext <<_ACEOF
6413 /* end confdefs.h.  */
6414 #include <stdlib.h>
6415
6416 _ACEOF
6417 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6418   $EGREP "free" >/dev/null 2>&1; then
6419   :
6420 else
6421   ac_cv_header_stdc=no
6422 fi
6423 rm -f conftest*
6424
6425 fi
6426
6427 if test $ac_cv_header_stdc = yes; then
6428   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6429   if test "$cross_compiling" = yes; then
6430   :
6431 else
6432   cat >conftest.$ac_ext <<_ACEOF
6433 /* confdefs.h.  */
6434 _ACEOF
6435 cat confdefs.h >>conftest.$ac_ext
6436 cat >>conftest.$ac_ext <<_ACEOF
6437 /* end confdefs.h.  */
6438 #include <ctype.h>
6439 #if ((' ' & 0x0FF) == 0x020)
6440 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6441 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6442 #else
6443 # define ISLOWER(c) \
6444                    (('a' <= (c) && (c) <= 'i') \
6445                      || ('j' <= (c) && (c) <= 'r') \
6446                      || ('s' <= (c) && (c) <= 'z'))
6447 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6448 #endif
6449
6450 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6451 int
6452 main ()
6453 {
6454   int i;
6455   for (i = 0; i < 256; i++)
6456     if (XOR (islower (i), ISLOWER (i))
6457         || toupper (i) != TOUPPER (i))
6458       exit(2);
6459   exit (0);
6460 }
6461 _ACEOF
6462 rm -f conftest$ac_exeext
6463 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6464   (eval $ac_link) 2>&5
6465   ac_status=$?
6466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6467   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6468   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6469   (eval $ac_try) 2>&5
6470   ac_status=$?
6471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6472   (exit $ac_status); }; }; then
6473   :
6474 else
6475   echo "$as_me: program exited with status $ac_status" >&5
6476 echo "$as_me: failed program was:" >&5
6477 sed 's/^/| /' conftest.$ac_ext >&5
6478
6479 ( exit $ac_status )
6480 ac_cv_header_stdc=no
6481 fi
6482 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6483 fi
6484 fi
6485 fi
6486 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6487 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6488 if test $ac_cv_header_stdc = yes; then
6489
6490 cat >>confdefs.h <<\_ACEOF
6491 #define STDC_HEADERS 1
6492 _ACEOF
6493
6494 fi
6495
6496 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6507                   inttypes.h stdint.h unistd.h
6508 do
6509 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6510 echo "$as_me:$LINENO: checking for $ac_header" >&5
6511 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6512 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6513   echo $ECHO_N "(cached) $ECHO_C" >&6
6514 else
6515   cat >conftest.$ac_ext <<_ACEOF
6516 /* confdefs.h.  */
6517 _ACEOF
6518 cat confdefs.h >>conftest.$ac_ext
6519 cat >>conftest.$ac_ext <<_ACEOF
6520 /* end confdefs.h.  */
6521 $ac_includes_default
6522
6523 #include <$ac_header>
6524 _ACEOF
6525 rm -f conftest.$ac_objext
6526 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6527   (eval $ac_compile) 2>conftest.er1
6528   ac_status=$?
6529   grep -v '^ *+' conftest.er1 >conftest.err
6530   rm -f conftest.er1
6531   cat conftest.err >&5
6532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6533   (exit $ac_status); } &&
6534          { ac_try='test -z "$ac_c_werror_flag"
6535                          || test ! -s conftest.err'
6536   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6537   (eval $ac_try) 2>&5
6538   ac_status=$?
6539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6540   (exit $ac_status); }; } &&
6541          { ac_try='test -s conftest.$ac_objext'
6542   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6543   (eval $ac_try) 2>&5
6544   ac_status=$?
6545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6546   (exit $ac_status); }; }; then
6547   eval "$as_ac_Header=yes"
6548 else
6549   echo "$as_me: failed program was:" >&5
6550 sed 's/^/| /' conftest.$ac_ext >&5
6551
6552 eval "$as_ac_Header=no"
6553 fi
6554 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6555 fi
6556 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6557 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6558 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6559   cat >>confdefs.h <<_ACEOF
6560 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6561 _ACEOF
6562
6563 fi
6564
6565 done
6566
6567
6568
6569 for ac_header in dlfcn.h
6570 do
6571 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6572 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6573   echo "$as_me:$LINENO: checking for $ac_header" >&5
6574 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6575 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6576   echo $ECHO_N "(cached) $ECHO_C" >&6
6577 fi
6578 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6579 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6580 else
6581   # Is the header compilable?
6582 echo "$as_me:$LINENO: checking $ac_header usability" >&5
6583 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6584 cat >conftest.$ac_ext <<_ACEOF
6585 /* confdefs.h.  */
6586 _ACEOF
6587 cat confdefs.h >>conftest.$ac_ext
6588 cat >>conftest.$ac_ext <<_ACEOF
6589 /* end confdefs.h.  */
6590 $ac_includes_default
6591 #include <$ac_header>
6592 _ACEOF
6593 rm -f conftest.$ac_objext
6594 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6595   (eval $ac_compile) 2>conftest.er1
6596   ac_status=$?
6597   grep -v '^ *+' conftest.er1 >conftest.err
6598   rm -f conftest.er1
6599   cat conftest.err >&5
6600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6601   (exit $ac_status); } &&
6602          { ac_try='test -z "$ac_c_werror_flag"
6603                          || test ! -s conftest.err'
6604   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6605   (eval $ac_try) 2>&5
6606   ac_status=$?
6607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6608   (exit $ac_status); }; } &&
6609          { ac_try='test -s conftest.$ac_objext'
6610   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6611   (eval $ac_try) 2>&5
6612   ac_status=$?
6613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6614   (exit $ac_status); }; }; then
6615   ac_header_compiler=yes
6616 else
6617   echo "$as_me: failed program was:" >&5
6618 sed 's/^/| /' conftest.$ac_ext >&5
6619
6620 ac_header_compiler=no
6621 fi
6622 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6623 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6624 echo "${ECHO_T}$ac_header_compiler" >&6
6625
6626 # Is the header present?
6627 echo "$as_me:$LINENO: checking $ac_header presence" >&5
6628 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6629 cat >conftest.$ac_ext <<_ACEOF
6630 /* confdefs.h.  */
6631 _ACEOF
6632 cat confdefs.h >>conftest.$ac_ext
6633 cat >>conftest.$ac_ext <<_ACEOF
6634 /* end confdefs.h.  */
6635 #include <$ac_header>
6636 _ACEOF
6637 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6638   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6639   ac_status=$?
6640   grep -v '^ *+' conftest.er1 >conftest.err
6641   rm -f conftest.er1
6642   cat conftest.err >&5
6643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6644   (exit $ac_status); } >/dev/null; then
6645   if test -s conftest.err; then
6646     ac_cpp_err=$ac_c_preproc_warn_flag
6647     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6648   else
6649     ac_cpp_err=
6650   fi
6651 else
6652   ac_cpp_err=yes
6653 fi
6654 if test -z "$ac_cpp_err"; then
6655   ac_header_preproc=yes
6656 else
6657   echo "$as_me: failed program was:" >&5
6658 sed 's/^/| /' conftest.$ac_ext >&5
6659
6660   ac_header_preproc=no
6661 fi
6662 rm -f conftest.err conftest.$ac_ext
6663 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6664 echo "${ECHO_T}$ac_header_preproc" >&6
6665
6666 # So?  What about this header?
6667 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6668   yes:no: )
6669     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6670 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6671     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6672 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6673     ac_header_preproc=yes
6674     ;;
6675   no:yes:* )
6676     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6677 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6678     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6679 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6680     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6681 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6682     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6683 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6684     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6685 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6686     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6687 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6688     (
6689       cat <<\_ASBOX
6690 ## --------------------------------------------- ##
6691 ## Report this to <http://www.openldap.org/its/> ##
6692 ## --------------------------------------------- ##
6693 _ASBOX
6694     ) |
6695       sed "s/^/$as_me: WARNING:     /" >&2
6696     ;;
6697 esac
6698 echo "$as_me:$LINENO: checking for $ac_header" >&5
6699 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6700 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6701   echo $ECHO_N "(cached) $ECHO_C" >&6
6702 else
6703   eval "$as_ac_Header=\$ac_header_preproc"
6704 fi
6705 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6706 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6707
6708 fi
6709 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6710   cat >>confdefs.h <<_ACEOF
6711 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6712 _ACEOF
6713
6714 fi
6715
6716 done
6717
6718
6719 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
6720
6721 # find the maximum length of command line arguments
6722 echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
6723 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
6724 if test "${lt_cv_sys_max_cmd_len+set}" = set; then
6725   echo $ECHO_N "(cached) $ECHO_C" >&6
6726 else
6727     i=0
6728   teststring="ABCD"
6729
6730   case $build_os in
6731   msdosdjgpp*)
6732     # On DJGPP, this test can blow up pretty badly due to problems in libc
6733     # (any single argument exceeding 2000 bytes causes a buffer overrun
6734     # during glob expansion).  Even if it were fixed, the result of this
6735     # check would be larger than it should be.
6736     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
6737     ;;
6738
6739   gnu*)
6740     # Under GNU Hurd, this test is not required because there is
6741     # no limit to the length of command line arguments.
6742     # Libtool will interpret -1 as no limit whatsoever
6743     lt_cv_sys_max_cmd_len=-1;
6744     ;;
6745
6746   cygwin* | mingw*)
6747     # On Win9x/ME, this test blows up -- it succeeds, but takes
6748     # about 5 minutes as the teststring grows exponentially.
6749     # Worse, since 9x/ME are not pre-emptively multitasking,
6750     # you end up with a "frozen" computer, even though with patience
6751     # the test eventually succeeds (with a max line length of 256k).
6752     # Instead, let's just punt: use the minimum linelength reported by
6753     # all of the supported platforms: 8192 (on NT/2K/XP).
6754     lt_cv_sys_max_cmd_len=8192;
6755     ;;
6756
6757   amigaos*)
6758     # On AmigaOS with pdksh, this test takes hours, literally.
6759     # So we just punt and use a minimum line length of 8192.
6760     lt_cv_sys_max_cmd_len=8192;
6761     ;;
6762
6763   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
6764     # This has been around since 386BSD, at least.  Likely further.
6765     if test -x /sbin/sysctl; then
6766       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
6767     elif test -x /usr/sbin/sysctl; then
6768       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
6769     else
6770       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
6771     fi
6772     # And add a safety zone
6773     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6774     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6775     ;;
6776   osf*)
6777     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
6778     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
6779     # nice to cause kernel panics so lets avoid the loop below.
6780     # First set a reasonable default.
6781     lt_cv_sys_max_cmd_len=16384
6782     #
6783     if test -x /sbin/sysconfig; then
6784       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
6785         *1*) lt_cv_sys_max_cmd_len=-1 ;;
6786       esac
6787     fi
6788     ;;
6789   *)
6790     # If test is not a shell built-in, we'll probably end up computing a
6791     # maximum length that is only half of the actual maximum length, but
6792     # we can't tell.
6793     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
6794     while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
6795                = "XX$teststring") >/dev/null 2>&1 &&
6796             new_result=`expr "X$teststring" : ".*" 2>&1` &&
6797             lt_cv_sys_max_cmd_len=$new_result &&
6798             test $i != 17 # 1/2 MB should be enough
6799     do
6800       i=`expr $i + 1`
6801       teststring=$teststring$teststring
6802     done
6803     teststring=
6804     # Add a significant safety factor because C++ compilers can tack on massive
6805     # amounts of additional arguments before passing them to the linker.
6806     # It appears as though 1/2 is a usable value.
6807     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6808     ;;
6809   esac
6810
6811 fi
6812
6813 if test -n $lt_cv_sys_max_cmd_len ; then
6814   echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
6815 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
6816 else
6817   echo "$as_me:$LINENO: result: none" >&5
6818 echo "${ECHO_T}none" >&6
6819 fi
6820
6821
6822
6823
6824 # Check for command to grab the raw symbol name followed by C symbol from nm.
6825 echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
6826 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
6827 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
6828   echo $ECHO_N "(cached) $ECHO_C" >&6
6829 else
6830
6831 # These are sane defaults that work on at least a few old systems.
6832 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
6833
6834 # Character class describing NM global symbol codes.
6835 symcode='[BCDEGRST]'
6836
6837 # Regexp to match symbols that can be accessed directly from C.
6838 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
6839
6840 # Transform an extracted symbol line into a proper C declaration
6841 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6842
6843 # Transform an extracted symbol line into symbol name and symbol address
6844 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'"
6845
6846 # Define system-specific variables.
6847 case $host_os in
6848 aix*)
6849   symcode='[BCDT]'
6850   ;;
6851 cygwin* | mingw* | pw32*)
6852   symcode='[ABCDGISTW]'
6853   ;;
6854 hpux*) # Its linker distinguishes data from code symbols
6855   if test "$host_cpu" = ia64; then
6856     symcode='[ABCDEGRST]'
6857   fi
6858   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6859   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'"
6860   ;;
6861 linux*)
6862   if test "$host_cpu" = ia64; then
6863     symcode='[ABCDGIRSTW]'
6864     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6865     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'"
6866   fi
6867   ;;
6868 irix* | nonstopux*)
6869   symcode='[BCDEGRST]'
6870   ;;
6871 osf*)
6872   symcode='[BCDEGQRST]'
6873   ;;
6874 solaris* | sysv5*)
6875   symcode='[BDRT]'
6876   ;;
6877 sysv4)
6878   symcode='[DFNSTU]'
6879   ;;
6880 esac
6881
6882 # Handle CRLF in mingw tool chain
6883 opt_cr=
6884 case $build_os in
6885 mingw*)
6886   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6887   ;;
6888 esac
6889
6890 # If we're using GNU nm, then use its standard symbol codes.
6891 case `$NM -V 2>&1` in
6892 *GNU* | *'with BFD'*)
6893   symcode='[ABCDGIRSTW]' ;;
6894 esac
6895
6896 # Try without a prefix undercore, then with it.
6897 for ac_symprfx in "" "_"; do
6898
6899   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6900   symxfrm="\\1 $ac_symprfx\\2 \\2"
6901
6902   # Write the raw and C identifiers.
6903   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[       ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6904
6905   # Check to see that the pipe works correctly.
6906   pipe_works=no
6907
6908   rm -f conftest*
6909   cat > conftest.$ac_ext <<EOF
6910 #ifdef __cplusplus
6911 extern "C" {
6912 #endif
6913 char nm_test_var;
6914 void nm_test_func(){}
6915 #ifdef __cplusplus
6916 }
6917 #endif
6918 int main(){nm_test_var='a';nm_test_func();return(0);}
6919 EOF
6920
6921   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6922   (eval $ac_compile) 2>&5
6923   ac_status=$?
6924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6925   (exit $ac_status); }; then
6926     # Now try to grab the symbols.
6927     nlist=conftest.nm
6928     if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
6929   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
6930   ac_status=$?
6931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6932   (exit $ac_status); } && test -s "$nlist"; then
6933       # Try sorting and uniquifying the output.
6934       if sort "$nlist" | uniq > "$nlist"T; then
6935         mv -f "$nlist"T "$nlist"
6936       else
6937         rm -f "$nlist"T
6938       fi
6939
6940       # Make sure that we snagged all the symbols we need.
6941       if grep ' nm_test_var$' "$nlist" >/dev/null; then
6942         if grep ' nm_test_func$' "$nlist" >/dev/null; then
6943           cat <<EOF > conftest.$ac_ext
6944 #ifdef __cplusplus
6945 extern "C" {
6946 #endif
6947
6948 EOF
6949           # Now generate the symbol file.
6950           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6951
6952           cat <<EOF >> conftest.$ac_ext
6953 #if defined (__STDC__) && __STDC__
6954 # define lt_ptr_t void *
6955 #else
6956 # define lt_ptr_t char *
6957 # define const
6958 #endif
6959
6960 /* The mapping between symbol names and symbols. */
6961 const struct {
6962   const char *name;
6963   lt_ptr_t address;
6964 }
6965 lt_preloaded_symbols[] =
6966 {
6967 EOF
6968           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
6969           cat <<\EOF >> conftest.$ac_ext
6970   {0, (lt_ptr_t) 0}
6971 };
6972
6973 #ifdef __cplusplus
6974 }
6975 #endif
6976 EOF
6977           # Now try linking the two files.
6978           mv conftest.$ac_objext conftstm.$ac_objext
6979           lt_save_LIBS="$LIBS"
6980           lt_save_CFLAGS="$CFLAGS"
6981           LIBS="conftstm.$ac_objext"
6982           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
6983           if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6984   (eval $ac_link) 2>&5
6985   ac_status=$?
6986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6987   (exit $ac_status); } && test -s conftest${ac_exeext}; then
6988             pipe_works=yes
6989           fi
6990           LIBS="$lt_save_LIBS"
6991           CFLAGS="$lt_save_CFLAGS"
6992         else
6993           echo "cannot find nm_test_func in $nlist" >&5
6994         fi
6995       else
6996         echo "cannot find nm_test_var in $nlist" >&5
6997       fi
6998     else
6999       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7000     fi
7001   else
7002     echo "$progname: failed program was:" >&5
7003     cat conftest.$ac_ext >&5
7004   fi
7005   rm -f conftest* conftst*
7006
7007   # Do not use the global_symbol_pipe unless it works.
7008   if test "$pipe_works" = yes; then
7009     break
7010   else
7011     lt_cv_sys_global_symbol_pipe=
7012   fi
7013 done
7014
7015 fi
7016
7017 if test -z "$lt_cv_sys_global_symbol_pipe"; then
7018   lt_cv_sys_global_symbol_to_cdecl=
7019 fi
7020 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7021   echo "$as_me:$LINENO: result: failed" >&5
7022 echo "${ECHO_T}failed" >&6
7023 else
7024   echo "$as_me:$LINENO: result: ok" >&5
7025 echo "${ECHO_T}ok" >&6
7026 fi
7027
7028 echo "$as_me:$LINENO: checking for objdir" >&5
7029 echo $ECHO_N "checking for objdir... $ECHO_C" >&6
7030 if test "${lt_cv_objdir+set}" = set; then
7031   echo $ECHO_N "(cached) $ECHO_C" >&6
7032 else
7033   rm -f .libs 2>/dev/null
7034 mkdir .libs 2>/dev/null
7035 if test -d .libs; then
7036   lt_cv_objdir=.libs
7037 else
7038   # MS-DOS does not allow filenames that begin with a dot.
7039   lt_cv_objdir=_libs
7040 fi
7041 rmdir .libs 2>/dev/null
7042 fi
7043 echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
7044 echo "${ECHO_T}$lt_cv_objdir" >&6
7045 objdir=$lt_cv_objdir
7046
7047
7048
7049
7050
7051 case $host_os in
7052 aix3*)
7053   # AIX sometimes has problems with the GCC collect2 program.  For some
7054   # reason, if we set the COLLECT_NAMES environment variable, the problems
7055   # vanish in a puff of smoke.
7056   if test "X${COLLECT_NAMES+set}" != Xset; then
7057     COLLECT_NAMES=
7058     export COLLECT_NAMES
7059   fi
7060   ;;
7061 esac
7062
7063 # Sed substitution that helps us do robust quoting.  It backslashifies
7064 # metacharacters that are still active within double-quoted strings.
7065 Xsed='sed -e 1s/^X//'
7066 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
7067
7068 # Same as above, but do not quote variable references.
7069 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
7070
7071 # Sed substitution to delay expansion of an escaped shell variable in a
7072 # double_quote_subst'ed string.
7073 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7074
7075 # Sed substitution to avoid accidental globbing in evaled expressions
7076 no_glob_subst='s/\*/\\\*/g'
7077
7078 # Constants:
7079 rm="rm -f"
7080
7081 # Global variables:
7082 default_ofile=libtool
7083 can_build_shared=yes
7084
7085 # All known linkers require a `.a' archive for static linking (except MSVC,
7086 # which needs '.lib').
7087 libext=a
7088 ltmain="$ac_aux_dir/ltmain.sh"
7089 ofile="$default_ofile"
7090 with_gnu_ld="$lt_cv_prog_gnu_ld"
7091
7092 if test -n "$ac_tool_prefix"; then
7093   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7094 set dummy ${ac_tool_prefix}ar; ac_word=$2
7095 echo "$as_me:$LINENO: checking for $ac_word" >&5
7096 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7097 if test "${ac_cv_prog_AR+set}" = set; then
7098   echo $ECHO_N "(cached) $ECHO_C" >&6
7099 else
7100   if test -n "$AR"; then
7101   ac_cv_prog_AR="$AR" # Let the user override the test.
7102 else
7103 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7104 for as_dir in $PATH
7105 do
7106   IFS=$as_save_IFS
7107   test -z "$as_dir" && as_dir=.
7108   for ac_exec_ext in '' $ac_executable_extensions; do
7109   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7110     ac_cv_prog_AR="${ac_tool_prefix}ar"
7111     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7112     break 2
7113   fi
7114 done
7115 done
7116
7117 fi
7118 fi
7119 AR=$ac_cv_prog_AR
7120 if test -n "$AR"; then
7121   echo "$as_me:$LINENO: result: $AR" >&5
7122 echo "${ECHO_T}$AR" >&6
7123 else
7124   echo "$as_me:$LINENO: result: no" >&5
7125 echo "${ECHO_T}no" >&6
7126 fi
7127
7128 fi
7129 if test -z "$ac_cv_prog_AR"; then
7130   ac_ct_AR=$AR
7131   # Extract the first word of "ar", so it can be a program name with args.
7132 set dummy ar; ac_word=$2
7133 echo "$as_me:$LINENO: checking for $ac_word" >&5
7134 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7135 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
7136   echo $ECHO_N "(cached) $ECHO_C" >&6
7137 else
7138   if test -n "$ac_ct_AR"; then
7139   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7140 else
7141 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7142 for as_dir in $PATH
7143 do
7144   IFS=$as_save_IFS
7145   test -z "$as_dir" && as_dir=.
7146   for ac_exec_ext in '' $ac_executable_extensions; do
7147   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7148     ac_cv_prog_ac_ct_AR="ar"
7149     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7150     break 2
7151   fi
7152 done
7153 done
7154
7155   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
7156 fi
7157 fi
7158 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7159 if test -n "$ac_ct_AR"; then
7160   echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
7161 echo "${ECHO_T}$ac_ct_AR" >&6
7162 else
7163   echo "$as_me:$LINENO: result: no" >&5
7164 echo "${ECHO_T}no" >&6
7165 fi
7166
7167   AR=$ac_ct_AR
7168 else
7169   AR="$ac_cv_prog_AR"
7170 fi
7171
7172 if test -n "$ac_tool_prefix"; then
7173   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7174 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7175 echo "$as_me:$LINENO: checking for $ac_word" >&5
7176 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7177 if test "${ac_cv_prog_RANLIB+set}" = set; then
7178   echo $ECHO_N "(cached) $ECHO_C" >&6
7179 else
7180   if test -n "$RANLIB"; then
7181   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7182 else
7183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7184 for as_dir in $PATH
7185 do
7186   IFS=$as_save_IFS
7187   test -z "$as_dir" && as_dir=.
7188   for ac_exec_ext in '' $ac_executable_extensions; do
7189   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7190     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7191     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7192     break 2
7193   fi
7194 done
7195 done
7196
7197 fi
7198 fi
7199 RANLIB=$ac_cv_prog_RANLIB
7200 if test -n "$RANLIB"; then
7201   echo "$as_me:$LINENO: result: $RANLIB" >&5
7202 echo "${ECHO_T}$RANLIB" >&6
7203 else
7204   echo "$as_me:$LINENO: result: no" >&5
7205 echo "${ECHO_T}no" >&6
7206 fi
7207
7208 fi
7209 if test -z "$ac_cv_prog_RANLIB"; then
7210   ac_ct_RANLIB=$RANLIB
7211   # Extract the first word of "ranlib", so it can be a program name with args.
7212 set dummy ranlib; ac_word=$2
7213 echo "$as_me:$LINENO: checking for $ac_word" >&5
7214 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7215 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7216   echo $ECHO_N "(cached) $ECHO_C" >&6
7217 else
7218   if test -n "$ac_ct_RANLIB"; then
7219   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7220 else
7221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7222 for as_dir in $PATH
7223 do
7224   IFS=$as_save_IFS
7225   test -z "$as_dir" && as_dir=.
7226   for ac_exec_ext in '' $ac_executable_extensions; do
7227   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7228     ac_cv_prog_ac_ct_RANLIB="ranlib"
7229     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7230     break 2
7231   fi
7232 done
7233 done
7234
7235   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7236 fi
7237 fi
7238 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7239 if test -n "$ac_ct_RANLIB"; then
7240   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7241 echo "${ECHO_T}$ac_ct_RANLIB" >&6
7242 else
7243   echo "$as_me:$LINENO: result: no" >&5
7244 echo "${ECHO_T}no" >&6
7245 fi
7246
7247   RANLIB=$ac_ct_RANLIB
7248 else
7249   RANLIB="$ac_cv_prog_RANLIB"
7250 fi
7251
7252 if test -n "$ac_tool_prefix"; then
7253   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7254 set dummy ${ac_tool_prefix}strip; ac_word=$2
7255 echo "$as_me:$LINENO: checking for $ac_word" >&5
7256 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7257 if test "${ac_cv_prog_STRIP+set}" = set; then
7258   echo $ECHO_N "(cached) $ECHO_C" >&6
7259 else
7260   if test -n "$STRIP"; then
7261   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7262 else
7263 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7264 for as_dir in $PATH
7265 do
7266   IFS=$as_save_IFS
7267   test -z "$as_dir" && as_dir=.
7268   for ac_exec_ext in '' $ac_executable_extensions; do
7269   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7270     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7271     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7272     break 2
7273   fi
7274 done
7275 done
7276
7277 fi
7278 fi
7279 STRIP=$ac_cv_prog_STRIP
7280 if test -n "$STRIP"; then
7281   echo "$as_me:$LINENO: result: $STRIP" >&5
7282 echo "${ECHO_T}$STRIP" >&6
7283 else
7284   echo "$as_me:$LINENO: result: no" >&5
7285 echo "${ECHO_T}no" >&6
7286 fi
7287
7288 fi
7289 if test -z "$ac_cv_prog_STRIP"; then
7290   ac_ct_STRIP=$STRIP
7291   # Extract the first word of "strip", so it can be a program name with args.
7292 set dummy strip; ac_word=$2
7293 echo "$as_me:$LINENO: checking for $ac_word" >&5
7294 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7295 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
7296   echo $ECHO_N "(cached) $ECHO_C" >&6
7297 else
7298   if test -n "$ac_ct_STRIP"; then
7299   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7300 else
7301 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7302 for as_dir in $PATH
7303 do
7304   IFS=$as_save_IFS
7305   test -z "$as_dir" && as_dir=.
7306   for ac_exec_ext in '' $ac_executable_extensions; do
7307   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7308     ac_cv_prog_ac_ct_STRIP="strip"
7309     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7310     break 2
7311   fi
7312 done
7313 done
7314
7315   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
7316 fi
7317 fi
7318 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7319 if test -n "$ac_ct_STRIP"; then
7320   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
7321 echo "${ECHO_T}$ac_ct_STRIP" >&6
7322 else
7323   echo "$as_me:$LINENO: result: no" >&5
7324 echo "${ECHO_T}no" >&6
7325 fi
7326
7327   STRIP=$ac_ct_STRIP
7328 else
7329   STRIP="$ac_cv_prog_STRIP"
7330 fi
7331
7332
7333 old_CC="$CC"
7334 old_CFLAGS="$CFLAGS"
7335
7336 # Set sane defaults for various variables
7337 test -z "$AR" && AR=ar
7338 test -z "$AR_FLAGS" && AR_FLAGS=cru
7339 test -z "$AS" && AS=as
7340 test -z "$CC" && CC=cc
7341 test -z "$LTCC" && LTCC=$CC
7342 test -z "$DLLTOOL" && DLLTOOL=dlltool
7343 test -z "$LD" && LD=ld
7344 test -z "$LN_S" && LN_S="ln -s"
7345 test -z "$MAGIC_CMD" && MAGIC_CMD=file
7346 test -z "$NM" && NM=nm
7347 test -z "$SED" && SED=sed
7348 test -z "$OBJDUMP" && OBJDUMP=objdump
7349 test -z "$RANLIB" && RANLIB=:
7350 test -z "$STRIP" && STRIP=:
7351 test -z "$ac_objext" && ac_objext=o
7352
7353 # Determine commands to create old-style static archives.
7354 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
7355 old_postinstall_cmds='chmod 644 $oldlib'
7356 old_postuninstall_cmds=
7357
7358 if test -n "$RANLIB"; then
7359   case $host_os in
7360   openbsd*)
7361     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
7362     ;;
7363   *)
7364     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
7365     ;;
7366   esac
7367   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
7368 fi
7369
7370 for cc_temp in $compiler""; do
7371   case $cc_temp in
7372     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
7373     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
7374     \-*) ;;
7375     *) break;;
7376   esac
7377 done
7378 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
7379
7380
7381 # Only perform the check for file, if the check method requires it
7382 case $deplibs_check_method in
7383 file_magic*)
7384   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
7385     echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
7386 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
7387 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
7388   echo $ECHO_N "(cached) $ECHO_C" >&6
7389 else
7390   case $MAGIC_CMD in
7391 [\\/*] |  ?:[\\/]*)
7392   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7393   ;;
7394 *)
7395   lt_save_MAGIC_CMD="$MAGIC_CMD"
7396   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7397   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7398   for ac_dir in $ac_dummy; do
7399     IFS="$lt_save_ifs"
7400     test -z "$ac_dir" && ac_dir=.
7401     if test -f $ac_dir/${ac_tool_prefix}file; then
7402       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
7403       if test -n "$file_magic_test_file"; then
7404         case $deplibs_check_method in
7405         "file_magic "*)
7406           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7407           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7408           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7409             $EGREP "$file_magic_regex" > /dev/null; then
7410             :
7411           else
7412             cat <<EOF 1>&2
7413
7414 *** Warning: the command libtool uses to detect shared libraries,
7415 *** $file_magic_cmd, produces output that libtool cannot recognize.
7416 *** The result is that libtool may fail to recognize shared libraries
7417 *** as such.  This will affect the creation of libtool libraries that
7418 *** depend on shared libraries, but programs linked with such libtool
7419 *** libraries will work regardless of this problem.  Nevertheless, you
7420 *** may want to report the problem to your system manager and/or to
7421 *** bug-libtool@gnu.org
7422
7423 EOF
7424           fi ;;
7425         esac
7426       fi
7427       break
7428     fi
7429   done
7430   IFS="$lt_save_ifs"
7431   MAGIC_CMD="$lt_save_MAGIC_CMD"
7432   ;;
7433 esac
7434 fi
7435
7436 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7437 if test -n "$MAGIC_CMD"; then
7438   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
7439 echo "${ECHO_T}$MAGIC_CMD" >&6
7440 else
7441   echo "$as_me:$LINENO: result: no" >&5
7442 echo "${ECHO_T}no" >&6
7443 fi
7444
7445 if test -z "$lt_cv_path_MAGIC_CMD"; then
7446   if test -n "$ac_tool_prefix"; then
7447     echo "$as_me:$LINENO: checking for file" >&5
7448 echo $ECHO_N "checking for file... $ECHO_C" >&6
7449 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
7450   echo $ECHO_N "(cached) $ECHO_C" >&6
7451 else
7452   case $MAGIC_CMD in
7453 [\\/*] |  ?:[\\/]*)
7454   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7455   ;;
7456 *)
7457   lt_save_MAGIC_CMD="$MAGIC_CMD"
7458   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7459   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7460   for ac_dir in $ac_dummy; do
7461     IFS="$lt_save_ifs"
7462     test -z "$ac_dir" && ac_dir=.
7463     if test -f $ac_dir/file; then
7464       lt_cv_path_MAGIC_CMD="$ac_dir/file"
7465       if test -n "$file_magic_test_file"; then
7466         case $deplibs_check_method in
7467         "file_magic "*)
7468           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7469           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7470           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7471             $EGREP "$file_magic_regex" > /dev/null; then
7472             :
7473           else
7474             cat <<EOF 1>&2
7475
7476 *** Warning: the command libtool uses to detect shared libraries,
7477 *** $file_magic_cmd, produces output that libtool cannot recognize.
7478 *** The result is that libtool may fail to recognize shared libraries
7479 *** as such.  This will affect the creation of libtool libraries that
7480 *** depend on shared libraries, but programs linked with such libtool
7481 *** libraries will work regardless of this problem.  Nevertheless, you
7482 *** may want to report the problem to your system manager and/or to
7483 *** bug-libtool@gnu.org
7484
7485 EOF
7486           fi ;;
7487         esac
7488       fi
7489       break
7490     fi
7491   done
7492   IFS="$lt_save_ifs"
7493   MAGIC_CMD="$lt_save_MAGIC_CMD"
7494   ;;
7495 esac
7496 fi
7497
7498 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7499 if test -n "$MAGIC_CMD"; then
7500   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
7501 echo "${ECHO_T}$MAGIC_CMD" >&6
7502 else
7503   echo "$as_me:$LINENO: result: no" >&5
7504 echo "${ECHO_T}no" >&6
7505 fi
7506
7507   else
7508     MAGIC_CMD=:
7509   fi
7510 fi
7511
7512   fi
7513   ;;
7514 esac
7515
7516 enable_dlopen=yes
7517 enable_win32_dll=yes
7518
7519 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
7520 if test "${enable_libtool_lock+set}" = set; then
7521   enableval="$enable_libtool_lock"
7522
7523 fi;
7524 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
7525
7526
7527 # Check whether --with-pic or --without-pic was given.
7528 if test "${with_pic+set}" = set; then
7529   withval="$with_pic"
7530   pic_mode="$withval"
7531 else
7532   pic_mode=default
7533 fi;
7534 test -z "$pic_mode" && pic_mode=default
7535
7536 # Use C for the default configuration in the libtool script
7537 tagname=
7538 lt_save_CC="$CC"
7539 ac_ext=c
7540 ac_cpp='$CPP $CPPFLAGS'
7541 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7542 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7543 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7544
7545
7546 # Source file extension for C test sources.
7547 ac_ext=c
7548
7549 # Object file extension for compiled C test sources.
7550 objext=o
7551 objext=$objext
7552
7553 # Code to be used in simple compile tests
7554 lt_simple_compile_test_code="int some_variable = 0;\n"
7555
7556 # Code to be used in simple link tests
7557 lt_simple_link_test_code='int main(){return(0);}\n'
7558
7559
7560 # If no C compiler was specified, use CC.
7561 LTCC=${LTCC-"$CC"}
7562
7563 # Allow CC to be a program name with arguments.
7564 compiler=$CC
7565
7566
7567 # save warnings/boilerplate of simple test code
7568 ac_outfile=conftest.$ac_objext
7569 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
7570 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
7571 _lt_compiler_boilerplate=`cat conftest.err`
7572 $rm conftest*
7573
7574 ac_outfile=conftest.$ac_objext
7575 printf "$lt_simple_link_test_code" >conftest.$ac_ext
7576 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
7577 _lt_linker_boilerplate=`cat conftest.err`
7578 $rm conftest*
7579
7580
7581 #
7582 # Check for any special shared library compilation flags.
7583 #
7584 lt_prog_cc_shlib=
7585 if test "$GCC" = no; then
7586   case $host_os in
7587   sco3.2v5*)
7588     lt_prog_cc_shlib='-belf'
7589     ;;
7590   esac
7591 fi
7592 if test -n "$lt_prog_cc_shlib"; then
7593   { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
7594 echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
7595   if echo "$old_CC $old_CFLAGS " | grep "[      ]$lt_prog_cc_shlib[     ]" >/dev/null; then :
7596   else
7597     { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
7598 echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
7599     lt_cv_prog_cc_can_build_shared=no
7600   fi
7601 fi
7602
7603
7604 #
7605 # Check to make sure the static flag actually works.
7606 #
7607 echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5
7608 echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6
7609 if test "${lt_prog_compiler_static_works+set}" = set; then
7610   echo $ECHO_N "(cached) $ECHO_C" >&6
7611 else
7612   lt_prog_compiler_static_works=no
7613    save_LDFLAGS="$LDFLAGS"
7614    LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
7615    printf "$lt_simple_link_test_code" > conftest.$ac_ext
7616    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
7617      # The linker can only warn and ignore the option if not recognized
7618      # So say no if there are warnings
7619      if test -s conftest.err; then
7620        # Append any errors to the config.log.
7621        cat conftest.err 1>&5
7622        $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
7623        $SED '/^$/d' conftest.err >conftest.er2
7624        if diff conftest.exp conftest.er2 >/dev/null; then
7625          lt_prog_compiler_static_works=yes
7626        fi
7627      else
7628        lt_prog_compiler_static_works=yes
7629      fi
7630    fi
7631    $rm conftest*
7632    LDFLAGS="$save_LDFLAGS"
7633
7634 fi
7635 echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
7636 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
7637
7638 if test x"$lt_prog_compiler_static_works" = xyes; then
7639     :
7640 else
7641     lt_prog_compiler_static=
7642 fi
7643
7644
7645
7646
7647 lt_prog_compiler_no_builtin_flag=
7648
7649 if test "$GCC" = yes; then
7650   lt_prog_compiler_no_builtin_flag=' -fno-builtin'
7651
7652
7653 echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
7654 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
7655 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
7656   echo $ECHO_N "(cached) $ECHO_C" >&6
7657 else
7658   lt_cv_prog_compiler_rtti_exceptions=no
7659   ac_outfile=conftest.$ac_objext
7660    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7661    lt_compiler_flag="-fno-rtti -fno-exceptions"
7662    # Insert the option either (1) after the last *FLAGS variable, or
7663    # (2) before a word containing "conftest.", or (3) at the end.
7664    # Note that $ac_compile itself does not contain backslashes and begins
7665    # with a dollar sign (not a hyphen), so the echo should work correctly.
7666    # The option is referenced via a variable to avoid confusing sed.
7667    lt_compile=`echo "$ac_compile" | $SED \
7668    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7669    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7670    -e 's:$: $lt_compiler_flag:'`
7671    (eval echo "\"\$as_me:7671: $lt_compile\"" >&5)
7672    (eval "$lt_compile" 2>conftest.err)
7673    ac_status=$?
7674    cat conftest.err >&5
7675    echo "$as_me:7675: \$? = $ac_status" >&5
7676    if (exit $ac_status) && test -s "$ac_outfile"; then
7677      # The compiler can only warn and ignore the option if not recognized
7678      # So say no if there are warnings other than the usual output.
7679      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
7680      $SED '/^$/d' conftest.err >conftest.er2
7681      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
7682        lt_cv_prog_compiler_rtti_exceptions=yes
7683      fi
7684    fi
7685    $rm conftest*
7686
7687 fi
7688 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
7689 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
7690
7691 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
7692     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
7693 else
7694     :
7695 fi
7696
7697 fi
7698
7699 lt_prog_compiler_wl=
7700 lt_prog_compiler_pic=
7701 lt_prog_compiler_static=
7702
7703 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
7704 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
7705
7706   if test "$GCC" = yes; then
7707     lt_prog_compiler_wl='-Wl,'
7708     lt_prog_compiler_static='-static'
7709
7710     case $host_os in
7711       aix*)
7712       # All AIX code is PIC.
7713       if test "$host_cpu" = ia64; then
7714         # AIX 5 now supports IA64 processor
7715         lt_prog_compiler_static='-Bstatic'
7716       fi
7717       ;;
7718
7719     amigaos*)
7720       # FIXME: we need at least 68020 code to build shared libraries, but
7721       # adding the `-m68020' flag to GCC prevents building anything better,
7722       # like `-m68040'.
7723       lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
7724       ;;
7725
7726     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7727       # PIC is the default for these OSes.
7728       ;;
7729
7730     mingw* | pw32* | os2*)
7731       # This hack is so that the source file can tell whether it is being
7732       # built for inclusion in a dll (and should export symbols for example).
7733       lt_prog_compiler_pic='-DDLL_EXPORT'
7734       ;;
7735
7736     darwin* | rhapsody*)
7737       # PIC is the default on this platform
7738       # Common symbols not allowed in MH_DYLIB files
7739       lt_prog_compiler_pic='-fno-common'
7740       ;;
7741
7742     msdosdjgpp*)
7743       # Just because we use GCC doesn't mean we suddenly get shared libraries
7744       # on systems that don't support them.
7745       lt_prog_compiler_can_build_shared=no
7746       enable_shared=no
7747       ;;
7748
7749     sysv4*MP*)
7750       if test -d /usr/nec; then
7751         lt_prog_compiler_pic=-Kconform_pic
7752       fi
7753       ;;
7754
7755     hpux*)
7756       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7757       # not for PA HP-UX.
7758       case $host_cpu in
7759       hppa*64*|ia64*)
7760         # +Z the default
7761         ;;
7762       *)
7763         lt_prog_compiler_pic='-fPIC'
7764         ;;
7765       esac
7766       ;;
7767
7768     *)
7769       lt_prog_compiler_pic='-fPIC'
7770       ;;
7771     esac
7772   else
7773     # PORTME Check for flag to pass linker flags through the system compiler.
7774     case $host_os in
7775     aix*)
7776       lt_prog_compiler_wl='-Wl,'
7777       if test "$host_cpu" = ia64; then
7778         # AIX 5 now supports IA64 processor
7779         lt_prog_compiler_static='-Bstatic'
7780       else
7781         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
7782       fi
7783       ;;
7784       darwin*)
7785         # PIC is the default on this platform
7786         # Common symbols not allowed in MH_DYLIB files
7787        case $cc_basename in
7788          xlc*)
7789          lt_prog_compiler_pic='-qnocommon'
7790          lt_prog_compiler_wl='-Wl,'
7791          ;;
7792        esac
7793        ;;
7794
7795     mingw* | pw32* | os2*)
7796       # This hack is so that the source file can tell whether it is being
7797       # built for inclusion in a dll (and should export symbols for example).
7798       lt_prog_compiler_pic='-DDLL_EXPORT'
7799       ;;
7800
7801     hpux9* | hpux10* | hpux11*)
7802       lt_prog_compiler_wl='-Wl,'
7803       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7804       # not for PA HP-UX.
7805       case $host_cpu in
7806       hppa*64*|ia64*)
7807         # +Z the default
7808         ;;
7809       *)
7810         lt_prog_compiler_pic='+Z'
7811         ;;
7812       esac
7813       # Is there a better lt_prog_compiler_static that works with the bundled CC?
7814       lt_prog_compiler_static='${wl}-a ${wl}archive'
7815       ;;
7816
7817     irix5* | irix6* | nonstopux*)
7818       lt_prog_compiler_wl='-Wl,'
7819       # PIC (with -KPIC) is the default.
7820       lt_prog_compiler_static='-non_shared'
7821       ;;
7822
7823     newsos6)
7824       lt_prog_compiler_pic='-KPIC'
7825       lt_prog_compiler_static='-Bstatic'
7826       ;;
7827
7828     linux*)
7829       case $cc_basename in
7830       icc* | ecc*)
7831         lt_prog_compiler_wl='-Wl,'
7832         lt_prog_compiler_pic='-KPIC'
7833         lt_prog_compiler_static='-static'
7834         ;;
7835       pgcc* | pgf77* | pgf90* | pgf95*)
7836         # Portland Group compilers (*not* the Pentium gcc compiler,
7837         # which looks to be a dead project)
7838         lt_prog_compiler_wl='-Wl,'
7839         lt_prog_compiler_pic='-fpic'
7840         lt_prog_compiler_static='-Bstatic'
7841         ;;
7842       ccc*)
7843         lt_prog_compiler_wl='-Wl,'
7844         # All Alpha code is PIC.
7845         lt_prog_compiler_static='-non_shared'
7846         ;;
7847       esac
7848       ;;
7849
7850     osf3* | osf4* | osf5*)
7851       lt_prog_compiler_wl='-Wl,'
7852       # All OSF/1 code is PIC.
7853       lt_prog_compiler_static='-non_shared'
7854       ;;
7855
7856     sco3.2v5*)
7857       lt_prog_compiler_pic='-Kpic'
7858       lt_prog_compiler_static='-dn'
7859       ;;
7860
7861     solaris*)
7862       lt_prog_compiler_pic='-KPIC'
7863       lt_prog_compiler_static='-Bstatic'
7864       case $cc_basename in
7865       f77* | f90* | f95*)
7866         lt_prog_compiler_wl='-Qoption ld ';;
7867       *)
7868         lt_prog_compiler_wl='-Wl,';;
7869       esac
7870       ;;
7871
7872     sunos4*)
7873       lt_prog_compiler_wl='-Qoption ld '
7874       lt_prog_compiler_pic='-PIC'
7875       lt_prog_compiler_static='-Bstatic'
7876       ;;
7877
7878     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7879       lt_prog_compiler_wl='-Wl,'
7880       lt_prog_compiler_pic='-KPIC'
7881       lt_prog_compiler_static='-Bstatic'
7882       ;;
7883
7884     sysv4*MP*)
7885       if test -d /usr/nec ;then
7886         lt_prog_compiler_pic='-Kconform_pic'
7887         lt_prog_compiler_static='-Bstatic'
7888       fi
7889       ;;
7890
7891     unicos*)
7892       lt_prog_compiler_wl='-Wl,'
7893       lt_prog_compiler_can_build_shared=no
7894       ;;
7895
7896     uts4*)
7897       lt_prog_compiler_pic='-pic'
7898       lt_prog_compiler_static='-Bstatic'
7899       ;;
7900
7901     *)
7902       lt_prog_compiler_can_build_shared=no
7903       ;;
7904     esac
7905   fi
7906
7907 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
7908 echo "${ECHO_T}$lt_prog_compiler_pic" >&6
7909
7910 #
7911 # Check to make sure the PIC flag actually works.
7912 #
7913 if test -n "$lt_prog_compiler_pic"; then
7914
7915 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
7916 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
7917 if test "${lt_prog_compiler_pic_works+set}" = set; then
7918   echo $ECHO_N "(cached) $ECHO_C" >&6
7919 else
7920   lt_prog_compiler_pic_works=no
7921   ac_outfile=conftest.$ac_objext
7922    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7923    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
7924    # Insert the option either (1) after the last *FLAGS variable, or
7925    # (2) before a word containing "conftest.", or (3) at the end.
7926    # Note that $ac_compile itself does not contain backslashes and begins
7927    # with a dollar sign (not a hyphen), so the echo should work correctly.
7928    # The option is referenced via a variable to avoid confusing sed.
7929    lt_compile=`echo "$ac_compile" | $SED \
7930    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7931    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7932    -e 's:$: $lt_compiler_flag:'`
7933    (eval echo "\"\$as_me:7933: $lt_compile\"" >&5)
7934    (eval "$lt_compile" 2>conftest.err)
7935    ac_status=$?
7936    cat conftest.err >&5
7937    echo "$as_me:7937: \$? = $ac_status" >&5
7938    if (exit $ac_status) && test -s "$ac_outfile"; then
7939      # The compiler can only warn and ignore the option if not recognized
7940      # So say no if there are warnings other than the usual output.
7941      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
7942      $SED '/^$/d' conftest.err >conftest.er2
7943      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
7944        lt_prog_compiler_pic_works=yes
7945      fi
7946    fi
7947    $rm conftest*
7948
7949 fi
7950 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
7951 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
7952
7953 if test x"$lt_prog_compiler_pic_works" = xyes; then
7954     case $lt_prog_compiler_pic in
7955      "" | " "*) ;;
7956      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
7957      esac
7958 else
7959     lt_prog_compiler_pic=
7960      lt_prog_compiler_can_build_shared=no
7961 fi
7962
7963 fi
7964 case $host_os in
7965   # For platforms which do not support PIC, -DPIC is meaningless:
7966   *djgpp*)
7967     lt_prog_compiler_pic=
7968     ;;
7969   *)
7970     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
7971     ;;
7972 esac
7973
7974 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
7975 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
7976 if test "${lt_cv_prog_compiler_c_o+set}" = set; then
7977   echo $ECHO_N "(cached) $ECHO_C" >&6
7978 else
7979   lt_cv_prog_compiler_c_o=no
7980    $rm -r conftest 2>/dev/null
7981    mkdir conftest
7982    cd conftest
7983    mkdir out
7984    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7985
7986    lt_compiler_flag="-o out/conftest2.$ac_objext"
7987    # Insert the option either (1) after the last *FLAGS variable, or
7988    # (2) before a word containing "conftest.", or (3) at the end.
7989    # Note that $ac_compile itself does not contain backslashes and begins
7990    # with a dollar sign (not a hyphen), so the echo should work correctly.
7991    lt_compile=`echo "$ac_compile" | $SED \
7992    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7993    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7994    -e 's:$: $lt_compiler_flag:'`
7995    (eval echo "\"\$as_me:7995: $lt_compile\"" >&5)
7996    (eval "$lt_compile" 2>out/conftest.err)
7997    ac_status=$?
7998    cat out/conftest.err >&5
7999    echo "$as_me:7999: \$? = $ac_status" >&5
8000    if (exit $ac_status) && test -s out/conftest2.$ac_objext
8001    then
8002      # The compiler can only warn and ignore the option if not recognized
8003      # So say no if there are warnings
8004      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
8005      $SED '/^$/d' out/conftest.err >out/conftest.er2
8006      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8007        lt_cv_prog_compiler_c_o=yes
8008      fi
8009    fi
8010    chmod u+w . 2>&5
8011    $rm conftest*
8012    # SGI C++ compiler will create directory out/ii_files/ for
8013    # template instantiation
8014    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
8015    $rm out/* && rmdir out
8016    cd ..
8017    rmdir conftest
8018    $rm conftest*
8019
8020 fi
8021 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
8022 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
8023
8024
8025 hard_links="nottested"
8026 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
8027   # do not overwrite the value of need_locks provided by the user
8028   echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
8029 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
8030   hard_links=yes
8031   $rm conftest*
8032   ln conftest.a conftest.b 2>/dev/null && hard_links=no
8033   touch conftest.a
8034   ln conftest.a conftest.b 2>&5 || hard_links=no
8035   ln conftest.a conftest.b 2>/dev/null && hard_links=no
8036   echo "$as_me:$LINENO: result: $hard_links" >&5
8037 echo "${ECHO_T}$hard_links" >&6
8038   if test "$hard_links" = no; then
8039     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
8040 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
8041     need_locks=warn
8042   fi
8043 else
8044   need_locks=no
8045 fi
8046
8047 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
8048 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
8049
8050   runpath_var=
8051   allow_undefined_flag=
8052   enable_shared_with_static_runtimes=no
8053   archive_cmds=
8054   archive_expsym_cmds=
8055   old_archive_From_new_cmds=
8056   old_archive_from_expsyms_cmds=
8057   export_dynamic_flag_spec=
8058   whole_archive_flag_spec=
8059   thread_safe_flag_spec=
8060   hardcode_libdir_flag_spec=
8061   hardcode_libdir_flag_spec_ld=
8062   hardcode_libdir_separator=
8063   hardcode_direct=no
8064   hardcode_minus_L=no
8065   hardcode_shlibpath_var=unsupported
8066   link_all_deplibs=unknown
8067   hardcode_automatic=no
8068   module_cmds=
8069   module_expsym_cmds=
8070   always_export_symbols=no
8071   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8072   # include_expsyms should be a list of space-separated symbols to be *always*
8073   # included in the symbol list
8074   include_expsyms=
8075   # exclude_expsyms can be an extended regexp of symbols to exclude
8076   # it will be wrapped by ` (' and `)$', so one must not match beginning or
8077   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
8078   # as well as any symbol that contains `d'.
8079   exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
8080   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8081   # platforms (ab)use it in PIC code, but their linkers get confused if
8082   # the symbol is explicitly referenced.  Since portable code cannot
8083   # rely on this symbol name, it's probably fine to never include it in
8084   # preloaded symbol tables.
8085   extract_expsyms_cmds=
8086   # Just being paranoid about ensuring that cc_basename is set.
8087   for cc_temp in $compiler""; do
8088   case $cc_temp in
8089     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8090     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8091     \-*) ;;
8092     *) break;;
8093   esac
8094 done
8095 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8096
8097   case $host_os in
8098   cygwin* | mingw* | pw32*)
8099     # FIXME: the MSVC++ port hasn't been tested in a loooong time
8100     # When not using gcc, we currently assume that we are using
8101     # Microsoft Visual C++.
8102     if test "$GCC" != yes; then
8103       with_gnu_ld=no
8104     fi
8105     ;;
8106   openbsd*)
8107     with_gnu_ld=no
8108     ;;
8109   esac
8110
8111   ld_shlibs=yes
8112   if test "$with_gnu_ld" = yes; then
8113     # If archive_cmds runs LD, not CC, wlarc should be empty
8114     wlarc='${wl}'
8115
8116     # Set some defaults for GNU ld with shared library support. These
8117     # are reset later if shared libraries are not supported. Putting them
8118     # here allows them to be overridden if necessary.
8119     runpath_var=LD_RUN_PATH
8120     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
8121     export_dynamic_flag_spec='${wl}--export-dynamic'
8122     # ancient GNU ld didn't support --whole-archive et. al.
8123     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
8124         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8125       else
8126         whole_archive_flag_spec=
8127     fi
8128     supports_anon_versioning=no
8129     case `$LD -v 2>/dev/null` in
8130       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
8131       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8132       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8133       *\ 2.11.*) ;; # other 2.11 versions
8134       *) supports_anon_versioning=yes ;;
8135     esac
8136
8137     # See if GNU ld supports shared libraries.
8138     case $host_os in
8139     aix3* | aix4* | aix5*)
8140       # On AIX/PPC, the GNU linker is very broken
8141       if test "$host_cpu" != ia64; then
8142         ld_shlibs=no
8143         cat <<EOF 1>&2
8144
8145 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
8146 *** to be unable to reliably create shared libraries on AIX.
8147 *** Therefore, libtool is disabling shared libraries support.  If you
8148 *** really care for shared libraries, you may want to modify your PATH
8149 *** so that a non-GNU linker is found, and then restart.
8150
8151 EOF
8152       fi
8153       ;;
8154
8155     amigaos*)
8156       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)'
8157       hardcode_libdir_flag_spec='-L$libdir'
8158       hardcode_minus_L=yes
8159
8160       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
8161       # that the semantics of dynamic libraries on AmigaOS, at least up
8162       # to version 4, is to share data among multiple programs linked
8163       # with the same dynamic library.  Since this doesn't match the
8164       # behavior of shared libraries on other platforms, we can't use
8165       # them.
8166       ld_shlibs=no
8167       ;;
8168
8169     beos*)
8170       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8171         allow_undefined_flag=unsupported
8172         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8173         # support --undefined.  This deserves some investigation.  FIXME
8174         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8175       else
8176         ld_shlibs=no
8177       fi
8178       ;;
8179
8180     cygwin* | mingw* | pw32*)
8181       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
8182       # as there is no search path for DLLs.
8183       hardcode_libdir_flag_spec='-L$libdir'
8184       allow_undefined_flag=unsupported
8185       always_export_symbols=no
8186       enable_shared_with_static_runtimes=yes
8187       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
8188
8189       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8190         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8191         # If the export-symbols file already is a .def file (1st line
8192         # is EXPORTS), use it as is; otherwise, prepend...
8193         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8194           cp $export_symbols $output_objdir/$soname.def;
8195         else
8196           echo EXPORTS > $output_objdir/$soname.def;
8197           cat $export_symbols >> $output_objdir/$soname.def;
8198         fi~
8199         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
8200       else
8201         ld_shlibs=no
8202       fi
8203       ;;
8204
8205     linux*)
8206       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8207         tmp_addflag=
8208         case $cc_basename,$host_cpu in
8209         pgcc*)                          # Portland Group C compiler
8210           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'
8211           tmp_addflag=' $pic_flag'
8212           ;;
8213         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
8214           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'
8215           tmp_addflag=' $pic_flag -Mnomain' ;;
8216         ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
8217           tmp_addflag=' -i_dynamic' ;;
8218         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
8219           tmp_addflag=' -i_dynamic -nofor_main' ;;
8220         ifc* | ifort*)                  # Intel Fortran compiler
8221           tmp_addflag=' -nofor_main' ;;
8222         esac
8223         archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8224
8225         if test $supports_anon_versioning = yes; then
8226           archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
8227   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8228   $echo "local: *; };" >> $output_objdir/$libname.ver~
8229           $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8230         fi
8231       else
8232         ld_shlibs=no
8233       fi
8234       ;;
8235
8236     netbsd*)
8237       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8238         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
8239         wlarc=
8240       else
8241         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8242         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8243       fi
8244       ;;
8245
8246     solaris* | sysv5*)
8247       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
8248         ld_shlibs=no
8249         cat <<EOF 1>&2
8250
8251 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
8252 *** create shared libraries on Solaris systems.  Therefore, libtool
8253 *** is disabling shared libraries support.  We urge you to upgrade GNU
8254 *** binutils to release 2.9.1 or newer.  Another option is to modify
8255 *** your PATH or compiler configuration so that the native linker is
8256 *** used, and then restart.
8257
8258 EOF
8259       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8260         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8261         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8262       else
8263         ld_shlibs=no
8264       fi
8265       ;;
8266
8267     sunos4*)
8268       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8269       wlarc=
8270       hardcode_direct=yes
8271       hardcode_shlibpath_var=no
8272       ;;
8273
8274     *)
8275       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8276         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8277         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8278       else
8279         ld_shlibs=no
8280       fi
8281       ;;
8282     esac
8283
8284     if test "$ld_shlibs" = no; then
8285       runpath_var=
8286       hardcode_libdir_flag_spec=
8287       export_dynamic_flag_spec=
8288       whole_archive_flag_spec=
8289     fi
8290   else
8291     # PORTME fill in a description of your system's linker (not GNU ld)
8292     case $host_os in
8293     aix3*)
8294       allow_undefined_flag=unsupported
8295       always_export_symbols=yes
8296       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'
8297       # Note: this linker hardcodes the directories in LIBPATH if there
8298       # are no directories specified by -L.
8299       hardcode_minus_L=yes
8300       if test "$GCC" = yes && test -z "$link_static_flag"; then
8301         # Neither direct hardcoding nor static linking is supported with a
8302         # broken collect2.
8303         hardcode_direct=unsupported
8304       fi
8305       ;;
8306
8307     aix4* | aix5*)
8308       if test "$host_cpu" = ia64; then
8309         # On IA64, the linker does run time linking by default, so we don't
8310         # have to do anything special.
8311         aix_use_runtimelinking=no
8312         exp_sym_flag='-Bexport'
8313         no_entry_flag=""
8314       else
8315         # If we're using GNU nm, then we don't want the "-C" option.
8316         # -C means demangle to AIX nm, but means don't demangle with GNU nm
8317         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
8318           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'
8319         else
8320           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'
8321         fi
8322         aix_use_runtimelinking=no
8323
8324         # Test if we are trying to use run time linking or normal
8325         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8326         # need to do runtime linking.
8327         case $host_os in aix4.[23]|aix4.[23].*|aix5*)
8328           for ld_flag in $LDFLAGS; do
8329           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
8330             aix_use_runtimelinking=yes
8331             break
8332           fi
8333           done
8334         esac
8335
8336         exp_sym_flag='-bexport'
8337         no_entry_flag='-bnoentry'
8338       fi
8339
8340       # When large executables or shared objects are built, AIX ld can
8341       # have problems creating the table of contents.  If linking a library
8342       # or program results in "error TOC overflow" add -mminimal-toc to
8343       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
8344       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8345
8346       archive_cmds=''
8347       hardcode_direct=yes
8348       hardcode_libdir_separator=':'
8349       link_all_deplibs=yes
8350
8351       if test "$GCC" = yes; then
8352         case $host_os in aix4.[012]|aix4.[012].*)
8353         # We only want to do this on AIX 4.2 and lower, the check
8354         # below for broken collect2 doesn't work under 4.3+
8355           collect2name=`${CC} -print-prog-name=collect2`
8356           if test -f "$collect2name" && \
8357            strings "$collect2name" | grep resolve_lib_name >/dev/null
8358           then
8359           # We have reworked collect2
8360           hardcode_direct=yes
8361           else
8362           # We have old collect2
8363           hardcode_direct=unsupported
8364           # It fails to find uninstalled libraries when the uninstalled
8365           # path is not listed in the libpath.  Setting hardcode_minus_L
8366           # to unsupported forces relinking
8367           hardcode_minus_L=yes
8368           hardcode_libdir_flag_spec='-L$libdir'
8369           hardcode_libdir_separator=
8370           fi
8371         esac
8372         shared_flag='-shared'
8373         if test "$aix_use_runtimelinking" = yes; then
8374           shared_flag="$shared_flag "'${wl}-G'
8375         fi
8376       else
8377         # not using gcc
8378         if test "$host_cpu" = ia64; then
8379         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8380         # chokes on -Wl,-G. The following line is correct:
8381           shared_flag='-G'
8382         else
8383         if test "$aix_use_runtimelinking" = yes; then
8384             shared_flag='${wl}-G'
8385           else
8386             shared_flag='${wl}-bM:SRE'
8387         fi
8388         fi
8389       fi
8390
8391       # It seems that -bexpall does not export symbols beginning with
8392       # underscore (_), so it is better to generate a list of symbols to export.
8393       always_export_symbols=yes
8394       if test "$aix_use_runtimelinking" = yes; then
8395         # Warning - without using the other runtime loading flags (-brtl),
8396         # -berok will link without error, but may produce a broken library.
8397         allow_undefined_flag='-berok'
8398        # Determine the default libpath from the value encoded in an empty executable.
8399        cat >conftest.$ac_ext <<_ACEOF
8400 /* confdefs.h.  */
8401 _ACEOF
8402 cat confdefs.h >>conftest.$ac_ext
8403 cat >>conftest.$ac_ext <<_ACEOF
8404 /* end confdefs.h.  */
8405
8406 int
8407 main ()
8408 {
8409
8410   ;
8411   return 0;
8412 }
8413 _ACEOF
8414 rm -f conftest.$ac_objext conftest$ac_exeext
8415 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8416   (eval $ac_link) 2>conftest.er1
8417   ac_status=$?
8418   grep -v '^ *+' conftest.er1 >conftest.err
8419   rm -f conftest.er1
8420   cat conftest.err >&5
8421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8422   (exit $ac_status); } &&
8423          { ac_try='test -z "$ac_c_werror_flag"
8424                          || test ! -s conftest.err'
8425   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8426   (eval $ac_try) 2>&5
8427   ac_status=$?
8428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8429   (exit $ac_status); }; } &&
8430          { ac_try='test -s conftest$ac_exeext'
8431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8432   (eval $ac_try) 2>&5
8433   ac_status=$?
8434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8435   (exit $ac_status); }; }; then
8436
8437 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
8438 }'`
8439 # Check for a 64-bit object if we didn't find anything.
8440 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; }
8441 }'`; fi
8442 else
8443   echo "$as_me: failed program was:" >&5
8444 sed 's/^/| /' conftest.$ac_ext >&5
8445
8446 fi
8447 rm -f conftest.err conftest.$ac_objext \
8448       conftest$ac_exeext conftest.$ac_ext
8449 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8450
8451        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8452         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"
8453        else
8454         if test "$host_cpu" = ia64; then
8455           hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
8456           allow_undefined_flag="-z nodefs"
8457           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"
8458         else
8459          # Determine the default libpath from the value encoded in an empty executable.
8460          cat >conftest.$ac_ext <<_ACEOF
8461 /* confdefs.h.  */
8462 _ACEOF
8463 cat confdefs.h >>conftest.$ac_ext
8464 cat >>conftest.$ac_ext <<_ACEOF
8465 /* end confdefs.h.  */
8466
8467 int
8468 main ()
8469 {
8470
8471   ;
8472   return 0;
8473 }
8474 _ACEOF
8475 rm -f conftest.$ac_objext conftest$ac_exeext
8476 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8477   (eval $ac_link) 2>conftest.er1
8478   ac_status=$?
8479   grep -v '^ *+' conftest.er1 >conftest.err
8480   rm -f conftest.er1
8481   cat conftest.err >&5
8482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8483   (exit $ac_status); } &&
8484          { ac_try='test -z "$ac_c_werror_flag"
8485                          || test ! -s conftest.err'
8486   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8487   (eval $ac_try) 2>&5
8488   ac_status=$?
8489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8490   (exit $ac_status); }; } &&
8491          { ac_try='test -s conftest$ac_exeext'
8492   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8493   (eval $ac_try) 2>&5
8494   ac_status=$?
8495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8496   (exit $ac_status); }; }; then
8497
8498 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
8499 }'`
8500 # Check for a 64-bit object if we didn't find anything.
8501 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; }
8502 }'`; fi
8503 else
8504   echo "$as_me: failed program was:" >&5
8505 sed 's/^/| /' conftest.$ac_ext >&5
8506
8507 fi
8508 rm -f conftest.err conftest.$ac_objext \
8509       conftest$ac_exeext conftest.$ac_ext
8510 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8511
8512          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8513           # Warning - without using the other run time loading flags,
8514           # -berok will link without error, but may produce a broken library.
8515           no_undefined_flag=' ${wl}-bernotok'
8516           allow_undefined_flag=' ${wl}-berok'
8517           # -bexpall does not export symbols beginning with underscore (_)
8518           always_export_symbols=yes
8519           # Exported symbols can be pulled into shared objects from archives
8520           whole_archive_flag_spec=' '
8521           archive_cmds_need_lc=yes
8522           # This is similar to how AIX traditionally builds its shared libraries.
8523           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'
8524         fi
8525       fi
8526       ;;
8527
8528     amigaos*)
8529       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)'
8530       hardcode_libdir_flag_spec='-L$libdir'
8531       hardcode_minus_L=yes
8532       # see comment about different semantics on the GNU ld section
8533       ld_shlibs=no
8534       ;;
8535
8536     bsdi[45]*)
8537       export_dynamic_flag_spec=-rdynamic
8538       ;;
8539
8540     cygwin* | mingw* | pw32*)
8541       # When not using gcc, we currently assume that we are using
8542       # Microsoft Visual C++.
8543       # hardcode_libdir_flag_spec is actually meaningless, as there is
8544       # no search path for DLLs.
8545       hardcode_libdir_flag_spec=' '
8546       allow_undefined_flag=unsupported
8547       # Tell ltmain to make .lib files, not .a files.
8548       libext=lib
8549       # Tell ltmain to make .dll files, not .so files.
8550       shrext_cmds=".dll"
8551       # FIXME: Setting linknames here is a bad hack.
8552       archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
8553       # The linker will automatically build a .lib file if we build a DLL.
8554       old_archive_From_new_cmds='true'
8555       # FIXME: Should let the user specify the lib program.
8556       old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
8557       fix_srcfile_path='`cygpath -w "$srcfile"`'
8558       enable_shared_with_static_runtimes=yes
8559       ;;
8560
8561     darwin* | rhapsody*)
8562       case $host_os in
8563         rhapsody* | darwin1.[012])
8564          allow_undefined_flag='${wl}-undefined ${wl}suppress'
8565          ;;
8566        *) # Darwin 1.3 on
8567          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8568            allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8569          else
8570            case ${MACOSX_DEPLOYMENT_TARGET} in
8571              10.[012])
8572                allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8573                ;;
8574              10.*)
8575                allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
8576                ;;
8577            esac
8578          fi
8579          ;;
8580       esac
8581       archive_cmds_need_lc=no
8582       hardcode_direct=no
8583       hardcode_automatic=yes
8584       hardcode_shlibpath_var=unsupported
8585       whole_archive_flag_spec=''
8586       link_all_deplibs=yes
8587     if test "$GCC" = yes ; then
8588         output_verbose_link_cmd='echo'
8589         archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
8590       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8591       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8592       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}'
8593       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}'
8594     else
8595       case $cc_basename in
8596         xlc*)
8597          output_verbose_link_cmd='echo'
8598          archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
8599          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8600           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8601          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}'
8602           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}'
8603           ;;
8604        *)
8605          ld_shlibs=no
8606           ;;
8607       esac
8608     fi
8609       ;;
8610
8611     dgux*)
8612       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8613       hardcode_libdir_flag_spec='-L$libdir'
8614       hardcode_shlibpath_var=no
8615       ;;
8616
8617     freebsd1*)
8618       ld_shlibs=no
8619       ;;
8620
8621     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8622     # support.  Future versions do this automatically, but an explicit c++rt0.o
8623     # does not break anything, and helps significantly (at the cost of a little
8624     # extra space).
8625     freebsd2.2*)
8626       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
8627       hardcode_libdir_flag_spec='-R$libdir'
8628       hardcode_direct=yes
8629       hardcode_shlibpath_var=no
8630       ;;
8631
8632     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8633     freebsd2*)
8634       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8635       hardcode_direct=yes
8636       hardcode_minus_L=yes
8637       hardcode_shlibpath_var=no
8638       ;;
8639
8640     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
8641     freebsd* | kfreebsd*-gnu | dragonfly*)
8642       archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
8643       hardcode_libdir_flag_spec='-R$libdir'
8644       hardcode_direct=yes
8645       hardcode_shlibpath_var=no
8646       ;;
8647
8648     hpux9*)
8649       if test "$GCC" = yes; then
8650         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'
8651       else
8652         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'
8653       fi
8654       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8655       hardcode_libdir_separator=:
8656       hardcode_direct=yes
8657
8658       # hardcode_minus_L: Not really in the search PATH,
8659       # but as the default location of the library.
8660       hardcode_minus_L=yes
8661       export_dynamic_flag_spec='${wl}-E'
8662       ;;
8663
8664     hpux10* | hpux11*)
8665       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8666         case $host_cpu in
8667         hppa*64*|ia64*)
8668           archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8669           ;;
8670         *)
8671           archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8672           ;;
8673         esac
8674       else
8675         case $host_cpu in
8676         hppa*64*|ia64*)
8677           archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
8678           ;;
8679         *)
8680           archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
8681           ;;
8682         esac
8683       fi
8684       if test "$with_gnu_ld" = no; then
8685         case $host_cpu in
8686         hppa*64*)
8687           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8688           hardcode_libdir_flag_spec_ld='+b $libdir'
8689           hardcode_libdir_separator=:
8690           hardcode_direct=no
8691           hardcode_shlibpath_var=no
8692           ;;
8693         ia64*)
8694           hardcode_libdir_flag_spec='-L$libdir'
8695           hardcode_direct=no
8696           hardcode_shlibpath_var=no
8697
8698           # hardcode_minus_L: Not really in the search PATH,
8699           # but as the default location of the library.
8700           hardcode_minus_L=yes
8701           ;;
8702         *)
8703           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8704           hardcode_libdir_separator=:
8705           hardcode_direct=yes
8706           export_dynamic_flag_spec='${wl}-E'
8707
8708           # hardcode_minus_L: Not really in the search PATH,
8709           # but as the default location of the library.
8710           hardcode_minus_L=yes
8711           ;;
8712         esac
8713       fi
8714       ;;
8715
8716     irix5* | irix6* | nonstopux*)
8717       if test "$GCC" = yes; then
8718         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'
8719       else
8720         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'
8721         hardcode_libdir_flag_spec_ld='-rpath $libdir'
8722       fi
8723       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8724       hardcode_libdir_separator=:
8725       link_all_deplibs=yes
8726       ;;
8727
8728     netbsd*)
8729       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8730         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
8731       else
8732         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
8733       fi
8734       hardcode_libdir_flag_spec='-R$libdir'
8735       hardcode_direct=yes
8736       hardcode_shlibpath_var=no
8737       ;;
8738
8739     newsos6)
8740       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8741       hardcode_direct=yes
8742       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8743       hardcode_libdir_separator=:
8744       hardcode_shlibpath_var=no
8745       ;;
8746
8747     openbsd*)
8748       hardcode_direct=yes
8749       hardcode_shlibpath_var=no
8750       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8751         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8752         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
8753         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8754         export_dynamic_flag_spec='${wl}-E'
8755       else
8756        case $host_os in
8757          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
8758            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8759            hardcode_libdir_flag_spec='-R$libdir'
8760            ;;
8761          *)
8762            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8763            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8764            ;;
8765        esac
8766       fi
8767       ;;
8768
8769     os2*)
8770       hardcode_libdir_flag_spec='-L$libdir'
8771       hardcode_minus_L=yes
8772       allow_undefined_flag=unsupported
8773       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'
8774       old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
8775       ;;
8776
8777     osf3*)
8778       if test "$GCC" = yes; then
8779         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8780         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'
8781       else
8782         allow_undefined_flag=' -expect_unresolved \*'
8783         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'
8784       fi
8785       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8786       hardcode_libdir_separator=:
8787       ;;
8788
8789     osf4* | osf5*)      # as osf3* with the addition of -msym flag
8790       if test "$GCC" = yes; then
8791         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8792         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'
8793         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8794       else
8795         allow_undefined_flag=' -expect_unresolved \*'
8796         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'
8797         archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
8798         $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'
8799
8800         # Both c and cxx compiler support -rpath directly
8801         hardcode_libdir_flag_spec='-rpath $libdir'
8802       fi
8803       hardcode_libdir_separator=:
8804       ;;
8805
8806     sco3.2v5*)
8807       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8808       hardcode_shlibpath_var=no
8809       export_dynamic_flag_spec='${wl}-Bexport'
8810       runpath_var=LD_RUN_PATH
8811       hardcode_runpath_var=yes
8812       ;;
8813
8814     solaris*)
8815       no_undefined_flag=' -z text'
8816       if test "$GCC" = yes; then
8817         wlarc='${wl}'
8818         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8819         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8820           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
8821       else
8822         wlarc=''
8823         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8824         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8825         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8826       fi
8827       hardcode_libdir_flag_spec='-R$libdir'
8828       hardcode_shlibpath_var=no
8829       case $host_os in
8830       solaris2.[0-5] | solaris2.[0-5].*) ;;
8831       *)
8832         # The compiler driver will combine linker options so we
8833         # cannot just pass the convience library names through
8834         # without $wl, iff we do not link with $LD.
8835         # Luckily, gcc supports the same syntax we need for Sun Studio.
8836         # Supported since Solaris 2.6 (maybe 2.5.1?)
8837         case $wlarc in
8838         '')
8839           whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
8840         *)
8841           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' ;;
8842         esac ;;
8843       esac
8844       link_all_deplibs=yes
8845       ;;
8846
8847     sunos4*)
8848       if test "x$host_vendor" = xsequent; then
8849         # Use $CC to link under sequent, because it throws in some extra .o
8850         # files that make .init and .fini sections work.
8851         archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
8852       else
8853         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
8854       fi
8855       hardcode_libdir_flag_spec='-L$libdir'
8856       hardcode_direct=yes
8857       hardcode_minus_L=yes
8858       hardcode_shlibpath_var=no
8859       ;;
8860
8861     sysv4)
8862       case $host_vendor in
8863         sni)
8864           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8865           hardcode_direct=yes # is this really true???
8866         ;;
8867         siemens)
8868           ## LD is ld it makes a PLAMLIB
8869           ## CC just makes a GrossModule.
8870           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8871           reload_cmds='$CC -r -o $output$reload_objs'
8872           hardcode_direct=no
8873         ;;
8874         motorola)
8875           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8876           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
8877         ;;
8878       esac
8879       runpath_var='LD_RUN_PATH'
8880       hardcode_shlibpath_var=no
8881       ;;
8882
8883     sysv4.3*)
8884       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8885       hardcode_shlibpath_var=no
8886       export_dynamic_flag_spec='-Bexport'
8887       ;;
8888
8889     sysv4*MP*)
8890       if test -d /usr/nec; then
8891         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8892         hardcode_shlibpath_var=no
8893         runpath_var=LD_RUN_PATH
8894         hardcode_runpath_var=yes
8895         ld_shlibs=yes
8896       fi
8897       ;;
8898
8899     sysv4.2uw2*)
8900       archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8901       hardcode_direct=yes
8902       hardcode_minus_L=no
8903       hardcode_shlibpath_var=no
8904       hardcode_runpath_var=yes
8905       runpath_var=LD_RUN_PATH
8906       ;;
8907
8908    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
8909       no_undefined_flag='${wl}-z ${wl}text'
8910       if test "$GCC" = yes; then
8911         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8912       else
8913         archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8914       fi
8915       runpath_var='LD_RUN_PATH'
8916       hardcode_shlibpath_var=no
8917       ;;
8918
8919     sysv5*)
8920       no_undefined_flag=' -z text'
8921       # $CC -shared without GNU ld will not create a library from C++
8922       # object files and a static libstdc++, better avoid it by now
8923       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8924       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8925                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8926       hardcode_libdir_flag_spec=
8927       hardcode_shlibpath_var=no
8928       runpath_var='LD_RUN_PATH'
8929       ;;
8930
8931     uts4*)
8932       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8933       hardcode_libdir_flag_spec='-L$libdir'
8934       hardcode_shlibpath_var=no
8935       ;;
8936
8937     *)
8938       ld_shlibs=no
8939       ;;
8940     esac
8941   fi
8942
8943 echo "$as_me:$LINENO: result: $ld_shlibs" >&5
8944 echo "${ECHO_T}$ld_shlibs" >&6
8945 test "$ld_shlibs" = no && can_build_shared=no
8946
8947 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
8948 if test "$GCC" = yes; then
8949   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
8950 fi
8951
8952 #
8953 # Do we need to explicitly link libc?
8954 #
8955 case "x$archive_cmds_need_lc" in
8956 x|xyes)
8957   # Assume -lc should be added
8958   archive_cmds_need_lc=yes
8959
8960   if test "$enable_shared" = yes && test "$GCC" = yes; then
8961     case $archive_cmds in
8962     *'~'*)
8963       # FIXME: we may have to deal with multi-command sequences.
8964       ;;
8965     '$CC '*)
8966       # Test whether the compiler implicitly links with -lc since on some
8967       # systems, -lgcc has to come before -lc. If gcc already passes -lc
8968       # to ld, don't add -lc before -lgcc.
8969       echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
8970 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
8971       $rm conftest*
8972       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8973
8974       if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8975   (eval $ac_compile) 2>&5
8976   ac_status=$?
8977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8978   (exit $ac_status); } 2>conftest.err; then
8979         soname=conftest
8980         lib=conftest
8981         libobjs=conftest.$ac_objext
8982         deplibs=
8983         wl=$lt_prog_compiler_wl
8984         compiler_flags=-v
8985         linker_flags=-v
8986         verstring=
8987         output_objdir=.
8988         libname=conftest
8989         lt_save_allow_undefined_flag=$allow_undefined_flag
8990         allow_undefined_flag=
8991         if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
8992   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
8993   ac_status=$?
8994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8995   (exit $ac_status); }
8996         then
8997           archive_cmds_need_lc=no
8998         else
8999           archive_cmds_need_lc=yes
9000         fi
9001         allow_undefined_flag=$lt_save_allow_undefined_flag
9002       else
9003         cat conftest.err 1>&5
9004       fi
9005       $rm conftest*
9006       echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
9007 echo "${ECHO_T}$archive_cmds_need_lc" >&6
9008       ;;
9009     esac
9010   fi
9011   ;;
9012 esac
9013
9014 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
9015 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
9016 library_names_spec=
9017 libname_spec='lib$name'
9018 soname_spec=
9019 shrext_cmds=".so"
9020 postinstall_cmds=
9021 postuninstall_cmds=
9022 finish_cmds=
9023 finish_eval=
9024 shlibpath_var=
9025 shlibpath_overrides_runpath=unknown
9026 version_type=none
9027 dynamic_linker="$host_os ld.so"
9028 sys_lib_dlsearch_path_spec="/lib /usr/lib"
9029 if test "$GCC" = yes; then
9030   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9031   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
9032     # if the path contains ";" then we assume it to be the separator
9033     # otherwise default to the standard path separator (i.e. ":") - it is
9034     # assumed that no part of a normal pathname contains ";" but that should
9035     # okay in the real world where ";" in dirpaths is itself problematic.
9036     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9037   else
9038     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
9039   fi
9040 else
9041   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
9042 fi
9043 need_lib_prefix=unknown
9044 hardcode_into_libs=no
9045
9046 # when you set need_version to no, make sure it does not cause -set_version
9047 # flags to be left without arguments
9048 need_version=unknown
9049
9050 case $host_os in
9051 aix3*)
9052   version_type=linux
9053   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
9054   shlibpath_var=LIBPATH
9055
9056   # AIX 3 has no versioning support, so we append a major version to the name.
9057   soname_spec='${libname}${release}${shared_ext}$major'
9058   ;;
9059
9060 aix4* | aix5*)
9061   version_type=linux
9062   need_lib_prefix=no
9063   need_version=no
9064   hardcode_into_libs=yes
9065   if test "$host_cpu" = ia64; then
9066     # AIX 5 supports IA64
9067     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
9068     shlibpath_var=LD_LIBRARY_PATH
9069   else
9070     # With GCC up to 2.95.x, collect2 would create an import file
9071     # for dependence libraries.  The import file would start with
9072     # the line `#! .'.  This would cause the generated library to
9073     # depend on `.', always an invalid library.  This was fixed in
9074     # development snapshots of GCC prior to 3.0.
9075     case $host_os in
9076       aix4 | aix4.[01] | aix4.[01].*)
9077       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
9078            echo ' yes '
9079            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
9080         :
9081       else
9082         can_build_shared=no
9083       fi
9084       ;;
9085     esac
9086     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
9087     # soname into executable. Probably we can add versioning support to
9088     # collect2, so additional links can be useful in future.
9089     if test "$aix_use_runtimelinking" = yes; then
9090       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
9091       # instead of lib<name>.a to let people know that these are not
9092       # typical AIX shared libraries.
9093       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9094     else
9095       # We preserve .a as extension for shared libraries through AIX4.2
9096       # and later when we are not doing run time linking.
9097       library_names_spec='${libname}${release}.a $libname.a'
9098       soname_spec='${libname}${release}${shared_ext}$major'
9099     fi
9100     shlibpath_var=LIBPATH
9101   fi
9102   ;;
9103
9104 amigaos*)
9105   library_names_spec='$libname.ixlibrary $libname.a'
9106   # Create ${libname}_ixlibrary.a entries in /sys/libs.
9107   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'
9108   ;;
9109
9110 beos*)
9111   library_names_spec='${libname}${shared_ext}'
9112   dynamic_linker="$host_os ld.so"
9113   shlibpath_var=LIBRARY_PATH
9114   ;;
9115
9116 bsdi[45]*)
9117   version_type=linux
9118   need_version=no
9119   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9120   soname_spec='${libname}${release}${shared_ext}$major'
9121   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
9122   shlibpath_var=LD_LIBRARY_PATH
9123   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
9124   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
9125   # the default ld.so.conf also contains /usr/contrib/lib and
9126   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
9127   # libtool to hard-code these into programs
9128   ;;
9129
9130 cygwin* | mingw* | pw32*)
9131   version_type=windows
9132   shrext_cmds=".dll"
9133   need_version=no
9134   need_lib_prefix=no
9135
9136   case $GCC,$host_os in
9137   yes,cygwin* | yes,mingw* | yes,pw32*)
9138     library_names_spec='$libname.dll.a'
9139     # DLL is installed to $(libdir)/../bin by postinstall_cmds
9140     postinstall_cmds='base_file=`basename \${file}`~
9141       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
9142       dldir=$destdir/`dirname \$dlpath`~
9143       test -d \$dldir || mkdir -p \$dldir~
9144       $install_prog $dir/$dlname \$dldir/$dlname~
9145       chmod a+x \$dldir/$dlname'
9146     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
9147       dlpath=$dir/\$dldll~
9148        $rm \$dlpath'
9149     shlibpath_overrides_runpath=yes
9150
9151     case $host_os in
9152     cygwin*)
9153       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
9154       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9155       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
9156       ;;
9157     mingw*)
9158       # MinGW DLLs use traditional 'lib' prefix
9159       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9160       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9161       if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
9162         # It is most probably a Windows format PATH printed by
9163         # mingw gcc, but we are running on Cygwin. Gcc prints its search
9164         # path with ; separators, and with drive letters. We can handle the
9165         # drive letters (cygwin fileutils understands them), so leave them,
9166         # especially as we might pass files found there to a mingw objdump,
9167         # which wouldn't understand a cygwinified path. Ahh.
9168         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9169       else
9170         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
9171       fi
9172       ;;
9173     pw32*)
9174       # pw32 DLLs use 'pw' prefix rather than 'lib'
9175       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9176       ;;
9177     esac
9178     ;;
9179
9180   *)
9181     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
9182     ;;
9183   esac
9184   dynamic_linker='Win32 ld.exe'
9185   # FIXME: first we should search . and the directory the executable is in
9186   shlibpath_var=PATH
9187   ;;
9188
9189 darwin* | rhapsody*)
9190   dynamic_linker="$host_os dyld"
9191   version_type=darwin
9192   need_lib_prefix=no
9193   need_version=no
9194   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
9195   soname_spec='${libname}${release}${major}$shared_ext'
9196   shlibpath_overrides_runpath=yes
9197   shlibpath_var=DYLD_LIBRARY_PATH
9198   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
9199   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
9200   if test "$GCC" = yes; then
9201     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"`
9202   else
9203     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
9204   fi
9205   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
9206   ;;
9207
9208 dgux*)
9209   version_type=linux
9210   need_lib_prefix=no
9211   need_version=no
9212   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
9213   soname_spec='${libname}${release}${shared_ext}$major'
9214   shlibpath_var=LD_LIBRARY_PATH
9215   ;;
9216
9217 freebsd1*)
9218   dynamic_linker=no
9219   ;;
9220
9221 kfreebsd*-gnu)
9222   version_type=linux
9223   need_lib_prefix=no
9224   need_version=no
9225   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9226   soname_spec='${libname}${release}${shared_ext}$major'
9227   shlibpath_var=LD_LIBRARY_PATH
9228   shlibpath_overrides_runpath=no
9229   hardcode_into_libs=yes
9230   dynamic_linker='GNU ld.so'
9231   ;;
9232
9233 freebsd* | dragonfly*)
9234   # DragonFly does not have aout.  When/if they implement a new
9235   # versioning mechanism, adjust this.
9236   if test -x /usr/bin/objformat; then
9237     objformat=`/usr/bin/objformat`
9238   else
9239     case $host_os in
9240     freebsd[123]*) objformat=aout ;;
9241     *) objformat=elf ;;
9242     esac
9243   fi
9244   version_type=freebsd-$objformat
9245   case $version_type in
9246     freebsd-elf*)
9247       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
9248       need_version=no
9249       need_lib_prefix=no
9250       ;;
9251     freebsd-*)
9252       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
9253       need_version=yes
9254       ;;
9255   esac
9256   shlibpath_var=LD_LIBRARY_PATH
9257   case $host_os in
9258   freebsd2*)
9259     shlibpath_overrides_runpath=yes
9260     ;;
9261   freebsd3.[01]* | freebsdelf3.[01]*)
9262     shlibpath_overrides_runpath=yes
9263     hardcode_into_libs=yes
9264     ;;
9265   *) # from 3.2 on
9266     shlibpath_overrides_runpath=no
9267     hardcode_into_libs=yes
9268     ;;
9269   esac
9270   ;;
9271
9272 gnu*)
9273   version_type=linux
9274   need_lib_prefix=no
9275   need_version=no
9276   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
9277   soname_spec='${libname}${release}${shared_ext}$major'
9278   shlibpath_var=LD_LIBRARY_PATH
9279   hardcode_into_libs=yes
9280   ;;
9281
9282 hpux9* | hpux10* | hpux11*)
9283   # Give a soname corresponding to the major version so that dld.sl refuses to
9284   # link against other versions.
9285   version_type=sunos
9286   need_lib_prefix=no
9287   need_version=no
9288   case $host_cpu in
9289   ia64*)
9290     shrext_cmds='.so'
9291     hardcode_into_libs=yes
9292     dynamic_linker="$host_os dld.so"
9293     shlibpath_var=LD_LIBRARY_PATH
9294     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9295     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9296     soname_spec='${libname}${release}${shared_ext}$major'
9297     if test "X$HPUX_IA64_MODE" = X32; then
9298       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
9299     else
9300       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
9301     fi
9302     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9303     ;;
9304    hppa*64*)
9305      shrext_cmds='.sl'
9306      hardcode_into_libs=yes
9307      dynamic_linker="$host_os dld.sl"
9308      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
9309      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9310      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9311      soname_spec='${libname}${release}${shared_ext}$major'
9312      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
9313      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9314      ;;
9315    *)
9316     shrext_cmds='.sl'
9317     dynamic_linker="$host_os dld.sl"
9318     shlibpath_var=SHLIB_PATH
9319     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
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     ;;
9323   esac
9324   # HP-UX runs *really* slowly unless shared libraries are mode 555.
9325   postinstall_cmds='chmod 555 $lib'
9326   ;;
9327
9328 irix5* | irix6* | nonstopux*)
9329   case $host_os in
9330     nonstopux*) version_type=nonstopux ;;
9331     *)
9332         if test "$lt_cv_prog_gnu_ld" = yes; then
9333                 version_type=linux
9334         else
9335                 version_type=irix
9336         fi ;;
9337   esac
9338   need_lib_prefix=no
9339   need_version=no
9340   soname_spec='${libname}${release}${shared_ext}$major'
9341   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
9342   case $host_os in
9343   irix5* | nonstopux*)
9344     libsuff= shlibsuff=
9345     ;;
9346   *)
9347     case $LD in # libtool.m4 will add one of these switches to LD
9348     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
9349       libsuff= shlibsuff= libmagic=32-bit;;
9350     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
9351       libsuff=32 shlibsuff=N32 libmagic=N32;;
9352     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
9353       libsuff=64 shlibsuff=64 libmagic=64-bit;;
9354     *) libsuff= shlibsuff= libmagic=never-match;;
9355     esac
9356     ;;
9357   esac
9358   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
9359   shlibpath_overrides_runpath=no
9360   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
9361   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
9362   hardcode_into_libs=yes
9363   ;;
9364
9365 # No shared lib support for Linux oldld, aout, or coff.
9366 linux*oldld* | linux*aout* | linux*coff*)
9367   dynamic_linker=no
9368   ;;
9369
9370 # This must be Linux ELF.
9371 linux*)
9372   version_type=linux
9373   need_lib_prefix=no
9374   need_version=no
9375   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9376   soname_spec='${libname}${release}${shared_ext}$major'
9377   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
9378   shlibpath_var=LD_LIBRARY_PATH
9379   shlibpath_overrides_runpath=no
9380   # This implies no fast_install, which is unacceptable.
9381   # Some rework will be needed to allow for fast_install
9382   # before this can be enabled.
9383   hardcode_into_libs=yes
9384
9385   # Append ld.so.conf contents to the search path
9386   if test -f /etc/ld.so.conf; then
9387     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' ' '`
9388     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
9389   fi
9390
9391   # We used to test for /lib/ld.so.1 and disable shared libraries on
9392   # powerpc, because MkLinux only supported shared libraries with the
9393   # GNU dynamic linker.  Since this was broken with cross compilers,
9394   # most powerpc-linux boxes support dynamic linking these days and
9395   # people can always --disable-shared, the test was removed, and we
9396   # assume the GNU/Linux dynamic linker is in use.
9397   dynamic_linker='GNU/Linux ld.so'
9398   ;;
9399
9400 knetbsd*-gnu)
9401   version_type=linux
9402   need_lib_prefix=no
9403   need_version=no
9404   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9405   soname_spec='${libname}${release}${shared_ext}$major'
9406   shlibpath_var=LD_LIBRARY_PATH
9407   shlibpath_overrides_runpath=no
9408   hardcode_into_libs=yes
9409   dynamic_linker='GNU ld.so'
9410   ;;
9411
9412 netbsd*)
9413   version_type=sunos
9414   need_lib_prefix=no
9415   need_version=no
9416   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9417     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9418     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9419     dynamic_linker='NetBSD (a.out) ld.so'
9420   else
9421     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9422     soname_spec='${libname}${release}${shared_ext}$major'
9423     dynamic_linker='NetBSD ld.elf_so'
9424   fi
9425   shlibpath_var=LD_LIBRARY_PATH
9426   shlibpath_overrides_runpath=yes
9427   hardcode_into_libs=yes
9428   ;;
9429
9430 newsos6)
9431   version_type=linux
9432   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9433   shlibpath_var=LD_LIBRARY_PATH
9434   shlibpath_overrides_runpath=yes
9435   ;;
9436
9437 nto-qnx*)
9438   version_type=linux
9439   need_lib_prefix=no
9440   need_version=no
9441   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9442   soname_spec='${libname}${release}${shared_ext}$major'
9443   shlibpath_var=LD_LIBRARY_PATH
9444   shlibpath_overrides_runpath=yes
9445   ;;
9446
9447 openbsd*)
9448   version_type=sunos
9449   need_lib_prefix=no
9450   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
9451   case $host_os in
9452     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
9453     *)                         need_version=no  ;;
9454   esac
9455   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9456   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9457   shlibpath_var=LD_LIBRARY_PATH
9458   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9459     case $host_os in
9460       openbsd2.[89] | openbsd2.[89].*)
9461         shlibpath_overrides_runpath=no
9462         ;;
9463       *)
9464         shlibpath_overrides_runpath=yes
9465         ;;
9466       esac
9467   else
9468     shlibpath_overrides_runpath=yes
9469   fi
9470   ;;
9471
9472 os2*)
9473   libname_spec='$name'
9474   shrext_cmds=".dll"
9475   need_lib_prefix=no
9476   library_names_spec='$libname${shared_ext} $libname.a'
9477   dynamic_linker='OS/2 ld.exe'
9478   shlibpath_var=LIBPATH
9479   ;;
9480
9481 osf3* | osf4* | osf5*)
9482   version_type=osf
9483   need_lib_prefix=no
9484   need_version=no
9485   soname_spec='${libname}${release}${shared_ext}$major'
9486   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9487   shlibpath_var=LD_LIBRARY_PATH
9488   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
9489   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
9490   ;;
9491
9492 sco3.2v5*)
9493   version_type=osf
9494   soname_spec='${libname}${release}${shared_ext}$major'
9495   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9496   shlibpath_var=LD_LIBRARY_PATH
9497   ;;
9498
9499 solaris*)
9500   version_type=linux
9501   need_lib_prefix=no
9502   need_version=no
9503   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9504   soname_spec='${libname}${release}${shared_ext}$major'
9505   shlibpath_var=LD_LIBRARY_PATH
9506   shlibpath_overrides_runpath=yes
9507   hardcode_into_libs=yes
9508   # ldd complains unless libraries are executable
9509   postinstall_cmds='chmod +x $lib'
9510   ;;
9511
9512 sunos4*)
9513   version_type=sunos
9514   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9515   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
9516   shlibpath_var=LD_LIBRARY_PATH
9517   shlibpath_overrides_runpath=yes
9518   if test "$with_gnu_ld" = yes; then
9519     need_lib_prefix=no
9520   fi
9521   need_version=yes
9522   ;;
9523
9524 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9525   version_type=linux
9526   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9527   soname_spec='${libname}${release}${shared_ext}$major'
9528   shlibpath_var=LD_LIBRARY_PATH
9529   case $host_vendor in
9530     sni)
9531       shlibpath_overrides_runpath=no
9532       need_lib_prefix=no
9533       export_dynamic_flag_spec='${wl}-Blargedynsym'
9534       runpath_var=LD_RUN_PATH
9535       ;;
9536     siemens)
9537       need_lib_prefix=no
9538       ;;
9539     motorola)
9540       need_lib_prefix=no
9541       need_version=no
9542       shlibpath_overrides_runpath=no
9543       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
9544       ;;
9545   esac
9546   ;;
9547
9548 sysv4*MP*)
9549   if test -d /usr/nec ;then
9550     version_type=linux
9551     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
9552     soname_spec='$libname${shared_ext}.$major'
9553     shlibpath_var=LD_LIBRARY_PATH
9554   fi
9555   ;;
9556
9557 uts4*)
9558   version_type=linux
9559   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9560   soname_spec='${libname}${release}${shared_ext}$major'
9561   shlibpath_var=LD_LIBRARY_PATH
9562   ;;
9563
9564 *)
9565   dynamic_linker=no
9566   ;;
9567 esac
9568 echo "$as_me:$LINENO: result: $dynamic_linker" >&5
9569 echo "${ECHO_T}$dynamic_linker" >&6
9570 test "$dynamic_linker" = no && can_build_shared=no
9571
9572 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
9573 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
9574 hardcode_action=
9575 if test -n "$hardcode_libdir_flag_spec" || \
9576    test -n "$runpath_var" || \
9577    test "X$hardcode_automatic" = "Xyes" ; then
9578
9579   # We can hardcode non-existant directories.
9580   if test "$hardcode_direct" != no &&
9581      # If the only mechanism to avoid hardcoding is shlibpath_var, we
9582      # have to relink, otherwise we might link with an installed library
9583      # when we should be linking with a yet-to-be-installed one
9584      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
9585      test "$hardcode_minus_L" != no; then
9586     # Linking always hardcodes the temporary library directory.
9587     hardcode_action=relink
9588   else
9589     # We can link without hardcoding, and we can hardcode nonexisting dirs.
9590     hardcode_action=immediate
9591   fi
9592 else
9593   # We cannot hardcode anything, or else we can only hardcode existing
9594   # directories.
9595   hardcode_action=unsupported
9596 fi
9597 echo "$as_me:$LINENO: result: $hardcode_action" >&5
9598 echo "${ECHO_T}$hardcode_action" >&6
9599
9600 if test "$hardcode_action" = relink; then
9601   # Fast installation is not supported
9602   enable_fast_install=no
9603 elif test "$shlibpath_overrides_runpath" = yes ||
9604      test "$enable_shared" = no; then
9605   # Fast installation is not necessary
9606   enable_fast_install=needless
9607 fi
9608
9609 striplib=
9610 old_striplib=
9611 echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
9612 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
9613 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
9614   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
9615   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
9616   echo "$as_me:$LINENO: result: yes" >&5
9617 echo "${ECHO_T}yes" >&6
9618 else
9619 # FIXME - insert some real tests, host_os isn't really good enough
9620   case $host_os in
9621    darwin*)
9622        if test -n "$STRIP" ; then
9623          striplib="$STRIP -x"
9624          echo "$as_me:$LINENO: result: yes" >&5
9625 echo "${ECHO_T}yes" >&6
9626        else
9627   echo "$as_me:$LINENO: result: no" >&5
9628 echo "${ECHO_T}no" >&6
9629 fi
9630        ;;
9631    *)
9632   echo "$as_me:$LINENO: result: no" >&5
9633 echo "${ECHO_T}no" >&6
9634     ;;
9635   esac
9636 fi
9637
9638 if test "x$enable_dlopen" != xyes; then
9639   enable_dlopen=unknown
9640   enable_dlopen_self=unknown
9641   enable_dlopen_self_static=unknown
9642 else
9643   lt_cv_dlopen=no
9644   lt_cv_dlopen_libs=
9645
9646   case $host_os in
9647   beos*)
9648     lt_cv_dlopen="load_add_on"
9649     lt_cv_dlopen_libs=
9650     lt_cv_dlopen_self=yes
9651     ;;
9652
9653   mingw* | pw32*)
9654     lt_cv_dlopen="LoadLibrary"
9655     lt_cv_dlopen_libs=
9656    ;;
9657
9658   cygwin*)
9659     lt_cv_dlopen="dlopen"
9660     lt_cv_dlopen_libs=
9661    ;;
9662
9663   darwin*)
9664   # if libdl is installed we need to link against it
9665     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9666 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9667 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9668   echo $ECHO_N "(cached) $ECHO_C" >&6
9669 else
9670   ac_check_lib_save_LIBS=$LIBS
9671 LIBS="-ldl  $LIBS"
9672 cat >conftest.$ac_ext <<_ACEOF
9673 /* confdefs.h.  */
9674 _ACEOF
9675 cat confdefs.h >>conftest.$ac_ext
9676 cat >>conftest.$ac_ext <<_ACEOF
9677 /* end confdefs.h.  */
9678
9679 /* Override any gcc2 internal prototype to avoid an error.  */
9680 #ifdef __cplusplus
9681 extern "C"
9682 #endif
9683 /* We use char because int might match the return type of a gcc2
9684    builtin and then its argument prototype would still apply.  */
9685 char dlopen ();
9686 int
9687 main ()
9688 {
9689 dlopen ();
9690   ;
9691   return 0;
9692 }
9693 _ACEOF
9694 rm -f conftest.$ac_objext conftest$ac_exeext
9695 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9696   (eval $ac_link) 2>conftest.er1
9697   ac_status=$?
9698   grep -v '^ *+' conftest.er1 >conftest.err
9699   rm -f conftest.er1
9700   cat conftest.err >&5
9701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9702   (exit $ac_status); } &&
9703          { ac_try='test -z "$ac_c_werror_flag"
9704                          || test ! -s conftest.err'
9705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9706   (eval $ac_try) 2>&5
9707   ac_status=$?
9708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9709   (exit $ac_status); }; } &&
9710          { ac_try='test -s conftest$ac_exeext'
9711   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9712   (eval $ac_try) 2>&5
9713   ac_status=$?
9714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9715   (exit $ac_status); }; }; then
9716   ac_cv_lib_dl_dlopen=yes
9717 else
9718   echo "$as_me: failed program was:" >&5
9719 sed 's/^/| /' conftest.$ac_ext >&5
9720
9721 ac_cv_lib_dl_dlopen=no
9722 fi
9723 rm -f conftest.err conftest.$ac_objext \
9724       conftest$ac_exeext conftest.$ac_ext
9725 LIBS=$ac_check_lib_save_LIBS
9726 fi
9727 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9728 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9729 if test $ac_cv_lib_dl_dlopen = yes; then
9730   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
9731 else
9732
9733     lt_cv_dlopen="dyld"
9734     lt_cv_dlopen_libs=
9735     lt_cv_dlopen_self=yes
9736
9737 fi
9738
9739    ;;
9740
9741   *)
9742     echo "$as_me:$LINENO: checking for shl_load" >&5
9743 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
9744 if test "${ac_cv_func_shl_load+set}" = set; then
9745   echo $ECHO_N "(cached) $ECHO_C" >&6
9746 else
9747   cat >conftest.$ac_ext <<_ACEOF
9748 /* confdefs.h.  */
9749 _ACEOF
9750 cat confdefs.h >>conftest.$ac_ext
9751 cat >>conftest.$ac_ext <<_ACEOF
9752 /* end confdefs.h.  */
9753 /* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
9754    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9755 #define shl_load innocuous_shl_load
9756
9757 /* System header to define __stub macros and hopefully few prototypes,
9758     which can conflict with char shl_load (); below.
9759     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9760     <limits.h> exists even on freestanding compilers.  */
9761
9762 #ifdef __STDC__
9763 # include <limits.h>
9764 #else
9765 # include <assert.h>
9766 #endif
9767
9768 #undef shl_load
9769
9770 /* Override any gcc2 internal prototype to avoid an error.  */
9771 #ifdef __cplusplus
9772 extern "C"
9773 {
9774 #endif
9775 /* We use char because int might match the return type of a gcc2
9776    builtin and then its argument prototype would still apply.  */
9777 char shl_load ();
9778 /* The GNU C library defines this for functions which it implements
9779     to always fail with ENOSYS.  Some functions are actually named
9780     something starting with __ and the normal name is an alias.  */
9781 #if defined (__stub_shl_load) || defined (__stub___shl_load)
9782 choke me
9783 #else
9784 char (*f) () = shl_load;
9785 #endif
9786 #ifdef __cplusplus
9787 }
9788 #endif
9789
9790 int
9791 main ()
9792 {
9793 return f != shl_load;
9794   ;
9795   return 0;
9796 }
9797 _ACEOF
9798 rm -f conftest.$ac_objext conftest$ac_exeext
9799 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9800   (eval $ac_link) 2>conftest.er1
9801   ac_status=$?
9802   grep -v '^ *+' conftest.er1 >conftest.err
9803   rm -f conftest.er1
9804   cat conftest.err >&5
9805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9806   (exit $ac_status); } &&
9807          { ac_try='test -z "$ac_c_werror_flag"
9808                          || test ! -s conftest.err'
9809   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9810   (eval $ac_try) 2>&5
9811   ac_status=$?
9812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9813   (exit $ac_status); }; } &&
9814          { ac_try='test -s conftest$ac_exeext'
9815   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9816   (eval $ac_try) 2>&5
9817   ac_status=$?
9818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9819   (exit $ac_status); }; }; then
9820   ac_cv_func_shl_load=yes
9821 else
9822   echo "$as_me: failed program was:" >&5
9823 sed 's/^/| /' conftest.$ac_ext >&5
9824
9825 ac_cv_func_shl_load=no
9826 fi
9827 rm -f conftest.err conftest.$ac_objext \
9828       conftest$ac_exeext conftest.$ac_ext
9829 fi
9830 echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
9831 echo "${ECHO_T}$ac_cv_func_shl_load" >&6
9832 if test $ac_cv_func_shl_load = yes; then
9833   lt_cv_dlopen="shl_load"
9834 else
9835   echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9836 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9837 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9838   echo $ECHO_N "(cached) $ECHO_C" >&6
9839 else
9840   ac_check_lib_save_LIBS=$LIBS
9841 LIBS="-ldld  $LIBS"
9842 cat >conftest.$ac_ext <<_ACEOF
9843 /* confdefs.h.  */
9844 _ACEOF
9845 cat confdefs.h >>conftest.$ac_ext
9846 cat >>conftest.$ac_ext <<_ACEOF
9847 /* end confdefs.h.  */
9848
9849 /* Override any gcc2 internal prototype to avoid an error.  */
9850 #ifdef __cplusplus
9851 extern "C"
9852 #endif
9853 /* We use char because int might match the return type of a gcc2
9854    builtin and then its argument prototype would still apply.  */
9855 char shl_load ();
9856 int
9857 main ()
9858 {
9859 shl_load ();
9860   ;
9861   return 0;
9862 }
9863 _ACEOF
9864 rm -f conftest.$ac_objext conftest$ac_exeext
9865 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9866   (eval $ac_link) 2>conftest.er1
9867   ac_status=$?
9868   grep -v '^ *+' conftest.er1 >conftest.err
9869   rm -f conftest.er1
9870   cat conftest.err >&5
9871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9872   (exit $ac_status); } &&
9873          { ac_try='test -z "$ac_c_werror_flag"
9874                          || test ! -s conftest.err'
9875   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9876   (eval $ac_try) 2>&5
9877   ac_status=$?
9878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9879   (exit $ac_status); }; } &&
9880          { ac_try='test -s conftest$ac_exeext'
9881   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9882   (eval $ac_try) 2>&5
9883   ac_status=$?
9884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9885   (exit $ac_status); }; }; then
9886   ac_cv_lib_dld_shl_load=yes
9887 else
9888   echo "$as_me: failed program was:" >&5
9889 sed 's/^/| /' conftest.$ac_ext >&5
9890
9891 ac_cv_lib_dld_shl_load=no
9892 fi
9893 rm -f conftest.err conftest.$ac_objext \
9894       conftest$ac_exeext conftest.$ac_ext
9895 LIBS=$ac_check_lib_save_LIBS
9896 fi
9897 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9898 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9899 if test $ac_cv_lib_dld_shl_load = yes; then
9900   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
9901 else
9902   echo "$as_me:$LINENO: checking for dlopen" >&5
9903 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
9904 if test "${ac_cv_func_dlopen+set}" = set; then
9905   echo $ECHO_N "(cached) $ECHO_C" >&6
9906 else
9907   cat >conftest.$ac_ext <<_ACEOF
9908 /* confdefs.h.  */
9909 _ACEOF
9910 cat confdefs.h >>conftest.$ac_ext
9911 cat >>conftest.$ac_ext <<_ACEOF
9912 /* end confdefs.h.  */
9913 /* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
9914    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9915 #define dlopen innocuous_dlopen
9916
9917 /* System header to define __stub macros and hopefully few prototypes,
9918     which can conflict with char dlopen (); below.
9919     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9920     <limits.h> exists even on freestanding compilers.  */
9921
9922 #ifdef __STDC__
9923 # include <limits.h>
9924 #else
9925 # include <assert.h>
9926 #endif
9927
9928 #undef dlopen
9929
9930 /* Override any gcc2 internal prototype to avoid an error.  */
9931 #ifdef __cplusplus
9932 extern "C"
9933 {
9934 #endif
9935 /* We use char because int might match the return type of a gcc2
9936    builtin and then its argument prototype would still apply.  */
9937 char dlopen ();
9938 /* The GNU C library defines this for functions which it implements
9939     to always fail with ENOSYS.  Some functions are actually named
9940     something starting with __ and the normal name is an alias.  */
9941 #if defined (__stub_dlopen) || defined (__stub___dlopen)
9942 choke me
9943 #else
9944 char (*f) () = dlopen;
9945 #endif
9946 #ifdef __cplusplus
9947 }
9948 #endif
9949
9950 int
9951 main ()
9952 {
9953 return f != dlopen;
9954   ;
9955   return 0;
9956 }
9957 _ACEOF
9958 rm -f conftest.$ac_objext conftest$ac_exeext
9959 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9960   (eval $ac_link) 2>conftest.er1
9961   ac_status=$?
9962   grep -v '^ *+' conftest.er1 >conftest.err
9963   rm -f conftest.er1
9964   cat conftest.err >&5
9965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9966   (exit $ac_status); } &&
9967          { ac_try='test -z "$ac_c_werror_flag"
9968                          || test ! -s conftest.err'
9969   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9970   (eval $ac_try) 2>&5
9971   ac_status=$?
9972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9973   (exit $ac_status); }; } &&
9974          { ac_try='test -s conftest$ac_exeext'
9975   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9976   (eval $ac_try) 2>&5
9977   ac_status=$?
9978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9979   (exit $ac_status); }; }; then
9980   ac_cv_func_dlopen=yes
9981 else
9982   echo "$as_me: failed program was:" >&5
9983 sed 's/^/| /' conftest.$ac_ext >&5
9984
9985 ac_cv_func_dlopen=no
9986 fi
9987 rm -f conftest.err conftest.$ac_objext \
9988       conftest$ac_exeext conftest.$ac_ext
9989 fi
9990 echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
9991 echo "${ECHO_T}$ac_cv_func_dlopen" >&6
9992 if test $ac_cv_func_dlopen = yes; then
9993   lt_cv_dlopen="dlopen"
9994 else
9995   echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9996 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9997 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9998   echo $ECHO_N "(cached) $ECHO_C" >&6
9999 else
10000   ac_check_lib_save_LIBS=$LIBS
10001 LIBS="-ldl  $LIBS"
10002 cat >conftest.$ac_ext <<_ACEOF
10003 /* confdefs.h.  */
10004 _ACEOF
10005 cat confdefs.h >>conftest.$ac_ext
10006 cat >>conftest.$ac_ext <<_ACEOF
10007 /* end confdefs.h.  */
10008
10009 /* Override any gcc2 internal prototype to avoid an error.  */
10010 #ifdef __cplusplus
10011 extern "C"
10012 #endif
10013 /* We use char because int might match the return type of a gcc2
10014    builtin and then its argument prototype would still apply.  */
10015 char dlopen ();
10016 int
10017 main ()
10018 {
10019 dlopen ();
10020   ;
10021   return 0;
10022 }
10023 _ACEOF
10024 rm -f conftest.$ac_objext conftest$ac_exeext
10025 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10026   (eval $ac_link) 2>conftest.er1
10027   ac_status=$?
10028   grep -v '^ *+' conftest.er1 >conftest.err
10029   rm -f conftest.er1
10030   cat conftest.err >&5
10031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10032   (exit $ac_status); } &&
10033          { ac_try='test -z "$ac_c_werror_flag"
10034                          || test ! -s conftest.err'
10035   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10036   (eval $ac_try) 2>&5
10037   ac_status=$?
10038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10039   (exit $ac_status); }; } &&
10040          { ac_try='test -s conftest$ac_exeext'
10041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10042   (eval $ac_try) 2>&5
10043   ac_status=$?
10044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10045   (exit $ac_status); }; }; then
10046   ac_cv_lib_dl_dlopen=yes
10047 else
10048   echo "$as_me: failed program was:" >&5
10049 sed 's/^/| /' conftest.$ac_ext >&5
10050
10051 ac_cv_lib_dl_dlopen=no
10052 fi
10053 rm -f conftest.err conftest.$ac_objext \
10054       conftest$ac_exeext conftest.$ac_ext
10055 LIBS=$ac_check_lib_save_LIBS
10056 fi
10057 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10058 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10059 if test $ac_cv_lib_dl_dlopen = yes; then
10060   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10061 else
10062   echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
10063 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
10064 if test "${ac_cv_lib_svld_dlopen+set}" = set; then
10065   echo $ECHO_N "(cached) $ECHO_C" >&6
10066 else
10067   ac_check_lib_save_LIBS=$LIBS
10068 LIBS="-lsvld  $LIBS"
10069 cat >conftest.$ac_ext <<_ACEOF
10070 /* confdefs.h.  */
10071 _ACEOF
10072 cat confdefs.h >>conftest.$ac_ext
10073 cat >>conftest.$ac_ext <<_ACEOF
10074 /* end confdefs.h.  */
10075
10076 /* Override any gcc2 internal prototype to avoid an error.  */
10077 #ifdef __cplusplus
10078 extern "C"
10079 #endif
10080 /* We use char because int might match the return type of a gcc2
10081    builtin and then its argument prototype would still apply.  */
10082 char dlopen ();
10083 int
10084 main ()
10085 {
10086 dlopen ();
10087   ;
10088   return 0;
10089 }
10090 _ACEOF
10091 rm -f conftest.$ac_objext conftest$ac_exeext
10092 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10093   (eval $ac_link) 2>conftest.er1
10094   ac_status=$?
10095   grep -v '^ *+' conftest.er1 >conftest.err
10096   rm -f conftest.er1
10097   cat conftest.err >&5
10098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10099   (exit $ac_status); } &&
10100          { ac_try='test -z "$ac_c_werror_flag"
10101                          || test ! -s conftest.err'
10102   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10103   (eval $ac_try) 2>&5
10104   ac_status=$?
10105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10106   (exit $ac_status); }; } &&
10107          { ac_try='test -s conftest$ac_exeext'
10108   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10109   (eval $ac_try) 2>&5
10110   ac_status=$?
10111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10112   (exit $ac_status); }; }; then
10113   ac_cv_lib_svld_dlopen=yes
10114 else
10115   echo "$as_me: failed program was:" >&5
10116 sed 's/^/| /' conftest.$ac_ext >&5
10117
10118 ac_cv_lib_svld_dlopen=no
10119 fi
10120 rm -f conftest.err conftest.$ac_objext \
10121       conftest$ac_exeext conftest.$ac_ext
10122 LIBS=$ac_check_lib_save_LIBS
10123 fi
10124 echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
10125 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
10126 if test $ac_cv_lib_svld_dlopen = yes; then
10127   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
10128 else
10129   echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
10130 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
10131 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
10132   echo $ECHO_N "(cached) $ECHO_C" >&6
10133 else
10134   ac_check_lib_save_LIBS=$LIBS
10135 LIBS="-ldld  $LIBS"
10136 cat >conftest.$ac_ext <<_ACEOF
10137 /* confdefs.h.  */
10138 _ACEOF
10139 cat confdefs.h >>conftest.$ac_ext
10140 cat >>conftest.$ac_ext <<_ACEOF
10141 /* end confdefs.h.  */
10142
10143 /* Override any gcc2 internal prototype to avoid an error.  */
10144 #ifdef __cplusplus
10145 extern "C"
10146 #endif
10147 /* We use char because int might match the return type of a gcc2
10148    builtin and then its argument prototype would still apply.  */
10149 char dld_link ();
10150 int
10151 main ()
10152 {
10153 dld_link ();
10154   ;
10155   return 0;
10156 }
10157 _ACEOF
10158 rm -f conftest.$ac_objext conftest$ac_exeext
10159 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10160   (eval $ac_link) 2>conftest.er1
10161   ac_status=$?
10162   grep -v '^ *+' conftest.er1 >conftest.err
10163   rm -f conftest.er1
10164   cat conftest.err >&5
10165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10166   (exit $ac_status); } &&
10167          { ac_try='test -z "$ac_c_werror_flag"
10168                          || test ! -s conftest.err'
10169   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10170   (eval $ac_try) 2>&5
10171   ac_status=$?
10172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10173   (exit $ac_status); }; } &&
10174          { ac_try='test -s conftest$ac_exeext'
10175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10176   (eval $ac_try) 2>&5
10177   ac_status=$?
10178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10179   (exit $ac_status); }; }; then
10180   ac_cv_lib_dld_dld_link=yes
10181 else
10182   echo "$as_me: failed program was:" >&5
10183 sed 's/^/| /' conftest.$ac_ext >&5
10184
10185 ac_cv_lib_dld_dld_link=no
10186 fi
10187 rm -f conftest.err conftest.$ac_objext \
10188       conftest$ac_exeext conftest.$ac_ext
10189 LIBS=$ac_check_lib_save_LIBS
10190 fi
10191 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
10192 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
10193 if test $ac_cv_lib_dld_dld_link = yes; then
10194   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
10195 fi
10196
10197
10198 fi
10199
10200
10201 fi
10202
10203
10204 fi
10205
10206
10207 fi
10208
10209
10210 fi
10211
10212     ;;
10213   esac
10214
10215   if test "x$lt_cv_dlopen" != xno; then
10216     enable_dlopen=yes
10217   else
10218     enable_dlopen=no
10219   fi
10220
10221   case $lt_cv_dlopen in
10222   dlopen)
10223     save_CPPFLAGS="$CPPFLAGS"
10224     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
10225
10226     save_LDFLAGS="$LDFLAGS"
10227     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
10228
10229     save_LIBS="$LIBS"
10230     LIBS="$lt_cv_dlopen_libs $LIBS"
10231
10232     echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
10233 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
10234 if test "${lt_cv_dlopen_self+set}" = set; then
10235   echo $ECHO_N "(cached) $ECHO_C" >&6
10236 else
10237           if test "$cross_compiling" = yes; then :
10238   lt_cv_dlopen_self=cross
10239 else
10240   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10241   lt_status=$lt_dlunknown
10242   cat > conftest.$ac_ext <<EOF
10243 #line 10243 "configure"
10244 #include "confdefs.h"
10245
10246 #if HAVE_DLFCN_H
10247 #include <dlfcn.h>
10248 #endif
10249
10250 #include <stdio.h>
10251
10252 #ifdef RTLD_GLOBAL
10253 #  define LT_DLGLOBAL           RTLD_GLOBAL
10254 #else
10255 #  ifdef DL_GLOBAL
10256 #    define LT_DLGLOBAL         DL_GLOBAL
10257 #  else
10258 #    define LT_DLGLOBAL         0
10259 #  endif
10260 #endif
10261
10262 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10263    find out it does not work in some platform. */
10264 #ifndef LT_DLLAZY_OR_NOW
10265 #  ifdef RTLD_LAZY
10266 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10267 #  else
10268 #    ifdef DL_LAZY
10269 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10270 #    else
10271 #      ifdef RTLD_NOW
10272 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10273 #      else
10274 #        ifdef DL_NOW
10275 #          define LT_DLLAZY_OR_NOW      DL_NOW
10276 #        else
10277 #          define LT_DLLAZY_OR_NOW      0
10278 #        endif
10279 #      endif
10280 #    endif
10281 #  endif
10282 #endif
10283
10284 #ifdef __cplusplus
10285 extern "C" void exit (int);
10286 #endif
10287
10288 void fnord() { int i=42;}
10289 int main ()
10290 {
10291   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10292   int status = $lt_dlunknown;
10293
10294   if (self)
10295     {
10296       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10297       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10298       /* dlclose (self); */
10299     }
10300
10301     exit (status);
10302 }
10303 EOF
10304   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10305   (eval $ac_link) 2>&5
10306   ac_status=$?
10307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10308   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
10309     (./conftest; exit; ) >&5 2>/dev/null
10310     lt_status=$?
10311     case x$lt_status in
10312       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
10313       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
10314       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
10315     esac
10316   else :
10317     # compilation failed
10318     lt_cv_dlopen_self=no
10319   fi
10320 fi
10321 rm -fr conftest*
10322
10323
10324 fi
10325 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
10326 echo "${ECHO_T}$lt_cv_dlopen_self" >&6
10327
10328     if test "x$lt_cv_dlopen_self" = xyes; then
10329       LDFLAGS="$LDFLAGS $link_static_flag"
10330       echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
10331 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
10332 if test "${lt_cv_dlopen_self_static+set}" = set; then
10333   echo $ECHO_N "(cached) $ECHO_C" >&6
10334 else
10335           if test "$cross_compiling" = yes; then :
10336   lt_cv_dlopen_self_static=cross
10337 else
10338   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10339   lt_status=$lt_dlunknown
10340   cat > conftest.$ac_ext <<EOF
10341 #line 10341 "configure"
10342 #include "confdefs.h"
10343
10344 #if HAVE_DLFCN_H
10345 #include <dlfcn.h>
10346 #endif
10347
10348 #include <stdio.h>
10349
10350 #ifdef RTLD_GLOBAL
10351 #  define LT_DLGLOBAL           RTLD_GLOBAL
10352 #else
10353 #  ifdef DL_GLOBAL
10354 #    define LT_DLGLOBAL         DL_GLOBAL
10355 #  else
10356 #    define LT_DLGLOBAL         0
10357 #  endif
10358 #endif
10359
10360 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10361    find out it does not work in some platform. */
10362 #ifndef LT_DLLAZY_OR_NOW
10363 #  ifdef RTLD_LAZY
10364 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10365 #  else
10366 #    ifdef DL_LAZY
10367 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10368 #    else
10369 #      ifdef RTLD_NOW
10370 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10371 #      else
10372 #        ifdef DL_NOW
10373 #          define LT_DLLAZY_OR_NOW      DL_NOW
10374 #        else
10375 #          define LT_DLLAZY_OR_NOW      0
10376 #        endif
10377 #      endif
10378 #    endif
10379 #  endif
10380 #endif
10381
10382 #ifdef __cplusplus
10383 extern "C" void exit (int);
10384 #endif
10385
10386 void fnord() { int i=42;}
10387 int main ()
10388 {
10389   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10390   int status = $lt_dlunknown;
10391
10392   if (self)
10393     {
10394       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10395       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10396       /* dlclose (self); */
10397     }
10398
10399     exit (status);
10400 }
10401 EOF
10402   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10403   (eval $ac_link) 2>&5
10404   ac_status=$?
10405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10406   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
10407     (./conftest; exit; ) >&5 2>/dev/null
10408     lt_status=$?
10409     case x$lt_status in
10410       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
10411       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
10412       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
10413     esac
10414   else :
10415     # compilation failed
10416     lt_cv_dlopen_self_static=no
10417   fi
10418 fi
10419 rm -fr conftest*
10420
10421
10422 fi
10423 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
10424 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
10425     fi
10426
10427     CPPFLAGS="$save_CPPFLAGS"
10428     LDFLAGS="$save_LDFLAGS"
10429     LIBS="$save_LIBS"
10430     ;;
10431   esac
10432
10433   case $lt_cv_dlopen_self in
10434   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
10435   *) enable_dlopen_self=unknown ;;
10436   esac
10437
10438   case $lt_cv_dlopen_self_static in
10439   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
10440   *) enable_dlopen_self_static=unknown ;;
10441   esac
10442 fi
10443
10444
10445 # Report which librarie types wil actually be built
10446 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
10447 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
10448 echo "$as_me:$LINENO: result: $can_build_shared" >&5
10449 echo "${ECHO_T}$can_build_shared" >&6
10450
10451 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
10452 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
10453 test "$can_build_shared" = "no" && enable_shared=no
10454
10455 # On AIX, shared libraries and static libraries use the same namespace, and
10456 # are all built from PIC.
10457 case $host_os in
10458 aix3*)
10459   test "$enable_shared" = yes && enable_static=no
10460   if test -n "$RANLIB"; then
10461     archive_cmds="$archive_cmds~\$RANLIB \$lib"
10462     postinstall_cmds='$RANLIB $lib'
10463   fi
10464   ;;
10465
10466 aix4* | aix5*)
10467   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
10468     test "$enable_shared" = yes && enable_static=no
10469   fi
10470     ;;
10471 esac
10472 echo "$as_me:$LINENO: result: $enable_shared" >&5
10473 echo "${ECHO_T}$enable_shared" >&6
10474
10475 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
10476 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
10477 # Make sure either enable_shared or enable_static is yes.
10478 test "$enable_shared" = yes || enable_static=yes
10479 echo "$as_me:$LINENO: result: $enable_static" >&5
10480 echo "${ECHO_T}$enable_static" >&6
10481
10482 # The else clause should only fire when bootstrapping the
10483 # libtool distribution, otherwise you forgot to ship ltmain.sh
10484 # with your package, and you will get complaints that there are
10485 # no rules to generate ltmain.sh.
10486 if test -f "$ltmain"; then
10487   # See if we are running on zsh, and set the options which allow our commands through
10488   # without removal of \ escapes.
10489   if test -n "${ZSH_VERSION+set}" ; then
10490     setopt NO_GLOB_SUBST
10491   fi
10492   # Now quote all the things that may contain metacharacters while being
10493   # careful not to overquote the AC_SUBSTed values.  We take copies of the
10494   # variables and quote the copies for generation of the libtool script.
10495   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
10496     SED SHELL STRIP \
10497     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
10498     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
10499     deplibs_check_method reload_flag reload_cmds need_locks \
10500     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
10501     lt_cv_sys_global_symbol_to_c_name_address \
10502     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
10503     old_postinstall_cmds old_postuninstall_cmds \
10504     compiler \
10505     CC \
10506     LD \
10507     lt_prog_compiler_wl \
10508     lt_prog_compiler_pic \
10509     lt_prog_compiler_static \
10510     lt_prog_compiler_no_builtin_flag \
10511     export_dynamic_flag_spec \
10512     thread_safe_flag_spec \
10513     whole_archive_flag_spec \
10514     enable_shared_with_static_runtimes \
10515     old_archive_cmds \
10516     old_archive_from_new_cmds \
10517     predep_objects \
10518     postdep_objects \
10519     predeps \
10520     postdeps \
10521     compiler_lib_search_path \
10522     archive_cmds \
10523     archive_expsym_cmds \
10524     postinstall_cmds \
10525     postuninstall_cmds \
10526     old_archive_from_expsyms_cmds \
10527     allow_undefined_flag \
10528     no_undefined_flag \
10529     export_symbols_cmds \
10530     hardcode_libdir_flag_spec \
10531     hardcode_libdir_flag_spec_ld \
10532     hardcode_libdir_separator \
10533     hardcode_automatic \
10534     module_cmds \
10535     module_expsym_cmds \
10536     lt_cv_prog_compiler_c_o \
10537     exclude_expsyms \
10538     include_expsyms; do
10539
10540     case $var in
10541     old_archive_cmds | \
10542     old_archive_from_new_cmds | \
10543     archive_cmds | \
10544     archive_expsym_cmds | \
10545     module_cmds | \
10546     module_expsym_cmds | \
10547     old_archive_from_expsyms_cmds | \
10548     export_symbols_cmds | \
10549     extract_expsyms_cmds | reload_cmds | finish_cmds | \
10550     postinstall_cmds | postuninstall_cmds | \
10551     old_postinstall_cmds | old_postuninstall_cmds | \
10552     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
10553       # Double-quote double-evaled strings.
10554       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
10555       ;;
10556     *)
10557       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
10558       ;;
10559     esac
10560   done
10561
10562   case $lt_echo in
10563   *'\$0 --fallback-echo"')
10564     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
10565     ;;
10566   esac
10567
10568 cfgfile="${ofile}T"
10569   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
10570   $rm -f "$cfgfile"
10571   { echo "$as_me:$LINENO: creating $ofile" >&5
10572 echo "$as_me: creating $ofile" >&6;}
10573
10574   cat <<__EOF__ >> "$cfgfile"
10575 #! $SHELL
10576
10577 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
10578 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
10579 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
10580 #
10581 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
10582 # Free Software Foundation, Inc.
10583 #
10584 # This file is part of GNU Libtool:
10585 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
10586 #
10587 # This program is free software; you can redistribute it and/or modify
10588 # it under the terms of the GNU General Public License as published by
10589 # the Free Software Foundation; either version 2 of the License, or
10590 # (at your option) any later version.
10591 #
10592 # This program is distributed in the hope that it will be useful, but
10593 # WITHOUT ANY WARRANTY; without even the implied warranty of
10594 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10595 # General Public License for more details.
10596 #
10597 # You should have received a copy of the GNU General Public License
10598 # along with this program; if not, write to the Free Software
10599 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
10600 #
10601 # As a special exception to the GNU General Public License, if you
10602 # distribute this file as part of a program that contains a
10603 # configuration script generated by Autoconf, you may include it under
10604 # the same distribution terms that you use for the rest of that program.
10605
10606 # A sed program that does not truncate output.
10607 SED=$lt_SED
10608
10609 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
10610 Xsed="$SED -e 1s/^X//"
10611
10612 # The HP-UX ksh and POSIX shell print the target directory to stdout
10613 # if CDPATH is set.
10614 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
10615
10616 # The names of the tagged configurations supported by this script.
10617 available_tags=
10618
10619 # ### BEGIN LIBTOOL CONFIG
10620
10621 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10622
10623 # Shell to use when invoking shell scripts.
10624 SHELL=$lt_SHELL
10625
10626 # Whether or not to build shared libraries.
10627 build_libtool_libs=$enable_shared
10628
10629 # Whether or not to build static libraries.
10630 build_old_libs=$enable_static
10631
10632 # Whether or not to add -lc for building shared libraries.
10633 build_libtool_need_lc=$archive_cmds_need_lc
10634
10635 # Whether or not to disallow shared libs when runtime libs are static
10636 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
10637
10638 # Whether or not to optimize for fast installation.
10639 fast_install=$enable_fast_install
10640
10641 # The host system.
10642 host_alias=$host_alias
10643 host=$host
10644 host_os=$host_os
10645
10646 # The build system.
10647 build_alias=$build_alias
10648 build=$build
10649 build_os=$build_os
10650
10651 # An echo program that does not interpret backslashes.
10652 echo=$lt_echo
10653
10654 # The archiver.
10655 AR=$lt_AR
10656 AR_FLAGS=$lt_AR_FLAGS
10657
10658 # A C compiler.
10659 LTCC=$lt_LTCC
10660
10661 # A language-specific compiler.
10662 CC=$lt_compiler
10663
10664 # Is the compiler the GNU C compiler?
10665 with_gcc=$GCC
10666
10667 # An ERE matcher.
10668 EGREP=$lt_EGREP
10669
10670 # The linker used to build libraries.
10671 LD=$lt_LD
10672
10673 # Whether we need hard or soft links.
10674 LN_S=$lt_LN_S
10675
10676 # A BSD-compatible nm program.
10677 NM=$lt_NM
10678
10679 # A symbol stripping program
10680 STRIP=$lt_STRIP
10681
10682 # Used to examine libraries when file_magic_cmd begins "file"
10683 MAGIC_CMD=$MAGIC_CMD
10684
10685 # Used on cygwin: DLL creation program.
10686 DLLTOOL="$DLLTOOL"
10687
10688 # Used on cygwin: object dumper.
10689 OBJDUMP="$OBJDUMP"
10690
10691 # Used on cygwin: assembler.
10692 AS="$AS"
10693
10694 # The name of the directory that contains temporary libtool files.
10695 objdir=$objdir
10696
10697 # How to create reloadable object files.
10698 reload_flag=$lt_reload_flag
10699 reload_cmds=$lt_reload_cmds
10700
10701 # How to pass a linker flag through the compiler.
10702 wl=$lt_lt_prog_compiler_wl
10703
10704 # Object file suffix (normally "o").
10705 objext="$ac_objext"
10706
10707 # Old archive suffix (normally "a").
10708 libext="$libext"
10709
10710 # Shared library suffix (normally ".so").
10711 shrext_cmds='$shrext_cmds'
10712
10713 # Executable file suffix (normally "").
10714 exeext="$exeext"
10715
10716 # Additional compiler flags for building library objects.
10717 pic_flag=$lt_lt_prog_compiler_pic
10718 pic_mode=$pic_mode
10719
10720 # What is the maximum length of a command?
10721 max_cmd_len=$lt_cv_sys_max_cmd_len
10722
10723 # Does compiler simultaneously support -c and -o options?
10724 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
10725
10726 # Must we lock files when doing compilation?
10727 need_locks=$lt_need_locks
10728
10729 # Do we need the lib prefix for modules?
10730 need_lib_prefix=$need_lib_prefix
10731
10732 # Do we need a version for libraries?
10733 need_version=$need_version
10734
10735 # Whether dlopen is supported.
10736 dlopen_support=$enable_dlopen
10737
10738 # Whether dlopen of programs is supported.
10739 dlopen_self=$enable_dlopen_self
10740
10741 # Whether dlopen of statically linked programs is supported.
10742 dlopen_self_static=$enable_dlopen_self_static
10743
10744 # Compiler flag to prevent dynamic linking.
10745 link_static_flag=$lt_lt_prog_compiler_static
10746
10747 # Compiler flag to turn off builtin functions.
10748 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
10749
10750 # Compiler flag to allow reflexive dlopens.
10751 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
10752
10753 # Compiler flag to generate shared objects directly from archives.
10754 whole_archive_flag_spec=$lt_whole_archive_flag_spec
10755
10756 # Compiler flag to generate thread-safe objects.
10757 thread_safe_flag_spec=$lt_thread_safe_flag_spec
10758
10759 # Library versioning type.
10760 version_type=$version_type
10761
10762 # Format of library name prefix.
10763 libname_spec=$lt_libname_spec
10764
10765 # List of archive names.  First name is the real one, the rest are links.
10766 # The last name is the one that the linker finds with -lNAME.
10767 library_names_spec=$lt_library_names_spec
10768
10769 # The coded name of the library, if different from the real name.
10770 soname_spec=$lt_soname_spec
10771
10772 # Commands used to build and install an old-style archive.
10773 RANLIB=$lt_RANLIB
10774 old_archive_cmds=$lt_old_archive_cmds
10775 old_postinstall_cmds=$lt_old_postinstall_cmds
10776 old_postuninstall_cmds=$lt_old_postuninstall_cmds
10777
10778 # Create an old-style archive from a shared archive.
10779 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
10780
10781 # Create a temporary old-style archive to link instead of a shared archive.
10782 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
10783
10784 # Commands used to build and install a shared archive.
10785 archive_cmds=$lt_archive_cmds
10786 archive_expsym_cmds=$lt_archive_expsym_cmds
10787 postinstall_cmds=$lt_postinstall_cmds
10788 postuninstall_cmds=$lt_postuninstall_cmds
10789
10790 # Commands used to build a loadable module (assumed same as above if empty)
10791 module_cmds=$lt_module_cmds
10792 module_expsym_cmds=$lt_module_expsym_cmds
10793
10794 # Commands to strip libraries.
10795 old_striplib=$lt_old_striplib
10796 striplib=$lt_striplib
10797
10798 # Dependencies to place before the objects being linked to create a
10799 # shared library.
10800 predep_objects=$lt_predep_objects
10801
10802 # Dependencies to place after the objects being linked to create a
10803 # shared library.
10804 postdep_objects=$lt_postdep_objects
10805
10806 # Dependencies to place before the objects being linked to create a
10807 # shared library.
10808 predeps=$lt_predeps
10809
10810 # Dependencies to place after the objects being linked to create a
10811 # shared library.
10812 postdeps=$lt_postdeps
10813
10814 # The library search path used internally by the compiler when linking
10815 # a shared library.
10816 compiler_lib_search_path=$lt_compiler_lib_search_path
10817
10818 # Method to check whether dependent libraries are shared objects.
10819 deplibs_check_method=$lt_deplibs_check_method
10820
10821 # Command to use when deplibs_check_method == file_magic.
10822 file_magic_cmd=$lt_file_magic_cmd
10823
10824 # Flag that allows shared libraries with undefined symbols to be built.
10825 allow_undefined_flag=$lt_allow_undefined_flag
10826
10827 # Flag that forces no undefined symbols.
10828 no_undefined_flag=$lt_no_undefined_flag
10829
10830 # Commands used to finish a libtool library installation in a directory.
10831 finish_cmds=$lt_finish_cmds
10832
10833 # Same as above, but a single script fragment to be evaled but not shown.
10834 finish_eval=$lt_finish_eval
10835
10836 # Take the output of nm and produce a listing of raw symbols and C names.
10837 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
10838
10839 # Transform the output of nm in a proper C declaration
10840 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
10841
10842 # Transform the output of nm in a C name address pair
10843 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
10844
10845 # This is the shared library runtime path variable.
10846 runpath_var=$runpath_var
10847
10848 # This is the shared library path variable.
10849 shlibpath_var=$shlibpath_var
10850
10851 # Is shlibpath searched before the hard-coded library search path?
10852 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
10853
10854 # How to hardcode a shared library path into an executable.
10855 hardcode_action=$hardcode_action
10856
10857 # Whether we should hardcode library paths into libraries.
10858 hardcode_into_libs=$hardcode_into_libs
10859
10860 # Flag to hardcode \$libdir into a binary during linking.
10861 # This must work even if \$libdir does not exist.
10862 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
10863
10864 # If ld is used when linking, flag to hardcode \$libdir into
10865 # a binary during linking. This must work even if \$libdir does
10866 # not exist.
10867 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
10868
10869 # Whether we need a single -rpath flag with a separated argument.
10870 hardcode_libdir_separator=$lt_hardcode_libdir_separator
10871
10872 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
10873 # resulting binary.
10874 hardcode_direct=$hardcode_direct
10875
10876 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
10877 # resulting binary.
10878 hardcode_minus_L=$hardcode_minus_L
10879
10880 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
10881 # the resulting binary.
10882 hardcode_shlibpath_var=$hardcode_shlibpath_var
10883
10884 # Set to yes if building a shared library automatically hardcodes DIR into the library
10885 # and all subsequent libraries and executables linked against it.
10886 hardcode_automatic=$hardcode_automatic
10887
10888 # Variables whose values should be saved in libtool wrapper scripts and
10889 # restored at relink time.
10890 variables_saved_for_relink="$variables_saved_for_relink"
10891
10892 # Whether libtool must link a program against all its dependency libraries.
10893 link_all_deplibs=$link_all_deplibs
10894
10895 # Compile-time system search path for libraries
10896 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
10897
10898 # Run-time system search path for libraries
10899 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
10900
10901 # Fix the shell variable \$srcfile for the compiler.
10902 fix_srcfile_path="$fix_srcfile_path"
10903
10904 # Set to yes if exported symbols are required.
10905 always_export_symbols=$always_export_symbols
10906
10907 # The commands to list exported symbols.
10908 export_symbols_cmds=$lt_export_symbols_cmds
10909
10910 # The commands to extract the exported symbol list from a shared archive.
10911 extract_expsyms_cmds=$lt_extract_expsyms_cmds
10912
10913 # Symbols that should not be listed in the preloaded symbols.
10914 exclude_expsyms=$lt_exclude_expsyms
10915
10916 # Symbols that must always be exported.
10917 include_expsyms=$lt_include_expsyms
10918
10919 # ### END LIBTOOL CONFIG
10920
10921 __EOF__
10922
10923
10924   case $host_os in
10925   aix3*)
10926     cat <<\EOF >> "$cfgfile"
10927
10928 # AIX sometimes has problems with the GCC collect2 program.  For some
10929 # reason, if we set the COLLECT_NAMES environment variable, the problems
10930 # vanish in a puff of smoke.
10931 if test "X${COLLECT_NAMES+set}" != Xset; then
10932   COLLECT_NAMES=
10933   export COLLECT_NAMES
10934 fi
10935 EOF
10936     ;;
10937   esac
10938
10939   # We use sed instead of cat because bash on DJGPP gets confused if
10940   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
10941   # text mode, it properly converts lines to CR/LF.  This bash problem
10942   # is reportedly fixed, but why not run on old versions too?
10943   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
10944
10945   mv -f "$cfgfile" "$ofile" || \
10946     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
10947   chmod +x "$ofile"
10948
10949 else
10950   # If there is no Makefile yet, we rely on a make rule to execute
10951   # `config.status --recheck' to rerun these tests and create the
10952   # libtool script then.
10953   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
10954   if test -f "$ltmain_in"; then
10955     test -f Makefile && make "$ltmain"
10956   fi
10957 fi
10958
10959
10960 ac_ext=c
10961 ac_cpp='$CPP $CPPFLAGS'
10962 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10963 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10964 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10965
10966 CC="$lt_save_CC"
10967
10968
10969 # Check whether --with-tags or --without-tags was given.
10970 if test "${with_tags+set}" = set; then
10971   withval="$with_tags"
10972   tagnames="$withval"
10973 fi;
10974
10975 if test -f "$ltmain" && test -n "$tagnames"; then
10976   if test ! -f "${ofile}"; then
10977     { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
10978 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
10979   fi
10980
10981   if test -z "$LTCC"; then
10982     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
10983     if test -z "$LTCC"; then
10984       { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
10985 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
10986     else
10987       { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
10988 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
10989     fi
10990   fi
10991
10992   # Extract list of available tagged configurations in $ofile.
10993   # Note that this assumes the entire list is on one line.
10994   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
10995
10996   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10997   for tagname in $tagnames; do
10998     IFS="$lt_save_ifs"
10999     # Check whether tagname contains only valid characters
11000     case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
11001     "") ;;
11002     *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
11003 echo "$as_me: error: invalid tag name: $tagname" >&2;}
11004    { (exit 1); exit 1; }; }
11005         ;;
11006     esac
11007
11008     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
11009     then
11010       { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
11011 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
11012    { (exit 1); exit 1; }; }
11013     fi
11014
11015     # Update the list of available tags.
11016     if test -n "$tagname"; then
11017       echo appending configuration tag \"$tagname\" to $ofile
11018
11019       case $tagname in
11020       CXX)
11021         if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
11022             ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
11023             (test "X$CXX" != "Xg++"))) ; then
11024           :
11025         else
11026           tagname=""
11027         fi
11028         ;;
11029
11030       F77)
11031         if test -n "$F77" && test "X$F77" != "Xno"; then
11032           :
11033         else
11034           tagname=""
11035         fi
11036         ;;
11037
11038       GCJ)
11039         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
11040           :
11041         else
11042           tagname=""
11043         fi
11044         ;;
11045
11046       RC)
11047
11048
11049
11050 # Source file extension for RC test sources.
11051 ac_ext=rc
11052
11053 # Object file extension for compiled RC test sources.
11054 objext=o
11055 objext_RC=$objext
11056
11057 # Code to be used in simple compile tests
11058 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
11059
11060 # Code to be used in simple link tests
11061 lt_simple_link_test_code="$lt_simple_compile_test_code"
11062
11063 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11064
11065 # If no C compiler was specified, use CC.
11066 LTCC=${LTCC-"$CC"}
11067
11068 # Allow CC to be a program name with arguments.
11069 compiler=$CC
11070
11071
11072 # save warnings/boilerplate of simple test code
11073 ac_outfile=conftest.$ac_objext
11074 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
11075 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11076 _lt_compiler_boilerplate=`cat conftest.err`
11077 $rm conftest*
11078
11079 ac_outfile=conftest.$ac_objext
11080 printf "$lt_simple_link_test_code" >conftest.$ac_ext
11081 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11082 _lt_linker_boilerplate=`cat conftest.err`
11083 $rm conftest*
11084
11085
11086 # Allow CC to be a program name with arguments.
11087 lt_save_CC="$CC"
11088 CC=${RC-"windres"}
11089 compiler=$CC
11090 compiler_RC=$CC
11091 for cc_temp in $compiler""; do
11092   case $cc_temp in
11093     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
11094     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
11095     \-*) ;;
11096     *) break;;
11097   esac
11098 done
11099 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
11100
11101 lt_cv_prog_compiler_c_o_RC=yes
11102
11103 # The else clause should only fire when bootstrapping the
11104 # libtool distribution, otherwise you forgot to ship ltmain.sh
11105 # with your package, and you will get complaints that there are
11106 # no rules to generate ltmain.sh.
11107 if test -f "$ltmain"; then
11108   # See if we are running on zsh, and set the options which allow our commands through
11109   # without removal of \ escapes.
11110   if test -n "${ZSH_VERSION+set}" ; then
11111     setopt NO_GLOB_SUBST
11112   fi
11113   # Now quote all the things that may contain metacharacters while being
11114   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11115   # variables and quote the copies for generation of the libtool script.
11116   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11117     SED SHELL STRIP \
11118     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11119     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11120     deplibs_check_method reload_flag reload_cmds need_locks \
11121     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11122     lt_cv_sys_global_symbol_to_c_name_address \
11123     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11124     old_postinstall_cmds old_postuninstall_cmds \
11125     compiler_RC \
11126     CC_RC \
11127     LD_RC \
11128     lt_prog_compiler_wl_RC \
11129     lt_prog_compiler_pic_RC \
11130     lt_prog_compiler_static_RC \
11131     lt_prog_compiler_no_builtin_flag_RC \
11132     export_dynamic_flag_spec_RC \
11133     thread_safe_flag_spec_RC \
11134     whole_archive_flag_spec_RC \
11135     enable_shared_with_static_runtimes_RC \
11136     old_archive_cmds_RC \
11137     old_archive_from_new_cmds_RC \
11138     predep_objects_RC \
11139     postdep_objects_RC \
11140     predeps_RC \
11141     postdeps_RC \
11142     compiler_lib_search_path_RC \
11143     archive_cmds_RC \
11144     archive_expsym_cmds_RC \
11145     postinstall_cmds_RC \
11146     postuninstall_cmds_RC \
11147     old_archive_from_expsyms_cmds_RC \
11148     allow_undefined_flag_RC \
11149     no_undefined_flag_RC \
11150     export_symbols_cmds_RC \
11151     hardcode_libdir_flag_spec_RC \
11152     hardcode_libdir_flag_spec_ld_RC \
11153     hardcode_libdir_separator_RC \
11154     hardcode_automatic_RC \
11155     module_cmds_RC \
11156     module_expsym_cmds_RC \
11157     lt_cv_prog_compiler_c_o_RC \
11158     exclude_expsyms_RC \
11159     include_expsyms_RC; do
11160
11161     case $var in
11162     old_archive_cmds_RC | \
11163     old_archive_from_new_cmds_RC | \
11164     archive_cmds_RC | \
11165     archive_expsym_cmds_RC | \
11166     module_cmds_RC | \
11167     module_expsym_cmds_RC | \
11168     old_archive_from_expsyms_cmds_RC | \
11169     export_symbols_cmds_RC | \
11170     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11171     postinstall_cmds | postuninstall_cmds | \
11172     old_postinstall_cmds | old_postuninstall_cmds | \
11173     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11174       # Double-quote double-evaled strings.
11175       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11176       ;;
11177     *)
11178       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11179       ;;
11180     esac
11181   done
11182
11183   case $lt_echo in
11184   *'\$0 --fallback-echo"')
11185     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11186     ;;
11187   esac
11188
11189 cfgfile="$ofile"
11190
11191   cat <<__EOF__ >> "$cfgfile"
11192 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
11193
11194 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11195
11196 # Shell to use when invoking shell scripts.
11197 SHELL=$lt_SHELL
11198
11199 # Whether or not to build shared libraries.
11200 build_libtool_libs=$enable_shared
11201
11202 # Whether or not to build static libraries.
11203 build_old_libs=$enable_static
11204
11205 # Whether or not to add -lc for building shared libraries.
11206 build_libtool_need_lc=$archive_cmds_need_lc_RC
11207
11208 # Whether or not to disallow shared libs when runtime libs are static
11209 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
11210
11211 # Whether or not to optimize for fast installation.
11212 fast_install=$enable_fast_install
11213
11214 # The host system.
11215 host_alias=$host_alias
11216 host=$host
11217 host_os=$host_os
11218
11219 # The build system.
11220 build_alias=$build_alias
11221 build=$build
11222 build_os=$build_os
11223
11224 # An echo program that does not interpret backslashes.
11225 echo=$lt_echo
11226
11227 # The archiver.
11228 AR=$lt_AR
11229 AR_FLAGS=$lt_AR_FLAGS
11230
11231 # A C compiler.
11232 LTCC=$lt_LTCC
11233
11234 # A language-specific compiler.
11235 CC=$lt_compiler_RC
11236
11237 # Is the compiler the GNU C compiler?
11238 with_gcc=$GCC_RC
11239
11240 # An ERE matcher.
11241 EGREP=$lt_EGREP
11242
11243 # The linker used to build libraries.
11244 LD=$lt_LD_RC
11245
11246 # Whether we need hard or soft links.
11247 LN_S=$lt_LN_S
11248
11249 # A BSD-compatible nm program.
11250 NM=$lt_NM
11251
11252 # A symbol stripping program
11253 STRIP=$lt_STRIP
11254
11255 # Used to examine libraries when file_magic_cmd begins "file"
11256 MAGIC_CMD=$MAGIC_CMD
11257
11258 # Used on cygwin: DLL creation program.
11259 DLLTOOL="$DLLTOOL"
11260
11261 # Used on cygwin: object dumper.
11262 OBJDUMP="$OBJDUMP"
11263
11264 # Used on cygwin: assembler.
11265 AS="$AS"
11266
11267 # The name of the directory that contains temporary libtool files.
11268 objdir=$objdir
11269
11270 # How to create reloadable object files.
11271 reload_flag=$lt_reload_flag
11272 reload_cmds=$lt_reload_cmds
11273
11274 # How to pass a linker flag through the compiler.
11275 wl=$lt_lt_prog_compiler_wl_RC
11276
11277 # Object file suffix (normally "o").
11278 objext="$ac_objext"
11279
11280 # Old archive suffix (normally "a").
11281 libext="$libext"
11282
11283 # Shared library suffix (normally ".so").
11284 shrext_cmds='$shrext_cmds'
11285
11286 # Executable file suffix (normally "").
11287 exeext="$exeext"
11288
11289 # Additional compiler flags for building library objects.
11290 pic_flag=$lt_lt_prog_compiler_pic_RC
11291 pic_mode=$pic_mode
11292
11293 # What is the maximum length of a command?
11294 max_cmd_len=$lt_cv_sys_max_cmd_len
11295
11296 # Does compiler simultaneously support -c and -o options?
11297 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
11298
11299 # Must we lock files when doing compilation?
11300 need_locks=$lt_need_locks
11301
11302 # Do we need the lib prefix for modules?
11303 need_lib_prefix=$need_lib_prefix
11304
11305 # Do we need a version for libraries?
11306 need_version=$need_version
11307
11308 # Whether dlopen is supported.
11309 dlopen_support=$enable_dlopen
11310
11311 # Whether dlopen of programs is supported.
11312 dlopen_self=$enable_dlopen_self
11313
11314 # Whether dlopen of statically linked programs is supported.
11315 dlopen_self_static=$enable_dlopen_self_static
11316
11317 # Compiler flag to prevent dynamic linking.
11318 link_static_flag=$lt_lt_prog_compiler_static_RC
11319
11320 # Compiler flag to turn off builtin functions.
11321 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
11322
11323 # Compiler flag to allow reflexive dlopens.
11324 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
11325
11326 # Compiler flag to generate shared objects directly from archives.
11327 whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
11328
11329 # Compiler flag to generate thread-safe objects.
11330 thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
11331
11332 # Library versioning type.
11333 version_type=$version_type
11334
11335 # Format of library name prefix.
11336 libname_spec=$lt_libname_spec
11337
11338 # List of archive names.  First name is the real one, the rest are links.
11339 # The last name is the one that the linker finds with -lNAME.
11340 library_names_spec=$lt_library_names_spec
11341
11342 # The coded name of the library, if different from the real name.
11343 soname_spec=$lt_soname_spec
11344
11345 # Commands used to build and install an old-style archive.
11346 RANLIB=$lt_RANLIB
11347 old_archive_cmds=$lt_old_archive_cmds_RC
11348 old_postinstall_cmds=$lt_old_postinstall_cmds
11349 old_postuninstall_cmds=$lt_old_postuninstall_cmds
11350
11351 # Create an old-style archive from a shared archive.
11352 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
11353
11354 # Create a temporary old-style archive to link instead of a shared archive.
11355 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
11356
11357 # Commands used to build and install a shared archive.
11358 archive_cmds=$lt_archive_cmds_RC
11359 archive_expsym_cmds=$lt_archive_expsym_cmds_RC
11360 postinstall_cmds=$lt_postinstall_cmds
11361 postuninstall_cmds=$lt_postuninstall_cmds
11362
11363 # Commands used to build a loadable module (assumed same as above if empty)
11364 module_cmds=$lt_module_cmds_RC
11365 module_expsym_cmds=$lt_module_expsym_cmds_RC
11366
11367 # Commands to strip libraries.
11368 old_striplib=$lt_old_striplib
11369 striplib=$lt_striplib
11370
11371 # Dependencies to place before the objects being linked to create a
11372 # shared library.
11373 predep_objects=$lt_predep_objects_RC
11374
11375 # Dependencies to place after the objects being linked to create a
11376 # shared library.
11377 postdep_objects=$lt_postdep_objects_RC
11378
11379 # Dependencies to place before the objects being linked to create a
11380 # shared library.
11381 predeps=$lt_predeps_RC
11382
11383 # Dependencies to place after the objects being linked to create a
11384 # shared library.
11385 postdeps=$lt_postdeps_RC
11386
11387 # The library search path used internally by the compiler when linking
11388 # a shared library.
11389 compiler_lib_search_path=$lt_compiler_lib_search_path_RC
11390
11391 # Method to check whether dependent libraries are shared objects.
11392 deplibs_check_method=$lt_deplibs_check_method
11393
11394 # Command to use when deplibs_check_method == file_magic.
11395 file_magic_cmd=$lt_file_magic_cmd
11396
11397 # Flag that allows shared libraries with undefined symbols to be built.
11398 allow_undefined_flag=$lt_allow_undefined_flag_RC
11399
11400 # Flag that forces no undefined symbols.
11401 no_undefined_flag=$lt_no_undefined_flag_RC
11402
11403 # Commands used to finish a libtool library installation in a directory.
11404 finish_cmds=$lt_finish_cmds
11405
11406 # Same as above, but a single script fragment to be evaled but not shown.
11407 finish_eval=$lt_finish_eval
11408
11409 # Take the output of nm and produce a listing of raw symbols and C names.
11410 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
11411
11412 # Transform the output of nm in a proper C declaration
11413 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
11414
11415 # Transform the output of nm in a C name address pair
11416 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
11417
11418 # This is the shared library runtime path variable.
11419 runpath_var=$runpath_var
11420
11421 # This is the shared library path variable.
11422 shlibpath_var=$shlibpath_var
11423
11424 # Is shlibpath searched before the hard-coded library search path?
11425 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
11426
11427 # How to hardcode a shared library path into an executable.
11428 hardcode_action=$hardcode_action_RC
11429
11430 # Whether we should hardcode library paths into libraries.
11431 hardcode_into_libs=$hardcode_into_libs
11432
11433 # Flag to hardcode \$libdir into a binary during linking.
11434 # This must work even if \$libdir does not exist.
11435 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
11436
11437 # If ld is used when linking, flag to hardcode \$libdir into
11438 # a binary during linking. This must work even if \$libdir does
11439 # not exist.
11440 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
11441
11442 # Whether we need a single -rpath flag with a separated argument.
11443 hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
11444
11445 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
11446 # resulting binary.
11447 hardcode_direct=$hardcode_direct_RC
11448
11449 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
11450 # resulting binary.
11451 hardcode_minus_L=$hardcode_minus_L_RC
11452
11453 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
11454 # the resulting binary.
11455 hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
11456
11457 # Set to yes if building a shared library automatically hardcodes DIR into the library
11458 # and all subsequent libraries and executables linked against it.
11459 hardcode_automatic=$hardcode_automatic_RC
11460
11461 # Variables whose values should be saved in libtool wrapper scripts and
11462 # restored at relink time.
11463 variables_saved_for_relink="$variables_saved_for_relink"
11464
11465 # Whether libtool must link a program against all its dependency libraries.
11466 link_all_deplibs=$link_all_deplibs_RC
11467
11468 # Compile-time system search path for libraries
11469 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
11470
11471 # Run-time system search path for libraries
11472 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
11473
11474 # Fix the shell variable \$srcfile for the compiler.
11475 fix_srcfile_path="$fix_srcfile_path_RC"
11476
11477 # Set to yes if exported symbols are required.
11478 always_export_symbols=$always_export_symbols_RC
11479
11480 # The commands to list exported symbols.
11481 export_symbols_cmds=$lt_export_symbols_cmds_RC
11482
11483 # The commands to extract the exported symbol list from a shared archive.
11484 extract_expsyms_cmds=$lt_extract_expsyms_cmds
11485
11486 # Symbols that should not be listed in the preloaded symbols.
11487 exclude_expsyms=$lt_exclude_expsyms_RC
11488
11489 # Symbols that must always be exported.
11490 include_expsyms=$lt_include_expsyms_RC
11491
11492 # ### END LIBTOOL TAG CONFIG: $tagname
11493
11494 __EOF__
11495
11496
11497 else
11498   # If there is no Makefile yet, we rely on a make rule to execute
11499   # `config.status --recheck' to rerun these tests and create the
11500   # libtool script then.
11501   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
11502   if test -f "$ltmain_in"; then
11503     test -f Makefile && make "$ltmain"
11504   fi
11505 fi
11506
11507
11508 ac_ext=c
11509 ac_cpp='$CPP $CPPFLAGS'
11510 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11511 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11512 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11513
11514 CC="$lt_save_CC"
11515
11516         ;;
11517
11518       *)
11519         { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
11520 echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
11521    { (exit 1); exit 1; }; }
11522         ;;
11523       esac
11524
11525       # Append the new tag name to the list of available tags.
11526       if test -n "$tagname" ; then
11527       available_tags="$available_tags $tagname"
11528     fi
11529     fi
11530   done
11531   IFS="$lt_save_ifs"
11532
11533   # Now substitute the updated list of available tags.
11534   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
11535     mv "${ofile}T" "$ofile"
11536     chmod +x "$ofile"
11537   else
11538     rm -f "${ofile}T"
11539     { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
11540 echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
11541    { (exit 1); exit 1; }; }
11542   fi
11543 fi
11544
11545
11546
11547 # This can be used to rebuild libtool when needed
11548 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
11549
11550 # Always use our own libtool.
11551 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
11552
11553 # Prevent multiple expansion
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564 ol_link_perl=no
11565 if test $ol_enable_perl != no ; then
11566         # Extract the first word of "perl", so it can be a program name with args.
11567 set dummy perl; ac_word=$2
11568 echo "$as_me:$LINENO: checking for $ac_word" >&5
11569 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11570 if test "${ac_cv_path_PERLBIN+set}" = set; then
11571   echo $ECHO_N "(cached) $ECHO_C" >&6
11572 else
11573   case $PERLBIN in
11574   [\\/]* | ?:[\\/]*)
11575   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
11576   ;;
11577   *)
11578   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11579 for as_dir in $PATH
11580 do
11581   IFS=$as_save_IFS
11582   test -z "$as_dir" && as_dir=.
11583   for ac_exec_ext in '' $ac_executable_extensions; do
11584   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11585     ac_cv_path_PERLBIN="$as_dir/$ac_word$ac_exec_ext"
11586     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11587     break 2
11588   fi
11589 done
11590 done
11591
11592   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
11593   ;;
11594 esac
11595 fi
11596 PERLBIN=$ac_cv_path_PERLBIN
11597
11598 if test -n "$PERLBIN"; then
11599   echo "$as_me:$LINENO: result: $PERLBIN" >&5
11600 echo "${ECHO_T}$PERLBIN" >&6
11601 else
11602   echo "$as_me:$LINENO: result: no" >&5
11603 echo "${ECHO_T}no" >&6
11604 fi
11605
11606
11607         if test "no$PERLBIN" = "no" ; then
11608                 if test $ol_enable_perl = yes ; then
11609                         { { echo "$as_me:$LINENO: error: could not locate perl" >&5
11610 echo "$as_me: error: could not locate perl" >&2;}
11611    { (exit 1); exit 1; }; }
11612                 fi
11613
11614         else
11615                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
11616                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
11617
11618                 if test x"$ol_enable_perl" = "xyes" ; then
11619                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
11620                 else
11621                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
11622                 fi
11623                                 ol_link_perl=yes
11624         fi
11625 fi
11626
11627 ac_ext=c
11628 ac_cpp='$CPP $CPPFLAGS'
11629 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11630 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11631 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11632 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
11633 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
11634 # On Suns, sometimes $CPP names a directory.
11635 if test -n "$CPP" && test -d "$CPP"; then
11636   CPP=
11637 fi
11638 if test -z "$CPP"; then
11639   if test "${ac_cv_prog_CPP+set}" = set; then
11640   echo $ECHO_N "(cached) $ECHO_C" >&6
11641 else
11642       # Double quotes because CPP needs to be expanded
11643     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
11644     do
11645       ac_preproc_ok=false
11646 for ac_c_preproc_warn_flag in '' yes
11647 do
11648   # Use a header file that comes with gcc, so configuring glibc
11649   # with a fresh cross-compiler works.
11650   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11651   # <limits.h> exists even on freestanding compilers.
11652   # On the NeXT, cc -E runs the code through the compiler's parser,
11653   # not just through cpp. "Syntax error" is here to catch this case.
11654   cat >conftest.$ac_ext <<_ACEOF
11655 /* confdefs.h.  */
11656 _ACEOF
11657 cat confdefs.h >>conftest.$ac_ext
11658 cat >>conftest.$ac_ext <<_ACEOF
11659 /* end confdefs.h.  */
11660 #ifdef __STDC__
11661 # include <limits.h>
11662 #else
11663 # include <assert.h>
11664 #endif
11665                      Syntax error
11666 _ACEOF
11667 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11668   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11669   ac_status=$?
11670   grep -v '^ *+' conftest.er1 >conftest.err
11671   rm -f conftest.er1
11672   cat conftest.err >&5
11673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11674   (exit $ac_status); } >/dev/null; then
11675   if test -s conftest.err; then
11676     ac_cpp_err=$ac_c_preproc_warn_flag
11677     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11678   else
11679     ac_cpp_err=
11680   fi
11681 else
11682   ac_cpp_err=yes
11683 fi
11684 if test -z "$ac_cpp_err"; then
11685   :
11686 else
11687   echo "$as_me: failed program was:" >&5
11688 sed 's/^/| /' conftest.$ac_ext >&5
11689
11690   # Broken: fails on valid input.
11691 continue
11692 fi
11693 rm -f conftest.err conftest.$ac_ext
11694
11695   # OK, works on sane cases.  Now check whether non-existent headers
11696   # can be detected and how.
11697   cat >conftest.$ac_ext <<_ACEOF
11698 /* confdefs.h.  */
11699 _ACEOF
11700 cat confdefs.h >>conftest.$ac_ext
11701 cat >>conftest.$ac_ext <<_ACEOF
11702 /* end confdefs.h.  */
11703 #include <ac_nonexistent.h>
11704 _ACEOF
11705 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11706   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11707   ac_status=$?
11708   grep -v '^ *+' conftest.er1 >conftest.err
11709   rm -f conftest.er1
11710   cat conftest.err >&5
11711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11712   (exit $ac_status); } >/dev/null; then
11713   if test -s conftest.err; then
11714     ac_cpp_err=$ac_c_preproc_warn_flag
11715     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11716   else
11717     ac_cpp_err=
11718   fi
11719 else
11720   ac_cpp_err=yes
11721 fi
11722 if test -z "$ac_cpp_err"; then
11723   # Broken: success on invalid input.
11724 continue
11725 else
11726   echo "$as_me: failed program was:" >&5
11727 sed 's/^/| /' conftest.$ac_ext >&5
11728
11729   # Passes both tests.
11730 ac_preproc_ok=:
11731 break
11732 fi
11733 rm -f conftest.err conftest.$ac_ext
11734
11735 done
11736 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
11737 rm -f conftest.err conftest.$ac_ext
11738 if $ac_preproc_ok; then
11739   break
11740 fi
11741
11742     done
11743     ac_cv_prog_CPP=$CPP
11744
11745 fi
11746   CPP=$ac_cv_prog_CPP
11747 else
11748   ac_cv_prog_CPP=$CPP
11749 fi
11750 echo "$as_me:$LINENO: result: $CPP" >&5
11751 echo "${ECHO_T}$CPP" >&6
11752 ac_preproc_ok=false
11753 for ac_c_preproc_warn_flag in '' yes
11754 do
11755   # Use a header file that comes with gcc, so configuring glibc
11756   # with a fresh cross-compiler works.
11757   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11758   # <limits.h> exists even on freestanding compilers.
11759   # On the NeXT, cc -E runs the code through the compiler's parser,
11760   # not just through cpp. "Syntax error" is here to catch this case.
11761   cat >conftest.$ac_ext <<_ACEOF
11762 /* confdefs.h.  */
11763 _ACEOF
11764 cat confdefs.h >>conftest.$ac_ext
11765 cat >>conftest.$ac_ext <<_ACEOF
11766 /* end confdefs.h.  */
11767 #ifdef __STDC__
11768 # include <limits.h>
11769 #else
11770 # include <assert.h>
11771 #endif
11772                      Syntax error
11773 _ACEOF
11774 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11775   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11776   ac_status=$?
11777   grep -v '^ *+' conftest.er1 >conftest.err
11778   rm -f conftest.er1
11779   cat conftest.err >&5
11780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11781   (exit $ac_status); } >/dev/null; then
11782   if test -s conftest.err; then
11783     ac_cpp_err=$ac_c_preproc_warn_flag
11784     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11785   else
11786     ac_cpp_err=
11787   fi
11788 else
11789   ac_cpp_err=yes
11790 fi
11791 if test -z "$ac_cpp_err"; then
11792   :
11793 else
11794   echo "$as_me: failed program was:" >&5
11795 sed 's/^/| /' conftest.$ac_ext >&5
11796
11797   # Broken: fails on valid input.
11798 continue
11799 fi
11800 rm -f conftest.err conftest.$ac_ext
11801
11802   # OK, works on sane cases.  Now check whether non-existent headers
11803   # can be detected and how.
11804   cat >conftest.$ac_ext <<_ACEOF
11805 /* confdefs.h.  */
11806 _ACEOF
11807 cat confdefs.h >>conftest.$ac_ext
11808 cat >>conftest.$ac_ext <<_ACEOF
11809 /* end confdefs.h.  */
11810 #include <ac_nonexistent.h>
11811 _ACEOF
11812 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11813   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11814   ac_status=$?
11815   grep -v '^ *+' conftest.er1 >conftest.err
11816   rm -f conftest.er1
11817   cat conftest.err >&5
11818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11819   (exit $ac_status); } >/dev/null; then
11820   if test -s conftest.err; then
11821     ac_cpp_err=$ac_c_preproc_warn_flag
11822     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11823   else
11824     ac_cpp_err=
11825   fi
11826 else
11827   ac_cpp_err=yes
11828 fi
11829 if test -z "$ac_cpp_err"; then
11830   # Broken: success on invalid input.
11831 continue
11832 else
11833   echo "$as_me: failed program was:" >&5
11834 sed 's/^/| /' conftest.$ac_ext >&5
11835
11836   # Passes both tests.
11837 ac_preproc_ok=:
11838 break
11839 fi
11840 rm -f conftest.err conftest.$ac_ext
11841
11842 done
11843 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
11844 rm -f conftest.err conftest.$ac_ext
11845 if $ac_preproc_ok; then
11846   :
11847 else
11848   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
11849 See \`config.log' for more details." >&5
11850 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
11851 See \`config.log' for more details." >&2;}
11852    { (exit 1); exit 1; }; }
11853 fi
11854
11855 ac_ext=c
11856 ac_cpp='$CPP $CPPFLAGS'
11857 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11858 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11859 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11860
11861
11862 case $host_os in
11863   *mingw32* ) ac_cv_mingw32=yes ;;
11864   *cygwin* ) ac_cv_cygwin=yes ;;
11865 esac
11866
11867
11868
11869
11870 cat >>confdefs.h <<_ACEOF
11871 #define EXEEXT "${EXEEXT}"
11872 _ACEOF
11873
11874
11875 echo "$as_me:$LINENO: checking for be_app in -lbe" >&5
11876 echo $ECHO_N "checking for be_app in -lbe... $ECHO_C" >&6
11877 if test "${ac_cv_lib_be_be_app+set}" = set; then
11878   echo $ECHO_N "(cached) $ECHO_C" >&6
11879 else
11880   ac_check_lib_save_LIBS=$LIBS
11881 LIBS="-lbe -lroot -lnet $LIBS"
11882 cat >conftest.$ac_ext <<_ACEOF
11883 /* confdefs.h.  */
11884 _ACEOF
11885 cat confdefs.h >>conftest.$ac_ext
11886 cat >>conftest.$ac_ext <<_ACEOF
11887 /* end confdefs.h.  */
11888
11889 /* Override any gcc2 internal prototype to avoid an error.  */
11890 #ifdef __cplusplus
11891 extern "C"
11892 #endif
11893 /* We use char because int might match the return type of a gcc2
11894    builtin and then its argument prototype would still apply.  */
11895 char be_app ();
11896 int
11897 main ()
11898 {
11899 be_app ();
11900   ;
11901   return 0;
11902 }
11903 _ACEOF
11904 rm -f conftest.$ac_objext conftest$ac_exeext
11905 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11906   (eval $ac_link) 2>conftest.er1
11907   ac_status=$?
11908   grep -v '^ *+' conftest.er1 >conftest.err
11909   rm -f conftest.er1
11910   cat conftest.err >&5
11911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11912   (exit $ac_status); } &&
11913          { ac_try='test -z "$ac_c_werror_flag"
11914                          || test ! -s conftest.err'
11915   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11916   (eval $ac_try) 2>&5
11917   ac_status=$?
11918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11919   (exit $ac_status); }; } &&
11920          { ac_try='test -s conftest$ac_exeext'
11921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11922   (eval $ac_try) 2>&5
11923   ac_status=$?
11924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11925   (exit $ac_status); }; }; then
11926   ac_cv_lib_be_be_app=yes
11927 else
11928   echo "$as_me: failed program was:" >&5
11929 sed 's/^/| /' conftest.$ac_ext >&5
11930
11931 ac_cv_lib_be_be_app=no
11932 fi
11933 rm -f conftest.err conftest.$ac_objext \
11934       conftest$ac_exeext conftest.$ac_ext
11935 LIBS=$ac_check_lib_save_LIBS
11936 fi
11937 echo "$as_me:$LINENO: result: $ac_cv_lib_be_be_app" >&5
11938 echo "${ECHO_T}$ac_cv_lib_be_be_app" >&6
11939 if test $ac_cv_lib_be_be_app = yes; then
11940   LIBS="$LIBS -lbe -lroot -lnet"
11941 else
11942   :
11943 fi
11944
11945
11946 ac_ext=c
11947 ac_cpp='$CPP $CPPFLAGS'
11948 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11949 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11950 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11951 if test -n "$ac_tool_prefix"; then
11952   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
11953 set dummy ${ac_tool_prefix}gcc; ac_word=$2
11954 echo "$as_me:$LINENO: checking for $ac_word" >&5
11955 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11956 if test "${ac_cv_prog_CC+set}" = set; then
11957   echo $ECHO_N "(cached) $ECHO_C" >&6
11958 else
11959   if test -n "$CC"; then
11960   ac_cv_prog_CC="$CC" # Let the user override the test.
11961 else
11962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11963 for as_dir in $PATH
11964 do
11965   IFS=$as_save_IFS
11966   test -z "$as_dir" && as_dir=.
11967   for ac_exec_ext in '' $ac_executable_extensions; do
11968   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11969     ac_cv_prog_CC="${ac_tool_prefix}gcc"
11970     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11971     break 2
11972   fi
11973 done
11974 done
11975
11976 fi
11977 fi
11978 CC=$ac_cv_prog_CC
11979 if test -n "$CC"; then
11980   echo "$as_me:$LINENO: result: $CC" >&5
11981 echo "${ECHO_T}$CC" >&6
11982 else
11983   echo "$as_me:$LINENO: result: no" >&5
11984 echo "${ECHO_T}no" >&6
11985 fi
11986
11987 fi
11988 if test -z "$ac_cv_prog_CC"; then
11989   ac_ct_CC=$CC
11990   # Extract the first word of "gcc", so it can be a program name with args.
11991 set dummy gcc; ac_word=$2
11992 echo "$as_me:$LINENO: checking for $ac_word" >&5
11993 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11994 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
11995   echo $ECHO_N "(cached) $ECHO_C" >&6
11996 else
11997   if test -n "$ac_ct_CC"; then
11998   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
11999 else
12000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12001 for as_dir in $PATH
12002 do
12003   IFS=$as_save_IFS
12004   test -z "$as_dir" && as_dir=.
12005   for ac_exec_ext in '' $ac_executable_extensions; do
12006   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12007     ac_cv_prog_ac_ct_CC="gcc"
12008     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12009     break 2
12010   fi
12011 done
12012 done
12013
12014 fi
12015 fi
12016 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12017 if test -n "$ac_ct_CC"; then
12018   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
12019 echo "${ECHO_T}$ac_ct_CC" >&6
12020 else
12021   echo "$as_me:$LINENO: result: no" >&5
12022 echo "${ECHO_T}no" >&6
12023 fi
12024
12025   CC=$ac_ct_CC
12026 else
12027   CC="$ac_cv_prog_CC"
12028 fi
12029
12030 if test -z "$CC"; then
12031   if test -n "$ac_tool_prefix"; then
12032   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
12033 set dummy ${ac_tool_prefix}cc; ac_word=$2
12034 echo "$as_me:$LINENO: checking for $ac_word" >&5
12035 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12036 if test "${ac_cv_prog_CC+set}" = set; then
12037   echo $ECHO_N "(cached) $ECHO_C" >&6
12038 else
12039   if test -n "$CC"; then
12040   ac_cv_prog_CC="$CC" # Let the user override the test.
12041 else
12042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12043 for as_dir in $PATH
12044 do
12045   IFS=$as_save_IFS
12046   test -z "$as_dir" && as_dir=.
12047   for ac_exec_ext in '' $ac_executable_extensions; do
12048   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12049     ac_cv_prog_CC="${ac_tool_prefix}cc"
12050     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12051     break 2
12052   fi
12053 done
12054 done
12055
12056 fi
12057 fi
12058 CC=$ac_cv_prog_CC
12059 if test -n "$CC"; then
12060   echo "$as_me:$LINENO: result: $CC" >&5
12061 echo "${ECHO_T}$CC" >&6
12062 else
12063   echo "$as_me:$LINENO: result: no" >&5
12064 echo "${ECHO_T}no" >&6
12065 fi
12066
12067 fi
12068 if test -z "$ac_cv_prog_CC"; then
12069   ac_ct_CC=$CC
12070   # Extract the first word of "cc", so it can be a program name with args.
12071 set dummy cc; ac_word=$2
12072 echo "$as_me:$LINENO: checking for $ac_word" >&5
12073 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12074 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
12075   echo $ECHO_N "(cached) $ECHO_C" >&6
12076 else
12077   if test -n "$ac_ct_CC"; then
12078   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12079 else
12080 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12081 for as_dir in $PATH
12082 do
12083   IFS=$as_save_IFS
12084   test -z "$as_dir" && as_dir=.
12085   for ac_exec_ext in '' $ac_executable_extensions; do
12086   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12087     ac_cv_prog_ac_ct_CC="cc"
12088     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12089     break 2
12090   fi
12091 done
12092 done
12093
12094 fi
12095 fi
12096 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12097 if test -n "$ac_ct_CC"; then
12098   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
12099 echo "${ECHO_T}$ac_ct_CC" >&6
12100 else
12101   echo "$as_me:$LINENO: result: no" >&5
12102 echo "${ECHO_T}no" >&6
12103 fi
12104
12105   CC=$ac_ct_CC
12106 else
12107   CC="$ac_cv_prog_CC"
12108 fi
12109
12110 fi
12111 if test -z "$CC"; then
12112   # Extract the first word of "cc", so it can be a program name with args.
12113 set dummy cc; ac_word=$2
12114 echo "$as_me:$LINENO: checking for $ac_word" >&5
12115 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12116 if test "${ac_cv_prog_CC+set}" = set; then
12117   echo $ECHO_N "(cached) $ECHO_C" >&6
12118 else
12119   if test -n "$CC"; then
12120   ac_cv_prog_CC="$CC" # Let the user override the test.
12121 else
12122   ac_prog_rejected=no
12123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12124 for as_dir in $PATH
12125 do
12126   IFS=$as_save_IFS
12127   test -z "$as_dir" && as_dir=.
12128   for ac_exec_ext in '' $ac_executable_extensions; do
12129   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12130     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
12131        ac_prog_rejected=yes
12132        continue
12133      fi
12134     ac_cv_prog_CC="cc"
12135     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12136     break 2
12137   fi
12138 done
12139 done
12140
12141 if test $ac_prog_rejected = yes; then
12142   # We found a bogon in the path, so make sure we never use it.
12143   set dummy $ac_cv_prog_CC
12144   shift
12145   if test $# != 0; then
12146     # We chose a different compiler from the bogus one.
12147     # However, it has the same basename, so the bogon will be chosen
12148     # first if we set CC to just the basename; use the full file name.
12149     shift
12150     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
12151   fi
12152 fi
12153 fi
12154 fi
12155 CC=$ac_cv_prog_CC
12156 if test -n "$CC"; then
12157   echo "$as_me:$LINENO: result: $CC" >&5
12158 echo "${ECHO_T}$CC" >&6
12159 else
12160   echo "$as_me:$LINENO: result: no" >&5
12161 echo "${ECHO_T}no" >&6
12162 fi
12163
12164 fi
12165 if test -z "$CC"; then
12166   if test -n "$ac_tool_prefix"; then
12167   for ac_prog in cl
12168   do
12169     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12170 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12171 echo "$as_me:$LINENO: checking for $ac_word" >&5
12172 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12173 if test "${ac_cv_prog_CC+set}" = set; then
12174   echo $ECHO_N "(cached) $ECHO_C" >&6
12175 else
12176   if test -n "$CC"; then
12177   ac_cv_prog_CC="$CC" # Let the user override the test.
12178 else
12179 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12180 for as_dir in $PATH
12181 do
12182   IFS=$as_save_IFS
12183   test -z "$as_dir" && as_dir=.
12184   for ac_exec_ext in '' $ac_executable_extensions; do
12185   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12186     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
12187     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12188     break 2
12189   fi
12190 done
12191 done
12192
12193 fi
12194 fi
12195 CC=$ac_cv_prog_CC
12196 if test -n "$CC"; then
12197   echo "$as_me:$LINENO: result: $CC" >&5
12198 echo "${ECHO_T}$CC" >&6
12199 else
12200   echo "$as_me:$LINENO: result: no" >&5
12201 echo "${ECHO_T}no" >&6
12202 fi
12203
12204     test -n "$CC" && break
12205   done
12206 fi
12207 if test -z "$CC"; then
12208   ac_ct_CC=$CC
12209   for ac_prog in cl
12210 do
12211   # Extract the first word of "$ac_prog", so it can be a program name with args.
12212 set dummy $ac_prog; ac_word=$2
12213 echo "$as_me:$LINENO: checking for $ac_word" >&5
12214 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12215 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
12216   echo $ECHO_N "(cached) $ECHO_C" >&6
12217 else
12218   if test -n "$ac_ct_CC"; then
12219   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12220 else
12221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12222 for as_dir in $PATH
12223 do
12224   IFS=$as_save_IFS
12225   test -z "$as_dir" && as_dir=.
12226   for ac_exec_ext in '' $ac_executable_extensions; do
12227   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12228     ac_cv_prog_ac_ct_CC="$ac_prog"
12229     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12230     break 2
12231   fi
12232 done
12233 done
12234
12235 fi
12236 fi
12237 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12238 if test -n "$ac_ct_CC"; then
12239   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
12240 echo "${ECHO_T}$ac_ct_CC" >&6
12241 else
12242   echo "$as_me:$LINENO: result: no" >&5
12243 echo "${ECHO_T}no" >&6
12244 fi
12245
12246   test -n "$ac_ct_CC" && break
12247 done
12248
12249   CC=$ac_ct_CC
12250 fi
12251
12252 fi
12253
12254
12255 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
12256 See \`config.log' for more details." >&5
12257 echo "$as_me: error: no acceptable C compiler found in \$PATH
12258 See \`config.log' for more details." >&2;}
12259    { (exit 1); exit 1; }; }
12260
12261 # Provide some information about the compiler.
12262 echo "$as_me:$LINENO:" \
12263      "checking for C compiler version" >&5
12264 ac_compiler=`set X $ac_compile; echo $2`
12265 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
12266   (eval $ac_compiler --version </dev/null >&5) 2>&5
12267   ac_status=$?
12268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12269   (exit $ac_status); }
12270 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
12271   (eval $ac_compiler -v </dev/null >&5) 2>&5
12272   ac_status=$?
12273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12274   (exit $ac_status); }
12275 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
12276   (eval $ac_compiler -V </dev/null >&5) 2>&5
12277   ac_status=$?
12278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12279   (exit $ac_status); }
12280
12281 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
12282 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
12283 if test "${ac_cv_c_compiler_gnu+set}" = set; then
12284   echo $ECHO_N "(cached) $ECHO_C" >&6
12285 else
12286   cat >conftest.$ac_ext <<_ACEOF
12287 /* confdefs.h.  */
12288 _ACEOF
12289 cat confdefs.h >>conftest.$ac_ext
12290 cat >>conftest.$ac_ext <<_ACEOF
12291 /* end confdefs.h.  */
12292
12293 int
12294 main ()
12295 {
12296 #ifndef __GNUC__
12297        choke me
12298 #endif
12299
12300   ;
12301   return 0;
12302 }
12303 _ACEOF
12304 rm -f conftest.$ac_objext
12305 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12306   (eval $ac_compile) 2>conftest.er1
12307   ac_status=$?
12308   grep -v '^ *+' conftest.er1 >conftest.err
12309   rm -f conftest.er1
12310   cat conftest.err >&5
12311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12312   (exit $ac_status); } &&
12313          { ac_try='test -z "$ac_c_werror_flag"
12314                          || test ! -s conftest.err'
12315   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12316   (eval $ac_try) 2>&5
12317   ac_status=$?
12318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12319   (exit $ac_status); }; } &&
12320          { ac_try='test -s conftest.$ac_objext'
12321   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12322   (eval $ac_try) 2>&5
12323   ac_status=$?
12324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12325   (exit $ac_status); }; }; then
12326   ac_compiler_gnu=yes
12327 else
12328   echo "$as_me: failed program was:" >&5
12329 sed 's/^/| /' conftest.$ac_ext >&5
12330
12331 ac_compiler_gnu=no
12332 fi
12333 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12334 ac_cv_c_compiler_gnu=$ac_compiler_gnu
12335
12336 fi
12337 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
12338 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
12339 GCC=`test $ac_compiler_gnu = yes && echo yes`
12340 ac_test_CFLAGS=${CFLAGS+set}
12341 ac_save_CFLAGS=$CFLAGS
12342 CFLAGS="-g"
12343 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
12344 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
12345 if test "${ac_cv_prog_cc_g+set}" = set; then
12346   echo $ECHO_N "(cached) $ECHO_C" >&6
12347 else
12348   cat >conftest.$ac_ext <<_ACEOF
12349 /* confdefs.h.  */
12350 _ACEOF
12351 cat confdefs.h >>conftest.$ac_ext
12352 cat >>conftest.$ac_ext <<_ACEOF
12353 /* end confdefs.h.  */
12354
12355 int
12356 main ()
12357 {
12358
12359   ;
12360   return 0;
12361 }
12362 _ACEOF
12363 rm -f conftest.$ac_objext
12364 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12365   (eval $ac_compile) 2>conftest.er1
12366   ac_status=$?
12367   grep -v '^ *+' conftest.er1 >conftest.err
12368   rm -f conftest.er1
12369   cat conftest.err >&5
12370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12371   (exit $ac_status); } &&
12372          { ac_try='test -z "$ac_c_werror_flag"
12373                          || test ! -s conftest.err'
12374   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12375   (eval $ac_try) 2>&5
12376   ac_status=$?
12377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12378   (exit $ac_status); }; } &&
12379          { ac_try='test -s conftest.$ac_objext'
12380   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12381   (eval $ac_try) 2>&5
12382   ac_status=$?
12383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12384   (exit $ac_status); }; }; then
12385   ac_cv_prog_cc_g=yes
12386 else
12387   echo "$as_me: failed program was:" >&5
12388 sed 's/^/| /' conftest.$ac_ext >&5
12389
12390 ac_cv_prog_cc_g=no
12391 fi
12392 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12393 fi
12394 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
12395 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
12396 if test "$ac_test_CFLAGS" = set; then
12397   CFLAGS=$ac_save_CFLAGS
12398 elif test $ac_cv_prog_cc_g = yes; then
12399   if test "$GCC" = yes; then
12400     CFLAGS="-g -O2"
12401   else
12402     CFLAGS="-g"
12403   fi
12404 else
12405   if test "$GCC" = yes; then
12406     CFLAGS="-O2"
12407   else
12408     CFLAGS=
12409   fi
12410 fi
12411 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
12412 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
12413 if test "${ac_cv_prog_cc_stdc+set}" = set; then
12414   echo $ECHO_N "(cached) $ECHO_C" >&6
12415 else
12416   ac_cv_prog_cc_stdc=no
12417 ac_save_CC=$CC
12418 cat >conftest.$ac_ext <<_ACEOF
12419 /* confdefs.h.  */
12420 _ACEOF
12421 cat confdefs.h >>conftest.$ac_ext
12422 cat >>conftest.$ac_ext <<_ACEOF
12423 /* end confdefs.h.  */
12424 #include <stdarg.h>
12425 #include <stdio.h>
12426 #include <sys/types.h>
12427 #include <sys/stat.h>
12428 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12429 struct buf { int x; };
12430 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12431 static char *e (p, i)
12432      char **p;
12433      int i;
12434 {
12435   return p[i];
12436 }
12437 static char *f (char * (*g) (char **, int), char **p, ...)
12438 {
12439   char *s;
12440   va_list v;
12441   va_start (v,p);
12442   s = g (p, va_arg (v,int));
12443   va_end (v);
12444   return s;
12445 }
12446
12447 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
12448    function prototypes and stuff, but not '\xHH' hex character constants.
12449    These don't provoke an error unfortunately, instead are silently treated
12450    as 'x'.  The following induces an error, until -std1 is added to get
12451    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
12452    array size at least.  It's necessary to write '\x00'==0 to get something
12453    that's true only with -std1.  */
12454 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
12455
12456 int test (int i, double x);
12457 struct s1 {int (*f) (int a);};
12458 struct s2 {int (*f) (double a);};
12459 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12460 int argc;
12461 char **argv;
12462 int
12463 main ()
12464 {
12465 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12466   ;
12467   return 0;
12468 }
12469 _ACEOF
12470 # Don't try gcc -ansi; that turns off useful extensions and
12471 # breaks some systems' header files.
12472 # AIX                   -qlanglvl=ansi
12473 # Ultrix and OSF/1      -std1
12474 # HP-UX 10.20 and later -Ae
12475 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12476 # SVR4                  -Xc -D__EXTENSIONS__
12477 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12478 do
12479   CC="$ac_save_CC $ac_arg"
12480   rm -f conftest.$ac_objext
12481 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12482   (eval $ac_compile) 2>conftest.er1
12483   ac_status=$?
12484   grep -v '^ *+' conftest.er1 >conftest.err
12485   rm -f conftest.er1
12486   cat conftest.err >&5
12487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12488   (exit $ac_status); } &&
12489          { ac_try='test -z "$ac_c_werror_flag"
12490                          || test ! -s conftest.err'
12491   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12492   (eval $ac_try) 2>&5
12493   ac_status=$?
12494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12495   (exit $ac_status); }; } &&
12496          { ac_try='test -s conftest.$ac_objext'
12497   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12498   (eval $ac_try) 2>&5
12499   ac_status=$?
12500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12501   (exit $ac_status); }; }; then
12502   ac_cv_prog_cc_stdc=$ac_arg
12503 break
12504 else
12505   echo "$as_me: failed program was:" >&5
12506 sed 's/^/| /' conftest.$ac_ext >&5
12507
12508 fi
12509 rm -f conftest.err conftest.$ac_objext
12510 done
12511 rm -f conftest.$ac_ext conftest.$ac_objext
12512 CC=$ac_save_CC
12513
12514 fi
12515
12516 case "x$ac_cv_prog_cc_stdc" in
12517   x|xno)
12518     echo "$as_me:$LINENO: result: none needed" >&5
12519 echo "${ECHO_T}none needed" >&6 ;;
12520   *)
12521     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
12522 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12523     CC="$CC $ac_cv_prog_cc_stdc" ;;
12524 esac
12525
12526 # Some people use a C++ compiler to compile C.  Since we use `exit',
12527 # in C++ we need to declare it.  In case someone uses the same compiler
12528 # for both compiling C and C++ we need to have the C++ compiler decide
12529 # the declaration of exit, since it's the most demanding environment.
12530 cat >conftest.$ac_ext <<_ACEOF
12531 #ifndef __cplusplus
12532   choke me
12533 #endif
12534 _ACEOF
12535 rm -f conftest.$ac_objext
12536 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12537   (eval $ac_compile) 2>conftest.er1
12538   ac_status=$?
12539   grep -v '^ *+' conftest.er1 >conftest.err
12540   rm -f conftest.er1
12541   cat conftest.err >&5
12542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12543   (exit $ac_status); } &&
12544          { ac_try='test -z "$ac_c_werror_flag"
12545                          || test ! -s conftest.err'
12546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12547   (eval $ac_try) 2>&5
12548   ac_status=$?
12549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12550   (exit $ac_status); }; } &&
12551          { ac_try='test -s conftest.$ac_objext'
12552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12553   (eval $ac_try) 2>&5
12554   ac_status=$?
12555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12556   (exit $ac_status); }; }; then
12557   for ac_declaration in \
12558    '' \
12559    'extern "C" void std::exit (int) throw (); using std::exit;' \
12560    'extern "C" void std::exit (int); using std::exit;' \
12561    'extern "C" void exit (int) throw ();' \
12562    'extern "C" void exit (int);' \
12563    'void exit (int);'
12564 do
12565   cat >conftest.$ac_ext <<_ACEOF
12566 /* confdefs.h.  */
12567 _ACEOF
12568 cat confdefs.h >>conftest.$ac_ext
12569 cat >>conftest.$ac_ext <<_ACEOF
12570 /* end confdefs.h.  */
12571 $ac_declaration
12572 #include <stdlib.h>
12573 int
12574 main ()
12575 {
12576 exit (42);
12577   ;
12578   return 0;
12579 }
12580 _ACEOF
12581 rm -f conftest.$ac_objext
12582 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12583   (eval $ac_compile) 2>conftest.er1
12584   ac_status=$?
12585   grep -v '^ *+' conftest.er1 >conftest.err
12586   rm -f conftest.er1
12587   cat conftest.err >&5
12588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12589   (exit $ac_status); } &&
12590          { ac_try='test -z "$ac_c_werror_flag"
12591                          || test ! -s conftest.err'
12592   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12593   (eval $ac_try) 2>&5
12594   ac_status=$?
12595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12596   (exit $ac_status); }; } &&
12597          { ac_try='test -s conftest.$ac_objext'
12598   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12599   (eval $ac_try) 2>&5
12600   ac_status=$?
12601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12602   (exit $ac_status); }; }; then
12603   :
12604 else
12605   echo "$as_me: failed program was:" >&5
12606 sed 's/^/| /' conftest.$ac_ext >&5
12607
12608 continue
12609 fi
12610 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12611   cat >conftest.$ac_ext <<_ACEOF
12612 /* confdefs.h.  */
12613 _ACEOF
12614 cat confdefs.h >>conftest.$ac_ext
12615 cat >>conftest.$ac_ext <<_ACEOF
12616 /* end confdefs.h.  */
12617 $ac_declaration
12618 int
12619 main ()
12620 {
12621 exit (42);
12622   ;
12623   return 0;
12624 }
12625 _ACEOF
12626 rm -f conftest.$ac_objext
12627 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12628   (eval $ac_compile) 2>conftest.er1
12629   ac_status=$?
12630   grep -v '^ *+' conftest.er1 >conftest.err
12631   rm -f conftest.er1
12632   cat conftest.err >&5
12633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12634   (exit $ac_status); } &&
12635          { ac_try='test -z "$ac_c_werror_flag"
12636                          || test ! -s conftest.err'
12637   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12638   (eval $ac_try) 2>&5
12639   ac_status=$?
12640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12641   (exit $ac_status); }; } &&
12642          { ac_try='test -s conftest.$ac_objext'
12643   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12644   (eval $ac_try) 2>&5
12645   ac_status=$?
12646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12647   (exit $ac_status); }; }; then
12648   break
12649 else
12650   echo "$as_me: failed program was:" >&5
12651 sed 's/^/| /' conftest.$ac_ext >&5
12652
12653 fi
12654 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12655 done
12656 rm -f conftest*
12657 if test -n "$ac_declaration"; then
12658   echo '#ifdef __cplusplus' >>confdefs.h
12659   echo $ac_declaration      >>confdefs.h
12660   echo '#endif'             >>confdefs.h
12661 fi
12662
12663 else
12664   echo "$as_me: failed program was:" >&5
12665 sed 's/^/| /' conftest.$ac_ext >&5
12666
12667 fi
12668 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12669 ac_ext=c
12670 ac_cpp='$CPP $CPPFLAGS'
12671 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12672 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12673 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12674
12675 depcc="$CC"   am_compiler_list=
12676
12677 echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
12678 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
12679 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
12680   echo $ECHO_N "(cached) $ECHO_C" >&6
12681 else
12682   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
12683   # We make a subdir and do the tests there.  Otherwise we can end up
12684   # making bogus files that we don't know about and never remove.  For
12685   # instance it was reported that on HP-UX the gcc test will end up
12686   # making a dummy file named `D' -- because `-MD' means `put the output
12687   # in D'.
12688   mkdir conftest.dir
12689   # Copy depcomp to subdir because otherwise we won't find it if we're
12690   # using a relative directory.
12691   cp "$am_depcomp" conftest.dir
12692   cd conftest.dir
12693   # We will build objects and dependencies in a subdirectory because
12694   # it helps to detect inapplicable dependency modes.  For instance
12695   # both Tru64's cc and ICC support -MD to output dependencies as a
12696   # side effect of compilation, but ICC will put the dependencies in
12697   # the current directory while Tru64 will put them in the object
12698   # directory.
12699   mkdir sub
12700
12701   am_cv_CC_dependencies_compiler_type=none
12702   if test "$am_compiler_list" = ""; then
12703      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
12704   fi
12705   for depmode in $am_compiler_list; do
12706     # Setup a source with many dependencies, because some compilers
12707     # like to wrap large dependency lists on column 80 (with \), and
12708     # we should not choose a depcomp mode which is confused by this.
12709     #
12710     # We need to recreate these files for each test, as the compiler may
12711     # overwrite some of them when testing with obscure command lines.
12712     # This happens at least with the AIX C compiler.
12713     : > sub/conftest.c
12714     for i in 1 2 3 4 5 6; do
12715       echo '#include "conftst'$i'.h"' >> sub/conftest.c
12716       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
12717       # Solaris 8's {/usr,}/bin/sh.
12718       touch sub/conftst$i.h
12719     done
12720     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
12721
12722     case $depmode in
12723     nosideeffect)
12724       # after this tag, mechanisms are not by side-effect, so they'll
12725       # only be used when explicitly requested
12726       if test "x$enable_dependency_tracking" = xyes; then
12727         continue
12728       else
12729         break
12730       fi
12731       ;;
12732     none) break ;;
12733     esac
12734     # We check with `-c' and `-o' for the sake of the "dashmstdout"
12735     # mode.  It turns out that the SunPro C++ compiler does not properly
12736     # handle `-M -o', and we need to detect this.
12737     if depmode=$depmode \
12738        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
12739        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
12740        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
12741          >/dev/null 2>conftest.err &&
12742        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
12743        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
12744        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
12745       # icc doesn't choke on unknown options, it will just issue warnings
12746       # or remarks (even with -Werror).  So we grep stderr for any message
12747       # that says an option was ignored or not supported.
12748       # When given -MP, icc 7.0 and 7.1 complain thusly:
12749       #   icc: Command line warning: ignoring option '-M'; no argument required
12750       # The diagnosis changed in icc 8.0:
12751       #   icc: Command line remark: option '-MP' not supported
12752       if (grep 'ignoring option' conftest.err ||
12753           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
12754         am_cv_CC_dependencies_compiler_type=$depmode
12755         break
12756       fi
12757     fi
12758   done
12759
12760   cd ..
12761   rm -rf conftest.dir
12762 else
12763   am_cv_CC_dependencies_compiler_type=none
12764 fi
12765
12766 fi
12767 echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
12768 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
12769 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
12770
12771
12772
12773 if
12774   test "x$enable_dependency_tracking" != xno \
12775   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
12776   am__fastdepCC_TRUE=
12777   am__fastdepCC_FALSE='#'
12778 else
12779   am__fastdepCC_TRUE='#'
12780   am__fastdepCC_FALSE=
12781 fi
12782
12783
12784 if test "X${ac_cv_prog_cc_stdc}" = "Xno" ; then
12785         { { echo "$as_me:$LINENO: error: OpenLDAP requires compiler to support STDC constructs." >&5
12786 echo "$as_me: error: OpenLDAP requires compiler to support STDC constructs." >&2;}
12787    { (exit 1); exit 1; }; }
12788 fi
12789
12790 # test for make depend flag
12791 OL_MKDEP=
12792 OL_MKDEP_FLAGS=
12793 if test -z "${MKDEP}"; then
12794         OL_MKDEP="${CC-cc}"
12795         if test -z "${MKDEP_FLAGS}"; then
12796                 echo "$as_me:$LINENO: checking for ${OL_MKDEP} depend flag" >&5
12797 echo $ECHO_N "checking for ${OL_MKDEP} depend flag... $ECHO_C" >&6
12798 if test "${ol_cv_mkdep+set}" = set; then
12799   echo $ECHO_N "(cached) $ECHO_C" >&6
12800 else
12801
12802                         ol_cv_mkdep=no
12803                         for flag in "-M" "-xM"; do
12804                                 cat > conftest.c <<EOF
12805  noCode;
12806 EOF
12807                                 if { ac_try='$OL_MKDEP $flag conftest.c'
12808   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12809   (eval $ac_try) 2>&5
12810   ac_status=$?
12811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12812   (exit $ac_status); }; } \
12813                                         | grep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
12814                                 then
12815                                         if test ! -f conftest."${ac_object}" ; then
12816                                                 ol_cv_mkdep=$flag
12817                                                 OL_MKDEP_FLAGS="$flag"
12818                                                 break
12819                                         fi
12820                                 fi
12821                         done
12822                         rm -f conftest*
12823
12824 fi
12825 echo "$as_me:$LINENO: result: $ol_cv_mkdep" >&5
12826 echo "${ECHO_T}$ol_cv_mkdep" >&6
12827         else
12828                 cc_cv_mkdep=yes
12829                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
12830         fi
12831 else
12832         cc_cv_mkdep=yes
12833         OL_MKDEP="${MKDEP}"
12834         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
12835 fi
12836
12837
12838
12839 if test "${ol_cv_mkdep}" = no ; then
12840         # this will soon become an error
12841         { echo "$as_me:$LINENO: WARNING: do not know how to generate dependencies" >&5
12842 echo "$as_me: WARNING: do not know how to generate dependencies" >&2;}
12843 fi
12844
12845 echo "$as_me:$LINENO: checking for afopen in -ls" >&5
12846 echo $ECHO_N "checking for afopen in -ls... $ECHO_C" >&6
12847 if test "${ac_cv_lib_s_afopen+set}" = set; then
12848   echo $ECHO_N "(cached) $ECHO_C" >&6
12849 else
12850   ac_check_lib_save_LIBS=$LIBS
12851 LIBS="-ls  $LIBS"
12852 cat >conftest.$ac_ext <<_ACEOF
12853 /* confdefs.h.  */
12854 _ACEOF
12855 cat confdefs.h >>conftest.$ac_ext
12856 cat >>conftest.$ac_ext <<_ACEOF
12857 /* end confdefs.h.  */
12858
12859 /* Override any gcc2 internal prototype to avoid an error.  */
12860 #ifdef __cplusplus
12861 extern "C"
12862 #endif
12863 /* We use char because int might match the return type of a gcc2
12864    builtin and then its argument prototype would still apply.  */
12865 char afopen ();
12866 int
12867 main ()
12868 {
12869 afopen ();
12870   ;
12871   return 0;
12872 }
12873 _ACEOF
12874 rm -f conftest.$ac_objext conftest$ac_exeext
12875 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12876   (eval $ac_link) 2>conftest.er1
12877   ac_status=$?
12878   grep -v '^ *+' conftest.er1 >conftest.err
12879   rm -f conftest.er1
12880   cat conftest.err >&5
12881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12882   (exit $ac_status); } &&
12883          { ac_try='test -z "$ac_c_werror_flag"
12884                          || test ! -s conftest.err'
12885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12886   (eval $ac_try) 2>&5
12887   ac_status=$?
12888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12889   (exit $ac_status); }; } &&
12890          { ac_try='test -s conftest$ac_exeext'
12891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12892   (eval $ac_try) 2>&5
12893   ac_status=$?
12894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12895   (exit $ac_status); }; }; then
12896   ac_cv_lib_s_afopen=yes
12897 else
12898   echo "$as_me: failed program was:" >&5
12899 sed 's/^/| /' conftest.$ac_ext >&5
12900
12901 ac_cv_lib_s_afopen=no
12902 fi
12903 rm -f conftest.err conftest.$ac_objext \
12904       conftest$ac_exeext conftest.$ac_ext
12905 LIBS=$ac_check_lib_save_LIBS
12906 fi
12907 echo "$as_me:$LINENO: result: $ac_cv_lib_s_afopen" >&5
12908 echo "${ECHO_T}$ac_cv_lib_s_afopen" >&6
12909 if test $ac_cv_lib_s_afopen = yes; then
12910
12911         AUTH_LIBS=-ls
12912
12913 cat >>confdefs.h <<\_ACEOF
12914 #define HAVE_AIX_SECURITY 1
12915 _ACEOF
12916
12917
12918 fi
12919
12920
12921 case "$target" in
12922 *-ibm-openedition)
12923         ac_cv_func_getopt=no
12924
12925 cat >>confdefs.h <<\_ACEOF
12926 #define BOTH_STRINGS_H 1
12927 _ACEOF
12928
12929         ;;
12930 esac
12931
12932 ol_link_modules=no
12933 WITH_MODULES_ENABLED=no
12934 if test $ol_enable_modules != no ; then
12935
12936 for ac_header in ltdl.h
12937 do
12938 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12939 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12940   echo "$as_me:$LINENO: checking for $ac_header" >&5
12941 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12942 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12943   echo $ECHO_N "(cached) $ECHO_C" >&6
12944 fi
12945 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12946 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12947 else
12948   # Is the header compilable?
12949 echo "$as_me:$LINENO: checking $ac_header usability" >&5
12950 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12951 cat >conftest.$ac_ext <<_ACEOF
12952 /* confdefs.h.  */
12953 _ACEOF
12954 cat confdefs.h >>conftest.$ac_ext
12955 cat >>conftest.$ac_ext <<_ACEOF
12956 /* end confdefs.h.  */
12957 $ac_includes_default
12958 #include <$ac_header>
12959 _ACEOF
12960 rm -f conftest.$ac_objext
12961 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12962   (eval $ac_compile) 2>conftest.er1
12963   ac_status=$?
12964   grep -v '^ *+' conftest.er1 >conftest.err
12965   rm -f conftest.er1
12966   cat conftest.err >&5
12967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12968   (exit $ac_status); } &&
12969          { ac_try='test -z "$ac_c_werror_flag"
12970                          || test ! -s conftest.err'
12971   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12972   (eval $ac_try) 2>&5
12973   ac_status=$?
12974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12975   (exit $ac_status); }; } &&
12976          { ac_try='test -s conftest.$ac_objext'
12977   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12978   (eval $ac_try) 2>&5
12979   ac_status=$?
12980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12981   (exit $ac_status); }; }; then
12982   ac_header_compiler=yes
12983 else
12984   echo "$as_me: failed program was:" >&5
12985 sed 's/^/| /' conftest.$ac_ext >&5
12986
12987 ac_header_compiler=no
12988 fi
12989 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12990 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12991 echo "${ECHO_T}$ac_header_compiler" >&6
12992
12993 # Is the header present?
12994 echo "$as_me:$LINENO: checking $ac_header presence" >&5
12995 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
12996 cat >conftest.$ac_ext <<_ACEOF
12997 /* confdefs.h.  */
12998 _ACEOF
12999 cat confdefs.h >>conftest.$ac_ext
13000 cat >>conftest.$ac_ext <<_ACEOF
13001 /* end confdefs.h.  */
13002 #include <$ac_header>
13003 _ACEOF
13004 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13005   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13006   ac_status=$?
13007   grep -v '^ *+' conftest.er1 >conftest.err
13008   rm -f conftest.er1
13009   cat conftest.err >&5
13010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13011   (exit $ac_status); } >/dev/null; then
13012   if test -s conftest.err; then
13013     ac_cpp_err=$ac_c_preproc_warn_flag
13014     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13015   else
13016     ac_cpp_err=
13017   fi
13018 else
13019   ac_cpp_err=yes
13020 fi
13021 if test -z "$ac_cpp_err"; then
13022   ac_header_preproc=yes
13023 else
13024   echo "$as_me: failed program was:" >&5
13025 sed 's/^/| /' conftest.$ac_ext >&5
13026
13027   ac_header_preproc=no
13028 fi
13029 rm -f conftest.err conftest.$ac_ext
13030 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13031 echo "${ECHO_T}$ac_header_preproc" >&6
13032
13033 # So?  What about this header?
13034 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13035   yes:no: )
13036     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13037 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13038     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13039 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13040     ac_header_preproc=yes
13041     ;;
13042   no:yes:* )
13043     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13044 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13045     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13046 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13047     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13048 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13049     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13050 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13051     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13052 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13053     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13054 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13055     (
13056       cat <<\_ASBOX
13057 ## --------------------------------------------- ##
13058 ## Report this to <http://www.openldap.org/its/> ##
13059 ## --------------------------------------------- ##
13060 _ASBOX
13061     ) |
13062       sed "s/^/$as_me: WARNING:     /" >&2
13063     ;;
13064 esac
13065 echo "$as_me:$LINENO: checking for $ac_header" >&5
13066 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13067 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13068   echo $ECHO_N "(cached) $ECHO_C" >&6
13069 else
13070   eval "$as_ac_Header=\$ac_header_preproc"
13071 fi
13072 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13073 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13074
13075 fi
13076 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13077   cat >>confdefs.h <<_ACEOF
13078 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13079 _ACEOF
13080
13081 fi
13082
13083 done
13084
13085
13086         if test $ac_cv_header_ltdl_h = no ; then
13087                 { { echo "$as_me:$LINENO: error: could not locate libtool ltdl.h" >&5
13088 echo "$as_me: error: could not locate libtool ltdl.h" >&2;}
13089    { (exit 1); exit 1; }; }
13090         fi
13091
13092         echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
13093 echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6
13094 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
13095   echo $ECHO_N "(cached) $ECHO_C" >&6
13096 else
13097   ac_check_lib_save_LIBS=$LIBS
13098 LIBS="-lltdl  $LIBS"
13099 cat >conftest.$ac_ext <<_ACEOF
13100 /* confdefs.h.  */
13101 _ACEOF
13102 cat confdefs.h >>conftest.$ac_ext
13103 cat >>conftest.$ac_ext <<_ACEOF
13104 /* end confdefs.h.  */
13105
13106 /* Override any gcc2 internal prototype to avoid an error.  */
13107 #ifdef __cplusplus
13108 extern "C"
13109 #endif
13110 /* We use char because int might match the return type of a gcc2
13111    builtin and then its argument prototype would still apply.  */
13112 char lt_dlinit ();
13113 int
13114 main ()
13115 {
13116 lt_dlinit ();
13117   ;
13118   return 0;
13119 }
13120 _ACEOF
13121 rm -f conftest.$ac_objext conftest$ac_exeext
13122 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13123   (eval $ac_link) 2>conftest.er1
13124   ac_status=$?
13125   grep -v '^ *+' conftest.er1 >conftest.err
13126   rm -f conftest.er1
13127   cat conftest.err >&5
13128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13129   (exit $ac_status); } &&
13130          { ac_try='test -z "$ac_c_werror_flag"
13131                          || test ! -s conftest.err'
13132   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13133   (eval $ac_try) 2>&5
13134   ac_status=$?
13135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13136   (exit $ac_status); }; } &&
13137          { ac_try='test -s conftest$ac_exeext'
13138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13139   (eval $ac_try) 2>&5
13140   ac_status=$?
13141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13142   (exit $ac_status); }; }; then
13143   ac_cv_lib_ltdl_lt_dlinit=yes
13144 else
13145   echo "$as_me: failed program was:" >&5
13146 sed 's/^/| /' conftest.$ac_ext >&5
13147
13148 ac_cv_lib_ltdl_lt_dlinit=no
13149 fi
13150 rm -f conftest.err conftest.$ac_objext \
13151       conftest$ac_exeext conftest.$ac_ext
13152 LIBS=$ac_check_lib_save_LIBS
13153 fi
13154 echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
13155 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6
13156 if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
13157
13158                 MODULES_LIBS=-lltdl
13159
13160 cat >>confdefs.h <<\_ACEOF
13161 #define HAVE_LIBLTDL 1
13162 _ACEOF
13163
13164
13165 fi
13166
13167
13168         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
13169                 { { echo "$as_me:$LINENO: error: could not locate libtool -lltdl" >&5
13170 echo "$as_me: error: could not locate libtool -lltdl" >&2;}
13171    { (exit 1); exit 1; }; }
13172         fi
13173         ol_link_modules=yes
13174         WITH_MODULES_ENABLED=yes
13175
13176 else
13177         for i in $Backends; do
13178                 eval "ol_tmp=\$ol_enable_$i"
13179                 if test $ol_tmp = mod ; then
13180                         { echo "$as_me:$LINENO: WARNING: building static $i backend" >&5
13181 echo "$as_me: WARNING: building static $i backend" >&2;}
13182                         eval "ol_enable_$i=yes"
13183                 fi
13184         done
13185         for i in $Overlays; do
13186                 eval "ol_tmp=\$ol_enable_$i"
13187                 if test $ol_tmp = mod ; then
13188                         { echo "$as_me:$LINENO: WARNING: building static $i overlay" >&5
13189 echo "$as_me: WARNING: building static $i overlay" >&2;}
13190                         eval "ol_enable_$i=yes"
13191                 fi
13192         done
13193 fi
13194
13195 # test for EBCDIC
13196 echo "$as_me:$LINENO: checking for EBCDIC" >&5
13197 echo $ECHO_N "checking for EBCDIC... $ECHO_C" >&6
13198 if test "${ol_cv_cpp_ebcdic+set}" = set; then
13199   echo $ECHO_N "(cached) $ECHO_C" >&6
13200 else
13201
13202         cat >conftest.$ac_ext <<_ACEOF
13203 /* confdefs.h.  */
13204 _ACEOF
13205 cat confdefs.h >>conftest.$ac_ext
13206 cat >>conftest.$ac_ext <<_ACEOF
13207 /* end confdefs.h.  */
13208
13209 #if !('M' == 0xd4)
13210 #include <__ASCII__/generate_error.h>
13211 #endif
13212
13213 _ACEOF
13214 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13215   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13216   ac_status=$?
13217   grep -v '^ *+' conftest.er1 >conftest.err
13218   rm -f conftest.er1
13219   cat conftest.err >&5
13220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13221   (exit $ac_status); } >/dev/null; then
13222   if test -s conftest.err; then
13223     ac_cpp_err=$ac_c_preproc_warn_flag
13224     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13225   else
13226     ac_cpp_err=
13227   fi
13228 else
13229   ac_cpp_err=yes
13230 fi
13231 if test -z "$ac_cpp_err"; then
13232   ol_cv_cpp_ebcdic=yes
13233 else
13234   echo "$as_me: failed program was:" >&5
13235 sed 's/^/| /' conftest.$ac_ext >&5
13236
13237   ol_cv_cpp_ebcdic=no
13238 fi
13239 rm -f conftest.err conftest.$ac_ext
13240 fi
13241 echo "$as_me:$LINENO: result: $ol_cv_cpp_ebcdic" >&5
13242 echo "${ECHO_T}$ol_cv_cpp_ebcdic" >&6
13243 if test $ol_cv_cpp_ebcdic = yes ; then
13244
13245 cat >>confdefs.h <<\_ACEOF
13246 #define HAVE_EBCDIC 1
13247 _ACEOF
13248
13249 fi
13250
13251 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
13252 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13253 if test "${ol_cv_header_stdc+set}" = set; then
13254   echo $ECHO_N "(cached) $ECHO_C" >&6
13255 else
13256   cat >conftest.$ac_ext <<_ACEOF
13257 /* confdefs.h.  */
13258 _ACEOF
13259 cat confdefs.h >>conftest.$ac_ext
13260 cat >>conftest.$ac_ext <<_ACEOF
13261 /* end confdefs.h.  */
13262 #include <stdlib.h>
13263 #include <stdarg.h>
13264 #include <string.h>
13265 #include <float.h>
13266 _ACEOF
13267 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13268   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13269   ac_status=$?
13270   grep -v '^ *+' conftest.er1 >conftest.err
13271   rm -f conftest.er1
13272   cat conftest.err >&5
13273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13274   (exit $ac_status); } >/dev/null; then
13275   if test -s conftest.err; then
13276     ac_cpp_err=$ac_c_preproc_warn_flag
13277     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13278   else
13279     ac_cpp_err=
13280   fi
13281 else
13282   ac_cpp_err=yes
13283 fi
13284 if test -z "$ac_cpp_err"; then
13285   ol_cv_header_stdc=yes
13286 else
13287   echo "$as_me: failed program was:" >&5
13288 sed 's/^/| /' conftest.$ac_ext >&5
13289
13290   ol_cv_header_stdc=no
13291 fi
13292 rm -f conftest.err conftest.$ac_ext
13293
13294 if test $ol_cv_header_stdc = yes; then
13295   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13296 cat >conftest.$ac_ext <<_ACEOF
13297 /* confdefs.h.  */
13298 _ACEOF
13299 cat confdefs.h >>conftest.$ac_ext
13300 cat >>conftest.$ac_ext <<_ACEOF
13301 /* end confdefs.h.  */
13302 #include <string.h>
13303
13304 _ACEOF
13305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13306   $EGREP "memchr" >/dev/null 2>&1; then
13307   :
13308 else
13309   ol_cv_header_stdc=no
13310 fi
13311 rm -f conftest*
13312
13313 fi
13314
13315 if test $ol_cv_header_stdc = yes; then
13316   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13317 cat >conftest.$ac_ext <<_ACEOF
13318 /* confdefs.h.  */
13319 _ACEOF
13320 cat confdefs.h >>conftest.$ac_ext
13321 cat >>conftest.$ac_ext <<_ACEOF
13322 /* end confdefs.h.  */
13323 #include <stdlib.h>
13324
13325 _ACEOF
13326 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13327   $EGREP "free" >/dev/null 2>&1; then
13328   :
13329 else
13330   ol_cv_header_stdc=no
13331 fi
13332 rm -f conftest*
13333
13334 fi
13335
13336 if test $ol_cv_header_stdc = yes; then
13337   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13338 if test "$cross_compiling" = yes; then
13339   :
13340 else
13341   cat >conftest.$ac_ext <<_ACEOF
13342 /* confdefs.h.  */
13343 _ACEOF
13344 cat confdefs.h >>conftest.$ac_ext
13345 cat >>conftest.$ac_ext <<_ACEOF
13346 /* end confdefs.h.  */
13347 #include <ctype.h>
13348 #ifndef HAVE_EBCDIC
13349 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13350 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13351 #else
13352 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13353                 || ('j' <= (c) && (c) <= 'r') \
13354                 || ('s' <= (c) && (c) <= 'z'))
13355 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
13356 #endif
13357 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13358 int main () { int i; for (i = 0; i < 256; i++)
13359 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13360 exit (0); }
13361
13362 _ACEOF
13363 rm -f conftest$ac_exeext
13364 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13365   (eval $ac_link) 2>&5
13366   ac_status=$?
13367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13368   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13369   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13370   (eval $ac_try) 2>&5
13371   ac_status=$?
13372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13373   (exit $ac_status); }; }; then
13374   :
13375 else
13376   echo "$as_me: program exited with status $ac_status" >&5
13377 echo "$as_me: failed program was:" >&5
13378 sed 's/^/| /' conftest.$ac_ext >&5
13379
13380 ( exit $ac_status )
13381 ol_cv_header_stdc=no
13382 fi
13383 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13384 fi
13385 fi
13386 fi
13387 echo "$as_me:$LINENO: result: $ol_cv_header_stdc" >&5
13388 echo "${ECHO_T}$ol_cv_header_stdc" >&6
13389 if test $ol_cv_header_stdc = yes; then
13390   cat >>confdefs.h <<\_ACEOF
13391 #define STDC_HEADERS 1
13392 _ACEOF
13393
13394 fi
13395 ac_cv_header_stdc=disable
13396
13397
13398 if test $ol_cv_header_stdc != yes; then
13399         { echo "$as_me:$LINENO: WARNING: could not locate Standard C compliant headers" >&5
13400 echo "$as_me: WARNING: could not locate Standard C compliant headers" >&2;}
13401 fi
13402
13403
13404
13405
13406
13407
13408 ac_header_dirent=no
13409 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13410   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13411 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
13412 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13413 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13414   echo $ECHO_N "(cached) $ECHO_C" >&6
13415 else
13416   cat >conftest.$ac_ext <<_ACEOF
13417 /* confdefs.h.  */
13418 _ACEOF
13419 cat confdefs.h >>conftest.$ac_ext
13420 cat >>conftest.$ac_ext <<_ACEOF
13421 /* end confdefs.h.  */
13422 #include <sys/types.h>
13423 #include <$ac_hdr>
13424
13425 int
13426 main ()
13427 {
13428 if ((DIR *) 0)
13429 return 0;
13430   ;
13431   return 0;
13432 }
13433 _ACEOF
13434 rm -f conftest.$ac_objext
13435 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13436   (eval $ac_compile) 2>conftest.er1
13437   ac_status=$?
13438   grep -v '^ *+' conftest.er1 >conftest.err
13439   rm -f conftest.er1
13440   cat conftest.err >&5
13441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13442   (exit $ac_status); } &&
13443          { ac_try='test -z "$ac_c_werror_flag"
13444                          || test ! -s conftest.err'
13445   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13446   (eval $ac_try) 2>&5
13447   ac_status=$?
13448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13449   (exit $ac_status); }; } &&
13450          { ac_try='test -s conftest.$ac_objext'
13451   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13452   (eval $ac_try) 2>&5
13453   ac_status=$?
13454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13455   (exit $ac_status); }; }; then
13456   eval "$as_ac_Header=yes"
13457 else
13458   echo "$as_me: failed program was:" >&5
13459 sed 's/^/| /' conftest.$ac_ext >&5
13460
13461 eval "$as_ac_Header=no"
13462 fi
13463 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13464 fi
13465 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13466 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13467 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13468   cat >>confdefs.h <<_ACEOF
13469 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13470 _ACEOF
13471
13472 ac_header_dirent=$ac_hdr; break
13473 fi
13474
13475 done
13476 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13477 if test $ac_header_dirent = dirent.h; then
13478   echo "$as_me:$LINENO: checking for library containing opendir" >&5
13479 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
13480 if test "${ac_cv_search_opendir+set}" = set; then
13481   echo $ECHO_N "(cached) $ECHO_C" >&6
13482 else
13483   ac_func_search_save_LIBS=$LIBS
13484 ac_cv_search_opendir=no
13485 cat >conftest.$ac_ext <<_ACEOF
13486 /* confdefs.h.  */
13487 _ACEOF
13488 cat confdefs.h >>conftest.$ac_ext
13489 cat >>conftest.$ac_ext <<_ACEOF
13490 /* end confdefs.h.  */
13491
13492 /* Override any gcc2 internal prototype to avoid an error.  */
13493 #ifdef __cplusplus
13494 extern "C"
13495 #endif
13496 /* We use char because int might match the return type of a gcc2
13497    builtin and then its argument prototype would still apply.  */
13498 char opendir ();
13499 int
13500 main ()
13501 {
13502 opendir ();
13503   ;
13504   return 0;
13505 }
13506 _ACEOF
13507 rm -f conftest.$ac_objext conftest$ac_exeext
13508 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13509   (eval $ac_link) 2>conftest.er1
13510   ac_status=$?
13511   grep -v '^ *+' conftest.er1 >conftest.err
13512   rm -f conftest.er1
13513   cat conftest.err >&5
13514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13515   (exit $ac_status); } &&
13516          { ac_try='test -z "$ac_c_werror_flag"
13517                          || test ! -s conftest.err'
13518   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13519   (eval $ac_try) 2>&5
13520   ac_status=$?
13521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13522   (exit $ac_status); }; } &&
13523          { ac_try='test -s conftest$ac_exeext'
13524   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13525   (eval $ac_try) 2>&5
13526   ac_status=$?
13527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13528   (exit $ac_status); }; }; then
13529   ac_cv_search_opendir="none required"
13530 else
13531   echo "$as_me: failed program was:" >&5
13532 sed 's/^/| /' conftest.$ac_ext >&5
13533
13534 fi
13535 rm -f conftest.err conftest.$ac_objext \
13536       conftest$ac_exeext conftest.$ac_ext
13537 if test "$ac_cv_search_opendir" = no; then
13538   for ac_lib in dir; do
13539     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13540     cat >conftest.$ac_ext <<_ACEOF
13541 /* confdefs.h.  */
13542 _ACEOF
13543 cat confdefs.h >>conftest.$ac_ext
13544 cat >>conftest.$ac_ext <<_ACEOF
13545 /* end confdefs.h.  */
13546
13547 /* Override any gcc2 internal prototype to avoid an error.  */
13548 #ifdef __cplusplus
13549 extern "C"
13550 #endif
13551 /* We use char because int might match the return type of a gcc2
13552    builtin and then its argument prototype would still apply.  */
13553 char opendir ();
13554 int
13555 main ()
13556 {
13557 opendir ();
13558   ;
13559   return 0;
13560 }
13561 _ACEOF
13562 rm -f conftest.$ac_objext conftest$ac_exeext
13563 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13564   (eval $ac_link) 2>conftest.er1
13565   ac_status=$?
13566   grep -v '^ *+' conftest.er1 >conftest.err
13567   rm -f conftest.er1
13568   cat conftest.err >&5
13569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13570   (exit $ac_status); } &&
13571          { ac_try='test -z "$ac_c_werror_flag"
13572                          || test ! -s conftest.err'
13573   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13574   (eval $ac_try) 2>&5
13575   ac_status=$?
13576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13577   (exit $ac_status); }; } &&
13578          { ac_try='test -s conftest$ac_exeext'
13579   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13580   (eval $ac_try) 2>&5
13581   ac_status=$?
13582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13583   (exit $ac_status); }; }; then
13584   ac_cv_search_opendir="-l$ac_lib"
13585 break
13586 else
13587   echo "$as_me: failed program was:" >&5
13588 sed 's/^/| /' conftest.$ac_ext >&5
13589
13590 fi
13591 rm -f conftest.err conftest.$ac_objext \
13592       conftest$ac_exeext conftest.$ac_ext
13593   done
13594 fi
13595 LIBS=$ac_func_search_save_LIBS
13596 fi
13597 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
13598 echo "${ECHO_T}$ac_cv_search_opendir" >&6
13599 if test "$ac_cv_search_opendir" != no; then
13600   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
13601
13602 fi
13603
13604 else
13605   echo "$as_me:$LINENO: checking for library containing opendir" >&5
13606 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
13607 if test "${ac_cv_search_opendir+set}" = set; then
13608   echo $ECHO_N "(cached) $ECHO_C" >&6
13609 else
13610   ac_func_search_save_LIBS=$LIBS
13611 ac_cv_search_opendir=no
13612 cat >conftest.$ac_ext <<_ACEOF
13613 /* confdefs.h.  */
13614 _ACEOF
13615 cat confdefs.h >>conftest.$ac_ext
13616 cat >>conftest.$ac_ext <<_ACEOF
13617 /* end confdefs.h.  */
13618
13619 /* Override any gcc2 internal prototype to avoid an error.  */
13620 #ifdef __cplusplus
13621 extern "C"
13622 #endif
13623 /* We use char because int might match the return type of a gcc2
13624    builtin and then its argument prototype would still apply.  */
13625 char opendir ();
13626 int
13627 main ()
13628 {
13629 opendir ();
13630   ;
13631   return 0;
13632 }
13633 _ACEOF
13634 rm -f conftest.$ac_objext conftest$ac_exeext
13635 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13636   (eval $ac_link) 2>conftest.er1
13637   ac_status=$?
13638   grep -v '^ *+' conftest.er1 >conftest.err
13639   rm -f conftest.er1
13640   cat conftest.err >&5
13641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13642   (exit $ac_status); } &&
13643          { ac_try='test -z "$ac_c_werror_flag"
13644                          || test ! -s conftest.err'
13645   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13646   (eval $ac_try) 2>&5
13647   ac_status=$?
13648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13649   (exit $ac_status); }; } &&
13650          { ac_try='test -s conftest$ac_exeext'
13651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13652   (eval $ac_try) 2>&5
13653   ac_status=$?
13654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13655   (exit $ac_status); }; }; then
13656   ac_cv_search_opendir="none required"
13657 else
13658   echo "$as_me: failed program was:" >&5
13659 sed 's/^/| /' conftest.$ac_ext >&5
13660
13661 fi
13662 rm -f conftest.err conftest.$ac_objext \
13663       conftest$ac_exeext conftest.$ac_ext
13664 if test "$ac_cv_search_opendir" = no; then
13665   for ac_lib in x; do
13666     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13667     cat >conftest.$ac_ext <<_ACEOF
13668 /* confdefs.h.  */
13669 _ACEOF
13670 cat confdefs.h >>conftest.$ac_ext
13671 cat >>conftest.$ac_ext <<_ACEOF
13672 /* end confdefs.h.  */
13673
13674 /* Override any gcc2 internal prototype to avoid an error.  */
13675 #ifdef __cplusplus
13676 extern "C"
13677 #endif
13678 /* We use char because int might match the return type of a gcc2
13679    builtin and then its argument prototype would still apply.  */
13680 char opendir ();
13681 int
13682 main ()
13683 {
13684 opendir ();
13685   ;
13686   return 0;
13687 }
13688 _ACEOF
13689 rm -f conftest.$ac_objext conftest$ac_exeext
13690 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13691   (eval $ac_link) 2>conftest.er1
13692   ac_status=$?
13693   grep -v '^ *+' conftest.er1 >conftest.err
13694   rm -f conftest.er1
13695   cat conftest.err >&5
13696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13697   (exit $ac_status); } &&
13698          { ac_try='test -z "$ac_c_werror_flag"
13699                          || test ! -s conftest.err'
13700   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13701   (eval $ac_try) 2>&5
13702   ac_status=$?
13703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13704   (exit $ac_status); }; } &&
13705          { ac_try='test -s conftest$ac_exeext'
13706   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13707   (eval $ac_try) 2>&5
13708   ac_status=$?
13709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13710   (exit $ac_status); }; }; then
13711   ac_cv_search_opendir="-l$ac_lib"
13712 break
13713 else
13714   echo "$as_me: failed program was:" >&5
13715 sed 's/^/| /' conftest.$ac_ext >&5
13716
13717 fi
13718 rm -f conftest.err conftest.$ac_objext \
13719       conftest$ac_exeext conftest.$ac_ext
13720   done
13721 fi
13722 LIBS=$ac_func_search_save_LIBS
13723 fi
13724 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
13725 echo "${ECHO_T}$ac_cv_search_opendir" >&6
13726 if test "$ac_cv_search_opendir" != no; then
13727   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
13728
13729 fi
13730
13731 fi
13732
13733 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
13734 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
13735 if test "${ac_cv_header_sys_wait_h+set}" = set; then
13736   echo $ECHO_N "(cached) $ECHO_C" >&6
13737 else
13738   cat >conftest.$ac_ext <<_ACEOF
13739 /* confdefs.h.  */
13740 _ACEOF
13741 cat confdefs.h >>conftest.$ac_ext
13742 cat >>conftest.$ac_ext <<_ACEOF
13743 /* end confdefs.h.  */
13744 #include <sys/types.h>
13745 #include <sys/wait.h>
13746 #ifndef WEXITSTATUS
13747 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
13748 #endif
13749 #ifndef WIFEXITED
13750 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
13751 #endif
13752
13753 int
13754 main ()
13755 {
13756   int s;
13757   wait (&s);
13758   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
13759   ;
13760   return 0;
13761 }
13762 _ACEOF
13763 rm -f conftest.$ac_objext
13764 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13765   (eval $ac_compile) 2>conftest.er1
13766   ac_status=$?
13767   grep -v '^ *+' conftest.er1 >conftest.err
13768   rm -f conftest.er1
13769   cat conftest.err >&5
13770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13771   (exit $ac_status); } &&
13772          { ac_try='test -z "$ac_c_werror_flag"
13773                          || test ! -s conftest.err'
13774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13775   (eval $ac_try) 2>&5
13776   ac_status=$?
13777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13778   (exit $ac_status); }; } &&
13779          { ac_try='test -s conftest.$ac_objext'
13780   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13781   (eval $ac_try) 2>&5
13782   ac_status=$?
13783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13784   (exit $ac_status); }; }; then
13785   ac_cv_header_sys_wait_h=yes
13786 else
13787   echo "$as_me: failed program was:" >&5
13788 sed 's/^/| /' conftest.$ac_ext >&5
13789
13790 ac_cv_header_sys_wait_h=no
13791 fi
13792 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13793 fi
13794 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
13795 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
13796 if test $ac_cv_header_sys_wait_h = yes; then
13797
13798 cat >>confdefs.h <<\_ACEOF
13799 #define HAVE_SYS_WAIT_H 1
13800 _ACEOF
13801
13802 fi
13803
13804 echo "$as_me:$LINENO: checking whether termios.h defines TIOCGWINSZ" >&5
13805 echo $ECHO_N "checking whether termios.h defines TIOCGWINSZ... $ECHO_C" >&6
13806 if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then
13807   echo $ECHO_N "(cached) $ECHO_C" >&6
13808 else
13809   cat >conftest.$ac_ext <<_ACEOF
13810 /* confdefs.h.  */
13811 _ACEOF
13812 cat confdefs.h >>conftest.$ac_ext
13813 cat >>conftest.$ac_ext <<_ACEOF
13814 /* end confdefs.h.  */
13815 #include <sys/types.h>
13816 #include <termios.h>
13817 #ifdef TIOCGWINSZ
13818   yes
13819 #endif
13820
13821 _ACEOF
13822 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13823   $EGREP "yes" >/dev/null 2>&1; then
13824   ac_cv_sys_tiocgwinsz_in_termios_h=yes
13825 else
13826   ac_cv_sys_tiocgwinsz_in_termios_h=no
13827 fi
13828 rm -f conftest*
13829
13830 fi
13831 echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
13832 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_termios_h" >&6
13833
13834 if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
13835   echo "$as_me:$LINENO: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
13836 echo $ECHO_N "checking whether sys/ioctl.h defines TIOCGWINSZ... $ECHO_C" >&6
13837 if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then
13838   echo $ECHO_N "(cached) $ECHO_C" >&6
13839 else
13840   cat >conftest.$ac_ext <<_ACEOF
13841 /* confdefs.h.  */
13842 _ACEOF
13843 cat confdefs.h >>conftest.$ac_ext
13844 cat >>conftest.$ac_ext <<_ACEOF
13845 /* end confdefs.h.  */
13846 #include <sys/types.h>
13847 #include <sys/ioctl.h>
13848 #ifdef TIOCGWINSZ
13849   yes
13850 #endif
13851
13852 _ACEOF
13853 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13854   $EGREP "yes" >/dev/null 2>&1; then
13855   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
13856 else
13857   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
13858 fi
13859 rm -f conftest*
13860
13861 fi
13862 echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
13863 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6
13864
13865   if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
13866
13867 cat >>confdefs.h <<\_ACEOF
13868 #define GWINSZ_IN_SYS_IOCTL 1
13869 _ACEOF
13870
13871   fi
13872 fi
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921 for ac_header in \
13922         arpa/inet.h             \
13923         arpa/nameser.h  \
13924         assert.h                \
13925         bits/types.h    \
13926         conio.h                 \
13927         crypt.h                 \
13928         direct.h                \
13929         errno.h                 \
13930         fcntl.h                 \
13931         filio.h                 \
13932         getopt.h                \
13933         grp.h                   \
13934         io.h                    \
13935         libutil.h               \
13936         limits.h                \
13937         locale.h                \
13938         malloc.h                \
13939         memory.h                \
13940         psap.h                  \
13941         pwd.h                   \
13942         process.h               \
13943         sgtty.h                 \
13944         shadow.h                \
13945         stddef.h                \
13946         string.h                \
13947         strings.h               \
13948         sysexits.h              \
13949         sys/file.h              \
13950         sys/filio.h             \
13951         sys/errno.h             \
13952         sys/ioctl.h             \
13953         sys/param.h             \
13954         sys/resource.h  \
13955         sys/select.h    \
13956         sys/socket.h    \
13957         sys/stat.h              \
13958         sys/syslog.h    \
13959         sys/time.h              \
13960         sys/types.h             \
13961         sys/uio.h               \
13962         syslog.h                \
13963         termios.h               \
13964         unistd.h                \
13965         utime.h                 \
13966         winsock.h               \
13967         winsock2.h              \
13968
13969 do
13970 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13971 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13972   echo "$as_me:$LINENO: checking for $ac_header" >&5
13973 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13974 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13975   echo $ECHO_N "(cached) $ECHO_C" >&6
13976 fi
13977 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13978 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13979 else
13980   # Is the header compilable?
13981 echo "$as_me:$LINENO: checking $ac_header usability" >&5
13982 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13983 cat >conftest.$ac_ext <<_ACEOF
13984 /* confdefs.h.  */
13985 _ACEOF
13986 cat confdefs.h >>conftest.$ac_ext
13987 cat >>conftest.$ac_ext <<_ACEOF
13988 /* end confdefs.h.  */
13989 $ac_includes_default
13990 #include <$ac_header>
13991 _ACEOF
13992 rm -f conftest.$ac_objext
13993 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13994   (eval $ac_compile) 2>conftest.er1
13995   ac_status=$?
13996   grep -v '^ *+' conftest.er1 >conftest.err
13997   rm -f conftest.er1
13998   cat conftest.err >&5
13999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14000   (exit $ac_status); } &&
14001          { ac_try='test -z "$ac_c_werror_flag"
14002                          || test ! -s conftest.err'
14003   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14004   (eval $ac_try) 2>&5
14005   ac_status=$?
14006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14007   (exit $ac_status); }; } &&
14008          { ac_try='test -s conftest.$ac_objext'
14009   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14010   (eval $ac_try) 2>&5
14011   ac_status=$?
14012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14013   (exit $ac_status); }; }; then
14014   ac_header_compiler=yes
14015 else
14016   echo "$as_me: failed program was:" >&5
14017 sed 's/^/| /' conftest.$ac_ext >&5
14018
14019 ac_header_compiler=no
14020 fi
14021 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14022 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14023 echo "${ECHO_T}$ac_header_compiler" >&6
14024
14025 # Is the header present?
14026 echo "$as_me:$LINENO: checking $ac_header presence" >&5
14027 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14028 cat >conftest.$ac_ext <<_ACEOF
14029 /* confdefs.h.  */
14030 _ACEOF
14031 cat confdefs.h >>conftest.$ac_ext
14032 cat >>conftest.$ac_ext <<_ACEOF
14033 /* end confdefs.h.  */
14034 #include <$ac_header>
14035 _ACEOF
14036 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14037   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14038   ac_status=$?
14039   grep -v '^ *+' conftest.er1 >conftest.err
14040   rm -f conftest.er1
14041   cat conftest.err >&5
14042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14043   (exit $ac_status); } >/dev/null; then
14044   if test -s conftest.err; then
14045     ac_cpp_err=$ac_c_preproc_warn_flag
14046     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
14047   else
14048     ac_cpp_err=
14049   fi
14050 else
14051   ac_cpp_err=yes
14052 fi
14053 if test -z "$ac_cpp_err"; then
14054   ac_header_preproc=yes
14055 else
14056   echo "$as_me: failed program was:" >&5
14057 sed 's/^/| /' conftest.$ac_ext >&5
14058
14059   ac_header_preproc=no
14060 fi
14061 rm -f conftest.err conftest.$ac_ext
14062 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14063 echo "${ECHO_T}$ac_header_preproc" >&6
14064
14065 # So?  What about this header?
14066 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14067   yes:no: )
14068     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14069 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14070     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14071 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14072     ac_header_preproc=yes
14073     ;;
14074   no:yes:* )
14075     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14076 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14077     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
14078 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
14079     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14080 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14081     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
14082 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
14083     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14084 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14085     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14086 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14087     (
14088       cat <<\_ASBOX
14089 ## --------------------------------------------- ##
14090 ## Report this to <http://www.openldap.org/its/> ##
14091 ## --------------------------------------------- ##
14092 _ASBOX
14093     ) |
14094       sed "s/^/$as_me: WARNING:     /" >&2
14095     ;;
14096 esac
14097 echo "$as_me:$LINENO: checking for $ac_header" >&5
14098 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14099 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14100   echo $ECHO_N "(cached) $ECHO_C" >&6
14101 else
14102   eval "$as_ac_Header=\$ac_header_preproc"
14103 fi
14104 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14105 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14106
14107 fi
14108 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14109   cat >>confdefs.h <<_ACEOF
14110 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14111 _ACEOF
14112
14113 fi
14114
14115 done
14116
14117
14118
14119 for ac_header in resolv.h
14120 do
14121 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14122 echo "$as_me:$LINENO: checking for $ac_header" >&5
14123 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14124 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14125   echo $ECHO_N "(cached) $ECHO_C" >&6
14126 else
14127   cat >conftest.$ac_ext <<_ACEOF
14128 /* confdefs.h.  */
14129 _ACEOF
14130 cat confdefs.h >>conftest.$ac_ext
14131 cat >>conftest.$ac_ext <<_ACEOF
14132 /* end confdefs.h.  */
14133 $ac_includes_default
14134 #include <netinet/in.h>
14135
14136
14137 #include <$ac_header>
14138 _ACEOF
14139 rm -f conftest.$ac_objext
14140 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14141   (eval $ac_compile) 2>conftest.er1
14142   ac_status=$?
14143   grep -v '^ *+' conftest.er1 >conftest.err
14144   rm -f conftest.er1
14145   cat conftest.err >&5
14146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14147   (exit $ac_status); } &&
14148          { ac_try='test -z "$ac_c_werror_flag"
14149                          || test ! -s conftest.err'
14150   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14151   (eval $ac_try) 2>&5
14152   ac_status=$?
14153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14154   (exit $ac_status); }; } &&
14155          { ac_try='test -s conftest.$ac_objext'
14156   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14157   (eval $ac_try) 2>&5
14158   ac_status=$?
14159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14160   (exit $ac_status); }; }; then
14161   eval "$as_ac_Header=yes"
14162 else
14163   echo "$as_me: failed program was:" >&5
14164 sed 's/^/| /' conftest.$ac_ext >&5
14165
14166 eval "$as_ac_Header=no"
14167 fi
14168 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14169 fi
14170 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14171 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14172 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14173   cat >>confdefs.h <<_ACEOF
14174 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14175 _ACEOF
14176
14177 fi
14178
14179 done
14180
14181
14182
14183 for ac_header in netinet/tcp.h
14184 do
14185 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14186 echo "$as_me:$LINENO: checking for $ac_header" >&5
14187 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14188 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14189   echo $ECHO_N "(cached) $ECHO_C" >&6
14190 else
14191   cat >conftest.$ac_ext <<_ACEOF
14192 /* confdefs.h.  */
14193 _ACEOF
14194 cat confdefs.h >>conftest.$ac_ext
14195 cat >>conftest.$ac_ext <<_ACEOF
14196 /* end confdefs.h.  */
14197 $ac_includes_default
14198 #include <netinet/in.h>
14199
14200
14201 #include <$ac_header>
14202 _ACEOF
14203 rm -f conftest.$ac_objext
14204 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14205   (eval $ac_compile) 2>conftest.er1
14206   ac_status=$?
14207   grep -v '^ *+' conftest.er1 >conftest.err
14208   rm -f conftest.er1
14209   cat conftest.err >&5
14210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14211   (exit $ac_status); } &&
14212          { ac_try='test -z "$ac_c_werror_flag"
14213                          || test ! -s conftest.err'
14214   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14215   (eval $ac_try) 2>&5
14216   ac_status=$?
14217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14218   (exit $ac_status); }; } &&
14219          { ac_try='test -s conftest.$ac_objext'
14220   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14221   (eval $ac_try) 2>&5
14222   ac_status=$?
14223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14224   (exit $ac_status); }; }; then
14225   eval "$as_ac_Header=yes"
14226 else
14227   echo "$as_me: failed program was:" >&5
14228 sed 's/^/| /' conftest.$ac_ext >&5
14229
14230 eval "$as_ac_Header=no"
14231 fi
14232 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14233 fi
14234 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14235 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14236 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14237   cat >>confdefs.h <<_ACEOF
14238 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14239 _ACEOF
14240
14241 fi
14242
14243 done
14244
14245
14246
14247 for ac_header in sys/ucred.h
14248 do
14249 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14250 echo "$as_me:$LINENO: checking for $ac_header" >&5
14251 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14252 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14253   echo $ECHO_N "(cached) $ECHO_C" >&6
14254 else
14255   cat >conftest.$ac_ext <<_ACEOF
14256 /* confdefs.h.  */
14257 _ACEOF
14258 cat confdefs.h >>conftest.$ac_ext
14259 cat >>conftest.$ac_ext <<_ACEOF
14260 /* end confdefs.h.  */
14261 $ac_includes_default
14262 #ifdef HAVE_SYS_PARAM_H
14263 #include <sys/param.h>
14264 #endif
14265
14266
14267 #include <$ac_header>
14268 _ACEOF
14269 rm -f conftest.$ac_objext
14270 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14271   (eval $ac_compile) 2>conftest.er1
14272   ac_status=$?
14273   grep -v '^ *+' conftest.er1 >conftest.err
14274   rm -f conftest.er1
14275   cat conftest.err >&5
14276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14277   (exit $ac_status); } &&
14278          { ac_try='test -z "$ac_c_werror_flag"
14279                          || test ! -s conftest.err'
14280   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14281   (eval $ac_try) 2>&5
14282   ac_status=$?
14283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14284   (exit $ac_status); }; } &&
14285          { ac_try='test -s conftest.$ac_objext'
14286   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14287   (eval $ac_try) 2>&5
14288   ac_status=$?
14289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14290   (exit $ac_status); }; }; then
14291   eval "$as_ac_Header=yes"
14292 else
14293   echo "$as_me: failed program was:" >&5
14294 sed 's/^/| /' conftest.$ac_ext >&5
14295
14296 eval "$as_ac_Header=no"
14297 fi
14298 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14299 fi
14300 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14301 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14302 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14303   cat >>confdefs.h <<_ACEOF
14304 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14305 _ACEOF
14306
14307 fi
14308
14309 done
14310
14311
14312
14313
14314
14315 for ac_func in sigaction sigset
14316 do
14317 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14318 echo "$as_me:$LINENO: checking for $ac_func" >&5
14319 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14320 if eval "test \"\${$as_ac_var+set}\" = set"; then
14321   echo $ECHO_N "(cached) $ECHO_C" >&6
14322 else
14323   cat >conftest.$ac_ext <<_ACEOF
14324 /* confdefs.h.  */
14325 _ACEOF
14326 cat confdefs.h >>conftest.$ac_ext
14327 cat >>conftest.$ac_ext <<_ACEOF
14328 /* end confdefs.h.  */
14329 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14330    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14331 #define $ac_func innocuous_$ac_func
14332
14333 /* System header to define __stub macros and hopefully few prototypes,
14334     which can conflict with char $ac_func (); below.
14335     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14336     <limits.h> exists even on freestanding compilers.  */
14337
14338 #ifdef __STDC__
14339 # include <limits.h>
14340 #else
14341 # include <assert.h>
14342 #endif
14343
14344 #undef $ac_func
14345
14346 /* Override any gcc2 internal prototype to avoid an error.  */
14347 #ifdef __cplusplus
14348 extern "C"
14349 {
14350 #endif
14351 /* We use char because int might match the return type of a gcc2
14352    builtin and then its argument prototype would still apply.  */
14353 char $ac_func ();
14354 /* The GNU C library defines this for functions which it implements
14355     to always fail with ENOSYS.  Some functions are actually named
14356     something starting with __ and the normal name is an alias.  */
14357 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14358 choke me
14359 #else
14360 char (*f) () = $ac_func;
14361 #endif
14362 #ifdef __cplusplus
14363 }
14364 #endif
14365
14366 int
14367 main ()
14368 {
14369 return f != $ac_func;
14370   ;
14371   return 0;
14372 }
14373 _ACEOF
14374 rm -f conftest.$ac_objext conftest$ac_exeext
14375 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14376   (eval $ac_link) 2>conftest.er1
14377   ac_status=$?
14378   grep -v '^ *+' conftest.er1 >conftest.err
14379   rm -f conftest.er1
14380   cat conftest.err >&5
14381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14382   (exit $ac_status); } &&
14383          { ac_try='test -z "$ac_c_werror_flag"
14384                          || test ! -s conftest.err'
14385   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14386   (eval $ac_try) 2>&5
14387   ac_status=$?
14388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14389   (exit $ac_status); }; } &&
14390          { ac_try='test -s conftest$ac_exeext'
14391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14392   (eval $ac_try) 2>&5
14393   ac_status=$?
14394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14395   (exit $ac_status); }; }; then
14396   eval "$as_ac_var=yes"
14397 else
14398   echo "$as_me: failed program was:" >&5
14399 sed 's/^/| /' conftest.$ac_ext >&5
14400
14401 eval "$as_ac_var=no"
14402 fi
14403 rm -f conftest.err conftest.$ac_objext \
14404       conftest$ac_exeext conftest.$ac_ext
14405 fi
14406 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14407 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14408 if test `eval echo '${'$as_ac_var'}'` = yes; then
14409   cat >>confdefs.h <<_ACEOF
14410 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14411 _ACEOF
14412
14413 fi
14414 done
14415
14416
14417 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
14418
14419 echo "$as_me:$LINENO: checking for sigset in -lV3" >&5
14420 echo $ECHO_N "checking for sigset in -lV3... $ECHO_C" >&6
14421 if test "${ac_cv_lib_V3_sigset+set}" = set; then
14422   echo $ECHO_N "(cached) $ECHO_C" >&6
14423 else
14424   ac_check_lib_save_LIBS=$LIBS
14425 LIBS="-lV3  $LIBS"
14426 cat >conftest.$ac_ext <<_ACEOF
14427 /* confdefs.h.  */
14428 _ACEOF
14429 cat confdefs.h >>conftest.$ac_ext
14430 cat >>conftest.$ac_ext <<_ACEOF
14431 /* end confdefs.h.  */
14432
14433 /* Override any gcc2 internal prototype to avoid an error.  */
14434 #ifdef __cplusplus
14435 extern "C"
14436 #endif
14437 /* We use char because int might match the return type of a gcc2
14438    builtin and then its argument prototype would still apply.  */
14439 char sigset ();
14440 int
14441 main ()
14442 {
14443 sigset ();
14444   ;
14445   return 0;
14446 }
14447 _ACEOF
14448 rm -f conftest.$ac_objext conftest$ac_exeext
14449 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14450   (eval $ac_link) 2>conftest.er1
14451   ac_status=$?
14452   grep -v '^ *+' conftest.er1 >conftest.err
14453   rm -f conftest.er1
14454   cat conftest.err >&5
14455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14456   (exit $ac_status); } &&
14457          { ac_try='test -z "$ac_c_werror_flag"
14458                          || test ! -s conftest.err'
14459   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14460   (eval $ac_try) 2>&5
14461   ac_status=$?
14462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14463   (exit $ac_status); }; } &&
14464          { ac_try='test -s conftest$ac_exeext'
14465   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14466   (eval $ac_try) 2>&5
14467   ac_status=$?
14468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14469   (exit $ac_status); }; }; then
14470   ac_cv_lib_V3_sigset=yes
14471 else
14472   echo "$as_me: failed program was:" >&5
14473 sed 's/^/| /' conftest.$ac_ext >&5
14474
14475 ac_cv_lib_V3_sigset=no
14476 fi
14477 rm -f conftest.err conftest.$ac_objext \
14478       conftest$ac_exeext conftest.$ac_ext
14479 LIBS=$ac_check_lib_save_LIBS
14480 fi
14481 echo "$as_me:$LINENO: result: $ac_cv_lib_V3_sigset" >&5
14482 echo "${ECHO_T}$ac_cv_lib_V3_sigset" >&6
14483 if test $ac_cv_lib_V3_sigset = yes; then
14484   cat >>confdefs.h <<_ACEOF
14485 #define HAVE_LIBV3 1
14486 _ACEOF
14487
14488   LIBS="-lV3 $LIBS"
14489
14490 fi
14491
14492 fi
14493
14494 if test "$ac_cv_cygwin" != yes && test "$ac_cv_header_winsock_h" = yes; then
14495 echo "$as_me:$LINENO: checking for winsock" >&5
14496 echo $ECHO_N "checking for winsock... $ECHO_C" >&6
14497 if test "${ol_cv_winsock+set}" = set; then
14498   echo $ECHO_N "(cached) $ECHO_C" >&6
14499 else
14500   save_LIBS="$LIBS"
14501 for curlib in ws2_32 wsock32; do
14502         LIBS="$LIBS -l$curlib"
14503         cat >conftest.$ac_ext <<_ACEOF
14504 /* confdefs.h.  */
14505 _ACEOF
14506 cat confdefs.h >>conftest.$ac_ext
14507 cat >>conftest.$ac_ext <<_ACEOF
14508 /* end confdefs.h.  */
14509 #include <winsock.h>
14510
14511 int
14512 main ()
14513 {
14514
14515                         socket(0,0,0);
14516                         select(0,NULL,NULL,NULL,NULL);
14517                         closesocket(0);
14518                         gethostname(NULL,0);
14519
14520   ;
14521   return 0;
14522 }
14523 _ACEOF
14524 rm -f conftest.$ac_objext conftest$ac_exeext
14525 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14526   (eval $ac_link) 2>conftest.er1
14527   ac_status=$?
14528   grep -v '^ *+' conftest.er1 >conftest.err
14529   rm -f conftest.er1
14530   cat conftest.err >&5
14531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14532   (exit $ac_status); } &&
14533          { ac_try='test -z "$ac_c_werror_flag"
14534                          || test ! -s conftest.err'
14535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14536   (eval $ac_try) 2>&5
14537   ac_status=$?
14538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14539   (exit $ac_status); }; } &&
14540          { ac_try='test -s conftest$ac_exeext'
14541   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14542   (eval $ac_try) 2>&5
14543   ac_status=$?
14544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14545   (exit $ac_status); }; }; then
14546   ol_cv_winsock=yes
14547 else
14548   echo "$as_me: failed program was:" >&5
14549 sed 's/^/| /' conftest.$ac_ext >&5
14550
14551 ol_cv_winsock=no
14552 fi
14553 rm -f conftest.err conftest.$ac_objext \
14554       conftest$ac_exeext conftest.$ac_ext
14555
14556         if test $ol_cv_winsock = yes; then
14557
14558 cat >>confdefs.h <<\_ACEOF
14559 #define HAVE_WINSOCK 1
14560 _ACEOF
14561
14562                 ac_cv_func_socket=yes
14563                 ac_cv_func_select=yes
14564                 ac_cv_func_closesocket=yes
14565                 ac_cv_func_gethostname=yes
14566                 if test $curlib = ws2_32; then
14567                         ol_cv_winsock=winsock2
14568
14569 cat >>confdefs.h <<\_ACEOF
14570 #define HAVE_WINSOCK2 1
14571 _ACEOF
14572
14573                 fi
14574                 break
14575         fi
14576         LIBS="$save_LIBS"
14577 done
14578 fi
14579 echo "$as_me:$LINENO: result: $ol_cv_winsock" >&5
14580 echo "${ECHO_T}$ol_cv_winsock" >&6
14581 fi
14582
14583
14584 echo "$as_me:$LINENO: checking for socket" >&5
14585 echo $ECHO_N "checking for socket... $ECHO_C" >&6
14586 if test "${ac_cv_func_socket+set}" = set; then
14587   echo $ECHO_N "(cached) $ECHO_C" >&6
14588 else
14589   cat >conftest.$ac_ext <<_ACEOF
14590 /* confdefs.h.  */
14591 _ACEOF
14592 cat confdefs.h >>conftest.$ac_ext
14593 cat >>conftest.$ac_ext <<_ACEOF
14594 /* end confdefs.h.  */
14595 /* Define socket to an innocuous variant, in case <limits.h> declares socket.
14596    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14597 #define socket innocuous_socket
14598
14599 /* System header to define __stub macros and hopefully few prototypes,
14600     which can conflict with char socket (); below.
14601     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14602     <limits.h> exists even on freestanding compilers.  */
14603
14604 #ifdef __STDC__
14605 # include <limits.h>
14606 #else
14607 # include <assert.h>
14608 #endif
14609
14610 #undef socket
14611
14612 /* Override any gcc2 internal prototype to avoid an error.  */
14613 #ifdef __cplusplus
14614 extern "C"
14615 {
14616 #endif
14617 /* We use char because int might match the return type of a gcc2
14618    builtin and then its argument prototype would still apply.  */
14619 char socket ();
14620 /* The GNU C library defines this for functions which it implements
14621     to always fail with ENOSYS.  Some functions are actually named
14622     something starting with __ and the normal name is an alias.  */
14623 #if defined (__stub_socket) || defined (__stub___socket)
14624 choke me
14625 #else
14626 char (*f) () = socket;
14627 #endif
14628 #ifdef __cplusplus
14629 }
14630 #endif
14631
14632 int
14633 main ()
14634 {
14635 return f != socket;
14636   ;
14637   return 0;
14638 }
14639 _ACEOF
14640 rm -f conftest.$ac_objext conftest$ac_exeext
14641 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14642   (eval $ac_link) 2>conftest.er1
14643   ac_status=$?
14644   grep -v '^ *+' conftest.er1 >conftest.err
14645   rm -f conftest.er1
14646   cat conftest.err >&5
14647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14648   (exit $ac_status); } &&
14649          { ac_try='test -z "$ac_c_werror_flag"
14650                          || test ! -s conftest.err'
14651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14652   (eval $ac_try) 2>&5
14653   ac_status=$?
14654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14655   (exit $ac_status); }; } &&
14656          { ac_try='test -s conftest$ac_exeext'
14657   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14658   (eval $ac_try) 2>&5
14659   ac_status=$?
14660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14661   (exit $ac_status); }; }; then
14662   ac_cv_func_socket=yes
14663 else
14664   echo "$as_me: failed program was:" >&5
14665 sed 's/^/| /' conftest.$ac_ext >&5
14666
14667 ac_cv_func_socket=no
14668 fi
14669 rm -f conftest.err conftest.$ac_objext \
14670       conftest$ac_exeext conftest.$ac_ext
14671 fi
14672 echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
14673 echo "${ECHO_T}$ac_cv_func_socket" >&6
14674 if test $ac_cv_func_socket = yes; then
14675   :
14676 else
14677
14678
14679 echo "$as_me:$LINENO: checking for main in -lsocket" >&5
14680 echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
14681 if test "${ac_cv_lib_socket_main+set}" = set; then
14682   echo $ECHO_N "(cached) $ECHO_C" >&6
14683 else
14684   ac_check_lib_save_LIBS=$LIBS
14685 LIBS="-lsocket  $LIBS"
14686 cat >conftest.$ac_ext <<_ACEOF
14687 /* confdefs.h.  */
14688 _ACEOF
14689 cat confdefs.h >>conftest.$ac_ext
14690 cat >>conftest.$ac_ext <<_ACEOF
14691 /* end confdefs.h.  */
14692
14693
14694 int
14695 main ()
14696 {
14697 main ();
14698   ;
14699   return 0;
14700 }
14701 _ACEOF
14702 rm -f conftest.$ac_objext conftest$ac_exeext
14703 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14704   (eval $ac_link) 2>conftest.er1
14705   ac_status=$?
14706   grep -v '^ *+' conftest.er1 >conftest.err
14707   rm -f conftest.er1
14708   cat conftest.err >&5
14709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14710   (exit $ac_status); } &&
14711          { ac_try='test -z "$ac_c_werror_flag"
14712                          || test ! -s conftest.err'
14713   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14714   (eval $ac_try) 2>&5
14715   ac_status=$?
14716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14717   (exit $ac_status); }; } &&
14718          { ac_try='test -s conftest$ac_exeext'
14719   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14720   (eval $ac_try) 2>&5
14721   ac_status=$?
14722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14723   (exit $ac_status); }; }; then
14724   ac_cv_lib_socket_main=yes
14725 else
14726   echo "$as_me: failed program was:" >&5
14727 sed 's/^/| /' conftest.$ac_ext >&5
14728
14729 ac_cv_lib_socket_main=no
14730 fi
14731 rm -f conftest.err conftest.$ac_objext \
14732       conftest$ac_exeext conftest.$ac_ext
14733 LIBS=$ac_check_lib_save_LIBS
14734 fi
14735 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
14736 echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
14737 if test $ac_cv_lib_socket_main = yes; then
14738   cat >>confdefs.h <<_ACEOF
14739 #define HAVE_LIBSOCKET 1
14740 _ACEOF
14741
14742   LIBS="-lsocket $LIBS"
14743
14744 fi
14745
14746
14747 echo "$as_me:$LINENO: checking for main in -lnet" >&5
14748 echo $ECHO_N "checking for main in -lnet... $ECHO_C" >&6
14749 if test "${ac_cv_lib_net_main+set}" = set; then
14750   echo $ECHO_N "(cached) $ECHO_C" >&6
14751 else
14752   ac_check_lib_save_LIBS=$LIBS
14753 LIBS="-lnet  $LIBS"
14754 cat >conftest.$ac_ext <<_ACEOF
14755 /* confdefs.h.  */
14756 _ACEOF
14757 cat confdefs.h >>conftest.$ac_ext
14758 cat >>conftest.$ac_ext <<_ACEOF
14759 /* end confdefs.h.  */
14760
14761
14762 int
14763 main ()
14764 {
14765 main ();
14766   ;
14767   return 0;
14768 }
14769 _ACEOF
14770 rm -f conftest.$ac_objext conftest$ac_exeext
14771 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14772   (eval $ac_link) 2>conftest.er1
14773   ac_status=$?
14774   grep -v '^ *+' conftest.er1 >conftest.err
14775   rm -f conftest.er1
14776   cat conftest.err >&5
14777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14778   (exit $ac_status); } &&
14779          { ac_try='test -z "$ac_c_werror_flag"
14780                          || test ! -s conftest.err'
14781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14782   (eval $ac_try) 2>&5
14783   ac_status=$?
14784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14785   (exit $ac_status); }; } &&
14786          { ac_try='test -s conftest$ac_exeext'
14787   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14788   (eval $ac_try) 2>&5
14789   ac_status=$?
14790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14791   (exit $ac_status); }; }; then
14792   ac_cv_lib_net_main=yes
14793 else
14794   echo "$as_me: failed program was:" >&5
14795 sed 's/^/| /' conftest.$ac_ext >&5
14796
14797 ac_cv_lib_net_main=no
14798 fi
14799 rm -f conftest.err conftest.$ac_objext \
14800       conftest$ac_exeext conftest.$ac_ext
14801 LIBS=$ac_check_lib_save_LIBS
14802 fi
14803 echo "$as_me:$LINENO: result: $ac_cv_lib_net_main" >&5
14804 echo "${ECHO_T}$ac_cv_lib_net_main" >&6
14805 if test $ac_cv_lib_net_main = yes; then
14806   cat >>confdefs.h <<_ACEOF
14807 #define HAVE_LIBNET 1
14808 _ACEOF
14809
14810   LIBS="-lnet $LIBS"
14811
14812 fi
14813
14814
14815 echo "$as_me:$LINENO: checking for main in -lnsl_s" >&5
14816 echo $ECHO_N "checking for main in -lnsl_s... $ECHO_C" >&6
14817 if test "${ac_cv_lib_nsl_s_main+set}" = set; then
14818   echo $ECHO_N "(cached) $ECHO_C" >&6
14819 else
14820   ac_check_lib_save_LIBS=$LIBS
14821 LIBS="-lnsl_s  $LIBS"
14822 cat >conftest.$ac_ext <<_ACEOF
14823 /* confdefs.h.  */
14824 _ACEOF
14825 cat confdefs.h >>conftest.$ac_ext
14826 cat >>conftest.$ac_ext <<_ACEOF
14827 /* end confdefs.h.  */
14828
14829
14830 int
14831 main ()
14832 {
14833 main ();
14834   ;
14835   return 0;
14836 }
14837 _ACEOF
14838 rm -f conftest.$ac_objext conftest$ac_exeext
14839 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14840   (eval $ac_link) 2>conftest.er1
14841   ac_status=$?
14842   grep -v '^ *+' conftest.er1 >conftest.err
14843   rm -f conftest.er1
14844   cat conftest.err >&5
14845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14846   (exit $ac_status); } &&
14847          { ac_try='test -z "$ac_c_werror_flag"
14848                          || test ! -s conftest.err'
14849   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14850   (eval $ac_try) 2>&5
14851   ac_status=$?
14852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14853   (exit $ac_status); }; } &&
14854          { ac_try='test -s conftest$ac_exeext'
14855   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14856   (eval $ac_try) 2>&5
14857   ac_status=$?
14858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14859   (exit $ac_status); }; }; then
14860   ac_cv_lib_nsl_s_main=yes
14861 else
14862   echo "$as_me: failed program was:" >&5
14863 sed 's/^/| /' conftest.$ac_ext >&5
14864
14865 ac_cv_lib_nsl_s_main=no
14866 fi
14867 rm -f conftest.err conftest.$ac_objext \
14868       conftest$ac_exeext conftest.$ac_ext
14869 LIBS=$ac_check_lib_save_LIBS
14870 fi
14871 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_s_main" >&5
14872 echo "${ECHO_T}$ac_cv_lib_nsl_s_main" >&6
14873 if test $ac_cv_lib_nsl_s_main = yes; then
14874   cat >>confdefs.h <<_ACEOF
14875 #define HAVE_LIBNSL_S 1
14876 _ACEOF
14877
14878   LIBS="-lnsl_s $LIBS"
14879
14880 fi
14881
14882
14883 echo "$as_me:$LINENO: checking for main in -lnsl" >&5
14884 echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
14885 if test "${ac_cv_lib_nsl_main+set}" = set; then
14886   echo $ECHO_N "(cached) $ECHO_C" >&6
14887 else
14888   ac_check_lib_save_LIBS=$LIBS
14889 LIBS="-lnsl  $LIBS"
14890 cat >conftest.$ac_ext <<_ACEOF
14891 /* confdefs.h.  */
14892 _ACEOF
14893 cat confdefs.h >>conftest.$ac_ext
14894 cat >>conftest.$ac_ext <<_ACEOF
14895 /* end confdefs.h.  */
14896
14897
14898 int
14899 main ()
14900 {
14901 main ();
14902   ;
14903   return 0;
14904 }
14905 _ACEOF
14906 rm -f conftest.$ac_objext conftest$ac_exeext
14907 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14908   (eval $ac_link) 2>conftest.er1
14909   ac_status=$?
14910   grep -v '^ *+' conftest.er1 >conftest.err
14911   rm -f conftest.er1
14912   cat conftest.err >&5
14913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14914   (exit $ac_status); } &&
14915          { ac_try='test -z "$ac_c_werror_flag"
14916                          || test ! -s conftest.err'
14917   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14918   (eval $ac_try) 2>&5
14919   ac_status=$?
14920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14921   (exit $ac_status); }; } &&
14922          { ac_try='test -s conftest$ac_exeext'
14923   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14924   (eval $ac_try) 2>&5
14925   ac_status=$?
14926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14927   (exit $ac_status); }; }; then
14928   ac_cv_lib_nsl_main=yes
14929 else
14930   echo "$as_me: failed program was:" >&5
14931 sed 's/^/| /' conftest.$ac_ext >&5
14932
14933 ac_cv_lib_nsl_main=no
14934 fi
14935 rm -f conftest.err conftest.$ac_objext \
14936       conftest$ac_exeext conftest.$ac_ext
14937 LIBS=$ac_check_lib_save_LIBS
14938 fi
14939 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
14940 echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
14941 if test $ac_cv_lib_nsl_main = yes; then
14942   cat >>confdefs.h <<_ACEOF
14943 #define HAVE_LIBNSL 1
14944 _ACEOF
14945
14946   LIBS="-lnsl $LIBS"
14947
14948 fi
14949
14950
14951 echo "$as_me:$LINENO: checking for socket in -linet" >&5
14952 echo $ECHO_N "checking for socket in -linet... $ECHO_C" >&6
14953 if test "${ac_cv_lib_inet_socket+set}" = set; then
14954   echo $ECHO_N "(cached) $ECHO_C" >&6
14955 else
14956   ac_check_lib_save_LIBS=$LIBS
14957 LIBS="-linet  $LIBS"
14958 cat >conftest.$ac_ext <<_ACEOF
14959 /* confdefs.h.  */
14960 _ACEOF
14961 cat confdefs.h >>conftest.$ac_ext
14962 cat >>conftest.$ac_ext <<_ACEOF
14963 /* end confdefs.h.  */
14964
14965 /* Override any gcc2 internal prototype to avoid an error.  */
14966 #ifdef __cplusplus
14967 extern "C"
14968 #endif
14969 /* We use char because int might match the return type of a gcc2
14970    builtin and then its argument prototype would still apply.  */
14971 char socket ();
14972 int
14973 main ()
14974 {
14975 socket ();
14976   ;
14977   return 0;
14978 }
14979 _ACEOF
14980 rm -f conftest.$ac_objext conftest$ac_exeext
14981 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14982   (eval $ac_link) 2>conftest.er1
14983   ac_status=$?
14984   grep -v '^ *+' conftest.er1 >conftest.err
14985   rm -f conftest.er1
14986   cat conftest.err >&5
14987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14988   (exit $ac_status); } &&
14989          { ac_try='test -z "$ac_c_werror_flag"
14990                          || test ! -s conftest.err'
14991   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14992   (eval $ac_try) 2>&5
14993   ac_status=$?
14994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14995   (exit $ac_status); }; } &&
14996          { ac_try='test -s conftest$ac_exeext'
14997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14998   (eval $ac_try) 2>&5
14999   ac_status=$?
15000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15001   (exit $ac_status); }; }; then
15002   ac_cv_lib_inet_socket=yes
15003 else
15004   echo "$as_me: failed program was:" >&5
15005 sed 's/^/| /' conftest.$ac_ext >&5
15006
15007 ac_cv_lib_inet_socket=no
15008 fi
15009 rm -f conftest.err conftest.$ac_objext \
15010       conftest$ac_exeext conftest.$ac_ext
15011 LIBS=$ac_check_lib_save_LIBS
15012 fi
15013 echo "$as_me:$LINENO: result: $ac_cv_lib_inet_socket" >&5
15014 echo "${ECHO_T}$ac_cv_lib_inet_socket" >&6
15015 if test $ac_cv_lib_inet_socket = yes; then
15016   cat >>confdefs.h <<_ACEOF
15017 #define HAVE_LIBINET 1
15018 _ACEOF
15019
15020   LIBS="-linet $LIBS"
15021
15022 fi
15023
15024
15025 echo "$as_me:$LINENO: checking for main in -lgen" >&5
15026 echo $ECHO_N "checking for main in -lgen... $ECHO_C" >&6
15027 if test "${ac_cv_lib_gen_main+set}" = set; then
15028   echo $ECHO_N "(cached) $ECHO_C" >&6
15029 else
15030   ac_check_lib_save_LIBS=$LIBS
15031 LIBS="-lgen  $LIBS"
15032 cat >conftest.$ac_ext <<_ACEOF
15033 /* confdefs.h.  */
15034 _ACEOF
15035 cat confdefs.h >>conftest.$ac_ext
15036 cat >>conftest.$ac_ext <<_ACEOF
15037 /* end confdefs.h.  */
15038
15039
15040 int
15041 main ()
15042 {
15043 main ();
15044   ;
15045   return 0;
15046 }
15047 _ACEOF
15048 rm -f conftest.$ac_objext conftest$ac_exeext
15049 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15050   (eval $ac_link) 2>conftest.er1
15051   ac_status=$?
15052   grep -v '^ *+' conftest.er1 >conftest.err
15053   rm -f conftest.er1
15054   cat conftest.err >&5
15055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15056   (exit $ac_status); } &&
15057          { ac_try='test -z "$ac_c_werror_flag"
15058                          || test ! -s conftest.err'
15059   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15060   (eval $ac_try) 2>&5
15061   ac_status=$?
15062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15063   (exit $ac_status); }; } &&
15064          { ac_try='test -s conftest$ac_exeext'
15065   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15066   (eval $ac_try) 2>&5
15067   ac_status=$?
15068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15069   (exit $ac_status); }; }; then
15070   ac_cv_lib_gen_main=yes
15071 else
15072   echo "$as_me: failed program was:" >&5
15073 sed 's/^/| /' conftest.$ac_ext >&5
15074
15075 ac_cv_lib_gen_main=no
15076 fi
15077 rm -f conftest.err conftest.$ac_objext \
15078       conftest$ac_exeext conftest.$ac_ext
15079 LIBS=$ac_check_lib_save_LIBS
15080 fi
15081 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_main" >&5
15082 echo "${ECHO_T}$ac_cv_lib_gen_main" >&6
15083 if test $ac_cv_lib_gen_main = yes; then
15084   cat >>confdefs.h <<_ACEOF
15085 #define HAVE_LIBGEN 1
15086 _ACEOF
15087
15088   LIBS="-lgen $LIBS"
15089
15090 fi
15091
15092
15093 fi
15094
15095
15096 echo "$as_me:$LINENO: checking for select" >&5
15097 echo $ECHO_N "checking for select... $ECHO_C" >&6
15098 if test "${ac_cv_func_select+set}" = set; then
15099   echo $ECHO_N "(cached) $ECHO_C" >&6
15100 else
15101   cat >conftest.$ac_ext <<_ACEOF
15102 /* confdefs.h.  */
15103 _ACEOF
15104 cat confdefs.h >>conftest.$ac_ext
15105 cat >>conftest.$ac_ext <<_ACEOF
15106 /* end confdefs.h.  */
15107 /* Define select to an innocuous variant, in case <limits.h> declares select.
15108    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15109 #define select innocuous_select
15110
15111 /* System header to define __stub macros and hopefully few prototypes,
15112     which can conflict with char select (); below.
15113     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15114     <limits.h> exists even on freestanding compilers.  */
15115
15116 #ifdef __STDC__
15117 # include <limits.h>
15118 #else
15119 # include <assert.h>
15120 #endif
15121
15122 #undef select
15123
15124 /* Override any gcc2 internal prototype to avoid an error.  */
15125 #ifdef __cplusplus
15126 extern "C"
15127 {
15128 #endif
15129 /* We use char because int might match the return type of a gcc2
15130    builtin and then its argument prototype would still apply.  */
15131 char select ();
15132 /* The GNU C library defines this for functions which it implements
15133     to always fail with ENOSYS.  Some functions are actually named
15134     something starting with __ and the normal name is an alias.  */
15135 #if defined (__stub_select) || defined (__stub___select)
15136 choke me
15137 #else
15138 char (*f) () = select;
15139 #endif
15140 #ifdef __cplusplus
15141 }
15142 #endif
15143
15144 int
15145 main ()
15146 {
15147 return f != select;
15148   ;
15149   return 0;
15150 }
15151 _ACEOF
15152 rm -f conftest.$ac_objext conftest$ac_exeext
15153 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15154   (eval $ac_link) 2>conftest.er1
15155   ac_status=$?
15156   grep -v '^ *+' conftest.er1 >conftest.err
15157   rm -f conftest.er1
15158   cat conftest.err >&5
15159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15160   (exit $ac_status); } &&
15161          { ac_try='test -z "$ac_c_werror_flag"
15162                          || test ! -s conftest.err'
15163   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15164   (eval $ac_try) 2>&5
15165   ac_status=$?
15166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15167   (exit $ac_status); }; } &&
15168          { ac_try='test -s conftest$ac_exeext'
15169   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15170   (eval $ac_try) 2>&5
15171   ac_status=$?
15172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15173   (exit $ac_status); }; }; then
15174   ac_cv_func_select=yes
15175 else
15176   echo "$as_me: failed program was:" >&5
15177 sed 's/^/| /' conftest.$ac_ext >&5
15178
15179 ac_cv_func_select=no
15180 fi
15181 rm -f conftest.err conftest.$ac_objext \
15182       conftest$ac_exeext conftest.$ac_ext
15183 fi
15184 echo "$as_me:$LINENO: result: $ac_cv_func_select" >&5
15185 echo "${ECHO_T}$ac_cv_func_select" >&6
15186 if test $ac_cv_func_select = yes; then
15187   :
15188 else
15189   { { echo "$as_me:$LINENO: error: select() required." >&5
15190 echo "$as_me: error: select() required." >&2;}
15191    { (exit 1); exit 1; }; }
15192 fi
15193
15194
15195 if test "${ac_cv_header_winsock_h}" != yes; then
15196
15197
15198 for ac_header in sys/select.h sys/socket.h
15199 do
15200 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15201 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15202   echo "$as_me:$LINENO: checking for $ac_header" >&5
15203 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15204 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15205   echo $ECHO_N "(cached) $ECHO_C" >&6
15206 fi
15207 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15208 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15209 else
15210   # Is the header compilable?
15211 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15212 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15213 cat >conftest.$ac_ext <<_ACEOF
15214 /* confdefs.h.  */
15215 _ACEOF
15216 cat confdefs.h >>conftest.$ac_ext
15217 cat >>conftest.$ac_ext <<_ACEOF
15218 /* end confdefs.h.  */
15219 $ac_includes_default
15220 #include <$ac_header>
15221 _ACEOF
15222 rm -f conftest.$ac_objext
15223 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15224   (eval $ac_compile) 2>conftest.er1
15225   ac_status=$?
15226   grep -v '^ *+' conftest.er1 >conftest.err
15227   rm -f conftest.er1
15228   cat conftest.err >&5
15229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15230   (exit $ac_status); } &&
15231          { ac_try='test -z "$ac_c_werror_flag"
15232                          || test ! -s conftest.err'
15233   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15234   (eval $ac_try) 2>&5
15235   ac_status=$?
15236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15237   (exit $ac_status); }; } &&
15238          { ac_try='test -s conftest.$ac_objext'
15239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15240   (eval $ac_try) 2>&5
15241   ac_status=$?
15242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15243   (exit $ac_status); }; }; then
15244   ac_header_compiler=yes
15245 else
15246   echo "$as_me: failed program was:" >&5
15247 sed 's/^/| /' conftest.$ac_ext >&5
15248
15249 ac_header_compiler=no
15250 fi
15251 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15252 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15253 echo "${ECHO_T}$ac_header_compiler" >&6
15254
15255 # Is the header present?
15256 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15257 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15258 cat >conftest.$ac_ext <<_ACEOF
15259 /* confdefs.h.  */
15260 _ACEOF
15261 cat confdefs.h >>conftest.$ac_ext
15262 cat >>conftest.$ac_ext <<_ACEOF
15263 /* end confdefs.h.  */
15264 #include <$ac_header>
15265 _ACEOF
15266 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15267   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15268   ac_status=$?
15269   grep -v '^ *+' conftest.er1 >conftest.err
15270   rm -f conftest.er1
15271   cat conftest.err >&5
15272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15273   (exit $ac_status); } >/dev/null; then
15274   if test -s conftest.err; then
15275     ac_cpp_err=$ac_c_preproc_warn_flag
15276     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15277   else
15278     ac_cpp_err=
15279   fi
15280 else
15281   ac_cpp_err=yes
15282 fi
15283 if test -z "$ac_cpp_err"; then
15284   ac_header_preproc=yes
15285 else
15286   echo "$as_me: failed program was:" >&5
15287 sed 's/^/| /' conftest.$ac_ext >&5
15288
15289   ac_header_preproc=no
15290 fi
15291 rm -f conftest.err conftest.$ac_ext
15292 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15293 echo "${ECHO_T}$ac_header_preproc" >&6
15294
15295 # So?  What about this header?
15296 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15297   yes:no: )
15298     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15299 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15300     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15301 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15302     ac_header_preproc=yes
15303     ;;
15304   no:yes:* )
15305     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15306 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15307     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15308 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15309     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15310 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15311     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15312 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15313     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15314 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15315     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15316 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15317     (
15318       cat <<\_ASBOX
15319 ## --------------------------------------------- ##
15320 ## Report this to <http://www.openldap.org/its/> ##
15321 ## --------------------------------------------- ##
15322 _ASBOX
15323     ) |
15324       sed "s/^/$as_me: WARNING:     /" >&2
15325     ;;
15326 esac
15327 echo "$as_me:$LINENO: checking for $ac_header" >&5
15328 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15329 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15330   echo $ECHO_N "(cached) $ECHO_C" >&6
15331 else
15332   eval "$as_ac_Header=\$ac_header_preproc"
15333 fi
15334 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15335 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15336
15337 fi
15338 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15339   cat >>confdefs.h <<_ACEOF
15340 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15341 _ACEOF
15342
15343 fi
15344
15345 done
15346
15347 echo "$as_me:$LINENO: checking types of arguments for select" >&5
15348 echo $ECHO_N "checking types of arguments for select... $ECHO_C" >&6
15349 if test "${ac_cv_func_select_args+set}" = set; then
15350   echo $ECHO_N "(cached) $ECHO_C" >&6
15351 else
15352   for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
15353  for ac_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
15354   for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
15355    cat >conftest.$ac_ext <<_ACEOF
15356 /* confdefs.h.  */
15357 _ACEOF
15358 cat confdefs.h >>conftest.$ac_ext
15359 cat >>conftest.$ac_ext <<_ACEOF
15360 /* end confdefs.h.  */
15361 $ac_includes_default
15362 #if HAVE_SYS_SELECT_H
15363 # include <sys/select.h>
15364 #endif
15365 #if HAVE_SYS_SOCKET_H
15366 # include <sys/socket.h>
15367 #endif
15368
15369 int
15370 main ()
15371 {
15372 extern int select ($ac_arg1,
15373                                             $ac_arg234, $ac_arg234, $ac_arg234,
15374                                             $ac_arg5);
15375   ;
15376   return 0;
15377 }
15378 _ACEOF
15379 rm -f conftest.$ac_objext
15380 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15381   (eval $ac_compile) 2>conftest.er1
15382   ac_status=$?
15383   grep -v '^ *+' conftest.er1 >conftest.err
15384   rm -f conftest.er1
15385   cat conftest.err >&5
15386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15387   (exit $ac_status); } &&
15388          { ac_try='test -z "$ac_c_werror_flag"
15389                          || test ! -s conftest.err'
15390   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15391   (eval $ac_try) 2>&5
15392   ac_status=$?
15393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15394   (exit $ac_status); }; } &&
15395          { ac_try='test -s conftest.$ac_objext'
15396   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15397   (eval $ac_try) 2>&5
15398   ac_status=$?
15399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15400   (exit $ac_status); }; }; then
15401   ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
15402 else
15403   echo "$as_me: failed program was:" >&5
15404 sed 's/^/| /' conftest.$ac_ext >&5
15405
15406 fi
15407 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15408   done
15409  done
15410 done
15411 # Provide a safe default value.
15412 : ${ac_cv_func_select_args='int,int *,struct timeval *'}
15413
15414 fi
15415 echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5
15416 echo "${ECHO_T}$ac_cv_func_select_args" >&6
15417 ac_save_IFS=$IFS; IFS=','
15418 set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
15419 IFS=$ac_save_IFS
15420 shift
15421
15422 cat >>confdefs.h <<_ACEOF
15423 #define SELECT_TYPE_ARG1 $1
15424 _ACEOF
15425
15426
15427 cat >>confdefs.h <<_ACEOF
15428 #define SELECT_TYPE_ARG234 ($2)
15429 _ACEOF
15430
15431
15432 cat >>confdefs.h <<_ACEOF
15433 #define SELECT_TYPE_ARG5 ($3)
15434 _ACEOF
15435
15436 rm -f conftest*
15437
15438 fi
15439
15440
15441
15442 for ac_func in poll
15443 do
15444 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15445 echo "$as_me:$LINENO: checking for $ac_func" >&5
15446 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15447 if eval "test \"\${$as_ac_var+set}\" = set"; then
15448   echo $ECHO_N "(cached) $ECHO_C" >&6
15449 else
15450   cat >conftest.$ac_ext <<_ACEOF
15451 /* confdefs.h.  */
15452 _ACEOF
15453 cat confdefs.h >>conftest.$ac_ext
15454 cat >>conftest.$ac_ext <<_ACEOF
15455 /* end confdefs.h.  */
15456 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15457    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15458 #define $ac_func innocuous_$ac_func
15459
15460 /* System header to define __stub macros and hopefully few prototypes,
15461     which can conflict with char $ac_func (); below.
15462     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15463     <limits.h> exists even on freestanding compilers.  */
15464
15465 #ifdef __STDC__
15466 # include <limits.h>
15467 #else
15468 # include <assert.h>
15469 #endif
15470
15471 #undef $ac_func
15472
15473 /* Override any gcc2 internal prototype to avoid an error.  */
15474 #ifdef __cplusplus
15475 extern "C"
15476 {
15477 #endif
15478 /* We use char because int might match the return type of a gcc2
15479    builtin and then its argument prototype would still apply.  */
15480 char $ac_func ();
15481 /* The GNU C library defines this for functions which it implements
15482     to always fail with ENOSYS.  Some functions are actually named
15483     something starting with __ and the normal name is an alias.  */
15484 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15485 choke me
15486 #else
15487 char (*f) () = $ac_func;
15488 #endif
15489 #ifdef __cplusplus
15490 }
15491 #endif
15492
15493 int
15494 main ()
15495 {
15496 return f != $ac_func;
15497   ;
15498   return 0;
15499 }
15500 _ACEOF
15501 rm -f conftest.$ac_objext conftest$ac_exeext
15502 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15503   (eval $ac_link) 2>conftest.er1
15504   ac_status=$?
15505   grep -v '^ *+' conftest.er1 >conftest.err
15506   rm -f conftest.er1
15507   cat conftest.err >&5
15508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15509   (exit $ac_status); } &&
15510          { ac_try='test -z "$ac_c_werror_flag"
15511                          || test ! -s conftest.err'
15512   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15513   (eval $ac_try) 2>&5
15514   ac_status=$?
15515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15516   (exit $ac_status); }; } &&
15517          { ac_try='test -s conftest$ac_exeext'
15518   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15519   (eval $ac_try) 2>&5
15520   ac_status=$?
15521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15522   (exit $ac_status); }; }; then
15523   eval "$as_ac_var=yes"
15524 else
15525   echo "$as_me: failed program was:" >&5
15526 sed 's/^/| /' conftest.$ac_ext >&5
15527
15528 eval "$as_ac_var=no"
15529 fi
15530 rm -f conftest.err conftest.$ac_objext \
15531       conftest$ac_exeext conftest.$ac_ext
15532 fi
15533 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15534 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15535 if test `eval echo '${'$as_ac_var'}'` = yes; then
15536   cat >>confdefs.h <<_ACEOF
15537 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15538 _ACEOF
15539
15540 fi
15541 done
15542
15543
15544 for ac_header in poll.h
15545 do
15546 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15547 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15548   echo "$as_me:$LINENO: checking for $ac_header" >&5
15549 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15550 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15551   echo $ECHO_N "(cached) $ECHO_C" >&6
15552 fi
15553 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15554 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15555 else
15556   # Is the header compilable?
15557 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15558 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15559 cat >conftest.$ac_ext <<_ACEOF
15560 /* confdefs.h.  */
15561 _ACEOF
15562 cat confdefs.h >>conftest.$ac_ext
15563 cat >>conftest.$ac_ext <<_ACEOF
15564 /* end confdefs.h.  */
15565 $ac_includes_default
15566 #include <$ac_header>
15567 _ACEOF
15568 rm -f conftest.$ac_objext
15569 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15570   (eval $ac_compile) 2>conftest.er1
15571   ac_status=$?
15572   grep -v '^ *+' conftest.er1 >conftest.err
15573   rm -f conftest.er1
15574   cat conftest.err >&5
15575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15576   (exit $ac_status); } &&
15577          { ac_try='test -z "$ac_c_werror_flag"
15578                          || test ! -s conftest.err'
15579   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15580   (eval $ac_try) 2>&5
15581   ac_status=$?
15582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15583   (exit $ac_status); }; } &&
15584          { ac_try='test -s conftest.$ac_objext'
15585   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15586   (eval $ac_try) 2>&5
15587   ac_status=$?
15588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15589   (exit $ac_status); }; }; then
15590   ac_header_compiler=yes
15591 else
15592   echo "$as_me: failed program was:" >&5
15593 sed 's/^/| /' conftest.$ac_ext >&5
15594
15595 ac_header_compiler=no
15596 fi
15597 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15598 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15599 echo "${ECHO_T}$ac_header_compiler" >&6
15600
15601 # Is the header present?
15602 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15603 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15604 cat >conftest.$ac_ext <<_ACEOF
15605 /* confdefs.h.  */
15606 _ACEOF
15607 cat confdefs.h >>conftest.$ac_ext
15608 cat >>conftest.$ac_ext <<_ACEOF
15609 /* end confdefs.h.  */
15610 #include <$ac_header>
15611 _ACEOF
15612 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15613   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15614   ac_status=$?
15615   grep -v '^ *+' conftest.er1 >conftest.err
15616   rm -f conftest.er1
15617   cat conftest.err >&5
15618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15619   (exit $ac_status); } >/dev/null; then
15620   if test -s conftest.err; then
15621     ac_cpp_err=$ac_c_preproc_warn_flag
15622     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15623   else
15624     ac_cpp_err=
15625   fi
15626 else
15627   ac_cpp_err=yes
15628 fi
15629 if test -z "$ac_cpp_err"; then
15630   ac_header_preproc=yes
15631 else
15632   echo "$as_me: failed program was:" >&5
15633 sed 's/^/| /' conftest.$ac_ext >&5
15634
15635   ac_header_preproc=no
15636 fi
15637 rm -f conftest.err conftest.$ac_ext
15638 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15639 echo "${ECHO_T}$ac_header_preproc" >&6
15640
15641 # So?  What about this header?
15642 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15643   yes:no: )
15644     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15645 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15646     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15647 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15648     ac_header_preproc=yes
15649     ;;
15650   no:yes:* )
15651     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15652 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15653     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15654 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15655     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15656 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15657     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15658 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15659     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15660 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15661     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15662 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15663     (
15664       cat <<\_ASBOX
15665 ## --------------------------------------------- ##
15666 ## Report this to <http://www.openldap.org/its/> ##
15667 ## --------------------------------------------- ##
15668 _ASBOX
15669     ) |
15670       sed "s/^/$as_me: WARNING:     /" >&2
15671     ;;
15672 esac
15673 echo "$as_me:$LINENO: checking for $ac_header" >&5
15674 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15675 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15676   echo $ECHO_N "(cached) $ECHO_C" >&6
15677 else
15678   eval "$as_ac_Header=\$ac_header_preproc"
15679 fi
15680 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15681 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15682
15683 fi
15684 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15685   cat >>confdefs.h <<_ACEOF
15686 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15687 _ACEOF
15688
15689 fi
15690
15691 done
15692
15693
15694
15695 for ac_header in sys/epoll.h
15696 do
15697 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15698 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15699   echo "$as_me:$LINENO: checking for $ac_header" >&5
15700 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15701 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15702   echo $ECHO_N "(cached) $ECHO_C" >&6
15703 fi
15704 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15705 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15706 else
15707   # Is the header compilable?
15708 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15709 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15710 cat >conftest.$ac_ext <<_ACEOF
15711 /* confdefs.h.  */
15712 _ACEOF
15713 cat confdefs.h >>conftest.$ac_ext
15714 cat >>conftest.$ac_ext <<_ACEOF
15715 /* end confdefs.h.  */
15716 $ac_includes_default
15717 #include <$ac_header>
15718 _ACEOF
15719 rm -f conftest.$ac_objext
15720 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15721   (eval $ac_compile) 2>conftest.er1
15722   ac_status=$?
15723   grep -v '^ *+' conftest.er1 >conftest.err
15724   rm -f conftest.er1
15725   cat conftest.err >&5
15726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15727   (exit $ac_status); } &&
15728          { ac_try='test -z "$ac_c_werror_flag"
15729                          || test ! -s conftest.err'
15730   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15731   (eval $ac_try) 2>&5
15732   ac_status=$?
15733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15734   (exit $ac_status); }; } &&
15735          { ac_try='test -s conftest.$ac_objext'
15736   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15737   (eval $ac_try) 2>&5
15738   ac_status=$?
15739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15740   (exit $ac_status); }; }; then
15741   ac_header_compiler=yes
15742 else
15743   echo "$as_me: failed program was:" >&5
15744 sed 's/^/| /' conftest.$ac_ext >&5
15745
15746 ac_header_compiler=no
15747 fi
15748 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15749 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15750 echo "${ECHO_T}$ac_header_compiler" >&6
15751
15752 # Is the header present?
15753 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15754 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15755 cat >conftest.$ac_ext <<_ACEOF
15756 /* confdefs.h.  */
15757 _ACEOF
15758 cat confdefs.h >>conftest.$ac_ext
15759 cat >>conftest.$ac_ext <<_ACEOF
15760 /* end confdefs.h.  */
15761 #include <$ac_header>
15762 _ACEOF
15763 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15764   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15765   ac_status=$?
15766   grep -v '^ *+' conftest.er1 >conftest.err
15767   rm -f conftest.er1
15768   cat conftest.err >&5
15769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15770   (exit $ac_status); } >/dev/null; then
15771   if test -s conftest.err; then
15772     ac_cpp_err=$ac_c_preproc_warn_flag
15773     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15774   else
15775     ac_cpp_err=
15776   fi
15777 else
15778   ac_cpp_err=yes
15779 fi
15780 if test -z "$ac_cpp_err"; then
15781   ac_header_preproc=yes
15782 else
15783   echo "$as_me: failed program was:" >&5
15784 sed 's/^/| /' conftest.$ac_ext >&5
15785
15786   ac_header_preproc=no
15787 fi
15788 rm -f conftest.err conftest.$ac_ext
15789 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15790 echo "${ECHO_T}$ac_header_preproc" >&6
15791
15792 # So?  What about this header?
15793 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15794   yes:no: )
15795     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15796 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15797     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15798 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15799     ac_header_preproc=yes
15800     ;;
15801   no:yes:* )
15802     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15803 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15804     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15805 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15806     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15807 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15808     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15809 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15810     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15811 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15812     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15813 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15814     (
15815       cat <<\_ASBOX
15816 ## --------------------------------------------- ##
15817 ## Report this to <http://www.openldap.org/its/> ##
15818 ## --------------------------------------------- ##
15819 _ASBOX
15820     ) |
15821       sed "s/^/$as_me: WARNING:     /" >&2
15822     ;;
15823 esac
15824 echo "$as_me:$LINENO: checking for $ac_header" >&5
15825 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15826 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15827   echo $ECHO_N "(cached) $ECHO_C" >&6
15828 else
15829   eval "$as_ac_Header=\$ac_header_preproc"
15830 fi
15831 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15832 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15833
15834 fi
15835 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15836   cat >>confdefs.h <<_ACEOF
15837 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15838 _ACEOF
15839
15840 fi
15841
15842 done
15843
15844 if test "${ac_cv_header_sys_epoll_h}" = yes; then
15845 echo "$as_me:$LINENO: checking for epoll system call" >&5
15846 echo $ECHO_N "checking for epoll system call... $ECHO_C" >&6
15847 if test "$cross_compiling" = yes; then
15848   echo "$as_me:$LINENO: result: no" >&5
15849 echo "${ECHO_T}no" >&6
15850 else
15851   cat >conftest.$ac_ext <<_ACEOF
15852 /* confdefs.h.  */
15853 _ACEOF
15854 cat confdefs.h >>conftest.$ac_ext
15855 cat >>conftest.$ac_ext <<_ACEOF
15856 /* end confdefs.h.  */
15857 int main(int argc, char *argv)
15858 {
15859         int epfd = epoll_create(256);
15860         exit (epfd == -1 ? 1 : 0);
15861 }
15862 _ACEOF
15863 rm -f conftest$ac_exeext
15864 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15865   (eval $ac_link) 2>&5
15866   ac_status=$?
15867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15868   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15869   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15870   (eval $ac_try) 2>&5
15871   ac_status=$?
15872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15873   (exit $ac_status); }; }; then
15874   echo "$as_me:$LINENO: result: yes" >&5
15875 echo "${ECHO_T}yes" >&6
15876
15877 cat >>confdefs.h <<\_ACEOF
15878 #define HAVE_EPOLL 1
15879 _ACEOF
15880
15881 else
15882   echo "$as_me: program exited with status $ac_status" >&5
15883 echo "$as_me: failed program was:" >&5
15884 sed 's/^/| /' conftest.$ac_ext >&5
15885
15886 ( exit $ac_status )
15887 echo "$as_me:$LINENO: result: no" >&5
15888 echo "${ECHO_T}no" >&6
15889 fi
15890 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15891 fi
15892 fi
15893
15894 # strerror checks
15895 echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5
15896 echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6
15897 if test "${ol_cv_dcl_sys_errlist+set}" = set; then
15898   echo $ECHO_N "(cached) $ECHO_C" >&6
15899 else
15900
15901         cat >conftest.$ac_ext <<_ACEOF
15902 /* confdefs.h.  */
15903 _ACEOF
15904 cat confdefs.h >>conftest.$ac_ext
15905 cat >>conftest.$ac_ext <<_ACEOF
15906 /* end confdefs.h.  */
15907
15908 #include <stdio.h>
15909 #include <sys/types.h>
15910 #include <errno.h>
15911 #ifdef WINNT
15912 #include <stdlib.h>
15913 #endif
15914 int
15915 main ()
15916 {
15917 char *c = (char *) *sys_errlist
15918   ;
15919   return 0;
15920 }
15921 _ACEOF
15922 rm -f conftest.$ac_objext
15923 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15924   (eval $ac_compile) 2>conftest.er1
15925   ac_status=$?
15926   grep -v '^ *+' conftest.er1 >conftest.err
15927   rm -f conftest.er1
15928   cat conftest.err >&5
15929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15930   (exit $ac_status); } &&
15931          { ac_try='test -z "$ac_c_werror_flag"
15932                          || test ! -s conftest.err'
15933   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15934   (eval $ac_try) 2>&5
15935   ac_status=$?
15936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15937   (exit $ac_status); }; } &&
15938          { ac_try='test -s conftest.$ac_objext'
15939   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15940   (eval $ac_try) 2>&5
15941   ac_status=$?
15942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15943   (exit $ac_status); }; }; then
15944   ol_cv_dcl_sys_errlist=yes
15945         ol_cv_have_sys_errlist=yes
15946 else
15947   echo "$as_me: failed program was:" >&5
15948 sed 's/^/| /' conftest.$ac_ext >&5
15949
15950 ol_cv_dcl_sys_errlist=no
15951 fi
15952 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15953 fi
15954 echo "$as_me:$LINENO: result: $ol_cv_dcl_sys_errlist" >&5
15955 echo "${ECHO_T}$ol_cv_dcl_sys_errlist" >&6
15956 #
15957 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15958 if test $ol_cv_dcl_sys_errlist = no ; then
15959
15960 cat >>confdefs.h <<\_ACEOF
15961 #define DECL_SYS_ERRLIST 1
15962 _ACEOF
15963
15964
15965         echo "$as_me:$LINENO: checking existence of sys_errlist" >&5
15966 echo $ECHO_N "checking existence of sys_errlist... $ECHO_C" >&6
15967 if test "${ol_cv_have_sys_errlist+set}" = set; then
15968   echo $ECHO_N "(cached) $ECHO_C" >&6
15969 else
15970
15971                 cat >conftest.$ac_ext <<_ACEOF
15972 /* confdefs.h.  */
15973 _ACEOF
15974 cat confdefs.h >>conftest.$ac_ext
15975 cat >>conftest.$ac_ext <<_ACEOF
15976 /* end confdefs.h.  */
15977 #include <errno.h>
15978 int
15979 main ()
15980 {
15981 char *c = (char *) *sys_errlist
15982   ;
15983   return 0;
15984 }
15985 _ACEOF
15986 rm -f conftest.$ac_objext conftest$ac_exeext
15987 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15988   (eval $ac_link) 2>conftest.er1
15989   ac_status=$?
15990   grep -v '^ *+' conftest.er1 >conftest.err
15991   rm -f conftest.er1
15992   cat conftest.err >&5
15993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15994   (exit $ac_status); } &&
15995          { ac_try='test -z "$ac_c_werror_flag"
15996                          || test ! -s conftest.err'
15997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15998   (eval $ac_try) 2>&5
15999   ac_status=$?
16000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16001   (exit $ac_status); }; } &&
16002          { ac_try='test -s conftest$ac_exeext'
16003   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16004   (eval $ac_try) 2>&5
16005   ac_status=$?
16006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16007   (exit $ac_status); }; }; then
16008   ol_cv_have_sys_errlist=yes
16009 else
16010   echo "$as_me: failed program was:" >&5
16011 sed 's/^/| /' conftest.$ac_ext >&5
16012
16013 ol_cv_have_sys_errlist=no
16014 fi
16015 rm -f conftest.err conftest.$ac_objext \
16016       conftest$ac_exeext conftest.$ac_ext
16017 fi
16018 echo "$as_me:$LINENO: result: $ol_cv_have_sys_errlist" >&5
16019 echo "${ECHO_T}$ol_cv_have_sys_errlist" >&6
16020 fi
16021 if test $ol_cv_have_sys_errlist = yes ; then
16022
16023 cat >>confdefs.h <<\_ACEOF
16024 #define HAVE_SYS_ERRLIST 1
16025 _ACEOF
16026
16027 fi
16028
16029
16030 for ac_func in strerror strerror_r
16031 do
16032 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16033 echo "$as_me:$LINENO: checking for $ac_func" >&5
16034 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16035 if eval "test \"\${$as_ac_var+set}\" = set"; then
16036   echo $ECHO_N "(cached) $ECHO_C" >&6
16037 else
16038   cat >conftest.$ac_ext <<_ACEOF
16039 /* confdefs.h.  */
16040 _ACEOF
16041 cat confdefs.h >>conftest.$ac_ext
16042 cat >>conftest.$ac_ext <<_ACEOF
16043 /* end confdefs.h.  */
16044 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16045    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16046 #define $ac_func innocuous_$ac_func
16047
16048 /* System header to define __stub macros and hopefully few prototypes,
16049     which can conflict with char $ac_func (); below.
16050     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16051     <limits.h> exists even on freestanding compilers.  */
16052
16053 #ifdef __STDC__
16054 # include <limits.h>
16055 #else
16056 # include <assert.h>
16057 #endif
16058
16059 #undef $ac_func
16060
16061 /* Override any gcc2 internal prototype to avoid an error.  */
16062 #ifdef __cplusplus
16063 extern "C"
16064 {
16065 #endif
16066 /* We use char because int might match the return type of a gcc2
16067    builtin and then its argument prototype would still apply.  */
16068 char $ac_func ();
16069 /* The GNU C library defines this for functions which it implements
16070     to always fail with ENOSYS.  Some functions are actually named
16071     something starting with __ and the normal name is an alias.  */
16072 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16073 choke me
16074 #else
16075 char (*f) () = $ac_func;
16076 #endif
16077 #ifdef __cplusplus
16078 }
16079 #endif
16080
16081 int
16082 main ()
16083 {
16084 return f != $ac_func;
16085   ;
16086   return 0;
16087 }
16088 _ACEOF
16089 rm -f conftest.$ac_objext conftest$ac_exeext
16090 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16091   (eval $ac_link) 2>conftest.er1
16092   ac_status=$?
16093   grep -v '^ *+' conftest.er1 >conftest.err
16094   rm -f conftest.er1
16095   cat conftest.err >&5
16096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16097   (exit $ac_status); } &&
16098          { ac_try='test -z "$ac_c_werror_flag"
16099                          || test ! -s conftest.err'
16100   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16101   (eval $ac_try) 2>&5
16102   ac_status=$?
16103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16104   (exit $ac_status); }; } &&
16105          { ac_try='test -s conftest$ac_exeext'
16106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16107   (eval $ac_try) 2>&5
16108   ac_status=$?
16109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16110   (exit $ac_status); }; }; then
16111   eval "$as_ac_var=yes"
16112 else
16113   echo "$as_me: failed program was:" >&5
16114 sed 's/^/| /' conftest.$ac_ext >&5
16115
16116 eval "$as_ac_var=no"
16117 fi
16118 rm -f conftest.err conftest.$ac_objext \
16119       conftest$ac_exeext conftest.$ac_ext
16120 fi
16121 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16122 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16123 if test `eval echo '${'$as_ac_var'}'` = yes; then
16124   cat >>confdefs.h <<_ACEOF
16125 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16126 _ACEOF
16127
16128 fi
16129 done
16130
16131 ol_cv_func_strerror_r=no
16132 if test "${ac_cv_func_strerror_r}" = yes ; then
16133         echo "$as_me:$LINENO: checking non-posix strerror_r" >&5
16134 echo $ECHO_N "checking non-posix strerror_r... $ECHO_C" >&6
16135 if test "${ol_cv_nonposix_strerror_r+set}" = set; then
16136   echo $ECHO_N "(cached) $ECHO_C" >&6
16137 else
16138
16139         cat >conftest.$ac_ext <<_ACEOF
16140 /* confdefs.h.  */
16141 _ACEOF
16142 cat confdefs.h >>conftest.$ac_ext
16143 cat >>conftest.$ac_ext <<_ACEOF
16144 /* end confdefs.h.  */
16145 #include <string.h>
16146 _ACEOF
16147 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16148   $EGREP "strerror_r" >/dev/null 2>&1; then
16149   ol_decl_strerror_r=yes
16150 else
16151   ol_decl_strerror_r=no
16152 fi
16153 rm -f conftest*
16154
16155         if test $ol_decl_strerror_r = yes ; then
16156                 cat >conftest.$ac_ext <<_ACEOF
16157 /* confdefs.h.  */
16158 _ACEOF
16159 cat confdefs.h >>conftest.$ac_ext
16160 cat >>conftest.$ac_ext <<_ACEOF
16161 /* end confdefs.h.  */
16162 #include <string.h>
16163 int
16164 main ()
16165 {
16166    /* from autoconf 2.59 */
16167                                 char buf[100];
16168                                 char x = *strerror_r (0, buf, sizeof buf);
16169                                 char *p = strerror_r (0, buf, sizeof buf);
16170
16171   ;
16172   return 0;
16173 }
16174 _ACEOF
16175 rm -f conftest.$ac_objext
16176 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16177   (eval $ac_compile) 2>conftest.er1
16178   ac_status=$?
16179   grep -v '^ *+' conftest.er1 >conftest.err
16180   rm -f conftest.er1
16181   cat conftest.err >&5
16182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16183   (exit $ac_status); } &&
16184          { ac_try='test -z "$ac_c_werror_flag"
16185                          || test ! -s conftest.err'
16186   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16187   (eval $ac_try) 2>&5
16188   ac_status=$?
16189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16190   (exit $ac_status); }; } &&
16191          { ac_try='test -s conftest.$ac_objext'
16192   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16193   (eval $ac_try) 2>&5
16194   ac_status=$?
16195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16196   (exit $ac_status); }; }; then
16197   ol_cv_nonposix_strerror_r=yes
16198 else
16199   echo "$as_me: failed program was:" >&5
16200 sed 's/^/| /' conftest.$ac_ext >&5
16201
16202 ol_cv_nonposix_strerror_r=no
16203 fi
16204 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16205         else
16206                 if test "$cross_compiling" = yes; then
16207   ol_cv_nonposix_strerror=no
16208 else
16209   cat >conftest.$ac_ext <<_ACEOF
16210 /* confdefs.h.  */
16211 _ACEOF
16212 cat confdefs.h >>conftest.$ac_ext
16213 cat >>conftest.$ac_ext <<_ACEOF
16214 /* end confdefs.h.  */
16215
16216                         main() {
16217                                 char buf[100];
16218                                 buf[0] = 0;
16219                                 strerror_r( 1, buf, sizeof buf );
16220                                 exit( buf[0] == 0 );
16221                         }
16222
16223 _ACEOF
16224 rm -f conftest$ac_exeext
16225 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16226   (eval $ac_link) 2>&5
16227   ac_status=$?
16228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16229   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16231   (eval $ac_try) 2>&5
16232   ac_status=$?
16233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16234   (exit $ac_status); }; }; then
16235   ol_cv_nonposix_strerror_r=yes
16236 else
16237   echo "$as_me: program exited with status $ac_status" >&5
16238 echo "$as_me: failed program was:" >&5
16239 sed 's/^/| /' conftest.$ac_ext >&5
16240
16241 ( exit $ac_status )
16242 ol_cv_nonposix_strerror=no
16243 fi
16244 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16245 fi
16246         fi
16247
16248 fi
16249 echo "$as_me:$LINENO: result: $ol_cv_nonposix_strerror_r" >&5
16250 echo "${ECHO_T}$ol_cv_nonposix_strerror_r" >&6
16251 if test $ol_cv_nonposix_strerror_r = yes ; then
16252
16253 cat >>confdefs.h <<\_ACEOF
16254 #define HAVE_NONPOSIX_STRERROR_R 1
16255 _ACEOF
16256
16257 fi
16258
16259 elif test "${ac_cv_func_strerror}" = no ; then
16260         echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5
16261 echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6
16262 if test "${ol_cv_dcl_sys_errlist+set}" = set; then
16263   echo $ECHO_N "(cached) $ECHO_C" >&6
16264 else
16265
16266         cat >conftest.$ac_ext <<_ACEOF
16267 /* confdefs.h.  */
16268 _ACEOF
16269 cat confdefs.h >>conftest.$ac_ext
16270 cat >>conftest.$ac_ext <<_ACEOF
16271 /* end confdefs.h.  */
16272
16273 #include <stdio.h>
16274 #include <sys/types.h>
16275 #include <errno.h>
16276 #ifdef WINNT
16277 #include <stdlib.h>
16278 #endif
16279 int
16280 main ()
16281 {
16282 char *c = (char *) *sys_errlist
16283   ;
16284   return 0;
16285 }
16286 _ACEOF
16287 rm -f conftest.$ac_objext
16288 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16289   (eval $ac_compile) 2>conftest.er1
16290   ac_status=$?
16291   grep -v '^ *+' conftest.er1 >conftest.err
16292   rm -f conftest.er1
16293   cat conftest.err >&5
16294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16295   (exit $ac_status); } &&
16296          { ac_try='test -z "$ac_c_werror_flag"
16297                          || test ! -s conftest.err'
16298   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16299   (eval $ac_try) 2>&5
16300   ac_status=$?
16301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16302   (exit $ac_status); }; } &&
16303          { ac_try='test -s conftest.$ac_objext'
16304   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16305   (eval $ac_try) 2>&5
16306   ac_status=$?
16307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16308   (exit $ac_status); }; }; then
16309   ol_cv_dcl_sys_errlist=yes
16310         ol_cv_have_sys_errlist=yes
16311 else
16312   echo "$as_me: failed program was:" >&5
16313 sed 's/^/| /' conftest.$ac_ext >&5
16314
16315 ol_cv_dcl_sys_errlist=no
16316 fi
16317 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16318 fi
16319 echo "$as_me:$LINENO: result: $ol_cv_dcl_sys_errlist" >&5
16320 echo "${ECHO_T}$ol_cv_dcl_sys_errlist" >&6
16321 #
16322 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16323 if test $ol_cv_dcl_sys_errlist = no ; then
16324
16325 cat >>confdefs.h <<\_ACEOF
16326 #define DECL_SYS_ERRLIST 1
16327 _ACEOF
16328
16329
16330         echo "$as_me:$LINENO: checking existence of sys_errlist" >&5
16331 echo $ECHO_N "checking existence of sys_errlist... $ECHO_C" >&6
16332 if test "${ol_cv_have_sys_errlist+set}" = set; then
16333   echo $ECHO_N "(cached) $ECHO_C" >&6
16334 else
16335
16336                 cat >conftest.$ac_ext <<_ACEOF
16337 /* confdefs.h.  */
16338 _ACEOF
16339 cat confdefs.h >>conftest.$ac_ext
16340 cat >>conftest.$ac_ext <<_ACEOF
16341 /* end confdefs.h.  */
16342 #include <errno.h>
16343 int
16344 main ()
16345 {
16346 char *c = (char *) *sys_errlist
16347   ;
16348   return 0;
16349 }
16350 _ACEOF
16351 rm -f conftest.$ac_objext conftest$ac_exeext
16352 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16353   (eval $ac_link) 2>conftest.er1
16354   ac_status=$?
16355   grep -v '^ *+' conftest.er1 >conftest.err
16356   rm -f conftest.er1
16357   cat conftest.err >&5
16358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16359   (exit $ac_status); } &&
16360          { ac_try='test -z "$ac_c_werror_flag"
16361                          || test ! -s conftest.err'
16362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16363   (eval $ac_try) 2>&5
16364   ac_status=$?
16365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16366   (exit $ac_status); }; } &&
16367          { ac_try='test -s conftest$ac_exeext'
16368   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16369   (eval $ac_try) 2>&5
16370   ac_status=$?
16371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16372   (exit $ac_status); }; }; then
16373   ol_cv_have_sys_errlist=yes
16374 else
16375   echo "$as_me: failed program was:" >&5
16376 sed 's/^/| /' conftest.$ac_ext >&5
16377
16378 ol_cv_have_sys_errlist=no
16379 fi
16380 rm -f conftest.err conftest.$ac_objext \
16381       conftest$ac_exeext conftest.$ac_ext
16382 fi
16383 echo "$as_me:$LINENO: result: $ol_cv_have_sys_errlist" >&5
16384 echo "${ECHO_T}$ol_cv_have_sys_errlist" >&6
16385 fi
16386 if test $ol_cv_have_sys_errlist = yes ; then
16387
16388 cat >>confdefs.h <<\_ACEOF
16389 #define HAVE_SYS_ERRLIST 1
16390 _ACEOF
16391
16392 fi
16393
16394 fi
16395
16396
16397
16398 for ac_header in regex.h
16399 do
16400 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16401 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16402   echo "$as_me:$LINENO: checking for $ac_header" >&5
16403 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16404 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16405   echo $ECHO_N "(cached) $ECHO_C" >&6
16406 fi
16407 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16408 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16409 else
16410   # Is the header compilable?
16411 echo "$as_me:$LINENO: checking $ac_header usability" >&5
16412 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16413 cat >conftest.$ac_ext <<_ACEOF
16414 /* confdefs.h.  */
16415 _ACEOF
16416 cat confdefs.h >>conftest.$ac_ext
16417 cat >>conftest.$ac_ext <<_ACEOF
16418 /* end confdefs.h.  */
16419 $ac_includes_default
16420 #include <$ac_header>
16421 _ACEOF
16422 rm -f conftest.$ac_objext
16423 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16424   (eval $ac_compile) 2>conftest.er1
16425   ac_status=$?
16426   grep -v '^ *+' conftest.er1 >conftest.err
16427   rm -f conftest.er1
16428   cat conftest.err >&5
16429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16430   (exit $ac_status); } &&
16431          { ac_try='test -z "$ac_c_werror_flag"
16432                          || test ! -s conftest.err'
16433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16434   (eval $ac_try) 2>&5
16435   ac_status=$?
16436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16437   (exit $ac_status); }; } &&
16438          { ac_try='test -s conftest.$ac_objext'
16439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16440   (eval $ac_try) 2>&5
16441   ac_status=$?
16442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16443   (exit $ac_status); }; }; then
16444   ac_header_compiler=yes
16445 else
16446   echo "$as_me: failed program was:" >&5
16447 sed 's/^/| /' conftest.$ac_ext >&5
16448
16449 ac_header_compiler=no
16450 fi
16451 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16452 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16453 echo "${ECHO_T}$ac_header_compiler" >&6
16454
16455 # Is the header present?
16456 echo "$as_me:$LINENO: checking $ac_header presence" >&5
16457 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16458 cat >conftest.$ac_ext <<_ACEOF
16459 /* confdefs.h.  */
16460 _ACEOF
16461 cat confdefs.h >>conftest.$ac_ext
16462 cat >>conftest.$ac_ext <<_ACEOF
16463 /* end confdefs.h.  */
16464 #include <$ac_header>
16465 _ACEOF
16466 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16467   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16468   ac_status=$?
16469   grep -v '^ *+' conftest.er1 >conftest.err
16470   rm -f conftest.er1
16471   cat conftest.err >&5
16472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16473   (exit $ac_status); } >/dev/null; then
16474   if test -s conftest.err; then
16475     ac_cpp_err=$ac_c_preproc_warn_flag
16476     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16477   else
16478     ac_cpp_err=
16479   fi
16480 else
16481   ac_cpp_err=yes
16482 fi
16483 if test -z "$ac_cpp_err"; then
16484   ac_header_preproc=yes
16485 else
16486   echo "$as_me: failed program was:" >&5
16487 sed 's/^/| /' conftest.$ac_ext >&5
16488
16489   ac_header_preproc=no
16490 fi
16491 rm -f conftest.err conftest.$ac_ext
16492 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16493 echo "${ECHO_T}$ac_header_preproc" >&6
16494
16495 # So?  What about this header?
16496 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16497   yes:no: )
16498     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16499 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16500     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16501 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16502     ac_header_preproc=yes
16503     ;;
16504   no:yes:* )
16505     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16506 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16507     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
16508 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
16509     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16510 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16511     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
16512 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
16513     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16514 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16515     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16516 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
16517     (
16518       cat <<\_ASBOX
16519 ## --------------------------------------------- ##
16520 ## Report this to <http://www.openldap.org/its/> ##
16521 ## --------------------------------------------- ##
16522 _ASBOX
16523     ) |
16524       sed "s/^/$as_me: WARNING:     /" >&2
16525     ;;
16526 esac
16527 echo "$as_me:$LINENO: checking for $ac_header" >&5
16528 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16529 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16530   echo $ECHO_N "(cached) $ECHO_C" >&6
16531 else
16532   eval "$as_ac_Header=\$ac_header_preproc"
16533 fi
16534 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16535 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16536
16537 fi
16538 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16539   cat >>confdefs.h <<_ACEOF
16540 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16541 _ACEOF
16542
16543 fi
16544
16545 done
16546
16547 if test "$ac_cv_header_regex_h" != yes ; then
16548         { { echo "$as_me:$LINENO: error: POSIX regex.h required." >&5
16549 echo "$as_me: error: POSIX regex.h required." >&2;}
16550    { (exit 1); exit 1; }; }
16551 fi
16552 echo "$as_me:$LINENO: checking for library containing regfree" >&5
16553 echo $ECHO_N "checking for library containing regfree... $ECHO_C" >&6
16554 if test "${ac_cv_search_regfree+set}" = set; then
16555   echo $ECHO_N "(cached) $ECHO_C" >&6
16556 else
16557   ac_func_search_save_LIBS=$LIBS
16558 ac_cv_search_regfree=no
16559 cat >conftest.$ac_ext <<_ACEOF
16560 /* confdefs.h.  */
16561 _ACEOF
16562 cat confdefs.h >>conftest.$ac_ext
16563 cat >>conftest.$ac_ext <<_ACEOF
16564 /* end confdefs.h.  */
16565
16566 /* Override any gcc2 internal prototype to avoid an error.  */
16567 #ifdef __cplusplus
16568 extern "C"
16569 #endif
16570 /* We use char because int might match the return type of a gcc2
16571    builtin and then its argument prototype would still apply.  */
16572 char regfree ();
16573 int
16574 main ()
16575 {
16576 regfree ();
16577   ;
16578   return 0;
16579 }
16580 _ACEOF
16581 rm -f conftest.$ac_objext conftest$ac_exeext
16582 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16583   (eval $ac_link) 2>conftest.er1
16584   ac_status=$?
16585   grep -v '^ *+' conftest.er1 >conftest.err
16586   rm -f conftest.er1
16587   cat conftest.err >&5
16588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16589   (exit $ac_status); } &&
16590          { ac_try='test -z "$ac_c_werror_flag"
16591                          || test ! -s conftest.err'
16592   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16593   (eval $ac_try) 2>&5
16594   ac_status=$?
16595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16596   (exit $ac_status); }; } &&
16597          { ac_try='test -s conftest$ac_exeext'
16598   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16599   (eval $ac_try) 2>&5
16600   ac_status=$?
16601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16602   (exit $ac_status); }; }; then
16603   ac_cv_search_regfree="none required"
16604 else
16605   echo "$as_me: failed program was:" >&5
16606 sed 's/^/| /' conftest.$ac_ext >&5
16607
16608 fi
16609 rm -f conftest.err conftest.$ac_objext \
16610       conftest$ac_exeext conftest.$ac_ext
16611 if test "$ac_cv_search_regfree" = no; then
16612   for ac_lib in regex gnuregex; do
16613     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16614     cat >conftest.$ac_ext <<_ACEOF
16615 /* confdefs.h.  */
16616 _ACEOF
16617 cat confdefs.h >>conftest.$ac_ext
16618 cat >>conftest.$ac_ext <<_ACEOF
16619 /* end confdefs.h.  */
16620
16621 /* Override any gcc2 internal prototype to avoid an error.  */
16622 #ifdef __cplusplus
16623 extern "C"
16624 #endif
16625 /* We use char because int might match the return type of a gcc2
16626    builtin and then its argument prototype would still apply.  */
16627 char regfree ();
16628 int
16629 main ()
16630 {
16631 regfree ();
16632   ;
16633   return 0;
16634 }
16635 _ACEOF
16636 rm -f conftest.$ac_objext conftest$ac_exeext
16637 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16638   (eval $ac_link) 2>conftest.er1
16639   ac_status=$?
16640   grep -v '^ *+' conftest.er1 >conftest.err
16641   rm -f conftest.er1
16642   cat conftest.err >&5
16643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16644   (exit $ac_status); } &&
16645          { ac_try='test -z "$ac_c_werror_flag"
16646                          || test ! -s conftest.err'
16647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16648   (eval $ac_try) 2>&5
16649   ac_status=$?
16650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16651   (exit $ac_status); }; } &&
16652          { ac_try='test -s conftest$ac_exeext'
16653   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16654   (eval $ac_try) 2>&5
16655   ac_status=$?
16656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16657   (exit $ac_status); }; }; then
16658   ac_cv_search_regfree="-l$ac_lib"
16659 break
16660 else
16661   echo "$as_me: failed program was:" >&5
16662 sed 's/^/| /' conftest.$ac_ext >&5
16663
16664 fi
16665 rm -f conftest.err conftest.$ac_objext \
16666       conftest$ac_exeext conftest.$ac_ext
16667   done
16668 fi
16669 LIBS=$ac_func_search_save_LIBS
16670 fi
16671 echo "$as_me:$LINENO: result: $ac_cv_search_regfree" >&5
16672 echo "${ECHO_T}$ac_cv_search_regfree" >&6
16673 if test "$ac_cv_search_regfree" != no; then
16674   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
16675   :
16676 else
16677   { { echo "$as_me:$LINENO: error: POSIX regex required." >&5
16678 echo "$as_me: error: POSIX regex required." >&2;}
16679    { (exit 1); exit 1; }; }
16680 fi
16681
16682
16683
16684 echo "$as_me:$LINENO: checking for compatible POSIX regex" >&5
16685 echo $ECHO_N "checking for compatible POSIX regex... $ECHO_C" >&6
16686 if test "${ol_cv_c_posix_regex+set}" = set; then
16687   echo $ECHO_N "(cached) $ECHO_C" >&6
16688 else
16689
16690         if test "$cross_compiling" = yes; then
16691   ol_cv_c_posix_regex=cross
16692 else
16693   cat >conftest.$ac_ext <<_ACEOF
16694 /* confdefs.h.  */
16695 _ACEOF
16696 cat confdefs.h >>conftest.$ac_ext
16697 cat >>conftest.$ac_ext <<_ACEOF
16698 /* end confdefs.h.  */
16699
16700 #include <sys/types.h>
16701 #include <regex.h>
16702 static char *pattern, *string;
16703 main()
16704 {
16705         int rc;
16706         regex_t re;
16707
16708         pattern = "^A";
16709
16710         if(regcomp(&re, pattern, 0)) {
16711                 return -1;
16712         }
16713
16714         string = "ALL MATCH";
16715
16716         rc = regexec(&re, string, 0, (void*)0, 0);
16717
16718         regfree(&re);
16719
16720         return rc;
16721 }
16722 _ACEOF
16723 rm -f conftest$ac_exeext
16724 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16725   (eval $ac_link) 2>&5
16726   ac_status=$?
16727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16728   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16729   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16730   (eval $ac_try) 2>&5
16731   ac_status=$?
16732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16733   (exit $ac_status); }; }; then
16734   ol_cv_c_posix_regex=yes
16735 else
16736   echo "$as_me: program exited with status $ac_status" >&5
16737 echo "$as_me: failed program was:" >&5
16738 sed 's/^/| /' conftest.$ac_ext >&5
16739
16740 ( exit $ac_status )
16741 ol_cv_c_posix_regex=no
16742 fi
16743 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16744 fi
16745 fi
16746 echo "$as_me:$LINENO: result: $ol_cv_c_posix_regex" >&5
16747 echo "${ECHO_T}$ol_cv_c_posix_regex" >&6
16748
16749 if test "$ol_cv_c_posix_regex" = no ; then
16750         { { echo "$as_me:$LINENO: error: broken POSIX regex!" >&5
16751 echo "$as_me: error: broken POSIX regex!" >&2;}
16752    { (exit 1); exit 1; }; }
16753 fi
16754
16755
16756 have_uuid=no
16757
16758 for ac_header in sys/uuid.h
16759 do
16760 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16761 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16762   echo "$as_me:$LINENO: checking for $ac_header" >&5
16763 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16764 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16765   echo $ECHO_N "(cached) $ECHO_C" >&6
16766 fi
16767 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16768 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16769 else
16770   # Is the header compilable?
16771 echo "$as_me:$LINENO: checking $ac_header usability" >&5
16772 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16773 cat >conftest.$ac_ext <<_ACEOF
16774 /* confdefs.h.  */
16775 _ACEOF
16776 cat confdefs.h >>conftest.$ac_ext
16777 cat >>conftest.$ac_ext <<_ACEOF
16778 /* end confdefs.h.  */
16779 $ac_includes_default
16780 #include <$ac_header>
16781 _ACEOF
16782 rm -f conftest.$ac_objext
16783 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16784   (eval $ac_compile) 2>conftest.er1
16785   ac_status=$?
16786   grep -v '^ *+' conftest.er1 >conftest.err
16787   rm -f conftest.er1
16788   cat conftest.err >&5
16789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16790   (exit $ac_status); } &&
16791          { ac_try='test -z "$ac_c_werror_flag"
16792                          || test ! -s conftest.err'
16793   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16794   (eval $ac_try) 2>&5
16795   ac_status=$?
16796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16797   (exit $ac_status); }; } &&
16798          { ac_try='test -s conftest.$ac_objext'
16799   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16800   (eval $ac_try) 2>&5
16801   ac_status=$?
16802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16803   (exit $ac_status); }; }; then
16804   ac_header_compiler=yes
16805 else
16806   echo "$as_me: failed program was:" >&5
16807 sed 's/^/| /' conftest.$ac_ext >&5
16808
16809 ac_header_compiler=no
16810 fi
16811 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16812 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16813 echo "${ECHO_T}$ac_header_compiler" >&6
16814
16815 # Is the header present?
16816 echo "$as_me:$LINENO: checking $ac_header presence" >&5
16817 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16818 cat >conftest.$ac_ext <<_ACEOF
16819 /* confdefs.h.  */
16820 _ACEOF
16821 cat confdefs.h >>conftest.$ac_ext
16822 cat >>conftest.$ac_ext <<_ACEOF
16823 /* end confdefs.h.  */
16824 #include <$ac_header>
16825 _ACEOF
16826 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16827   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16828   ac_status=$?
16829   grep -v '^ *+' conftest.er1 >conftest.err
16830   rm -f conftest.er1
16831   cat conftest.err >&5
16832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16833   (exit $ac_status); } >/dev/null; then
16834   if test -s conftest.err; then
16835     ac_cpp_err=$ac_c_preproc_warn_flag
16836     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16837   else
16838     ac_cpp_err=
16839   fi
16840 else
16841   ac_cpp_err=yes
16842 fi
16843 if test -z "$ac_cpp_err"; then
16844   ac_header_preproc=yes
16845 else
16846   echo "$as_me: failed program was:" >&5
16847 sed 's/^/| /' conftest.$ac_ext >&5
16848
16849   ac_header_preproc=no
16850 fi
16851 rm -f conftest.err conftest.$ac_ext
16852 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16853 echo "${ECHO_T}$ac_header_preproc" >&6
16854
16855 # So?  What about this header?
16856 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16857   yes:no: )
16858     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16859 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16860     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16861 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16862     ac_header_preproc=yes
16863     ;;
16864   no:yes:* )
16865     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16866 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16867     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
16868 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
16869     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16870 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16871     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
16872 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
16873     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16874 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16875     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16876 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
16877     (
16878       cat <<\_ASBOX
16879 ## --------------------------------------------- ##
16880 ## Report this to <http://www.openldap.org/its/> ##
16881 ## --------------------------------------------- ##
16882 _ASBOX
16883     ) |
16884       sed "s/^/$as_me: WARNING:     /" >&2
16885     ;;
16886 esac
16887 echo "$as_me:$LINENO: checking for $ac_header" >&5
16888 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16889 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16890   echo $ECHO_N "(cached) $ECHO_C" >&6
16891 else
16892   eval "$as_ac_Header=\$ac_header_preproc"
16893 fi
16894 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16895 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16896
16897 fi
16898 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16899   cat >>confdefs.h <<_ACEOF
16900 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16901 _ACEOF
16902
16903 fi
16904
16905 done
16906
16907 if test $ac_cv_header_sys_uuid_h = yes ; then
16908         save_LIBS="$LIBS"
16909         echo "$as_me:$LINENO: checking for library containing uuid_to_str" >&5
16910 echo $ECHO_N "checking for library containing uuid_to_str... $ECHO_C" >&6
16911 if test "${ac_cv_search_uuid_to_str+set}" = set; then
16912   echo $ECHO_N "(cached) $ECHO_C" >&6
16913 else
16914   ac_func_search_save_LIBS=$LIBS
16915 ac_cv_search_uuid_to_str=no
16916 cat >conftest.$ac_ext <<_ACEOF
16917 /* confdefs.h.  */
16918 _ACEOF
16919 cat confdefs.h >>conftest.$ac_ext
16920 cat >>conftest.$ac_ext <<_ACEOF
16921 /* end confdefs.h.  */
16922
16923 /* Override any gcc2 internal prototype to avoid an error.  */
16924 #ifdef __cplusplus
16925 extern "C"
16926 #endif
16927 /* We use char because int might match the return type of a gcc2
16928    builtin and then its argument prototype would still apply.  */
16929 char uuid_to_str ();
16930 int
16931 main ()
16932 {
16933 uuid_to_str ();
16934   ;
16935   return 0;
16936 }
16937 _ACEOF
16938 rm -f conftest.$ac_objext conftest$ac_exeext
16939 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16940   (eval $ac_link) 2>conftest.er1
16941   ac_status=$?
16942   grep -v '^ *+' conftest.er1 >conftest.err
16943   rm -f conftest.er1
16944   cat conftest.err >&5
16945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16946   (exit $ac_status); } &&
16947          { ac_try='test -z "$ac_c_werror_flag"
16948                          || test ! -s conftest.err'
16949   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16950   (eval $ac_try) 2>&5
16951   ac_status=$?
16952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16953   (exit $ac_status); }; } &&
16954          { ac_try='test -s conftest$ac_exeext'
16955   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16956   (eval $ac_try) 2>&5
16957   ac_status=$?
16958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16959   (exit $ac_status); }; }; then
16960   ac_cv_search_uuid_to_str="none required"
16961 else
16962   echo "$as_me: failed program was:" >&5
16963 sed 's/^/| /' conftest.$ac_ext >&5
16964
16965 fi
16966 rm -f conftest.err conftest.$ac_objext \
16967       conftest$ac_exeext conftest.$ac_ext
16968 if test "$ac_cv_search_uuid_to_str" = no; then
16969   for ac_lib in uuid; do
16970     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16971     cat >conftest.$ac_ext <<_ACEOF
16972 /* confdefs.h.  */
16973 _ACEOF
16974 cat confdefs.h >>conftest.$ac_ext
16975 cat >>conftest.$ac_ext <<_ACEOF
16976 /* end confdefs.h.  */
16977
16978 /* Override any gcc2 internal prototype to avoid an error.  */
16979 #ifdef __cplusplus
16980 extern "C"
16981 #endif
16982 /* We use char because int might match the return type of a gcc2
16983    builtin and then its argument prototype would still apply.  */
16984 char uuid_to_str ();
16985 int
16986 main ()
16987 {
16988 uuid_to_str ();
16989   ;
16990   return 0;
16991 }
16992 _ACEOF
16993 rm -f conftest.$ac_objext conftest$ac_exeext
16994 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16995   (eval $ac_link) 2>conftest.er1
16996   ac_status=$?
16997   grep -v '^ *+' conftest.er1 >conftest.err
16998   rm -f conftest.er1
16999   cat conftest.err >&5
17000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17001   (exit $ac_status); } &&
17002          { ac_try='test -z "$ac_c_werror_flag"
17003                          || test ! -s conftest.err'
17004   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17005   (eval $ac_try) 2>&5
17006   ac_status=$?
17007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17008   (exit $ac_status); }; } &&
17009          { ac_try='test -s conftest$ac_exeext'
17010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17011   (eval $ac_try) 2>&5
17012   ac_status=$?
17013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17014   (exit $ac_status); }; }; then
17015   ac_cv_search_uuid_to_str="-l$ac_lib"
17016 break
17017 else
17018   echo "$as_me: failed program was:" >&5
17019 sed 's/^/| /' conftest.$ac_ext >&5
17020
17021 fi
17022 rm -f conftest.err conftest.$ac_objext \
17023       conftest$ac_exeext conftest.$ac_ext
17024   done
17025 fi
17026 LIBS=$ac_func_search_save_LIBS
17027 fi
17028 echo "$as_me:$LINENO: result: $ac_cv_search_uuid_to_str" >&5
17029 echo "${ECHO_T}$ac_cv_search_uuid_to_str" >&6
17030 if test "$ac_cv_search_uuid_to_str" != no; then
17031   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
17032   have_uuid=yes
17033 else
17034   :
17035 fi
17036
17037         LIBS="$save_LIBS"
17038
17039         if test have_uuid = yes ; then
17040
17041 cat >>confdefs.h <<\_ACEOF
17042 #define HAVE_UUID_TO_STR 1
17043 _ACEOF
17044
17045
17046                 test "$ac_cv_search_uuid_to_str" = "none required" || \
17047                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
17048         fi
17049 fi
17050
17051 if test $have_uuid = no ; then
17052         echo "$as_me:$LINENO: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
17053 echo $ECHO_N "checking to see if -lrpcrt4 is needed for win32 UUID support... $ECHO_C" >&6
17054         save_LIBS="$LIBS"
17055         LIBS="$LIBS -lrpcrt4"
17056         cat >conftest.$ac_ext <<_ACEOF
17057 /* confdefs.h.  */
17058 _ACEOF
17059 cat confdefs.h >>conftest.$ac_ext
17060 cat >>conftest.$ac_ext <<_ACEOF
17061 /* end confdefs.h.  */
17062
17063                 int __stdcall UuidCreate(void *);
17064                 int __stdcall UuidToStringA(void *,void **);
17065
17066 int
17067 main ()
17068 {
17069
17070                 UuidCreate(0);
17071                 UuidToStringA(0,0);
17072
17073   ;
17074   return 0;
17075 }
17076 _ACEOF
17077 rm -f conftest.$ac_objext conftest$ac_exeext
17078 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17079   (eval $ac_link) 2>conftest.er1
17080   ac_status=$?
17081   grep -v '^ *+' conftest.er1 >conftest.err
17082   rm -f conftest.er1
17083   cat conftest.err >&5
17084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17085   (exit $ac_status); } &&
17086          { ac_try='test -z "$ac_c_werror_flag"
17087                          || test ! -s conftest.err'
17088   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17089   (eval $ac_try) 2>&5
17090   ac_status=$?
17091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17092   (exit $ac_status); }; } &&
17093          { ac_try='test -s conftest$ac_exeext'
17094   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17095   (eval $ac_try) 2>&5
17096   ac_status=$?
17097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17098   (exit $ac_status); }; }; then
17099   need_rpcrt=yes
17100 else
17101   echo "$as_me: failed program was:" >&5
17102 sed 's/^/| /' conftest.$ac_ext >&5
17103
17104 need_rpcrt=no
17105 fi
17106 rm -f conftest.err conftest.$ac_objext \
17107       conftest$ac_exeext conftest.$ac_ext
17108         if test $need_rpcrt = yes; then
17109                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
17110         fi
17111         LIBS="$save_LIBS"
17112         echo "$as_me:$LINENO: result: $need_rpcrt" >&5
17113 echo "${ECHO_T}$need_rpcrt" >&6
17114 fi
17115
17116 ol_cv_lib_resolver=no
17117 if test $ol_cv_lib_resolver = no ; then
17118         echo "$as_me:$LINENO: checking for resolver link (default)" >&5
17119 echo $ECHO_N "checking for resolver link (default)... $ECHO_C" >&6
17120 if test "${ol_cv_resolver_none+set}" = set; then
17121   echo $ECHO_N "(cached) $ECHO_C" >&6
17122 else
17123
17124         ol_RESOLVER_LIB=
17125         ol_LIBS=$LIBS
17126         LIBS="$ol_RESOLVER_LIB $LIBS"
17127
17128         cat >conftest.$ac_ext <<_ACEOF
17129 /* confdefs.h.  */
17130 _ACEOF
17131 cat confdefs.h >>conftest.$ac_ext
17132 cat >>conftest.$ac_ext <<_ACEOF
17133 /* end confdefs.h.  */
17134
17135 #ifdef HAVE_SYS_TYPES_H
17136 #       include <sys/types.h>
17137 #endif
17138 #include <netinet/in.h>
17139 #ifdef HAVE_ARPA_NAMESER_H
17140 #       include <arpa/nameser.h>
17141 #endif
17142 #ifdef HAVE_RESOLV_H
17143 #       include <resolv.h>
17144 #endif
17145
17146 int
17147 main ()
17148 {
17149 {
17150         int len, status;
17151         char *request = NULL;
17152         unsigned char reply[64*1024];
17153         unsigned char host[64*1024];
17154         unsigned char *p;
17155
17156 #ifdef NS_HFIXEDSZ
17157         /* Bind 8/9 interface */
17158         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17159 #else
17160         /* Bind 4 interface */
17161 # ifndef T_SRV
17162 #  define T_SRV 33
17163 # endif
17164         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17165 #endif
17166         p = reply;
17167 #ifdef NS_HFIXEDSZ
17168         /* Bind 8/9 interface */
17169         p += NS_HFIXEDSZ;
17170 #elif defined(HFIXEDSZ)
17171         /* Bind 4 interface w/ HFIXEDSZ */
17172         p += HFIXEDSZ;
17173 #else
17174         /* Bind 4 interface w/o HFIXEDSZ */
17175         p += sizeof(HEADER);
17176 #endif
17177         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17178 }
17179   ;
17180   return 0;
17181 }
17182 _ACEOF
17183 rm -f conftest.$ac_objext conftest$ac_exeext
17184 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17185   (eval $ac_link) 2>conftest.er1
17186   ac_status=$?
17187   grep -v '^ *+' conftest.er1 >conftest.err
17188   rm -f conftest.er1
17189   cat conftest.err >&5
17190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17191   (exit $ac_status); } &&
17192          { ac_try='test -z "$ac_c_werror_flag"
17193                          || test ! -s conftest.err'
17194   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17195   (eval $ac_try) 2>&5
17196   ac_status=$?
17197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17198   (exit $ac_status); }; } &&
17199          { ac_try='test -s conftest$ac_exeext'
17200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17201   (eval $ac_try) 2>&5
17202   ac_status=$?
17203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17204   (exit $ac_status); }; }; then
17205   ol_cv_resolver_none=yes
17206 else
17207   echo "$as_me: failed program was:" >&5
17208 sed 's/^/| /' conftest.$ac_ext >&5
17209
17210 ol_cv_resolver_none=no
17211 fi
17212 rm -f conftest.err conftest.$ac_objext \
17213       conftest$ac_exeext conftest.$ac_ext
17214
17215         LIBS="$ol_LIBS"
17216
17217 fi
17218 echo "$as_me:$LINENO: result: $ol_cv_resolver_none" >&5
17219 echo "${ECHO_T}$ol_cv_resolver_none" >&6
17220
17221         if test $ol_cv_resolver_none = yes ; then
17222                 ol_cv_lib_resolver=yes
17223         fi
17224 fi
17225
17226 if test $ol_cv_lib_resolver = no ; then
17227         echo "$as_me:$LINENO: checking for resolver link (-lresolv)" >&5
17228 echo $ECHO_N "checking for resolver link (-lresolv)... $ECHO_C" >&6
17229 if test "${ol_cv_resolver_resolv+set}" = set; then
17230   echo $ECHO_N "(cached) $ECHO_C" >&6
17231 else
17232
17233         ol_RESOLVER_LIB=-lresolv
17234         ol_LIBS=$LIBS
17235         LIBS="$ol_RESOLVER_LIB $LIBS"
17236
17237         cat >conftest.$ac_ext <<_ACEOF
17238 /* confdefs.h.  */
17239 _ACEOF
17240 cat confdefs.h >>conftest.$ac_ext
17241 cat >>conftest.$ac_ext <<_ACEOF
17242 /* end confdefs.h.  */
17243
17244 #ifdef HAVE_SYS_TYPES_H
17245 #       include <sys/types.h>
17246 #endif
17247 #include <netinet/in.h>
17248 #ifdef HAVE_ARPA_NAMESER_H
17249 #       include <arpa/nameser.h>
17250 #endif
17251 #ifdef HAVE_RESOLV_H
17252 #       include <resolv.h>
17253 #endif
17254
17255 int
17256 main ()
17257 {
17258 {
17259         int len, status;
17260         char *request = NULL;
17261         unsigned char reply[64*1024];
17262         unsigned char host[64*1024];
17263         unsigned char *p;
17264
17265 #ifdef NS_HFIXEDSZ
17266         /* Bind 8/9 interface */
17267         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17268 #else
17269         /* Bind 4 interface */
17270 # ifndef T_SRV
17271 #  define T_SRV 33
17272 # endif
17273         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17274 #endif
17275         p = reply;
17276 #ifdef NS_HFIXEDSZ
17277         /* Bind 8/9 interface */
17278         p += NS_HFIXEDSZ;
17279 #elif defined(HFIXEDSZ)
17280         /* Bind 4 interface w/ HFIXEDSZ */
17281         p += HFIXEDSZ;
17282 #else
17283         /* Bind 4 interface w/o HFIXEDSZ */
17284         p += sizeof(HEADER);
17285 #endif
17286         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17287 }
17288   ;
17289   return 0;
17290 }
17291 _ACEOF
17292 rm -f conftest.$ac_objext conftest$ac_exeext
17293 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17294   (eval $ac_link) 2>conftest.er1
17295   ac_status=$?
17296   grep -v '^ *+' conftest.er1 >conftest.err
17297   rm -f conftest.er1
17298   cat conftest.err >&5
17299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17300   (exit $ac_status); } &&
17301          { ac_try='test -z "$ac_c_werror_flag"
17302                          || test ! -s conftest.err'
17303   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17304   (eval $ac_try) 2>&5
17305   ac_status=$?
17306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17307   (exit $ac_status); }; } &&
17308          { ac_try='test -s conftest$ac_exeext'
17309   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17310   (eval $ac_try) 2>&5
17311   ac_status=$?
17312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17313   (exit $ac_status); }; }; then
17314   ol_cv_resolver_resolv=yes
17315 else
17316   echo "$as_me: failed program was:" >&5
17317 sed 's/^/| /' conftest.$ac_ext >&5
17318
17319 ol_cv_resolver_resolv=no
17320 fi
17321 rm -f conftest.err conftest.$ac_objext \
17322       conftest$ac_exeext conftest.$ac_ext
17323
17324         LIBS="$ol_LIBS"
17325
17326 fi
17327 echo "$as_me:$LINENO: result: $ol_cv_resolver_resolv" >&5
17328 echo "${ECHO_T}$ol_cv_resolver_resolv" >&6
17329
17330         if test $ol_cv_resolver_resolv = yes ; then
17331                 ol_cv_lib_resolver=-lresolv
17332         fi
17333 fi
17334
17335 if test $ol_cv_lib_resolver = no ; then
17336         echo "$as_me:$LINENO: checking for resolver link (-lbind)" >&5
17337 echo $ECHO_N "checking for resolver link (-lbind)... $ECHO_C" >&6
17338 if test "${ol_cv_resolver_bind+set}" = set; then
17339   echo $ECHO_N "(cached) $ECHO_C" >&6
17340 else
17341
17342         ol_RESOLVER_LIB=-lbind
17343         ol_LIBS=$LIBS
17344         LIBS="$ol_RESOLVER_LIB $LIBS"
17345
17346         cat >conftest.$ac_ext <<_ACEOF
17347 /* confdefs.h.  */
17348 _ACEOF
17349 cat confdefs.h >>conftest.$ac_ext
17350 cat >>conftest.$ac_ext <<_ACEOF
17351 /* end confdefs.h.  */
17352
17353 #ifdef HAVE_SYS_TYPES_H
17354 #       include <sys/types.h>
17355 #endif
17356 #include <netinet/in.h>
17357 #ifdef HAVE_ARPA_NAMESER_H
17358 #       include <arpa/nameser.h>
17359 #endif
17360 #ifdef HAVE_RESOLV_H
17361 #       include <resolv.h>
17362 #endif
17363
17364 int
17365 main ()
17366 {
17367 {
17368         int len, status;
17369         char *request = NULL;
17370         unsigned char reply[64*1024];
17371         unsigned char host[64*1024];
17372         unsigned char *p;
17373
17374 #ifdef NS_HFIXEDSZ
17375         /* Bind 8/9 interface */
17376         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17377 #else
17378         /* Bind 4 interface */
17379 # ifndef T_SRV
17380 #  define T_SRV 33
17381 # endif
17382         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17383 #endif
17384         p = reply;
17385 #ifdef NS_HFIXEDSZ
17386         /* Bind 8/9 interface */
17387         p += NS_HFIXEDSZ;
17388 #elif defined(HFIXEDSZ)
17389         /* Bind 4 interface w/ HFIXEDSZ */
17390         p += HFIXEDSZ;
17391 #else
17392         /* Bind 4 interface w/o HFIXEDSZ */
17393         p += sizeof(HEADER);
17394 #endif
17395         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17396 }
17397   ;
17398   return 0;
17399 }
17400 _ACEOF
17401 rm -f conftest.$ac_objext conftest$ac_exeext
17402 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17403   (eval $ac_link) 2>conftest.er1
17404   ac_status=$?
17405   grep -v '^ *+' conftest.er1 >conftest.err
17406   rm -f conftest.er1
17407   cat conftest.err >&5
17408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17409   (exit $ac_status); } &&
17410          { ac_try='test -z "$ac_c_werror_flag"
17411                          || test ! -s conftest.err'
17412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17413   (eval $ac_try) 2>&5
17414   ac_status=$?
17415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17416   (exit $ac_status); }; } &&
17417          { ac_try='test -s conftest$ac_exeext'
17418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17419   (eval $ac_try) 2>&5
17420   ac_status=$?
17421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17422   (exit $ac_status); }; }; then
17423   ol_cv_resolver_bind=yes
17424 else
17425   echo "$as_me: failed program was:" >&5
17426 sed 's/^/| /' conftest.$ac_ext >&5
17427
17428 ol_cv_resolver_bind=no
17429 fi
17430 rm -f conftest.err conftest.$ac_objext \
17431       conftest$ac_exeext conftest.$ac_ext
17432
17433         LIBS="$ol_LIBS"
17434
17435 fi
17436 echo "$as_me:$LINENO: result: $ol_cv_resolver_bind" >&5
17437 echo "${ECHO_T}$ol_cv_resolver_bind" >&6
17438
17439         if test $ol_cv_resolver_bind = yes ; then
17440                 ol_cv_lib_resolver=-lbind
17441         fi
17442 fi
17443
17444
17445
17446 ol_link_dnssrv=no
17447 if test "$ol_cv_lib_resolver" != no ; then
17448
17449 cat >>confdefs.h <<\_ACEOF
17450 #define HAVE_RES_QUERY 1
17451 _ACEOF
17452
17453
17454         if test "$ol_enable_dnssrv" != no ; then
17455                 ol_link_dnssrv=yes
17456         fi
17457
17458         if test "$ol_cv_lib_resolver" != yes ; then
17459                 LIBS="$ol_cv_lib_resolver $LIBS"
17460         fi
17461 fi
17462
17463 if test "$ol_enable_dnssrv" = yes || test "$ol_enable_dnssrv" = mod ; then
17464         if test "$ol_link_dnssrv" = no ; then
17465                 { { echo "$as_me:$LINENO: error: DNSSRV requires res_query()" >&5
17466 echo "$as_me: error: DNSSRV requires res_query()" >&2;}
17467    { (exit 1); exit 1; }; }
17468         fi
17469 else
17470         ol_enable_dnssrv=no
17471 fi
17472
17473
17474 for ac_func in hstrerror
17475 do
17476 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17477 echo "$as_me:$LINENO: checking for $ac_func" >&5
17478 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17479 if eval "test \"\${$as_ac_var+set}\" = set"; then
17480   echo $ECHO_N "(cached) $ECHO_C" >&6
17481 else
17482   cat >conftest.$ac_ext <<_ACEOF
17483 /* confdefs.h.  */
17484 _ACEOF
17485 cat confdefs.h >>conftest.$ac_ext
17486 cat >>conftest.$ac_ext <<_ACEOF
17487 /* end confdefs.h.  */
17488 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17489    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17490 #define $ac_func innocuous_$ac_func
17491
17492 /* System header to define __stub macros and hopefully few prototypes,
17493     which can conflict with char $ac_func (); below.
17494     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17495     <limits.h> exists even on freestanding compilers.  */
17496
17497 #ifdef __STDC__
17498 # include <limits.h>
17499 #else
17500 # include <assert.h>
17501 #endif
17502
17503 #undef $ac_func
17504
17505 /* Override any gcc2 internal prototype to avoid an error.  */
17506 #ifdef __cplusplus
17507 extern "C"
17508 {
17509 #endif
17510 /* We use char because int might match the return type of a gcc2
17511    builtin and then its argument prototype would still apply.  */
17512 char $ac_func ();
17513 /* The GNU C library defines this for functions which it implements
17514     to always fail with ENOSYS.  Some functions are actually named
17515     something starting with __ and the normal name is an alias.  */
17516 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17517 choke me
17518 #else
17519 char (*f) () = $ac_func;
17520 #endif
17521 #ifdef __cplusplus
17522 }
17523 #endif
17524
17525 int
17526 main ()
17527 {
17528 return f != $ac_func;
17529   ;
17530   return 0;
17531 }
17532 _ACEOF
17533 rm -f conftest.$ac_objext conftest$ac_exeext
17534 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17535   (eval $ac_link) 2>conftest.er1
17536   ac_status=$?
17537   grep -v '^ *+' conftest.er1 >conftest.err
17538   rm -f conftest.er1
17539   cat conftest.err >&5
17540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17541   (exit $ac_status); } &&
17542          { ac_try='test -z "$ac_c_werror_flag"
17543                          || test ! -s conftest.err'
17544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17545   (eval $ac_try) 2>&5
17546   ac_status=$?
17547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17548   (exit $ac_status); }; } &&
17549          { ac_try='test -s conftest$ac_exeext'
17550   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17551   (eval $ac_try) 2>&5
17552   ac_status=$?
17553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17554   (exit $ac_status); }; }; then
17555   eval "$as_ac_var=yes"
17556 else
17557   echo "$as_me: failed program was:" >&5
17558 sed 's/^/| /' conftest.$ac_ext >&5
17559
17560 eval "$as_ac_var=no"
17561 fi
17562 rm -f conftest.err conftest.$ac_objext \
17563       conftest$ac_exeext conftest.$ac_ext
17564 fi
17565 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17566 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17567 if test `eval echo '${'$as_ac_var'}'` = yes; then
17568   cat >>confdefs.h <<_ACEOF
17569 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17570 _ACEOF
17571
17572 fi
17573 done
17574
17575
17576
17577
17578
17579
17580 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop
17581 do
17582 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17583 echo "$as_me:$LINENO: checking for $ac_func" >&5
17584 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17585 if eval "test \"\${$as_ac_var+set}\" = set"; then
17586   echo $ECHO_N "(cached) $ECHO_C" >&6
17587 else
17588   cat >conftest.$ac_ext <<_ACEOF
17589 /* confdefs.h.  */
17590 _ACEOF
17591 cat confdefs.h >>conftest.$ac_ext
17592 cat >>conftest.$ac_ext <<_ACEOF
17593 /* end confdefs.h.  */
17594 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17595    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17596 #define $ac_func innocuous_$ac_func
17597
17598 /* System header to define __stub macros and hopefully few prototypes,
17599     which can conflict with char $ac_func (); below.
17600     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17601     <limits.h> exists even on freestanding compilers.  */
17602
17603 #ifdef __STDC__
17604 # include <limits.h>
17605 #else
17606 # include <assert.h>
17607 #endif
17608
17609 #undef $ac_func
17610
17611 /* Override any gcc2 internal prototype to avoid an error.  */
17612 #ifdef __cplusplus
17613 extern "C"
17614 {
17615 #endif
17616 /* We use char because int might match the return type of a gcc2
17617    builtin and then its argument prototype would still apply.  */
17618 char $ac_func ();
17619 /* The GNU C library defines this for functions which it implements
17620     to always fail with ENOSYS.  Some functions are actually named
17621     something starting with __ and the normal name is an alias.  */
17622 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17623 choke me
17624 #else
17625 char (*f) () = $ac_func;
17626 #endif
17627 #ifdef __cplusplus
17628 }
17629 #endif
17630
17631 int
17632 main ()
17633 {
17634 return f != $ac_func;
17635   ;
17636   return 0;
17637 }
17638 _ACEOF
17639 rm -f conftest.$ac_objext conftest$ac_exeext
17640 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17641   (eval $ac_link) 2>conftest.er1
17642   ac_status=$?
17643   grep -v '^ *+' conftest.er1 >conftest.err
17644   rm -f conftest.er1
17645   cat conftest.err >&5
17646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17647   (exit $ac_status); } &&
17648          { ac_try='test -z "$ac_c_werror_flag"
17649                          || test ! -s conftest.err'
17650   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17651   (eval $ac_try) 2>&5
17652   ac_status=$?
17653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17654   (exit $ac_status); }; } &&
17655          { ac_try='test -s conftest$ac_exeext'
17656   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17657   (eval $ac_try) 2>&5
17658   ac_status=$?
17659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17660   (exit $ac_status); }; }; then
17661   eval "$as_ac_var=yes"
17662 else
17663   echo "$as_me: failed program was:" >&5
17664 sed 's/^/| /' conftest.$ac_ext >&5
17665
17666 eval "$as_ac_var=no"
17667 fi
17668 rm -f conftest.err conftest.$ac_objext \
17669       conftest$ac_exeext conftest.$ac_ext
17670 fi
17671 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17672 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17673 if test `eval echo '${'$as_ac_var'}'` = yes; then
17674   cat >>confdefs.h <<_ACEOF
17675 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17676 _ACEOF
17677
17678 fi
17679 done
17680
17681
17682 ol_link_ipv6=no
17683 if test $ac_cv_func_getaddrinfo = no || test $ac_cv_func_inet_ntop = no ; then
17684         if test $ol_enable_ipv6 = yes ; then
17685                 { { echo "$as_me:$LINENO: error: IPv6 support requires getaddrinfo() and inet_ntop()" >&5
17686 echo "$as_me: error: IPv6 support requires getaddrinfo() and inet_ntop()" >&2;}
17687    { (exit 1); exit 1; }; }
17688         fi
17689 elif test $ol_enable_ipv6 != no ; then
17690         echo "$as_me:$LINENO: checking INET6_ADDRSTRLEN" >&5
17691 echo $ECHO_N "checking INET6_ADDRSTRLEN... $ECHO_C" >&6
17692 if test "${ol_cv_inet6_addrstrlen+set}" = set; then
17693   echo $ECHO_N "(cached) $ECHO_C" >&6
17694 else
17695
17696                 cat >conftest.$ac_ext <<_ACEOF
17697 /* confdefs.h.  */
17698 _ACEOF
17699 cat confdefs.h >>conftest.$ac_ext
17700 cat >>conftest.$ac_ext <<_ACEOF
17701 /* end confdefs.h.  */
17702
17703 #                       include <netinet/in.h>
17704 #                       ifdef INET6_ADDRSTRLEN
17705                                 __has_inet6_addrstrlen__;
17706 #                       endif
17707
17708 _ACEOF
17709 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17710   $EGREP "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
17711   ol_cv_inet6_addrstrlen=yes
17712 else
17713   ol_cv_inet6_addrstrlen=no
17714 fi
17715 rm -f conftest*
17716
17717 fi
17718 echo "$as_me:$LINENO: result: $ol_cv_inet6_addrstrlen" >&5
17719 echo "${ECHO_T}$ol_cv_inet6_addrstrlen" >&6
17720
17721
17722         echo "$as_me:$LINENO: checking struct sockaddr_storage" >&5
17723 echo $ECHO_N "checking struct sockaddr_storage... $ECHO_C" >&6
17724 if test "${ol_cv_struct_sockaddr_storage+set}" = set; then
17725   echo $ECHO_N "(cached) $ECHO_C" >&6
17726 else
17727
17728                 cat >conftest.$ac_ext <<_ACEOF
17729 /* confdefs.h.  */
17730 _ACEOF
17731 cat confdefs.h >>conftest.$ac_ext
17732 cat >>conftest.$ac_ext <<_ACEOF
17733 /* end confdefs.h.  */
17734
17735 #include <sys/types.h>
17736 #include <sys/socket.h>
17737
17738 int
17739 main ()
17740 {
17741
17742                         struct sockaddr_storage ss;
17743
17744   ;
17745   return 0;
17746 }
17747 _ACEOF
17748 rm -f conftest.$ac_objext
17749 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17750   (eval $ac_compile) 2>conftest.er1
17751   ac_status=$?
17752   grep -v '^ *+' conftest.er1 >conftest.err
17753   rm -f conftest.er1
17754   cat conftest.err >&5
17755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17756   (exit $ac_status); } &&
17757          { ac_try='test -z "$ac_c_werror_flag"
17758                          || test ! -s conftest.err'
17759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17760   (eval $ac_try) 2>&5
17761   ac_status=$?
17762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17763   (exit $ac_status); }; } &&
17764          { ac_try='test -s conftest.$ac_objext'
17765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17766   (eval $ac_try) 2>&5
17767   ac_status=$?
17768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17769   (exit $ac_status); }; }; then
17770   ol_cv_struct_sockaddr_storage=yes
17771 else
17772   echo "$as_me: failed program was:" >&5
17773 sed 's/^/| /' conftest.$ac_ext >&5
17774
17775 ol_cv_struct_sockaddr_storage=no
17776 fi
17777 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17778 fi
17779 echo "$as_me:$LINENO: result: $ol_cv_struct_sockaddr_storage" >&5
17780 echo "${ECHO_T}$ol_cv_struct_sockaddr_storage" >&6
17781
17782         if test $ol_cv_inet6_addrstrlen = yes &&
17783            test $ol_cv_struct_sockaddr_storage = yes ; then
17784                 ol_link_ipv6=yes
17785         elif test $ol_enable_ipv6 = yes &&
17786              test $ol_cv_inet6_addrstrlen = no ; then
17787                 { { echo "$as_me:$LINENO: error: IPv6 support requires INET6_ADDRSTRLEN" >&5
17788 echo "$as_me: error: IPv6 support requires INET6_ADDRSTRLEN" >&2;}
17789    { (exit 1); exit 1; }; }
17790         elif test $ol_enable_ipv6 = yes &&
17791              test $ol_cv_struct_sockaddr_storage = no ; then
17792                 { { echo "$as_me:$LINENO: error: IPv6 support requires struct sockaddr_storage" >&5
17793 echo "$as_me: error: IPv6 support requires struct sockaddr_storage" >&2;}
17794    { (exit 1); exit 1; }; }
17795         fi
17796 fi
17797
17798 if test $ol_enable_local != no ; then
17799
17800 for ac_header in sys/un.h
17801 do
17802 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17803 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17804   echo "$as_me:$LINENO: checking for $ac_header" >&5
17805 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17806 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17807   echo $ECHO_N "(cached) $ECHO_C" >&6
17808 fi
17809 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17810 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17811 else
17812   # Is the header compilable?
17813 echo "$as_me:$LINENO: checking $ac_header usability" >&5
17814 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17815 cat >conftest.$ac_ext <<_ACEOF
17816 /* confdefs.h.  */
17817 _ACEOF
17818 cat confdefs.h >>conftest.$ac_ext
17819 cat >>conftest.$ac_ext <<_ACEOF
17820 /* end confdefs.h.  */
17821 $ac_includes_default
17822 #include <$ac_header>
17823 _ACEOF
17824 rm -f conftest.$ac_objext
17825 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17826   (eval $ac_compile) 2>conftest.er1
17827   ac_status=$?
17828   grep -v '^ *+' conftest.er1 >conftest.err
17829   rm -f conftest.er1
17830   cat conftest.err >&5
17831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17832   (exit $ac_status); } &&
17833          { ac_try='test -z "$ac_c_werror_flag"
17834                          || test ! -s conftest.err'
17835   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17836   (eval $ac_try) 2>&5
17837   ac_status=$?
17838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17839   (exit $ac_status); }; } &&
17840          { ac_try='test -s conftest.$ac_objext'
17841   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17842   (eval $ac_try) 2>&5
17843   ac_status=$?
17844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17845   (exit $ac_status); }; }; then
17846   ac_header_compiler=yes
17847 else
17848   echo "$as_me: failed program was:" >&5
17849 sed 's/^/| /' conftest.$ac_ext >&5
17850
17851 ac_header_compiler=no
17852 fi
17853 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17854 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17855 echo "${ECHO_T}$ac_header_compiler" >&6
17856
17857 # Is the header present?
17858 echo "$as_me:$LINENO: checking $ac_header presence" >&5
17859 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17860 cat >conftest.$ac_ext <<_ACEOF
17861 /* confdefs.h.  */
17862 _ACEOF
17863 cat confdefs.h >>conftest.$ac_ext
17864 cat >>conftest.$ac_ext <<_ACEOF
17865 /* end confdefs.h.  */
17866 #include <$ac_header>
17867 _ACEOF
17868 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17869   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17870   ac_status=$?
17871   grep -v '^ *+' conftest.er1 >conftest.err
17872   rm -f conftest.er1
17873   cat conftest.err >&5
17874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17875   (exit $ac_status); } >/dev/null; then
17876   if test -s conftest.err; then
17877     ac_cpp_err=$ac_c_preproc_warn_flag
17878     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17879   else
17880     ac_cpp_err=
17881   fi
17882 else
17883   ac_cpp_err=yes
17884 fi
17885 if test -z "$ac_cpp_err"; then
17886   ac_header_preproc=yes
17887 else
17888   echo "$as_me: failed program was:" >&5
17889 sed 's/^/| /' conftest.$ac_ext >&5
17890
17891   ac_header_preproc=no
17892 fi
17893 rm -f conftest.err conftest.$ac_ext
17894 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17895 echo "${ECHO_T}$ac_header_preproc" >&6
17896
17897 # So?  What about this header?
17898 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17899   yes:no: )
17900     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17901 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17902     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17903 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17904     ac_header_preproc=yes
17905     ;;
17906   no:yes:* )
17907     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17908 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17909     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17910 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17911     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17912 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17913     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17914 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17915     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17916 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17917     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17918 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17919     (
17920       cat <<\_ASBOX
17921 ## --------------------------------------------- ##
17922 ## Report this to <http://www.openldap.org/its/> ##
17923 ## --------------------------------------------- ##
17924 _ASBOX
17925     ) |
17926       sed "s/^/$as_me: WARNING:     /" >&2
17927     ;;
17928 esac
17929 echo "$as_me:$LINENO: checking for $ac_header" >&5
17930 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17931 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17932   echo $ECHO_N "(cached) $ECHO_C" >&6
17933 else
17934   eval "$as_ac_Header=\$ac_header_preproc"
17935 fi
17936 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17937 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17938
17939 fi
17940 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17941   cat >>confdefs.h <<_ACEOF
17942 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17943 _ACEOF
17944
17945 fi
17946
17947 done
17948
17949
17950         if test $ol_enable_local = auto ; then
17951                 ol_enable_local=$ac_cv_header_sys_un_h
17952         elif test $ac_cv_header_sys_un_h = no ; then
17953                 { { echo "$as_me:$LINENO: error: AF_LOCAL domain support requires sys/un.h" >&5
17954 echo "$as_me: error: AF_LOCAL domain support requires sys/un.h" >&2;}
17955    { (exit 1); exit 1; }; }
17956         fi
17957 fi
17958
17959 ol_link_kbind=no
17960 ol_link_krb5=no
17961 ol_link_krb4=no
17962
17963 case $ol_with_kerberos in yes | auto | k5 | k5only | k425)
17964
17965
17966 for ac_header in krb5.h
17967 do
17968 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17969 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17970   echo "$as_me:$LINENO: checking for $ac_header" >&5
17971 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17972 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17973   echo $ECHO_N "(cached) $ECHO_C" >&6
17974 fi
17975 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17976 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17977 else
17978   # Is the header compilable?
17979 echo "$as_me:$LINENO: checking $ac_header usability" >&5
17980 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17981 cat >conftest.$ac_ext <<_ACEOF
17982 /* confdefs.h.  */
17983 _ACEOF
17984 cat confdefs.h >>conftest.$ac_ext
17985 cat >>conftest.$ac_ext <<_ACEOF
17986 /* end confdefs.h.  */
17987 $ac_includes_default
17988 #include <$ac_header>
17989 _ACEOF
17990 rm -f conftest.$ac_objext
17991 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17992   (eval $ac_compile) 2>conftest.er1
17993   ac_status=$?
17994   grep -v '^ *+' conftest.er1 >conftest.err
17995   rm -f conftest.er1
17996   cat conftest.err >&5
17997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17998   (exit $ac_status); } &&
17999          { ac_try='test -z "$ac_c_werror_flag"
18000                          || test ! -s conftest.err'
18001   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18002   (eval $ac_try) 2>&5
18003   ac_status=$?
18004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18005   (exit $ac_status); }; } &&
18006          { ac_try='test -s conftest.$ac_objext'
18007   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18008   (eval $ac_try) 2>&5
18009   ac_status=$?
18010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18011   (exit $ac_status); }; }; then
18012   ac_header_compiler=yes
18013 else
18014   echo "$as_me: failed program was:" >&5
18015 sed 's/^/| /' conftest.$ac_ext >&5
18016
18017 ac_header_compiler=no
18018 fi
18019 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18020 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18021 echo "${ECHO_T}$ac_header_compiler" >&6
18022
18023 # Is the header present?
18024 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18025 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18026 cat >conftest.$ac_ext <<_ACEOF
18027 /* confdefs.h.  */
18028 _ACEOF
18029 cat confdefs.h >>conftest.$ac_ext
18030 cat >>conftest.$ac_ext <<_ACEOF
18031 /* end confdefs.h.  */
18032 #include <$ac_header>
18033 _ACEOF
18034 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18035   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18036   ac_status=$?
18037   grep -v '^ *+' conftest.er1 >conftest.err
18038   rm -f conftest.er1
18039   cat conftest.err >&5
18040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18041   (exit $ac_status); } >/dev/null; then
18042   if test -s conftest.err; then
18043     ac_cpp_err=$ac_c_preproc_warn_flag
18044     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18045   else
18046     ac_cpp_err=
18047   fi
18048 else
18049   ac_cpp_err=yes
18050 fi
18051 if test -z "$ac_cpp_err"; then
18052   ac_header_preproc=yes
18053 else
18054   echo "$as_me: failed program was:" >&5
18055 sed 's/^/| /' conftest.$ac_ext >&5
18056
18057   ac_header_preproc=no
18058 fi
18059 rm -f conftest.err conftest.$ac_ext
18060 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18061 echo "${ECHO_T}$ac_header_preproc" >&6
18062
18063 # So?  What about this header?
18064 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18065   yes:no: )
18066     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18067 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18068     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18069 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18070     ac_header_preproc=yes
18071     ;;
18072   no:yes:* )
18073     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18074 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18075     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18076 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18077     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18078 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18079     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18080 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18081     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18082 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18083     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18084 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18085     (
18086       cat <<\_ASBOX
18087 ## --------------------------------------------- ##
18088 ## Report this to <http://www.openldap.org/its/> ##
18089 ## --------------------------------------------- ##
18090 _ASBOX
18091     ) |
18092       sed "s/^/$as_me: WARNING:     /" >&2
18093     ;;
18094 esac
18095 echo "$as_me:$LINENO: checking for $ac_header" >&5
18096 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18097 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18098   echo $ECHO_N "(cached) $ECHO_C" >&6
18099 else
18100   eval "$as_ac_Header=\$ac_header_preproc"
18101 fi
18102 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18103 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18104
18105 fi
18106 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18107   cat >>confdefs.h <<_ACEOF
18108 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18109 _ACEOF
18110
18111 fi
18112
18113 done
18114
18115
18116         if test $ac_cv_header_krb5_h = yes ; then
18117
18118 for ac_header in heim_err.h
18119 do
18120 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18121 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18122   echo "$as_me:$LINENO: checking for $ac_header" >&5
18123 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18124 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18125   echo $ECHO_N "(cached) $ECHO_C" >&6
18126 fi
18127 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18128 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18129 else
18130   # Is the header compilable?
18131 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18132 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18133 cat >conftest.$ac_ext <<_ACEOF
18134 /* confdefs.h.  */
18135 _ACEOF
18136 cat confdefs.h >>conftest.$ac_ext
18137 cat >>conftest.$ac_ext <<_ACEOF
18138 /* end confdefs.h.  */
18139 $ac_includes_default
18140 #include <$ac_header>
18141 _ACEOF
18142 rm -f conftest.$ac_objext
18143 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18144   (eval $ac_compile) 2>conftest.er1
18145   ac_status=$?
18146   grep -v '^ *+' conftest.er1 >conftest.err
18147   rm -f conftest.er1
18148   cat conftest.err >&5
18149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18150   (exit $ac_status); } &&
18151          { ac_try='test -z "$ac_c_werror_flag"
18152                          || test ! -s conftest.err'
18153   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18154   (eval $ac_try) 2>&5
18155   ac_status=$?
18156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18157   (exit $ac_status); }; } &&
18158          { ac_try='test -s conftest.$ac_objext'
18159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18160   (eval $ac_try) 2>&5
18161   ac_status=$?
18162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18163   (exit $ac_status); }; }; then
18164   ac_header_compiler=yes
18165 else
18166   echo "$as_me: failed program was:" >&5
18167 sed 's/^/| /' conftest.$ac_ext >&5
18168
18169 ac_header_compiler=no
18170 fi
18171 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18172 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18173 echo "${ECHO_T}$ac_header_compiler" >&6
18174
18175 # Is the header present?
18176 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18177 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18178 cat >conftest.$ac_ext <<_ACEOF
18179 /* confdefs.h.  */
18180 _ACEOF
18181 cat confdefs.h >>conftest.$ac_ext
18182 cat >>conftest.$ac_ext <<_ACEOF
18183 /* end confdefs.h.  */
18184 #include <$ac_header>
18185 _ACEOF
18186 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18187   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18188   ac_status=$?
18189   grep -v '^ *+' conftest.er1 >conftest.err
18190   rm -f conftest.er1
18191   cat conftest.err >&5
18192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18193   (exit $ac_status); } >/dev/null; then
18194   if test -s conftest.err; then
18195     ac_cpp_err=$ac_c_preproc_warn_flag
18196     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18197   else
18198     ac_cpp_err=
18199   fi
18200 else
18201   ac_cpp_err=yes
18202 fi
18203 if test -z "$ac_cpp_err"; then
18204   ac_header_preproc=yes
18205 else
18206   echo "$as_me: failed program was:" >&5
18207 sed 's/^/| /' conftest.$ac_ext >&5
18208
18209   ac_header_preproc=no
18210 fi
18211 rm -f conftest.err conftest.$ac_ext
18212 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18213 echo "${ECHO_T}$ac_header_preproc" >&6
18214
18215 # So?  What about this header?
18216 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18217   yes:no: )
18218     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18219 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18220     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18221 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18222     ac_header_preproc=yes
18223     ;;
18224   no:yes:* )
18225     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18226 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18227     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18228 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18229     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18230 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18231     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18232 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18233     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18234 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18235     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18236 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18237     (
18238       cat <<\_ASBOX
18239 ## --------------------------------------------- ##
18240 ## Report this to <http://www.openldap.org/its/> ##
18241 ## --------------------------------------------- ##
18242 _ASBOX
18243     ) |
18244       sed "s/^/$as_me: WARNING:     /" >&2
18245     ;;
18246 esac
18247 echo "$as_me:$LINENO: checking for $ac_header" >&5
18248 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18249 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18250   echo $ECHO_N "(cached) $ECHO_C" >&6
18251 else
18252   eval "$as_ac_Header=\$ac_header_preproc"
18253 fi
18254 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18255 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18256
18257 fi
18258 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18259   cat >>confdefs.h <<_ACEOF
18260 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18261 _ACEOF
18262
18263 fi
18264
18265 done
18266
18267                 if test $ac_cv_header_heim_err_h = yes ; then
18268                         krb5_impl=heimdal
18269                 else
18270                         krb5_impl=mit
18271                 fi
18272
18273                 if test $krb5_impl = mit; then
18274                         echo "$as_me:$LINENO: checking for main in -lk5crypto" >&5
18275 echo $ECHO_N "checking for main in -lk5crypto... $ECHO_C" >&6
18276 if test "${ac_cv_lib_k5crypto_main+set}" = set; then
18277   echo $ECHO_N "(cached) $ECHO_C" >&6
18278 else
18279   ac_check_lib_save_LIBS=$LIBS
18280 LIBS="-lk5crypto  $LIBS"
18281 cat >conftest.$ac_ext <<_ACEOF
18282 /* confdefs.h.  */
18283 _ACEOF
18284 cat confdefs.h >>conftest.$ac_ext
18285 cat >>conftest.$ac_ext <<_ACEOF
18286 /* end confdefs.h.  */
18287
18288
18289 int
18290 main ()
18291 {
18292 main ();
18293   ;
18294   return 0;
18295 }
18296 _ACEOF
18297 rm -f conftest.$ac_objext conftest$ac_exeext
18298 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18299   (eval $ac_link) 2>conftest.er1
18300   ac_status=$?
18301   grep -v '^ *+' conftest.er1 >conftest.err
18302   rm -f conftest.er1
18303   cat conftest.err >&5
18304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18305   (exit $ac_status); } &&
18306          { ac_try='test -z "$ac_c_werror_flag"
18307                          || test ! -s conftest.err'
18308   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18309   (eval $ac_try) 2>&5
18310   ac_status=$?
18311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18312   (exit $ac_status); }; } &&
18313          { ac_try='test -s conftest$ac_exeext'
18314   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18315   (eval $ac_try) 2>&5
18316   ac_status=$?
18317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18318   (exit $ac_status); }; }; then
18319   ac_cv_lib_k5crypto_main=yes
18320 else
18321   echo "$as_me: failed program was:" >&5
18322 sed 's/^/| /' conftest.$ac_ext >&5
18323
18324 ac_cv_lib_k5crypto_main=no
18325 fi
18326 rm -f conftest.err conftest.$ac_objext \
18327       conftest$ac_exeext conftest.$ac_ext
18328 LIBS=$ac_check_lib_save_LIBS
18329 fi
18330 echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_main" >&5
18331 echo "${ECHO_T}$ac_cv_lib_k5crypto_main" >&6
18332 if test $ac_cv_lib_k5crypto_main = yes; then
18333   krb5crypto=k5crypto
18334 else
18335   krb5crypto=crypto
18336 fi
18337
18338
18339                         echo "$as_me:$LINENO: checking for main in -lkrb5" >&5
18340 echo $ECHO_N "checking for main in -lkrb5... $ECHO_C" >&6
18341 if test "${ac_cv_lib_krb5_main+set}" = set; then
18342   echo $ECHO_N "(cached) $ECHO_C" >&6
18343 else
18344   ac_check_lib_save_LIBS=$LIBS
18345 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
18346 cat >conftest.$ac_ext <<_ACEOF
18347 /* confdefs.h.  */
18348 _ACEOF
18349 cat confdefs.h >>conftest.$ac_ext
18350 cat >>conftest.$ac_ext <<_ACEOF
18351 /* end confdefs.h.  */
18352
18353
18354 int
18355 main ()
18356 {
18357 main ();
18358   ;
18359   return 0;
18360 }
18361 _ACEOF
18362 rm -f conftest.$ac_objext conftest$ac_exeext
18363 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18364   (eval $ac_link) 2>conftest.er1
18365   ac_status=$?
18366   grep -v '^ *+' conftest.er1 >conftest.err
18367   rm -f conftest.er1
18368   cat conftest.err >&5
18369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18370   (exit $ac_status); } &&
18371          { ac_try='test -z "$ac_c_werror_flag"
18372                          || test ! -s conftest.err'
18373   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18374   (eval $ac_try) 2>&5
18375   ac_status=$?
18376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18377   (exit $ac_status); }; } &&
18378          { ac_try='test -s conftest$ac_exeext'
18379   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18380   (eval $ac_try) 2>&5
18381   ac_status=$?
18382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18383   (exit $ac_status); }; }; then
18384   ac_cv_lib_krb5_main=yes
18385 else
18386   echo "$as_me: failed program was:" >&5
18387 sed 's/^/| /' conftest.$ac_ext >&5
18388
18389 ac_cv_lib_krb5_main=no
18390 fi
18391 rm -f conftest.err conftest.$ac_objext \
18392       conftest$ac_exeext conftest.$ac_ext
18393 LIBS=$ac_check_lib_save_LIBS
18394 fi
18395 echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_main" >&5
18396 echo "${ECHO_T}$ac_cv_lib_krb5_main" >&6
18397 if test $ac_cv_lib_krb5_main = yes; then
18398   have_krb5=yes
18399                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
18400 else
18401   have_krb5=no
18402 fi
18403
18404
18405                 elif test $krb5_impl = heimdal; then
18406                         echo "$as_me:$LINENO: checking for main in -ldes" >&5
18407 echo $ECHO_N "checking for main in -ldes... $ECHO_C" >&6
18408 if test "${ac_cv_lib_des_main+set}" = set; then
18409   echo $ECHO_N "(cached) $ECHO_C" >&6
18410 else
18411   ac_check_lib_save_LIBS=$LIBS
18412 LIBS="-ldes  $LIBS"
18413 cat >conftest.$ac_ext <<_ACEOF
18414 /* confdefs.h.  */
18415 _ACEOF
18416 cat confdefs.h >>conftest.$ac_ext
18417 cat >>conftest.$ac_ext <<_ACEOF
18418 /* end confdefs.h.  */
18419
18420
18421 int
18422 main ()
18423 {
18424 main ();
18425   ;
18426   return 0;
18427 }
18428 _ACEOF
18429 rm -f conftest.$ac_objext conftest$ac_exeext
18430 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18431   (eval $ac_link) 2>conftest.er1
18432   ac_status=$?
18433   grep -v '^ *+' conftest.er1 >conftest.err
18434   rm -f conftest.er1
18435   cat conftest.err >&5
18436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18437   (exit $ac_status); } &&
18438          { ac_try='test -z "$ac_c_werror_flag"
18439                          || test ! -s conftest.err'
18440   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18441   (eval $ac_try) 2>&5
18442   ac_status=$?
18443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18444   (exit $ac_status); }; } &&
18445          { ac_try='test -s conftest$ac_exeext'
18446   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18447   (eval $ac_try) 2>&5
18448   ac_status=$?
18449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18450   (exit $ac_status); }; }; then
18451   ac_cv_lib_des_main=yes
18452 else
18453   echo "$as_me: failed program was:" >&5
18454 sed 's/^/| /' conftest.$ac_ext >&5
18455
18456 ac_cv_lib_des_main=no
18457 fi
18458 rm -f conftest.err conftest.$ac_objext \
18459       conftest$ac_exeext conftest.$ac_ext
18460 LIBS=$ac_check_lib_save_LIBS
18461 fi
18462 echo "$as_me:$LINENO: result: $ac_cv_lib_des_main" >&5
18463 echo "${ECHO_T}$ac_cv_lib_des_main" >&6
18464 if test $ac_cv_lib_des_main = yes; then
18465   krb5crypto=des
18466 else
18467   krb5crypto=crypto
18468 fi
18469
18470
18471                         echo "$as_me:$LINENO: checking for main in -lkrb5" >&5
18472 echo $ECHO_N "checking for main in -lkrb5... $ECHO_C" >&6
18473 if test "${ac_cv_lib_krb5_main+set}" = set; then
18474   echo $ECHO_N "(cached) $ECHO_C" >&6
18475 else
18476   ac_check_lib_save_LIBS=$LIBS
18477 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
18478 cat >conftest.$ac_ext <<_ACEOF
18479 /* confdefs.h.  */
18480 _ACEOF
18481 cat confdefs.h >>conftest.$ac_ext
18482 cat >>conftest.$ac_ext <<_ACEOF
18483 /* end confdefs.h.  */
18484
18485
18486 int
18487 main ()
18488 {
18489 main ();
18490   ;
18491   return 0;
18492 }
18493 _ACEOF
18494 rm -f conftest.$ac_objext conftest$ac_exeext
18495 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18496   (eval $ac_link) 2>conftest.er1
18497   ac_status=$?
18498   grep -v '^ *+' conftest.er1 >conftest.err
18499   rm -f conftest.er1
18500   cat conftest.err >&5
18501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18502   (exit $ac_status); } &&
18503          { ac_try='test -z "$ac_c_werror_flag"
18504                          || test ! -s conftest.err'
18505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18506   (eval $ac_try) 2>&5
18507   ac_status=$?
18508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18509   (exit $ac_status); }; } &&
18510          { ac_try='test -s conftest$ac_exeext'
18511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18512   (eval $ac_try) 2>&5
18513   ac_status=$?
18514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18515   (exit $ac_status); }; }; then
18516   ac_cv_lib_krb5_main=yes
18517 else
18518   echo "$as_me: failed program was:" >&5
18519 sed 's/^/| /' conftest.$ac_ext >&5
18520
18521 ac_cv_lib_krb5_main=no
18522 fi
18523 rm -f conftest.err conftest.$ac_objext \
18524       conftest$ac_exeext conftest.$ac_ext
18525 LIBS=$ac_check_lib_save_LIBS
18526 fi
18527 echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_main" >&5
18528 echo "${ECHO_T}$ac_cv_lib_krb5_main" >&6
18529 if test $ac_cv_lib_krb5_main = yes; then
18530   have_krb5=yes
18531                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
18532 else
18533   have_krb5=no
18534 fi
18535
18536
18537
18538 cat >>confdefs.h <<\_ACEOF
18539 #define HAVE_HEIMDAL_KERBEROS 1
18540 _ACEOF
18541
18542
18543                 else
18544                         have_krb5=no
18545                         { echo "$as_me:$LINENO: WARNING: Unrecognized Kerberos5 Implementation" >&5
18546 echo "$as_me: WARNING: Unrecognized Kerberos5 Implementation" >&2;}
18547                 fi
18548
18549                 if test $have_krb5 = yes ; then
18550                         ol_link_krb5=yes
18551
18552
18553 cat >>confdefs.h <<\_ACEOF
18554 #define HAVE_KRB5 1
18555 _ACEOF
18556
18557
18558                         if test $ol_with_kerberos = k5only ; then
18559                                 ol_with_kerberos=found
18560                         fi
18561
18562                 elif test $ol_with_kerberos != auto ; then
18563                         { { echo "$as_me:$LINENO: error: Required Kerberos 5 support not available" >&5
18564 echo "$as_me: error: Required Kerberos 5 support not available" >&2;}
18565    { (exit 1); exit 1; }; }
18566                 fi
18567
18568         fi
18569         ;;
18570 esac
18571
18572 if test $ol_link_krb5 = yes &&
18573    { test $ol_with_kerberos = yes ||
18574      test $ol_with_kerberos = auto ||
18575      test $ol_with_kerberos = k425; }; then
18576
18577
18578
18579 for ac_header in kerberosIV/krb.h kerberosIV/des.h
18580 do
18581 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18582 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18583   echo "$as_me:$LINENO: checking for $ac_header" >&5
18584 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18585 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18586   echo $ECHO_N "(cached) $ECHO_C" >&6
18587 fi
18588 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18589 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18590 else
18591   # Is the header compilable?
18592 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18593 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18594 cat >conftest.$ac_ext <<_ACEOF
18595 /* confdefs.h.  */
18596 _ACEOF
18597 cat confdefs.h >>conftest.$ac_ext
18598 cat >>conftest.$ac_ext <<_ACEOF
18599 /* end confdefs.h.  */
18600 $ac_includes_default
18601 #include <$ac_header>
18602 _ACEOF
18603 rm -f conftest.$ac_objext
18604 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18605   (eval $ac_compile) 2>conftest.er1
18606   ac_status=$?
18607   grep -v '^ *+' conftest.er1 >conftest.err
18608   rm -f conftest.er1
18609   cat conftest.err >&5
18610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18611   (exit $ac_status); } &&
18612          { ac_try='test -z "$ac_c_werror_flag"
18613                          || test ! -s conftest.err'
18614   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18615   (eval $ac_try) 2>&5
18616   ac_status=$?
18617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18618   (exit $ac_status); }; } &&
18619          { ac_try='test -s conftest.$ac_objext'
18620   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18621   (eval $ac_try) 2>&5
18622   ac_status=$?
18623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18624   (exit $ac_status); }; }; then
18625   ac_header_compiler=yes
18626 else
18627   echo "$as_me: failed program was:" >&5
18628 sed 's/^/| /' conftest.$ac_ext >&5
18629
18630 ac_header_compiler=no
18631 fi
18632 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18633 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18634 echo "${ECHO_T}$ac_header_compiler" >&6
18635
18636 # Is the header present?
18637 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18638 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18639 cat >conftest.$ac_ext <<_ACEOF
18640 /* confdefs.h.  */
18641 _ACEOF
18642 cat confdefs.h >>conftest.$ac_ext
18643 cat >>conftest.$ac_ext <<_ACEOF
18644 /* end confdefs.h.  */
18645 #include <$ac_header>
18646 _ACEOF
18647 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18648   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18649   ac_status=$?
18650   grep -v '^ *+' conftest.er1 >conftest.err
18651   rm -f conftest.er1
18652   cat conftest.err >&5
18653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18654   (exit $ac_status); } >/dev/null; then
18655   if test -s conftest.err; then
18656     ac_cpp_err=$ac_c_preproc_warn_flag
18657     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18658   else
18659     ac_cpp_err=
18660   fi
18661 else
18662   ac_cpp_err=yes
18663 fi
18664 if test -z "$ac_cpp_err"; then
18665   ac_header_preproc=yes
18666 else
18667   echo "$as_me: failed program was:" >&5
18668 sed 's/^/| /' conftest.$ac_ext >&5
18669
18670   ac_header_preproc=no
18671 fi
18672 rm -f conftest.err conftest.$ac_ext
18673 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18674 echo "${ECHO_T}$ac_header_preproc" >&6
18675
18676 # So?  What about this header?
18677 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18678   yes:no: )
18679     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18680 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18681     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18682 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18683     ac_header_preproc=yes
18684     ;;
18685   no:yes:* )
18686     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18687 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18688     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18689 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18690     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18691 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18692     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18693 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18694     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18695 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18696     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18697 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18698     (
18699       cat <<\_ASBOX
18700 ## --------------------------------------------- ##
18701 ## Report this to <http://www.openldap.org/its/> ##
18702 ## --------------------------------------------- ##
18703 _ASBOX
18704     ) |
18705       sed "s/^/$as_me: WARNING:     /" >&2
18706     ;;
18707 esac
18708 echo "$as_me:$LINENO: checking for $ac_header" >&5
18709 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18710 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18711   echo $ECHO_N "(cached) $ECHO_C" >&6
18712 else
18713   eval "$as_ac_Header=\$ac_header_preproc"
18714 fi
18715 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18716 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18717
18718 fi
18719 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18720   cat >>confdefs.h <<_ACEOF
18721 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18722 _ACEOF
18723
18724 fi
18725
18726 done
18727
18728
18729         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
18730                 if test $krb5_impl = mit; then
18731                         echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
18732 echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6
18733 if test "${ac_cv_lib_krb4_main+set}" = set; then
18734   echo $ECHO_N "(cached) $ECHO_C" >&6
18735 else
18736   ac_check_lib_save_LIBS=$LIBS
18737 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
18738 cat >conftest.$ac_ext <<_ACEOF
18739 /* confdefs.h.  */
18740 _ACEOF
18741 cat confdefs.h >>conftest.$ac_ext
18742 cat >>conftest.$ac_ext <<_ACEOF
18743 /* end confdefs.h.  */
18744
18745
18746 int
18747 main ()
18748 {
18749 main ();
18750   ;
18751   return 0;
18752 }
18753 _ACEOF
18754 rm -f conftest.$ac_objext conftest$ac_exeext
18755 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18756   (eval $ac_link) 2>conftest.er1
18757   ac_status=$?
18758   grep -v '^ *+' conftest.er1 >conftest.err
18759   rm -f conftest.er1
18760   cat conftest.err >&5
18761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18762   (exit $ac_status); } &&
18763          { ac_try='test -z "$ac_c_werror_flag"
18764                          || test ! -s conftest.err'
18765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18766   (eval $ac_try) 2>&5
18767   ac_status=$?
18768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18769   (exit $ac_status); }; } &&
18770          { ac_try='test -s conftest$ac_exeext'
18771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18772   (eval $ac_try) 2>&5
18773   ac_status=$?
18774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18775   (exit $ac_status); }; }; then
18776   ac_cv_lib_krb4_main=yes
18777 else
18778   echo "$as_me: failed program was:" >&5
18779 sed 's/^/| /' conftest.$ac_ext >&5
18780
18781 ac_cv_lib_krb4_main=no
18782 fi
18783 rm -f conftest.err conftest.$ac_objext \
18784       conftest$ac_exeext conftest.$ac_ext
18785 LIBS=$ac_check_lib_save_LIBS
18786 fi
18787 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5
18788 echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6
18789 if test $ac_cv_lib_krb4_main = yes; then
18790   have_k425=yes
18791                                 KRB4_LIBS="-lkrb4 -ldes425"
18792 else
18793   have_k425=no
18794 fi
18795
18796
18797                 elif test $krb5_impl = heimdal; then
18798                         echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
18799 echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6
18800 if test "${ac_cv_lib_krb4_main+set}" = set; then
18801   echo $ECHO_N "(cached) $ECHO_C" >&6
18802 else
18803   ac_check_lib_save_LIBS=$LIBS
18804 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
18805 cat >conftest.$ac_ext <<_ACEOF
18806 /* confdefs.h.  */
18807 _ACEOF
18808 cat confdefs.h >>conftest.$ac_ext
18809 cat >>conftest.$ac_ext <<_ACEOF
18810 /* end confdefs.h.  */
18811
18812
18813 int
18814 main ()
18815 {
18816 main ();
18817   ;
18818   return 0;
18819 }
18820 _ACEOF
18821 rm -f conftest.$ac_objext conftest$ac_exeext
18822 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18823   (eval $ac_link) 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); } &&
18830          { ac_try='test -z "$ac_c_werror_flag"
18831                          || test ! -s conftest.err'
18832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18833   (eval $ac_try) 2>&5
18834   ac_status=$?
18835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18836   (exit $ac_status); }; } &&
18837          { ac_try='test -s conftest$ac_exeext'
18838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18839   (eval $ac_try) 2>&5
18840   ac_status=$?
18841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18842   (exit $ac_status); }; }; then
18843   ac_cv_lib_krb4_main=yes
18844 else
18845   echo "$as_me: failed program was:" >&5
18846 sed 's/^/| /' conftest.$ac_ext >&5
18847
18848 ac_cv_lib_krb4_main=no
18849 fi
18850 rm -f conftest.err conftest.$ac_objext \
18851       conftest$ac_exeext conftest.$ac_ext
18852 LIBS=$ac_check_lib_save_LIBS
18853 fi
18854 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5
18855 echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6
18856 if test $ac_cv_lib_krb4_main = yes; then
18857   have_k425=yes
18858                                 KRB4_LIBS="-lkrb4"
18859 else
18860   have_k425=no
18861 fi
18862
18863
18864                 else
18865                         have_425=no
18866                         { echo "$as_me:$LINENO: WARNING: Unrecongized Kerberos V Implementation" >&5
18867 echo "$as_me: WARNING: Unrecongized Kerberos V Implementation" >&2;}
18868                 fi
18869
18870                 if test $have_k425 = yes ; then
18871                         ol_with_kerberos=found
18872                         ol_link_krb4=yes
18873
18874
18875 cat >>confdefs.h <<\_ACEOF
18876 #define HAVE_KRB425 1
18877 _ACEOF
18878
18879
18880 cat >>confdefs.h <<\_ACEOF
18881 #define HAVE_KRB4 1
18882 _ACEOF
18883
18884
18885                         echo "$as_me:$LINENO: checking for des_debug in Kerberos libraries" >&5
18886 echo $ECHO_N "checking for des_debug in Kerberos libraries... $ECHO_C" >&6
18887 if test "${ol_cv_var_des_debug+set}" = set; then
18888   echo $ECHO_N "(cached) $ECHO_C" >&6
18889 else
18890
18891                                                                 save_LIBS="$LIBS"
18892                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
18893                                 cat >conftest.$ac_ext <<_ACEOF
18894 /* confdefs.h.  */
18895 _ACEOF
18896 cat confdefs.h >>conftest.$ac_ext
18897 cat >>conftest.$ac_ext <<_ACEOF
18898 /* end confdefs.h.  */
18899
18900 #include <kerberosIV/krb.h>
18901 #include <kerberosIV/des.h>
18902 extern int des_debug;
18903
18904 int
18905 main ()
18906 {
18907
18908 des_debug = 1;
18909
18910   ;
18911   return 0;
18912 }
18913 _ACEOF
18914 rm -f conftest.$ac_objext conftest$ac_exeext
18915 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18916   (eval $ac_link) 2>conftest.er1
18917   ac_status=$?
18918   grep -v '^ *+' conftest.er1 >conftest.err
18919   rm -f conftest.er1
18920   cat conftest.err >&5
18921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18922   (exit $ac_status); } &&
18923          { ac_try='test -z "$ac_c_werror_flag"
18924                          || test ! -s conftest.err'
18925   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18926   (eval $ac_try) 2>&5
18927   ac_status=$?
18928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18929   (exit $ac_status); }; } &&
18930          { ac_try='test -s conftest$ac_exeext'
18931   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18932   (eval $ac_try) 2>&5
18933   ac_status=$?
18934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18935   (exit $ac_status); }; }; then
18936   ol_cv_var_des_debug=yes
18937 else
18938   echo "$as_me: failed program was:" >&5
18939 sed 's/^/| /' conftest.$ac_ext >&5
18940
18941 ol_cv_var_des_debug=no
18942 fi
18943 rm -f conftest.err conftest.$ac_objext \
18944       conftest$ac_exeext conftest.$ac_ext
18945                                                                 LIBS="$save_LIBS"
18946
18947 fi
18948 echo "$as_me:$LINENO: result: $ol_cv_var_des_debug" >&5
18949 echo "${ECHO_T}$ol_cv_var_des_debug" >&6
18950
18951                         if test $ol_cv_var_des_debug = yes ; then
18952
18953 cat >>confdefs.h <<\_ACEOF
18954 #define HAVE_DES_DEBUG 1
18955 _ACEOF
18956
18957                         fi
18958
18959                         LIBS="$save_LIBS"
18960                 fi
18961         fi
18962 fi
18963
18964 if test $ol_link_krb5 = yes ; then
18965         ol_with_kerberos=found
18966 fi
18967
18968 case $ol_with_kerberos in yes | auto | k4 | kth)
18969
18970
18971
18972
18973 for ac_header in krb.h des.h krb-archaeology.h
18974 do
18975 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18976 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18977   echo "$as_me:$LINENO: checking for $ac_header" >&5
18978 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18979 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18980   echo $ECHO_N "(cached) $ECHO_C" >&6
18981 fi
18982 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18983 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18984 else
18985   # Is the header compilable?
18986 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18987 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18988 cat >conftest.$ac_ext <<_ACEOF
18989 /* confdefs.h.  */
18990 _ACEOF
18991 cat confdefs.h >>conftest.$ac_ext
18992 cat >>conftest.$ac_ext <<_ACEOF
18993 /* end confdefs.h.  */
18994 $ac_includes_default
18995 #include <$ac_header>
18996 _ACEOF
18997 rm -f conftest.$ac_objext
18998 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18999   (eval $ac_compile) 2>conftest.er1
19000   ac_status=$?
19001   grep -v '^ *+' conftest.er1 >conftest.err
19002   rm -f conftest.er1
19003   cat conftest.err >&5
19004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19005   (exit $ac_status); } &&
19006          { ac_try='test -z "$ac_c_werror_flag"
19007                          || test ! -s conftest.err'
19008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19009   (eval $ac_try) 2>&5
19010   ac_status=$?
19011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19012   (exit $ac_status); }; } &&
19013          { ac_try='test -s conftest.$ac_objext'
19014   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19015   (eval $ac_try) 2>&5
19016   ac_status=$?
19017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19018   (exit $ac_status); }; }; then
19019   ac_header_compiler=yes
19020 else
19021   echo "$as_me: failed program was:" >&5
19022 sed 's/^/| /' conftest.$ac_ext >&5
19023
19024 ac_header_compiler=no
19025 fi
19026 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19027 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19028 echo "${ECHO_T}$ac_header_compiler" >&6
19029
19030 # Is the header present?
19031 echo "$as_me:$LINENO: checking $ac_header presence" >&5
19032 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19033 cat >conftest.$ac_ext <<_ACEOF
19034 /* confdefs.h.  */
19035 _ACEOF
19036 cat confdefs.h >>conftest.$ac_ext
19037 cat >>conftest.$ac_ext <<_ACEOF
19038 /* end confdefs.h.  */
19039 #include <$ac_header>
19040 _ACEOF
19041 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19042   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19043   ac_status=$?
19044   grep -v '^ *+' conftest.er1 >conftest.err
19045   rm -f conftest.er1
19046   cat conftest.err >&5
19047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19048   (exit $ac_status); } >/dev/null; then
19049   if test -s conftest.err; then
19050     ac_cpp_err=$ac_c_preproc_warn_flag
19051     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19052   else
19053     ac_cpp_err=
19054   fi
19055 else
19056   ac_cpp_err=yes
19057 fi
19058 if test -z "$ac_cpp_err"; then
19059   ac_header_preproc=yes
19060 else
19061   echo "$as_me: failed program was:" >&5
19062 sed 's/^/| /' conftest.$ac_ext >&5
19063
19064   ac_header_preproc=no
19065 fi
19066 rm -f conftest.err conftest.$ac_ext
19067 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19068 echo "${ECHO_T}$ac_header_preproc" >&6
19069
19070 # So?  What about this header?
19071 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19072   yes:no: )
19073     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19074 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19075     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19076 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19077     ac_header_preproc=yes
19078     ;;
19079   no:yes:* )
19080     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19081 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19082     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19083 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19084     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19085 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19086     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19087 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19088     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19089 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19090     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19091 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19092     (
19093       cat <<\_ASBOX
19094 ## --------------------------------------------- ##
19095 ## Report this to <http://www.openldap.org/its/> ##
19096 ## --------------------------------------------- ##
19097 _ASBOX
19098     ) |
19099       sed "s/^/$as_me: WARNING:     /" >&2
19100     ;;
19101 esac
19102 echo "$as_me:$LINENO: checking for $ac_header" >&5
19103 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19104 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19105   echo $ECHO_N "(cached) $ECHO_C" >&6
19106 else
19107   eval "$as_ac_Header=\$ac_header_preproc"
19108 fi
19109 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19110 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19111
19112 fi
19113 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19114   cat >>confdefs.h <<_ACEOF
19115 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19116 _ACEOF
19117
19118 fi
19119
19120 done
19121
19122
19123         if test $ac_cv_header_krb_h = yes ; then
19124                 echo "$as_me:$LINENO: checking for main in -lkrb" >&5
19125 echo $ECHO_N "checking for main in -lkrb... $ECHO_C" >&6
19126 if test "${ac_cv_lib_krb_main+set}" = set; then
19127   echo $ECHO_N "(cached) $ECHO_C" >&6
19128 else
19129   ac_check_lib_save_LIBS=$LIBS
19130 LIBS="-lkrb -ldes $LIBS"
19131 cat >conftest.$ac_ext <<_ACEOF
19132 /* confdefs.h.  */
19133 _ACEOF
19134 cat confdefs.h >>conftest.$ac_ext
19135 cat >>conftest.$ac_ext <<_ACEOF
19136 /* end confdefs.h.  */
19137
19138
19139 int
19140 main ()
19141 {
19142 main ();
19143   ;
19144   return 0;
19145 }
19146 _ACEOF
19147 rm -f conftest.$ac_objext conftest$ac_exeext
19148 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19149   (eval $ac_link) 2>conftest.er1
19150   ac_status=$?
19151   grep -v '^ *+' conftest.er1 >conftest.err
19152   rm -f conftest.er1
19153   cat conftest.err >&5
19154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19155   (exit $ac_status); } &&
19156          { ac_try='test -z "$ac_c_werror_flag"
19157                          || test ! -s conftest.err'
19158   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19159   (eval $ac_try) 2>&5
19160   ac_status=$?
19161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19162   (exit $ac_status); }; } &&
19163          { ac_try='test -s conftest$ac_exeext'
19164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19165   (eval $ac_try) 2>&5
19166   ac_status=$?
19167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19168   (exit $ac_status); }; }; then
19169   ac_cv_lib_krb_main=yes
19170 else
19171   echo "$as_me: failed program was:" >&5
19172 sed 's/^/| /' conftest.$ac_ext >&5
19173
19174 ac_cv_lib_krb_main=no
19175 fi
19176 rm -f conftest.err conftest.$ac_objext \
19177       conftest$ac_exeext conftest.$ac_ext
19178 LIBS=$ac_check_lib_save_LIBS
19179 fi
19180 echo "$as_me:$LINENO: result: $ac_cv_lib_krb_main" >&5
19181 echo "${ECHO_T}$ac_cv_lib_krb_main" >&6
19182 if test $ac_cv_lib_krb_main = yes; then
19183   have_k4=yes
19184 else
19185   have_k4=no
19186 fi
19187
19188
19189                 if test $have_k4 = yes ; then
19190                         ol_with_kerberos=found
19191                         ol_link_krb4=yes
19192
19193
19194 cat >>confdefs.h <<\_ACEOF
19195 #define HAVE_KRB4 1
19196 _ACEOF
19197
19198
19199                         KRB4_LIBS="-lkrb -ldes"
19200
19201                         if test $ac_cv_header_krb_archaeology_h = yes ; then
19202
19203 cat >>confdefs.h <<\_ACEOF
19204 #define HAVE_KTH_KERBEROS 1
19205 _ACEOF
19206
19207                         fi
19208                 fi
19209         fi
19210         ;;
19211 esac
19212
19213 if test $ol_link_krb4 = yes && test $ol_enable_kbind != no ; then
19214         ol_link_kbind=yes
19215
19216 elif test $ol_enable_kbind = yes ; then
19217         { { echo "$as_me:$LINENO: error: Kerberos IV detection failed" >&5
19218 echo "$as_me: error: Kerberos IV detection failed" >&2;}
19219    { (exit 1); exit 1; }; }
19220 fi
19221
19222 if test $ol_link_krb4 = yes || test $ol_link_krb5 = yes ; then
19223
19224 cat >>confdefs.h <<\_ACEOF
19225 #define HAVE_KERBEROS 1
19226 _ACEOF
19227
19228
19229 elif test $ol_with_kerberos != auto && test $ol_with_kerberos != no ; then
19230         { { echo "$as_me:$LINENO: error: Kerberos detection failed" >&5
19231 echo "$as_me: error: Kerberos detection failed" >&2;}
19232    { (exit 1); exit 1; }; }
19233 fi
19234
19235
19236 ol_link_tls=no
19237 if test $ol_with_tls != no ; then
19238
19239 for ac_header in openssl/ssl.h
19240 do
19241 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19242 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19243   echo "$as_me:$LINENO: checking for $ac_header" >&5
19244 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19245 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19246   echo $ECHO_N "(cached) $ECHO_C" >&6
19247 fi
19248 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19249 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19250 else
19251   # Is the header compilable?
19252 echo "$as_me:$LINENO: checking $ac_header usability" >&5
19253 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19254 cat >conftest.$ac_ext <<_ACEOF
19255 /* confdefs.h.  */
19256 _ACEOF
19257 cat confdefs.h >>conftest.$ac_ext
19258 cat >>conftest.$ac_ext <<_ACEOF
19259 /* end confdefs.h.  */
19260 $ac_includes_default
19261 #include <$ac_header>
19262 _ACEOF
19263 rm -f conftest.$ac_objext
19264 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19265   (eval $ac_compile) 2>conftest.er1
19266   ac_status=$?
19267   grep -v '^ *+' conftest.er1 >conftest.err
19268   rm -f conftest.er1
19269   cat conftest.err >&5
19270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19271   (exit $ac_status); } &&
19272          { ac_try='test -z "$ac_c_werror_flag"
19273                          || test ! -s conftest.err'
19274   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19275   (eval $ac_try) 2>&5
19276   ac_status=$?
19277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19278   (exit $ac_status); }; } &&
19279          { ac_try='test -s conftest.$ac_objext'
19280   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19281   (eval $ac_try) 2>&5
19282   ac_status=$?
19283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19284   (exit $ac_status); }; }; then
19285   ac_header_compiler=yes
19286 else
19287   echo "$as_me: failed program was:" >&5
19288 sed 's/^/| /' conftest.$ac_ext >&5
19289
19290 ac_header_compiler=no
19291 fi
19292 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19293 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19294 echo "${ECHO_T}$ac_header_compiler" >&6
19295
19296 # Is the header present?
19297 echo "$as_me:$LINENO: checking $ac_header presence" >&5
19298 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19299 cat >conftest.$ac_ext <<_ACEOF
19300 /* confdefs.h.  */
19301 _ACEOF
19302 cat confdefs.h >>conftest.$ac_ext
19303 cat >>conftest.$ac_ext <<_ACEOF
19304 /* end confdefs.h.  */
19305 #include <$ac_header>
19306 _ACEOF
19307 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19308   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19309   ac_status=$?
19310   grep -v '^ *+' conftest.er1 >conftest.err
19311   rm -f conftest.er1
19312   cat conftest.err >&5
19313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19314   (exit $ac_status); } >/dev/null; then
19315   if test -s conftest.err; then
19316     ac_cpp_err=$ac_c_preproc_warn_flag
19317     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19318   else
19319     ac_cpp_err=
19320   fi
19321 else
19322   ac_cpp_err=yes
19323 fi
19324 if test -z "$ac_cpp_err"; then
19325   ac_header_preproc=yes
19326 else
19327   echo "$as_me: failed program was:" >&5
19328 sed 's/^/| /' conftest.$ac_ext >&5
19329
19330   ac_header_preproc=no
19331 fi
19332 rm -f conftest.err conftest.$ac_ext
19333 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19334 echo "${ECHO_T}$ac_header_preproc" >&6
19335
19336 # So?  What about this header?
19337 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19338   yes:no: )
19339     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19340 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19341     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19342 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19343     ac_header_preproc=yes
19344     ;;
19345   no:yes:* )
19346     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19347 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19348     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19349 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19350     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19351 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19352     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19353 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19354     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19355 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19356     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19357 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19358     (
19359       cat <<\_ASBOX
19360 ## --------------------------------------------- ##
19361 ## Report this to <http://www.openldap.org/its/> ##
19362 ## --------------------------------------------- ##
19363 _ASBOX
19364     ) |
19365       sed "s/^/$as_me: WARNING:     /" >&2
19366     ;;
19367 esac
19368 echo "$as_me:$LINENO: checking for $ac_header" >&5
19369 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19370 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19371   echo $ECHO_N "(cached) $ECHO_C" >&6
19372 else
19373   eval "$as_ac_Header=\$ac_header_preproc"
19374 fi
19375 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19376 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19377
19378 fi
19379 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19380   cat >>confdefs.h <<_ACEOF
19381 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19382 _ACEOF
19383
19384 fi
19385
19386 done
19387
19388
19389         if test $ac_cv_header_openssl_ssl_h = yes ; then
19390                 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
19391 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
19392 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
19393   echo $ECHO_N "(cached) $ECHO_C" >&6
19394 else
19395   ac_check_lib_save_LIBS=$LIBS
19396 LIBS="-lssl -lcrypto $LIBS"
19397 cat >conftest.$ac_ext <<_ACEOF
19398 /* confdefs.h.  */
19399 _ACEOF
19400 cat confdefs.h >>conftest.$ac_ext
19401 cat >>conftest.$ac_ext <<_ACEOF
19402 /* end confdefs.h.  */
19403
19404 /* Override any gcc2 internal prototype to avoid an error.  */
19405 #ifdef __cplusplus
19406 extern "C"
19407 #endif
19408 /* We use char because int might match the return type of a gcc2
19409    builtin and then its argument prototype would still apply.  */
19410 char SSL_library_init ();
19411 int
19412 main ()
19413 {
19414 SSL_library_init ();
19415   ;
19416   return 0;
19417 }
19418 _ACEOF
19419 rm -f conftest.$ac_objext conftest$ac_exeext
19420 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19421   (eval $ac_link) 2>conftest.er1
19422   ac_status=$?
19423   grep -v '^ *+' conftest.er1 >conftest.err
19424   rm -f conftest.er1
19425   cat conftest.err >&5
19426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19427   (exit $ac_status); } &&
19428          { ac_try='test -z "$ac_c_werror_flag"
19429                          || test ! -s conftest.err'
19430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19431   (eval $ac_try) 2>&5
19432   ac_status=$?
19433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19434   (exit $ac_status); }; } &&
19435          { ac_try='test -s conftest$ac_exeext'
19436   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19437   (eval $ac_try) 2>&5
19438   ac_status=$?
19439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19440   (exit $ac_status); }; }; then
19441   ac_cv_lib_ssl_SSL_library_init=yes
19442 else
19443   echo "$as_me: failed program was:" >&5
19444 sed 's/^/| /' conftest.$ac_ext >&5
19445
19446 ac_cv_lib_ssl_SSL_library_init=no
19447 fi
19448 rm -f conftest.err conftest.$ac_objext \
19449       conftest$ac_exeext conftest.$ac_ext
19450 LIBS=$ac_check_lib_save_LIBS
19451 fi
19452 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
19453 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
19454 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
19455   have_openssl=yes
19456                         need_rsaref=no
19457 else
19458   have_openssl=no
19459 fi
19460
19461
19462                 if test $have_openssl = no ; then
19463                         echo "$as_me:$LINENO: checking for ssl3_accept in -lssl" >&5
19464 echo $ECHO_N "checking for ssl3_accept in -lssl... $ECHO_C" >&6
19465 if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then
19466   echo $ECHO_N "(cached) $ECHO_C" >&6
19467 else
19468   ac_check_lib_save_LIBS=$LIBS
19469 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
19470 cat >conftest.$ac_ext <<_ACEOF
19471 /* confdefs.h.  */
19472 _ACEOF
19473 cat confdefs.h >>conftest.$ac_ext
19474 cat >>conftest.$ac_ext <<_ACEOF
19475 /* end confdefs.h.  */
19476
19477 /* Override any gcc2 internal prototype to avoid an error.  */
19478 #ifdef __cplusplus
19479 extern "C"
19480 #endif
19481 /* We use char because int might match the return type of a gcc2
19482    builtin and then its argument prototype would still apply.  */
19483 char ssl3_accept ();
19484 int
19485 main ()
19486 {
19487 ssl3_accept ();
19488   ;
19489   return 0;
19490 }
19491 _ACEOF
19492 rm -f conftest.$ac_objext conftest$ac_exeext
19493 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19494   (eval $ac_link) 2>conftest.er1
19495   ac_status=$?
19496   grep -v '^ *+' conftest.er1 >conftest.err
19497   rm -f conftest.er1
19498   cat conftest.err >&5
19499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19500   (exit $ac_status); } &&
19501          { ac_try='test -z "$ac_c_werror_flag"
19502                          || test ! -s conftest.err'
19503   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19504   (eval $ac_try) 2>&5
19505   ac_status=$?
19506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19507   (exit $ac_status); }; } &&
19508          { ac_try='test -s conftest$ac_exeext'
19509   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19510   (eval $ac_try) 2>&5
19511   ac_status=$?
19512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19513   (exit $ac_status); }; }; then
19514   ac_cv_lib_ssl_ssl3_accept=yes
19515 else
19516   echo "$as_me: failed program was:" >&5
19517 sed 's/^/| /' conftest.$ac_ext >&5
19518
19519 ac_cv_lib_ssl_ssl3_accept=no
19520 fi
19521 rm -f conftest.err conftest.$ac_objext \
19522       conftest$ac_exeext conftest.$ac_ext
19523 LIBS=$ac_check_lib_save_LIBS
19524 fi
19525 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_ssl3_accept" >&5
19526 echo "${ECHO_T}$ac_cv_lib_ssl_ssl3_accept" >&6
19527 if test $ac_cv_lib_ssl_ssl3_accept = yes; then
19528   have_openssl=yes
19529                                 need_rsaref=yes
19530 else
19531   have_openssl=no
19532 fi
19533
19534                 fi
19535
19536                 if test $have_openssl = yes ; then
19537                         ol_with_tls=found
19538                         ol_link_tls=yes
19539
19540
19541 cat >>confdefs.h <<\_ACEOF
19542 #define HAVE_OPENSSL 1
19543 _ACEOF
19544
19545
19546                         if test $need_rsaref = yes; then
19547
19548 cat >>confdefs.h <<\_ACEOF
19549 #define HAVE_RSAREF 1
19550 _ACEOF
19551
19552
19553                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
19554                         else
19555                                 TLS_LIBS="-lssl -lcrypto"
19556                         fi
19557                 fi
19558                 echo "$as_me:$LINENO: checking OpenSSL library version (CRL checking capability)" >&5
19559 echo $ECHO_N "checking OpenSSL library version (CRL checking capability)... $ECHO_C" >&6
19560 if test "${ol_cv_ssl_crl_compat+set}" = set; then
19561   echo $ECHO_N "(cached) $ECHO_C" >&6
19562 else
19563
19564         cat >conftest.$ac_ext <<_ACEOF
19565 /* confdefs.h.  */
19566 _ACEOF
19567 cat confdefs.h >>conftest.$ac_ext
19568 cat >>conftest.$ac_ext <<_ACEOF
19569 /* end confdefs.h.  */
19570
19571 #ifdef HAVE_OPENSSL_SSL_H
19572 #include <openssl/ssl.h>
19573 #else
19574 #include <ssl.h>
19575 #endif
19576
19577 /* Require 0.9.7d+ */
19578 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
19579         char *__ssl_compat = "0.9.7d";
19580 #endif
19581
19582 _ACEOF
19583 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19584   $EGREP "__ssl_compat" >/dev/null 2>&1; then
19585   ol_cv_ssl_crl_compat=yes
19586 else
19587   ol_cv_ssl_crl_compat=no
19588 fi
19589 rm -f conftest*
19590
19591 fi
19592 echo "$as_me:$LINENO: result: $ol_cv_ssl_crl_compat" >&5
19593 echo "${ECHO_T}$ol_cv_ssl_crl_compat" >&6
19594
19595                 if test $ol_cv_ssl_crl_compat = no ; then
19596                         ol_link_ssl=no
19597                 else
19598
19599 cat >>confdefs.h <<\_ACEOF
19600 #define HAVE_OPENSSL_CRL 1
19601 _ACEOF
19602
19603                 fi
19604         fi
19605
19606 else
19607         { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5
19608 echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
19609 fi
19610
19611 WITH_TLS=no
19612 if test $ol_link_tls = yes ; then
19613
19614 cat >>confdefs.h <<\_ACEOF
19615 #define HAVE_TLS 1
19616 _ACEOF
19617
19618         WITH_TLS=yes
19619
19620 elif test $ol_with_tls = auto ; then
19621         { echo "$as_me:$LINENO: WARNING: Could not locate TLS/SSL package" >&5
19622 echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;}
19623         { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5
19624 echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
19625
19626 elif test $ol_with_tls != no ; then
19627         { { echo "$as_me:$LINENO: error: Could not locate TLS/SSL package" >&5
19628 echo "$as_me: error: Could not locate TLS/SSL package" >&2;}
19629    { (exit 1); exit 1; }; }
19630 fi
19631
19632 if test $ol_enable_lmpasswd != no; then
19633         if test $ol_link_tls != yes ; then
19634                 { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5
19635 echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;}
19636    { (exit 1); exit 1; }; }
19637         fi
19638
19639
19640 cat >>confdefs.h <<\_ACEOF
19641 #define SLAPD_LMHASH 1
19642 _ACEOF
19643
19644 fi
19645
19646 ol_link_threads=no
19647
19648 case $ol_with_threads in auto | yes | nt)
19649
19650
19651         echo "$as_me:$LINENO: checking for _beginthread" >&5
19652 echo $ECHO_N "checking for _beginthread... $ECHO_C" >&6
19653 if test "${ac_cv_func__beginthread+set}" = set; then
19654   echo $ECHO_N "(cached) $ECHO_C" >&6
19655 else
19656   cat >conftest.$ac_ext <<_ACEOF
19657 /* confdefs.h.  */
19658 _ACEOF
19659 cat confdefs.h >>conftest.$ac_ext
19660 cat >>conftest.$ac_ext <<_ACEOF
19661 /* end confdefs.h.  */
19662 /* Define _beginthread to an innocuous variant, in case <limits.h> declares _beginthread.
19663    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19664 #define _beginthread innocuous__beginthread
19665
19666 /* System header to define __stub macros and hopefully few prototypes,
19667     which can conflict with char _beginthread (); below.
19668     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19669     <limits.h> exists even on freestanding compilers.  */
19670
19671 #ifdef __STDC__
19672 # include <limits.h>
19673 #else
19674 # include <assert.h>
19675 #endif
19676
19677 #undef _beginthread
19678
19679 /* Override any gcc2 internal prototype to avoid an error.  */
19680 #ifdef __cplusplus
19681 extern "C"
19682 {
19683 #endif
19684 /* We use char because int might match the return type of a gcc2
19685    builtin and then its argument prototype would still apply.  */
19686 char _beginthread ();
19687 /* The GNU C library defines this for functions which it implements
19688     to always fail with ENOSYS.  Some functions are actually named
19689     something starting with __ and the normal name is an alias.  */
19690 #if defined (__stub__beginthread) || defined (__stub____beginthread)
19691 choke me
19692 #else
19693 char (*f) () = _beginthread;
19694 #endif
19695 #ifdef __cplusplus
19696 }
19697 #endif
19698
19699 int
19700 main ()
19701 {
19702 return f != _beginthread;
19703   ;
19704   return 0;
19705 }
19706 _ACEOF
19707 rm -f conftest.$ac_objext conftest$ac_exeext
19708 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19709   (eval $ac_link) 2>conftest.er1
19710   ac_status=$?
19711   grep -v '^ *+' conftest.er1 >conftest.err
19712   rm -f conftest.er1
19713   cat conftest.err >&5
19714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19715   (exit $ac_status); } &&
19716          { ac_try='test -z "$ac_c_werror_flag"
19717                          || test ! -s conftest.err'
19718   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19719   (eval $ac_try) 2>&5
19720   ac_status=$?
19721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19722   (exit $ac_status); }; } &&
19723          { ac_try='test -s conftest$ac_exeext'
19724   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19725   (eval $ac_try) 2>&5
19726   ac_status=$?
19727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19728   (exit $ac_status); }; }; then
19729   ac_cv_func__beginthread=yes
19730 else
19731   echo "$as_me: failed program was:" >&5
19732 sed 's/^/| /' conftest.$ac_ext >&5
19733
19734 ac_cv_func__beginthread=no
19735 fi
19736 rm -f conftest.err conftest.$ac_objext \
19737       conftest$ac_exeext conftest.$ac_ext
19738 fi
19739 echo "$as_me:$LINENO: result: $ac_cv_func__beginthread" >&5
19740 echo "${ECHO_T}$ac_cv_func__beginthread" >&6
19741
19742
19743         if test $ac_cv_func__beginthread = yes ; then
19744
19745 cat >>confdefs.h <<\_ACEOF
19746 #define HAVE_NT_THREADS 1
19747 _ACEOF
19748
19749                 ol_cv_nt_threads=yes
19750         fi
19751
19752
19753         if test "$ol_cv_nt_threads" = yes ; then
19754                 ol_link_threads=nt
19755                 ol_with_threads=found
19756                 ol_with_yielding_select=yes
19757
19758
19759 cat >>confdefs.h <<\_ACEOF
19760 #define HAVE_NT_SERVICE_MANAGER 1
19761 _ACEOF
19762
19763
19764 cat >>confdefs.h <<\_ACEOF
19765 #define HAVE_NT_EVENT_LOG 1
19766 _ACEOF
19767
19768         fi
19769
19770         if test $ol_with_threads = nt ; then
19771                 { { echo "$as_me:$LINENO: error: could not locate NT Threads" >&5
19772 echo "$as_me: error: could not locate NT Threads" >&2;}
19773    { (exit 1); exit 1; }; }
19774         fi
19775         ;;
19776 esac
19777
19778 case $ol_with_threads in auto | yes | posix)
19779
19780
19781 for ac_header in pthread.h
19782 do
19783 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19784 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19785   echo "$as_me:$LINENO: checking for $ac_header" >&5
19786 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19787 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19788   echo $ECHO_N "(cached) $ECHO_C" >&6
19789 fi
19790 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19791 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19792 else
19793   # Is the header compilable?
19794 echo "$as_me:$LINENO: checking $ac_header usability" >&5
19795 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19796 cat >conftest.$ac_ext <<_ACEOF
19797 /* confdefs.h.  */
19798 _ACEOF
19799 cat confdefs.h >>conftest.$ac_ext
19800 cat >>conftest.$ac_ext <<_ACEOF
19801 /* end confdefs.h.  */
19802 $ac_includes_default
19803 #include <$ac_header>
19804 _ACEOF
19805 rm -f conftest.$ac_objext
19806 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19807   (eval $ac_compile) 2>conftest.er1
19808   ac_status=$?
19809   grep -v '^ *+' conftest.er1 >conftest.err
19810   rm -f conftest.er1
19811   cat conftest.err >&5
19812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19813   (exit $ac_status); } &&
19814          { ac_try='test -z "$ac_c_werror_flag"
19815                          || test ! -s conftest.err'
19816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19817   (eval $ac_try) 2>&5
19818   ac_status=$?
19819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19820   (exit $ac_status); }; } &&
19821          { ac_try='test -s conftest.$ac_objext'
19822   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19823   (eval $ac_try) 2>&5
19824   ac_status=$?
19825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19826   (exit $ac_status); }; }; then
19827   ac_header_compiler=yes
19828 else
19829   echo "$as_me: failed program was:" >&5
19830 sed 's/^/| /' conftest.$ac_ext >&5
19831
19832 ac_header_compiler=no
19833 fi
19834 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19835 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19836 echo "${ECHO_T}$ac_header_compiler" >&6
19837
19838 # Is the header present?
19839 echo "$as_me:$LINENO: checking $ac_header presence" >&5
19840 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19841 cat >conftest.$ac_ext <<_ACEOF
19842 /* confdefs.h.  */
19843 _ACEOF
19844 cat confdefs.h >>conftest.$ac_ext
19845 cat >>conftest.$ac_ext <<_ACEOF
19846 /* end confdefs.h.  */
19847 #include <$ac_header>
19848 _ACEOF
19849 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19850   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19851   ac_status=$?
19852   grep -v '^ *+' conftest.er1 >conftest.err
19853   rm -f conftest.er1
19854   cat conftest.err >&5
19855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19856   (exit $ac_status); } >/dev/null; then
19857   if test -s conftest.err; then
19858     ac_cpp_err=$ac_c_preproc_warn_flag
19859     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19860   else
19861     ac_cpp_err=
19862   fi
19863 else
19864   ac_cpp_err=yes
19865 fi
19866 if test -z "$ac_cpp_err"; then
19867   ac_header_preproc=yes
19868 else
19869   echo "$as_me: failed program was:" >&5
19870 sed 's/^/| /' conftest.$ac_ext >&5
19871
19872   ac_header_preproc=no
19873 fi
19874 rm -f conftest.err conftest.$ac_ext
19875 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19876 echo "${ECHO_T}$ac_header_preproc" >&6
19877
19878 # So?  What about this header?
19879 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19880   yes:no: )
19881     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19882 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19883     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19884 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19885     ac_header_preproc=yes
19886     ;;
19887   no:yes:* )
19888     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19889 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19890     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19891 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19892     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19893 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19894     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19895 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19896     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19897 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19898     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19899 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19900     (
19901       cat <<\_ASBOX
19902 ## --------------------------------------------- ##
19903 ## Report this to <http://www.openldap.org/its/> ##
19904 ## --------------------------------------------- ##
19905 _ASBOX
19906     ) |
19907       sed "s/^/$as_me: WARNING:     /" >&2
19908     ;;
19909 esac
19910 echo "$as_me:$LINENO: checking for $ac_header" >&5
19911 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19912 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19913   echo $ECHO_N "(cached) $ECHO_C" >&6
19914 else
19915   eval "$as_ac_Header=\$ac_header_preproc"
19916 fi
19917 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19918 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19919
19920 fi
19921 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19922   cat >>confdefs.h <<_ACEOF
19923 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19924 _ACEOF
19925
19926 fi
19927
19928 done
19929
19930
19931         if test $ac_cv_header_pthread_h = yes ; then
19932                 echo "$as_me:$LINENO: checking POSIX thread version" >&5
19933 echo $ECHO_N "checking POSIX thread version... $ECHO_C" >&6
19934 if test "${ol_cv_pthread_version+set}" = set; then
19935   echo $ECHO_N "(cached) $ECHO_C" >&6
19936 else
19937
19938         cat >conftest.$ac_ext <<_ACEOF
19939 /* confdefs.h.  */
19940 _ACEOF
19941 cat confdefs.h >>conftest.$ac_ext
19942 cat >>conftest.$ac_ext <<_ACEOF
19943 /* end confdefs.h.  */
19944
19945 #               include <pthread.h>
19946
19947 int
19948 main ()
19949 {
19950
19951                 int i = PTHREAD_CREATE_JOINABLE;
19952
19953   ;
19954   return 0;
19955 }
19956 _ACEOF
19957 rm -f conftest.$ac_objext
19958 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19959   (eval $ac_compile) 2>conftest.er1
19960   ac_status=$?
19961   grep -v '^ *+' conftest.er1 >conftest.err
19962   rm -f conftest.er1
19963   cat conftest.err >&5
19964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19965   (exit $ac_status); } &&
19966          { ac_try='test -z "$ac_c_werror_flag"
19967                          || test ! -s conftest.err'
19968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19969   (eval $ac_try) 2>&5
19970   ac_status=$?
19971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19972   (exit $ac_status); }; } &&
19973          { ac_try='test -s conftest.$ac_objext'
19974   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19975   (eval $ac_try) 2>&5
19976   ac_status=$?
19977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19978   (exit $ac_status); }; }; then
19979
19980         cat >conftest.$ac_ext <<_ACEOF
19981 /* confdefs.h.  */
19982 _ACEOF
19983 cat confdefs.h >>conftest.$ac_ext
19984 cat >>conftest.$ac_ext <<_ACEOF
19985 /* end confdefs.h.  */
19986 #include <pthread.h>
19987
19988 _ACEOF
19989 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19990   $EGREP "pthread_detach" >/dev/null 2>&1; then
19991   ol_cv_pthread_version=10
19992 else
19993   ol_cv_pthread_version=8
19994 fi
19995 rm -f conftest*
19996
19997 else
19998   echo "$as_me: failed program was:" >&5
19999 sed 's/^/| /' conftest.$ac_ext >&5
20000
20001
20002         cat >conftest.$ac_ext <<_ACEOF
20003 /* confdefs.h.  */
20004 _ACEOF
20005 cat confdefs.h >>conftest.$ac_ext
20006 cat >>conftest.$ac_ext <<_ACEOF
20007 /* end confdefs.h.  */
20008
20009 #               include <pthread.h>
20010 #               ifdef PTHREAD_CREATE_UNDETACHED
20011                 draft7
20012 #               endif
20013
20014 _ACEOF
20015 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20016   $EGREP "draft7" >/dev/null 2>&1; then
20017   ol_cv_pthread_version=7
20018 else
20019
20020         cat >conftest.$ac_ext <<_ACEOF
20021 /* confdefs.h.  */
20022 _ACEOF
20023 cat confdefs.h >>conftest.$ac_ext
20024 cat >>conftest.$ac_ext <<_ACEOF
20025 /* end confdefs.h.  */
20026 #include <pthread.h>
20027
20028 _ACEOF
20029 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20030   $EGREP "pthread_attr_init" >/dev/null 2>&1; then
20031   ol_cv_pthread_version=6
20032 else
20033
20034         cat >conftest.$ac_ext <<_ACEOF
20035 /* confdefs.h.  */
20036 _ACEOF
20037 cat confdefs.h >>conftest.$ac_ext
20038 cat >>conftest.$ac_ext <<_ACEOF
20039 /* end confdefs.h.  */
20040
20041 #               include <pthread.h>
20042 #ifdef          PTHREAD_MUTEX_INITIALIZER
20043                 draft5
20044 #endif
20045
20046 _ACEOF
20047 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20048   $EGREP "draft5" >/dev/null 2>&1; then
20049   ol_cv_pthread_version=5
20050 else
20051   ol_cv_pthread_version=4
20052 fi
20053 rm -f conftest*
20054
20055 fi
20056 rm -f conftest*
20057
20058 fi
20059 rm -f conftest*
20060
20061 fi
20062 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20063
20064 fi
20065 echo "$as_me:$LINENO: result: $ol_cv_pthread_version" >&5
20066 echo "${ECHO_T}$ol_cv_pthread_version" >&6
20067
20068
20069                 if test $ol_cv_pthread_version != 0 ; then
20070
20071 cat >>confdefs.h <<_ACEOF
20072 #define HAVE_PTHREADS $ol_cv_pthread_version
20073 _ACEOF
20074
20075                 else
20076                         { { echo "$as_me:$LINENO: error: unknown pthread version" >&5
20077 echo "$as_me: error: unknown pthread version" >&2;}
20078    { (exit 1); exit 1; }; }
20079                 fi
20080
20081                 # consider threads found
20082                 ol_with_threads=found
20083
20084
20085         echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5
20086 echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6
20087 if test "${ol_cv_header_linux_threads+set}" = set; then
20088   echo $ECHO_N "(cached) $ECHO_C" >&6
20089 else
20090   cat >conftest.$ac_ext <<_ACEOF
20091 /* confdefs.h.  */
20092 _ACEOF
20093 cat confdefs.h >>conftest.$ac_ext
20094 cat >>conftest.$ac_ext <<_ACEOF
20095 /* end confdefs.h.  */
20096 #include <pthread.h>
20097 _ACEOF
20098 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20099   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then
20100   ol_cv_header_linux_threads=yes
20101 else
20102   ol_cv_header_linux_threads=no
20103 fi
20104 rm -f conftest*
20105
20106
20107 fi
20108 echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5
20109 echo "${ECHO_T}$ol_cv_header_linux_threads" >&6
20110         if test $ol_cv_header_linux_threads = yes; then
20111
20112 cat >>confdefs.h <<\_ACEOF
20113 #define HAVE_LINUX_THREADS 1
20114 _ACEOF
20115
20116         fi
20117
20118
20119         echo "$as_me:$LINENO: checking for GNU Pth pthread.h" >&5
20120 echo $ECHO_N "checking for GNU Pth pthread.h... $ECHO_C" >&6
20121 if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then
20122   echo $ECHO_N "(cached) $ECHO_C" >&6
20123 else
20124   cat >conftest.$ac_ext <<_ACEOF
20125 /* confdefs.h.  */
20126 _ACEOF
20127 cat confdefs.h >>conftest.$ac_ext
20128 cat >>conftest.$ac_ext <<_ACEOF
20129 /* end confdefs.h.  */
20130 #include <pthread.h>
20131 #ifdef _POSIX_THREAD_IS_GNU_PTH
20132         __gnu_pth__;
20133 #endif
20134
20135 _ACEOF
20136 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20137   $EGREP "__gnu_pth__" >/dev/null 2>&1; then
20138   ol_cv_header_gnu_pth_pthread_h=yes
20139 else
20140   ol_cv_header_gnu_pth_pthread_h=no
20141 fi
20142 rm -f conftest*
20143
20144
20145 fi
20146 echo "$as_me:$LINENO: result: $ol_cv_header_gnu_pth_pthread_h" >&5
20147 echo "${ECHO_T}$ol_cv_header_gnu_pth_pthread_h" >&6
20148
20149
20150                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
20151
20152 for ac_header in sched.h
20153 do
20154 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20155 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20156   echo "$as_me:$LINENO: checking for $ac_header" >&5
20157 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20158 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20159   echo $ECHO_N "(cached) $ECHO_C" >&6
20160 fi
20161 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20162 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20163 else
20164   # Is the header compilable?
20165 echo "$as_me:$LINENO: checking $ac_header usability" >&5
20166 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20167 cat >conftest.$ac_ext <<_ACEOF
20168 /* confdefs.h.  */
20169 _ACEOF
20170 cat confdefs.h >>conftest.$ac_ext
20171 cat >>conftest.$ac_ext <<_ACEOF
20172 /* end confdefs.h.  */
20173 $ac_includes_default
20174 #include <$ac_header>
20175 _ACEOF
20176 rm -f conftest.$ac_objext
20177 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20178   (eval $ac_compile) 2>conftest.er1
20179   ac_status=$?
20180   grep -v '^ *+' conftest.er1 >conftest.err
20181   rm -f conftest.er1
20182   cat conftest.err >&5
20183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20184   (exit $ac_status); } &&
20185          { ac_try='test -z "$ac_c_werror_flag"
20186                          || test ! -s conftest.err'
20187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20188   (eval $ac_try) 2>&5
20189   ac_status=$?
20190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20191   (exit $ac_status); }; } &&
20192          { ac_try='test -s conftest.$ac_objext'
20193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20194   (eval $ac_try) 2>&5
20195   ac_status=$?
20196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20197   (exit $ac_status); }; }; then
20198   ac_header_compiler=yes
20199 else
20200   echo "$as_me: failed program was:" >&5
20201 sed 's/^/| /' conftest.$ac_ext >&5
20202
20203 ac_header_compiler=no
20204 fi
20205 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20206 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20207 echo "${ECHO_T}$ac_header_compiler" >&6
20208
20209 # Is the header present?
20210 echo "$as_me:$LINENO: checking $ac_header presence" >&5
20211 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20212 cat >conftest.$ac_ext <<_ACEOF
20213 /* confdefs.h.  */
20214 _ACEOF
20215 cat confdefs.h >>conftest.$ac_ext
20216 cat >>conftest.$ac_ext <<_ACEOF
20217 /* end confdefs.h.  */
20218 #include <$ac_header>
20219 _ACEOF
20220 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20221   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20222   ac_status=$?
20223   grep -v '^ *+' conftest.er1 >conftest.err
20224   rm -f conftest.er1
20225   cat conftest.err >&5
20226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20227   (exit $ac_status); } >/dev/null; then
20228   if test -s conftest.err; then
20229     ac_cpp_err=$ac_c_preproc_warn_flag
20230     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20231   else
20232     ac_cpp_err=
20233   fi
20234 else
20235   ac_cpp_err=yes
20236 fi
20237 if test -z "$ac_cpp_err"; then
20238   ac_header_preproc=yes
20239 else
20240   echo "$as_me: failed program was:" >&5
20241 sed 's/^/| /' conftest.$ac_ext >&5
20242
20243   ac_header_preproc=no
20244 fi
20245 rm -f conftest.err conftest.$ac_ext
20246 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20247 echo "${ECHO_T}$ac_header_preproc" >&6
20248
20249 # So?  What about this header?
20250 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20251   yes:no: )
20252     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20253 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
20254     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20255 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20256     ac_header_preproc=yes
20257     ;;
20258   no:yes:* )
20259     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20260 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
20261     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
20262 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
20263     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20264 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20265     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
20266 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
20267     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20268 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
20269     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20270 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
20271     (
20272       cat <<\_ASBOX
20273 ## --------------------------------------------- ##
20274 ## Report this to <http://www.openldap.org/its/> ##
20275 ## --------------------------------------------- ##
20276 _ASBOX
20277     ) |
20278       sed "s/^/$as_me: WARNING:     /" >&2
20279     ;;
20280 esac
20281 echo "$as_me:$LINENO: checking for $ac_header" >&5
20282 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20283 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20284   echo $ECHO_N "(cached) $ECHO_C" >&6
20285 else
20286   eval "$as_ac_Header=\$ac_header_preproc"
20287 fi
20288 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20289 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20290
20291 fi
20292 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20293   cat >>confdefs.h <<_ACEOF
20294 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20295 _ACEOF
20296
20297 fi
20298
20299 done
20300
20301                 fi
20302
20303
20304                                 echo "$as_me:$LINENO: checking for pthread_create in default libraries" >&5
20305 echo $ECHO_N "checking for pthread_create in default libraries... $ECHO_C" >&6
20306 if test "${ol_cv_pthread_create+set}" = set; then
20307   echo $ECHO_N "(cached) $ECHO_C" >&6
20308 else
20309
20310                         if test "$cross_compiling" = yes; then
20311   cat >conftest.$ac_ext <<_ACEOF
20312 /* confdefs.h.  */
20313 _ACEOF
20314 cat confdefs.h >>conftest.$ac_ext
20315 cat >>conftest.$ac_ext <<_ACEOF
20316 /* end confdefs.h.  */
20317
20318 /* pthread test headers */
20319 #include <pthread.h>
20320 #if HAVE_PTHREADS < 7
20321 #include <errno.h>
20322 #endif
20323 #ifndef NULL
20324 #define NULL (void*)0
20325 #endif
20326
20327 static void *task(p)
20328         void *p;
20329 {
20330         return (void *) (p == NULL);
20331 }
20332
20333 int
20334 main ()
20335 {
20336
20337         /* pthread test function */
20338 #ifndef PTHREAD_CREATE_DETACHED
20339 #define PTHREAD_CREATE_DETACHED 1
20340 #endif
20341         pthread_t t;
20342         int status;
20343         int detach = PTHREAD_CREATE_DETACHED;
20344
20345 #if HAVE_PTHREADS > 4
20346         /* Final pthreads */
20347         pthread_attr_t attr;
20348
20349         status = pthread_attr_init(&attr);
20350         if( status ) return status;
20351
20352 #if HAVE_PTHREADS < 7
20353         status = pthread_attr_setdetachstate(&attr, &detach);
20354         if( status < 0 ) status = errno;
20355 #else
20356         status = pthread_attr_setdetachstate(&attr, detach);
20357 #endif
20358         if( status ) return status;
20359         status = pthread_create( &t, &attr, task, NULL );
20360 #if HAVE_PTHREADS < 7
20361         if( status < 0 ) status = errno;
20362 #endif
20363         if( status ) return status;
20364 #else
20365         /* Draft 4 pthreads */
20366         status = pthread_create( &t, pthread_attr_default, task, NULL );
20367         if( status ) return errno;
20368
20369         /* give thread a chance to complete */
20370         /* it should remain joinable and hence detachable */
20371         sleep( 1 );
20372
20373         status = pthread_detach( &t );
20374         if( status ) return errno;
20375 #endif
20376
20377 #ifdef HAVE_LINUX_THREADS
20378         pthread_kill_other_threads_np();
20379 #endif
20380
20381         return 0;
20382
20383   ;
20384   return 0;
20385 }
20386 _ACEOF
20387 rm -f conftest.$ac_objext conftest$ac_exeext
20388 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20389   (eval $ac_link) 2>conftest.er1
20390   ac_status=$?
20391   grep -v '^ *+' conftest.er1 >conftest.err
20392   rm -f conftest.er1
20393   cat conftest.err >&5
20394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20395   (exit $ac_status); } &&
20396          { ac_try='test -z "$ac_c_werror_flag"
20397                          || test ! -s conftest.err'
20398   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20399   (eval $ac_try) 2>&5
20400   ac_status=$?
20401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20402   (exit $ac_status); }; } &&
20403          { ac_try='test -s conftest$ac_exeext'
20404   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20405   (eval $ac_try) 2>&5
20406   ac_status=$?
20407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20408   (exit $ac_status); }; }; then
20409   ol_cv_pthread_create=yes
20410 else
20411   echo "$as_me: failed program was:" >&5
20412 sed 's/^/| /' conftest.$ac_ext >&5
20413
20414 ol_cv_pthread_create=no
20415 fi
20416 rm -f conftest.err conftest.$ac_objext \
20417       conftest$ac_exeext conftest.$ac_ext
20418 else
20419   cat >conftest.$ac_ext <<_ACEOF
20420 /* confdefs.h.  */
20421 _ACEOF
20422 cat confdefs.h >>conftest.$ac_ext
20423 cat >>conftest.$ac_ext <<_ACEOF
20424 /* end confdefs.h.  */
20425
20426 /* pthread test headers */
20427 #include <pthread.h>
20428 #if HAVE_PTHREADS < 7
20429 #include <errno.h>
20430 #endif
20431 #ifndef NULL
20432 #define NULL (void*)0
20433 #endif
20434
20435 static void *task(p)
20436         void *p;
20437 {
20438         return (void *) (p == NULL);
20439 }
20440
20441
20442 int main(argc, argv)
20443         int argc;
20444         char **argv;
20445 {
20446
20447         /* pthread test function */
20448 #ifndef PTHREAD_CREATE_DETACHED
20449 #define PTHREAD_CREATE_DETACHED 1
20450 #endif
20451         pthread_t t;
20452         int status;
20453         int detach = PTHREAD_CREATE_DETACHED;
20454
20455 #if HAVE_PTHREADS > 4
20456         /* Final pthreads */
20457         pthread_attr_t attr;
20458
20459         status = pthread_attr_init(&attr);
20460         if( status ) return status;
20461
20462 #if HAVE_PTHREADS < 7
20463         status = pthread_attr_setdetachstate(&attr, &detach);
20464         if( status < 0 ) status = errno;
20465 #else
20466         status = pthread_attr_setdetachstate(&attr, detach);
20467 #endif
20468         if( status ) return status;
20469         status = pthread_create( &t, &attr, task, NULL );
20470 #if HAVE_PTHREADS < 7
20471         if( status < 0 ) status = errno;
20472 #endif
20473         if( status ) return status;
20474 #else
20475         /* Draft 4 pthreads */
20476         status = pthread_create( &t, pthread_attr_default, task, NULL );
20477         if( status ) return errno;
20478
20479         /* give thread a chance to complete */
20480         /* it should remain joinable and hence detachable */
20481         sleep( 1 );
20482
20483         status = pthread_detach( &t );
20484         if( status ) return errno;
20485 #endif
20486
20487 #ifdef HAVE_LINUX_THREADS
20488         pthread_kill_other_threads_np();
20489 #endif
20490
20491         return 0;
20492
20493 }
20494
20495 _ACEOF
20496 rm -f conftest$ac_exeext
20497 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20498   (eval $ac_link) 2>&5
20499   ac_status=$?
20500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20501   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20502   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20503   (eval $ac_try) 2>&5
20504   ac_status=$?
20505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20506   (exit $ac_status); }; }; then
20507   ol_cv_pthread_create=yes
20508 else
20509   echo "$as_me: program exited with status $ac_status" >&5
20510 echo "$as_me: failed program was:" >&5
20511 sed 's/^/| /' conftest.$ac_ext >&5
20512
20513 ( exit $ac_status )
20514 ol_cv_pthread_create=no
20515 fi
20516 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20517 fi
20518 fi
20519 echo "$as_me:$LINENO: result: $ol_cv_pthread_create" >&5
20520 echo "${ECHO_T}$ol_cv_pthread_create" >&6
20521
20522                 if test $ol_cv_pthread_create != no ; then
20523                         ol_link_threads=posix
20524                         ol_link_pthreads=""
20525                 fi
20526
20527                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
20528 if test "$ol_link_threads" = no ; then
20529         # try -kthread
20530         echo "$as_me:$LINENO: checking for pthread link with -kthread" >&5
20531 echo $ECHO_N "checking for pthread link with -kthread... $ECHO_C" >&6
20532 if test "${ol_cv_pthread_kthread+set}" = set; then
20533   echo $ECHO_N "(cached) $ECHO_C" >&6
20534 else
20535
20536                 # save the flags
20537                 ol_LIBS="$LIBS"
20538                 LIBS="-kthread $LIBS"
20539
20540                 if test "$cross_compiling" = yes; then
20541   cat >conftest.$ac_ext <<_ACEOF
20542 /* confdefs.h.  */
20543 _ACEOF
20544 cat confdefs.h >>conftest.$ac_ext
20545 cat >>conftest.$ac_ext <<_ACEOF
20546 /* end confdefs.h.  */
20547
20548 /* pthread test headers */
20549 #include <pthread.h>
20550 #if HAVE_PTHREADS < 7
20551 #include <errno.h>
20552 #endif
20553 #ifndef NULL
20554 #define NULL (void*)0
20555 #endif
20556
20557 static void *task(p)
20558         void *p;
20559 {
20560         return (void *) (p == NULL);
20561 }
20562
20563 int
20564 main ()
20565 {
20566
20567         /* pthread test function */
20568 #ifndef PTHREAD_CREATE_DETACHED
20569 #define PTHREAD_CREATE_DETACHED 1
20570 #endif
20571         pthread_t t;
20572         int status;
20573         int detach = PTHREAD_CREATE_DETACHED;
20574
20575 #if HAVE_PTHREADS > 4
20576         /* Final pthreads */
20577         pthread_attr_t attr;
20578
20579         status = pthread_attr_init(&attr);
20580         if( status ) return status;
20581
20582 #if HAVE_PTHREADS < 7
20583         status = pthread_attr_setdetachstate(&attr, &detach);
20584         if( status < 0 ) status = errno;
20585 #else
20586         status = pthread_attr_setdetachstate(&attr, detach);
20587 #endif
20588         if( status ) return status;
20589         status = pthread_create( &t, &attr, task, NULL );
20590 #if HAVE_PTHREADS < 7
20591         if( status < 0 ) status = errno;
20592 #endif
20593         if( status ) return status;
20594 #else
20595         /* Draft 4 pthreads */
20596         status = pthread_create( &t, pthread_attr_default, task, NULL );
20597         if( status ) return errno;
20598
20599         /* give thread a chance to complete */
20600         /* it should remain joinable and hence detachable */
20601         sleep( 1 );
20602
20603         status = pthread_detach( &t );
20604         if( status ) return errno;
20605 #endif
20606
20607 #ifdef HAVE_LINUX_THREADS
20608         pthread_kill_other_threads_np();
20609 #endif
20610
20611         return 0;
20612
20613   ;
20614   return 0;
20615 }
20616 _ACEOF
20617 rm -f conftest.$ac_objext conftest$ac_exeext
20618 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20619   (eval $ac_link) 2>conftest.er1
20620   ac_status=$?
20621   grep -v '^ *+' conftest.er1 >conftest.err
20622   rm -f conftest.er1
20623   cat conftest.err >&5
20624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20625   (exit $ac_status); } &&
20626          { ac_try='test -z "$ac_c_werror_flag"
20627                          || test ! -s conftest.err'
20628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20629   (eval $ac_try) 2>&5
20630   ac_status=$?
20631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20632   (exit $ac_status); }; } &&
20633          { ac_try='test -s conftest$ac_exeext'
20634   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20635   (eval $ac_try) 2>&5
20636   ac_status=$?
20637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20638   (exit $ac_status); }; }; then
20639   ol_cv_pthread_kthread=yes
20640 else
20641   echo "$as_me: failed program was:" >&5
20642 sed 's/^/| /' conftest.$ac_ext >&5
20643
20644 ol_cv_pthread_kthread=no
20645 fi
20646 rm -f conftest.err conftest.$ac_objext \
20647       conftest$ac_exeext conftest.$ac_ext
20648 else
20649   cat >conftest.$ac_ext <<_ACEOF
20650 /* confdefs.h.  */
20651 _ACEOF
20652 cat confdefs.h >>conftest.$ac_ext
20653 cat >>conftest.$ac_ext <<_ACEOF
20654 /* end confdefs.h.  */
20655
20656 /* pthread test headers */
20657 #include <pthread.h>
20658 #if HAVE_PTHREADS < 7
20659 #include <errno.h>
20660 #endif
20661 #ifndef NULL
20662 #define NULL (void*)0
20663 #endif
20664
20665 static void *task(p)
20666         void *p;
20667 {
20668         return (void *) (p == NULL);
20669 }
20670
20671
20672 int main(argc, argv)
20673         int argc;
20674         char **argv;
20675 {
20676
20677         /* pthread test function */
20678 #ifndef PTHREAD_CREATE_DETACHED
20679 #define PTHREAD_CREATE_DETACHED 1
20680 #endif
20681         pthread_t t;
20682         int status;
20683         int detach = PTHREAD_CREATE_DETACHED;
20684
20685 #if HAVE_PTHREADS > 4
20686         /* Final pthreads */
20687         pthread_attr_t attr;
20688
20689         status = pthread_attr_init(&attr);
20690         if( status ) return status;
20691
20692 #if HAVE_PTHREADS < 7
20693         status = pthread_attr_setdetachstate(&attr, &detach);
20694         if( status < 0 ) status = errno;
20695 #else
20696         status = pthread_attr_setdetachstate(&attr, detach);
20697 #endif
20698         if( status ) return status;
20699         status = pthread_create( &t, &attr, task, NULL );
20700 #if HAVE_PTHREADS < 7
20701         if( status < 0 ) status = errno;
20702 #endif
20703         if( status ) return status;
20704 #else
20705         /* Draft 4 pthreads */
20706         status = pthread_create( &t, pthread_attr_default, task, NULL );
20707         if( status ) return errno;
20708
20709         /* give thread a chance to complete */
20710         /* it should remain joinable and hence detachable */
20711         sleep( 1 );
20712
20713         status = pthread_detach( &t );
20714         if( status ) return errno;
20715 #endif
20716
20717 #ifdef HAVE_LINUX_THREADS
20718         pthread_kill_other_threads_np();
20719 #endif
20720
20721         return 0;
20722
20723 }
20724
20725 _ACEOF
20726 rm -f conftest$ac_exeext
20727 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20728   (eval $ac_link) 2>&5
20729   ac_status=$?
20730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20731   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20732   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20733   (eval $ac_try) 2>&5
20734   ac_status=$?
20735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20736   (exit $ac_status); }; }; then
20737   ol_cv_pthread_kthread=yes
20738 else
20739   echo "$as_me: program exited with status $ac_status" >&5
20740 echo "$as_me: failed program was:" >&5
20741 sed 's/^/| /' conftest.$ac_ext >&5
20742
20743 ( exit $ac_status )
20744 ol_cv_pthread_kthread=no
20745 fi
20746 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20747 fi
20748
20749                 # restore the LIBS
20750                 LIBS="$ol_LIBS"
20751
20752 fi
20753 echo "$as_me:$LINENO: result: $ol_cv_pthread_kthread" >&5
20754 echo "${ECHO_T}$ol_cv_pthread_kthread" >&6
20755
20756         if test $ol_cv_pthread_kthread = yes ; then
20757                 ol_link_pthreads="-kthread"
20758                 ol_link_threads=posix
20759         fi
20760 fi
20761
20762                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
20763 if test "$ol_link_threads" = no ; then
20764         # try -pthread
20765         echo "$as_me:$LINENO: checking for pthread link with -pthread" >&5
20766 echo $ECHO_N "checking for pthread link with -pthread... $ECHO_C" >&6
20767 if test "${ol_cv_pthread_pthread+set}" = set; then
20768   echo $ECHO_N "(cached) $ECHO_C" >&6
20769 else
20770
20771                 # save the flags
20772                 ol_LIBS="$LIBS"
20773                 LIBS="-pthread $LIBS"
20774
20775                 if test "$cross_compiling" = yes; then
20776   cat >conftest.$ac_ext <<_ACEOF
20777 /* confdefs.h.  */
20778 _ACEOF
20779 cat confdefs.h >>conftest.$ac_ext
20780 cat >>conftest.$ac_ext <<_ACEOF
20781 /* end confdefs.h.  */
20782
20783 /* pthread test headers */
20784 #include <pthread.h>
20785 #if HAVE_PTHREADS < 7
20786 #include <errno.h>
20787 #endif
20788 #ifndef NULL
20789 #define NULL (void*)0
20790 #endif
20791
20792 static void *task(p)
20793         void *p;
20794 {
20795         return (void *) (p == NULL);
20796 }
20797
20798 int
20799 main ()
20800 {
20801
20802         /* pthread test function */
20803 #ifndef PTHREAD_CREATE_DETACHED
20804 #define PTHREAD_CREATE_DETACHED 1
20805 #endif
20806         pthread_t t;
20807         int status;
20808         int detach = PTHREAD_CREATE_DETACHED;
20809
20810 #if HAVE_PTHREADS > 4
20811         /* Final pthreads */
20812         pthread_attr_t attr;
20813
20814         status = pthread_attr_init(&attr);
20815         if( status ) return status;
20816
20817 #if HAVE_PTHREADS < 7
20818         status = pthread_attr_setdetachstate(&attr, &detach);
20819         if( status < 0 ) status = errno;
20820 #else
20821         status = pthread_attr_setdetachstate(&attr, detach);
20822 #endif
20823         if( status ) return status;
20824         status = pthread_create( &t, &attr, task, NULL );
20825 #if HAVE_PTHREADS < 7
20826         if( status < 0 ) status = errno;
20827 #endif
20828         if( status ) return status;
20829 #else
20830         /* Draft 4 pthreads */
20831         status = pthread_create( &t, pthread_attr_default, task, NULL );
20832         if( status ) return errno;
20833
20834         /* give thread a chance to complete */
20835         /* it should remain joinable and hence detachable */
20836         sleep( 1 );
20837
20838         status = pthread_detach( &t );
20839         if( status ) return errno;
20840 #endif
20841
20842 #ifdef HAVE_LINUX_THREADS
20843         pthread_kill_other_threads_np();
20844 #endif
20845
20846         return 0;
20847
20848   ;
20849   return 0;
20850 }
20851 _ACEOF
20852 rm -f conftest.$ac_objext conftest$ac_exeext
20853 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20854   (eval $ac_link) 2>conftest.er1
20855   ac_status=$?
20856   grep -v '^ *+' conftest.er1 >conftest.err
20857   rm -f conftest.er1
20858   cat conftest.err >&5
20859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20860   (exit $ac_status); } &&
20861          { ac_try='test -z "$ac_c_werror_flag"
20862                          || test ! -s conftest.err'
20863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20864   (eval $ac_try) 2>&5
20865   ac_status=$?
20866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20867   (exit $ac_status); }; } &&
20868          { ac_try='test -s conftest$ac_exeext'
20869   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20870   (eval $ac_try) 2>&5
20871   ac_status=$?
20872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20873   (exit $ac_status); }; }; then
20874   ol_cv_pthread_pthread=yes
20875 else
20876   echo "$as_me: failed program was:" >&5
20877 sed 's/^/| /' conftest.$ac_ext >&5
20878
20879 ol_cv_pthread_pthread=no
20880 fi
20881 rm -f conftest.err conftest.$ac_objext \
20882       conftest$ac_exeext conftest.$ac_ext
20883 else
20884   cat >conftest.$ac_ext <<_ACEOF
20885 /* confdefs.h.  */
20886 _ACEOF
20887 cat confdefs.h >>conftest.$ac_ext
20888 cat >>conftest.$ac_ext <<_ACEOF
20889 /* end confdefs.h.  */
20890
20891 /* pthread test headers */
20892 #include <pthread.h>
20893 #if HAVE_PTHREADS < 7
20894 #include <errno.h>
20895 #endif
20896 #ifndef NULL
20897 #define NULL (void*)0
20898 #endif
20899
20900 static void *task(p)
20901         void *p;
20902 {
20903         return (void *) (p == NULL);
20904 }
20905
20906
20907 int main(argc, argv)
20908         int argc;
20909         char **argv;
20910 {
20911
20912         /* pthread test function */
20913 #ifndef PTHREAD_CREATE_DETACHED
20914 #define PTHREAD_CREATE_DETACHED 1
20915 #endif
20916         pthread_t t;
20917         int status;
20918         int detach = PTHREAD_CREATE_DETACHED;
20919
20920 #if HAVE_PTHREADS > 4
20921         /* Final pthreads */
20922         pthread_attr_t attr;
20923
20924         status = pthread_attr_init(&attr);
20925         if( status ) return status;
20926
20927 #if HAVE_PTHREADS < 7
20928         status = pthread_attr_setdetachstate(&attr, &detach);
20929         if( status < 0 ) status = errno;
20930 #else
20931         status = pthread_attr_setdetachstate(&attr, detach);
20932 #endif
20933         if( status ) return status;
20934         status = pthread_create( &t, &attr, task, NULL );
20935 #if HAVE_PTHREADS < 7
20936         if( status < 0 ) status = errno;
20937 #endif
20938         if( status ) return status;
20939 #else
20940         /* Draft 4 pthreads */
20941         status = pthread_create( &t, pthread_attr_default, task, NULL );
20942         if( status ) return errno;
20943
20944         /* give thread a chance to complete */
20945         /* it should remain joinable and hence detachable */
20946         sleep( 1 );
20947
20948         status = pthread_detach( &t );
20949         if( status ) return errno;
20950 #endif
20951
20952 #ifdef HAVE_LINUX_THREADS
20953         pthread_kill_other_threads_np();
20954 #endif
20955
20956         return 0;
20957
20958 }
20959
20960 _ACEOF
20961 rm -f conftest$ac_exeext
20962 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20963   (eval $ac_link) 2>&5
20964   ac_status=$?
20965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20966   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20968   (eval $ac_try) 2>&5
20969   ac_status=$?
20970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20971   (exit $ac_status); }; }; then
20972   ol_cv_pthread_pthread=yes
20973 else
20974   echo "$as_me: program exited with status $ac_status" >&5
20975 echo "$as_me: failed program was:" >&5
20976 sed 's/^/| /' conftest.$ac_ext >&5
20977
20978 ( exit $ac_status )
20979 ol_cv_pthread_pthread=no
20980 fi
20981 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20982 fi
20983
20984                 # restore the LIBS
20985                 LIBS="$ol_LIBS"
20986
20987 fi
20988 echo "$as_me:$LINENO: result: $ol_cv_pthread_pthread" >&5
20989 echo "${ECHO_T}$ol_cv_pthread_pthread" >&6
20990
20991         if test $ol_cv_pthread_pthread = yes ; then
20992                 ol_link_pthreads="-pthread"
20993                 ol_link_threads=posix
20994         fi
20995 fi
20996
20997                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
20998 if test "$ol_link_threads" = no ; then
20999         # try -pthreads
21000         echo "$as_me:$LINENO: checking for pthread link with -pthreads" >&5
21001 echo $ECHO_N "checking for pthread link with -pthreads... $ECHO_C" >&6
21002 if test "${ol_cv_pthread_pthreads+set}" = set; then
21003   echo $ECHO_N "(cached) $ECHO_C" >&6
21004 else
21005
21006                 # save the flags
21007                 ol_LIBS="$LIBS"
21008                 LIBS="-pthreads $LIBS"
21009
21010                 if test "$cross_compiling" = yes; then
21011   cat >conftest.$ac_ext <<_ACEOF
21012 /* confdefs.h.  */
21013 _ACEOF
21014 cat confdefs.h >>conftest.$ac_ext
21015 cat >>conftest.$ac_ext <<_ACEOF
21016 /* end confdefs.h.  */
21017
21018 /* pthread test headers */
21019 #include <pthread.h>
21020 #if HAVE_PTHREADS < 7
21021 #include <errno.h>
21022 #endif
21023 #ifndef NULL
21024 #define NULL (void*)0
21025 #endif
21026
21027 static void *task(p)
21028         void *p;
21029 {
21030         return (void *) (p == NULL);
21031 }
21032
21033 int
21034 main ()
21035 {
21036
21037         /* pthread test function */
21038 #ifndef PTHREAD_CREATE_DETACHED
21039 #define PTHREAD_CREATE_DETACHED 1
21040 #endif
21041         pthread_t t;
21042         int status;
21043         int detach = PTHREAD_CREATE_DETACHED;
21044
21045 #if HAVE_PTHREADS > 4
21046         /* Final pthreads */
21047         pthread_attr_t attr;
21048
21049         status = pthread_attr_init(&attr);
21050         if( status ) return status;
21051
21052 #if HAVE_PTHREADS < 7
21053         status = pthread_attr_setdetachstate(&attr, &detach);
21054         if( status < 0 ) status = errno;
21055 #else
21056         status = pthread_attr_setdetachstate(&attr, detach);
21057 #endif
21058         if( status ) return status;
21059         status = pthread_create( &t, &attr, task, NULL );
21060 #if HAVE_PTHREADS < 7
21061         if( status < 0 ) status = errno;
21062 #endif
21063         if( status ) return status;
21064 #else
21065         /* Draft 4 pthreads */
21066         status = pthread_create( &t, pthread_attr_default, task, NULL );
21067         if( status ) return errno;
21068
21069         /* give thread a chance to complete */
21070         /* it should remain joinable and hence detachable */
21071         sleep( 1 );
21072
21073         status = pthread_detach( &t );
21074         if( status ) return errno;
21075 #endif
21076
21077 #ifdef HAVE_LINUX_THREADS
21078         pthread_kill_other_threads_np();
21079 #endif
21080
21081         return 0;
21082
21083   ;
21084   return 0;
21085 }
21086 _ACEOF
21087 rm -f conftest.$ac_objext conftest$ac_exeext
21088 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21089   (eval $ac_link) 2>conftest.er1
21090   ac_status=$?
21091   grep -v '^ *+' conftest.er1 >conftest.err
21092   rm -f conftest.er1
21093   cat conftest.err >&5
21094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21095   (exit $ac_status); } &&
21096          { ac_try='test -z "$ac_c_werror_flag"
21097                          || test ! -s conftest.err'
21098   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21099   (eval $ac_try) 2>&5
21100   ac_status=$?
21101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21102   (exit $ac_status); }; } &&
21103          { ac_try='test -s conftest$ac_exeext'
21104   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21105   (eval $ac_try) 2>&5
21106   ac_status=$?
21107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21108   (exit $ac_status); }; }; then
21109   ol_cv_pthread_pthreads=yes
21110 else
21111   echo "$as_me: failed program was:" >&5
21112 sed 's/^/| /' conftest.$ac_ext >&5
21113
21114 ol_cv_pthread_pthreads=no
21115 fi
21116 rm -f conftest.err conftest.$ac_objext \
21117       conftest$ac_exeext conftest.$ac_ext
21118 else
21119   cat >conftest.$ac_ext <<_ACEOF
21120 /* confdefs.h.  */
21121 _ACEOF
21122 cat confdefs.h >>conftest.$ac_ext
21123 cat >>conftest.$ac_ext <<_ACEOF
21124 /* end confdefs.h.  */
21125
21126 /* pthread test headers */
21127 #include <pthread.h>
21128 #if HAVE_PTHREADS < 7
21129 #include <errno.h>
21130 #endif
21131 #ifndef NULL
21132 #define NULL (void*)0
21133 #endif
21134
21135 static void *task(p)
21136         void *p;
21137 {
21138         return (void *) (p == NULL);
21139 }
21140
21141
21142 int main(argc, argv)
21143         int argc;
21144         char **argv;
21145 {
21146
21147         /* pthread test function */
21148 #ifndef PTHREAD_CREATE_DETACHED
21149 #define PTHREAD_CREATE_DETACHED 1
21150 #endif
21151         pthread_t t;
21152         int status;
21153         int detach = PTHREAD_CREATE_DETACHED;
21154
21155 #if HAVE_PTHREADS > 4
21156         /* Final pthreads */
21157         pthread_attr_t attr;
21158
21159         status = pthread_attr_init(&attr);
21160         if( status ) return status;
21161
21162 #if HAVE_PTHREADS < 7
21163         status = pthread_attr_setdetachstate(&attr, &detach);
21164         if( status < 0 ) status = errno;
21165 #else
21166         status = pthread_attr_setdetachstate(&attr, detach);
21167 #endif
21168         if( status ) return status;
21169         status = pthread_create( &t, &attr, task, NULL );
21170 #if HAVE_PTHREADS < 7
21171         if( status < 0 ) status = errno;
21172 #endif
21173         if( status ) return status;
21174 #else
21175         /* Draft 4 pthreads */
21176         status = pthread_create( &t, pthread_attr_default, task, NULL );
21177         if( status ) return errno;
21178
21179         /* give thread a chance to complete */
21180         /* it should remain joinable and hence detachable */
21181         sleep( 1 );
21182
21183         status = pthread_detach( &t );
21184         if( status ) return errno;
21185 #endif
21186
21187 #ifdef HAVE_LINUX_THREADS
21188         pthread_kill_other_threads_np();
21189 #endif
21190
21191         return 0;
21192
21193 }
21194
21195 _ACEOF
21196 rm -f conftest$ac_exeext
21197 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21198   (eval $ac_link) 2>&5
21199   ac_status=$?
21200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21201   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21202   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21203   (eval $ac_try) 2>&5
21204   ac_status=$?
21205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21206   (exit $ac_status); }; }; then
21207   ol_cv_pthread_pthreads=yes
21208 else
21209   echo "$as_me: program exited with status $ac_status" >&5
21210 echo "$as_me: failed program was:" >&5
21211 sed 's/^/| /' conftest.$ac_ext >&5
21212
21213 ( exit $ac_status )
21214 ol_cv_pthread_pthreads=no
21215 fi
21216 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21217 fi
21218
21219                 # restore the LIBS
21220                 LIBS="$ol_LIBS"
21221
21222 fi
21223 echo "$as_me:$LINENO: result: $ol_cv_pthread_pthreads" >&5
21224 echo "${ECHO_T}$ol_cv_pthread_pthreads" >&6
21225
21226         if test $ol_cv_pthread_pthreads = yes ; then
21227                 ol_link_pthreads="-pthreads"
21228                 ol_link_threads=posix
21229         fi
21230 fi
21231
21232                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
21233 if test "$ol_link_threads" = no ; then
21234         # try -mthreads
21235         echo "$as_me:$LINENO: checking for pthread link with -mthreads" >&5
21236 echo $ECHO_N "checking for pthread link with -mthreads... $ECHO_C" >&6
21237 if test "${ol_cv_pthread_mthreads+set}" = set; then
21238   echo $ECHO_N "(cached) $ECHO_C" >&6
21239 else
21240
21241                 # save the flags
21242                 ol_LIBS="$LIBS"
21243                 LIBS="-mthreads $LIBS"
21244
21245                 if test "$cross_compiling" = yes; then
21246   cat >conftest.$ac_ext <<_ACEOF
21247 /* confdefs.h.  */
21248 _ACEOF
21249 cat confdefs.h >>conftest.$ac_ext
21250 cat >>conftest.$ac_ext <<_ACEOF
21251 /* end confdefs.h.  */
21252
21253 /* pthread test headers */
21254 #include <pthread.h>
21255 #if HAVE_PTHREADS < 7
21256 #include <errno.h>
21257 #endif
21258 #ifndef NULL
21259 #define NULL (void*)0
21260 #endif
21261
21262 static void *task(p)
21263         void *p;
21264 {
21265         return (void *) (p == NULL);
21266 }
21267
21268 int
21269 main ()
21270 {
21271
21272         /* pthread test function */
21273 #ifndef PTHREAD_CREATE_DETACHED
21274 #define PTHREAD_CREATE_DETACHED 1
21275 #endif
21276         pthread_t t;
21277         int status;
21278         int detach = PTHREAD_CREATE_DETACHED;
21279
21280 #if HAVE_PTHREADS > 4
21281         /* Final pthreads */
21282         pthread_attr_t attr;
21283
21284         status = pthread_attr_init(&attr);
21285         if( status ) return status;
21286
21287 #if HAVE_PTHREADS < 7
21288         status = pthread_attr_setdetachstate(&attr, &detach);
21289         if( status < 0 ) status = errno;
21290 #else
21291         status = pthread_attr_setdetachstate(&attr, detach);
21292 #endif
21293         if( status ) return status;
21294         status = pthread_create( &t, &attr, task, NULL );
21295 #if HAVE_PTHREADS < 7
21296         if( status < 0 ) status = errno;
21297 #endif
21298         if( status ) return status;
21299 #else
21300         /* Draft 4 pthreads */
21301         status = pthread_create( &t, pthread_attr_default, task, NULL );
21302         if( status ) return errno;
21303
21304         /* give thread a chance to complete */
21305         /* it should remain joinable and hence detachable */
21306         sleep( 1 );
21307
21308         status = pthread_detach( &t );
21309         if( status ) return errno;
21310 #endif
21311
21312 #ifdef HAVE_LINUX_THREADS
21313         pthread_kill_other_threads_np();
21314 #endif
21315
21316         return 0;
21317
21318   ;
21319   return 0;
21320 }
21321 _ACEOF
21322 rm -f conftest.$ac_objext conftest$ac_exeext
21323 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21324   (eval $ac_link) 2>conftest.er1
21325   ac_status=$?
21326   grep -v '^ *+' conftest.er1 >conftest.err
21327   rm -f conftest.er1
21328   cat conftest.err >&5
21329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21330   (exit $ac_status); } &&
21331          { ac_try='test -z "$ac_c_werror_flag"
21332                          || test ! -s conftest.err'
21333   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21334   (eval $ac_try) 2>&5
21335   ac_status=$?
21336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21337   (exit $ac_status); }; } &&
21338          { ac_try='test -s conftest$ac_exeext'
21339   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21340   (eval $ac_try) 2>&5
21341   ac_status=$?
21342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21343   (exit $ac_status); }; }; then
21344   ol_cv_pthread_mthreads=yes
21345 else
21346   echo "$as_me: failed program was:" >&5
21347 sed 's/^/| /' conftest.$ac_ext >&5
21348
21349 ol_cv_pthread_mthreads=no
21350 fi
21351 rm -f conftest.err conftest.$ac_objext \
21352       conftest$ac_exeext conftest.$ac_ext
21353 else
21354   cat >conftest.$ac_ext <<_ACEOF
21355 /* confdefs.h.  */
21356 _ACEOF
21357 cat confdefs.h >>conftest.$ac_ext
21358 cat >>conftest.$ac_ext <<_ACEOF
21359 /* end confdefs.h.  */
21360
21361 /* pthread test headers */
21362 #include <pthread.h>
21363 #if HAVE_PTHREADS < 7
21364 #include <errno.h>
21365 #endif
21366 #ifndef NULL
21367 #define NULL (void*)0
21368 #endif
21369
21370 static void *task(p)
21371         void *p;
21372 {
21373         return (void *) (p == NULL);
21374 }
21375
21376
21377 int main(argc, argv)
21378         int argc;
21379         char **argv;
21380 {
21381
21382         /* pthread test function */
21383 #ifndef PTHREAD_CREATE_DETACHED
21384 #define PTHREAD_CREATE_DETACHED 1
21385 #endif
21386         pthread_t t;
21387         int status;
21388         int detach = PTHREAD_CREATE_DETACHED;
21389
21390 #if HAVE_PTHREADS > 4
21391         /* Final pthreads */
21392         pthread_attr_t attr;
21393
21394         status = pthread_attr_init(&attr);
21395         if( status ) return status;
21396
21397 #if HAVE_PTHREADS < 7
21398         status = pthread_attr_setdetachstate(&attr, &detach);
21399         if( status < 0 ) status = errno;
21400 #else
21401         status = pthread_attr_setdetachstate(&attr, detach);
21402 #endif
21403         if( status ) return status;
21404         status = pthread_create( &t, &attr, task, NULL );
21405 #if HAVE_PTHREADS < 7
21406         if( status < 0 ) status = errno;
21407 #endif
21408         if( status ) return status;
21409 #else
21410         /* Draft 4 pthreads */
21411         status = pthread_create( &t, pthread_attr_default, task, NULL );
21412         if( status ) return errno;
21413
21414         /* give thread a chance to complete */
21415         /* it should remain joinable and hence detachable */
21416         sleep( 1 );
21417
21418         status = pthread_detach( &t );
21419         if( status ) return errno;
21420 #endif
21421
21422 #ifdef HAVE_LINUX_THREADS
21423         pthread_kill_other_threads_np();
21424 #endif
21425
21426         return 0;
21427
21428 }
21429
21430 _ACEOF
21431 rm -f conftest$ac_exeext
21432 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21433   (eval $ac_link) 2>&5
21434   ac_status=$?
21435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21436   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21438   (eval $ac_try) 2>&5
21439   ac_status=$?
21440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21441   (exit $ac_status); }; }; then
21442   ol_cv_pthread_mthreads=yes
21443 else
21444   echo "$as_me: program exited with status $ac_status" >&5
21445 echo "$as_me: failed program was:" >&5
21446 sed 's/^/| /' conftest.$ac_ext >&5
21447
21448 ( exit $ac_status )
21449 ol_cv_pthread_mthreads=no
21450 fi
21451 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21452 fi
21453
21454                 # restore the LIBS
21455                 LIBS="$ol_LIBS"
21456
21457 fi
21458 echo "$as_me:$LINENO: result: $ol_cv_pthread_mthreads" >&5
21459 echo "${ECHO_T}$ol_cv_pthread_mthreads" >&6
21460
21461         if test $ol_cv_pthread_mthreads = yes ; then
21462                 ol_link_pthreads="-mthreads"
21463                 ol_link_threads=posix
21464         fi
21465 fi
21466
21467                 # Pthread try link: -thread (ol_cv_pthread_thread)
21468 if test "$ol_link_threads" = no ; then
21469         # try -thread
21470         echo "$as_me:$LINENO: checking for pthread link with -thread" >&5
21471 echo $ECHO_N "checking for pthread link with -thread... $ECHO_C" >&6
21472 if test "${ol_cv_pthread_thread+set}" = set; then
21473   echo $ECHO_N "(cached) $ECHO_C" >&6
21474 else
21475
21476                 # save the flags
21477                 ol_LIBS="$LIBS"
21478                 LIBS="-thread $LIBS"
21479
21480                 if test "$cross_compiling" = yes; then
21481   cat >conftest.$ac_ext <<_ACEOF
21482 /* confdefs.h.  */
21483 _ACEOF
21484 cat confdefs.h >>conftest.$ac_ext
21485 cat >>conftest.$ac_ext <<_ACEOF
21486 /* end confdefs.h.  */
21487
21488 /* pthread test headers */
21489 #include <pthread.h>
21490 #if HAVE_PTHREADS < 7
21491 #include <errno.h>
21492 #endif
21493 #ifndef NULL
21494 #define NULL (void*)0
21495 #endif
21496
21497 static void *task(p)
21498         void *p;
21499 {
21500         return (void *) (p == NULL);
21501 }
21502
21503 int
21504 main ()
21505 {
21506
21507         /* pthread test function */
21508 #ifndef PTHREAD_CREATE_DETACHED
21509 #define PTHREAD_CREATE_DETACHED 1
21510 #endif
21511         pthread_t t;
21512         int status;
21513         int detach = PTHREAD_CREATE_DETACHED;
21514
21515 #if HAVE_PTHREADS > 4
21516         /* Final pthreads */
21517         pthread_attr_t attr;
21518
21519         status = pthread_attr_init(&attr);
21520         if( status ) return status;
21521
21522 #if HAVE_PTHREADS < 7
21523         status = pthread_attr_setdetachstate(&attr, &detach);
21524         if( status < 0 ) status = errno;
21525 #else
21526         status = pthread_attr_setdetachstate(&attr, detach);
21527 #endif
21528         if( status ) return status;
21529         status = pthread_create( &t, &attr, task, NULL );
21530 #if HAVE_PTHREADS < 7
21531         if( status < 0 ) status = errno;
21532 #endif
21533         if( status ) return status;
21534 #else
21535         /* Draft 4 pthreads */
21536         status = pthread_create( &t, pthread_attr_default, task, NULL );
21537         if( status ) return errno;
21538
21539         /* give thread a chance to complete */
21540         /* it should remain joinable and hence detachable */
21541         sleep( 1 );
21542
21543         status = pthread_detach( &t );
21544         if( status ) return errno;
21545 #endif
21546
21547 #ifdef HAVE_LINUX_THREADS
21548         pthread_kill_other_threads_np();
21549 #endif
21550
21551         return 0;
21552
21553   ;
21554   return 0;
21555 }
21556 _ACEOF
21557 rm -f conftest.$ac_objext conftest$ac_exeext
21558 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21559   (eval $ac_link) 2>conftest.er1
21560   ac_status=$?
21561   grep -v '^ *+' conftest.er1 >conftest.err
21562   rm -f conftest.er1
21563   cat conftest.err >&5
21564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21565   (exit $ac_status); } &&
21566          { ac_try='test -z "$ac_c_werror_flag"
21567                          || test ! -s conftest.err'
21568   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21569   (eval $ac_try) 2>&5
21570   ac_status=$?
21571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21572   (exit $ac_status); }; } &&
21573          { ac_try='test -s conftest$ac_exeext'
21574   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21575   (eval $ac_try) 2>&5
21576   ac_status=$?
21577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21578   (exit $ac_status); }; }; then
21579   ol_cv_pthread_thread=yes
21580 else
21581   echo "$as_me: failed program was:" >&5
21582 sed 's/^/| /' conftest.$ac_ext >&5
21583
21584 ol_cv_pthread_thread=no
21585 fi
21586 rm -f conftest.err conftest.$ac_objext \
21587       conftest$ac_exeext conftest.$ac_ext
21588 else
21589   cat >conftest.$ac_ext <<_ACEOF
21590 /* confdefs.h.  */
21591 _ACEOF
21592 cat confdefs.h >>conftest.$ac_ext
21593 cat >>conftest.$ac_ext <<_ACEOF
21594 /* end confdefs.h.  */
21595
21596 /* pthread test headers */
21597 #include <pthread.h>
21598 #if HAVE_PTHREADS < 7
21599 #include <errno.h>
21600 #endif
21601 #ifndef NULL
21602 #define NULL (void*)0
21603 #endif
21604
21605 static void *task(p)
21606         void *p;
21607 {
21608         return (void *) (p == NULL);
21609 }
21610
21611
21612 int main(argc, argv)
21613         int argc;
21614         char **argv;
21615 {
21616
21617         /* pthread test function */
21618 #ifndef PTHREAD_CREATE_DETACHED
21619 #define PTHREAD_CREATE_DETACHED 1
21620 #endif
21621         pthread_t t;
21622         int status;
21623         int detach = PTHREAD_CREATE_DETACHED;
21624
21625 #if HAVE_PTHREADS > 4
21626         /* Final pthreads */
21627         pthread_attr_t attr;
21628
21629         status = pthread_attr_init(&attr);
21630         if( status ) return status;
21631
21632 #if HAVE_PTHREADS < 7
21633         status = pthread_attr_setdetachstate(&attr, &detach);
21634         if( status < 0 ) status = errno;
21635 #else
21636         status = pthread_attr_setdetachstate(&attr, detach);
21637 #endif
21638         if( status ) return status;
21639         status = pthread_create( &t, &attr, task, NULL );
21640 #if HAVE_PTHREADS < 7
21641         if( status < 0 ) status = errno;
21642 #endif
21643         if( status ) return status;
21644 #else
21645         /* Draft 4 pthreads */
21646         status = pthread_create( &t, pthread_attr_default, task, NULL );
21647         if( status ) return errno;
21648
21649         /* give thread a chance to complete */
21650         /* it should remain joinable and hence detachable */
21651         sleep( 1 );
21652
21653         status = pthread_detach( &t );
21654         if( status ) return errno;
21655 #endif
21656
21657 #ifdef HAVE_LINUX_THREADS
21658         pthread_kill_other_threads_np();
21659 #endif
21660
21661         return 0;
21662
21663 }
21664
21665 _ACEOF
21666 rm -f conftest$ac_exeext
21667 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21668   (eval $ac_link) 2>&5
21669   ac_status=$?
21670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21671   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21672   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21673   (eval $ac_try) 2>&5
21674   ac_status=$?
21675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21676   (exit $ac_status); }; }; then
21677   ol_cv_pthread_thread=yes
21678 else
21679   echo "$as_me: program exited with status $ac_status" >&5
21680 echo "$as_me: failed program was:" >&5
21681 sed 's/^/| /' conftest.$ac_ext >&5
21682
21683 ( exit $ac_status )
21684 ol_cv_pthread_thread=no
21685 fi
21686 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21687 fi
21688
21689                 # restore the LIBS
21690                 LIBS="$ol_LIBS"
21691
21692 fi
21693 echo "$as_me:$LINENO: result: $ol_cv_pthread_thread" >&5
21694 echo "${ECHO_T}$ol_cv_pthread_thread" >&6
21695
21696         if test $ol_cv_pthread_thread = yes ; then
21697                 ol_link_pthreads="-thread"
21698                 ol_link_threads=posix
21699         fi
21700 fi
21701
21702
21703                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
21704 if test "$ol_link_threads" = no ; then
21705         # try -lpthread -lmach -lexc -lc_r
21706         echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
21707 echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc -lc_r... $ECHO_C" >&6
21708 if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then
21709   echo $ECHO_N "(cached) $ECHO_C" >&6
21710 else
21711
21712                 # save the flags
21713                 ol_LIBS="$LIBS"
21714                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
21715
21716                 if test "$cross_compiling" = yes; then
21717   cat >conftest.$ac_ext <<_ACEOF
21718 /* confdefs.h.  */
21719 _ACEOF
21720 cat confdefs.h >>conftest.$ac_ext
21721 cat >>conftest.$ac_ext <<_ACEOF
21722 /* end confdefs.h.  */
21723
21724 /* pthread test headers */
21725 #include <pthread.h>
21726 #if HAVE_PTHREADS < 7
21727 #include <errno.h>
21728 #endif
21729 #ifndef NULL
21730 #define NULL (void*)0
21731 #endif
21732
21733 static void *task(p)
21734         void *p;
21735 {
21736         return (void *) (p == NULL);
21737 }
21738
21739 int
21740 main ()
21741 {
21742
21743         /* pthread test function */
21744 #ifndef PTHREAD_CREATE_DETACHED
21745 #define PTHREAD_CREATE_DETACHED 1
21746 #endif
21747         pthread_t t;
21748         int status;
21749         int detach = PTHREAD_CREATE_DETACHED;
21750
21751 #if HAVE_PTHREADS > 4
21752         /* Final pthreads */
21753         pthread_attr_t attr;
21754
21755         status = pthread_attr_init(&attr);
21756         if( status ) return status;
21757
21758 #if HAVE_PTHREADS < 7
21759         status = pthread_attr_setdetachstate(&attr, &detach);
21760         if( status < 0 ) status = errno;
21761 #else
21762         status = pthread_attr_setdetachstate(&attr, detach);
21763 #endif
21764         if( status ) return status;
21765         status = pthread_create( &t, &attr, task, NULL );
21766 #if HAVE_PTHREADS < 7
21767         if( status < 0 ) status = errno;
21768 #endif
21769         if( status ) return status;
21770 #else
21771         /* Draft 4 pthreads */
21772         status = pthread_create( &t, pthread_attr_default, task, NULL );
21773         if( status ) return errno;
21774
21775         /* give thread a chance to complete */
21776         /* it should remain joinable and hence detachable */
21777         sleep( 1 );
21778
21779         status = pthread_detach( &t );
21780         if( status ) return errno;
21781 #endif
21782
21783 #ifdef HAVE_LINUX_THREADS
21784         pthread_kill_other_threads_np();
21785 #endif
21786
21787         return 0;
21788
21789   ;
21790   return 0;
21791 }
21792 _ACEOF
21793 rm -f conftest.$ac_objext conftest$ac_exeext
21794 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21795   (eval $ac_link) 2>conftest.er1
21796   ac_status=$?
21797   grep -v '^ *+' conftest.er1 >conftest.err
21798   rm -f conftest.er1
21799   cat conftest.err >&5
21800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21801   (exit $ac_status); } &&
21802          { ac_try='test -z "$ac_c_werror_flag"
21803                          || test ! -s conftest.err'
21804   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21805   (eval $ac_try) 2>&5
21806   ac_status=$?
21807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21808   (exit $ac_status); }; } &&
21809          { ac_try='test -s conftest$ac_exeext'
21810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21811   (eval $ac_try) 2>&5
21812   ac_status=$?
21813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21814   (exit $ac_status); }; }; then
21815   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
21816 else
21817   echo "$as_me: failed program was:" >&5
21818 sed 's/^/| /' conftest.$ac_ext >&5
21819
21820 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
21821 fi
21822 rm -f conftest.err conftest.$ac_objext \
21823       conftest$ac_exeext conftest.$ac_ext
21824 else
21825   cat >conftest.$ac_ext <<_ACEOF
21826 /* confdefs.h.  */
21827 _ACEOF
21828 cat confdefs.h >>conftest.$ac_ext
21829 cat >>conftest.$ac_ext <<_ACEOF
21830 /* end confdefs.h.  */
21831
21832 /* pthread test headers */
21833 #include <pthread.h>
21834 #if HAVE_PTHREADS < 7
21835 #include <errno.h>
21836 #endif
21837 #ifndef NULL
21838 #define NULL (void*)0
21839 #endif
21840
21841 static void *task(p)
21842         void *p;
21843 {
21844         return (void *) (p == NULL);
21845 }
21846
21847
21848 int main(argc, argv)
21849         int argc;
21850         char **argv;
21851 {
21852
21853         /* pthread test function */
21854 #ifndef PTHREAD_CREATE_DETACHED
21855 #define PTHREAD_CREATE_DETACHED 1
21856 #endif
21857         pthread_t t;
21858         int status;
21859         int detach = PTHREAD_CREATE_DETACHED;
21860
21861 #if HAVE_PTHREADS > 4
21862         /* Final pthreads */
21863         pthread_attr_t attr;
21864
21865         status = pthread_attr_init(&attr);
21866         if( status ) return status;
21867
21868 #if HAVE_PTHREADS < 7
21869         status = pthread_attr_setdetachstate(&attr, &detach);
21870         if( status < 0 ) status = errno;
21871 #else
21872         status = pthread_attr_setdetachstate(&attr, detach);
21873 #endif
21874         if( status ) return status;
21875         status = pthread_create( &t, &attr, task, NULL );
21876 #if HAVE_PTHREADS < 7
21877         if( status < 0 ) status = errno;
21878 #endif
21879         if( status ) return status;
21880 #else
21881         /* Draft 4 pthreads */
21882         status = pthread_create( &t, pthread_attr_default, task, NULL );
21883         if( status ) return errno;
21884
21885         /* give thread a chance to complete */
21886         /* it should remain joinable and hence detachable */
21887         sleep( 1 );
21888
21889         status = pthread_detach( &t );
21890         if( status ) return errno;
21891 #endif
21892
21893 #ifdef HAVE_LINUX_THREADS
21894         pthread_kill_other_threads_np();
21895 #endif
21896
21897         return 0;
21898
21899 }
21900
21901 _ACEOF
21902 rm -f conftest$ac_exeext
21903 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21904   (eval $ac_link) 2>&5
21905   ac_status=$?
21906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21907   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21908   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21909   (eval $ac_try) 2>&5
21910   ac_status=$?
21911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21912   (exit $ac_status); }; }; then
21913   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
21914 else
21915   echo "$as_me: program exited with status $ac_status" >&5
21916 echo "$as_me: failed program was:" >&5
21917 sed 's/^/| /' conftest.$ac_ext >&5
21918
21919 ( exit $ac_status )
21920 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
21921 fi
21922 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21923 fi
21924
21925                 # restore the LIBS
21926                 LIBS="$ol_LIBS"
21927
21928 fi
21929 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
21930 echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6
21931
21932         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
21933                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
21934                 ol_link_threads=posix
21935         fi
21936 fi
21937
21938                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
21939 if test "$ol_link_threads" = no ; then
21940         # try -lpthread -lmach -lexc
21941         echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc" >&5
21942 echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc... $ECHO_C" >&6
21943 if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then
21944   echo $ECHO_N "(cached) $ECHO_C" >&6
21945 else
21946
21947                 # save the flags
21948                 ol_LIBS="$LIBS"
21949                 LIBS="-lpthread -lmach -lexc $LIBS"
21950
21951                 if test "$cross_compiling" = yes; then
21952   cat >conftest.$ac_ext <<_ACEOF
21953 /* confdefs.h.  */
21954 _ACEOF
21955 cat confdefs.h >>conftest.$ac_ext
21956 cat >>conftest.$ac_ext <<_ACEOF
21957 /* end confdefs.h.  */
21958
21959 /* pthread test headers */
21960 #include <pthread.h>
21961 #if HAVE_PTHREADS < 7
21962 #include <errno.h>
21963 #endif
21964 #ifndef NULL
21965 #define NULL (void*)0
21966 #endif
21967
21968 static void *task(p)
21969         void *p;
21970 {
21971         return (void *) (p == NULL);
21972 }
21973
21974 int
21975 main ()
21976 {
21977
21978         /* pthread test function */
21979 #ifndef PTHREAD_CREATE_DETACHED
21980 #define PTHREAD_CREATE_DETACHED 1
21981 #endif
21982         pthread_t t;
21983         int status;
21984         int detach = PTHREAD_CREATE_DETACHED;
21985
21986 #if HAVE_PTHREADS > 4
21987         /* Final pthreads */
21988         pthread_attr_t attr;
21989
21990         status = pthread_attr_init(&attr);
21991         if( status ) return status;
21992
21993 #if HAVE_PTHREADS < 7
21994         status = pthread_attr_setdetachstate(&attr, &detach);
21995         if( status < 0 ) status = errno;
21996 #else
21997         status = pthread_attr_setdetachstate(&attr, detach);
21998 #endif
21999         if( status ) return status;
22000         status = pthread_create( &t, &attr, task, NULL );
22001 #if HAVE_PTHREADS < 7
22002         if( status < 0 ) status = errno;
22003 #endif
22004         if( status ) return status;
22005 #else
22006         /* Draft 4 pthreads */
22007         status = pthread_create( &t, pthread_attr_default, task, NULL );
22008         if( status ) return errno;
22009
22010         /* give thread a chance to complete */
22011         /* it should remain joinable and hence detachable */
22012         sleep( 1 );
22013
22014         status = pthread_detach( &t );
22015         if( status ) return errno;
22016 #endif
22017
22018 #ifdef HAVE_LINUX_THREADS
22019         pthread_kill_other_threads_np();
22020 #endif
22021
22022         return 0;
22023
22024   ;
22025   return 0;
22026 }
22027 _ACEOF
22028 rm -f conftest.$ac_objext conftest$ac_exeext
22029 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22030   (eval $ac_link) 2>conftest.er1
22031   ac_status=$?
22032   grep -v '^ *+' conftest.er1 >conftest.err
22033   rm -f conftest.er1
22034   cat conftest.err >&5
22035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22036   (exit $ac_status); } &&
22037          { ac_try='test -z "$ac_c_werror_flag"
22038                          || test ! -s conftest.err'
22039   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22040   (eval $ac_try) 2>&5
22041   ac_status=$?
22042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22043   (exit $ac_status); }; } &&
22044          { ac_try='test -s conftest$ac_exeext'
22045   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22046   (eval $ac_try) 2>&5
22047   ac_status=$?
22048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22049   (exit $ac_status); }; }; then
22050   ol_cv_pthread_lpthread_lmach_lexc=yes
22051 else
22052   echo "$as_me: failed program was:" >&5
22053 sed 's/^/| /' conftest.$ac_ext >&5
22054
22055 ol_cv_pthread_lpthread_lmach_lexc=no
22056 fi
22057 rm -f conftest.err conftest.$ac_objext \
22058       conftest$ac_exeext conftest.$ac_ext
22059 else
22060   cat >conftest.$ac_ext <<_ACEOF
22061 /* confdefs.h.  */
22062 _ACEOF
22063 cat confdefs.h >>conftest.$ac_ext
22064 cat >>conftest.$ac_ext <<_ACEOF
22065 /* end confdefs.h.  */
22066
22067 /* pthread test headers */
22068 #include <pthread.h>
22069 #if HAVE_PTHREADS < 7
22070 #include <errno.h>
22071 #endif
22072 #ifndef NULL
22073 #define NULL (void*)0
22074 #endif
22075
22076 static void *task(p)
22077         void *p;
22078 {
22079         return (void *) (p == NULL);
22080 }
22081
22082
22083 int main(argc, argv)
22084         int argc;
22085         char **argv;
22086 {
22087
22088         /* pthread test function */
22089 #ifndef PTHREAD_CREATE_DETACHED
22090 #define PTHREAD_CREATE_DETACHED 1
22091 #endif
22092         pthread_t t;
22093         int status;
22094         int detach = PTHREAD_CREATE_DETACHED;
22095
22096 #if HAVE_PTHREADS > 4
22097         /* Final pthreads */
22098         pthread_attr_t attr;
22099
22100         status = pthread_attr_init(&attr);
22101         if( status ) return status;
22102
22103 #if HAVE_PTHREADS < 7
22104         status = pthread_attr_setdetachstate(&attr, &detach);
22105         if( status < 0 ) status = errno;
22106 #else
22107         status = pthread_attr_setdetachstate(&attr, detach);
22108 #endif
22109         if( status ) return status;
22110         status = pthread_create( &t, &attr, task, NULL );
22111 #if HAVE_PTHREADS < 7
22112         if( status < 0 ) status = errno;
22113 #endif
22114         if( status ) return status;
22115 #else
22116         /* Draft 4 pthreads */
22117         status = pthread_create( &t, pthread_attr_default, task, NULL );
22118         if( status ) return errno;
22119
22120         /* give thread a chance to complete */
22121         /* it should remain joinable and hence detachable */
22122         sleep( 1 );
22123
22124         status = pthread_detach( &t );
22125         if( status ) return errno;
22126 #endif
22127
22128 #ifdef HAVE_LINUX_THREADS
22129         pthread_kill_other_threads_np();
22130 #endif
22131
22132         return 0;
22133
22134 }
22135
22136 _ACEOF
22137 rm -f conftest$ac_exeext
22138 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22139   (eval $ac_link) 2>&5
22140   ac_status=$?
22141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22142   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22144   (eval $ac_try) 2>&5
22145   ac_status=$?
22146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22147   (exit $ac_status); }; }; then
22148   ol_cv_pthread_lpthread_lmach_lexc=yes
22149 else
22150   echo "$as_me: program exited with status $ac_status" >&5
22151 echo "$as_me: failed program was:" >&5
22152 sed 's/^/| /' conftest.$ac_ext >&5
22153
22154 ( exit $ac_status )
22155 ol_cv_pthread_lpthread_lmach_lexc=no
22156 fi
22157 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22158 fi
22159
22160                 # restore the LIBS
22161                 LIBS="$ol_LIBS"
22162
22163 fi
22164 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
22165 echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc" >&6
22166
22167         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
22168                 ol_link_pthreads="-lpthread -lmach -lexc"
22169                 ol_link_threads=posix
22170         fi
22171 fi
22172
22173
22174                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
22175 if test "$ol_link_threads" = no ; then
22176         # try -lpthread -Wl,-woff,85
22177         echo "$as_me:$LINENO: checking for pthread link with -lpthread -Wl,-woff,85" >&5
22178 echo $ECHO_N "checking for pthread link with -lpthread -Wl,-woff,85... $ECHO_C" >&6
22179 if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then
22180   echo $ECHO_N "(cached) $ECHO_C" >&6
22181 else
22182
22183                 # save the flags
22184                 ol_LIBS="$LIBS"
22185                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
22186
22187                 if test "$cross_compiling" = yes; then
22188   cat >conftest.$ac_ext <<_ACEOF
22189 /* confdefs.h.  */
22190 _ACEOF
22191 cat confdefs.h >>conftest.$ac_ext
22192 cat >>conftest.$ac_ext <<_ACEOF
22193 /* end confdefs.h.  */
22194
22195 /* pthread test headers */
22196 #include <pthread.h>
22197 #if HAVE_PTHREADS < 7
22198 #include <errno.h>
22199 #endif
22200 #ifndef NULL
22201 #define NULL (void*)0
22202 #endif
22203
22204 static void *task(p)
22205         void *p;
22206 {
22207         return (void *) (p == NULL);
22208 }
22209
22210 int
22211 main ()
22212 {
22213
22214         /* pthread test function */
22215 #ifndef PTHREAD_CREATE_DETACHED
22216 #define PTHREAD_CREATE_DETACHED 1
22217 #endif
22218         pthread_t t;
22219         int status;
22220         int detach = PTHREAD_CREATE_DETACHED;
22221
22222 #if HAVE_PTHREADS > 4
22223         /* Final pthreads */
22224         pthread_attr_t attr;
22225
22226         status = pthread_attr_init(&attr);
22227         if( status ) return status;
22228
22229 #if HAVE_PTHREADS < 7
22230         status = pthread_attr_setdetachstate(&attr, &detach);
22231         if( status < 0 ) status = errno;
22232 #else
22233         status = pthread_attr_setdetachstate(&attr, detach);
22234 #endif
22235         if( status ) return status;
22236         status = pthread_create( &t, &attr, task, NULL );
22237 #if HAVE_PTHREADS < 7
22238         if( status < 0 ) status = errno;
22239 #endif
22240         if( status ) return status;
22241 #else
22242         /* Draft 4 pthreads */
22243         status = pthread_create( &t, pthread_attr_default, task, NULL );
22244         if( status ) return errno;
22245
22246         /* give thread a chance to complete */
22247         /* it should remain joinable and hence detachable */
22248         sleep( 1 );
22249
22250         status = pthread_detach( &t );
22251         if( status ) return errno;
22252 #endif
22253
22254 #ifdef HAVE_LINUX_THREADS
22255         pthread_kill_other_threads_np();
22256 #endif
22257
22258         return 0;
22259
22260   ;
22261   return 0;
22262 }
22263 _ACEOF
22264 rm -f conftest.$ac_objext conftest$ac_exeext
22265 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22266   (eval $ac_link) 2>conftest.er1
22267   ac_status=$?
22268   grep -v '^ *+' conftest.er1 >conftest.err
22269   rm -f conftest.er1
22270   cat conftest.err >&5
22271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22272   (exit $ac_status); } &&
22273          { ac_try='test -z "$ac_c_werror_flag"
22274                          || test ! -s conftest.err'
22275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22276   (eval $ac_try) 2>&5
22277   ac_status=$?
22278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22279   (exit $ac_status); }; } &&
22280          { ac_try='test -s conftest$ac_exeext'
22281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22282   (eval $ac_try) 2>&5
22283   ac_status=$?
22284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22285   (exit $ac_status); }; }; then
22286   ol_cv_pthread_lib_lpthread_woff=yes
22287 else
22288   echo "$as_me: failed program was:" >&5
22289 sed 's/^/| /' conftest.$ac_ext >&5
22290
22291 ol_cv_pthread_lib_lpthread_woff=no
22292 fi
22293 rm -f conftest.err conftest.$ac_objext \
22294       conftest$ac_exeext conftest.$ac_ext
22295 else
22296   cat >conftest.$ac_ext <<_ACEOF
22297 /* confdefs.h.  */
22298 _ACEOF
22299 cat confdefs.h >>conftest.$ac_ext
22300 cat >>conftest.$ac_ext <<_ACEOF
22301 /* end confdefs.h.  */
22302
22303 /* pthread test headers */
22304 #include <pthread.h>
22305 #if HAVE_PTHREADS < 7
22306 #include <errno.h>
22307 #endif
22308 #ifndef NULL
22309 #define NULL (void*)0
22310 #endif
22311
22312 static void *task(p)
22313         void *p;
22314 {
22315         return (void *) (p == NULL);
22316 }
22317
22318
22319 int main(argc, argv)
22320         int argc;
22321         char **argv;
22322 {
22323
22324         /* pthread test function */
22325 #ifndef PTHREAD_CREATE_DETACHED
22326 #define PTHREAD_CREATE_DETACHED 1
22327 #endif
22328         pthread_t t;
22329         int status;
22330         int detach = PTHREAD_CREATE_DETACHED;
22331
22332 #if HAVE_PTHREADS > 4
22333         /* Final pthreads */
22334         pthread_attr_t attr;
22335
22336         status = pthread_attr_init(&attr);
22337         if( status ) return status;
22338
22339 #if HAVE_PTHREADS < 7
22340         status = pthread_attr_setdetachstate(&attr, &detach);
22341         if( status < 0 ) status = errno;
22342 #else
22343         status = pthread_attr_setdetachstate(&attr, detach);
22344 #endif
22345         if( status ) return status;
22346         status = pthread_create( &t, &attr, task, NULL );
22347 #if HAVE_PTHREADS < 7
22348         if( status < 0 ) status = errno;
22349 #endif
22350         if( status ) return status;
22351 #else
22352         /* Draft 4 pthreads */
22353         status = pthread_create( &t, pthread_attr_default, task, NULL );
22354         if( status ) return errno;
22355
22356         /* give thread a chance to complete */
22357         /* it should remain joinable and hence detachable */
22358         sleep( 1 );
22359
22360         status = pthread_detach( &t );
22361         if( status ) return errno;
22362 #endif
22363
22364 #ifdef HAVE_LINUX_THREADS
22365         pthread_kill_other_threads_np();
22366 #endif
22367
22368         return 0;
22369
22370 }
22371
22372 _ACEOF
22373 rm -f conftest$ac_exeext
22374 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22375   (eval $ac_link) 2>&5
22376   ac_status=$?
22377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22378   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22379   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22380   (eval $ac_try) 2>&5
22381   ac_status=$?
22382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22383   (exit $ac_status); }; }; then
22384   ol_cv_pthread_lib_lpthread_woff=yes
22385 else
22386   echo "$as_me: program exited with status $ac_status" >&5
22387 echo "$as_me: failed program was:" >&5
22388 sed 's/^/| /' conftest.$ac_ext >&5
22389
22390 ( exit $ac_status )
22391 ol_cv_pthread_lib_lpthread_woff=no
22392 fi
22393 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22394 fi
22395
22396                 # restore the LIBS
22397                 LIBS="$ol_LIBS"
22398
22399 fi
22400 echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthread_woff" >&5
22401 echo "${ECHO_T}$ol_cv_pthread_lib_lpthread_woff" >&6
22402
22403         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
22404                 ol_link_pthreads="-lpthread -Wl,-woff,85"
22405                 ol_link_threads=posix
22406         fi
22407 fi
22408
22409
22410                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
22411 if test "$ol_link_threads" = no ; then
22412         # try -lpthread
22413         echo "$as_me:$LINENO: checking for pthread link with -lpthread" >&5
22414 echo $ECHO_N "checking for pthread link with -lpthread... $ECHO_C" >&6
22415 if test "${ol_cv_pthread_lpthread+set}" = set; then
22416   echo $ECHO_N "(cached) $ECHO_C" >&6
22417 else
22418
22419                 # save the flags
22420                 ol_LIBS="$LIBS"
22421                 LIBS="-lpthread $LIBS"
22422
22423                 if test "$cross_compiling" = yes; then
22424   cat >conftest.$ac_ext <<_ACEOF
22425 /* confdefs.h.  */
22426 _ACEOF
22427 cat confdefs.h >>conftest.$ac_ext
22428 cat >>conftest.$ac_ext <<_ACEOF
22429 /* end confdefs.h.  */
22430
22431 /* pthread test headers */
22432 #include <pthread.h>
22433 #if HAVE_PTHREADS < 7
22434 #include <errno.h>
22435 #endif
22436 #ifndef NULL
22437 #define NULL (void*)0
22438 #endif
22439
22440 static void *task(p)
22441         void *p;
22442 {
22443         return (void *) (p == NULL);
22444 }
22445
22446 int
22447 main ()
22448 {
22449
22450         /* pthread test function */
22451 #ifndef PTHREAD_CREATE_DETACHED
22452 #define PTHREAD_CREATE_DETACHED 1
22453 #endif
22454         pthread_t t;
22455         int status;
22456         int detach = PTHREAD_CREATE_DETACHED;
22457
22458 #if HAVE_PTHREADS > 4
22459         /* Final pthreads */
22460         pthread_attr_t attr;
22461
22462         status = pthread_attr_init(&attr);
22463         if( status ) return status;
22464
22465 #if HAVE_PTHREADS < 7
22466         status = pthread_attr_setdetachstate(&attr, &detach);
22467         if( status < 0 ) status = errno;
22468 #else
22469         status = pthread_attr_setdetachstate(&attr, detach);
22470 #endif
22471         if( status ) return status;
22472         status = pthread_create( &t, &attr, task, NULL );
22473 #if HAVE_PTHREADS < 7
22474         if( status < 0 ) status = errno;
22475 #endif
22476         if( status ) return status;
22477 #else
22478         /* Draft 4 pthreads */
22479         status = pthread_create( &t, pthread_attr_default, task, NULL );
22480         if( status ) return errno;
22481
22482         /* give thread a chance to complete */
22483         /* it should remain joinable and hence detachable */
22484         sleep( 1 );
22485
22486         status = pthread_detach( &t );
22487         if( status ) return errno;
22488 #endif
22489
22490 #ifdef HAVE_LINUX_THREADS
22491         pthread_kill_other_threads_np();
22492 #endif
22493
22494         return 0;
22495
22496   ;
22497   return 0;
22498 }
22499 _ACEOF
22500 rm -f conftest.$ac_objext conftest$ac_exeext
22501 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22502   (eval $ac_link) 2>conftest.er1
22503   ac_status=$?
22504   grep -v '^ *+' conftest.er1 >conftest.err
22505   rm -f conftest.er1
22506   cat conftest.err >&5
22507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22508   (exit $ac_status); } &&
22509          { ac_try='test -z "$ac_c_werror_flag"
22510                          || test ! -s conftest.err'
22511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22512   (eval $ac_try) 2>&5
22513   ac_status=$?
22514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22515   (exit $ac_status); }; } &&
22516          { ac_try='test -s conftest$ac_exeext'
22517   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22518   (eval $ac_try) 2>&5
22519   ac_status=$?
22520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22521   (exit $ac_status); }; }; then
22522   ol_cv_pthread_lpthread=yes
22523 else
22524   echo "$as_me: failed program was:" >&5
22525 sed 's/^/| /' conftest.$ac_ext >&5
22526
22527 ol_cv_pthread_lpthread=no
22528 fi
22529 rm -f conftest.err conftest.$ac_objext \
22530       conftest$ac_exeext conftest.$ac_ext
22531 else
22532   cat >conftest.$ac_ext <<_ACEOF
22533 /* confdefs.h.  */
22534 _ACEOF
22535 cat confdefs.h >>conftest.$ac_ext
22536 cat >>conftest.$ac_ext <<_ACEOF
22537 /* end confdefs.h.  */
22538
22539 /* pthread test headers */
22540 #include <pthread.h>
22541 #if HAVE_PTHREADS < 7
22542 #include <errno.h>
22543 #endif
22544 #ifndef NULL
22545 #define NULL (void*)0
22546 #endif
22547
22548 static void *task(p)
22549         void *p;
22550 {
22551         return (void *) (p == NULL);
22552 }
22553
22554
22555 int main(argc, argv)
22556         int argc;
22557         char **argv;
22558 {
22559
22560         /* pthread test function */
22561 #ifndef PTHREAD_CREATE_DETACHED
22562 #define PTHREAD_CREATE_DETACHED 1
22563 #endif
22564         pthread_t t;
22565         int status;
22566         int detach = PTHREAD_CREATE_DETACHED;
22567
22568 #if HAVE_PTHREADS > 4
22569         /* Final pthreads */
22570         pthread_attr_t attr;
22571
22572         status = pthread_attr_init(&attr);
22573         if( status ) return status;
22574
22575 #if HAVE_PTHREADS < 7
22576         status = pthread_attr_setdetachstate(&attr, &detach);
22577         if( status < 0 ) status = errno;
22578 #else
22579         status = pthread_attr_setdetachstate(&attr, detach);
22580 #endif
22581         if( status ) return status;
22582         status = pthread_create( &t, &attr, task, NULL );
22583 #if HAVE_PTHREADS < 7
22584         if( status < 0 ) status = errno;
22585 #endif
22586         if( status ) return status;
22587 #else
22588         /* Draft 4 pthreads */
22589         status = pthread_create( &t, pthread_attr_default, task, NULL );
22590         if( status ) return errno;
22591
22592         /* give thread a chance to complete */
22593         /* it should remain joinable and hence detachable */
22594         sleep( 1 );
22595
22596         status = pthread_detach( &t );
22597         if( status ) return errno;
22598 #endif
22599
22600 #ifdef HAVE_LINUX_THREADS
22601         pthread_kill_other_threads_np();
22602 #endif
22603
22604         return 0;
22605
22606 }
22607
22608 _ACEOF
22609 rm -f conftest$ac_exeext
22610 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22611   (eval $ac_link) 2>&5
22612   ac_status=$?
22613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22614   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22615   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22616   (eval $ac_try) 2>&5
22617   ac_status=$?
22618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22619   (exit $ac_status); }; }; then
22620   ol_cv_pthread_lpthread=yes
22621 else
22622   echo "$as_me: program exited with status $ac_status" >&5
22623 echo "$as_me: failed program was:" >&5
22624 sed 's/^/| /' conftest.$ac_ext >&5
22625
22626 ( exit $ac_status )
22627 ol_cv_pthread_lpthread=no
22628 fi
22629 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22630 fi
22631
22632                 # restore the LIBS
22633                 LIBS="$ol_LIBS"
22634
22635 fi
22636 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread" >&5
22637 echo "${ECHO_T}$ol_cv_pthread_lpthread" >&6
22638
22639         if test $ol_cv_pthread_lpthread = yes ; then
22640                 ol_link_pthreads="-lpthread"
22641                 ol_link_threads=posix
22642         fi
22643 fi
22644
22645                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
22646 if test "$ol_link_threads" = no ; then
22647         # try -lc_r
22648         echo "$as_me:$LINENO: checking for pthread link with -lc_r" >&5
22649 echo $ECHO_N "checking for pthread link with -lc_r... $ECHO_C" >&6
22650 if test "${ol_cv_pthread_lc_r+set}" = set; then
22651   echo $ECHO_N "(cached) $ECHO_C" >&6
22652 else
22653
22654                 # save the flags
22655                 ol_LIBS="$LIBS"
22656                 LIBS="-lc_r $LIBS"
22657
22658                 if test "$cross_compiling" = yes; then
22659   cat >conftest.$ac_ext <<_ACEOF
22660 /* confdefs.h.  */
22661 _ACEOF
22662 cat confdefs.h >>conftest.$ac_ext
22663 cat >>conftest.$ac_ext <<_ACEOF
22664 /* end confdefs.h.  */
22665
22666 /* pthread test headers */
22667 #include <pthread.h>
22668 #if HAVE_PTHREADS < 7
22669 #include <errno.h>
22670 #endif
22671 #ifndef NULL
22672 #define NULL (void*)0
22673 #endif
22674
22675 static void *task(p)
22676         void *p;
22677 {
22678         return (void *) (p == NULL);
22679 }
22680
22681 int
22682 main ()
22683 {
22684
22685         /* pthread test function */
22686 #ifndef PTHREAD_CREATE_DETACHED
22687 #define PTHREAD_CREATE_DETACHED 1
22688 #endif
22689         pthread_t t;
22690         int status;
22691         int detach = PTHREAD_CREATE_DETACHED;
22692
22693 #if HAVE_PTHREADS > 4
22694         /* Final pthreads */
22695         pthread_attr_t attr;
22696
22697         status = pthread_attr_init(&attr);
22698         if( status ) return status;
22699
22700 #if HAVE_PTHREADS < 7
22701         status = pthread_attr_setdetachstate(&attr, &detach);
22702         if( status < 0 ) status = errno;
22703 #else
22704         status = pthread_attr_setdetachstate(&attr, detach);
22705 #endif
22706         if( status ) return status;
22707         status = pthread_create( &t, &attr, task, NULL );
22708 #if HAVE_PTHREADS < 7
22709         if( status < 0 ) status = errno;
22710 #endif
22711         if( status ) return status;
22712 #else
22713         /* Draft 4 pthreads */
22714         status = pthread_create( &t, pthread_attr_default, task, NULL );
22715         if( status ) return errno;
22716
22717         /* give thread a chance to complete */
22718         /* it should remain joinable and hence detachable */
22719         sleep( 1 );
22720
22721         status = pthread_detach( &t );
22722         if( status ) return errno;
22723 #endif
22724
22725 #ifdef HAVE_LINUX_THREADS
22726         pthread_kill_other_threads_np();
22727 #endif
22728
22729         return 0;
22730
22731   ;
22732   return 0;
22733 }
22734 _ACEOF
22735 rm -f conftest.$ac_objext conftest$ac_exeext
22736 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22737   (eval $ac_link) 2>conftest.er1
22738   ac_status=$?
22739   grep -v '^ *+' conftest.er1 >conftest.err
22740   rm -f conftest.er1
22741   cat conftest.err >&5
22742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22743   (exit $ac_status); } &&
22744          { ac_try='test -z "$ac_c_werror_flag"
22745                          || test ! -s conftest.err'
22746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22747   (eval $ac_try) 2>&5
22748   ac_status=$?
22749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22750   (exit $ac_status); }; } &&
22751          { ac_try='test -s conftest$ac_exeext'
22752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22753   (eval $ac_try) 2>&5
22754   ac_status=$?
22755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22756   (exit $ac_status); }; }; then
22757   ol_cv_pthread_lc_r=yes
22758 else
22759   echo "$as_me: failed program was:" >&5
22760 sed 's/^/| /' conftest.$ac_ext >&5
22761
22762 ol_cv_pthread_lc_r=no
22763 fi
22764 rm -f conftest.err conftest.$ac_objext \
22765       conftest$ac_exeext conftest.$ac_ext
22766 else
22767   cat >conftest.$ac_ext <<_ACEOF
22768 /* confdefs.h.  */
22769 _ACEOF
22770 cat confdefs.h >>conftest.$ac_ext
22771 cat >>conftest.$ac_ext <<_ACEOF
22772 /* end confdefs.h.  */
22773
22774 /* pthread test headers */
22775 #include <pthread.h>
22776 #if HAVE_PTHREADS < 7
22777 #include <errno.h>
22778 #endif
22779 #ifndef NULL
22780 #define NULL (void*)0
22781 #endif
22782
22783 static void *task(p)
22784         void *p;
22785 {
22786         return (void *) (p == NULL);
22787 }
22788
22789
22790 int main(argc, argv)
22791         int argc;
22792         char **argv;
22793 {
22794
22795         /* pthread test function */
22796 #ifndef PTHREAD_CREATE_DETACHED
22797 #define PTHREAD_CREATE_DETACHED 1
22798 #endif
22799         pthread_t t;
22800         int status;
22801         int detach = PTHREAD_CREATE_DETACHED;
22802
22803 #if HAVE_PTHREADS > 4
22804         /* Final pthreads */
22805         pthread_attr_t attr;
22806
22807         status = pthread_attr_init(&attr);
22808         if( status ) return status;
22809
22810 #if HAVE_PTHREADS < 7
22811         status = pthread_attr_setdetachstate(&attr, &detach);
22812         if( status < 0 ) status = errno;
22813 #else
22814         status = pthread_attr_setdetachstate(&attr, detach);
22815 #endif
22816         if( status ) return status;
22817         status = pthread_create( &t, &attr, task, NULL );
22818 #if HAVE_PTHREADS < 7
22819         if( status < 0 ) status = errno;
22820 #endif
22821         if( status ) return status;
22822 #else
22823         /* Draft 4 pthreads */
22824         status = pthread_create( &t, pthread_attr_default, task, NULL );
22825         if( status ) return errno;
22826
22827         /* give thread a chance to complete */
22828         /* it should remain joinable and hence detachable */
22829         sleep( 1 );
22830
22831         status = pthread_detach( &t );
22832         if( status ) return errno;
22833 #endif
22834
22835 #ifdef HAVE_LINUX_THREADS
22836         pthread_kill_other_threads_np();
22837 #endif
22838
22839         return 0;
22840
22841 }
22842
22843 _ACEOF
22844 rm -f conftest$ac_exeext
22845 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22846   (eval $ac_link) 2>&5
22847   ac_status=$?
22848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22849   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22850   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22851   (eval $ac_try) 2>&5
22852   ac_status=$?
22853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22854   (exit $ac_status); }; }; then
22855   ol_cv_pthread_lc_r=yes
22856 else
22857   echo "$as_me: program exited with status $ac_status" >&5
22858 echo "$as_me: failed program was:" >&5
22859 sed 's/^/| /' conftest.$ac_ext >&5
22860
22861 ( exit $ac_status )
22862 ol_cv_pthread_lc_r=no
22863 fi
22864 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22865 fi
22866
22867                 # restore the LIBS
22868                 LIBS="$ol_LIBS"
22869
22870 fi
22871 echo "$as_me:$LINENO: result: $ol_cv_pthread_lc_r" >&5
22872 echo "${ECHO_T}$ol_cv_pthread_lc_r" >&6
22873
22874         if test $ol_cv_pthread_lc_r = yes ; then
22875                 ol_link_pthreads="-lc_r"
22876                 ol_link_threads=posix
22877         fi
22878 fi
22879
22880
22881                 # Pthread try link: -threads (ol_cv_pthread_threads)
22882 if test "$ol_link_threads" = no ; then
22883         # try -threads
22884         echo "$as_me:$LINENO: checking for pthread link with -threads" >&5
22885 echo $ECHO_N "checking for pthread link with -threads... $ECHO_C" >&6
22886 if test "${ol_cv_pthread_threads+set}" = set; then
22887   echo $ECHO_N "(cached) $ECHO_C" >&6
22888 else
22889
22890                 # save the flags
22891                 ol_LIBS="$LIBS"
22892                 LIBS="-threads $LIBS"
22893
22894                 if test "$cross_compiling" = yes; then
22895   cat >conftest.$ac_ext <<_ACEOF
22896 /* confdefs.h.  */
22897 _ACEOF
22898 cat confdefs.h >>conftest.$ac_ext
22899 cat >>conftest.$ac_ext <<_ACEOF
22900 /* end confdefs.h.  */
22901
22902 /* pthread test headers */
22903 #include <pthread.h>
22904 #if HAVE_PTHREADS < 7
22905 #include <errno.h>
22906 #endif
22907 #ifndef NULL
22908 #define NULL (void*)0
22909 #endif
22910
22911 static void *task(p)
22912         void *p;
22913 {
22914         return (void *) (p == NULL);
22915 }
22916
22917 int
22918 main ()
22919 {
22920
22921         /* pthread test function */
22922 #ifndef PTHREAD_CREATE_DETACHED
22923 #define PTHREAD_CREATE_DETACHED 1
22924 #endif
22925         pthread_t t;
22926         int status;
22927         int detach = PTHREAD_CREATE_DETACHED;
22928
22929 #if HAVE_PTHREADS > 4
22930         /* Final pthreads */
22931         pthread_attr_t attr;
22932
22933         status = pthread_attr_init(&attr);
22934         if( status ) return status;
22935
22936 #if HAVE_PTHREADS < 7
22937         status = pthread_attr_setdetachstate(&attr, &detach);
22938         if( status < 0 ) status = errno;
22939 #else
22940         status = pthread_attr_setdetachstate(&attr, detach);
22941 #endif
22942         if( status ) return status;
22943         status = pthread_create( &t, &attr, task, NULL );
22944 #if HAVE_PTHREADS < 7
22945         if( status < 0 ) status = errno;
22946 #endif
22947         if( status ) return status;
22948 #else
22949         /* Draft 4 pthreads */
22950         status = pthread_create( &t, pthread_attr_default, task, NULL );
22951         if( status ) return errno;
22952
22953         /* give thread a chance to complete */
22954         /* it should remain joinable and hence detachable */
22955         sleep( 1 );
22956
22957         status = pthread_detach( &t );
22958         if( status ) return errno;
22959 #endif
22960
22961 #ifdef HAVE_LINUX_THREADS
22962         pthread_kill_other_threads_np();
22963 #endif
22964
22965         return 0;
22966
22967   ;
22968   return 0;
22969 }
22970 _ACEOF
22971 rm -f conftest.$ac_objext conftest$ac_exeext
22972 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22973   (eval $ac_link) 2>conftest.er1
22974   ac_status=$?
22975   grep -v '^ *+' conftest.er1 >conftest.err
22976   rm -f conftest.er1
22977   cat conftest.err >&5
22978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22979   (exit $ac_status); } &&
22980          { ac_try='test -z "$ac_c_werror_flag"
22981                          || test ! -s conftest.err'
22982   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22983   (eval $ac_try) 2>&5
22984   ac_status=$?
22985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22986   (exit $ac_status); }; } &&
22987          { ac_try='test -s conftest$ac_exeext'
22988   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22989   (eval $ac_try) 2>&5
22990   ac_status=$?
22991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22992   (exit $ac_status); }; }; then
22993   ol_cv_pthread_threads=yes
22994 else
22995   echo "$as_me: failed program was:" >&5
22996 sed 's/^/| /' conftest.$ac_ext >&5
22997
22998 ol_cv_pthread_threads=no
22999 fi
23000 rm -f conftest.err conftest.$ac_objext \
23001       conftest$ac_exeext conftest.$ac_ext
23002 else
23003   cat >conftest.$ac_ext <<_ACEOF
23004 /* confdefs.h.  */
23005 _ACEOF
23006 cat confdefs.h >>conftest.$ac_ext
23007 cat >>conftest.$ac_ext <<_ACEOF
23008 /* end confdefs.h.  */
23009
23010 /* pthread test headers */
23011 #include <pthread.h>
23012 #if HAVE_PTHREADS < 7
23013 #include <errno.h>
23014 #endif
23015 #ifndef NULL
23016 #define NULL (void*)0
23017 #endif
23018
23019 static void *task(p)
23020         void *p;
23021 {
23022         return (void *) (p == NULL);
23023 }
23024
23025
23026 int main(argc, argv)
23027         int argc;
23028         char **argv;
23029 {
23030
23031         /* pthread test function */
23032 #ifndef PTHREAD_CREATE_DETACHED
23033 #define PTHREAD_CREATE_DETACHED 1
23034 #endif
23035         pthread_t t;
23036         int status;
23037         int detach = PTHREAD_CREATE_DETACHED;
23038
23039 #if HAVE_PTHREADS > 4
23040         /* Final pthreads */
23041         pthread_attr_t attr;
23042
23043         status = pthread_attr_init(&attr);
23044         if( status ) return status;
23045
23046 #if HAVE_PTHREADS < 7
23047         status = pthread_attr_setdetachstate(&attr, &detach);
23048         if( status < 0 ) status = errno;
23049 #else
23050         status = pthread_attr_setdetachstate(&attr, detach);
23051 #endif
23052         if( status ) return status;
23053         status = pthread_create( &t, &attr, task, NULL );
23054 #if HAVE_PTHREADS < 7
23055         if( status < 0 ) status = errno;
23056 #endif
23057         if( status ) return status;
23058 #else
23059         /* Draft 4 pthreads */
23060         status = pthread_create( &t, pthread_attr_default, task, NULL );
23061         if( status ) return errno;
23062
23063         /* give thread a chance to complete */
23064         /* it should remain joinable and hence detachable */
23065         sleep( 1 );
23066
23067         status = pthread_detach( &t );
23068         if( status ) return errno;
23069 #endif
23070
23071 #ifdef HAVE_LINUX_THREADS
23072         pthread_kill_other_threads_np();
23073 #endif
23074
23075         return 0;
23076
23077 }
23078
23079 _ACEOF
23080 rm -f conftest$ac_exeext
23081 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23082   (eval $ac_link) 2>&5
23083   ac_status=$?
23084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23085   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23086   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23087   (eval $ac_try) 2>&5
23088   ac_status=$?
23089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23090   (exit $ac_status); }; }; then
23091   ol_cv_pthread_threads=yes
23092 else
23093   echo "$as_me: program exited with status $ac_status" >&5
23094 echo "$as_me: failed program was:" >&5
23095 sed 's/^/| /' conftest.$ac_ext >&5
23096
23097 ( exit $ac_status )
23098 ol_cv_pthread_threads=no
23099 fi
23100 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23101 fi
23102
23103                 # restore the LIBS
23104                 LIBS="$ol_LIBS"
23105
23106 fi
23107 echo "$as_me:$LINENO: result: $ol_cv_pthread_threads" >&5
23108 echo "${ECHO_T}$ol_cv_pthread_threads" >&6
23109
23110         if test $ol_cv_pthread_threads = yes ; then
23111                 ol_link_pthreads="-threads"
23112                 ol_link_threads=posix
23113         fi
23114 fi
23115
23116
23117                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
23118 if test "$ol_link_threads" = no ; then
23119         # try -lpthreads -lmach -lexc -lc_r
23120         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
23121 echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc -lc_r... $ECHO_C" >&6
23122 if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then
23123   echo $ECHO_N "(cached) $ECHO_C" >&6
23124 else
23125
23126                 # save the flags
23127                 ol_LIBS="$LIBS"
23128                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
23129
23130                 if test "$cross_compiling" = yes; then
23131   cat >conftest.$ac_ext <<_ACEOF
23132 /* confdefs.h.  */
23133 _ACEOF
23134 cat confdefs.h >>conftest.$ac_ext
23135 cat >>conftest.$ac_ext <<_ACEOF
23136 /* end confdefs.h.  */
23137
23138 /* pthread test headers */
23139 #include <pthread.h>
23140 #if HAVE_PTHREADS < 7
23141 #include <errno.h>
23142 #endif
23143 #ifndef NULL
23144 #define NULL (void*)0
23145 #endif
23146
23147 static void *task(p)
23148         void *p;
23149 {
23150         return (void *) (p == NULL);
23151 }
23152
23153 int
23154 main ()
23155 {
23156
23157         /* pthread test function */
23158 #ifndef PTHREAD_CREATE_DETACHED
23159 #define PTHREAD_CREATE_DETACHED 1
23160 #endif
23161         pthread_t t;
23162         int status;
23163         int detach = PTHREAD_CREATE_DETACHED;
23164
23165 #if HAVE_PTHREADS > 4
23166         /* Final pthreads */
23167         pthread_attr_t attr;
23168
23169         status = pthread_attr_init(&attr);
23170         if( status ) return status;
23171
23172 #if HAVE_PTHREADS < 7
23173         status = pthread_attr_setdetachstate(&attr, &detach);
23174         if( status < 0 ) status = errno;
23175 #else
23176         status = pthread_attr_setdetachstate(&attr, detach);
23177 #endif
23178         if( status ) return status;
23179         status = pthread_create( &t, &attr, task, NULL );
23180 #if HAVE_PTHREADS < 7
23181         if( status < 0 ) status = errno;
23182 #endif
23183         if( status ) return status;
23184 #else
23185         /* Draft 4 pthreads */
23186         status = pthread_create( &t, pthread_attr_default, task, NULL );
23187         if( status ) return errno;
23188
23189         /* give thread a chance to complete */
23190         /* it should remain joinable and hence detachable */
23191         sleep( 1 );
23192
23193         status = pthread_detach( &t );
23194         if( status ) return errno;
23195 #endif
23196
23197 #ifdef HAVE_LINUX_THREADS
23198         pthread_kill_other_threads_np();
23199 #endif
23200
23201         return 0;
23202
23203   ;
23204   return 0;
23205 }
23206 _ACEOF
23207 rm -f conftest.$ac_objext conftest$ac_exeext
23208 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23209   (eval $ac_link) 2>conftest.er1
23210   ac_status=$?
23211   grep -v '^ *+' conftest.er1 >conftest.err
23212   rm -f conftest.er1
23213   cat conftest.err >&5
23214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23215   (exit $ac_status); } &&
23216          { ac_try='test -z "$ac_c_werror_flag"
23217                          || test ! -s conftest.err'
23218   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23219   (eval $ac_try) 2>&5
23220   ac_status=$?
23221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23222   (exit $ac_status); }; } &&
23223          { ac_try='test -s conftest$ac_exeext'
23224   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23225   (eval $ac_try) 2>&5
23226   ac_status=$?
23227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23228   (exit $ac_status); }; }; then
23229   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
23230 else
23231   echo "$as_me: failed program was:" >&5
23232 sed 's/^/| /' conftest.$ac_ext >&5
23233
23234 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
23235 fi
23236 rm -f conftest.err conftest.$ac_objext \
23237       conftest$ac_exeext conftest.$ac_ext
23238 else
23239   cat >conftest.$ac_ext <<_ACEOF
23240 /* confdefs.h.  */
23241 _ACEOF
23242 cat confdefs.h >>conftest.$ac_ext
23243 cat >>conftest.$ac_ext <<_ACEOF
23244 /* end confdefs.h.  */
23245
23246 /* pthread test headers */
23247 #include <pthread.h>
23248 #if HAVE_PTHREADS < 7
23249 #include <errno.h>
23250 #endif
23251 #ifndef NULL
23252 #define NULL (void*)0
23253 #endif
23254
23255 static void *task(p)
23256         void *p;
23257 {
23258         return (void *) (p == NULL);
23259 }
23260
23261
23262 int main(argc, argv)
23263         int argc;
23264         char **argv;
23265 {
23266
23267         /* pthread test function */
23268 #ifndef PTHREAD_CREATE_DETACHED
23269 #define PTHREAD_CREATE_DETACHED 1
23270 #endif
23271         pthread_t t;
23272         int status;
23273         int detach = PTHREAD_CREATE_DETACHED;
23274
23275 #if HAVE_PTHREADS > 4
23276         /* Final pthreads */
23277         pthread_attr_t attr;
23278
23279         status = pthread_attr_init(&attr);
23280         if( status ) return status;
23281
23282 #if HAVE_PTHREADS < 7
23283         status = pthread_attr_setdetachstate(&attr, &detach);
23284         if( status < 0 ) status = errno;
23285 #else
23286         status = pthread_attr_setdetachstate(&attr, detach);
23287 #endif
23288         if( status ) return status;
23289         status = pthread_create( &t, &attr, task, NULL );
23290 #if HAVE_PTHREADS < 7
23291         if( status < 0 ) status = errno;
23292 #endif
23293         if( status ) return status;
23294 #else
23295         /* Draft 4 pthreads */
23296         status = pthread_create( &t, pthread_attr_default, task, NULL );
23297         if( status ) return errno;
23298
23299         /* give thread a chance to complete */
23300         /* it should remain joinable and hence detachable */
23301         sleep( 1 );
23302
23303         status = pthread_detach( &t );
23304         if( status ) return errno;
23305 #endif
23306
23307 #ifdef HAVE_LINUX_THREADS
23308         pthread_kill_other_threads_np();
23309 #endif
23310
23311         return 0;
23312
23313 }
23314
23315 _ACEOF
23316 rm -f conftest$ac_exeext
23317 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23318   (eval $ac_link) 2>&5
23319   ac_status=$?
23320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23321   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23322   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23323   (eval $ac_try) 2>&5
23324   ac_status=$?
23325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23326   (exit $ac_status); }; }; then
23327   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
23328 else
23329   echo "$as_me: program exited with status $ac_status" >&5
23330 echo "$as_me: failed program was:" >&5
23331 sed 's/^/| /' conftest.$ac_ext >&5
23332
23333 ( exit $ac_status )
23334 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
23335 fi
23336 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23337 fi
23338
23339                 # restore the LIBS
23340                 LIBS="$ol_LIBS"
23341
23342 fi
23343 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
23344 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6
23345
23346         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
23347                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
23348                 ol_link_threads=posix
23349         fi
23350 fi
23351
23352                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
23353 if test "$ol_link_threads" = no ; then
23354         # try -lpthreads -lmach -lexc
23355         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc" >&5
23356 echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc... $ECHO_C" >&6
23357 if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then
23358   echo $ECHO_N "(cached) $ECHO_C" >&6
23359 else
23360
23361                 # save the flags
23362                 ol_LIBS="$LIBS"
23363                 LIBS="-lpthreads -lmach -lexc $LIBS"
23364
23365                 if test "$cross_compiling" = yes; then
23366   cat >conftest.$ac_ext <<_ACEOF
23367 /* confdefs.h.  */
23368 _ACEOF
23369 cat confdefs.h >>conftest.$ac_ext
23370 cat >>conftest.$ac_ext <<_ACEOF
23371 /* end confdefs.h.  */
23372
23373 /* pthread test headers */
23374 #include <pthread.h>
23375 #if HAVE_PTHREADS < 7
23376 #include <errno.h>
23377 #endif
23378 #ifndef NULL
23379 #define NULL (void*)0
23380 #endif
23381
23382 static void *task(p)
23383         void *p;
23384 {
23385         return (void *) (p == NULL);
23386 }
23387
23388 int
23389 main ()
23390 {
23391
23392         /* pthread test function */
23393 #ifndef PTHREAD_CREATE_DETACHED
23394 #define PTHREAD_CREATE_DETACHED 1
23395 #endif
23396         pthread_t t;
23397         int status;
23398         int detach = PTHREAD_CREATE_DETACHED;
23399
23400 #if HAVE_PTHREADS > 4
23401         /* Final pthreads */
23402         pthread_attr_t attr;
23403
23404         status = pthread_attr_init(&attr);
23405         if( status ) return status;
23406
23407 #if HAVE_PTHREADS < 7
23408         status = pthread_attr_setdetachstate(&attr, &detach);
23409         if( status < 0 ) status = errno;
23410 #else
23411         status = pthread_attr_setdetachstate(&attr, detach);
23412 #endif
23413         if( status ) return status;
23414         status = pthread_create( &t, &attr, task, NULL );
23415 #if HAVE_PTHREADS < 7
23416         if( status < 0 ) status = errno;
23417 #endif
23418         if( status ) return status;
23419 #else
23420         /* Draft 4 pthreads */
23421         status = pthread_create( &t, pthread_attr_default, task, NULL );
23422         if( status ) return errno;
23423
23424         /* give thread a chance to complete */
23425         /* it should remain joinable and hence detachable */
23426         sleep( 1 );
23427
23428         status = pthread_detach( &t );
23429         if( status ) return errno;
23430 #endif
23431
23432 #ifdef HAVE_LINUX_THREADS
23433         pthread_kill_other_threads_np();
23434 #endif
23435
23436         return 0;
23437
23438   ;
23439   return 0;
23440 }
23441 _ACEOF
23442 rm -f conftest.$ac_objext conftest$ac_exeext
23443 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23444   (eval $ac_link) 2>conftest.er1
23445   ac_status=$?
23446   grep -v '^ *+' conftest.er1 >conftest.err
23447   rm -f conftest.er1
23448   cat conftest.err >&5
23449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23450   (exit $ac_status); } &&
23451          { ac_try='test -z "$ac_c_werror_flag"
23452                          || test ! -s conftest.err'
23453   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23454   (eval $ac_try) 2>&5
23455   ac_status=$?
23456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23457   (exit $ac_status); }; } &&
23458          { ac_try='test -s conftest$ac_exeext'
23459   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23460   (eval $ac_try) 2>&5
23461   ac_status=$?
23462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23463   (exit $ac_status); }; }; then
23464   ol_cv_pthread_lpthreads_lmach_lexc=yes
23465 else
23466   echo "$as_me: failed program was:" >&5
23467 sed 's/^/| /' conftest.$ac_ext >&5
23468
23469 ol_cv_pthread_lpthreads_lmach_lexc=no
23470 fi
23471 rm -f conftest.err conftest.$ac_objext \
23472       conftest$ac_exeext conftest.$ac_ext
23473 else
23474   cat >conftest.$ac_ext <<_ACEOF
23475 /* confdefs.h.  */
23476 _ACEOF
23477 cat confdefs.h >>conftest.$ac_ext
23478 cat >>conftest.$ac_ext <<_ACEOF
23479 /* end confdefs.h.  */
23480
23481 /* pthread test headers */
23482 #include <pthread.h>
23483 #if HAVE_PTHREADS < 7
23484 #include <errno.h>
23485 #endif
23486 #ifndef NULL
23487 #define NULL (void*)0
23488 #endif
23489
23490 static void *task(p)
23491         void *p;
23492 {
23493         return (void *) (p == NULL);
23494 }
23495
23496
23497 int main(argc, argv)
23498         int argc;
23499         char **argv;
23500 {
23501
23502         /* pthread test function */
23503 #ifndef PTHREAD_CREATE_DETACHED
23504 #define PTHREAD_CREATE_DETACHED 1
23505 #endif
23506         pthread_t t;
23507         int status;
23508         int detach = PTHREAD_CREATE_DETACHED;
23509
23510 #if HAVE_PTHREADS > 4
23511         /* Final pthreads */
23512         pthread_attr_t attr;
23513
23514         status = pthread_attr_init(&attr);
23515         if( status ) return status;
23516
23517 #if HAVE_PTHREADS < 7
23518         status = pthread_attr_setdetachstate(&attr, &detach);
23519         if( status < 0 ) status = errno;
23520 #else
23521         status = pthread_attr_setdetachstate(&attr, detach);
23522 #endif
23523         if( status ) return status;
23524         status = pthread_create( &t, &attr, task, NULL );
23525 #if HAVE_PTHREADS < 7
23526         if( status < 0 ) status = errno;
23527 #endif
23528         if( status ) return status;
23529 #else
23530         /* Draft 4 pthreads */
23531         status = pthread_create( &t, pthread_attr_default, task, NULL );
23532         if( status ) return errno;
23533
23534         /* give thread a chance to complete */
23535         /* it should remain joinable and hence detachable */
23536         sleep( 1 );
23537
23538         status = pthread_detach( &t );
23539         if( status ) return errno;
23540 #endif
23541
23542 #ifdef HAVE_LINUX_THREADS
23543         pthread_kill_other_threads_np();
23544 #endif
23545
23546         return 0;
23547
23548 }
23549
23550 _ACEOF
23551 rm -f conftest$ac_exeext
23552 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23553   (eval $ac_link) 2>&5
23554   ac_status=$?
23555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23556   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23557   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23558   (eval $ac_try) 2>&5
23559   ac_status=$?
23560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23561   (exit $ac_status); }; }; then
23562   ol_cv_pthread_lpthreads_lmach_lexc=yes
23563 else
23564   echo "$as_me: program exited with status $ac_status" >&5
23565 echo "$as_me: failed program was:" >&5
23566 sed 's/^/| /' conftest.$ac_ext >&5
23567
23568 ( exit $ac_status )
23569 ol_cv_pthread_lpthreads_lmach_lexc=no
23570 fi
23571 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23572 fi
23573
23574                 # restore the LIBS
23575                 LIBS="$ol_LIBS"
23576
23577 fi
23578 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
23579 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc" >&6
23580
23581         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
23582                 ol_link_pthreads="-lpthreads -lmach -lexc"
23583                 ol_link_threads=posix
23584         fi
23585 fi
23586
23587                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
23588 if test "$ol_link_threads" = no ; then
23589         # try -lpthreads -lexc
23590         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lexc" >&5
23591 echo $ECHO_N "checking for pthread link with -lpthreads -lexc... $ECHO_C" >&6
23592 if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then
23593   echo $ECHO_N "(cached) $ECHO_C" >&6
23594 else
23595
23596                 # save the flags
23597                 ol_LIBS="$LIBS"
23598                 LIBS="-lpthreads -lexc $LIBS"
23599
23600                 if test "$cross_compiling" = yes; then
23601   cat >conftest.$ac_ext <<_ACEOF
23602 /* confdefs.h.  */
23603 _ACEOF
23604 cat confdefs.h >>conftest.$ac_ext
23605 cat >>conftest.$ac_ext <<_ACEOF
23606 /* end confdefs.h.  */
23607
23608 /* pthread test headers */
23609 #include <pthread.h>
23610 #if HAVE_PTHREADS < 7
23611 #include <errno.h>
23612 #endif
23613 #ifndef NULL
23614 #define NULL (void*)0
23615 #endif
23616
23617 static void *task(p)
23618         void *p;
23619 {
23620         return (void *) (p == NULL);
23621 }
23622
23623 int
23624 main ()
23625 {
23626
23627         /* pthread test function */
23628 #ifndef PTHREAD_CREATE_DETACHED
23629 #define PTHREAD_CREATE_DETACHED 1
23630 #endif
23631         pthread_t t;
23632         int status;
23633         int detach = PTHREAD_CREATE_DETACHED;
23634
23635 #if HAVE_PTHREADS > 4
23636         /* Final pthreads */
23637         pthread_attr_t attr;
23638
23639         status = pthread_attr_init(&attr);
23640         if( status ) return status;
23641
23642 #if HAVE_PTHREADS < 7
23643         status = pthread_attr_setdetachstate(&attr, &detach);
23644         if( status < 0 ) status = errno;
23645 #else
23646         status = pthread_attr_setdetachstate(&attr, detach);
23647 #endif
23648         if( status ) return status;
23649         status = pthread_create( &t, &attr, task, NULL );
23650 #if HAVE_PTHREADS < 7
23651         if( status < 0 ) status = errno;
23652 #endif
23653         if( status ) return status;
23654 #else
23655         /* Draft 4 pthreads */
23656         status = pthread_create( &t, pthread_attr_default, task, NULL );
23657         if( status ) return errno;
23658
23659         /* give thread a chance to complete */
23660         /* it should remain joinable and hence detachable */
23661         sleep( 1 );
23662
23663         status = pthread_detach( &t );
23664         if( status ) return errno;
23665 #endif
23666
23667 #ifdef HAVE_LINUX_THREADS
23668         pthread_kill_other_threads_np();
23669 #endif
23670
23671         return 0;
23672
23673   ;
23674   return 0;
23675 }
23676 _ACEOF
23677 rm -f conftest.$ac_objext conftest$ac_exeext
23678 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23679   (eval $ac_link) 2>conftest.er1
23680   ac_status=$?
23681   grep -v '^ *+' conftest.er1 >conftest.err
23682   rm -f conftest.er1
23683   cat conftest.err >&5
23684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23685   (exit $ac_status); } &&
23686          { ac_try='test -z "$ac_c_werror_flag"
23687                          || test ! -s conftest.err'
23688   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23689   (eval $ac_try) 2>&5
23690   ac_status=$?
23691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23692   (exit $ac_status); }; } &&
23693          { ac_try='test -s conftest$ac_exeext'
23694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23695   (eval $ac_try) 2>&5
23696   ac_status=$?
23697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23698   (exit $ac_status); }; }; then
23699   ol_cv_pthread_lpthreads_lexc=yes
23700 else
23701   echo "$as_me: failed program was:" >&5
23702 sed 's/^/| /' conftest.$ac_ext >&5
23703
23704 ol_cv_pthread_lpthreads_lexc=no
23705 fi
23706 rm -f conftest.err conftest.$ac_objext \
23707       conftest$ac_exeext conftest.$ac_ext
23708 else
23709   cat >conftest.$ac_ext <<_ACEOF
23710 /* confdefs.h.  */
23711 _ACEOF
23712 cat confdefs.h >>conftest.$ac_ext
23713 cat >>conftest.$ac_ext <<_ACEOF
23714 /* end confdefs.h.  */
23715
23716 /* pthread test headers */
23717 #include <pthread.h>
23718 #if HAVE_PTHREADS < 7
23719 #include <errno.h>
23720 #endif
23721 #ifndef NULL
23722 #define NULL (void*)0
23723 #endif
23724
23725 static void *task(p)
23726         void *p;
23727 {
23728         return (void *) (p == NULL);
23729 }
23730
23731
23732 int main(argc, argv)
23733         int argc;
23734         char **argv;
23735 {
23736
23737         /* pthread test function */
23738 #ifndef PTHREAD_CREATE_DETACHED
23739 #define PTHREAD_CREATE_DETACHED 1
23740 #endif
23741         pthread_t t;
23742         int status;
23743         int detach = PTHREAD_CREATE_DETACHED;
23744
23745 #if HAVE_PTHREADS > 4
23746         /* Final pthreads */
23747         pthread_attr_t attr;
23748
23749         status = pthread_attr_init(&attr);
23750         if( status ) return status;
23751
23752 #if HAVE_PTHREADS < 7
23753         status = pthread_attr_setdetachstate(&attr, &detach);
23754         if( status < 0 ) status = errno;
23755 #else
23756         status = pthread_attr_setdetachstate(&attr, detach);
23757 #endif
23758         if( status ) return status;
23759         status = pthread_create( &t, &attr, task, NULL );
23760 #if HAVE_PTHREADS < 7
23761         if( status < 0 ) status = errno;
23762 #endif
23763         if( status ) return status;
23764 #else
23765         /* Draft 4 pthreads */
23766         status = pthread_create( &t, pthread_attr_default, task, NULL );
23767         if( status ) return errno;
23768
23769         /* give thread a chance to complete */
23770         /* it should remain joinable and hence detachable */
23771         sleep( 1 );
23772
23773         status = pthread_detach( &t );
23774         if( status ) return errno;
23775 #endif
23776
23777 #ifdef HAVE_LINUX_THREADS
23778         pthread_kill_other_threads_np();
23779 #endif
23780
23781         return 0;
23782
23783 }
23784
23785 _ACEOF
23786 rm -f conftest$ac_exeext
23787 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23788   (eval $ac_link) 2>&5
23789   ac_status=$?
23790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23791   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23792   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23793   (eval $ac_try) 2>&5
23794   ac_status=$?
23795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23796   (exit $ac_status); }; }; then
23797   ol_cv_pthread_lpthreads_lexc=yes
23798 else
23799   echo "$as_me: program exited with status $ac_status" >&5
23800 echo "$as_me: failed program was:" >&5
23801 sed 's/^/| /' conftest.$ac_ext >&5
23802
23803 ( exit $ac_status )
23804 ol_cv_pthread_lpthreads_lexc=no
23805 fi
23806 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23807 fi
23808
23809                 # restore the LIBS
23810                 LIBS="$ol_LIBS"
23811
23812 fi
23813 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lexc" >&5
23814 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lexc" >&6
23815
23816         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
23817                 ol_link_pthreads="-lpthreads -lexc"
23818                 ol_link_threads=posix
23819         fi
23820 fi
23821
23822
23823                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
23824 if test "$ol_link_threads" = no ; then
23825         # try -lpthreads
23826         echo "$as_me:$LINENO: checking for pthread link with -lpthreads" >&5
23827 echo $ECHO_N "checking for pthread link with -lpthreads... $ECHO_C" >&6
23828 if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then
23829   echo $ECHO_N "(cached) $ECHO_C" >&6
23830 else
23831
23832                 # save the flags
23833                 ol_LIBS="$LIBS"
23834                 LIBS="-lpthreads $LIBS"
23835
23836                 if test "$cross_compiling" = yes; then
23837   cat >conftest.$ac_ext <<_ACEOF
23838 /* confdefs.h.  */
23839 _ACEOF
23840 cat confdefs.h >>conftest.$ac_ext
23841 cat >>conftest.$ac_ext <<_ACEOF
23842 /* end confdefs.h.  */
23843
23844 /* pthread test headers */
23845 #include <pthread.h>
23846 #if HAVE_PTHREADS < 7
23847 #include <errno.h>
23848 #endif
23849 #ifndef NULL
23850 #define NULL (void*)0
23851 #endif
23852
23853 static void *task(p)
23854         void *p;
23855 {
23856         return (void *) (p == NULL);
23857 }
23858
23859 int
23860 main ()
23861 {
23862
23863         /* pthread test function */
23864 #ifndef PTHREAD_CREATE_DETACHED
23865 #define PTHREAD_CREATE_DETACHED 1
23866 #endif
23867         pthread_t t;
23868         int status;
23869         int detach = PTHREAD_CREATE_DETACHED;
23870
23871 #if HAVE_PTHREADS > 4
23872         /* Final pthreads */
23873         pthread_attr_t attr;
23874
23875         status = pthread_attr_init(&attr);
23876         if( status ) return status;
23877
23878 #if HAVE_PTHREADS < 7
23879         status = pthread_attr_setdetachstate(&attr, &detach);
23880         if( status < 0 ) status = errno;
23881 #else
23882         status = pthread_attr_setdetachstate(&attr, detach);
23883 #endif
23884         if( status ) return status;
23885         status = pthread_create( &t, &attr, task, NULL );
23886 #if HAVE_PTHREADS < 7
23887         if( status < 0 ) status = errno;
23888 #endif
23889         if( status ) return status;
23890 #else
23891         /* Draft 4 pthreads */
23892         status = pthread_create( &t, pthread_attr_default, task, NULL );
23893         if( status ) return errno;
23894
23895         /* give thread a chance to complete */
23896         /* it should remain joinable and hence detachable */
23897         sleep( 1 );
23898
23899         status = pthread_detach( &t );
23900         if( status ) return errno;
23901 #endif
23902
23903 #ifdef HAVE_LINUX_THREADS
23904         pthread_kill_other_threads_np();
23905 #endif
23906
23907         return 0;
23908
23909   ;
23910   return 0;
23911 }
23912 _ACEOF
23913 rm -f conftest.$ac_objext conftest$ac_exeext
23914 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23915   (eval $ac_link) 2>conftest.er1
23916   ac_status=$?
23917   grep -v '^ *+' conftest.er1 >conftest.err
23918   rm -f conftest.er1
23919   cat conftest.err >&5
23920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23921   (exit $ac_status); } &&
23922          { ac_try='test -z "$ac_c_werror_flag"
23923                          || test ! -s conftest.err'
23924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23925   (eval $ac_try) 2>&5
23926   ac_status=$?
23927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23928   (exit $ac_status); }; } &&
23929          { ac_try='test -s conftest$ac_exeext'
23930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23931   (eval $ac_try) 2>&5
23932   ac_status=$?
23933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23934   (exit $ac_status); }; }; then
23935   ol_cv_pthread_lib_lpthreads=yes
23936 else
23937   echo "$as_me: failed program was:" >&5
23938 sed 's/^/| /' conftest.$ac_ext >&5
23939
23940 ol_cv_pthread_lib_lpthreads=no
23941 fi
23942 rm -f conftest.err conftest.$ac_objext \
23943       conftest$ac_exeext conftest.$ac_ext
23944 else
23945   cat >conftest.$ac_ext <<_ACEOF
23946 /* confdefs.h.  */
23947 _ACEOF
23948 cat confdefs.h >>conftest.$ac_ext
23949 cat >>conftest.$ac_ext <<_ACEOF
23950 /* end confdefs.h.  */
23951
23952 /* pthread test headers */
23953 #include <pthread.h>
23954 #if HAVE_PTHREADS < 7
23955 #include <errno.h>
23956 #endif
23957 #ifndef NULL
23958 #define NULL (void*)0
23959 #endif
23960
23961 static void *task(p)
23962         void *p;
23963 {
23964         return (void *) (p == NULL);
23965 }
23966
23967
23968 int main(argc, argv)
23969         int argc;
23970         char **argv;
23971 {
23972
23973         /* pthread test function */
23974 #ifndef PTHREAD_CREATE_DETACHED
23975 #define PTHREAD_CREATE_DETACHED 1
23976 #endif
23977         pthread_t t;
23978         int status;
23979         int detach = PTHREAD_CREATE_DETACHED;
23980
23981 #if HAVE_PTHREADS > 4
23982         /* Final pthreads */
23983         pthread_attr_t attr;
23984
23985         status = pthread_attr_init(&attr);
23986         if( status ) return status;
23987
23988 #if HAVE_PTHREADS < 7
23989         status = pthread_attr_setdetachstate(&attr, &detach);
23990         if( status < 0 ) status = errno;
23991 #else
23992         status = pthread_attr_setdetachstate(&attr, detach);
23993 #endif
23994         if( status ) return status;
23995         status = pthread_create( &t, &attr, task, NULL );
23996 #if HAVE_PTHREADS < 7
23997         if( status < 0 ) status = errno;
23998 #endif
23999         if( status ) return status;
24000 #else
24001         /* Draft 4 pthreads */
24002         status = pthread_create( &t, pthread_attr_default, task, NULL );
24003         if( status ) return errno;
24004
24005         /* give thread a chance to complete */
24006         /* it should remain joinable and hence detachable */
24007         sleep( 1 );
24008
24009         status = pthread_detach( &t );
24010         if( status ) return errno;
24011 #endif
24012
24013 #ifdef HAVE_LINUX_THREADS
24014         pthread_kill_other_threads_np();
24015 #endif
24016
24017         return 0;
24018
24019 }
24020
24021 _ACEOF
24022 rm -f conftest$ac_exeext
24023 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24024   (eval $ac_link) 2>&5
24025   ac_status=$?
24026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24027   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24028   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24029   (eval $ac_try) 2>&5
24030   ac_status=$?
24031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24032   (exit $ac_status); }; }; then
24033   ol_cv_pthread_lib_lpthreads=yes
24034 else
24035   echo "$as_me: program exited with status $ac_status" >&5
24036 echo "$as_me: failed program was:" >&5
24037 sed 's/^/| /' conftest.$ac_ext >&5
24038
24039 ( exit $ac_status )
24040 ol_cv_pthread_lib_lpthreads=no
24041 fi
24042 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24043 fi
24044
24045                 # restore the LIBS
24046                 LIBS="$ol_LIBS"
24047
24048 fi
24049 echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthreads" >&5
24050 echo "${ECHO_T}$ol_cv_pthread_lib_lpthreads" >&6
24051
24052         if test $ol_cv_pthread_lib_lpthreads = yes ; then
24053                 ol_link_pthreads="-lpthreads"
24054                 ol_link_threads=posix
24055         fi
24056 fi
24057
24058
24059                 if test $ol_link_threads != no ; then
24060                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
24061
24062                                                 save_CPPFLAGS="$CPPFLAGS"
24063                         save_LIBS="$LIBS"
24064                         LIBS="$LTHREAD_LIBS $LIBS"
24065
24066
24067
24068
24069 for ac_func in sched_yield pthread_yield thr_yield
24070 do
24071 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24072 echo "$as_me:$LINENO: checking for $ac_func" >&5
24073 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24074 if eval "test \"\${$as_ac_var+set}\" = set"; then
24075   echo $ECHO_N "(cached) $ECHO_C" >&6
24076 else
24077   cat >conftest.$ac_ext <<_ACEOF
24078 /* confdefs.h.  */
24079 _ACEOF
24080 cat confdefs.h >>conftest.$ac_ext
24081 cat >>conftest.$ac_ext <<_ACEOF
24082 /* end confdefs.h.  */
24083 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24084    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24085 #define $ac_func innocuous_$ac_func
24086
24087 /* System header to define __stub macros and hopefully few prototypes,
24088     which can conflict with char $ac_func (); below.
24089     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24090     <limits.h> exists even on freestanding compilers.  */
24091
24092 #ifdef __STDC__
24093 # include <limits.h>
24094 #else
24095 # include <assert.h>
24096 #endif
24097
24098 #undef $ac_func
24099
24100 /* Override any gcc2 internal prototype to avoid an error.  */
24101 #ifdef __cplusplus
24102 extern "C"
24103 {
24104 #endif
24105 /* We use char because int might match the return type of a gcc2
24106    builtin and then its argument prototype would still apply.  */
24107 char $ac_func ();
24108 /* The GNU C library defines this for functions which it implements
24109     to always fail with ENOSYS.  Some functions are actually named
24110     something starting with __ and the normal name is an alias.  */
24111 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24112 choke me
24113 #else
24114 char (*f) () = $ac_func;
24115 #endif
24116 #ifdef __cplusplus
24117 }
24118 #endif
24119
24120 int
24121 main ()
24122 {
24123 return f != $ac_func;
24124   ;
24125   return 0;
24126 }
24127 _ACEOF
24128 rm -f conftest.$ac_objext conftest$ac_exeext
24129 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24130   (eval $ac_link) 2>conftest.er1
24131   ac_status=$?
24132   grep -v '^ *+' conftest.er1 >conftest.err
24133   rm -f conftest.er1
24134   cat conftest.err >&5
24135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24136   (exit $ac_status); } &&
24137          { ac_try='test -z "$ac_c_werror_flag"
24138                          || test ! -s conftest.err'
24139   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24140   (eval $ac_try) 2>&5
24141   ac_status=$?
24142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24143   (exit $ac_status); }; } &&
24144          { ac_try='test -s conftest$ac_exeext'
24145   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24146   (eval $ac_try) 2>&5
24147   ac_status=$?
24148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24149   (exit $ac_status); }; }; then
24150   eval "$as_ac_var=yes"
24151 else
24152   echo "$as_me: failed program was:" >&5
24153 sed 's/^/| /' conftest.$ac_ext >&5
24154
24155 eval "$as_ac_var=no"
24156 fi
24157 rm -f conftest.err conftest.$ac_objext \
24158       conftest$ac_exeext conftest.$ac_ext
24159 fi
24160 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24161 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24162 if test `eval echo '${'$as_ac_var'}'` = yes; then
24163   cat >>confdefs.h <<_ACEOF
24164 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24165 _ACEOF
24166
24167 fi
24168 done
24169
24170
24171                         if test $ac_cv_func_sched_yield = no &&
24172                            test $ac_cv_func_pthread_yield = no &&
24173                            test $ac_cv_func_thr_yield = no ; then
24174                                                                 echo "$as_me:$LINENO: checking for sched_yield in -lrt" >&5
24175 echo $ECHO_N "checking for sched_yield in -lrt... $ECHO_C" >&6
24176 if test "${ac_cv_lib_rt_sched_yield+set}" = set; then
24177   echo $ECHO_N "(cached) $ECHO_C" >&6
24178 else
24179   ac_check_lib_save_LIBS=$LIBS
24180 LIBS="-lrt  $LIBS"
24181 cat >conftest.$ac_ext <<_ACEOF
24182 /* confdefs.h.  */
24183 _ACEOF
24184 cat confdefs.h >>conftest.$ac_ext
24185 cat >>conftest.$ac_ext <<_ACEOF
24186 /* end confdefs.h.  */
24187
24188 /* Override any gcc2 internal prototype to avoid an error.  */
24189 #ifdef __cplusplus
24190 extern "C"
24191 #endif
24192 /* We use char because int might match the return type of a gcc2
24193    builtin and then its argument prototype would still apply.  */
24194 char sched_yield ();
24195 int
24196 main ()
24197 {
24198 sched_yield ();
24199   ;
24200   return 0;
24201 }
24202 _ACEOF
24203 rm -f conftest.$ac_objext conftest$ac_exeext
24204 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24205   (eval $ac_link) 2>conftest.er1
24206   ac_status=$?
24207   grep -v '^ *+' conftest.er1 >conftest.err
24208   rm -f conftest.er1
24209   cat conftest.err >&5
24210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24211   (exit $ac_status); } &&
24212          { ac_try='test -z "$ac_c_werror_flag"
24213                          || test ! -s conftest.err'
24214   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24215   (eval $ac_try) 2>&5
24216   ac_status=$?
24217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24218   (exit $ac_status); }; } &&
24219          { ac_try='test -s conftest$ac_exeext'
24220   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24221   (eval $ac_try) 2>&5
24222   ac_status=$?
24223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24224   (exit $ac_status); }; }; then
24225   ac_cv_lib_rt_sched_yield=yes
24226 else
24227   echo "$as_me: failed program was:" >&5
24228 sed 's/^/| /' conftest.$ac_ext >&5
24229
24230 ac_cv_lib_rt_sched_yield=no
24231 fi
24232 rm -f conftest.err conftest.$ac_objext \
24233       conftest$ac_exeext conftest.$ac_ext
24234 LIBS=$ac_check_lib_save_LIBS
24235 fi
24236 echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_yield" >&5
24237 echo "${ECHO_T}$ac_cv_lib_rt_sched_yield" >&6
24238 if test $ac_cv_lib_rt_sched_yield = yes; then
24239   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
24240
24241 cat >>confdefs.h <<\_ACEOF
24242 #define HAVE_SCHED_YIELD 1
24243 _ACEOF
24244
24245                                         ac_cv_func_sched_yield=yes
24246 else
24247   ac_cv_func_sched_yield=no
24248 fi
24249
24250                         fi
24251                         if test $ac_cv_func_sched_yield = no &&
24252                            test $ac_cv_func_pthread_yield = no &&
24253                            test "$ac_cv_func_thr_yield" = no ; then
24254                                 { echo "$as_me:$LINENO: WARNING: could not locate sched_yield() or pthread_yield()" >&5
24255 echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
24256                         fi
24257
24258
24259
24260 for ac_func in pthread_kill pthread_rwlock_destroy
24261 do
24262 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24263 echo "$as_me:$LINENO: checking for $ac_func" >&5
24264 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24265 if eval "test \"\${$as_ac_var+set}\" = set"; then
24266   echo $ECHO_N "(cached) $ECHO_C" >&6
24267 else
24268   cat >conftest.$ac_ext <<_ACEOF
24269 /* confdefs.h.  */
24270 _ACEOF
24271 cat confdefs.h >>conftest.$ac_ext
24272 cat >>conftest.$ac_ext <<_ACEOF
24273 /* end confdefs.h.  */
24274 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24275    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24276 #define $ac_func innocuous_$ac_func
24277
24278 /* System header to define __stub macros and hopefully few prototypes,
24279     which can conflict with char $ac_func (); below.
24280     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24281     <limits.h> exists even on freestanding compilers.  */
24282
24283 #ifdef __STDC__
24284 # include <limits.h>
24285 #else
24286 # include <assert.h>
24287 #endif
24288
24289 #undef $ac_func
24290
24291 /* Override any gcc2 internal prototype to avoid an error.  */
24292 #ifdef __cplusplus
24293 extern "C"
24294 {
24295 #endif
24296 /* We use char because int might match the return type of a gcc2
24297    builtin and then its argument prototype would still apply.  */
24298 char $ac_func ();
24299 /* The GNU C library defines this for functions which it implements
24300     to always fail with ENOSYS.  Some functions are actually named
24301     something starting with __ and the normal name is an alias.  */
24302 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24303 choke me
24304 #else
24305 char (*f) () = $ac_func;
24306 #endif
24307 #ifdef __cplusplus
24308 }
24309 #endif
24310
24311 int
24312 main ()
24313 {
24314 return f != $ac_func;
24315   ;
24316   return 0;
24317 }
24318 _ACEOF
24319 rm -f conftest.$ac_objext conftest$ac_exeext
24320 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24321   (eval $ac_link) 2>conftest.er1
24322   ac_status=$?
24323   grep -v '^ *+' conftest.er1 >conftest.err
24324   rm -f conftest.er1
24325   cat conftest.err >&5
24326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24327   (exit $ac_status); } &&
24328          { ac_try='test -z "$ac_c_werror_flag"
24329                          || test ! -s conftest.err'
24330   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24331   (eval $ac_try) 2>&5
24332   ac_status=$?
24333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24334   (exit $ac_status); }; } &&
24335          { ac_try='test -s conftest$ac_exeext'
24336   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24337   (eval $ac_try) 2>&5
24338   ac_status=$?
24339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24340   (exit $ac_status); }; }; then
24341   eval "$as_ac_var=yes"
24342 else
24343   echo "$as_me: failed program was:" >&5
24344 sed 's/^/| /' conftest.$ac_ext >&5
24345
24346 eval "$as_ac_var=no"
24347 fi
24348 rm -f conftest.err conftest.$ac_objext \
24349       conftest$ac_exeext conftest.$ac_ext
24350 fi
24351 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24352 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24353 if test `eval echo '${'$as_ac_var'}'` = yes; then
24354   cat >>confdefs.h <<_ACEOF
24355 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24356 _ACEOF
24357
24358 fi
24359 done
24360
24361
24362                                                                         echo "$as_me:$LINENO: checking for pthread_detach with <pthread.h>" >&5
24363 echo $ECHO_N "checking for pthread_detach with <pthread.h>... $ECHO_C" >&6
24364 if test "${ol_cv_func_pthread_detach+set}" = set; then
24365   echo $ECHO_N "(cached) $ECHO_C" >&6
24366 else
24367
24368                                                                 cat >conftest.$ac_ext <<_ACEOF
24369 /* confdefs.h.  */
24370 _ACEOF
24371 cat confdefs.h >>conftest.$ac_ext
24372 cat >>conftest.$ac_ext <<_ACEOF
24373 /* end confdefs.h.  */
24374
24375 #include <pthread.h>
24376 #ifndef NULL
24377 #define NULL (void*)0
24378 #endif
24379
24380 int
24381 main ()
24382 {
24383 pthread_detach(NULL);
24384   ;
24385   return 0;
24386 }
24387 _ACEOF
24388 rm -f conftest.$ac_objext conftest$ac_exeext
24389 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24390   (eval $ac_link) 2>conftest.er1
24391   ac_status=$?
24392   grep -v '^ *+' conftest.er1 >conftest.err
24393   rm -f conftest.er1
24394   cat conftest.err >&5
24395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24396   (exit $ac_status); } &&
24397          { ac_try='test -z "$ac_c_werror_flag"
24398                          || test ! -s conftest.err'
24399   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24400   (eval $ac_try) 2>&5
24401   ac_status=$?
24402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24403   (exit $ac_status); }; } &&
24404          { ac_try='test -s conftest$ac_exeext'
24405   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24406   (eval $ac_try) 2>&5
24407   ac_status=$?
24408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24409   (exit $ac_status); }; }; then
24410   ol_cv_func_pthread_detach=yes
24411 else
24412   echo "$as_me: failed program was:" >&5
24413 sed 's/^/| /' conftest.$ac_ext >&5
24414
24415 ol_cv_func_pthread_detach=no
24416 fi
24417 rm -f conftest.err conftest.$ac_objext \
24418       conftest$ac_exeext conftest.$ac_ext
24419
24420 fi
24421 echo "$as_me:$LINENO: result: $ol_cv_func_pthread_detach" >&5
24422 echo "${ECHO_T}$ol_cv_func_pthread_detach" >&6
24423
24424                         if test $ol_cv_func_pthread_detach = no ; then
24425                                 { { echo "$as_me:$LINENO: error: could not locate pthread_detach()" >&5
24426 echo "$as_me: error: could not locate pthread_detach()" >&2;}
24427    { (exit 1); exit 1; }; }
24428                         fi
24429
24430
24431 cat >>confdefs.h <<\_ACEOF
24432 #define HAVE_PTHREAD_DETACH 1
24433 _ACEOF
24434
24435
24436
24437
24438
24439
24440 for ac_func in \
24441                                 pthread_setconcurrency \
24442                                 pthread_getconcurrency \
24443                                 thr_setconcurrency \
24444                                 thr_getconcurrency \
24445
24446 do
24447 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24448 echo "$as_me:$LINENO: checking for $ac_func" >&5
24449 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24450 if eval "test \"\${$as_ac_var+set}\" = set"; then
24451   echo $ECHO_N "(cached) $ECHO_C" >&6
24452 else
24453   cat >conftest.$ac_ext <<_ACEOF
24454 /* confdefs.h.  */
24455 _ACEOF
24456 cat confdefs.h >>conftest.$ac_ext
24457 cat >>conftest.$ac_ext <<_ACEOF
24458 /* end confdefs.h.  */
24459 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24460    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24461 #define $ac_func innocuous_$ac_func
24462
24463 /* System header to define __stub macros and hopefully few prototypes,
24464     which can conflict with char $ac_func (); below.
24465     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24466     <limits.h> exists even on freestanding compilers.  */
24467
24468 #ifdef __STDC__
24469 # include <limits.h>
24470 #else
24471 # include <assert.h>
24472 #endif
24473
24474 #undef $ac_func
24475
24476 /* Override any gcc2 internal prototype to avoid an error.  */
24477 #ifdef __cplusplus
24478 extern "C"
24479 {
24480 #endif
24481 /* We use char because int might match the return type of a gcc2
24482    builtin and then its argument prototype would still apply.  */
24483 char $ac_func ();
24484 /* The GNU C library defines this for functions which it implements
24485     to always fail with ENOSYS.  Some functions are actually named
24486     something starting with __ and the normal name is an alias.  */
24487 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24488 choke me
24489 #else
24490 char (*f) () = $ac_func;
24491 #endif
24492 #ifdef __cplusplus
24493 }
24494 #endif
24495
24496 int
24497 main ()
24498 {
24499 return f != $ac_func;
24500   ;
24501   return 0;
24502 }
24503 _ACEOF
24504 rm -f conftest.$ac_objext conftest$ac_exeext
24505 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24506   (eval $ac_link) 2>conftest.er1
24507   ac_status=$?
24508   grep -v '^ *+' conftest.er1 >conftest.err
24509   rm -f conftest.er1
24510   cat conftest.err >&5
24511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24512   (exit $ac_status); } &&
24513          { ac_try='test -z "$ac_c_werror_flag"
24514                          || test ! -s conftest.err'
24515   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24516   (eval $ac_try) 2>&5
24517   ac_status=$?
24518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24519   (exit $ac_status); }; } &&
24520          { ac_try='test -s conftest$ac_exeext'
24521   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24522   (eval $ac_try) 2>&5
24523   ac_status=$?
24524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24525   (exit $ac_status); }; }; then
24526   eval "$as_ac_var=yes"
24527 else
24528   echo "$as_me: failed program was:" >&5
24529 sed 's/^/| /' conftest.$ac_ext >&5
24530
24531 eval "$as_ac_var=no"
24532 fi
24533 rm -f conftest.err conftest.$ac_objext \
24534       conftest$ac_exeext conftest.$ac_ext
24535 fi
24536 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24537 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24538 if test `eval echo '${'$as_ac_var'}'` = yes; then
24539   cat >>confdefs.h <<_ACEOF
24540 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24541 _ACEOF
24542
24543 fi
24544 done
24545
24546
24547
24548
24549 for ac_func in pthread_kill_other_threads_np
24550 do
24551 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24552 echo "$as_me:$LINENO: checking for $ac_func" >&5
24553 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24554 if eval "test \"\${$as_ac_var+set}\" = set"; then
24555   echo $ECHO_N "(cached) $ECHO_C" >&6
24556 else
24557   cat >conftest.$ac_ext <<_ACEOF
24558 /* confdefs.h.  */
24559 _ACEOF
24560 cat confdefs.h >>conftest.$ac_ext
24561 cat >>conftest.$ac_ext <<_ACEOF
24562 /* end confdefs.h.  */
24563 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24564    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24565 #define $ac_func innocuous_$ac_func
24566
24567 /* System header to define __stub macros and hopefully few prototypes,
24568     which can conflict with char $ac_func (); below.
24569     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24570     <limits.h> exists even on freestanding compilers.  */
24571
24572 #ifdef __STDC__
24573 # include <limits.h>
24574 #else
24575 # include <assert.h>
24576 #endif
24577
24578 #undef $ac_func
24579
24580 /* Override any gcc2 internal prototype to avoid an error.  */
24581 #ifdef __cplusplus
24582 extern "C"
24583 {
24584 #endif
24585 /* We use char because int might match the return type of a gcc2
24586    builtin and then its argument prototype would still apply.  */
24587 char $ac_func ();
24588 /* The GNU C library defines this for functions which it implements
24589     to always fail with ENOSYS.  Some functions are actually named
24590     something starting with __ and the normal name is an alias.  */
24591 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24592 choke me
24593 #else
24594 char (*f) () = $ac_func;
24595 #endif
24596 #ifdef __cplusplus
24597 }
24598 #endif
24599
24600 int
24601 main ()
24602 {
24603 return f != $ac_func;
24604   ;
24605   return 0;
24606 }
24607 _ACEOF
24608 rm -f conftest.$ac_objext conftest$ac_exeext
24609 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24610   (eval $ac_link) 2>conftest.er1
24611   ac_status=$?
24612   grep -v '^ *+' conftest.er1 >conftest.err
24613   rm -f conftest.er1
24614   cat conftest.err >&5
24615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24616   (exit $ac_status); } &&
24617          { ac_try='test -z "$ac_c_werror_flag"
24618                          || test ! -s conftest.err'
24619   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24620   (eval $ac_try) 2>&5
24621   ac_status=$?
24622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24623   (exit $ac_status); }; } &&
24624          { ac_try='test -s conftest$ac_exeext'
24625   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24626   (eval $ac_try) 2>&5
24627   ac_status=$?
24628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24629   (exit $ac_status); }; }; then
24630   eval "$as_ac_var=yes"
24631 else
24632   echo "$as_me: failed program was:" >&5
24633 sed 's/^/| /' conftest.$ac_ext >&5
24634
24635 eval "$as_ac_var=no"
24636 fi
24637 rm -f conftest.err conftest.$ac_objext \
24638       conftest$ac_exeext conftest.$ac_ext
24639 fi
24640 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24641 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24642 if test `eval echo '${'$as_ac_var'}'` = yes; then
24643   cat >>confdefs.h <<_ACEOF
24644 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24645 _ACEOF
24646
24647 fi
24648 done
24649
24650         echo "$as_me:$LINENO: checking for LinuxThreads implementation" >&5
24651 echo $ECHO_N "checking for LinuxThreads implementation... $ECHO_C" >&6
24652 if test "${ol_cv_sys_linux_threads+set}" = set; then
24653   echo $ECHO_N "(cached) $ECHO_C" >&6
24654 else
24655   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
24656 fi
24657 echo "$as_me:$LINENO: result: $ol_cv_sys_linux_threads" >&5
24658 echo "${ECHO_T}$ol_cv_sys_linux_threads" >&6
24659
24660
24661
24662
24663         echo "$as_me:$LINENO: checking for LinuxThreads consistency" >&5
24664 echo $ECHO_N "checking for LinuxThreads consistency... $ECHO_C" >&6
24665 if test "${ol_cv_linux_threads+set}" = set; then
24666   echo $ECHO_N "(cached) $ECHO_C" >&6
24667 else
24668
24669                 if test $ol_cv_header_linux_threads = yes &&
24670                    test $ol_cv_sys_linux_threads = yes; then
24671                         ol_cv_linux_threads=yes
24672                 elif test $ol_cv_header_linux_threads = no &&
24673                      test $ol_cv_sys_linux_threads = no; then
24674                         ol_cv_linux_threads=no
24675                 else
24676                         ol_cv_linux_threads=error
24677                 fi
24678
24679 fi
24680 echo "$as_me:$LINENO: result: $ol_cv_linux_threads" >&5
24681 echo "${ECHO_T}$ol_cv_linux_threads" >&6
24682
24683
24684                         if test $ol_cv_linux_threads = error; then
24685                                 { { echo "$as_me:$LINENO: error: LinuxThreads header/library mismatch" >&5
24686 echo "$as_me: error: LinuxThreads header/library mismatch" >&2;}
24687    { (exit 1); exit 1; }; };
24688                         fi
24689
24690                         echo "$as_me:$LINENO: checking if pthread_create() works" >&5
24691 echo $ECHO_N "checking if pthread_create() works... $ECHO_C" >&6
24692 if test "${ol_cv_pthread_create_works+set}" = set; then
24693   echo $ECHO_N "(cached) $ECHO_C" >&6
24694 else
24695
24696                         if test "$cross_compiling" = yes; then
24697                                 ol_cv_pthread_create_works=yes
24698 else
24699   cat >conftest.$ac_ext <<_ACEOF
24700 /* confdefs.h.  */
24701 _ACEOF
24702 cat confdefs.h >>conftest.$ac_ext
24703 cat >>conftest.$ac_ext <<_ACEOF
24704 /* end confdefs.h.  */
24705
24706 /* pthread test headers */
24707 #include <pthread.h>
24708 #if HAVE_PTHREADS < 7
24709 #include <errno.h>
24710 #endif
24711 #ifndef NULL
24712 #define NULL (void*)0
24713 #endif
24714
24715 static void *task(p)
24716         void *p;
24717 {
24718         return (void *) (p == NULL);
24719 }
24720
24721
24722 int main(argc, argv)
24723         int argc;
24724         char **argv;
24725 {
24726
24727         /* pthread test function */
24728 #ifndef PTHREAD_CREATE_DETACHED
24729 #define PTHREAD_CREATE_DETACHED 1
24730 #endif
24731         pthread_t t;
24732         int status;
24733         int detach = PTHREAD_CREATE_DETACHED;
24734
24735 #if HAVE_PTHREADS > 4
24736         /* Final pthreads */
24737         pthread_attr_t attr;
24738
24739         status = pthread_attr_init(&attr);
24740         if( status ) return status;
24741
24742 #if HAVE_PTHREADS < 7
24743         status = pthread_attr_setdetachstate(&attr, &detach);
24744         if( status < 0 ) status = errno;
24745 #else
24746         status = pthread_attr_setdetachstate(&attr, detach);
24747 #endif
24748         if( status ) return status;
24749         status = pthread_create( &t, &attr, task, NULL );
24750 #if HAVE_PTHREADS < 7
24751         if( status < 0 ) status = errno;
24752 #endif
24753         if( status ) return status;
24754 #else
24755         /* Draft 4 pthreads */
24756         status = pthread_create( &t, pthread_attr_default, task, NULL );
24757         if( status ) return errno;
24758
24759         /* give thread a chance to complete */
24760         /* it should remain joinable and hence detachable */
24761         sleep( 1 );
24762
24763         status = pthread_detach( &t );
24764         if( status ) return errno;
24765 #endif
24766
24767 #ifdef HAVE_LINUX_THREADS
24768         pthread_kill_other_threads_np();
24769 #endif
24770
24771         return 0;
24772
24773 }
24774
24775 _ACEOF
24776 rm -f conftest$ac_exeext
24777 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24778   (eval $ac_link) 2>&5
24779   ac_status=$?
24780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24781   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24782   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24783   (eval $ac_try) 2>&5
24784   ac_status=$?
24785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24786   (exit $ac_status); }; }; then
24787   ol_cv_pthread_create_works=yes
24788 else
24789   echo "$as_me: program exited with status $ac_status" >&5
24790 echo "$as_me: failed program was:" >&5
24791 sed 's/^/| /' conftest.$ac_ext >&5
24792
24793 ( exit $ac_status )
24794 ol_cv_pthread_create_works=no
24795 fi
24796 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24797 fi
24798 fi
24799 echo "$as_me:$LINENO: result: $ol_cv_pthread_create_works" >&5
24800 echo "${ECHO_T}$ol_cv_pthread_create_works" >&6
24801
24802                         if test $ol_cv_pthread_create_works = no ; then
24803                                 { { echo "$as_me:$LINENO: error: pthread_create is not usable, check environment settings" >&5
24804 echo "$as_me: error: pthread_create is not usable, check environment settings" >&2;}
24805    { (exit 1); exit 1; }; }
24806                         fi
24807
24808                         ol_replace_broken_yield=no
24809
24810                         if test $ol_replace_broken_yield = yes ; then
24811
24812 cat >>confdefs.h <<\_ACEOF
24813 #define REPLACE_BROKEN_YIELD 1
24814 _ACEOF
24815
24816                         fi
24817
24818                                                 if test $ol_with_yielding_select = auto ; then
24819                                 echo "$as_me:$LINENO: checking if select yields when using pthreads" >&5
24820 echo $ECHO_N "checking if select yields when using pthreads... $ECHO_C" >&6
24821 if test "${ol_cv_pthread_select_yields+set}" = set; then
24822   echo $ECHO_N "(cached) $ECHO_C" >&6
24823 else
24824
24825                                 if test "$cross_compiling" = yes; then
24826   ol_cv_pthread_select_yields=cross
24827 else
24828   cat >conftest.$ac_ext <<_ACEOF
24829 /* confdefs.h.  */
24830 _ACEOF
24831 cat confdefs.h >>conftest.$ac_ext
24832 cat >>conftest.$ac_ext <<_ACEOF
24833 /* end confdefs.h.  */
24834
24835 #include <sys/types.h>
24836 #include <sys/time.h>
24837 #include <unistd.h>
24838 #include <pthread.h>
24839 #ifndef NULL
24840 #define NULL (void*) 0
24841 #endif
24842
24843 static int fildes[2];
24844
24845 static void *task(p)
24846         void *p;
24847 {
24848         int i;
24849         struct timeval tv;
24850
24851         fd_set rfds;
24852
24853         tv.tv_sec=10;
24854         tv.tv_usec=0;
24855
24856         FD_ZERO(&rfds);
24857         FD_SET(fildes[0], &rfds);
24858
24859         /* we're not interested in any fds */
24860         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
24861
24862         if(i < 0) {
24863                 perror("select");
24864                 exit(10);
24865         }
24866
24867         exit(0); /* if we exit here, the select blocked the whole process */
24868 }
24869
24870 int main(argc, argv)
24871         int argc;
24872         char **argv;
24873 {
24874         pthread_t t;
24875
24876         /* create a pipe to select */
24877         if(pipe(&fildes[0])) {
24878                 perror("select");
24879                 exit(1);
24880         }
24881
24882 #ifdef HAVE_PTHREAD_SETCONCURRENCY
24883         (void) pthread_setconcurrency(2);
24884 #else
24885 #ifdef HAVE_THR_SETCONCURRENCY
24886         /* Set Solaris LWP concurrency to 2 */
24887         thr_setconcurrency(2);
24888 #endif
24889 #endif
24890
24891 #if HAVE_PTHREADS < 6
24892         pthread_create(&t, pthread_attr_default, task, NULL);
24893 #else
24894         pthread_create(&t, NULL, task, NULL);
24895 #endif
24896
24897         /* make sure task runs first */
24898 #if HAVE_THR_YIELD
24899         thr_yield();
24900 #elif defined( HAVE_SCHED_YIELD )
24901         sched_yield();
24902 #elif defined( HAVE_PTHREAD_YIELD )
24903         pthread_yield();
24904 #endif
24905
24906         exit(2);
24907 }
24908 _ACEOF
24909 rm -f conftest$ac_exeext
24910 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24911   (eval $ac_link) 2>&5
24912   ac_status=$?
24913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24914   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24915   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24916   (eval $ac_try) 2>&5
24917   ac_status=$?
24918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24919   (exit $ac_status); }; }; then
24920   ol_cv_pthread_select_yields=no
24921 else
24922   echo "$as_me: program exited with status $ac_status" >&5
24923 echo "$as_me: failed program was:" >&5
24924 sed 's/^/| /' conftest.$ac_ext >&5
24925
24926 ( exit $ac_status )
24927 ol_cv_pthread_select_yields=yes
24928 fi
24929 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24930 fi
24931 fi
24932 echo "$as_me:$LINENO: result: $ol_cv_pthread_select_yields" >&5
24933 echo "${ECHO_T}$ol_cv_pthread_select_yields" >&6
24934
24935                                 if test $ol_cv_pthread_select_yields = cross ; then
24936                                         { { echo "$as_me:$LINENO: error: crossing compiling: use --with-yielding_select=yes|no|manual" >&5
24937 echo "$as_me: error: crossing compiling: use --with-yielding_select=yes|no|manual" >&2;}
24938    { (exit 1); exit 1; }; }
24939                                 fi
24940
24941                                 if test $ol_cv_pthread_select_yields = yes ; then
24942                                         ol_with_yielding_select=yes
24943                                 fi
24944                         fi
24945
24946                                                 CPPFLAGS="$save_CPPFLAGS"
24947                         LIBS="$save_LIBS"
24948                 else
24949                         { { echo "$as_me:$LINENO: error: could not locate usable POSIX Threads" >&5
24950 echo "$as_me: error: could not locate usable POSIX Threads" >&2;}
24951    { (exit 1); exit 1; }; }
24952                 fi
24953         fi
24954
24955         if test $ol_with_threads = posix ; then
24956                 { { echo "$as_me:$LINENO: error: could not locate POSIX Threads" >&5
24957 echo "$as_me: error: could not locate POSIX Threads" >&2;}
24958    { (exit 1); exit 1; }; }
24959         fi
24960         ;;
24961 esac
24962
24963 case $ol_with_threads in auto | yes | mach)
24964
24965
24966
24967 for ac_header in mach/cthreads.h cthreads.h
24968 do
24969 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24970 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24971   echo "$as_me:$LINENO: checking for $ac_header" >&5
24972 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24973 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24974   echo $ECHO_N "(cached) $ECHO_C" >&6
24975 fi
24976 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
24977 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24978 else
24979   # Is the header compilable?
24980 echo "$as_me:$LINENO: checking $ac_header usability" >&5
24981 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
24982 cat >conftest.$ac_ext <<_ACEOF
24983 /* confdefs.h.  */
24984 _ACEOF
24985 cat confdefs.h >>conftest.$ac_ext
24986 cat >>conftest.$ac_ext <<_ACEOF
24987 /* end confdefs.h.  */
24988 $ac_includes_default
24989 #include <$ac_header>
24990 _ACEOF
24991 rm -f conftest.$ac_objext
24992 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
24993   (eval $ac_compile) 2>conftest.er1
24994   ac_status=$?
24995   grep -v '^ *+' conftest.er1 >conftest.err
24996   rm -f conftest.er1
24997   cat conftest.err >&5
24998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24999   (exit $ac_status); } &&
25000          { ac_try='test -z "$ac_c_werror_flag"
25001                          || test ! -s conftest.err'
25002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25003   (eval $ac_try) 2>&5
25004   ac_status=$?
25005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25006   (exit $ac_status); }; } &&
25007          { ac_try='test -s conftest.$ac_objext'
25008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25009   (eval $ac_try) 2>&5
25010   ac_status=$?
25011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25012   (exit $ac_status); }; }; then
25013   ac_header_compiler=yes
25014 else
25015   echo "$as_me: failed program was:" >&5
25016 sed 's/^/| /' conftest.$ac_ext >&5
25017
25018 ac_header_compiler=no
25019 fi
25020 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25021 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25022 echo "${ECHO_T}$ac_header_compiler" >&6
25023
25024 # Is the header present?
25025 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25026 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
25027 cat >conftest.$ac_ext <<_ACEOF
25028 /* confdefs.h.  */
25029 _ACEOF
25030 cat confdefs.h >>conftest.$ac_ext
25031 cat >>conftest.$ac_ext <<_ACEOF
25032 /* end confdefs.h.  */
25033 #include <$ac_header>
25034 _ACEOF
25035 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25036   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25037   ac_status=$?
25038   grep -v '^ *+' conftest.er1 >conftest.err
25039   rm -f conftest.er1
25040   cat conftest.err >&5
25041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25042   (exit $ac_status); } >/dev/null; then
25043   if test -s conftest.err; then
25044     ac_cpp_err=$ac_c_preproc_warn_flag
25045     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25046   else
25047     ac_cpp_err=
25048   fi
25049 else
25050   ac_cpp_err=yes
25051 fi
25052 if test -z "$ac_cpp_err"; then
25053   ac_header_preproc=yes
25054 else
25055   echo "$as_me: failed program was:" >&5
25056 sed 's/^/| /' conftest.$ac_ext >&5
25057
25058   ac_header_preproc=no
25059 fi
25060 rm -f conftest.err conftest.$ac_ext
25061 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25062 echo "${ECHO_T}$ac_header_preproc" >&6
25063
25064 # So?  What about this header?
25065 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25066   yes:no: )
25067     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25068 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25069     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25070 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25071     ac_header_preproc=yes
25072     ;;
25073   no:yes:* )
25074     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25075 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25076     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25077 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25078     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25079 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25080     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25081 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25082     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25083 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25084     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25085 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25086     (
25087       cat <<\_ASBOX
25088 ## --------------------------------------------- ##
25089 ## Report this to <http://www.openldap.org/its/> ##
25090 ## --------------------------------------------- ##
25091 _ASBOX
25092     ) |
25093       sed "s/^/$as_me: WARNING:     /" >&2
25094     ;;
25095 esac
25096 echo "$as_me:$LINENO: checking for $ac_header" >&5
25097 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25098 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25099   echo $ECHO_N "(cached) $ECHO_C" >&6
25100 else
25101   eval "$as_ac_Header=\$ac_header_preproc"
25102 fi
25103 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25104 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25105
25106 fi
25107 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25108   cat >>confdefs.h <<_ACEOF
25109 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25110 _ACEOF
25111
25112 fi
25113
25114 done
25115
25116         if test $ac_cv_header_mach_cthreads_h = yes ; then
25117                 ol_with_threads=found
25118
25119                                 echo "$as_me:$LINENO: checking for cthread_fork" >&5
25120 echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6
25121 if test "${ac_cv_func_cthread_fork+set}" = set; then
25122   echo $ECHO_N "(cached) $ECHO_C" >&6
25123 else
25124   cat >conftest.$ac_ext <<_ACEOF
25125 /* confdefs.h.  */
25126 _ACEOF
25127 cat confdefs.h >>conftest.$ac_ext
25128 cat >>conftest.$ac_ext <<_ACEOF
25129 /* end confdefs.h.  */
25130 /* Define cthread_fork to an innocuous variant, in case <limits.h> declares cthread_fork.
25131    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
25132 #define cthread_fork innocuous_cthread_fork
25133
25134 /* System header to define __stub macros and hopefully few prototypes,
25135     which can conflict with char cthread_fork (); below.
25136     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25137     <limits.h> exists even on freestanding compilers.  */
25138
25139 #ifdef __STDC__
25140 # include <limits.h>
25141 #else
25142 # include <assert.h>
25143 #endif
25144
25145 #undef cthread_fork
25146
25147 /* Override any gcc2 internal prototype to avoid an error.  */
25148 #ifdef __cplusplus
25149 extern "C"
25150 {
25151 #endif
25152 /* We use char because int might match the return type of a gcc2
25153    builtin and then its argument prototype would still apply.  */
25154 char cthread_fork ();
25155 /* The GNU C library defines this for functions which it implements
25156     to always fail with ENOSYS.  Some functions are actually named
25157     something starting with __ and the normal name is an alias.  */
25158 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
25159 choke me
25160 #else
25161 char (*f) () = cthread_fork;
25162 #endif
25163 #ifdef __cplusplus
25164 }
25165 #endif
25166
25167 int
25168 main ()
25169 {
25170 return f != cthread_fork;
25171   ;
25172   return 0;
25173 }
25174 _ACEOF
25175 rm -f conftest.$ac_objext conftest$ac_exeext
25176 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25177   (eval $ac_link) 2>conftest.er1
25178   ac_status=$?
25179   grep -v '^ *+' conftest.er1 >conftest.err
25180   rm -f conftest.er1
25181   cat conftest.err >&5
25182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25183   (exit $ac_status); } &&
25184          { ac_try='test -z "$ac_c_werror_flag"
25185                          || test ! -s conftest.err'
25186   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25187   (eval $ac_try) 2>&5
25188   ac_status=$?
25189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25190   (exit $ac_status); }; } &&
25191          { ac_try='test -s conftest$ac_exeext'
25192   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25193   (eval $ac_try) 2>&5
25194   ac_status=$?
25195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25196   (exit $ac_status); }; }; then
25197   ac_cv_func_cthread_fork=yes
25198 else
25199   echo "$as_me: failed program was:" >&5
25200 sed 's/^/| /' conftest.$ac_ext >&5
25201
25202 ac_cv_func_cthread_fork=no
25203 fi
25204 rm -f conftest.err conftest.$ac_objext \
25205       conftest$ac_exeext conftest.$ac_ext
25206 fi
25207 echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5
25208 echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6
25209 if test $ac_cv_func_cthread_fork = yes; then
25210   ol_link_threads=yes
25211 fi
25212
25213
25214                 if test $ol_link_threads = no ; then
25215                                                                         echo "$as_me:$LINENO: checking for cthread_fork with -all_load" >&5
25216 echo $ECHO_N "checking for cthread_fork with -all_load... $ECHO_C" >&6
25217 if test "${ol_cv_cthread_all_load+set}" = set; then
25218   echo $ECHO_N "(cached) $ECHO_C" >&6
25219 else
25220
25221                                                                 save_LIBS="$LIBS"
25222                                 LIBS="-all_load $LIBS"
25223                                 cat >conftest.$ac_ext <<_ACEOF
25224 /* confdefs.h.  */
25225 _ACEOF
25226 cat confdefs.h >>conftest.$ac_ext
25227 cat >>conftest.$ac_ext <<_ACEOF
25228 /* end confdefs.h.  */
25229 #include <mach/cthreads.h>
25230 int
25231 main ()
25232 {
25233
25234                                         cthread_fork((void *)0, (void *)0);
25235
25236   ;
25237   return 0;
25238 }
25239 _ACEOF
25240 rm -f conftest.$ac_objext conftest$ac_exeext
25241 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25242   (eval $ac_link) 2>conftest.er1
25243   ac_status=$?
25244   grep -v '^ *+' conftest.er1 >conftest.err
25245   rm -f conftest.er1
25246   cat conftest.err >&5
25247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25248   (exit $ac_status); } &&
25249          { ac_try='test -z "$ac_c_werror_flag"
25250                          || test ! -s conftest.err'
25251   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25252   (eval $ac_try) 2>&5
25253   ac_status=$?
25254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25255   (exit $ac_status); }; } &&
25256          { ac_try='test -s conftest$ac_exeext'
25257   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25258   (eval $ac_try) 2>&5
25259   ac_status=$?
25260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25261   (exit $ac_status); }; }; then
25262   ol_cv_cthread_all_load=yes
25263 else
25264   echo "$as_me: failed program was:" >&5
25265 sed 's/^/| /' conftest.$ac_ext >&5
25266
25267 ol_cv_cthread_all_load=no
25268 fi
25269 rm -f conftest.err conftest.$ac_objext \
25270       conftest$ac_exeext conftest.$ac_ext
25271                                                                 LIBS="$save_LIBS"
25272
25273 fi
25274 echo "$as_me:$LINENO: result: $ol_cv_cthread_all_load" >&5
25275 echo "${ECHO_T}$ol_cv_cthread_all_load" >&6
25276
25277                         if test $ol_cv_cthread_all_load = yes ; then
25278                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
25279                                 ol_link_threads=mach
25280                                 ol_with_threads=found
25281                         fi
25282                 fi
25283
25284         elif test $ac_cv_header_cthreads_h = yes ; then
25285
25286                 ol_with_threads=found
25287
25288                                 save_LIBS="$LIBS"
25289                 LIBS="$LIBS -lthreads"
25290                 echo "$as_me:$LINENO: checking for cthread_fork" >&5
25291 echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6
25292 if test "${ac_cv_func_cthread_fork+set}" = set; then
25293   echo $ECHO_N "(cached) $ECHO_C" >&6
25294 else
25295   cat >conftest.$ac_ext <<_ACEOF
25296 /* confdefs.h.  */
25297 _ACEOF
25298 cat confdefs.h >>conftest.$ac_ext
25299 cat >>conftest.$ac_ext <<_ACEOF
25300 /* end confdefs.h.  */
25301 /* Define cthread_fork to an innocuous variant, in case <limits.h> declares cthread_fork.
25302    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
25303 #define cthread_fork innocuous_cthread_fork
25304
25305 /* System header to define __stub macros and hopefully few prototypes,
25306     which can conflict with char cthread_fork (); below.
25307     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25308     <limits.h> exists even on freestanding compilers.  */
25309
25310 #ifdef __STDC__
25311 # include <limits.h>
25312 #else
25313 # include <assert.h>
25314 #endif
25315
25316 #undef cthread_fork
25317
25318 /* Override any gcc2 internal prototype to avoid an error.  */
25319 #ifdef __cplusplus
25320 extern "C"
25321 {
25322 #endif
25323 /* We use char because int might match the return type of a gcc2
25324    builtin and then its argument prototype would still apply.  */
25325 char cthread_fork ();
25326 /* The GNU C library defines this for functions which it implements
25327     to always fail with ENOSYS.  Some functions are actually named
25328     something starting with __ and the normal name is an alias.  */
25329 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
25330 choke me
25331 #else
25332 char (*f) () = cthread_fork;
25333 #endif
25334 #ifdef __cplusplus
25335 }
25336 #endif
25337
25338 int
25339 main ()
25340 {
25341 return f != cthread_fork;
25342   ;
25343   return 0;
25344 }
25345 _ACEOF
25346 rm -f conftest.$ac_objext conftest$ac_exeext
25347 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25348   (eval $ac_link) 2>conftest.er1
25349   ac_status=$?
25350   grep -v '^ *+' conftest.er1 >conftest.err
25351   rm -f conftest.er1
25352   cat conftest.err >&5
25353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25354   (exit $ac_status); } &&
25355          { ac_try='test -z "$ac_c_werror_flag"
25356                          || test ! -s conftest.err'
25357   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25358   (eval $ac_try) 2>&5
25359   ac_status=$?
25360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25361   (exit $ac_status); }; } &&
25362          { ac_try='test -s conftest$ac_exeext'
25363   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25364   (eval $ac_try) 2>&5
25365   ac_status=$?
25366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25367   (exit $ac_status); }; }; then
25368   ac_cv_func_cthread_fork=yes
25369 else
25370   echo "$as_me: failed program was:" >&5
25371 sed 's/^/| /' conftest.$ac_ext >&5
25372
25373 ac_cv_func_cthread_fork=no
25374 fi
25375 rm -f conftest.err conftest.$ac_objext \
25376       conftest$ac_exeext conftest.$ac_ext
25377 fi
25378 echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5
25379 echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6
25380 if test $ac_cv_func_cthread_fork = yes; then
25381   ol_link_threads=yes
25382 fi
25383
25384                 LIBS="$save_LIBS"
25385
25386                 if test $ol_link_threads = yes ; then
25387                         LTHREAD_LIBS="-lthreads"
25388                         ol_link_threads=mach
25389                         ol_with_threads=found
25390                 else
25391                         { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5
25392 echo "$as_me: error: could not link with Mach CThreads" >&2;}
25393    { (exit 1); exit 1; }; }
25394                 fi
25395
25396         elif test $ol_with_threads = mach ; then
25397                 { { echo "$as_me:$LINENO: error: could not locate Mach CThreads" >&5
25398 echo "$as_me: error: could not locate Mach CThreads" >&2;}
25399    { (exit 1); exit 1; }; }
25400         fi
25401
25402         if test $ol_link_threads = mach ; then
25403
25404 cat >>confdefs.h <<\_ACEOF
25405 #define HAVE_MACH_CTHREADS 1
25406 _ACEOF
25407
25408         elif test $ol_with_threads = found ; then
25409                 { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5
25410 echo "$as_me: error: could not link with Mach CThreads" >&2;}
25411    { (exit 1); exit 1; }; }
25412         fi
25413         ;;
25414 esac
25415
25416 case $ol_with_threads in auto | yes | pth)
25417
25418
25419 for ac_header in pth.h
25420 do
25421 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25422 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25423   echo "$as_me:$LINENO: checking for $ac_header" >&5
25424 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25425 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25426   echo $ECHO_N "(cached) $ECHO_C" >&6
25427 fi
25428 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25429 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25430 else
25431   # Is the header compilable?
25432 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25433 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25434 cat >conftest.$ac_ext <<_ACEOF
25435 /* confdefs.h.  */
25436 _ACEOF
25437 cat confdefs.h >>conftest.$ac_ext
25438 cat >>conftest.$ac_ext <<_ACEOF
25439 /* end confdefs.h.  */
25440 $ac_includes_default
25441 #include <$ac_header>
25442 _ACEOF
25443 rm -f conftest.$ac_objext
25444 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25445   (eval $ac_compile) 2>conftest.er1
25446   ac_status=$?
25447   grep -v '^ *+' conftest.er1 >conftest.err
25448   rm -f conftest.er1
25449   cat conftest.err >&5
25450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25451   (exit $ac_status); } &&
25452          { ac_try='test -z "$ac_c_werror_flag"
25453                          || test ! -s conftest.err'
25454   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25455   (eval $ac_try) 2>&5
25456   ac_status=$?
25457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25458   (exit $ac_status); }; } &&
25459          { ac_try='test -s conftest.$ac_objext'
25460   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25461   (eval $ac_try) 2>&5
25462   ac_status=$?
25463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25464   (exit $ac_status); }; }; then
25465   ac_header_compiler=yes
25466 else
25467   echo "$as_me: failed program was:" >&5
25468 sed 's/^/| /' conftest.$ac_ext >&5
25469
25470 ac_header_compiler=no
25471 fi
25472 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25473 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25474 echo "${ECHO_T}$ac_header_compiler" >&6
25475
25476 # Is the header present?
25477 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25478 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
25479 cat >conftest.$ac_ext <<_ACEOF
25480 /* confdefs.h.  */
25481 _ACEOF
25482 cat confdefs.h >>conftest.$ac_ext
25483 cat >>conftest.$ac_ext <<_ACEOF
25484 /* end confdefs.h.  */
25485 #include <$ac_header>
25486 _ACEOF
25487 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25488   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25489   ac_status=$?
25490   grep -v '^ *+' conftest.er1 >conftest.err
25491   rm -f conftest.er1
25492   cat conftest.err >&5
25493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25494   (exit $ac_status); } >/dev/null; then
25495   if test -s conftest.err; then
25496     ac_cpp_err=$ac_c_preproc_warn_flag
25497     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25498   else
25499     ac_cpp_err=
25500   fi
25501 else
25502   ac_cpp_err=yes
25503 fi
25504 if test -z "$ac_cpp_err"; then
25505   ac_header_preproc=yes
25506 else
25507   echo "$as_me: failed program was:" >&5
25508 sed 's/^/| /' conftest.$ac_ext >&5
25509
25510   ac_header_preproc=no
25511 fi
25512 rm -f conftest.err conftest.$ac_ext
25513 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25514 echo "${ECHO_T}$ac_header_preproc" >&6
25515
25516 # So?  What about this header?
25517 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25518   yes:no: )
25519     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25520 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25521     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25522 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25523     ac_header_preproc=yes
25524     ;;
25525   no:yes:* )
25526     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25527 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25528     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25529 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25530     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25531 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25532     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25533 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25534     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25535 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25536     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25537 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25538     (
25539       cat <<\_ASBOX
25540 ## --------------------------------------------- ##
25541 ## Report this to <http://www.openldap.org/its/> ##
25542 ## --------------------------------------------- ##
25543 _ASBOX
25544     ) |
25545       sed "s/^/$as_me: WARNING:     /" >&2
25546     ;;
25547 esac
25548 echo "$as_me:$LINENO: checking for $ac_header" >&5
25549 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25550 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25551   echo $ECHO_N "(cached) $ECHO_C" >&6
25552 else
25553   eval "$as_ac_Header=\$ac_header_preproc"
25554 fi
25555 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25556 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25557
25558 fi
25559 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25560   cat >>confdefs.h <<_ACEOF
25561 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25562 _ACEOF
25563
25564 fi
25565
25566 done
25567
25568
25569         if test $ac_cv_header_pth_h = yes ; then
25570                 echo "$as_me:$LINENO: checking for pth_version in -lpth" >&5
25571 echo $ECHO_N "checking for pth_version in -lpth... $ECHO_C" >&6
25572 if test "${ac_cv_lib_pth_pth_version+set}" = set; then
25573   echo $ECHO_N "(cached) $ECHO_C" >&6
25574 else
25575   ac_check_lib_save_LIBS=$LIBS
25576 LIBS="-lpth  $LIBS"
25577 cat >conftest.$ac_ext <<_ACEOF
25578 /* confdefs.h.  */
25579 _ACEOF
25580 cat confdefs.h >>conftest.$ac_ext
25581 cat >>conftest.$ac_ext <<_ACEOF
25582 /* end confdefs.h.  */
25583
25584 /* Override any gcc2 internal prototype to avoid an error.  */
25585 #ifdef __cplusplus
25586 extern "C"
25587 #endif
25588 /* We use char because int might match the return type of a gcc2
25589    builtin and then its argument prototype would still apply.  */
25590 char pth_version ();
25591 int
25592 main ()
25593 {
25594 pth_version ();
25595   ;
25596   return 0;
25597 }
25598 _ACEOF
25599 rm -f conftest.$ac_objext conftest$ac_exeext
25600 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25601   (eval $ac_link) 2>conftest.er1
25602   ac_status=$?
25603   grep -v '^ *+' conftest.er1 >conftest.err
25604   rm -f conftest.er1
25605   cat conftest.err >&5
25606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25607   (exit $ac_status); } &&
25608          { ac_try='test -z "$ac_c_werror_flag"
25609                          || test ! -s conftest.err'
25610   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25611   (eval $ac_try) 2>&5
25612   ac_status=$?
25613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25614   (exit $ac_status); }; } &&
25615          { ac_try='test -s conftest$ac_exeext'
25616   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25617   (eval $ac_try) 2>&5
25618   ac_status=$?
25619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25620   (exit $ac_status); }; }; then
25621   ac_cv_lib_pth_pth_version=yes
25622 else
25623   echo "$as_me: failed program was:" >&5
25624 sed 's/^/| /' conftest.$ac_ext >&5
25625
25626 ac_cv_lib_pth_pth_version=no
25627 fi
25628 rm -f conftest.err conftest.$ac_objext \
25629       conftest$ac_exeext conftest.$ac_ext
25630 LIBS=$ac_check_lib_save_LIBS
25631 fi
25632 echo "$as_me:$LINENO: result: $ac_cv_lib_pth_pth_version" >&5
25633 echo "${ECHO_T}$ac_cv_lib_pth_pth_version" >&6
25634 if test $ac_cv_lib_pth_pth_version = yes; then
25635   have_pth=yes
25636 else
25637   have_pth=no
25638 fi
25639
25640
25641                 if test $have_pth = yes ; then
25642
25643 cat >>confdefs.h <<\_ACEOF
25644 #define HAVE_GNU_PTH 1
25645 _ACEOF
25646
25647                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
25648                         ol_link_threads=pth
25649                         ol_with_threads=found
25650
25651                         if test $ol_with_yielding_select = auto ; then
25652                                 ol_with_yielding_select=yes
25653                         fi
25654                 fi
25655         fi
25656         ;;
25657 esac
25658
25659 case $ol_with_threads in auto | yes | lwp)
25660
25661
25662
25663 for ac_header in thread.h synch.h
25664 do
25665 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25666 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25667   echo "$as_me:$LINENO: checking for $ac_header" >&5
25668 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25669 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25670   echo $ECHO_N "(cached) $ECHO_C" >&6
25671 fi
25672 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25673 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25674 else
25675   # Is the header compilable?
25676 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25677 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25678 cat >conftest.$ac_ext <<_ACEOF
25679 /* confdefs.h.  */
25680 _ACEOF
25681 cat confdefs.h >>conftest.$ac_ext
25682 cat >>conftest.$ac_ext <<_ACEOF
25683 /* end confdefs.h.  */
25684 $ac_includes_default
25685 #include <$ac_header>
25686 _ACEOF
25687 rm -f conftest.$ac_objext
25688 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25689   (eval $ac_compile) 2>conftest.er1
25690   ac_status=$?
25691   grep -v '^ *+' conftest.er1 >conftest.err
25692   rm -f conftest.er1
25693   cat conftest.err >&5
25694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25695   (exit $ac_status); } &&
25696          { ac_try='test -z "$ac_c_werror_flag"
25697                          || test ! -s conftest.err'
25698   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25699   (eval $ac_try) 2>&5
25700   ac_status=$?
25701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25702   (exit $ac_status); }; } &&
25703          { ac_try='test -s conftest.$ac_objext'
25704   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25705   (eval $ac_try) 2>&5
25706   ac_status=$?
25707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25708   (exit $ac_status); }; }; then
25709   ac_header_compiler=yes
25710 else
25711   echo "$as_me: failed program was:" >&5
25712 sed 's/^/| /' conftest.$ac_ext >&5
25713
25714 ac_header_compiler=no
25715 fi
25716 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25717 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25718 echo "${ECHO_T}$ac_header_compiler" >&6
25719
25720 # Is the header present?
25721 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25722 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
25723 cat >conftest.$ac_ext <<_ACEOF
25724 /* confdefs.h.  */
25725 _ACEOF
25726 cat confdefs.h >>conftest.$ac_ext
25727 cat >>conftest.$ac_ext <<_ACEOF
25728 /* end confdefs.h.  */
25729 #include <$ac_header>
25730 _ACEOF
25731 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25732   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25733   ac_status=$?
25734   grep -v '^ *+' conftest.er1 >conftest.err
25735   rm -f conftest.er1
25736   cat conftest.err >&5
25737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25738   (exit $ac_status); } >/dev/null; then
25739   if test -s conftest.err; then
25740     ac_cpp_err=$ac_c_preproc_warn_flag
25741     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25742   else
25743     ac_cpp_err=
25744   fi
25745 else
25746   ac_cpp_err=yes
25747 fi
25748 if test -z "$ac_cpp_err"; then
25749   ac_header_preproc=yes
25750 else
25751   echo "$as_me: failed program was:" >&5
25752 sed 's/^/| /' conftest.$ac_ext >&5
25753
25754   ac_header_preproc=no
25755 fi
25756 rm -f conftest.err conftest.$ac_ext
25757 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25758 echo "${ECHO_T}$ac_header_preproc" >&6
25759
25760 # So?  What about this header?
25761 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25762   yes:no: )
25763     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25764 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25765     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25766 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25767     ac_header_preproc=yes
25768     ;;
25769   no:yes:* )
25770     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25771 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25772     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25773 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25774     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25775 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25776     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25777 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25778     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25779 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25780     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25781 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25782     (
25783       cat <<\_ASBOX
25784 ## --------------------------------------------- ##
25785 ## Report this to <http://www.openldap.org/its/> ##
25786 ## --------------------------------------------- ##
25787 _ASBOX
25788     ) |
25789       sed "s/^/$as_me: WARNING:     /" >&2
25790     ;;
25791 esac
25792 echo "$as_me:$LINENO: checking for $ac_header" >&5
25793 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25794 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25795   echo $ECHO_N "(cached) $ECHO_C" >&6
25796 else
25797   eval "$as_ac_Header=\$ac_header_preproc"
25798 fi
25799 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25800 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25801
25802 fi
25803 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25804   cat >>confdefs.h <<_ACEOF
25805 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25806 _ACEOF
25807
25808 fi
25809
25810 done
25811
25812         if test $ac_cv_header_thread_h = yes &&
25813            test $ac_cv_header_synch_h = yes ; then
25814                 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
25815 echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
25816 if test "${ac_cv_lib_thread_thr_create+set}" = set; then
25817   echo $ECHO_N "(cached) $ECHO_C" >&6
25818 else
25819   ac_check_lib_save_LIBS=$LIBS
25820 LIBS="-lthread  $LIBS"
25821 cat >conftest.$ac_ext <<_ACEOF
25822 /* confdefs.h.  */
25823 _ACEOF
25824 cat confdefs.h >>conftest.$ac_ext
25825 cat >>conftest.$ac_ext <<_ACEOF
25826 /* end confdefs.h.  */
25827
25828 /* Override any gcc2 internal prototype to avoid an error.  */
25829 #ifdef __cplusplus
25830 extern "C"
25831 #endif
25832 /* We use char because int might match the return type of a gcc2
25833    builtin and then its argument prototype would still apply.  */
25834 char thr_create ();
25835 int
25836 main ()
25837 {
25838 thr_create ();
25839   ;
25840   return 0;
25841 }
25842 _ACEOF
25843 rm -f conftest.$ac_objext conftest$ac_exeext
25844 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25845   (eval $ac_link) 2>conftest.er1
25846   ac_status=$?
25847   grep -v '^ *+' conftest.er1 >conftest.err
25848   rm -f conftest.er1
25849   cat conftest.err >&5
25850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25851   (exit $ac_status); } &&
25852          { ac_try='test -z "$ac_c_werror_flag"
25853                          || test ! -s conftest.err'
25854   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25855   (eval $ac_try) 2>&5
25856   ac_status=$?
25857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25858   (exit $ac_status); }; } &&
25859          { ac_try='test -s conftest$ac_exeext'
25860   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25861   (eval $ac_try) 2>&5
25862   ac_status=$?
25863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25864   (exit $ac_status); }; }; then
25865   ac_cv_lib_thread_thr_create=yes
25866 else
25867   echo "$as_me: failed program was:" >&5
25868 sed 's/^/| /' conftest.$ac_ext >&5
25869
25870 ac_cv_lib_thread_thr_create=no
25871 fi
25872 rm -f conftest.err conftest.$ac_objext \
25873       conftest$ac_exeext conftest.$ac_ext
25874 LIBS=$ac_check_lib_save_LIBS
25875 fi
25876 echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
25877 echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
25878 if test $ac_cv_lib_thread_thr_create = yes; then
25879   have_thr=yes
25880 else
25881   have_thr=no
25882 fi
25883
25884
25885                 if test $have_thr = yes ; then
25886
25887 cat >>confdefs.h <<\_ACEOF
25888 #define HAVE_THR 1
25889 _ACEOF
25890
25891                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
25892                         ol_link_threads=thr
25893
25894                         if test $ol_with_yielding_select = auto ; then
25895                                 ol_with_yielding_select=yes
25896                         fi
25897
25898
25899
25900 for ac_func in \
25901                                 thr_setconcurrency \
25902                                 thr_getconcurrency \
25903
25904 do
25905 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
25906 echo "$as_me:$LINENO: checking for $ac_func" >&5
25907 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
25908 if eval "test \"\${$as_ac_var+set}\" = set"; then
25909   echo $ECHO_N "(cached) $ECHO_C" >&6
25910 else
25911   cat >conftest.$ac_ext <<_ACEOF
25912 /* confdefs.h.  */
25913 _ACEOF
25914 cat confdefs.h >>conftest.$ac_ext
25915 cat >>conftest.$ac_ext <<_ACEOF
25916 /* end confdefs.h.  */
25917 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
25918    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
25919 #define $ac_func innocuous_$ac_func
25920
25921 /* System header to define __stub macros and hopefully few prototypes,
25922     which can conflict with char $ac_func (); below.
25923     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25924     <limits.h> exists even on freestanding compilers.  */
25925
25926 #ifdef __STDC__
25927 # include <limits.h>
25928 #else
25929 # include <assert.h>
25930 #endif
25931
25932 #undef $ac_func
25933
25934 /* Override any gcc2 internal prototype to avoid an error.  */
25935 #ifdef __cplusplus
25936 extern "C"
25937 {
25938 #endif
25939 /* We use char because int might match the return type of a gcc2
25940    builtin and then its argument prototype would still apply.  */
25941 char $ac_func ();
25942 /* The GNU C library defines this for functions which it implements
25943     to always fail with ENOSYS.  Some functions are actually named
25944     something starting with __ and the normal name is an alias.  */
25945 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
25946 choke me
25947 #else
25948 char (*f) () = $ac_func;
25949 #endif
25950 #ifdef __cplusplus
25951 }
25952 #endif
25953
25954 int
25955 main ()
25956 {
25957 return f != $ac_func;
25958   ;
25959   return 0;
25960 }
25961 _ACEOF
25962 rm -f conftest.$ac_objext conftest$ac_exeext
25963 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25964   (eval $ac_link) 2>conftest.er1
25965   ac_status=$?
25966   grep -v '^ *+' conftest.er1 >conftest.err
25967   rm -f conftest.er1
25968   cat conftest.err >&5
25969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25970   (exit $ac_status); } &&
25971          { ac_try='test -z "$ac_c_werror_flag"
25972                          || test ! -s conftest.err'
25973   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25974   (eval $ac_try) 2>&5
25975   ac_status=$?
25976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25977   (exit $ac_status); }; } &&
25978          { ac_try='test -s conftest$ac_exeext'
25979   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25980   (eval $ac_try) 2>&5
25981   ac_status=$?
25982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25983   (exit $ac_status); }; }; then
25984   eval "$as_ac_var=yes"
25985 else
25986   echo "$as_me: failed program was:" >&5
25987 sed 's/^/| /' conftest.$ac_ext >&5
25988
25989 eval "$as_ac_var=no"
25990 fi
25991 rm -f conftest.err conftest.$ac_objext \
25992       conftest$ac_exeext conftest.$ac_ext
25993 fi
25994 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
25995 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
25996 if test `eval echo '${'$as_ac_var'}'` = yes; then
25997   cat >>confdefs.h <<_ACEOF
25998 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
25999 _ACEOF
26000
26001 fi
26002 done
26003
26004                 fi
26005         fi
26006
26007
26008 for ac_header in lwp/lwp.h
26009 do
26010 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26011 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26012   echo "$as_me:$LINENO: checking for $ac_header" >&5
26013 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26014 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26015   echo $ECHO_N "(cached) $ECHO_C" >&6
26016 fi
26017 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26018 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26019 else
26020   # Is the header compilable?
26021 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26022 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26023 cat >conftest.$ac_ext <<_ACEOF
26024 /* confdefs.h.  */
26025 _ACEOF
26026 cat confdefs.h >>conftest.$ac_ext
26027 cat >>conftest.$ac_ext <<_ACEOF
26028 /* end confdefs.h.  */
26029 $ac_includes_default
26030 #include <$ac_header>
26031 _ACEOF
26032 rm -f conftest.$ac_objext
26033 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26034   (eval $ac_compile) 2>conftest.er1
26035   ac_status=$?
26036   grep -v '^ *+' conftest.er1 >conftest.err
26037   rm -f conftest.er1
26038   cat conftest.err >&5
26039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26040   (exit $ac_status); } &&
26041          { ac_try='test -z "$ac_c_werror_flag"
26042                          || test ! -s conftest.err'
26043   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26044   (eval $ac_try) 2>&5
26045   ac_status=$?
26046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26047   (exit $ac_status); }; } &&
26048          { ac_try='test -s conftest.$ac_objext'
26049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26050   (eval $ac_try) 2>&5
26051   ac_status=$?
26052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26053   (exit $ac_status); }; }; then
26054   ac_header_compiler=yes
26055 else
26056   echo "$as_me: failed program was:" >&5
26057 sed 's/^/| /' conftest.$ac_ext >&5
26058
26059 ac_header_compiler=no
26060 fi
26061 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26062 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26063 echo "${ECHO_T}$ac_header_compiler" >&6
26064
26065 # Is the header present?
26066 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26067 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26068 cat >conftest.$ac_ext <<_ACEOF
26069 /* confdefs.h.  */
26070 _ACEOF
26071 cat confdefs.h >>conftest.$ac_ext
26072 cat >>conftest.$ac_ext <<_ACEOF
26073 /* end confdefs.h.  */
26074 #include <$ac_header>
26075 _ACEOF
26076 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26077   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26078   ac_status=$?
26079   grep -v '^ *+' conftest.er1 >conftest.err
26080   rm -f conftest.er1
26081   cat conftest.err >&5
26082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26083   (exit $ac_status); } >/dev/null; then
26084   if test -s conftest.err; then
26085     ac_cpp_err=$ac_c_preproc_warn_flag
26086     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26087   else
26088     ac_cpp_err=
26089   fi
26090 else
26091   ac_cpp_err=yes
26092 fi
26093 if test -z "$ac_cpp_err"; then
26094   ac_header_preproc=yes
26095 else
26096   echo "$as_me: failed program was:" >&5
26097 sed 's/^/| /' conftest.$ac_ext >&5
26098
26099   ac_header_preproc=no
26100 fi
26101 rm -f conftest.err conftest.$ac_ext
26102 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26103 echo "${ECHO_T}$ac_header_preproc" >&6
26104
26105 # So?  What about this header?
26106 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26107   yes:no: )
26108     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26109 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26110     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26111 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26112     ac_header_preproc=yes
26113     ;;
26114   no:yes:* )
26115     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26116 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26117     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26118 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26119     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26120 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26121     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26122 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26123     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26124 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26125     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26126 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26127     (
26128       cat <<\_ASBOX
26129 ## --------------------------------------------- ##
26130 ## Report this to <http://www.openldap.org/its/> ##
26131 ## --------------------------------------------- ##
26132 _ASBOX
26133     ) |
26134       sed "s/^/$as_me: WARNING:     /" >&2
26135     ;;
26136 esac
26137 echo "$as_me:$LINENO: checking for $ac_header" >&5
26138 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26139 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26140   echo $ECHO_N "(cached) $ECHO_C" >&6
26141 else
26142   eval "$as_ac_Header=\$ac_header_preproc"
26143 fi
26144 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26145 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26146
26147 fi
26148 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26149   cat >>confdefs.h <<_ACEOF
26150 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26151 _ACEOF
26152
26153 fi
26154
26155 done
26156
26157         if test $ac_cv_header_lwp_lwp_h = yes ; then
26158                 echo "$as_me:$LINENO: checking for lwp_create in -llwp" >&5
26159 echo $ECHO_N "checking for lwp_create in -llwp... $ECHO_C" >&6
26160 if test "${ac_cv_lib_lwp_lwp_create+set}" = set; then
26161   echo $ECHO_N "(cached) $ECHO_C" >&6
26162 else
26163   ac_check_lib_save_LIBS=$LIBS
26164 LIBS="-llwp  $LIBS"
26165 cat >conftest.$ac_ext <<_ACEOF
26166 /* confdefs.h.  */
26167 _ACEOF
26168 cat confdefs.h >>conftest.$ac_ext
26169 cat >>conftest.$ac_ext <<_ACEOF
26170 /* end confdefs.h.  */
26171
26172 /* Override any gcc2 internal prototype to avoid an error.  */
26173 #ifdef __cplusplus
26174 extern "C"
26175 #endif
26176 /* We use char because int might match the return type of a gcc2
26177    builtin and then its argument prototype would still apply.  */
26178 char lwp_create ();
26179 int
26180 main ()
26181 {
26182 lwp_create ();
26183   ;
26184   return 0;
26185 }
26186 _ACEOF
26187 rm -f conftest.$ac_objext conftest$ac_exeext
26188 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26189   (eval $ac_link) 2>conftest.er1
26190   ac_status=$?
26191   grep -v '^ *+' conftest.er1 >conftest.err
26192   rm -f conftest.er1
26193   cat conftest.err >&5
26194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26195   (exit $ac_status); } &&
26196          { ac_try='test -z "$ac_c_werror_flag"
26197                          || test ! -s conftest.err'
26198   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26199   (eval $ac_try) 2>&5
26200   ac_status=$?
26201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26202   (exit $ac_status); }; } &&
26203          { ac_try='test -s conftest$ac_exeext'
26204   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26205   (eval $ac_try) 2>&5
26206   ac_status=$?
26207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26208   (exit $ac_status); }; }; then
26209   ac_cv_lib_lwp_lwp_create=yes
26210 else
26211   echo "$as_me: failed program was:" >&5
26212 sed 's/^/| /' conftest.$ac_ext >&5
26213
26214 ac_cv_lib_lwp_lwp_create=no
26215 fi
26216 rm -f conftest.err conftest.$ac_objext \
26217       conftest$ac_exeext conftest.$ac_ext
26218 LIBS=$ac_check_lib_save_LIBS
26219 fi
26220 echo "$as_me:$LINENO: result: $ac_cv_lib_lwp_lwp_create" >&5
26221 echo "${ECHO_T}$ac_cv_lib_lwp_lwp_create" >&6
26222 if test $ac_cv_lib_lwp_lwp_create = yes; then
26223   have_lwp=yes
26224 else
26225   have_lwp=no
26226 fi
26227
26228
26229                 if test $have_lwp = yes ; then
26230
26231 cat >>confdefs.h <<\_ACEOF
26232 #define HAVE_LWP 1
26233 _ACEOF
26234
26235                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
26236                         ol_link_threads=lwp
26237
26238                         if test $ol_with_yielding_select = auto ; then
26239                                 ol_with_yielding_select=no
26240                         fi
26241                 fi
26242         fi
26243         ;;
26244 esac
26245
26246 if test $ol_with_yielding_select = yes ; then
26247
26248 cat >>confdefs.h <<\_ACEOF
26249 #define HAVE_YIELDING_SELECT 1
26250 _ACEOF
26251
26252 fi
26253
26254 if test $ol_with_threads = manual ; then
26255                 ol_link_threads=yes
26256
26257         { echo "$as_me:$LINENO: WARNING: thread defines and link options must be set manually" >&5
26258 echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
26259
26260
26261
26262 for ac_header in pthread.h sched.h
26263 do
26264 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26265 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26266   echo "$as_me:$LINENO: checking for $ac_header" >&5
26267 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26268 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26269   echo $ECHO_N "(cached) $ECHO_C" >&6
26270 fi
26271 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26272 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26273 else
26274   # Is the header compilable?
26275 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26276 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26277 cat >conftest.$ac_ext <<_ACEOF
26278 /* confdefs.h.  */
26279 _ACEOF
26280 cat confdefs.h >>conftest.$ac_ext
26281 cat >>conftest.$ac_ext <<_ACEOF
26282 /* end confdefs.h.  */
26283 $ac_includes_default
26284 #include <$ac_header>
26285 _ACEOF
26286 rm -f conftest.$ac_objext
26287 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26288   (eval $ac_compile) 2>conftest.er1
26289   ac_status=$?
26290   grep -v '^ *+' conftest.er1 >conftest.err
26291   rm -f conftest.er1
26292   cat conftest.err >&5
26293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26294   (exit $ac_status); } &&
26295          { ac_try='test -z "$ac_c_werror_flag"
26296                          || test ! -s conftest.err'
26297   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26298   (eval $ac_try) 2>&5
26299   ac_status=$?
26300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26301   (exit $ac_status); }; } &&
26302          { ac_try='test -s conftest.$ac_objext'
26303   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26304   (eval $ac_try) 2>&5
26305   ac_status=$?
26306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26307   (exit $ac_status); }; }; then
26308   ac_header_compiler=yes
26309 else
26310   echo "$as_me: failed program was:" >&5
26311 sed 's/^/| /' conftest.$ac_ext >&5
26312
26313 ac_header_compiler=no
26314 fi
26315 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26316 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26317 echo "${ECHO_T}$ac_header_compiler" >&6
26318
26319 # Is the header present?
26320 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26321 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26322 cat >conftest.$ac_ext <<_ACEOF
26323 /* confdefs.h.  */
26324 _ACEOF
26325 cat confdefs.h >>conftest.$ac_ext
26326 cat >>conftest.$ac_ext <<_ACEOF
26327 /* end confdefs.h.  */
26328 #include <$ac_header>
26329 _ACEOF
26330 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26331   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26332   ac_status=$?
26333   grep -v '^ *+' conftest.er1 >conftest.err
26334   rm -f conftest.er1
26335   cat conftest.err >&5
26336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26337   (exit $ac_status); } >/dev/null; then
26338   if test -s conftest.err; then
26339     ac_cpp_err=$ac_c_preproc_warn_flag
26340     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26341   else
26342     ac_cpp_err=
26343   fi
26344 else
26345   ac_cpp_err=yes
26346 fi
26347 if test -z "$ac_cpp_err"; then
26348   ac_header_preproc=yes
26349 else
26350   echo "$as_me: failed program was:" >&5
26351 sed 's/^/| /' conftest.$ac_ext >&5
26352
26353   ac_header_preproc=no
26354 fi
26355 rm -f conftest.err conftest.$ac_ext
26356 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26357 echo "${ECHO_T}$ac_header_preproc" >&6
26358
26359 # So?  What about this header?
26360 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26361   yes:no: )
26362     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26363 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26364     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26365 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26366     ac_header_preproc=yes
26367     ;;
26368   no:yes:* )
26369     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26370 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26371     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26372 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26373     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26374 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26375     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26376 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26377     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26378 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26379     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26380 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26381     (
26382       cat <<\_ASBOX
26383 ## --------------------------------------------- ##
26384 ## Report this to <http://www.openldap.org/its/> ##
26385 ## --------------------------------------------- ##
26386 _ASBOX
26387     ) |
26388       sed "s/^/$as_me: WARNING:     /" >&2
26389     ;;
26390 esac
26391 echo "$as_me:$LINENO: checking for $ac_header" >&5
26392 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26393 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26394   echo $ECHO_N "(cached) $ECHO_C" >&6
26395 else
26396   eval "$as_ac_Header=\$ac_header_preproc"
26397 fi
26398 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26399 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26400
26401 fi
26402 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26403   cat >>confdefs.h <<_ACEOF
26404 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26405 _ACEOF
26406
26407 fi
26408
26409 done
26410
26411
26412
26413 for ac_func in sched_yield pthread_yield
26414 do
26415 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
26416 echo "$as_me:$LINENO: checking for $ac_func" >&5
26417 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
26418 if eval "test \"\${$as_ac_var+set}\" = set"; then
26419   echo $ECHO_N "(cached) $ECHO_C" >&6
26420 else
26421   cat >conftest.$ac_ext <<_ACEOF
26422 /* confdefs.h.  */
26423 _ACEOF
26424 cat confdefs.h >>conftest.$ac_ext
26425 cat >>conftest.$ac_ext <<_ACEOF
26426 /* end confdefs.h.  */
26427 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
26428    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
26429 #define $ac_func innocuous_$ac_func
26430
26431 /* System header to define __stub macros and hopefully few prototypes,
26432     which can conflict with char $ac_func (); below.
26433     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
26434     <limits.h> exists even on freestanding compilers.  */
26435
26436 #ifdef __STDC__
26437 # include <limits.h>
26438 #else
26439 # include <assert.h>
26440 #endif
26441
26442 #undef $ac_func
26443
26444 /* Override any gcc2 internal prototype to avoid an error.  */
26445 #ifdef __cplusplus
26446 extern "C"
26447 {
26448 #endif
26449 /* We use char because int might match the return type of a gcc2
26450    builtin and then its argument prototype would still apply.  */
26451 char $ac_func ();
26452 /* The GNU C library defines this for functions which it implements
26453     to always fail with ENOSYS.  Some functions are actually named
26454     something starting with __ and the normal name is an alias.  */
26455 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
26456 choke me
26457 #else
26458 char (*f) () = $ac_func;
26459 #endif
26460 #ifdef __cplusplus
26461 }
26462 #endif
26463
26464 int
26465 main ()
26466 {
26467 return f != $ac_func;
26468   ;
26469   return 0;
26470 }
26471 _ACEOF
26472 rm -f conftest.$ac_objext conftest$ac_exeext
26473 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26474   (eval $ac_link) 2>conftest.er1
26475   ac_status=$?
26476   grep -v '^ *+' conftest.er1 >conftest.err
26477   rm -f conftest.er1
26478   cat conftest.err >&5
26479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26480   (exit $ac_status); } &&
26481          { ac_try='test -z "$ac_c_werror_flag"
26482                          || test ! -s conftest.err'
26483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26484   (eval $ac_try) 2>&5
26485   ac_status=$?
26486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26487   (exit $ac_status); }; } &&
26488          { ac_try='test -s conftest$ac_exeext'
26489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26490   (eval $ac_try) 2>&5
26491   ac_status=$?
26492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26493   (exit $ac_status); }; }; then
26494   eval "$as_ac_var=yes"
26495 else
26496   echo "$as_me: failed program was:" >&5
26497 sed 's/^/| /' conftest.$ac_ext >&5
26498
26499 eval "$as_ac_var=no"
26500 fi
26501 rm -f conftest.err conftest.$ac_objext \
26502       conftest$ac_exeext conftest.$ac_ext
26503 fi
26504 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
26505 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
26506 if test `eval echo '${'$as_ac_var'}'` = yes; then
26507   cat >>confdefs.h <<_ACEOF
26508 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
26509 _ACEOF
26510
26511 fi
26512 done
26513
26514
26515         echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5
26516 echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6
26517 if test "${ol_cv_header_linux_threads+set}" = set; then
26518   echo $ECHO_N "(cached) $ECHO_C" >&6
26519 else
26520   cat >conftest.$ac_ext <<_ACEOF
26521 /* confdefs.h.  */
26522 _ACEOF
26523 cat confdefs.h >>conftest.$ac_ext
26524 cat >>conftest.$ac_ext <<_ACEOF
26525 /* end confdefs.h.  */
26526 #include <pthread.h>
26527 _ACEOF
26528 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26529   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then
26530   ol_cv_header_linux_threads=yes
26531 else
26532   ol_cv_header_linux_threads=no
26533 fi
26534 rm -f conftest*
26535
26536
26537 fi
26538 echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5
26539 echo "${ECHO_T}$ol_cv_header_linux_threads" >&6
26540         if test $ol_cv_header_linux_threads = yes; then
26541
26542 cat >>confdefs.h <<\_ACEOF
26543 #define HAVE_LINUX_THREADS 1
26544 _ACEOF
26545
26546         fi
26547
26548
26549
26550 for ac_header in mach/cthreads.h
26551 do
26552 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26553 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26554   echo "$as_me:$LINENO: checking for $ac_header" >&5
26555 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26556 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26557   echo $ECHO_N "(cached) $ECHO_C" >&6
26558 fi
26559 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26560 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26561 else
26562   # Is the header compilable?
26563 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26564 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26565 cat >conftest.$ac_ext <<_ACEOF
26566 /* confdefs.h.  */
26567 _ACEOF
26568 cat confdefs.h >>conftest.$ac_ext
26569 cat >>conftest.$ac_ext <<_ACEOF
26570 /* end confdefs.h.  */
26571 $ac_includes_default
26572 #include <$ac_header>
26573 _ACEOF
26574 rm -f conftest.$ac_objext
26575 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26576   (eval $ac_compile) 2>conftest.er1
26577   ac_status=$?
26578   grep -v '^ *+' conftest.er1 >conftest.err
26579   rm -f conftest.er1
26580   cat conftest.err >&5
26581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26582   (exit $ac_status); } &&
26583          { ac_try='test -z "$ac_c_werror_flag"
26584                          || test ! -s conftest.err'
26585   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26586   (eval $ac_try) 2>&5
26587   ac_status=$?
26588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26589   (exit $ac_status); }; } &&
26590          { ac_try='test -s conftest.$ac_objext'
26591   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26592   (eval $ac_try) 2>&5
26593   ac_status=$?
26594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26595   (exit $ac_status); }; }; then
26596   ac_header_compiler=yes
26597 else
26598   echo "$as_me: failed program was:" >&5
26599 sed 's/^/| /' conftest.$ac_ext >&5
26600
26601 ac_header_compiler=no
26602 fi
26603 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26604 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26605 echo "${ECHO_T}$ac_header_compiler" >&6
26606
26607 # Is the header present?
26608 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26609 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26610 cat >conftest.$ac_ext <<_ACEOF
26611 /* confdefs.h.  */
26612 _ACEOF
26613 cat confdefs.h >>conftest.$ac_ext
26614 cat >>conftest.$ac_ext <<_ACEOF
26615 /* end confdefs.h.  */
26616 #include <$ac_header>
26617 _ACEOF
26618 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26619   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26620   ac_status=$?
26621   grep -v '^ *+' conftest.er1 >conftest.err
26622   rm -f conftest.er1
26623   cat conftest.err >&5
26624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26625   (exit $ac_status); } >/dev/null; then
26626   if test -s conftest.err; then
26627     ac_cpp_err=$ac_c_preproc_warn_flag
26628     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26629   else
26630     ac_cpp_err=
26631   fi
26632 else
26633   ac_cpp_err=yes
26634 fi
26635 if test -z "$ac_cpp_err"; then
26636   ac_header_preproc=yes
26637 else
26638   echo "$as_me: failed program was:" >&5
26639 sed 's/^/| /' conftest.$ac_ext >&5
26640
26641   ac_header_preproc=no
26642 fi
26643 rm -f conftest.err conftest.$ac_ext
26644 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26645 echo "${ECHO_T}$ac_header_preproc" >&6
26646
26647 # So?  What about this header?
26648 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26649   yes:no: )
26650     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26651 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26652     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26653 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26654     ac_header_preproc=yes
26655     ;;
26656   no:yes:* )
26657     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26658 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26659     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26660 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26661     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26662 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26663     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26664 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26665     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26666 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26667     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26668 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26669     (
26670       cat <<\_ASBOX
26671 ## --------------------------------------------- ##
26672 ## Report this to <http://www.openldap.org/its/> ##
26673 ## --------------------------------------------- ##
26674 _ASBOX
26675     ) |
26676       sed "s/^/$as_me: WARNING:     /" >&2
26677     ;;
26678 esac
26679 echo "$as_me:$LINENO: checking for $ac_header" >&5
26680 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26681 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26682   echo $ECHO_N "(cached) $ECHO_C" >&6
26683 else
26684   eval "$as_ac_Header=\$ac_header_preproc"
26685 fi
26686 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26687 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26688
26689 fi
26690 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26691   cat >>confdefs.h <<_ACEOF
26692 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26693 _ACEOF
26694
26695 fi
26696
26697 done
26698
26699
26700 for ac_header in lwp/lwp.h
26701 do
26702 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26703 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26704   echo "$as_me:$LINENO: checking for $ac_header" >&5
26705 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26706 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26707   echo $ECHO_N "(cached) $ECHO_C" >&6
26708 fi
26709 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26710 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26711 else
26712   # Is the header compilable?
26713 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26714 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26715 cat >conftest.$ac_ext <<_ACEOF
26716 /* confdefs.h.  */
26717 _ACEOF
26718 cat confdefs.h >>conftest.$ac_ext
26719 cat >>conftest.$ac_ext <<_ACEOF
26720 /* end confdefs.h.  */
26721 $ac_includes_default
26722 #include <$ac_header>
26723 _ACEOF
26724 rm -f conftest.$ac_objext
26725 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26726   (eval $ac_compile) 2>conftest.er1
26727   ac_status=$?
26728   grep -v '^ *+' conftest.er1 >conftest.err
26729   rm -f conftest.er1
26730   cat conftest.err >&5
26731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26732   (exit $ac_status); } &&
26733          { ac_try='test -z "$ac_c_werror_flag"
26734                          || test ! -s conftest.err'
26735   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26736   (eval $ac_try) 2>&5
26737   ac_status=$?
26738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26739   (exit $ac_status); }; } &&
26740          { ac_try='test -s conftest.$ac_objext'
26741   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26742   (eval $ac_try) 2>&5
26743   ac_status=$?
26744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26745   (exit $ac_status); }; }; then
26746   ac_header_compiler=yes
26747 else
26748   echo "$as_me: failed program was:" >&5
26749 sed 's/^/| /' conftest.$ac_ext >&5
26750
26751 ac_header_compiler=no
26752 fi
26753 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26754 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26755 echo "${ECHO_T}$ac_header_compiler" >&6
26756
26757 # Is the header present?
26758 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26759 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26760 cat >conftest.$ac_ext <<_ACEOF
26761 /* confdefs.h.  */
26762 _ACEOF
26763 cat confdefs.h >>conftest.$ac_ext
26764 cat >>conftest.$ac_ext <<_ACEOF
26765 /* end confdefs.h.  */
26766 #include <$ac_header>
26767 _ACEOF
26768 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26769   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26770   ac_status=$?
26771   grep -v '^ *+' conftest.er1 >conftest.err
26772   rm -f conftest.er1
26773   cat conftest.err >&5
26774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26775   (exit $ac_status); } >/dev/null; then
26776   if test -s conftest.err; then
26777     ac_cpp_err=$ac_c_preproc_warn_flag
26778     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26779   else
26780     ac_cpp_err=
26781   fi
26782 else
26783   ac_cpp_err=yes
26784 fi
26785 if test -z "$ac_cpp_err"; then
26786   ac_header_preproc=yes
26787 else
26788   echo "$as_me: failed program was:" >&5
26789 sed 's/^/| /' conftest.$ac_ext >&5
26790
26791   ac_header_preproc=no
26792 fi
26793 rm -f conftest.err conftest.$ac_ext
26794 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26795 echo "${ECHO_T}$ac_header_preproc" >&6
26796
26797 # So?  What about this header?
26798 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26799   yes:no: )
26800     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26801 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26802     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26803 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26804     ac_header_preproc=yes
26805     ;;
26806   no:yes:* )
26807     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26808 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26809     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26810 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26811     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26812 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26813     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26814 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26815     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26816 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26817     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26818 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26819     (
26820       cat <<\_ASBOX
26821 ## --------------------------------------------- ##
26822 ## Report this to <http://www.openldap.org/its/> ##
26823 ## --------------------------------------------- ##
26824 _ASBOX
26825     ) |
26826       sed "s/^/$as_me: WARNING:     /" >&2
26827     ;;
26828 esac
26829 echo "$as_me:$LINENO: checking for $ac_header" >&5
26830 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26831 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26832   echo $ECHO_N "(cached) $ECHO_C" >&6
26833 else
26834   eval "$as_ac_Header=\$ac_header_preproc"
26835 fi
26836 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26837 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26838
26839 fi
26840 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26841   cat >>confdefs.h <<_ACEOF
26842 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26843 _ACEOF
26844
26845 fi
26846
26847 done
26848
26849
26850
26851 for ac_header in thread.h synch.h
26852 do
26853 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26854 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26855   echo "$as_me:$LINENO: checking for $ac_header" >&5
26856 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26857 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26858   echo $ECHO_N "(cached) $ECHO_C" >&6
26859 fi
26860 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26861 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26862 else
26863   # Is the header compilable?
26864 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26865 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26866 cat >conftest.$ac_ext <<_ACEOF
26867 /* confdefs.h.  */
26868 _ACEOF
26869 cat confdefs.h >>conftest.$ac_ext
26870 cat >>conftest.$ac_ext <<_ACEOF
26871 /* end confdefs.h.  */
26872 $ac_includes_default
26873 #include <$ac_header>
26874 _ACEOF
26875 rm -f conftest.$ac_objext
26876 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26877   (eval $ac_compile) 2>conftest.er1
26878   ac_status=$?
26879   grep -v '^ *+' conftest.er1 >conftest.err
26880   rm -f conftest.er1
26881   cat conftest.err >&5
26882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26883   (exit $ac_status); } &&
26884          { ac_try='test -z "$ac_c_werror_flag"
26885                          || test ! -s conftest.err'
26886   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26887   (eval $ac_try) 2>&5
26888   ac_status=$?
26889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26890   (exit $ac_status); }; } &&
26891          { ac_try='test -s conftest.$ac_objext'
26892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26893   (eval $ac_try) 2>&5
26894   ac_status=$?
26895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26896   (exit $ac_status); }; }; then
26897   ac_header_compiler=yes
26898 else
26899   echo "$as_me: failed program was:" >&5
26900 sed 's/^/| /' conftest.$ac_ext >&5
26901
26902 ac_header_compiler=no
26903 fi
26904 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26905 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26906 echo "${ECHO_T}$ac_header_compiler" >&6
26907
26908 # Is the header present?
26909 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26910 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26911 cat >conftest.$ac_ext <<_ACEOF
26912 /* confdefs.h.  */
26913 _ACEOF
26914 cat confdefs.h >>conftest.$ac_ext
26915 cat >>conftest.$ac_ext <<_ACEOF
26916 /* end confdefs.h.  */
26917 #include <$ac_header>
26918 _ACEOF
26919 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26920   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26921   ac_status=$?
26922   grep -v '^ *+' conftest.er1 >conftest.err
26923   rm -f conftest.er1
26924   cat conftest.err >&5
26925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26926   (exit $ac_status); } >/dev/null; then
26927   if test -s conftest.err; then
26928     ac_cpp_err=$ac_c_preproc_warn_flag
26929     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26930   else
26931     ac_cpp_err=
26932   fi
26933 else
26934   ac_cpp_err=yes
26935 fi
26936 if test -z "$ac_cpp_err"; then
26937   ac_header_preproc=yes
26938 else
26939   echo "$as_me: failed program was:" >&5
26940 sed 's/^/| /' conftest.$ac_ext >&5
26941
26942   ac_header_preproc=no
26943 fi
26944 rm -f conftest.err conftest.$ac_ext
26945 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26946 echo "${ECHO_T}$ac_header_preproc" >&6
26947
26948 # So?  What about this header?
26949 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26950   yes:no: )
26951     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26952 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26953     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26954 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26955     ac_header_preproc=yes
26956     ;;
26957   no:yes:* )
26958     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26959 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26960     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26961 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26962     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26963 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26964     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26965 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26966     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26967 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26968     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26969 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26970     (
26971       cat <<\_ASBOX
26972 ## --------------------------------------------- ##
26973 ## Report this to <http://www.openldap.org/its/> ##
26974 ## --------------------------------------------- ##
26975 _ASBOX
26976     ) |
26977       sed "s/^/$as_me: WARNING:     /" >&2
26978     ;;
26979 esac
26980 echo "$as_me:$LINENO: checking for $ac_header" >&5
26981 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26982 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26983   echo $ECHO_N "(cached) $ECHO_C" >&6
26984 else
26985   eval "$as_ac_Header=\$ac_header_preproc"
26986 fi
26987 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26988 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26989
26990 fi
26991 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26992   cat >>confdefs.h <<_ACEOF
26993 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26994 _ACEOF
26995
26996 fi
26997
26998 done
26999
27000 fi
27001
27002 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
27003                         cat >>confdefs.h <<\_ACEOF
27004 #define REENTRANT 1
27005 _ACEOF
27006
27007         cat >>confdefs.h <<\_ACEOF
27008 #define _REENTRANT 1
27009 _ACEOF
27010
27011         cat >>confdefs.h <<\_ACEOF
27012 #define THREAD_SAFE 1
27013 _ACEOF
27014
27015         cat >>confdefs.h <<\_ACEOF
27016 #define _THREAD_SAFE 1
27017 _ACEOF
27018
27019         cat >>confdefs.h <<\_ACEOF
27020 #define THREADSAFE 1
27021 _ACEOF
27022
27023         cat >>confdefs.h <<\_ACEOF
27024 #define _THREADSAFE 1
27025 _ACEOF
27026
27027         cat >>confdefs.h <<\_ACEOF
27028 #define _SGI_MP_SOURCE 1
27029 _ACEOF
27030
27031
27032                         echo "$as_me:$LINENO: checking for thread specific errno" >&5
27033 echo $ECHO_N "checking for thread specific errno... $ECHO_C" >&6
27034 if test "${ol_cv_errno_thread_specific+set}" = set; then
27035   echo $ECHO_N "(cached) $ECHO_C" >&6
27036 else
27037
27038                 cat >conftest.$ac_ext <<_ACEOF
27039 /* confdefs.h.  */
27040 _ACEOF
27041 cat confdefs.h >>conftest.$ac_ext
27042 cat >>conftest.$ac_ext <<_ACEOF
27043 /* end confdefs.h.  */
27044 #include <errno.h>
27045 int
27046 main ()
27047 {
27048 errno = 0;
27049   ;
27050   return 0;
27051 }
27052 _ACEOF
27053 rm -f conftest.$ac_objext conftest$ac_exeext
27054 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27055   (eval $ac_link) 2>conftest.er1
27056   ac_status=$?
27057   grep -v '^ *+' conftest.er1 >conftest.err
27058   rm -f conftest.er1
27059   cat conftest.err >&5
27060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27061   (exit $ac_status); } &&
27062          { ac_try='test -z "$ac_c_werror_flag"
27063                          || test ! -s conftest.err'
27064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27065   (eval $ac_try) 2>&5
27066   ac_status=$?
27067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27068   (exit $ac_status); }; } &&
27069          { ac_try='test -s conftest$ac_exeext'
27070   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27071   (eval $ac_try) 2>&5
27072   ac_status=$?
27073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27074   (exit $ac_status); }; }; then
27075   ol_cv_errno_thread_specific=yes
27076 else
27077   echo "$as_me: failed program was:" >&5
27078 sed 's/^/| /' conftest.$ac_ext >&5
27079
27080 ol_cv_errno_thread_specific=no
27081 fi
27082 rm -f conftest.err conftest.$ac_objext \
27083       conftest$ac_exeext conftest.$ac_ext
27084
27085 fi
27086 echo "$as_me:$LINENO: result: $ol_cv_errno_thread_specific" >&5
27087 echo "${ECHO_T}$ol_cv_errno_thread_specific" >&6
27088
27089                         echo "$as_me:$LINENO: checking for thread specific h_errno" >&5
27090 echo $ECHO_N "checking for thread specific h_errno... $ECHO_C" >&6
27091 if test "${ol_cv_h_errno_thread_specific+set}" = set; then
27092   echo $ECHO_N "(cached) $ECHO_C" >&6
27093 else
27094
27095                 cat >conftest.$ac_ext <<_ACEOF
27096 /* confdefs.h.  */
27097 _ACEOF
27098 cat confdefs.h >>conftest.$ac_ext
27099 cat >>conftest.$ac_ext <<_ACEOF
27100 /* end confdefs.h.  */
27101 #include <netdb.h>
27102 int
27103 main ()
27104 {
27105 h_errno = 0;
27106   ;
27107   return 0;
27108 }
27109 _ACEOF
27110 rm -f conftest.$ac_objext conftest$ac_exeext
27111 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27112   (eval $ac_link) 2>conftest.er1
27113   ac_status=$?
27114   grep -v '^ *+' conftest.er1 >conftest.err
27115   rm -f conftest.er1
27116   cat conftest.err >&5
27117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27118   (exit $ac_status); } &&
27119          { ac_try='test -z "$ac_c_werror_flag"
27120                          || test ! -s conftest.err'
27121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27122   (eval $ac_try) 2>&5
27123   ac_status=$?
27124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27125   (exit $ac_status); }; } &&
27126          { ac_try='test -s conftest$ac_exeext'
27127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27128   (eval $ac_try) 2>&5
27129   ac_status=$?
27130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27131   (exit $ac_status); }; }; then
27132   ol_cv_h_errno_thread_specific=yes
27133 else
27134   echo "$as_me: failed program was:" >&5
27135 sed 's/^/| /' conftest.$ac_ext >&5
27136
27137 ol_cv_h_errno_thread_specific=no
27138 fi
27139 rm -f conftest.err conftest.$ac_objext \
27140       conftest$ac_exeext conftest.$ac_ext
27141
27142 fi
27143 echo "$as_me:$LINENO: result: $ol_cv_h_errno_thread_specific" >&5
27144 echo "${ECHO_T}$ol_cv_h_errno_thread_specific" >&6
27145
27146         if test $ol_cv_errno_thread_specific != yes ||
27147            test $ol_cv_h_errno_thread_specific != yes ; then
27148                 LIBS="$LTHREAD_LIBS $LIBS"
27149                 LTHREAD_LIBS=""
27150         fi
27151
27152 fi
27153
27154 if test $ol_link_threads = no ; then
27155         if test $ol_with_threads = yes ; then
27156                 { { echo "$as_me:$LINENO: error: no suitable thread support" >&5
27157 echo "$as_me: error: no suitable thread support" >&2;}
27158    { (exit 1); exit 1; }; }
27159         fi
27160
27161         if test $ol_with_threads = auto ; then
27162                 { echo "$as_me:$LINENO: WARNING: no suitable thread support, disabling threads" >&5
27163 echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
27164                 ol_with_threads=no
27165         fi
27166
27167
27168 cat >>confdefs.h <<\_ACEOF
27169 #define NO_THREADS 1
27170 _ACEOF
27171
27172         LTHREAD_LIBS=""
27173         BUILD_THREAD=no
27174 else
27175         BUILD_THREAD=yes
27176 fi
27177
27178 if test $ol_link_threads != no ; then
27179
27180 cat >>confdefs.h <<\_ACEOF
27181 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
27182 _ACEOF
27183
27184 fi
27185
27186
27187
27188
27189 for ac_func in \
27190         ctime_r                 \
27191         gethostbyname_r gethostbyaddr_r \
27192
27193 do
27194 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
27195 echo "$as_me:$LINENO: checking for $ac_func" >&5
27196 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
27197 if eval "test \"\${$as_ac_var+set}\" = set"; then
27198   echo $ECHO_N "(cached) $ECHO_C" >&6
27199 else
27200   cat >conftest.$ac_ext <<_ACEOF
27201 /* confdefs.h.  */
27202 _ACEOF
27203 cat confdefs.h >>conftest.$ac_ext
27204 cat >>conftest.$ac_ext <<_ACEOF
27205 /* end confdefs.h.  */
27206 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
27207    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
27208 #define $ac_func innocuous_$ac_func
27209
27210 /* System header to define __stub macros and hopefully few prototypes,
27211     which can conflict with char $ac_func (); below.
27212     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
27213     <limits.h> exists even on freestanding compilers.  */
27214
27215 #ifdef __STDC__
27216 # include <limits.h>
27217 #else
27218 # include <assert.h>
27219 #endif
27220
27221 #undef $ac_func
27222
27223 /* Override any gcc2 internal prototype to avoid an error.  */
27224 #ifdef __cplusplus
27225 extern "C"
27226 {
27227 #endif
27228 /* We use char because int might match the return type of a gcc2
27229    builtin and then its argument prototype would still apply.  */
27230 char $ac_func ();
27231 /* The GNU C library defines this for functions which it implements
27232     to always fail with ENOSYS.  Some functions are actually named
27233     something starting with __ and the normal name is an alias.  */
27234 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
27235 choke me
27236 #else
27237 char (*f) () = $ac_func;
27238 #endif
27239 #ifdef __cplusplus
27240 }
27241 #endif
27242
27243 int
27244 main ()
27245 {
27246 return f != $ac_func;
27247   ;
27248   return 0;
27249 }
27250 _ACEOF
27251 rm -f conftest.$ac_objext conftest$ac_exeext
27252 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27253   (eval $ac_link) 2>conftest.er1
27254   ac_status=$?
27255   grep -v '^ *+' conftest.er1 >conftest.err
27256   rm -f conftest.er1
27257   cat conftest.err >&5
27258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27259   (exit $ac_status); } &&
27260          { ac_try='test -z "$ac_c_werror_flag"
27261                          || test ! -s conftest.err'
27262   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27263   (eval $ac_try) 2>&5
27264   ac_status=$?
27265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27266   (exit $ac_status); }; } &&
27267          { ac_try='test -s conftest$ac_exeext'
27268   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27269   (eval $ac_try) 2>&5
27270   ac_status=$?
27271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27272   (exit $ac_status); }; }; then
27273   eval "$as_ac_var=yes"
27274 else
27275   echo "$as_me: failed program was:" >&5
27276 sed 's/^/| /' conftest.$ac_ext >&5
27277
27278 eval "$as_ac_var=no"
27279 fi
27280 rm -f conftest.err conftest.$ac_objext \
27281       conftest$ac_exeext conftest.$ac_ext
27282 fi
27283 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
27284 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
27285 if test `eval echo '${'$as_ac_var'}'` = yes; then
27286   cat >>confdefs.h <<_ACEOF
27287 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
27288 _ACEOF
27289
27290 fi
27291 done
27292
27293
27294 if test "$ac_cv_func_ctime_r" = no ; then
27295         ol_cv_func_ctime_r_nargs=0
27296 else
27297         echo "$as_me:$LINENO: checking number of arguments of ctime_r" >&5
27298 echo $ECHO_N "checking number of arguments of ctime_r... $ECHO_C" >&6
27299 if test "${ol_cv_func_ctime_r_nargs+set}" = set; then
27300   echo $ECHO_N "(cached) $ECHO_C" >&6
27301 else
27302   cat >conftest.$ac_ext <<_ACEOF
27303 /* confdefs.h.  */
27304 _ACEOF
27305 cat confdefs.h >>conftest.$ac_ext
27306 cat >>conftest.$ac_ext <<_ACEOF
27307 /* end confdefs.h.  */
27308 #include <time.h>
27309 int
27310 main ()
27311 {
27312 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
27313   ;
27314   return 0;
27315 }
27316 _ACEOF
27317 rm -f conftest.$ac_objext
27318 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27319   (eval $ac_compile) 2>conftest.er1
27320   ac_status=$?
27321   grep -v '^ *+' conftest.er1 >conftest.err
27322   rm -f conftest.er1
27323   cat conftest.err >&5
27324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27325   (exit $ac_status); } &&
27326          { ac_try='test -z "$ac_c_werror_flag"
27327                          || test ! -s conftest.err'
27328   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27329   (eval $ac_try) 2>&5
27330   ac_status=$?
27331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27332   (exit $ac_status); }; } &&
27333          { ac_try='test -s conftest.$ac_objext'
27334   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27335   (eval $ac_try) 2>&5
27336   ac_status=$?
27337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27338   (exit $ac_status); }; }; then
27339   ol_cv_func_ctime_r_nargs3=yes
27340 else
27341   echo "$as_me: failed program was:" >&5
27342 sed 's/^/| /' conftest.$ac_ext >&5
27343
27344 ol_cv_func_ctime_r_nargs3=no
27345 fi
27346 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27347
27348         cat >conftest.$ac_ext <<_ACEOF
27349 /* confdefs.h.  */
27350 _ACEOF
27351 cat confdefs.h >>conftest.$ac_ext
27352 cat >>conftest.$ac_ext <<_ACEOF
27353 /* end confdefs.h.  */
27354 #include <time.h>
27355 int
27356 main ()
27357 {
27358 time_t ti; char *buffer; ctime_r(&ti,buffer);
27359   ;
27360   return 0;
27361 }
27362 _ACEOF
27363 rm -f conftest.$ac_objext
27364 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27365   (eval $ac_compile) 2>conftest.er1
27366   ac_status=$?
27367   grep -v '^ *+' conftest.er1 >conftest.err
27368   rm -f conftest.er1
27369   cat conftest.err >&5
27370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27371   (exit $ac_status); } &&
27372          { ac_try='test -z "$ac_c_werror_flag"
27373                          || test ! -s conftest.err'
27374   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27375   (eval $ac_try) 2>&5
27376   ac_status=$?
27377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27378   (exit $ac_status); }; } &&
27379          { ac_try='test -s conftest.$ac_objext'
27380   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27381   (eval $ac_try) 2>&5
27382   ac_status=$?
27383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27384   (exit $ac_status); }; }; then
27385   ol_cv_func_ctime_r_nargs2=yes
27386 else
27387   echo "$as_me: failed program was:" >&5
27388 sed 's/^/| /' conftest.$ac_ext >&5
27389
27390 ol_cv_func_ctime_r_nargs2=no
27391 fi
27392 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27393
27394         if test $ol_cv_func_ctime_r_nargs3 = yes &&
27395            test $ol_cv_func_ctime_r_nargs2 = no ; then
27396
27397                 ol_cv_func_ctime_r_nargs=3
27398
27399         elif test $ol_cv_func_ctime_r_nargs3 = no &&
27400              test $ol_cv_func_ctime_r_nargs2 = yes ; then
27401
27402                 ol_cv_func_ctime_r_nargs=2
27403
27404         else
27405                 ol_cv_func_ctime_r_nargs=0
27406         fi
27407
27408 fi
27409 echo "$as_me:$LINENO: result: $ol_cv_func_ctime_r_nargs" >&5
27410 echo "${ECHO_T}$ol_cv_func_ctime_r_nargs" >&6
27411
27412   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
27413
27414 cat >>confdefs.h <<_ACEOF
27415 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
27416 _ACEOF
27417
27418   fi
27419
27420 fi
27421
27422 if test "$ac_cv_func_gethostbyname_r" = yes ; then
27423         echo "$as_me:$LINENO: checking number of arguments of gethostbyname_r" >&5
27424 echo $ECHO_N "checking number of arguments of gethostbyname_r... $ECHO_C" >&6
27425 if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then
27426   echo $ECHO_N "(cached) $ECHO_C" >&6
27427 else
27428   cat >conftest.$ac_ext <<_ACEOF
27429 /* confdefs.h.  */
27430 _ACEOF
27431 cat confdefs.h >>conftest.$ac_ext
27432 cat >>conftest.$ac_ext <<_ACEOF
27433 /* end confdefs.h.  */
27434 #include <sys/types.h>
27435 #include <sys/socket.h>
27436 #include <netinet/in.h>
27437 #include <netdb.h>
27438 #define BUFSIZE (sizeof(struct hostent)+10)
27439 int
27440 main ()
27441 {
27442 struct hostent hent; char buffer[BUFSIZE];
27443                 int bufsize=BUFSIZE;int h_errno;
27444                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
27445                         buffer, bufsize, &h_errno);
27446   ;
27447   return 0;
27448 }
27449 _ACEOF
27450 rm -f conftest.$ac_objext
27451 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27452   (eval $ac_compile) 2>conftest.er1
27453   ac_status=$?
27454   grep -v '^ *+' conftest.er1 >conftest.err
27455   rm -f conftest.er1
27456   cat conftest.err >&5
27457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27458   (exit $ac_status); } &&
27459          { ac_try='test -z "$ac_c_werror_flag"
27460                          || test ! -s conftest.err'
27461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27462   (eval $ac_try) 2>&5
27463   ac_status=$?
27464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27465   (exit $ac_status); }; } &&
27466          { ac_try='test -s conftest.$ac_objext'
27467   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27468   (eval $ac_try) 2>&5
27469   ac_status=$?
27470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27471   (exit $ac_status); }; }; then
27472   ol_cv_func_gethostbyname_r_nargs5=yes
27473 else
27474   echo "$as_me: failed program was:" >&5
27475 sed 's/^/| /' conftest.$ac_ext >&5
27476
27477 ol_cv_func_gethostbyname_r_nargs5=no
27478 fi
27479 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27480
27481         cat >conftest.$ac_ext <<_ACEOF
27482 /* confdefs.h.  */
27483 _ACEOF
27484 cat confdefs.h >>conftest.$ac_ext
27485 cat >>conftest.$ac_ext <<_ACEOF
27486 /* end confdefs.h.  */
27487 #include <sys/types.h>
27488 #include <sys/socket.h>
27489 #include <netinet/in.h>
27490 #include <netdb.h>
27491 #define BUFSIZE (sizeof(struct hostent)+10)
27492 int
27493 main ()
27494 {
27495 struct hostent hent;struct hostent *rhent;
27496                 char buffer[BUFSIZE];
27497                 int bufsize=BUFSIZE;int h_errno;
27498                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
27499                         &rhent, &h_errno);
27500   ;
27501   return 0;
27502 }
27503 _ACEOF
27504 rm -f conftest.$ac_objext
27505 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27506   (eval $ac_compile) 2>conftest.er1
27507   ac_status=$?
27508   grep -v '^ *+' conftest.er1 >conftest.err
27509   rm -f conftest.er1
27510   cat conftest.err >&5
27511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27512   (exit $ac_status); } &&
27513          { ac_try='test -z "$ac_c_werror_flag"
27514                          || test ! -s conftest.err'
27515   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27516   (eval $ac_try) 2>&5
27517   ac_status=$?
27518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27519   (exit $ac_status); }; } &&
27520          { ac_try='test -s conftest.$ac_objext'
27521   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27522   (eval $ac_try) 2>&5
27523   ac_status=$?
27524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27525   (exit $ac_status); }; }; then
27526   ol_cv_func_gethostbyname_r_nargs6=yes
27527 else
27528   echo "$as_me: failed program was:" >&5
27529 sed 's/^/| /' conftest.$ac_ext >&5
27530
27531 ol_cv_func_gethostbyname_r_nargs6=no
27532 fi
27533 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27534
27535         if test $ol_cv_func_gethostbyname_r_nargs5 = yes &&
27536            test $ol_cv_func_gethostbyname_r_nargs6 = no ; then
27537
27538                 ol_cv_func_gethostbyname_r_nargs=5
27539
27540         elif test $ol_cv_func_gethostbyname_r_nargs5 = no &&
27541              test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
27542
27543                 ol_cv_func_gethostbyname_r_nargs=6
27544
27545         else
27546                 ol_cv_func_gethostbyname_r_nargs=0
27547         fi
27548
27549 fi
27550 echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyname_r_nargs" >&5
27551 echo "${ECHO_T}$ol_cv_func_gethostbyname_r_nargs" >&6
27552   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
27553
27554 cat >>confdefs.h <<_ACEOF
27555 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
27556 _ACEOF
27557
27558   fi
27559
27560 else
27561         ol_cv_func_gethostbyname_r_nargs=0
27562 fi
27563
27564 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
27565         echo "$as_me:$LINENO: checking number of arguments of gethostbyaddr_r" >&5
27566 echo $ECHO_N "checking number of arguments of gethostbyaddr_r... $ECHO_C" >&6
27567 if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then
27568   echo $ECHO_N "(cached) $ECHO_C" >&6
27569 else
27570   cat >conftest.$ac_ext <<_ACEOF
27571 /* confdefs.h.  */
27572 _ACEOF
27573 cat confdefs.h >>conftest.$ac_ext
27574 cat >>conftest.$ac_ext <<_ACEOF
27575 /* end confdefs.h.  */
27576 #include <sys/types.h>
27577 #include <sys/socket.h>
27578 #include <netinet/in.h>
27579 #include <netdb.h>
27580 #define BUFSIZE (sizeof(struct hostent)+10)
27581 int
27582 main ()
27583 {
27584 struct hostent hent; char buffer[BUFSIZE];
27585             struct in_addr add;
27586             size_t alen=sizeof(struct in_addr);
27587             int bufsize=BUFSIZE;int h_errno;
27588                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
27589                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
27590   ;
27591   return 0;
27592 }
27593 _ACEOF
27594 rm -f conftest.$ac_objext
27595 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27596   (eval $ac_compile) 2>conftest.er1
27597   ac_status=$?
27598   grep -v '^ *+' conftest.er1 >conftest.err
27599   rm -f conftest.er1
27600   cat conftest.err >&5
27601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27602   (exit $ac_status); } &&
27603          { ac_try='test -z "$ac_c_werror_flag"
27604                          || test ! -s conftest.err'
27605   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27606   (eval $ac_try) 2>&5
27607   ac_status=$?
27608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27609   (exit $ac_status); }; } &&
27610          { ac_try='test -s conftest.$ac_objext'
27611   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27612   (eval $ac_try) 2>&5
27613   ac_status=$?
27614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27615   (exit $ac_status); }; }; then
27616   ol_cv_func_gethostbyaddr_r_nargs7=yes
27617 else
27618   echo "$as_me: failed program was:" >&5
27619 sed 's/^/| /' conftest.$ac_ext >&5
27620
27621 ol_cv_func_gethostbyaddr_r_nargs7=no
27622 fi
27623 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27624
27625         cat >conftest.$ac_ext <<_ACEOF
27626 /* confdefs.h.  */
27627 _ACEOF
27628 cat confdefs.h >>conftest.$ac_ext
27629 cat >>conftest.$ac_ext <<_ACEOF
27630 /* end confdefs.h.  */
27631 #include <sys/types.h>
27632 #include <sys/socket.h>
27633 #include <netinet/in.h>
27634 #include <netdb.h>
27635 #define BUFSIZE (sizeof(struct hostent)+10)
27636 int
27637 main ()
27638 {
27639 struct hostent hent;
27640                 struct hostent *rhent; char buffer[BUFSIZE];
27641                 struct in_addr add;
27642                 size_t alen=sizeof(struct in_addr);
27643                 int bufsize=BUFSIZE;int h_errno;
27644                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
27645                         alen, AF_INET, &hent, buffer, bufsize,
27646                         &rhent, &h_errno);
27647   ;
27648   return 0;
27649 }
27650 _ACEOF
27651 rm -f conftest.$ac_objext
27652 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27653   (eval $ac_compile) 2>conftest.er1
27654   ac_status=$?
27655   grep -v '^ *+' conftest.er1 >conftest.err
27656   rm -f conftest.er1
27657   cat conftest.err >&5
27658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27659   (exit $ac_status); } &&
27660          { ac_try='test -z "$ac_c_werror_flag"
27661                          || test ! -s conftest.err'
27662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27663   (eval $ac_try) 2>&5
27664   ac_status=$?
27665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27666   (exit $ac_status); }; } &&
27667          { ac_try='test -s conftest.$ac_objext'
27668   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27669   (eval $ac_try) 2>&5
27670   ac_status=$?
27671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27672   (exit $ac_status); }; }; then
27673   ol_cv_func_gethostbyaddr_r_nargs8=yes
27674 else
27675   echo "$as_me: failed program was:" >&5
27676 sed 's/^/| /' conftest.$ac_ext >&5
27677
27678 ol_cv_func_gethostbyaddr_r_nargs8=no
27679 fi
27680 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27681
27682         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes &&
27683            test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
27684
27685                 ol_cv_func_gethostbyaddr_r_nargs=7
27686
27687         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no &&
27688              test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
27689
27690                 ol_cv_func_gethostbyaddr_r_nargs=8
27691
27692         else
27693                 ol_cv_func_gethostbyaddr_r_nargs=0
27694         fi
27695
27696 fi
27697 echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5
27698 echo "${ECHO_T}$ol_cv_func_gethostbyaddr_r_nargs" >&6
27699   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
27700
27701 cat >>confdefs.h <<_ACEOF
27702 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
27703 _ACEOF
27704
27705   fi
27706
27707 else
27708         ol_cv_func_gethostbyaddr_r_nargs=0
27709 fi
27710
27711 ol_link_ldbm=no
27712
27713 case $ol_enable_ldbm_api in auto | berkeley | bcompat)
27714
27715         if test $ol_enable_ldbm_api = bcompat; then \
27716
27717
27718 for ac_header in db_185.h db.h
27719 do
27720 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
27721 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27722   echo "$as_me:$LINENO: checking for $ac_header" >&5
27723 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27724 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27725   echo $ECHO_N "(cached) $ECHO_C" >&6
27726 fi
27727 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27728 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27729 else
27730   # Is the header compilable?
27731 echo "$as_me:$LINENO: checking $ac_header usability" >&5
27732 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
27733 cat >conftest.$ac_ext <<_ACEOF
27734 /* confdefs.h.  */
27735 _ACEOF
27736 cat confdefs.h >>conftest.$ac_ext
27737 cat >>conftest.$ac_ext <<_ACEOF
27738 /* end confdefs.h.  */
27739 $ac_includes_default
27740 #include <$ac_header>
27741 _ACEOF
27742 rm -f conftest.$ac_objext
27743 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27744   (eval $ac_compile) 2>conftest.er1
27745   ac_status=$?
27746   grep -v '^ *+' conftest.er1 >conftest.err
27747   rm -f conftest.er1
27748   cat conftest.err >&5
27749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27750   (exit $ac_status); } &&
27751          { ac_try='test -z "$ac_c_werror_flag"
27752                          || test ! -s conftest.err'
27753   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27754   (eval $ac_try) 2>&5
27755   ac_status=$?
27756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27757   (exit $ac_status); }; } &&
27758          { ac_try='test -s conftest.$ac_objext'
27759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27760   (eval $ac_try) 2>&5
27761   ac_status=$?
27762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27763   (exit $ac_status); }; }; then
27764   ac_header_compiler=yes
27765 else
27766   echo "$as_me: failed program was:" >&5
27767 sed 's/^/| /' conftest.$ac_ext >&5
27768
27769 ac_header_compiler=no
27770 fi
27771 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27772 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27773 echo "${ECHO_T}$ac_header_compiler" >&6
27774
27775 # Is the header present?
27776 echo "$as_me:$LINENO: checking $ac_header presence" >&5
27777 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
27778 cat >conftest.$ac_ext <<_ACEOF
27779 /* confdefs.h.  */
27780 _ACEOF
27781 cat confdefs.h >>conftest.$ac_ext
27782 cat >>conftest.$ac_ext <<_ACEOF
27783 /* end confdefs.h.  */
27784 #include <$ac_header>
27785 _ACEOF
27786 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
27787   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
27788   ac_status=$?
27789   grep -v '^ *+' conftest.er1 >conftest.err
27790   rm -f conftest.er1
27791   cat conftest.err >&5
27792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27793   (exit $ac_status); } >/dev/null; then
27794   if test -s conftest.err; then
27795     ac_cpp_err=$ac_c_preproc_warn_flag
27796     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
27797   else
27798     ac_cpp_err=
27799   fi
27800 else
27801   ac_cpp_err=yes
27802 fi
27803 if test -z "$ac_cpp_err"; then
27804   ac_header_preproc=yes
27805 else
27806   echo "$as_me: failed program was:" >&5
27807 sed 's/^/| /' conftest.$ac_ext >&5
27808
27809   ac_header_preproc=no
27810 fi
27811 rm -f conftest.err conftest.$ac_ext
27812 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27813 echo "${ECHO_T}$ac_header_preproc" >&6
27814
27815 # So?  What about this header?
27816 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
27817   yes:no: )
27818     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27819 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27820     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
27821 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
27822     ac_header_preproc=yes
27823     ;;
27824   no:yes:* )
27825     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27826 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27827     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
27828 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
27829     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
27830 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
27831     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
27832 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
27833     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27834 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27835     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
27836 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
27837     (
27838       cat <<\_ASBOX
27839 ## --------------------------------------------- ##
27840 ## Report this to <http://www.openldap.org/its/> ##
27841 ## --------------------------------------------- ##
27842 _ASBOX
27843     ) |
27844       sed "s/^/$as_me: WARNING:     /" >&2
27845     ;;
27846 esac
27847 echo "$as_me:$LINENO: checking for $ac_header" >&5
27848 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27849 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27850   echo $ECHO_N "(cached) $ECHO_C" >&6
27851 else
27852   eval "$as_ac_Header=\$ac_header_preproc"
27853 fi
27854 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27855 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27856
27857 fi
27858 if test `eval echo '${'$as_ac_Header'}'` = yes; then
27859   cat >>confdefs.h <<_ACEOF
27860 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
27861 _ACEOF
27862
27863 fi
27864
27865 done
27866
27867 if test $ac_cv_header_db_185_h = yes || test $ac_cv_header_db_h = yes; then
27868         echo "$as_me:$LINENO: checking if Berkeley DB header compatibility" >&5
27869 echo $ECHO_N "checking if Berkeley DB header compatibility... $ECHO_C" >&6
27870 if test "${ol_cv_header_db1+set}" = set; then
27871   echo $ECHO_N "(cached) $ECHO_C" >&6
27872 else
27873
27874                 cat >conftest.$ac_ext <<_ACEOF
27875 /* confdefs.h.  */
27876 _ACEOF
27877 cat confdefs.h >>conftest.$ac_ext
27878 cat >>conftest.$ac_ext <<_ACEOF
27879 /* end confdefs.h.  */
27880
27881 #if HAVE_DB_185_H
27882 #       include <db_185.h>
27883 #else
27884 #       include <db.h>
27885 #endif
27886
27887  /* this check could be improved */
27888 #ifndef DB_VERSION_MAJOR
27889 #       define DB_VERSION_MAJOR 1
27890 #endif
27891
27892 #if DB_VERSION_MAJOR == 1
27893         __db_version_1
27894 #endif
27895
27896 _ACEOF
27897 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27898   $EGREP "__db_version_1" >/dev/null 2>&1; then
27899   ol_cv_header_db1=yes
27900 else
27901   ol_cv_header_db1=no
27902 fi
27903 rm -f conftest*
27904
27905 fi
27906 echo "$as_me:$LINENO: result: $ol_cv_header_db1" >&5
27907 echo "${ECHO_T}$ol_cv_header_db1" >&6
27908
27909         if test $ol_cv_header_db1 = yes ; then
27910                 ol_cv_lib_db=no
27911
27912 echo "$as_me:$LINENO: checking for Berkeley DB major version" >&5
27913 echo $ECHO_N "checking for Berkeley DB major version... $ECHO_C" >&6
27914 if test "${ol_cv_bdb_major+set}" = set; then
27915   echo $ECHO_N "(cached) $ECHO_C" >&6
27916 else
27917
27918         ol_cv_bdb_major=0
27919         if test $ol_cv_bdb_major = 0 ; then
27920                 cat >conftest.$ac_ext <<_ACEOF
27921 /* confdefs.h.  */
27922 _ACEOF
27923 cat confdefs.h >>conftest.$ac_ext
27924 cat >>conftest.$ac_ext <<_ACEOF
27925 /* end confdefs.h.  */
27926
27927 #include <db.h>
27928 #ifndef DB_VERSION_MAJOR
27929 #       define DB_VERSION_MAJOR 1
27930 #endif
27931 #if DB_VERSION_MAJOR == 4
27932 __db_version
27933 #endif
27934
27935 _ACEOF
27936 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27937   $EGREP "__db_version" >/dev/null 2>&1; then
27938   ol_cv_bdb_major=4
27939 else
27940   :
27941 fi
27942 rm -f conftest*
27943
27944         fi
27945         if test $ol_cv_bdb_major = 0 ; then
27946                 cat >conftest.$ac_ext <<_ACEOF
27947 /* confdefs.h.  */
27948 _ACEOF
27949 cat confdefs.h >>conftest.$ac_ext
27950 cat >>conftest.$ac_ext <<_ACEOF
27951 /* end confdefs.h.  */
27952
27953 #include <db.h>
27954 #ifndef DB_VERSION_MAJOR
27955 #       define DB_VERSION_MAJOR 1
27956 #endif
27957 #if DB_VERSION_MAJOR == 3
27958 __db_version
27959 #endif
27960
27961 _ACEOF
27962 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27963   $EGREP "__db_version" >/dev/null 2>&1; then
27964   ol_cv_bdb_major=3
27965 else
27966   :
27967 fi
27968 rm -f conftest*
27969
27970         fi
27971         if test $ol_cv_bdb_major = 0 ; then
27972                 cat >conftest.$ac_ext <<_ACEOF
27973 /* confdefs.h.  */
27974 _ACEOF
27975 cat confdefs.h >>conftest.$ac_ext
27976 cat >>conftest.$ac_ext <<_ACEOF
27977 /* end confdefs.h.  */
27978
27979 #include <db.h>
27980 #ifndef DB_VERSION_MAJOR
27981 #       define DB_VERSION_MAJOR 1
27982 #endif
27983 #if DB_VERSION_MAJOR == 2
27984 __db_version
27985 #endif
27986
27987 _ACEOF
27988 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27989   $EGREP "__db_version" >/dev/null 2>&1; then
27990   ol_cv_bdb_major=2
27991 else
27992   :
27993 fi
27994 rm -f conftest*
27995
27996         fi
27997         if test $ol_cv_bdb_major = 0 ; then
27998                 cat >conftest.$ac_ext <<_ACEOF
27999 /* confdefs.h.  */
28000 _ACEOF
28001 cat confdefs.h >>conftest.$ac_ext
28002 cat >>conftest.$ac_ext <<_ACEOF
28003 /* end confdefs.h.  */
28004
28005 #include <db.h>
28006 #ifndef DB_VERSION_MAJOR
28007 #       define DB_VERSION_MAJOR 1
28008 #endif
28009 #if DB_VERSION_MAJOR == 1
28010 __db_version
28011 #endif
28012
28013 _ACEOF
28014 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28015   $EGREP "__db_version" >/dev/null 2>&1; then
28016   ol_cv_bdb_major=1
28017 else
28018   :
28019 fi
28020 rm -f conftest*
28021
28022         fi
28023
28024         if test $ol_cv_bdb_major = 0 ; then
28025                 { { echo "$as_me:$LINENO: error: Unknown Berkeley DB major version" >&5
28026 echo "$as_me: error: Unknown Berkeley DB major version" >&2;}
28027    { (exit 1); exit 1; }; }
28028         fi
28029
28030 fi
28031 echo "$as_me:$LINENO: result: $ol_cv_bdb_major" >&5
28032 echo "${ECHO_T}$ol_cv_bdb_major" >&6
28033
28034 echo "$as_me:$LINENO: checking for Berkeley DB minor version" >&5
28035 echo $ECHO_N "checking for Berkeley DB minor version... $ECHO_C" >&6
28036 if test "${ol_cv_bdb_minor+set}" = set; then
28037   echo $ECHO_N "(cached) $ECHO_C" >&6
28038 else
28039
28040         ol_cv_bdb_minor=0
28041         if test $ol_cv_bdb_minor = 0 ; then
28042                 cat >conftest.$ac_ext <<_ACEOF
28043 /* confdefs.h.  */
28044 _ACEOF
28045 cat confdefs.h >>conftest.$ac_ext
28046 cat >>conftest.$ac_ext <<_ACEOF
28047 /* end confdefs.h.  */
28048
28049 #include <db.h>
28050 #ifndef DB_VERSION_MINOR
28051 #       define DB_VERSION_MINOR 0
28052 #endif
28053 #if DB_VERSION_MINOR == 9
28054 __db_version
28055 #endif
28056
28057 _ACEOF
28058 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28059   $EGREP "__db_version" >/dev/null 2>&1; then
28060   ol_cv_bdb_minor=9
28061 else
28062   :
28063 fi
28064 rm -f conftest*
28065
28066         fi
28067         if test $ol_cv_bdb_minor = 0 ; then
28068                 cat >conftest.$ac_ext <<_ACEOF
28069 /* confdefs.h.  */
28070 _ACEOF
28071 cat confdefs.h >>conftest.$ac_ext
28072 cat >>conftest.$ac_ext <<_ACEOF
28073 /* end confdefs.h.  */
28074
28075 #include <db.h>
28076 #ifndef DB_VERSION_MINOR
28077 #       define DB_VERSION_MINOR 0
28078 #endif
28079 #if DB_VERSION_MINOR == 8
28080 __db_version
28081 #endif
28082
28083 _ACEOF
28084 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28085   $EGREP "__db_version" >/dev/null 2>&1; then
28086   ol_cv_bdb_minor=8
28087 else
28088   :
28089 fi
28090 rm -f conftest*
28091
28092         fi
28093         if test $ol_cv_bdb_minor = 0 ; then
28094                 cat >conftest.$ac_ext <<_ACEOF
28095 /* confdefs.h.  */
28096 _ACEOF
28097 cat confdefs.h >>conftest.$ac_ext
28098 cat >>conftest.$ac_ext <<_ACEOF
28099 /* end confdefs.h.  */
28100
28101 #include <db.h>
28102 #ifndef DB_VERSION_MINOR
28103 #       define DB_VERSION_MINOR 0
28104 #endif
28105 #if DB_VERSION_MINOR == 7
28106 __db_version
28107 #endif
28108
28109 _ACEOF
28110 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28111   $EGREP "__db_version" >/dev/null 2>&1; then
28112   ol_cv_bdb_minor=7
28113 else
28114   :
28115 fi
28116 rm -f conftest*
28117
28118         fi
28119         if test $ol_cv_bdb_minor = 0 ; then
28120                 cat >conftest.$ac_ext <<_ACEOF
28121 /* confdefs.h.  */
28122 _ACEOF
28123 cat confdefs.h >>conftest.$ac_ext
28124 cat >>conftest.$ac_ext <<_ACEOF
28125 /* end confdefs.h.  */
28126
28127 #include <db.h>
28128 #ifndef DB_VERSION_MINOR
28129 #       define DB_VERSION_MINOR 0
28130 #endif
28131 #if DB_VERSION_MINOR == 6
28132 __db_version
28133 #endif
28134
28135 _ACEOF
28136 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28137   $EGREP "__db_version" >/dev/null 2>&1; then
28138   ol_cv_bdb_minor=6
28139 else
28140   :
28141 fi
28142 rm -f conftest*
28143
28144         fi
28145         if test $ol_cv_bdb_minor = 0 ; then
28146                 cat >conftest.$ac_ext <<_ACEOF
28147 /* confdefs.h.  */
28148 _ACEOF
28149 cat confdefs.h >>conftest.$ac_ext
28150 cat >>conftest.$ac_ext <<_ACEOF
28151 /* end confdefs.h.  */
28152
28153 #include <db.h>
28154 #ifndef DB_VERSION_MINOR
28155 #       define DB_VERSION_MINOR 0
28156 #endif
28157 #if DB_VERSION_MINOR == 5
28158 __db_version
28159 #endif
28160
28161 _ACEOF
28162 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28163   $EGREP "__db_version" >/dev/null 2>&1; then
28164   ol_cv_bdb_minor=5
28165 else
28166   :
28167 fi
28168 rm -f conftest*
28169
28170         fi
28171         if test $ol_cv_bdb_minor = 0 ; then
28172                 cat >conftest.$ac_ext <<_ACEOF
28173 /* confdefs.h.  */
28174 _ACEOF
28175 cat confdefs.h >>conftest.$ac_ext
28176 cat >>conftest.$ac_ext <<_ACEOF
28177 /* end confdefs.h.  */
28178
28179 #include <db.h>
28180 #ifndef DB_VERSION_MINOR
28181 #       define DB_VERSION_MINOR 0
28182 #endif
28183 #if DB_VERSION_MINOR == 4
28184 __db_version
28185 #endif
28186
28187 _ACEOF
28188 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28189   $EGREP "__db_version" >/dev/null 2>&1; then
28190   ol_cv_bdb_minor=4
28191 else
28192   :
28193 fi
28194 rm -f conftest*
28195
28196         fi
28197         if test $ol_cv_bdb_minor = 0 ; then
28198                 cat >conftest.$ac_ext <<_ACEOF
28199 /* confdefs.h.  */
28200 _ACEOF
28201 cat confdefs.h >>conftest.$ac_ext
28202 cat >>conftest.$ac_ext <<_ACEOF
28203 /* end confdefs.h.  */
28204
28205 #include <db.h>
28206 #ifndef DB_VERSION_MINOR
28207 #       define DB_VERSION_MINOR 0
28208 #endif
28209 #if DB_VERSION_MINOR == 3
28210 __db_version
28211 #endif
28212
28213 _ACEOF
28214 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28215   $EGREP "__db_version" >/dev/null 2>&1; then
28216   ol_cv_bdb_minor=3
28217 else
28218   :
28219 fi
28220 rm -f conftest*
28221
28222         fi
28223         if test $ol_cv_bdb_minor = 0 ; then
28224                 cat >conftest.$ac_ext <<_ACEOF
28225 /* confdefs.h.  */
28226 _ACEOF
28227 cat confdefs.h >>conftest.$ac_ext
28228 cat >>conftest.$ac_ext <<_ACEOF
28229 /* end confdefs.h.  */
28230
28231 #include <db.h>
28232 #ifndef DB_VERSION_MINOR
28233 #       define DB_VERSION_MINOR 0
28234 #endif
28235 #if DB_VERSION_MINOR == 2
28236 __db_version
28237 #endif
28238
28239 _ACEOF
28240 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28241   $EGREP "__db_version" >/dev/null 2>&1; then
28242   ol_cv_bdb_minor=2
28243 else
28244   :
28245 fi
28246 rm -f conftest*
28247
28248         fi
28249         if test $ol_cv_bdb_minor = 0 ; then
28250                 cat >conftest.$ac_ext <<_ACEOF
28251 /* confdefs.h.  */
28252 _ACEOF
28253 cat confdefs.h >>conftest.$ac_ext
28254 cat >>conftest.$ac_ext <<_ACEOF
28255 /* end confdefs.h.  */
28256
28257 #include <db.h>
28258 #ifndef DB_VERSION_MINOR
28259 #       define DB_VERSION_MINOR 0
28260 #endif
28261 #if DB_VERSION_MINOR == 1
28262 __db_version
28263 #endif
28264
28265 _ACEOF
28266 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28267   $EGREP "__db_version" >/dev/null 2>&1; then
28268   ol_cv_bdb_minor=1
28269 else
28270   :
28271 fi
28272 rm -f conftest*
28273
28274         fi
28275
28276 fi
28277 echo "$as_me:$LINENO: result: $ol_cv_bdb_minor" >&5
28278 echo "${ECHO_T}$ol_cv_bdb_minor" >&6
28279
28280 if test $ol_cv_bdb_major = 4 ; then
28281         if test $ol_cv_bdb_minor = 4 ; then
28282                 if test $ol_cv_lib_db = no ; then
28283         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb44)" >&5
28284 echo $ECHO_N "checking for Berkeley DB link (-ldb44)... $ECHO_C" >&6
28285 if test "${ol_cv_db_db44+set}" = set; then
28286   echo $ECHO_N "(cached) $ECHO_C" >&6
28287 else
28288
28289         ol_DB_LIB=-ldb44
28290         ol_LIBS=$LIBS
28291         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28292
28293         cat >conftest.$ac_ext <<_ACEOF
28294 /* confdefs.h.  */
28295 _ACEOF
28296 cat confdefs.h >>conftest.$ac_ext
28297 cat >>conftest.$ac_ext <<_ACEOF
28298 /* end confdefs.h.  */
28299
28300 #ifdef HAVE_DB_185_H
28301 # include <db_185.h>
28302 #else
28303 # include <db.h>
28304 #endif
28305
28306 #ifndef DB_VERSION_MAJOR
28307 # define DB_VERSION_MAJOR 1
28308 #endif
28309
28310 #ifndef NULL
28311 #define NULL ((void*)0)
28312 #endif
28313
28314 int
28315 main ()
28316 {
28317
28318 #if DB_VERSION_MAJOR > 1
28319         {
28320                 char *version;
28321                 int major, minor, patch;
28322
28323                 version = db_version( &major, &minor, &patch );
28324
28325                 if( major != DB_VERSION_MAJOR ||
28326                         minor < DB_VERSION_MINOR )
28327                 {
28328                         printf("Berkeley DB version mismatch\n"
28329                                 "\theader: %s\n\tlibrary: %s\n",
28330                                 DB_VERSION_STRING, version);
28331                         return 1;
28332                 }
28333         }
28334 #endif
28335
28336 #if DB_VERSION_MAJOR > 2
28337         db_env_create( NULL, 0 );
28338 #elif DB_VERSION_MAJOR > 1
28339         db_appexit( NULL );
28340 #else
28341         (void) dbopen( NULL, 0, 0, 0, NULL);
28342 #endif
28343
28344   ;
28345   return 0;
28346 }
28347 _ACEOF
28348 rm -f conftest.$ac_objext conftest$ac_exeext
28349 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28350   (eval $ac_link) 2>conftest.er1
28351   ac_status=$?
28352   grep -v '^ *+' conftest.er1 >conftest.err
28353   rm -f conftest.er1
28354   cat conftest.err >&5
28355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28356   (exit $ac_status); } &&
28357          { ac_try='test -z "$ac_c_werror_flag"
28358                          || test ! -s conftest.err'
28359   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28360   (eval $ac_try) 2>&5
28361   ac_status=$?
28362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28363   (exit $ac_status); }; } &&
28364          { ac_try='test -s conftest$ac_exeext'
28365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28366   (eval $ac_try) 2>&5
28367   ac_status=$?
28368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28369   (exit $ac_status); }; }; then
28370   ol_cv_db_db44=yes
28371 else
28372   echo "$as_me: failed program was:" >&5
28373 sed 's/^/| /' conftest.$ac_ext >&5
28374
28375 ol_cv_db_db44=no
28376 fi
28377 rm -f conftest.err conftest.$ac_objext \
28378       conftest$ac_exeext conftest.$ac_ext
28379
28380         LIBS="$ol_LIBS"
28381
28382 fi
28383 echo "$as_me:$LINENO: result: $ol_cv_db_db44" >&5
28384 echo "${ECHO_T}$ol_cv_db_db44" >&6
28385
28386         if test $ol_cv_db_db44 = yes ; then
28387                 ol_cv_lib_db=-ldb44
28388         fi
28389 fi
28390
28391                 if test $ol_cv_lib_db = no ; then
28392         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-44)" >&5
28393 echo $ECHO_N "checking for Berkeley DB link (-ldb-44)... $ECHO_C" >&6
28394 if test "${ol_cv_db_db_44+set}" = set; then
28395   echo $ECHO_N "(cached) $ECHO_C" >&6
28396 else
28397
28398         ol_DB_LIB=-ldb-44
28399         ol_LIBS=$LIBS
28400         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28401
28402         cat >conftest.$ac_ext <<_ACEOF
28403 /* confdefs.h.  */
28404 _ACEOF
28405 cat confdefs.h >>conftest.$ac_ext
28406 cat >>conftest.$ac_ext <<_ACEOF
28407 /* end confdefs.h.  */
28408
28409 #ifdef HAVE_DB_185_H
28410 # include <db_185.h>
28411 #else
28412 # include <db.h>
28413 #endif
28414
28415 #ifndef DB_VERSION_MAJOR
28416 # define DB_VERSION_MAJOR 1
28417 #endif
28418
28419 #ifndef NULL
28420 #define NULL ((void*)0)
28421 #endif
28422
28423 int
28424 main ()
28425 {
28426
28427 #if DB_VERSION_MAJOR > 1
28428         {
28429                 char *version;
28430                 int major, minor, patch;
28431
28432                 version = db_version( &major, &minor, &patch );
28433
28434                 if( major != DB_VERSION_MAJOR ||
28435                         minor < DB_VERSION_MINOR )
28436                 {
28437                         printf("Berkeley DB version mismatch\n"
28438                                 "\theader: %s\n\tlibrary: %s\n",
28439                                 DB_VERSION_STRING, version);
28440                         return 1;
28441                 }
28442         }
28443 #endif
28444
28445 #if DB_VERSION_MAJOR > 2
28446         db_env_create( NULL, 0 );
28447 #elif DB_VERSION_MAJOR > 1
28448         db_appexit( NULL );
28449 #else
28450         (void) dbopen( NULL, 0, 0, 0, NULL);
28451 #endif
28452
28453   ;
28454   return 0;
28455 }
28456 _ACEOF
28457 rm -f conftest.$ac_objext conftest$ac_exeext
28458 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28459   (eval $ac_link) 2>conftest.er1
28460   ac_status=$?
28461   grep -v '^ *+' conftest.er1 >conftest.err
28462   rm -f conftest.er1
28463   cat conftest.err >&5
28464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28465   (exit $ac_status); } &&
28466          { ac_try='test -z "$ac_c_werror_flag"
28467                          || test ! -s conftest.err'
28468   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28469   (eval $ac_try) 2>&5
28470   ac_status=$?
28471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28472   (exit $ac_status); }; } &&
28473          { ac_try='test -s conftest$ac_exeext'
28474   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28475   (eval $ac_try) 2>&5
28476   ac_status=$?
28477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28478   (exit $ac_status); }; }; then
28479   ol_cv_db_db_44=yes
28480 else
28481   echo "$as_me: failed program was:" >&5
28482 sed 's/^/| /' conftest.$ac_ext >&5
28483
28484 ol_cv_db_db_44=no
28485 fi
28486 rm -f conftest.err conftest.$ac_objext \
28487       conftest$ac_exeext conftest.$ac_ext
28488
28489         LIBS="$ol_LIBS"
28490
28491 fi
28492 echo "$as_me:$LINENO: result: $ol_cv_db_db_44" >&5
28493 echo "${ECHO_T}$ol_cv_db_db_44" >&6
28494
28495         if test $ol_cv_db_db_44 = yes ; then
28496                 ol_cv_lib_db=-ldb-44
28497         fi
28498 fi
28499
28500                 if test $ol_cv_lib_db = no ; then
28501         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.4)" >&5
28502 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.4)... $ECHO_C" >&6
28503 if test "${ol_cv_db_db_4_dot_4+set}" = set; then
28504   echo $ECHO_N "(cached) $ECHO_C" >&6
28505 else
28506
28507         ol_DB_LIB=-ldb-4.4
28508         ol_LIBS=$LIBS
28509         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28510
28511         cat >conftest.$ac_ext <<_ACEOF
28512 /* confdefs.h.  */
28513 _ACEOF
28514 cat confdefs.h >>conftest.$ac_ext
28515 cat >>conftest.$ac_ext <<_ACEOF
28516 /* end confdefs.h.  */
28517
28518 #ifdef HAVE_DB_185_H
28519 # include <db_185.h>
28520 #else
28521 # include <db.h>
28522 #endif
28523
28524 #ifndef DB_VERSION_MAJOR
28525 # define DB_VERSION_MAJOR 1
28526 #endif
28527
28528 #ifndef NULL
28529 #define NULL ((void*)0)
28530 #endif
28531
28532 int
28533 main ()
28534 {
28535
28536 #if DB_VERSION_MAJOR > 1
28537         {
28538                 char *version;
28539                 int major, minor, patch;
28540
28541                 version = db_version( &major, &minor, &patch );
28542
28543                 if( major != DB_VERSION_MAJOR ||
28544                         minor < DB_VERSION_MINOR )
28545                 {
28546                         printf("Berkeley DB version mismatch\n"
28547                                 "\theader: %s\n\tlibrary: %s\n",
28548                                 DB_VERSION_STRING, version);
28549                         return 1;
28550                 }
28551         }
28552 #endif
28553
28554 #if DB_VERSION_MAJOR > 2
28555         db_env_create( NULL, 0 );
28556 #elif DB_VERSION_MAJOR > 1
28557         db_appexit( NULL );
28558 #else
28559         (void) dbopen( NULL, 0, 0, 0, NULL);
28560 #endif
28561
28562   ;
28563   return 0;
28564 }
28565 _ACEOF
28566 rm -f conftest.$ac_objext conftest$ac_exeext
28567 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28568   (eval $ac_link) 2>conftest.er1
28569   ac_status=$?
28570   grep -v '^ *+' conftest.er1 >conftest.err
28571   rm -f conftest.er1
28572   cat conftest.err >&5
28573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28574   (exit $ac_status); } &&
28575          { ac_try='test -z "$ac_c_werror_flag"
28576                          || test ! -s conftest.err'
28577   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28578   (eval $ac_try) 2>&5
28579   ac_status=$?
28580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28581   (exit $ac_status); }; } &&
28582          { ac_try='test -s conftest$ac_exeext'
28583   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28584   (eval $ac_try) 2>&5
28585   ac_status=$?
28586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28587   (exit $ac_status); }; }; then
28588   ol_cv_db_db_4_dot_4=yes
28589 else
28590   echo "$as_me: failed program was:" >&5
28591 sed 's/^/| /' conftest.$ac_ext >&5
28592
28593 ol_cv_db_db_4_dot_4=no
28594 fi
28595 rm -f conftest.err conftest.$ac_objext \
28596       conftest$ac_exeext conftest.$ac_ext
28597
28598         LIBS="$ol_LIBS"
28599
28600 fi
28601 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_4" >&5
28602 echo "${ECHO_T}$ol_cv_db_db_4_dot_4" >&6
28603
28604         if test $ol_cv_db_db_4_dot_4 = yes ; then
28605                 ol_cv_lib_db=-ldb-4.4
28606         fi
28607 fi
28608
28609                 if test $ol_cv_lib_db = no ; then
28610         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-4)" >&5
28611 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-4)... $ECHO_C" >&6
28612 if test "${ol_cv_db_db_4_4+set}" = set; then
28613   echo $ECHO_N "(cached) $ECHO_C" >&6
28614 else
28615
28616         ol_DB_LIB=-ldb-4-4
28617         ol_LIBS=$LIBS
28618         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28619
28620         cat >conftest.$ac_ext <<_ACEOF
28621 /* confdefs.h.  */
28622 _ACEOF
28623 cat confdefs.h >>conftest.$ac_ext
28624 cat >>conftest.$ac_ext <<_ACEOF
28625 /* end confdefs.h.  */
28626
28627 #ifdef HAVE_DB_185_H
28628 # include <db_185.h>
28629 #else
28630 # include <db.h>
28631 #endif
28632
28633 #ifndef DB_VERSION_MAJOR
28634 # define DB_VERSION_MAJOR 1
28635 #endif
28636
28637 #ifndef NULL
28638 #define NULL ((void*)0)
28639 #endif
28640
28641 int
28642 main ()
28643 {
28644
28645 #if DB_VERSION_MAJOR > 1
28646         {
28647                 char *version;
28648                 int major, minor, patch;
28649
28650                 version = db_version( &major, &minor, &patch );
28651
28652                 if( major != DB_VERSION_MAJOR ||
28653                         minor < DB_VERSION_MINOR )
28654                 {
28655                         printf("Berkeley DB version mismatch\n"
28656                                 "\theader: %s\n\tlibrary: %s\n",
28657                                 DB_VERSION_STRING, version);
28658                         return 1;
28659                 }
28660         }
28661 #endif
28662
28663 #if DB_VERSION_MAJOR > 2
28664         db_env_create( NULL, 0 );
28665 #elif DB_VERSION_MAJOR > 1
28666         db_appexit( NULL );
28667 #else
28668         (void) dbopen( NULL, 0, 0, 0, NULL);
28669 #endif
28670
28671   ;
28672   return 0;
28673 }
28674 _ACEOF
28675 rm -f conftest.$ac_objext conftest$ac_exeext
28676 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28677   (eval $ac_link) 2>conftest.er1
28678   ac_status=$?
28679   grep -v '^ *+' conftest.er1 >conftest.err
28680   rm -f conftest.er1
28681   cat conftest.err >&5
28682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28683   (exit $ac_status); } &&
28684          { ac_try='test -z "$ac_c_werror_flag"
28685                          || test ! -s conftest.err'
28686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28687   (eval $ac_try) 2>&5
28688   ac_status=$?
28689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28690   (exit $ac_status); }; } &&
28691          { ac_try='test -s conftest$ac_exeext'
28692   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28693   (eval $ac_try) 2>&5
28694   ac_status=$?
28695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28696   (exit $ac_status); }; }; then
28697   ol_cv_db_db_4_4=yes
28698 else
28699   echo "$as_me: failed program was:" >&5
28700 sed 's/^/| /' conftest.$ac_ext >&5
28701
28702 ol_cv_db_db_4_4=no
28703 fi
28704 rm -f conftest.err conftest.$ac_objext \
28705       conftest$ac_exeext conftest.$ac_ext
28706
28707         LIBS="$ol_LIBS"
28708
28709 fi
28710 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_4" >&5
28711 echo "${ECHO_T}$ol_cv_db_db_4_4" >&6
28712
28713         if test $ol_cv_db_db_4_4 = yes ; then
28714                 ol_cv_lib_db=-ldb-4-4
28715         fi
28716 fi
28717
28718         elif test $ol_cv_bdb_minor = 3 ; then
28719                 if test $ol_cv_lib_db = no ; then
28720         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb43)" >&5
28721 echo $ECHO_N "checking for Berkeley DB link (-ldb43)... $ECHO_C" >&6
28722 if test "${ol_cv_db_db43+set}" = set; then
28723   echo $ECHO_N "(cached) $ECHO_C" >&6
28724 else
28725
28726         ol_DB_LIB=-ldb43
28727         ol_LIBS=$LIBS
28728         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28729
28730         cat >conftest.$ac_ext <<_ACEOF
28731 /* confdefs.h.  */
28732 _ACEOF
28733 cat confdefs.h >>conftest.$ac_ext
28734 cat >>conftest.$ac_ext <<_ACEOF
28735 /* end confdefs.h.  */
28736
28737 #ifdef HAVE_DB_185_H
28738 # include <db_185.h>
28739 #else
28740 # include <db.h>
28741 #endif
28742
28743 #ifndef DB_VERSION_MAJOR
28744 # define DB_VERSION_MAJOR 1
28745 #endif
28746
28747 #ifndef NULL
28748 #define NULL ((void*)0)
28749 #endif
28750
28751 int
28752 main ()
28753 {
28754
28755 #if DB_VERSION_MAJOR > 1
28756         {
28757                 char *version;
28758                 int major, minor, patch;
28759
28760                 version = db_version( &major, &minor, &patch );
28761
28762                 if( major != DB_VERSION_MAJOR ||
28763                         minor < DB_VERSION_MINOR )
28764                 {
28765                         printf("Berkeley DB version mismatch\n"
28766                                 "\theader: %s\n\tlibrary: %s\n",
28767                                 DB_VERSION_STRING, version);
28768                         return 1;
28769                 }
28770         }
28771 #endif
28772
28773 #if DB_VERSION_MAJOR > 2
28774         db_env_create( NULL, 0 );
28775 #elif DB_VERSION_MAJOR > 1
28776         db_appexit( NULL );
28777 #else
28778         (void) dbopen( NULL, 0, 0, 0, NULL);
28779 #endif
28780
28781   ;
28782   return 0;
28783 }
28784 _ACEOF
28785 rm -f conftest.$ac_objext conftest$ac_exeext
28786 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28787   (eval $ac_link) 2>conftest.er1
28788   ac_status=$?
28789   grep -v '^ *+' conftest.er1 >conftest.err
28790   rm -f conftest.er1
28791   cat conftest.err >&5
28792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28793   (exit $ac_status); } &&
28794          { ac_try='test -z "$ac_c_werror_flag"
28795                          || test ! -s conftest.err'
28796   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28797   (eval $ac_try) 2>&5
28798   ac_status=$?
28799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28800   (exit $ac_status); }; } &&
28801          { ac_try='test -s conftest$ac_exeext'
28802   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28803   (eval $ac_try) 2>&5
28804   ac_status=$?
28805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28806   (exit $ac_status); }; }; then
28807   ol_cv_db_db43=yes
28808 else
28809   echo "$as_me: failed program was:" >&5
28810 sed 's/^/| /' conftest.$ac_ext >&5
28811
28812 ol_cv_db_db43=no
28813 fi
28814 rm -f conftest.err conftest.$ac_objext \
28815       conftest$ac_exeext conftest.$ac_ext
28816
28817         LIBS="$ol_LIBS"
28818
28819 fi
28820 echo "$as_me:$LINENO: result: $ol_cv_db_db43" >&5
28821 echo "${ECHO_T}$ol_cv_db_db43" >&6
28822
28823         if test $ol_cv_db_db43 = yes ; then
28824                 ol_cv_lib_db=-ldb43
28825         fi
28826 fi
28827
28828                 if test $ol_cv_lib_db = no ; then
28829         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-43)" >&5
28830 echo $ECHO_N "checking for Berkeley DB link (-ldb-43)... $ECHO_C" >&6
28831 if test "${ol_cv_db_db_43+set}" = set; then
28832   echo $ECHO_N "(cached) $ECHO_C" >&6
28833 else
28834
28835         ol_DB_LIB=-ldb-43
28836         ol_LIBS=$LIBS
28837         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28838
28839         cat >conftest.$ac_ext <<_ACEOF
28840 /* confdefs.h.  */
28841 _ACEOF
28842 cat confdefs.h >>conftest.$ac_ext
28843 cat >>conftest.$ac_ext <<_ACEOF
28844 /* end confdefs.h.  */
28845
28846 #ifdef HAVE_DB_185_H
28847 # include <db_185.h>
28848 #else
28849 # include <db.h>
28850 #endif
28851
28852 #ifndef DB_VERSION_MAJOR
28853 # define DB_VERSION_MAJOR 1
28854 #endif
28855
28856 #ifndef NULL
28857 #define NULL ((void*)0)
28858 #endif
28859
28860 int
28861 main ()
28862 {
28863
28864 #if DB_VERSION_MAJOR > 1
28865         {
28866                 char *version;
28867                 int major, minor, patch;
28868
28869                 version = db_version( &major, &minor, &patch );
28870
28871                 if( major != DB_VERSION_MAJOR ||
28872                         minor < DB_VERSION_MINOR )
28873                 {
28874                         printf("Berkeley DB version mismatch\n"
28875                                 "\theader: %s\n\tlibrary: %s\n",
28876                                 DB_VERSION_STRING, version);
28877                         return 1;
28878                 }
28879         }
28880 #endif
28881
28882 #if DB_VERSION_MAJOR > 2
28883         db_env_create( NULL, 0 );
28884 #elif DB_VERSION_MAJOR > 1
28885         db_appexit( NULL );
28886 #else
28887         (void) dbopen( NULL, 0, 0, 0, NULL);
28888 #endif
28889
28890   ;
28891   return 0;
28892 }
28893 _ACEOF
28894 rm -f conftest.$ac_objext conftest$ac_exeext
28895 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28896   (eval $ac_link) 2>conftest.er1
28897   ac_status=$?
28898   grep -v '^ *+' conftest.er1 >conftest.err
28899   rm -f conftest.er1
28900   cat conftest.err >&5
28901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28902   (exit $ac_status); } &&
28903          { ac_try='test -z "$ac_c_werror_flag"
28904                          || test ! -s conftest.err'
28905   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28906   (eval $ac_try) 2>&5
28907   ac_status=$?
28908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28909   (exit $ac_status); }; } &&
28910          { ac_try='test -s conftest$ac_exeext'
28911   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28912   (eval $ac_try) 2>&5
28913   ac_status=$?
28914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28915   (exit $ac_status); }; }; then
28916   ol_cv_db_db_43=yes
28917 else
28918   echo "$as_me: failed program was:" >&5
28919 sed 's/^/| /' conftest.$ac_ext >&5
28920
28921 ol_cv_db_db_43=no
28922 fi
28923 rm -f conftest.err conftest.$ac_objext \
28924       conftest$ac_exeext conftest.$ac_ext
28925
28926         LIBS="$ol_LIBS"
28927
28928 fi
28929 echo "$as_me:$LINENO: result: $ol_cv_db_db_43" >&5
28930 echo "${ECHO_T}$ol_cv_db_db_43" >&6
28931
28932         if test $ol_cv_db_db_43 = yes ; then
28933                 ol_cv_lib_db=-ldb-43
28934         fi
28935 fi
28936
28937                 if test $ol_cv_lib_db = no ; then
28938         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.3)" >&5
28939 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.3)... $ECHO_C" >&6
28940 if test "${ol_cv_db_db_4_dot_3+set}" = set; then
28941   echo $ECHO_N "(cached) $ECHO_C" >&6
28942 else
28943
28944         ol_DB_LIB=-ldb-4.3
28945         ol_LIBS=$LIBS
28946         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28947
28948         cat >conftest.$ac_ext <<_ACEOF
28949 /* confdefs.h.  */
28950 _ACEOF
28951 cat confdefs.h >>conftest.$ac_ext
28952 cat >>conftest.$ac_ext <<_ACEOF
28953 /* end confdefs.h.  */
28954
28955 #ifdef HAVE_DB_185_H
28956 # include <db_185.h>
28957 #else
28958 # include <db.h>
28959 #endif
28960
28961 #ifndef DB_VERSION_MAJOR
28962 # define DB_VERSION_MAJOR 1
28963 #endif
28964
28965 #ifndef NULL
28966 #define NULL ((void*)0)
28967 #endif
28968
28969 int
28970 main ()
28971 {
28972
28973 #if DB_VERSION_MAJOR > 1
28974         {
28975                 char *version;
28976                 int major, minor, patch;
28977
28978                 version = db_version( &major, &minor, &patch );
28979
28980                 if( major != DB_VERSION_MAJOR ||
28981                         minor < DB_VERSION_MINOR )
28982                 {
28983                         printf("Berkeley DB version mismatch\n"
28984                                 "\theader: %s\n\tlibrary: %s\n",
28985                                 DB_VERSION_STRING, version);
28986                         return 1;
28987                 }
28988         }
28989 #endif
28990
28991 #if DB_VERSION_MAJOR > 2
28992         db_env_create( NULL, 0 );
28993 #elif DB_VERSION_MAJOR > 1
28994         db_appexit( NULL );
28995 #else
28996         (void) dbopen( NULL, 0, 0, 0, NULL);
28997 #endif
28998
28999   ;
29000   return 0;
29001 }
29002 _ACEOF
29003 rm -f conftest.$ac_objext conftest$ac_exeext
29004 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29005   (eval $ac_link) 2>conftest.er1
29006   ac_status=$?
29007   grep -v '^ *+' conftest.er1 >conftest.err
29008   rm -f conftest.er1
29009   cat conftest.err >&5
29010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29011   (exit $ac_status); } &&
29012          { ac_try='test -z "$ac_c_werror_flag"
29013                          || test ! -s conftest.err'
29014   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29015   (eval $ac_try) 2>&5
29016   ac_status=$?
29017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29018   (exit $ac_status); }; } &&
29019          { ac_try='test -s conftest$ac_exeext'
29020   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29021   (eval $ac_try) 2>&5
29022   ac_status=$?
29023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29024   (exit $ac_status); }; }; then
29025   ol_cv_db_db_4_dot_3=yes
29026 else
29027   echo "$as_me: failed program was:" >&5
29028 sed 's/^/| /' conftest.$ac_ext >&5
29029
29030 ol_cv_db_db_4_dot_3=no
29031 fi
29032 rm -f conftest.err conftest.$ac_objext \
29033       conftest$ac_exeext conftest.$ac_ext
29034
29035         LIBS="$ol_LIBS"
29036
29037 fi
29038 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_3" >&5
29039 echo "${ECHO_T}$ol_cv_db_db_4_dot_3" >&6
29040
29041         if test $ol_cv_db_db_4_dot_3 = yes ; then
29042                 ol_cv_lib_db=-ldb-4.3
29043         fi
29044 fi
29045
29046                 if test $ol_cv_lib_db = no ; then
29047         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-3)" >&5
29048 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-3)... $ECHO_C" >&6
29049 if test "${ol_cv_db_db_4_3+set}" = set; then
29050   echo $ECHO_N "(cached) $ECHO_C" >&6
29051 else
29052
29053         ol_DB_LIB=-ldb-4-3
29054         ol_LIBS=$LIBS
29055         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29056
29057         cat >conftest.$ac_ext <<_ACEOF
29058 /* confdefs.h.  */
29059 _ACEOF
29060 cat confdefs.h >>conftest.$ac_ext
29061 cat >>conftest.$ac_ext <<_ACEOF
29062 /* end confdefs.h.  */
29063
29064 #ifdef HAVE_DB_185_H
29065 # include <db_185.h>
29066 #else
29067 # include <db.h>
29068 #endif
29069
29070 #ifndef DB_VERSION_MAJOR
29071 # define DB_VERSION_MAJOR 1
29072 #endif
29073
29074 #ifndef NULL
29075 #define NULL ((void*)0)
29076 #endif
29077
29078 int
29079 main ()
29080 {
29081
29082 #if DB_VERSION_MAJOR > 1
29083         {
29084                 char *version;
29085                 int major, minor, patch;
29086
29087                 version = db_version( &major, &minor, &patch );
29088
29089                 if( major != DB_VERSION_MAJOR ||
29090                         minor < DB_VERSION_MINOR )
29091                 {
29092                         printf("Berkeley DB version mismatch\n"
29093                                 "\theader: %s\n\tlibrary: %s\n",
29094                                 DB_VERSION_STRING, version);
29095                         return 1;
29096                 }
29097         }
29098 #endif
29099
29100 #if DB_VERSION_MAJOR > 2
29101         db_env_create( NULL, 0 );
29102 #elif DB_VERSION_MAJOR > 1
29103         db_appexit( NULL );
29104 #else
29105         (void) dbopen( NULL, 0, 0, 0, NULL);
29106 #endif
29107
29108   ;
29109   return 0;
29110 }
29111 _ACEOF
29112 rm -f conftest.$ac_objext conftest$ac_exeext
29113 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29114   (eval $ac_link) 2>conftest.er1
29115   ac_status=$?
29116   grep -v '^ *+' conftest.er1 >conftest.err
29117   rm -f conftest.er1
29118   cat conftest.err >&5
29119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29120   (exit $ac_status); } &&
29121          { ac_try='test -z "$ac_c_werror_flag"
29122                          || test ! -s conftest.err'
29123   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29124   (eval $ac_try) 2>&5
29125   ac_status=$?
29126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29127   (exit $ac_status); }; } &&
29128          { ac_try='test -s conftest$ac_exeext'
29129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29130   (eval $ac_try) 2>&5
29131   ac_status=$?
29132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29133   (exit $ac_status); }; }; then
29134   ol_cv_db_db_4_3=yes
29135 else
29136   echo "$as_me: failed program was:" >&5
29137 sed 's/^/| /' conftest.$ac_ext >&5
29138
29139 ol_cv_db_db_4_3=no
29140 fi
29141 rm -f conftest.err conftest.$ac_objext \
29142       conftest$ac_exeext conftest.$ac_ext
29143
29144         LIBS="$ol_LIBS"
29145
29146 fi
29147 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_3" >&5
29148 echo "${ECHO_T}$ol_cv_db_db_4_3" >&6
29149
29150         if test $ol_cv_db_db_4_3 = yes ; then
29151                 ol_cv_lib_db=-ldb-4-3
29152         fi
29153 fi
29154
29155         elif test $ol_cv_bdb_minor = 2 ; then
29156                 if test $ol_cv_lib_db = no ; then
29157         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb42)" >&5
29158 echo $ECHO_N "checking for Berkeley DB link (-ldb42)... $ECHO_C" >&6
29159 if test "${ol_cv_db_db42+set}" = set; then
29160   echo $ECHO_N "(cached) $ECHO_C" >&6
29161 else
29162
29163         ol_DB_LIB=-ldb42
29164         ol_LIBS=$LIBS
29165         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29166
29167         cat >conftest.$ac_ext <<_ACEOF
29168 /* confdefs.h.  */
29169 _ACEOF
29170 cat confdefs.h >>conftest.$ac_ext
29171 cat >>conftest.$ac_ext <<_ACEOF
29172 /* end confdefs.h.  */
29173
29174 #ifdef HAVE_DB_185_H
29175 # include <db_185.h>
29176 #else
29177 # include <db.h>
29178 #endif
29179
29180 #ifndef DB_VERSION_MAJOR
29181 # define DB_VERSION_MAJOR 1
29182 #endif
29183
29184 #ifndef NULL
29185 #define NULL ((void*)0)
29186 #endif
29187
29188 int
29189 main ()
29190 {
29191
29192 #if DB_VERSION_MAJOR > 1
29193         {
29194                 char *version;
29195                 int major, minor, patch;
29196
29197                 version = db_version( &major, &minor, &patch );
29198
29199                 if( major != DB_VERSION_MAJOR ||
29200                         minor < DB_VERSION_MINOR )
29201                 {
29202                         printf("Berkeley DB version mismatch\n"
29203                                 "\theader: %s\n\tlibrary: %s\n",
29204                                 DB_VERSION_STRING, version);
29205                         return 1;
29206                 }
29207         }
29208 #endif
29209
29210 #if DB_VERSION_MAJOR > 2
29211         db_env_create( NULL, 0 );
29212 #elif DB_VERSION_MAJOR > 1
29213         db_appexit( NULL );
29214 #else
29215         (void) dbopen( NULL, 0, 0, 0, NULL);
29216 #endif
29217
29218   ;
29219   return 0;
29220 }
29221 _ACEOF
29222 rm -f conftest.$ac_objext conftest$ac_exeext
29223 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29224   (eval $ac_link) 2>conftest.er1
29225   ac_status=$?
29226   grep -v '^ *+' conftest.er1 >conftest.err
29227   rm -f conftest.er1
29228   cat conftest.err >&5
29229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29230   (exit $ac_status); } &&
29231          { ac_try='test -z "$ac_c_werror_flag"
29232                          || test ! -s conftest.err'
29233   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29234   (eval $ac_try) 2>&5
29235   ac_status=$?
29236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29237   (exit $ac_status); }; } &&
29238          { ac_try='test -s conftest$ac_exeext'
29239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29240   (eval $ac_try) 2>&5
29241   ac_status=$?
29242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29243   (exit $ac_status); }; }; then
29244   ol_cv_db_db42=yes
29245 else
29246   echo "$as_me: failed program was:" >&5
29247 sed 's/^/| /' conftest.$ac_ext >&5
29248
29249 ol_cv_db_db42=no
29250 fi
29251 rm -f conftest.err conftest.$ac_objext \
29252       conftest$ac_exeext conftest.$ac_ext
29253
29254         LIBS="$ol_LIBS"
29255
29256 fi
29257 echo "$as_me:$LINENO: result: $ol_cv_db_db42" >&5
29258 echo "${ECHO_T}$ol_cv_db_db42" >&6
29259
29260         if test $ol_cv_db_db42 = yes ; then
29261                 ol_cv_lib_db=-ldb42
29262         fi
29263 fi
29264
29265                 if test $ol_cv_lib_db = no ; then
29266         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-42)" >&5
29267 echo $ECHO_N "checking for Berkeley DB link (-ldb-42)... $ECHO_C" >&6
29268 if test "${ol_cv_db_db_42+set}" = set; then
29269   echo $ECHO_N "(cached) $ECHO_C" >&6
29270 else
29271
29272         ol_DB_LIB=-ldb-42
29273         ol_LIBS=$LIBS
29274         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29275
29276         cat >conftest.$ac_ext <<_ACEOF
29277 /* confdefs.h.  */
29278 _ACEOF
29279 cat confdefs.h >>conftest.$ac_ext
29280 cat >>conftest.$ac_ext <<_ACEOF
29281 /* end confdefs.h.  */
29282
29283 #ifdef HAVE_DB_185_H
29284 # include <db_185.h>
29285 #else
29286 # include <db.h>
29287 #endif
29288
29289 #ifndef DB_VERSION_MAJOR
29290 # define DB_VERSION_MAJOR 1
29291 #endif
29292
29293 #ifndef NULL
29294 #define NULL ((void*)0)
29295 #endif
29296
29297 int
29298 main ()
29299 {
29300
29301 #if DB_VERSION_MAJOR > 1
29302         {
29303                 char *version;
29304                 int major, minor, patch;
29305
29306                 version = db_version( &major, &minor, &patch );
29307
29308                 if( major != DB_VERSION_MAJOR ||
29309                         minor < DB_VERSION_MINOR )
29310                 {
29311                         printf("Berkeley DB version mismatch\n"
29312                                 "\theader: %s\n\tlibrary: %s\n",
29313                                 DB_VERSION_STRING, version);
29314                         return 1;
29315                 }
29316         }
29317 #endif
29318
29319 #if DB_VERSION_MAJOR > 2
29320         db_env_create( NULL, 0 );
29321 #elif DB_VERSION_MAJOR > 1
29322         db_appexit( NULL );
29323 #else
29324         (void) dbopen( NULL, 0, 0, 0, NULL);
29325 #endif
29326
29327   ;
29328   return 0;
29329 }
29330 _ACEOF
29331 rm -f conftest.$ac_objext conftest$ac_exeext
29332 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29333   (eval $ac_link) 2>conftest.er1
29334   ac_status=$?
29335   grep -v '^ *+' conftest.er1 >conftest.err
29336   rm -f conftest.er1
29337   cat conftest.err >&5
29338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29339   (exit $ac_status); } &&
29340          { ac_try='test -z "$ac_c_werror_flag"
29341                          || test ! -s conftest.err'
29342   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29343   (eval $ac_try) 2>&5
29344   ac_status=$?
29345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29346   (exit $ac_status); }; } &&
29347          { ac_try='test -s conftest$ac_exeext'
29348   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29349   (eval $ac_try) 2>&5
29350   ac_status=$?
29351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29352   (exit $ac_status); }; }; then
29353   ol_cv_db_db_42=yes
29354 else
29355   echo "$as_me: failed program was:" >&5
29356 sed 's/^/| /' conftest.$ac_ext >&5
29357
29358 ol_cv_db_db_42=no
29359 fi
29360 rm -f conftest.err conftest.$ac_objext \
29361       conftest$ac_exeext conftest.$ac_ext
29362
29363         LIBS="$ol_LIBS"
29364
29365 fi
29366 echo "$as_me:$LINENO: result: $ol_cv_db_db_42" >&5
29367 echo "${ECHO_T}$ol_cv_db_db_42" >&6
29368
29369         if test $ol_cv_db_db_42 = yes ; then
29370                 ol_cv_lib_db=-ldb-42
29371         fi
29372 fi
29373
29374                 if test $ol_cv_lib_db = no ; then
29375         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.2)" >&5
29376 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.2)... $ECHO_C" >&6
29377 if test "${ol_cv_db_db_4_dot_2+set}" = set; then
29378   echo $ECHO_N "(cached) $ECHO_C" >&6
29379 else
29380
29381         ol_DB_LIB=-ldb-4.2
29382         ol_LIBS=$LIBS
29383         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29384
29385         cat >conftest.$ac_ext <<_ACEOF
29386 /* confdefs.h.  */
29387 _ACEOF
29388 cat confdefs.h >>conftest.$ac_ext
29389 cat >>conftest.$ac_ext <<_ACEOF
29390 /* end confdefs.h.  */
29391
29392 #ifdef HAVE_DB_185_H
29393 # include <db_185.h>
29394 #else
29395 # include <db.h>
29396 #endif
29397
29398 #ifndef DB_VERSION_MAJOR
29399 # define DB_VERSION_MAJOR 1
29400 #endif
29401
29402 #ifndef NULL
29403 #define NULL ((void*)0)
29404 #endif
29405
29406 int
29407 main ()
29408 {
29409
29410 #if DB_VERSION_MAJOR > 1
29411         {
29412                 char *version;
29413                 int major, minor, patch;
29414
29415                 version = db_version( &major, &minor, &patch );
29416
29417                 if( major != DB_VERSION_MAJOR ||
29418                         minor < DB_VERSION_MINOR )
29419                 {
29420                         printf("Berkeley DB version mismatch\n"
29421                                 "\theader: %s\n\tlibrary: %s\n",
29422                                 DB_VERSION_STRING, version);
29423                         return 1;
29424                 }
29425         }
29426 #endif
29427
29428 #if DB_VERSION_MAJOR > 2
29429         db_env_create( NULL, 0 );
29430 #elif DB_VERSION_MAJOR > 1
29431         db_appexit( NULL );
29432 #else
29433         (void) dbopen( NULL, 0, 0, 0, NULL);
29434 #endif
29435
29436   ;
29437   return 0;
29438 }
29439 _ACEOF
29440 rm -f conftest.$ac_objext conftest$ac_exeext
29441 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29442   (eval $ac_link) 2>conftest.er1
29443   ac_status=$?
29444   grep -v '^ *+' conftest.er1 >conftest.err
29445   rm -f conftest.er1
29446   cat conftest.err >&5
29447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29448   (exit $ac_status); } &&
29449          { ac_try='test -z "$ac_c_werror_flag"
29450                          || test ! -s conftest.err'
29451   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29452   (eval $ac_try) 2>&5
29453   ac_status=$?
29454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29455   (exit $ac_status); }; } &&
29456          { ac_try='test -s conftest$ac_exeext'
29457   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29458   (eval $ac_try) 2>&5
29459   ac_status=$?
29460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29461   (exit $ac_status); }; }; then
29462   ol_cv_db_db_4_dot_2=yes
29463 else
29464   echo "$as_me: failed program was:" >&5
29465 sed 's/^/| /' conftest.$ac_ext >&5
29466
29467 ol_cv_db_db_4_dot_2=no
29468 fi
29469 rm -f conftest.err conftest.$ac_objext \
29470       conftest$ac_exeext conftest.$ac_ext
29471
29472         LIBS="$ol_LIBS"
29473
29474 fi
29475 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_2" >&5
29476 echo "${ECHO_T}$ol_cv_db_db_4_dot_2" >&6
29477
29478         if test $ol_cv_db_db_4_dot_2 = yes ; then
29479                 ol_cv_lib_db=-ldb-4.2
29480         fi
29481 fi
29482
29483                 if test $ol_cv_lib_db = no ; then
29484         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-2)" >&5
29485 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-2)... $ECHO_C" >&6
29486 if test "${ol_cv_db_db_4_2+set}" = set; then
29487   echo $ECHO_N "(cached) $ECHO_C" >&6
29488 else
29489
29490         ol_DB_LIB=-ldb-4-2
29491         ol_LIBS=$LIBS
29492         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29493
29494         cat >conftest.$ac_ext <<_ACEOF
29495 /* confdefs.h.  */
29496 _ACEOF
29497 cat confdefs.h >>conftest.$ac_ext
29498 cat >>conftest.$ac_ext <<_ACEOF
29499 /* end confdefs.h.  */
29500
29501 #ifdef HAVE_DB_185_H
29502 # include <db_185.h>
29503 #else
29504 # include <db.h>
29505 #endif
29506
29507 #ifndef DB_VERSION_MAJOR
29508 # define DB_VERSION_MAJOR 1
29509 #endif
29510
29511 #ifndef NULL
29512 #define NULL ((void*)0)
29513 #endif
29514
29515 int
29516 main ()
29517 {
29518
29519 #if DB_VERSION_MAJOR > 1
29520         {
29521                 char *version;
29522                 int major, minor, patch;
29523
29524                 version = db_version( &major, &minor, &patch );
29525
29526                 if( major != DB_VERSION_MAJOR ||
29527                         minor < DB_VERSION_MINOR )
29528                 {
29529                         printf("Berkeley DB version mismatch\n"
29530                                 "\theader: %s\n\tlibrary: %s\n",
29531                                 DB_VERSION_STRING, version);
29532                         return 1;
29533                 }
29534         }
29535 #endif
29536
29537 #if DB_VERSION_MAJOR > 2
29538         db_env_create( NULL, 0 );
29539 #elif DB_VERSION_MAJOR > 1
29540         db_appexit( NULL );
29541 #else
29542         (void) dbopen( NULL, 0, 0, 0, NULL);
29543 #endif
29544
29545   ;
29546   return 0;
29547 }
29548 _ACEOF
29549 rm -f conftest.$ac_objext conftest$ac_exeext
29550 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29551   (eval $ac_link) 2>conftest.er1
29552   ac_status=$?
29553   grep -v '^ *+' conftest.er1 >conftest.err
29554   rm -f conftest.er1
29555   cat conftest.err >&5
29556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29557   (exit $ac_status); } &&
29558          { ac_try='test -z "$ac_c_werror_flag"
29559                          || test ! -s conftest.err'
29560   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29561   (eval $ac_try) 2>&5
29562   ac_status=$?
29563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29564   (exit $ac_status); }; } &&
29565          { ac_try='test -s conftest$ac_exeext'
29566   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29567   (eval $ac_try) 2>&5
29568   ac_status=$?
29569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29570   (exit $ac_status); }; }; then
29571   ol_cv_db_db_4_2=yes
29572 else
29573   echo "$as_me: failed program was:" >&5
29574 sed 's/^/| /' conftest.$ac_ext >&5
29575
29576 ol_cv_db_db_4_2=no
29577 fi
29578 rm -f conftest.err conftest.$ac_objext \
29579       conftest$ac_exeext conftest.$ac_ext
29580
29581         LIBS="$ol_LIBS"
29582
29583 fi
29584 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_2" >&5
29585 echo "${ECHO_T}$ol_cv_db_db_4_2" >&6
29586
29587         if test $ol_cv_db_db_4_2 = yes ; then
29588                 ol_cv_lib_db=-ldb-4-2
29589         fi
29590 fi
29591
29592         elif test $ol_cv_bdb_minor = 1 ; then
29593                 if test $ol_cv_lib_db = no ; then
29594         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb41)" >&5
29595 echo $ECHO_N "checking for Berkeley DB link (-ldb41)... $ECHO_C" >&6
29596 if test "${ol_cv_db_db41+set}" = set; then
29597   echo $ECHO_N "(cached) $ECHO_C" >&6
29598 else
29599
29600         ol_DB_LIB=-ldb41
29601         ol_LIBS=$LIBS
29602         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29603
29604         cat >conftest.$ac_ext <<_ACEOF
29605 /* confdefs.h.  */
29606 _ACEOF
29607 cat confdefs.h >>conftest.$ac_ext
29608 cat >>conftest.$ac_ext <<_ACEOF
29609 /* end confdefs.h.  */
29610
29611 #ifdef HAVE_DB_185_H
29612 # include <db_185.h>
29613 #else
29614 # include <db.h>
29615 #endif
29616
29617 #ifndef DB_VERSION_MAJOR
29618 # define DB_VERSION_MAJOR 1
29619 #endif
29620
29621 #ifndef NULL
29622 #define NULL ((void*)0)
29623 #endif
29624
29625 int
29626 main ()
29627 {
29628
29629 #if DB_VERSION_MAJOR > 1
29630         {
29631                 char *version;
29632                 int major, minor, patch;
29633
29634                 version = db_version( &major, &minor, &patch );
29635
29636                 if( major != DB_VERSION_MAJOR ||
29637                         minor < DB_VERSION_MINOR )
29638                 {
29639                         printf("Berkeley DB version mismatch\n"
29640                                 "\theader: %s\n\tlibrary: %s\n",
29641                                 DB_VERSION_STRING, version);
29642                         return 1;
29643                 }
29644         }
29645 #endif
29646
29647 #if DB_VERSION_MAJOR > 2
29648         db_env_create( NULL, 0 );
29649 #elif DB_VERSION_MAJOR > 1
29650         db_appexit( NULL );
29651 #else
29652         (void) dbopen( NULL, 0, 0, 0, NULL);
29653 #endif
29654
29655   ;
29656   return 0;
29657 }
29658 _ACEOF
29659 rm -f conftest.$ac_objext conftest$ac_exeext
29660 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29661   (eval $ac_link) 2>conftest.er1
29662   ac_status=$?
29663   grep -v '^ *+' conftest.er1 >conftest.err
29664   rm -f conftest.er1
29665   cat conftest.err >&5
29666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29667   (exit $ac_status); } &&
29668          { ac_try='test -z "$ac_c_werror_flag"
29669                          || test ! -s conftest.err'
29670   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29671   (eval $ac_try) 2>&5
29672   ac_status=$?
29673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29674   (exit $ac_status); }; } &&
29675          { ac_try='test -s conftest$ac_exeext'
29676   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29677   (eval $ac_try) 2>&5
29678   ac_status=$?
29679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29680   (exit $ac_status); }; }; then
29681   ol_cv_db_db41=yes
29682 else
29683   echo "$as_me: failed program was:" >&5
29684 sed 's/^/| /' conftest.$ac_ext >&5
29685
29686 ol_cv_db_db41=no
29687 fi
29688 rm -f conftest.err conftest.$ac_objext \
29689       conftest$ac_exeext conftest.$ac_ext
29690
29691         LIBS="$ol_LIBS"
29692
29693 fi
29694 echo "$as_me:$LINENO: result: $ol_cv_db_db41" >&5
29695 echo "${ECHO_T}$ol_cv_db_db41" >&6
29696
29697         if test $ol_cv_db_db41 = yes ; then
29698                 ol_cv_lib_db=-ldb41
29699         fi
29700 fi
29701
29702                 if test $ol_cv_lib_db = no ; then
29703         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-41)" >&5
29704 echo $ECHO_N "checking for Berkeley DB link (-ldb-41)... $ECHO_C" >&6
29705 if test "${ol_cv_db_db_41+set}" = set; then
29706   echo $ECHO_N "(cached) $ECHO_C" >&6
29707 else
29708
29709         ol_DB_LIB=-ldb-41
29710         ol_LIBS=$LIBS
29711         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29712
29713         cat >conftest.$ac_ext <<_ACEOF
29714 /* confdefs.h.  */
29715 _ACEOF
29716 cat confdefs.h >>conftest.$ac_ext
29717 cat >>conftest.$ac_ext <<_ACEOF
29718 /* end confdefs.h.  */
29719
29720 #ifdef HAVE_DB_185_H
29721 # include <db_185.h>
29722 #else
29723 # include <db.h>
29724 #endif
29725
29726 #ifndef DB_VERSION_MAJOR
29727 # define DB_VERSION_MAJOR 1
29728 #endif
29729
29730 #ifndef NULL
29731 #define NULL ((void*)0)
29732 #endif
29733
29734 int
29735 main ()
29736 {
29737
29738 #if DB_VERSION_MAJOR > 1
29739         {
29740                 char *version;
29741                 int major, minor, patch;
29742
29743                 version = db_version( &major, &minor, &patch );
29744
29745                 if( major != DB_VERSION_MAJOR ||
29746                         minor < DB_VERSION_MINOR )
29747                 {
29748                         printf("Berkeley DB version mismatch\n"
29749                                 "\theader: %s\n\tlibrary: %s\n",
29750                                 DB_VERSION_STRING, version);
29751                         return 1;
29752                 }
29753         }
29754 #endif
29755
29756 #if DB_VERSION_MAJOR > 2
29757         db_env_create( NULL, 0 );
29758 #elif DB_VERSION_MAJOR > 1
29759         db_appexit( NULL );
29760 #else
29761         (void) dbopen( NULL, 0, 0, 0, NULL);
29762 #endif
29763
29764   ;
29765   return 0;
29766 }
29767 _ACEOF
29768 rm -f conftest.$ac_objext conftest$ac_exeext
29769 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29770   (eval $ac_link) 2>conftest.er1
29771   ac_status=$?
29772   grep -v '^ *+' conftest.er1 >conftest.err
29773   rm -f conftest.er1
29774   cat conftest.err >&5
29775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29776   (exit $ac_status); } &&
29777          { ac_try='test -z "$ac_c_werror_flag"
29778                          || test ! -s conftest.err'
29779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29780   (eval $ac_try) 2>&5
29781   ac_status=$?
29782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29783   (exit $ac_status); }; } &&
29784          { ac_try='test -s conftest$ac_exeext'
29785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29786   (eval $ac_try) 2>&5
29787   ac_status=$?
29788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29789   (exit $ac_status); }; }; then
29790   ol_cv_db_db_41=yes
29791 else
29792   echo "$as_me: failed program was:" >&5
29793 sed 's/^/| /' conftest.$ac_ext >&5
29794
29795 ol_cv_db_db_41=no
29796 fi
29797 rm -f conftest.err conftest.$ac_objext \
29798       conftest$ac_exeext conftest.$ac_ext
29799
29800         LIBS="$ol_LIBS"
29801
29802 fi
29803 echo "$as_me:$LINENO: result: $ol_cv_db_db_41" >&5
29804 echo "${ECHO_T}$ol_cv_db_db_41" >&6
29805
29806         if test $ol_cv_db_db_41 = yes ; then
29807                 ol_cv_lib_db=-ldb-41
29808         fi
29809 fi
29810
29811                 if test $ol_cv_lib_db = no ; then
29812         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.1)" >&5
29813 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.1)... $ECHO_C" >&6
29814 if test "${ol_cv_db_db_4_dot_1+set}" = set; then
29815   echo $ECHO_N "(cached) $ECHO_C" >&6
29816 else
29817
29818         ol_DB_LIB=-ldb-4.1
29819         ol_LIBS=$LIBS
29820         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29821
29822         cat >conftest.$ac_ext <<_ACEOF
29823 /* confdefs.h.  */
29824 _ACEOF
29825 cat confdefs.h >>conftest.$ac_ext
29826 cat >>conftest.$ac_ext <<_ACEOF
29827 /* end confdefs.h.  */
29828
29829 #ifdef HAVE_DB_185_H
29830 # include <db_185.h>
29831 #else
29832 # include <db.h>
29833 #endif
29834
29835 #ifndef DB_VERSION_MAJOR
29836 # define DB_VERSION_MAJOR 1
29837 #endif
29838
29839 #ifndef NULL
29840 #define NULL ((void*)0)
29841 #endif
29842
29843 int
29844 main ()
29845 {
29846
29847 #if DB_VERSION_MAJOR > 1
29848         {
29849                 char *version;
29850                 int major, minor, patch;
29851
29852                 version = db_version( &major, &minor, &patch );
29853
29854                 if( major != DB_VERSION_MAJOR ||
29855                         minor < DB_VERSION_MINOR )
29856                 {
29857                         printf("Berkeley DB version mismatch\n"
29858                                 "\theader: %s\n\tlibrary: %s\n",
29859                                 DB_VERSION_STRING, version);
29860                         return 1;
29861                 }
29862         }
29863 #endif
29864
29865 #if DB_VERSION_MAJOR > 2
29866         db_env_create( NULL, 0 );
29867 #elif DB_VERSION_MAJOR > 1
29868         db_appexit( NULL );
29869 #else
29870         (void) dbopen( NULL, 0, 0, 0, NULL);
29871 #endif
29872
29873   ;
29874   return 0;
29875 }
29876 _ACEOF
29877 rm -f conftest.$ac_objext conftest$ac_exeext
29878 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29879   (eval $ac_link) 2>conftest.er1
29880   ac_status=$?
29881   grep -v '^ *+' conftest.er1 >conftest.err
29882   rm -f conftest.er1
29883   cat conftest.err >&5
29884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29885   (exit $ac_status); } &&
29886          { ac_try='test -z "$ac_c_werror_flag"
29887                          || test ! -s conftest.err'
29888   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29889   (eval $ac_try) 2>&5
29890   ac_status=$?
29891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29892   (exit $ac_status); }; } &&
29893          { ac_try='test -s conftest$ac_exeext'
29894   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29895   (eval $ac_try) 2>&5
29896   ac_status=$?
29897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29898   (exit $ac_status); }; }; then
29899   ol_cv_db_db_4_dot_1=yes
29900 else
29901   echo "$as_me: failed program was:" >&5
29902 sed 's/^/| /' conftest.$ac_ext >&5
29903
29904 ol_cv_db_db_4_dot_1=no
29905 fi
29906 rm -f conftest.err conftest.$ac_objext \
29907       conftest$ac_exeext conftest.$ac_ext
29908
29909         LIBS="$ol_LIBS"
29910
29911 fi
29912 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_1" >&5
29913 echo "${ECHO_T}$ol_cv_db_db_4_dot_1" >&6
29914
29915         if test $ol_cv_db_db_4_dot_1 = yes ; then
29916                 ol_cv_lib_db=-ldb-4.1
29917         fi
29918 fi
29919
29920                 if test $ol_cv_lib_db = no ; then
29921         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-1)" >&5
29922 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-1)... $ECHO_C" >&6
29923 if test "${ol_cv_db_db_4_1+set}" = set; then
29924   echo $ECHO_N "(cached) $ECHO_C" >&6
29925 else
29926
29927         ol_DB_LIB=-ldb-4-1
29928         ol_LIBS=$LIBS
29929         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29930
29931         cat >conftest.$ac_ext <<_ACEOF
29932 /* confdefs.h.  */
29933 _ACEOF
29934 cat confdefs.h >>conftest.$ac_ext
29935 cat >>conftest.$ac_ext <<_ACEOF
29936 /* end confdefs.h.  */
29937
29938 #ifdef HAVE_DB_185_H
29939 # include <db_185.h>
29940 #else
29941 # include <db.h>
29942 #endif
29943
29944 #ifndef DB_VERSION_MAJOR
29945 # define DB_VERSION_MAJOR 1
29946 #endif
29947
29948 #ifndef NULL
29949 #define NULL ((void*)0)
29950 #endif
29951
29952 int
29953 main ()
29954 {
29955
29956 #if DB_VERSION_MAJOR > 1
29957         {
29958                 char *version;
29959                 int major, minor, patch;
29960
29961                 version = db_version( &major, &minor, &patch );
29962
29963                 if( major != DB_VERSION_MAJOR ||
29964                         minor < DB_VERSION_MINOR )
29965                 {
29966                         printf("Berkeley DB version mismatch\n"
29967                                 "\theader: %s\n\tlibrary: %s\n",
29968                                 DB_VERSION_STRING, version);
29969                         return 1;
29970                 }
29971         }
29972 #endif
29973
29974 #if DB_VERSION_MAJOR > 2
29975         db_env_create( NULL, 0 );
29976 #elif DB_VERSION_MAJOR > 1
29977         db_appexit( NULL );
29978 #else
29979         (void) dbopen( NULL, 0, 0, 0, NULL);
29980 #endif
29981
29982   ;
29983   return 0;
29984 }
29985 _ACEOF
29986 rm -f conftest.$ac_objext conftest$ac_exeext
29987 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29988   (eval $ac_link) 2>conftest.er1
29989   ac_status=$?
29990   grep -v '^ *+' conftest.er1 >conftest.err
29991   rm -f conftest.er1
29992   cat conftest.err >&5
29993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29994   (exit $ac_status); } &&
29995          { ac_try='test -z "$ac_c_werror_flag"
29996                          || test ! -s conftest.err'
29997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29998   (eval $ac_try) 2>&5
29999   ac_status=$?
30000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30001   (exit $ac_status); }; } &&
30002          { ac_try='test -s conftest$ac_exeext'
30003   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30004   (eval $ac_try) 2>&5
30005   ac_status=$?
30006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30007   (exit $ac_status); }; }; then
30008   ol_cv_db_db_4_1=yes
30009 else
30010   echo "$as_me: failed program was:" >&5
30011 sed 's/^/| /' conftest.$ac_ext >&5
30012
30013 ol_cv_db_db_4_1=no
30014 fi
30015 rm -f conftest.err conftest.$ac_objext \
30016       conftest$ac_exeext conftest.$ac_ext
30017
30018         LIBS="$ol_LIBS"
30019
30020 fi
30021 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_1" >&5
30022 echo "${ECHO_T}$ol_cv_db_db_4_1" >&6
30023
30024         if test $ol_cv_db_db_4_1 = yes ; then
30025                 ol_cv_lib_db=-ldb-4-1
30026         fi
30027 fi
30028
30029         fi
30030         if test $ol_cv_lib_db = no ; then
30031         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4)" >&5
30032 echo $ECHO_N "checking for Berkeley DB link (-ldb-4)... $ECHO_C" >&6
30033 if test "${ol_cv_db_db_4+set}" = set; then
30034   echo $ECHO_N "(cached) $ECHO_C" >&6
30035 else
30036
30037         ol_DB_LIB=-ldb-4
30038         ol_LIBS=$LIBS
30039         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30040
30041         cat >conftest.$ac_ext <<_ACEOF
30042 /* confdefs.h.  */
30043 _ACEOF
30044 cat confdefs.h >>conftest.$ac_ext
30045 cat >>conftest.$ac_ext <<_ACEOF
30046 /* end confdefs.h.  */
30047
30048 #ifdef HAVE_DB_185_H
30049 # include <db_185.h>
30050 #else
30051 # include <db.h>
30052 #endif
30053
30054 #ifndef DB_VERSION_MAJOR
30055 # define DB_VERSION_MAJOR 1
30056 #endif
30057
30058 #ifndef NULL
30059 #define NULL ((void*)0)
30060 #endif
30061
30062 int
30063 main ()
30064 {
30065
30066 #if DB_VERSION_MAJOR > 1
30067         {
30068                 char *version;
30069                 int major, minor, patch;
30070
30071                 version = db_version( &major, &minor, &patch );
30072
30073                 if( major != DB_VERSION_MAJOR ||
30074                         minor < DB_VERSION_MINOR )
30075                 {
30076                         printf("Berkeley DB version mismatch\n"
30077                                 "\theader: %s\n\tlibrary: %s\n",
30078                                 DB_VERSION_STRING, version);
30079                         return 1;
30080                 }
30081         }
30082 #endif
30083
30084 #if DB_VERSION_MAJOR > 2
30085         db_env_create( NULL, 0 );
30086 #elif DB_VERSION_MAJOR > 1
30087         db_appexit( NULL );
30088 #else
30089         (void) dbopen( NULL, 0, 0, 0, NULL);
30090 #endif
30091
30092   ;
30093   return 0;
30094 }
30095 _ACEOF
30096 rm -f conftest.$ac_objext conftest$ac_exeext
30097 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30098   (eval $ac_link) 2>conftest.er1
30099   ac_status=$?
30100   grep -v '^ *+' conftest.er1 >conftest.err
30101   rm -f conftest.er1
30102   cat conftest.err >&5
30103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30104   (exit $ac_status); } &&
30105          { ac_try='test -z "$ac_c_werror_flag"
30106                          || test ! -s conftest.err'
30107   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30108   (eval $ac_try) 2>&5
30109   ac_status=$?
30110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30111   (exit $ac_status); }; } &&
30112          { ac_try='test -s conftest$ac_exeext'
30113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30114   (eval $ac_try) 2>&5
30115   ac_status=$?
30116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30117   (exit $ac_status); }; }; then
30118   ol_cv_db_db_4=yes
30119 else
30120   echo "$as_me: failed program was:" >&5
30121 sed 's/^/| /' conftest.$ac_ext >&5
30122
30123 ol_cv_db_db_4=no
30124 fi
30125 rm -f conftest.err conftest.$ac_objext \
30126       conftest$ac_exeext conftest.$ac_ext
30127
30128         LIBS="$ol_LIBS"
30129
30130 fi
30131 echo "$as_me:$LINENO: result: $ol_cv_db_db_4" >&5
30132 echo "${ECHO_T}$ol_cv_db_db_4" >&6
30133
30134         if test $ol_cv_db_db_4 = yes ; then
30135                 ol_cv_lib_db=-ldb-4
30136         fi
30137 fi
30138
30139         if test $ol_cv_lib_db = no ; then
30140         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb4)" >&5
30141 echo $ECHO_N "checking for Berkeley DB link (-ldb4)... $ECHO_C" >&6
30142 if test "${ol_cv_db_db4+set}" = set; then
30143   echo $ECHO_N "(cached) $ECHO_C" >&6
30144 else
30145
30146         ol_DB_LIB=-ldb4
30147         ol_LIBS=$LIBS
30148         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30149
30150         cat >conftest.$ac_ext <<_ACEOF
30151 /* confdefs.h.  */
30152 _ACEOF
30153 cat confdefs.h >>conftest.$ac_ext
30154 cat >>conftest.$ac_ext <<_ACEOF
30155 /* end confdefs.h.  */
30156
30157 #ifdef HAVE_DB_185_H
30158 # include <db_185.h>
30159 #else
30160 # include <db.h>
30161 #endif
30162
30163 #ifndef DB_VERSION_MAJOR
30164 # define DB_VERSION_MAJOR 1
30165 #endif
30166
30167 #ifndef NULL
30168 #define NULL ((void*)0)
30169 #endif
30170
30171 int
30172 main ()
30173 {
30174
30175 #if DB_VERSION_MAJOR > 1
30176         {
30177                 char *version;
30178                 int major, minor, patch;
30179
30180                 version = db_version( &major, &minor, &patch );
30181
30182                 if( major != DB_VERSION_MAJOR ||
30183                         minor < DB_VERSION_MINOR )
30184                 {
30185                         printf("Berkeley DB version mismatch\n"
30186                                 "\theader: %s\n\tlibrary: %s\n",
30187                                 DB_VERSION_STRING, version);
30188                         return 1;
30189                 }
30190         }
30191 #endif
30192
30193 #if DB_VERSION_MAJOR > 2
30194         db_env_create( NULL, 0 );
30195 #elif DB_VERSION_MAJOR > 1
30196         db_appexit( NULL );
30197 #else
30198         (void) dbopen( NULL, 0, 0, 0, NULL);
30199 #endif
30200
30201   ;
30202   return 0;
30203 }
30204 _ACEOF
30205 rm -f conftest.$ac_objext conftest$ac_exeext
30206 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30207   (eval $ac_link) 2>conftest.er1
30208   ac_status=$?
30209   grep -v '^ *+' conftest.er1 >conftest.err
30210   rm -f conftest.er1
30211   cat conftest.err >&5
30212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30213   (exit $ac_status); } &&
30214          { ac_try='test -z "$ac_c_werror_flag"
30215                          || test ! -s conftest.err'
30216   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30217   (eval $ac_try) 2>&5
30218   ac_status=$?
30219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30220   (exit $ac_status); }; } &&
30221          { ac_try='test -s conftest$ac_exeext'
30222   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30223   (eval $ac_try) 2>&5
30224   ac_status=$?
30225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30226   (exit $ac_status); }; }; then
30227   ol_cv_db_db4=yes
30228 else
30229   echo "$as_me: failed program was:" >&5
30230 sed 's/^/| /' conftest.$ac_ext >&5
30231
30232 ol_cv_db_db4=no
30233 fi
30234 rm -f conftest.err conftest.$ac_objext \
30235       conftest$ac_exeext conftest.$ac_ext
30236
30237         LIBS="$ol_LIBS"
30238
30239 fi
30240 echo "$as_me:$LINENO: result: $ol_cv_db_db4" >&5
30241 echo "${ECHO_T}$ol_cv_db_db4" >&6
30242
30243         if test $ol_cv_db_db4 = yes ; then
30244                 ol_cv_lib_db=-ldb4
30245         fi
30246 fi
30247
30248         if test $ol_cv_lib_db = no ; then
30249         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb)" >&5
30250 echo $ECHO_N "checking for Berkeley DB link (-ldb)... $ECHO_C" >&6
30251 if test "${ol_cv_db_db+set}" = set; then
30252   echo $ECHO_N "(cached) $ECHO_C" >&6
30253 else
30254
30255         ol_DB_LIB=-ldb
30256         ol_LIBS=$LIBS
30257         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30258
30259         cat >conftest.$ac_ext <<_ACEOF
30260 /* confdefs.h.  */
30261 _ACEOF
30262 cat confdefs.h >>conftest.$ac_ext
30263 cat >>conftest.$ac_ext <<_ACEOF
30264 /* end confdefs.h.  */
30265
30266 #ifdef HAVE_DB_185_H
30267 # include <db_185.h>
30268 #else
30269 # include <db.h>
30270 #endif
30271
30272 #ifndef DB_VERSION_MAJOR
30273 # define DB_VERSION_MAJOR 1
30274 #endif
30275
30276 #ifndef NULL
30277 #define NULL ((void*)0)
30278 #endif
30279
30280 int
30281 main ()
30282 {
30283
30284 #if DB_VERSION_MAJOR > 1
30285         {
30286                 char *version;
30287                 int major, minor, patch;
30288
30289                 version = db_version( &major, &minor, &patch );
30290
30291                 if( major != DB_VERSION_MAJOR ||
30292                         minor < DB_VERSION_MINOR )
30293                 {
30294                         printf("Berkeley DB version mismatch\n"
30295                                 "\theader: %s\n\tlibrary: %s\n",
30296                                 DB_VERSION_STRING, version);
30297                         return 1;
30298                 }
30299         }
30300 #endif
30301
30302 #if DB_VERSION_MAJOR > 2
30303         db_env_create( NULL, 0 );
30304 #elif DB_VERSION_MAJOR > 1
30305         db_appexit( NULL );
30306 #else
30307         (void) dbopen( NULL, 0, 0, 0, NULL);
30308 #endif
30309
30310   ;
30311   return 0;
30312 }
30313 _ACEOF
30314 rm -f conftest.$ac_objext conftest$ac_exeext
30315 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30316   (eval $ac_link) 2>conftest.er1
30317   ac_status=$?
30318   grep -v '^ *+' conftest.er1 >conftest.err
30319   rm -f conftest.er1
30320   cat conftest.err >&5
30321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30322   (exit $ac_status); } &&
30323          { ac_try='test -z "$ac_c_werror_flag"
30324                          || test ! -s conftest.err'
30325   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30326   (eval $ac_try) 2>&5
30327   ac_status=$?
30328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30329   (exit $ac_status); }; } &&
30330          { ac_try='test -s conftest$ac_exeext'
30331   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30332   (eval $ac_try) 2>&5
30333   ac_status=$?
30334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30335   (exit $ac_status); }; }; then
30336   ol_cv_db_db=yes
30337 else
30338   echo "$as_me: failed program was:" >&5
30339 sed 's/^/| /' conftest.$ac_ext >&5
30340
30341 ol_cv_db_db=no
30342 fi
30343 rm -f conftest.err conftest.$ac_objext \
30344       conftest$ac_exeext conftest.$ac_ext
30345
30346         LIBS="$ol_LIBS"
30347
30348 fi
30349 echo "$as_me:$LINENO: result: $ol_cv_db_db" >&5
30350 echo "${ECHO_T}$ol_cv_db_db" >&6
30351
30352         if test $ol_cv_db_db = yes ; then
30353                 ol_cv_lib_db=-ldb
30354         fi
30355 fi
30356
30357
30358 elif test $ol_cv_bdb_major = 3 ; then
30359         if test $ol_cv_lib_db = no ; then
30360         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb3)" >&5
30361 echo $ECHO_N "checking for Berkeley DB link (-ldb3)... $ECHO_C" >&6
30362 if test "${ol_cv_db_db3+set}" = set; then
30363   echo $ECHO_N "(cached) $ECHO_C" >&6
30364 else
30365
30366         ol_DB_LIB=-ldb3
30367         ol_LIBS=$LIBS
30368         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30369
30370         cat >conftest.$ac_ext <<_ACEOF
30371 /* confdefs.h.  */
30372 _ACEOF
30373 cat confdefs.h >>conftest.$ac_ext
30374 cat >>conftest.$ac_ext <<_ACEOF
30375 /* end confdefs.h.  */
30376
30377 #ifdef HAVE_DB_185_H
30378 # include <db_185.h>
30379 #else
30380 # include <db.h>
30381 #endif
30382
30383 #ifndef DB_VERSION_MAJOR
30384 # define DB_VERSION_MAJOR 1
30385 #endif
30386
30387 #ifndef NULL
30388 #define NULL ((void*)0)
30389 #endif
30390
30391 int
30392 main ()
30393 {
30394
30395 #if DB_VERSION_MAJOR > 1
30396         {
30397                 char *version;
30398                 int major, minor, patch;
30399
30400                 version = db_version( &major, &minor, &patch );
30401
30402                 if( major != DB_VERSION_MAJOR ||
30403                         minor < DB_VERSION_MINOR )
30404                 {
30405                         printf("Berkeley DB version mismatch\n"
30406                                 "\theader: %s\n\tlibrary: %s\n",
30407                                 DB_VERSION_STRING, version);
30408                         return 1;
30409                 }
30410         }
30411 #endif
30412
30413 #if DB_VERSION_MAJOR > 2
30414         db_env_create( NULL, 0 );
30415 #elif DB_VERSION_MAJOR > 1
30416         db_appexit( NULL );
30417 #else
30418         (void) dbopen( NULL, 0, 0, 0, NULL);
30419 #endif
30420
30421   ;
30422   return 0;
30423 }
30424 _ACEOF
30425 rm -f conftest.$ac_objext conftest$ac_exeext
30426 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30427   (eval $ac_link) 2>conftest.er1
30428   ac_status=$?
30429   grep -v '^ *+' conftest.er1 >conftest.err
30430   rm -f conftest.er1
30431   cat conftest.err >&5
30432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30433   (exit $ac_status); } &&
30434          { ac_try='test -z "$ac_c_werror_flag"
30435                          || test ! -s conftest.err'
30436   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30437   (eval $ac_try) 2>&5
30438   ac_status=$?
30439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30440   (exit $ac_status); }; } &&
30441          { ac_try='test -s conftest$ac_exeext'
30442   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30443   (eval $ac_try) 2>&5
30444   ac_status=$?
30445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30446   (exit $ac_status); }; }; then
30447   ol_cv_db_db3=yes
30448 else
30449   echo "$as_me: failed program was:" >&5
30450 sed 's/^/| /' conftest.$ac_ext >&5
30451
30452 ol_cv_db_db3=no
30453 fi
30454 rm -f conftest.err conftest.$ac_objext \
30455       conftest$ac_exeext conftest.$ac_ext
30456
30457         LIBS="$ol_LIBS"
30458
30459 fi
30460 echo "$as_me:$LINENO: result: $ol_cv_db_db3" >&5
30461 echo "${ECHO_T}$ol_cv_db_db3" >&6
30462
30463         if test $ol_cv_db_db3 = yes ; then
30464                 ol_cv_lib_db=-ldb3
30465         fi
30466 fi
30467
30468         if test $ol_cv_lib_db = no ; then
30469         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-3)" >&5
30470 echo $ECHO_N "checking for Berkeley DB link (-ldb-3)... $ECHO_C" >&6
30471 if test "${ol_cv_db_db_3+set}" = set; then
30472   echo $ECHO_N "(cached) $ECHO_C" >&6
30473 else
30474
30475         ol_DB_LIB=-ldb-3
30476         ol_LIBS=$LIBS
30477         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30478
30479         cat >conftest.$ac_ext <<_ACEOF
30480 /* confdefs.h.  */
30481 _ACEOF
30482 cat confdefs.h >>conftest.$ac_ext
30483 cat >>conftest.$ac_ext <<_ACEOF
30484 /* end confdefs.h.  */
30485
30486 #ifdef HAVE_DB_185_H
30487 # include <db_185.h>
30488 #else
30489 # include <db.h>
30490 #endif
30491
30492 #ifndef DB_VERSION_MAJOR
30493 # define DB_VERSION_MAJOR 1
30494 #endif
30495
30496 #ifndef NULL
30497 #define NULL ((void*)0)
30498 #endif
30499
30500 int
30501 main ()
30502 {
30503
30504 #if DB_VERSION_MAJOR > 1
30505         {
30506                 char *version;
30507                 int major, minor, patch;
30508
30509                 version = db_version( &major, &minor, &patch );
30510
30511                 if( major != DB_VERSION_MAJOR ||
30512                         minor < DB_VERSION_MINOR )
30513                 {
30514                         printf("Berkeley DB version mismatch\n"
30515                                 "\theader: %s\n\tlibrary: %s\n",
30516                                 DB_VERSION_STRING, version);
30517                         return 1;
30518                 }
30519         }
30520 #endif
30521
30522 #if DB_VERSION_MAJOR > 2
30523         db_env_create( NULL, 0 );
30524 #elif DB_VERSION_MAJOR > 1
30525         db_appexit( NULL );
30526 #else
30527         (void) dbopen( NULL, 0, 0, 0, NULL);
30528 #endif
30529
30530   ;
30531   return 0;
30532 }
30533 _ACEOF
30534 rm -f conftest.$ac_objext conftest$ac_exeext
30535 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30536   (eval $ac_link) 2>conftest.er1
30537   ac_status=$?
30538   grep -v '^ *+' conftest.er1 >conftest.err
30539   rm -f conftest.er1
30540   cat conftest.err >&5
30541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30542   (exit $ac_status); } &&
30543          { ac_try='test -z "$ac_c_werror_flag"
30544                          || test ! -s conftest.err'
30545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30546   (eval $ac_try) 2>&5
30547   ac_status=$?
30548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30549   (exit $ac_status); }; } &&
30550          { ac_try='test -s conftest$ac_exeext'
30551   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30552   (eval $ac_try) 2>&5
30553   ac_status=$?
30554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30555   (exit $ac_status); }; }; then
30556   ol_cv_db_db_3=yes
30557 else
30558   echo "$as_me: failed program was:" >&5
30559 sed 's/^/| /' conftest.$ac_ext >&5
30560
30561 ol_cv_db_db_3=no
30562 fi
30563 rm -f conftest.err conftest.$ac_objext \
30564       conftest$ac_exeext conftest.$ac_ext
30565
30566         LIBS="$ol_LIBS"
30567
30568 fi
30569 echo "$as_me:$LINENO: result: $ol_cv_db_db_3" >&5
30570 echo "${ECHO_T}$ol_cv_db_db_3" >&6
30571
30572         if test $ol_cv_db_db_3 = yes ; then
30573                 ol_cv_lib_db=-ldb-3
30574         fi
30575 fi
30576
30577
30578 elif test $ol_cv_bdb_major = 2 ; then
30579         if test $ol_cv_lib_db = no ; then
30580         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb2)" >&5
30581 echo $ECHO_N "checking for Berkeley DB link (-ldb2)... $ECHO_C" >&6
30582 if test "${ol_cv_db_db2+set}" = set; then
30583   echo $ECHO_N "(cached) $ECHO_C" >&6
30584 else
30585
30586         ol_DB_LIB=-ldb2
30587         ol_LIBS=$LIBS
30588         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30589
30590         cat >conftest.$ac_ext <<_ACEOF
30591 /* confdefs.h.  */
30592 _ACEOF
30593 cat confdefs.h >>conftest.$ac_ext
30594 cat >>conftest.$ac_ext <<_ACEOF
30595 /* end confdefs.h.  */
30596
30597 #ifdef HAVE_DB_185_H
30598 # include <db_185.h>
30599 #else
30600 # include <db.h>
30601 #endif
30602
30603 #ifndef DB_VERSION_MAJOR
30604 # define DB_VERSION_MAJOR 1
30605 #endif
30606
30607 #ifndef NULL
30608 #define NULL ((void*)0)
30609 #endif
30610
30611 int
30612 main ()
30613 {
30614
30615 #if DB_VERSION_MAJOR > 1
30616         {
30617                 char *version;
30618                 int major, minor, patch;
30619
30620                 version = db_version( &major, &minor, &patch );
30621
30622                 if( major != DB_VERSION_MAJOR ||
30623                         minor < DB_VERSION_MINOR )
30624                 {
30625                         printf("Berkeley DB version mismatch\n"
30626                                 "\theader: %s\n\tlibrary: %s\n",
30627                                 DB_VERSION_STRING, version);
30628                         return 1;
30629                 }
30630         }
30631 #endif
30632
30633 #if DB_VERSION_MAJOR > 2
30634         db_env_create( NULL, 0 );
30635 #elif DB_VERSION_MAJOR > 1
30636         db_appexit( NULL );
30637 #else
30638         (void) dbopen( NULL, 0, 0, 0, NULL);
30639 #endif
30640
30641   ;
30642   return 0;
30643 }
30644 _ACEOF
30645 rm -f conftest.$ac_objext conftest$ac_exeext
30646 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30647   (eval $ac_link) 2>conftest.er1
30648   ac_status=$?
30649   grep -v '^ *+' conftest.er1 >conftest.err
30650   rm -f conftest.er1
30651   cat conftest.err >&5
30652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30653   (exit $ac_status); } &&
30654          { ac_try='test -z "$ac_c_werror_flag"
30655                          || test ! -s conftest.err'
30656   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30657   (eval $ac_try) 2>&5
30658   ac_status=$?
30659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30660   (exit $ac_status); }; } &&
30661          { ac_try='test -s conftest$ac_exeext'
30662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30663   (eval $ac_try) 2>&5
30664   ac_status=$?
30665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30666   (exit $ac_status); }; }; then
30667   ol_cv_db_db2=yes
30668 else
30669   echo "$as_me: failed program was:" >&5
30670 sed 's/^/| /' conftest.$ac_ext >&5
30671
30672 ol_cv_db_db2=no
30673 fi
30674 rm -f conftest.err conftest.$ac_objext \
30675       conftest$ac_exeext conftest.$ac_ext
30676
30677         LIBS="$ol_LIBS"
30678
30679 fi
30680 echo "$as_me:$LINENO: result: $ol_cv_db_db2" >&5
30681 echo "${ECHO_T}$ol_cv_db_db2" >&6
30682
30683         if test $ol_cv_db_db2 = yes ; then
30684                 ol_cv_lib_db=-ldb2
30685         fi
30686 fi
30687
30688         if test $ol_cv_lib_db = no ; then
30689         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-2)" >&5
30690 echo $ECHO_N "checking for Berkeley DB link (-ldb-2)... $ECHO_C" >&6
30691 if test "${ol_cv_db_db_2+set}" = set; then
30692   echo $ECHO_N "(cached) $ECHO_C" >&6
30693 else
30694
30695         ol_DB_LIB=-ldb-2
30696         ol_LIBS=$LIBS
30697         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30698
30699         cat >conftest.$ac_ext <<_ACEOF
30700 /* confdefs.h.  */
30701 _ACEOF
30702 cat confdefs.h >>conftest.$ac_ext
30703 cat >>conftest.$ac_ext <<_ACEOF
30704 /* end confdefs.h.  */
30705
30706 #ifdef HAVE_DB_185_H
30707 # include <db_185.h>
30708 #else
30709 # include <db.h>
30710 #endif
30711
30712 #ifndef DB_VERSION_MAJOR
30713 # define DB_VERSION_MAJOR 1
30714 #endif
30715
30716 #ifndef NULL
30717 #define NULL ((void*)0)
30718 #endif
30719
30720 int
30721 main ()
30722 {
30723
30724 #if DB_VERSION_MAJOR > 1
30725         {
30726                 char *version;
30727                 int major, minor, patch;
30728
30729                 version = db_version( &major, &minor, &patch );
30730
30731                 if( major != DB_VERSION_MAJOR ||
30732                         minor < DB_VERSION_MINOR )
30733                 {
30734                         printf("Berkeley DB version mismatch\n"
30735                                 "\theader: %s\n\tlibrary: %s\n",
30736                                 DB_VERSION_STRING, version);
30737                         return 1;
30738                 }
30739         }
30740 #endif
30741
30742 #if DB_VERSION_MAJOR > 2
30743         db_env_create( NULL, 0 );
30744 #elif DB_VERSION_MAJOR > 1
30745         db_appexit( NULL );
30746 #else
30747         (void) dbopen( NULL, 0, 0, 0, NULL);
30748 #endif
30749
30750   ;
30751   return 0;
30752 }
30753 _ACEOF
30754 rm -f conftest.$ac_objext conftest$ac_exeext
30755 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30756   (eval $ac_link) 2>conftest.er1
30757   ac_status=$?
30758   grep -v '^ *+' conftest.er1 >conftest.err
30759   rm -f conftest.er1
30760   cat conftest.err >&5
30761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30762   (exit $ac_status); } &&
30763          { ac_try='test -z "$ac_c_werror_flag"
30764                          || test ! -s conftest.err'
30765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30766   (eval $ac_try) 2>&5
30767   ac_status=$?
30768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30769   (exit $ac_status); }; } &&
30770          { ac_try='test -s conftest$ac_exeext'
30771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30772   (eval $ac_try) 2>&5
30773   ac_status=$?
30774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30775   (exit $ac_status); }; }; then
30776   ol_cv_db_db_2=yes
30777 else
30778   echo "$as_me: failed program was:" >&5
30779 sed 's/^/| /' conftest.$ac_ext >&5
30780
30781 ol_cv_db_db_2=no
30782 fi
30783 rm -f conftest.err conftest.$ac_objext \
30784       conftest$ac_exeext conftest.$ac_ext
30785
30786         LIBS="$ol_LIBS"
30787
30788 fi
30789 echo "$as_me:$LINENO: result: $ol_cv_db_db_2" >&5
30790 echo "${ECHO_T}$ol_cv_db_db_2" >&6
30791
30792         if test $ol_cv_db_db_2 = yes ; then
30793                 ol_cv_lib_db=-ldb-2
30794         fi
30795 fi
30796
30797
30798 elif test $ol_cv_bdb_major = 1 ; then
30799         if test $ol_cv_lib_db = no ; then
30800         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb1)" >&5
30801 echo $ECHO_N "checking for Berkeley DB link (-ldb1)... $ECHO_C" >&6
30802 if test "${ol_cv_db_db1+set}" = set; then
30803   echo $ECHO_N "(cached) $ECHO_C" >&6
30804 else
30805
30806         ol_DB_LIB=-ldb1
30807         ol_LIBS=$LIBS
30808         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30809
30810         cat >conftest.$ac_ext <<_ACEOF
30811 /* confdefs.h.  */
30812 _ACEOF
30813 cat confdefs.h >>conftest.$ac_ext
30814 cat >>conftest.$ac_ext <<_ACEOF
30815 /* end confdefs.h.  */
30816
30817 #ifdef HAVE_DB_185_H
30818 # include <db_185.h>
30819 #else
30820 # include <db.h>
30821 #endif
30822
30823 #ifndef DB_VERSION_MAJOR
30824 # define DB_VERSION_MAJOR 1
30825 #endif
30826
30827 #ifndef NULL
30828 #define NULL ((void*)0)
30829 #endif
30830
30831 int
30832 main ()
30833 {
30834
30835 #if DB_VERSION_MAJOR > 1
30836         {
30837                 char *version;
30838                 int major, minor, patch;
30839
30840                 version = db_version( &major, &minor, &patch );
30841
30842                 if( major != DB_VERSION_MAJOR ||
30843                         minor < DB_VERSION_MINOR )
30844                 {
30845                         printf("Berkeley DB version mismatch\n"
30846                                 "\theader: %s\n\tlibrary: %s\n",
30847                                 DB_VERSION_STRING, version);
30848                         return 1;
30849                 }
30850         }
30851 #endif
30852
30853 #if DB_VERSION_MAJOR > 2
30854         db_env_create( NULL, 0 );
30855 #elif DB_VERSION_MAJOR > 1
30856         db_appexit( NULL );
30857 #else
30858         (void) dbopen( NULL, 0, 0, 0, NULL);
30859 #endif
30860
30861   ;
30862   return 0;
30863 }
30864 _ACEOF
30865 rm -f conftest.$ac_objext conftest$ac_exeext
30866 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30867   (eval $ac_link) 2>conftest.er1
30868   ac_status=$?
30869   grep -v '^ *+' conftest.er1 >conftest.err
30870   rm -f conftest.er1
30871   cat conftest.err >&5
30872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30873   (exit $ac_status); } &&
30874          { ac_try='test -z "$ac_c_werror_flag"
30875                          || test ! -s conftest.err'
30876   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30877   (eval $ac_try) 2>&5
30878   ac_status=$?
30879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30880   (exit $ac_status); }; } &&
30881          { ac_try='test -s conftest$ac_exeext'
30882   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30883   (eval $ac_try) 2>&5
30884   ac_status=$?
30885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30886   (exit $ac_status); }; }; then
30887   ol_cv_db_db1=yes
30888 else
30889   echo "$as_me: failed program was:" >&5
30890 sed 's/^/| /' conftest.$ac_ext >&5
30891
30892 ol_cv_db_db1=no
30893 fi
30894 rm -f conftest.err conftest.$ac_objext \
30895       conftest$ac_exeext conftest.$ac_ext
30896
30897         LIBS="$ol_LIBS"
30898
30899 fi
30900 echo "$as_me:$LINENO: result: $ol_cv_db_db1" >&5
30901 echo "${ECHO_T}$ol_cv_db_db1" >&6
30902
30903         if test $ol_cv_db_db1 = yes ; then
30904                 ol_cv_lib_db=-ldb1
30905         fi
30906 fi
30907
30908         if test $ol_cv_lib_db = no ; then
30909         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-1)" >&5
30910 echo $ECHO_N "checking for Berkeley DB link (-ldb-1)... $ECHO_C" >&6
30911 if test "${ol_cv_db_db_1+set}" = set; then
30912   echo $ECHO_N "(cached) $ECHO_C" >&6
30913 else
30914
30915         ol_DB_LIB=-ldb-1
30916         ol_LIBS=$LIBS
30917         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30918
30919         cat >conftest.$ac_ext <<_ACEOF
30920 /* confdefs.h.  */
30921 _ACEOF
30922 cat confdefs.h >>conftest.$ac_ext
30923 cat >>conftest.$ac_ext <<_ACEOF
30924 /* end confdefs.h.  */
30925
30926 #ifdef HAVE_DB_185_H
30927 # include <db_185.h>
30928 #else
30929 # include <db.h>
30930 #endif
30931
30932 #ifndef DB_VERSION_MAJOR
30933 # define DB_VERSION_MAJOR 1
30934 #endif
30935
30936 #ifndef NULL
30937 #define NULL ((void*)0)
30938 #endif
30939
30940 int
30941 main ()
30942 {
30943
30944 #if DB_VERSION_MAJOR > 1
30945         {
30946                 char *version;
30947                 int major, minor, patch;
30948
30949                 version = db_version( &major, &minor, &patch );
30950
30951                 if( major != DB_VERSION_MAJOR ||
30952                         minor < DB_VERSION_MINOR )
30953                 {
30954                         printf("Berkeley DB version mismatch\n"
30955                                 "\theader: %s\n\tlibrary: %s\n",
30956                                 DB_VERSION_STRING, version);
30957                         return 1;
30958                 }
30959         }
30960 #endif
30961
30962 #if DB_VERSION_MAJOR > 2
30963         db_env_create( NULL, 0 );
30964 #elif DB_VERSION_MAJOR > 1
30965         db_appexit( NULL );
30966 #else
30967         (void) dbopen( NULL, 0, 0, 0, NULL);
30968 #endif
30969
30970   ;
30971   return 0;
30972 }
30973 _ACEOF
30974 rm -f conftest.$ac_objext conftest$ac_exeext
30975 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30976   (eval $ac_link) 2>conftest.er1
30977   ac_status=$?
30978   grep -v '^ *+' conftest.er1 >conftest.err
30979   rm -f conftest.er1
30980   cat conftest.err >&5
30981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30982   (exit $ac_status); } &&
30983          { ac_try='test -z "$ac_c_werror_flag"
30984                          || test ! -s conftest.err'
30985   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30986   (eval $ac_try) 2>&5
30987   ac_status=$?
30988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30989   (exit $ac_status); }; } &&
30990          { ac_try='test -s conftest$ac_exeext'
30991   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30992   (eval $ac_try) 2>&5
30993   ac_status=$?
30994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30995   (exit $ac_status); }; }; then
30996   ol_cv_db_db_1=yes
30997 else
30998   echo "$as_me: failed program was:" >&5
30999 sed 's/^/| /' conftest.$ac_ext >&5
31000
31001 ol_cv_db_db_1=no
31002 fi
31003 rm -f conftest.err conftest.$ac_objext \
31004       conftest$ac_exeext conftest.$ac_ext
31005
31006         LIBS="$ol_LIBS"
31007
31008 fi
31009 echo "$as_me:$LINENO: result: $ol_cv_db_db_1" >&5
31010 echo "${ECHO_T}$ol_cv_db_db_1" >&6
31011
31012         if test $ol_cv_db_db_1 = yes ; then
31013                 ol_cv_lib_db=-ldb-1
31014         fi
31015 fi
31016
31017 fi
31018 if test $ol_cv_lib_db = no ; then
31019         echo "$as_me:$LINENO: checking for Berkeley DB link (default)" >&5
31020 echo $ECHO_N "checking for Berkeley DB link (default)... $ECHO_C" >&6
31021 if test "${ol_cv_db_none+set}" = set; then
31022   echo $ECHO_N "(cached) $ECHO_C" >&6
31023 else
31024
31025         ol_DB_LIB=
31026         ol_LIBS=$LIBS
31027         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31028
31029         cat >conftest.$ac_ext <<_ACEOF
31030 /* confdefs.h.  */
31031 _ACEOF
31032 cat confdefs.h >>conftest.$ac_ext
31033 cat >>conftest.$ac_ext <<_ACEOF
31034 /* end confdefs.h.  */
31035
31036 #ifdef HAVE_DB_185_H
31037 # include <db_185.h>
31038 #else
31039 # include <db.h>
31040 #endif
31041
31042 #ifndef DB_VERSION_MAJOR
31043 # define DB_VERSION_MAJOR 1
31044 #endif
31045
31046 #ifndef NULL
31047 #define NULL ((void*)0)
31048 #endif
31049
31050 int
31051 main ()
31052 {
31053
31054 #if DB_VERSION_MAJOR > 1
31055         {
31056                 char *version;
31057                 int major, minor, patch;
31058
31059                 version = db_version( &major, &minor, &patch );
31060
31061                 if( major != DB_VERSION_MAJOR ||
31062                         minor < DB_VERSION_MINOR )
31063                 {
31064                         printf("Berkeley DB version mismatch\n"
31065                                 "\theader: %s\n\tlibrary: %s\n",
31066                                 DB_VERSION_STRING, version);
31067                         return 1;
31068                 }
31069         }
31070 #endif
31071
31072 #if DB_VERSION_MAJOR > 2
31073         db_env_create( NULL, 0 );
31074 #elif DB_VERSION_MAJOR > 1
31075         db_appexit( NULL );
31076 #else
31077         (void) dbopen( NULL, 0, 0, 0, NULL);
31078 #endif
31079
31080   ;
31081   return 0;
31082 }
31083 _ACEOF
31084 rm -f conftest.$ac_objext conftest$ac_exeext
31085 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31086   (eval $ac_link) 2>conftest.er1
31087   ac_status=$?
31088   grep -v '^ *+' conftest.er1 >conftest.err
31089   rm -f conftest.er1
31090   cat conftest.err >&5
31091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31092   (exit $ac_status); } &&
31093          { ac_try='test -z "$ac_c_werror_flag"
31094                          || test ! -s conftest.err'
31095   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31096   (eval $ac_try) 2>&5
31097   ac_status=$?
31098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31099   (exit $ac_status); }; } &&
31100          { ac_try='test -s conftest$ac_exeext'
31101   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31102   (eval $ac_try) 2>&5
31103   ac_status=$?
31104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31105   (exit $ac_status); }; }; then
31106   ol_cv_db_none=yes
31107 else
31108   echo "$as_me: failed program was:" >&5
31109 sed 's/^/| /' conftest.$ac_ext >&5
31110
31111 ol_cv_db_none=no
31112 fi
31113 rm -f conftest.err conftest.$ac_objext \
31114       conftest$ac_exeext conftest.$ac_ext
31115
31116         LIBS="$ol_LIBS"
31117
31118 fi
31119 echo "$as_me:$LINENO: result: $ol_cv_db_none" >&5
31120 echo "${ECHO_T}$ol_cv_db_none" >&6
31121
31122         if test $ol_cv_db_none = yes ; then
31123                 ol_cv_lib_db=yes
31124         fi
31125 fi
31126
31127
31128                 if test "$ol_cv_lib_db" != no ; then
31129                         ol_cv_berkeley_db=yes
31130                 fi
31131         fi
31132 fi
31133
31134         else
31135                 ol_cv_berkeley_db=no
31136
31137 for ac_header in db.h
31138 do
31139 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
31140 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31141   echo "$as_me:$LINENO: checking for $ac_header" >&5
31142 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31143 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31144   echo $ECHO_N "(cached) $ECHO_C" >&6
31145 fi
31146 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
31147 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
31148 else
31149   # Is the header compilable?
31150 echo "$as_me:$LINENO: checking $ac_header usability" >&5
31151 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
31152 cat >conftest.$ac_ext <<_ACEOF
31153 /* confdefs.h.  */
31154 _ACEOF
31155 cat confdefs.h >>conftest.$ac_ext
31156 cat >>conftest.$ac_ext <<_ACEOF
31157 /* end confdefs.h.  */
31158 $ac_includes_default
31159 #include <$ac_header>
31160 _ACEOF
31161 rm -f conftest.$ac_objext
31162 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
31163   (eval $ac_compile) 2>conftest.er1
31164   ac_status=$?
31165   grep -v '^ *+' conftest.er1 >conftest.err
31166   rm -f conftest.er1
31167   cat conftest.err >&5
31168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31169   (exit $ac_status); } &&
31170          { ac_try='test -z "$ac_c_werror_flag"
31171                          || test ! -s conftest.err'
31172   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31173   (eval $ac_try) 2>&5
31174   ac_status=$?
31175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31176   (exit $ac_status); }; } &&
31177          { ac_try='test -s conftest.$ac_objext'
31178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31179   (eval $ac_try) 2>&5
31180   ac_status=$?
31181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31182   (exit $ac_status); }; }; then
31183   ac_header_compiler=yes
31184 else
31185   echo "$as_me: failed program was:" >&5
31186 sed 's/^/| /' conftest.$ac_ext >&5
31187
31188 ac_header_compiler=no
31189 fi
31190 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
31191 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
31192 echo "${ECHO_T}$ac_header_compiler" >&6
31193
31194 # Is the header present?
31195 echo "$as_me:$LINENO: checking $ac_header presence" >&5
31196 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
31197 cat >conftest.$ac_ext <<_ACEOF
31198 /* confdefs.h.  */
31199 _ACEOF
31200 cat confdefs.h >>conftest.$ac_ext
31201 cat >>conftest.$ac_ext <<_ACEOF
31202 /* end confdefs.h.  */
31203 #include <$ac_header>
31204 _ACEOF
31205 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
31206   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
31207   ac_status=$?
31208   grep -v '^ *+' conftest.er1 >conftest.err
31209   rm -f conftest.er1
31210   cat conftest.err >&5
31211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31212   (exit $ac_status); } >/dev/null; then
31213   if test -s conftest.err; then
31214     ac_cpp_err=$ac_c_preproc_warn_flag
31215     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
31216   else
31217     ac_cpp_err=
31218   fi
31219 else
31220   ac_cpp_err=yes
31221 fi
31222 if test -z "$ac_cpp_err"; then
31223   ac_header_preproc=yes
31224 else
31225   echo "$as_me: failed program was:" >&5
31226 sed 's/^/| /' conftest.$ac_ext >&5
31227
31228   ac_header_preproc=no
31229 fi
31230 rm -f conftest.err conftest.$ac_ext
31231 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
31232 echo "${ECHO_T}$ac_header_preproc" >&6
31233
31234 # So?  What about this header?
31235 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
31236   yes:no: )
31237     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
31238 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
31239     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
31240 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
31241     ac_header_preproc=yes
31242     ;;
31243   no:yes:* )
31244     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
31245 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
31246     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
31247 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
31248     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
31249 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
31250     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
31251 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
31252     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
31253 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
31254     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
31255 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
31256     (
31257       cat <<\_ASBOX
31258 ## --------------------------------------------- ##
31259 ## Report this to <http://www.openldap.org/its/> ##
31260 ## --------------------------------------------- ##
31261 _ASBOX
31262     ) |
31263       sed "s/^/$as_me: WARNING:     /" >&2
31264     ;;
31265 esac
31266 echo "$as_me:$LINENO: checking for $ac_header" >&5
31267 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31268 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31269   echo $ECHO_N "(cached) $ECHO_C" >&6
31270 else
31271   eval "$as_ac_Header=\$ac_header_preproc"
31272 fi
31273 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
31274 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
31275
31276 fi
31277 if test `eval echo '${'$as_ac_Header'}'` = yes; then
31278   cat >>confdefs.h <<_ACEOF
31279 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
31280 _ACEOF
31281
31282 fi
31283
31284 done
31285
31286 if test $ac_cv_header_db_h = yes; then
31287         ol_cv_lib_db=no
31288
31289 echo "$as_me:$LINENO: checking for Berkeley DB major version" >&5
31290 echo $ECHO_N "checking for Berkeley DB major version... $ECHO_C" >&6
31291 if test "${ol_cv_bdb_major+set}" = set; then
31292   echo $ECHO_N "(cached) $ECHO_C" >&6
31293 else
31294
31295         ol_cv_bdb_major=0
31296         if test $ol_cv_bdb_major = 0 ; then
31297                 cat >conftest.$ac_ext <<_ACEOF
31298 /* confdefs.h.  */
31299 _ACEOF
31300 cat confdefs.h >>conftest.$ac_ext
31301 cat >>conftest.$ac_ext <<_ACEOF
31302 /* end confdefs.h.  */
31303
31304 #include <db.h>
31305 #ifndef DB_VERSION_MAJOR
31306 #       define DB_VERSION_MAJOR 1
31307 #endif
31308 #if DB_VERSION_MAJOR == 4
31309 __db_version
31310 #endif
31311
31312 _ACEOF
31313 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31314   $EGREP "__db_version" >/dev/null 2>&1; then
31315   ol_cv_bdb_major=4
31316 else
31317   :
31318 fi
31319 rm -f conftest*
31320
31321         fi
31322         if test $ol_cv_bdb_major = 0 ; then
31323                 cat >conftest.$ac_ext <<_ACEOF
31324 /* confdefs.h.  */
31325 _ACEOF
31326 cat confdefs.h >>conftest.$ac_ext
31327 cat >>conftest.$ac_ext <<_ACEOF
31328 /* end confdefs.h.  */
31329
31330 #include <db.h>
31331 #ifndef DB_VERSION_MAJOR
31332 #       define DB_VERSION_MAJOR 1
31333 #endif
31334 #if DB_VERSION_MAJOR == 3
31335 __db_version
31336 #endif
31337
31338 _ACEOF
31339 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31340   $EGREP "__db_version" >/dev/null 2>&1; then
31341   ol_cv_bdb_major=3
31342 else
31343   :
31344 fi
31345 rm -f conftest*
31346
31347         fi
31348         if test $ol_cv_bdb_major = 0 ; then
31349                 cat >conftest.$ac_ext <<_ACEOF
31350 /* confdefs.h.  */
31351 _ACEOF
31352 cat confdefs.h >>conftest.$ac_ext
31353 cat >>conftest.$ac_ext <<_ACEOF
31354 /* end confdefs.h.  */
31355
31356 #include <db.h>
31357 #ifndef DB_VERSION_MAJOR
31358 #       define DB_VERSION_MAJOR 1
31359 #endif
31360 #if DB_VERSION_MAJOR == 2
31361 __db_version
31362 #endif
31363
31364 _ACEOF
31365 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31366   $EGREP "__db_version" >/dev/null 2>&1; then
31367   ol_cv_bdb_major=2
31368 else
31369   :
31370 fi
31371 rm -f conftest*
31372
31373         fi
31374         if test $ol_cv_bdb_major = 0 ; then
31375                 cat >conftest.$ac_ext <<_ACEOF
31376 /* confdefs.h.  */
31377 _ACEOF
31378 cat confdefs.h >>conftest.$ac_ext
31379 cat >>conftest.$ac_ext <<_ACEOF
31380 /* end confdefs.h.  */
31381
31382 #include <db.h>
31383 #ifndef DB_VERSION_MAJOR
31384 #       define DB_VERSION_MAJOR 1
31385 #endif
31386 #if DB_VERSION_MAJOR == 1
31387 __db_version
31388 #endif
31389
31390 _ACEOF
31391 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31392   $EGREP "__db_version" >/dev/null 2>&1; then
31393   ol_cv_bdb_major=1
31394 else
31395   :
31396 fi
31397 rm -f conftest*
31398
31399         fi
31400
31401         if test $ol_cv_bdb_major = 0 ; then
31402                 { { echo "$as_me:$LINENO: error: Unknown Berkeley DB major version" >&5
31403 echo "$as_me: error: Unknown Berkeley DB major version" >&2;}
31404    { (exit 1); exit 1; }; }
31405         fi
31406
31407 fi
31408 echo "$as_me:$LINENO: result: $ol_cv_bdb_major" >&5
31409 echo "${ECHO_T}$ol_cv_bdb_major" >&6
31410
31411 echo "$as_me:$LINENO: checking for Berkeley DB minor version" >&5
31412 echo $ECHO_N "checking for Berkeley DB minor version... $ECHO_C" >&6
31413 if test "${ol_cv_bdb_minor+set}" = set; then
31414   echo $ECHO_N "(cached) $ECHO_C" >&6
31415 else
31416
31417         ol_cv_bdb_minor=0
31418         if test $ol_cv_bdb_minor = 0 ; then
31419                 cat >conftest.$ac_ext <<_ACEOF
31420 /* confdefs.h.  */
31421 _ACEOF
31422 cat confdefs.h >>conftest.$ac_ext
31423 cat >>conftest.$ac_ext <<_ACEOF
31424 /* end confdefs.h.  */
31425
31426 #include <db.h>
31427 #ifndef DB_VERSION_MINOR
31428 #       define DB_VERSION_MINOR 0
31429 #endif
31430 #if DB_VERSION_MINOR == 9
31431 __db_version
31432 #endif
31433
31434 _ACEOF
31435 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31436   $EGREP "__db_version" >/dev/null 2>&1; then
31437   ol_cv_bdb_minor=9
31438 else
31439   :
31440 fi
31441 rm -f conftest*
31442
31443         fi
31444         if test $ol_cv_bdb_minor = 0 ; then
31445                 cat >conftest.$ac_ext <<_ACEOF
31446 /* confdefs.h.  */
31447 _ACEOF
31448 cat confdefs.h >>conftest.$ac_ext
31449 cat >>conftest.$ac_ext <<_ACEOF
31450 /* end confdefs.h.  */
31451
31452 #include <db.h>
31453 #ifndef DB_VERSION_MINOR
31454 #       define DB_VERSION_MINOR 0
31455 #endif
31456 #if DB_VERSION_MINOR == 8
31457 __db_version
31458 #endif
31459
31460 _ACEOF
31461 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31462   $EGREP "__db_version" >/dev/null 2>&1; then
31463   ol_cv_bdb_minor=8
31464 else
31465   :
31466 fi
31467 rm -f conftest*
31468
31469         fi
31470         if test $ol_cv_bdb_minor = 0 ; then
31471                 cat >conftest.$ac_ext <<_ACEOF
31472 /* confdefs.h.  */
31473 _ACEOF
31474 cat confdefs.h >>conftest.$ac_ext
31475 cat >>conftest.$ac_ext <<_ACEOF
31476 /* end confdefs.h.  */
31477
31478 #include <db.h>
31479 #ifndef DB_VERSION_MINOR
31480 #       define DB_VERSION_MINOR 0
31481 #endif
31482 #if DB_VERSION_MINOR == 7
31483 __db_version
31484 #endif
31485
31486 _ACEOF
31487 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31488   $EGREP "__db_version" >/dev/null 2>&1; then
31489   ol_cv_bdb_minor=7
31490 else
31491   :
31492 fi
31493 rm -f conftest*
31494
31495         fi
31496         if test $ol_cv_bdb_minor = 0 ; then
31497                 cat >conftest.$ac_ext <<_ACEOF
31498 /* confdefs.h.  */
31499 _ACEOF
31500 cat confdefs.h >>conftest.$ac_ext
31501 cat >>conftest.$ac_ext <<_ACEOF
31502 /* end confdefs.h.  */
31503
31504 #include <db.h>
31505 #ifndef DB_VERSION_MINOR
31506 #       define DB_VERSION_MINOR 0
31507 #endif
31508 #if DB_VERSION_MINOR == 6
31509 __db_version
31510 #endif
31511
31512 _ACEOF
31513 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31514   $EGREP "__db_version" >/dev/null 2>&1; then
31515   ol_cv_bdb_minor=6
31516 else
31517   :
31518 fi
31519 rm -f conftest*
31520
31521         fi
31522         if test $ol_cv_bdb_minor = 0 ; then
31523                 cat >conftest.$ac_ext <<_ACEOF
31524 /* confdefs.h.  */
31525 _ACEOF
31526 cat confdefs.h >>conftest.$ac_ext
31527 cat >>conftest.$ac_ext <<_ACEOF
31528 /* end confdefs.h.  */
31529
31530 #include <db.h>
31531 #ifndef DB_VERSION_MINOR
31532 #       define DB_VERSION_MINOR 0
31533 #endif
31534 #if DB_VERSION_MINOR == 5
31535 __db_version
31536 #endif
31537
31538 _ACEOF
31539 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31540   $EGREP "__db_version" >/dev/null 2>&1; then
31541   ol_cv_bdb_minor=5
31542 else
31543   :
31544 fi
31545 rm -f conftest*
31546
31547         fi
31548         if test $ol_cv_bdb_minor = 0 ; then
31549                 cat >conftest.$ac_ext <<_ACEOF
31550 /* confdefs.h.  */
31551 _ACEOF
31552 cat confdefs.h >>conftest.$ac_ext
31553 cat >>conftest.$ac_ext <<_ACEOF
31554 /* end confdefs.h.  */
31555
31556 #include <db.h>
31557 #ifndef DB_VERSION_MINOR
31558 #       define DB_VERSION_MINOR 0
31559 #endif
31560 #if DB_VERSION_MINOR == 4
31561 __db_version
31562 #endif
31563
31564 _ACEOF
31565 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31566   $EGREP "__db_version" >/dev/null 2>&1; then
31567   ol_cv_bdb_minor=4
31568 else
31569   :
31570 fi
31571 rm -f conftest*
31572
31573         fi
31574         if test $ol_cv_bdb_minor = 0 ; then
31575                 cat >conftest.$ac_ext <<_ACEOF
31576 /* confdefs.h.  */
31577 _ACEOF
31578 cat confdefs.h >>conftest.$ac_ext
31579 cat >>conftest.$ac_ext <<_ACEOF
31580 /* end confdefs.h.  */
31581
31582 #include <db.h>
31583 #ifndef DB_VERSION_MINOR
31584 #       define DB_VERSION_MINOR 0
31585 #endif
31586 #if DB_VERSION_MINOR == 3
31587 __db_version
31588 #endif
31589
31590 _ACEOF
31591 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31592   $EGREP "__db_version" >/dev/null 2>&1; then
31593   ol_cv_bdb_minor=3
31594 else
31595   :
31596 fi
31597 rm -f conftest*
31598
31599         fi
31600         if test $ol_cv_bdb_minor = 0 ; then
31601                 cat >conftest.$ac_ext <<_ACEOF
31602 /* confdefs.h.  */
31603 _ACEOF
31604 cat confdefs.h >>conftest.$ac_ext
31605 cat >>conftest.$ac_ext <<_ACEOF
31606 /* end confdefs.h.  */
31607
31608 #include <db.h>
31609 #ifndef DB_VERSION_MINOR
31610 #       define DB_VERSION_MINOR 0
31611 #endif
31612 #if DB_VERSION_MINOR == 2
31613 __db_version
31614 #endif
31615
31616 _ACEOF
31617 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31618   $EGREP "__db_version" >/dev/null 2>&1; then
31619   ol_cv_bdb_minor=2
31620 else
31621   :
31622 fi
31623 rm -f conftest*
31624
31625         fi
31626         if test $ol_cv_bdb_minor = 0 ; then
31627                 cat >conftest.$ac_ext <<_ACEOF
31628 /* confdefs.h.  */
31629 _ACEOF
31630 cat confdefs.h >>conftest.$ac_ext
31631 cat >>conftest.$ac_ext <<_ACEOF
31632 /* end confdefs.h.  */
31633
31634 #include <db.h>
31635 #ifndef DB_VERSION_MINOR
31636 #       define DB_VERSION_MINOR 0
31637 #endif
31638 #if DB_VERSION_MINOR == 1
31639 __db_version
31640 #endif
31641
31642 _ACEOF
31643 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31644   $EGREP "__db_version" >/dev/null 2>&1; then
31645   ol_cv_bdb_minor=1
31646 else
31647   :
31648 fi
31649 rm -f conftest*
31650
31651         fi
31652
31653 fi
31654 echo "$as_me:$LINENO: result: $ol_cv_bdb_minor" >&5
31655 echo "${ECHO_T}$ol_cv_bdb_minor" >&6
31656
31657 if test $ol_cv_bdb_major = 4 ; then
31658         if test $ol_cv_bdb_minor = 4 ; then
31659                 if test $ol_cv_lib_db = no ; then
31660         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb44)" >&5
31661 echo $ECHO_N "checking for Berkeley DB link (-ldb44)... $ECHO_C" >&6
31662 if test "${ol_cv_db_db44+set}" = set; then
31663   echo $ECHO_N "(cached) $ECHO_C" >&6
31664 else
31665
31666         ol_DB_LIB=-ldb44
31667         ol_LIBS=$LIBS
31668         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31669
31670         cat >conftest.$ac_ext <<_ACEOF
31671 /* confdefs.h.  */
31672 _ACEOF
31673 cat confdefs.h >>conftest.$ac_ext
31674 cat >>conftest.$ac_ext <<_ACEOF
31675 /* end confdefs.h.  */
31676
31677 #ifdef HAVE_DB_185_H
31678 # include <db_185.h>
31679 #else
31680 # include <db.h>
31681 #endif
31682
31683 #ifndef DB_VERSION_MAJOR
31684 # define DB_VERSION_MAJOR 1
31685 #endif
31686
31687 #ifndef NULL
31688 #define NULL ((void*)0)
31689 #endif
31690
31691 int
31692 main ()
31693 {
31694
31695 #if DB_VERSION_MAJOR > 1
31696         {
31697                 char *version;
31698                 int major, minor, patch;
31699
31700                 version = db_version( &major, &minor, &patch );
31701
31702                 if( major != DB_VERSION_MAJOR ||
31703                         minor < DB_VERSION_MINOR )
31704                 {
31705                         printf("Berkeley DB version mismatch\n"
31706                                 "\theader: %s\n\tlibrary: %s\n",
31707                                 DB_VERSION_STRING, version);
31708                         return 1;
31709                 }
31710         }
31711 #endif
31712
31713 #if DB_VERSION_MAJOR > 2
31714         db_env_create( NULL, 0 );
31715 #elif DB_VERSION_MAJOR > 1
31716         db_appexit( NULL );
31717 #else
31718         (void) dbopen( NULL, 0, 0, 0, NULL);
31719 #endif
31720
31721   ;
31722   return 0;
31723 }
31724 _ACEOF
31725 rm -f conftest.$ac_objext conftest$ac_exeext
31726 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31727   (eval $ac_link) 2>conftest.er1
31728   ac_status=$?
31729   grep -v '^ *+' conftest.er1 >conftest.err
31730   rm -f conftest.er1
31731   cat conftest.err >&5
31732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31733   (exit $ac_status); } &&
31734          { ac_try='test -z "$ac_c_werror_flag"
31735                          || test ! -s conftest.err'
31736   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31737   (eval $ac_try) 2>&5
31738   ac_status=$?
31739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31740   (exit $ac_status); }; } &&
31741          { ac_try='test -s conftest$ac_exeext'
31742   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31743   (eval $ac_try) 2>&5
31744   ac_status=$?
31745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31746   (exit $ac_status); }; }; then
31747   ol_cv_db_db44=yes
31748 else
31749   echo "$as_me: failed program was:" >&5
31750 sed 's/^/| /' conftest.$ac_ext >&5
31751
31752 ol_cv_db_db44=no
31753 fi
31754 rm -f conftest.err conftest.$ac_objext \
31755       conftest$ac_exeext conftest.$ac_ext
31756
31757         LIBS="$ol_LIBS"
31758
31759 fi
31760 echo "$as_me:$LINENO: result: $ol_cv_db_db44" >&5
31761 echo "${ECHO_T}$ol_cv_db_db44" >&6
31762
31763         if test $ol_cv_db_db44 = yes ; then
31764                 ol_cv_lib_db=-ldb44
31765         fi
31766 fi
31767
31768                 if test $ol_cv_lib_db = no ; then
31769         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-44)" >&5
31770 echo $ECHO_N "checking for Berkeley DB link (-ldb-44)... $ECHO_C" >&6
31771 if test "${ol_cv_db_db_44+set}" = set; then
31772   echo $ECHO_N "(cached) $ECHO_C" >&6
31773 else
31774
31775         ol_DB_LIB=-ldb-44
31776         ol_LIBS=$LIBS
31777         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31778
31779         cat >conftest.$ac_ext <<_ACEOF
31780 /* confdefs.h.  */
31781 _ACEOF
31782 cat confdefs.h >>conftest.$ac_ext
31783 cat >>conftest.$ac_ext <<_ACEOF
31784 /* end confdefs.h.  */
31785
31786 #ifdef HAVE_DB_185_H
31787 # include <db_185.h>
31788 #else
31789 # include <db.h>
31790 #endif
31791
31792 #ifndef DB_VERSION_MAJOR
31793 # define DB_VERSION_MAJOR 1
31794 #endif
31795
31796 #ifndef NULL
31797 #define NULL ((void*)0)
31798 #endif
31799
31800 int
31801 main ()
31802 {
31803
31804 #if DB_VERSION_MAJOR > 1
31805         {
31806                 char *version;
31807                 int major, minor, patch;
31808
31809                 version = db_version( &major, &minor, &patch );
31810
31811                 if( major != DB_VERSION_MAJOR ||
31812                         minor < DB_VERSION_MINOR )
31813                 {
31814                         printf("Berkeley DB version mismatch\n"
31815                                 "\theader: %s\n\tlibrary: %s\n",
31816                                 DB_VERSION_STRING, version);
31817                         return 1;
31818                 }
31819         }
31820 #endif
31821
31822 #if DB_VERSION_MAJOR > 2
31823         db_env_create( NULL, 0 );
31824 #elif DB_VERSION_MAJOR > 1
31825         db_appexit( NULL );
31826 #else
31827         (void) dbopen( NULL, 0, 0, 0, NULL);
31828 #endif
31829
31830   ;
31831   return 0;
31832 }
31833 _ACEOF
31834 rm -f conftest.$ac_objext conftest$ac_exeext
31835 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31836   (eval $ac_link) 2>conftest.er1
31837   ac_status=$?
31838   grep -v '^ *+' conftest.er1 >conftest.err
31839   rm -f conftest.er1
31840   cat conftest.err >&5
31841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31842   (exit $ac_status); } &&
31843          { ac_try='test -z "$ac_c_werror_flag"
31844                          || test ! -s conftest.err'
31845   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31846   (eval $ac_try) 2>&5
31847   ac_status=$?
31848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31849   (exit $ac_status); }; } &&
31850          { ac_try='test -s conftest$ac_exeext'
31851   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31852   (eval $ac_try) 2>&5
31853   ac_status=$?
31854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31855   (exit $ac_status); }; }; then
31856   ol_cv_db_db_44=yes
31857 else
31858   echo "$as_me: failed program was:" >&5
31859 sed 's/^/| /' conftest.$ac_ext >&5
31860
31861 ol_cv_db_db_44=no
31862 fi
31863 rm -f conftest.err conftest.$ac_objext \
31864       conftest$ac_exeext conftest.$ac_ext
31865
31866         LIBS="$ol_LIBS"
31867
31868 fi
31869 echo "$as_me:$LINENO: result: $ol_cv_db_db_44" >&5
31870 echo "${ECHO_T}$ol_cv_db_db_44" >&6
31871
31872         if test $ol_cv_db_db_44 = yes ; then
31873                 ol_cv_lib_db=-ldb-44
31874         fi
31875 fi
31876
31877                 if test $ol_cv_lib_db = no ; then
31878         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.4)" >&5
31879 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.4)... $ECHO_C" >&6
31880 if test "${ol_cv_db_db_4_dot_4+set}" = set; then
31881   echo $ECHO_N "(cached) $ECHO_C" >&6
31882 else
31883
31884         ol_DB_LIB=-ldb-4.4
31885         ol_LIBS=$LIBS
31886         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31887
31888         cat >conftest.$ac_ext <<_ACEOF
31889 /* confdefs.h.  */
31890 _ACEOF
31891 cat confdefs.h >>conftest.$ac_ext
31892 cat >>conftest.$ac_ext <<_ACEOF
31893 /* end confdefs.h.  */
31894
31895 #ifdef HAVE_DB_185_H
31896 # include <db_185.h>
31897 #else
31898 # include <db.h>
31899 #endif
31900
31901 #ifndef DB_VERSION_MAJOR
31902 # define DB_VERSION_MAJOR 1
31903 #endif
31904
31905 #ifndef NULL
31906 #define NULL ((void*)0)
31907 #endif
31908
31909 int
31910 main ()
31911 {
31912
31913 #if DB_VERSION_MAJOR > 1
31914         {
31915                 char *version;
31916                 int major, minor, patch;
31917
31918                 version = db_version( &major, &minor, &patch );
31919
31920                 if( major != DB_VERSION_MAJOR ||
31921                         minor < DB_VERSION_MINOR )
31922                 {
31923                         printf("Berkeley DB version mismatch\n"
31924                                 "\theader: %s\n\tlibrary: %s\n",
31925                                 DB_VERSION_STRING, version);
31926                         return 1;
31927                 }
31928         }
31929 #endif
31930
31931 #if DB_VERSION_MAJOR > 2
31932         db_env_create( NULL, 0 );
31933 #elif DB_VERSION_MAJOR > 1
31934         db_appexit( NULL );
31935 #else
31936         (void) dbopen( NULL, 0, 0, 0, NULL);
31937 #endif
31938
31939   ;
31940   return 0;
31941 }
31942 _ACEOF
31943 rm -f conftest.$ac_objext conftest$ac_exeext
31944 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31945   (eval $ac_link) 2>conftest.er1
31946   ac_status=$?
31947   grep -v '^ *+' conftest.er1 >conftest.err
31948   rm -f conftest.er1
31949   cat conftest.err >&5
31950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31951   (exit $ac_status); } &&
31952          { ac_try='test -z "$ac_c_werror_flag"
31953                          || test ! -s conftest.err'
31954   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31955   (eval $ac_try) 2>&5
31956   ac_status=$?
31957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31958   (exit $ac_status); }; } &&
31959          { ac_try='test -s conftest$ac_exeext'
31960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31961   (eval $ac_try) 2>&5
31962   ac_status=$?
31963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31964   (exit $ac_status); }; }; then
31965   ol_cv_db_db_4_dot_4=yes
31966 else
31967   echo "$as_me: failed program was:" >&5
31968 sed 's/^/| /' conftest.$ac_ext >&5
31969
31970 ol_cv_db_db_4_dot_4=no
31971 fi
31972 rm -f conftest.err conftest.$ac_objext \
31973       conftest$ac_exeext conftest.$ac_ext
31974
31975         LIBS="$ol_LIBS"
31976
31977 fi
31978 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_4" >&5
31979 echo "${ECHO_T}$ol_cv_db_db_4_dot_4" >&6
31980
31981         if test $ol_cv_db_db_4_dot_4 = yes ; then
31982                 ol_cv_lib_db=-ldb-4.4
31983         fi
31984 fi
31985
31986                 if test $ol_cv_lib_db = no ; then
31987         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-4)" >&5
31988 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-4)... $ECHO_C" >&6
31989 if test "${ol_cv_db_db_4_4+set}" = set; then
31990   echo $ECHO_N "(cached) $ECHO_C" >&6
31991 else
31992
31993         ol_DB_LIB=-ldb-4-4
31994         ol_LIBS=$LIBS
31995         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31996
31997         cat >conftest.$ac_ext <<_ACEOF
31998 /* confdefs.h.  */
31999 _ACEOF
32000 cat confdefs.h >>conftest.$ac_ext
32001 cat >>conftest.$ac_ext <<_ACEOF
32002 /* end confdefs.h.  */
32003
32004 #ifdef HAVE_DB_185_H
32005 # include <db_185.h>
32006 #else
32007 # include <db.h>
32008 #endif
32009
32010 #ifndef DB_VERSION_MAJOR
32011 # define DB_VERSION_MAJOR 1
32012 #endif
32013
32014 #ifndef NULL
32015 #define NULL ((void*)0)
32016 #endif
32017
32018 int
32019 main ()
32020 {
32021
32022 #if DB_VERSION_MAJOR > 1
32023         {
32024                 char *version;
32025                 int major, minor, patch;
32026
32027                 version = db_version( &major, &minor, &patch );
32028
32029                 if( major != DB_VERSION_MAJOR ||
32030                         minor < DB_VERSION_MINOR )
32031                 {
32032                         printf("Berkeley DB version mismatch\n"
32033                                 "\theader: %s\n\tlibrary: %s\n",
32034                                 DB_VERSION_STRING, version);
32035                         return 1;
32036                 }
32037         }
32038 #endif
32039
32040 #if DB_VERSION_MAJOR > 2
32041         db_env_create( NULL, 0 );
32042 #elif DB_VERSION_MAJOR > 1
32043         db_appexit( NULL );
32044 #else
32045         (void) dbopen( NULL, 0, 0, 0, NULL);
32046 #endif
32047
32048   ;
32049   return 0;
32050 }
32051 _ACEOF
32052 rm -f conftest.$ac_objext conftest$ac_exeext
32053 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32054   (eval $ac_link) 2>conftest.er1
32055   ac_status=$?
32056   grep -v '^ *+' conftest.er1 >conftest.err
32057   rm -f conftest.er1
32058   cat conftest.err >&5
32059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32060   (exit $ac_status); } &&
32061          { ac_try='test -z "$ac_c_werror_flag"
32062                          || test ! -s conftest.err'
32063   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32064   (eval $ac_try) 2>&5
32065   ac_status=$?
32066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32067   (exit $ac_status); }; } &&
32068          { ac_try='test -s conftest$ac_exeext'
32069   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32070   (eval $ac_try) 2>&5
32071   ac_status=$?
32072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32073   (exit $ac_status); }; }; then
32074   ol_cv_db_db_4_4=yes
32075 else
32076   echo "$as_me: failed program was:" >&5
32077 sed 's/^/| /' conftest.$ac_ext >&5
32078
32079 ol_cv_db_db_4_4=no
32080 fi
32081 rm -f conftest.err conftest.$ac_objext \
32082       conftest$ac_exeext conftest.$ac_ext
32083
32084         LIBS="$ol_LIBS"
32085
32086 fi
32087 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_4" >&5
32088 echo "${ECHO_T}$ol_cv_db_db_4_4" >&6
32089
32090         if test $ol_cv_db_db_4_4 = yes ; then
32091                 ol_cv_lib_db=-ldb-4-4
32092         fi
32093 fi
32094
32095         elif test $ol_cv_bdb_minor = 3 ; then
32096                 if test $ol_cv_lib_db = no ; then
32097         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb43)" >&5
32098 echo $ECHO_N "checking for Berkeley DB link (-ldb43)... $ECHO_C" >&6
32099 if test "${ol_cv_db_db43+set}" = set; then
32100   echo $ECHO_N "(cached) $ECHO_C" >&6
32101 else
32102
32103         ol_DB_LIB=-ldb43
32104         ol_LIBS=$LIBS
32105         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32106
32107         cat >conftest.$ac_ext <<_ACEOF
32108 /* confdefs.h.  */
32109 _ACEOF
32110 cat confdefs.h >>conftest.$ac_ext
32111 cat >>conftest.$ac_ext <<_ACEOF
32112 /* end confdefs.h.  */
32113
32114 #ifdef HAVE_DB_185_H
32115 # include <db_185.h>
32116 #else
32117 # include <db.h>
32118 #endif
32119
32120 #ifndef DB_VERSION_MAJOR
32121 # define DB_VERSION_MAJOR 1
32122 #endif
32123
32124 #ifndef NULL
32125 #define NULL ((void*)0)
32126 #endif
32127
32128 int
32129 main ()
32130 {
32131
32132 #if DB_VERSION_MAJOR > 1
32133         {
32134                 char *version;
32135                 int major, minor, patch;
32136
32137                 version = db_version( &major, &minor, &patch );
32138
32139                 if( major != DB_VERSION_MAJOR ||
32140                         minor < DB_VERSION_MINOR )
32141                 {
32142                         printf("Berkeley DB version mismatch\n"
32143                                 "\theader: %s\n\tlibrary: %s\n",
32144                                 DB_VERSION_STRING, version);
32145                         return 1;
32146                 }
32147         }
32148 #endif
32149
32150 #if DB_VERSION_MAJOR > 2
32151         db_env_create( NULL, 0 );
32152 #elif DB_VERSION_MAJOR > 1
32153         db_appexit( NULL );
32154 #else
32155         (void) dbopen( NULL, 0, 0, 0, NULL);
32156 #endif
32157
32158   ;
32159   return 0;
32160 }
32161 _ACEOF
32162 rm -f conftest.$ac_objext conftest$ac_exeext
32163 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32164   (eval $ac_link) 2>conftest.er1
32165   ac_status=$?
32166   grep -v '^ *+' conftest.er1 >conftest.err
32167   rm -f conftest.er1
32168   cat conftest.err >&5
32169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32170   (exit $ac_status); } &&
32171          { ac_try='test -z "$ac_c_werror_flag"
32172                          || test ! -s conftest.err'
32173   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32174   (eval $ac_try) 2>&5
32175   ac_status=$?
32176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32177   (exit $ac_status); }; } &&
32178          { ac_try='test -s conftest$ac_exeext'
32179   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32180   (eval $ac_try) 2>&5
32181   ac_status=$?
32182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32183   (exit $ac_status); }; }; then
32184   ol_cv_db_db43=yes
32185 else
32186   echo "$as_me: failed program was:" >&5
32187 sed 's/^/| /' conftest.$ac_ext >&5
32188
32189 ol_cv_db_db43=no
32190 fi
32191 rm -f conftest.err conftest.$ac_objext \
32192       conftest$ac_exeext conftest.$ac_ext
32193
32194         LIBS="$ol_LIBS"
32195
32196 fi
32197 echo "$as_me:$LINENO: result: $ol_cv_db_db43" >&5
32198 echo "${ECHO_T}$ol_cv_db_db43" >&6
32199
32200         if test $ol_cv_db_db43 = yes ; then
32201                 ol_cv_lib_db=-ldb43
32202         fi
32203 fi
32204
32205                 if test $ol_cv_lib_db = no ; then
32206         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-43)" >&5
32207 echo $ECHO_N "checking for Berkeley DB link (-ldb-43)... $ECHO_C" >&6
32208 if test "${ol_cv_db_db_43+set}" = set; then
32209   echo $ECHO_N "(cached) $ECHO_C" >&6
32210 else
32211
32212         ol_DB_LIB=-ldb-43
32213         ol_LIBS=$LIBS
32214         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32215
32216         cat >conftest.$ac_ext <<_ACEOF
32217 /* confdefs.h.  */
32218 _ACEOF
32219 cat confdefs.h >>conftest.$ac_ext
32220 cat >>conftest.$ac_ext <<_ACEOF
32221 /* end confdefs.h.  */
32222
32223 #ifdef HAVE_DB_185_H
32224 # include <db_185.h>
32225 #else
32226 # include <db.h>
32227 #endif
32228
32229 #ifndef DB_VERSION_MAJOR
32230 # define DB_VERSION_MAJOR 1
32231 #endif
32232
32233 #ifndef NULL
32234 #define NULL ((void*)0)
32235 #endif
32236
32237 int
32238 main ()
32239 {
32240
32241 #if DB_VERSION_MAJOR > 1
32242         {
32243                 char *version;
32244                 int major, minor, patch;
32245
32246                 version = db_version( &major, &minor, &patch );
32247
32248                 if( major != DB_VERSION_MAJOR ||
32249                         minor < DB_VERSION_MINOR )
32250                 {
32251                         printf("Berkeley DB version mismatch\n"
32252                                 "\theader: %s\n\tlibrary: %s\n",
32253                                 DB_VERSION_STRING, version);
32254                         return 1;
32255                 }
32256         }
32257 #endif
32258
32259 #if DB_VERSION_MAJOR > 2
32260         db_env_create( NULL, 0 );
32261 #elif DB_VERSION_MAJOR > 1
32262         db_appexit( NULL );
32263 #else
32264         (void) dbopen( NULL, 0, 0, 0, NULL);
32265 #endif
32266
32267   ;
32268   return 0;
32269 }
32270 _ACEOF
32271 rm -f conftest.$ac_objext conftest$ac_exeext
32272 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32273   (eval $ac_link) 2>conftest.er1
32274   ac_status=$?
32275   grep -v '^ *+' conftest.er1 >conftest.err
32276   rm -f conftest.er1
32277   cat conftest.err >&5
32278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32279   (exit $ac_status); } &&
32280          { ac_try='test -z "$ac_c_werror_flag"
32281                          || test ! -s conftest.err'
32282   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32283   (eval $ac_try) 2>&5
32284   ac_status=$?
32285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32286   (exit $ac_status); }; } &&
32287          { ac_try='test -s conftest$ac_exeext'
32288   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32289   (eval $ac_try) 2>&5
32290   ac_status=$?
32291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32292   (exit $ac_status); }; }; then
32293   ol_cv_db_db_43=yes
32294 else
32295   echo "$as_me: failed program was:" >&5
32296 sed 's/^/| /' conftest.$ac_ext >&5
32297
32298 ol_cv_db_db_43=no
32299 fi
32300 rm -f conftest.err conftest.$ac_objext \
32301       conftest$ac_exeext conftest.$ac_ext
32302
32303         LIBS="$ol_LIBS"
32304
32305 fi
32306 echo "$as_me:$LINENO: result: $ol_cv_db_db_43" >&5
32307 echo "${ECHO_T}$ol_cv_db_db_43" >&6
32308
32309         if test $ol_cv_db_db_43 = yes ; then
32310                 ol_cv_lib_db=-ldb-43
32311         fi
32312 fi
32313
32314                 if test $ol_cv_lib_db = no ; then
32315         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.3)" >&5
32316 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.3)... $ECHO_C" >&6
32317 if test "${ol_cv_db_db_4_dot_3+set}" = set; then
32318   echo $ECHO_N "(cached) $ECHO_C" >&6
32319 else
32320
32321         ol_DB_LIB=-ldb-4.3
32322         ol_LIBS=$LIBS
32323         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32324
32325         cat >conftest.$ac_ext <<_ACEOF
32326 /* confdefs.h.  */
32327 _ACEOF
32328 cat confdefs.h >>conftest.$ac_ext
32329 cat >>conftest.$ac_ext <<_ACEOF
32330 /* end confdefs.h.  */
32331
32332 #ifdef HAVE_DB_185_H
32333 # include <db_185.h>
32334 #else
32335 # include <db.h>
32336 #endif
32337
32338 #ifndef DB_VERSION_MAJOR
32339 # define DB_VERSION_MAJOR 1
32340 #endif
32341
32342 #ifndef NULL
32343 #define NULL ((void*)0)
32344 #endif
32345
32346 int
32347 main ()
32348 {
32349
32350 #if DB_VERSION_MAJOR > 1
32351         {
32352                 char *version;
32353                 int major, minor, patch;
32354
32355                 version = db_version( &major, &minor, &patch );
32356
32357                 if( major != DB_VERSION_MAJOR ||
32358                         minor < DB_VERSION_MINOR )
32359                 {
32360                         printf("Berkeley DB version mismatch\n"
32361                                 "\theader: %s\n\tlibrary: %s\n",
32362                                 DB_VERSION_STRING, version);
32363                         return 1;
32364                 }
32365         }
32366 #endif
32367
32368 #if DB_VERSION_MAJOR > 2
32369         db_env_create( NULL, 0 );
32370 #elif DB_VERSION_MAJOR > 1
32371         db_appexit( NULL );
32372 #else
32373         (void) dbopen( NULL, 0, 0, 0, NULL);
32374 #endif
32375
32376   ;
32377   return 0;
32378 }
32379 _ACEOF
32380 rm -f conftest.$ac_objext conftest$ac_exeext
32381 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32382   (eval $ac_link) 2>conftest.er1
32383   ac_status=$?
32384   grep -v '^ *+' conftest.er1 >conftest.err
32385   rm -f conftest.er1
32386   cat conftest.err >&5
32387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32388   (exit $ac_status); } &&
32389          { ac_try='test -z "$ac_c_werror_flag"
32390                          || test ! -s conftest.err'
32391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32392   (eval $ac_try) 2>&5
32393   ac_status=$?
32394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32395   (exit $ac_status); }; } &&
32396          { ac_try='test -s conftest$ac_exeext'
32397   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32398   (eval $ac_try) 2>&5
32399   ac_status=$?
32400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32401   (exit $ac_status); }; }; then
32402   ol_cv_db_db_4_dot_3=yes
32403 else
32404   echo "$as_me: failed program was:" >&5
32405 sed 's/^/| /' conftest.$ac_ext >&5
32406
32407 ol_cv_db_db_4_dot_3=no
32408 fi
32409 rm -f conftest.err conftest.$ac_objext \
32410       conftest$ac_exeext conftest.$ac_ext
32411
32412         LIBS="$ol_LIBS"
32413
32414 fi
32415 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_3" >&5
32416 echo "${ECHO_T}$ol_cv_db_db_4_dot_3" >&6
32417
32418         if test $ol_cv_db_db_4_dot_3 = yes ; then
32419                 ol_cv_lib_db=-ldb-4.3
32420         fi
32421 fi
32422
32423                 if test $ol_cv_lib_db = no ; then
32424         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-3)" >&5
32425 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-3)... $ECHO_C" >&6
32426 if test "${ol_cv_db_db_4_3+set}" = set; then
32427   echo $ECHO_N "(cached) $ECHO_C" >&6
32428 else
32429
32430         ol_DB_LIB=-ldb-4-3
32431         ol_LIBS=$LIBS
32432         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32433
32434         cat >conftest.$ac_ext <<_ACEOF
32435 /* confdefs.h.  */
32436 _ACEOF
32437 cat confdefs.h >>conftest.$ac_ext
32438 cat >>conftest.$ac_ext <<_ACEOF
32439 /* end confdefs.h.  */
32440
32441 #ifdef HAVE_DB_185_H
32442 # include <db_185.h>
32443 #else
32444 # include <db.h>
32445 #endif
32446
32447 #ifndef DB_VERSION_MAJOR
32448 # define DB_VERSION_MAJOR 1
32449 #endif
32450
32451 #ifndef NULL
32452 #define NULL ((void*)0)
32453 #endif
32454
32455 int
32456 main ()
32457 {
32458
32459 #if DB_VERSION_MAJOR > 1
32460         {
32461                 char *version;
32462                 int major, minor, patch;
32463
32464                 version = db_version( &major, &minor, &patch );
32465
32466                 if( major != DB_VERSION_MAJOR ||
32467                         minor < DB_VERSION_MINOR )
32468                 {
32469                         printf("Berkeley DB version mismatch\n"
32470                                 "\theader: %s\n\tlibrary: %s\n",
32471                                 DB_VERSION_STRING, version);
32472                         return 1;
32473                 }
32474         }
32475 #endif
32476
32477 #if DB_VERSION_MAJOR > 2
32478         db_env_create( NULL, 0 );
32479 #elif DB_VERSION_MAJOR > 1
32480         db_appexit( NULL );
32481 #else
32482         (void) dbopen( NULL, 0, 0, 0, NULL);
32483 #endif
32484
32485   ;
32486   return 0;
32487 }
32488 _ACEOF
32489 rm -f conftest.$ac_objext conftest$ac_exeext
32490 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32491   (eval $ac_link) 2>conftest.er1
32492   ac_status=$?
32493   grep -v '^ *+' conftest.er1 >conftest.err
32494   rm -f conftest.er1
32495   cat conftest.err >&5
32496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32497   (exit $ac_status); } &&
32498          { ac_try='test -z "$ac_c_werror_flag"
32499                          || test ! -s conftest.err'
32500   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32501   (eval $ac_try) 2>&5
32502   ac_status=$?
32503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32504   (exit $ac_status); }; } &&
32505          { ac_try='test -s conftest$ac_exeext'
32506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32507   (eval $ac_try) 2>&5
32508   ac_status=$?
32509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32510   (exit $ac_status); }; }; then
32511   ol_cv_db_db_4_3=yes
32512 else
32513   echo "$as_me: failed program was:" >&5
32514 sed 's/^/| /' conftest.$ac_ext >&5
32515
32516 ol_cv_db_db_4_3=no
32517 fi
32518 rm -f conftest.err conftest.$ac_objext \
32519       conftest$ac_exeext conftest.$ac_ext
32520
32521         LIBS="$ol_LIBS"
32522
32523 fi
32524 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_3" >&5
32525 echo "${ECHO_T}$ol_cv_db_db_4_3" >&6
32526
32527         if test $ol_cv_db_db_4_3 = yes ; then
32528                 ol_cv_lib_db=-ldb-4-3
32529         fi
32530 fi
32531
32532         elif test $ol_cv_bdb_minor = 2 ; then
32533                 if test $ol_cv_lib_db = no ; then
32534         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb42)" >&5
32535 echo $ECHO_N "checking for Berkeley DB link (-ldb42)... $ECHO_C" >&6
32536 if test "${ol_cv_db_db42+set}" = set; then
32537   echo $ECHO_N "(cached) $ECHO_C" >&6
32538 else
32539
32540         ol_DB_LIB=-ldb42
32541         ol_LIBS=$LIBS
32542         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32543
32544         cat >conftest.$ac_ext <<_ACEOF
32545 /* confdefs.h.  */
32546 _ACEOF
32547 cat confdefs.h >>conftest.$ac_ext
32548 cat >>conftest.$ac_ext <<_ACEOF
32549 /* end confdefs.h.  */
32550
32551 #ifdef HAVE_DB_185_H
32552 # include <db_185.h>
32553 #else
32554 # include <db.h>
32555 #endif
32556
32557 #ifndef DB_VERSION_MAJOR
32558 # define DB_VERSION_MAJOR 1
32559 #endif
32560
32561 #ifndef NULL
32562 #define NULL ((void*)0)
32563 #endif
32564
32565 int
32566 main ()
32567 {
32568
32569 #if DB_VERSION_MAJOR > 1
32570         {
32571                 char *version;
32572                 int major, minor, patch;
32573
32574                 version = db_version( &major, &minor, &patch );
32575
32576                 if( major != DB_VERSION_MAJOR ||
32577                         minor < DB_VERSION_MINOR )
32578                 {
32579                         printf("Berkeley DB version mismatch\n"
32580                                 "\theader: %s\n\tlibrary: %s\n",
32581                                 DB_VERSION_STRING, version);
32582                         return 1;
32583                 }
32584         }
32585 #endif
32586
32587 #if DB_VERSION_MAJOR > 2
32588         db_env_create( NULL, 0 );
32589 #elif DB_VERSION_MAJOR > 1
32590         db_appexit( NULL );
32591 #else
32592         (void) dbopen( NULL, 0, 0, 0, NULL);
32593 #endif
32594
32595   ;
32596   return 0;
32597 }
32598 _ACEOF
32599 rm -f conftest.$ac_objext conftest$ac_exeext
32600 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32601   (eval $ac_link) 2>conftest.er1
32602   ac_status=$?
32603   grep -v '^ *+' conftest.er1 >conftest.err
32604   rm -f conftest.er1
32605   cat conftest.err >&5
32606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32607   (exit $ac_status); } &&
32608          { ac_try='test -z "$ac_c_werror_flag"
32609                          || test ! -s conftest.err'
32610   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32611   (eval $ac_try) 2>&5
32612   ac_status=$?
32613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32614   (exit $ac_status); }; } &&
32615          { ac_try='test -s conftest$ac_exeext'
32616   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32617   (eval $ac_try) 2>&5
32618   ac_status=$?
32619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32620   (exit $ac_status); }; }; then
32621   ol_cv_db_db42=yes
32622 else
32623   echo "$as_me: failed program was:" >&5
32624 sed 's/^/| /' conftest.$ac_ext >&5
32625
32626 ol_cv_db_db42=no
32627 fi
32628 rm -f conftest.err conftest.$ac_objext \
32629       conftest$ac_exeext conftest.$ac_ext
32630
32631         LIBS="$ol_LIBS"
32632
32633 fi
32634 echo "$as_me:$LINENO: result: $ol_cv_db_db42" >&5
32635 echo "${ECHO_T}$ol_cv_db_db42" >&6
32636
32637         if test $ol_cv_db_db42 = yes ; then
32638                 ol_cv_lib_db=-ldb42
32639         fi
32640 fi
32641
32642                 if test $ol_cv_lib_db = no ; then
32643         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-42)" >&5
32644 echo $ECHO_N "checking for Berkeley DB link (-ldb-42)... $ECHO_C" >&6
32645 if test "${ol_cv_db_db_42+set}" = set; then
32646   echo $ECHO_N "(cached) $ECHO_C" >&6
32647 else
32648
32649         ol_DB_LIB=-ldb-42
32650         ol_LIBS=$LIBS
32651         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32652
32653         cat >conftest.$ac_ext <<_ACEOF
32654 /* confdefs.h.  */
32655 _ACEOF
32656 cat confdefs.h >>conftest.$ac_ext
32657 cat >>conftest.$ac_ext <<_ACEOF
32658 /* end confdefs.h.  */
32659
32660 #ifdef HAVE_DB_185_H
32661 # include <db_185.h>
32662 #else
32663 # include <db.h>
32664 #endif
32665
32666 #ifndef DB_VERSION_MAJOR
32667 # define DB_VERSION_MAJOR 1
32668 #endif
32669
32670 #ifndef NULL
32671 #define NULL ((void*)0)
32672 #endif
32673
32674 int
32675 main ()
32676 {
32677
32678 #if DB_VERSION_MAJOR > 1
32679         {
32680                 char *version;
32681                 int major, minor, patch;
32682
32683                 version = db_version( &major, &minor, &patch );
32684
32685                 if( major != DB_VERSION_MAJOR ||
32686                         minor < DB_VERSION_MINOR )
32687                 {
32688                         printf("Berkeley DB version mismatch\n"
32689                                 "\theader: %s\n\tlibrary: %s\n",
32690                                 DB_VERSION_STRING, version);
32691                         return 1;
32692                 }
32693         }
32694 #endif
32695
32696 #if DB_VERSION_MAJOR > 2
32697         db_env_create( NULL, 0 );
32698 #elif DB_VERSION_MAJOR > 1
32699         db_appexit( NULL );
32700 #else
32701         (void) dbopen( NULL, 0, 0, 0, NULL);
32702 #endif
32703
32704   ;
32705   return 0;
32706 }
32707 _ACEOF
32708 rm -f conftest.$ac_objext conftest$ac_exeext
32709 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32710   (eval $ac_link) 2>conftest.er1
32711   ac_status=$?
32712   grep -v '^ *+' conftest.er1 >conftest.err
32713   rm -f conftest.er1
32714   cat conftest.err >&5
32715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32716   (exit $ac_status); } &&
32717          { ac_try='test -z "$ac_c_werror_flag"
32718                          || test ! -s conftest.err'
32719   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32720   (eval $ac_try) 2>&5
32721   ac_status=$?
32722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32723   (exit $ac_status); }; } &&
32724          { ac_try='test -s conftest$ac_exeext'
32725   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32726   (eval $ac_try) 2>&5
32727   ac_status=$?
32728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32729   (exit $ac_status); }; }; then
32730   ol_cv_db_db_42=yes
32731 else
32732   echo "$as_me: failed program was:" >&5
32733 sed 's/^/| /' conftest.$ac_ext >&5
32734
32735 ol_cv_db_db_42=no
32736 fi
32737 rm -f conftest.err conftest.$ac_objext \
32738       conftest$ac_exeext conftest.$ac_ext
32739
32740         LIBS="$ol_LIBS"
32741
32742 fi
32743 echo "$as_me:$LINENO: result: $ol_cv_db_db_42" >&5
32744 echo "${ECHO_T}$ol_cv_db_db_42" >&6
32745
32746         if test $ol_cv_db_db_42 = yes ; then
32747                 ol_cv_lib_db=-ldb-42
32748         fi
32749 fi
32750
32751                 if test $ol_cv_lib_db = no ; then
32752         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.2)" >&5
32753 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.2)... $ECHO_C" >&6
32754 if test "${ol_cv_db_db_4_dot_2+set}" = set; then
32755   echo $ECHO_N "(cached) $ECHO_C" >&6
32756 else
32757
32758         ol_DB_LIB=-ldb-4.2
32759         ol_LIBS=$LIBS
32760         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32761
32762         cat >conftest.$ac_ext <<_ACEOF
32763 /* confdefs.h.  */
32764 _ACEOF
32765 cat confdefs.h >>conftest.$ac_ext
32766 cat >>conftest.$ac_ext <<_ACEOF
32767 /* end confdefs.h.  */
32768
32769 #ifdef HAVE_DB_185_H
32770 # include <db_185.h>
32771 #else
32772 # include <db.h>
32773 #endif
32774
32775 #ifndef DB_VERSION_MAJOR
32776 # define DB_VERSION_MAJOR 1
32777 #endif
32778
32779 #ifndef NULL
32780 #define NULL ((void*)0)
32781 #endif
32782
32783 int
32784 main ()
32785 {
32786
32787 #if DB_VERSION_MAJOR > 1
32788         {
32789                 char *version;
32790                 int major, minor, patch;
32791
32792                 version = db_version( &major, &minor, &patch );
32793
32794                 if( major != DB_VERSION_MAJOR ||
32795                         minor < DB_VERSION_MINOR )
32796                 {
32797                         printf("Berkeley DB version mismatch\n"
32798                                 "\theader: %s\n\tlibrary: %s\n",
32799                                 DB_VERSION_STRING, version);
32800                         return 1;
32801                 }
32802         }
32803 #endif
32804
32805 #if DB_VERSION_MAJOR > 2
32806         db_env_create( NULL, 0 );
32807 #elif DB_VERSION_MAJOR > 1
32808         db_appexit( NULL );
32809 #else
32810         (void) dbopen( NULL, 0, 0, 0, NULL);
32811 #endif
32812
32813   ;
32814   return 0;
32815 }
32816 _ACEOF
32817 rm -f conftest.$ac_objext conftest$ac_exeext
32818 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32819   (eval $ac_link) 2>conftest.er1
32820   ac_status=$?
32821   grep -v '^ *+' conftest.er1 >conftest.err
32822   rm -f conftest.er1
32823   cat conftest.err >&5
32824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32825   (exit $ac_status); } &&
32826          { ac_try='test -z "$ac_c_werror_flag"
32827                          || test ! -s conftest.err'
32828   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32829   (eval $ac_try) 2>&5
32830   ac_status=$?
32831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32832   (exit $ac_status); }; } &&
32833          { ac_try='test -s conftest$ac_exeext'
32834   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32835   (eval $ac_try) 2>&5
32836   ac_status=$?
32837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32838   (exit $ac_status); }; }; then
32839   ol_cv_db_db_4_dot_2=yes
32840 else
32841   echo "$as_me: failed program was:" >&5
32842 sed 's/^/| /' conftest.$ac_ext >&5
32843
32844 ol_cv_db_db_4_dot_2=no
32845 fi
32846 rm -f conftest.err conftest.$ac_objext \
32847       conftest$ac_exeext conftest.$ac_ext
32848
32849         LIBS="$ol_LIBS"
32850
32851 fi
32852 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_2" >&5
32853 echo "${ECHO_T}$ol_cv_db_db_4_dot_2" >&6
32854
32855         if test $ol_cv_db_db_4_dot_2 = yes ; then
32856                 ol_cv_lib_db=-ldb-4.2
32857         fi
32858 fi
32859
32860                 if test $ol_cv_lib_db = no ; then
32861         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-2)" >&5
32862 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-2)... $ECHO_C" >&6
32863 if test "${ol_cv_db_db_4_2+set}" = set; then
32864   echo $ECHO_N "(cached) $ECHO_C" >&6
32865 else
32866
32867         ol_DB_LIB=-ldb-4-2
32868         ol_LIBS=$LIBS
32869         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32870
32871         cat >conftest.$ac_ext <<_ACEOF
32872 /* confdefs.h.  */
32873 _ACEOF
32874 cat confdefs.h >>conftest.$ac_ext
32875 cat >>conftest.$ac_ext <<_ACEOF
32876 /* end confdefs.h.  */
32877
32878 #ifdef HAVE_DB_185_H
32879 # include <db_185.h>
32880 #else
32881 # include <db.h>
32882 #endif
32883
32884 #ifndef DB_VERSION_MAJOR
32885 # define DB_VERSION_MAJOR 1
32886 #endif
32887
32888 #ifndef NULL
32889 #define NULL ((void*)0)
32890 #endif
32891
32892 int
32893 main ()
32894 {
32895
32896 #if DB_VERSION_MAJOR > 1
32897         {
32898                 char *version;
32899                 int major, minor, patch;
32900
32901                 version = db_version( &major, &minor, &patch );
32902
32903                 if( major != DB_VERSION_MAJOR ||
32904                         minor < DB_VERSION_MINOR )
32905                 {
32906                         printf("Berkeley DB version mismatch\n"
32907                                 "\theader: %s\n\tlibrary: %s\n",
32908                                 DB_VERSION_STRING, version);
32909                         return 1;
32910                 }
32911         }
32912 #endif
32913
32914 #if DB_VERSION_MAJOR > 2
32915         db_env_create( NULL, 0 );
32916 #elif DB_VERSION_MAJOR > 1
32917         db_appexit( NULL );
32918 #else
32919         (void) dbopen( NULL, 0, 0, 0, NULL);
32920 #endif
32921
32922   ;
32923   return 0;
32924 }
32925 _ACEOF
32926 rm -f conftest.$ac_objext conftest$ac_exeext
32927 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32928   (eval $ac_link) 2>conftest.er1
32929   ac_status=$?
32930   grep -v '^ *+' conftest.er1 >conftest.err
32931   rm -f conftest.er1
32932   cat conftest.err >&5
32933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32934   (exit $ac_status); } &&
32935          { ac_try='test -z "$ac_c_werror_flag"
32936                          || test ! -s conftest.err'
32937   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32938   (eval $ac_try) 2>&5
32939   ac_status=$?
32940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32941   (exit $ac_status); }; } &&
32942          { ac_try='test -s conftest$ac_exeext'
32943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32944   (eval $ac_try) 2>&5
32945   ac_status=$?
32946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32947   (exit $ac_status); }; }; then
32948   ol_cv_db_db_4_2=yes
32949 else
32950   echo "$as_me: failed program was:" >&5
32951 sed 's/^/| /' conftest.$ac_ext >&5
32952
32953 ol_cv_db_db_4_2=no
32954 fi
32955 rm -f conftest.err conftest.$ac_objext \
32956       conftest$ac_exeext conftest.$ac_ext
32957
32958         LIBS="$ol_LIBS"
32959
32960 fi
32961 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_2" >&5
32962 echo "${ECHO_T}$ol_cv_db_db_4_2" >&6
32963
32964         if test $ol_cv_db_db_4_2 = yes ; then
32965                 ol_cv_lib_db=-ldb-4-2
32966         fi
32967 fi
32968
32969         elif test $ol_cv_bdb_minor = 1 ; then
32970                 if test $ol_cv_lib_db = no ; then
32971         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb41)" >&5
32972 echo $ECHO_N "checking for Berkeley DB link (-ldb41)... $ECHO_C" >&6
32973 if test "${ol_cv_db_db41+set}" = set; then
32974   echo $ECHO_N "(cached) $ECHO_C" >&6
32975 else
32976
32977         ol_DB_LIB=-ldb41
32978         ol_LIBS=$LIBS
32979         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32980
32981         cat >conftest.$ac_ext <<_ACEOF
32982 /* confdefs.h.  */
32983 _ACEOF
32984 cat confdefs.h >>conftest.$ac_ext
32985 cat >>conftest.$ac_ext <<_ACEOF
32986 /* end confdefs.h.  */
32987
32988 #ifdef HAVE_DB_185_H
32989 # include <db_185.h>
32990 #else
32991 # include <db.h>
32992 #endif
32993
32994 #ifndef DB_VERSION_MAJOR
32995 # define DB_VERSION_MAJOR 1
32996 #endif
32997
32998 #ifndef NULL
32999 #define NULL ((void*)0)
33000 #endif
33001
33002 int
33003 main ()
33004 {
33005
33006 #if DB_VERSION_MAJOR > 1
33007         {
33008                 char *version;
33009                 int major, minor, patch;
33010
33011                 version = db_version( &major, &minor, &patch );
33012
33013                 if( major != DB_VERSION_MAJOR ||
33014                         minor < DB_VERSION_MINOR )
33015                 {
33016                         printf("Berkeley DB version mismatch\n"
33017                                 "\theader: %s\n\tlibrary: %s\n",
33018                                 DB_VERSION_STRING, version);
33019                         return 1;
33020                 }
33021         }
33022 #endif
33023
33024 #if DB_VERSION_MAJOR > 2
33025         db_env_create( NULL, 0 );
33026 #elif DB_VERSION_MAJOR > 1
33027         db_appexit( NULL );
33028 #else
33029         (void) dbopen( NULL, 0, 0, 0, NULL);
33030 #endif
33031
33032   ;
33033   return 0;
33034 }
33035 _ACEOF
33036 rm -f conftest.$ac_objext conftest$ac_exeext
33037 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33038   (eval $ac_link) 2>conftest.er1
33039   ac_status=$?
33040   grep -v '^ *+' conftest.er1 >conftest.err
33041   rm -f conftest.er1
33042   cat conftest.err >&5
33043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33044   (exit $ac_status); } &&
33045          { ac_try='test -z "$ac_c_werror_flag"
33046                          || test ! -s conftest.err'
33047   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33048   (eval $ac_try) 2>&5
33049   ac_status=$?
33050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33051   (exit $ac_status); }; } &&
33052          { ac_try='test -s conftest$ac_exeext'
33053   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33054   (eval $ac_try) 2>&5
33055   ac_status=$?
33056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33057   (exit $ac_status); }; }; then
33058   ol_cv_db_db41=yes
33059 else
33060   echo "$as_me: failed program was:" >&5
33061 sed 's/^/| /' conftest.$ac_ext >&5
33062
33063 ol_cv_db_db41=no
33064 fi
33065 rm -f conftest.err conftest.$ac_objext \
33066       conftest$ac_exeext conftest.$ac_ext
33067
33068         LIBS="$ol_LIBS"
33069
33070 fi
33071 echo "$as_me:$LINENO: result: $ol_cv_db_db41" >&5
33072 echo "${ECHO_T}$ol_cv_db_db41" >&6
33073
33074         if test $ol_cv_db_db41 = yes ; then
33075                 ol_cv_lib_db=-ldb41
33076         fi
33077 fi
33078
33079                 if test $ol_cv_lib_db = no ; then
33080         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-41)" >&5
33081 echo $ECHO_N "checking for Berkeley DB link (-ldb-41)... $ECHO_C" >&6
33082 if test "${ol_cv_db_db_41+set}" = set; then
33083   echo $ECHO_N "(cached) $ECHO_C" >&6
33084 else
33085
33086         ol_DB_LIB=-ldb-41
33087         ol_LIBS=$LIBS
33088         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33089
33090         cat >conftest.$ac_ext <<_ACEOF
33091 /* confdefs.h.  */
33092 _ACEOF
33093 cat confdefs.h >>conftest.$ac_ext
33094 cat >>conftest.$ac_ext <<_ACEOF
33095 /* end confdefs.h.  */
33096
33097 #ifdef HAVE_DB_185_H
33098 # include <db_185.h>
33099 #else
33100 # include <db.h>
33101 #endif
33102
33103 #ifndef DB_VERSION_MAJOR
33104 # define DB_VERSION_MAJOR 1
33105 #endif
33106
33107 #ifndef NULL
33108 #define NULL ((void*)0)
33109 #endif
33110
33111 int
33112 main ()
33113 {
33114
33115 #if DB_VERSION_MAJOR > 1
33116         {
33117                 char *version;
33118                 int major, minor, patch;
33119
33120                 version = db_version( &major, &minor, &patch );
33121
33122                 if( major != DB_VERSION_MAJOR ||
33123                         minor < DB_VERSION_MINOR )
33124                 {
33125                         printf("Berkeley DB version mismatch\n"
33126                                 "\theader: %s\n\tlibrary: %s\n",
33127                                 DB_VERSION_STRING, version);
33128                         return 1;
33129                 }
33130         }
33131 #endif
33132
33133 #if DB_VERSION_MAJOR > 2
33134         db_env_create( NULL, 0 );
33135 #elif DB_VERSION_MAJOR > 1
33136         db_appexit( NULL );
33137 #else
33138         (void) dbopen( NULL, 0, 0, 0, NULL);
33139 #endif
33140
33141   ;
33142   return 0;
33143 }
33144 _ACEOF
33145 rm -f conftest.$ac_objext conftest$ac_exeext
33146 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33147   (eval $ac_link) 2>conftest.er1
33148   ac_status=$?
33149   grep -v '^ *+' conftest.er1 >conftest.err
33150   rm -f conftest.er1
33151   cat conftest.err >&5
33152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33153   (exit $ac_status); } &&
33154          { ac_try='test -z "$ac_c_werror_flag"
33155                          || test ! -s conftest.err'
33156   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33157   (eval $ac_try) 2>&5
33158   ac_status=$?
33159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33160   (exit $ac_status); }; } &&
33161          { ac_try='test -s conftest$ac_exeext'
33162   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33163   (eval $ac_try) 2>&5
33164   ac_status=$?
33165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33166   (exit $ac_status); }; }; then
33167   ol_cv_db_db_41=yes
33168 else
33169   echo "$as_me: failed program was:" >&5
33170 sed 's/^/| /' conftest.$ac_ext >&5
33171
33172 ol_cv_db_db_41=no
33173 fi
33174 rm -f conftest.err conftest.$ac_objext \
33175       conftest$ac_exeext conftest.$ac_ext
33176
33177         LIBS="$ol_LIBS"
33178
33179 fi
33180 echo "$as_me:$LINENO: result: $ol_cv_db_db_41" >&5
33181 echo "${ECHO_T}$ol_cv_db_db_41" >&6
33182
33183         if test $ol_cv_db_db_41 = yes ; then
33184                 ol_cv_lib_db=-ldb-41
33185         fi
33186 fi
33187
33188                 if test $ol_cv_lib_db = no ; then
33189         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.1)" >&5
33190 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.1)... $ECHO_C" >&6
33191 if test "${ol_cv_db_db_4_dot_1+set}" = set; then
33192   echo $ECHO_N "(cached) $ECHO_C" >&6
33193 else
33194
33195         ol_DB_LIB=-ldb-4.1
33196         ol_LIBS=$LIBS
33197         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33198
33199         cat >conftest.$ac_ext <<_ACEOF
33200 /* confdefs.h.  */
33201 _ACEOF
33202 cat confdefs.h >>conftest.$ac_ext
33203 cat >>conftest.$ac_ext <<_ACEOF
33204 /* end confdefs.h.  */
33205
33206 #ifdef HAVE_DB_185_H
33207 # include <db_185.h>
33208 #else
33209 # include <db.h>
33210 #endif
33211
33212 #ifndef DB_VERSION_MAJOR
33213 # define DB_VERSION_MAJOR 1
33214 #endif
33215
33216 #ifndef NULL
33217 #define NULL ((void*)0)
33218 #endif
33219
33220 int
33221 main ()
33222 {
33223
33224 #if DB_VERSION_MAJOR > 1
33225         {
33226                 char *version;
33227                 int major, minor, patch;
33228
33229                 version = db_version( &major, &minor, &patch );
33230
33231                 if( major != DB_VERSION_MAJOR ||
33232                         minor < DB_VERSION_MINOR )
33233                 {
33234                         printf("Berkeley DB version mismatch\n"
33235                                 "\theader: %s\n\tlibrary: %s\n",
33236                                 DB_VERSION_STRING, version);
33237                         return 1;
33238                 }
33239         }
33240 #endif
33241
33242 #if DB_VERSION_MAJOR > 2
33243         db_env_create( NULL, 0 );
33244 #elif DB_VERSION_MAJOR > 1
33245         db_appexit( NULL );
33246 #else
33247         (void) dbopen( NULL, 0, 0, 0, NULL);
33248 #endif
33249
33250   ;
33251   return 0;
33252 }
33253 _ACEOF
33254 rm -f conftest.$ac_objext conftest$ac_exeext
33255 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33256   (eval $ac_link) 2>conftest.er1
33257   ac_status=$?
33258   grep -v '^ *+' conftest.er1 >conftest.err
33259   rm -f conftest.er1
33260   cat conftest.err >&5
33261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33262   (exit $ac_status); } &&
33263          { ac_try='test -z "$ac_c_werror_flag"
33264                          || test ! -s conftest.err'
33265   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33266   (eval $ac_try) 2>&5
33267   ac_status=$?
33268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33269   (exit $ac_status); }; } &&
33270          { ac_try='test -s conftest$ac_exeext'
33271   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33272   (eval $ac_try) 2>&5
33273   ac_status=$?
33274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33275   (exit $ac_status); }; }; then
33276   ol_cv_db_db_4_dot_1=yes
33277 else
33278   echo "$as_me: failed program was:" >&5
33279 sed 's/^/| /' conftest.$ac_ext >&5
33280
33281 ol_cv_db_db_4_dot_1=no
33282 fi
33283 rm -f conftest.err conftest.$ac_objext \
33284       conftest$ac_exeext conftest.$ac_ext
33285
33286         LIBS="$ol_LIBS"
33287
33288 fi
33289 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_1" >&5
33290 echo "${ECHO_T}$ol_cv_db_db_4_dot_1" >&6
33291
33292         if test $ol_cv_db_db_4_dot_1 = yes ; then
33293                 ol_cv_lib_db=-ldb-4.1
33294         fi
33295 fi
33296
33297                 if test $ol_cv_lib_db = no ; then
33298         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-1)" >&5
33299 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-1)... $ECHO_C" >&6
33300 if test "${ol_cv_db_db_4_1+set}" = set; then
33301   echo $ECHO_N "(cached) $ECHO_C" >&6
33302 else
33303
33304         ol_DB_LIB=-ldb-4-1
33305         ol_LIBS=$LIBS
33306         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33307
33308         cat >conftest.$ac_ext <<_ACEOF
33309 /* confdefs.h.  */
33310 _ACEOF
33311 cat confdefs.h >>conftest.$ac_ext
33312 cat >>conftest.$ac_ext <<_ACEOF
33313 /* end confdefs.h.  */
33314
33315 #ifdef HAVE_DB_185_H
33316 # include <db_185.h>
33317 #else
33318 # include <db.h>
33319 #endif
33320
33321 #ifndef DB_VERSION_MAJOR
33322 # define DB_VERSION_MAJOR 1
33323 #endif
33324
33325 #ifndef NULL
33326 #define NULL ((void*)0)
33327 #endif
33328
33329 int
33330 main ()
33331 {
33332
33333 #if DB_VERSION_MAJOR > 1
33334         {
33335                 char *version;
33336                 int major, minor, patch;
33337
33338                 version = db_version( &major, &minor, &patch );
33339
33340                 if( major != DB_VERSION_MAJOR ||
33341                         minor < DB_VERSION_MINOR )
33342                 {
33343                         printf("Berkeley DB version mismatch\n"
33344                                 "\theader: %s\n\tlibrary: %s\n",
33345                                 DB_VERSION_STRING, version);
33346                         return 1;
33347                 }
33348         }
33349 #endif
33350
33351 #if DB_VERSION_MAJOR > 2
33352         db_env_create( NULL, 0 );
33353 #elif DB_VERSION_MAJOR > 1
33354         db_appexit( NULL );
33355 #else
33356         (void) dbopen( NULL, 0, 0, 0, NULL);
33357 #endif
33358
33359   ;
33360   return 0;
33361 }
33362 _ACEOF
33363 rm -f conftest.$ac_objext conftest$ac_exeext
33364 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33365   (eval $ac_link) 2>conftest.er1
33366   ac_status=$?
33367   grep -v '^ *+' conftest.er1 >conftest.err
33368   rm -f conftest.er1
33369   cat conftest.err >&5
33370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33371   (exit $ac_status); } &&
33372          { ac_try='test -z "$ac_c_werror_flag"
33373                          || test ! -s conftest.err'
33374   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33375   (eval $ac_try) 2>&5
33376   ac_status=$?
33377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33378   (exit $ac_status); }; } &&
33379          { ac_try='test -s conftest$ac_exeext'
33380   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33381   (eval $ac_try) 2>&5
33382   ac_status=$?
33383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33384   (exit $ac_status); }; }; then
33385   ol_cv_db_db_4_1=yes
33386 else
33387   echo "$as_me: failed program was:" >&5
33388 sed 's/^/| /' conftest.$ac_ext >&5
33389
33390 ol_cv_db_db_4_1=no
33391 fi
33392 rm -f conftest.err conftest.$ac_objext \
33393       conftest$ac_exeext conftest.$ac_ext
33394
33395         LIBS="$ol_LIBS"
33396
33397 fi
33398 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_1" >&5
33399 echo "${ECHO_T}$ol_cv_db_db_4_1" >&6
33400
33401         if test $ol_cv_db_db_4_1 = yes ; then
33402                 ol_cv_lib_db=-ldb-4-1
33403         fi
33404 fi
33405
33406         fi
33407         if test $ol_cv_lib_db = no ; then
33408         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4)" >&5
33409 echo $ECHO_N "checking for Berkeley DB link (-ldb-4)... $ECHO_C" >&6
33410 if test "${ol_cv_db_db_4+set}" = set; then
33411   echo $ECHO_N "(cached) $ECHO_C" >&6
33412 else
33413
33414         ol_DB_LIB=-ldb-4
33415         ol_LIBS=$LIBS
33416         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33417
33418         cat >conftest.$ac_ext <<_ACEOF
33419 /* confdefs.h.  */
33420 _ACEOF
33421 cat confdefs.h >>conftest.$ac_ext
33422 cat >>conftest.$ac_ext <<_ACEOF
33423 /* end confdefs.h.  */
33424
33425 #ifdef HAVE_DB_185_H
33426 # include <db_185.h>
33427 #else
33428 # include <db.h>
33429 #endif
33430
33431 #ifndef DB_VERSION_MAJOR
33432 # define DB_VERSION_MAJOR 1
33433 #endif
33434
33435 #ifndef NULL
33436 #define NULL ((void*)0)
33437 #endif
33438
33439 int
33440 main ()
33441 {
33442
33443 #if DB_VERSION_MAJOR > 1
33444         {
33445                 char *version;
33446                 int major, minor, patch;
33447
33448                 version = db_version( &major, &minor, &patch );
33449
33450                 if( major != DB_VERSION_MAJOR ||
33451                         minor < DB_VERSION_MINOR )
33452                 {
33453                         printf("Berkeley DB version mismatch\n"
33454                                 "\theader: %s\n\tlibrary: %s\n",
33455                                 DB_VERSION_STRING, version);
33456                         return 1;
33457                 }
33458         }
33459 #endif
33460
33461 #if DB_VERSION_MAJOR > 2
33462         db_env_create( NULL, 0 );
33463 #elif DB_VERSION_MAJOR > 1
33464         db_appexit( NULL );
33465 #else
33466         (void) dbopen( NULL, 0, 0, 0, NULL);
33467 #endif
33468
33469   ;
33470   return 0;
33471 }
33472 _ACEOF
33473 rm -f conftest.$ac_objext conftest$ac_exeext
33474 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33475   (eval $ac_link) 2>conftest.er1
33476   ac_status=$?
33477   grep -v '^ *+' conftest.er1 >conftest.err
33478   rm -f conftest.er1
33479   cat conftest.err >&5
33480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33481   (exit $ac_status); } &&
33482          { ac_try='test -z "$ac_c_werror_flag"
33483                          || test ! -s conftest.err'
33484   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33485   (eval $ac_try) 2>&5
33486   ac_status=$?
33487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33488   (exit $ac_status); }; } &&
33489          { ac_try='test -s conftest$ac_exeext'
33490   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33491   (eval $ac_try) 2>&5
33492   ac_status=$?
33493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33494   (exit $ac_status); }; }; then
33495   ol_cv_db_db_4=yes
33496 else
33497   echo "$as_me: failed program was:" >&5
33498 sed 's/^/| /' conftest.$ac_ext >&5
33499
33500 ol_cv_db_db_4=no
33501 fi
33502 rm -f conftest.err conftest.$ac_objext \
33503       conftest$ac_exeext conftest.$ac_ext
33504
33505         LIBS="$ol_LIBS"
33506
33507 fi
33508 echo "$as_me:$LINENO: result: $ol_cv_db_db_4" >&5
33509 echo "${ECHO_T}$ol_cv_db_db_4" >&6
33510
33511         if test $ol_cv_db_db_4 = yes ; then
33512                 ol_cv_lib_db=-ldb-4
33513         fi
33514 fi
33515
33516         if test $ol_cv_lib_db = no ; then
33517         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb4)" >&5
33518 echo $ECHO_N "checking for Berkeley DB link (-ldb4)... $ECHO_C" >&6
33519 if test "${ol_cv_db_db4+set}" = set; then
33520   echo $ECHO_N "(cached) $ECHO_C" >&6
33521 else
33522
33523         ol_DB_LIB=-ldb4
33524         ol_LIBS=$LIBS
33525         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33526
33527         cat >conftest.$ac_ext <<_ACEOF
33528 /* confdefs.h.  */
33529 _ACEOF
33530 cat confdefs.h >>conftest.$ac_ext
33531 cat >>conftest.$ac_ext <<_ACEOF
33532 /* end confdefs.h.  */
33533
33534 #ifdef HAVE_DB_185_H
33535 # include <db_185.h>
33536 #else
33537 # include <db.h>
33538 #endif
33539
33540 #ifndef DB_VERSION_MAJOR
33541 # define DB_VERSION_MAJOR 1
33542 #endif
33543
33544 #ifndef NULL
33545 #define NULL ((void*)0)
33546 #endif
33547
33548 int
33549 main ()
33550 {
33551
33552 #if DB_VERSION_MAJOR > 1
33553         {
33554                 char *version;
33555                 int major, minor, patch;
33556
33557                 version = db_version( &major, &minor, &patch );
33558
33559                 if( major != DB_VERSION_MAJOR ||
33560                         minor < DB_VERSION_MINOR )
33561                 {
33562                         printf("Berkeley DB version mismatch\n"
33563                                 "\theader: %s\n\tlibrary: %s\n",
33564                                 DB_VERSION_STRING, version);
33565                         return 1;
33566                 }
33567         }
33568 #endif
33569
33570 #if DB_VERSION_MAJOR > 2
33571         db_env_create( NULL, 0 );
33572 #elif DB_VERSION_MAJOR > 1
33573         db_appexit( NULL );
33574 #else
33575         (void) dbopen( NULL, 0, 0, 0, NULL);
33576 #endif
33577
33578   ;
33579   return 0;
33580 }
33581 _ACEOF
33582 rm -f conftest.$ac_objext conftest$ac_exeext
33583 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33584   (eval $ac_link) 2>conftest.er1
33585   ac_status=$?
33586   grep -v '^ *+' conftest.er1 >conftest.err
33587   rm -f conftest.er1
33588   cat conftest.err >&5
33589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33590   (exit $ac_status); } &&
33591          { ac_try='test -z "$ac_c_werror_flag"
33592                          || test ! -s conftest.err'
33593   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33594   (eval $ac_try) 2>&5
33595   ac_status=$?
33596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33597   (exit $ac_status); }; } &&
33598          { ac_try='test -s conftest$ac_exeext'
33599   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33600   (eval $ac_try) 2>&5
33601   ac_status=$?
33602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33603   (exit $ac_status); }; }; then
33604   ol_cv_db_db4=yes
33605 else
33606   echo "$as_me: failed program was:" >&5
33607 sed 's/^/| /' conftest.$ac_ext >&5
33608
33609 ol_cv_db_db4=no
33610 fi
33611 rm -f conftest.err conftest.$ac_objext \
33612       conftest$ac_exeext conftest.$ac_ext
33613
33614         LIBS="$ol_LIBS"
33615
33616 fi
33617 echo "$as_me:$LINENO: result: $ol_cv_db_db4" >&5
33618 echo "${ECHO_T}$ol_cv_db_db4" >&6
33619
33620         if test $ol_cv_db_db4 = yes ; then
33621                 ol_cv_lib_db=-ldb4
33622         fi
33623 fi
33624
33625         if test $ol_cv_lib_db = no ; then
33626         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb)" >&5
33627 echo $ECHO_N "checking for Berkeley DB link (-ldb)... $ECHO_C" >&6
33628 if test "${ol_cv_db_db+set}" = set; then
33629   echo $ECHO_N "(cached) $ECHO_C" >&6
33630 else
33631
33632         ol_DB_LIB=-ldb
33633         ol_LIBS=$LIBS
33634         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33635
33636         cat >conftest.$ac_ext <<_ACEOF
33637 /* confdefs.h.  */
33638 _ACEOF
33639 cat confdefs.h >>conftest.$ac_ext
33640 cat >>conftest.$ac_ext <<_ACEOF
33641 /* end confdefs.h.  */
33642
33643 #ifdef HAVE_DB_185_H
33644 # include <db_185.h>
33645 #else
33646 # include <db.h>
33647 #endif
33648
33649 #ifndef DB_VERSION_MAJOR
33650 # define DB_VERSION_MAJOR 1
33651 #endif
33652
33653 #ifndef NULL
33654 #define NULL ((void*)0)
33655 #endif
33656
33657 int
33658 main ()
33659 {
33660
33661 #if DB_VERSION_MAJOR > 1
33662         {
33663                 char *version;
33664                 int major, minor, patch;
33665
33666                 version = db_version( &major, &minor, &patch );
33667
33668                 if( major != DB_VERSION_MAJOR ||
33669                         minor < DB_VERSION_MINOR )
33670                 {
33671                         printf("Berkeley DB version mismatch\n"
33672                                 "\theader: %s\n\tlibrary: %s\n",
33673                                 DB_VERSION_STRING, version);
33674                         return 1;
33675                 }
33676         }
33677 #endif
33678
33679 #if DB_VERSION_MAJOR > 2
33680         db_env_create( NULL, 0 );
33681 #elif DB_VERSION_MAJOR > 1
33682         db_appexit( NULL );
33683 #else
33684         (void) dbopen( NULL, 0, 0, 0, NULL);
33685 #endif
33686
33687   ;
33688   return 0;
33689 }
33690 _ACEOF
33691 rm -f conftest.$ac_objext conftest$ac_exeext
33692 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33693   (eval $ac_link) 2>conftest.er1
33694   ac_status=$?
33695   grep -v '^ *+' conftest.er1 >conftest.err
33696   rm -f conftest.er1
33697   cat conftest.err >&5
33698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33699   (exit $ac_status); } &&
33700          { ac_try='test -z "$ac_c_werror_flag"
33701                          || test ! -s conftest.err'
33702   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33703   (eval $ac_try) 2>&5
33704   ac_status=$?
33705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33706   (exit $ac_status); }; } &&
33707          { ac_try='test -s conftest$ac_exeext'
33708   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33709   (eval $ac_try) 2>&5
33710   ac_status=$?
33711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33712   (exit $ac_status); }; }; then
33713   ol_cv_db_db=yes
33714 else
33715   echo "$as_me: failed program was:" >&5
33716 sed 's/^/| /' conftest.$ac_ext >&5
33717
33718 ol_cv_db_db=no
33719 fi
33720 rm -f conftest.err conftest.$ac_objext \
33721       conftest$ac_exeext conftest.$ac_ext
33722
33723         LIBS="$ol_LIBS"
33724
33725 fi
33726 echo "$as_me:$LINENO: result: $ol_cv_db_db" >&5
33727 echo "${ECHO_T}$ol_cv_db_db" >&6
33728
33729         if test $ol_cv_db_db = yes ; then
33730                 ol_cv_lib_db=-ldb
33731         fi
33732 fi
33733
33734
33735 elif test $ol_cv_bdb_major = 3 ; then
33736         if test $ol_cv_lib_db = no ; then
33737         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb3)" >&5
33738 echo $ECHO_N "checking for Berkeley DB link (-ldb3)... $ECHO_C" >&6
33739 if test "${ol_cv_db_db3+set}" = set; then
33740   echo $ECHO_N "(cached) $ECHO_C" >&6
33741 else
33742
33743         ol_DB_LIB=-ldb3
33744         ol_LIBS=$LIBS
33745         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33746
33747         cat >conftest.$ac_ext <<_ACEOF
33748 /* confdefs.h.  */
33749 _ACEOF
33750 cat confdefs.h >>conftest.$ac_ext
33751 cat >>conftest.$ac_ext <<_ACEOF
33752 /* end confdefs.h.  */
33753
33754 #ifdef HAVE_DB_185_H
33755 # include <db_185.h>
33756 #else
33757 # include <db.h>
33758 #endif
33759
33760 #ifndef DB_VERSION_MAJOR
33761 # define DB_VERSION_MAJOR 1
33762 #endif
33763
33764 #ifndef NULL
33765 #define NULL ((void*)0)
33766 #endif
33767
33768 int
33769 main ()
33770 {
33771
33772 #if DB_VERSION_MAJOR > 1
33773         {
33774                 char *version;
33775                 int major, minor, patch;
33776
33777                 version = db_version( &major, &minor, &patch );
33778
33779                 if( major != DB_VERSION_MAJOR ||
33780                         minor < DB_VERSION_MINOR )
33781                 {
33782                         printf("Berkeley DB version mismatch\n"
33783                                 "\theader: %s\n\tlibrary: %s\n",
33784                                 DB_VERSION_STRING, version);
33785                         return 1;
33786                 }
33787         }
33788 #endif
33789
33790 #if DB_VERSION_MAJOR > 2
33791         db_env_create( NULL, 0 );
33792 #elif DB_VERSION_MAJOR > 1
33793         db_appexit( NULL );
33794 #else
33795         (void) dbopen( NULL, 0, 0, 0, NULL);
33796 #endif
33797
33798   ;
33799   return 0;
33800 }
33801 _ACEOF
33802 rm -f conftest.$ac_objext conftest$ac_exeext
33803 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33804   (eval $ac_link) 2>conftest.er1
33805   ac_status=$?
33806   grep -v '^ *+' conftest.er1 >conftest.err
33807   rm -f conftest.er1
33808   cat conftest.err >&5
33809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33810   (exit $ac_status); } &&
33811          { ac_try='test -z "$ac_c_werror_flag"
33812                          || test ! -s conftest.err'
33813   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33814   (eval $ac_try) 2>&5
33815   ac_status=$?
33816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33817   (exit $ac_status); }; } &&
33818          { ac_try='test -s conftest$ac_exeext'
33819   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33820   (eval $ac_try) 2>&5
33821   ac_status=$?
33822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33823   (exit $ac_status); }; }; then
33824   ol_cv_db_db3=yes
33825 else
33826   echo "$as_me: failed program was:" >&5
33827 sed 's/^/| /' conftest.$ac_ext >&5
33828
33829 ol_cv_db_db3=no
33830 fi
33831 rm -f conftest.err conftest.$ac_objext \
33832       conftest$ac_exeext conftest.$ac_ext
33833
33834         LIBS="$ol_LIBS"
33835
33836 fi
33837 echo "$as_me:$LINENO: result: $ol_cv_db_db3" >&5
33838 echo "${ECHO_T}$ol_cv_db_db3" >&6
33839
33840         if test $ol_cv_db_db3 = yes ; then
33841                 ol_cv_lib_db=-ldb3
33842         fi
33843 fi
33844
33845         if test $ol_cv_lib_db = no ; then
33846         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-3)" >&5
33847 echo $ECHO_N "checking for Berkeley DB link (-ldb-3)... $ECHO_C" >&6
33848 if test "${ol_cv_db_db_3+set}" = set; then
33849   echo $ECHO_N "(cached) $ECHO_C" >&6
33850 else
33851
33852         ol_DB_LIB=-ldb-3
33853         ol_LIBS=$LIBS
33854         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33855
33856         cat >conftest.$ac_ext <<_ACEOF
33857 /* confdefs.h.  */
33858 _ACEOF
33859 cat confdefs.h >>conftest.$ac_ext
33860 cat >>conftest.$ac_ext <<_ACEOF
33861 /* end confdefs.h.  */
33862
33863 #ifdef HAVE_DB_185_H
33864 # include <db_185.h>
33865 #else
33866 # include <db.h>
33867 #endif
33868
33869 #ifndef DB_VERSION_MAJOR
33870 # define DB_VERSION_MAJOR 1
33871 #endif
33872
33873 #ifndef NULL
33874 #define NULL ((void*)0)
33875 #endif
33876
33877 int
33878 main ()
33879 {
33880
33881 #if DB_VERSION_MAJOR > 1
33882         {
33883                 char *version;
33884                 int major, minor, patch;
33885
33886                 version = db_version( &major, &minor, &patch );
33887
33888                 if( major != DB_VERSION_MAJOR ||
33889                         minor < DB_VERSION_MINOR )
33890                 {
33891                         printf("Berkeley DB version mismatch\n"
33892                                 "\theader: %s\n\tlibrary: %s\n",
33893                                 DB_VERSION_STRING, version);
33894                         return 1;
33895                 }
33896         }
33897 #endif
33898
33899 #if DB_VERSION_MAJOR > 2
33900         db_env_create( NULL, 0 );
33901 #elif DB_VERSION_MAJOR > 1
33902         db_appexit( NULL );
33903 #else
33904         (void) dbopen( NULL, 0, 0, 0, NULL);
33905 #endif
33906
33907   ;
33908   return 0;
33909 }
33910 _ACEOF
33911 rm -f conftest.$ac_objext conftest$ac_exeext
33912 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33913   (eval $ac_link) 2>conftest.er1
33914   ac_status=$?
33915   grep -v '^ *+' conftest.er1 >conftest.err
33916   rm -f conftest.er1
33917   cat conftest.err >&5
33918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33919   (exit $ac_status); } &&
33920          { ac_try='test -z "$ac_c_werror_flag"
33921                          || test ! -s conftest.err'
33922   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33923   (eval $ac_try) 2>&5
33924   ac_status=$?
33925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33926   (exit $ac_status); }; } &&
33927          { ac_try='test -s conftest$ac_exeext'
33928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33929   (eval $ac_try) 2>&5
33930   ac_status=$?
33931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33932   (exit $ac_status); }; }; then
33933   ol_cv_db_db_3=yes
33934 else
33935   echo "$as_me: failed program was:" >&5
33936 sed 's/^/| /' conftest.$ac_ext >&5
33937
33938 ol_cv_db_db_3=no
33939 fi
33940 rm -f conftest.err conftest.$ac_objext \
33941       conftest$ac_exeext conftest.$ac_ext
33942
33943         LIBS="$ol_LIBS"
33944
33945 fi
33946 echo "$as_me:$LINENO: result: $ol_cv_db_db_3" >&5
33947 echo "${ECHO_T}$ol_cv_db_db_3" >&6
33948
33949         if test $ol_cv_db_db_3 = yes ; then
33950                 ol_cv_lib_db=-ldb-3
33951         fi
33952 fi
33953
33954
33955 elif test $ol_cv_bdb_major = 2 ; then
33956         if test $ol_cv_lib_db = no ; then
33957         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb2)" >&5
33958 echo $ECHO_N "checking for Berkeley DB link (-ldb2)... $ECHO_C" >&6
33959 if test "${ol_cv_db_db2+set}" = set; then
33960   echo $ECHO_N "(cached) $ECHO_C" >&6
33961 else
33962
33963         ol_DB_LIB=-ldb2
33964         ol_LIBS=$LIBS
33965         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33966
33967         cat >conftest.$ac_ext <<_ACEOF
33968 /* confdefs.h.  */
33969 _ACEOF
33970 cat confdefs.h >>conftest.$ac_ext
33971 cat >>conftest.$ac_ext <<_ACEOF
33972 /* end confdefs.h.  */
33973
33974 #ifdef HAVE_DB_185_H
33975 # include <db_185.h>
33976 #else
33977 # include <db.h>
33978 #endif
33979
33980 #ifndef DB_VERSION_MAJOR
33981 # define DB_VERSION_MAJOR 1
33982 #endif
33983
33984 #ifndef NULL
33985 #define NULL ((void*)0)
33986 #endif
33987
33988 int
33989 main ()
33990 {
33991
33992 #if DB_VERSION_MAJOR > 1
33993         {
33994                 char *version;
33995                 int major, minor, patch;
33996
33997                 version = db_version( &major, &minor, &patch );
33998
33999                 if( major != DB_VERSION_MAJOR ||
34000                         minor < DB_VERSION_MINOR )
34001                 {
34002                         printf("Berkeley DB version mismatch\n"
34003                                 "\theader: %s\n\tlibrary: %s\n",
34004                                 DB_VERSION_STRING, version);
34005                         return 1;
34006                 }
34007         }
34008 #endif
34009
34010 #if DB_VERSION_MAJOR > 2
34011         db_env_create( NULL, 0 );
34012 #elif DB_VERSION_MAJOR > 1
34013         db_appexit( NULL );
34014 #else
34015         (void) dbopen( NULL, 0, 0, 0, NULL);
34016 #endif
34017
34018   ;
34019   return 0;
34020 }
34021 _ACEOF
34022 rm -f conftest.$ac_objext conftest$ac_exeext
34023 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34024   (eval $ac_link) 2>conftest.er1
34025   ac_status=$?
34026   grep -v '^ *+' conftest.er1 >conftest.err
34027   rm -f conftest.er1
34028   cat conftest.err >&5
34029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34030   (exit $ac_status); } &&
34031          { ac_try='test -z "$ac_c_werror_flag"
34032                          || test ! -s conftest.err'
34033   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34034   (eval $ac_try) 2>&5
34035   ac_status=$?
34036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34037   (exit $ac_status); }; } &&
34038          { ac_try='test -s conftest$ac_exeext'
34039   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34040   (eval $ac_try) 2>&5
34041   ac_status=$?
34042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34043   (exit $ac_status); }; }; then
34044   ol_cv_db_db2=yes
34045 else
34046   echo "$as_me: failed program was:" >&5
34047 sed 's/^/| /' conftest.$ac_ext >&5
34048
34049 ol_cv_db_db2=no
34050 fi
34051 rm -f conftest.err conftest.$ac_objext \
34052       conftest$ac_exeext conftest.$ac_ext
34053
34054         LIBS="$ol_LIBS"
34055
34056 fi
34057 echo "$as_me:$LINENO: result: $ol_cv_db_db2" >&5
34058 echo "${ECHO_T}$ol_cv_db_db2" >&6
34059
34060         if test $ol_cv_db_db2 = yes ; then
34061                 ol_cv_lib_db=-ldb2
34062         fi
34063 fi
34064
34065         if test $ol_cv_lib_db = no ; then
34066         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-2)" >&5
34067 echo $ECHO_N "checking for Berkeley DB link (-ldb-2)... $ECHO_C" >&6
34068 if test "${ol_cv_db_db_2+set}" = set; then
34069   echo $ECHO_N "(cached) $ECHO_C" >&6
34070 else
34071
34072         ol_DB_LIB=-ldb-2
34073         ol_LIBS=$LIBS
34074         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34075
34076         cat >conftest.$ac_ext <<_ACEOF
34077 /* confdefs.h.  */
34078 _ACEOF
34079 cat confdefs.h >>conftest.$ac_ext
34080 cat >>conftest.$ac_ext <<_ACEOF
34081 /* end confdefs.h.  */
34082
34083 #ifdef HAVE_DB_185_H
34084 # include <db_185.h>
34085 #else
34086 # include <db.h>
34087 #endif
34088
34089 #ifndef DB_VERSION_MAJOR
34090 # define DB_VERSION_MAJOR 1
34091 #endif
34092
34093 #ifndef NULL
34094 #define NULL ((void*)0)
34095 #endif
34096
34097 int
34098 main ()
34099 {
34100
34101 #if DB_VERSION_MAJOR > 1
34102         {
34103                 char *version;
34104                 int major, minor, patch;
34105
34106                 version = db_version( &major, &minor, &patch );
34107
34108                 if( major != DB_VERSION_MAJOR ||
34109                         minor < DB_VERSION_MINOR )
34110                 {
34111                         printf("Berkeley DB version mismatch\n"
34112                                 "\theader: %s\n\tlibrary: %s\n",
34113                                 DB_VERSION_STRING, version);
34114                         return 1;
34115                 }
34116         }
34117 #endif
34118
34119 #if DB_VERSION_MAJOR > 2
34120         db_env_create( NULL, 0 );
34121 #elif DB_VERSION_MAJOR > 1
34122         db_appexit( NULL );
34123 #else
34124         (void) dbopen( NULL, 0, 0, 0, NULL);
34125 #endif
34126
34127   ;
34128   return 0;
34129 }
34130 _ACEOF
34131 rm -f conftest.$ac_objext conftest$ac_exeext
34132 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34133   (eval $ac_link) 2>conftest.er1
34134   ac_status=$?
34135   grep -v '^ *+' conftest.er1 >conftest.err
34136   rm -f conftest.er1
34137   cat conftest.err >&5
34138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34139   (exit $ac_status); } &&
34140          { ac_try='test -z "$ac_c_werror_flag"
34141                          || test ! -s conftest.err'
34142   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34143   (eval $ac_try) 2>&5
34144   ac_status=$?
34145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34146   (exit $ac_status); }; } &&
34147          { ac_try='test -s conftest$ac_exeext'
34148   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34149   (eval $ac_try) 2>&5
34150   ac_status=$?
34151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34152   (exit $ac_status); }; }; then
34153   ol_cv_db_db_2=yes
34154 else
34155   echo "$as_me: failed program was:" >&5
34156 sed 's/^/| /' conftest.$ac_ext >&5
34157
34158 ol_cv_db_db_2=no
34159 fi
34160 rm -f conftest.err conftest.$ac_objext \
34161       conftest$ac_exeext conftest.$ac_ext
34162
34163         LIBS="$ol_LIBS"
34164
34165 fi
34166 echo "$as_me:$LINENO: result: $ol_cv_db_db_2" >&5
34167 echo "${ECHO_T}$ol_cv_db_db_2" >&6
34168
34169         if test $ol_cv_db_db_2 = yes ; then
34170                 ol_cv_lib_db=-ldb-2
34171         fi
34172 fi
34173
34174
34175 elif test $ol_cv_bdb_major = 1 ; then
34176         if test $ol_cv_lib_db = no ; then
34177         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb1)" >&5
34178 echo $ECHO_N "checking for Berkeley DB link (-ldb1)... $ECHO_C" >&6
34179 if test "${ol_cv_db_db1+set}" = set; then
34180   echo $ECHO_N "(cached) $ECHO_C" >&6
34181 else
34182
34183         ol_DB_LIB=-ldb1
34184         ol_LIBS=$LIBS
34185         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34186
34187         cat >conftest.$ac_ext <<_ACEOF
34188 /* confdefs.h.  */
34189 _ACEOF
34190 cat confdefs.h >>conftest.$ac_ext
34191 cat >>conftest.$ac_ext <<_ACEOF
34192 /* end confdefs.h.  */
34193
34194 #ifdef HAVE_DB_185_H
34195 # include <db_185.h>
34196 #else
34197 # include <db.h>
34198 #endif
34199
34200 #ifndef DB_VERSION_MAJOR
34201 # define DB_VERSION_MAJOR 1
34202 #endif
34203
34204 #ifndef NULL
34205 #define NULL ((void*)0)
34206 #endif
34207
34208 int
34209 main ()
34210 {
34211
34212 #if DB_VERSION_MAJOR > 1
34213         {
34214                 char *version;
34215                 int major, minor, patch;
34216
34217                 version = db_version( &major, &minor, &patch );
34218
34219                 if( major != DB_VERSION_MAJOR ||
34220                         minor < DB_VERSION_MINOR )
34221                 {
34222                         printf("Berkeley DB version mismatch\n"
34223                                 "\theader: %s\n\tlibrary: %s\n",
34224                                 DB_VERSION_STRING, version);
34225                         return 1;
34226                 }
34227         }
34228 #endif
34229
34230 #if DB_VERSION_MAJOR > 2
34231         db_env_create( NULL, 0 );
34232 #elif DB_VERSION_MAJOR > 1
34233         db_appexit( NULL );
34234 #else
34235         (void) dbopen( NULL, 0, 0, 0, NULL);
34236 #endif
34237
34238   ;
34239   return 0;
34240 }
34241 _ACEOF
34242 rm -f conftest.$ac_objext conftest$ac_exeext
34243 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34244   (eval $ac_link) 2>conftest.er1
34245   ac_status=$?
34246   grep -v '^ *+' conftest.er1 >conftest.err
34247   rm -f conftest.er1
34248   cat conftest.err >&5
34249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34250   (exit $ac_status); } &&
34251          { ac_try='test -z "$ac_c_werror_flag"
34252                          || test ! -s conftest.err'
34253   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34254   (eval $ac_try) 2>&5
34255   ac_status=$?
34256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34257   (exit $ac_status); }; } &&
34258          { ac_try='test -s conftest$ac_exeext'
34259   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34260   (eval $ac_try) 2>&5
34261   ac_status=$?
34262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34263   (exit $ac_status); }; }; then
34264   ol_cv_db_db1=yes
34265 else
34266   echo "$as_me: failed program was:" >&5
34267 sed 's/^/| /' conftest.$ac_ext >&5
34268
34269 ol_cv_db_db1=no
34270 fi
34271 rm -f conftest.err conftest.$ac_objext \
34272       conftest$ac_exeext conftest.$ac_ext
34273
34274         LIBS="$ol_LIBS"
34275
34276 fi
34277 echo "$as_me:$LINENO: result: $ol_cv_db_db1" >&5
34278 echo "${ECHO_T}$ol_cv_db_db1" >&6
34279
34280         if test $ol_cv_db_db1 = yes ; then
34281                 ol_cv_lib_db=-ldb1
34282         fi
34283 fi
34284
34285         if test $ol_cv_lib_db = no ; then
34286         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-1)" >&5
34287 echo $ECHO_N "checking for Berkeley DB link (-ldb-1)... $ECHO_C" >&6
34288 if test "${ol_cv_db_db_1+set}" = set; then
34289   echo $ECHO_N "(cached) $ECHO_C" >&6
34290 else
34291
34292         ol_DB_LIB=-ldb-1
34293         ol_LIBS=$LIBS
34294         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34295
34296         cat >conftest.$ac_ext <<_ACEOF
34297 /* confdefs.h.  */
34298 _ACEOF
34299 cat confdefs.h >>conftest.$ac_ext
34300 cat >>conftest.$ac_ext <<_ACEOF
34301 /* end confdefs.h.  */
34302
34303 #ifdef HAVE_DB_185_H
34304 # include <db_185.h>
34305 #else
34306 # include <db.h>
34307 #endif
34308
34309 #ifndef DB_VERSION_MAJOR
34310 # define DB_VERSION_MAJOR 1
34311 #endif
34312
34313 #ifndef NULL
34314 #define NULL ((void*)0)
34315 #endif
34316
34317 int
34318 main ()
34319 {
34320
34321 #if DB_VERSION_MAJOR > 1
34322         {
34323                 char *version;
34324                 int major, minor, patch;
34325
34326                 version = db_version( &major, &minor, &patch );
34327
34328                 if( major != DB_VERSION_MAJOR ||
34329                         minor < DB_VERSION_MINOR )
34330                 {
34331                         printf("Berkeley DB version mismatch\n"
34332                                 "\theader: %s\n\tlibrary: %s\n",
34333                                 DB_VERSION_STRING, version);
34334                         return 1;
34335                 }
34336         }
34337 #endif
34338
34339 #if DB_VERSION_MAJOR > 2
34340         db_env_create( NULL, 0 );
34341 #elif DB_VERSION_MAJOR > 1
34342         db_appexit( NULL );
34343 #else
34344         (void) dbopen( NULL, 0, 0, 0, NULL);
34345 #endif
34346
34347   ;
34348   return 0;
34349 }
34350 _ACEOF
34351 rm -f conftest.$ac_objext conftest$ac_exeext
34352 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34353   (eval $ac_link) 2>conftest.er1
34354   ac_status=$?
34355   grep -v '^ *+' conftest.er1 >conftest.err
34356   rm -f conftest.er1
34357   cat conftest.err >&5
34358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34359   (exit $ac_status); } &&
34360          { ac_try='test -z "$ac_c_werror_flag"
34361                          || test ! -s conftest.err'
34362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34363   (eval $ac_try) 2>&5
34364   ac_status=$?
34365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34366   (exit $ac_status); }; } &&
34367          { ac_try='test -s conftest$ac_exeext'
34368   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34369   (eval $ac_try) 2>&5
34370   ac_status=$?
34371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34372   (exit $ac_status); }; }; then
34373   ol_cv_db_db_1=yes
34374 else
34375   echo "$as_me: failed program was:" >&5
34376 sed 's/^/| /' conftest.$ac_ext >&5
34377
34378 ol_cv_db_db_1=no
34379 fi
34380 rm -f conftest.err conftest.$ac_objext \
34381       conftest$ac_exeext conftest.$ac_ext
34382
34383         LIBS="$ol_LIBS"
34384
34385 fi
34386 echo "$as_me:$LINENO: result: $ol_cv_db_db_1" >&5
34387 echo "${ECHO_T}$ol_cv_db_db_1" >&6
34388
34389         if test $ol_cv_db_db_1 = yes ; then
34390                 ol_cv_lib_db=-ldb-1
34391         fi
34392 fi
34393
34394 fi
34395 if test $ol_cv_lib_db = no ; then
34396         echo "$as_me:$LINENO: checking for Berkeley DB link (default)" >&5
34397 echo $ECHO_N "checking for Berkeley DB link (default)... $ECHO_C" >&6
34398 if test "${ol_cv_db_none+set}" = set; then
34399   echo $ECHO_N "(cached) $ECHO_C" >&6
34400 else
34401
34402         ol_DB_LIB=
34403         ol_LIBS=$LIBS
34404         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34405
34406         cat >conftest.$ac_ext <<_ACEOF
34407 /* confdefs.h.  */
34408 _ACEOF
34409 cat confdefs.h >>conftest.$ac_ext
34410 cat >>conftest.$ac_ext <<_ACEOF
34411 /* end confdefs.h.  */
34412
34413 #ifdef HAVE_DB_185_H
34414 # include <db_185.h>
34415 #else
34416 # include <db.h>
34417 #endif
34418
34419 #ifndef DB_VERSION_MAJOR
34420 # define DB_VERSION_MAJOR 1
34421 #endif
34422
34423 #ifndef NULL
34424 #define NULL ((void*)0)
34425 #endif
34426
34427 int
34428 main ()
34429 {
34430
34431 #if DB_VERSION_MAJOR > 1
34432         {
34433                 char *version;
34434                 int major, minor, patch;
34435
34436                 version = db_version( &major, &minor, &patch );
34437
34438                 if( major != DB_VERSION_MAJOR ||
34439                         minor < DB_VERSION_MINOR )
34440                 {
34441                         printf("Berkeley DB version mismatch\n"
34442                                 "\theader: %s\n\tlibrary: %s\n",
34443                                 DB_VERSION_STRING, version);
34444                         return 1;
34445                 }
34446         }
34447 #endif
34448
34449 #if DB_VERSION_MAJOR > 2
34450         db_env_create( NULL, 0 );
34451 #elif DB_VERSION_MAJOR > 1
34452         db_appexit( NULL );
34453 #else
34454         (void) dbopen( NULL, 0, 0, 0, NULL);
34455 #endif
34456
34457   ;
34458   return 0;
34459 }
34460 _ACEOF
34461 rm -f conftest.$ac_objext conftest$ac_exeext
34462 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34463   (eval $ac_link) 2>conftest.er1
34464   ac_status=$?
34465   grep -v '^ *+' conftest.er1 >conftest.err
34466   rm -f conftest.er1
34467   cat conftest.err >&5
34468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34469   (exit $ac_status); } &&
34470          { ac_try='test -z "$ac_c_werror_flag"
34471                          || test ! -s conftest.err'
34472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34473   (eval $ac_try) 2>&5
34474   ac_status=$?
34475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34476   (exit $ac_status); }; } &&
34477          { ac_try='test -s conftest$ac_exeext'
34478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34479   (eval $ac_try) 2>&5
34480   ac_status=$?
34481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34482   (exit $ac_status); }; }; then
34483   ol_cv_db_none=yes
34484 else
34485   echo "$as_me: failed program was:" >&5
34486 sed 's/^/| /' conftest.$ac_ext >&5
34487
34488 ol_cv_db_none=no
34489 fi
34490 rm -f conftest.err conftest.$ac_objext \
34491       conftest$ac_exeext conftest.$ac_ext
34492
34493         LIBS="$ol_LIBS"
34494
34495 fi
34496 echo "$as_me:$LINENO: result: $ol_cv_db_none" >&5
34497 echo "${ECHO_T}$ol_cv_db_none" >&6
34498
34499         if test $ol_cv_db_none = yes ; then
34500                 ol_cv_lib_db=yes
34501         fi
34502 fi
34503
34504
34505         if test "$ol_cv_lib_db" != no ; then
34506                 ol_cv_berkeley_db=yes
34507                 echo "$as_me:$LINENO: checking for Berkeley DB version match" >&5
34508 echo $ECHO_N "checking for Berkeley DB version match... $ECHO_C" >&6
34509 if test "${ol_cv_berkeley_db_version+set}" = set; then
34510   echo $ECHO_N "(cached) $ECHO_C" >&6
34511 else
34512
34513         ol_LIBS="$LIBS"
34514         LIBS="$LTHREAD_LIBS $LIBS"
34515         if test $ol_cv_lib_db != yes ; then
34516                 LIBS="$ol_cv_lib_db $LIBS"
34517         fi
34518
34519         if test "$cross_compiling" = yes; then
34520   ol_cv_berkeley_db_version=cross
34521 else
34522   cat >conftest.$ac_ext <<_ACEOF
34523 /* confdefs.h.  */
34524 _ACEOF
34525 cat confdefs.h >>conftest.$ac_ext
34526 cat >>conftest.$ac_ext <<_ACEOF
34527 /* end confdefs.h.  */
34528
34529 #ifdef HAVE_DB_185_H
34530         choke me;
34531 #else
34532 #include <db.h>
34533 #endif
34534 #ifndef DB_VERSION_MAJOR
34535 # define DB_VERSION_MAJOR 1
34536 #endif
34537 #ifndef NULL
34538 #define NULL ((void *)0)
34539 #endif
34540 main()
34541 {
34542 #if DB_VERSION_MAJOR > 1
34543         char *version;
34544         int major, minor, patch;
34545
34546         version = db_version( &major, &minor, &patch );
34547
34548         if( major != DB_VERSION_MAJOR ||
34549                 minor != DB_VERSION_MINOR ||
34550                 patch != DB_VERSION_PATCH )
34551         {
34552                 printf("Berkeley DB version mismatch\n"
34553                         "\theader: %s\n\tlibrary: %s\n",
34554                         DB_VERSION_STRING, version);
34555                 return 1;
34556         }
34557 #endif
34558
34559         return 0;
34560 }
34561 _ACEOF
34562 rm -f conftest$ac_exeext
34563 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34564   (eval $ac_link) 2>&5
34565   ac_status=$?
34566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34567   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
34568   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34569   (eval $ac_try) 2>&5
34570   ac_status=$?
34571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34572   (exit $ac_status); }; }; then
34573   ol_cv_berkeley_db_version=yes
34574 else
34575   echo "$as_me: program exited with status $ac_status" >&5
34576 echo "$as_me: failed program was:" >&5
34577 sed 's/^/| /' conftest.$ac_ext >&5
34578
34579 ( exit $ac_status )
34580 ol_cv_berkeley_db_version=no
34581 fi
34582 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
34583 fi
34584
34585         LIBS="$ol_LIBS"
34586
34587 fi
34588 echo "$as_me:$LINENO: result: $ol_cv_berkeley_db_version" >&5
34589 echo "${ECHO_T}$ol_cv_berkeley_db_version" >&6
34590
34591         if test $ol_cv_berkeley_db_version = no ; then
34592                 { { echo "$as_me:$LINENO: error: Berkeley DB version mismatch" >&5
34593 echo "$as_me: error: Berkeley DB version mismatch" >&2;}
34594    { (exit 1); exit 1; }; }
34595         fi
34596
34597                 echo "$as_me:$LINENO: checking for Berkeley DB thread support" >&5
34598 echo $ECHO_N "checking for Berkeley DB thread support... $ECHO_C" >&6
34599 if test "${ol_cv_berkeley_db_thread+set}" = set; then
34600   echo $ECHO_N "(cached) $ECHO_C" >&6
34601 else
34602
34603         ol_LIBS="$LIBS"
34604         LIBS="$LTHREAD_LIBS $LIBS"
34605         if test $ol_cv_lib_db != yes ; then
34606                 LIBS="$ol_cv_lib_db $LIBS"
34607         fi
34608
34609         if test "$cross_compiling" = yes; then
34610   ol_cv_berkeley_db_thread=cross
34611 else
34612   cat >conftest.$ac_ext <<_ACEOF
34613 /* confdefs.h.  */
34614 _ACEOF
34615 cat confdefs.h >>conftest.$ac_ext
34616 cat >>conftest.$ac_ext <<_ACEOF
34617 /* end confdefs.h.  */
34618
34619 #ifdef HAVE_DB_185_H
34620         choke me;
34621 #else
34622 #include <db.h>
34623 #endif
34624 #ifndef NULL
34625 #define NULL ((void *)0)
34626 #endif
34627 main()
34628 {
34629         int rc;
34630         u_int32_t flags = DB_CREATE |
34631 #ifdef DB_PRIVATE
34632                 DB_PRIVATE |
34633 #endif
34634                 DB_THREAD;
34635
34636 #if DB_VERSION_MAJOR > 2
34637         DB_ENV *env = NULL;
34638
34639         rc = db_env_create( &env, 0 );
34640
34641         flags |= DB_INIT_MPOOL;
34642 #ifdef DB_MPOOL_PRIVATE
34643         flags |= DB_MPOOL_PRIVATE;
34644 #endif
34645
34646         if( rc ) {
34647                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
34648                 return rc;
34649         }
34650
34651 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
34652         rc = env->open( env, NULL, flags, 0 );
34653 #else
34654         rc = env->open( env, NULL, NULL, flags, 0 );
34655 #endif
34656
34657         if ( rc == 0 ) {
34658                 rc = env->close( env, 0 );
34659         }
34660
34661         if( rc ) {
34662                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
34663                 return rc;
34664         }
34665
34666 #else
34667         DB_ENV env;
34668         memset( &env, '\0', sizeof(env) );
34669
34670         rc = db_appinit( NULL, NULL, &env, flags );
34671
34672         if( rc == 0 ) {
34673                 db_appexit( &env );
34674         }
34675
34676         unlink("__db_mpool.share");
34677         unlink("__db_lock.share");
34678 #endif
34679
34680         return rc;
34681 }
34682 _ACEOF
34683 rm -f conftest$ac_exeext
34684 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34685   (eval $ac_link) 2>&5
34686   ac_status=$?
34687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34688   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
34689   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34690   (eval $ac_try) 2>&5
34691   ac_status=$?
34692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34693   (exit $ac_status); }; }; then
34694   ol_cv_berkeley_db_thread=yes
34695 else
34696   echo "$as_me: program exited with status $ac_status" >&5
34697 echo "$as_me: failed program was:" >&5
34698 sed 's/^/| /' conftest.$ac_ext >&5
34699
34700 ( exit $ac_status )
34701 ol_cv_berkeley_db_thread=no
34702 fi
34703 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
34704 fi
34705
34706         LIBS="$ol_LIBS"
34707
34708 fi
34709 echo "$as_me:$LINENO: result: $ol_cv_berkeley_db_thread" >&5
34710 echo "${ECHO_T}$ol_cv_berkeley_db_thread" >&6
34711
34712         if test $ol_cv_berkeley_db_thread != no ; then
34713
34714 cat >>confdefs.h <<\_ACEOF
34715 #define HAVE_BERKELEY_DB_THREAD 1
34716 _ACEOF
34717
34718         fi
34719
34720         fi
34721 fi
34722
34723         fi
34724
34725         if test $ol_cv_berkeley_db != no ; then
34726
34727 cat >>confdefs.h <<\_ACEOF
34728 #define HAVE_BERKELEY_DB 1
34729 _ACEOF
34730
34731
34732                 ol_link_ldbm=berkeley
34733                 ol_enable_ldbm_api=berkeley
34734
34735                 if test $ol_enable_ldbm_type = hash ; then
34736
34737 cat >>confdefs.h <<\_ACEOF
34738 #define LDBM_USE_DBHASH 1
34739 _ACEOF
34740
34741                 else
34742
34743 cat >>confdefs.h <<\_ACEOF
34744 #define LDBM_USE_DBBTREE 1
34745 _ACEOF
34746
34747                 fi
34748
34749                                                 if test $ol_cv_lib_db != yes ; then
34750                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
34751                 fi
34752         fi
34753         ;;
34754 esac
34755
34756 if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
34757         if test $ol_link_ldbm != berkeley ; then
34758                 { { echo "$as_me:$LINENO: error: BDB/HDB: BerkeleyDB not available" >&5
34759 echo "$as_me: error: BDB/HDB: BerkeleyDB not available" >&2;}
34760    { (exit 1); exit 1; }; }
34761         else
34762                 echo "$as_me:$LINENO: checking Berkeley DB version for BDB/HDB backends" >&5
34763 echo $ECHO_N "checking Berkeley DB version for BDB/HDB backends... $ECHO_C" >&6
34764 if test "${ol_cv_bdb_compat+set}" = set; then
34765   echo $ECHO_N "(cached) $ECHO_C" >&6
34766 else
34767
34768         cat >conftest.$ac_ext <<_ACEOF
34769 /* confdefs.h.  */
34770 _ACEOF
34771 cat confdefs.h >>conftest.$ac_ext
34772 cat >>conftest.$ac_ext <<_ACEOF
34773 /* end confdefs.h.  */
34774
34775 #include <db.h>
34776
34777  /* this check could be improved */
34778 #ifndef DB_VERSION_MAJOR
34779 #       define DB_VERSION_MAJOR 1
34780 #endif
34781 #ifndef DB_VERSION_MINOR
34782 #       define DB_VERSION_MINOR 0
34783 #endif
34784
34785 /* require 4.2 or later */
34786 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
34787         __db_version_compat
34788 #endif
34789
34790 _ACEOF
34791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34792   $EGREP "__db_version_compat" >/dev/null 2>&1; then
34793   ol_cv_bdb_compat=yes
34794 else
34795   ol_cv_bdb_compat=no
34796 fi
34797 rm -f conftest*
34798
34799 fi
34800 echo "$as_me:$LINENO: result: $ol_cv_bdb_compat" >&5
34801 echo "${ECHO_T}$ol_cv_bdb_compat" >&6
34802
34803
34804                 if test $ol_cv_bdb_compat != yes ; then
34805                         { { echo "$as_me:$LINENO: error: BDB/HDB: BerkeleyDB version incompatible" >&5
34806 echo "$as_me: error: BDB/HDB: BerkeleyDB version incompatible" >&2;}
34807    { (exit 1); exit 1; }; }
34808                 fi
34809         fi
34810 fi
34811
34812 if test $ol_link_ldbm = no && test $ol_enable_ldbm_type = btree ; then
34813         { echo "$as_me:$LINENO: WARNING: Could not find LDBM with BTREE support" >&5
34814 echo "$as_me: WARNING: Could not find LDBM with BTREE support" >&2;}
34815         ol_enable_ldbm_api=none
34816 fi
34817
34818 if test $ol_enable_ldbm_api = auto || test $ol_enable_ldbm_api = mdbm ; then
34819         echo "$as_me:$LINENO: checking for MDBM library" >&5
34820 echo $ECHO_N "checking for MDBM library... $ECHO_C" >&6
34821 if test "${ol_cv_lib_mdbm+set}" = set; then
34822   echo $ECHO_N "(cached) $ECHO_C" >&6
34823 else
34824         ol_LIBS="$LIBS"
34825         echo "$as_me:$LINENO: checking for mdbm_set_chain" >&5
34826 echo $ECHO_N "checking for mdbm_set_chain... $ECHO_C" >&6
34827 if test "${ac_cv_func_mdbm_set_chain+set}" = set; then
34828   echo $ECHO_N "(cached) $ECHO_C" >&6
34829 else
34830   cat >conftest.$ac_ext <<_ACEOF
34831 /* confdefs.h.  */
34832 _ACEOF
34833 cat confdefs.h >>conftest.$ac_ext
34834 cat >>conftest.$ac_ext <<_ACEOF
34835 /* end confdefs.h.  */
34836 /* Define mdbm_set_chain to an innocuous variant, in case <limits.h> declares mdbm_set_chain.
34837    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
34838 #define mdbm_set_chain innocuous_mdbm_set_chain
34839
34840 /* System header to define __stub macros and hopefully few prototypes,
34841     which can conflict with char mdbm_set_chain (); below.
34842     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34843     <limits.h> exists even on freestanding compilers.  */
34844
34845 #ifdef __STDC__
34846 # include <limits.h>
34847 #else
34848 # include <assert.h>
34849 #endif
34850
34851 #undef mdbm_set_chain
34852
34853 /* Override any gcc2 internal prototype to avoid an error.  */
34854 #ifdef __cplusplus
34855 extern "C"
34856 {
34857 #endif
34858 /* We use char because int might match the return type of a gcc2
34859    builtin and then its argument prototype would still apply.  */
34860 char mdbm_set_chain ();
34861 /* The GNU C library defines this for functions which it implements
34862     to always fail with ENOSYS.  Some functions are actually named
34863     something starting with __ and the normal name is an alias.  */
34864 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
34865 choke me
34866 #else
34867 char (*f) () = mdbm_set_chain;
34868 #endif
34869 #ifdef __cplusplus
34870 }
34871 #endif
34872
34873 int
34874 main ()
34875 {
34876 return f != mdbm_set_chain;
34877   ;
34878   return 0;
34879 }
34880 _ACEOF
34881 rm -f conftest.$ac_objext conftest$ac_exeext
34882 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34883   (eval $ac_link) 2>conftest.er1
34884   ac_status=$?
34885   grep -v '^ *+' conftest.er1 >conftest.err
34886   rm -f conftest.er1
34887   cat conftest.err >&5
34888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34889   (exit $ac_status); } &&
34890          { ac_try='test -z "$ac_c_werror_flag"
34891                          || test ! -s conftest.err'
34892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34893   (eval $ac_try) 2>&5
34894   ac_status=$?
34895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34896   (exit $ac_status); }; } &&
34897          { ac_try='test -s conftest$ac_exeext'
34898   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34899   (eval $ac_try) 2>&5
34900   ac_status=$?
34901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34902   (exit $ac_status); }; }; then
34903   ac_cv_func_mdbm_set_chain=yes
34904 else
34905   echo "$as_me: failed program was:" >&5
34906 sed 's/^/| /' conftest.$ac_ext >&5
34907
34908 ac_cv_func_mdbm_set_chain=no
34909 fi
34910 rm -f conftest.err conftest.$ac_objext \
34911       conftest$ac_exeext conftest.$ac_ext
34912 fi
34913 echo "$as_me:$LINENO: result: $ac_cv_func_mdbm_set_chain" >&5
34914 echo "${ECHO_T}$ac_cv_func_mdbm_set_chain" >&6
34915 if test $ac_cv_func_mdbm_set_chain = yes; then
34916   ol_cv_lib_mdbm=yes
34917 else
34918
34919                 echo "$as_me:$LINENO: checking for mdbm_set_chain in -lmdbm" >&5
34920 echo $ECHO_N "checking for mdbm_set_chain in -lmdbm... $ECHO_C" >&6
34921 if test "${ac_cv_lib_mdbm_mdbm_set_chain+set}" = set; then
34922   echo $ECHO_N "(cached) $ECHO_C" >&6
34923 else
34924   ac_check_lib_save_LIBS=$LIBS
34925 LIBS="-lmdbm  $LIBS"
34926 cat >conftest.$ac_ext <<_ACEOF
34927 /* confdefs.h.  */
34928 _ACEOF
34929 cat confdefs.h >>conftest.$ac_ext
34930 cat >>conftest.$ac_ext <<_ACEOF
34931 /* end confdefs.h.  */
34932
34933 /* Override any gcc2 internal prototype to avoid an error.  */
34934 #ifdef __cplusplus
34935 extern "C"
34936 #endif
34937 /* We use char because int might match the return type of a gcc2
34938    builtin and then its argument prototype would still apply.  */
34939 char mdbm_set_chain ();
34940 int
34941 main ()
34942 {
34943 mdbm_set_chain ();
34944   ;
34945   return 0;
34946 }
34947 _ACEOF
34948 rm -f conftest.$ac_objext conftest$ac_exeext
34949 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34950   (eval $ac_link) 2>conftest.er1
34951   ac_status=$?
34952   grep -v '^ *+' conftest.er1 >conftest.err
34953   rm -f conftest.er1
34954   cat conftest.err >&5
34955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34956   (exit $ac_status); } &&
34957          { ac_try='test -z "$ac_c_werror_flag"
34958                          || test ! -s conftest.err'
34959   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34960   (eval $ac_try) 2>&5
34961   ac_status=$?
34962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34963   (exit $ac_status); }; } &&
34964          { ac_try='test -s conftest$ac_exeext'
34965   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34966   (eval $ac_try) 2>&5
34967   ac_status=$?
34968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34969   (exit $ac_status); }; }; then
34970   ac_cv_lib_mdbm_mdbm_set_chain=yes
34971 else
34972   echo "$as_me: failed program was:" >&5
34973 sed 's/^/| /' conftest.$ac_ext >&5
34974
34975 ac_cv_lib_mdbm_mdbm_set_chain=no
34976 fi
34977 rm -f conftest.err conftest.$ac_objext \
34978       conftest$ac_exeext conftest.$ac_ext
34979 LIBS=$ac_check_lib_save_LIBS
34980 fi
34981 echo "$as_me:$LINENO: result: $ac_cv_lib_mdbm_mdbm_set_chain" >&5
34982 echo "${ECHO_T}$ac_cv_lib_mdbm_mdbm_set_chain" >&6
34983 if test $ac_cv_lib_mdbm_mdbm_set_chain = yes; then
34984   ol_cv_lib_mdbm=-lmdbm
34985 else
34986   ol_cv_lib_mdbm=no
34987 fi
34988
34989
34990 fi
34991
34992         LIBS="$ol_LIBS"
34993
34994 fi
34995 echo "$as_me:$LINENO: result: $ol_cv_lib_mdbm" >&5
34996 echo "${ECHO_T}$ol_cv_lib_mdbm" >&6
34997
34998
34999
35000 for ac_header in mdbm.h
35001 do
35002 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
35003 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35004   echo "$as_me:$LINENO: checking for $ac_header" >&5
35005 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35006 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35007   echo $ECHO_N "(cached) $ECHO_C" >&6
35008 fi
35009 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35010 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35011 else
35012   # Is the header compilable?
35013 echo "$as_me:$LINENO: checking $ac_header usability" >&5
35014 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
35015 cat >conftest.$ac_ext <<_ACEOF
35016 /* confdefs.h.  */
35017 _ACEOF
35018 cat confdefs.h >>conftest.$ac_ext
35019 cat >>conftest.$ac_ext <<_ACEOF
35020 /* end confdefs.h.  */
35021 $ac_includes_default
35022 #include <$ac_header>
35023 _ACEOF
35024 rm -f conftest.$ac_objext
35025 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35026   (eval $ac_compile) 2>conftest.er1
35027   ac_status=$?
35028   grep -v '^ *+' conftest.er1 >conftest.err
35029   rm -f conftest.er1
35030   cat conftest.err >&5
35031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35032   (exit $ac_status); } &&
35033          { ac_try='test -z "$ac_c_werror_flag"
35034                          || test ! -s conftest.err'
35035   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35036   (eval $ac_try) 2>&5
35037   ac_status=$?
35038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35039   (exit $ac_status); }; } &&
35040          { ac_try='test -s conftest.$ac_objext'
35041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35042   (eval $ac_try) 2>&5
35043   ac_status=$?
35044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35045   (exit $ac_status); }; }; then
35046   ac_header_compiler=yes
35047 else
35048   echo "$as_me: failed program was:" >&5
35049 sed 's/^/| /' conftest.$ac_ext >&5
35050
35051 ac_header_compiler=no
35052 fi
35053 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35054 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
35055 echo "${ECHO_T}$ac_header_compiler" >&6
35056
35057 # Is the header present?
35058 echo "$as_me:$LINENO: checking $ac_header presence" >&5
35059 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
35060 cat >conftest.$ac_ext <<_ACEOF
35061 /* confdefs.h.  */
35062 _ACEOF
35063 cat confdefs.h >>conftest.$ac_ext
35064 cat >>conftest.$ac_ext <<_ACEOF
35065 /* end confdefs.h.  */
35066 #include <$ac_header>
35067 _ACEOF
35068 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
35069   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
35070   ac_status=$?
35071   grep -v '^ *+' conftest.er1 >conftest.err
35072   rm -f conftest.er1
35073   cat conftest.err >&5
35074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35075   (exit $ac_status); } >/dev/null; then
35076   if test -s conftest.err; then
35077     ac_cpp_err=$ac_c_preproc_warn_flag
35078     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
35079   else
35080     ac_cpp_err=
35081   fi
35082 else
35083   ac_cpp_err=yes
35084 fi
35085 if test -z "$ac_cpp_err"; then
35086   ac_header_preproc=yes
35087 else
35088   echo "$as_me: failed program was:" >&5
35089 sed 's/^/| /' conftest.$ac_ext >&5
35090
35091   ac_header_preproc=no
35092 fi
35093 rm -f conftest.err conftest.$ac_ext
35094 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
35095 echo "${ECHO_T}$ac_header_preproc" >&6
35096
35097 # So?  What about this header?
35098 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
35099   yes:no: )
35100     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
35101 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35102     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
35103 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
35104     ac_header_preproc=yes
35105     ;;
35106   no:yes:* )
35107     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
35108 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35109     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
35110 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
35111     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
35112 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
35113     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
35114 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
35115     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
35116 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35117     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
35118 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
35119     (
35120       cat <<\_ASBOX
35121 ## --------------------------------------------- ##
35122 ## Report this to <http://www.openldap.org/its/> ##
35123 ## --------------------------------------------- ##
35124 _ASBOX
35125     ) |
35126       sed "s/^/$as_me: WARNING:     /" >&2
35127     ;;
35128 esac
35129 echo "$as_me:$LINENO: checking for $ac_header" >&5
35130 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35131 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35132   echo $ECHO_N "(cached) $ECHO_C" >&6
35133 else
35134   eval "$as_ac_Header=\$ac_header_preproc"
35135 fi
35136 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35137 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35138
35139 fi
35140 if test `eval echo '${'$as_ac_Header'}'` = yes; then
35141   cat >>confdefs.h <<_ACEOF
35142 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
35143 _ACEOF
35144
35145 fi
35146
35147 done
35148
35149  echo "$as_me:$LINENO: checking for db" >&5
35150 echo $ECHO_N "checking for db... $ECHO_C" >&6
35151 if test "${ol_cv_mdbm+set}" = set; then
35152   echo $ECHO_N "(cached) $ECHO_C" >&6
35153 else
35154
35155         if test $ol_cv_lib_mdbm = no || test $ac_cv_header_mdbm_h = no ; then
35156                 ol_cv_mdbm=no
35157         else
35158                 ol_cv_mdbm=yes
35159         fi
35160
35161 fi
35162 echo "$as_me:$LINENO: result: $ol_cv_mdbm" >&5
35163 echo "${ECHO_T}$ol_cv_mdbm" >&6
35164  if test $ol_cv_mdbm = yes ; then
35165
35166 cat >>confdefs.h <<\_ACEOF
35167 #define HAVE_MDBM 1
35168 _ACEOF
35169
35170  fi
35171
35172
35173         if test $ol_cv_mdbm = yes ; then
35174                 ol_link_ldbm=mdbm
35175                 ol_enable_ldbm_api=mdbm
35176                 if test $ol_cv_lib_mdbm != yes ; then
35177                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
35178                 fi
35179         fi
35180 fi
35181
35182 if test $ol_enable_ldbm_api = auto || test $ol_enable_ldbm_api = gdbm ; then
35183         echo "$as_me:$LINENO: checking for GDBM library" >&5
35184 echo $ECHO_N "checking for GDBM library... $ECHO_C" >&6
35185 if test "${ol_cv_lib_gdbm+set}" = set; then
35186   echo $ECHO_N "(cached) $ECHO_C" >&6
35187 else
35188         ol_LIBS="$LIBS"
35189         echo "$as_me:$LINENO: checking for gdbm_open" >&5
35190 echo $ECHO_N "checking for gdbm_open... $ECHO_C" >&6
35191 if test "${ac_cv_func_gdbm_open+set}" = set; then
35192   echo $ECHO_N "(cached) $ECHO_C" >&6
35193 else
35194   cat >conftest.$ac_ext <<_ACEOF
35195 /* confdefs.h.  */
35196 _ACEOF
35197 cat confdefs.h >>conftest.$ac_ext
35198 cat >>conftest.$ac_ext <<_ACEOF
35199 /* end confdefs.h.  */
35200 /* Define gdbm_open to an innocuous variant, in case <limits.h> declares gdbm_open.
35201    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
35202 #define gdbm_open innocuous_gdbm_open
35203
35204 /* System header to define __stub macros and hopefully few prototypes,
35205     which can conflict with char gdbm_open (); below.
35206     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35207     <limits.h> exists even on freestanding compilers.  */
35208
35209 #ifdef __STDC__
35210 # include <limits.h>
35211 #else
35212 # include <assert.h>
35213 #endif
35214
35215 #undef gdbm_open
35216
35217 /* Override any gcc2 internal prototype to avoid an error.  */
35218 #ifdef __cplusplus
35219 extern "C"
35220 {
35221 #endif
35222 /* We use char because int might match the return type of a gcc2
35223    builtin and then its argument prototype would still apply.  */
35224 char gdbm_open ();
35225 /* The GNU C library defines this for functions which it implements
35226     to always fail with ENOSYS.  Some functions are actually named
35227     something starting with __ and the normal name is an alias.  */
35228 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
35229 choke me
35230 #else
35231 char (*f) () = gdbm_open;
35232 #endif
35233 #ifdef __cplusplus
35234 }
35235 #endif
35236
35237 int
35238 main ()
35239 {
35240 return f != gdbm_open;
35241   ;
35242   return 0;
35243 }
35244 _ACEOF
35245 rm -f conftest.$ac_objext conftest$ac_exeext
35246 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35247   (eval $ac_link) 2>conftest.er1
35248   ac_status=$?
35249   grep -v '^ *+' conftest.er1 >conftest.err
35250   rm -f conftest.er1
35251   cat conftest.err >&5
35252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35253   (exit $ac_status); } &&
35254          { ac_try='test -z "$ac_c_werror_flag"
35255                          || test ! -s conftest.err'
35256   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35257   (eval $ac_try) 2>&5
35258   ac_status=$?
35259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35260   (exit $ac_status); }; } &&
35261          { ac_try='test -s conftest$ac_exeext'
35262   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35263   (eval $ac_try) 2>&5
35264   ac_status=$?
35265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35266   (exit $ac_status); }; }; then
35267   ac_cv_func_gdbm_open=yes
35268 else
35269   echo "$as_me: failed program was:" >&5
35270 sed 's/^/| /' conftest.$ac_ext >&5
35271
35272 ac_cv_func_gdbm_open=no
35273 fi
35274 rm -f conftest.err conftest.$ac_objext \
35275       conftest$ac_exeext conftest.$ac_ext
35276 fi
35277 echo "$as_me:$LINENO: result: $ac_cv_func_gdbm_open" >&5
35278 echo "${ECHO_T}$ac_cv_func_gdbm_open" >&6
35279 if test $ac_cv_func_gdbm_open = yes; then
35280   ol_cv_lib_gdbm=yes
35281 else
35282
35283                 echo "$as_me:$LINENO: checking for gdbm_open in -lgdbm" >&5
35284 echo $ECHO_N "checking for gdbm_open in -lgdbm... $ECHO_C" >&6
35285 if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then
35286   echo $ECHO_N "(cached) $ECHO_C" >&6
35287 else
35288   ac_check_lib_save_LIBS=$LIBS
35289 LIBS="-lgdbm  $LIBS"
35290 cat >conftest.$ac_ext <<_ACEOF
35291 /* confdefs.h.  */
35292 _ACEOF
35293 cat confdefs.h >>conftest.$ac_ext
35294 cat >>conftest.$ac_ext <<_ACEOF
35295 /* end confdefs.h.  */
35296
35297 /* Override any gcc2 internal prototype to avoid an error.  */
35298 #ifdef __cplusplus
35299 extern "C"
35300 #endif
35301 /* We use char because int might match the return type of a gcc2
35302    builtin and then its argument prototype would still apply.  */
35303 char gdbm_open ();
35304 int
35305 main ()
35306 {
35307 gdbm_open ();
35308   ;
35309   return 0;
35310 }
35311 _ACEOF
35312 rm -f conftest.$ac_objext conftest$ac_exeext
35313 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35314   (eval $ac_link) 2>conftest.er1
35315   ac_status=$?
35316   grep -v '^ *+' conftest.er1 >conftest.err
35317   rm -f conftest.er1
35318   cat conftest.err >&5
35319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35320   (exit $ac_status); } &&
35321          { ac_try='test -z "$ac_c_werror_flag"
35322                          || test ! -s conftest.err'
35323   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35324   (eval $ac_try) 2>&5
35325   ac_status=$?
35326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35327   (exit $ac_status); }; } &&
35328          { ac_try='test -s conftest$ac_exeext'
35329   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35330   (eval $ac_try) 2>&5
35331   ac_status=$?
35332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35333   (exit $ac_status); }; }; then
35334   ac_cv_lib_gdbm_gdbm_open=yes
35335 else
35336   echo "$as_me: failed program was:" >&5
35337 sed 's/^/| /' conftest.$ac_ext >&5
35338
35339 ac_cv_lib_gdbm_gdbm_open=no
35340 fi
35341 rm -f conftest.err conftest.$ac_objext \
35342       conftest$ac_exeext conftest.$ac_ext
35343 LIBS=$ac_check_lib_save_LIBS
35344 fi
35345 echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_gdbm_open" >&5
35346 echo "${ECHO_T}$ac_cv_lib_gdbm_gdbm_open" >&6
35347 if test $ac_cv_lib_gdbm_gdbm_open = yes; then
35348   ol_cv_lib_gdbm=-lgdbm
35349 else
35350   ol_cv_lib_gdbm=no
35351 fi
35352
35353
35354 fi
35355
35356         LIBS="$ol_LIBS"
35357
35358 fi
35359 echo "$as_me:$LINENO: result: $ol_cv_lib_gdbm" >&5
35360 echo "${ECHO_T}$ol_cv_lib_gdbm" >&6
35361
35362
35363
35364 for ac_header in gdbm.h
35365 do
35366 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
35367 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35368   echo "$as_me:$LINENO: checking for $ac_header" >&5
35369 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35370 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35371   echo $ECHO_N "(cached) $ECHO_C" >&6
35372 fi
35373 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35374 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35375 else
35376   # Is the header compilable?
35377 echo "$as_me:$LINENO: checking $ac_header usability" >&5
35378 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
35379 cat >conftest.$ac_ext <<_ACEOF
35380 /* confdefs.h.  */
35381 _ACEOF
35382 cat confdefs.h >>conftest.$ac_ext
35383 cat >>conftest.$ac_ext <<_ACEOF
35384 /* end confdefs.h.  */
35385 $ac_includes_default
35386 #include <$ac_header>
35387 _ACEOF
35388 rm -f conftest.$ac_objext
35389 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35390   (eval $ac_compile) 2>conftest.er1
35391   ac_status=$?
35392   grep -v '^ *+' conftest.er1 >conftest.err
35393   rm -f conftest.er1
35394   cat conftest.err >&5
35395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35396   (exit $ac_status); } &&
35397          { ac_try='test -z "$ac_c_werror_flag"
35398                          || test ! -s conftest.err'
35399   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35400   (eval $ac_try) 2>&5
35401   ac_status=$?
35402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35403   (exit $ac_status); }; } &&
35404          { ac_try='test -s conftest.$ac_objext'
35405   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35406   (eval $ac_try) 2>&5
35407   ac_status=$?
35408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35409   (exit $ac_status); }; }; then
35410   ac_header_compiler=yes
35411 else
35412   echo "$as_me: failed program was:" >&5
35413 sed 's/^/| /' conftest.$ac_ext >&5
35414
35415 ac_header_compiler=no
35416 fi
35417 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35418 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
35419 echo "${ECHO_T}$ac_header_compiler" >&6
35420
35421 # Is the header present?
35422 echo "$as_me:$LINENO: checking $ac_header presence" >&5
35423 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
35424 cat >conftest.$ac_ext <<_ACEOF
35425 /* confdefs.h.  */
35426 _ACEOF
35427 cat confdefs.h >>conftest.$ac_ext
35428 cat >>conftest.$ac_ext <<_ACEOF
35429 /* end confdefs.h.  */
35430 #include <$ac_header>
35431 _ACEOF
35432 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
35433   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
35434   ac_status=$?
35435   grep -v '^ *+' conftest.er1 >conftest.err
35436   rm -f conftest.er1
35437   cat conftest.err >&5
35438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35439   (exit $ac_status); } >/dev/null; then
35440   if test -s conftest.err; then
35441     ac_cpp_err=$ac_c_preproc_warn_flag
35442     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
35443   else
35444     ac_cpp_err=
35445   fi
35446 else
35447   ac_cpp_err=yes
35448 fi
35449 if test -z "$ac_cpp_err"; then
35450   ac_header_preproc=yes
35451 else
35452   echo "$as_me: failed program was:" >&5
35453 sed 's/^/| /' conftest.$ac_ext >&5
35454
35455   ac_header_preproc=no
35456 fi
35457 rm -f conftest.err conftest.$ac_ext
35458 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
35459 echo "${ECHO_T}$ac_header_preproc" >&6
35460
35461 # So?  What about this header?
35462 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
35463   yes:no: )
35464     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
35465 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35466     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
35467 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
35468     ac_header_preproc=yes
35469     ;;
35470   no:yes:* )
35471     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
35472 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35473     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
35474 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
35475     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
35476 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
35477     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
35478 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
35479     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
35480 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35481     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
35482 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
35483     (
35484       cat <<\_ASBOX
35485 ## --------------------------------------------- ##
35486 ## Report this to <http://www.openldap.org/its/> ##
35487 ## --------------------------------------------- ##
35488 _ASBOX
35489     ) |
35490       sed "s/^/$as_me: WARNING:     /" >&2
35491     ;;
35492 esac
35493 echo "$as_me:$LINENO: checking for $ac_header" >&5
35494 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35495 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35496   echo $ECHO_N "(cached) $ECHO_C" >&6
35497 else
35498   eval "$as_ac_Header=\$ac_header_preproc"
35499 fi
35500 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35501 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35502
35503 fi
35504 if test `eval echo '${'$as_ac_Header'}'` = yes; then
35505   cat >>confdefs.h <<_ACEOF
35506 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
35507 _ACEOF
35508
35509 fi
35510
35511 done
35512
35513  echo "$as_me:$LINENO: checking for db" >&5
35514 echo $ECHO_N "checking for db... $ECHO_C" >&6
35515 if test "${ol_cv_gdbm+set}" = set; then
35516   echo $ECHO_N "(cached) $ECHO_C" >&6
35517 else
35518
35519         if test $ol_cv_lib_gdbm = no || test $ac_cv_header_gdbm_h = no ; then
35520                 ol_cv_gdbm=no
35521         else
35522                 ol_cv_gdbm=yes
35523         fi
35524
35525 fi
35526 echo "$as_me:$LINENO: result: $ol_cv_gdbm" >&5
35527 echo "${ECHO_T}$ol_cv_gdbm" >&6
35528  if test $ol_cv_gdbm = yes ; then
35529
35530 cat >>confdefs.h <<\_ACEOF
35531 #define HAVE_GDBM 1
35532 _ACEOF
35533
35534  fi
35535
35536
35537         if test $ol_cv_gdbm = yes ; then
35538                 ol_link_ldbm=gdbm
35539                 ol_enable_ldbm_api=gdbm
35540
35541                 if test $ol_cv_lib_gdbm != yes ; then
35542                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
35543                 fi
35544         fi
35545 fi
35546
35547 if test $ol_enable_ldbm_api = ndbm ; then
35548         echo "$as_me:$LINENO: checking for NDBM library" >&5
35549 echo $ECHO_N "checking for NDBM library... $ECHO_C" >&6
35550 if test "${ol_cv_lib_ndbm+set}" = set; then
35551   echo $ECHO_N "(cached) $ECHO_C" >&6
35552 else
35553         ol_LIBS="$LIBS"
35554         echo "$as_me:$LINENO: checking for dbm_open" >&5
35555 echo $ECHO_N "checking for dbm_open... $ECHO_C" >&6
35556 if test "${ac_cv_func_dbm_open+set}" = set; then
35557   echo $ECHO_N "(cached) $ECHO_C" >&6
35558 else
35559   cat >conftest.$ac_ext <<_ACEOF
35560 /* confdefs.h.  */
35561 _ACEOF
35562 cat confdefs.h >>conftest.$ac_ext
35563 cat >>conftest.$ac_ext <<_ACEOF
35564 /* end confdefs.h.  */
35565 /* Define dbm_open to an innocuous variant, in case <limits.h> declares dbm_open.
35566    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
35567 #define dbm_open innocuous_dbm_open
35568
35569 /* System header to define __stub macros and hopefully few prototypes,
35570     which can conflict with char dbm_open (); below.
35571     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35572     <limits.h> exists even on freestanding compilers.  */
35573
35574 #ifdef __STDC__
35575 # include <limits.h>
35576 #else
35577 # include <assert.h>
35578 #endif
35579
35580 #undef dbm_open
35581
35582 /* Override any gcc2 internal prototype to avoid an error.  */
35583 #ifdef __cplusplus
35584 extern "C"
35585 {
35586 #endif
35587 /* We use char because int might match the return type of a gcc2
35588    builtin and then its argument prototype would still apply.  */
35589 char dbm_open ();
35590 /* The GNU C library defines this for functions which it implements
35591     to always fail with ENOSYS.  Some functions are actually named
35592     something starting with __ and the normal name is an alias.  */
35593 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
35594 choke me
35595 #else
35596 char (*f) () = dbm_open;
35597 #endif
35598 #ifdef __cplusplus
35599 }
35600 #endif
35601
35602 int
35603 main ()
35604 {
35605 return f != dbm_open;
35606   ;
35607   return 0;
35608 }
35609 _ACEOF
35610 rm -f conftest.$ac_objext conftest$ac_exeext
35611 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35612   (eval $ac_link) 2>conftest.er1
35613   ac_status=$?
35614   grep -v '^ *+' conftest.er1 >conftest.err
35615   rm -f conftest.er1
35616   cat conftest.err >&5
35617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35618   (exit $ac_status); } &&
35619          { ac_try='test -z "$ac_c_werror_flag"
35620                          || test ! -s conftest.err'
35621   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35622   (eval $ac_try) 2>&5
35623   ac_status=$?
35624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35625   (exit $ac_status); }; } &&
35626          { ac_try='test -s conftest$ac_exeext'
35627   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35628   (eval $ac_try) 2>&5
35629   ac_status=$?
35630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35631   (exit $ac_status); }; }; then
35632   ac_cv_func_dbm_open=yes
35633 else
35634   echo "$as_me: failed program was:" >&5
35635 sed 's/^/| /' conftest.$ac_ext >&5
35636
35637 ac_cv_func_dbm_open=no
35638 fi
35639 rm -f conftest.err conftest.$ac_objext \
35640       conftest$ac_exeext conftest.$ac_ext
35641 fi
35642 echo "$as_me:$LINENO: result: $ac_cv_func_dbm_open" >&5
35643 echo "${ECHO_T}$ac_cv_func_dbm_open" >&6
35644 if test $ac_cv_func_dbm_open = yes; then
35645   ol_cv_lib_ndbm=yes
35646 else
35647
35648                 echo "$as_me:$LINENO: checking for dbm_open in -lndbm" >&5
35649 echo $ECHO_N "checking for dbm_open in -lndbm... $ECHO_C" >&6
35650 if test "${ac_cv_lib_ndbm_dbm_open+set}" = set; then
35651   echo $ECHO_N "(cached) $ECHO_C" >&6
35652 else
35653   ac_check_lib_save_LIBS=$LIBS
35654 LIBS="-lndbm  $LIBS"
35655 cat >conftest.$ac_ext <<_ACEOF
35656 /* confdefs.h.  */
35657 _ACEOF
35658 cat confdefs.h >>conftest.$ac_ext
35659 cat >>conftest.$ac_ext <<_ACEOF
35660 /* end confdefs.h.  */
35661
35662 /* Override any gcc2 internal prototype to avoid an error.  */
35663 #ifdef __cplusplus
35664 extern "C"
35665 #endif
35666 /* We use char because int might match the return type of a gcc2
35667    builtin and then its argument prototype would still apply.  */
35668 char dbm_open ();
35669 int
35670 main ()
35671 {
35672 dbm_open ();
35673   ;
35674   return 0;
35675 }
35676 _ACEOF
35677 rm -f conftest.$ac_objext conftest$ac_exeext
35678 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35679   (eval $ac_link) 2>conftest.er1
35680   ac_status=$?
35681   grep -v '^ *+' conftest.er1 >conftest.err
35682   rm -f conftest.er1
35683   cat conftest.err >&5
35684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35685   (exit $ac_status); } &&
35686          { ac_try='test -z "$ac_c_werror_flag"
35687                          || test ! -s conftest.err'
35688   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35689   (eval $ac_try) 2>&5
35690   ac_status=$?
35691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35692   (exit $ac_status); }; } &&
35693          { ac_try='test -s conftest$ac_exeext'
35694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35695   (eval $ac_try) 2>&5
35696   ac_status=$?
35697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35698   (exit $ac_status); }; }; then
35699   ac_cv_lib_ndbm_dbm_open=yes
35700 else
35701   echo "$as_me: failed program was:" >&5
35702 sed 's/^/| /' conftest.$ac_ext >&5
35703
35704 ac_cv_lib_ndbm_dbm_open=no
35705 fi
35706 rm -f conftest.err conftest.$ac_objext \
35707       conftest$ac_exeext conftest.$ac_ext
35708 LIBS=$ac_check_lib_save_LIBS
35709 fi
35710 echo "$as_me:$LINENO: result: $ac_cv_lib_ndbm_dbm_open" >&5
35711 echo "${ECHO_T}$ac_cv_lib_ndbm_dbm_open" >&6
35712 if test $ac_cv_lib_ndbm_dbm_open = yes; then
35713   ol_cv_lib_ndbm=-lndbm
35714 else
35715
35716                         echo "$as_me:$LINENO: checking for dbm_open in -ldbm" >&5
35717 echo $ECHO_N "checking for dbm_open in -ldbm... $ECHO_C" >&6
35718 if test "${ac_cv_lib_dbm_dbm_open+set}" = set; then
35719   echo $ECHO_N "(cached) $ECHO_C" >&6
35720 else
35721   ac_check_lib_save_LIBS=$LIBS
35722 LIBS="-ldbm  $LIBS"
35723 cat >conftest.$ac_ext <<_ACEOF
35724 /* confdefs.h.  */
35725 _ACEOF
35726 cat confdefs.h >>conftest.$ac_ext
35727 cat >>conftest.$ac_ext <<_ACEOF
35728 /* end confdefs.h.  */
35729
35730 /* Override any gcc2 internal prototype to avoid an error.  */
35731 #ifdef __cplusplus
35732 extern "C"
35733 #endif
35734 /* We use char because int might match the return type of a gcc2
35735    builtin and then its argument prototype would still apply.  */
35736 char dbm_open ();
35737 int
35738 main ()
35739 {
35740 dbm_open ();
35741   ;
35742   return 0;
35743 }
35744 _ACEOF
35745 rm -f conftest.$ac_objext conftest$ac_exeext
35746 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35747   (eval $ac_link) 2>conftest.er1
35748   ac_status=$?
35749   grep -v '^ *+' conftest.er1 >conftest.err
35750   rm -f conftest.er1
35751   cat conftest.err >&5
35752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35753   (exit $ac_status); } &&
35754          { ac_try='test -z "$ac_c_werror_flag"
35755                          || test ! -s conftest.err'
35756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35757   (eval $ac_try) 2>&5
35758   ac_status=$?
35759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35760   (exit $ac_status); }; } &&
35761          { ac_try='test -s conftest$ac_exeext'
35762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35763   (eval $ac_try) 2>&5
35764   ac_status=$?
35765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35766   (exit $ac_status); }; }; then
35767   ac_cv_lib_dbm_dbm_open=yes
35768 else
35769   echo "$as_me: failed program was:" >&5
35770 sed 's/^/| /' conftest.$ac_ext >&5
35771
35772 ac_cv_lib_dbm_dbm_open=no
35773 fi
35774 rm -f conftest.err conftest.$ac_objext \
35775       conftest$ac_exeext conftest.$ac_ext
35776 LIBS=$ac_check_lib_save_LIBS
35777 fi
35778 echo "$as_me:$LINENO: result: $ac_cv_lib_dbm_dbm_open" >&5
35779 echo "${ECHO_T}$ac_cv_lib_dbm_dbm_open" >&6
35780 if test $ac_cv_lib_dbm_dbm_open = yes; then
35781   ol_cv_lib_ndbm=-ldbm
35782 else
35783   ol_cv_lib_ndbm=no
35784 fi
35785
35786 fi
35787
35788
35789 fi
35790
35791         LIBS="$ol_LIBS"
35792
35793 fi
35794 echo "$as_me:$LINENO: result: $ol_cv_lib_ndbm" >&5
35795 echo "${ECHO_T}$ol_cv_lib_ndbm" >&6
35796
35797
35798
35799 for ac_header in ndbm.h
35800 do
35801 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
35802 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35803   echo "$as_me:$LINENO: checking for $ac_header" >&5
35804 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35805 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35806   echo $ECHO_N "(cached) $ECHO_C" >&6
35807 fi
35808 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35809 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35810 else
35811   # Is the header compilable?
35812 echo "$as_me:$LINENO: checking $ac_header usability" >&5
35813 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
35814 cat >conftest.$ac_ext <<_ACEOF
35815 /* confdefs.h.  */
35816 _ACEOF
35817 cat confdefs.h >>conftest.$ac_ext
35818 cat >>conftest.$ac_ext <<_ACEOF
35819 /* end confdefs.h.  */
35820 $ac_includes_default
35821 #include <$ac_header>
35822 _ACEOF
35823 rm -f conftest.$ac_objext
35824 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35825   (eval $ac_compile) 2>conftest.er1
35826   ac_status=$?
35827   grep -v '^ *+' conftest.er1 >conftest.err
35828   rm -f conftest.er1
35829   cat conftest.err >&5
35830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35831   (exit $ac_status); } &&
35832          { ac_try='test -z "$ac_c_werror_flag"
35833                          || test ! -s conftest.err'
35834   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35835   (eval $ac_try) 2>&5
35836   ac_status=$?
35837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35838   (exit $ac_status); }; } &&
35839          { ac_try='test -s conftest.$ac_objext'
35840   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35841   (eval $ac_try) 2>&5
35842   ac_status=$?
35843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35844   (exit $ac_status); }; }; then
35845   ac_header_compiler=yes
35846 else
35847   echo "$as_me: failed program was:" >&5
35848 sed 's/^/| /' conftest.$ac_ext >&5
35849
35850 ac_header_compiler=no
35851 fi
35852 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35853 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
35854 echo "${ECHO_T}$ac_header_compiler" >&6
35855
35856 # Is the header present?
35857 echo "$as_me:$LINENO: checking $ac_header presence" >&5
35858 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
35859 cat >conftest.$ac_ext <<_ACEOF
35860 /* confdefs.h.  */
35861 _ACEOF
35862 cat confdefs.h >>conftest.$ac_ext
35863 cat >>conftest.$ac_ext <<_ACEOF
35864 /* end confdefs.h.  */
35865 #include <$ac_header>
35866 _ACEOF
35867 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
35868   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
35869   ac_status=$?
35870   grep -v '^ *+' conftest.er1 >conftest.err
35871   rm -f conftest.er1
35872   cat conftest.err >&5
35873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35874   (exit $ac_status); } >/dev/null; then
35875   if test -s conftest.err; then
35876     ac_cpp_err=$ac_c_preproc_warn_flag
35877     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
35878   else
35879     ac_cpp_err=
35880   fi
35881 else
35882   ac_cpp_err=yes
35883 fi
35884 if test -z "$ac_cpp_err"; then
35885   ac_header_preproc=yes
35886 else
35887   echo "$as_me: failed program was:" >&5
35888 sed 's/^/| /' conftest.$ac_ext >&5
35889
35890   ac_header_preproc=no
35891 fi
35892 rm -f conftest.err conftest.$ac_ext
35893 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
35894 echo "${ECHO_T}$ac_header_preproc" >&6
35895
35896 # So?  What about this header?
35897 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
35898   yes:no: )
35899     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
35900 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35901     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
35902 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
35903     ac_header_preproc=yes
35904     ;;
35905   no:yes:* )
35906     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
35907 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35908     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
35909 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
35910     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
35911 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
35912     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
35913 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
35914     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
35915 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35916     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
35917 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
35918     (
35919       cat <<\_ASBOX
35920 ## --------------------------------------------- ##
35921 ## Report this to <http://www.openldap.org/its/> ##
35922 ## --------------------------------------------- ##
35923 _ASBOX
35924     ) |
35925       sed "s/^/$as_me: WARNING:     /" >&2
35926     ;;
35927 esac
35928 echo "$as_me:$LINENO: checking for $ac_header" >&5
35929 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35930 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35931   echo $ECHO_N "(cached) $ECHO_C" >&6
35932 else
35933   eval "$as_ac_Header=\$ac_header_preproc"
35934 fi
35935 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35936 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35937
35938 fi
35939 if test `eval echo '${'$as_ac_Header'}'` = yes; then
35940   cat >>confdefs.h <<_ACEOF
35941 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
35942 _ACEOF
35943
35944 fi
35945
35946 done
35947
35948  echo "$as_me:$LINENO: checking for db" >&5
35949 echo $ECHO_N "checking for db... $ECHO_C" >&6
35950 if test "${ol_cv_ndbm+set}" = set; then
35951   echo $ECHO_N "(cached) $ECHO_C" >&6
35952 else
35953
35954         if test $ol_cv_lib_ndbm = no || test $ac_cv_header_ndbm_h = no ; then
35955                 ol_cv_ndbm=no
35956         else
35957                 ol_cv_ndbm=yes
35958         fi
35959
35960 fi
35961 echo "$as_me:$LINENO: result: $ol_cv_ndbm" >&5
35962 echo "${ECHO_T}$ol_cv_ndbm" >&6
35963  if test $ol_cv_ndbm = yes ; then
35964
35965 cat >>confdefs.h <<\_ACEOF
35966 #define HAVE_NDBM 1
35967 _ACEOF
35968
35969  fi
35970
35971
35972         if test $ol_cv_ndbm = yes ; then
35973                 ol_link_ldbm=ndbm
35974                 ol_enable_ldbm_api=ndbm
35975
35976                 if test $ol_cv_lib_ndbm != yes ; then
35977                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
35978                 fi
35979         fi
35980 fi
35981
35982 if test $ol_link_ldbm = no && test $ol_enable_ldbm != no ; then
35983         { { echo "$as_me:$LINENO: error: could not find suitable LDBM backend" >&5
35984 echo "$as_me: error: could not find suitable LDBM backend" >&2;}
35985    { (exit 1); exit 1; }; }
35986 fi
35987
35988 if test $ol_enable_bdb = yes ||
35989    test $ol_enable_hdb = yes ||
35990    test $ol_enable_ldbm = yes ; then
35991         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
35992 fi
35993
35994
35995 if test $ol_enable_dynamic = yes && test $enable_shared = yes ; then
35996         BUILD_LIBS_DYNAMIC=shared
35997
35998 cat >>confdefs.h <<\_ACEOF
35999 #define LDAP_LIBS_DYNAMIC 1
36000 _ACEOF
36001
36002         LTSTATIC=""
36003 else
36004         BUILD_LIBS_DYNAMIC=static
36005         LTSTATIC="-static"
36006 fi
36007
36008 if test $ol_enable_wrappers != no ; then
36009
36010 for ac_header in tcpd.h
36011 do
36012 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
36013 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36014   echo "$as_me:$LINENO: checking for $ac_header" >&5
36015 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36016 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36017   echo $ECHO_N "(cached) $ECHO_C" >&6
36018 fi
36019 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36020 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36021 else
36022   # Is the header compilable?
36023 echo "$as_me:$LINENO: checking $ac_header usability" >&5
36024 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
36025 cat >conftest.$ac_ext <<_ACEOF
36026 /* confdefs.h.  */
36027 _ACEOF
36028 cat confdefs.h >>conftest.$ac_ext
36029 cat >>conftest.$ac_ext <<_ACEOF
36030 /* end confdefs.h.  */
36031 $ac_includes_default
36032 #include <$ac_header>
36033 _ACEOF
36034 rm -f conftest.$ac_objext
36035 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36036   (eval $ac_compile) 2>conftest.er1
36037   ac_status=$?
36038   grep -v '^ *+' conftest.er1 >conftest.err
36039   rm -f conftest.er1
36040   cat conftest.err >&5
36041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36042   (exit $ac_status); } &&
36043          { ac_try='test -z "$ac_c_werror_flag"
36044                          || test ! -s conftest.err'
36045   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36046   (eval $ac_try) 2>&5
36047   ac_status=$?
36048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36049   (exit $ac_status); }; } &&
36050          { ac_try='test -s conftest.$ac_objext'
36051   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36052   (eval $ac_try) 2>&5
36053   ac_status=$?
36054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36055   (exit $ac_status); }; }; then
36056   ac_header_compiler=yes
36057 else
36058   echo "$as_me: failed program was:" >&5
36059 sed 's/^/| /' conftest.$ac_ext >&5
36060
36061 ac_header_compiler=no
36062 fi
36063 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36064 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
36065 echo "${ECHO_T}$ac_header_compiler" >&6
36066
36067 # Is the header present?
36068 echo "$as_me:$LINENO: checking $ac_header presence" >&5
36069 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
36070 cat >conftest.$ac_ext <<_ACEOF
36071 /* confdefs.h.  */
36072 _ACEOF
36073 cat confdefs.h >>conftest.$ac_ext
36074 cat >>conftest.$ac_ext <<_ACEOF
36075 /* end confdefs.h.  */
36076 #include <$ac_header>
36077 _ACEOF
36078 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
36079   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
36080   ac_status=$?
36081   grep -v '^ *+' conftest.er1 >conftest.err
36082   rm -f conftest.er1
36083   cat conftest.err >&5
36084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36085   (exit $ac_status); } >/dev/null; then
36086   if test -s conftest.err; then
36087     ac_cpp_err=$ac_c_preproc_warn_flag
36088     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
36089   else
36090     ac_cpp_err=
36091   fi
36092 else
36093   ac_cpp_err=yes
36094 fi
36095 if test -z "$ac_cpp_err"; then
36096   ac_header_preproc=yes
36097 else
36098   echo "$as_me: failed program was:" >&5
36099 sed 's/^/| /' conftest.$ac_ext >&5
36100
36101   ac_header_preproc=no
36102 fi
36103 rm -f conftest.err conftest.$ac_ext
36104 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
36105 echo "${ECHO_T}$ac_header_preproc" >&6
36106
36107 # So?  What about this header?
36108 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
36109   yes:no: )
36110     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
36111 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
36112     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
36113 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
36114     ac_header_preproc=yes
36115     ;;
36116   no:yes:* )
36117     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
36118 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
36119     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
36120 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
36121     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
36122 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
36123     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
36124 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
36125     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
36126 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
36127     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
36128 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
36129     (
36130       cat <<\_ASBOX
36131 ## --------------------------------------------- ##
36132 ## Report this to <http://www.openldap.org/its/> ##
36133 ## --------------------------------------------- ##
36134 _ASBOX
36135     ) |
36136       sed "s/^/$as_me: WARNING:     /" >&2
36137     ;;
36138 esac
36139 echo "$as_me:$LINENO: checking for $ac_header" >&5
36140 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36141 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36142   echo $ECHO_N "(cached) $ECHO_C" >&6
36143 else
36144   eval "$as_ac_Header=\$ac_header_preproc"
36145 fi
36146 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36147 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36148
36149 fi
36150 if test `eval echo '${'$as_ac_Header'}'` = yes; then
36151   cat >>confdefs.h <<_ACEOF
36152 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
36153 _ACEOF
36154
36155                 echo "$as_me:$LINENO: checking for TCP wrappers library" >&5
36156 echo $ECHO_N "checking for TCP wrappers library... $ECHO_C" >&6
36157                 save_LIBS="$LIBS"
36158                 LIBS="$LIBS -lwrap"
36159                 cat >conftest.$ac_ext <<_ACEOF
36160 /* confdefs.h.  */
36161 _ACEOF
36162 cat confdefs.h >>conftest.$ac_ext
36163 cat >>conftest.$ac_ext <<_ACEOF
36164 /* end confdefs.h.  */
36165
36166 #include <tcpd.h>
36167 int allow_severity = 0;
36168 int deny_severity  = 0;
36169
36170 struct request_info *req;
36171
36172 int
36173 main ()
36174 {
36175
36176 hosts_access(req)
36177
36178   ;
36179   return 0;
36180 }
36181 _ACEOF
36182 rm -f conftest.$ac_objext conftest$ac_exeext
36183 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36184   (eval $ac_link) 2>conftest.er1
36185   ac_status=$?
36186   grep -v '^ *+' conftest.er1 >conftest.err
36187   rm -f conftest.er1
36188   cat conftest.err >&5
36189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36190   (exit $ac_status); } &&
36191          { ac_try='test -z "$ac_c_werror_flag"
36192                          || test ! -s conftest.err'
36193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36194   (eval $ac_try) 2>&5
36195   ac_status=$?
36196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36197   (exit $ac_status); }; } &&
36198          { ac_try='test -s conftest$ac_exeext'
36199   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36200   (eval $ac_try) 2>&5
36201   ac_status=$?
36202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36203   (exit $ac_status); }; }; then
36204   echo "$as_me:$LINENO: result: -lwrap" >&5
36205 echo "${ECHO_T}-lwrap" >&6
36206                 have_wrappers=yes
36207                 LIBS="$save_LIBS"
36208 else
36209   echo "$as_me: failed program was:" >&5
36210 sed 's/^/| /' conftest.$ac_ext >&5
36211
36212
36213                                 LIBS="$LIBS -lnsl"
36214                 cat >conftest.$ac_ext <<_ACEOF
36215 /* confdefs.h.  */
36216 _ACEOF
36217 cat confdefs.h >>conftest.$ac_ext
36218 cat >>conftest.$ac_ext <<_ACEOF
36219 /* end confdefs.h.  */
36220
36221 #include <tcpd.h>
36222 int allow_severity = 0;
36223 int deny_severity  = 0;
36224
36225 struct request_info *req;
36226
36227 int
36228 main ()
36229 {
36230
36231 hosts_access(req)
36232
36233   ;
36234   return 0;
36235 }
36236 _ACEOF
36237 rm -f conftest.$ac_objext conftest$ac_exeext
36238 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36239   (eval $ac_link) 2>conftest.er1
36240   ac_status=$?
36241   grep -v '^ *+' conftest.er1 >conftest.err
36242   rm -f conftest.er1
36243   cat conftest.err >&5
36244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36245   (exit $ac_status); } &&
36246          { ac_try='test -z "$ac_c_werror_flag"
36247                          || test ! -s conftest.err'
36248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36249   (eval $ac_try) 2>&5
36250   ac_status=$?
36251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36252   (exit $ac_status); }; } &&
36253          { ac_try='test -s conftest$ac_exeext'
36254   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36255   (eval $ac_try) 2>&5
36256   ac_status=$?
36257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36258   (exit $ac_status); }; }; then
36259   echo "$as_me:$LINENO: result: -lwrap -lnsl" >&5
36260 echo "${ECHO_T}-lwrap -lnsl" >&6
36261                 have_wrappers=yes
36262                 LIBS="$save_LIBS -lnsl"
36263 else
36264   echo "$as_me: failed program was:" >&5
36265 sed 's/^/| /' conftest.$ac_ext >&5
36266
36267
36268                 echo "$as_me:$LINENO: result: no" >&5
36269 echo "${ECHO_T}no" >&6
36270                 have_wrappers=no
36271                 LIBS=$save_LIBS
36272 fi
36273 rm -f conftest.err conftest.$ac_objext \
36274       conftest$ac_exeext conftest.$ac_ext
36275 fi
36276 rm -f conftest.err conftest.$ac_objext \
36277       conftest$ac_exeext conftest.$ac_ext
36278 else
36279   have_wrappers=no
36280 fi
36281
36282 done
36283
36284
36285         if test $have_wrappers = yes ; then
36286
36287 cat >>confdefs.h <<\_ACEOF
36288 #define HAVE_TCPD 1
36289 _ACEOF
36290
36291                 WRAP_LIBS="-lwrap"
36292         elif test $ol_enable_wrappers = yes ; then
36293                 { { echo "$as_me:$LINENO: error: could not find TCP wrappers, select apppropriate options or disable" >&5
36294 echo "$as_me: error: could not find TCP wrappers, select apppropriate options or disable" >&2;}
36295    { (exit 1); exit 1; }; }
36296         else
36297                 { echo "$as_me:$LINENO: WARNING: could not find TCP wrappers, support disabled" >&5
36298 echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
36299                 WRAP_LIBS=""
36300         fi
36301 fi
36302
36303 if test $ol_enable_syslog != no ; then
36304         echo "$as_me:$LINENO: checking for openlog" >&5
36305 echo $ECHO_N "checking for openlog... $ECHO_C" >&6
36306 if test "${ac_cv_func_openlog+set}" = set; then
36307   echo $ECHO_N "(cached) $ECHO_C" >&6
36308 else
36309   cat >conftest.$ac_ext <<_ACEOF
36310 /* confdefs.h.  */
36311 _ACEOF
36312 cat confdefs.h >>conftest.$ac_ext
36313 cat >>conftest.$ac_ext <<_ACEOF
36314 /* end confdefs.h.  */
36315 /* Define openlog to an innocuous variant, in case <limits.h> declares openlog.
36316    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
36317 #define openlog innocuous_openlog
36318
36319 /* System header to define __stub macros and hopefully few prototypes,
36320     which can conflict with char openlog (); below.
36321     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36322     <limits.h> exists even on freestanding compilers.  */
36323
36324 #ifdef __STDC__
36325 # include <limits.h>
36326 #else
36327 # include <assert.h>
36328 #endif
36329
36330 #undef openlog
36331
36332 /* Override any gcc2 internal prototype to avoid an error.  */
36333 #ifdef __cplusplus
36334 extern "C"
36335 {
36336 #endif
36337 /* We use char because int might match the return type of a gcc2
36338    builtin and then its argument prototype would still apply.  */
36339 char openlog ();
36340 /* The GNU C library defines this for functions which it implements
36341     to always fail with ENOSYS.  Some functions are actually named
36342     something starting with __ and the normal name is an alias.  */
36343 #if defined (__stub_openlog) || defined (__stub___openlog)
36344 choke me
36345 #else
36346 char (*f) () = openlog;
36347 #endif
36348 #ifdef __cplusplus
36349 }
36350 #endif
36351
36352 int
36353 main ()
36354 {
36355 return f != openlog;
36356   ;
36357   return 0;
36358 }
36359 _ACEOF
36360 rm -f conftest.$ac_objext conftest$ac_exeext
36361 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36362   (eval $ac_link) 2>conftest.er1
36363   ac_status=$?
36364   grep -v '^ *+' conftest.er1 >conftest.err
36365   rm -f conftest.er1
36366   cat conftest.err >&5
36367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36368   (exit $ac_status); } &&
36369          { ac_try='test -z "$ac_c_werror_flag"
36370                          || test ! -s conftest.err'
36371   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36372   (eval $ac_try) 2>&5
36373   ac_status=$?
36374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36375   (exit $ac_status); }; } &&
36376          { ac_try='test -s conftest$ac_exeext'
36377   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36378   (eval $ac_try) 2>&5
36379   ac_status=$?
36380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36381   (exit $ac_status); }; }; then
36382   ac_cv_func_openlog=yes
36383 else
36384   echo "$as_me: failed program was:" >&5
36385 sed 's/^/| /' conftest.$ac_ext >&5
36386
36387 ac_cv_func_openlog=no
36388 fi
36389 rm -f conftest.err conftest.$ac_objext \
36390       conftest$ac_exeext conftest.$ac_ext
36391 fi
36392 echo "$as_me:$LINENO: result: $ac_cv_func_openlog" >&5
36393 echo "${ECHO_T}$ac_cv_func_openlog" >&6
36394
36395         if test $ac_cv_func_openlog = no && test $ol_enable_syslog = yes; then
36396                 { { echo "$as_me:$LINENO: error: could not find syslog" >&5
36397 echo "$as_me: error: could not find syslog" >&2;}
36398    { (exit select appropriate options or disable); exit select appropriate options or disable; }; }
36399         fi
36400         ol_enable_syslog=$ac_cv_func_openlog
36401 fi
36402
36403 ol_link_sql=no
36404 if test $ol_enable_sql != no ; then
36405
36406
36407 for ac_header in sql.h sqlext.h
36408 do
36409 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
36410 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36411   echo "$as_me:$LINENO: checking for $ac_header" >&5
36412 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36413 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36414   echo $ECHO_N "(cached) $ECHO_C" >&6
36415 fi
36416 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36417 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36418 else
36419   # Is the header compilable?
36420 echo "$as_me:$LINENO: checking $ac_header usability" >&5
36421 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
36422 cat >conftest.$ac_ext <<_ACEOF
36423 /* confdefs.h.  */
36424 _ACEOF
36425 cat confdefs.h >>conftest.$ac_ext
36426 cat >>conftest.$ac_ext <<_ACEOF
36427 /* end confdefs.h.  */
36428 $ac_includes_default
36429 #include <$ac_header>
36430 _ACEOF
36431 rm -f conftest.$ac_objext
36432 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36433   (eval $ac_compile) 2>conftest.er1
36434   ac_status=$?
36435   grep -v '^ *+' conftest.er1 >conftest.err
36436   rm -f conftest.er1
36437   cat conftest.err >&5
36438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36439   (exit $ac_status); } &&
36440          { ac_try='test -z "$ac_c_werror_flag"
36441                          || test ! -s conftest.err'
36442   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36443   (eval $ac_try) 2>&5
36444   ac_status=$?
36445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36446   (exit $ac_status); }; } &&
36447          { ac_try='test -s conftest.$ac_objext'
36448   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36449   (eval $ac_try) 2>&5
36450   ac_status=$?
36451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36452   (exit $ac_status); }; }; then
36453   ac_header_compiler=yes
36454 else
36455   echo "$as_me: failed program was:" >&5
36456 sed 's/^/| /' conftest.$ac_ext >&5
36457
36458 ac_header_compiler=no
36459 fi
36460 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36461 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
36462 echo "${ECHO_T}$ac_header_compiler" >&6
36463
36464 # Is the header present?
36465 echo "$as_me:$LINENO: checking $ac_header presence" >&5
36466 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
36467 cat >conftest.$ac_ext <<_ACEOF
36468 /* confdefs.h.  */
36469 _ACEOF
36470 cat confdefs.h >>conftest.$ac_ext
36471 cat >>conftest.$ac_ext <<_ACEOF
36472 /* end confdefs.h.  */
36473 #include <$ac_header>
36474 _ACEOF
36475 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
36476   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
36477   ac_status=$?
36478   grep -v '^ *+' conftest.er1 >conftest.err
36479   rm -f conftest.er1
36480   cat conftest.err >&5
36481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36482   (exit $ac_status); } >/dev/null; then
36483   if test -s conftest.err; then
36484     ac_cpp_err=$ac_c_preproc_warn_flag
36485     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
36486   else
36487     ac_cpp_err=
36488   fi
36489 else
36490   ac_cpp_err=yes
36491 fi
36492 if test -z "$ac_cpp_err"; then
36493   ac_header_preproc=yes
36494 else
36495   echo "$as_me: failed program was:" >&5
36496 sed 's/^/| /' conftest.$ac_ext >&5
36497
36498   ac_header_preproc=no
36499 fi
36500 rm -f conftest.err conftest.$ac_ext
36501 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
36502 echo "${ECHO_T}$ac_header_preproc" >&6
36503
36504 # So?  What about this header?
36505 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
36506   yes:no: )
36507     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
36508 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
36509     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
36510 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
36511     ac_header_preproc=yes
36512     ;;
36513   no:yes:* )
36514     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
36515 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
36516     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
36517 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
36518     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
36519 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
36520     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
36521 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
36522     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
36523 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
36524     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
36525 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
36526     (
36527       cat <<\_ASBOX
36528 ## --------------------------------------------- ##
36529 ## Report this to <http://www.openldap.org/its/> ##
36530 ## --------------------------------------------- ##
36531 _ASBOX
36532     ) |
36533       sed "s/^/$as_me: WARNING:     /" >&2
36534     ;;
36535 esac
36536 echo "$as_me:$LINENO: checking for $ac_header" >&5
36537 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36538 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36539   echo $ECHO_N "(cached) $ECHO_C" >&6
36540 else
36541   eval "$as_ac_Header=\$ac_header_preproc"
36542 fi
36543 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36544 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36545
36546 fi
36547 if test `eval echo '${'$as_ac_Header'}'` = yes; then
36548   cat >>confdefs.h <<_ACEOF
36549 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
36550 _ACEOF
36551
36552 else
36553
36554                 { { echo "$as_me:$LINENO: error: could not locate SQL headers" >&5
36555 echo "$as_me: error: could not locate SQL headers" >&2;}
36556    { (exit 1); exit 1; }; }
36557
36558 fi
36559
36560 done
36561
36562
36563         sql_LIBS="$LIBS"
36564         LIBS="$LTHREAD_LIBS"
36565
36566         echo "$as_me:$LINENO: checking for SQLDriverConnect in -liodbc" >&5
36567 echo $ECHO_N "checking for SQLDriverConnect in -liodbc... $ECHO_C" >&6
36568 if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then
36569   echo $ECHO_N "(cached) $ECHO_C" >&6
36570 else
36571   ac_check_lib_save_LIBS=$LIBS
36572 LIBS="-liodbc  $LIBS"
36573 cat >conftest.$ac_ext <<_ACEOF
36574 /* confdefs.h.  */
36575 _ACEOF
36576 cat confdefs.h >>conftest.$ac_ext
36577 cat >>conftest.$ac_ext <<_ACEOF
36578 /* end confdefs.h.  */
36579
36580 /* Override any gcc2 internal prototype to avoid an error.  */
36581 #ifdef __cplusplus
36582 extern "C"
36583 #endif
36584 /* We use char because int might match the return type of a gcc2
36585    builtin and then its argument prototype would still apply.  */
36586 char SQLDriverConnect ();
36587 int
36588 main ()
36589 {
36590 SQLDriverConnect ();
36591   ;
36592   return 0;
36593 }
36594 _ACEOF
36595 rm -f conftest.$ac_objext conftest$ac_exeext
36596 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36597   (eval $ac_link) 2>conftest.er1
36598   ac_status=$?
36599   grep -v '^ *+' conftest.er1 >conftest.err
36600   rm -f conftest.er1
36601   cat conftest.err >&5
36602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36603   (exit $ac_status); } &&
36604          { ac_try='test -z "$ac_c_werror_flag"
36605                          || test ! -s conftest.err'
36606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36607   (eval $ac_try) 2>&5
36608   ac_status=$?
36609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36610   (exit $ac_status); }; } &&
36611          { ac_try='test -s conftest$ac_exeext'
36612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36613   (eval $ac_try) 2>&5
36614   ac_status=$?
36615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36616   (exit $ac_status); }; }; then
36617   ac_cv_lib_iodbc_SQLDriverConnect=yes
36618 else
36619   echo "$as_me: failed program was:" >&5
36620 sed 's/^/| /' conftest.$ac_ext >&5
36621
36622 ac_cv_lib_iodbc_SQLDriverConnect=no
36623 fi
36624 rm -f conftest.err conftest.$ac_objext \
36625       conftest$ac_exeext conftest.$ac_ext
36626 LIBS=$ac_check_lib_save_LIBS
36627 fi
36628 echo "$as_me:$LINENO: result: $ac_cv_lib_iodbc_SQLDriverConnect" >&5
36629 echo "${ECHO_T}$ac_cv_lib_iodbc_SQLDriverConnect" >&6
36630 if test $ac_cv_lib_iodbc_SQLDriverConnect = yes; then
36631   have_iodbc=yes
36632 else
36633   have_iodbc=no
36634 fi
36635
36636         if test $have_iodbc = yes ; then
36637                 ol_link_sql="-liodbc"
36638         else
36639                 echo "$as_me:$LINENO: checking for SQLDriverConnect in -lodbc" >&5
36640 echo $ECHO_N "checking for SQLDriverConnect in -lodbc... $ECHO_C" >&6
36641 if test "${ac_cv_lib_odbc_SQLDriverConnect+set}" = set; then
36642   echo $ECHO_N "(cached) $ECHO_C" >&6
36643 else
36644   ac_check_lib_save_LIBS=$LIBS
36645 LIBS="-lodbc  $LIBS"
36646 cat >conftest.$ac_ext <<_ACEOF
36647 /* confdefs.h.  */
36648 _ACEOF
36649 cat confdefs.h >>conftest.$ac_ext
36650 cat >>conftest.$ac_ext <<_ACEOF
36651 /* end confdefs.h.  */
36652
36653 /* Override any gcc2 internal prototype to avoid an error.  */
36654 #ifdef __cplusplus
36655 extern "C"
36656 #endif
36657 /* We use char because int might match the return type of a gcc2
36658    builtin and then its argument prototype would still apply.  */
36659 char SQLDriverConnect ();
36660 int
36661 main ()
36662 {
36663 SQLDriverConnect ();
36664   ;
36665   return 0;
36666 }
36667 _ACEOF
36668 rm -f conftest.$ac_objext conftest$ac_exeext
36669 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36670   (eval $ac_link) 2>conftest.er1
36671   ac_status=$?
36672   grep -v '^ *+' conftest.er1 >conftest.err
36673   rm -f conftest.er1
36674   cat conftest.err >&5
36675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36676   (exit $ac_status); } &&
36677          { ac_try='test -z "$ac_c_werror_flag"
36678                          || test ! -s conftest.err'
36679   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36680   (eval $ac_try) 2>&5
36681   ac_status=$?
36682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36683   (exit $ac_status); }; } &&
36684          { ac_try='test -s conftest$ac_exeext'
36685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36686   (eval $ac_try) 2>&5
36687   ac_status=$?
36688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36689   (exit $ac_status); }; }; then
36690   ac_cv_lib_odbc_SQLDriverConnect=yes
36691 else
36692   echo "$as_me: failed program was:" >&5
36693 sed 's/^/| /' conftest.$ac_ext >&5
36694
36695 ac_cv_lib_odbc_SQLDriverConnect=no
36696 fi
36697 rm -f conftest.err conftest.$ac_objext \
36698       conftest$ac_exeext conftest.$ac_ext
36699 LIBS=$ac_check_lib_save_LIBS
36700 fi
36701 echo "$as_me:$LINENO: result: $ac_cv_lib_odbc_SQLDriverConnect" >&5
36702 echo "${ECHO_T}$ac_cv_lib_odbc_SQLDriverConnect" >&6
36703 if test $ac_cv_lib_odbc_SQLDriverConnect = yes; then
36704   have_odbc=yes
36705 else
36706   have_odbc=no
36707 fi
36708
36709                 if test $have_odbc = yes ; then
36710                         ol_link_sql="-lodbc"
36711                 fi
36712         fi
36713
36714         LIBS="$sql_LIBS"
36715
36716         if test $ol_link_sql != no ; then
36717                 SLAPD_SQL_LIBS="$ol_link_sql"
36718
36719         elif test $ol_enable_sql != auto ; then
36720                 { { echo "$as_me:$LINENO: error: could not locate suitable ODBC library" >&5
36721 echo "$as_me: error: could not locate suitable ODBC library" >&2;}
36722    { (exit 1); exit 1; }; }
36723         fi
36724 fi
36725
36726 WITH_SASL=no
36727 ol_link_sasl=no
36728 ol_link_spasswd=no
36729 if test $ol_with_cyrus_sasl != no ; then
36730
36731
36732 for ac_header in sasl/sasl.h sasl.h
36733 do
36734 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
36735 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36736   echo "$as_me:$LINENO: checking for $ac_header" >&5
36737 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36738 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36739   echo $ECHO_N "(cached) $ECHO_C" >&6
36740 fi
36741 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36742 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36743 else
36744   # Is the header compilable?
36745 echo "$as_me:$LINENO: checking $ac_header usability" >&5
36746 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
36747 cat >conftest.$ac_ext <<_ACEOF
36748 /* confdefs.h.  */
36749 _ACEOF
36750 cat confdefs.h >>conftest.$ac_ext
36751 cat >>conftest.$ac_ext <<_ACEOF
36752 /* end confdefs.h.  */
36753 $ac_includes_default
36754 #include <$ac_header>
36755 _ACEOF
36756 rm -f conftest.$ac_objext
36757 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36758   (eval $ac_compile) 2>conftest.er1
36759   ac_status=$?
36760   grep -v '^ *+' conftest.er1 >conftest.err
36761   rm -f conftest.er1
36762   cat conftest.err >&5
36763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36764   (exit $ac_status); } &&
36765          { ac_try='test -z "$ac_c_werror_flag"
36766                          || test ! -s conftest.err'
36767   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36768   (eval $ac_try) 2>&5
36769   ac_status=$?
36770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36771   (exit $ac_status); }; } &&
36772          { ac_try='test -s conftest.$ac_objext'
36773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36774   (eval $ac_try) 2>&5
36775   ac_status=$?
36776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36777   (exit $ac_status); }; }; then
36778   ac_header_compiler=yes
36779 else
36780   echo "$as_me: failed program was:" >&5
36781 sed 's/^/| /' conftest.$ac_ext >&5
36782
36783 ac_header_compiler=no
36784 fi
36785 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36786 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
36787 echo "${ECHO_T}$ac_header_compiler" >&6
36788
36789 # Is the header present?
36790 echo "$as_me:$LINENO: checking $ac_header presence" >&5
36791 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
36792 cat >conftest.$ac_ext <<_ACEOF
36793 /* confdefs.h.  */
36794 _ACEOF
36795 cat confdefs.h >>conftest.$ac_ext
36796 cat >>conftest.$ac_ext <<_ACEOF
36797 /* end confdefs.h.  */
36798 #include <$ac_header>
36799 _ACEOF
36800 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
36801   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
36802   ac_status=$?
36803   grep -v '^ *+' conftest.er1 >conftest.err
36804   rm -f conftest.er1
36805   cat conftest.err >&5
36806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36807   (exit $ac_status); } >/dev/null; then
36808   if test -s conftest.err; then
36809     ac_cpp_err=$ac_c_preproc_warn_flag
36810     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
36811   else
36812     ac_cpp_err=
36813   fi
36814 else
36815   ac_cpp_err=yes
36816 fi
36817 if test -z "$ac_cpp_err"; then
36818   ac_header_preproc=yes
36819 else
36820   echo "$as_me: failed program was:" >&5
36821 sed 's/^/| /' conftest.$ac_ext >&5
36822
36823   ac_header_preproc=no
36824 fi
36825 rm -f conftest.err conftest.$ac_ext
36826 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
36827 echo "${ECHO_T}$ac_header_preproc" >&6
36828
36829 # So?  What about this header?
36830 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
36831   yes:no: )
36832     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
36833 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
36834     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
36835 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
36836     ac_header_preproc=yes
36837     ;;
36838   no:yes:* )
36839     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
36840 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
36841     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
36842 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
36843     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
36844 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
36845     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
36846 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
36847     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
36848 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
36849     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
36850 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
36851     (
36852       cat <<\_ASBOX
36853 ## --------------------------------------------- ##
36854 ## Report this to <http://www.openldap.org/its/> ##
36855 ## --------------------------------------------- ##
36856 _ASBOX
36857     ) |
36858       sed "s/^/$as_me: WARNING:     /" >&2
36859     ;;
36860 esac
36861 echo "$as_me:$LINENO: checking for $ac_header" >&5
36862 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36863 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36864   echo $ECHO_N "(cached) $ECHO_C" >&6
36865 else
36866   eval "$as_ac_Header=\$ac_header_preproc"
36867 fi
36868 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36869 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36870
36871 fi
36872 if test `eval echo '${'$as_ac_Header'}'` = yes; then
36873   cat >>confdefs.h <<_ACEOF
36874 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
36875 _ACEOF
36876
36877 fi
36878
36879 done
36880
36881
36882         if test $ac_cv_header_sasl_sasl_h = yes ||
36883            test $ac_cv_header_sasl_h = yes; then
36884                 echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl2" >&5
36885 echo $ECHO_N "checking for sasl_client_init in -lsasl2... $ECHO_C" >&6
36886 if test "${ac_cv_lib_sasl2_sasl_client_init+set}" = set; then
36887   echo $ECHO_N "(cached) $ECHO_C" >&6
36888 else
36889   ac_check_lib_save_LIBS=$LIBS
36890 LIBS="-lsasl2  $LIBS"
36891 cat >conftest.$ac_ext <<_ACEOF
36892 /* confdefs.h.  */
36893 _ACEOF
36894 cat confdefs.h >>conftest.$ac_ext
36895 cat >>conftest.$ac_ext <<_ACEOF
36896 /* end confdefs.h.  */
36897
36898 /* Override any gcc2 internal prototype to avoid an error.  */
36899 #ifdef __cplusplus
36900 extern "C"
36901 #endif
36902 /* We use char because int might match the return type of a gcc2
36903    builtin and then its argument prototype would still apply.  */
36904 char sasl_client_init ();
36905 int
36906 main ()
36907 {
36908 sasl_client_init ();
36909   ;
36910   return 0;
36911 }
36912 _ACEOF
36913 rm -f conftest.$ac_objext conftest$ac_exeext
36914 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36915   (eval $ac_link) 2>conftest.er1
36916   ac_status=$?
36917   grep -v '^ *+' conftest.er1 >conftest.err
36918   rm -f conftest.er1
36919   cat conftest.err >&5
36920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36921   (exit $ac_status); } &&
36922          { ac_try='test -z "$ac_c_werror_flag"
36923                          || test ! -s conftest.err'
36924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36925   (eval $ac_try) 2>&5
36926   ac_status=$?
36927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36928   (exit $ac_status); }; } &&
36929          { ac_try='test -s conftest$ac_exeext'
36930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36931   (eval $ac_try) 2>&5
36932   ac_status=$?
36933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36934   (exit $ac_status); }; }; then
36935   ac_cv_lib_sasl2_sasl_client_init=yes
36936 else
36937   echo "$as_me: failed program was:" >&5
36938 sed 's/^/| /' conftest.$ac_ext >&5
36939
36940 ac_cv_lib_sasl2_sasl_client_init=no
36941 fi
36942 rm -f conftest.err conftest.$ac_objext \
36943       conftest$ac_exeext conftest.$ac_ext
36944 LIBS=$ac_check_lib_save_LIBS
36945 fi
36946 echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_sasl_client_init" >&5
36947 echo "${ECHO_T}$ac_cv_lib_sasl2_sasl_client_init" >&6
36948 if test $ac_cv_lib_sasl2_sasl_client_init = yes; then
36949   ol_link_sasl="-lsasl2"
36950 else
36951   echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl" >&5
36952 echo $ECHO_N "checking for sasl_client_init in -lsasl... $ECHO_C" >&6
36953 if test "${ac_cv_lib_sasl_sasl_client_init+set}" = set; then
36954   echo $ECHO_N "(cached) $ECHO_C" >&6
36955 else
36956   ac_check_lib_save_LIBS=$LIBS
36957 LIBS="-lsasl  $LIBS"
36958 cat >conftest.$ac_ext <<_ACEOF
36959 /* confdefs.h.  */
36960 _ACEOF
36961 cat confdefs.h >>conftest.$ac_ext
36962 cat >>conftest.$ac_ext <<_ACEOF
36963 /* end confdefs.h.  */
36964
36965 /* Override any gcc2 internal prototype to avoid an error.  */
36966 #ifdef __cplusplus
36967 extern "C"
36968 #endif
36969 /* We use char because int might match the return type of a gcc2
36970    builtin and then its argument prototype would still apply.  */
36971 char sasl_client_init ();
36972 int
36973 main ()
36974 {
36975 sasl_client_init ();
36976   ;
36977   return 0;
36978 }
36979 _ACEOF
36980 rm -f conftest.$ac_objext conftest$ac_exeext
36981 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36982   (eval $ac_link) 2>conftest.er1
36983   ac_status=$?
36984   grep -v '^ *+' conftest.er1 >conftest.err
36985   rm -f conftest.er1
36986   cat conftest.err >&5
36987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36988   (exit $ac_status); } &&
36989          { ac_try='test -z "$ac_c_werror_flag"
36990                          || test ! -s conftest.err'
36991   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36992   (eval $ac_try) 2>&5
36993   ac_status=$?
36994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36995   (exit $ac_status); }; } &&
36996          { ac_try='test -s conftest$ac_exeext'
36997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36998   (eval $ac_try) 2>&5
36999   ac_status=$?
37000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37001   (exit $ac_status); }; }; then
37002   ac_cv_lib_sasl_sasl_client_init=yes
37003 else
37004   echo "$as_me: failed program was:" >&5
37005 sed 's/^/| /' conftest.$ac_ext >&5
37006
37007 ac_cv_lib_sasl_sasl_client_init=no
37008 fi
37009 rm -f conftest.err conftest.$ac_objext \
37010       conftest$ac_exeext conftest.$ac_ext
37011 LIBS=$ac_check_lib_save_LIBS
37012 fi
37013 echo "$as_me:$LINENO: result: $ac_cv_lib_sasl_sasl_client_init" >&5
37014 echo "${ECHO_T}$ac_cv_lib_sasl_sasl_client_init" >&6
37015 if test $ac_cv_lib_sasl_sasl_client_init = yes; then
37016   ol_link_sasl="-lsasl"
37017 fi
37018
37019 fi
37020
37021         fi
37022
37023         if test $ol_link_sasl = no ; then
37024                 if test $ol_with_cyrus_sasl != auto ; then
37025                         { { echo "$as_me:$LINENO: error: Could not locate Cyrus SASL" >&5
37026 echo "$as_me: error: Could not locate Cyrus SASL" >&2;}
37027    { (exit 1); exit 1; }; }
37028                 else
37029                         { echo "$as_me:$LINENO: WARNING: Could not locate Cyrus SASL" >&5
37030 echo "$as_me: WARNING: Could not locate Cyrus SASL" >&2;}
37031                         { echo "$as_me:$LINENO: WARNING: SASL authentication not supported!" >&5
37032 echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
37033                         if test $ol_link_tls = no ; then
37034                                 { echo "$as_me:$LINENO: WARNING: Strong authentication not supported!" >&5
37035 echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
37036                         fi
37037                 fi
37038         else
37039                 echo "$as_me:$LINENO: checking Cyrus SASL library version" >&5
37040 echo $ECHO_N "checking Cyrus SASL library version... $ECHO_C" >&6
37041 if test "${ol_cv_sasl_compat+set}" = set; then
37042   echo $ECHO_N "(cached) $ECHO_C" >&6
37043 else
37044
37045         cat >conftest.$ac_ext <<_ACEOF
37046 /* confdefs.h.  */
37047 _ACEOF
37048 cat confdefs.h >>conftest.$ac_ext
37049 cat >>conftest.$ac_ext <<_ACEOF
37050 /* end confdefs.h.  */
37051
37052 #ifdef HAVE_SASL_SASL_H
37053 #include <sasl/sasl.h>
37054 #else
37055 #include <sasl.h>
37056 #endif
37057
37058 /* Require 2.1.15+ */
37059 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
37060         char *__sasl_compat = "2.2+ or better okay (we guess)";
37061 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
37062         && SASL_VERSION_STEP >=15
37063         char *__sasl_compat = "2.1.15+ or better okay";
37064 #endif
37065
37066 _ACEOF
37067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37068   $EGREP "__sasl_compat" >/dev/null 2>&1; then
37069   ol_cv_sasl_compat=yes
37070 else
37071   ol_cv_sasl_compat=no
37072 fi
37073 rm -f conftest*
37074
37075 fi
37076 echo "$as_me:$LINENO: result: $ol_cv_sasl_compat" >&5
37077 echo "${ECHO_T}$ol_cv_sasl_compat" >&6
37078
37079                 if test $ol_cv_sasl_compat = no ; then
37080                         ol_link_sasl=no
37081                         { { echo "$as_me:$LINENO: error: Cyrus SASL library located but is incompatible" >&5
37082 echo "$as_me: error: Cyrus SASL library located but is incompatible" >&2;}
37083    { (exit 1); exit 1; }; }
37084                 fi
37085
37086
37087 cat >>confdefs.h <<\_ACEOF
37088 #define HAVE_CYRUS_SASL 1
37089 _ACEOF
37090
37091                 SASL_LIBS="$ol_link_sasl"
37092                 if test $ol_enable_spasswd != no ; then
37093                         ol_link_spasswd=yes
37094                 fi
37095
37096                 ac_save_LIBS="$LIBS"
37097                 LIBS="$LIBS $ol_link_sasl"
37098                 echo "$as_me:$LINENO: checking for sasl_version" >&5
37099 echo $ECHO_N "checking for sasl_version... $ECHO_C" >&6
37100 if test "${ac_cv_func_sasl_version+set}" = set; then
37101   echo $ECHO_N "(cached) $ECHO_C" >&6
37102 else
37103   cat >conftest.$ac_ext <<_ACEOF
37104 /* confdefs.h.  */
37105 _ACEOF
37106 cat confdefs.h >>conftest.$ac_ext
37107 cat >>conftest.$ac_ext <<_ACEOF
37108 /* end confdefs.h.  */
37109 /* Define sasl_version to an innocuous variant, in case <limits.h> declares sasl_version.
37110    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
37111 #define sasl_version innocuous_sasl_version
37112
37113 /* System header to define __stub macros and hopefully few prototypes,
37114     which can conflict with char sasl_version (); below.
37115     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
37116     <limits.h> exists even on freestanding compilers.  */
37117
37118 #ifdef __STDC__
37119 # include <limits.h>
37120 #else
37121 # include <assert.h>
37122 #endif
37123
37124 #undef sasl_version
37125
37126 /* Override any gcc2 internal prototype to avoid an error.  */
37127 #ifdef __cplusplus
37128 extern "C"
37129 {
37130 #endif
37131 /* We use char because int might match the return type of a gcc2
37132    builtin and then its argument prototype would still apply.  */
37133 char sasl_version ();
37134 /* The GNU C library defines this for functions which it implements
37135     to always fail with ENOSYS.  Some functions are actually named
37136     something starting with __ and the normal name is an alias.  */
37137 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
37138 choke me
37139 #else
37140 char (*f) () = sasl_version;
37141 #endif
37142 #ifdef __cplusplus
37143 }
37144 #endif
37145
37146 int
37147 main ()
37148 {
37149 return f != sasl_version;
37150   ;
37151   return 0;
37152 }
37153 _ACEOF
37154 rm -f conftest.$ac_objext conftest$ac_exeext
37155 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37156   (eval $ac_link) 2>conftest.er1
37157   ac_status=$?
37158   grep -v '^ *+' conftest.er1 >conftest.err
37159   rm -f conftest.er1
37160   cat conftest.err >&5
37161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37162   (exit $ac_status); } &&
37163          { ac_try='test -z "$ac_c_werror_flag"
37164                          || test ! -s conftest.err'
37165   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37166   (eval $ac_try) 2>&5
37167   ac_status=$?
37168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37169   (exit $ac_status); }; } &&
37170          { ac_try='test -s conftest$ac_exeext'
37171   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37172   (eval $ac_try) 2>&5
37173   ac_status=$?
37174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37175   (exit $ac_status); }; }; then
37176   ac_cv_func_sasl_version=yes
37177 else
37178   echo "$as_me: failed program was:" >&5
37179 sed 's/^/| /' conftest.$ac_ext >&5
37180
37181 ac_cv_func_sasl_version=no
37182 fi
37183 rm -f conftest.err conftest.$ac_objext \
37184       conftest$ac_exeext conftest.$ac_ext
37185 fi
37186 echo "$as_me:$LINENO: result: $ac_cv_func_sasl_version" >&5
37187 echo "${ECHO_T}$ac_cv_func_sasl_version" >&6
37188 if test $ac_cv_func_sasl_version = yes; then
37189
37190 cat >>confdefs.h <<\_ACEOF
37191 #define HAVE_SASL_VERSION 1
37192 _ACEOF
37193
37194 fi
37195
37196                 LIBS="$ac_save_LIBS"
37197
37198                 WITH_SASL=yes
37199         fi
37200
37201 else
37202         { echo "$as_me:$LINENO: WARNING: SASL authentication not supported!" >&5
37203 echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
37204         if test $ol_link_tls = no ; then
37205                 { echo "$as_me:$LINENO: WARNING: Strong authentication not supported!" >&5
37206 echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
37207         fi
37208 fi
37209
37210 if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
37211         dev=no
37212         if test -r /dev/urandom ; then
37213                 dev="/dev/urandom";
37214         elif test -r /idev/urandom ; then
37215                 dev="/idev/urandom";
37216         elif test -r /dev/srandom ; then
37217                 dev="/dev/srandom";
37218         elif test -r /dev/random ; then
37219                 dev="/dev/random";
37220         elif test -r /idev/random ; then
37221                 dev="/idev/random";
37222         fi
37223
37224         if test $dev != no ; then
37225
37226 cat >>confdefs.h <<_ACEOF
37227 #define URANDOM_DEVICE "$dev"
37228 _ACEOF
37229
37230         fi
37231 fi
37232
37233 ol_link_fetch=no
37234 if test $ol_with_fetch != no ; then
37235         ol_LIBS=$LIBS
37236 LIBS="-lfetch -lcom_err $LIBS"
37237 echo "$as_me:$LINENO: checking fetch(3) library" >&5
37238 echo $ECHO_N "checking fetch(3) library... $ECHO_C" >&6
37239 if test "${ol_cv_lib_fetch+set}" = set; then
37240   echo $ECHO_N "(cached) $ECHO_C" >&6
37241 else
37242
37243         cat >conftest.$ac_ext <<_ACEOF
37244 /* confdefs.h.  */
37245 _ACEOF
37246 cat confdefs.h >>conftest.$ac_ext
37247 cat >>conftest.$ac_ext <<_ACEOF
37248 /* end confdefs.h.  */
37249
37250 #include <sys/param.h>
37251 #include <stdio.h>
37252 #include <fetch.h>
37253 int
37254 main ()
37255 {
37256 struct url *u = fetchParseURL("file:///");
37257   ;
37258   return 0;
37259 }
37260 _ACEOF
37261 rm -f conftest.$ac_objext conftest$ac_exeext
37262 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37263   (eval $ac_link) 2>conftest.er1
37264   ac_status=$?
37265   grep -v '^ *+' conftest.er1 >conftest.err
37266   rm -f conftest.er1
37267   cat conftest.err >&5
37268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37269   (exit $ac_status); } &&
37270          { ac_try='test -z "$ac_c_werror_flag"
37271                          || test ! -s conftest.err'
37272   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37273   (eval $ac_try) 2>&5
37274   ac_status=$?
37275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37276   (exit $ac_status); }; } &&
37277          { ac_try='test -s conftest$ac_exeext'
37278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37279   (eval $ac_try) 2>&5
37280   ac_status=$?
37281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37282   (exit $ac_status); }; }; then
37283   ol_cv_lib_fetch=yes
37284 else
37285   echo "$as_me: failed program was:" >&5
37286 sed 's/^/| /' conftest.$ac_ext >&5
37287
37288 ol_cv_lib_fetch=no
37289 fi
37290 rm -f conftest.err conftest.$ac_objext \
37291       conftest$ac_exeext conftest.$ac_ext
37292 fi
37293 echo "$as_me:$LINENO: result: $ol_cv_lib_fetch" >&5
37294 echo "${ECHO_T}$ol_cv_lib_fetch" >&6
37295 LIBS=$ol_LIBS
37296 if test $ol_cv_lib_fetch != no ; then
37297         ol_link_fetch="-lfetch -lcom_err"
37298
37299 cat >>confdefs.h <<\_ACEOF
37300 #define HAVE_FETCH 1
37301 _ACEOF
37302
37303 fi
37304
37305
37306         if test $ol_cv_lib_fetch != no ; then
37307                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
37308                 ol_link_fetch=freebsd
37309
37310         elif test $ol_with_fetch != auto ; then
37311                 { { echo "$as_me:$LINENO: error: no suitable API for --with-fetch=$ol_with_fetch" >&5
37312 echo "$as_me: error: no suitable API for --with-fetch=$ol_with_fetch" >&2;}
37313    { (exit 1); exit 1; }; }
37314         fi
37315 fi
37316
37317 if test $ol_enable_crypt != no ; then
37318         save_LIBS="$LIBS"
37319         LIBS="$TLS_LIBS $LIBS"
37320
37321         echo "$as_me:$LINENO: checking for crypt" >&5
37322 echo $ECHO_N "checking for crypt... $ECHO_C" >&6
37323 if test "${ac_cv_func_crypt+set}" = set; then
37324   echo $ECHO_N "(cached) $ECHO_C" >&6
37325 else
37326   cat >conftest.$ac_ext <<_ACEOF
37327 /* confdefs.h.  */
37328 _ACEOF
37329 cat confdefs.h >>conftest.$ac_ext
37330 cat >>conftest.$ac_ext <<_ACEOF
37331 /* end confdefs.h.  */
37332 /* Define crypt to an innocuous variant, in case <limits.h> declares crypt.
37333    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
37334 #define crypt innocuous_crypt
37335
37336 /* System header to define __stub macros and hopefully few prototypes,
37337     which can conflict with char crypt (); below.
37338     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
37339     <limits.h> exists even on freestanding compilers.  */
37340
37341 #ifdef __STDC__
37342 # include <limits.h>
37343 #else
37344 # include <assert.h>
37345 #endif
37346
37347 #undef crypt
37348
37349 /* Override any gcc2 internal prototype to avoid an error.  */
37350 #ifdef __cplusplus
37351 extern "C"
37352 {
37353 #endif
37354 /* We use char because int might match the return type of a gcc2
37355    builtin and then its argument prototype would still apply.  */
37356 char crypt ();
37357 /* The GNU C library defines this for functions which it implements
37358     to always fail with ENOSYS.  Some functions are actually named
37359     something starting with __ and the normal name is an alias.  */
37360 #if defined (__stub_crypt) || defined (__stub___crypt)
37361 choke me
37362 #else
37363 char (*f) () = crypt;
37364 #endif
37365 #ifdef __cplusplus
37366 }
37367 #endif
37368
37369 int
37370 main ()
37371 {
37372 return f != crypt;
37373   ;
37374   return 0;
37375 }
37376 _ACEOF
37377 rm -f conftest.$ac_objext conftest$ac_exeext
37378 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37379   (eval $ac_link) 2>conftest.er1
37380   ac_status=$?
37381   grep -v '^ *+' conftest.er1 >conftest.err
37382   rm -f conftest.er1
37383   cat conftest.err >&5
37384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37385   (exit $ac_status); } &&
37386          { ac_try='test -z "$ac_c_werror_flag"
37387                          || test ! -s conftest.err'
37388   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37389   (eval $ac_try) 2>&5
37390   ac_status=$?
37391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37392   (exit $ac_status); }; } &&
37393          { ac_try='test -s conftest$ac_exeext'
37394   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37395   (eval $ac_try) 2>&5
37396   ac_status=$?
37397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37398   (exit $ac_status); }; }; then
37399   ac_cv_func_crypt=yes
37400 else
37401   echo "$as_me: failed program was:" >&5
37402 sed 's/^/| /' conftest.$ac_ext >&5
37403
37404 ac_cv_func_crypt=no
37405 fi
37406 rm -f conftest.err conftest.$ac_objext \
37407       conftest$ac_exeext conftest.$ac_ext
37408 fi
37409 echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
37410 echo "${ECHO_T}$ac_cv_func_crypt" >&6
37411 if test $ac_cv_func_crypt = yes; then
37412   have_crypt=yes
37413 else
37414
37415                 LIBS="$save_LIBS"
37416                 echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
37417 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
37418 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
37419   echo $ECHO_N "(cached) $ECHO_C" >&6
37420 else
37421   ac_check_lib_save_LIBS=$LIBS
37422 LIBS="-lcrypt  $LIBS"
37423 cat >conftest.$ac_ext <<_ACEOF
37424 /* confdefs.h.  */
37425 _ACEOF
37426 cat confdefs.h >>conftest.$ac_ext
37427 cat >>conftest.$ac_ext <<_ACEOF
37428 /* end confdefs.h.  */
37429
37430 /* Override any gcc2 internal prototype to avoid an error.  */
37431 #ifdef __cplusplus
37432 extern "C"
37433 #endif
37434 /* We use char because int might match the return type of a gcc2
37435    builtin and then its argument prototype would still apply.  */
37436 char crypt ();
37437 int
37438 main ()
37439 {
37440 crypt ();
37441   ;
37442   return 0;
37443 }
37444 _ACEOF
37445 rm -f conftest.$ac_objext conftest$ac_exeext
37446 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37447   (eval $ac_link) 2>conftest.er1
37448   ac_status=$?
37449   grep -v '^ *+' conftest.er1 >conftest.err
37450   rm -f conftest.er1
37451   cat conftest.err >&5
37452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37453   (exit $ac_status); } &&
37454          { ac_try='test -z "$ac_c_werror_flag"
37455                          || test ! -s conftest.err'
37456   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37457   (eval $ac_try) 2>&5
37458   ac_status=$?
37459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37460   (exit $ac_status); }; } &&
37461          { ac_try='test -s conftest$ac_exeext'
37462   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37463   (eval $ac_try) 2>&5
37464   ac_status=$?
37465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37466   (exit $ac_status); }; }; then
37467   ac_cv_lib_crypt_crypt=yes
37468 else
37469   echo "$as_me: failed program was:" >&5
37470 sed 's/^/| /' conftest.$ac_ext >&5
37471
37472 ac_cv_lib_crypt_crypt=no
37473 fi
37474 rm -f conftest.err conftest.$ac_objext \
37475       conftest$ac_exeext conftest.$ac_ext
37476 LIBS=$ac_check_lib_save_LIBS
37477 fi
37478 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
37479 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
37480 if test $ac_cv_lib_crypt_crypt = yes; then
37481   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
37482                         have_crypt=yes
37483 else
37484   have_crypt=no
37485 fi
37486
37487 fi
37488
37489
37490         LIBS="$save_LIBS"
37491
37492         if test $have_crypt = yes ; then
37493
37494 cat >>confdefs.h <<\_ACEOF
37495 #define HAVE_CRYPT 1
37496 _ACEOF
37497
37498         else
37499                 { echo "$as_me:$LINENO: WARNING: could not find crypt" >&5
37500 echo "$as_me: WARNING: could not find crypt" >&2;}
37501                 if test $ol_enable_crypt = yes ; then
37502                         { { echo "$as_me:$LINENO: error: could not find crypt, select appropriate options or disable" >&5
37503 echo "$as_me: error: could not find crypt, select appropriate options or disable" >&2;}
37504    { (exit 1); exit 1; }; }
37505                 fi
37506
37507                 { echo "$as_me:$LINENO: WARNING: disabling crypt support" >&5
37508 echo "$as_me: WARNING: disabling crypt support" >&2;}
37509                 ol_enable_crypt=no
37510         fi
37511 fi
37512
37513 if test $ol_enable_proctitle != no ; then
37514         echo "$as_me:$LINENO: checking for setproctitle" >&5
37515 echo $ECHO_N "checking for setproctitle... $ECHO_C" >&6
37516 if test "${ac_cv_func_setproctitle+set}" = set; then
37517   echo $ECHO_N "(cached) $ECHO_C" >&6
37518 else
37519   cat >conftest.$ac_ext <<_ACEOF
37520 /* confdefs.h.  */
37521 _ACEOF
37522 cat confdefs.h >>conftest.$ac_ext
37523 cat >>conftest.$ac_ext <<_ACEOF
37524 /* end confdefs.h.  */
37525 /* Define setproctitle to an innocuous variant, in case <limits.h> declares setproctitle.
37526    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
37527 #define setproctitle innocuous_setproctitle
37528
37529 /* System header to define __stub macros and hopefully few prototypes,
37530     which can conflict with char setproctitle (); below.
37531     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
37532     <limits.h> exists even on freestanding compilers.  */
37533
37534 #ifdef __STDC__
37535 # include <limits.h>
37536 #else
37537 # include <assert.h>
37538 #endif
37539
37540 #undef setproctitle
37541
37542 /* Override any gcc2 internal prototype to avoid an error.  */
37543 #ifdef __cplusplus
37544 extern "C"
37545 {
37546 #endif
37547 /* We use char because int might match the return type of a gcc2
37548    builtin and then its argument prototype would still apply.  */
37549 char setproctitle ();
37550 /* The GNU C library defines this for functions which it implements
37551     to always fail with ENOSYS.  Some functions are actually named
37552     something starting with __ and the normal name is an alias.  */
37553 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
37554 choke me
37555 #else
37556 char (*f) () = setproctitle;
37557 #endif
37558 #ifdef __cplusplus
37559 }
37560 #endif
37561
37562 int
37563 main ()
37564 {
37565 return f != setproctitle;
37566   ;
37567   return 0;
37568 }
37569 _ACEOF
37570 rm -f conftest.$ac_objext conftest$ac_exeext
37571 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37572   (eval $ac_link) 2>conftest.er1
37573   ac_status=$?
37574   grep -v '^ *+' conftest.er1 >conftest.err
37575   rm -f conftest.er1
37576   cat conftest.err >&5
37577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37578   (exit $ac_status); } &&
37579          { ac_try='test -z "$ac_c_werror_flag"
37580                          || test ! -s conftest.err'
37581   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37582   (eval $ac_try) 2>&5
37583   ac_status=$?
37584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37585   (exit $ac_status); }; } &&
37586          { ac_try='test -s conftest$ac_exeext'
37587   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37588   (eval $ac_try) 2>&5
37589   ac_status=$?
37590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37591   (exit $ac_status); }; }; then
37592   ac_cv_func_setproctitle=yes
37593 else
37594   echo "$as_me: failed program was:" >&5
37595 sed 's/^/| /' conftest.$ac_ext >&5
37596
37597 ac_cv_func_setproctitle=no
37598 fi
37599 rm -f conftest.err conftest.$ac_objext \
37600       conftest$ac_exeext conftest.$ac_ext
37601 fi
37602 echo "$as_me:$LINENO: result: $ac_cv_func_setproctitle" >&5
37603 echo "${ECHO_T}$ac_cv_func_setproctitle" >&6
37604 if test $ac_cv_func_setproctitle = yes; then
37605   have_setproctitle=yes
37606 else
37607
37608                 echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
37609 echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
37610 if test "${ac_cv_lib_util_setproctitle+set}" = set; then
37611   echo $ECHO_N "(cached) $ECHO_C" >&6
37612 else
37613   ac_check_lib_save_LIBS=$LIBS
37614 LIBS="-lutil  $LIBS"
37615 cat >conftest.$ac_ext <<_ACEOF
37616 /* confdefs.h.  */
37617 _ACEOF
37618 cat confdefs.h >>conftest.$ac_ext
37619 cat >>conftest.$ac_ext <<_ACEOF
37620 /* end confdefs.h.  */
37621
37622 /* Override any gcc2 internal prototype to avoid an error.  */
37623 #ifdef __cplusplus
37624 extern "C"
37625 #endif
37626 /* We use char because int might match the return type of a gcc2
37627    builtin and then its argument prototype would still apply.  */
37628 char setproctitle ();
37629 int
37630 main ()
37631 {
37632 setproctitle ();
37633   ;
37634   return 0;
37635 }
37636 _ACEOF
37637 rm -f conftest.$ac_objext conftest$ac_exeext
37638 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37639   (eval $ac_link) 2>conftest.er1
37640   ac_status=$?
37641   grep -v '^ *+' conftest.er1 >conftest.err
37642   rm -f conftest.er1
37643   cat conftest.err >&5
37644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37645   (exit $ac_status); } &&
37646          { ac_try='test -z "$ac_c_werror_flag"
37647                          || test ! -s conftest.err'
37648   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37649   (eval $ac_try) 2>&5
37650   ac_status=$?
37651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37652   (exit $ac_status); }; } &&
37653          { ac_try='test -s conftest$ac_exeext'
37654   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37655   (eval $ac_try) 2>&5
37656   ac_status=$?
37657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37658   (exit $ac_status); }; }; then
37659   ac_cv_lib_util_setproctitle=yes
37660 else
37661   echo "$as_me: failed program was:" >&5
37662 sed 's/^/| /' conftest.$ac_ext >&5
37663
37664 ac_cv_lib_util_setproctitle=no
37665 fi
37666 rm -f conftest.err conftest.$ac_objext \
37667       conftest$ac_exeext conftest.$ac_ext
37668 LIBS=$ac_check_lib_save_LIBS
37669 fi
37670 echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
37671 echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
37672 if test $ac_cv_lib_util_setproctitle = yes; then
37673   have_setproctitle=yes
37674                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
37675 else
37676   have_setproctitle=no
37677                         case $LIBOBJS in
37678     "setproctitle.$ac_objext"   | \
37679   *" setproctitle.$ac_objext"   | \
37680     "setproctitle.$ac_objext "* | \
37681   *" setproctitle.$ac_objext "* ) ;;
37682   *) LIBOBJS="$LIBOBJS setproctitle.$ac_objext" ;;
37683 esac
37684
37685                         LIBSRCS="$LIBSRCS setproctitle.c"
37686 fi
37687
37688 fi
37689
37690
37691         if test $have_setproctitle = yes ; then
37692
37693 cat >>confdefs.h <<\_ACEOF
37694 #define HAVE_SETPROCTITLE 1
37695 _ACEOF
37696
37697         fi
37698 fi
37699
37700 if test $ol_enable_slp != no ; then
37701
37702 for ac_header in slp.h
37703 do
37704 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
37705 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37706   echo "$as_me:$LINENO: checking for $ac_header" >&5
37707 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37708 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37709   echo $ECHO_N "(cached) $ECHO_C" >&6
37710 fi
37711 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37712 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37713 else
37714   # Is the header compilable?
37715 echo "$as_me:$LINENO: checking $ac_header usability" >&5
37716 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
37717 cat >conftest.$ac_ext <<_ACEOF
37718 /* confdefs.h.  */
37719 _ACEOF
37720 cat confdefs.h >>conftest.$ac_ext
37721 cat >>conftest.$ac_ext <<_ACEOF
37722 /* end confdefs.h.  */
37723 $ac_includes_default
37724 #include <$ac_header>
37725 _ACEOF
37726 rm -f conftest.$ac_objext
37727 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37728   (eval $ac_compile) 2>conftest.er1
37729   ac_status=$?
37730   grep -v '^ *+' conftest.er1 >conftest.err
37731   rm -f conftest.er1
37732   cat conftest.err >&5
37733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37734   (exit $ac_status); } &&
37735          { ac_try='test -z "$ac_c_werror_flag"
37736                          || test ! -s conftest.err'
37737   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37738   (eval $ac_try) 2>&5
37739   ac_status=$?
37740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37741   (exit $ac_status); }; } &&
37742          { ac_try='test -s conftest.$ac_objext'
37743   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37744   (eval $ac_try) 2>&5
37745   ac_status=$?
37746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37747   (exit $ac_status); }; }; then
37748   ac_header_compiler=yes
37749 else
37750   echo "$as_me: failed program was:" >&5
37751 sed 's/^/| /' conftest.$ac_ext >&5
37752
37753 ac_header_compiler=no
37754 fi
37755 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37756 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
37757 echo "${ECHO_T}$ac_header_compiler" >&6
37758
37759 # Is the header present?
37760 echo "$as_me:$LINENO: checking $ac_header presence" >&5
37761 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
37762 cat >conftest.$ac_ext <<_ACEOF
37763 /* confdefs.h.  */
37764 _ACEOF
37765 cat confdefs.h >>conftest.$ac_ext
37766 cat >>conftest.$ac_ext <<_ACEOF
37767 /* end confdefs.h.  */
37768 #include <$ac_header>
37769 _ACEOF
37770 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
37771   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
37772   ac_status=$?
37773   grep -v '^ *+' conftest.er1 >conftest.err
37774   rm -f conftest.er1
37775   cat conftest.err >&5
37776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37777   (exit $ac_status); } >/dev/null; then
37778   if test -s conftest.err; then
37779     ac_cpp_err=$ac_c_preproc_warn_flag
37780     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
37781   else
37782     ac_cpp_err=
37783   fi
37784 else
37785   ac_cpp_err=yes
37786 fi
37787 if test -z "$ac_cpp_err"; then
37788   ac_header_preproc=yes
37789 else
37790   echo "$as_me: failed program was:" >&5
37791 sed 's/^/| /' conftest.$ac_ext >&5
37792
37793   ac_header_preproc=no
37794 fi
37795 rm -f conftest.err conftest.$ac_ext
37796 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
37797 echo "${ECHO_T}$ac_header_preproc" >&6
37798
37799 # So?  What about this header?
37800 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
37801   yes:no: )
37802     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
37803 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
37804     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
37805 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
37806     ac_header_preproc=yes
37807     ;;
37808   no:yes:* )
37809     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
37810 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
37811     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
37812 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
37813     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
37814 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
37815     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
37816 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
37817     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
37818 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
37819     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
37820 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
37821     (
37822       cat <<\_ASBOX
37823 ## --------------------------------------------- ##
37824 ## Report this to <http://www.openldap.org/its/> ##
37825 ## --------------------------------------------- ##
37826 _ASBOX
37827     ) |
37828       sed "s/^/$as_me: WARNING:     /" >&2
37829     ;;
37830 esac
37831 echo "$as_me:$LINENO: checking for $ac_header" >&5
37832 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37833 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37834   echo $ECHO_N "(cached) $ECHO_C" >&6
37835 else
37836   eval "$as_ac_Header=\$ac_header_preproc"
37837 fi
37838 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37839 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37840
37841 fi
37842 if test `eval echo '${'$as_ac_Header'}'` = yes; then
37843   cat >>confdefs.h <<_ACEOF
37844 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
37845 _ACEOF
37846
37847 fi
37848
37849 done
37850
37851
37852         if test $ac_cv_header_slp_h = yes ; then
37853                 echo "$as_me:$LINENO: checking for SLPOpen in -lslp" >&5
37854 echo $ECHO_N "checking for SLPOpen in -lslp... $ECHO_C" >&6
37855 if test "${ac_cv_lib_slp_SLPOpen+set}" = set; then
37856   echo $ECHO_N "(cached) $ECHO_C" >&6
37857 else
37858   ac_check_lib_save_LIBS=$LIBS
37859 LIBS="-lslp  $LIBS"
37860 cat >conftest.$ac_ext <<_ACEOF
37861 /* confdefs.h.  */
37862 _ACEOF
37863 cat confdefs.h >>conftest.$ac_ext
37864 cat >>conftest.$ac_ext <<_ACEOF
37865 /* end confdefs.h.  */
37866
37867 /* Override any gcc2 internal prototype to avoid an error.  */
37868 #ifdef __cplusplus
37869 extern "C"
37870 #endif
37871 /* We use char because int might match the return type of a gcc2
37872    builtin and then its argument prototype would still apply.  */
37873 char SLPOpen ();
37874 int
37875 main ()
37876 {
37877 SLPOpen ();
37878   ;
37879   return 0;
37880 }
37881 _ACEOF
37882 rm -f conftest.$ac_objext conftest$ac_exeext
37883 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37884   (eval $ac_link) 2>conftest.er1
37885   ac_status=$?
37886   grep -v '^ *+' conftest.er1 >conftest.err
37887   rm -f conftest.er1
37888   cat conftest.err >&5
37889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37890   (exit $ac_status); } &&
37891          { ac_try='test -z "$ac_c_werror_flag"
37892                          || test ! -s conftest.err'
37893   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37894   (eval $ac_try) 2>&5
37895   ac_status=$?
37896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37897   (exit $ac_status); }; } &&
37898          { ac_try='test -s conftest$ac_exeext'
37899   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37900   (eval $ac_try) 2>&5
37901   ac_status=$?
37902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37903   (exit $ac_status); }; }; then
37904   ac_cv_lib_slp_SLPOpen=yes
37905 else
37906   echo "$as_me: failed program was:" >&5
37907 sed 's/^/| /' conftest.$ac_ext >&5
37908
37909 ac_cv_lib_slp_SLPOpen=no
37910 fi
37911 rm -f conftest.err conftest.$ac_objext \
37912       conftest$ac_exeext conftest.$ac_ext
37913 LIBS=$ac_check_lib_save_LIBS
37914 fi
37915 echo "$as_me:$LINENO: result: $ac_cv_lib_slp_SLPOpen" >&5
37916 echo "${ECHO_T}$ac_cv_lib_slp_SLPOpen" >&6
37917 if test $ac_cv_lib_slp_SLPOpen = yes; then
37918   have_slp=yes
37919 else
37920   have_slp=no
37921 fi
37922
37923                 if test $have_slp = yes ; then
37924
37925 cat >>confdefs.h <<\_ACEOF
37926 #define HAVE_SLP 1
37927 _ACEOF
37928
37929                         SLAPD_SLP_LIBS=-lslp
37930                 fi
37931
37932         elif test $ol_enable_slp = yes ; then
37933                 { { echo "$as_me:$LINENO: error: SLP not found" >&5
37934 echo "$as_me: error: SLP not found" >&2;}
37935    { (exit 1); exit 1; }; }
37936         fi
37937 fi
37938
37939 if test "$ol_with_multiple_precision" != "no" ; then
37940         ol_have_bignum=no
37941         ol_have_gmp=no
37942
37943
37944
37945 for ac_header in openssl/bn.h bn.h
37946 do
37947 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
37948 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37949   echo "$as_me:$LINENO: checking for $ac_header" >&5
37950 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37951 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37952   echo $ECHO_N "(cached) $ECHO_C" >&6
37953 fi
37954 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37955 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37956 else
37957   # Is the header compilable?
37958 echo "$as_me:$LINENO: checking $ac_header usability" >&5
37959 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
37960 cat >conftest.$ac_ext <<_ACEOF
37961 /* confdefs.h.  */
37962 _ACEOF
37963 cat confdefs.h >>conftest.$ac_ext
37964 cat >>conftest.$ac_ext <<_ACEOF
37965 /* end confdefs.h.  */
37966 $ac_includes_default
37967 #include <$ac_header>
37968 _ACEOF
37969 rm -f conftest.$ac_objext
37970 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37971   (eval $ac_compile) 2>conftest.er1
37972   ac_status=$?
37973   grep -v '^ *+' conftest.er1 >conftest.err
37974   rm -f conftest.er1
37975   cat conftest.err >&5
37976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37977   (exit $ac_status); } &&
37978          { ac_try='test -z "$ac_c_werror_flag"
37979                          || test ! -s conftest.err'
37980   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37981   (eval $ac_try) 2>&5
37982   ac_status=$?
37983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37984   (exit $ac_status); }; } &&
37985          { ac_try='test -s conftest.$ac_objext'
37986   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37987   (eval $ac_try) 2>&5
37988   ac_status=$?
37989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37990   (exit $ac_status); }; }; then
37991   ac_header_compiler=yes
37992 else
37993   echo "$as_me: failed program was:" >&5
37994 sed 's/^/| /' conftest.$ac_ext >&5
37995
37996 ac_header_compiler=no
37997 fi
37998 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37999 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
38000 echo "${ECHO_T}$ac_header_compiler" >&6
38001
38002 # Is the header present?
38003 echo "$as_me:$LINENO: checking $ac_header presence" >&5
38004 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
38005 cat >conftest.$ac_ext <<_ACEOF
38006 /* confdefs.h.  */
38007 _ACEOF
38008 cat confdefs.h >>conftest.$ac_ext
38009 cat >>conftest.$ac_ext <<_ACEOF
38010 /* end confdefs.h.  */
38011 #include <$ac_header>
38012 _ACEOF
38013 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
38014   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
38015   ac_status=$?
38016   grep -v '^ *+' conftest.er1 >conftest.err
38017   rm -f conftest.er1
38018   cat conftest.err >&5
38019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38020   (exit $ac_status); } >/dev/null; then
38021   if test -s conftest.err; then
38022     ac_cpp_err=$ac_c_preproc_warn_flag
38023     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
38024   else
38025     ac_cpp_err=
38026   fi
38027 else
38028   ac_cpp_err=yes
38029 fi
38030 if test -z "$ac_cpp_err"; then
38031   ac_header_preproc=yes
38032 else
38033   echo "$as_me: failed program was:" >&5
38034 sed 's/^/| /' conftest.$ac_ext >&5
38035
38036   ac_header_preproc=no
38037 fi
38038 rm -f conftest.err conftest.$ac_ext
38039 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
38040 echo "${ECHO_T}$ac_header_preproc" >&6
38041
38042 # So?  What about this header?
38043 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
38044   yes:no: )
38045     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
38046 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
38047     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
38048 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
38049     ac_header_preproc=yes
38050     ;;
38051   no:yes:* )
38052     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
38053 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
38054     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
38055 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
38056     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
38057 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
38058     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
38059 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
38060     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
38061 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
38062     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
38063 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
38064     (
38065       cat <<\_ASBOX
38066 ## --------------------------------------------- ##
38067 ## Report this to <http://www.openldap.org/its/> ##
38068 ## --------------------------------------------- ##
38069 _ASBOX
38070     ) |
38071       sed "s/^/$as_me: WARNING:     /" >&2
38072     ;;
38073 esac
38074 echo "$as_me:$LINENO: checking for $ac_header" >&5
38075 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
38076 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38077   echo $ECHO_N "(cached) $ECHO_C" >&6
38078 else
38079   eval "$as_ac_Header=\$ac_header_preproc"
38080 fi
38081 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
38082 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
38083
38084 fi
38085 if test `eval echo '${'$as_ac_Header'}'` = yes; then
38086   cat >>confdefs.h <<_ACEOF
38087 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
38088 _ACEOF
38089
38090 fi
38091
38092 done
38093
38094
38095
38096 for ac_header in openssl/crypto.h crypto.h
38097 do
38098 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
38099 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38100   echo "$as_me:$LINENO: checking for $ac_header" >&5
38101 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
38102 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38103   echo $ECHO_N "(cached) $ECHO_C" >&6
38104 fi
38105 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
38106 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
38107 else
38108   # Is the header compilable?
38109 echo "$as_me:$LINENO: checking $ac_header usability" >&5
38110 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
38111 cat >conftest.$ac_ext <<_ACEOF
38112 /* confdefs.h.  */
38113 _ACEOF
38114 cat confdefs.h >>conftest.$ac_ext
38115 cat >>conftest.$ac_ext <<_ACEOF
38116 /* end confdefs.h.  */
38117 $ac_includes_default
38118 #include <$ac_header>
38119 _ACEOF
38120 rm -f conftest.$ac_objext
38121 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38122   (eval $ac_compile) 2>conftest.er1
38123   ac_status=$?
38124   grep -v '^ *+' conftest.er1 >conftest.err
38125   rm -f conftest.er1
38126   cat conftest.err >&5
38127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38128   (exit $ac_status); } &&
38129          { ac_try='test -z "$ac_c_werror_flag"
38130                          || test ! -s conftest.err'
38131   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38132   (eval $ac_try) 2>&5
38133   ac_status=$?
38134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38135   (exit $ac_status); }; } &&
38136          { ac_try='test -s conftest.$ac_objext'
38137   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38138   (eval $ac_try) 2>&5
38139   ac_status=$?
38140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38141   (exit $ac_status); }; }; then
38142   ac_header_compiler=yes
38143 else
38144   echo "$as_me: failed program was:" >&5
38145 sed 's/^/| /' conftest.$ac_ext >&5
38146
38147 ac_header_compiler=no
38148 fi
38149 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38150 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
38151 echo "${ECHO_T}$ac_header_compiler" >&6
38152
38153 # Is the header present?
38154 echo "$as_me:$LINENO: checking $ac_header presence" >&5
38155 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
38156 cat >conftest.$ac_ext <<_ACEOF
38157 /* confdefs.h.  */
38158 _ACEOF
38159 cat confdefs.h >>conftest.$ac_ext
38160 cat >>conftest.$ac_ext <<_ACEOF
38161 /* end confdefs.h.  */
38162 #include <$ac_header>
38163 _ACEOF
38164 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
38165   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
38166   ac_status=$?
38167   grep -v '^ *+' conftest.er1 >conftest.err
38168   rm -f conftest.er1
38169   cat conftest.err >&5
38170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38171   (exit $ac_status); } >/dev/null; then
38172   if test -s conftest.err; then
38173     ac_cpp_err=$ac_c_preproc_warn_flag
38174     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
38175   else
38176     ac_cpp_err=
38177   fi
38178 else
38179   ac_cpp_err=yes
38180 fi
38181 if test -z "$ac_cpp_err"; then
38182   ac_header_preproc=yes
38183 else
38184   echo "$as_me: failed program was:" >&5
38185 sed 's/^/| /' conftest.$ac_ext >&5
38186
38187   ac_header_preproc=no
38188 fi
38189 rm -f conftest.err conftest.$ac_ext
38190 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
38191 echo "${ECHO_T}$ac_header_preproc" >&6
38192
38193 # So?  What about this header?
38194 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
38195   yes:no: )
38196     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
38197 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
38198     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
38199 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
38200     ac_header_preproc=yes
38201     ;;
38202   no:yes:* )
38203     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
38204 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
38205     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
38206 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
38207     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
38208 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
38209     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
38210 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
38211     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
38212 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
38213     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
38214 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
38215     (
38216       cat <<\_ASBOX
38217 ## --------------------------------------------- ##
38218 ## Report this to <http://www.openldap.org/its/> ##
38219 ## --------------------------------------------- ##
38220 _ASBOX
38221     ) |
38222       sed "s/^/$as_me: WARNING:     /" >&2
38223     ;;
38224 esac
38225 echo "$as_me:$LINENO: checking for $ac_header" >&5
38226 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
38227 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38228   echo $ECHO_N "(cached) $ECHO_C" >&6
38229 else
38230   eval "$as_ac_Header=\$ac_header_preproc"
38231 fi
38232 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
38233 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
38234
38235 fi
38236 if test `eval echo '${'$as_ac_Header'}'` = yes; then
38237   cat >>confdefs.h <<_ACEOF
38238 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
38239 _ACEOF
38240
38241 fi
38242
38243 done
38244
38245
38246 for ac_header in gmp.h
38247 do
38248 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
38249 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38250   echo "$as_me:$LINENO: checking for $ac_header" >&5
38251 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
38252 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38253   echo $ECHO_N "(cached) $ECHO_C" >&6
38254 fi
38255 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
38256 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
38257 else
38258   # Is the header compilable?
38259 echo "$as_me:$LINENO: checking $ac_header usability" >&5
38260 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
38261 cat >conftest.$ac_ext <<_ACEOF
38262 /* confdefs.h.  */
38263 _ACEOF
38264 cat confdefs.h >>conftest.$ac_ext
38265 cat >>conftest.$ac_ext <<_ACEOF
38266 /* end confdefs.h.  */
38267 $ac_includes_default
38268 #include <$ac_header>
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_header_compiler=yes
38293 else
38294   echo "$as_me: failed program was:" >&5
38295 sed 's/^/| /' conftest.$ac_ext >&5
38296
38297 ac_header_compiler=no
38298 fi
38299 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38300 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
38301 echo "${ECHO_T}$ac_header_compiler" >&6
38302
38303 # Is the header present?
38304 echo "$as_me:$LINENO: checking $ac_header presence" >&5
38305 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
38306 cat >conftest.$ac_ext <<_ACEOF
38307 /* confdefs.h.  */
38308 _ACEOF
38309 cat confdefs.h >>conftest.$ac_ext
38310 cat >>conftest.$ac_ext <<_ACEOF
38311 /* end confdefs.h.  */
38312 #include <$ac_header>
38313 _ACEOF
38314 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
38315   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
38316   ac_status=$?
38317   grep -v '^ *+' conftest.er1 >conftest.err
38318   rm -f conftest.er1
38319   cat conftest.err >&5
38320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38321   (exit $ac_status); } >/dev/null; then
38322   if test -s conftest.err; then
38323     ac_cpp_err=$ac_c_preproc_warn_flag
38324     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
38325   else
38326     ac_cpp_err=
38327   fi
38328 else
38329   ac_cpp_err=yes
38330 fi
38331 if test -z "$ac_cpp_err"; then
38332   ac_header_preproc=yes
38333 else
38334   echo "$as_me: failed program was:" >&5
38335 sed 's/^/| /' conftest.$ac_ext >&5
38336
38337   ac_header_preproc=no
38338 fi
38339 rm -f conftest.err conftest.$ac_ext
38340 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
38341 echo "${ECHO_T}$ac_header_preproc" >&6
38342
38343 # So?  What about this header?
38344 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
38345   yes:no: )
38346     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
38347 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
38348     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
38349 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
38350     ac_header_preproc=yes
38351     ;;
38352   no:yes:* )
38353     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
38354 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
38355     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
38356 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
38357     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
38358 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
38359     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
38360 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
38361     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
38362 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
38363     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
38364 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
38365     (
38366       cat <<\_ASBOX
38367 ## --------------------------------------------- ##
38368 ## Report this to <http://www.openldap.org/its/> ##
38369 ## --------------------------------------------- ##
38370 _ASBOX
38371     ) |
38372       sed "s/^/$as_me: WARNING:     /" >&2
38373     ;;
38374 esac
38375 echo "$as_me:$LINENO: checking for $ac_header" >&5
38376 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
38377 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38378   echo $ECHO_N "(cached) $ECHO_C" >&6
38379 else
38380   eval "$as_ac_Header=\$ac_header_preproc"
38381 fi
38382 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
38383 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
38384
38385 fi
38386 if test `eval echo '${'$as_ac_Header'}'` = yes; then
38387   cat >>confdefs.h <<_ACEOF
38388 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
38389 _ACEOF
38390
38391 fi
38392
38393 done
38394
38395
38396         if test "$ol_with_tls" = "found" ; then
38397                 ol_have_bn_h=no
38398                 ol_have_crypto_h=no
38399
38400                 if test "$ac_cv_header_openssl_bn_h" = "yes" ||
38401                    test "$ac_cv_header_bn_h" = "yes" ; then
38402                         ol_have_bn_h=yes
38403                 fi
38404
38405                 if test "$ac_cv_header_openssl_crypto_h" = "yes" ||
38406                    test "$ac_cv_header_crypto_h" = "yes" ; then
38407                         ol_have_crypto_h=yes
38408                 fi
38409
38410                 if test "$ol_have_bn_h" = "yes" &&
38411                    test "$ol_have_crypto_h" = "yes" ; then
38412                         ol_have_bignum=yes
38413                 fi
38414         fi
38415
38416         if test $ac_cv_header_gmp_h = yes ; then
38417                 echo "$as_me:$LINENO: checking for __gmpz_add_ui in -lgmp" >&5
38418 echo $ECHO_N "checking for __gmpz_add_ui in -lgmp... $ECHO_C" >&6
38419 if test "${ac_cv_lib_gmp___gmpz_add_ui+set}" = set; then
38420   echo $ECHO_N "(cached) $ECHO_C" >&6
38421 else
38422   ac_check_lib_save_LIBS=$LIBS
38423 LIBS="-lgmp  $LIBS"
38424 cat >conftest.$ac_ext <<_ACEOF
38425 /* confdefs.h.  */
38426 _ACEOF
38427 cat confdefs.h >>conftest.$ac_ext
38428 cat >>conftest.$ac_ext <<_ACEOF
38429 /* end confdefs.h.  */
38430
38431 /* Override any gcc2 internal prototype to avoid an error.  */
38432 #ifdef __cplusplus
38433 extern "C"
38434 #endif
38435 /* We use char because int might match the return type of a gcc2
38436    builtin and then its argument prototype would still apply.  */
38437 char __gmpz_add_ui ();
38438 int
38439 main ()
38440 {
38441 __gmpz_add_ui ();
38442   ;
38443   return 0;
38444 }
38445 _ACEOF
38446 rm -f conftest.$ac_objext conftest$ac_exeext
38447 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38448   (eval $ac_link) 2>conftest.er1
38449   ac_status=$?
38450   grep -v '^ *+' conftest.er1 >conftest.err
38451   rm -f conftest.er1
38452   cat conftest.err >&5
38453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38454   (exit $ac_status); } &&
38455          { ac_try='test -z "$ac_c_werror_flag"
38456                          || test ! -s conftest.err'
38457   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38458   (eval $ac_try) 2>&5
38459   ac_status=$?
38460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38461   (exit $ac_status); }; } &&
38462          { ac_try='test -s conftest$ac_exeext'
38463   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38464   (eval $ac_try) 2>&5
38465   ac_status=$?
38466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38467   (exit $ac_status); }; }; then
38468   ac_cv_lib_gmp___gmpz_add_ui=yes
38469 else
38470   echo "$as_me: failed program was:" >&5
38471 sed 's/^/| /' conftest.$ac_ext >&5
38472
38473 ac_cv_lib_gmp___gmpz_add_ui=no
38474 fi
38475 rm -f conftest.err conftest.$ac_objext \
38476       conftest$ac_exeext conftest.$ac_ext
38477 LIBS=$ac_check_lib_save_LIBS
38478 fi
38479 echo "$as_me:$LINENO: result: $ac_cv_lib_gmp___gmpz_add_ui" >&5
38480 echo "${ECHO_T}$ac_cv_lib_gmp___gmpz_add_ui" >&6
38481 if test $ac_cv_lib_gmp___gmpz_add_ui = yes; then
38482   have_gmp=yes
38483 else
38484   have_gmp=no
38485 fi
38486
38487                 if test $have_gmp = yes ; then
38488                         ol_have_gmp=yes
38489                 fi
38490         fi
38491
38492         echo "$as_me:$LINENO: checking for multiple precision support" >&5
38493 echo $ECHO_N "checking for multiple precision support... $ECHO_C" >&6
38494
38495         ol_mp_support="none"
38496         case "$ol_with_multiple_precision" in
38497         auto)
38498                                                                                 if test "$ol_have_bignum" = "yes" ; then
38499                         ol_mp_support="bignum"
38500                 else
38501                         if test "$ol_have_gmp" = "yes" ; then
38502                                 ol_mp_support="gmp"
38503                         fi
38504                 fi
38505                 ;;
38506         bignum)
38507                 if test "$ol_have_bignum" != "yes" ; then
38508                         { { echo "$as_me:$LINENO: error: OpenSSL's BIGNUM not available" >&5
38509 echo "$as_me: error: OpenSSL's BIGNUM not available" >&2;}
38510    { (exit 1); exit 1; }; }
38511                 fi
38512                 ol_mp_support="bignum"
38513                 ;;
38514         gmp)
38515                 if test "$ol_have_gmp" != "yes" ; then
38516                         { { echo "$as_me:$LINENO: error: GMP not available" >&5
38517 echo "$as_me: error: GMP not available" >&2;}
38518    { (exit 1); exit 1; }; }
38519                 fi
38520                 ol_mp_support="gmp"
38521                 ;;
38522         yes)
38523                 if test "$ol_have_bignum" = "yes" ; then
38524                         ol_mp_support="bignum"
38525                 elif test "$ol_have_gmp" = "yes" ; then
38526                         ol_mp_support="gmp"
38527                 else
38528                         { { echo "$as_me:$LINENO: error: not available" >&5
38529 echo "$as_me: error: not available" >&2;}
38530    { (exit 1); exit 1; }; }
38531                 fi
38532                 ;;
38533         esac
38534
38535         case "$ol_mp_support" in
38536         bignum)
38537
38538 cat >>confdefs.h <<\_ACEOF
38539 #define HAVE_BIGNUM 1
38540 _ACEOF
38541
38542                 ;;
38543         gmp)
38544
38545 cat >>confdefs.h <<\_ACEOF
38546 #define HAVE_GMP 1
38547 _ACEOF
38548
38549                 SLAPD_GMP_LIBS=-lgmp
38550                 ;;
38551         none)
38552                 ;;
38553         esac
38554
38555         echo "$as_me:$LINENO: result: $ol_mp_support" >&5
38556 echo "${ECHO_T}$ol_mp_support" >&6
38557 fi
38558
38559
38560 echo "$as_me:$LINENO: checking for mode_t" >&5
38561 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
38562 if test "${ac_cv_type_mode_t+set}" = set; then
38563   echo $ECHO_N "(cached) $ECHO_C" >&6
38564 else
38565   cat >conftest.$ac_ext <<_ACEOF
38566 /* confdefs.h.  */
38567 _ACEOF
38568 cat confdefs.h >>conftest.$ac_ext
38569 cat >>conftest.$ac_ext <<_ACEOF
38570 /* end confdefs.h.  */
38571 $ac_includes_default
38572 int
38573 main ()
38574 {
38575 if ((mode_t *) 0)
38576   return 0;
38577 if (sizeof (mode_t))
38578   return 0;
38579   ;
38580   return 0;
38581 }
38582 _ACEOF
38583 rm -f conftest.$ac_objext
38584 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38585   (eval $ac_compile) 2>conftest.er1
38586   ac_status=$?
38587   grep -v '^ *+' conftest.er1 >conftest.err
38588   rm -f conftest.er1
38589   cat conftest.err >&5
38590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38591   (exit $ac_status); } &&
38592          { ac_try='test -z "$ac_c_werror_flag"
38593                          || test ! -s conftest.err'
38594   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38595   (eval $ac_try) 2>&5
38596   ac_status=$?
38597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38598   (exit $ac_status); }; } &&
38599          { ac_try='test -s conftest.$ac_objext'
38600   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38601   (eval $ac_try) 2>&5
38602   ac_status=$?
38603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38604   (exit $ac_status); }; }; then
38605   ac_cv_type_mode_t=yes
38606 else
38607   echo "$as_me: failed program was:" >&5
38608 sed 's/^/| /' conftest.$ac_ext >&5
38609
38610 ac_cv_type_mode_t=no
38611 fi
38612 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38613 fi
38614 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
38615 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
38616 if test $ac_cv_type_mode_t = yes; then
38617   :
38618 else
38619
38620 cat >>confdefs.h <<_ACEOF
38621 #define mode_t int
38622 _ACEOF
38623
38624 fi
38625
38626 echo "$as_me:$LINENO: checking for off_t" >&5
38627 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
38628 if test "${ac_cv_type_off_t+set}" = set; then
38629   echo $ECHO_N "(cached) $ECHO_C" >&6
38630 else
38631   cat >conftest.$ac_ext <<_ACEOF
38632 /* confdefs.h.  */
38633 _ACEOF
38634 cat confdefs.h >>conftest.$ac_ext
38635 cat >>conftest.$ac_ext <<_ACEOF
38636 /* end confdefs.h.  */
38637 $ac_includes_default
38638 int
38639 main ()
38640 {
38641 if ((off_t *) 0)
38642   return 0;
38643 if (sizeof (off_t))
38644   return 0;
38645   ;
38646   return 0;
38647 }
38648 _ACEOF
38649 rm -f conftest.$ac_objext
38650 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38651   (eval $ac_compile) 2>conftest.er1
38652   ac_status=$?
38653   grep -v '^ *+' conftest.er1 >conftest.err
38654   rm -f conftest.er1
38655   cat conftest.err >&5
38656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38657   (exit $ac_status); } &&
38658          { ac_try='test -z "$ac_c_werror_flag"
38659                          || test ! -s conftest.err'
38660   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38661   (eval $ac_try) 2>&5
38662   ac_status=$?
38663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38664   (exit $ac_status); }; } &&
38665          { ac_try='test -s conftest.$ac_objext'
38666   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38667   (eval $ac_try) 2>&5
38668   ac_status=$?
38669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38670   (exit $ac_status); }; }; then
38671   ac_cv_type_off_t=yes
38672 else
38673   echo "$as_me: failed program was:" >&5
38674 sed 's/^/| /' conftest.$ac_ext >&5
38675
38676 ac_cv_type_off_t=no
38677 fi
38678 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38679 fi
38680 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
38681 echo "${ECHO_T}$ac_cv_type_off_t" >&6
38682 if test $ac_cv_type_off_t = yes; then
38683   :
38684 else
38685
38686 cat >>confdefs.h <<_ACEOF
38687 #define off_t long
38688 _ACEOF
38689
38690 fi
38691
38692 echo "$as_me:$LINENO: checking for pid_t" >&5
38693 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
38694 if test "${ac_cv_type_pid_t+set}" = set; then
38695   echo $ECHO_N "(cached) $ECHO_C" >&6
38696 else
38697   cat >conftest.$ac_ext <<_ACEOF
38698 /* confdefs.h.  */
38699 _ACEOF
38700 cat confdefs.h >>conftest.$ac_ext
38701 cat >>conftest.$ac_ext <<_ACEOF
38702 /* end confdefs.h.  */
38703 $ac_includes_default
38704 int
38705 main ()
38706 {
38707 if ((pid_t *) 0)
38708   return 0;
38709 if (sizeof (pid_t))
38710   return 0;
38711   ;
38712   return 0;
38713 }
38714 _ACEOF
38715 rm -f conftest.$ac_objext
38716 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38717   (eval $ac_compile) 2>conftest.er1
38718   ac_status=$?
38719   grep -v '^ *+' conftest.er1 >conftest.err
38720   rm -f conftest.er1
38721   cat conftest.err >&5
38722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38723   (exit $ac_status); } &&
38724          { ac_try='test -z "$ac_c_werror_flag"
38725                          || test ! -s conftest.err'
38726   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38727   (eval $ac_try) 2>&5
38728   ac_status=$?
38729   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38730   (exit $ac_status); }; } &&
38731          { ac_try='test -s conftest.$ac_objext'
38732   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38733   (eval $ac_try) 2>&5
38734   ac_status=$?
38735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38736   (exit $ac_status); }; }; then
38737   ac_cv_type_pid_t=yes
38738 else
38739   echo "$as_me: failed program was:" >&5
38740 sed 's/^/| /' conftest.$ac_ext >&5
38741
38742 ac_cv_type_pid_t=no
38743 fi
38744 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38745 fi
38746 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
38747 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
38748 if test $ac_cv_type_pid_t = yes; then
38749   :
38750 else
38751
38752 cat >>confdefs.h <<_ACEOF
38753 #define pid_t int
38754 _ACEOF
38755
38756 fi
38757
38758 echo "$as_me:$LINENO: checking for ssize_t" >&5
38759 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
38760 if test "${ac_cv_type_ssize_t+set}" = set; then
38761   echo $ECHO_N "(cached) $ECHO_C" >&6
38762 else
38763   cat >conftest.$ac_ext <<_ACEOF
38764 /* confdefs.h.  */
38765 _ACEOF
38766 cat confdefs.h >>conftest.$ac_ext
38767 cat >>conftest.$ac_ext <<_ACEOF
38768 /* end confdefs.h.  */
38769 $ac_includes_default
38770 int
38771 main ()
38772 {
38773 if ((ssize_t *) 0)
38774   return 0;
38775 if (sizeof (ssize_t))
38776   return 0;
38777   ;
38778   return 0;
38779 }
38780 _ACEOF
38781 rm -f conftest.$ac_objext
38782 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38783   (eval $ac_compile) 2>conftest.er1
38784   ac_status=$?
38785   grep -v '^ *+' conftest.er1 >conftest.err
38786   rm -f conftest.er1
38787   cat conftest.err >&5
38788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38789   (exit $ac_status); } &&
38790          { ac_try='test -z "$ac_c_werror_flag"
38791                          || test ! -s conftest.err'
38792   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38793   (eval $ac_try) 2>&5
38794   ac_status=$?
38795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38796   (exit $ac_status); }; } &&
38797          { ac_try='test -s conftest.$ac_objext'
38798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38799   (eval $ac_try) 2>&5
38800   ac_status=$?
38801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38802   (exit $ac_status); }; }; then
38803   ac_cv_type_ssize_t=yes
38804 else
38805   echo "$as_me: failed program was:" >&5
38806 sed 's/^/| /' conftest.$ac_ext >&5
38807
38808 ac_cv_type_ssize_t=no
38809 fi
38810 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38811 fi
38812 echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
38813 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
38814 if test $ac_cv_type_ssize_t = yes; then
38815   :
38816 else
38817
38818 cat >>confdefs.h <<_ACEOF
38819 #define ssize_t signed int
38820 _ACEOF
38821
38822 fi
38823
38824 echo "$as_me:$LINENO: checking for caddr_t" >&5
38825 echo $ECHO_N "checking for caddr_t... $ECHO_C" >&6
38826 if test "${ac_cv_type_caddr_t+set}" = set; then
38827   echo $ECHO_N "(cached) $ECHO_C" >&6
38828 else
38829   cat >conftest.$ac_ext <<_ACEOF
38830 /* confdefs.h.  */
38831 _ACEOF
38832 cat confdefs.h >>conftest.$ac_ext
38833 cat >>conftest.$ac_ext <<_ACEOF
38834 /* end confdefs.h.  */
38835 $ac_includes_default
38836 int
38837 main ()
38838 {
38839 if ((caddr_t *) 0)
38840   return 0;
38841 if (sizeof (caddr_t))
38842   return 0;
38843   ;
38844   return 0;
38845 }
38846 _ACEOF
38847 rm -f conftest.$ac_objext
38848 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38849   (eval $ac_compile) 2>conftest.er1
38850   ac_status=$?
38851   grep -v '^ *+' conftest.er1 >conftest.err
38852   rm -f conftest.er1
38853   cat conftest.err >&5
38854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38855   (exit $ac_status); } &&
38856          { ac_try='test -z "$ac_c_werror_flag"
38857                          || test ! -s conftest.err'
38858   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38859   (eval $ac_try) 2>&5
38860   ac_status=$?
38861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38862   (exit $ac_status); }; } &&
38863          { ac_try='test -s conftest.$ac_objext'
38864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38865   (eval $ac_try) 2>&5
38866   ac_status=$?
38867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38868   (exit $ac_status); }; }; then
38869   ac_cv_type_caddr_t=yes
38870 else
38871   echo "$as_me: failed program was:" >&5
38872 sed 's/^/| /' conftest.$ac_ext >&5
38873
38874 ac_cv_type_caddr_t=no
38875 fi
38876 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38877 fi
38878 echo "$as_me:$LINENO: result: $ac_cv_type_caddr_t" >&5
38879 echo "${ECHO_T}$ac_cv_type_caddr_t" >&6
38880 if test $ac_cv_type_caddr_t = yes; then
38881   :
38882 else
38883
38884 cat >>confdefs.h <<_ACEOF
38885 #define caddr_t char *
38886 _ACEOF
38887
38888 fi
38889
38890 echo "$as_me:$LINENO: checking for size_t" >&5
38891 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
38892 if test "${ac_cv_type_size_t+set}" = set; then
38893   echo $ECHO_N "(cached) $ECHO_C" >&6
38894 else
38895   cat >conftest.$ac_ext <<_ACEOF
38896 /* confdefs.h.  */
38897 _ACEOF
38898 cat confdefs.h >>conftest.$ac_ext
38899 cat >>conftest.$ac_ext <<_ACEOF
38900 /* end confdefs.h.  */
38901 $ac_includes_default
38902 int
38903 main ()
38904 {
38905 if ((size_t *) 0)
38906   return 0;
38907 if (sizeof (size_t))
38908   return 0;
38909   ;
38910   return 0;
38911 }
38912 _ACEOF
38913 rm -f conftest.$ac_objext
38914 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38915   (eval $ac_compile) 2>conftest.er1
38916   ac_status=$?
38917   grep -v '^ *+' conftest.er1 >conftest.err
38918   rm -f conftest.er1
38919   cat conftest.err >&5
38920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38921   (exit $ac_status); } &&
38922          { ac_try='test -z "$ac_c_werror_flag"
38923                          || test ! -s conftest.err'
38924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38925   (eval $ac_try) 2>&5
38926   ac_status=$?
38927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38928   (exit $ac_status); }; } &&
38929          { ac_try='test -s conftest.$ac_objext'
38930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38931   (eval $ac_try) 2>&5
38932   ac_status=$?
38933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38934   (exit $ac_status); }; }; then
38935   ac_cv_type_size_t=yes
38936 else
38937   echo "$as_me: failed program was:" >&5
38938 sed 's/^/| /' conftest.$ac_ext >&5
38939
38940 ac_cv_type_size_t=no
38941 fi
38942 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38943 fi
38944 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
38945 echo "${ECHO_T}$ac_cv_type_size_t" >&6
38946 if test $ac_cv_type_size_t = yes; then
38947   :
38948 else
38949
38950 cat >>confdefs.h <<_ACEOF
38951 #define size_t unsigned
38952 _ACEOF
38953
38954 fi
38955
38956
38957 echo "$as_me:$LINENO: checking for long long" >&5
38958 echo $ECHO_N "checking for long long... $ECHO_C" >&6
38959 if test "${ac_cv_type_long_long+set}" = set; then
38960   echo $ECHO_N "(cached) $ECHO_C" >&6
38961 else
38962   cat >conftest.$ac_ext <<_ACEOF
38963 /* confdefs.h.  */
38964 _ACEOF
38965 cat confdefs.h >>conftest.$ac_ext
38966 cat >>conftest.$ac_ext <<_ACEOF
38967 /* end confdefs.h.  */
38968 $ac_includes_default
38969 int
38970 main ()
38971 {
38972 if ((long long *) 0)
38973   return 0;
38974 if (sizeof (long long))
38975   return 0;
38976   ;
38977   return 0;
38978 }
38979 _ACEOF
38980 rm -f conftest.$ac_objext
38981 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38982   (eval $ac_compile) 2>conftest.er1
38983   ac_status=$?
38984   grep -v '^ *+' conftest.er1 >conftest.err
38985   rm -f conftest.er1
38986   cat conftest.err >&5
38987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38988   (exit $ac_status); } &&
38989          { ac_try='test -z "$ac_c_werror_flag"
38990                          || test ! -s conftest.err'
38991   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38992   (eval $ac_try) 2>&5
38993   ac_status=$?
38994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38995   (exit $ac_status); }; } &&
38996          { ac_try='test -s conftest.$ac_objext'
38997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38998   (eval $ac_try) 2>&5
38999   ac_status=$?
39000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39001   (exit $ac_status); }; }; then
39002   ac_cv_type_long_long=yes
39003 else
39004   echo "$as_me: failed program was:" >&5
39005 sed 's/^/| /' conftest.$ac_ext >&5
39006
39007 ac_cv_type_long_long=no
39008 fi
39009 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39010 fi
39011 echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
39012 echo "${ECHO_T}$ac_cv_type_long_long" >&6
39013 if test $ac_cv_type_long_long = yes; then
39014
39015 cat >>confdefs.h <<_ACEOF
39016 #define HAVE_LONG_LONG 1
39017 _ACEOF
39018
39019
39020 fi
39021
39022 echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
39023 echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
39024 if test "${ac_cv_type_ptrdiff_t+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 if ((ptrdiff_t *) 0)
39038   return 0;
39039 if (sizeof (ptrdiff_t))
39040   return 0;
39041   ;
39042   return 0;
39043 }
39044 _ACEOF
39045 rm -f conftest.$ac_objext
39046 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39047   (eval $ac_compile) 2>conftest.er1
39048   ac_status=$?
39049   grep -v '^ *+' conftest.er1 >conftest.err
39050   rm -f conftest.er1
39051   cat conftest.err >&5
39052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39053   (exit $ac_status); } &&
39054          { ac_try='test -z "$ac_c_werror_flag"
39055                          || test ! -s conftest.err'
39056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39057   (eval $ac_try) 2>&5
39058   ac_status=$?
39059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39060   (exit $ac_status); }; } &&
39061          { ac_try='test -s conftest.$ac_objext'
39062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39063   (eval $ac_try) 2>&5
39064   ac_status=$?
39065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39066   (exit $ac_status); }; }; then
39067   ac_cv_type_ptrdiff_t=yes
39068 else
39069   echo "$as_me: failed program was:" >&5
39070 sed 's/^/| /' conftest.$ac_ext >&5
39071
39072 ac_cv_type_ptrdiff_t=no
39073 fi
39074 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39075 fi
39076 echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
39077 echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6
39078 if test $ac_cv_type_ptrdiff_t = yes; then
39079
39080 cat >>confdefs.h <<_ACEOF
39081 #define HAVE_PTRDIFF_T 1
39082 _ACEOF
39083
39084
39085 fi
39086
39087
39088 echo "$as_me:$LINENO: checking for socklen_t" >&5
39089 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
39090 if test "${ac_cv_type_socklen_t+set}" = set; then
39091   echo $ECHO_N "(cached) $ECHO_C" >&6
39092 else
39093   cat >conftest.$ac_ext <<_ACEOF
39094 /* confdefs.h.  */
39095 _ACEOF
39096 cat confdefs.h >>conftest.$ac_ext
39097 cat >>conftest.$ac_ext <<_ACEOF
39098 /* end confdefs.h.  */
39099 $ac_includes_default
39100 #ifdef HAVE_SYS_SOCKET_H
39101 #include <sys/socket.h>
39102 #endif
39103
39104
39105 int
39106 main ()
39107 {
39108 if ((socklen_t *) 0)
39109   return 0;
39110 if (sizeof (socklen_t))
39111   return 0;
39112   ;
39113   return 0;
39114 }
39115 _ACEOF
39116 rm -f conftest.$ac_objext
39117 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39118   (eval $ac_compile) 2>conftest.er1
39119   ac_status=$?
39120   grep -v '^ *+' conftest.er1 >conftest.err
39121   rm -f conftest.er1
39122   cat conftest.err >&5
39123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39124   (exit $ac_status); } &&
39125          { ac_try='test -z "$ac_c_werror_flag"
39126                          || test ! -s conftest.err'
39127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39128   (eval $ac_try) 2>&5
39129   ac_status=$?
39130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39131   (exit $ac_status); }; } &&
39132          { ac_try='test -s conftest.$ac_objext'
39133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39134   (eval $ac_try) 2>&5
39135   ac_status=$?
39136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39137   (exit $ac_status); }; }; then
39138   ac_cv_type_socklen_t=yes
39139 else
39140   echo "$as_me: failed program was:" >&5
39141 sed 's/^/| /' conftest.$ac_ext >&5
39142
39143 ac_cv_type_socklen_t=no
39144 fi
39145 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39146 fi
39147 echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
39148 echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
39149 if test $ac_cv_type_socklen_t = yes; then
39150   :
39151 else
39152
39153 cat >>confdefs.h <<_ACEOF
39154 #define socklen_t int
39155 _ACEOF
39156
39157 fi
39158
39159
39160 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
39161 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
39162 if test "${ac_cv_type_signal+set}" = set; then
39163   echo $ECHO_N "(cached) $ECHO_C" >&6
39164 else
39165   cat >conftest.$ac_ext <<_ACEOF
39166 /* confdefs.h.  */
39167 _ACEOF
39168 cat confdefs.h >>conftest.$ac_ext
39169 cat >>conftest.$ac_ext <<_ACEOF
39170 /* end confdefs.h.  */
39171 #include <sys/types.h>
39172 #include <signal.h>
39173 #ifdef signal
39174 # undef signal
39175 #endif
39176 #ifdef __cplusplus
39177 extern "C" void (*signal (int, void (*)(int)))(int);
39178 #else
39179 void (*signal ()) ();
39180 #endif
39181
39182 int
39183 main ()
39184 {
39185 int i;
39186   ;
39187   return 0;
39188 }
39189 _ACEOF
39190 rm -f conftest.$ac_objext
39191 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39192   (eval $ac_compile) 2>conftest.er1
39193   ac_status=$?
39194   grep -v '^ *+' conftest.er1 >conftest.err
39195   rm -f conftest.er1
39196   cat conftest.err >&5
39197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39198   (exit $ac_status); } &&
39199          { ac_try='test -z "$ac_c_werror_flag"
39200                          || test ! -s conftest.err'
39201   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39202   (eval $ac_try) 2>&5
39203   ac_status=$?
39204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39205   (exit $ac_status); }; } &&
39206          { ac_try='test -s conftest.$ac_objext'
39207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39208   (eval $ac_try) 2>&5
39209   ac_status=$?
39210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39211   (exit $ac_status); }; }; then
39212   ac_cv_type_signal=void
39213 else
39214   echo "$as_me: failed program was:" >&5
39215 sed 's/^/| /' conftest.$ac_ext >&5
39216
39217 ac_cv_type_signal=int
39218 fi
39219 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39220 fi
39221 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
39222 echo "${ECHO_T}$ac_cv_type_signal" >&6
39223
39224 cat >>confdefs.h <<_ACEOF
39225 #define RETSIGTYPE $ac_cv_type_signal
39226 _ACEOF
39227
39228
39229
39230 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
39231 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
39232 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
39233   echo $ECHO_N "(cached) $ECHO_C" >&6
39234 else
39235   cat >conftest.$ac_ext <<_ACEOF
39236 /* confdefs.h.  */
39237 _ACEOF
39238 cat confdefs.h >>conftest.$ac_ext
39239 cat >>conftest.$ac_ext <<_ACEOF
39240 /* end confdefs.h.  */
39241 $ac_includes_default
39242 #include <signal.h>
39243
39244
39245 int
39246 main ()
39247 {
39248 if ((sig_atomic_t *) 0)
39249   return 0;
39250 if (sizeof (sig_atomic_t))
39251   return 0;
39252   ;
39253   return 0;
39254 }
39255 _ACEOF
39256 rm -f conftest.$ac_objext
39257 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39258   (eval $ac_compile) 2>conftest.er1
39259   ac_status=$?
39260   grep -v '^ *+' conftest.er1 >conftest.err
39261   rm -f conftest.er1
39262   cat conftest.err >&5
39263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39264   (exit $ac_status); } &&
39265          { ac_try='test -z "$ac_c_werror_flag"
39266                          || test ! -s conftest.err'
39267   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39268   (eval $ac_try) 2>&5
39269   ac_status=$?
39270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39271   (exit $ac_status); }; } &&
39272          { ac_try='test -s conftest.$ac_objext'
39273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39274   (eval $ac_try) 2>&5
39275   ac_status=$?
39276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39277   (exit $ac_status); }; }; then
39278   ac_cv_type_sig_atomic_t=yes
39279 else
39280   echo "$as_me: failed program was:" >&5
39281 sed 's/^/| /' conftest.$ac_ext >&5
39282
39283 ac_cv_type_sig_atomic_t=no
39284 fi
39285 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39286 fi
39287 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
39288 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
39289 if test $ac_cv_type_sig_atomic_t = yes; then
39290   :
39291 else
39292
39293 cat >>confdefs.h <<_ACEOF
39294 #define sig_atomic_t int
39295 _ACEOF
39296
39297 fi
39298
39299
39300 echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
39301 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
39302 if test "${ac_cv_type_uid_t+set}" = set; then
39303   echo $ECHO_N "(cached) $ECHO_C" >&6
39304 else
39305   cat >conftest.$ac_ext <<_ACEOF
39306 /* confdefs.h.  */
39307 _ACEOF
39308 cat confdefs.h >>conftest.$ac_ext
39309 cat >>conftest.$ac_ext <<_ACEOF
39310 /* end confdefs.h.  */
39311 #include <sys/types.h>
39312
39313 _ACEOF
39314 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
39315   $EGREP "uid_t" >/dev/null 2>&1; then
39316   ac_cv_type_uid_t=yes
39317 else
39318   ac_cv_type_uid_t=no
39319 fi
39320 rm -f conftest*
39321
39322 fi
39323 echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
39324 echo "${ECHO_T}$ac_cv_type_uid_t" >&6
39325 if test $ac_cv_type_uid_t = no; then
39326
39327 cat >>confdefs.h <<\_ACEOF
39328 #define uid_t int
39329 _ACEOF
39330
39331
39332 cat >>confdefs.h <<\_ACEOF
39333 #define gid_t int
39334 _ACEOF
39335
39336 fi
39337
39338
39339 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
39340 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
39341 if test "${ac_cv_header_time+set}" = set; then
39342   echo $ECHO_N "(cached) $ECHO_C" >&6
39343 else
39344   cat >conftest.$ac_ext <<_ACEOF
39345 /* confdefs.h.  */
39346 _ACEOF
39347 cat confdefs.h >>conftest.$ac_ext
39348 cat >>conftest.$ac_ext <<_ACEOF
39349 /* end confdefs.h.  */
39350 #include <sys/types.h>
39351 #include <sys/time.h>
39352 #include <time.h>
39353
39354 int
39355 main ()
39356 {
39357 if ((struct tm *) 0)
39358 return 0;
39359   ;
39360   return 0;
39361 }
39362 _ACEOF
39363 rm -f conftest.$ac_objext
39364 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39365   (eval $ac_compile) 2>conftest.er1
39366   ac_status=$?
39367   grep -v '^ *+' conftest.er1 >conftest.err
39368   rm -f conftest.er1
39369   cat conftest.err >&5
39370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39371   (exit $ac_status); } &&
39372          { ac_try='test -z "$ac_c_werror_flag"
39373                          || test ! -s conftest.err'
39374   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39375   (eval $ac_try) 2>&5
39376   ac_status=$?
39377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39378   (exit $ac_status); }; } &&
39379          { ac_try='test -s conftest.$ac_objext'
39380   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39381   (eval $ac_try) 2>&5
39382   ac_status=$?
39383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39384   (exit $ac_status); }; }; then
39385   ac_cv_header_time=yes
39386 else
39387   echo "$as_me: failed program was:" >&5
39388 sed 's/^/| /' conftest.$ac_ext >&5
39389
39390 ac_cv_header_time=no
39391 fi
39392 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39393 fi
39394 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
39395 echo "${ECHO_T}$ac_cv_header_time" >&6
39396 if test $ac_cv_header_time = yes; then
39397
39398 cat >>confdefs.h <<\_ACEOF
39399 #define TIME_WITH_SYS_TIME 1
39400 _ACEOF
39401
39402 fi
39403
39404 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
39405 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
39406 if test "${ac_cv_struct_tm+set}" = set; then
39407   echo $ECHO_N "(cached) $ECHO_C" >&6
39408 else
39409   cat >conftest.$ac_ext <<_ACEOF
39410 /* confdefs.h.  */
39411 _ACEOF
39412 cat confdefs.h >>conftest.$ac_ext
39413 cat >>conftest.$ac_ext <<_ACEOF
39414 /* end confdefs.h.  */
39415 #include <sys/types.h>
39416 #include <time.h>
39417
39418 int
39419 main ()
39420 {
39421 struct tm *tp; tp->tm_sec;
39422   ;
39423   return 0;
39424 }
39425 _ACEOF
39426 rm -f conftest.$ac_objext
39427 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39428   (eval $ac_compile) 2>conftest.er1
39429   ac_status=$?
39430   grep -v '^ *+' conftest.er1 >conftest.err
39431   rm -f conftest.er1
39432   cat conftest.err >&5
39433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39434   (exit $ac_status); } &&
39435          { ac_try='test -z "$ac_c_werror_flag"
39436                          || test ! -s conftest.err'
39437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39438   (eval $ac_try) 2>&5
39439   ac_status=$?
39440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39441   (exit $ac_status); }; } &&
39442          { ac_try='test -s conftest.$ac_objext'
39443   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39444   (eval $ac_try) 2>&5
39445   ac_status=$?
39446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39447   (exit $ac_status); }; }; then
39448   ac_cv_struct_tm=time.h
39449 else
39450   echo "$as_me: failed program was:" >&5
39451 sed 's/^/| /' conftest.$ac_ext >&5
39452
39453 ac_cv_struct_tm=sys/time.h
39454 fi
39455 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39456 fi
39457 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
39458 echo "${ECHO_T}$ac_cv_struct_tm" >&6
39459 if test $ac_cv_struct_tm = sys/time.h; then
39460
39461 cat >>confdefs.h <<\_ACEOF
39462 #define TM_IN_SYS_TIME 1
39463 _ACEOF
39464
39465 fi
39466
39467 echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
39468 echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
39469 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
39470   echo $ECHO_N "(cached) $ECHO_C" >&6
39471 else
39472   cat >conftest.$ac_ext <<_ACEOF
39473 /* confdefs.h.  */
39474 _ACEOF
39475 cat confdefs.h >>conftest.$ac_ext
39476 cat >>conftest.$ac_ext <<_ACEOF
39477 /* end confdefs.h.  */
39478 $ac_includes_default
39479 int
39480 main ()
39481 {
39482 static struct stat ac_aggr;
39483 if (ac_aggr.st_blksize)
39484 return 0;
39485   ;
39486   return 0;
39487 }
39488 _ACEOF
39489 rm -f conftest.$ac_objext
39490 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39491   (eval $ac_compile) 2>conftest.er1
39492   ac_status=$?
39493   grep -v '^ *+' conftest.er1 >conftest.err
39494   rm -f conftest.er1
39495   cat conftest.err >&5
39496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39497   (exit $ac_status); } &&
39498          { ac_try='test -z "$ac_c_werror_flag"
39499                          || test ! -s conftest.err'
39500   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39501   (eval $ac_try) 2>&5
39502   ac_status=$?
39503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39504   (exit $ac_status); }; } &&
39505          { ac_try='test -s conftest.$ac_objext'
39506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39507   (eval $ac_try) 2>&5
39508   ac_status=$?
39509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39510   (exit $ac_status); }; }; then
39511   ac_cv_member_struct_stat_st_blksize=yes
39512 else
39513   echo "$as_me: failed program was:" >&5
39514 sed 's/^/| /' conftest.$ac_ext >&5
39515
39516 cat >conftest.$ac_ext <<_ACEOF
39517 /* confdefs.h.  */
39518 _ACEOF
39519 cat confdefs.h >>conftest.$ac_ext
39520 cat >>conftest.$ac_ext <<_ACEOF
39521 /* end confdefs.h.  */
39522 $ac_includes_default
39523 int
39524 main ()
39525 {
39526 static struct stat ac_aggr;
39527 if (sizeof ac_aggr.st_blksize)
39528 return 0;
39529   ;
39530   return 0;
39531 }
39532 _ACEOF
39533 rm -f conftest.$ac_objext
39534 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39535   (eval $ac_compile) 2>conftest.er1
39536   ac_status=$?
39537   grep -v '^ *+' conftest.er1 >conftest.err
39538   rm -f conftest.er1
39539   cat conftest.err >&5
39540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39541   (exit $ac_status); } &&
39542          { ac_try='test -z "$ac_c_werror_flag"
39543                          || test ! -s conftest.err'
39544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39545   (eval $ac_try) 2>&5
39546   ac_status=$?
39547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39548   (exit $ac_status); }; } &&
39549          { ac_try='test -s conftest.$ac_objext'
39550   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39551   (eval $ac_try) 2>&5
39552   ac_status=$?
39553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39554   (exit $ac_status); }; }; then
39555   ac_cv_member_struct_stat_st_blksize=yes
39556 else
39557   echo "$as_me: failed program was:" >&5
39558 sed 's/^/| /' conftest.$ac_ext >&5
39559
39560 ac_cv_member_struct_stat_st_blksize=no
39561 fi
39562 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39563 fi
39564 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39565 fi
39566 echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
39567 echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
39568 if test $ac_cv_member_struct_stat_st_blksize = yes; then
39569
39570 cat >>confdefs.h <<_ACEOF
39571 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
39572 _ACEOF
39573
39574
39575 fi
39576
39577 echo "$as_me:$LINENO: checking for struct passwd.pw_gecos" >&5
39578 echo $ECHO_N "checking for struct passwd.pw_gecos... $ECHO_C" >&6
39579 if test "${ac_cv_member_struct_passwd_pw_gecos+set}" = set; then
39580   echo $ECHO_N "(cached) $ECHO_C" >&6
39581 else
39582   cat >conftest.$ac_ext <<_ACEOF
39583 /* confdefs.h.  */
39584 _ACEOF
39585 cat confdefs.h >>conftest.$ac_ext
39586 cat >>conftest.$ac_ext <<_ACEOF
39587 /* end confdefs.h.  */
39588 $ac_includes_default
39589 #include <pwd.h>
39590
39591 int
39592 main ()
39593 {
39594 static struct passwd ac_aggr;
39595 if (ac_aggr.pw_gecos)
39596 return 0;
39597   ;
39598   return 0;
39599 }
39600 _ACEOF
39601 rm -f conftest.$ac_objext
39602 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39603   (eval $ac_compile) 2>conftest.er1
39604   ac_status=$?
39605   grep -v '^ *+' conftest.er1 >conftest.err
39606   rm -f conftest.er1
39607   cat conftest.err >&5
39608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39609   (exit $ac_status); } &&
39610          { ac_try='test -z "$ac_c_werror_flag"
39611                          || test ! -s conftest.err'
39612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39613   (eval $ac_try) 2>&5
39614   ac_status=$?
39615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39616   (exit $ac_status); }; } &&
39617          { ac_try='test -s conftest.$ac_objext'
39618   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39619   (eval $ac_try) 2>&5
39620   ac_status=$?
39621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39622   (exit $ac_status); }; }; then
39623   ac_cv_member_struct_passwd_pw_gecos=yes
39624 else
39625   echo "$as_me: failed program was:" >&5
39626 sed 's/^/| /' conftest.$ac_ext >&5
39627
39628 cat >conftest.$ac_ext <<_ACEOF
39629 /* confdefs.h.  */
39630 _ACEOF
39631 cat confdefs.h >>conftest.$ac_ext
39632 cat >>conftest.$ac_ext <<_ACEOF
39633 /* end confdefs.h.  */
39634 $ac_includes_default
39635 #include <pwd.h>
39636
39637 int
39638 main ()
39639 {
39640 static struct passwd ac_aggr;
39641 if (sizeof ac_aggr.pw_gecos)
39642 return 0;
39643   ;
39644   return 0;
39645 }
39646 _ACEOF
39647 rm -f conftest.$ac_objext
39648 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39649   (eval $ac_compile) 2>conftest.er1
39650   ac_status=$?
39651   grep -v '^ *+' conftest.er1 >conftest.err
39652   rm -f conftest.er1
39653   cat conftest.err >&5
39654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39655   (exit $ac_status); } &&
39656          { ac_try='test -z "$ac_c_werror_flag"
39657                          || test ! -s conftest.err'
39658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39659   (eval $ac_try) 2>&5
39660   ac_status=$?
39661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39662   (exit $ac_status); }; } &&
39663          { ac_try='test -s conftest.$ac_objext'
39664   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39665   (eval $ac_try) 2>&5
39666   ac_status=$?
39667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39668   (exit $ac_status); }; }; then
39669   ac_cv_member_struct_passwd_pw_gecos=yes
39670 else
39671   echo "$as_me: failed program was:" >&5
39672 sed 's/^/| /' conftest.$ac_ext >&5
39673
39674 ac_cv_member_struct_passwd_pw_gecos=no
39675 fi
39676 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39677 fi
39678 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39679 fi
39680 echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_gecos" >&5
39681 echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_gecos" >&6
39682 if test $ac_cv_member_struct_passwd_pw_gecos = yes; then
39683
39684 cat >>confdefs.h <<_ACEOF
39685 #define HAVE_STRUCT_PASSWD_PW_GECOS 1
39686 _ACEOF
39687
39688
39689 fi
39690
39691 echo "$as_me:$LINENO: checking for struct passwd.pw_passwd" >&5
39692 echo $ECHO_N "checking for struct passwd.pw_passwd... $ECHO_C" >&6
39693 if test "${ac_cv_member_struct_passwd_pw_passwd+set}" = set; then
39694   echo $ECHO_N "(cached) $ECHO_C" >&6
39695 else
39696   cat >conftest.$ac_ext <<_ACEOF
39697 /* confdefs.h.  */
39698 _ACEOF
39699 cat confdefs.h >>conftest.$ac_ext
39700 cat >>conftest.$ac_ext <<_ACEOF
39701 /* end confdefs.h.  */
39702 $ac_includes_default
39703 #include <pwd.h>
39704
39705 int
39706 main ()
39707 {
39708 static struct passwd ac_aggr;
39709 if (ac_aggr.pw_passwd)
39710 return 0;
39711   ;
39712   return 0;
39713 }
39714 _ACEOF
39715 rm -f conftest.$ac_objext
39716 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39717   (eval $ac_compile) 2>conftest.er1
39718   ac_status=$?
39719   grep -v '^ *+' conftest.er1 >conftest.err
39720   rm -f conftest.er1
39721   cat conftest.err >&5
39722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39723   (exit $ac_status); } &&
39724          { ac_try='test -z "$ac_c_werror_flag"
39725                          || test ! -s conftest.err'
39726   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39727   (eval $ac_try) 2>&5
39728   ac_status=$?
39729   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39730   (exit $ac_status); }; } &&
39731          { ac_try='test -s conftest.$ac_objext'
39732   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39733   (eval $ac_try) 2>&5
39734   ac_status=$?
39735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39736   (exit $ac_status); }; }; then
39737   ac_cv_member_struct_passwd_pw_passwd=yes
39738 else
39739   echo "$as_me: failed program was:" >&5
39740 sed 's/^/| /' conftest.$ac_ext >&5
39741
39742 cat >conftest.$ac_ext <<_ACEOF
39743 /* confdefs.h.  */
39744 _ACEOF
39745 cat confdefs.h >>conftest.$ac_ext
39746 cat >>conftest.$ac_ext <<_ACEOF
39747 /* end confdefs.h.  */
39748 $ac_includes_default
39749 #include <pwd.h>
39750
39751 int
39752 main ()
39753 {
39754 static struct passwd ac_aggr;
39755 if (sizeof ac_aggr.pw_passwd)
39756 return 0;
39757   ;
39758   return 0;
39759 }
39760 _ACEOF
39761 rm -f conftest.$ac_objext
39762 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39763   (eval $ac_compile) 2>conftest.er1
39764   ac_status=$?
39765   grep -v '^ *+' conftest.er1 >conftest.err
39766   rm -f conftest.er1
39767   cat conftest.err >&5
39768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39769   (exit $ac_status); } &&
39770          { ac_try='test -z "$ac_c_werror_flag"
39771                          || test ! -s conftest.err'
39772   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39773   (eval $ac_try) 2>&5
39774   ac_status=$?
39775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39776   (exit $ac_status); }; } &&
39777          { ac_try='test -s conftest.$ac_objext'
39778   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39779   (eval $ac_try) 2>&5
39780   ac_status=$?
39781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39782   (exit $ac_status); }; }; then
39783   ac_cv_member_struct_passwd_pw_passwd=yes
39784 else
39785   echo "$as_me: failed program was:" >&5
39786 sed 's/^/| /' conftest.$ac_ext >&5
39787
39788 ac_cv_member_struct_passwd_pw_passwd=no
39789 fi
39790 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39791 fi
39792 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39793 fi
39794 echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_passwd" >&5
39795 echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_passwd" >&6
39796 if test $ac_cv_member_struct_passwd_pw_passwd = yes; then
39797
39798 cat >>confdefs.h <<_ACEOF
39799 #define HAVE_STRUCT_PASSWD_PW_PASSWD 1
39800 _ACEOF
39801
39802
39803 fi
39804
39805
39806 echo "$as_me:$LINENO: checking if toupper() requires islower()" >&5
39807 echo $ECHO_N "checking if toupper() requires islower()... $ECHO_C" >&6
39808 if test "${ol_cv_c_upper_lower+set}" = set; then
39809   echo $ECHO_N "(cached) $ECHO_C" >&6
39810 else
39811
39812         if test "$cross_compiling" = yes; then
39813   ol_cv_c_upper_lower=safe
39814 else
39815   cat >conftest.$ac_ext <<_ACEOF
39816 /* confdefs.h.  */
39817 _ACEOF
39818 cat confdefs.h >>conftest.$ac_ext
39819 cat >>conftest.$ac_ext <<_ACEOF
39820 /* end confdefs.h.  */
39821
39822 #include <ctype.h>
39823 main()
39824 {
39825         if ('C' == toupper('C'))
39826                 exit(0);
39827         else
39828                 exit(1);
39829 }
39830 _ACEOF
39831 rm -f conftest$ac_exeext
39832 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
39833   (eval $ac_link) 2>&5
39834   ac_status=$?
39835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39836   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
39837   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39838   (eval $ac_try) 2>&5
39839   ac_status=$?
39840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39841   (exit $ac_status); }; }; then
39842   ol_cv_c_upper_lower=no
39843 else
39844   echo "$as_me: program exited with status $ac_status" >&5
39845 echo "$as_me: failed program was:" >&5
39846 sed 's/^/| /' conftest.$ac_ext >&5
39847
39848 ( exit $ac_status )
39849 ol_cv_c_upper_lower=yes
39850 fi
39851 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39852 fi
39853 fi
39854 echo "$as_me:$LINENO: result: $ol_cv_c_upper_lower" >&5
39855 echo "${ECHO_T}$ol_cv_c_upper_lower" >&6
39856 if test $ol_cv_c_upper_lower != no ; then
39857
39858 cat >>confdefs.h <<\_ACEOF
39859 #define C_UPPER_LOWER 1
39860 _ACEOF
39861
39862 fi
39863
39864 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
39865 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
39866 if test "${ac_cv_c_const+set}" = set; then
39867   echo $ECHO_N "(cached) $ECHO_C" >&6
39868 else
39869   cat >conftest.$ac_ext <<_ACEOF
39870 /* confdefs.h.  */
39871 _ACEOF
39872 cat confdefs.h >>conftest.$ac_ext
39873 cat >>conftest.$ac_ext <<_ACEOF
39874 /* end confdefs.h.  */
39875
39876 int
39877 main ()
39878 {
39879 /* FIXME: Include the comments suggested by Paul. */
39880 #ifndef __cplusplus
39881   /* Ultrix mips cc rejects this.  */
39882   typedef int charset[2];
39883   const charset x;
39884   /* SunOS 4.1.1 cc rejects this.  */
39885   char const *const *ccp;
39886   char **p;
39887   /* NEC SVR4.0.2 mips cc rejects this.  */
39888   struct point {int x, y;};
39889   static struct point const zero = {0,0};
39890   /* AIX XL C 1.02.0.0 rejects this.
39891      It does not let you subtract one const X* pointer from another in
39892      an arm of an if-expression whose if-part is not a constant
39893      expression */
39894   const char *g = "string";
39895   ccp = &g + (g ? g-g : 0);
39896   /* HPUX 7.0 cc rejects these. */
39897   ++ccp;
39898   p = (char**) ccp;
39899   ccp = (char const *const *) p;
39900   { /* SCO 3.2v4 cc rejects this.  */
39901     char *t;
39902     char const *s = 0 ? (char *) 0 : (char const *) 0;
39903
39904     *t++ = 0;
39905   }
39906   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
39907     int x[] = {25, 17};
39908     const int *foo = &x[0];
39909     ++foo;
39910   }
39911   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
39912     typedef const int *iptr;
39913     iptr p = 0;
39914     ++p;
39915   }
39916   { /* AIX XL C 1.02.0.0 rejects this saying
39917        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
39918     struct s { int j; const int *ap[3]; };
39919     struct s *b; b->j = 5;
39920   }
39921   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
39922     const int foo = 10;
39923   }
39924 #endif
39925
39926   ;
39927   return 0;
39928 }
39929 _ACEOF
39930 rm -f conftest.$ac_objext
39931 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39932   (eval $ac_compile) 2>conftest.er1
39933   ac_status=$?
39934   grep -v '^ *+' conftest.er1 >conftest.err
39935   rm -f conftest.er1
39936   cat conftest.err >&5
39937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39938   (exit $ac_status); } &&
39939          { ac_try='test -z "$ac_c_werror_flag"
39940                          || test ! -s conftest.err'
39941   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39942   (eval $ac_try) 2>&5
39943   ac_status=$?
39944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39945   (exit $ac_status); }; } &&
39946          { ac_try='test -s conftest.$ac_objext'
39947   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39948   (eval $ac_try) 2>&5
39949   ac_status=$?
39950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39951   (exit $ac_status); }; }; then
39952   ac_cv_c_const=yes
39953 else
39954   echo "$as_me: failed program was:" >&5
39955 sed 's/^/| /' conftest.$ac_ext >&5
39956
39957 ac_cv_c_const=no
39958 fi
39959 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39960 fi
39961 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
39962 echo "${ECHO_T}$ac_cv_c_const" >&6
39963 if test $ac_cv_c_const = no; then
39964
39965 cat >>confdefs.h <<\_ACEOF
39966 #define const
39967 _ACEOF
39968
39969 fi
39970
39971 echo "$as_me:$LINENO: checking if compiler understands volatile" >&5
39972 echo $ECHO_N "checking if compiler understands volatile... $ECHO_C" >&6
39973 if test "${ol_cv_c_volatile+set}" = set; then
39974   echo $ECHO_N "(cached) $ECHO_C" >&6
39975 else
39976   cat >conftest.$ac_ext <<_ACEOF
39977 /* confdefs.h.  */
39978 _ACEOF
39979 cat confdefs.h >>conftest.$ac_ext
39980 cat >>conftest.$ac_ext <<_ACEOF
39981 /* end confdefs.h.  */
39982 int x, y, z;
39983 int
39984 main ()
39985 {
39986 volatile int a; int * volatile b = x ? &y : &z;
39987       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
39988       *b = 0;
39989   ;
39990   return 0;
39991 }
39992 _ACEOF
39993 rm -f conftest.$ac_objext
39994 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39995   (eval $ac_compile) 2>conftest.er1
39996   ac_status=$?
39997   grep -v '^ *+' conftest.er1 >conftest.err
39998   rm -f conftest.er1
39999   cat conftest.err >&5
40000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40001   (exit $ac_status); } &&
40002          { ac_try='test -z "$ac_c_werror_flag"
40003                          || test ! -s conftest.err'
40004   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40005   (eval $ac_try) 2>&5
40006   ac_status=$?
40007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40008   (exit $ac_status); }; } &&
40009          { ac_try='test -s conftest.$ac_objext'
40010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40011   (eval $ac_try) 2>&5
40012   ac_status=$?
40013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40014   (exit $ac_status); }; }; then
40015   ol_cv_c_volatile=yes
40016 else
40017   echo "$as_me: failed program was:" >&5
40018 sed 's/^/| /' conftest.$ac_ext >&5
40019
40020 ol_cv_c_volatile=no
40021 fi
40022 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40023 fi
40024 echo "$as_me:$LINENO: result: $ol_cv_c_volatile" >&5
40025 echo "${ECHO_T}$ol_cv_c_volatile" >&6
40026   if test $ol_cv_c_volatile = yes; then
40027     :
40028   else
40029
40030 cat >>confdefs.h <<\_ACEOF
40031 #define volatile
40032 _ACEOF
40033
40034   fi
40035
40036
40037 if test $cross_compiling = yes ; then
40038         { echo "$as_me:$LINENO: WARNING: Crossing compiling... all bets are off!" >&5
40039 echo "$as_me: WARNING: Crossing compiling... all bets are off!" >&2;}
40040
40041 cat >>confdefs.h <<\_ACEOF
40042 #define CROSS_COMPILING 1
40043 _ACEOF
40044
40045 else
40046         echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
40047 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
40048 if test "${ac_cv_c_bigendian+set}" = set; then
40049   echo $ECHO_N "(cached) $ECHO_C" >&6
40050 else
40051   # See if sys/param.h defines the BYTE_ORDER macro.
40052 cat >conftest.$ac_ext <<_ACEOF
40053 /* confdefs.h.  */
40054 _ACEOF
40055 cat confdefs.h >>conftest.$ac_ext
40056 cat >>conftest.$ac_ext <<_ACEOF
40057 /* end confdefs.h.  */
40058 #include <sys/types.h>
40059 #include <sys/param.h>
40060
40061 int
40062 main ()
40063 {
40064 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
40065  bogus endian macros
40066 #endif
40067
40068   ;
40069   return 0;
40070 }
40071 _ACEOF
40072 rm -f conftest.$ac_objext
40073 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40074   (eval $ac_compile) 2>conftest.er1
40075   ac_status=$?
40076   grep -v '^ *+' conftest.er1 >conftest.err
40077   rm -f conftest.er1
40078   cat conftest.err >&5
40079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40080   (exit $ac_status); } &&
40081          { ac_try='test -z "$ac_c_werror_flag"
40082                          || test ! -s conftest.err'
40083   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40084   (eval $ac_try) 2>&5
40085   ac_status=$?
40086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40087   (exit $ac_status); }; } &&
40088          { ac_try='test -s conftest.$ac_objext'
40089   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40090   (eval $ac_try) 2>&5
40091   ac_status=$?
40092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40093   (exit $ac_status); }; }; then
40094   # It does; now see whether it defined to BIG_ENDIAN or not.
40095 cat >conftest.$ac_ext <<_ACEOF
40096 /* confdefs.h.  */
40097 _ACEOF
40098 cat confdefs.h >>conftest.$ac_ext
40099 cat >>conftest.$ac_ext <<_ACEOF
40100 /* end confdefs.h.  */
40101 #include <sys/types.h>
40102 #include <sys/param.h>
40103
40104 int
40105 main ()
40106 {
40107 #if BYTE_ORDER != BIG_ENDIAN
40108  not big endian
40109 #endif
40110
40111   ;
40112   return 0;
40113 }
40114 _ACEOF
40115 rm -f conftest.$ac_objext
40116 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40117   (eval $ac_compile) 2>conftest.er1
40118   ac_status=$?
40119   grep -v '^ *+' conftest.er1 >conftest.err
40120   rm -f conftest.er1
40121   cat conftest.err >&5
40122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40123   (exit $ac_status); } &&
40124          { ac_try='test -z "$ac_c_werror_flag"
40125                          || test ! -s conftest.err'
40126   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40127   (eval $ac_try) 2>&5
40128   ac_status=$?
40129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40130   (exit $ac_status); }; } &&
40131          { ac_try='test -s conftest.$ac_objext'
40132   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40133   (eval $ac_try) 2>&5
40134   ac_status=$?
40135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40136   (exit $ac_status); }; }; then
40137   ac_cv_c_bigendian=yes
40138 else
40139   echo "$as_me: failed program was:" >&5
40140 sed 's/^/| /' conftest.$ac_ext >&5
40141
40142 ac_cv_c_bigendian=no
40143 fi
40144 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40145 else
40146   echo "$as_me: failed program was:" >&5
40147 sed 's/^/| /' conftest.$ac_ext >&5
40148
40149 # It does not; compile a test program.
40150 if test "$cross_compiling" = yes; then
40151   # try to guess the endianness by grepping values into an object file
40152   ac_cv_c_bigendian=unknown
40153   cat >conftest.$ac_ext <<_ACEOF
40154 /* confdefs.h.  */
40155 _ACEOF
40156 cat confdefs.h >>conftest.$ac_ext
40157 cat >>conftest.$ac_ext <<_ACEOF
40158 /* end confdefs.h.  */
40159 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
40160 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
40161 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
40162 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
40163 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
40164 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
40165 int
40166 main ()
40167 {
40168  _ascii (); _ebcdic ();
40169   ;
40170   return 0;
40171 }
40172 _ACEOF
40173 rm -f conftest.$ac_objext
40174 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40175   (eval $ac_compile) 2>conftest.er1
40176   ac_status=$?
40177   grep -v '^ *+' conftest.er1 >conftest.err
40178   rm -f conftest.er1
40179   cat conftest.err >&5
40180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40181   (exit $ac_status); } &&
40182          { ac_try='test -z "$ac_c_werror_flag"
40183                          || test ! -s conftest.err'
40184   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40185   (eval $ac_try) 2>&5
40186   ac_status=$?
40187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40188   (exit $ac_status); }; } &&
40189          { ac_try='test -s conftest.$ac_objext'
40190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40191   (eval $ac_try) 2>&5
40192   ac_status=$?
40193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40194   (exit $ac_status); }; }; then
40195   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
40196   ac_cv_c_bigendian=yes
40197 fi
40198 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
40199   if test "$ac_cv_c_bigendian" = unknown; then
40200     ac_cv_c_bigendian=no
40201   else
40202     # finding both strings is unlikely to happen, but who knows?
40203     ac_cv_c_bigendian=unknown
40204   fi
40205 fi
40206 else
40207   echo "$as_me: failed program was:" >&5
40208 sed 's/^/| /' conftest.$ac_ext >&5
40209
40210 fi
40211 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40212 else
40213   cat >conftest.$ac_ext <<_ACEOF
40214 /* confdefs.h.  */
40215 _ACEOF
40216 cat confdefs.h >>conftest.$ac_ext
40217 cat >>conftest.$ac_ext <<_ACEOF
40218 /* end confdefs.h.  */
40219 int
40220 main ()
40221 {
40222   /* Are we little or big endian?  From Harbison&Steele.  */
40223   union
40224   {
40225     long l;
40226     char c[sizeof (long)];
40227   } u;
40228   u.l = 1;
40229   exit (u.c[sizeof (long) - 1] == 1);
40230 }
40231 _ACEOF
40232 rm -f conftest$ac_exeext
40233 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
40234   (eval $ac_link) 2>&5
40235   ac_status=$?
40236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40237   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
40238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40239   (eval $ac_try) 2>&5
40240   ac_status=$?
40241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40242   (exit $ac_status); }; }; then
40243   ac_cv_c_bigendian=no
40244 else
40245   echo "$as_me: program exited with status $ac_status" >&5
40246 echo "$as_me: failed program was:" >&5
40247 sed 's/^/| /' conftest.$ac_ext >&5
40248
40249 ( exit $ac_status )
40250 ac_cv_c_bigendian=yes
40251 fi
40252 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
40253 fi
40254 fi
40255 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40256 fi
40257 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
40258 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
40259 case $ac_cv_c_bigendian in
40260   yes)
40261
40262 cat >>confdefs.h <<\_ACEOF
40263 #define WORDS_BIGENDIAN 1
40264 _ACEOF
40265  ;;
40266   no)
40267      ;;
40268   *)
40269     { { echo "$as_me:$LINENO: error: unknown endianness
40270 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
40271 echo "$as_me: error: unknown endianness
40272 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
40273    { (exit 1); exit 1; }; } ;;
40274 esac
40275
40276 fi
40277
40278 echo "$as_me:$LINENO: checking for short" >&5
40279 echo $ECHO_N "checking for short... $ECHO_C" >&6
40280 if test "${ac_cv_type_short+set}" = set; then
40281   echo $ECHO_N "(cached) $ECHO_C" >&6
40282 else
40283   cat >conftest.$ac_ext <<_ACEOF
40284 /* confdefs.h.  */
40285 _ACEOF
40286 cat confdefs.h >>conftest.$ac_ext
40287 cat >>conftest.$ac_ext <<_ACEOF
40288 /* end confdefs.h.  */
40289 $ac_includes_default
40290 int
40291 main ()
40292 {
40293 if ((short *) 0)
40294   return 0;
40295 if (sizeof (short))
40296   return 0;
40297   ;
40298   return 0;
40299 }
40300 _ACEOF
40301 rm -f conftest.$ac_objext
40302 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40303   (eval $ac_compile) 2>conftest.er1
40304   ac_status=$?
40305   grep -v '^ *+' conftest.er1 >conftest.err
40306   rm -f conftest.er1
40307   cat conftest.err >&5
40308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40309   (exit $ac_status); } &&
40310          { ac_try='test -z "$ac_c_werror_flag"
40311                          || test ! -s conftest.err'
40312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40313   (eval $ac_try) 2>&5
40314   ac_status=$?
40315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40316   (exit $ac_status); }; } &&
40317          { ac_try='test -s conftest.$ac_objext'
40318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40319   (eval $ac_try) 2>&5
40320   ac_status=$?
40321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40322   (exit $ac_status); }; }; then
40323   ac_cv_type_short=yes
40324 else
40325   echo "$as_me: failed program was:" >&5
40326 sed 's/^/| /' conftest.$ac_ext >&5
40327
40328 ac_cv_type_short=no
40329 fi
40330 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40331 fi
40332 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
40333 echo "${ECHO_T}$ac_cv_type_short" >&6
40334
40335 echo "$as_me:$LINENO: checking size of short" >&5
40336 echo $ECHO_N "checking size of short... $ECHO_C" >&6
40337 if test "${ac_cv_sizeof_short+set}" = set; then
40338   echo $ECHO_N "(cached) $ECHO_C" >&6
40339 else
40340   if test "$ac_cv_type_short" = yes; then
40341   # The cast to unsigned long works around a bug in the HP C Compiler
40342   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40343   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40344   # This bug is HP SR number 8606223364.
40345   if test "$cross_compiling" = yes; then
40346   # Depending upon the size, compute the lo and hi bounds.
40347 cat >conftest.$ac_ext <<_ACEOF
40348 /* confdefs.h.  */
40349 _ACEOF
40350 cat confdefs.h >>conftest.$ac_ext
40351 cat >>conftest.$ac_ext <<_ACEOF
40352 /* end confdefs.h.  */
40353 $ac_includes_default
40354 int
40355 main ()
40356 {
40357 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
40358 test_array [0] = 0
40359
40360   ;
40361   return 0;
40362 }
40363 _ACEOF
40364 rm -f conftest.$ac_objext
40365 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40366   (eval $ac_compile) 2>conftest.er1
40367   ac_status=$?
40368   grep -v '^ *+' conftest.er1 >conftest.err
40369   rm -f conftest.er1
40370   cat conftest.err >&5
40371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40372   (exit $ac_status); } &&
40373          { ac_try='test -z "$ac_c_werror_flag"
40374                          || test ! -s conftest.err'
40375   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40376   (eval $ac_try) 2>&5
40377   ac_status=$?
40378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40379   (exit $ac_status); }; } &&
40380          { ac_try='test -s conftest.$ac_objext'
40381   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40382   (eval $ac_try) 2>&5
40383   ac_status=$?
40384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40385   (exit $ac_status); }; }; then
40386   ac_lo=0 ac_mid=0
40387   while :; do
40388     cat >conftest.$ac_ext <<_ACEOF
40389 /* confdefs.h.  */
40390 _ACEOF
40391 cat confdefs.h >>conftest.$ac_ext
40392 cat >>conftest.$ac_ext <<_ACEOF
40393 /* end confdefs.h.  */
40394 $ac_includes_default
40395 int
40396 main ()
40397 {
40398 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
40399 test_array [0] = 0
40400
40401   ;
40402   return 0;
40403 }
40404 _ACEOF
40405 rm -f conftest.$ac_objext
40406 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40407   (eval $ac_compile) 2>conftest.er1
40408   ac_status=$?
40409   grep -v '^ *+' conftest.er1 >conftest.err
40410   rm -f conftest.er1
40411   cat conftest.err >&5
40412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40413   (exit $ac_status); } &&
40414          { ac_try='test -z "$ac_c_werror_flag"
40415                          || test ! -s conftest.err'
40416   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40417   (eval $ac_try) 2>&5
40418   ac_status=$?
40419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40420   (exit $ac_status); }; } &&
40421          { ac_try='test -s conftest.$ac_objext'
40422   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40423   (eval $ac_try) 2>&5
40424   ac_status=$?
40425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40426   (exit $ac_status); }; }; then
40427   ac_hi=$ac_mid; break
40428 else
40429   echo "$as_me: failed program was:" >&5
40430 sed 's/^/| /' conftest.$ac_ext >&5
40431
40432 ac_lo=`expr $ac_mid + 1`
40433                     if test $ac_lo -le $ac_mid; then
40434                       ac_lo= ac_hi=
40435                       break
40436                     fi
40437                     ac_mid=`expr 2 '*' $ac_mid + 1`
40438 fi
40439 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40440   done
40441 else
40442   echo "$as_me: failed program was:" >&5
40443 sed 's/^/| /' conftest.$ac_ext >&5
40444
40445 cat >conftest.$ac_ext <<_ACEOF
40446 /* confdefs.h.  */
40447 _ACEOF
40448 cat confdefs.h >>conftest.$ac_ext
40449 cat >>conftest.$ac_ext <<_ACEOF
40450 /* end confdefs.h.  */
40451 $ac_includes_default
40452 int
40453 main ()
40454 {
40455 static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
40456 test_array [0] = 0
40457
40458   ;
40459   return 0;
40460 }
40461 _ACEOF
40462 rm -f conftest.$ac_objext
40463 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40464   (eval $ac_compile) 2>conftest.er1
40465   ac_status=$?
40466   grep -v '^ *+' conftest.er1 >conftest.err
40467   rm -f conftest.er1
40468   cat conftest.err >&5
40469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40470   (exit $ac_status); } &&
40471          { ac_try='test -z "$ac_c_werror_flag"
40472                          || test ! -s conftest.err'
40473   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40474   (eval $ac_try) 2>&5
40475   ac_status=$?
40476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40477   (exit $ac_status); }; } &&
40478          { ac_try='test -s conftest.$ac_objext'
40479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40480   (eval $ac_try) 2>&5
40481   ac_status=$?
40482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40483   (exit $ac_status); }; }; then
40484   ac_hi=-1 ac_mid=-1
40485   while :; do
40486     cat >conftest.$ac_ext <<_ACEOF
40487 /* confdefs.h.  */
40488 _ACEOF
40489 cat confdefs.h >>conftest.$ac_ext
40490 cat >>conftest.$ac_ext <<_ACEOF
40491 /* end confdefs.h.  */
40492 $ac_includes_default
40493 int
40494 main ()
40495 {
40496 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
40497 test_array [0] = 0
40498
40499   ;
40500   return 0;
40501 }
40502 _ACEOF
40503 rm -f conftest.$ac_objext
40504 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40505   (eval $ac_compile) 2>conftest.er1
40506   ac_status=$?
40507   grep -v '^ *+' conftest.er1 >conftest.err
40508   rm -f conftest.er1
40509   cat conftest.err >&5
40510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40511   (exit $ac_status); } &&
40512          { ac_try='test -z "$ac_c_werror_flag"
40513                          || test ! -s conftest.err'
40514   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40515   (eval $ac_try) 2>&5
40516   ac_status=$?
40517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40518   (exit $ac_status); }; } &&
40519          { ac_try='test -s conftest.$ac_objext'
40520   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40521   (eval $ac_try) 2>&5
40522   ac_status=$?
40523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40524   (exit $ac_status); }; }; then
40525   ac_lo=$ac_mid; break
40526 else
40527   echo "$as_me: failed program was:" >&5
40528 sed 's/^/| /' conftest.$ac_ext >&5
40529
40530 ac_hi=`expr '(' $ac_mid ')' - 1`
40531                        if test $ac_mid -le $ac_hi; then
40532                          ac_lo= ac_hi=
40533                          break
40534                        fi
40535                        ac_mid=`expr 2 '*' $ac_mid`
40536 fi
40537 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40538   done
40539 else
40540   echo "$as_me: failed program was:" >&5
40541 sed 's/^/| /' conftest.$ac_ext >&5
40542
40543 ac_lo= ac_hi=
40544 fi
40545 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40546 fi
40547 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40548 # Binary search between lo and hi bounds.
40549 while test "x$ac_lo" != "x$ac_hi"; do
40550   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
40551   cat >conftest.$ac_ext <<_ACEOF
40552 /* confdefs.h.  */
40553 _ACEOF
40554 cat confdefs.h >>conftest.$ac_ext
40555 cat >>conftest.$ac_ext <<_ACEOF
40556 /* end confdefs.h.  */
40557 $ac_includes_default
40558 int
40559 main ()
40560 {
40561 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
40562 test_array [0] = 0
40563
40564   ;
40565   return 0;
40566 }
40567 _ACEOF
40568 rm -f conftest.$ac_objext
40569 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40570   (eval $ac_compile) 2>conftest.er1
40571   ac_status=$?
40572   grep -v '^ *+' conftest.er1 >conftest.err
40573   rm -f conftest.er1
40574   cat conftest.err >&5
40575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40576   (exit $ac_status); } &&
40577          { ac_try='test -z "$ac_c_werror_flag"
40578                          || test ! -s conftest.err'
40579   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40580   (eval $ac_try) 2>&5
40581   ac_status=$?
40582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40583   (exit $ac_status); }; } &&
40584          { ac_try='test -s conftest.$ac_objext'
40585   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40586   (eval $ac_try) 2>&5
40587   ac_status=$?
40588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40589   (exit $ac_status); }; }; then
40590   ac_hi=$ac_mid
40591 else
40592   echo "$as_me: failed program was:" >&5
40593 sed 's/^/| /' conftest.$ac_ext >&5
40594
40595 ac_lo=`expr '(' $ac_mid ')' + 1`
40596 fi
40597 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40598 done
40599 case $ac_lo in
40600 ?*) ac_cv_sizeof_short=$ac_lo;;
40601 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
40602 See \`config.log' for more details." >&5
40603 echo "$as_me: error: cannot compute sizeof (short), 77
40604 See \`config.log' for more details." >&2;}
40605    { (exit 1); exit 1; }; } ;;
40606 esac
40607 else
40608   if test "$cross_compiling" = yes; then
40609   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
40610 See \`config.log' for more details." >&5
40611 echo "$as_me: error: cannot run test program while cross compiling
40612 See \`config.log' for more details." >&2;}
40613    { (exit 1); exit 1; }; }
40614 else
40615   cat >conftest.$ac_ext <<_ACEOF
40616 /* confdefs.h.  */
40617 _ACEOF
40618 cat confdefs.h >>conftest.$ac_ext
40619 cat >>conftest.$ac_ext <<_ACEOF
40620 /* end confdefs.h.  */
40621 $ac_includes_default
40622 long longval () { return (long) (sizeof (short)); }
40623 unsigned long ulongval () { return (long) (sizeof (short)); }
40624 #include <stdio.h>
40625 #include <stdlib.h>
40626 int
40627 main ()
40628 {
40629
40630   FILE *f = fopen ("conftest.val", "w");
40631   if (! f)
40632     exit (1);
40633   if (((long) (sizeof (short))) < 0)
40634     {
40635       long i = longval ();
40636       if (i != ((long) (sizeof (short))))
40637         exit (1);
40638       fprintf (f, "%ld\n", i);
40639     }
40640   else
40641     {
40642       unsigned long i = ulongval ();
40643       if (i != ((long) (sizeof (short))))
40644         exit (1);
40645       fprintf (f, "%lu\n", i);
40646     }
40647   exit (ferror (f) || fclose (f) != 0);
40648
40649   ;
40650   return 0;
40651 }
40652 _ACEOF
40653 rm -f conftest$ac_exeext
40654 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
40655   (eval $ac_link) 2>&5
40656   ac_status=$?
40657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40658   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
40659   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40660   (eval $ac_try) 2>&5
40661   ac_status=$?
40662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40663   (exit $ac_status); }; }; then
40664   ac_cv_sizeof_short=`cat conftest.val`
40665 else
40666   echo "$as_me: program exited with status $ac_status" >&5
40667 echo "$as_me: failed program was:" >&5
40668 sed 's/^/| /' conftest.$ac_ext >&5
40669
40670 ( exit $ac_status )
40671 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
40672 See \`config.log' for more details." >&5
40673 echo "$as_me: error: cannot compute sizeof (short), 77
40674 See \`config.log' for more details." >&2;}
40675    { (exit 1); exit 1; }; }
40676 fi
40677 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
40678 fi
40679 fi
40680 rm -f conftest.val
40681 else
40682   ac_cv_sizeof_short=0
40683 fi
40684 fi
40685 echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
40686 echo "${ECHO_T}$ac_cv_sizeof_short" >&6
40687 cat >>confdefs.h <<_ACEOF
40688 #define SIZEOF_SHORT $ac_cv_sizeof_short
40689 _ACEOF
40690
40691
40692 echo "$as_me:$LINENO: checking for int" >&5
40693 echo $ECHO_N "checking for int... $ECHO_C" >&6
40694 if test "${ac_cv_type_int+set}" = set; then
40695   echo $ECHO_N "(cached) $ECHO_C" >&6
40696 else
40697   cat >conftest.$ac_ext <<_ACEOF
40698 /* confdefs.h.  */
40699 _ACEOF
40700 cat confdefs.h >>conftest.$ac_ext
40701 cat >>conftest.$ac_ext <<_ACEOF
40702 /* end confdefs.h.  */
40703 $ac_includes_default
40704 int
40705 main ()
40706 {
40707 if ((int *) 0)
40708   return 0;
40709 if (sizeof (int))
40710   return 0;
40711   ;
40712   return 0;
40713 }
40714 _ACEOF
40715 rm -f conftest.$ac_objext
40716 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40717   (eval $ac_compile) 2>conftest.er1
40718   ac_status=$?
40719   grep -v '^ *+' conftest.er1 >conftest.err
40720   rm -f conftest.er1
40721   cat conftest.err >&5
40722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40723   (exit $ac_status); } &&
40724          { ac_try='test -z "$ac_c_werror_flag"
40725                          || test ! -s conftest.err'
40726   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40727   (eval $ac_try) 2>&5
40728   ac_status=$?
40729   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40730   (exit $ac_status); }; } &&
40731          { ac_try='test -s conftest.$ac_objext'
40732   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40733   (eval $ac_try) 2>&5
40734   ac_status=$?
40735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40736   (exit $ac_status); }; }; then
40737   ac_cv_type_int=yes
40738 else
40739   echo "$as_me: failed program was:" >&5
40740 sed 's/^/| /' conftest.$ac_ext >&5
40741
40742 ac_cv_type_int=no
40743 fi
40744 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40745 fi
40746 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
40747 echo "${ECHO_T}$ac_cv_type_int" >&6
40748
40749 echo "$as_me:$LINENO: checking size of int" >&5
40750 echo $ECHO_N "checking size of int... $ECHO_C" >&6
40751 if test "${ac_cv_sizeof_int+set}" = set; then
40752   echo $ECHO_N "(cached) $ECHO_C" >&6
40753 else
40754   if test "$ac_cv_type_int" = yes; then
40755   # The cast to unsigned long works around a bug in the HP C Compiler
40756   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40757   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40758   # This bug is HP SR number 8606223364.
40759   if test "$cross_compiling" = yes; then
40760   # Depending upon the size, compute the lo and hi bounds.
40761 cat >conftest.$ac_ext <<_ACEOF
40762 /* confdefs.h.  */
40763 _ACEOF
40764 cat confdefs.h >>conftest.$ac_ext
40765 cat >>conftest.$ac_ext <<_ACEOF
40766 /* end confdefs.h.  */
40767 $ac_includes_default
40768 int
40769 main ()
40770 {
40771 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
40772 test_array [0] = 0
40773
40774   ;
40775   return 0;
40776 }
40777 _ACEOF
40778 rm -f conftest.$ac_objext
40779 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40780   (eval $ac_compile) 2>conftest.er1
40781   ac_status=$?
40782   grep -v '^ *+' conftest.er1 >conftest.err
40783   rm -f conftest.er1
40784   cat conftest.err >&5
40785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40786   (exit $ac_status); } &&
40787          { ac_try='test -z "$ac_c_werror_flag"
40788                          || test ! -s conftest.err'
40789   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40790   (eval $ac_try) 2>&5
40791   ac_status=$?
40792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40793   (exit $ac_status); }; } &&
40794          { ac_try='test -s conftest.$ac_objext'
40795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40796   (eval $ac_try) 2>&5
40797   ac_status=$?
40798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40799   (exit $ac_status); }; }; then
40800   ac_lo=0 ac_mid=0
40801   while :; do
40802     cat >conftest.$ac_ext <<_ACEOF
40803 /* confdefs.h.  */
40804 _ACEOF
40805 cat confdefs.h >>conftest.$ac_ext
40806 cat >>conftest.$ac_ext <<_ACEOF
40807 /* end confdefs.h.  */
40808 $ac_includes_default
40809 int
40810 main ()
40811 {
40812 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
40813 test_array [0] = 0
40814
40815   ;
40816   return 0;
40817 }
40818 _ACEOF
40819 rm -f conftest.$ac_objext
40820 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40821   (eval $ac_compile) 2>conftest.er1
40822   ac_status=$?
40823   grep -v '^ *+' conftest.er1 >conftest.err
40824   rm -f conftest.er1
40825   cat conftest.err >&5
40826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40827   (exit $ac_status); } &&
40828          { ac_try='test -z "$ac_c_werror_flag"
40829                          || test ! -s conftest.err'
40830   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40831   (eval $ac_try) 2>&5
40832   ac_status=$?
40833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40834   (exit $ac_status); }; } &&
40835          { ac_try='test -s conftest.$ac_objext'
40836   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40837   (eval $ac_try) 2>&5
40838   ac_status=$?
40839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40840   (exit $ac_status); }; }; then
40841   ac_hi=$ac_mid; break
40842 else
40843   echo "$as_me: failed program was:" >&5
40844 sed 's/^/| /' conftest.$ac_ext >&5
40845
40846 ac_lo=`expr $ac_mid + 1`
40847                     if test $ac_lo -le $ac_mid; then
40848                       ac_lo= ac_hi=
40849                       break
40850                     fi
40851                     ac_mid=`expr 2 '*' $ac_mid + 1`
40852 fi
40853 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40854   done
40855 else
40856   echo "$as_me: failed program was:" >&5
40857 sed 's/^/| /' conftest.$ac_ext >&5
40858
40859 cat >conftest.$ac_ext <<_ACEOF
40860 /* confdefs.h.  */
40861 _ACEOF
40862 cat confdefs.h >>conftest.$ac_ext
40863 cat >>conftest.$ac_ext <<_ACEOF
40864 /* end confdefs.h.  */
40865 $ac_includes_default
40866 int
40867 main ()
40868 {
40869 static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
40870 test_array [0] = 0
40871
40872   ;
40873   return 0;
40874 }
40875 _ACEOF
40876 rm -f conftest.$ac_objext
40877 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40878   (eval $ac_compile) 2>conftest.er1
40879   ac_status=$?
40880   grep -v '^ *+' conftest.er1 >conftest.err
40881   rm -f conftest.er1
40882   cat conftest.err >&5
40883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40884   (exit $ac_status); } &&
40885          { ac_try='test -z "$ac_c_werror_flag"
40886                          || test ! -s conftest.err'
40887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40888   (eval $ac_try) 2>&5
40889   ac_status=$?
40890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40891   (exit $ac_status); }; } &&
40892          { ac_try='test -s conftest.$ac_objext'
40893   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40894   (eval $ac_try) 2>&5
40895   ac_status=$?
40896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40897   (exit $ac_status); }; }; then
40898   ac_hi=-1 ac_mid=-1
40899   while :; do
40900     cat >conftest.$ac_ext <<_ACEOF
40901 /* confdefs.h.  */
40902 _ACEOF
40903 cat confdefs.h >>conftest.$ac_ext
40904 cat >>conftest.$ac_ext <<_ACEOF
40905 /* end confdefs.h.  */
40906 $ac_includes_default
40907 int
40908 main ()
40909 {
40910 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
40911 test_array [0] = 0
40912
40913   ;
40914   return 0;
40915 }
40916 _ACEOF
40917 rm -f conftest.$ac_objext
40918 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40919   (eval $ac_compile) 2>conftest.er1
40920   ac_status=$?
40921   grep -v '^ *+' conftest.er1 >conftest.err
40922   rm -f conftest.er1
40923   cat conftest.err >&5
40924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40925   (exit $ac_status); } &&
40926          { ac_try='test -z "$ac_c_werror_flag"
40927                          || test ! -s conftest.err'
40928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40929   (eval $ac_try) 2>&5
40930   ac_status=$?
40931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40932   (exit $ac_status); }; } &&
40933          { ac_try='test -s conftest.$ac_objext'
40934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40935   (eval $ac_try) 2>&5
40936   ac_status=$?
40937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40938   (exit $ac_status); }; }; then
40939   ac_lo=$ac_mid; break
40940 else
40941   echo "$as_me: failed program was:" >&5
40942 sed 's/^/| /' conftest.$ac_ext >&5
40943
40944 ac_hi=`expr '(' $ac_mid ')' - 1`
40945                        if test $ac_mid -le $ac_hi; then
40946                          ac_lo= ac_hi=
40947                          break
40948                        fi
40949                        ac_mid=`expr 2 '*' $ac_mid`
40950 fi
40951 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40952   done
40953 else
40954   echo "$as_me: failed program was:" >&5
40955 sed 's/^/| /' conftest.$ac_ext >&5
40956
40957 ac_lo= ac_hi=
40958 fi
40959 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40960 fi
40961 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40962 # Binary search between lo and hi bounds.
40963 while test "x$ac_lo" != "x$ac_hi"; do
40964   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
40965   cat >conftest.$ac_ext <<_ACEOF
40966 /* confdefs.h.  */
40967 _ACEOF
40968 cat confdefs.h >>conftest.$ac_ext
40969 cat >>conftest.$ac_ext <<_ACEOF
40970 /* end confdefs.h.  */
40971 $ac_includes_default
40972 int
40973 main ()
40974 {
40975 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
40976 test_array [0] = 0
40977
40978   ;
40979   return 0;
40980 }
40981 _ACEOF
40982 rm -f conftest.$ac_objext
40983 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40984   (eval $ac_compile) 2>conftest.er1
40985   ac_status=$?
40986   grep -v '^ *+' conftest.er1 >conftest.err
40987   rm -f conftest.er1
40988   cat conftest.err >&5
40989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40990   (exit $ac_status); } &&
40991          { ac_try='test -z "$ac_c_werror_flag"
40992                          || test ! -s conftest.err'
40993   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40994   (eval $ac_try) 2>&5
40995   ac_status=$?
40996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40997   (exit $ac_status); }; } &&
40998          { ac_try='test -s conftest.$ac_objext'
40999   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41000   (eval $ac_try) 2>&5
41001   ac_status=$?
41002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41003   (exit $ac_status); }; }; then
41004   ac_hi=$ac_mid
41005 else
41006   echo "$as_me: failed program was:" >&5
41007 sed 's/^/| /' conftest.$ac_ext >&5
41008
41009 ac_lo=`expr '(' $ac_mid ')' + 1`
41010 fi
41011 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41012 done
41013 case $ac_lo in
41014 ?*) ac_cv_sizeof_int=$ac_lo;;
41015 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
41016 See \`config.log' for more details." >&5
41017 echo "$as_me: error: cannot compute sizeof (int), 77
41018 See \`config.log' for more details." >&2;}
41019    { (exit 1); exit 1; }; } ;;
41020 esac
41021 else
41022   if test "$cross_compiling" = yes; then
41023   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
41024 See \`config.log' for more details." >&5
41025 echo "$as_me: error: cannot run test program while cross compiling
41026 See \`config.log' for more details." >&2;}
41027    { (exit 1); exit 1; }; }
41028 else
41029   cat >conftest.$ac_ext <<_ACEOF
41030 /* confdefs.h.  */
41031 _ACEOF
41032 cat confdefs.h >>conftest.$ac_ext
41033 cat >>conftest.$ac_ext <<_ACEOF
41034 /* end confdefs.h.  */
41035 $ac_includes_default
41036 long longval () { return (long) (sizeof (int)); }
41037 unsigned long ulongval () { return (long) (sizeof (int)); }
41038 #include <stdio.h>
41039 #include <stdlib.h>
41040 int
41041 main ()
41042 {
41043
41044   FILE *f = fopen ("conftest.val", "w");
41045   if (! f)
41046     exit (1);
41047   if (((long) (sizeof (int))) < 0)
41048     {
41049       long i = longval ();
41050       if (i != ((long) (sizeof (int))))
41051         exit (1);
41052       fprintf (f, "%ld\n", i);
41053     }
41054   else
41055     {
41056       unsigned long i = ulongval ();
41057       if (i != ((long) (sizeof (int))))
41058         exit (1);
41059       fprintf (f, "%lu\n", i);
41060     }
41061   exit (ferror (f) || fclose (f) != 0);
41062
41063   ;
41064   return 0;
41065 }
41066 _ACEOF
41067 rm -f conftest$ac_exeext
41068 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
41069   (eval $ac_link) 2>&5
41070   ac_status=$?
41071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41072   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
41073   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41074   (eval $ac_try) 2>&5
41075   ac_status=$?
41076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41077   (exit $ac_status); }; }; then
41078   ac_cv_sizeof_int=`cat conftest.val`
41079 else
41080   echo "$as_me: program exited with status $ac_status" >&5
41081 echo "$as_me: failed program was:" >&5
41082 sed 's/^/| /' conftest.$ac_ext >&5
41083
41084 ( exit $ac_status )
41085 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
41086 See \`config.log' for more details." >&5
41087 echo "$as_me: error: cannot compute sizeof (int), 77
41088 See \`config.log' for more details." >&2;}
41089    { (exit 1); exit 1; }; }
41090 fi
41091 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
41092 fi
41093 fi
41094 rm -f conftest.val
41095 else
41096   ac_cv_sizeof_int=0
41097 fi
41098 fi
41099 echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
41100 echo "${ECHO_T}$ac_cv_sizeof_int" >&6
41101 cat >>confdefs.h <<_ACEOF
41102 #define SIZEOF_INT $ac_cv_sizeof_int
41103 _ACEOF
41104
41105
41106 echo "$as_me:$LINENO: checking for long" >&5
41107 echo $ECHO_N "checking for long... $ECHO_C" >&6
41108 if test "${ac_cv_type_long+set}" = set; then
41109   echo $ECHO_N "(cached) $ECHO_C" >&6
41110 else
41111   cat >conftest.$ac_ext <<_ACEOF
41112 /* confdefs.h.  */
41113 _ACEOF
41114 cat confdefs.h >>conftest.$ac_ext
41115 cat >>conftest.$ac_ext <<_ACEOF
41116 /* end confdefs.h.  */
41117 $ac_includes_default
41118 int
41119 main ()
41120 {
41121 if ((long *) 0)
41122   return 0;
41123 if (sizeof (long))
41124   return 0;
41125   ;
41126   return 0;
41127 }
41128 _ACEOF
41129 rm -f conftest.$ac_objext
41130 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41131   (eval $ac_compile) 2>conftest.er1
41132   ac_status=$?
41133   grep -v '^ *+' conftest.er1 >conftest.err
41134   rm -f conftest.er1
41135   cat conftest.err >&5
41136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41137   (exit $ac_status); } &&
41138          { ac_try='test -z "$ac_c_werror_flag"
41139                          || test ! -s conftest.err'
41140   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41141   (eval $ac_try) 2>&5
41142   ac_status=$?
41143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41144   (exit $ac_status); }; } &&
41145          { ac_try='test -s conftest.$ac_objext'
41146   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41147   (eval $ac_try) 2>&5
41148   ac_status=$?
41149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41150   (exit $ac_status); }; }; then
41151   ac_cv_type_long=yes
41152 else
41153   echo "$as_me: failed program was:" >&5
41154 sed 's/^/| /' conftest.$ac_ext >&5
41155
41156 ac_cv_type_long=no
41157 fi
41158 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41159 fi
41160 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
41161 echo "${ECHO_T}$ac_cv_type_long" >&6
41162
41163 echo "$as_me:$LINENO: checking size of long" >&5
41164 echo $ECHO_N "checking size of long... $ECHO_C" >&6
41165 if test "${ac_cv_sizeof_long+set}" = set; then
41166   echo $ECHO_N "(cached) $ECHO_C" >&6
41167 else
41168   if test "$ac_cv_type_long" = yes; then
41169   # The cast to unsigned long works around a bug in the HP C Compiler
41170   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41171   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41172   # This bug is HP SR number 8606223364.
41173   if test "$cross_compiling" = yes; then
41174   # Depending upon the size, compute the lo and hi bounds.
41175 cat >conftest.$ac_ext <<_ACEOF
41176 /* confdefs.h.  */
41177 _ACEOF
41178 cat confdefs.h >>conftest.$ac_ext
41179 cat >>conftest.$ac_ext <<_ACEOF
41180 /* end confdefs.h.  */
41181 $ac_includes_default
41182 int
41183 main ()
41184 {
41185 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
41186 test_array [0] = 0
41187
41188   ;
41189   return 0;
41190 }
41191 _ACEOF
41192 rm -f conftest.$ac_objext
41193 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41194   (eval $ac_compile) 2>conftest.er1
41195   ac_status=$?
41196   grep -v '^ *+' conftest.er1 >conftest.err
41197   rm -f conftest.er1
41198   cat conftest.err >&5
41199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41200   (exit $ac_status); } &&
41201          { ac_try='test -z "$ac_c_werror_flag"
41202                          || test ! -s conftest.err'
41203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41204   (eval $ac_try) 2>&5
41205   ac_status=$?
41206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41207   (exit $ac_status); }; } &&
41208          { ac_try='test -s conftest.$ac_objext'
41209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41210   (eval $ac_try) 2>&5
41211   ac_status=$?
41212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41213   (exit $ac_status); }; }; then
41214   ac_lo=0 ac_mid=0
41215   while :; do
41216     cat >conftest.$ac_ext <<_ACEOF
41217 /* confdefs.h.  */
41218 _ACEOF
41219 cat confdefs.h >>conftest.$ac_ext
41220 cat >>conftest.$ac_ext <<_ACEOF
41221 /* end confdefs.h.  */
41222 $ac_includes_default
41223 int
41224 main ()
41225 {
41226 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
41227 test_array [0] = 0
41228
41229   ;
41230   return 0;
41231 }
41232 _ACEOF
41233 rm -f conftest.$ac_objext
41234 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41235   (eval $ac_compile) 2>conftest.er1
41236   ac_status=$?
41237   grep -v '^ *+' conftest.er1 >conftest.err
41238   rm -f conftest.er1
41239   cat conftest.err >&5
41240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41241   (exit $ac_status); } &&
41242          { ac_try='test -z "$ac_c_werror_flag"
41243                          || test ! -s conftest.err'
41244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41245   (eval $ac_try) 2>&5
41246   ac_status=$?
41247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41248   (exit $ac_status); }; } &&
41249          { ac_try='test -s conftest.$ac_objext'
41250   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41251   (eval $ac_try) 2>&5
41252   ac_status=$?
41253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41254   (exit $ac_status); }; }; then
41255   ac_hi=$ac_mid; break
41256 else
41257   echo "$as_me: failed program was:" >&5
41258 sed 's/^/| /' conftest.$ac_ext >&5
41259
41260 ac_lo=`expr $ac_mid + 1`
41261                     if test $ac_lo -le $ac_mid; then
41262                       ac_lo= ac_hi=
41263                       break
41264                     fi
41265                     ac_mid=`expr 2 '*' $ac_mid + 1`
41266 fi
41267 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41268   done
41269 else
41270   echo "$as_me: failed program was:" >&5
41271 sed 's/^/| /' conftest.$ac_ext >&5
41272
41273 cat >conftest.$ac_ext <<_ACEOF
41274 /* confdefs.h.  */
41275 _ACEOF
41276 cat confdefs.h >>conftest.$ac_ext
41277 cat >>conftest.$ac_ext <<_ACEOF
41278 /* end confdefs.h.  */
41279 $ac_includes_default
41280 int
41281 main ()
41282 {
41283 static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
41284 test_array [0] = 0
41285
41286   ;
41287   return 0;
41288 }
41289 _ACEOF
41290 rm -f conftest.$ac_objext
41291 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41292   (eval $ac_compile) 2>conftest.er1
41293   ac_status=$?
41294   grep -v '^ *+' conftest.er1 >conftest.err
41295   rm -f conftest.er1
41296   cat conftest.err >&5
41297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41298   (exit $ac_status); } &&
41299          { ac_try='test -z "$ac_c_werror_flag"
41300                          || test ! -s conftest.err'
41301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41302   (eval $ac_try) 2>&5
41303   ac_status=$?
41304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41305   (exit $ac_status); }; } &&
41306          { ac_try='test -s conftest.$ac_objext'
41307   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41308   (eval $ac_try) 2>&5
41309   ac_status=$?
41310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41311   (exit $ac_status); }; }; then
41312   ac_hi=-1 ac_mid=-1
41313   while :; do
41314     cat >conftest.$ac_ext <<_ACEOF
41315 /* confdefs.h.  */
41316 _ACEOF
41317 cat confdefs.h >>conftest.$ac_ext
41318 cat >>conftest.$ac_ext <<_ACEOF
41319 /* end confdefs.h.  */
41320 $ac_includes_default
41321 int
41322 main ()
41323 {
41324 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
41325 test_array [0] = 0
41326
41327   ;
41328   return 0;
41329 }
41330 _ACEOF
41331 rm -f conftest.$ac_objext
41332 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41333   (eval $ac_compile) 2>conftest.er1
41334   ac_status=$?
41335   grep -v '^ *+' conftest.er1 >conftest.err
41336   rm -f conftest.er1
41337   cat conftest.err >&5
41338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41339   (exit $ac_status); } &&
41340          { ac_try='test -z "$ac_c_werror_flag"
41341                          || test ! -s conftest.err'
41342   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41343   (eval $ac_try) 2>&5
41344   ac_status=$?
41345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41346   (exit $ac_status); }; } &&
41347          { ac_try='test -s conftest.$ac_objext'
41348   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41349   (eval $ac_try) 2>&5
41350   ac_status=$?
41351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41352   (exit $ac_status); }; }; then
41353   ac_lo=$ac_mid; break
41354 else
41355   echo "$as_me: failed program was:" >&5
41356 sed 's/^/| /' conftest.$ac_ext >&5
41357
41358 ac_hi=`expr '(' $ac_mid ')' - 1`
41359                        if test $ac_mid -le $ac_hi; then
41360                          ac_lo= ac_hi=
41361                          break
41362                        fi
41363                        ac_mid=`expr 2 '*' $ac_mid`
41364 fi
41365 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41366   done
41367 else
41368   echo "$as_me: failed program was:" >&5
41369 sed 's/^/| /' conftest.$ac_ext >&5
41370
41371 ac_lo= ac_hi=
41372 fi
41373 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41374 fi
41375 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41376 # Binary search between lo and hi bounds.
41377 while test "x$ac_lo" != "x$ac_hi"; do
41378   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
41379   cat >conftest.$ac_ext <<_ACEOF
41380 /* confdefs.h.  */
41381 _ACEOF
41382 cat confdefs.h >>conftest.$ac_ext
41383 cat >>conftest.$ac_ext <<_ACEOF
41384 /* end confdefs.h.  */
41385 $ac_includes_default
41386 int
41387 main ()
41388 {
41389 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
41390 test_array [0] = 0
41391
41392   ;
41393   return 0;
41394 }
41395 _ACEOF
41396 rm -f conftest.$ac_objext
41397 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41398   (eval $ac_compile) 2>conftest.er1
41399   ac_status=$?
41400   grep -v '^ *+' conftest.er1 >conftest.err
41401   rm -f conftest.er1
41402   cat conftest.err >&5
41403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41404   (exit $ac_status); } &&
41405          { ac_try='test -z "$ac_c_werror_flag"
41406                          || test ! -s conftest.err'
41407   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41408   (eval $ac_try) 2>&5
41409   ac_status=$?
41410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41411   (exit $ac_status); }; } &&
41412          { ac_try='test -s conftest.$ac_objext'
41413   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41414   (eval $ac_try) 2>&5
41415   ac_status=$?
41416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41417   (exit $ac_status); }; }; then
41418   ac_hi=$ac_mid
41419 else
41420   echo "$as_me: failed program was:" >&5
41421 sed 's/^/| /' conftest.$ac_ext >&5
41422
41423 ac_lo=`expr '(' $ac_mid ')' + 1`
41424 fi
41425 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41426 done
41427 case $ac_lo in
41428 ?*) ac_cv_sizeof_long=$ac_lo;;
41429 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
41430 See \`config.log' for more details." >&5
41431 echo "$as_me: error: cannot compute sizeof (long), 77
41432 See \`config.log' for more details." >&2;}
41433    { (exit 1); exit 1; }; } ;;
41434 esac
41435 else
41436   if test "$cross_compiling" = yes; then
41437   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
41438 See \`config.log' for more details." >&5
41439 echo "$as_me: error: cannot run test program while cross compiling
41440 See \`config.log' for more details." >&2;}
41441    { (exit 1); exit 1; }; }
41442 else
41443   cat >conftest.$ac_ext <<_ACEOF
41444 /* confdefs.h.  */
41445 _ACEOF
41446 cat confdefs.h >>conftest.$ac_ext
41447 cat >>conftest.$ac_ext <<_ACEOF
41448 /* end confdefs.h.  */
41449 $ac_includes_default
41450 long longval () { return (long) (sizeof (long)); }
41451 unsigned long ulongval () { return (long) (sizeof (long)); }
41452 #include <stdio.h>
41453 #include <stdlib.h>
41454 int
41455 main ()
41456 {
41457
41458   FILE *f = fopen ("conftest.val", "w");
41459   if (! f)
41460     exit (1);
41461   if (((long) (sizeof (long))) < 0)
41462     {
41463       long i = longval ();
41464       if (i != ((long) (sizeof (long))))
41465         exit (1);
41466       fprintf (f, "%ld\n", i);
41467     }
41468   else
41469     {
41470       unsigned long i = ulongval ();
41471       if (i != ((long) (sizeof (long))))
41472         exit (1);
41473       fprintf (f, "%lu\n", i);
41474     }
41475   exit (ferror (f) || fclose (f) != 0);
41476
41477   ;
41478   return 0;
41479 }
41480 _ACEOF
41481 rm -f conftest$ac_exeext
41482 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
41483   (eval $ac_link) 2>&5
41484   ac_status=$?
41485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41486   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
41487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41488   (eval $ac_try) 2>&5
41489   ac_status=$?
41490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41491   (exit $ac_status); }; }; then
41492   ac_cv_sizeof_long=`cat conftest.val`
41493 else
41494   echo "$as_me: program exited with status $ac_status" >&5
41495 echo "$as_me: failed program was:" >&5
41496 sed 's/^/| /' conftest.$ac_ext >&5
41497
41498 ( exit $ac_status )
41499 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
41500 See \`config.log' for more details." >&5
41501 echo "$as_me: error: cannot compute sizeof (long), 77
41502 See \`config.log' for more details." >&2;}
41503    { (exit 1); exit 1; }; }
41504 fi
41505 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
41506 fi
41507 fi
41508 rm -f conftest.val
41509 else
41510   ac_cv_sizeof_long=0
41511 fi
41512 fi
41513 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
41514 echo "${ECHO_T}$ac_cv_sizeof_long" >&6
41515 cat >>confdefs.h <<_ACEOF
41516 #define SIZEOF_LONG $ac_cv_sizeof_long
41517 _ACEOF
41518
41519
41520 echo "$as_me:$LINENO: checking for wchar_t" >&5
41521 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
41522 if test "${ac_cv_type_wchar_t+set}" = set; then
41523   echo $ECHO_N "(cached) $ECHO_C" >&6
41524 else
41525   cat >conftest.$ac_ext <<_ACEOF
41526 /* confdefs.h.  */
41527 _ACEOF
41528 cat confdefs.h >>conftest.$ac_ext
41529 cat >>conftest.$ac_ext <<_ACEOF
41530 /* end confdefs.h.  */
41531 $ac_includes_default
41532 int
41533 main ()
41534 {
41535 if ((wchar_t *) 0)
41536   return 0;
41537 if (sizeof (wchar_t))
41538   return 0;
41539   ;
41540   return 0;
41541 }
41542 _ACEOF
41543 rm -f conftest.$ac_objext
41544 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41545   (eval $ac_compile) 2>conftest.er1
41546   ac_status=$?
41547   grep -v '^ *+' conftest.er1 >conftest.err
41548   rm -f conftest.er1
41549   cat conftest.err >&5
41550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41551   (exit $ac_status); } &&
41552          { ac_try='test -z "$ac_c_werror_flag"
41553                          || test ! -s conftest.err'
41554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41555   (eval $ac_try) 2>&5
41556   ac_status=$?
41557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41558   (exit $ac_status); }; } &&
41559          { ac_try='test -s conftest.$ac_objext'
41560   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41561   (eval $ac_try) 2>&5
41562   ac_status=$?
41563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41564   (exit $ac_status); }; }; then
41565   ac_cv_type_wchar_t=yes
41566 else
41567   echo "$as_me: failed program was:" >&5
41568 sed 's/^/| /' conftest.$ac_ext >&5
41569
41570 ac_cv_type_wchar_t=no
41571 fi
41572 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41573 fi
41574 echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
41575 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
41576
41577 echo "$as_me:$LINENO: checking size of wchar_t" >&5
41578 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
41579 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
41580   echo $ECHO_N "(cached) $ECHO_C" >&6
41581 else
41582   if test "$ac_cv_type_wchar_t" = yes; then
41583   # The cast to unsigned long works around a bug in the HP C Compiler
41584   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41585   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41586   # This bug is HP SR number 8606223364.
41587   if test "$cross_compiling" = yes; then
41588   # Depending upon the size, compute the lo and hi bounds.
41589 cat >conftest.$ac_ext <<_ACEOF
41590 /* confdefs.h.  */
41591 _ACEOF
41592 cat confdefs.h >>conftest.$ac_ext
41593 cat >>conftest.$ac_ext <<_ACEOF
41594 /* end confdefs.h.  */
41595 $ac_includes_default
41596 int
41597 main ()
41598 {
41599 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
41600 test_array [0] = 0
41601
41602   ;
41603   return 0;
41604 }
41605 _ACEOF
41606 rm -f conftest.$ac_objext
41607 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41608   (eval $ac_compile) 2>conftest.er1
41609   ac_status=$?
41610   grep -v '^ *+' conftest.er1 >conftest.err
41611   rm -f conftest.er1
41612   cat conftest.err >&5
41613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41614   (exit $ac_status); } &&
41615          { ac_try='test -z "$ac_c_werror_flag"
41616                          || test ! -s conftest.err'
41617   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41618   (eval $ac_try) 2>&5
41619   ac_status=$?
41620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41621   (exit $ac_status); }; } &&
41622          { ac_try='test -s conftest.$ac_objext'
41623   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41624   (eval $ac_try) 2>&5
41625   ac_status=$?
41626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41627   (exit $ac_status); }; }; then
41628   ac_lo=0 ac_mid=0
41629   while :; do
41630     cat >conftest.$ac_ext <<_ACEOF
41631 /* confdefs.h.  */
41632 _ACEOF
41633 cat confdefs.h >>conftest.$ac_ext
41634 cat >>conftest.$ac_ext <<_ACEOF
41635 /* end confdefs.h.  */
41636 $ac_includes_default
41637 int
41638 main ()
41639 {
41640 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
41641 test_array [0] = 0
41642
41643   ;
41644   return 0;
41645 }
41646 _ACEOF
41647 rm -f conftest.$ac_objext
41648 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41649   (eval $ac_compile) 2>conftest.er1
41650   ac_status=$?
41651   grep -v '^ *+' conftest.er1 >conftest.err
41652   rm -f conftest.er1
41653   cat conftest.err >&5
41654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41655   (exit $ac_status); } &&
41656          { ac_try='test -z "$ac_c_werror_flag"
41657                          || test ! -s conftest.err'
41658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41659   (eval $ac_try) 2>&5
41660   ac_status=$?
41661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41662   (exit $ac_status); }; } &&
41663          { ac_try='test -s conftest.$ac_objext'
41664   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41665   (eval $ac_try) 2>&5
41666   ac_status=$?
41667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41668   (exit $ac_status); }; }; then
41669   ac_hi=$ac_mid; break
41670 else
41671   echo "$as_me: failed program was:" >&5
41672 sed 's/^/| /' conftest.$ac_ext >&5
41673
41674 ac_lo=`expr $ac_mid + 1`
41675                     if test $ac_lo -le $ac_mid; then
41676                       ac_lo= ac_hi=
41677                       break
41678                     fi
41679                     ac_mid=`expr 2 '*' $ac_mid + 1`
41680 fi
41681 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41682   done
41683 else
41684   echo "$as_me: failed program was:" >&5
41685 sed 's/^/| /' conftest.$ac_ext >&5
41686
41687 cat >conftest.$ac_ext <<_ACEOF
41688 /* confdefs.h.  */
41689 _ACEOF
41690 cat confdefs.h >>conftest.$ac_ext
41691 cat >>conftest.$ac_ext <<_ACEOF
41692 /* end confdefs.h.  */
41693 $ac_includes_default
41694 int
41695 main ()
41696 {
41697 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
41698 test_array [0] = 0
41699
41700   ;
41701   return 0;
41702 }
41703 _ACEOF
41704 rm -f conftest.$ac_objext
41705 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41706   (eval $ac_compile) 2>conftest.er1
41707   ac_status=$?
41708   grep -v '^ *+' conftest.er1 >conftest.err
41709   rm -f conftest.er1
41710   cat conftest.err >&5
41711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41712   (exit $ac_status); } &&
41713          { ac_try='test -z "$ac_c_werror_flag"
41714                          || test ! -s conftest.err'
41715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41716   (eval $ac_try) 2>&5
41717   ac_status=$?
41718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41719   (exit $ac_status); }; } &&
41720          { ac_try='test -s conftest.$ac_objext'
41721   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41722   (eval $ac_try) 2>&5
41723   ac_status=$?
41724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41725   (exit $ac_status); }; }; then
41726   ac_hi=-1 ac_mid=-1
41727   while :; do
41728     cat >conftest.$ac_ext <<_ACEOF
41729 /* confdefs.h.  */
41730 _ACEOF
41731 cat confdefs.h >>conftest.$ac_ext
41732 cat >>conftest.$ac_ext <<_ACEOF
41733 /* end confdefs.h.  */
41734 $ac_includes_default
41735 int
41736 main ()
41737 {
41738 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
41739 test_array [0] = 0
41740
41741   ;
41742   return 0;
41743 }
41744 _ACEOF
41745 rm -f conftest.$ac_objext
41746 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41747   (eval $ac_compile) 2>conftest.er1
41748   ac_status=$?
41749   grep -v '^ *+' conftest.er1 >conftest.err
41750   rm -f conftest.er1
41751   cat conftest.err >&5
41752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41753   (exit $ac_status); } &&
41754          { ac_try='test -z "$ac_c_werror_flag"
41755                          || test ! -s conftest.err'
41756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41757   (eval $ac_try) 2>&5
41758   ac_status=$?
41759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41760   (exit $ac_status); }; } &&
41761          { ac_try='test -s conftest.$ac_objext'
41762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41763   (eval $ac_try) 2>&5
41764   ac_status=$?
41765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41766   (exit $ac_status); }; }; then
41767   ac_lo=$ac_mid; break
41768 else
41769   echo "$as_me: failed program was:" >&5
41770 sed 's/^/| /' conftest.$ac_ext >&5
41771
41772 ac_hi=`expr '(' $ac_mid ')' - 1`
41773                        if test $ac_mid -le $ac_hi; then
41774                          ac_lo= ac_hi=
41775                          break
41776                        fi
41777                        ac_mid=`expr 2 '*' $ac_mid`
41778 fi
41779 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41780   done
41781 else
41782   echo "$as_me: failed program was:" >&5
41783 sed 's/^/| /' conftest.$ac_ext >&5
41784
41785 ac_lo= ac_hi=
41786 fi
41787 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41788 fi
41789 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41790 # Binary search between lo and hi bounds.
41791 while test "x$ac_lo" != "x$ac_hi"; do
41792   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
41793   cat >conftest.$ac_ext <<_ACEOF
41794 /* confdefs.h.  */
41795 _ACEOF
41796 cat confdefs.h >>conftest.$ac_ext
41797 cat >>conftest.$ac_ext <<_ACEOF
41798 /* end confdefs.h.  */
41799 $ac_includes_default
41800 int
41801 main ()
41802 {
41803 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
41804 test_array [0] = 0
41805
41806   ;
41807   return 0;
41808 }
41809 _ACEOF
41810 rm -f conftest.$ac_objext
41811 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41812   (eval $ac_compile) 2>conftest.er1
41813   ac_status=$?
41814   grep -v '^ *+' conftest.er1 >conftest.err
41815   rm -f conftest.er1
41816   cat conftest.err >&5
41817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41818   (exit $ac_status); } &&
41819          { ac_try='test -z "$ac_c_werror_flag"
41820                          || test ! -s conftest.err'
41821   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41822   (eval $ac_try) 2>&5
41823   ac_status=$?
41824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41825   (exit $ac_status); }; } &&
41826          { ac_try='test -s conftest.$ac_objext'
41827   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41828   (eval $ac_try) 2>&5
41829   ac_status=$?
41830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41831   (exit $ac_status); }; }; then
41832   ac_hi=$ac_mid
41833 else
41834   echo "$as_me: failed program was:" >&5
41835 sed 's/^/| /' conftest.$ac_ext >&5
41836
41837 ac_lo=`expr '(' $ac_mid ')' + 1`
41838 fi
41839 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41840 done
41841 case $ac_lo in
41842 ?*) ac_cv_sizeof_wchar_t=$ac_lo;;
41843 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
41844 See \`config.log' for more details." >&5
41845 echo "$as_me: error: cannot compute sizeof (wchar_t), 77
41846 See \`config.log' for more details." >&2;}
41847    { (exit 1); exit 1; }; } ;;
41848 esac
41849 else
41850   if test "$cross_compiling" = yes; then
41851   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
41852 See \`config.log' for more details." >&5
41853 echo "$as_me: error: cannot run test program while cross compiling
41854 See \`config.log' for more details." >&2;}
41855    { (exit 1); exit 1; }; }
41856 else
41857   cat >conftest.$ac_ext <<_ACEOF
41858 /* confdefs.h.  */
41859 _ACEOF
41860 cat confdefs.h >>conftest.$ac_ext
41861 cat >>conftest.$ac_ext <<_ACEOF
41862 /* end confdefs.h.  */
41863 $ac_includes_default
41864 long longval () { return (long) (sizeof (wchar_t)); }
41865 unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
41866 #include <stdio.h>
41867 #include <stdlib.h>
41868 int
41869 main ()
41870 {
41871
41872   FILE *f = fopen ("conftest.val", "w");
41873   if (! f)
41874     exit (1);
41875   if (((long) (sizeof (wchar_t))) < 0)
41876     {
41877       long i = longval ();
41878       if (i != ((long) (sizeof (wchar_t))))
41879         exit (1);
41880       fprintf (f, "%ld\n", i);
41881     }
41882   else
41883     {
41884       unsigned long i = ulongval ();
41885       if (i != ((long) (sizeof (wchar_t))))
41886         exit (1);
41887       fprintf (f, "%lu\n", i);
41888     }
41889   exit (ferror (f) || fclose (f) != 0);
41890
41891   ;
41892   return 0;
41893 }
41894 _ACEOF
41895 rm -f conftest$ac_exeext
41896 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
41897   (eval $ac_link) 2>&5
41898   ac_status=$?
41899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41900   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
41901   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41902   (eval $ac_try) 2>&5
41903   ac_status=$?
41904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41905   (exit $ac_status); }; }; then
41906   ac_cv_sizeof_wchar_t=`cat conftest.val`
41907 else
41908   echo "$as_me: program exited with status $ac_status" >&5
41909 echo "$as_me: failed program was:" >&5
41910 sed 's/^/| /' conftest.$ac_ext >&5
41911
41912 ( exit $ac_status )
41913 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
41914 See \`config.log' for more details." >&5
41915 echo "$as_me: error: cannot compute sizeof (wchar_t), 77
41916 See \`config.log' for more details." >&2;}
41917    { (exit 1); exit 1; }; }
41918 fi
41919 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
41920 fi
41921 fi
41922 rm -f conftest.val
41923 else
41924   ac_cv_sizeof_wchar_t=0
41925 fi
41926 fi
41927 echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
41928 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
41929 cat >>confdefs.h <<_ACEOF
41930 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
41931 _ACEOF
41932
41933
41934
41935 if test "$ac_cv_sizeof_int" -lt 4 ; then
41936         { echo "$as_me:$LINENO: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&5
41937 echo "$as_me: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&2;}
41938
41939
41940 cat >>confdefs.h <<\_ACEOF
41941 #define LBER_INT_T long
41942 _ACEOF
41943
41944 else
41945
41946 cat >>confdefs.h <<\_ACEOF
41947 #define LBER_INT_T int
41948 _ACEOF
41949
41950 fi
41951
41952
41953 cat >>confdefs.h <<\_ACEOF
41954 #define LBER_LEN_T long
41955 _ACEOF
41956
41957
41958 cat >>confdefs.h <<\_ACEOF
41959 #define LBER_SOCKET_T int
41960 _ACEOF
41961
41962
41963 cat >>confdefs.h <<\_ACEOF
41964 #define LBER_TAG_T long
41965 _ACEOF
41966
41967
41968 echo "$as_me:$LINENO: checking for working memcmp" >&5
41969 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
41970 if test "${ac_cv_func_memcmp_working+set}" = set; then
41971   echo $ECHO_N "(cached) $ECHO_C" >&6
41972 else
41973   if test "$cross_compiling" = yes; then
41974   ac_cv_func_memcmp_working=no
41975 else
41976   cat >conftest.$ac_ext <<_ACEOF
41977 /* confdefs.h.  */
41978 _ACEOF
41979 cat confdefs.h >>conftest.$ac_ext
41980 cat >>conftest.$ac_ext <<_ACEOF
41981 /* end confdefs.h.  */
41982 $ac_includes_default
41983 int
41984 main ()
41985 {
41986
41987   /* Some versions of memcmp are not 8-bit clean.  */
41988   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
41989   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
41990     exit (1);
41991
41992   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
41993      or more and with at least one buffer not starting on a 4-byte boundary.
41994      William Lewis provided this test program.   */
41995   {
41996     char foo[21];
41997     char bar[21];
41998     int i;
41999     for (i = 0; i < 4; i++)
42000       {
42001         char *a = foo + i;
42002         char *b = bar + i;
42003         strcpy (a, "--------01111111");
42004         strcpy (b, "--------10000000");
42005         if (memcmp (a, b, 16) >= 0)
42006           exit (1);
42007       }
42008     exit (0);
42009   }
42010
42011   ;
42012   return 0;
42013 }
42014 _ACEOF
42015 rm -f conftest$ac_exeext
42016 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42017   (eval $ac_link) 2>&5
42018   ac_status=$?
42019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42020   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
42021   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42022   (eval $ac_try) 2>&5
42023   ac_status=$?
42024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42025   (exit $ac_status); }; }; then
42026   ac_cv_func_memcmp_working=yes
42027 else
42028   echo "$as_me: program exited with status $ac_status" >&5
42029 echo "$as_me: failed program was:" >&5
42030 sed 's/^/| /' conftest.$ac_ext >&5
42031
42032 ( exit $ac_status )
42033 ac_cv_func_memcmp_working=no
42034 fi
42035 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
42036 fi
42037 fi
42038 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
42039 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
42040 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
42041     "memcmp.$ac_objext"   | \
42042   *" memcmp.$ac_objext"   | \
42043     "memcmp.$ac_objext "* | \
42044   *" memcmp.$ac_objext "* ) ;;
42045   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
42046 esac
42047
42048
42049
42050 if test $ac_cv_func_memcmp_working = no ; then
42051
42052 cat >>confdefs.h <<\_ACEOF
42053 #define NEED_MEMCMP_REPLACEMENT 1
42054 _ACEOF
42055
42056 fi
42057
42058
42059 for ac_func in strftime
42060 do
42061 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
42062 echo "$as_me:$LINENO: checking for $ac_func" >&5
42063 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
42064 if eval "test \"\${$as_ac_var+set}\" = set"; then
42065   echo $ECHO_N "(cached) $ECHO_C" >&6
42066 else
42067   cat >conftest.$ac_ext <<_ACEOF
42068 /* confdefs.h.  */
42069 _ACEOF
42070 cat confdefs.h >>conftest.$ac_ext
42071 cat >>conftest.$ac_ext <<_ACEOF
42072 /* end confdefs.h.  */
42073 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
42074    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
42075 #define $ac_func innocuous_$ac_func
42076
42077 /* System header to define __stub macros and hopefully few prototypes,
42078     which can conflict with char $ac_func (); below.
42079     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
42080     <limits.h> exists even on freestanding compilers.  */
42081
42082 #ifdef __STDC__
42083 # include <limits.h>
42084 #else
42085 # include <assert.h>
42086 #endif
42087
42088 #undef $ac_func
42089
42090 /* Override any gcc2 internal prototype to avoid an error.  */
42091 #ifdef __cplusplus
42092 extern "C"
42093 {
42094 #endif
42095 /* We use char because int might match the return type of a gcc2
42096    builtin and then its argument prototype would still apply.  */
42097 char $ac_func ();
42098 /* The GNU C library defines this for functions which it implements
42099     to always fail with ENOSYS.  Some functions are actually named
42100     something starting with __ and the normal name is an alias.  */
42101 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
42102 choke me
42103 #else
42104 char (*f) () = $ac_func;
42105 #endif
42106 #ifdef __cplusplus
42107 }
42108 #endif
42109
42110 int
42111 main ()
42112 {
42113 return f != $ac_func;
42114   ;
42115   return 0;
42116 }
42117 _ACEOF
42118 rm -f conftest.$ac_objext conftest$ac_exeext
42119 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42120   (eval $ac_link) 2>conftest.er1
42121   ac_status=$?
42122   grep -v '^ *+' conftest.er1 >conftest.err
42123   rm -f conftest.er1
42124   cat conftest.err >&5
42125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42126   (exit $ac_status); } &&
42127          { ac_try='test -z "$ac_c_werror_flag"
42128                          || test ! -s conftest.err'
42129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42130   (eval $ac_try) 2>&5
42131   ac_status=$?
42132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42133   (exit $ac_status); }; } &&
42134          { ac_try='test -s conftest$ac_exeext'
42135   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42136   (eval $ac_try) 2>&5
42137   ac_status=$?
42138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42139   (exit $ac_status); }; }; then
42140   eval "$as_ac_var=yes"
42141 else
42142   echo "$as_me: failed program was:" >&5
42143 sed 's/^/| /' conftest.$ac_ext >&5
42144
42145 eval "$as_ac_var=no"
42146 fi
42147 rm -f conftest.err conftest.$ac_objext \
42148       conftest$ac_exeext conftest.$ac_ext
42149 fi
42150 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
42151 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
42152 if test `eval echo '${'$as_ac_var'}'` = yes; then
42153   cat >>confdefs.h <<_ACEOF
42154 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
42155 _ACEOF
42156
42157 else
42158   # strftime is in -lintl on SCO UNIX.
42159 echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
42160 echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
42161 if test "${ac_cv_lib_intl_strftime+set}" = set; then
42162   echo $ECHO_N "(cached) $ECHO_C" >&6
42163 else
42164   ac_check_lib_save_LIBS=$LIBS
42165 LIBS="-lintl  $LIBS"
42166 cat >conftest.$ac_ext <<_ACEOF
42167 /* confdefs.h.  */
42168 _ACEOF
42169 cat confdefs.h >>conftest.$ac_ext
42170 cat >>conftest.$ac_ext <<_ACEOF
42171 /* end confdefs.h.  */
42172
42173 /* Override any gcc2 internal prototype to avoid an error.  */
42174 #ifdef __cplusplus
42175 extern "C"
42176 #endif
42177 /* We use char because int might match the return type of a gcc2
42178    builtin and then its argument prototype would still apply.  */
42179 char strftime ();
42180 int
42181 main ()
42182 {
42183 strftime ();
42184   ;
42185   return 0;
42186 }
42187 _ACEOF
42188 rm -f conftest.$ac_objext conftest$ac_exeext
42189 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42190   (eval $ac_link) 2>conftest.er1
42191   ac_status=$?
42192   grep -v '^ *+' conftest.er1 >conftest.err
42193   rm -f conftest.er1
42194   cat conftest.err >&5
42195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42196   (exit $ac_status); } &&
42197          { ac_try='test -z "$ac_c_werror_flag"
42198                          || test ! -s conftest.err'
42199   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42200   (eval $ac_try) 2>&5
42201   ac_status=$?
42202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42203   (exit $ac_status); }; } &&
42204          { ac_try='test -s conftest$ac_exeext'
42205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42206   (eval $ac_try) 2>&5
42207   ac_status=$?
42208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42209   (exit $ac_status); }; }; then
42210   ac_cv_lib_intl_strftime=yes
42211 else
42212   echo "$as_me: failed program was:" >&5
42213 sed 's/^/| /' conftest.$ac_ext >&5
42214
42215 ac_cv_lib_intl_strftime=no
42216 fi
42217 rm -f conftest.err conftest.$ac_objext \
42218       conftest$ac_exeext conftest.$ac_ext
42219 LIBS=$ac_check_lib_save_LIBS
42220 fi
42221 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
42222 echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
42223 if test $ac_cv_lib_intl_strftime = yes; then
42224   cat >>confdefs.h <<\_ACEOF
42225 #define HAVE_STRFTIME 1
42226 _ACEOF
42227
42228 LIBS="-lintl $LIBS"
42229 fi
42230
42231 fi
42232 done
42233
42234
42235 echo "$as_me:$LINENO: checking for inet_aton()" >&5
42236 echo $ECHO_N "checking for inet_aton()... $ECHO_C" >&6
42237 if test "${ol_cv_func_inet_aton+set}" = set; then
42238   echo $ECHO_N "(cached) $ECHO_C" >&6
42239 else
42240   cat >conftest.$ac_ext <<_ACEOF
42241 /* confdefs.h.  */
42242 _ACEOF
42243 cat confdefs.h >>conftest.$ac_ext
42244 cat >>conftest.$ac_ext <<_ACEOF
42245 /* end confdefs.h.  */
42246
42247 #ifdef HAVE_SYS_TYPES_H
42248 #       include <sys/types.h>
42249 #endif
42250 #ifdef HAVE_SYS_SOCKET_H
42251 #       include <sys/socket.h>
42252 #       ifdef HAVE_SYS_SELECT_H
42253 #               include <sys/select.h>
42254 #       endif
42255 #       include <netinet/in.h>
42256 #       ifdef HAVE_ARPA_INET_H
42257 #               include <arpa/inet.h>
42258 #       endif
42259 #endif
42260
42261 int
42262 main ()
42263 {
42264 struct in_addr in;
42265 int rc = inet_aton( "255.255.255.255", &in );
42266   ;
42267   return 0;
42268 }
42269 _ACEOF
42270 rm -f conftest.$ac_objext conftest$ac_exeext
42271 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42272   (eval $ac_link) 2>conftest.er1
42273   ac_status=$?
42274   grep -v '^ *+' conftest.er1 >conftest.err
42275   rm -f conftest.er1
42276   cat conftest.err >&5
42277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42278   (exit $ac_status); } &&
42279          { ac_try='test -z "$ac_c_werror_flag"
42280                          || test ! -s conftest.err'
42281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42282   (eval $ac_try) 2>&5
42283   ac_status=$?
42284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42285   (exit $ac_status); }; } &&
42286          { ac_try='test -s conftest$ac_exeext'
42287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42288   (eval $ac_try) 2>&5
42289   ac_status=$?
42290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42291   (exit $ac_status); }; }; then
42292   ol_cv_func_inet_aton=yes
42293 else
42294   echo "$as_me: failed program was:" >&5
42295 sed 's/^/| /' conftest.$ac_ext >&5
42296
42297 ol_cv_func_inet_aton=no
42298 fi
42299 rm -f conftest.err conftest.$ac_objext \
42300       conftest$ac_exeext conftest.$ac_ext
42301 fi
42302 echo "$as_me:$LINENO: result: $ol_cv_func_inet_aton" >&5
42303 echo "${ECHO_T}$ol_cv_func_inet_aton" >&6
42304   if test $ol_cv_func_inet_aton != no; then
42305
42306 cat >>confdefs.h <<\_ACEOF
42307 #define HAVE_INET_ATON 1
42308 _ACEOF
42309
42310   fi
42311
42312
42313 echo "$as_me:$LINENO: checking for _spawnlp" >&5
42314 echo $ECHO_N "checking for _spawnlp... $ECHO_C" >&6
42315 if test "${ac_cv_func__spawnlp+set}" = set; then
42316   echo $ECHO_N "(cached) $ECHO_C" >&6
42317 else
42318   cat >conftest.$ac_ext <<_ACEOF
42319 /* confdefs.h.  */
42320 _ACEOF
42321 cat confdefs.h >>conftest.$ac_ext
42322 cat >>conftest.$ac_ext <<_ACEOF
42323 /* end confdefs.h.  */
42324 /* Define _spawnlp to an innocuous variant, in case <limits.h> declares _spawnlp.
42325    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
42326 #define _spawnlp innocuous__spawnlp
42327
42328 /* System header to define __stub macros and hopefully few prototypes,
42329     which can conflict with char _spawnlp (); below.
42330     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
42331     <limits.h> exists even on freestanding compilers.  */
42332
42333 #ifdef __STDC__
42334 # include <limits.h>
42335 #else
42336 # include <assert.h>
42337 #endif
42338
42339 #undef _spawnlp
42340
42341 /* Override any gcc2 internal prototype to avoid an error.  */
42342 #ifdef __cplusplus
42343 extern "C"
42344 {
42345 #endif
42346 /* We use char because int might match the return type of a gcc2
42347    builtin and then its argument prototype would still apply.  */
42348 char _spawnlp ();
42349 /* The GNU C library defines this for functions which it implements
42350     to always fail with ENOSYS.  Some functions are actually named
42351     something starting with __ and the normal name is an alias.  */
42352 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
42353 choke me
42354 #else
42355 char (*f) () = _spawnlp;
42356 #endif
42357 #ifdef __cplusplus
42358 }
42359 #endif
42360
42361 int
42362 main ()
42363 {
42364 return f != _spawnlp;
42365   ;
42366   return 0;
42367 }
42368 _ACEOF
42369 rm -f conftest.$ac_objext conftest$ac_exeext
42370 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42371   (eval $ac_link) 2>conftest.er1
42372   ac_status=$?
42373   grep -v '^ *+' conftest.er1 >conftest.err
42374   rm -f conftest.er1
42375   cat conftest.err >&5
42376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42377   (exit $ac_status); } &&
42378          { ac_try='test -z "$ac_c_werror_flag"
42379                          || test ! -s conftest.err'
42380   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42381   (eval $ac_try) 2>&5
42382   ac_status=$?
42383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42384   (exit $ac_status); }; } &&
42385          { ac_try='test -s conftest$ac_exeext'
42386   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42387   (eval $ac_try) 2>&5
42388   ac_status=$?
42389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42390   (exit $ac_status); }; }; then
42391   ac_cv_func__spawnlp=yes
42392 else
42393   echo "$as_me: failed program was:" >&5
42394 sed 's/^/| /' conftest.$ac_ext >&5
42395
42396 ac_cv_func__spawnlp=no
42397 fi
42398 rm -f conftest.err conftest.$ac_objext \
42399       conftest$ac_exeext conftest.$ac_ext
42400 fi
42401 echo "$as_me:$LINENO: result: $ac_cv_func__spawnlp" >&5
42402 echo "${ECHO_T}$ac_cv_func__spawnlp" >&6
42403 if test $ac_cv_func__spawnlp = yes; then
42404
42405 cat >>confdefs.h <<\_ACEOF
42406 #define HAVE_SPAWNLP 1
42407 _ACEOF
42408
42409 fi
42410
42411
42412 echo "$as_me:$LINENO: checking for _snprintf" >&5
42413 echo $ECHO_N "checking for _snprintf... $ECHO_C" >&6
42414 if test "${ac_cv_func__snprintf+set}" = set; then
42415   echo $ECHO_N "(cached) $ECHO_C" >&6
42416 else
42417   cat >conftest.$ac_ext <<_ACEOF
42418 /* confdefs.h.  */
42419 _ACEOF
42420 cat confdefs.h >>conftest.$ac_ext
42421 cat >>conftest.$ac_ext <<_ACEOF
42422 /* end confdefs.h.  */
42423 /* Define _snprintf to an innocuous variant, in case <limits.h> declares _snprintf.
42424    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
42425 #define _snprintf innocuous__snprintf
42426
42427 /* System header to define __stub macros and hopefully few prototypes,
42428     which can conflict with char _snprintf (); below.
42429     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
42430     <limits.h> exists even on freestanding compilers.  */
42431
42432 #ifdef __STDC__
42433 # include <limits.h>
42434 #else
42435 # include <assert.h>
42436 #endif
42437
42438 #undef _snprintf
42439
42440 /* Override any gcc2 internal prototype to avoid an error.  */
42441 #ifdef __cplusplus
42442 extern "C"
42443 {
42444 #endif
42445 /* We use char because int might match the return type of a gcc2
42446    builtin and then its argument prototype would still apply.  */
42447 char _snprintf ();
42448 /* The GNU C library defines this for functions which it implements
42449     to always fail with ENOSYS.  Some functions are actually named
42450     something starting with __ and the normal name is an alias.  */
42451 #if defined (__stub__snprintf) || defined (__stub____snprintf)
42452 choke me
42453 #else
42454 char (*f) () = _snprintf;
42455 #endif
42456 #ifdef __cplusplus
42457 }
42458 #endif
42459
42460 int
42461 main ()
42462 {
42463 return f != _snprintf;
42464   ;
42465   return 0;
42466 }
42467 _ACEOF
42468 rm -f conftest.$ac_objext conftest$ac_exeext
42469 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42470   (eval $ac_link) 2>conftest.er1
42471   ac_status=$?
42472   grep -v '^ *+' conftest.er1 >conftest.err
42473   rm -f conftest.er1
42474   cat conftest.err >&5
42475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42476   (exit $ac_status); } &&
42477          { ac_try='test -z "$ac_c_werror_flag"
42478                          || test ! -s conftest.err'
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); }; } &&
42484          { ac_try='test -s conftest$ac_exeext'
42485   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42486   (eval $ac_try) 2>&5
42487   ac_status=$?
42488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42489   (exit $ac_status); }; }; then
42490   ac_cv_func__snprintf=yes
42491 else
42492   echo "$as_me: failed program was:" >&5
42493 sed 's/^/| /' conftest.$ac_ext >&5
42494
42495 ac_cv_func__snprintf=no
42496 fi
42497 rm -f conftest.err conftest.$ac_objext \
42498       conftest$ac_exeext conftest.$ac_ext
42499 fi
42500 echo "$as_me:$LINENO: result: $ac_cv_func__snprintf" >&5
42501 echo "${ECHO_T}$ac_cv_func__snprintf" >&6
42502 if test $ac_cv_func__snprintf = yes; then
42503   ac_cv_func_snprintf=yes
42504
42505 cat >>confdefs.h <<\_ACEOF
42506 #define snprintf _snprintf
42507 _ACEOF
42508
42509
42510 fi
42511
42512
42513 echo "$as_me:$LINENO: checking for _vsnprintf" >&5
42514 echo $ECHO_N "checking for _vsnprintf... $ECHO_C" >&6
42515 if test "${ac_cv_func__vsnprintf+set}" = set; then
42516   echo $ECHO_N "(cached) $ECHO_C" >&6
42517 else
42518   cat >conftest.$ac_ext <<_ACEOF
42519 /* confdefs.h.  */
42520 _ACEOF
42521 cat confdefs.h >>conftest.$ac_ext
42522 cat >>conftest.$ac_ext <<_ACEOF
42523 /* end confdefs.h.  */
42524 /* Define _vsnprintf to an innocuous variant, in case <limits.h> declares _vsnprintf.
42525    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
42526 #define _vsnprintf innocuous__vsnprintf
42527
42528 /* System header to define __stub macros and hopefully few prototypes,
42529     which can conflict with char _vsnprintf (); below.
42530     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
42531     <limits.h> exists even on freestanding compilers.  */
42532
42533 #ifdef __STDC__
42534 # include <limits.h>
42535 #else
42536 # include <assert.h>
42537 #endif
42538
42539 #undef _vsnprintf
42540
42541 /* Override any gcc2 internal prototype to avoid an error.  */
42542 #ifdef __cplusplus
42543 extern "C"
42544 {
42545 #endif
42546 /* We use char because int might match the return type of a gcc2
42547    builtin and then its argument prototype would still apply.  */
42548 char _vsnprintf ();
42549 /* The GNU C library defines this for functions which it implements
42550     to always fail with ENOSYS.  Some functions are actually named
42551     something starting with __ and the normal name is an alias.  */
42552 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
42553 choke me
42554 #else
42555 char (*f) () = _vsnprintf;
42556 #endif
42557 #ifdef __cplusplus
42558 }
42559 #endif
42560
42561 int
42562 main ()
42563 {
42564 return f != _vsnprintf;
42565   ;
42566   return 0;
42567 }
42568 _ACEOF
42569 rm -f conftest.$ac_objext conftest$ac_exeext
42570 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42571   (eval $ac_link) 2>conftest.er1
42572   ac_status=$?
42573   grep -v '^ *+' conftest.er1 >conftest.err
42574   rm -f conftest.er1
42575   cat conftest.err >&5
42576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42577   (exit $ac_status); } &&
42578          { ac_try='test -z "$ac_c_werror_flag"
42579                          || test ! -s conftest.err'
42580   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42581   (eval $ac_try) 2>&5
42582   ac_status=$?
42583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42584   (exit $ac_status); }; } &&
42585          { ac_try='test -s conftest$ac_exeext'
42586   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42587   (eval $ac_try) 2>&5
42588   ac_status=$?
42589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42590   (exit $ac_status); }; }; then
42591   ac_cv_func__vsnprintf=yes
42592 else
42593   echo "$as_me: failed program was:" >&5
42594 sed 's/^/| /' conftest.$ac_ext >&5
42595
42596 ac_cv_func__vsnprintf=no
42597 fi
42598 rm -f conftest.err conftest.$ac_objext \
42599       conftest$ac_exeext conftest.$ac_ext
42600 fi
42601 echo "$as_me:$LINENO: result: $ac_cv_func__vsnprintf" >&5
42602 echo "${ECHO_T}$ac_cv_func__vsnprintf" >&6
42603 if test $ac_cv_func__vsnprintf = yes; then
42604   ac_cv_func_vsnprintf=yes
42605
42606 cat >>confdefs.h <<\_ACEOF
42607 #define vsnprintf _vsnprintf
42608 _ACEOF
42609
42610
42611 fi
42612
42613
42614
42615 for ac_func in vprintf
42616 do
42617 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
42618 echo "$as_me:$LINENO: checking for $ac_func" >&5
42619 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
42620 if eval "test \"\${$as_ac_var+set}\" = set"; then
42621   echo $ECHO_N "(cached) $ECHO_C" >&6
42622 else
42623   cat >conftest.$ac_ext <<_ACEOF
42624 /* confdefs.h.  */
42625 _ACEOF
42626 cat confdefs.h >>conftest.$ac_ext
42627 cat >>conftest.$ac_ext <<_ACEOF
42628 /* end confdefs.h.  */
42629 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
42630    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
42631 #define $ac_func innocuous_$ac_func
42632
42633 /* System header to define __stub macros and hopefully few prototypes,
42634     which can conflict with char $ac_func (); below.
42635     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
42636     <limits.h> exists even on freestanding compilers.  */
42637
42638 #ifdef __STDC__
42639 # include <limits.h>
42640 #else
42641 # include <assert.h>
42642 #endif
42643
42644 #undef $ac_func
42645
42646 /* Override any gcc2 internal prototype to avoid an error.  */
42647 #ifdef __cplusplus
42648 extern "C"
42649 {
42650 #endif
42651 /* We use char because int might match the return type of a gcc2
42652    builtin and then its argument prototype would still apply.  */
42653 char $ac_func ();
42654 /* The GNU C library defines this for functions which it implements
42655     to always fail with ENOSYS.  Some functions are actually named
42656     something starting with __ and the normal name is an alias.  */
42657 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
42658 choke me
42659 #else
42660 char (*f) () = $ac_func;
42661 #endif
42662 #ifdef __cplusplus
42663 }
42664 #endif
42665
42666 int
42667 main ()
42668 {
42669 return f != $ac_func;
42670   ;
42671   return 0;
42672 }
42673 _ACEOF
42674 rm -f conftest.$ac_objext conftest$ac_exeext
42675 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42676   (eval $ac_link) 2>conftest.er1
42677   ac_status=$?
42678   grep -v '^ *+' conftest.er1 >conftest.err
42679   rm -f conftest.er1
42680   cat conftest.err >&5
42681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42682   (exit $ac_status); } &&
42683          { ac_try='test -z "$ac_c_werror_flag"
42684                          || test ! -s conftest.err'
42685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42686   (eval $ac_try) 2>&5
42687   ac_status=$?
42688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42689   (exit $ac_status); }; } &&
42690          { ac_try='test -s conftest$ac_exeext'
42691   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42692   (eval $ac_try) 2>&5
42693   ac_status=$?
42694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42695   (exit $ac_status); }; }; then
42696   eval "$as_ac_var=yes"
42697 else
42698   echo "$as_me: failed program was:" >&5
42699 sed 's/^/| /' conftest.$ac_ext >&5
42700
42701 eval "$as_ac_var=no"
42702 fi
42703 rm -f conftest.err conftest.$ac_objext \
42704       conftest$ac_exeext conftest.$ac_ext
42705 fi
42706 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
42707 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
42708 if test `eval echo '${'$as_ac_var'}'` = yes; then
42709   cat >>confdefs.h <<_ACEOF
42710 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
42711 _ACEOF
42712
42713 echo "$as_me:$LINENO: checking for _doprnt" >&5
42714 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
42715 if test "${ac_cv_func__doprnt+set}" = set; then
42716   echo $ECHO_N "(cached) $ECHO_C" >&6
42717 else
42718   cat >conftest.$ac_ext <<_ACEOF
42719 /* confdefs.h.  */
42720 _ACEOF
42721 cat confdefs.h >>conftest.$ac_ext
42722 cat >>conftest.$ac_ext <<_ACEOF
42723 /* end confdefs.h.  */
42724 /* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
42725    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
42726 #define _doprnt innocuous__doprnt
42727
42728 /* System header to define __stub macros and hopefully few prototypes,
42729     which can conflict with char _doprnt (); below.
42730     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
42731     <limits.h> exists even on freestanding compilers.  */
42732
42733 #ifdef __STDC__
42734 # include <limits.h>
42735 #else
42736 # include <assert.h>
42737 #endif
42738
42739 #undef _doprnt
42740
42741 /* Override any gcc2 internal prototype to avoid an error.  */
42742 #ifdef __cplusplus
42743 extern "C"
42744 {
42745 #endif
42746 /* We use char because int might match the return type of a gcc2
42747    builtin and then its argument prototype would still apply.  */
42748 char _doprnt ();
42749 /* The GNU C library defines this for functions which it implements
42750     to always fail with ENOSYS.  Some functions are actually named
42751     something starting with __ and the normal name is an alias.  */
42752 #if defined (__stub__doprnt) || defined (__stub____doprnt)
42753 choke me
42754 #else
42755 char (*f) () = _doprnt;
42756 #endif
42757 #ifdef __cplusplus
42758 }
42759 #endif
42760
42761 int
42762 main ()
42763 {
42764 return f != _doprnt;
42765   ;
42766   return 0;
42767 }
42768 _ACEOF
42769 rm -f conftest.$ac_objext conftest$ac_exeext
42770 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42771   (eval $ac_link) 2>conftest.er1
42772   ac_status=$?
42773   grep -v '^ *+' conftest.er1 >conftest.err
42774   rm -f conftest.er1
42775   cat conftest.err >&5
42776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42777   (exit $ac_status); } &&
42778          { ac_try='test -z "$ac_c_werror_flag"
42779                          || test ! -s conftest.err'
42780   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42781   (eval $ac_try) 2>&5
42782   ac_status=$?
42783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42784   (exit $ac_status); }; } &&
42785          { ac_try='test -s conftest$ac_exeext'
42786   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42787   (eval $ac_try) 2>&5
42788   ac_status=$?
42789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42790   (exit $ac_status); }; }; then
42791   ac_cv_func__doprnt=yes
42792 else
42793   echo "$as_me: failed program was:" >&5
42794 sed 's/^/| /' conftest.$ac_ext >&5
42795
42796 ac_cv_func__doprnt=no
42797 fi
42798 rm -f conftest.err conftest.$ac_objext \
42799       conftest$ac_exeext conftest.$ac_ext
42800 fi
42801 echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
42802 echo "${ECHO_T}$ac_cv_func__doprnt" >&6
42803 if test $ac_cv_func__doprnt = yes; then
42804
42805 cat >>confdefs.h <<\_ACEOF
42806 #define HAVE_DOPRNT 1
42807 _ACEOF
42808
42809 fi
42810
42811 fi
42812 done
42813
42814
42815
42816 if test $ac_cv_func_vprintf = yes ; then
42817
42818
42819 for ac_func in snprintf vsnprintf
42820 do
42821 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
42822 echo "$as_me:$LINENO: checking for $ac_func" >&5
42823 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
42824 if eval "test \"\${$as_ac_var+set}\" = set"; then
42825   echo $ECHO_N "(cached) $ECHO_C" >&6
42826 else
42827   cat >conftest.$ac_ext <<_ACEOF
42828 /* confdefs.h.  */
42829 _ACEOF
42830 cat confdefs.h >>conftest.$ac_ext
42831 cat >>conftest.$ac_ext <<_ACEOF
42832 /* end confdefs.h.  */
42833 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
42834    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
42835 #define $ac_func innocuous_$ac_func
42836
42837 /* System header to define __stub macros and hopefully few prototypes,
42838     which can conflict with char $ac_func (); below.
42839     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
42840     <limits.h> exists even on freestanding compilers.  */
42841
42842 #ifdef __STDC__
42843 # include <limits.h>
42844 #else
42845 # include <assert.h>
42846 #endif
42847
42848 #undef $ac_func
42849
42850 /* Override any gcc2 internal prototype to avoid an error.  */
42851 #ifdef __cplusplus
42852 extern "C"
42853 {
42854 #endif
42855 /* We use char because int might match the return type of a gcc2
42856    builtin and then its argument prototype would still apply.  */
42857 char $ac_func ();
42858 /* The GNU C library defines this for functions which it implements
42859     to always fail with ENOSYS.  Some functions are actually named
42860     something starting with __ and the normal name is an alias.  */
42861 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
42862 choke me
42863 #else
42864 char (*f) () = $ac_func;
42865 #endif
42866 #ifdef __cplusplus
42867 }
42868 #endif
42869
42870 int
42871 main ()
42872 {
42873 return f != $ac_func;
42874   ;
42875   return 0;
42876 }
42877 _ACEOF
42878 rm -f conftest.$ac_objext conftest$ac_exeext
42879 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42880   (eval $ac_link) 2>conftest.er1
42881   ac_status=$?
42882   grep -v '^ *+' conftest.er1 >conftest.err
42883   rm -f conftest.er1
42884   cat conftest.err >&5
42885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42886   (exit $ac_status); } &&
42887          { ac_try='test -z "$ac_c_werror_flag"
42888                          || test ! -s conftest.err'
42889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42890   (eval $ac_try) 2>&5
42891   ac_status=$?
42892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42893   (exit $ac_status); }; } &&
42894          { ac_try='test -s conftest$ac_exeext'
42895   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42896   (eval $ac_try) 2>&5
42897   ac_status=$?
42898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42899   (exit $ac_status); }; }; then
42900   eval "$as_ac_var=yes"
42901 else
42902   echo "$as_me: failed program was:" >&5
42903 sed 's/^/| /' conftest.$ac_ext >&5
42904
42905 eval "$as_ac_var=no"
42906 fi
42907 rm -f conftest.err conftest.$ac_objext \
42908       conftest$ac_exeext conftest.$ac_ext
42909 fi
42910 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
42911 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
42912 if test `eval echo '${'$as_ac_var'}'` = yes; then
42913   cat >>confdefs.h <<_ACEOF
42914 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
42915 _ACEOF
42916
42917 fi
42918 done
42919
42920 fi
42921
42922
42923
42924
42925
42926
42927
42928
42929
42930
42931
42932
42933
42934
42935
42936
42937
42938
42939
42940
42941
42942
42943
42944
42945
42946
42947
42948
42949
42950
42951
42952
42953
42954
42955
42956
42957
42958
42959
42960
42961
42962
42963
42964
42965
42966
42967
42968
42969
42970
42971
42972
42973
42974
42975
42976 for ac_func in \
42977         bcopy                   \
42978         closesocket             \
42979         chroot                  \
42980         endgrent                \
42981         endpwent                \
42982         fcntl                   \
42983         flock                   \
42984         fstat                   \
42985         getdtablesize   \
42986         getgrgid                \
42987         gethostname             \
42988         getpass                 \
42989         getpassphrase   \
42990         getpwuid                \
42991         getpwnam                \
42992         getspnam                \
42993         gettimeofday    \
42994         initgroups              \
42995         inet_ntoa_b             \
42996         lockf                   \
42997         memcpy                  \
42998         memmove                 \
42999         memrchr                 \
43000         mkstemp                 \
43001         mktemp                  \
43002         pipe                    \
43003         read                    \
43004         recv                    \
43005         recvfrom                \
43006         setpwfile               \
43007         setgid                  \
43008         setegid                 \
43009         setsid                  \
43010         setuid                  \
43011         seteuid                 \
43012         signal                  \
43013         strdup                  \
43014         strpbrk                 \
43015         strrchr                 \
43016         strsep                  \
43017         strstr                  \
43018         strtol                  \
43019         strtoul                 \
43020         strtoq                  \
43021         strtouq                 \
43022         strtoll                 \
43023         strspn                  \
43024         sysconf                 \
43025         waitpid                 \
43026         wait4                   \
43027         write                   \
43028         send                    \
43029         sendmsg                 \
43030         sendto                  \
43031
43032 do
43033 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
43034 echo "$as_me:$LINENO: checking for $ac_func" >&5
43035 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
43036 if eval "test \"\${$as_ac_var+set}\" = set"; then
43037   echo $ECHO_N "(cached) $ECHO_C" >&6
43038 else
43039   cat >conftest.$ac_ext <<_ACEOF
43040 /* confdefs.h.  */
43041 _ACEOF
43042 cat confdefs.h >>conftest.$ac_ext
43043 cat >>conftest.$ac_ext <<_ACEOF
43044 /* end confdefs.h.  */
43045 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
43046    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43047 #define $ac_func innocuous_$ac_func
43048
43049 /* System header to define __stub macros and hopefully few prototypes,
43050     which can conflict with char $ac_func (); below.
43051     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43052     <limits.h> exists even on freestanding compilers.  */
43053
43054 #ifdef __STDC__
43055 # include <limits.h>
43056 #else
43057 # include <assert.h>
43058 #endif
43059
43060 #undef $ac_func
43061
43062 /* Override any gcc2 internal prototype to avoid an error.  */
43063 #ifdef __cplusplus
43064 extern "C"
43065 {
43066 #endif
43067 /* We use char because int might match the return type of a gcc2
43068    builtin and then its argument prototype would still apply.  */
43069 char $ac_func ();
43070 /* The GNU C library defines this for functions which it implements
43071     to always fail with ENOSYS.  Some functions are actually named
43072     something starting with __ and the normal name is an alias.  */
43073 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
43074 choke me
43075 #else
43076 char (*f) () = $ac_func;
43077 #endif
43078 #ifdef __cplusplus
43079 }
43080 #endif
43081
43082 int
43083 main ()
43084 {
43085 return f != $ac_func;
43086   ;
43087   return 0;
43088 }
43089 _ACEOF
43090 rm -f conftest.$ac_objext conftest$ac_exeext
43091 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43092   (eval $ac_link) 2>conftest.er1
43093   ac_status=$?
43094   grep -v '^ *+' conftest.er1 >conftest.err
43095   rm -f conftest.er1
43096   cat conftest.err >&5
43097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43098   (exit $ac_status); } &&
43099          { ac_try='test -z "$ac_c_werror_flag"
43100                          || test ! -s conftest.err'
43101   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43102   (eval $ac_try) 2>&5
43103   ac_status=$?
43104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43105   (exit $ac_status); }; } &&
43106          { ac_try='test -s conftest$ac_exeext'
43107   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43108   (eval $ac_try) 2>&5
43109   ac_status=$?
43110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43111   (exit $ac_status); }; }; then
43112   eval "$as_ac_var=yes"
43113 else
43114   echo "$as_me: failed program was:" >&5
43115 sed 's/^/| /' conftest.$ac_ext >&5
43116
43117 eval "$as_ac_var=no"
43118 fi
43119 rm -f conftest.err conftest.$ac_objext \
43120       conftest$ac_exeext conftest.$ac_ext
43121 fi
43122 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
43123 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
43124 if test `eval echo '${'$as_ac_var'}'` = yes; then
43125   cat >>confdefs.h <<_ACEOF
43126 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
43127 _ACEOF
43128
43129 fi
43130 done
43131
43132
43133
43134
43135 for ac_func in getopt getpeereid
43136 do
43137 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
43138 echo "$as_me:$LINENO: checking for $ac_func" >&5
43139 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
43140 if eval "test \"\${$as_ac_var+set}\" = set"; then
43141   echo $ECHO_N "(cached) $ECHO_C" >&6
43142 else
43143   cat >conftest.$ac_ext <<_ACEOF
43144 /* confdefs.h.  */
43145 _ACEOF
43146 cat confdefs.h >>conftest.$ac_ext
43147 cat >>conftest.$ac_ext <<_ACEOF
43148 /* end confdefs.h.  */
43149 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
43150    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43151 #define $ac_func innocuous_$ac_func
43152
43153 /* System header to define __stub macros and hopefully few prototypes,
43154     which can conflict with char $ac_func (); below.
43155     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43156     <limits.h> exists even on freestanding compilers.  */
43157
43158 #ifdef __STDC__
43159 # include <limits.h>
43160 #else
43161 # include <assert.h>
43162 #endif
43163
43164 #undef $ac_func
43165
43166 /* Override any gcc2 internal prototype to avoid an error.  */
43167 #ifdef __cplusplus
43168 extern "C"
43169 {
43170 #endif
43171 /* We use char because int might match the return type of a gcc2
43172    builtin and then its argument prototype would still apply.  */
43173 char $ac_func ();
43174 /* The GNU C library defines this for functions which it implements
43175     to always fail with ENOSYS.  Some functions are actually named
43176     something starting with __ and the normal name is an alias.  */
43177 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
43178 choke me
43179 #else
43180 char (*f) () = $ac_func;
43181 #endif
43182 #ifdef __cplusplus
43183 }
43184 #endif
43185
43186 int
43187 main ()
43188 {
43189 return f != $ac_func;
43190   ;
43191   return 0;
43192 }
43193 _ACEOF
43194 rm -f conftest.$ac_objext conftest$ac_exeext
43195 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43196   (eval $ac_link) 2>conftest.er1
43197   ac_status=$?
43198   grep -v '^ *+' conftest.er1 >conftest.err
43199   rm -f conftest.er1
43200   cat conftest.err >&5
43201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43202   (exit $ac_status); } &&
43203          { ac_try='test -z "$ac_c_werror_flag"
43204                          || test ! -s conftest.err'
43205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43206   (eval $ac_try) 2>&5
43207   ac_status=$?
43208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43209   (exit $ac_status); }; } &&
43210          { ac_try='test -s conftest$ac_exeext'
43211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43212   (eval $ac_try) 2>&5
43213   ac_status=$?
43214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43215   (exit $ac_status); }; }; then
43216   eval "$as_ac_var=yes"
43217 else
43218   echo "$as_me: failed program was:" >&5
43219 sed 's/^/| /' conftest.$ac_ext >&5
43220
43221 eval "$as_ac_var=no"
43222 fi
43223 rm -f conftest.err conftest.$ac_objext \
43224       conftest$ac_exeext conftest.$ac_ext
43225 fi
43226 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
43227 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
43228 if test `eval echo '${'$as_ac_var'}'` = yes; then
43229   cat >>confdefs.h <<_ACEOF
43230 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
43231 _ACEOF
43232
43233 else
43234   case $LIBOBJS in
43235     "$ac_func.$ac_objext"   | \
43236   *" $ac_func.$ac_objext"   | \
43237     "$ac_func.$ac_objext "* | \
43238   *" $ac_func.$ac_objext "* ) ;;
43239   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
43240 esac
43241
43242 fi
43243 done
43244
43245
43246
43247 if test "$ac_cv_func_getopt" != yes; then
43248         LIBSRCS="$LIBSRCS getopt.c"
43249 fi
43250 if test "$ac_cv_func_getpeereid" != yes; then
43251         echo "$as_me:$LINENO: checking for struct msghdr.msg_accrightslen" >&5
43252 echo $ECHO_N "checking for struct msghdr.msg_accrightslen... $ECHO_C" >&6
43253 if test "${ac_cv_member_struct_msghdr_msg_accrightslen+set}" = set; then
43254   echo $ECHO_N "(cached) $ECHO_C" >&6
43255 else
43256   cat >conftest.$ac_ext <<_ACEOF
43257 /* confdefs.h.  */
43258 _ACEOF
43259 cat confdefs.h >>conftest.$ac_ext
43260 cat >>conftest.$ac_ext <<_ACEOF
43261 /* end confdefs.h.  */
43262 $ac_includes_default
43263 #ifdef HAVE_SYS_SOCKET_H
43264 #include <sys/socket.h>
43265 #endif
43266
43267 int
43268 main ()
43269 {
43270 static struct msghdr ac_aggr;
43271 if (ac_aggr.msg_accrightslen)
43272 return 0;
43273   ;
43274   return 0;
43275 }
43276 _ACEOF
43277 rm -f conftest.$ac_objext
43278 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
43279   (eval $ac_compile) 2>conftest.er1
43280   ac_status=$?
43281   grep -v '^ *+' conftest.er1 >conftest.err
43282   rm -f conftest.er1
43283   cat conftest.err >&5
43284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43285   (exit $ac_status); } &&
43286          { ac_try='test -z "$ac_c_werror_flag"
43287                          || test ! -s conftest.err'
43288   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43289   (eval $ac_try) 2>&5
43290   ac_status=$?
43291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43292   (exit $ac_status); }; } &&
43293          { ac_try='test -s conftest.$ac_objext'
43294   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43295   (eval $ac_try) 2>&5
43296   ac_status=$?
43297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43298   (exit $ac_status); }; }; then
43299   ac_cv_member_struct_msghdr_msg_accrightslen=yes
43300 else
43301   echo "$as_me: failed program was:" >&5
43302 sed 's/^/| /' conftest.$ac_ext >&5
43303
43304 cat >conftest.$ac_ext <<_ACEOF
43305 /* confdefs.h.  */
43306 _ACEOF
43307 cat confdefs.h >>conftest.$ac_ext
43308 cat >>conftest.$ac_ext <<_ACEOF
43309 /* end confdefs.h.  */
43310 $ac_includes_default
43311 #ifdef HAVE_SYS_SOCKET_H
43312 #include <sys/socket.h>
43313 #endif
43314
43315 int
43316 main ()
43317 {
43318 static struct msghdr ac_aggr;
43319 if (sizeof ac_aggr.msg_accrightslen)
43320 return 0;
43321   ;
43322   return 0;
43323 }
43324 _ACEOF
43325 rm -f conftest.$ac_objext
43326 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
43327   (eval $ac_compile) 2>conftest.er1
43328   ac_status=$?
43329   grep -v '^ *+' conftest.er1 >conftest.err
43330   rm -f conftest.er1
43331   cat conftest.err >&5
43332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43333   (exit $ac_status); } &&
43334          { ac_try='test -z "$ac_c_werror_flag"
43335                          || test ! -s conftest.err'
43336   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43337   (eval $ac_try) 2>&5
43338   ac_status=$?
43339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43340   (exit $ac_status); }; } &&
43341          { ac_try='test -s conftest.$ac_objext'
43342   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43343   (eval $ac_try) 2>&5
43344   ac_status=$?
43345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43346   (exit $ac_status); }; }; then
43347   ac_cv_member_struct_msghdr_msg_accrightslen=yes
43348 else
43349   echo "$as_me: failed program was:" >&5
43350 sed 's/^/| /' conftest.$ac_ext >&5
43351
43352 ac_cv_member_struct_msghdr_msg_accrightslen=no
43353 fi
43354 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
43355 fi
43356 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
43357 fi
43358 echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_accrightslen" >&5
43359 echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_accrightslen" >&6
43360 if test $ac_cv_member_struct_msghdr_msg_accrightslen = yes; then
43361
43362 cat >>confdefs.h <<_ACEOF
43363 #define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTSLEN 1
43364 _ACEOF
43365
43366
43367 fi
43368
43369         if test "$ac_cv_member_struct_msghdr_msg_accrightslen" != yes; then
43370                 echo "$as_me:$LINENO: checking for struct msghdr.msg_control" >&5
43371 echo $ECHO_N "checking for struct msghdr.msg_control... $ECHO_C" >&6
43372 if test "${ac_cv_member_struct_msghdr_msg_control+set}" = set; then
43373   echo $ECHO_N "(cached) $ECHO_C" >&6
43374 else
43375   cat >conftest.$ac_ext <<_ACEOF
43376 /* confdefs.h.  */
43377 _ACEOF
43378 cat confdefs.h >>conftest.$ac_ext
43379 cat >>conftest.$ac_ext <<_ACEOF
43380 /* end confdefs.h.  */
43381 $ac_includes_default
43382 #ifdef HAVE_SYS_SOCKET_H
43383 #include <sys/socket.h>
43384 #endif
43385
43386 int
43387 main ()
43388 {
43389 static struct msghdr ac_aggr;
43390 if (ac_aggr.msg_control)
43391 return 0;
43392   ;
43393   return 0;
43394 }
43395 _ACEOF
43396 rm -f conftest.$ac_objext
43397 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
43398   (eval $ac_compile) 2>conftest.er1
43399   ac_status=$?
43400   grep -v '^ *+' conftest.er1 >conftest.err
43401   rm -f conftest.er1
43402   cat conftest.err >&5
43403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43404   (exit $ac_status); } &&
43405          { ac_try='test -z "$ac_c_werror_flag"
43406                          || test ! -s conftest.err'
43407   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43408   (eval $ac_try) 2>&5
43409   ac_status=$?
43410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43411   (exit $ac_status); }; } &&
43412          { ac_try='test -s conftest.$ac_objext'
43413   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43414   (eval $ac_try) 2>&5
43415   ac_status=$?
43416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43417   (exit $ac_status); }; }; then
43418   ac_cv_member_struct_msghdr_msg_control=yes
43419 else
43420   echo "$as_me: failed program was:" >&5
43421 sed 's/^/| /' conftest.$ac_ext >&5
43422
43423 cat >conftest.$ac_ext <<_ACEOF
43424 /* confdefs.h.  */
43425 _ACEOF
43426 cat confdefs.h >>conftest.$ac_ext
43427 cat >>conftest.$ac_ext <<_ACEOF
43428 /* end confdefs.h.  */
43429 $ac_includes_default
43430 #ifdef HAVE_SYS_SOCKET_H
43431 #include <sys/socket.h>
43432 #endif
43433
43434 int
43435 main ()
43436 {
43437 static struct msghdr ac_aggr;
43438 if (sizeof ac_aggr.msg_control)
43439 return 0;
43440   ;
43441   return 0;
43442 }
43443 _ACEOF
43444 rm -f conftest.$ac_objext
43445 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
43446   (eval $ac_compile) 2>conftest.er1
43447   ac_status=$?
43448   grep -v '^ *+' conftest.er1 >conftest.err
43449   rm -f conftest.er1
43450   cat conftest.err >&5
43451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43452   (exit $ac_status); } &&
43453          { ac_try='test -z "$ac_c_werror_flag"
43454                          || test ! -s conftest.err'
43455   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43456   (eval $ac_try) 2>&5
43457   ac_status=$?
43458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43459   (exit $ac_status); }; } &&
43460          { ac_try='test -s conftest.$ac_objext'
43461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43462   (eval $ac_try) 2>&5
43463   ac_status=$?
43464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43465   (exit $ac_status); }; }; then
43466   ac_cv_member_struct_msghdr_msg_control=yes
43467 else
43468   echo "$as_me: failed program was:" >&5
43469 sed 's/^/| /' conftest.$ac_ext >&5
43470
43471 ac_cv_member_struct_msghdr_msg_control=no
43472 fi
43473 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
43474 fi
43475 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
43476 fi
43477 echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_control" >&5
43478 echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_control" >&6
43479 if test $ac_cv_member_struct_msghdr_msg_control = yes; then
43480
43481 cat >>confdefs.h <<_ACEOF
43482 #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
43483 _ACEOF
43484
43485
43486 fi
43487
43488         fi
43489         LIBSRCS="$LIBSRCS getpeereid.c"
43490 fi
43491 if test "$ac_cv_func_snprintf" != yes ||
43492    test "$ac_cv_func_vsnprintf" != yes; then
43493         if test "$ac_cv_func_snprintf" != yes; then
43494
43495 cat >>confdefs.h <<\_ACEOF
43496 #define snprintf ber_pvt_snprintf
43497 _ACEOF
43498
43499         fi
43500         if test "$ac_cv_func_vsnprintf" != yes; then
43501
43502 cat >>confdefs.h <<\_ACEOF
43503 #define vsnprintf ber_pvt_vsnprintf
43504 _ACEOF
43505
43506         fi
43507 fi
43508
43509
43510 if test "$ol_enable_slapi" != no ; then
43511
43512 for ac_header in ltdl.h
43513 do
43514 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
43515 if eval "test \"\${$as_ac_Header+set}\" = set"; then
43516   echo "$as_me:$LINENO: checking for $ac_header" >&5
43517 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
43518 if eval "test \"\${$as_ac_Header+set}\" = set"; then
43519   echo $ECHO_N "(cached) $ECHO_C" >&6
43520 fi
43521 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
43522 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
43523 else
43524   # Is the header compilable?
43525 echo "$as_me:$LINENO: checking $ac_header usability" >&5
43526 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
43527 cat >conftest.$ac_ext <<_ACEOF
43528 /* confdefs.h.  */
43529 _ACEOF
43530 cat confdefs.h >>conftest.$ac_ext
43531 cat >>conftest.$ac_ext <<_ACEOF
43532 /* end confdefs.h.  */
43533 $ac_includes_default
43534 #include <$ac_header>
43535 _ACEOF
43536 rm -f conftest.$ac_objext
43537 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
43538   (eval $ac_compile) 2>conftest.er1
43539   ac_status=$?
43540   grep -v '^ *+' conftest.er1 >conftest.err
43541   rm -f conftest.er1
43542   cat conftest.err >&5
43543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43544   (exit $ac_status); } &&
43545          { ac_try='test -z "$ac_c_werror_flag"
43546                          || test ! -s conftest.err'
43547   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43548   (eval $ac_try) 2>&5
43549   ac_status=$?
43550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43551   (exit $ac_status); }; } &&
43552          { ac_try='test -s conftest.$ac_objext'
43553   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43554   (eval $ac_try) 2>&5
43555   ac_status=$?
43556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43557   (exit $ac_status); }; }; then
43558   ac_header_compiler=yes
43559 else
43560   echo "$as_me: failed program was:" >&5
43561 sed 's/^/| /' conftest.$ac_ext >&5
43562
43563 ac_header_compiler=no
43564 fi
43565 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
43566 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
43567 echo "${ECHO_T}$ac_header_compiler" >&6
43568
43569 # Is the header present?
43570 echo "$as_me:$LINENO: checking $ac_header presence" >&5
43571 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
43572 cat >conftest.$ac_ext <<_ACEOF
43573 /* confdefs.h.  */
43574 _ACEOF
43575 cat confdefs.h >>conftest.$ac_ext
43576 cat >>conftest.$ac_ext <<_ACEOF
43577 /* end confdefs.h.  */
43578 #include <$ac_header>
43579 _ACEOF
43580 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
43581   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
43582   ac_status=$?
43583   grep -v '^ *+' conftest.er1 >conftest.err
43584   rm -f conftest.er1
43585   cat conftest.err >&5
43586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43587   (exit $ac_status); } >/dev/null; then
43588   if test -s conftest.err; then
43589     ac_cpp_err=$ac_c_preproc_warn_flag
43590     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
43591   else
43592     ac_cpp_err=
43593   fi
43594 else
43595   ac_cpp_err=yes
43596 fi
43597 if test -z "$ac_cpp_err"; then
43598   ac_header_preproc=yes
43599 else
43600   echo "$as_me: failed program was:" >&5
43601 sed 's/^/| /' conftest.$ac_ext >&5
43602
43603   ac_header_preproc=no
43604 fi
43605 rm -f conftest.err conftest.$ac_ext
43606 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
43607 echo "${ECHO_T}$ac_header_preproc" >&6
43608
43609 # So?  What about this header?
43610 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
43611   yes:no: )
43612     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
43613 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
43614     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
43615 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
43616     ac_header_preproc=yes
43617     ;;
43618   no:yes:* )
43619     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
43620 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
43621     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
43622 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
43623     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
43624 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
43625     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
43626 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
43627     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
43628 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
43629     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
43630 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
43631     (
43632       cat <<\_ASBOX
43633 ## --------------------------------------------- ##
43634 ## Report this to <http://www.openldap.org/its/> ##
43635 ## --------------------------------------------- ##
43636 _ASBOX
43637     ) |
43638       sed "s/^/$as_me: WARNING:     /" >&2
43639     ;;
43640 esac
43641 echo "$as_me:$LINENO: checking for $ac_header" >&5
43642 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
43643 if eval "test \"\${$as_ac_Header+set}\" = set"; then
43644   echo $ECHO_N "(cached) $ECHO_C" >&6
43645 else
43646   eval "$as_ac_Header=\$ac_header_preproc"
43647 fi
43648 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
43649 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
43650
43651 fi
43652 if test `eval echo '${'$as_ac_Header'}'` = yes; then
43653   cat >>confdefs.h <<_ACEOF
43654 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
43655 _ACEOF
43656
43657 fi
43658
43659 done
43660
43661
43662         if test $ac_cv_header_ltdl_h != yes ; then
43663                 { { echo "$as_me:$LINENO: error: could not locate <ltdl.h>" >&5
43664 echo "$as_me: error: could not locate <ltdl.h>" >&2;}
43665    { (exit 1); exit 1; }; }
43666         fi
43667         echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
43668 echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6
43669 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
43670   echo $ECHO_N "(cached) $ECHO_C" >&6
43671 else
43672   ac_check_lib_save_LIBS=$LIBS
43673 LIBS="-lltdl  $LIBS"
43674 cat >conftest.$ac_ext <<_ACEOF
43675 /* confdefs.h.  */
43676 _ACEOF
43677 cat confdefs.h >>conftest.$ac_ext
43678 cat >>conftest.$ac_ext <<_ACEOF
43679 /* end confdefs.h.  */
43680
43681 /* Override any gcc2 internal prototype to avoid an error.  */
43682 #ifdef __cplusplus
43683 extern "C"
43684 #endif
43685 /* We use char because int might match the return type of a gcc2
43686    builtin and then its argument prototype would still apply.  */
43687 char lt_dlinit ();
43688 int
43689 main ()
43690 {
43691 lt_dlinit ();
43692   ;
43693   return 0;
43694 }
43695 _ACEOF
43696 rm -f conftest.$ac_objext conftest$ac_exeext
43697 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43698   (eval $ac_link) 2>conftest.er1
43699   ac_status=$?
43700   grep -v '^ *+' conftest.er1 >conftest.err
43701   rm -f conftest.er1
43702   cat conftest.err >&5
43703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43704   (exit $ac_status); } &&
43705          { ac_try='test -z "$ac_c_werror_flag"
43706                          || test ! -s conftest.err'
43707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43708   (eval $ac_try) 2>&5
43709   ac_status=$?
43710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43711   (exit $ac_status); }; } &&
43712          { ac_try='test -s conftest$ac_exeext'
43713   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43714   (eval $ac_try) 2>&5
43715   ac_status=$?
43716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43717   (exit $ac_status); }; }; then
43718   ac_cv_lib_ltdl_lt_dlinit=yes
43719 else
43720   echo "$as_me: failed program was:" >&5
43721 sed 's/^/| /' conftest.$ac_ext >&5
43722
43723 ac_cv_lib_ltdl_lt_dlinit=no
43724 fi
43725 rm -f conftest.err conftest.$ac_objext \
43726       conftest$ac_exeext conftest.$ac_ext
43727 LIBS=$ac_check_lib_save_LIBS
43728 fi
43729 echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
43730 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6
43731 if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
43732
43733                 SLAPI_LIBS=-lltdl
43734                 LIBSLAPI=libslapi.a
43735                 LIBSLAPITOOLS=../libslapi.a
43736
43737 cat >>confdefs.h <<\_ACEOF
43738 #define HAVE_LIBLTDL 1
43739 _ACEOF
43740
43741
43742 else
43743   { { echo "$as_me:$LINENO: error: could not locate libtool -lltdl" >&5
43744 echo "$as_me: error: could not locate libtool -lltdl" >&2;}
43745    { (exit 1); exit 1; }; }
43746 fi
43747
43748
43749
43750 cat >>confdefs.h <<\_ACEOF
43751 #define LDAP_SLAPI 1
43752 _ACEOF
43753
43754 fi
43755
43756 if test "$ol_enable_debug" != no ; then
43757
43758 cat >>confdefs.h <<\_ACEOF
43759 #define LDAP_DEBUG 1
43760 _ACEOF
43761
43762 fi
43763 if test "$ol_enable_syslog" = yes ; then
43764
43765 cat >>confdefs.h <<\_ACEOF
43766 #define LDAP_SYSLOG 1
43767 _ACEOF
43768
43769 fi
43770 if test "$ol_link_kbind" != no ; then
43771
43772 cat >>confdefs.h <<\_ACEOF
43773 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
43774 _ACEOF
43775
43776 fi
43777 if test "$ol_enable_proctitle" != no ; then
43778
43779 cat >>confdefs.h <<\_ACEOF
43780 #define LDAP_PROCTITLE 1
43781 _ACEOF
43782
43783 fi
43784 if test "$ol_enable_referrals" != no ; then
43785
43786 cat >>confdefs.h <<\_ACEOF
43787 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
43788 _ACEOF
43789
43790 fi
43791 if test "$ol_enable_local" != no; then
43792
43793 cat >>confdefs.h <<\_ACEOF
43794 #define LDAP_PF_LOCAL 1
43795 _ACEOF
43796
43797 fi
43798 if test "$ol_link_ipv6" != no; then
43799
43800 cat >>confdefs.h <<\_ACEOF
43801 #define LDAP_PF_INET6 1
43802 _ACEOF
43803
43804 fi
43805 if test "$ol_enable_cleartext" != no ; then
43806
43807 cat >>confdefs.h <<\_ACEOF
43808 #define SLAPD_CLEARTEXT 1
43809 _ACEOF
43810
43811 fi
43812 if test "$ol_enable_crypt" != no ; then
43813
43814 cat >>confdefs.h <<\_ACEOF
43815 #define SLAPD_CRYPT 1
43816 _ACEOF
43817
43818 fi
43819 if test "$ol_link_spasswd" != no ; then
43820
43821 cat >>confdefs.h <<\_ACEOF
43822 #define SLAPD_SPASSWD 1
43823 _ACEOF
43824
43825 fi
43826 if test "$ol_enable_multimaster" != no ; then
43827
43828 cat >>confdefs.h <<\_ACEOF
43829 #define SLAPD_MULTIMASTER 1
43830 _ACEOF
43831
43832 fi
43833 if test "$ol_enable_rlookups" != no ; then
43834
43835 cat >>confdefs.h <<\_ACEOF
43836 #define SLAPD_RLOOKUPS 1
43837 _ACEOF
43838
43839 fi
43840 if test "$ol_enable_aci" != no ; then
43841
43842 cat >>confdefs.h <<\_ACEOF
43843 #define SLAPD_ACI_ENABLED 1
43844 _ACEOF
43845
43846         WITH_ACI_ENABLED=yes
43847 else
43848         WITH_ACI_ENABLED=no
43849 fi
43850
43851 if test "$ol_link_modules" != no ; then
43852
43853 cat >>confdefs.h <<\_ACEOF
43854 #define SLAPD_MODULES 1
43855 _ACEOF
43856
43857         BUILD_SLAPD=yes
43858         SLAPD_MODULES_LDFLAGS="-dlopen self"
43859 fi
43860
43861
43862 cat >>confdefs.h <<\_ACEOF
43863 #define SLAPD_MOD_STATIC 1
43864 _ACEOF
43865
43866
43867 cat >>confdefs.h <<\_ACEOF
43868 #define SLAPD_MOD_DYNAMIC 2
43869 _ACEOF
43870
43871
43872 if test "$ol_enable_bdb" != no ; then
43873         BUILD_SLAPD=yes
43874         BUILD_BDB=$ol_enable_bdb
43875         if test "$ol_enable_bdb" = mod ; then
43876                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
43877                 MFLAG=SLAPD_MOD_DYNAMIC
43878         else
43879                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
43880                 MFLAG=SLAPD_MOD_STATIC
43881         fi
43882
43883 cat >>confdefs.h <<_ACEOF
43884 #define SLAPD_BDB $MFLAG
43885 _ACEOF
43886
43887 fi
43888
43889 if test "$ol_enable_dnssrv" != no ; then
43890         BUILD_SLAPD=yes
43891         BUILD_DNSSRV=$ol_enable_dnssrv
43892         if test "$ol_enable_dnssrv" = mod ; then
43893                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
43894                 MFLAG=SLAPD_MOD_DYNAMIC
43895         else
43896                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
43897                 MFLAG=SLAPD_MOD_STATIC
43898         fi
43899
43900 cat >>confdefs.h <<_ACEOF
43901 #define SLAPD_DNSSRV $MFLAG
43902 _ACEOF
43903
43904 fi
43905
43906 if test "$ol_enable_hdb" != no ; then
43907         BUILD_SLAPD=yes
43908         BUILD_HDB=$ol_enable_hdb
43909         if test "$ol_enable_hdb" = mod ; then
43910                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
43911                 MFLAG=SLAPD_MOD_DYNAMIC
43912         else
43913                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
43914                 MFLAG=SLAPD_MOD_STATIC
43915         fi
43916
43917 cat >>confdefs.h <<_ACEOF
43918 #define SLAPD_HDB $MFLAG
43919 _ACEOF
43920
43921 fi
43922
43923 if test "$ol_enable_ldap" != no ; then
43924         BUILD_SLAPD=yes
43925         BUILD_LDAP=$ol_enable_ldap
43926         if test "$ol_enable_ldap" = mod ; then
43927                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
43928                 MFLAG=SLAPD_MOD_DYNAMIC
43929         else
43930                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
43931                 MFLAG=SLAPD_MOD_STATIC
43932         fi
43933
43934 cat >>confdefs.h <<_ACEOF
43935 #define SLAPD_LDAP $MFLAG
43936 _ACEOF
43937
43938 fi
43939
43940 if test "$ol_link_ldbm" != no && test $ol_enable_ldbm != no; then
43941         BUILD_SLAPD=yes
43942         BUILD_LDBM=$ol_enable_ldbm
43943         if test "$ol_enable_ldbm" = mod ; then
43944                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
43945                 MFLAG=SLAPD_MOD_DYNAMIC
43946         else
43947                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
43948                 MFLAG=SLAPD_MOD_STATIC
43949         fi
43950
43951 cat >>confdefs.h <<_ACEOF
43952 #define SLAPD_LDBM $MFLAG
43953 _ACEOF
43954
43955 fi
43956
43957 if test "$ol_enable_meta" != no ; then
43958         BUILD_SLAPD=yes
43959         BUILD_META=$ol_enable_meta
43960         BUILD_REWRITE=yes
43961         if test "$ol_enable_meta" = mod ; then
43962                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
43963                 MFLAG=SLAPD_MOD_DYNAMIC
43964         else
43965                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
43966                 MFLAG=SLAPD_MOD_STATIC
43967         fi
43968
43969 cat >>confdefs.h <<_ACEOF
43970 #define SLAPD_META $MFLAG
43971 _ACEOF
43972
43973 fi
43974
43975 if test "$ol_enable_monitor" != no ; then
43976         BUILD_SLAPD=yes
43977         BUILD_MONITOR=$ol_enable_monitor
43978         if test "$ol_enable_monitor" = mod ; then
43979                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
43980                 MFLAG=SLAPD_MOD_DYNAMIC
43981         else
43982                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
43983                 MFLAG=SLAPD_MOD_STATIC
43984         fi
43985
43986 cat >>confdefs.h <<_ACEOF
43987 #define SLAPD_MONITOR $MFLAG
43988 _ACEOF
43989
43990 fi
43991
43992 if test "$ol_enable_null" != no ; then
43993         BUILD_SLAPD=yes
43994         BUILD_NULL=$ol_enable_null
43995         if test "$ol_enable_null" = mod ; then
43996                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
43997                 MFLAG=SLAPD_MOD_DYNAMIC
43998         else
43999                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
44000                 MFLAG=SLAPD_MOD_STATIC
44001         fi
44002
44003 cat >>confdefs.h <<_ACEOF
44004 #define SLAPD_NULL $MFLAG
44005 _ACEOF
44006
44007 fi
44008
44009 if test "$ol_enable_passwd" != no ; then
44010         BUILD_SLAPD=yes
44011         BUILD_PASSWD=$ol_enable_passwd
44012         if test "$ol_enable_passwd" = mod ; then
44013                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
44014                 MFLAG=SLAPD_MOD_DYNAMIC
44015         else
44016                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
44017                 MFLAG=SLAPD_MOD_STATIC
44018         fi
44019
44020 cat >>confdefs.h <<_ACEOF
44021 #define SLAPD_PASSWD $MFLAG
44022 _ACEOF
44023
44024 fi
44025
44026 if test "$ol_link_perl" != no ; then
44027         BUILD_SLAPD=yes
44028         BUILD_PERL=$ol_enable_perl
44029         if test "$ol_enable_perl" = mod ; then
44030                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
44031                 MFLAG=SLAPD_MOD_DYNAMIC
44032         else
44033                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
44034                 MFLAG=SLAPD_MOD_STATIC
44035         fi
44036
44037 cat >>confdefs.h <<_ACEOF
44038 #define SLAPD_PERL $MFLAG
44039 _ACEOF
44040
44041 fi
44042
44043 if test "$ol_enable_relay" != no ; then
44044         BUILD_SLAPD=yes
44045         BUILD_RELAY=$ol_enable_relay
44046         if test "$ol_enable_relay" = mod ; then
44047                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
44048                 MFLAG=SLAPD_MOD_DYNAMIC
44049         else
44050                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
44051                 MFLAG=SLAPD_MOD_STATIC
44052         fi
44053
44054 cat >>confdefs.h <<_ACEOF
44055 #define SLAPD_RELAY $MFLAG
44056 _ACEOF
44057
44058 fi
44059
44060 if test "$ol_enable_shell" != no ; then
44061         if test "$ol_link_threads" != no ; then
44062                 { echo "$as_me:$LINENO: WARNING: Use of --without-threads is recommended with back-shell" >&5
44063 echo "$as_me: WARNING: Use of --without-threads is recommended with back-shell" >&2;}
44064         fi
44065         BUILD_SLAPD=yes
44066         BUILD_SHELL=$ol_enable_shell
44067         if test "$ol_enable_shell" = mod ; then
44068                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
44069                 MFLAG=SLAPD_MOD_DYNAMIC
44070         else
44071                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
44072                 MFLAG=SLAPD_MOD_STATIC
44073         fi
44074
44075 cat >>confdefs.h <<_ACEOF
44076 #define SLAPD_SHELL $MFLAG
44077 _ACEOF
44078
44079 fi
44080
44081 if test "$ol_link_sql" != no ; then
44082         BUILD_SLAPD=yes
44083         BUILD_SQL=$ol_enable_sql
44084         if test "$ol_enable_sql" = mod; then
44085                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
44086                 MFLAG=SLAPD_MOD_DYNAMIC
44087         else
44088                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
44089                 MFLAG=SLAPD_MOD_STATIC
44090         fi
44091
44092 cat >>confdefs.h <<_ACEOF
44093 #define SLAPD_SQL $MFLAG
44094 _ACEOF
44095
44096 fi
44097
44098 if test "$ol_enable_accesslog" != no ; then
44099         BUILD_ACCESSLOG=$ol_enable_accesslog
44100         if test "$ol_enable_accesslog" = mod ; then
44101                 MFLAG=SLAPD_MOD_DYNAMIC
44102                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
44103         else
44104                 MFLAG=SLAPD_MOD_STATIC
44105                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
44106         fi
44107
44108 cat >>confdefs.h <<_ACEOF
44109 #define SLAPD_OVER_ACCESSLOG $MFLAG
44110 _ACEOF
44111
44112 fi
44113
44114 if test "$ol_enable_denyop" != no ; then
44115         BUILD_DENYOP=$ol_enable_denyop
44116         if test "$ol_enable_denyop" = mod ; then
44117                 MFLAG=SLAPD_MOD_DYNAMIC
44118                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
44119         else
44120                 MFLAG=SLAPD_MOD_STATIC
44121                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS denyop.o"
44122         fi
44123
44124 cat >>confdefs.h <<_ACEOF
44125 #define SLAPD_OVER_DENYOP $MFLAG
44126 _ACEOF
44127
44128 fi
44129
44130 if test "$ol_enable_dyngroup" != no ; then
44131         BUILD_DYNGROUP=$ol_enable_dyngroup
44132         if test "$ol_enable_dyngroup" = mod ; then
44133                 MFLAG=SLAPD_MOD_DYNAMIC
44134                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
44135         else
44136                 MFLAG=SLAPD_MOD_STATIC
44137                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
44138         fi
44139
44140 cat >>confdefs.h <<_ACEOF
44141 #define SLAPD_OVER_DYNGROUP $MFLAG
44142 _ACEOF
44143
44144 fi
44145
44146 if test "$ol_enable_dynlist" != no ; then
44147         BUILD_DYNLIST=$ol_enable_dynlist
44148         if test "$ol_enable_dynlist" = mod ; then
44149                 MFLAG=SLAPD_MOD_DYNAMIC
44150                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
44151         else
44152                 MFLAG=SLAPD_MOD_STATIC
44153                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
44154         fi
44155
44156 cat >>confdefs.h <<_ACEOF
44157 #define SLAPD_OVER_DYNLIST $MFLAG
44158 _ACEOF
44159
44160 fi
44161
44162 if test "$ol_enable_lastmod" != no ; then
44163         BUILD_LASTMOD=$ol_enable_lastmod
44164         if test "$ol_enable_lastmod" = mod ; then
44165                 MFLAG=SLAPD_MOD_DYNAMIC
44166                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
44167         else
44168                 MFLAG=SLAPD_MOD_STATIC
44169                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS lastmod.o"
44170         fi
44171
44172 cat >>confdefs.h <<_ACEOF
44173 #define SLAPD_OVER_LASTMOD $MFLAG
44174 _ACEOF
44175
44176 fi
44177
44178 if test "$ol_enable_ppolicy" != no ; then
44179         BUILD_PPOLICY=$ol_enable_ppolicy
44180         if test "$ol_enable_ppolicy" = mod ; then
44181                 MFLAG=SLAPD_MOD_DYNAMIC
44182                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
44183         else
44184                 MFLAG=SLAPD_MOD_STATIC
44185                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
44186         fi
44187
44188 cat >>confdefs.h <<_ACEOF
44189 #define SLAPD_OVER_PPOLICY $MFLAG
44190 _ACEOF
44191
44192 fi
44193
44194 if test "$ol_enable_proxycache" != no ; then
44195         BUILD_PROXYCACHE=$ol_enable_proxycache
44196         if test "$ol_enable_proxycache" = mod ; then
44197                 MFLAG=SLAPD_MOD_DYNAMIC
44198                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
44199         else
44200                 MFLAG=SLAPD_MOD_STATIC
44201                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
44202         fi
44203
44204 cat >>confdefs.h <<_ACEOF
44205 #define SLAPD_OVER_PROXYCACHE $MFLAG
44206 _ACEOF
44207
44208 fi
44209
44210 if test "$ol_enable_refint" != no ; then
44211         BUILD_REFINT=$ol_enable_refint
44212         if test "$ol_enable_refint" = mod ; then
44213                 MFLAG=SLAPD_MOD_DYNAMIC
44214                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
44215         else
44216                 MFLAG=SLAPD_MOD_STATIC
44217                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
44218         fi
44219
44220 cat >>confdefs.h <<_ACEOF
44221 #define SLAPD_OVER_REFINT $MFLAG
44222 _ACEOF
44223
44224 fi
44225
44226 if test "$ol_enable_retcode" != no ; then
44227         BUILD_RETCODE=$ol_enable_retcode
44228         if test "$ol_enable_retcode" = mod ; then
44229                 MFLAG=SLAPD_MOD_DYNAMIC
44230                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
44231         else
44232                 MFLAG=SLAPD_MOD_STATIC
44233                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
44234         fi
44235
44236 cat >>confdefs.h <<_ACEOF
44237 #define SLAPD_OVER_RETCODE $MFLAG
44238 _ACEOF
44239
44240 fi
44241
44242 if test "$ol_enable_rwm" != no ; then
44243         BUILD_REWRITE=yes
44244         BUILD_RWM=$ol_enable_rwm
44245         if test "$ol_enable_rwm" = mod ; then
44246                 MFLAG=SLAPD_MOD_DYNAMIC
44247                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
44248         else
44249                 MFLAG=SLAPD_MOD_STATIC
44250                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
44251         fi
44252
44253 cat >>confdefs.h <<_ACEOF
44254 #define SLAPD_OVER_RWM $MFLAG
44255 _ACEOF
44256
44257 fi
44258
44259 if test "$ol_enable_syncprov" != no ; then
44260         BUILD_SYNCPROV=$ol_enable_syncprov
44261         if test "$ol_enable_syncprov" = mod ; then
44262                 MFLAG=SLAPD_MOD_DYNAMIC
44263                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
44264         else
44265                 MFLAG=SLAPD_MOD_STATIC
44266                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
44267         fi
44268
44269 cat >>confdefs.h <<_ACEOF
44270 #define SLAPD_OVER_SYNCPROV $MFLAG
44271 _ACEOF
44272
44273 fi
44274
44275 if test "$ol_enable_translucent" != no ; then
44276         BUILD_TRANSLUCENT=$ol_enable_translucent
44277         if test "$ol_enable_translucent" = mod ; then
44278                 MFLAG=SLAPD_MOD_DYNAMIC
44279                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
44280         else
44281                 MFLAG=SLAPD_MOD_STATIC
44282                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
44283         fi
44284
44285 cat >>confdefs.h <<_ACEOF
44286 #define SLAPD_OVER_TRANSLUCENT $MFLAG
44287 _ACEOF
44288
44289 fi
44290
44291 if test "$ol_enable_unique" != no ; then
44292         BUILD_UNIQUE=$ol_enable_unique
44293         if test "$ol_enable_unique" = mod ; then
44294                 MFLAG=SLAPD_MOD_DYNAMIC
44295                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
44296         else
44297                 MFLAG=SLAPD_MOD_STATIC
44298                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
44299         fi
44300
44301 cat >>confdefs.h <<_ACEOF
44302 #define SLAPD_OVER_UNIQUE $MFLAG
44303 _ACEOF
44304
44305 fi
44306
44307 if test "$ol_enable_valsort" != no ; then
44308         BUILD_VALSORT=$ol_enable_valsort
44309         if test "$ol_enable_valsort" = mod ; then
44310                 MFLAG=SLAPD_MOD_DYNAMIC
44311                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS valsort.la"
44312         else
44313                 MFLAG=SLAPD_MOD_STATIC
44314                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS valsort.o"
44315         fi
44316
44317 cat >>confdefs.h <<_ACEOF
44318 #define SLAPD_OVER_VALSORT $MFLAG
44319 _ACEOF
44320
44321 fi
44322
44323 if test "$ol_enable_slurpd" != no &&
44324    test "$ol_link_threads" != no &&
44325    test $BUILD_SLAPD = yes ; then
44326         BUILD_SLURPD=yes
44327 fi
44328
44329 if test "$ol_enable_rewrite" != no ; then
44330
44331 cat >>confdefs.h <<\_ACEOF
44332 #define ENABLE_REWRITE 1
44333 _ACEOF
44334
44335         BUILD_REWRITE=yes
44336 fi
44337
44338 if test "$ol_enable_slapi" != no ; then
44339
44340 cat >>confdefs.h <<\_ACEOF
44341 #define ENABLE_SLAPI 1
44342 _ACEOF
44343
44344         BUILD_SLAPI=yes
44345         SLAPD_SLAPI_DEPEND=libslapi.a
44346 fi
44347
44348
44349
44350 if test "$ac_cv_mingw32" = yes ; then
44351         PLAT=NT
44352         SLAPD_MODULES_LDFLAGS=
44353 else
44354         PLAT=UNIX
44355 fi
44356
44357
44358
44359
44360
44361
44362
44363
44364
44365
44366
44367
44368
44369
44370
44371
44372
44373
44374
44375
44376
44377
44378
44379
44380
44381
44382
44383
44384
44385
44386
44387
44388
44389
44390
44391
44392
44393
44394
44395
44396
44397
44398
44399
44400
44401
44402
44403
44404
44405
44406
44407
44408
44409
44410
44411
44412
44413
44414
44415
44416
44417
44418
44419
44420
44421
44422
44423
44424
44425
44426
44427
44428
44429
44430
44431
44432
44433
44434
44435
44436
44437 # Check whether --with-xxinstall or --without-xxinstall was given.
44438 if test "${with_xxinstall+set}" = set; then
44439   withval="$with_xxinstall"
44440
44441 fi;
44442
44443
44444                                                                                                                                                                                                                                                                                                                                                                                                                 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"
44445
44446
44447           ac_config_commands="$ac_config_commands default"
44448
44449
44450
44451 test "x$prefix" = xNONE && prefix=$ac_default_prefix
44452 # Let make expand exec_prefix.
44453 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
44454
44455 # VPATH may cause trouble with some makes, so we remove $(srcdir),
44456 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
44457 # trailing colons and then remove the whole line if VPATH becomes empty
44458 # (actually we leave an empty line to preserve line numbers).
44459 if test "x$srcdir" = x.; then
44460   ac_vpsub='/^[  ]*VPATH[        ]*=/{
44461 s/:*\$(srcdir):*/:/;
44462 s/:*\${srcdir}:*/:/;
44463 s/:*@srcdir@:*/:/;
44464 s/^\([^=]*=[     ]*\):*/\1/;
44465 s/:*$//;
44466 s/^[^=]*=[       ]*$//;
44467 }'
44468 fi
44469
44470 DEFS=-DHAVE_CONFIG_H
44471
44472 ac_libobjs=
44473 ac_ltlibobjs=
44474 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
44475   # 1. Remove the extension, and $U if already installed.
44476   ac_i=`echo "$ac_i" |
44477          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
44478   # 2. Add them.
44479   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
44480   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
44481 done
44482 LIBOBJS=$ac_libobjs
44483
44484 LTLIBOBJS=$ac_ltlibobjs
44485
44486
44487 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
44488   { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
44489 Usually this means the macro was only invoked conditionally." >&5
44490 echo "$as_me: error: conditional \"AMDEP\" was never defined.
44491 Usually this means the macro was only invoked conditionally." >&2;}
44492    { (exit 1); exit 1; }; }
44493 fi
44494 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
44495   { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
44496 Usually this means the macro was only invoked conditionally." >&5
44497 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
44498 Usually this means the macro was only invoked conditionally." >&2;}
44499    { (exit 1); exit 1; }; }
44500 fi
44501 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
44502   { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
44503 Usually this means the macro was only invoked conditionally." >&5
44504 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
44505 Usually this means the macro was only invoked conditionally." >&2;}
44506    { (exit 1); exit 1; }; }
44507 fi
44508
44509 : ${CONFIG_STATUS=./config.status}
44510 ac_clean_files_save=$ac_clean_files
44511 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
44512 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
44513 echo "$as_me: creating $CONFIG_STATUS" >&6;}
44514 cat >$CONFIG_STATUS <<_ACEOF
44515 #! $SHELL
44516 # Generated by $as_me.
44517 # Run this file to recreate the current configuration.
44518 # Compiler output produced by configure, useful for debugging
44519 # configure, is in config.log if it exists.
44520
44521 debug=false
44522 ac_cs_recheck=false
44523 ac_cs_silent=false
44524 SHELL=\${CONFIG_SHELL-$SHELL}
44525 _ACEOF
44526
44527 cat >>$CONFIG_STATUS <<\_ACEOF
44528 ## --------------------- ##
44529 ## M4sh Initialization.  ##
44530 ## --------------------- ##
44531
44532 # Be Bourne compatible
44533 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
44534   emulate sh
44535   NULLCMD=:
44536   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
44537   # is contrary to our usage.  Disable this feature.
44538   alias -g '${1+"$@"}'='"$@"'
44539 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
44540   set -o posix
44541 fi
44542 DUALCASE=1; export DUALCASE # for MKS sh
44543
44544 # Support unset when possible.
44545 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
44546   as_unset=unset
44547 else
44548   as_unset=false
44549 fi
44550
44551
44552 # Work around bugs in pre-3.0 UWIN ksh.
44553 $as_unset ENV MAIL MAILPATH
44554 PS1='$ '
44555 PS2='> '
44556 PS4='+ '
44557
44558 # NLS nuisances.
44559 for as_var in \
44560   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
44561   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
44562   LC_TELEPHONE LC_TIME
44563 do
44564   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
44565     eval $as_var=C; export $as_var
44566   else
44567     $as_unset $as_var
44568   fi
44569 done
44570
44571 # Required to use basename.
44572 if expr a : '\(a\)' >/dev/null 2>&1; then
44573   as_expr=expr
44574 else
44575   as_expr=false
44576 fi
44577
44578 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
44579   as_basename=basename
44580 else
44581   as_basename=false
44582 fi
44583
44584
44585 # Name of the executable.
44586 as_me=`$as_basename "$0" ||
44587 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
44588          X"$0" : 'X\(//\)$' \| \
44589          X"$0" : 'X\(/\)$' \| \
44590          .     : '\(.\)' 2>/dev/null ||
44591 echo X/"$0" |
44592     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
44593           /^X\/\(\/\/\)$/{ s//\1/; q; }
44594           /^X\/\(\/\).*/{ s//\1/; q; }
44595           s/.*/./; q'`
44596
44597
44598 # PATH needs CR, and LINENO needs CR and PATH.
44599 # Avoid depending upon Character Ranges.
44600 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
44601 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
44602 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
44603 as_cr_digits='0123456789'
44604 as_cr_alnum=$as_cr_Letters$as_cr_digits
44605
44606 # The user is always right.
44607 if test "${PATH_SEPARATOR+set}" != set; then
44608   echo "#! /bin/sh" >conf$$.sh
44609   echo  "exit 0"   >>conf$$.sh
44610   chmod +x conf$$.sh
44611   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
44612     PATH_SEPARATOR=';'
44613   else
44614     PATH_SEPARATOR=:
44615   fi
44616   rm -f conf$$.sh
44617 fi
44618
44619
44620   as_lineno_1=$LINENO
44621   as_lineno_2=$LINENO
44622   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
44623   test "x$as_lineno_1" != "x$as_lineno_2" &&
44624   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
44625   # Find who we are.  Look in the path if we contain no path at all
44626   # relative or not.
44627   case $0 in
44628     *[\\/]* ) as_myself=$0 ;;
44629     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44630 for as_dir in $PATH
44631 do
44632   IFS=$as_save_IFS
44633   test -z "$as_dir" && as_dir=.
44634   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
44635 done
44636
44637        ;;
44638   esac
44639   # We did not find ourselves, most probably we were run as `sh COMMAND'
44640   # in which case we are not to be found in the path.
44641   if test "x$as_myself" = x; then
44642     as_myself=$0
44643   fi
44644   if test ! -f "$as_myself"; then
44645     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
44646 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
44647    { (exit 1); exit 1; }; }
44648   fi
44649   case $CONFIG_SHELL in
44650   '')
44651     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44652 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
44653 do
44654   IFS=$as_save_IFS
44655   test -z "$as_dir" && as_dir=.
44656   for as_base in sh bash ksh sh5; do
44657          case $as_dir in
44658          /*)
44659            if ("$as_dir/$as_base" -c '
44660   as_lineno_1=$LINENO
44661   as_lineno_2=$LINENO
44662   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
44663   test "x$as_lineno_1" != "x$as_lineno_2" &&
44664   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
44665              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
44666              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
44667              CONFIG_SHELL=$as_dir/$as_base
44668              export CONFIG_SHELL
44669              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
44670            fi;;
44671          esac
44672        done
44673 done
44674 ;;
44675   esac
44676
44677   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
44678   # uniformly replaced by the line number.  The first 'sed' inserts a
44679   # line-number line before each line; the second 'sed' does the real
44680   # work.  The second script uses 'N' to pair each line-number line
44681   # with the numbered line, and appends trailing '-' during
44682   # substitution so that $LINENO is not a special case at line end.
44683   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
44684   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
44685   sed '=' <$as_myself |
44686     sed '
44687       N
44688       s,$,-,
44689       : loop
44690       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
44691       t loop
44692       s,-$,,
44693       s,^['$as_cr_digits']*\n,,
44694     ' >$as_me.lineno &&
44695   chmod +x $as_me.lineno ||
44696     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
44697 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
44698    { (exit 1); exit 1; }; }
44699
44700   # Don't try to exec as it changes $[0], causing all sort of problems
44701   # (the dirname of $[0] is not the place where we might find the
44702   # original and so on.  Autoconf is especially sensible to this).
44703   . ./$as_me.lineno
44704   # Exit status is that of the last command.
44705   exit
44706 }
44707
44708
44709 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
44710   *c*,-n*) ECHO_N= ECHO_C='
44711 ' ECHO_T='      ' ;;
44712   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
44713   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
44714 esac
44715
44716 if expr a : '\(a\)' >/dev/null 2>&1; then
44717   as_expr=expr
44718 else
44719   as_expr=false
44720 fi
44721
44722 rm -f conf$$ conf$$.exe conf$$.file
44723 echo >conf$$.file
44724 if ln -s conf$$.file conf$$ 2>/dev/null; then
44725   # We could just check for DJGPP; but this test a) works b) is more generic
44726   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
44727   if test -f conf$$.exe; then
44728     # Don't use ln at all; we don't have any links
44729     as_ln_s='cp -p'
44730   else
44731     as_ln_s='ln -s'
44732   fi
44733 elif ln conf$$.file conf$$ 2>/dev/null; then
44734   as_ln_s=ln
44735 else
44736   as_ln_s='cp -p'
44737 fi
44738 rm -f conf$$ conf$$.exe conf$$.file
44739
44740 if mkdir -p . 2>/dev/null; then
44741   as_mkdir_p=:
44742 else
44743   test -d ./-p && rmdir ./-p
44744   as_mkdir_p=false
44745 fi
44746
44747 as_executable_p="test -f"
44748
44749 # Sed expression to map a string onto a valid CPP name.
44750 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
44751
44752 # Sed expression to map a string onto a valid variable name.
44753 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
44754
44755
44756 # IFS
44757 # We need space, tab and new line, in precisely that order.
44758 as_nl='
44759 '
44760 IFS="   $as_nl"
44761
44762 # CDPATH.
44763 $as_unset CDPATH
44764
44765 exec 6>&1
44766
44767 # Open the log real soon, to keep \$[0] and so on meaningful, and to
44768 # report actual input values of CONFIG_FILES etc. instead of their
44769 # values after options handling.  Logging --version etc. is OK.
44770 exec 5>>config.log
44771 {
44772   echo
44773   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
44774 ## Running $as_me. ##
44775 _ASBOX
44776 } >&5
44777 cat >&5 <<_CSEOF
44778
44779 This file was extended by $as_me, which was
44780 generated by GNU Autoconf 2.59.  Invocation command line was
44781
44782   CONFIG_FILES    = $CONFIG_FILES
44783   CONFIG_HEADERS  = $CONFIG_HEADERS
44784   CONFIG_LINKS    = $CONFIG_LINKS
44785   CONFIG_COMMANDS = $CONFIG_COMMANDS
44786   $ $0 $@
44787
44788 _CSEOF
44789 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
44790 echo >&5
44791 _ACEOF
44792
44793 # Files that config.status was made for.
44794 if test -n "$ac_config_files"; then
44795   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
44796 fi
44797
44798 if test -n "$ac_config_headers"; then
44799   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
44800 fi
44801
44802 if test -n "$ac_config_links"; then
44803   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
44804 fi
44805
44806 if test -n "$ac_config_commands"; then
44807   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
44808 fi
44809
44810 cat >>$CONFIG_STATUS <<\_ACEOF
44811
44812 ac_cs_usage="\
44813 \`$as_me' instantiates files from templates according to the
44814 current configuration.
44815
44816 Usage: $0 [OPTIONS] [FILE]...
44817
44818   -h, --help       print this help, then exit
44819   -V, --version    print version number, then exit
44820   -q, --quiet      do not print progress messages
44821   -d, --debug      don't remove temporary files
44822       --recheck    update $as_me by reconfiguring in the same conditions
44823   --file=FILE[:TEMPLATE]
44824                    instantiate the configuration file FILE
44825   --header=FILE[:TEMPLATE]
44826                    instantiate the configuration header FILE
44827
44828 Configuration files:
44829 $config_files
44830
44831 Configuration headers:
44832 $config_headers
44833
44834 Configuration commands:
44835 $config_commands
44836
44837 Report bugs to <bug-autoconf@gnu.org>."
44838 _ACEOF
44839
44840 cat >>$CONFIG_STATUS <<_ACEOF
44841 ac_cs_version="\\
44842 config.status
44843 configured by $0, generated by GNU Autoconf 2.59,
44844   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
44845
44846 Copyright (C) 2003 Free Software Foundation, Inc.
44847 This config.status script is free software; the Free Software Foundation
44848 gives unlimited permission to copy, distribute and modify it."
44849 srcdir=$srcdir
44850 INSTALL="$INSTALL"
44851 _ACEOF
44852
44853 cat >>$CONFIG_STATUS <<\_ACEOF
44854 # If no file are specified by the user, then we need to provide default
44855 # value.  By we need to know if files were specified by the user.
44856 ac_need_defaults=:
44857 while test $# != 0
44858 do
44859   case $1 in
44860   --*=*)
44861     ac_option=`expr "x$1" : 'x\([^=]*\)='`
44862     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
44863     ac_shift=:
44864     ;;
44865   -*)
44866     ac_option=$1
44867     ac_optarg=$2
44868     ac_shift=shift
44869     ;;
44870   *) # This is not an option, so the user has probably given explicit
44871      # arguments.
44872      ac_option=$1
44873      ac_need_defaults=false;;
44874   esac
44875
44876   case $ac_option in
44877   # Handling of the options.
44878 _ACEOF
44879 cat >>$CONFIG_STATUS <<\_ACEOF
44880   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
44881     ac_cs_recheck=: ;;
44882   --version | --vers* | -V )
44883     echo "$ac_cs_version"; exit 0 ;;
44884   --he | --h)
44885     # Conflict between --help and --header
44886     { { echo "$as_me:$LINENO: error: ambiguous option: $1
44887 Try \`$0 --help' for more information." >&5
44888 echo "$as_me: error: ambiguous option: $1
44889 Try \`$0 --help' for more information." >&2;}
44890    { (exit 1); exit 1; }; };;
44891   --help | --hel | -h )
44892     echo "$ac_cs_usage"; exit 0 ;;
44893   --debug | --d* | -d )
44894     debug=: ;;
44895   --file | --fil | --fi | --f )
44896     $ac_shift
44897     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
44898     ac_need_defaults=false;;
44899   --header | --heade | --head | --hea )
44900     $ac_shift
44901     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
44902     ac_need_defaults=false;;
44903   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
44904   | -silent | --silent | --silen | --sile | --sil | --si | --s)
44905     ac_cs_silent=: ;;
44906
44907   # This is an error.
44908   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
44909 Try \`$0 --help' for more information." >&5
44910 echo "$as_me: error: unrecognized option: $1
44911 Try \`$0 --help' for more information." >&2;}
44912    { (exit 1); exit 1; }; } ;;
44913
44914   *) ac_config_targets="$ac_config_targets $1" ;;
44915
44916   esac
44917   shift
44918 done
44919
44920 ac_configure_extra_args=
44921
44922 if $ac_cs_silent; then
44923   exec 6>/dev/null
44924   ac_configure_extra_args="$ac_configure_extra_args --silent"
44925 fi
44926
44927 _ACEOF
44928 cat >>$CONFIG_STATUS <<_ACEOF
44929 if \$ac_cs_recheck; then
44930   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
44931   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
44932 fi
44933
44934 _ACEOF
44935
44936 cat >>$CONFIG_STATUS <<_ACEOF
44937 #
44938 # INIT-COMMANDS section.
44939 #
44940
44941 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
44942
44943 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
44944 STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS"
44945
44946
44947 _ACEOF
44948
44949
44950
44951 cat >>$CONFIG_STATUS <<\_ACEOF
44952 for ac_config_target in $ac_config_targets
44953 do
44954   case "$ac_config_target" in
44955   # Handling of arguments.
44956   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:build/top.mk:Makefile.in:build/dir.mk" ;;
44957   "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk" ;;
44958   "doc/man/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk" ;;
44959   "doc/man/man1/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk" ;;
44960   "doc/man/man3/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk" ;;
44961   "doc/man/man5/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk" ;;
44962   "doc/man/man8/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk" ;;
44963   "clients/Makefile" ) CONFIG_FILES="$CONFIG_FILES clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk" ;;
44964   "clients/tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk" ;;
44965   "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile:build/top.mk:include/Makefile.in" ;;
44966   "libraries/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk" ;;
44967   "libraries/liblber/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
44968   "libraries/libldap/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
44969   "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" ;;
44970   "libraries/liblunicode/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
44971   "libraries/liblutil/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
44972   "libraries/librewrite/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
44973   "servers/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk" ;;
44974   "servers/slapd/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk" ;;
44975   "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" ;;
44976   "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" ;;
44977   "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" ;;
44978   "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" ;;
44979   "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" ;;
44980   "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" ;;
44981   "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" ;;
44982   "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" ;;
44983   "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" ;;
44984   "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" ;;
44985   "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" ;;
44986   "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" ;;
44987   "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" ;;
44988   "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" ;;
44989   "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" ;;
44990   "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" ;;
44991   "servers/slapd/overlays/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk" ;;
44992   "servers/slurpd/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk" ;;
44993   "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;;
44994   "tests/run" ) CONFIG_FILES="$CONFIG_FILES tests/run" ;;
44995   "tests/progs/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;;
44996   "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
44997   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
44998   "include/portable.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h:include/portable.hin" ;;
44999   "include/ldap_features.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h:include/ldap_features.hin" ;;
45000   "include/lber_types.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h:include/lber_types.hin" ;;
45001   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
45002 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
45003    { (exit 1); exit 1; }; };;
45004   esac
45005 done
45006
45007 # If the user did not use the arguments to specify the items to instantiate,
45008 # then the envvar interface is used.  Set only those that are not.
45009 # We use the long form for the default assignment because of an extremely
45010 # bizarre bug on SunOS 4.1.3.
45011 if $ac_need_defaults; then
45012   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
45013   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
45014   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
45015 fi
45016
45017 # Have a temporary directory for convenience.  Make it in the build tree
45018 # simply because there is no reason to put it here, and in addition,
45019 # creating and moving files from /tmp can sometimes cause problems.
45020 # Create a temporary directory, and hook for its removal unless debugging.
45021 $debug ||
45022 {
45023   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
45024   trap '{ (exit 1); exit 1; }' 1 2 13 15
45025 }
45026
45027 # Create a (secure) tmp directory for tmp files.
45028
45029 {
45030   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
45031   test -n "$tmp" && test -d "$tmp"
45032 }  ||
45033 {
45034   tmp=./confstat$$-$RANDOM
45035   (umask 077 && mkdir $tmp)
45036 } ||
45037 {
45038    echo "$me: cannot create a temporary directory in ." >&2
45039    { (exit 1); exit 1; }
45040 }
45041
45042 _ACEOF
45043
45044 cat >>$CONFIG_STATUS <<_ACEOF
45045
45046 #
45047 # CONFIG_FILES section.
45048 #
45049
45050 # No need to generate the scripts if there are no CONFIG_FILES.
45051 # This happens for instance when ./config.status config.h
45052 if test -n "\$CONFIG_FILES"; then
45053   # Protect against being on the right side of a sed subst in config.status.
45054   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
45055    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
45056 s,@SHELL@,$SHELL,;t t
45057 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
45058 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
45059 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
45060 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
45061 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
45062 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
45063 s,@exec_prefix@,$exec_prefix,;t t
45064 s,@prefix@,$prefix,;t t
45065 s,@program_transform_name@,$program_transform_name,;t t
45066 s,@bindir@,$bindir,;t t
45067 s,@sbindir@,$sbindir,;t t
45068 s,@libexecdir@,$libexecdir,;t t
45069 s,@datadir@,$datadir,;t t
45070 s,@sysconfdir@,$sysconfdir,;t t
45071 s,@sharedstatedir@,$sharedstatedir,;t t
45072 s,@localstatedir@,$localstatedir,;t t
45073 s,@libdir@,$libdir,;t t
45074 s,@includedir@,$includedir,;t t
45075 s,@oldincludedir@,$oldincludedir,;t t
45076 s,@infodir@,$infodir,;t t
45077 s,@mandir@,$mandir,;t t
45078 s,@build_alias@,$build_alias,;t t
45079 s,@host_alias@,$host_alias,;t t
45080 s,@target_alias@,$target_alias,;t t
45081 s,@DEFS@,$DEFS,;t t
45082 s,@ECHO_C@,$ECHO_C,;t t
45083 s,@ECHO_N@,$ECHO_N,;t t
45084 s,@ECHO_T@,$ECHO_T,;t t
45085 s,@LIBS@,$LIBS,;t t
45086 s,@build@,$build,;t t
45087 s,@build_cpu@,$build_cpu,;t t
45088 s,@build_vendor@,$build_vendor,;t t
45089 s,@build_os@,$build_os,;t t
45090 s,@host@,$host,;t t
45091 s,@host_cpu@,$host_cpu,;t t
45092 s,@host_vendor@,$host_vendor,;t t
45093 s,@host_os@,$host_os,;t t
45094 s,@target@,$target,;t t
45095 s,@target_cpu@,$target_cpu,;t t
45096 s,@target_vendor@,$target_vendor,;t t
45097 s,@target_os@,$target_os,;t t
45098 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
45099 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
45100 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
45101 s,@CYGPATH_W@,$CYGPATH_W,;t t
45102 s,@PACKAGE@,$PACKAGE,;t t
45103 s,@VERSION@,$VERSION,;t t
45104 s,@ACLOCAL@,$ACLOCAL,;t t
45105 s,@AUTOCONF@,$AUTOCONF,;t t
45106 s,@AUTOMAKE@,$AUTOMAKE,;t t
45107 s,@AUTOHEADER@,$AUTOHEADER,;t t
45108 s,@MAKEINFO@,$MAKEINFO,;t t
45109 s,@install_sh@,$install_sh,;t t
45110 s,@STRIP@,$STRIP,;t t
45111 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
45112 s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
45113 s,@mkdir_p@,$mkdir_p,;t t
45114 s,@AWK@,$AWK,;t t
45115 s,@SET_MAKE@,$SET_MAKE,;t t
45116 s,@am__leading_dot@,$am__leading_dot,;t t
45117 s,@AMTAR@,$AMTAR,;t t
45118 s,@am__tar@,$am__tar,;t t
45119 s,@am__untar@,$am__untar,;t t
45120 s,@OPENLDAP_LIBRELEASE@,$OPENLDAP_LIBRELEASE,;t t
45121 s,@OPENLDAP_LIBVERSION@,$OPENLDAP_LIBVERSION,;t t
45122 s,@OPENLDAP_RELEASE_DATE@,$OPENLDAP_RELEASE_DATE,;t t
45123 s,@top_builddir@,$top_builddir,;t t
45124 s,@ldap_subdir@,$ldap_subdir,;t t
45125 s,@CC@,$CC,;t t
45126 s,@AR@,$AR,;t t
45127 s,@CFLAGS@,$CFLAGS,;t t
45128 s,@LDFLAGS@,$LDFLAGS,;t t
45129 s,@CPPFLAGS@,$CPPFLAGS,;t t
45130 s,@ac_ct_CC@,$ac_ct_CC,;t t
45131 s,@EXEEXT@,$EXEEXT,;t t
45132 s,@OBJEXT@,$OBJEXT,;t t
45133 s,@DEPDIR@,$DEPDIR,;t t
45134 s,@am__include@,$am__include,;t t
45135 s,@am__quote@,$am__quote,;t t
45136 s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
45137 s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
45138 s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
45139 s,@CCDEPMODE@,$CCDEPMODE,;t t
45140 s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
45141 s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
45142 s,@EGREP@,$EGREP,;t t
45143 s,@LN_S@,$LN_S,;t t
45144 s,@ECHO@,$ECHO,;t t
45145 s,@ac_ct_AR@,$ac_ct_AR,;t t
45146 s,@RANLIB@,$RANLIB,;t t
45147 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
45148 s,@DLLTOOL@,$DLLTOOL,;t t
45149 s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
45150 s,@AS@,$AS,;t t
45151 s,@ac_ct_AS@,$ac_ct_AS,;t t
45152 s,@OBJDUMP@,$OBJDUMP,;t t
45153 s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t
45154 s,@CPP@,$CPP,;t t
45155 s,@LIBTOOL@,$LIBTOOL,;t t
45156 s,@PERLBIN@,$PERLBIN,;t t
45157 s,@OL_MKDEP@,$OL_MKDEP,;t t
45158 s,@OL_MKDEP_FLAGS@,$OL_MKDEP_FLAGS,;t t
45159 s,@LTSTATIC@,$LTSTATIC,;t t
45160 s,@LIBOBJS@,$LIBOBJS,;t t
45161 s,@LIBSRCS@,$LIBSRCS,;t t
45162 s,@PLAT@,$PLAT,;t t
45163 s,@WITH_SASL@,$WITH_SASL,;t t
45164 s,@WITH_TLS@,$WITH_TLS,;t t
45165 s,@WITH_MODULES_ENABLED@,$WITH_MODULES_ENABLED,;t t
45166 s,@WITH_ACI_ENABLED@,$WITH_ACI_ENABLED,;t t
45167 s,@BUILD_THREAD@,$BUILD_THREAD,;t t
45168 s,@BUILD_LIBS_DYNAMIC@,$BUILD_LIBS_DYNAMIC,;t t
45169 s,@BUILD_SLAPD@,$BUILD_SLAPD,;t t
45170 s,@BUILD_SLAPI@,$BUILD_SLAPI,;t t
45171 s,@SLAPD_SLAPI_DEPEND@,$SLAPD_SLAPI_DEPEND,;t t
45172 s,@BUILD_BDB@,$BUILD_BDB,;t t
45173 s,@BUILD_DNSSRV@,$BUILD_DNSSRV,;t t
45174 s,@BUILD_HDB@,$BUILD_HDB,;t t
45175 s,@BUILD_LDAP@,$BUILD_LDAP,;t t
45176 s,@BUILD_LDBM@,$BUILD_LDBM,;t t
45177 s,@BUILD_META@,$BUILD_META,;t t
45178 s,@BUILD_MONITOR@,$BUILD_MONITOR,;t t
45179 s,@BUILD_NULL@,$BUILD_NULL,;t t
45180 s,@BUILD_PASSWD@,$BUILD_PASSWD,;t t
45181 s,@BUILD_RELAY@,$BUILD_RELAY,;t t
45182 s,@BUILD_PERL@,$BUILD_PERL,;t t
45183 s,@BUILD_SHELL@,$BUILD_SHELL,;t t
45184 s,@BUILD_SQL@,$BUILD_SQL,;t t
45185 s,@BUILD_ACCESSLOG@,$BUILD_ACCESSLOG,;t t
45186 s,@BUILD_DENYOP@,$BUILD_DENYOP,;t t
45187 s,@BUILD_DYNGROUP@,$BUILD_DYNGROUP,;t t
45188 s,@BUILD_DYNLIST@,$BUILD_DYNLIST,;t t
45189 s,@BUILD_LASTMOD@,$BUILD_LASTMOD,;t t
45190 s,@BUILD_PPOLICY@,$BUILD_PPOLICY,;t t
45191 s,@BUILD_PROXYCACHE@,$BUILD_PROXYCACHE,;t t
45192 s,@BUILD_REFINT@,$BUILD_REFINT,;t t
45193 s,@BUILD_RETCODE@,$BUILD_RETCODE,;t t
45194 s,@BUILD_RWM@,$BUILD_RWM,;t t
45195 s,@BUILD_SYNCPROV@,$BUILD_SYNCPROV,;t t
45196 s,@BUILD_TRANSLUCENT@,$BUILD_TRANSLUCENT,;t t
45197 s,@BUILD_UNIQUE@,$BUILD_UNIQUE,;t t
45198 s,@BUILD_VALSORT@,$BUILD_VALSORT,;t t
45199 s,@BUILD_SLURPD@,$BUILD_SLURPD,;t t
45200 s,@LDAP_LIBS@,$LDAP_LIBS,;t t
45201 s,@SLAPD_LIBS@,$SLAPD_LIBS,;t t
45202 s,@SLURPD_LIBS@,$SLURPD_LIBS,;t t
45203 s,@LDBM_LIBS@,$LDBM_LIBS,;t t
45204 s,@LTHREAD_LIBS@,$LTHREAD_LIBS,;t t
45205 s,@LUTIL_LIBS@,$LUTIL_LIBS,;t t
45206 s,@WRAP_LIBS@,$WRAP_LIBS,;t t
45207 s,@SLAPD_MODULES_CPPFLAGS@,$SLAPD_MODULES_CPPFLAGS,;t t
45208 s,@SLAPD_MODULES_LDFLAGS@,$SLAPD_MODULES_LDFLAGS,;t t
45209 s,@SLAPD_NO_STATIC@,$SLAPD_NO_STATIC,;t t
45210 s,@SLAPD_STATIC_BACKENDS@,$SLAPD_STATIC_BACKENDS,;t t
45211 s,@SLAPD_DYNAMIC_BACKENDS@,$SLAPD_DYNAMIC_BACKENDS,;t t
45212 s,@SLAPD_STATIC_OVERLAYS@,$SLAPD_STATIC_OVERLAYS,;t t
45213 s,@SLAPD_DYNAMIC_OVERLAYS@,$SLAPD_DYNAMIC_OVERLAYS,;t t
45214 s,@PERL_CPPFLAGS@,$PERL_CPPFLAGS,;t t
45215 s,@SLAPD_PERL_LDFLAGS@,$SLAPD_PERL_LDFLAGS,;t t
45216 s,@MOD_PERL_LDFLAGS@,$MOD_PERL_LDFLAGS,;t t
45217 s,@KRB4_LIBS@,$KRB4_LIBS,;t t
45218 s,@KRB5_LIBS@,$KRB5_LIBS,;t t
45219 s,@SASL_LIBS@,$SASL_LIBS,;t t
45220 s,@TLS_LIBS@,$TLS_LIBS,;t t
45221 s,@MODULES_LIBS@,$MODULES_LIBS,;t t
45222 s,@SLAPI_LIBS@,$SLAPI_LIBS,;t t
45223 s,@LIBSLAPI@,$LIBSLAPI,;t t
45224 s,@LIBSLAPITOOLS@,$LIBSLAPITOOLS,;t t
45225 s,@AUTH_LIBS@,$AUTH_LIBS,;t t
45226 s,@SLAPD_SLP_LIBS@,$SLAPD_SLP_LIBS,;t t
45227 s,@SLAPD_GMP_LIBS@,$SLAPD_GMP_LIBS,;t t
45228 s,@SLAPD_SQL_LDFLAGS@,$SLAPD_SQL_LDFLAGS,;t t
45229 s,@SLAPD_SQL_LIBS@,$SLAPD_SQL_LIBS,;t t
45230 s,@SLAPD_SQL_INCLUDES@,$SLAPD_SQL_INCLUDES,;t t
45231 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
45232 CEOF
45233
45234 _ACEOF
45235
45236   cat >>$CONFIG_STATUS <<\_ACEOF
45237   # Split the substitutions into bite-sized pieces for seds with
45238   # small command number limits, like on Digital OSF/1 and HP-UX.
45239   ac_max_sed_lines=48
45240   ac_sed_frag=1 # Number of current file.
45241   ac_beg=1 # First line for current file.
45242   ac_end=$ac_max_sed_lines # Line after last line for current file.
45243   ac_more_lines=:
45244   ac_sed_cmds=
45245   while $ac_more_lines; do
45246     if test $ac_beg -gt 1; then
45247       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
45248     else
45249       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
45250     fi
45251     if test ! -s $tmp/subs.frag; then
45252       ac_more_lines=false
45253     else
45254       # The purpose of the label and of the branching condition is to
45255       # speed up the sed processing (if there are no `@' at all, there
45256       # is no need to browse any of the substitutions).
45257       # These are the two extra sed commands mentioned above.
45258       (echo ':t
45259   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
45260       if test -z "$ac_sed_cmds"; then
45261         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
45262       else
45263         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
45264       fi
45265       ac_sed_frag=`expr $ac_sed_frag + 1`
45266       ac_beg=$ac_end
45267       ac_end=`expr $ac_end + $ac_max_sed_lines`
45268     fi
45269   done
45270   if test -z "$ac_sed_cmds"; then
45271     ac_sed_cmds=cat
45272   fi
45273 fi # test -n "$CONFIG_FILES"
45274
45275 _ACEOF
45276 cat >>$CONFIG_STATUS <<\_ACEOF
45277 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
45278   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
45279   case $ac_file in
45280   - | *:- | *:-:* ) # input from stdin
45281         cat >$tmp/stdin
45282         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
45283         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
45284   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
45285         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
45286   * )   ac_file_in=$ac_file.in ;;
45287   esac
45288
45289   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
45290   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
45291 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
45292          X"$ac_file" : 'X\(//\)[^/]' \| \
45293          X"$ac_file" : 'X\(//\)$' \| \
45294          X"$ac_file" : 'X\(/\)' \| \
45295          .     : '\(.\)' 2>/dev/null ||
45296 echo X"$ac_file" |
45297     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
45298           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
45299           /^X\(\/\/\)$/{ s//\1/; q; }
45300           /^X\(\/\).*/{ s//\1/; q; }
45301           s/.*/./; q'`
45302   { if $as_mkdir_p; then
45303     mkdir -p "$ac_dir"
45304   else
45305     as_dir="$ac_dir"
45306     as_dirs=
45307     while test ! -d "$as_dir"; do
45308       as_dirs="$as_dir $as_dirs"
45309       as_dir=`(dirname "$as_dir") 2>/dev/null ||
45310 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
45311          X"$as_dir" : 'X\(//\)[^/]' \| \
45312          X"$as_dir" : 'X\(//\)$' \| \
45313          X"$as_dir" : 'X\(/\)' \| \
45314          .     : '\(.\)' 2>/dev/null ||
45315 echo X"$as_dir" |
45316     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
45317           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
45318           /^X\(\/\/\)$/{ s//\1/; q; }
45319           /^X\(\/\).*/{ s//\1/; q; }
45320           s/.*/./; q'`
45321     done
45322     test ! -n "$as_dirs" || mkdir $as_dirs
45323   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
45324 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
45325    { (exit 1); exit 1; }; }; }
45326
45327   ac_builddir=.
45328
45329 if test "$ac_dir" != .; then
45330   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
45331   # A "../" for each directory in $ac_dir_suffix.
45332   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
45333 else
45334   ac_dir_suffix= ac_top_builddir=
45335 fi
45336
45337 case $srcdir in
45338   .)  # No --srcdir option.  We are building in place.
45339     ac_srcdir=.
45340     if test -z "$ac_top_builddir"; then
45341        ac_top_srcdir=.
45342     else
45343        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
45344     fi ;;
45345   [\\/]* | ?:[\\/]* )  # Absolute path.
45346     ac_srcdir=$srcdir$ac_dir_suffix;
45347     ac_top_srcdir=$srcdir ;;
45348   *) # Relative path.
45349     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
45350     ac_top_srcdir=$ac_top_builddir$srcdir ;;
45351 esac
45352
45353 # Do not use `cd foo && pwd` to compute absolute paths, because
45354 # the directories may not exist.
45355 case `pwd` in
45356 .) ac_abs_builddir="$ac_dir";;
45357 *)
45358   case "$ac_dir" in
45359   .) ac_abs_builddir=`pwd`;;
45360   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
45361   *) ac_abs_builddir=`pwd`/"$ac_dir";;
45362   esac;;
45363 esac
45364 case $ac_abs_builddir in
45365 .) ac_abs_top_builddir=${ac_top_builddir}.;;
45366 *)
45367   case ${ac_top_builddir}. in
45368   .) ac_abs_top_builddir=$ac_abs_builddir;;
45369   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
45370   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
45371   esac;;
45372 esac
45373 case $ac_abs_builddir in
45374 .) ac_abs_srcdir=$ac_srcdir;;
45375 *)
45376   case $ac_srcdir in
45377   .) ac_abs_srcdir=$ac_abs_builddir;;
45378   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
45379   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
45380   esac;;
45381 esac
45382 case $ac_abs_builddir in
45383 .) ac_abs_top_srcdir=$ac_top_srcdir;;
45384 *)
45385   case $ac_top_srcdir in
45386   .) ac_abs_top_srcdir=$ac_abs_builddir;;
45387   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
45388   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
45389   esac;;
45390 esac
45391
45392
45393   case $INSTALL in
45394   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
45395   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
45396   esac
45397
45398   if test x"$ac_file" != x-; then
45399     { echo "$as_me:$LINENO: creating $ac_file" >&5
45400 echo "$as_me: creating $ac_file" >&6;}
45401     rm -f "$ac_file"
45402   fi
45403   # Let's still pretend it is `configure' which instantiates (i.e., don't
45404   # use $as_me), people would be surprised to read:
45405   #    /* config.h.  Generated by config.status.  */
45406   if test x"$ac_file" = x-; then
45407     configure_input=
45408   else
45409     configure_input="$ac_file.  "
45410   fi
45411   configure_input=$configure_input"Generated from `echo $ac_file_in |
45412                                      sed 's,.*/,,'` by configure."
45413
45414   # First look for the input files in the build tree, otherwise in the
45415   # src tree.
45416   ac_file_inputs=`IFS=:
45417     for f in $ac_file_in; do
45418       case $f in
45419       -) echo $tmp/stdin ;;
45420       [\\/$]*)
45421          # Absolute (can't be DOS-style, as IFS=:)
45422          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
45423 echo "$as_me: error: cannot find input file: $f" >&2;}
45424    { (exit 1); exit 1; }; }
45425          echo "$f";;
45426       *) # Relative
45427          if test -f "$f"; then
45428            # Build tree
45429            echo "$f"
45430          elif test -f "$srcdir/$f"; then
45431            # Source tree
45432            echo "$srcdir/$f"
45433          else
45434            # /dev/null tree
45435            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
45436 echo "$as_me: error: cannot find input file: $f" >&2;}
45437    { (exit 1); exit 1; }; }
45438          fi;;
45439       esac
45440     done` || { (exit 1); exit 1; }
45441 _ACEOF
45442 cat >>$CONFIG_STATUS <<_ACEOF
45443   sed "$ac_vpsub
45444 $extrasub
45445 _ACEOF
45446 cat >>$CONFIG_STATUS <<\_ACEOF
45447 :t
45448 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
45449 s,@configure_input@,$configure_input,;t t
45450 s,@srcdir@,$ac_srcdir,;t t
45451 s,@abs_srcdir@,$ac_abs_srcdir,;t t
45452 s,@top_srcdir@,$ac_top_srcdir,;t t
45453 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
45454 s,@builddir@,$ac_builddir,;t t
45455 s,@abs_builddir@,$ac_abs_builddir,;t t
45456 s,@top_builddir@,$ac_top_builddir,;t t
45457 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
45458 s,@INSTALL@,$ac_INSTALL,;t t
45459 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
45460   rm -f $tmp/stdin
45461   if test x"$ac_file" != x-; then
45462     mv $tmp/out $ac_file
45463   else
45464     cat $tmp/out
45465     rm -f $tmp/out
45466   fi
45467
45468 done
45469 _ACEOF
45470 cat >>$CONFIG_STATUS <<\_ACEOF
45471
45472 #
45473 # CONFIG_HEADER section.
45474 #
45475
45476 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
45477 # NAME is the cpp macro being defined and VALUE is the value it is being given.
45478 #
45479 # ac_d sets the value in "#define NAME VALUE" lines.
45480 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
45481 ac_dB='[         ].*$,\1#\2'
45482 ac_dC=' '
45483 ac_dD=',;t'
45484 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
45485 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
45486 ac_uB='$,\1#\2define\3'
45487 ac_uC=' '
45488 ac_uD=',;t'
45489
45490 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
45491   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
45492   case $ac_file in
45493   - | *:- | *:-:* ) # input from stdin
45494         cat >$tmp/stdin
45495         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
45496         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
45497   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
45498         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
45499   * )   ac_file_in=$ac_file.in ;;
45500   esac
45501
45502   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
45503 echo "$as_me: creating $ac_file" >&6;}
45504
45505   # First look for the input files in the build tree, otherwise in the
45506   # src tree.
45507   ac_file_inputs=`IFS=:
45508     for f in $ac_file_in; do
45509       case $f in
45510       -) echo $tmp/stdin ;;
45511       [\\/$]*)
45512          # Absolute (can't be DOS-style, as IFS=:)
45513          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
45514 echo "$as_me: error: cannot find input file: $f" >&2;}
45515    { (exit 1); exit 1; }; }
45516          # Do quote $f, to prevent DOS paths from being IFS'd.
45517          echo "$f";;
45518       *) # Relative
45519          if test -f "$f"; then
45520            # Build tree
45521            echo "$f"
45522          elif test -f "$srcdir/$f"; then
45523            # Source tree
45524            echo "$srcdir/$f"
45525          else
45526            # /dev/null tree
45527            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
45528 echo "$as_me: error: cannot find input file: $f" >&2;}
45529    { (exit 1); exit 1; }; }
45530          fi;;
45531       esac
45532     done` || { (exit 1); exit 1; }
45533   # Remove the trailing spaces.
45534   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
45535
45536 _ACEOF
45537
45538 # Transform confdefs.h into two sed scripts, `conftest.defines' and
45539 # `conftest.undefs', that substitutes the proper values into
45540 # config.h.in to produce config.h.  The first handles `#define'
45541 # templates, and the second `#undef' templates.
45542 # And first: Protect against being on the right side of a sed subst in
45543 # config.status.  Protect against being in an unquoted here document
45544 # in config.status.
45545 rm -f conftest.defines conftest.undefs
45546 # Using a here document instead of a string reduces the quoting nightmare.
45547 # Putting comments in sed scripts is not portable.
45548 #
45549 # `end' is used to avoid that the second main sed command (meant for
45550 # 0-ary CPP macros) applies to n-ary macro definitions.
45551 # See the Autoconf documentation for `clear'.
45552 cat >confdef2sed.sed <<\_ACEOF
45553 s/[\\&,]/\\&/g
45554 s,[\\$`],\\&,g
45555 t clear
45556 : clear
45557 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
45558 t end
45559 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
45560 : end
45561 _ACEOF
45562 # If some macros were called several times there might be several times
45563 # the same #defines, which is useless.  Nevertheless, we may not want to
45564 # sort them, since we want the *last* AC-DEFINE to be honored.
45565 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
45566 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
45567 rm -f confdef2sed.sed
45568
45569 # This sed command replaces #undef with comments.  This is necessary, for
45570 # example, in the case of _POSIX_SOURCE, which is predefined and required
45571 # on some systems where configure will not decide to define it.
45572 cat >>conftest.undefs <<\_ACEOF
45573 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
45574 _ACEOF
45575
45576 # Break up conftest.defines because some shells have a limit on the size
45577 # of here documents, and old seds have small limits too (100 cmds).
45578 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
45579 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
45580 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
45581 echo '  :' >>$CONFIG_STATUS
45582 rm -f conftest.tail
45583 while grep . conftest.defines >/dev/null
45584 do
45585   # Write a limited-size here document to $tmp/defines.sed.
45586   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
45587   # Speed up: don't consider the non `#define' lines.
45588   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
45589   # Work around the forget-to-reset-the-flag bug.
45590   echo 't clr' >>$CONFIG_STATUS
45591   echo ': clr' >>$CONFIG_STATUS
45592   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
45593   echo 'CEOF
45594   sed -f $tmp/defines.sed $tmp/in >$tmp/out
45595   rm -f $tmp/in
45596   mv $tmp/out $tmp/in
45597 ' >>$CONFIG_STATUS
45598   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
45599   rm -f conftest.defines
45600   mv conftest.tail conftest.defines
45601 done
45602 rm -f conftest.defines
45603 echo '  fi # grep' >>$CONFIG_STATUS
45604 echo >>$CONFIG_STATUS
45605
45606 # Break up conftest.undefs because some shells have a limit on the size
45607 # of here documents, and old seds have small limits too (100 cmds).
45608 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
45609 rm -f conftest.tail
45610 while grep . conftest.undefs >/dev/null
45611 do
45612   # Write a limited-size here document to $tmp/undefs.sed.
45613   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
45614   # Speed up: don't consider the non `#undef'
45615   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
45616   # Work around the forget-to-reset-the-flag bug.
45617   echo 't clr' >>$CONFIG_STATUS
45618   echo ': clr' >>$CONFIG_STATUS
45619   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
45620   echo 'CEOF
45621   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
45622   rm -f $tmp/in
45623   mv $tmp/out $tmp/in
45624 ' >>$CONFIG_STATUS
45625   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
45626   rm -f conftest.undefs
45627   mv conftest.tail conftest.undefs
45628 done
45629 rm -f conftest.undefs
45630
45631 cat >>$CONFIG_STATUS <<\_ACEOF
45632   # Let's still pretend it is `configure' which instantiates (i.e., don't
45633   # use $as_me), people would be surprised to read:
45634   #    /* config.h.  Generated by config.status.  */
45635   if test x"$ac_file" = x-; then
45636     echo "/* Generated by configure.  */" >$tmp/config.h
45637   else
45638     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
45639   fi
45640   cat $tmp/in >>$tmp/config.h
45641   rm -f $tmp/in
45642   if test x"$ac_file" != x-; then
45643     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
45644       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
45645 echo "$as_me: $ac_file is unchanged" >&6;}
45646     else
45647       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
45648 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
45649          X"$ac_file" : 'X\(//\)[^/]' \| \
45650          X"$ac_file" : 'X\(//\)$' \| \
45651          X"$ac_file" : 'X\(/\)' \| \
45652          .     : '\(.\)' 2>/dev/null ||
45653 echo X"$ac_file" |
45654     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
45655           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
45656           /^X\(\/\/\)$/{ s//\1/; q; }
45657           /^X\(\/\).*/{ s//\1/; q; }
45658           s/.*/./; q'`
45659       { if $as_mkdir_p; then
45660     mkdir -p "$ac_dir"
45661   else
45662     as_dir="$ac_dir"
45663     as_dirs=
45664     while test ! -d "$as_dir"; do
45665       as_dirs="$as_dir $as_dirs"
45666       as_dir=`(dirname "$as_dir") 2>/dev/null ||
45667 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
45668          X"$as_dir" : 'X\(//\)[^/]' \| \
45669          X"$as_dir" : 'X\(//\)$' \| \
45670          X"$as_dir" : 'X\(/\)' \| \
45671          .     : '\(.\)' 2>/dev/null ||
45672 echo X"$as_dir" |
45673     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
45674           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
45675           /^X\(\/\/\)$/{ s//\1/; q; }
45676           /^X\(\/\).*/{ s//\1/; q; }
45677           s/.*/./; q'`
45678     done
45679     test ! -n "$as_dirs" || mkdir $as_dirs
45680   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
45681 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
45682    { (exit 1); exit 1; }; }; }
45683
45684       rm -f $ac_file
45685       mv $tmp/config.h $ac_file
45686     fi
45687   else
45688     cat $tmp/config.h
45689     rm -f $tmp/config.h
45690   fi
45691 # Compute $ac_file's index in $config_headers.
45692 _am_stamp_count=1
45693 for _am_header in $config_headers :; do
45694   case $_am_header in
45695     $ac_file | $ac_file:* )
45696       break ;;
45697     * )
45698       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
45699   esac
45700 done
45701 echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
45702 $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
45703          X$ac_file : 'X\(//\)[^/]' \| \
45704          X$ac_file : 'X\(//\)$' \| \
45705          X$ac_file : 'X\(/\)' \| \
45706          .     : '\(.\)' 2>/dev/null ||
45707 echo X$ac_file |
45708     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
45709           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
45710           /^X\(\/\/\)$/{ s//\1/; q; }
45711           /^X\(\/\).*/{ s//\1/; q; }
45712           s/.*/./; q'`/stamp-h$_am_stamp_count
45713 done
45714 _ACEOF
45715 cat >>$CONFIG_STATUS <<\_ACEOF
45716
45717 #
45718 # CONFIG_COMMANDS section.
45719 #
45720 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
45721   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
45722   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
45723   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
45724 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
45725          X"$ac_dest" : 'X\(//\)[^/]' \| \
45726          X"$ac_dest" : 'X\(//\)$' \| \
45727          X"$ac_dest" : 'X\(/\)' \| \
45728          .     : '\(.\)' 2>/dev/null ||
45729 echo X"$ac_dest" |
45730     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
45731           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
45732           /^X\(\/\/\)$/{ s//\1/; q; }
45733           /^X\(\/\).*/{ s//\1/; q; }
45734           s/.*/./; q'`
45735   { if $as_mkdir_p; then
45736     mkdir -p "$ac_dir"
45737   else
45738     as_dir="$ac_dir"
45739     as_dirs=
45740     while test ! -d "$as_dir"; do
45741       as_dirs="$as_dir $as_dirs"
45742       as_dir=`(dirname "$as_dir") 2>/dev/null ||
45743 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
45744          X"$as_dir" : 'X\(//\)[^/]' \| \
45745          X"$as_dir" : 'X\(//\)$' \| \
45746          X"$as_dir" : 'X\(/\)' \| \
45747          .     : '\(.\)' 2>/dev/null ||
45748 echo X"$as_dir" |
45749     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
45750           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
45751           /^X\(\/\/\)$/{ s//\1/; q; }
45752           /^X\(\/\).*/{ s//\1/; q; }
45753           s/.*/./; q'`
45754     done
45755     test ! -n "$as_dirs" || mkdir $as_dirs
45756   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
45757 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
45758    { (exit 1); exit 1; }; }; }
45759
45760   ac_builddir=.
45761
45762 if test "$ac_dir" != .; then
45763   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
45764   # A "../" for each directory in $ac_dir_suffix.
45765   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
45766 else
45767   ac_dir_suffix= ac_top_builddir=
45768 fi
45769
45770 case $srcdir in
45771   .)  # No --srcdir option.  We are building in place.
45772     ac_srcdir=.
45773     if test -z "$ac_top_builddir"; then
45774        ac_top_srcdir=.
45775     else
45776        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
45777     fi ;;
45778   [\\/]* | ?:[\\/]* )  # Absolute path.
45779     ac_srcdir=$srcdir$ac_dir_suffix;
45780     ac_top_srcdir=$srcdir ;;
45781   *) # Relative path.
45782     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
45783     ac_top_srcdir=$ac_top_builddir$srcdir ;;
45784 esac
45785
45786 # Do not use `cd foo && pwd` to compute absolute paths, because
45787 # the directories may not exist.
45788 case `pwd` in
45789 .) ac_abs_builddir="$ac_dir";;
45790 *)
45791   case "$ac_dir" in
45792   .) ac_abs_builddir=`pwd`;;
45793   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
45794   *) ac_abs_builddir=`pwd`/"$ac_dir";;
45795   esac;;
45796 esac
45797 case $ac_abs_builddir in
45798 .) ac_abs_top_builddir=${ac_top_builddir}.;;
45799 *)
45800   case ${ac_top_builddir}. in
45801   .) ac_abs_top_builddir=$ac_abs_builddir;;
45802   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
45803   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
45804   esac;;
45805 esac
45806 case $ac_abs_builddir in
45807 .) ac_abs_srcdir=$ac_srcdir;;
45808 *)
45809   case $ac_srcdir in
45810   .) ac_abs_srcdir=$ac_abs_builddir;;
45811   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
45812   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
45813   esac;;
45814 esac
45815 case $ac_abs_builddir in
45816 .) ac_abs_top_srcdir=$ac_top_srcdir;;
45817 *)
45818   case $ac_top_srcdir in
45819   .) ac_abs_top_srcdir=$ac_abs_builddir;;
45820   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
45821   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
45822   esac;;
45823 esac
45824
45825
45826   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
45827 echo "$as_me: executing $ac_dest commands" >&6;}
45828   case $ac_dest in
45829     depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
45830   # Strip MF so we end up with the name of the file.
45831   mf=`echo "$mf" | sed -e 's/:.*$//'`
45832   # Check whether this is an Automake generated Makefile or not.
45833   # We used to match only the files named `Makefile.in', but
45834   # some people rename them; so instead we look at the file content.
45835   # Grep'ing the first line is not enough: some people post-process
45836   # each Makefile.in and add a new line on top of each file to say so.
45837   # So let's grep whole file.
45838   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
45839     dirpart=`(dirname "$mf") 2>/dev/null ||
45840 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
45841          X"$mf" : 'X\(//\)[^/]' \| \
45842          X"$mf" : 'X\(//\)$' \| \
45843          X"$mf" : 'X\(/\)' \| \
45844          .     : '\(.\)' 2>/dev/null ||
45845 echo X"$mf" |
45846     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
45847           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
45848           /^X\(\/\/\)$/{ s//\1/; q; }
45849           /^X\(\/\).*/{ s//\1/; q; }
45850           s/.*/./; q'`
45851   else
45852     continue
45853   fi
45854   # Extract the definition of DEPDIR, am__include, and am__quote
45855   # from the Makefile without running `make'.
45856   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
45857   test -z "$DEPDIR" && continue
45858   am__include=`sed -n 's/^am__include = //p' < "$mf"`
45859   test -z "am__include" && continue
45860   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
45861   # When using ansi2knr, U may be empty or an underscore; expand it
45862   U=`sed -n 's/^U = //p' < "$mf"`
45863   # Find all dependency output files, they are included files with
45864   # $(DEPDIR) in their names.  We invoke sed twice because it is the
45865   # simplest approach to changing $(DEPDIR) to its actual value in the
45866   # expansion.
45867   for file in `sed -n "
45868     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
45869        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
45870     # Make sure the directory exists.
45871     test -f "$dirpart/$file" && continue
45872     fdir=`(dirname "$file") 2>/dev/null ||
45873 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
45874          X"$file" : 'X\(//\)[^/]' \| \
45875          X"$file" : 'X\(//\)$' \| \
45876          X"$file" : 'X\(/\)' \| \
45877          .     : '\(.\)' 2>/dev/null ||
45878 echo X"$file" |
45879     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
45880           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
45881           /^X\(\/\/\)$/{ s//\1/; q; }
45882           /^X\(\/\).*/{ s//\1/; q; }
45883           s/.*/./; q'`
45884     { if $as_mkdir_p; then
45885     mkdir -p $dirpart/$fdir
45886   else
45887     as_dir=$dirpart/$fdir
45888     as_dirs=
45889     while test ! -d "$as_dir"; do
45890       as_dirs="$as_dir $as_dirs"
45891       as_dir=`(dirname "$as_dir") 2>/dev/null ||
45892 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
45893          X"$as_dir" : 'X\(//\)[^/]' \| \
45894          X"$as_dir" : 'X\(//\)$' \| \
45895          X"$as_dir" : 'X\(/\)' \| \
45896          .     : '\(.\)' 2>/dev/null ||
45897 echo X"$as_dir" |
45898     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
45899           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
45900           /^X\(\/\/\)$/{ s//\1/; q; }
45901           /^X\(\/\).*/{ s//\1/; q; }
45902           s/.*/./; q'`
45903     done
45904     test ! -n "$as_dirs" || mkdir $as_dirs
45905   fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
45906 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
45907    { (exit 1); exit 1; }; }; }
45908
45909     # echo "creating $dirpart/$file"
45910     echo '# dummy' > "$dirpart/$file"
45911   done
45912 done
45913  ;;
45914     default )
45915 chmod +x tests/run
45916 date > stamp-h
45917 BACKENDSC="servers/slapd/backends.c"
45918 echo "Making $BACKENDSC"
45919 rm -f $BACKENDSC
45920 cat > $BACKENDSC << ENDX
45921 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
45922  *
45923  * Copyright 1998-2006 The OpenLDAP Foundation.
45924  * All rights reserved.
45925  *
45926  * Redistribution and use in source and binary forms, with or without
45927  * modification, are permitted only as authorized by the OpenLDAP
45928  * Public License.
45929  *
45930  * A copy of this license is available in the file LICENSE in the
45931  * top-level directory of the distribution or, alternatively, at
45932  * <http://www.OpenLDAP.org/license.html>.
45933  */
45934 /* This file is automatically generated by configure; please do not edit. */
45935
45936 #include "portable.h"
45937 #include "slap.h"
45938
45939 ENDX
45940 if test "${STATIC_BACKENDS}"; then
45941         for b in config ${STATIC_BACKENDS}; do
45942                 bb=`echo "${b}" | sed -e 's/back-//'`
45943                 cat >> $BACKENDSC << ENDX
45944 extern BI_init ${bb}_back_initialize;
45945 ENDX
45946         done
45947
45948         cat >> $BACKENDSC << ENDX
45949
45950 BackendInfo slap_binfo[] = {
45951 ENDX
45952
45953         for b in config ${STATIC_BACKENDS}; do
45954                 bb=`echo "${b}" | sed -e 's/back-//'`
45955                 echo "    Add ${bb} ..."
45956                 cat >> $BACKENDSC << ENDX
45957         { "${bb}", ${bb}_back_initialize },
45958 ENDX
45959         done
45960
45961         cat >> $BACKENDSC << ENDX
45962         { NULL, NULL },
45963 };
45964
45965 /* end of generated file */
45966 ENDX
45967 fi
45968 OVERLAYSC="servers/slapd/overlays/statover.c"
45969 echo "Making $OVERLAYSC"
45970 rm -f $OVERLAYSC
45971 cat > $OVERLAYSC << ENDX
45972 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
45973  *
45974  * Copyright 1998-2006 The OpenLDAP Foundation.
45975  * All rights reserved.
45976  *
45977  * Redistribution and use in source and binary forms, with or without
45978  * modification, are permitted only as authorized by the OpenLDAP
45979  * Public License.
45980  *
45981  * A copy of this license is available in the file LICENSE in the
45982  * top-level directory of the distribution or, alternatively, at
45983  * <http://www.OpenLDAP.org/license.html>.
45984  */
45985 /* This file is automatically generated by configure; please do not edit. */
45986
45987 #include "portable.h"
45988 #include "slap.h"
45989
45990 ENDX
45991 if test "${STATIC_OVERLAYS}"; then
45992         for o in ${STATIC_OVERLAYS}; do
45993                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
45994                 cat >> $OVERLAYSC << ENDX
45995 extern OV_init ${oo}_initialize;
45996 ENDX
45997         done
45998 fi
45999
46000 cat >> $OVERLAYSC << ENDX
46001
46002 OverlayInit slap_oinfo[] = {
46003 ENDX
46004
46005 if test "${STATIC_OVERLAYS}"; then
46006         for o in ${STATIC_OVERLAYS}; do
46007                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
46008                 echo "    Add ${oo} ..."
46009                 cat >> $OVERLAYSC << ENDX
46010         { "${oo}", ${oo}_initialize },
46011 ENDX
46012         done
46013 fi
46014
46015         cat >> $OVERLAYSC << ENDX
46016         { NULL, NULL },
46017 };
46018
46019 /* end of generated file */
46020 ENDX
46021
46022 echo Please run \"make depend\" to build dependencies
46023  ;;
46024   esac
46025 done
46026 _ACEOF
46027
46028 cat >>$CONFIG_STATUS <<\_ACEOF
46029
46030 { (exit 0); exit 0; }
46031 _ACEOF
46032 chmod +x $CONFIG_STATUS
46033 ac_clean_files=$ac_clean_files_save
46034
46035
46036 # configure is writing to config.log, and then calls config.status.
46037 # config.status does its own redirection, appending to config.log.
46038 # Unfortunately, on DOS this fails, as config.log is still kept open
46039 # by configure, so config.status won't be able to write to it; its
46040 # output is simply discarded.  So we exec the FD to /dev/null,
46041 # effectively closing config.log, so it can be properly (re)opened and
46042 # appended to by config.status.  When coming back to configure, we
46043 # need to make the FD available again.
46044 if test "$no_create" != yes; then
46045   ac_cs_success=:
46046   ac_config_status_args=
46047   test "$silent" = yes &&
46048     ac_config_status_args="$ac_config_status_args --quiet"
46049   exec 5>/dev/null
46050   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
46051   exec 5>>config.log
46052   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
46053   # would make configure fail if this is the last instruction.
46054   $ac_cs_success || { (exit 1); exit 1; }
46055 fi
46056