]> git.sur5r.net Git - openldap/blob - configure
fix previous commit
[openldap] / configure
1 #! /bin/sh
2 # From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.560.2.33 2007/06/10 18:39:53 hallvard Exp .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by GNU Autoconf 2.59.
5 #
6 # Copyright 1998-2007 The OpenLDAP Foundation. All rights reserved.
7 # Restrictions apply, see COPYRIGHT and LICENSE files.
8 #
9 # Copyright (C) 2003 Free Software Foundation, Inc.
10 # This configure script is free software; the Free Software Foundation
11 # gives unlimited permission to copy, distribute and modify it.
12 ## --------------------- ##
13 ## M4sh Initialization.  ##
14 ## --------------------- ##
15
16 # Be Bourne compatible
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18   emulate sh
19   NULLCMD=:
20   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21   # is contrary to our usage.  Disable this feature.
22   alias -g '${1+"$@"}'='"$@"'
23 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24   set -o posix
25 fi
26 DUALCASE=1; export DUALCASE # for MKS sh
27
28 # Support unset when possible.
29 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
30   as_unset=unset
31 else
32   as_unset=false
33 fi
34
35
36 # Work around bugs in pre-3.0 UWIN ksh.
37 $as_unset ENV MAIL MAILPATH
38 PS1='$ '
39 PS2='> '
40 PS4='+ '
41
42 # NLS nuisances.
43 for as_var in \
44   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
45   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
46   LC_TELEPHONE LC_TIME
47 do
48   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
49     eval $as_var=C; export $as_var
50   else
51     $as_unset $as_var
52   fi
53 done
54
55 # Required to use basename.
56 if expr a : '\(a\)' >/dev/null 2>&1; then
57   as_expr=expr
58 else
59   as_expr=false
60 fi
61
62 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
63   as_basename=basename
64 else
65   as_basename=false
66 fi
67
68
69 # Name of the executable.
70 as_me=`$as_basename "$0" ||
71 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
72          X"$0" : 'X\(//\)$' \| \
73          X"$0" : 'X\(/\)$' \| \
74          .     : '\(.\)' 2>/dev/null ||
75 echo X/"$0" |
76     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
77           /^X\/\(\/\/\)$/{ s//\1/; q; }
78           /^X\/\(\/\).*/{ s//\1/; q; }
79           s/.*/./; q'`
80
81
82 # PATH needs CR, and LINENO needs CR and PATH.
83 # Avoid depending upon Character Ranges.
84 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
85 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
86 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
87 as_cr_digits='0123456789'
88 as_cr_alnum=$as_cr_Letters$as_cr_digits
89
90 # The user is always right.
91 if test "${PATH_SEPARATOR+set}" != set; then
92   echo "#! /bin/sh" >conf$$.sh
93   echo  "exit 0"   >>conf$$.sh
94   chmod +x conf$$.sh
95   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
96     PATH_SEPARATOR=';'
97   else
98     PATH_SEPARATOR=:
99   fi
100   rm -f conf$$.sh
101 fi
102
103
104   as_lineno_1=$LINENO
105   as_lineno_2=$LINENO
106   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
107   test "x$as_lineno_1" != "x$as_lineno_2" &&
108   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
109   # Find who we are.  Look in the path if we contain no path at all
110   # relative or not.
111   case $0 in
112     *[\\/]* ) as_myself=$0 ;;
113     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
114 for as_dir in $PATH
115 do
116   IFS=$as_save_IFS
117   test -z "$as_dir" && as_dir=.
118   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
119 done
120
121        ;;
122   esac
123   # We did not find ourselves, most probably we were run as `sh COMMAND'
124   # in which case we are not to be found in the path.
125   if test "x$as_myself" = x; then
126     as_myself=$0
127   fi
128   if test ! -f "$as_myself"; then
129     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
130    { (exit 1); exit 1; }; }
131   fi
132   case $CONFIG_SHELL in
133   '')
134     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
135 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
136 do
137   IFS=$as_save_IFS
138   test -z "$as_dir" && as_dir=.
139   for as_base in sh bash ksh sh5; do
140          case $as_dir in
141          /*)
142            if ("$as_dir/$as_base" -c '
143   as_lineno_1=$LINENO
144   as_lineno_2=$LINENO
145   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
146   test "x$as_lineno_1" != "x$as_lineno_2" &&
147   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
148              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
149              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
150              CONFIG_SHELL=$as_dir/$as_base
151              export CONFIG_SHELL
152              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
153            fi;;
154          esac
155        done
156 done
157 ;;
158   esac
159
160   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
161   # uniformly replaced by the line number.  The first 'sed' inserts a
162   # line-number line before each line; the second 'sed' does the real
163   # work.  The second script uses 'N' to pair each line-number line
164   # with the numbered line, and appends trailing '-' during
165   # substitution so that $LINENO is not a special case at line end.
166   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
167   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
168   sed '=' <$as_myself |
169     sed '
170       N
171       s,$,-,
172       : loop
173       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
174       t loop
175       s,-$,,
176       s,^['$as_cr_digits']*\n,,
177     ' >$as_me.lineno &&
178   chmod +x $as_me.lineno ||
179     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
180    { (exit 1); exit 1; }; }
181
182   # Don't try to exec as it changes $[0], causing all sort of problems
183   # (the dirname of $[0] is not the place where we might find the
184   # original and so on.  Autoconf is especially sensible to this).
185   . ./$as_me.lineno
186   # Exit status is that of the last command.
187   exit
188 }
189
190
191 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
192   *c*,-n*) ECHO_N= ECHO_C='
193 ' ECHO_T='      ' ;;
194   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
195   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
196 esac
197
198 if expr a : '\(a\)' >/dev/null 2>&1; then
199   as_expr=expr
200 else
201   as_expr=false
202 fi
203
204 rm -f conf$$ conf$$.exe conf$$.file
205 echo >conf$$.file
206 if ln -s conf$$.file conf$$ 2>/dev/null; then
207   # We could just check for DJGPP; but this test a) works b) is more generic
208   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
209   if test -f conf$$.exe; then
210     # Don't use ln at all; we don't have any links
211     as_ln_s='cp -p'
212   else
213     as_ln_s='ln -s'
214   fi
215 elif ln conf$$.file conf$$ 2>/dev/null; then
216   as_ln_s=ln
217 else
218   as_ln_s='cp -p'
219 fi
220 rm -f conf$$ conf$$.exe conf$$.file
221
222 if mkdir -p . 2>/dev/null; then
223   as_mkdir_p=:
224 else
225   test -d ./-p && rmdir ./-p
226   as_mkdir_p=false
227 fi
228
229 as_executable_p="test -f"
230
231 # Sed expression to map a string onto a valid CPP name.
232 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
233
234 # Sed expression to map a string onto a valid variable name.
235 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
236
237
238 # IFS
239 # We need space, tab and new line, in precisely that order.
240 as_nl='
241 '
242 IFS="   $as_nl"
243
244 # CDPATH.
245 $as_unset CDPATH
246
247
248
249 # Check that we are running under the correct shell.
250 SHELL=${CONFIG_SHELL-/bin/sh}
251
252 case X$ECHO in
253 X*--fallback-echo)
254   # Remove one level of quotation (which was required for Make).
255   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
256   ;;
257 esac
258
259 echo=${ECHO-echo}
260 if test "X$1" = X--no-reexec; then
261   # Discard the --no-reexec flag, and continue.
262   shift
263 elif test "X$1" = X--fallback-echo; then
264   # Avoid inline document here, it may be left over
265   :
266 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
267   # Yippee, $echo works!
268   :
269 else
270   # Restart under the correct shell.
271   exec $SHELL "$0" --no-reexec ${1+"$@"}
272 fi
273
274 if test "X$1" = X--fallback-echo; then
275   # used as fallback echo
276   shift
277   cat <<EOF
278 $*
279 EOF
280   exit 0
281 fi
282
283 # The HP-UX ksh and POSIX shell print the target directory to stdout
284 # if CDPATH is set.
285 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
286
287 if test -z "$ECHO"; then
288 if test "X${echo_test_string+set}" != Xset; then
289 # find a string as large as possible, as long as the shell can cope with it
290   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
291     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
292     if (echo_test_string=`eval $cmd`) 2>/dev/null &&
293        echo_test_string=`eval $cmd` &&
294        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
295     then
296       break
297     fi
298   done
299 fi
300
301 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
302    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
303    test "X$echo_testing_string" = "X$echo_test_string"; then
304   :
305 else
306   # The Solaris, AIX, and Digital Unix default echo programs unquote
307   # backslashes.  This makes it impossible to quote backslashes using
308   #   echo "$something" | sed 's/\\/\\\\/g'
309   #
310   # So, first we look for a working echo in the user's PATH.
311
312   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
313   for dir in $PATH /usr/ucb; do
314     IFS="$lt_save_ifs"
315     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
316        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
317        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
318        test "X$echo_testing_string" = "X$echo_test_string"; then
319       echo="$dir/echo"
320       break
321     fi
322   done
323   IFS="$lt_save_ifs"
324
325   if test "X$echo" = Xecho; then
326     # We didn't find a better echo, so look for alternatives.
327     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
328        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
329        test "X$echo_testing_string" = "X$echo_test_string"; then
330       # This shell has a builtin print -r that does the trick.
331       echo='print -r'
332     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
333          test "X$CONFIG_SHELL" != X/bin/ksh; then
334       # If we have ksh, try running configure again with it.
335       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
336       export ORIGINAL_CONFIG_SHELL
337       CONFIG_SHELL=/bin/ksh
338       export CONFIG_SHELL
339       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
340     else
341       # Try using printf.
342       echo='printf %s\n'
343       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
344          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
345          test "X$echo_testing_string" = "X$echo_test_string"; then
346         # Cool, printf works
347         :
348       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
349            test "X$echo_testing_string" = 'X\t' &&
350            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
351            test "X$echo_testing_string" = "X$echo_test_string"; then
352         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
353         export CONFIG_SHELL
354         SHELL="$CONFIG_SHELL"
355         export SHELL
356         echo="$CONFIG_SHELL $0 --fallback-echo"
357       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
358            test "X$echo_testing_string" = 'X\t' &&
359            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
360            test "X$echo_testing_string" = "X$echo_test_string"; then
361         echo="$CONFIG_SHELL $0 --fallback-echo"
362       else
363         # maybe with a smaller string...
364         prev=:
365
366         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
367           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
368           then
369             break
370           fi
371           prev="$cmd"
372         done
373
374         if test "$prev" != 'sed 50q "$0"'; then
375           echo_test_string=`eval $prev`
376           export echo_test_string
377           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
378         else
379           # Oops.  We lost completely, so just stick with echo.
380           echo=echo
381         fi
382       fi
383     fi
384   fi
385 fi
386 fi
387
388 # Copy echo and quote the copy suitably for passing to libtool from
389 # the Makefile, instead of quoting the original, which is used later.
390 ECHO=$echo
391 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
392    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
393 fi
394
395
396
397
398 # Name of the host.
399 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
400 # so uname gets run too.
401 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
402
403 exec 6>&1
404
405 #
406 # Initializations.
407 #
408 ac_default_prefix=/usr/local
409 ac_config_libobj_dir=.
410 cross_compiling=no
411 subdirs=
412 MFLAGS=
413 MAKEFLAGS=
414 SHELL=${CONFIG_SHELL-/bin/sh}
415
416 # Maximum number of lines to put in a shell here document.
417 # This variable seems obsolete.  It should probably be removed, and
418 # only ac_max_sed_lines should be used.
419 : ${ac_max_here_lines=38}
420
421 # Identity of this package.
422 PACKAGE_NAME=
423 PACKAGE_TARNAME=
424 PACKAGE_VERSION=
425 PACKAGE_STRING=
426 PACKAGE_BUGREPORT=
427
428 ac_unique_file="OpenLDAP"
429 ac_unique_file="build/version.sh"
430 ac_default_prefix=/usr/local
431 # Factoring default headers for most tests.
432 ac_includes_default="\
433 #include <stdio.h>
434 #if HAVE_SYS_TYPES_H
435 # include <sys/types.h>
436 #endif
437 #if HAVE_SYS_STAT_H
438 # include <sys/stat.h>
439 #endif
440 #if STDC_HEADERS
441 # include <stdlib.h>
442 # include <stddef.h>
443 #else
444 # if HAVE_STDLIB_H
445 #  include <stdlib.h>
446 # endif
447 #endif
448 #if HAVE_STRING_H
449 # if !STDC_HEADERS && HAVE_MEMORY_H
450 #  include <memory.h>
451 # endif
452 # include <string.h>
453 #endif
454 #if HAVE_STRINGS_H
455 # include <strings.h>
456 #endif
457 #if HAVE_INTTYPES_H
458 # include <inttypes.h>
459 #else
460 # if HAVE_STDINT_H
461 #  include <stdint.h>
462 # endif
463 #endif
464 #if HAVE_UNISTD_H
465 # include <unistd.h>
466 #endif"
467
468 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar OPENLDAP_LIBRELEASE OPENLDAP_LIBVERSION OPENLDAP_RELEASE_DATE top_builddir ldap_subdir CC AR CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO ac_ct_AR RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CPP LIBTOOL PERLBIN OL_MKDEP OL_MKDEP_FLAGS LTSTATIC LIBOBJS LIBSRCS PLAT WITH_SASL WITH_TLS WITH_MODULES_ENABLED WITH_ACI_ENABLED BUILD_THREAD BUILD_LIBS_DYNAMIC BUILD_SLAPD BUILD_SLAPI SLAPD_SLAPI_DEPEND BUILD_BDB BUILD_DNSSRV BUILD_HDB BUILD_LDAP BUILD_LDBM BUILD_META BUILD_MONITOR BUILD_NULL BUILD_PASSWD BUILD_RELAY BUILD_PERL BUILD_SHELL BUILD_SQL BUILD_ACCESSLOG BUILD_AUDITLOG BUILD_DENYOP BUILD_DYNGROUP BUILD_DYNLIST BUILD_LASTMOD BUILD_PPOLICY BUILD_PROXYCACHE BUILD_REFINT BUILD_RETCODE BUILD_RWM BUILD_SYNCPROV BUILD_TRANSLUCENT BUILD_UNIQUE BUILD_VALSORT BUILD_SLURPD LDAP_LIBS SLAPD_LIBS SLURPD_LIBS LDBM_LIBS LTHREAD_LIBS LUTIL_LIBS WRAP_LIBS SLAPD_MODULES_CPPFLAGS SLAPD_MODULES_LDFLAGS SLAPD_NO_STATIC SLAPD_STATIC_BACKENDS SLAPD_DYNAMIC_BACKENDS SLAPD_STATIC_OVERLAYS SLAPD_DYNAMIC_OVERLAYS PERL_CPPFLAGS SLAPD_PERL_LDFLAGS MOD_PERL_LDFLAGS KRB4_LIBS KRB5_LIBS SASL_LIBS TLS_LIBS MODULES_LIBS SLAPI_LIBS LIBSLAPI LIBSLAPITOOLS AUTH_LIBS SLAPD_SLP_LIBS SLAPD_GMP_LIBS SLAPD_SQL_LDFLAGS SLAPD_SQL_LIBS SLAPD_SQL_INCLUDES LTLIBOBJS'
469 ac_subst_files=''
470
471 # Initialize some variables set by options.
472 ac_init_help=
473 ac_init_version=false
474 # The variables have the same names as the options, with
475 # dashes changed to underlines.
476 cache_file=/dev/null
477 exec_prefix=NONE
478 no_create=
479 no_recursion=
480 prefix=NONE
481 program_prefix=NONE
482 program_suffix=NONE
483 program_transform_name=s,x,x,
484 silent=
485 site=
486 srcdir=
487 verbose=
488 x_includes=NONE
489 x_libraries=NONE
490
491 # Installation directory options.
492 # These are left unexpanded so users can "make install exec_prefix=/foo"
493 # and all the variables that are supposed to be based on exec_prefix
494 # by default will actually change.
495 # Use braces instead of parens because sh, perl, etc. also accept them.
496 bindir='${exec_prefix}/bin'
497 sbindir='${exec_prefix}/sbin'
498 libexecdir='${exec_prefix}/libexec'
499 datadir='${prefix}/share'
500 sysconfdir='${prefix}/etc'
501 sharedstatedir='${prefix}/com'
502 localstatedir='${prefix}/var'
503 libdir='${exec_prefix}/lib'
504 includedir='${prefix}/include'
505 oldincludedir='/usr/include'
506 infodir='${prefix}/info'
507 mandir='${prefix}/man'
508
509 ac_prev=
510 for ac_option
511 do
512   # If the previous option needs an argument, assign it.
513   if test -n "$ac_prev"; then
514     eval "$ac_prev=\$ac_option"
515     ac_prev=
516     continue
517   fi
518
519   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
520
521   # Accept the important Cygnus configure options, so we can diagnose typos.
522
523   case $ac_option in
524
525   -bindir | --bindir | --bindi | --bind | --bin | --bi)
526     ac_prev=bindir ;;
527   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
528     bindir=$ac_optarg ;;
529
530   -build | --build | --buil | --bui | --bu)
531     ac_prev=build_alias ;;
532   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
533     build_alias=$ac_optarg ;;
534
535   -cache-file | --cache-file | --cache-fil | --cache-fi \
536   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
537     ac_prev=cache_file ;;
538   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
539   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
540     cache_file=$ac_optarg ;;
541
542   --config-cache | -C)
543     cache_file=config.cache ;;
544
545   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
546     ac_prev=datadir ;;
547   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
548   | --da=*)
549     datadir=$ac_optarg ;;
550
551   -disable-* | --disable-*)
552     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
553     # Reject names that are not valid shell variable names.
554     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
555       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
556    { (exit 1); exit 1; }; }
557     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
558     eval "enable_$ac_feature=no" ;;
559
560   -enable-* | --enable-*)
561     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
562     # Reject names that are not valid shell variable names.
563     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
564       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
565    { (exit 1); exit 1; }; }
566     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
567     case $ac_option in
568       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
569       *) ac_optarg=yes ;;
570     esac
571     eval "enable_$ac_feature='$ac_optarg'" ;;
572
573   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
574   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
575   | --exec | --exe | --ex)
576     ac_prev=exec_prefix ;;
577   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
578   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
579   | --exec=* | --exe=* | --ex=*)
580     exec_prefix=$ac_optarg ;;
581
582   -gas | --gas | --ga | --g)
583     # Obsolete; use --with-gas.
584     with_gas=yes ;;
585
586   -help | --help | --hel | --he | -h)
587     ac_init_help=long ;;
588   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
589     ac_init_help=recursive ;;
590   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
591     ac_init_help=short ;;
592
593   -host | --host | --hos | --ho)
594     ac_prev=host_alias ;;
595   -host=* | --host=* | --hos=* | --ho=*)
596     host_alias=$ac_optarg ;;
597
598   -includedir | --includedir | --includedi | --included | --include \
599   | --includ | --inclu | --incl | --inc)
600     ac_prev=includedir ;;
601   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
602   | --includ=* | --inclu=* | --incl=* | --inc=*)
603     includedir=$ac_optarg ;;
604
605   -infodir | --infodir | --infodi | --infod | --info | --inf)
606     ac_prev=infodir ;;
607   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
608     infodir=$ac_optarg ;;
609
610   -libdir | --libdir | --libdi | --libd)
611     ac_prev=libdir ;;
612   -libdir=* | --libdir=* | --libdi=* | --libd=*)
613     libdir=$ac_optarg ;;
614
615   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
616   | --libexe | --libex | --libe)
617     ac_prev=libexecdir ;;
618   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
619   | --libexe=* | --libex=* | --libe=*)
620     libexecdir=$ac_optarg ;;
621
622   -localstatedir | --localstatedir | --localstatedi | --localstated \
623   | --localstate | --localstat | --localsta | --localst \
624   | --locals | --local | --loca | --loc | --lo)
625     ac_prev=localstatedir ;;
626   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
627   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
628   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
629     localstatedir=$ac_optarg ;;
630
631   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
632     ac_prev=mandir ;;
633   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
634     mandir=$ac_optarg ;;
635
636   -nfp | --nfp | --nf)
637     # Obsolete; use --without-fp.
638     with_fp=no ;;
639
640   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
641   | --no-cr | --no-c | -n)
642     no_create=yes ;;
643
644   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
645   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
646     no_recursion=yes ;;
647
648   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
649   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
650   | --oldin | --oldi | --old | --ol | --o)
651     ac_prev=oldincludedir ;;
652   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
653   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
654   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
655     oldincludedir=$ac_optarg ;;
656
657   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
658     ac_prev=prefix ;;
659   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
660     prefix=$ac_optarg ;;
661
662   -program-prefix | --program-prefix | --program-prefi | --program-pref \
663   | --program-pre | --program-pr | --program-p)
664     ac_prev=program_prefix ;;
665   -program-prefix=* | --program-prefix=* | --program-prefi=* \
666   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
667     program_prefix=$ac_optarg ;;
668
669   -program-suffix | --program-suffix | --program-suffi | --program-suff \
670   | --program-suf | --program-su | --program-s)
671     ac_prev=program_suffix ;;
672   -program-suffix=* | --program-suffix=* | --program-suffi=* \
673   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
674     program_suffix=$ac_optarg ;;
675
676   -program-transform-name | --program-transform-name \
677   | --program-transform-nam | --program-transform-na \
678   | --program-transform-n | --program-transform- \
679   | --program-transform | --program-transfor \
680   | --program-transfo | --program-transf \
681   | --program-trans | --program-tran \
682   | --progr-tra | --program-tr | --program-t)
683     ac_prev=program_transform_name ;;
684   -program-transform-name=* | --program-transform-name=* \
685   | --program-transform-nam=* | --program-transform-na=* \
686   | --program-transform-n=* | --program-transform-=* \
687   | --program-transform=* | --program-transfor=* \
688   | --program-transfo=* | --program-transf=* \
689   | --program-trans=* | --program-tran=* \
690   | --progr-tra=* | --program-tr=* | --program-t=*)
691     program_transform_name=$ac_optarg ;;
692
693   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
694   | -silent | --silent | --silen | --sile | --sil)
695     silent=yes ;;
696
697   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
698     ac_prev=sbindir ;;
699   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
700   | --sbi=* | --sb=*)
701     sbindir=$ac_optarg ;;
702
703   -sharedstatedir | --sharedstatedir | --sharedstatedi \
704   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
705   | --sharedst | --shareds | --shared | --share | --shar \
706   | --sha | --sh)
707     ac_prev=sharedstatedir ;;
708   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
709   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
710   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
711   | --sha=* | --sh=*)
712     sharedstatedir=$ac_optarg ;;
713
714   -site | --site | --sit)
715     ac_prev=site ;;
716   -site=* | --site=* | --sit=*)
717     site=$ac_optarg ;;
718
719   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
720     ac_prev=srcdir ;;
721   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
722     srcdir=$ac_optarg ;;
723
724   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
725   | --syscon | --sysco | --sysc | --sys | --sy)
726     ac_prev=sysconfdir ;;
727   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
728   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
729     sysconfdir=$ac_optarg ;;
730
731   -target | --target | --targe | --targ | --tar | --ta | --t)
732     ac_prev=target_alias ;;
733   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
734     target_alias=$ac_optarg ;;
735
736   -v | -verbose | --verbose | --verbos | --verbo | --verb)
737     verbose=yes ;;
738
739   -version | --version | --versio | --versi | --vers | -V)
740     ac_init_version=: ;;
741
742   -with-* | --with-*)
743     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
744     # Reject names that are not valid shell variable names.
745     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
746       { echo "$as_me: error: invalid package name: $ac_package" >&2
747    { (exit 1); exit 1; }; }
748     ac_package=`echo $ac_package| sed 's/-/_/g'`
749     case $ac_option in
750       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
751       *) ac_optarg=yes ;;
752     esac
753     eval "with_$ac_package='$ac_optarg'" ;;
754
755   -without-* | --without-*)
756     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
757     # Reject names that are not valid shell variable names.
758     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
759       { echo "$as_me: error: invalid package name: $ac_package" >&2
760    { (exit 1); exit 1; }; }
761     ac_package=`echo $ac_package | sed 's/-/_/g'`
762     eval "with_$ac_package=no" ;;
763
764   --x)
765     # Obsolete; use --with-x.
766     with_x=yes ;;
767
768   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
769   | --x-incl | --x-inc | --x-in | --x-i)
770     ac_prev=x_includes ;;
771   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
772   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
773     x_includes=$ac_optarg ;;
774
775   -x-libraries | --x-libraries | --x-librarie | --x-librari \
776   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
777     ac_prev=x_libraries ;;
778   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
779   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
780     x_libraries=$ac_optarg ;;
781
782   -*) { echo "$as_me: error: unrecognized option: $ac_option
783 Try \`$0 --help' for more information." >&2
784    { (exit 1); exit 1; }; }
785     ;;
786
787   *=*)
788     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
789     # Reject names that are not valid shell variable names.
790     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
791       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
792    { (exit 1); exit 1; }; }
793     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
794     eval "$ac_envvar='$ac_optarg'"
795     export $ac_envvar ;;
796
797   *)
798     # FIXME: should be removed in autoconf 3.0.
799     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
800     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
801       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
802     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
803     ;;
804
805   esac
806 done
807
808 if test -n "$ac_prev"; then
809   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
810   { echo "$as_me: error: missing argument to $ac_option" >&2
811    { (exit 1); exit 1; }; }
812 fi
813
814 # Be sure to have absolute paths.
815 for ac_var in exec_prefix prefix
816 do
817   eval ac_val=$`echo $ac_var`
818   case $ac_val in
819     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
820     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
821    { (exit 1); exit 1; }; };;
822   esac
823 done
824
825 # Be sure to have absolute paths.
826 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
827               localstatedir libdir includedir oldincludedir infodir mandir
828 do
829   eval ac_val=$`echo $ac_var`
830   case $ac_val in
831     [\\/$]* | ?:[\\/]* ) ;;
832     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
833    { (exit 1); exit 1; }; };;
834   esac
835 done
836
837 # There might be people who depend on the old broken behavior: `$host'
838 # used to hold the argument of --host etc.
839 # FIXME: To remove some day.
840 build=$build_alias
841 host=$host_alias
842 target=$target_alias
843
844 # FIXME: To remove some day.
845 if test "x$host_alias" != x; then
846   if test "x$build_alias" = x; then
847     cross_compiling=maybe
848     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
849     If a cross compiler is detected then cross compile mode will be used." >&2
850   elif test "x$build_alias" != "x$host_alias"; then
851     cross_compiling=yes
852   fi
853 fi
854
855 ac_tool_prefix=
856 test -n "$host_alias" && ac_tool_prefix=$host_alias-
857
858 test "$silent" = yes && exec 6>/dev/null
859
860
861 # Find the source files, if location was not specified.
862 if test -z "$srcdir"; then
863   ac_srcdir_defaulted=yes
864   # Try the directory containing this script, then its parent.
865   ac_confdir=`(dirname "$0") 2>/dev/null ||
866 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
867          X"$0" : 'X\(//\)[^/]' \| \
868          X"$0" : 'X\(//\)$' \| \
869          X"$0" : 'X\(/\)' \| \
870          .     : '\(.\)' 2>/dev/null ||
871 echo X"$0" |
872     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
873           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
874           /^X\(\/\/\)$/{ s//\1/; q; }
875           /^X\(\/\).*/{ s//\1/; q; }
876           s/.*/./; q'`
877   srcdir=$ac_confdir
878   if test ! -r $srcdir/$ac_unique_file; then
879     srcdir=..
880   fi
881 else
882   ac_srcdir_defaulted=no
883 fi
884 if test ! -r $srcdir/$ac_unique_file; then
885   if test "$ac_srcdir_defaulted" = yes; then
886     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
887    { (exit 1); exit 1; }; }
888   else
889     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
890    { (exit 1); exit 1; }; }
891   fi
892 fi
893 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
894   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
895    { (exit 1); exit 1; }; }
896 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
897 ac_env_build_alias_set=${build_alias+set}
898 ac_env_build_alias_value=$build_alias
899 ac_cv_env_build_alias_set=${build_alias+set}
900 ac_cv_env_build_alias_value=$build_alias
901 ac_env_host_alias_set=${host_alias+set}
902 ac_env_host_alias_value=$host_alias
903 ac_cv_env_host_alias_set=${host_alias+set}
904 ac_cv_env_host_alias_value=$host_alias
905 ac_env_target_alias_set=${target_alias+set}
906 ac_env_target_alias_value=$target_alias
907 ac_cv_env_target_alias_set=${target_alias+set}
908 ac_cv_env_target_alias_value=$target_alias
909 ac_env_CC_set=${CC+set}
910 ac_env_CC_value=$CC
911 ac_cv_env_CC_set=${CC+set}
912 ac_cv_env_CC_value=$CC
913 ac_env_CFLAGS_set=${CFLAGS+set}
914 ac_env_CFLAGS_value=$CFLAGS
915 ac_cv_env_CFLAGS_set=${CFLAGS+set}
916 ac_cv_env_CFLAGS_value=$CFLAGS
917 ac_env_LDFLAGS_set=${LDFLAGS+set}
918 ac_env_LDFLAGS_value=$LDFLAGS
919 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
920 ac_cv_env_LDFLAGS_value=$LDFLAGS
921 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
922 ac_env_CPPFLAGS_value=$CPPFLAGS
923 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
924 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
925 ac_env_CPP_set=${CPP+set}
926 ac_env_CPP_value=$CPP
927 ac_cv_env_CPP_set=${CPP+set}
928 ac_cv_env_CPP_value=$CPP
929
930 #
931 # Report the --help message.
932 #
933 if test "$ac_init_help" = "long"; then
934   # Omit some internal or obsolete options to make the list less imposing.
935   # This message is too long to be a string in the A/UX 3.1 sh.
936   cat <<_ACEOF
937 \`configure' configures this package to adapt to many kinds of systems.
938
939 Usage: $0 [OPTION]... [VAR=VALUE]...
940
941 To assign environment variables (e.g., CC, CFLAGS...), specify them as
942 VAR=VALUE.  See below for descriptions of some of the useful variables.
943
944 Defaults for the options are specified in brackets.
945
946 Configuration:
947   -h, --help              display this help and exit
948       --help=short        display options specific to this package
949       --help=recursive    display the short help of all the included packages
950   -V, --version           display version information and exit
951   -q, --quiet, --silent   do not print \`checking...' messages
952       --cache-file=FILE   cache test results in FILE [disabled]
953   -C, --config-cache      alias for \`--cache-file=config.cache'
954   -n, --no-create         do not create output files
955       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
956
957 _ACEOF
958
959   cat <<_ACEOF
960 Installation directories:
961   --prefix=PREFIX         install architecture-independent files in PREFIX
962                           [$ac_default_prefix]
963   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
964                           [PREFIX]
965
966 By default, \`make install' will install all the files in
967 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
968 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
969 for instance \`--prefix=\$HOME'.
970
971 For better control, use the options below.
972
973 Fine tuning of the installation directories:
974   --bindir=DIR           user executables [EPREFIX/bin]
975   --sbindir=DIR          system admin executables [EPREFIX/sbin]
976   --libexecdir=DIR       program executables [EPREFIX/libexec]
977   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
978   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
979   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
980   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
981   --libdir=DIR           object code libraries [EPREFIX/lib]
982   --includedir=DIR       C header files [PREFIX/include]
983   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
984   --infodir=DIR          info documentation [PREFIX/info]
985   --mandir=DIR           man documentation [PREFIX/man]
986 _ACEOF
987
988   cat <<\_ACEOF
989
990 Program names:
991   --program-prefix=PREFIX            prepend PREFIX to installed program names
992   --program-suffix=SUFFIX            append SUFFIX to installed program names
993   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
994
995 System types:
996   --build=BUILD     configure for building on BUILD [guessed]
997   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
998   --target=TARGET   configure for building compilers for TARGET [HOST]
999 _ACEOF
1000 fi
1001
1002 if test -n "$ac_init_help"; then
1003
1004   cat <<\_ACEOF
1005
1006 Optional Features:
1007   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1008   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1009   --enable-debug          enable debugging [yes]
1010   --enable-dynamic        enable linking built binaries with dynamic libs [no]
1011   --enable-syslog         enable syslog support [auto]
1012   --enable-proctitle      enable proctitle support [yes]
1013   --enable-ipv6           enable IPv6 support [auto]
1014   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]
1015
1016 SLAPD (Standalone LDAP Daemon) Options:
1017   --enable-slapd          enable building slapd [yes]
1018     --enable-aci          enable per-object ACIs (experimental) [no]
1019     --enable-cleartext    enable cleartext passwords [yes]
1020     --enable-crypt        enable crypt(3) passwords [no]
1021     --enable-lmpasswd     enable LAN Manager passwords [no]
1022     --enable-spasswd      enable (Cyrus) SASL password verification [no]
1023     --enable-modules      enable dynamic module support [no]
1024     --enable-rewrite      enable DN rewriting in back-ldap and rwm overlay [auto]
1025     --enable-rlookups     enable reverse lookups of client hostnames [no]
1026     --enable-slapi        enable SLAPI support (experimental) [no]
1027     --enable-slp          enable SLPv2 support [no]
1028     --enable-wrappers     enable tcp wrapper support [no]
1029
1030 SLAPD Backend Options:
1031     --enable-backends     enable all available backends no|yes|mod
1032     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]
1033     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]
1034     --enable-hdb          enable Hierarchical DB backend no|yes|mod [yes]
1035     --enable-ldap         enable ldap backend no|yes|mod [no]
1036     --enable-ldbm         enable ldbm backend no|yes|mod [no]
1037       --enable-ldbm-api   use LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]
1038       --enable-ldbm-type  use LDBM type auto|btree|hash [auto]
1039     --enable-meta         enable metadirectory backend no|yes|mod [no]
1040     --enable-monitor      enable monitor backend no|yes|mod [yes]
1041     --enable-null         enable null backend no|yes|mod [no]
1042     --enable-passwd       enable passwd backend no|yes|mod [no]
1043     --enable-perl         enable perl backend no|yes|mod [no]
1044     --enable-relay        enable relay backend no|yes|mod [yes]
1045     --enable-shell        enable shell backend no|yes|mod [no]
1046     --enable-sql          enable sql backend no|yes|mod [no]
1047
1048 SLAPD Overlay Options:
1049     --enable-overlays     enable all available overlays no|yes|mod
1050     --enable-accesslog    In-Directory Access Logging overlay no|yes|mod [no]
1051     --enable-auditlog     Audit Logging overlay no|yes|mod [no]
1052     --enable-denyop       Deny Operation overlay no|yes|mod [no]
1053     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]
1054     --enable-dynlist      Dynamic List overlay no|yes|mod [no]
1055     --enable-lastmod      Last Modification overlay no|yes|mod [no]
1056     --enable-ppolicy      Password Policy overlay no|yes|mod [no]
1057     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]
1058     --enable-refint       Referential Integrity overlay no|yes|mod [no]
1059     --enable-retcode      Return Code testing overlay no|yes|mod [no]
1060     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]
1061     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [yes]
1062     --enable-translucent  Translucent Proxy overlay no|yes|mod [no]
1063     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]
1064     --enable-valsort      Value Sorting overlay no|yes|mod [no]
1065
1066 SLURPD (Replication Daemon) Options:
1067   --enable-slurpd         enable building slurpd [auto]
1068
1069 Library Generation & Linking Options
1070   --enable-static[=PKGS]
1071                           build static libraries [default=yes]
1072   --enable-shared[=PKGS]
1073                           build shared libraries [default=yes]
1074   --enable-fast-install[=PKGS]
1075                           optimize for fast installation [default=yes]
1076   --disable-dependency-tracking  speeds up one-time build
1077   --enable-dependency-tracking   do not reject slow dependency extractors
1078   --disable-libtool-lock  avoid locking (might break parallel builds)
1079
1080 Optional Packages:
1081   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1082   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1083   --with-subdir=DIR       change default subdirectory used for installs
1084   --with-cyrus-sasl       with Cyrus SASL support [auto]
1085   --with-fetch            with fetch(3) URL support [auto]
1086   --with-threads          with threads [auto]
1087   --with-tls              with TLS/SSL support [auto]
1088   --with-yielding-select  with implicitly yielding select [auto]
1089   --with-mp               with multiple precision statistics auto|longlong|long|bignum|gmp [auto]
1090   --with-odbc             with specific ODBC support iodbc|unixodbc|auto [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-2007 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-mp
2431
2432 # Check whether --with-mp or --without-mp was given.
2433 if test "${with_mp+set}" = set; then
2434   withval="$with_mp"
2435
2436         ol_arg=invalid
2437         for ol_val in auto longlong long 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-mp" >&5
2444 echo "$as_me: error: bad value $withval for --with-mp" >&2;}
2445    { (exit 1); exit 1; }; }
2446         fi
2447         ol_with_mp="$ol_arg"
2448
2449 else
2450         ol_with_mp="auto"
2451 fi; # end --with-mp
2452
2453 # OpenLDAP --with-odbc
2454
2455 # Check whether --with-odbc or --without-odbc was given.
2456 if test "${with_odbc+set}" = set; then
2457   withval="$with_odbc"
2458
2459         ol_arg=invalid
2460         for ol_val in auto iodbc unixodbc  ; do
2461                 if test "$withval" = "$ol_val" ; then
2462                         ol_arg="$ol_val"
2463                 fi
2464         done
2465         if test "$ol_arg" = "invalid" ; then
2466                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-odbc" >&5
2467 echo "$as_me: error: bad value $withval for --with-odbc" >&2;}
2468    { (exit 1); exit 1; }; }
2469         fi
2470         ol_with_odbc="$ol_arg"
2471
2472 else
2473         ol_with_odbc="auto"
2474 fi; # end --with-odbc
2475
2476
2477
2478 # Check whether --enable-xxslapdoptions or --disable-xxslapdoptions was given.
2479 if test "${enable_xxslapdoptions+set}" = set; then
2480   enableval="$enable_xxslapdoptions"
2481
2482 fi;
2483 # OpenLDAP --enable-slapd
2484
2485         # Check whether --enable-slapd or --disable-slapd was given.
2486 if test "${enable_slapd+set}" = set; then
2487   enableval="$enable_slapd"
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-slapd" >&5
2497 echo "$as_me: error: bad value $enableval for --enable-slapd" >&2;}
2498    { (exit 1); exit 1; }; }
2499         fi
2500         ol_enable_slapd="$ol_arg"
2501
2502 else
2503         ol_enable_slapd=yes
2504 fi;
2505 # end --enable-slapd
2506 # OpenLDAP --enable-aci
2507
2508         # Check whether --enable-aci or --disable-aci was given.
2509 if test "${enable_aci+set}" = set; then
2510   enableval="$enable_aci"
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-aci" >&5
2520 echo "$as_me: error: bad value $enableval for --enable-aci" >&2;}
2521    { (exit 1); exit 1; }; }
2522         fi
2523         ol_enable_aci="$ol_arg"
2524
2525 else
2526         ol_enable_aci=no
2527 fi;
2528 # end --enable-aci
2529 # OpenLDAP --enable-cleartext
2530
2531         # Check whether --enable-cleartext or --disable-cleartext was given.
2532 if test "${enable_cleartext+set}" = set; then
2533   enableval="$enable_cleartext"
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-cleartext" >&5
2543 echo "$as_me: error: bad value $enableval for --enable-cleartext" >&2;}
2544    { (exit 1); exit 1; }; }
2545         fi
2546         ol_enable_cleartext="$ol_arg"
2547
2548 else
2549         ol_enable_cleartext=yes
2550 fi;
2551 # end --enable-cleartext
2552 # OpenLDAP --enable-crypt
2553
2554         # Check whether --enable-crypt or --disable-crypt was given.
2555 if test "${enable_crypt+set}" = set; then
2556   enableval="$enable_crypt"
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-crypt" >&5
2566 echo "$as_me: error: bad value $enableval for --enable-crypt" >&2;}
2567    { (exit 1); exit 1; }; }
2568         fi
2569         ol_enable_crypt="$ol_arg"
2570
2571 else
2572         ol_enable_crypt=no
2573 fi;
2574 # end --enable-crypt
2575 # OpenLDAP --enable-lmpasswd
2576
2577         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
2578 if test "${enable_lmpasswd+set}" = set; then
2579   enableval="$enable_lmpasswd"
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-lmpasswd" >&5
2589 echo "$as_me: error: bad value $enableval for --enable-lmpasswd" >&2;}
2590    { (exit 1); exit 1; }; }
2591         fi
2592         ol_enable_lmpasswd="$ol_arg"
2593
2594 else
2595         ol_enable_lmpasswd=no
2596 fi;
2597 # end --enable-lmpasswd
2598 # OpenLDAP --enable-spasswd
2599
2600         # Check whether --enable-spasswd or --disable-spasswd was given.
2601 if test "${enable_spasswd+set}" = set; then
2602   enableval="$enable_spasswd"
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-spasswd" >&5
2612 echo "$as_me: error: bad value $enableval for --enable-spasswd" >&2;}
2613    { (exit 1); exit 1; }; }
2614         fi
2615         ol_enable_spasswd="$ol_arg"
2616
2617 else
2618         ol_enable_spasswd=no
2619 fi;
2620 # end --enable-spasswd
2621 # OpenLDAP --enable-modules
2622
2623         # Check whether --enable-modules or --disable-modules was given.
2624 if test "${enable_modules+set}" = set; then
2625   enableval="$enable_modules"
2626
2627         ol_arg=invalid
2628         for ol_val in auto yes no ; do
2629                 if test "$enableval" = "$ol_val" ; then
2630                         ol_arg="$ol_val"
2631                 fi
2632         done
2633         if test "$ol_arg" = "invalid" ; then
2634                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-modules" >&5
2635 echo "$as_me: error: bad value $enableval for --enable-modules" >&2;}
2636    { (exit 1); exit 1; }; }
2637         fi
2638         ol_enable_modules="$ol_arg"
2639
2640 else
2641         ol_enable_modules=no
2642 fi;
2643 # end --enable-modules
2644 ol_enable_multimaster=${ol_enable_multimaster-no}
2645 # OpenLDAP --enable-rewrite
2646
2647         # Check whether --enable-rewrite or --disable-rewrite was given.
2648 if test "${enable_rewrite+set}" = set; then
2649   enableval="$enable_rewrite"
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-rewrite" >&5
2659 echo "$as_me: error: bad value $enableval for --enable-rewrite" >&2;}
2660    { (exit 1); exit 1; }; }
2661         fi
2662         ol_enable_rewrite="$ol_arg"
2663
2664 else
2665         ol_enable_rewrite=auto
2666 fi;
2667 # end --enable-rewrite
2668 # OpenLDAP --enable-rlookups
2669
2670         # Check whether --enable-rlookups or --disable-rlookups was given.
2671 if test "${enable_rlookups+set}" = set; then
2672   enableval="$enable_rlookups"
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-rlookups" >&5
2682 echo "$as_me: error: bad value $enableval for --enable-rlookups" >&2;}
2683    { (exit 1); exit 1; }; }
2684         fi
2685         ol_enable_rlookups="$ol_arg"
2686
2687 else
2688         ol_enable_rlookups=no
2689 fi;
2690 # end --enable-rlookups
2691 # OpenLDAP --enable-slapi
2692
2693         # Check whether --enable-slapi or --disable-slapi was given.
2694 if test "${enable_slapi+set}" = set; then
2695   enableval="$enable_slapi"
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-slapi" >&5
2705 echo "$as_me: error: bad value $enableval for --enable-slapi" >&2;}
2706    { (exit 1); exit 1; }; }
2707         fi
2708         ol_enable_slapi="$ol_arg"
2709
2710 else
2711         ol_enable_slapi=no
2712 fi;
2713 # end --enable-slapi
2714 # OpenLDAP --enable-slp
2715
2716         # Check whether --enable-slp or --disable-slp was given.
2717 if test "${enable_slp+set}" = set; then
2718   enableval="$enable_slp"
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-slp" >&5
2728 echo "$as_me: error: bad value $enableval for --enable-slp" >&2;}
2729    { (exit 1); exit 1; }; }
2730         fi
2731         ol_enable_slp="$ol_arg"
2732
2733 else
2734         ol_enable_slp=no
2735 fi;
2736 # end --enable-slp
2737 # OpenLDAP --enable-wrappers
2738
2739         # Check whether --enable-wrappers or --disable-wrappers was given.
2740 if test "${enable_wrappers+set}" = set; then
2741   enableval="$enable_wrappers"
2742
2743         ol_arg=invalid
2744         for ol_val in auto yes no ; do
2745                 if test "$enableval" = "$ol_val" ; then
2746                         ol_arg="$ol_val"
2747                 fi
2748         done
2749         if test "$ol_arg" = "invalid" ; then
2750                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-wrappers" >&5
2751 echo "$as_me: error: bad value $enableval for --enable-wrappers" >&2;}
2752    { (exit 1); exit 1; }; }
2753         fi
2754         ol_enable_wrappers="$ol_arg"
2755
2756 else
2757         ol_enable_wrappers=no
2758 fi;
2759 # end --enable-wrappers
2760
2761 Backends="bdb \
2762         dnssrv \
2763         hdb \
2764         ldap \
2765         ldbm \
2766         meta \
2767         monitor \
2768         null \
2769         passwd \
2770         perl \
2771         relay \
2772         shell \
2773         sql"
2774
2775 # Check whether --enable-xxslapbackends or --disable-xxslapbackends was given.
2776 if test "${enable_xxslapbackends+set}" = set; then
2777   enableval="$enable_xxslapbackends"
2778
2779 fi;
2780
2781 # OpenLDAP --enable-backends
2782
2783         # Check whether --enable-backends or --disable-backends was given.
2784 if test "${enable_backends+set}" = set; then
2785   enableval="$enable_backends"
2786
2787         ol_arg=invalid
2788         for ol_val in no yes mod ; do
2789                 if test "$enableval" = "$ol_val" ; then
2790                         ol_arg="$ol_val"
2791                 fi
2792         done
2793         if test "$ol_arg" = "invalid" ; then
2794                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-backends" >&5
2795 echo "$as_me: error: bad value $enableval for --enable-backends" >&2;}
2796    { (exit 1); exit 1; }; }
2797         fi
2798         ol_enable_backends="$ol_arg"
2799
2800 fi;
2801 # end --enable-backends
2802 # OpenLDAP --enable-bdb
2803
2804         # Check whether --enable-bdb or --disable-bdb was given.
2805 if test "${enable_bdb+set}" = set; then
2806   enableval="$enable_bdb"
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-bdb" >&5
2816 echo "$as_me: error: bad value $enableval for --enable-bdb" >&2;}
2817    { (exit 1); exit 1; }; }
2818         fi
2819         ol_enable_bdb="$ol_arg"
2820
2821 else
2822         ol_enable_bdb=${ol_enable_backends:-yes}
2823 fi;
2824 # end --enable-bdb
2825 # OpenLDAP --enable-dnssrv
2826
2827         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2828 if test "${enable_dnssrv+set}" = set; then
2829   enableval="$enable_dnssrv"
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-dnssrv" >&5
2839 echo "$as_me: error: bad value $enableval for --enable-dnssrv" >&2;}
2840    { (exit 1); exit 1; }; }
2841         fi
2842         ol_enable_dnssrv="$ol_arg"
2843
2844 else
2845         ol_enable_dnssrv=${ol_enable_backends:-no}
2846 fi;
2847 # end --enable-dnssrv
2848 # OpenLDAP --enable-hdb
2849
2850         # Check whether --enable-hdb or --disable-hdb was given.
2851 if test "${enable_hdb+set}" = set; then
2852   enableval="$enable_hdb"
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-hdb" >&5
2862 echo "$as_me: error: bad value $enableval for --enable-hdb" >&2;}
2863    { (exit 1); exit 1; }; }
2864         fi
2865         ol_enable_hdb="$ol_arg"
2866
2867 else
2868         ol_enable_hdb=${ol_enable_backends:-yes}
2869 fi;
2870 # end --enable-hdb
2871 # OpenLDAP --enable-ldap
2872
2873         # Check whether --enable-ldap or --disable-ldap was given.
2874 if test "${enable_ldap+set}" = set; then
2875   enableval="$enable_ldap"
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-ldap" >&5
2885 echo "$as_me: error: bad value $enableval for --enable-ldap" >&2;}
2886    { (exit 1); exit 1; }; }
2887         fi
2888         ol_enable_ldap="$ol_arg"
2889
2890 else
2891         ol_enable_ldap=${ol_enable_backends:-no}
2892 fi;
2893 # end --enable-ldap
2894 # OpenLDAP --enable-ldbm
2895
2896         # Check whether --enable-ldbm or --disable-ldbm was given.
2897 if test "${enable_ldbm+set}" = set; then
2898   enableval="$enable_ldbm"
2899
2900         ol_arg=invalid
2901         for ol_val in no yes mod ; do
2902                 if test "$enableval" = "$ol_val" ; then
2903                         ol_arg="$ol_val"
2904                 fi
2905         done
2906         if test "$ol_arg" = "invalid" ; then
2907                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldbm" >&5
2908 echo "$as_me: error: bad value $enableval for --enable-ldbm" >&2;}
2909    { (exit 1); exit 1; }; }
2910         fi
2911         ol_enable_ldbm="$ol_arg"
2912
2913 else
2914         ol_enable_ldbm=${ol_enable_backends:-no}
2915 fi;
2916 # end --enable-ldbm
2917
2918 # Check whether --with-ldbm_api or --without-ldbm_api was given.
2919 if test "${with_ldbm_api+set}" = set; then
2920   withval="$with_ldbm_api"
2921
2922         { echo "$as_me:$LINENO: WARNING: Please use --enable-ldbm-api instead of --with-ldbm-api" >&5
2923 echo "$as_me: WARNING: Please use --enable-ldbm-api instead of --with-ldbm-api" >&2;}
2924         enable_ldbm_api="$with_ldbm_api"
2925 fi;
2926 # OpenLDAP --enable-ldbm_api
2927
2928         # Check whether --enable-ldbm_api or --disable-ldbm_api was given.
2929 if test "${enable_ldbm_api+set}" = set; then
2930   enableval="$enable_ldbm_api"
2931
2932         ol_arg=invalid
2933         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2934                 if test "$enableval" = "$ol_val" ; then
2935                         ol_arg="$ol_val"
2936                 fi
2937         done
2938         if test "$ol_arg" = "invalid" ; then
2939                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldbm_api" >&5
2940 echo "$as_me: error: bad value $enableval for --enable-ldbm_api" >&2;}
2941    { (exit 1); exit 1; }; }
2942         fi
2943         ol_enable_ldbm_api="$ol_arg"
2944
2945 else
2946         ol_enable_ldbm_api=auto
2947 fi;
2948 # end --enable-ldbm_api
2949
2950
2951 # Check whether --with-ldbm_type or --without-ldbm_type was given.
2952 if test "${with_ldbm_type+set}" = set; then
2953   withval="$with_ldbm_type"
2954
2955         { echo "$as_me:$LINENO: WARNING: Please use --enable-ldbm-type instead of --with-ldbm-type" >&5
2956 echo "$as_me: WARNING: Please use --enable-ldbm-type instead of --with-ldbm-type" >&2;}
2957         enable_ldbm_type="$with_ldbm_type"
2958 fi;
2959 # OpenLDAP --enable-ldbm_type
2960
2961         # Check whether --enable-ldbm_type or --disable-ldbm_type was given.
2962 if test "${enable_ldbm_type+set}" = set; then
2963   enableval="$enable_ldbm_type"
2964
2965         ol_arg=invalid
2966         for ol_val in auto btree hash ; do
2967                 if test "$enableval" = "$ol_val" ; then
2968                         ol_arg="$ol_val"
2969                 fi
2970         done
2971         if test "$ol_arg" = "invalid" ; then
2972                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldbm_type" >&5
2973 echo "$as_me: error: bad value $enableval for --enable-ldbm_type" >&2;}
2974    { (exit 1); exit 1; }; }
2975         fi
2976         ol_enable_ldbm_type="$ol_arg"
2977
2978 else
2979         ol_enable_ldbm_type=auto
2980 fi;
2981 # end --enable-ldbm_type
2982
2983 # OpenLDAP --enable-meta
2984
2985         # Check whether --enable-meta or --disable-meta was given.
2986 if test "${enable_meta+set}" = set; then
2987   enableval="$enable_meta"
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-meta" >&5
2997 echo "$as_me: error: bad value $enableval for --enable-meta" >&2;}
2998    { (exit 1); exit 1; }; }
2999         fi
3000         ol_enable_meta="$ol_arg"
3001
3002 else
3003         ol_enable_meta=${ol_enable_backends:-no}
3004 fi;
3005 # end --enable-meta
3006 # OpenLDAP --enable-monitor
3007
3008         # Check whether --enable-monitor or --disable-monitor was given.
3009 if test "${enable_monitor+set}" = set; then
3010   enableval="$enable_monitor"
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-monitor" >&5
3020 echo "$as_me: error: bad value $enableval for --enable-monitor" >&2;}
3021    { (exit 1); exit 1; }; }
3022         fi
3023         ol_enable_monitor="$ol_arg"
3024
3025 else
3026         ol_enable_monitor=${ol_enable_backends:-yes}
3027 fi;
3028 # end --enable-monitor
3029 # OpenLDAP --enable-null
3030
3031         # Check whether --enable-null or --disable-null was given.
3032 if test "${enable_null+set}" = set; then
3033   enableval="$enable_null"
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-null" >&5
3043 echo "$as_me: error: bad value $enableval for --enable-null" >&2;}
3044    { (exit 1); exit 1; }; }
3045         fi
3046         ol_enable_null="$ol_arg"
3047
3048 else
3049         ol_enable_null=${ol_enable_backends:-no}
3050 fi;
3051 # end --enable-null
3052 # OpenLDAP --enable-passwd
3053
3054         # Check whether --enable-passwd or --disable-passwd was given.
3055 if test "${enable_passwd+set}" = set; then
3056   enableval="$enable_passwd"
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-passwd" >&5
3066 echo "$as_me: error: bad value $enableval for --enable-passwd" >&2;}
3067    { (exit 1); exit 1; }; }
3068         fi
3069         ol_enable_passwd="$ol_arg"
3070
3071 else
3072         ol_enable_passwd=${ol_enable_backends:-no}
3073 fi;
3074 # end --enable-passwd
3075 # OpenLDAP --enable-perl
3076
3077         # Check whether --enable-perl or --disable-perl was given.
3078 if test "${enable_perl+set}" = set; then
3079   enableval="$enable_perl"
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-perl" >&5
3089 echo "$as_me: error: bad value $enableval for --enable-perl" >&2;}
3090    { (exit 1); exit 1; }; }
3091         fi
3092         ol_enable_perl="$ol_arg"
3093
3094 else
3095         ol_enable_perl=${ol_enable_backends:-no}
3096 fi;
3097 # end --enable-perl
3098 # OpenLDAP --enable-relay
3099
3100         # Check whether --enable-relay or --disable-relay was given.
3101 if test "${enable_relay+set}" = set; then
3102   enableval="$enable_relay"
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-relay" >&5
3112 echo "$as_me: error: bad value $enableval for --enable-relay" >&2;}
3113    { (exit 1); exit 1; }; }
3114         fi
3115         ol_enable_relay="$ol_arg"
3116
3117 else
3118         ol_enable_relay=${ol_enable_backends:-yes}
3119 fi;
3120 # end --enable-relay
3121 # OpenLDAP --enable-shell
3122
3123         # Check whether --enable-shell or --disable-shell was given.
3124 if test "${enable_shell+set}" = set; then
3125   enableval="$enable_shell"
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-shell" >&5
3135 echo "$as_me: error: bad value $enableval for --enable-shell" >&2;}
3136    { (exit 1); exit 1; }; }
3137         fi
3138         ol_enable_shell="$ol_arg"
3139
3140 else
3141         ol_enable_shell=${ol_enable_backends:-no}
3142 fi;
3143 # end --enable-shell
3144 # OpenLDAP --enable-sql
3145
3146         # Check whether --enable-sql or --disable-sql was given.
3147 if test "${enable_sql+set}" = set; then
3148   enableval="$enable_sql"
3149
3150         ol_arg=invalid
3151         for ol_val in no yes mod ; do
3152                 if test "$enableval" = "$ol_val" ; then
3153                         ol_arg="$ol_val"
3154                 fi
3155         done
3156         if test "$ol_arg" = "invalid" ; then
3157                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-sql" >&5
3158 echo "$as_me: error: bad value $enableval for --enable-sql" >&2;}
3159    { (exit 1); exit 1; }; }
3160         fi
3161         ol_enable_sql="$ol_arg"
3162
3163 else
3164         ol_enable_sql=${ol_enable_backends:-no}
3165 fi;
3166 # end --enable-sql
3167
3168 Overlays="accesslog \
3169         auditlog \
3170         denyop \
3171         dyngroup \
3172         dynlist \
3173         lastmod \
3174         ppolicy \
3175         proxycache \
3176         refint \
3177         retcode \
3178         rwm \
3179         syncprov \
3180         translucent \
3181         unique \
3182         valsort"
3183
3184 # Check whether --enable-xxslapoverlays or --disable-xxslapoverlays was given.
3185 if test "${enable_xxslapoverlays+set}" = set; then
3186   enableval="$enable_xxslapoverlays"
3187
3188 fi;
3189
3190 # OpenLDAP --enable-overlays
3191
3192         # Check whether --enable-overlays or --disable-overlays was given.
3193 if test "${enable_overlays+set}" = set; then
3194   enableval="$enable_overlays"
3195
3196         ol_arg=invalid
3197         for ol_val in no yes mod ; do
3198                 if test "$enableval" = "$ol_val" ; then
3199                         ol_arg="$ol_val"
3200                 fi
3201         done
3202         if test "$ol_arg" = "invalid" ; then
3203                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-overlays" >&5
3204 echo "$as_me: error: bad value $enableval for --enable-overlays" >&2;}
3205    { (exit 1); exit 1; }; }
3206         fi
3207         ol_enable_overlays="$ol_arg"
3208
3209 fi;
3210 # end --enable-overlays
3211 # OpenLDAP --enable-accesslog
3212
3213         # Check whether --enable-accesslog or --disable-accesslog was given.
3214 if test "${enable_accesslog+set}" = set; then
3215   enableval="$enable_accesslog"
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-accesslog" >&5
3225 echo "$as_me: error: bad value $enableval for --enable-accesslog" >&2;}
3226    { (exit 1); exit 1; }; }
3227         fi
3228         ol_enable_accesslog="$ol_arg"
3229
3230 else
3231         ol_enable_accesslog=${ol_enable_overlays:-no}
3232 fi;
3233 # end --enable-accesslog
3234
3235 # OpenLDAP --enable-auditlog
3236
3237         # Check whether --enable-auditlog or --disable-auditlog was given.
3238 if test "${enable_auditlog+set}" = set; then
3239   enableval="$enable_auditlog"
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-auditlog" >&5
3249 echo "$as_me: error: bad value $enableval for --enable-auditlog" >&2;}
3250    { (exit 1); exit 1; }; }
3251         fi
3252         ol_enable_auditlog="$ol_arg"
3253
3254 else
3255         ol_enable_auditlog=${ol_enable_overlays:-no}
3256 fi;
3257 # end --enable-auditlog
3258
3259 # OpenLDAP --enable-denyop
3260
3261         # Check whether --enable-denyop or --disable-denyop was given.
3262 if test "${enable_denyop+set}" = set; then
3263   enableval="$enable_denyop"
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-denyop" >&5
3273 echo "$as_me: error: bad value $enableval for --enable-denyop" >&2;}
3274    { (exit 1); exit 1; }; }
3275         fi
3276         ol_enable_denyop="$ol_arg"
3277
3278 else
3279         ol_enable_denyop=${ol_enable_overlays:-no}
3280 fi;
3281 # end --enable-denyop
3282
3283 # OpenLDAP --enable-dyngroup
3284
3285         # Check whether --enable-dyngroup or --disable-dyngroup was given.
3286 if test "${enable_dyngroup+set}" = set; then
3287   enableval="$enable_dyngroup"
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-dyngroup" >&5
3297 echo "$as_me: error: bad value $enableval for --enable-dyngroup" >&2;}
3298    { (exit 1); exit 1; }; }
3299         fi
3300         ol_enable_dyngroup="$ol_arg"
3301
3302 else
3303         ol_enable_dyngroup=${ol_enable_overlays:-no}
3304 fi;
3305 # end --enable-dyngroup
3306
3307 # OpenLDAP --enable-dynlist
3308
3309         # Check whether --enable-dynlist or --disable-dynlist was given.
3310 if test "${enable_dynlist+set}" = set; then
3311   enableval="$enable_dynlist"
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-dynlist" >&5
3321 echo "$as_me: error: bad value $enableval for --enable-dynlist" >&2;}
3322    { (exit 1); exit 1; }; }
3323         fi
3324         ol_enable_dynlist="$ol_arg"
3325
3326 else
3327         ol_enable_dynlist=${ol_enable_overlays:-no}
3328 fi;
3329 # end --enable-dynlist
3330
3331 # OpenLDAP --enable-lastmod
3332
3333         # Check whether --enable-lastmod or --disable-lastmod was given.
3334 if test "${enable_lastmod+set}" = set; then
3335   enableval="$enable_lastmod"
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-lastmod" >&5
3345 echo "$as_me: error: bad value $enableval for --enable-lastmod" >&2;}
3346    { (exit 1); exit 1; }; }
3347         fi
3348         ol_enable_lastmod="$ol_arg"
3349
3350 else
3351         ol_enable_lastmod=${ol_enable_overlays:-no}
3352 fi;
3353 # end --enable-lastmod
3354
3355 # OpenLDAP --enable-ppolicy
3356
3357         # Check whether --enable-ppolicy or --disable-ppolicy was given.
3358 if test "${enable_ppolicy+set}" = set; then
3359   enableval="$enable_ppolicy"
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-ppolicy" >&5
3369 echo "$as_me: error: bad value $enableval for --enable-ppolicy" >&2;}
3370    { (exit 1); exit 1; }; }
3371         fi
3372         ol_enable_ppolicy="$ol_arg"
3373
3374 else
3375         ol_enable_ppolicy=${ol_enable_overlays:-no}
3376 fi;
3377 # end --enable-ppolicy
3378
3379 # OpenLDAP --enable-proxycache
3380
3381         # Check whether --enable-proxycache or --disable-proxycache was given.
3382 if test "${enable_proxycache+set}" = set; then
3383   enableval="$enable_proxycache"
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-proxycache" >&5
3393 echo "$as_me: error: bad value $enableval for --enable-proxycache" >&2;}
3394    { (exit 1); exit 1; }; }
3395         fi
3396         ol_enable_proxycache="$ol_arg"
3397
3398 else
3399         ol_enable_proxycache=${ol_enable_overlays:-no}
3400 fi;
3401 # end --enable-proxycache
3402
3403 # OpenLDAP --enable-refint
3404
3405         # Check whether --enable-refint or --disable-refint was given.
3406 if test "${enable_refint+set}" = set; then
3407   enableval="$enable_refint"
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-refint" >&5
3417 echo "$as_me: error: bad value $enableval for --enable-refint" >&2;}
3418    { (exit 1); exit 1; }; }
3419         fi
3420         ol_enable_refint="$ol_arg"
3421
3422 else
3423         ol_enable_refint=${ol_enable_overlays:-no}
3424 fi;
3425 # end --enable-refint
3426
3427 # OpenLDAP --enable-retcode
3428
3429         # Check whether --enable-retcode or --disable-retcode was given.
3430 if test "${enable_retcode+set}" = set; then
3431   enableval="$enable_retcode"
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-retcode" >&5
3441 echo "$as_me: error: bad value $enableval for --enable-retcode" >&2;}
3442    { (exit 1); exit 1; }; }
3443         fi
3444         ol_enable_retcode="$ol_arg"
3445
3446 else
3447         ol_enable_retcode=${ol_enable_overlays:-no}
3448 fi;
3449 # end --enable-retcode
3450
3451 # OpenLDAP --enable-rwm
3452
3453         # Check whether --enable-rwm or --disable-rwm was given.
3454 if test "${enable_rwm+set}" = set; then
3455   enableval="$enable_rwm"
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-rwm" >&5
3465 echo "$as_me: error: bad value $enableval for --enable-rwm" >&2;}
3466    { (exit 1); exit 1; }; }
3467         fi
3468         ol_enable_rwm="$ol_arg"
3469
3470 else
3471         ol_enable_rwm=${ol_enable_overlays:-no}
3472 fi;
3473 # end --enable-rwm
3474
3475 # OpenLDAP --enable-syncprov
3476
3477         # Check whether --enable-syncprov or --disable-syncprov was given.
3478 if test "${enable_syncprov+set}" = set; then
3479   enableval="$enable_syncprov"
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-syncprov" >&5
3489 echo "$as_me: error: bad value $enableval for --enable-syncprov" >&2;}
3490    { (exit 1); exit 1; }; }
3491         fi
3492         ol_enable_syncprov="$ol_arg"
3493
3494 else
3495         ol_enable_syncprov=${ol_enable_overlays:-yes}
3496 fi;
3497 # end --enable-syncprov
3498
3499 # OpenLDAP --enable-translucent
3500
3501         # Check whether --enable-translucent or --disable-translucent was given.
3502 if test "${enable_translucent+set}" = set; then
3503   enableval="$enable_translucent"
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-translucent" >&5
3513 echo "$as_me: error: bad value $enableval for --enable-translucent" >&2;}
3514    { (exit 1); exit 1; }; }
3515         fi
3516         ol_enable_translucent="$ol_arg"
3517
3518 else
3519         ol_enable_translucent=${ol_enable_overlays:-no}
3520 fi;
3521 # end --enable-translucent
3522
3523 # OpenLDAP --enable-unique
3524
3525         # Check whether --enable-unique or --disable-unique was given.
3526 if test "${enable_unique+set}" = set; then
3527   enableval="$enable_unique"
3528
3529         ol_arg=invalid
3530         for ol_val in no yes mod ; do
3531                 if test "$enableval" = "$ol_val" ; then
3532                         ol_arg="$ol_val"
3533                 fi
3534         done
3535         if test "$ol_arg" = "invalid" ; then
3536                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-unique" >&5
3537 echo "$as_me: error: bad value $enableval for --enable-unique" >&2;}
3538    { (exit 1); exit 1; }; }
3539         fi
3540         ol_enable_unique="$ol_arg"
3541
3542 else
3543         ol_enable_unique=${ol_enable_overlays:-no}
3544 fi;
3545 # end --enable-unique
3546
3547 # OpenLDAP --enable-valsort
3548
3549         # Check whether --enable-valsort or --disable-valsort was given.
3550 if test "${enable_valsort+set}" = set; then
3551   enableval="$enable_valsort"
3552
3553         ol_arg=invalid
3554         for ol_val in no yes mod ; do
3555                 if test "$enableval" = "$ol_val" ; then
3556                         ol_arg="$ol_val"
3557                 fi
3558         done
3559         if test "$ol_arg" = "invalid" ; then
3560                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-valsort" >&5
3561 echo "$as_me: error: bad value $enableval for --enable-valsort" >&2;}
3562    { (exit 1); exit 1; }; }
3563         fi
3564         ol_enable_valsort="$ol_arg"
3565
3566 else
3567         ol_enable_valsort=${ol_enable_overlays:-no}
3568 fi;
3569 # end --enable-valsort
3570
3571
3572 # Check whether --enable-xxslurpdoptions or --disable-xxslurpdoptions was given.
3573 if test "${enable_xxslurpdoptions+set}" = set; then
3574   enableval="$enable_xxslurpdoptions"
3575
3576 fi;
3577 # OpenLDAP --enable-slurpd
3578
3579         # Check whether --enable-slurpd or --disable-slurpd was given.
3580 if test "${enable_slurpd+set}" = set; then
3581   enableval="$enable_slurpd"
3582
3583         ol_arg=invalid
3584         for ol_val in auto yes no ; do
3585                 if test "$enableval" = "$ol_val" ; then
3586                         ol_arg="$ol_val"
3587                 fi
3588         done
3589         if test "$ol_arg" = "invalid" ; then
3590                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slurpd" >&5
3591 echo "$as_me: error: bad value $enableval for --enable-slurpd" >&2;}
3592    { (exit 1); exit 1; }; }
3593         fi
3594         ol_enable_slurpd="$ol_arg"
3595
3596 else
3597         ol_enable_slurpd=auto
3598 fi;
3599 # end --enable-slurpd
3600
3601 # Check whether --enable-xxliboptions or --disable-xxliboptions was given.
3602 if test "${enable_xxliboptions+set}" = set; then
3603   enableval="$enable_xxliboptions"
3604
3605 fi;
3606 # Check whether --enable-static or --disable-static was given.
3607 if test "${enable_static+set}" = set; then
3608   enableval="$enable_static"
3609   p=${PACKAGE-default}
3610     case $enableval in
3611     yes) enable_static=yes ;;
3612     no) enable_static=no ;;
3613     *)
3614      enable_static=no
3615       # Look at the argument we got.  We use all the common list separators.
3616       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3617       for pkg in $enableval; do
3618         IFS="$lt_save_ifs"
3619         if test "X$pkg" = "X$p"; then
3620           enable_static=yes
3621         fi
3622       done
3623       IFS="$lt_save_ifs"
3624       ;;
3625     esac
3626 else
3627   enable_static=yes
3628 fi;
3629
3630 # Check whether --enable-shared or --disable-shared was given.
3631 if test "${enable_shared+set}" = set; then
3632   enableval="$enable_shared"
3633   p=${PACKAGE-default}
3634     case $enableval in
3635     yes) enable_shared=yes ;;
3636     no) enable_shared=no ;;
3637     *)
3638       enable_shared=no
3639       # Look at the argument we got.  We use all the common list separators.
3640       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3641       for pkg in $enableval; do
3642         IFS="$lt_save_ifs"
3643         if test "X$pkg" = "X$p"; then
3644           enable_shared=yes
3645         fi
3646       done
3647       IFS="$lt_save_ifs"
3648       ;;
3649     esac
3650 else
3651   enable_shared=yes
3652 fi;
3653
3654
3655
3656 # validate options
3657 if test $ol_enable_slapd = no ; then
3658                 if test $ol_enable_slapi = yes ; then
3659                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-slapi argument" >&5
3660 echo "$as_me: WARNING: slapd disabled, ignoring --enable-slapi argument" >&2;}
3661         fi
3662         case "$ol_enable_backends" in yes | mod)
3663                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-backends argument" >&5
3664 echo "$as_me: WARNING: slapd disabled, ignoring --enable-backends argument" >&2;}
3665         esac
3666         for i in $Backends; do
3667                 eval "ol_tmp=\$ol_enable_$i"
3668                 if test $ol_tmp != no ; then
3669                         { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
3670 echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
3671                         eval "ol_enable_$i=no"
3672                 fi
3673         done
3674         if test $ol_enable_modules = yes ; then
3675                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-modules argument" >&5
3676 echo "$as_me: WARNING: slapd disabled, ignoring --enable-modules argument" >&2;}
3677         fi
3678         if test $ol_enable_multimaster = yes ; then
3679                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-multimaster argument" >&5
3680 echo "$as_me: WARNING: slapd disabled, ignoring --enable-multimaster argument" >&2;}
3681         fi
3682         if test $ol_enable_wrappers = yes ; then
3683                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&5
3684 echo "$as_me: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&2;}
3685         fi
3686         if test $ol_enable_rlookups = yes ; then
3687                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&5
3688 echo "$as_me: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&2;}
3689         fi
3690         if test $ol_enable_aci = yes ; then
3691                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-aci argument" >&5
3692 echo "$as_me: WARNING: slapd disabled, ignoring --enable-aci argument" >&2;}
3693         fi
3694         if test $ol_enable_ldbm_api != auto ; then
3695                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-ldbm-api argument" >&5
3696 echo "$as_me: WARNING: slapd disabled, ignoring --enable-ldbm-api argument" >&2;}
3697         fi
3698         if test $ol_enable_ldbm_type != auto ; then
3699                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-ldbm-type argument" >&5
3700 echo "$as_me: WARNING: slapd disabled, ignoring --enable-ldbm-type argument" >&2;}
3701         fi
3702         if test $ol_enable_slurpd = yes ; then
3703                 { { echo "$as_me:$LINENO: error: slurpd requires slapd" >&5
3704 echo "$as_me: error: slurpd requires slapd" >&2;}
3705    { (exit 1); exit 1; }; }
3706         fi
3707         if test $ol_enable_rewrite = yes ; then
3708                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&5
3709 echo "$as_me: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&2;}
3710         fi
3711                 case "$ol_enable_overlays" in yes | mod)
3712                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-overlays argument" >&5
3713 echo "$as_me: WARNING: slapd disabled, ignoring --enable-overlays argument" >&2;}
3714         esac
3715         for i in $Overlays; do
3716                 eval "ol_tmp=\$ol_enable_$i"
3717                 if test $ol_tmp != no ; then
3718                         { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
3719 echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
3720                         eval "ol_enable_$i=no"
3721                 fi
3722         done
3723
3724         # force settings to no
3725         ol_enable_slapi=no
3726
3727         ol_enable_backends=
3728         ol_enable_overlays=
3729         ol_enable_modules=no
3730         ol_enable_multimaster=no
3731         ol_enable_rlookups=no
3732         ol_enable_aci=no
3733         ol_enable_wrappers=no
3734
3735         ol_enable_ldbm_api=no
3736         ol_enable_ldbm_type=no
3737
3738         ol_enable_slurpd=no
3739
3740         ol_enable_rewrite=no
3741
3742 elif test $ol_enable_ldbm = no ; then
3743
3744         if test $ol_enable_ldbm_api != auto ; then
3745                 { echo "$as_me:$LINENO: WARNING: LDBM disabled, ignoring --enable-ldbm-api argument" >&5
3746 echo "$as_me: WARNING: LDBM disabled, ignoring --enable-ldbm-api argument" >&2;}
3747         fi
3748
3749         if test $ol_enable_ldbm_type != auto ; then
3750                 { echo "$as_me:$LINENO: WARNING: LDBM disabled, ignoring --enable-ldbm-type argument" >&5
3751 echo "$as_me: WARNING: LDBM disabled, ignoring --enable-ldbm-type argument" >&2;}
3752         fi
3753
3754         if test $ol_enable_modules != yes &&
3755            test $ol_enable_bdb = no &&
3756            test $ol_enable_dnssrv = no &&
3757            test $ol_enable_hdb = no &&
3758            test $ol_enable_ldap = no &&
3759            test $ol_enable_meta = no &&
3760            test $ol_enable_monitor = no &&
3761            test $ol_enable_null = no &&
3762            test $ol_enable_passwd = no &&
3763            test $ol_enable_perl = no &&
3764            test $ol_enable_relay = no &&
3765            test $ol_enable_shell = no &&
3766            test $ol_enable_sql = no ; then
3767
3768                 if test $ol_enable_slapd = yes ; then
3769                         { { echo "$as_me:$LINENO: error: slapd requires a backend" >&5
3770 echo "$as_me: error: slapd requires a backend" >&2;}
3771    { (exit 1); exit 1; }; }
3772                 else
3773                         { echo "$as_me:$LINENO: WARNING: skipping slapd, no backend specified" >&5
3774 echo "$as_me: WARNING: skipping slapd, no backend specified" >&2;}
3775                         ol_enable_slapd=no
3776                 fi
3777         fi
3778
3779         ol_enable_ldbm_api=no
3780         ol_enable_ldbm_type=no
3781
3782         if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
3783                 ol_enable_ldbm_api=berkeley
3784         fi
3785
3786 else
3787                 if test $ol_enable_ldbm_api = gdbm &&
3788            test $ol_enable_ldbm_type = btree ; then
3789                 { { echo "$as_me:$LINENO: error: GDBM only supports LDBM type hash" >&5
3790 echo "$as_me: error: GDBM only supports LDBM type hash" >&2;}
3791    { (exit 1); exit 1; }; }
3792         fi
3793         if test $ol_enable_ldbm_api = mdbm &&
3794            test $ol_enable_ldbm_type = btree ; then
3795                 { { echo "$as_me:$LINENO: error: MDBM only supports LDBM type hash" >&5
3796 echo "$as_me: error: MDBM only supports LDBM type hash" >&2;}
3797    { (exit 1); exit 1; }; }
3798         fi
3799         if test $ol_enable_ldbm_api = ndbm &&
3800            test $ol_enable_ldbm_type = btree ; then
3801                 { { echo "$as_me:$LINENO: error: NDBM only supports LDBM type hash" >&5
3802 echo "$as_me: error: NDBM only supports LDBM type hash" >&2;}
3803    { (exit 1); exit 1; }; }
3804         fi
3805
3806         if test $ol_enable_bdb/$ol_enable_hdb != no/no ; then
3807                 if test $ol_enable_ldbm_api = auto ; then
3808                         ol_enable_ldbm_api=berkeley
3809                 elif test $ol_enable_ldbm_api != berkeley ; then
3810                         { { echo "$as_me:$LINENO: error: LDBM API not compatible with BDB/HDB" >&5
3811 echo "$as_me: error: LDBM API not compatible with BDB/HDB" >&2;}
3812    { (exit 1); exit 1; }; }
3813                 fi
3814         fi
3815 fi
3816
3817 if test $ol_enable_meta/$ol_enable_ldap = yes/no ; then
3818         { { echo "$as_me:$LINENO: error: --enable-meta requires --enable-ldap" >&5
3819 echo "$as_me: error: --enable-meta requires --enable-ldap" >&2;}
3820    { (exit 1); exit 1; }; }
3821 fi
3822
3823 if test $ol_enable_slurpd = yes ; then
3824                 if test $ol_with_threads = no ; then
3825                 { { echo "$as_me:$LINENO: error: slurpd requires threads" >&5
3826 echo "$as_me: error: slurpd requires threads" >&2;}
3827    { (exit 1); exit 1; }; }
3828         fi
3829 fi
3830
3831 if test $ol_enable_lmpasswd = yes ; then
3832         if test $ol_with_tls = no ; then
3833                 { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5
3834 echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;}
3835    { (exit 1); exit 1; }; }
3836         fi
3837 fi
3838
3839 if test $ol_enable_kbind = yes ; then
3840         if test $ol_with_kerberos = no ; then
3841                 { { echo "$as_me:$LINENO: error: options require --with-kerberos" >&5
3842 echo "$as_me: error: options require --with-kerberos" >&2;}
3843    { (exit 1); exit 1; }; }
3844         elif test $ol_with_kerberos = auto ; then
3845                 ol_with_kerberos=yes
3846         fi
3847
3848 elif test $ol_enable_kbind = no ; then
3849         if test $ol_with_kerberos = auto ; then
3850                 ol_with_kerberos=no
3851         elif test $ol_with_kerberos != no ; then
3852                 { echo "$as_me:$LINENO: WARNING: Kerberos detection enabled unnecessarily" >&5
3853 echo "$as_me: WARNING: Kerberos detection enabled unnecessarily" >&2;};
3854                 ol_with_kerberos=no
3855         fi
3856 fi
3857
3858 if test $ol_enable_spasswd = yes ; then
3859         if test $ol_with_cyrus_sasl = no ; then
3860                 { { echo "$as_me:$LINENO: error: options require --with-cyrus-sasl" >&5
3861 echo "$as_me: error: options require --with-cyrus-sasl" >&2;}
3862    { (exit 1); exit 1; }; }
3863         fi
3864         ol_with_cyrus_sasl=yes
3865 fi
3866
3867 echo "$as_me:$LINENO: result: done" >&5
3868 echo "${ECHO_T}done" >&6
3869
3870 LDAP_LIBS=
3871 LDBM_LIBS=
3872 LTHREAD_LIBS=
3873 LUTIL_LIBS=
3874
3875 SLAPD_LIBS=
3876 SLURPD_LIBS=
3877
3878 BUILD_SLAPD=no
3879 BUILD_SLURPD=no
3880
3881 BUILD_THREAD=no
3882
3883 BUILD_SLAPI=no
3884 SLAPD_SLAPI_DEPEND=
3885
3886 BUILD_BDB=no
3887 BUILD_DNSSRV=no
3888 BUILD_HDB=no
3889 BUILD_LDAP=no
3890 BUILD_LDBM=no
3891 BUILD_META=no
3892 BUILD_MONITOR=no
3893 BUILD_NULL=no
3894 BUILD_PASSWD=no
3895 BUILD_PERL=no
3896 BUILD_RELAY=no
3897 BUILD_SHELL=no
3898 BUILD_SQL=no
3899
3900 BUILD_ACCESSLOG=no
3901 BUILD_AUDITLOG=no
3902 BUILD_DENYOP=no
3903 BUILD_DYNGROUP=no
3904 BUILD_DYNLIST=no
3905 BUILD_LASTMOD=no
3906 BUILD_PPOLICY=no
3907 BUILD_PROXYCACHE=no
3908 BUILD_REFINT=no
3909 BUILD_RETCODE=no
3910 BUILD_RWM=no
3911 BUILD_SYNCPROV=no
3912 BUILD_TRANSLUCENT=no
3913 BUILD_UNIQUE=no
3914 BUILD_VALSORT=no
3915
3916 SLAPD_STATIC_OVERLAYS=
3917 SLAPD_DYNAMIC_OVERLAYS=
3918
3919 SLAPD_MODULES_LDFLAGS=
3920 SLAPD_MODULES_CPPFLAGS=
3921
3922 SLAPD_STATIC_BACKENDS=back-ldif
3923 SLAPD_DYNAMIC_BACKENDS=
3924
3925 SLAPD_PERL_LDFLAGS=
3926 MOD_PERL_LDFLAGS=
3927 PERL_CPPFLAGS=
3928
3929 SLAPD_SQL_LDFLAGS=
3930 SLAPD_SQL_LIBS=
3931 SLAPD_SQL_INCLUDES=
3932
3933 KRB4_LIBS=
3934 KRB5_LIBS=
3935 SASL_LIBS=
3936 TLS_LIBS=
3937 MODULES_LIBS=
3938 SLAPI_LIBS=
3939 LIBSLAPI=
3940 LIBSLAPITOOLS=
3941 AUTH_LIBS=
3942
3943 SLAPD_SLP_LIBS=
3944 SLAPD_GMP_LIBS=
3945
3946
3947
3948 cat >>confdefs.h <<\_ACEOF
3949 #define HAVE_MKVERSION 1
3950 _ACEOF
3951
3952
3953
3954
3955 ol_aix_threads=no
3956 case "$target" in
3957 *-*-aix*)       if test -z "$CC" ; then
3958                 case "$ol_with_threads" in
3959                 auto | yes |  posix) ol_aix_threads=yes ;;
3960                 esac
3961         fi
3962 ;;
3963 esac
3964
3965 if test $ol_aix_threads = yes ; then
3966         if test -z "${CC}" ; then
3967                 for ac_prog in cc_r xlc_r cc
3968 do
3969   # Extract the first word of "$ac_prog", so it can be a program name with args.
3970 set dummy $ac_prog; ac_word=$2
3971 echo "$as_me:$LINENO: checking for $ac_word" >&5
3972 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3973 if test "${ac_cv_prog_CC+set}" = set; then
3974   echo $ECHO_N "(cached) $ECHO_C" >&6
3975 else
3976   if test -n "$CC"; then
3977   ac_cv_prog_CC="$CC" # Let the user override the test.
3978 else
3979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3980 for as_dir in $PATH
3981 do
3982   IFS=$as_save_IFS
3983   test -z "$as_dir" && as_dir=.
3984   for ac_exec_ext in '' $ac_executable_extensions; do
3985   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3986     ac_cv_prog_CC="$ac_prog"
3987     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3988     break 2
3989   fi
3990 done
3991 done
3992
3993 fi
3994 fi
3995 CC=$ac_cv_prog_CC
3996 if test -n "$CC"; then
3997   echo "$as_me:$LINENO: result: $CC" >&5
3998 echo "${ECHO_T}$CC" >&6
3999 else
4000   echo "$as_me:$LINENO: result: no" >&5
4001 echo "${ECHO_T}no" >&6
4002 fi
4003
4004   test -n "$CC" && break
4005 done
4006
4007
4008                 if test "$CC" = cc ; then
4009                                                 if test $ol_with_threads != auto ; then
4010                                 { { echo "$as_me:$LINENO: error: --with-threads requires cc_r (or other suitable compiler) on AIX" >&5
4011 echo "$as_me: error: --with-threads requires cc_r (or other suitable compiler) on AIX" >&2;}
4012    { (exit 1); exit 1; }; }
4013                         else
4014                                 { echo "$as_me:$LINENO: WARNING: disabling threads, no cc_r on AIX" >&5
4015 echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
4016                         fi
4017                         ol_with_threads=no
4018                 fi
4019         fi
4020
4021         case ${CC} in cc_r | xlc_r)
4022                 ol_with_threads=posix
4023                 ol_cv_pthread_create=yes
4024                 ;;
4025         esac
4026 fi
4027
4028 if test -z "${CC}"; then
4029         for ac_prog in cc gcc
4030 do
4031   # Extract the first word of "$ac_prog", so it can be a program name with args.
4032 set dummy $ac_prog; ac_word=$2
4033 echo "$as_me:$LINENO: checking for $ac_word" >&5
4034 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4035 if test "${ac_cv_prog_CC+set}" = set; then
4036   echo $ECHO_N "(cached) $ECHO_C" >&6
4037 else
4038   if test -n "$CC"; then
4039   ac_cv_prog_CC="$CC" # Let the user override the test.
4040 else
4041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4042 for as_dir in $PATH
4043 do
4044   IFS=$as_save_IFS
4045   test -z "$as_dir" && as_dir=.
4046   for ac_exec_ext in '' $ac_executable_extensions; do
4047   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4048     ac_cv_prog_CC="$ac_prog"
4049     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4050     break 2
4051   fi
4052 done
4053 done
4054
4055 fi
4056 fi
4057 CC=$ac_cv_prog_CC
4058 if test -n "$CC"; then
4059   echo "$as_me:$LINENO: result: $CC" >&5
4060 echo "${ECHO_T}$CC" >&6
4061 else
4062   echo "$as_me:$LINENO: result: no" >&5
4063 echo "${ECHO_T}no" >&6
4064 fi
4065
4066   test -n "$CC" && break
4067 done
4068 test -n "$CC" || CC="missing"
4069
4070
4071         if test "${CC}" = "missing" ; then
4072                 { { echo "$as_me:$LINENO: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." >&5
4073 echo "$as_me: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." >&2;}
4074    { (exit 1); exit 1; }; }
4075         fi
4076 fi
4077
4078 if test -z "${AR}"; then
4079         for ac_prog in ar gar
4080 do
4081   # Extract the first word of "$ac_prog", so it can be a program name with args.
4082 set dummy $ac_prog; ac_word=$2
4083 echo "$as_me:$LINENO: checking for $ac_word" >&5
4084 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4085 if test "${ac_cv_prog_AR+set}" = set; then
4086   echo $ECHO_N "(cached) $ECHO_C" >&6
4087 else
4088   if test -n "$AR"; then
4089   ac_cv_prog_AR="$AR" # Let the user override the test.
4090 else
4091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4092 for as_dir in $PATH
4093 do
4094   IFS=$as_save_IFS
4095   test -z "$as_dir" && as_dir=.
4096   for ac_exec_ext in '' $ac_executable_extensions; do
4097   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4098     ac_cv_prog_AR="$ac_prog"
4099     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4100     break 2
4101   fi
4102 done
4103 done
4104
4105 fi
4106 fi
4107 AR=$ac_cv_prog_AR
4108 if test -n "$AR"; then
4109   echo "$as_me:$LINENO: result: $AR" >&5
4110 echo "${ECHO_T}$AR" >&6
4111 else
4112   echo "$as_me:$LINENO: result: no" >&5
4113 echo "${ECHO_T}no" >&6
4114 fi
4115
4116   test -n "$AR" && break
4117 done
4118 test -n "$AR" || AR="missing"
4119
4120
4121         if test "${AR}" = "missing" ; then
4122                 { { echo "$as_me:$LINENO: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." >&5
4123 echo "$as_me: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." >&2;}
4124    { (exit 1); exit 1; }; }
4125         fi
4126 fi
4127
4128
4129
4130
4131
4132 # Check whether --enable-fast-install or --disable-fast-install was given.
4133 if test "${enable_fast_install+set}" = set; then
4134   enableval="$enable_fast_install"
4135   p=${PACKAGE-default}
4136     case $enableval in
4137     yes) enable_fast_install=yes ;;
4138     no) enable_fast_install=no ;;
4139     *)
4140       enable_fast_install=no
4141       # Look at the argument we got.  We use all the common list separators.
4142       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4143       for pkg in $enableval; do
4144         IFS="$lt_save_ifs"
4145         if test "X$pkg" = "X$p"; then
4146           enable_fast_install=yes
4147         fi
4148       done
4149       IFS="$lt_save_ifs"
4150       ;;
4151     esac
4152 else
4153   enable_fast_install=yes
4154 fi;
4155
4156 DEPDIR="${am__leading_dot}deps"
4157
4158           ac_config_commands="$ac_config_commands depfiles"
4159
4160
4161 am_make=${MAKE-make}
4162 cat > confinc << 'END'
4163 am__doit:
4164         @echo done
4165 .PHONY: am__doit
4166 END
4167 # If we don't find an include directive, just comment out the code.
4168 echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
4169 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
4170 am__include="#"
4171 am__quote=
4172 _am_result=none
4173 # First try GNU make style include.
4174 echo "include confinc" > confmf
4175 # We grep out `Entering directory' and `Leaving directory'
4176 # messages which can occur if `w' ends up in MAKEFLAGS.
4177 # In particular we don't look at `^make:' because GNU make might
4178 # be invoked under some other name (usually "gmake"), in which
4179 # case it prints its new name instead of `make'.
4180 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
4181    am__include=include
4182    am__quote=
4183    _am_result=GNU
4184 fi
4185 # Now try BSD make style include.
4186 if test "$am__include" = "#"; then
4187    echo '.include "confinc"' > confmf
4188    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
4189       am__include=.include
4190       am__quote="\""
4191       _am_result=BSD
4192    fi
4193 fi
4194
4195
4196 echo "$as_me:$LINENO: result: $_am_result" >&5
4197 echo "${ECHO_T}$_am_result" >&6
4198 rm -f confinc confmf
4199
4200 # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
4201 if test "${enable_dependency_tracking+set}" = set; then
4202   enableval="$enable_dependency_tracking"
4203
4204 fi;
4205 if test "x$enable_dependency_tracking" != xno; then
4206   am_depcomp="$ac_aux_dir/depcomp"
4207   AMDEPBACKSLASH='\'
4208 fi
4209
4210
4211 if test "x$enable_dependency_tracking" != xno; then
4212   AMDEP_TRUE=
4213   AMDEP_FALSE='#'
4214 else
4215   AMDEP_TRUE='#'
4216   AMDEP_FALSE=
4217 fi
4218
4219
4220
4221 ac_ext=c
4222 ac_cpp='$CPP $CPPFLAGS'
4223 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4224 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4225 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4226 if test -n "$ac_tool_prefix"; then
4227   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4228 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4229 echo "$as_me:$LINENO: checking for $ac_word" >&5
4230 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4231 if test "${ac_cv_prog_CC+set}" = set; then
4232   echo $ECHO_N "(cached) $ECHO_C" >&6
4233 else
4234   if test -n "$CC"; then
4235   ac_cv_prog_CC="$CC" # Let the user override the test.
4236 else
4237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4238 for as_dir in $PATH
4239 do
4240   IFS=$as_save_IFS
4241   test -z "$as_dir" && as_dir=.
4242   for ac_exec_ext in '' $ac_executable_extensions; do
4243   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4244     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4245     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4246     break 2
4247   fi
4248 done
4249 done
4250
4251 fi
4252 fi
4253 CC=$ac_cv_prog_CC
4254 if test -n "$CC"; then
4255   echo "$as_me:$LINENO: result: $CC" >&5
4256 echo "${ECHO_T}$CC" >&6
4257 else
4258   echo "$as_me:$LINENO: result: no" >&5
4259 echo "${ECHO_T}no" >&6
4260 fi
4261
4262 fi
4263 if test -z "$ac_cv_prog_CC"; then
4264   ac_ct_CC=$CC
4265   # Extract the first word of "gcc", so it can be a program name with args.
4266 set dummy gcc; ac_word=$2
4267 echo "$as_me:$LINENO: checking for $ac_word" >&5
4268 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4269 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4270   echo $ECHO_N "(cached) $ECHO_C" >&6
4271 else
4272   if test -n "$ac_ct_CC"; then
4273   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4274 else
4275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4276 for as_dir in $PATH
4277 do
4278   IFS=$as_save_IFS
4279   test -z "$as_dir" && as_dir=.
4280   for ac_exec_ext in '' $ac_executable_extensions; do
4281   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4282     ac_cv_prog_ac_ct_CC="gcc"
4283     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4284     break 2
4285   fi
4286 done
4287 done
4288
4289 fi
4290 fi
4291 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4292 if test -n "$ac_ct_CC"; then
4293   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4294 echo "${ECHO_T}$ac_ct_CC" >&6
4295 else
4296   echo "$as_me:$LINENO: result: no" >&5
4297 echo "${ECHO_T}no" >&6
4298 fi
4299
4300   CC=$ac_ct_CC
4301 else
4302   CC="$ac_cv_prog_CC"
4303 fi
4304
4305 if test -z "$CC"; then
4306   if test -n "$ac_tool_prefix"; then
4307   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4308 set dummy ${ac_tool_prefix}cc; ac_word=$2
4309 echo "$as_me:$LINENO: checking for $ac_word" >&5
4310 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4311 if test "${ac_cv_prog_CC+set}" = set; then
4312   echo $ECHO_N "(cached) $ECHO_C" >&6
4313 else
4314   if test -n "$CC"; then
4315   ac_cv_prog_CC="$CC" # Let the user override the test.
4316 else
4317 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4318 for as_dir in $PATH
4319 do
4320   IFS=$as_save_IFS
4321   test -z "$as_dir" && as_dir=.
4322   for ac_exec_ext in '' $ac_executable_extensions; do
4323   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4324     ac_cv_prog_CC="${ac_tool_prefix}cc"
4325     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4326     break 2
4327   fi
4328 done
4329 done
4330
4331 fi
4332 fi
4333 CC=$ac_cv_prog_CC
4334 if test -n "$CC"; then
4335   echo "$as_me:$LINENO: result: $CC" >&5
4336 echo "${ECHO_T}$CC" >&6
4337 else
4338   echo "$as_me:$LINENO: result: no" >&5
4339 echo "${ECHO_T}no" >&6
4340 fi
4341
4342 fi
4343 if test -z "$ac_cv_prog_CC"; then
4344   ac_ct_CC=$CC
4345   # Extract the first word of "cc", so it can be a program name with args.
4346 set dummy cc; ac_word=$2
4347 echo "$as_me:$LINENO: checking for $ac_word" >&5
4348 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4349 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4350   echo $ECHO_N "(cached) $ECHO_C" >&6
4351 else
4352   if test -n "$ac_ct_CC"; then
4353   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4354 else
4355 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4356 for as_dir in $PATH
4357 do
4358   IFS=$as_save_IFS
4359   test -z "$as_dir" && as_dir=.
4360   for ac_exec_ext in '' $ac_executable_extensions; do
4361   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4362     ac_cv_prog_ac_ct_CC="cc"
4363     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4364     break 2
4365   fi
4366 done
4367 done
4368
4369 fi
4370 fi
4371 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4372 if test -n "$ac_ct_CC"; then
4373   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4374 echo "${ECHO_T}$ac_ct_CC" >&6
4375 else
4376   echo "$as_me:$LINENO: result: no" >&5
4377 echo "${ECHO_T}no" >&6
4378 fi
4379
4380   CC=$ac_ct_CC
4381 else
4382   CC="$ac_cv_prog_CC"
4383 fi
4384
4385 fi
4386 if test -z "$CC"; then
4387   # Extract the first word of "cc", so it can be a program name with args.
4388 set dummy cc; ac_word=$2
4389 echo "$as_me:$LINENO: checking for $ac_word" >&5
4390 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4391 if test "${ac_cv_prog_CC+set}" = set; then
4392   echo $ECHO_N "(cached) $ECHO_C" >&6
4393 else
4394   if test -n "$CC"; then
4395   ac_cv_prog_CC="$CC" # Let the user override the test.
4396 else
4397   ac_prog_rejected=no
4398 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4399 for as_dir in $PATH
4400 do
4401   IFS=$as_save_IFS
4402   test -z "$as_dir" && as_dir=.
4403   for ac_exec_ext in '' $ac_executable_extensions; do
4404   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4405     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4406        ac_prog_rejected=yes
4407        continue
4408      fi
4409     ac_cv_prog_CC="cc"
4410     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4411     break 2
4412   fi
4413 done
4414 done
4415
4416 if test $ac_prog_rejected = yes; then
4417   # We found a bogon in the path, so make sure we never use it.
4418   set dummy $ac_cv_prog_CC
4419   shift
4420   if test $# != 0; then
4421     # We chose a different compiler from the bogus one.
4422     # However, it has the same basename, so the bogon will be chosen
4423     # first if we set CC to just the basename; use the full file name.
4424     shift
4425     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4426   fi
4427 fi
4428 fi
4429 fi
4430 CC=$ac_cv_prog_CC
4431 if test -n "$CC"; then
4432   echo "$as_me:$LINENO: result: $CC" >&5
4433 echo "${ECHO_T}$CC" >&6
4434 else
4435   echo "$as_me:$LINENO: result: no" >&5
4436 echo "${ECHO_T}no" >&6
4437 fi
4438
4439 fi
4440 if test -z "$CC"; then
4441   if test -n "$ac_tool_prefix"; then
4442   for ac_prog in cl
4443   do
4444     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4445 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4446 echo "$as_me:$LINENO: checking for $ac_word" >&5
4447 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4448 if test "${ac_cv_prog_CC+set}" = set; then
4449   echo $ECHO_N "(cached) $ECHO_C" >&6
4450 else
4451   if test -n "$CC"; then
4452   ac_cv_prog_CC="$CC" # Let the user override the test.
4453 else
4454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4455 for as_dir in $PATH
4456 do
4457   IFS=$as_save_IFS
4458   test -z "$as_dir" && as_dir=.
4459   for ac_exec_ext in '' $ac_executable_extensions; do
4460   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4461     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4462     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4463     break 2
4464   fi
4465 done
4466 done
4467
4468 fi
4469 fi
4470 CC=$ac_cv_prog_CC
4471 if test -n "$CC"; then
4472   echo "$as_me:$LINENO: result: $CC" >&5
4473 echo "${ECHO_T}$CC" >&6
4474 else
4475   echo "$as_me:$LINENO: result: no" >&5
4476 echo "${ECHO_T}no" >&6
4477 fi
4478
4479     test -n "$CC" && break
4480   done
4481 fi
4482 if test -z "$CC"; then
4483   ac_ct_CC=$CC
4484   for ac_prog in cl
4485 do
4486   # Extract the first word of "$ac_prog", so it can be a program name with args.
4487 set dummy $ac_prog; ac_word=$2
4488 echo "$as_me:$LINENO: checking for $ac_word" >&5
4489 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4490 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4491   echo $ECHO_N "(cached) $ECHO_C" >&6
4492 else
4493   if test -n "$ac_ct_CC"; then
4494   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4495 else
4496 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4497 for as_dir in $PATH
4498 do
4499   IFS=$as_save_IFS
4500   test -z "$as_dir" && as_dir=.
4501   for ac_exec_ext in '' $ac_executable_extensions; do
4502   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4503     ac_cv_prog_ac_ct_CC="$ac_prog"
4504     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4505     break 2
4506   fi
4507 done
4508 done
4509
4510 fi
4511 fi
4512 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4513 if test -n "$ac_ct_CC"; then
4514   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4515 echo "${ECHO_T}$ac_ct_CC" >&6
4516 else
4517   echo "$as_me:$LINENO: result: no" >&5
4518 echo "${ECHO_T}no" >&6
4519 fi
4520
4521   test -n "$ac_ct_CC" && break
4522 done
4523
4524   CC=$ac_ct_CC
4525 fi
4526
4527 fi
4528
4529
4530 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
4531 See \`config.log' for more details." >&5
4532 echo "$as_me: error: no acceptable C compiler found in \$PATH
4533 See \`config.log' for more details." >&2;}
4534    { (exit 1); exit 1; }; }
4535
4536 # Provide some information about the compiler.
4537 echo "$as_me:$LINENO:" \
4538      "checking for C compiler version" >&5
4539 ac_compiler=`set X $ac_compile; echo $2`
4540 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
4541   (eval $ac_compiler --version </dev/null >&5) 2>&5
4542   ac_status=$?
4543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4544   (exit $ac_status); }
4545 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
4546   (eval $ac_compiler -v </dev/null >&5) 2>&5
4547   ac_status=$?
4548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4549   (exit $ac_status); }
4550 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
4551   (eval $ac_compiler -V </dev/null >&5) 2>&5
4552   ac_status=$?
4553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4554   (exit $ac_status); }
4555
4556 cat >conftest.$ac_ext <<_ACEOF
4557 /* confdefs.h.  */
4558 _ACEOF
4559 cat confdefs.h >>conftest.$ac_ext
4560 cat >>conftest.$ac_ext <<_ACEOF
4561 /* end confdefs.h.  */
4562
4563 int
4564 main ()
4565 {
4566
4567   ;
4568   return 0;
4569 }
4570 _ACEOF
4571 ac_clean_files_save=$ac_clean_files
4572 ac_clean_files="$ac_clean_files a.out a.exe b.out"
4573 # Try to create an executable without -o first, disregard a.out.
4574 # It will help us diagnose broken compilers, and finding out an intuition
4575 # of exeext.
4576 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
4577 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
4578 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4579 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
4580   (eval $ac_link_default) 2>&5
4581   ac_status=$?
4582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4583   (exit $ac_status); }; then
4584   # Find the output, starting from the most likely.  This scheme is
4585 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
4586 # resort.
4587
4588 # Be careful to initialize this variable, since it used to be cached.
4589 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
4590 ac_cv_exeext=
4591 # b.out is created by i960 compilers.
4592 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
4593 do
4594   test -f "$ac_file" || continue
4595   case $ac_file in
4596     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
4597         ;;
4598     conftest.$ac_ext )
4599         # This is the source file.
4600         ;;
4601     [ab].out )
4602         # We found the default executable, but exeext='' is most
4603         # certainly right.
4604         break;;
4605     *.* )
4606         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4607         # FIXME: I believe we export ac_cv_exeext for Libtool,
4608         # but it would be cool to find out if it's true.  Does anybody
4609         # maintain Libtool? --akim.
4610         export ac_cv_exeext
4611         break;;
4612     * )
4613         break;;
4614   esac
4615 done
4616 else
4617   echo "$as_me: failed program was:" >&5
4618 sed 's/^/| /' conftest.$ac_ext >&5
4619
4620 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
4621 See \`config.log' for more details." >&5
4622 echo "$as_me: error: C compiler cannot create executables
4623 See \`config.log' for more details." >&2;}
4624    { (exit 77); exit 77; }; }
4625 fi
4626
4627 ac_exeext=$ac_cv_exeext
4628 echo "$as_me:$LINENO: result: $ac_file" >&5
4629 echo "${ECHO_T}$ac_file" >&6
4630
4631 # Check the compiler produces executables we can run.  If not, either
4632 # the compiler is broken, or we cross compile.
4633 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
4634 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
4635 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
4636 # If not cross compiling, check that we can run a simple program.
4637 if test "$cross_compiling" != yes; then
4638   if { ac_try='./$ac_file'
4639   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4640   (eval $ac_try) 2>&5
4641   ac_status=$?
4642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4643   (exit $ac_status); }; }; then
4644     cross_compiling=no
4645   else
4646     if test "$cross_compiling" = maybe; then
4647         cross_compiling=yes
4648     else
4649         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
4650 If you meant to cross compile, use \`--host'.
4651 See \`config.log' for more details." >&5
4652 echo "$as_me: error: cannot run C compiled programs.
4653 If you meant to cross compile, use \`--host'.
4654 See \`config.log' for more details." >&2;}
4655    { (exit 1); exit 1; }; }
4656     fi
4657   fi
4658 fi
4659 echo "$as_me:$LINENO: result: yes" >&5
4660 echo "${ECHO_T}yes" >&6
4661
4662 rm -f a.out a.exe conftest$ac_cv_exeext b.out
4663 ac_clean_files=$ac_clean_files_save
4664 # Check the compiler produces executables we can run.  If not, either
4665 # the compiler is broken, or we cross compile.
4666 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
4667 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
4668 echo "$as_me:$LINENO: result: $cross_compiling" >&5
4669 echo "${ECHO_T}$cross_compiling" >&6
4670
4671 echo "$as_me:$LINENO: checking for suffix of executables" >&5
4672 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
4673 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4674   (eval $ac_link) 2>&5
4675   ac_status=$?
4676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4677   (exit $ac_status); }; then
4678   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4679 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4680 # work properly (i.e., refer to `conftest.exe'), while it won't with
4681 # `rm'.
4682 for ac_file in conftest.exe conftest conftest.*; do
4683   test -f "$ac_file" || continue
4684   case $ac_file in
4685     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
4686     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4687           export ac_cv_exeext
4688           break;;
4689     * ) break;;
4690   esac
4691 done
4692 else
4693   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
4694 See \`config.log' for more details." >&5
4695 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
4696 See \`config.log' for more details." >&2;}
4697    { (exit 1); exit 1; }; }
4698 fi
4699
4700 rm -f conftest$ac_cv_exeext
4701 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
4702 echo "${ECHO_T}$ac_cv_exeext" >&6
4703
4704 rm -f conftest.$ac_ext
4705 EXEEXT=$ac_cv_exeext
4706 ac_exeext=$EXEEXT
4707 echo "$as_me:$LINENO: checking for suffix of object files" >&5
4708 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
4709 if test "${ac_cv_objext+set}" = set; then
4710   echo $ECHO_N "(cached) $ECHO_C" >&6
4711 else
4712   cat >conftest.$ac_ext <<_ACEOF
4713 /* confdefs.h.  */
4714 _ACEOF
4715 cat confdefs.h >>conftest.$ac_ext
4716 cat >>conftest.$ac_ext <<_ACEOF
4717 /* end confdefs.h.  */
4718
4719 int
4720 main ()
4721 {
4722
4723   ;
4724   return 0;
4725 }
4726 _ACEOF
4727 rm -f conftest.o conftest.obj
4728 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4729   (eval $ac_compile) 2>&5
4730   ac_status=$?
4731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4732   (exit $ac_status); }; then
4733   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
4734   case $ac_file in
4735     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
4736     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4737        break;;
4738   esac
4739 done
4740 else
4741   echo "$as_me: failed program was:" >&5
4742 sed 's/^/| /' conftest.$ac_ext >&5
4743
4744 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
4745 See \`config.log' for more details." >&5
4746 echo "$as_me: error: cannot compute suffix of object files: cannot compile
4747 See \`config.log' for more details." >&2;}
4748    { (exit 1); exit 1; }; }
4749 fi
4750
4751 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4752 fi
4753 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
4754 echo "${ECHO_T}$ac_cv_objext" >&6
4755 OBJEXT=$ac_cv_objext
4756 ac_objext=$OBJEXT
4757 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
4758 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
4759 if test "${ac_cv_c_compiler_gnu+set}" = set; then
4760   echo $ECHO_N "(cached) $ECHO_C" >&6
4761 else
4762   cat >conftest.$ac_ext <<_ACEOF
4763 /* confdefs.h.  */
4764 _ACEOF
4765 cat confdefs.h >>conftest.$ac_ext
4766 cat >>conftest.$ac_ext <<_ACEOF
4767 /* end confdefs.h.  */
4768
4769 int
4770 main ()
4771 {
4772 #ifndef __GNUC__
4773        choke me
4774 #endif
4775
4776   ;
4777   return 0;
4778 }
4779 _ACEOF
4780 rm -f conftest.$ac_objext
4781 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4782   (eval $ac_compile) 2>conftest.er1
4783   ac_status=$?
4784   grep -v '^ *+' conftest.er1 >conftest.err
4785   rm -f conftest.er1
4786   cat conftest.err >&5
4787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4788   (exit $ac_status); } &&
4789          { ac_try='test -z "$ac_c_werror_flag"
4790                          || test ! -s conftest.err'
4791   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4792   (eval $ac_try) 2>&5
4793   ac_status=$?
4794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4795   (exit $ac_status); }; } &&
4796          { ac_try='test -s conftest.$ac_objext'
4797   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4798   (eval $ac_try) 2>&5
4799   ac_status=$?
4800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4801   (exit $ac_status); }; }; then
4802   ac_compiler_gnu=yes
4803 else
4804   echo "$as_me: failed program was:" >&5
4805 sed 's/^/| /' conftest.$ac_ext >&5
4806
4807 ac_compiler_gnu=no
4808 fi
4809 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4810 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4811
4812 fi
4813 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
4814 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
4815 GCC=`test $ac_compiler_gnu = yes && echo yes`
4816 ac_test_CFLAGS=${CFLAGS+set}
4817 ac_save_CFLAGS=$CFLAGS
4818 CFLAGS="-g"
4819 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
4820 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
4821 if test "${ac_cv_prog_cc_g+set}" = set; then
4822   echo $ECHO_N "(cached) $ECHO_C" >&6
4823 else
4824   cat >conftest.$ac_ext <<_ACEOF
4825 /* confdefs.h.  */
4826 _ACEOF
4827 cat confdefs.h >>conftest.$ac_ext
4828 cat >>conftest.$ac_ext <<_ACEOF
4829 /* end confdefs.h.  */
4830
4831 int
4832 main ()
4833 {
4834
4835   ;
4836   return 0;
4837 }
4838 _ACEOF
4839 rm -f conftest.$ac_objext
4840 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4841   (eval $ac_compile) 2>conftest.er1
4842   ac_status=$?
4843   grep -v '^ *+' conftest.er1 >conftest.err
4844   rm -f conftest.er1
4845   cat conftest.err >&5
4846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4847   (exit $ac_status); } &&
4848          { ac_try='test -z "$ac_c_werror_flag"
4849                          || test ! -s conftest.err'
4850   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4851   (eval $ac_try) 2>&5
4852   ac_status=$?
4853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4854   (exit $ac_status); }; } &&
4855          { ac_try='test -s conftest.$ac_objext'
4856   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4857   (eval $ac_try) 2>&5
4858   ac_status=$?
4859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4860   (exit $ac_status); }; }; then
4861   ac_cv_prog_cc_g=yes
4862 else
4863   echo "$as_me: failed program was:" >&5
4864 sed 's/^/| /' conftest.$ac_ext >&5
4865
4866 ac_cv_prog_cc_g=no
4867 fi
4868 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4869 fi
4870 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
4871 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
4872 if test "$ac_test_CFLAGS" = set; then
4873   CFLAGS=$ac_save_CFLAGS
4874 elif test $ac_cv_prog_cc_g = yes; then
4875   if test "$GCC" = yes; then
4876     CFLAGS="-g -O2"
4877   else
4878     CFLAGS="-g"
4879   fi
4880 else
4881   if test "$GCC" = yes; then
4882     CFLAGS="-O2"
4883   else
4884     CFLAGS=
4885   fi
4886 fi
4887 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
4888 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
4889 if test "${ac_cv_prog_cc_stdc+set}" = set; then
4890   echo $ECHO_N "(cached) $ECHO_C" >&6
4891 else
4892   ac_cv_prog_cc_stdc=no
4893 ac_save_CC=$CC
4894 cat >conftest.$ac_ext <<_ACEOF
4895 /* confdefs.h.  */
4896 _ACEOF
4897 cat confdefs.h >>conftest.$ac_ext
4898 cat >>conftest.$ac_ext <<_ACEOF
4899 /* end confdefs.h.  */
4900 #include <stdarg.h>
4901 #include <stdio.h>
4902 #include <sys/types.h>
4903 #include <sys/stat.h>
4904 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4905 struct buf { int x; };
4906 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4907 static char *e (p, i)
4908      char **p;
4909      int i;
4910 {
4911   return p[i];
4912 }
4913 static char *f (char * (*g) (char **, int), char **p, ...)
4914 {
4915   char *s;
4916   va_list v;
4917   va_start (v,p);
4918   s = g (p, va_arg (v,int));
4919   va_end (v);
4920   return s;
4921 }
4922
4923 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4924    function prototypes and stuff, but not '\xHH' hex character constants.
4925    These don't provoke an error unfortunately, instead are silently treated
4926    as 'x'.  The following induces an error, until -std1 is added to get
4927    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4928    array size at least.  It's necessary to write '\x00'==0 to get something
4929    that's true only with -std1.  */
4930 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4931
4932 int test (int i, double x);
4933 struct s1 {int (*f) (int a);};
4934 struct s2 {int (*f) (double a);};
4935 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4936 int argc;
4937 char **argv;
4938 int
4939 main ()
4940 {
4941 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4942   ;
4943   return 0;
4944 }
4945 _ACEOF
4946 # Don't try gcc -ansi; that turns off useful extensions and
4947 # breaks some systems' header files.
4948 # AIX                   -qlanglvl=ansi
4949 # Ultrix and OSF/1      -std1
4950 # HP-UX 10.20 and later -Ae
4951 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4952 # SVR4                  -Xc -D__EXTENSIONS__
4953 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4954 do
4955   CC="$ac_save_CC $ac_arg"
4956   rm -f conftest.$ac_objext
4957 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4958   (eval $ac_compile) 2>conftest.er1
4959   ac_status=$?
4960   grep -v '^ *+' conftest.er1 >conftest.err
4961   rm -f conftest.er1
4962   cat conftest.err >&5
4963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4964   (exit $ac_status); } &&
4965          { ac_try='test -z "$ac_c_werror_flag"
4966                          || test ! -s conftest.err'
4967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4968   (eval $ac_try) 2>&5
4969   ac_status=$?
4970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4971   (exit $ac_status); }; } &&
4972          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
4978   ac_cv_prog_cc_stdc=$ac_arg
4979 break
4980 else
4981   echo "$as_me: failed program was:" >&5
4982 sed 's/^/| /' conftest.$ac_ext >&5
4983
4984 fi
4985 rm -f conftest.err conftest.$ac_objext
4986 done
4987 rm -f conftest.$ac_ext conftest.$ac_objext
4988 CC=$ac_save_CC
4989
4990 fi
4991
4992 case "x$ac_cv_prog_cc_stdc" in
4993   x|xno)
4994     echo "$as_me:$LINENO: result: none needed" >&5
4995 echo "${ECHO_T}none needed" >&6 ;;
4996   *)
4997     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
4998 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
4999     CC="$CC $ac_cv_prog_cc_stdc" ;;
5000 esac
5001
5002 # Some people use a C++ compiler to compile C.  Since we use `exit',
5003 # in C++ we need to declare it.  In case someone uses the same compiler
5004 # for both compiling C and C++ we need to have the C++ compiler decide
5005 # the declaration of exit, since it's the most demanding environment.
5006 cat >conftest.$ac_ext <<_ACEOF
5007 #ifndef __cplusplus
5008   choke me
5009 #endif
5010 _ACEOF
5011 rm -f conftest.$ac_objext
5012 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5013   (eval $ac_compile) 2>conftest.er1
5014   ac_status=$?
5015   grep -v '^ *+' conftest.er1 >conftest.err
5016   rm -f conftest.er1
5017   cat conftest.err >&5
5018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5019   (exit $ac_status); } &&
5020          { ac_try='test -z "$ac_c_werror_flag"
5021                          || test ! -s conftest.err'
5022   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5023   (eval $ac_try) 2>&5
5024   ac_status=$?
5025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5026   (exit $ac_status); }; } &&
5027          { ac_try='test -s conftest.$ac_objext'
5028   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5029   (eval $ac_try) 2>&5
5030   ac_status=$?
5031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5032   (exit $ac_status); }; }; then
5033   for ac_declaration in \
5034    '' \
5035    'extern "C" void std::exit (int) throw (); using std::exit;' \
5036    'extern "C" void std::exit (int); using std::exit;' \
5037    'extern "C" void exit (int) throw ();' \
5038    'extern "C" void exit (int);' \
5039    'void exit (int);'
5040 do
5041   cat >conftest.$ac_ext <<_ACEOF
5042 /* confdefs.h.  */
5043 _ACEOF
5044 cat confdefs.h >>conftest.$ac_ext
5045 cat >>conftest.$ac_ext <<_ACEOF
5046 /* end confdefs.h.  */
5047 $ac_declaration
5048 #include <stdlib.h>
5049 int
5050 main ()
5051 {
5052 exit (42);
5053   ;
5054   return 0;
5055 }
5056 _ACEOF
5057 rm -f conftest.$ac_objext
5058 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5059   (eval $ac_compile) 2>conftest.er1
5060   ac_status=$?
5061   grep -v '^ *+' conftest.er1 >conftest.err
5062   rm -f conftest.er1
5063   cat conftest.err >&5
5064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5065   (exit $ac_status); } &&
5066          { ac_try='test -z "$ac_c_werror_flag"
5067                          || test ! -s conftest.err'
5068   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5069   (eval $ac_try) 2>&5
5070   ac_status=$?
5071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5072   (exit $ac_status); }; } &&
5073          { ac_try='test -s conftest.$ac_objext'
5074   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5075   (eval $ac_try) 2>&5
5076   ac_status=$?
5077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5078   (exit $ac_status); }; }; then
5079   :
5080 else
5081   echo "$as_me: failed program was:" >&5
5082 sed 's/^/| /' conftest.$ac_ext >&5
5083
5084 continue
5085 fi
5086 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5087   cat >conftest.$ac_ext <<_ACEOF
5088 /* confdefs.h.  */
5089 _ACEOF
5090 cat confdefs.h >>conftest.$ac_ext
5091 cat >>conftest.$ac_ext <<_ACEOF
5092 /* end confdefs.h.  */
5093 $ac_declaration
5094 int
5095 main ()
5096 {
5097 exit (42);
5098   ;
5099   return 0;
5100 }
5101 _ACEOF
5102 rm -f conftest.$ac_objext
5103 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5104   (eval $ac_compile) 2>conftest.er1
5105   ac_status=$?
5106   grep -v '^ *+' conftest.er1 >conftest.err
5107   rm -f conftest.er1
5108   cat conftest.err >&5
5109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5110   (exit $ac_status); } &&
5111          { ac_try='test -z "$ac_c_werror_flag"
5112                          || test ! -s conftest.err'
5113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5114   (eval $ac_try) 2>&5
5115   ac_status=$?
5116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5117   (exit $ac_status); }; } &&
5118          { ac_try='test -s conftest.$ac_objext'
5119   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5120   (eval $ac_try) 2>&5
5121   ac_status=$?
5122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5123   (exit $ac_status); }; }; then
5124   break
5125 else
5126   echo "$as_me: failed program was:" >&5
5127 sed 's/^/| /' conftest.$ac_ext >&5
5128
5129 fi
5130 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5131 done
5132 rm -f conftest*
5133 if test -n "$ac_declaration"; then
5134   echo '#ifdef __cplusplus' >>confdefs.h
5135   echo $ac_declaration      >>confdefs.h
5136   echo '#endif'             >>confdefs.h
5137 fi
5138
5139 else
5140   echo "$as_me: failed program was:" >&5
5141 sed 's/^/| /' conftest.$ac_ext >&5
5142
5143 fi
5144 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5145 ac_ext=c
5146 ac_cpp='$CPP $CPPFLAGS'
5147 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5148 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5149 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5150
5151 depcc="$CC"   am_compiler_list=
5152
5153 echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
5154 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
5155 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
5156   echo $ECHO_N "(cached) $ECHO_C" >&6
5157 else
5158   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5159   # We make a subdir and do the tests there.  Otherwise we can end up
5160   # making bogus files that we don't know about and never remove.  For
5161   # instance it was reported that on HP-UX the gcc test will end up
5162   # making a dummy file named `D' -- because `-MD' means `put the output
5163   # in D'.
5164   mkdir conftest.dir
5165   # Copy depcomp to subdir because otherwise we won't find it if we're
5166   # using a relative directory.
5167   cp "$am_depcomp" conftest.dir
5168   cd conftest.dir
5169   # We will build objects and dependencies in a subdirectory because
5170   # it helps to detect inapplicable dependency modes.  For instance
5171   # both Tru64's cc and ICC support -MD to output dependencies as a
5172   # side effect of compilation, but ICC will put the dependencies in
5173   # the current directory while Tru64 will put them in the object
5174   # directory.
5175   mkdir sub
5176
5177   am_cv_CC_dependencies_compiler_type=none
5178   if test "$am_compiler_list" = ""; then
5179      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5180   fi
5181   for depmode in $am_compiler_list; do
5182     # Setup a source with many dependencies, because some compilers
5183     # like to wrap large dependency lists on column 80 (with \), and
5184     # we should not choose a depcomp mode which is confused by this.
5185     #
5186     # We need to recreate these files for each test, as the compiler may
5187     # overwrite some of them when testing with obscure command lines.
5188     # This happens at least with the AIX C compiler.
5189     : > sub/conftest.c
5190     for i in 1 2 3 4 5 6; do
5191       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5192       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5193       # Solaris 8's {/usr,}/bin/sh.
5194       touch sub/conftst$i.h
5195     done
5196     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5197
5198     case $depmode in
5199     nosideeffect)
5200       # after this tag, mechanisms are not by side-effect, so they'll
5201       # only be used when explicitly requested
5202       if test "x$enable_dependency_tracking" = xyes; then
5203         continue
5204       else
5205         break
5206       fi
5207       ;;
5208     none) break ;;
5209     esac
5210     # We check with `-c' and `-o' for the sake of the "dashmstdout"
5211     # mode.  It turns out that the SunPro C++ compiler does not properly
5212     # handle `-M -o', and we need to detect this.
5213     if depmode=$depmode \
5214        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5215        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5216        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
5217          >/dev/null 2>conftest.err &&
5218        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5219        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
5220        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5221       # icc doesn't choke on unknown options, it will just issue warnings
5222       # or remarks (even with -Werror).  So we grep stderr for any message
5223       # that says an option was ignored or not supported.
5224       # When given -MP, icc 7.0 and 7.1 complain thusly:
5225       #   icc: Command line warning: ignoring option '-M'; no argument required
5226       # The diagnosis changed in icc 8.0:
5227       #   icc: Command line remark: option '-MP' not supported
5228       if (grep 'ignoring option' conftest.err ||
5229           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5230         am_cv_CC_dependencies_compiler_type=$depmode
5231         break
5232       fi
5233     fi
5234   done
5235
5236   cd ..
5237   rm -rf conftest.dir
5238 else
5239   am_cv_CC_dependencies_compiler_type=none
5240 fi
5241
5242 fi
5243 echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
5244 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
5245 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5246
5247
5248
5249 if
5250   test "x$enable_dependency_tracking" != xno \
5251   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5252   am__fastdepCC_TRUE=
5253   am__fastdepCC_FALSE='#'
5254 else
5255   am__fastdepCC_TRUE='#'
5256   am__fastdepCC_FALSE=
5257 fi
5258
5259
5260 echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
5261 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
5262 if test "${lt_cv_path_SED+set}" = set; then
5263   echo $ECHO_N "(cached) $ECHO_C" >&6
5264 else
5265   # Loop through the user's path and test for sed and gsed.
5266 # Then use that list of sed's as ones to test for truncation.
5267 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5268 for as_dir in $PATH
5269 do
5270   IFS=$as_save_IFS
5271   test -z "$as_dir" && as_dir=.
5272   for lt_ac_prog in sed gsed; do
5273     for ac_exec_ext in '' $ac_executable_extensions; do
5274       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
5275         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
5276       fi
5277     done
5278   done
5279 done
5280 lt_ac_max=0
5281 lt_ac_count=0
5282 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
5283 # along with /bin/sed that truncates output.
5284 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
5285   test ! -f $lt_ac_sed && continue
5286   cat /dev/null > conftest.in
5287   lt_ac_count=0
5288   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
5289   # Check for GNU sed and select it if it is found.
5290   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
5291     lt_cv_path_SED=$lt_ac_sed
5292     break
5293   fi
5294   while true; do
5295     cat conftest.in conftest.in >conftest.tmp
5296     mv conftest.tmp conftest.in
5297     cp conftest.in conftest.nl
5298     echo >>conftest.nl
5299     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
5300     cmp -s conftest.out conftest.nl || break
5301     # 10000 chars as input seems more than enough
5302     test $lt_ac_count -gt 10 && break
5303     lt_ac_count=`expr $lt_ac_count + 1`
5304     if test $lt_ac_count -gt $lt_ac_max; then
5305       lt_ac_max=$lt_ac_count
5306       lt_cv_path_SED=$lt_ac_sed
5307     fi
5308   done
5309 done
5310
5311 fi
5312
5313 SED=$lt_cv_path_SED
5314 echo "$as_me:$LINENO: result: $SED" >&5
5315 echo "${ECHO_T}$SED" >&6
5316
5317 echo "$as_me:$LINENO: checking for egrep" >&5
5318 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
5319 if test "${ac_cv_prog_egrep+set}" = set; then
5320   echo $ECHO_N "(cached) $ECHO_C" >&6
5321 else
5322   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
5323     then ac_cv_prog_egrep='grep -E'
5324     else ac_cv_prog_egrep='egrep'
5325     fi
5326 fi
5327 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
5328 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
5329  EGREP=$ac_cv_prog_egrep
5330
5331
5332
5333 # Check whether --with-gnu-ld or --without-gnu-ld was given.
5334 if test "${with_gnu_ld+set}" = set; then
5335   withval="$with_gnu_ld"
5336   test "$withval" = no || with_gnu_ld=yes
5337 else
5338   with_gnu_ld=no
5339 fi;
5340 ac_prog=ld
5341 if test "$GCC" = yes; then
5342   # Check if gcc -print-prog-name=ld gives a path.
5343   echo "$as_me:$LINENO: checking for ld used by $CC" >&5
5344 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
5345   case $host in
5346   *-*-mingw*)
5347     # gcc leaves a trailing carriage return which upsets mingw
5348     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5349   *)
5350     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5351   esac
5352   case $ac_prog in
5353     # Accept absolute paths.
5354     [\\/]* | ?:[\\/]*)
5355       re_direlt='/[^/][^/]*/\.\./'
5356       # Canonicalize the pathname of ld
5357       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
5358       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5359         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
5360       done
5361       test -z "$LD" && LD="$ac_prog"
5362       ;;
5363   "")
5364     # If it fails, then pretend we aren't using GCC.
5365     ac_prog=ld
5366     ;;
5367   *)
5368     # If it is relative, then search for the first ld in PATH.
5369     with_gnu_ld=unknown
5370     ;;
5371   esac
5372 elif test "$with_gnu_ld" = yes; then
5373   echo "$as_me:$LINENO: checking for GNU ld" >&5
5374 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
5375 else
5376   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
5377 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
5378 fi
5379 if test "${lt_cv_path_LD+set}" = set; then
5380   echo $ECHO_N "(cached) $ECHO_C" >&6
5381 else
5382   if test -z "$LD"; then
5383   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5384   for ac_dir in $PATH; do
5385     IFS="$lt_save_ifs"
5386     test -z "$ac_dir" && ac_dir=.
5387     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5388       lt_cv_path_LD="$ac_dir/$ac_prog"
5389       # Check to see if the program is GNU ld.  I'd rather use --version,
5390       # but apparently some variants of GNU ld only accept -v.
5391       # Break only if it was the GNU/non-GNU ld that we prefer.
5392       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5393       *GNU* | *'with BFD'*)
5394         test "$with_gnu_ld" != no && break
5395         ;;
5396       *)
5397         test "$with_gnu_ld" != yes && break
5398         ;;
5399       esac
5400     fi
5401   done
5402   IFS="$lt_save_ifs"
5403 else
5404   lt_cv_path_LD="$LD" # Let the user override the test with a path.
5405 fi
5406 fi
5407
5408 LD="$lt_cv_path_LD"
5409 if test -n "$LD"; then
5410   echo "$as_me:$LINENO: result: $LD" >&5
5411 echo "${ECHO_T}$LD" >&6
5412 else
5413   echo "$as_me:$LINENO: result: no" >&5
5414 echo "${ECHO_T}no" >&6
5415 fi
5416 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
5417 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
5418    { (exit 1); exit 1; }; }
5419 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
5420 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
5421 if test "${lt_cv_prog_gnu_ld+set}" = set; then
5422   echo $ECHO_N "(cached) $ECHO_C" >&6
5423 else
5424   # I'd rather use --version here, but apparently some GNU lds only accept -v.
5425 case `$LD -v 2>&1 </dev/null` in
5426 *GNU* | *'with BFD'*)
5427   lt_cv_prog_gnu_ld=yes
5428   ;;
5429 *)
5430   lt_cv_prog_gnu_ld=no
5431   ;;
5432 esac
5433 fi
5434 echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
5435 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
5436 with_gnu_ld=$lt_cv_prog_gnu_ld
5437
5438
5439 echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
5440 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
5441 if test "${lt_cv_ld_reload_flag+set}" = set; then
5442   echo $ECHO_N "(cached) $ECHO_C" >&6
5443 else
5444   lt_cv_ld_reload_flag='-r'
5445 fi
5446 echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
5447 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
5448 reload_flag=$lt_cv_ld_reload_flag
5449 case $reload_flag in
5450 "" | " "*) ;;
5451 *) reload_flag=" $reload_flag" ;;
5452 esac
5453 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5454 case $host_os in
5455   darwin*)
5456     if test "$GCC" = yes; then
5457       reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
5458     else
5459       reload_cmds='$LD$reload_flag -o $output$reload_objs'
5460     fi
5461     ;;
5462 esac
5463
5464 echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
5465 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
5466 if test "${lt_cv_path_NM+set}" = set; then
5467   echo $ECHO_N "(cached) $ECHO_C" >&6
5468 else
5469   if test -n "$NM"; then
5470   # Let the user override the test.
5471   lt_cv_path_NM="$NM"
5472 else
5473   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5474   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
5475     IFS="$lt_save_ifs"
5476     test -z "$ac_dir" && ac_dir=.
5477     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
5478     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5479       # Check to see if the nm accepts a BSD-compat flag.
5480       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5481       #   nm: unknown option "B" ignored
5482       # Tru64's nm complains that /dev/null is an invalid object file
5483       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5484       */dev/null* | *'Invalid file or object type'*)
5485         lt_cv_path_NM="$tmp_nm -B"
5486         break
5487         ;;
5488       *)
5489         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5490         */dev/null*)
5491           lt_cv_path_NM="$tmp_nm -p"
5492           break
5493           ;;
5494         *)
5495           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5496           continue # so that we can try to find one that supports BSD flags
5497           ;;
5498         esac
5499       esac
5500     fi
5501   done
5502   IFS="$lt_save_ifs"
5503   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
5504 fi
5505 fi
5506 echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
5507 echo "${ECHO_T}$lt_cv_path_NM" >&6
5508 NM="$lt_cv_path_NM"
5509
5510 echo "$as_me:$LINENO: checking whether ln -s works" >&5
5511 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
5512 LN_S=$as_ln_s
5513 if test "$LN_S" = "ln -s"; then
5514   echo "$as_me:$LINENO: result: yes" >&5
5515 echo "${ECHO_T}yes" >&6
5516 else
5517   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
5518 echo "${ECHO_T}no, using $LN_S" >&6
5519 fi
5520
5521 echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
5522 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
5523 if test "${lt_cv_deplibs_check_method+set}" = set; then
5524   echo $ECHO_N "(cached) $ECHO_C" >&6
5525 else
5526   lt_cv_file_magic_cmd='$MAGIC_CMD'
5527 lt_cv_file_magic_test_file=
5528 lt_cv_deplibs_check_method='unknown'
5529 # Need to set the preceding variable on all platforms that support
5530 # interlibrary dependencies.
5531 # 'none' -- dependencies not supported.
5532 # `unknown' -- same as none, but documents that we really don't know.
5533 # 'pass_all' -- all dependencies passed with no checks.
5534 # 'test_compile' -- check by making test program.
5535 # 'file_magic [[regex]]' -- check by looking for files in library path
5536 # which responds to the $file_magic_cmd with a given extended regex.
5537 # If you have `file' or equivalent on your system and you're not sure
5538 # whether `pass_all' will *always* work, you probably want this one.
5539
5540 case $host_os in
5541 aix4* | aix5*)
5542   lt_cv_deplibs_check_method=pass_all
5543   ;;
5544
5545 beos*)
5546   lt_cv_deplibs_check_method=pass_all
5547   ;;
5548
5549 bsdi[45]*)
5550   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
5551   lt_cv_file_magic_cmd='/usr/bin/file -L'
5552   lt_cv_file_magic_test_file=/shlib/libc.so
5553   ;;
5554
5555 cygwin*)
5556   # func_win32_libid is a shell function defined in ltmain.sh
5557   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5558   lt_cv_file_magic_cmd='func_win32_libid'
5559   ;;
5560
5561 mingw* | pw32*)
5562   # Base MSYS/MinGW do not provide the 'file' command needed by
5563   # func_win32_libid shell function, so use a weaker test based on 'objdump'.
5564   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
5565   lt_cv_file_magic_cmd='$OBJDUMP -f'
5566   ;;
5567
5568 darwin* | rhapsody*)
5569   lt_cv_deplibs_check_method=pass_all
5570   ;;
5571
5572 freebsd* | kfreebsd*-gnu | dragonfly*)
5573   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5574     case $host_cpu in
5575     i*86 )
5576       # Not sure whether the presence of OpenBSD here was a mistake.
5577       # Let's accept both of them until this is cleared up.
5578       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
5579       lt_cv_file_magic_cmd=/usr/bin/file
5580       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5581       ;;
5582     esac
5583   else
5584     lt_cv_deplibs_check_method=pass_all
5585   fi
5586   ;;
5587
5588 gnu*)
5589   lt_cv_deplibs_check_method=pass_all
5590   ;;
5591
5592 hpux10.20* | hpux11*)
5593   lt_cv_file_magic_cmd=/usr/bin/file
5594   case $host_cpu in
5595   ia64*)
5596     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
5597     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5598     ;;
5599   hppa*64*)
5600     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]'
5601     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5602     ;;
5603   *)
5604     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
5605     lt_cv_file_magic_test_file=/usr/lib/libc.sl
5606     ;;
5607   esac
5608   ;;
5609
5610 irix5* | irix6* | nonstopux*)
5611   case $LD in
5612   *-32|*"-32 ") libmagic=32-bit;;
5613   *-n32|*"-n32 ") libmagic=N32;;
5614   *-64|*"-64 ") libmagic=64-bit;;
5615   *) libmagic=never-match;;
5616   esac
5617   lt_cv_deplibs_check_method=pass_all
5618   ;;
5619
5620 # This must be Linux ELF.
5621 linux*)
5622   lt_cv_deplibs_check_method=pass_all
5623   ;;
5624
5625 netbsd*)
5626   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5627     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5628   else
5629     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
5630   fi
5631   ;;
5632
5633 newos6*)
5634   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
5635   lt_cv_file_magic_cmd=/usr/bin/file
5636   lt_cv_file_magic_test_file=/usr/lib/libnls.so
5637   ;;
5638
5639 nto-qnx*)
5640   lt_cv_deplibs_check_method=unknown
5641   ;;
5642
5643 openbsd*)
5644   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5645     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
5646   else
5647     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5648   fi
5649   ;;
5650
5651 osf3* | osf4* | osf5*)
5652   lt_cv_deplibs_check_method=pass_all
5653   ;;
5654
5655 sco3.2v5*)
5656   lt_cv_deplibs_check_method=pass_all
5657   ;;
5658
5659 solaris*)
5660   lt_cv_deplibs_check_method=pass_all
5661   ;;
5662
5663 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5664   case $host_vendor in
5665   motorola)
5666     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]'
5667     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5668     ;;
5669   ncr)
5670     lt_cv_deplibs_check_method=pass_all
5671     ;;
5672   sequent)
5673     lt_cv_file_magic_cmd='/bin/file'
5674     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
5675     ;;
5676   sni)
5677     lt_cv_file_magic_cmd='/bin/file'
5678     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
5679     lt_cv_file_magic_test_file=/lib/libc.so
5680     ;;
5681   siemens)
5682     lt_cv_deplibs_check_method=pass_all
5683     ;;
5684   esac
5685   ;;
5686
5687 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
5688   lt_cv_deplibs_check_method=pass_all
5689   ;;
5690 esac
5691
5692 fi
5693 echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
5694 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
5695 file_magic_cmd=$lt_cv_file_magic_cmd
5696 deplibs_check_method=$lt_cv_deplibs_check_method
5697 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5698
5699
5700
5701
5702 # If no C compiler was specified, use CC.
5703 LTCC=${LTCC-"$CC"}
5704
5705 # Allow CC to be a program name with arguments.
5706 compiler=$CC
5707
5708
5709 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
5710 if test "${enable_libtool_lock+set}" = set; then
5711   enableval="$enable_libtool_lock"
5712
5713 fi;
5714 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5715
5716 # Some flags need to be propagated to the compiler or linker for good
5717 # libtool support.
5718 case $host in
5719 ia64-*-hpux*)
5720   # Find out which ABI we are using.
5721   echo 'int i;' > conftest.$ac_ext
5722   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5723   (eval $ac_compile) 2>&5
5724   ac_status=$?
5725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5726   (exit $ac_status); }; then
5727     case `/usr/bin/file conftest.$ac_objext` in
5728     *ELF-32*)
5729       HPUX_IA64_MODE="32"
5730       ;;
5731     *ELF-64*)
5732       HPUX_IA64_MODE="64"
5733       ;;
5734     esac
5735   fi
5736   rm -rf conftest*
5737   ;;
5738 *-*-irix6*)
5739   # Find out which ABI we are using.
5740   echo '#line 5740 "configure"' > conftest.$ac_ext
5741   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5742   (eval $ac_compile) 2>&5
5743   ac_status=$?
5744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5745   (exit $ac_status); }; then
5746    if test "$lt_cv_prog_gnu_ld" = yes; then
5747     case `/usr/bin/file conftest.$ac_objext` in
5748     *32-bit*)
5749       LD="${LD-ld} -melf32bsmip"
5750       ;;
5751     *N32*)
5752       LD="${LD-ld} -melf32bmipn32"
5753       ;;
5754     *64-bit*)
5755       LD="${LD-ld} -melf64bmip"
5756       ;;
5757     esac
5758    else
5759     case `/usr/bin/file conftest.$ac_objext` in
5760     *32-bit*)
5761       LD="${LD-ld} -32"
5762       ;;
5763     *N32*)
5764       LD="${LD-ld} -n32"
5765       ;;
5766     *64-bit*)
5767       LD="${LD-ld} -64"
5768       ;;
5769     esac
5770    fi
5771   fi
5772   rm -rf conftest*
5773   ;;
5774
5775 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
5776   # Find out which ABI we are using.
5777   echo 'int i;' > conftest.$ac_ext
5778   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5779   (eval $ac_compile) 2>&5
5780   ac_status=$?
5781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5782   (exit $ac_status); }; then
5783     case `/usr/bin/file conftest.o` in
5784     *32-bit*)
5785       case $host in
5786         x86_64-*linux*)
5787           LD="${LD-ld} -m elf_i386"
5788           ;;
5789         ppc64-*linux*|powerpc64-*linux*)
5790           LD="${LD-ld} -m elf32ppclinux"
5791           ;;
5792         s390x-*linux*)
5793           LD="${LD-ld} -m elf_s390"
5794           ;;
5795         sparc64-*linux*)
5796           LD="${LD-ld} -m elf32_sparc"
5797           ;;
5798       esac
5799       ;;
5800     *64-bit*)
5801       case $host in
5802         x86_64-*linux*)
5803           LD="${LD-ld} -m elf_x86_64"
5804           ;;
5805         ppc*-*linux*|powerpc*-*linux*)
5806           LD="${LD-ld} -m elf64ppc"
5807           ;;
5808         s390*-*linux*)
5809           LD="${LD-ld} -m elf64_s390"
5810           ;;
5811         sparc*-*linux*)
5812           LD="${LD-ld} -m elf64_sparc"
5813           ;;
5814       esac
5815       ;;
5816     esac
5817   fi
5818   rm -rf conftest*
5819   ;;
5820
5821 *-*-sco3.2v5*)
5822   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
5823   SAVE_CFLAGS="$CFLAGS"
5824   CFLAGS="$CFLAGS -belf"
5825   echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
5826 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
5827 if test "${lt_cv_cc_needs_belf+set}" = set; then
5828   echo $ECHO_N "(cached) $ECHO_C" >&6
5829 else
5830   ac_ext=c
5831 ac_cpp='$CPP $CPPFLAGS'
5832 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5833 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5834 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5835
5836      cat >conftest.$ac_ext <<_ACEOF
5837 /* confdefs.h.  */
5838 _ACEOF
5839 cat confdefs.h >>conftest.$ac_ext
5840 cat >>conftest.$ac_ext <<_ACEOF
5841 /* end confdefs.h.  */
5842
5843 int
5844 main ()
5845 {
5846
5847   ;
5848   return 0;
5849 }
5850 _ACEOF
5851 rm -f conftest.$ac_objext conftest$ac_exeext
5852 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5853   (eval $ac_link) 2>conftest.er1
5854   ac_status=$?
5855   grep -v '^ *+' conftest.er1 >conftest.err
5856   rm -f conftest.er1
5857   cat conftest.err >&5
5858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5859   (exit $ac_status); } &&
5860          { ac_try='test -z "$ac_c_werror_flag"
5861                          || test ! -s conftest.err'
5862   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5863   (eval $ac_try) 2>&5
5864   ac_status=$?
5865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5866   (exit $ac_status); }; } &&
5867          { ac_try='test -s conftest$ac_exeext'
5868   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5869   (eval $ac_try) 2>&5
5870   ac_status=$?
5871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5872   (exit $ac_status); }; }; then
5873   lt_cv_cc_needs_belf=yes
5874 else
5875   echo "$as_me: failed program was:" >&5
5876 sed 's/^/| /' conftest.$ac_ext >&5
5877
5878 lt_cv_cc_needs_belf=no
5879 fi
5880 rm -f conftest.err conftest.$ac_objext \
5881       conftest$ac_exeext conftest.$ac_ext
5882      ac_ext=c
5883 ac_cpp='$CPP $CPPFLAGS'
5884 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5885 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5886 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5887
5888 fi
5889 echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
5890 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
5891   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5892     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5893     CFLAGS="$SAVE_CFLAGS"
5894   fi
5895   ;;
5896 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
5897   if test -n "$ac_tool_prefix"; then
5898   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5899 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
5900 echo "$as_me:$LINENO: checking for $ac_word" >&5
5901 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5902 if test "${ac_cv_prog_DLLTOOL+set}" = set; then
5903   echo $ECHO_N "(cached) $ECHO_C" >&6
5904 else
5905   if test -n "$DLLTOOL"; then
5906   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
5907 else
5908 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5909 for as_dir in $PATH
5910 do
5911   IFS=$as_save_IFS
5912   test -z "$as_dir" && as_dir=.
5913   for ac_exec_ext in '' $ac_executable_extensions; do
5914   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5915     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
5916     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5917     break 2
5918   fi
5919 done
5920 done
5921
5922 fi
5923 fi
5924 DLLTOOL=$ac_cv_prog_DLLTOOL
5925 if test -n "$DLLTOOL"; then
5926   echo "$as_me:$LINENO: result: $DLLTOOL" >&5
5927 echo "${ECHO_T}$DLLTOOL" >&6
5928 else
5929   echo "$as_me:$LINENO: result: no" >&5
5930 echo "${ECHO_T}no" >&6
5931 fi
5932
5933 fi
5934 if test -z "$ac_cv_prog_DLLTOOL"; then
5935   ac_ct_DLLTOOL=$DLLTOOL
5936   # Extract the first word of "dlltool", so it can be a program name with args.
5937 set dummy dlltool; ac_word=$2
5938 echo "$as_me:$LINENO: checking for $ac_word" >&5
5939 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5940 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
5941   echo $ECHO_N "(cached) $ECHO_C" >&6
5942 else
5943   if test -n "$ac_ct_DLLTOOL"; then
5944   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
5945 else
5946 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5947 for as_dir in $PATH
5948 do
5949   IFS=$as_save_IFS
5950   test -z "$as_dir" && as_dir=.
5951   for ac_exec_ext in '' $ac_executable_extensions; do
5952   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5953     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
5954     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5955     break 2
5956   fi
5957 done
5958 done
5959
5960   test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="false"
5961 fi
5962 fi
5963 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
5964 if test -n "$ac_ct_DLLTOOL"; then
5965   echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
5966 echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
5967 else
5968   echo "$as_me:$LINENO: result: no" >&5
5969 echo "${ECHO_T}no" >&6
5970 fi
5971
5972   DLLTOOL=$ac_ct_DLLTOOL
5973 else
5974   DLLTOOL="$ac_cv_prog_DLLTOOL"
5975 fi
5976
5977   if test -n "$ac_tool_prefix"; then
5978   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
5979 set dummy ${ac_tool_prefix}as; ac_word=$2
5980 echo "$as_me:$LINENO: checking for $ac_word" >&5
5981 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5982 if test "${ac_cv_prog_AS+set}" = set; then
5983   echo $ECHO_N "(cached) $ECHO_C" >&6
5984 else
5985   if test -n "$AS"; then
5986   ac_cv_prog_AS="$AS" # Let the user override the test.
5987 else
5988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5989 for as_dir in $PATH
5990 do
5991   IFS=$as_save_IFS
5992   test -z "$as_dir" && as_dir=.
5993   for ac_exec_ext in '' $ac_executable_extensions; do
5994   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5995     ac_cv_prog_AS="${ac_tool_prefix}as"
5996     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5997     break 2
5998   fi
5999 done
6000 done
6001
6002 fi
6003 fi
6004 AS=$ac_cv_prog_AS
6005 if test -n "$AS"; then
6006   echo "$as_me:$LINENO: result: $AS" >&5
6007 echo "${ECHO_T}$AS" >&6
6008 else
6009   echo "$as_me:$LINENO: result: no" >&5
6010 echo "${ECHO_T}no" >&6
6011 fi
6012
6013 fi
6014 if test -z "$ac_cv_prog_AS"; then
6015   ac_ct_AS=$AS
6016   # Extract the first word of "as", so it can be a program name with args.
6017 set dummy as; ac_word=$2
6018 echo "$as_me:$LINENO: checking for $ac_word" >&5
6019 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6020 if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
6021   echo $ECHO_N "(cached) $ECHO_C" >&6
6022 else
6023   if test -n "$ac_ct_AS"; then
6024   ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
6025 else
6026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6027 for as_dir in $PATH
6028 do
6029   IFS=$as_save_IFS
6030   test -z "$as_dir" && as_dir=.
6031   for ac_exec_ext in '' $ac_executable_extensions; do
6032   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6033     ac_cv_prog_ac_ct_AS="as"
6034     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6035     break 2
6036   fi
6037 done
6038 done
6039
6040   test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="false"
6041 fi
6042 fi
6043 ac_ct_AS=$ac_cv_prog_ac_ct_AS
6044 if test -n "$ac_ct_AS"; then
6045   echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
6046 echo "${ECHO_T}$ac_ct_AS" >&6
6047 else
6048   echo "$as_me:$LINENO: result: no" >&5
6049 echo "${ECHO_T}no" >&6
6050 fi
6051
6052   AS=$ac_ct_AS
6053 else
6054   AS="$ac_cv_prog_AS"
6055 fi
6056
6057   if test -n "$ac_tool_prefix"; then
6058   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
6059 set dummy ${ac_tool_prefix}objdump; ac_word=$2
6060 echo "$as_me:$LINENO: checking for $ac_word" >&5
6061 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6062 if test "${ac_cv_prog_OBJDUMP+set}" = set; then
6063   echo $ECHO_N "(cached) $ECHO_C" >&6
6064 else
6065   if test -n "$OBJDUMP"; then
6066   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
6067 else
6068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6069 for as_dir in $PATH
6070 do
6071   IFS=$as_save_IFS
6072   test -z "$as_dir" && as_dir=.
6073   for ac_exec_ext in '' $ac_executable_extensions; do
6074   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6075     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
6076     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6077     break 2
6078   fi
6079 done
6080 done
6081
6082 fi
6083 fi
6084 OBJDUMP=$ac_cv_prog_OBJDUMP
6085 if test -n "$OBJDUMP"; then
6086   echo "$as_me:$LINENO: result: $OBJDUMP" >&5
6087 echo "${ECHO_T}$OBJDUMP" >&6
6088 else
6089   echo "$as_me:$LINENO: result: no" >&5
6090 echo "${ECHO_T}no" >&6
6091 fi
6092
6093 fi
6094 if test -z "$ac_cv_prog_OBJDUMP"; then
6095   ac_ct_OBJDUMP=$OBJDUMP
6096   # Extract the first word of "objdump", so it can be a program name with args.
6097 set dummy objdump; ac_word=$2
6098 echo "$as_me:$LINENO: checking for $ac_word" >&5
6099 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6100 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
6101   echo $ECHO_N "(cached) $ECHO_C" >&6
6102 else
6103   if test -n "$ac_ct_OBJDUMP"; then
6104   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
6105 else
6106 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6107 for as_dir in $PATH
6108 do
6109   IFS=$as_save_IFS
6110   test -z "$as_dir" && as_dir=.
6111   for ac_exec_ext in '' $ac_executable_extensions; do
6112   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6113     ac_cv_prog_ac_ct_OBJDUMP="objdump"
6114     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6115     break 2
6116   fi
6117 done
6118 done
6119
6120   test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false"
6121 fi
6122 fi
6123 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
6124 if test -n "$ac_ct_OBJDUMP"; then
6125   echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
6126 echo "${ECHO_T}$ac_ct_OBJDUMP" >&6
6127 else
6128   echo "$as_me:$LINENO: result: no" >&5
6129 echo "${ECHO_T}no" >&6
6130 fi
6131
6132   OBJDUMP=$ac_ct_OBJDUMP
6133 else
6134   OBJDUMP="$ac_cv_prog_OBJDUMP"
6135 fi
6136
6137   ;;
6138
6139 esac
6140
6141 need_locks="$enable_libtool_lock"
6142
6143
6144 ac_ext=c
6145 ac_cpp='$CPP $CPPFLAGS'
6146 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6147 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6148 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6149 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
6150 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
6151 # On Suns, sometimes $CPP names a directory.
6152 if test -n "$CPP" && test -d "$CPP"; then
6153   CPP=
6154 fi
6155 if test -z "$CPP"; then
6156   if test "${ac_cv_prog_CPP+set}" = set; then
6157   echo $ECHO_N "(cached) $ECHO_C" >&6
6158 else
6159       # Double quotes because CPP needs to be expanded
6160     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6161     do
6162       ac_preproc_ok=false
6163 for ac_c_preproc_warn_flag in '' yes
6164 do
6165   # Use a header file that comes with gcc, so configuring glibc
6166   # with a fresh cross-compiler works.
6167   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6168   # <limits.h> exists even on freestanding compilers.
6169   # On the NeXT, cc -E runs the code through the compiler's parser,
6170   # not just through cpp. "Syntax error" is here to catch this case.
6171   cat >conftest.$ac_ext <<_ACEOF
6172 /* confdefs.h.  */
6173 _ACEOF
6174 cat confdefs.h >>conftest.$ac_ext
6175 cat >>conftest.$ac_ext <<_ACEOF
6176 /* end confdefs.h.  */
6177 #ifdef __STDC__
6178 # include <limits.h>
6179 #else
6180 # include <assert.h>
6181 #endif
6182                      Syntax error
6183 _ACEOF
6184 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6185   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6186   ac_status=$?
6187   grep -v '^ *+' conftest.er1 >conftest.err
6188   rm -f conftest.er1
6189   cat conftest.err >&5
6190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6191   (exit $ac_status); } >/dev/null; then
6192   if test -s conftest.err; then
6193     ac_cpp_err=$ac_c_preproc_warn_flag
6194     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6195   else
6196     ac_cpp_err=
6197   fi
6198 else
6199   ac_cpp_err=yes
6200 fi
6201 if test -z "$ac_cpp_err"; then
6202   :
6203 else
6204   echo "$as_me: failed program was:" >&5
6205 sed 's/^/| /' conftest.$ac_ext >&5
6206
6207   # Broken: fails on valid input.
6208 continue
6209 fi
6210 rm -f conftest.err conftest.$ac_ext
6211
6212   # OK, works on sane cases.  Now check whether non-existent headers
6213   # can be detected and how.
6214   cat >conftest.$ac_ext <<_ACEOF
6215 /* confdefs.h.  */
6216 _ACEOF
6217 cat confdefs.h >>conftest.$ac_ext
6218 cat >>conftest.$ac_ext <<_ACEOF
6219 /* end confdefs.h.  */
6220 #include <ac_nonexistent.h>
6221 _ACEOF
6222 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6223   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6224   ac_status=$?
6225   grep -v '^ *+' conftest.er1 >conftest.err
6226   rm -f conftest.er1
6227   cat conftest.err >&5
6228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6229   (exit $ac_status); } >/dev/null; then
6230   if test -s conftest.err; then
6231     ac_cpp_err=$ac_c_preproc_warn_flag
6232     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6233   else
6234     ac_cpp_err=
6235   fi
6236 else
6237   ac_cpp_err=yes
6238 fi
6239 if test -z "$ac_cpp_err"; then
6240   # Broken: success on invalid input.
6241 continue
6242 else
6243   echo "$as_me: failed program was:" >&5
6244 sed 's/^/| /' conftest.$ac_ext >&5
6245
6246   # Passes both tests.
6247 ac_preproc_ok=:
6248 break
6249 fi
6250 rm -f conftest.err conftest.$ac_ext
6251
6252 done
6253 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6254 rm -f conftest.err conftest.$ac_ext
6255 if $ac_preproc_ok; then
6256   break
6257 fi
6258
6259     done
6260     ac_cv_prog_CPP=$CPP
6261
6262 fi
6263   CPP=$ac_cv_prog_CPP
6264 else
6265   ac_cv_prog_CPP=$CPP
6266 fi
6267 echo "$as_me:$LINENO: result: $CPP" >&5
6268 echo "${ECHO_T}$CPP" >&6
6269 ac_preproc_ok=false
6270 for ac_c_preproc_warn_flag in '' yes
6271 do
6272   # Use a header file that comes with gcc, so configuring glibc
6273   # with a fresh cross-compiler works.
6274   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6275   # <limits.h> exists even on freestanding compilers.
6276   # On the NeXT, cc -E runs the code through the compiler's parser,
6277   # not just through cpp. "Syntax error" is here to catch this case.
6278   cat >conftest.$ac_ext <<_ACEOF
6279 /* confdefs.h.  */
6280 _ACEOF
6281 cat confdefs.h >>conftest.$ac_ext
6282 cat >>conftest.$ac_ext <<_ACEOF
6283 /* end confdefs.h.  */
6284 #ifdef __STDC__
6285 # include <limits.h>
6286 #else
6287 # include <assert.h>
6288 #endif
6289                      Syntax error
6290 _ACEOF
6291 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6292   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6293   ac_status=$?
6294   grep -v '^ *+' conftest.er1 >conftest.err
6295   rm -f conftest.er1
6296   cat conftest.err >&5
6297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6298   (exit $ac_status); } >/dev/null; then
6299   if test -s conftest.err; then
6300     ac_cpp_err=$ac_c_preproc_warn_flag
6301     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6302   else
6303     ac_cpp_err=
6304   fi
6305 else
6306   ac_cpp_err=yes
6307 fi
6308 if test -z "$ac_cpp_err"; then
6309   :
6310 else
6311   echo "$as_me: failed program was:" >&5
6312 sed 's/^/| /' conftest.$ac_ext >&5
6313
6314   # Broken: fails on valid input.
6315 continue
6316 fi
6317 rm -f conftest.err conftest.$ac_ext
6318
6319   # OK, works on sane cases.  Now check whether non-existent headers
6320   # can be detected and how.
6321   cat >conftest.$ac_ext <<_ACEOF
6322 /* confdefs.h.  */
6323 _ACEOF
6324 cat confdefs.h >>conftest.$ac_ext
6325 cat >>conftest.$ac_ext <<_ACEOF
6326 /* end confdefs.h.  */
6327 #include <ac_nonexistent.h>
6328 _ACEOF
6329 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6330   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6331   ac_status=$?
6332   grep -v '^ *+' conftest.er1 >conftest.err
6333   rm -f conftest.er1
6334   cat conftest.err >&5
6335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6336   (exit $ac_status); } >/dev/null; then
6337   if test -s conftest.err; then
6338     ac_cpp_err=$ac_c_preproc_warn_flag
6339     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6340   else
6341     ac_cpp_err=
6342   fi
6343 else
6344   ac_cpp_err=yes
6345 fi
6346 if test -z "$ac_cpp_err"; then
6347   # Broken: success on invalid input.
6348 continue
6349 else
6350   echo "$as_me: failed program was:" >&5
6351 sed 's/^/| /' conftest.$ac_ext >&5
6352
6353   # Passes both tests.
6354 ac_preproc_ok=:
6355 break
6356 fi
6357 rm -f conftest.err conftest.$ac_ext
6358
6359 done
6360 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6361 rm -f conftest.err conftest.$ac_ext
6362 if $ac_preproc_ok; then
6363   :
6364 else
6365   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
6366 See \`config.log' for more details." >&5
6367 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
6368 See \`config.log' for more details." >&2;}
6369    { (exit 1); exit 1; }; }
6370 fi
6371
6372 ac_ext=c
6373 ac_cpp='$CPP $CPPFLAGS'
6374 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6375 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6376 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6377
6378
6379 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6380 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6381 if test "${ac_cv_header_stdc+set}" = set; then
6382   echo $ECHO_N "(cached) $ECHO_C" >&6
6383 else
6384   cat >conftest.$ac_ext <<_ACEOF
6385 /* confdefs.h.  */
6386 _ACEOF
6387 cat confdefs.h >>conftest.$ac_ext
6388 cat >>conftest.$ac_ext <<_ACEOF
6389 /* end confdefs.h.  */
6390 #include <stdlib.h>
6391 #include <stdarg.h>
6392 #include <string.h>
6393 #include <float.h>
6394
6395 int
6396 main ()
6397 {
6398
6399   ;
6400   return 0;
6401 }
6402 _ACEOF
6403 rm -f conftest.$ac_objext
6404 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6405   (eval $ac_compile) 2>conftest.er1
6406   ac_status=$?
6407   grep -v '^ *+' conftest.er1 >conftest.err
6408   rm -f conftest.er1
6409   cat conftest.err >&5
6410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6411   (exit $ac_status); } &&
6412          { ac_try='test -z "$ac_c_werror_flag"
6413                          || test ! -s conftest.err'
6414   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6415   (eval $ac_try) 2>&5
6416   ac_status=$?
6417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6418   (exit $ac_status); }; } &&
6419          { ac_try='test -s conftest.$ac_objext'
6420   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6421   (eval $ac_try) 2>&5
6422   ac_status=$?
6423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6424   (exit $ac_status); }; }; then
6425   ac_cv_header_stdc=yes
6426 else
6427   echo "$as_me: failed program was:" >&5
6428 sed 's/^/| /' conftest.$ac_ext >&5
6429
6430 ac_cv_header_stdc=no
6431 fi
6432 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6433
6434 if test $ac_cv_header_stdc = yes; then
6435   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6436   cat >conftest.$ac_ext <<_ACEOF
6437 /* confdefs.h.  */
6438 _ACEOF
6439 cat confdefs.h >>conftest.$ac_ext
6440 cat >>conftest.$ac_ext <<_ACEOF
6441 /* end confdefs.h.  */
6442 #include <string.h>
6443
6444 _ACEOF
6445 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6446   $EGREP "memchr" >/dev/null 2>&1; then
6447   :
6448 else
6449   ac_cv_header_stdc=no
6450 fi
6451 rm -f conftest*
6452
6453 fi
6454
6455 if test $ac_cv_header_stdc = yes; then
6456   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6457   cat >conftest.$ac_ext <<_ACEOF
6458 /* confdefs.h.  */
6459 _ACEOF
6460 cat confdefs.h >>conftest.$ac_ext
6461 cat >>conftest.$ac_ext <<_ACEOF
6462 /* end confdefs.h.  */
6463 #include <stdlib.h>
6464
6465 _ACEOF
6466 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6467   $EGREP "free" >/dev/null 2>&1; then
6468   :
6469 else
6470   ac_cv_header_stdc=no
6471 fi
6472 rm -f conftest*
6473
6474 fi
6475
6476 if test $ac_cv_header_stdc = yes; then
6477   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6478   if test "$cross_compiling" = yes; then
6479   :
6480 else
6481   cat >conftest.$ac_ext <<_ACEOF
6482 /* confdefs.h.  */
6483 _ACEOF
6484 cat confdefs.h >>conftest.$ac_ext
6485 cat >>conftest.$ac_ext <<_ACEOF
6486 /* end confdefs.h.  */
6487 #include <ctype.h>
6488 #if ((' ' & 0x0FF) == 0x020)
6489 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6490 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6491 #else
6492 # define ISLOWER(c) \
6493                    (('a' <= (c) && (c) <= 'i') \
6494                      || ('j' <= (c) && (c) <= 'r') \
6495                      || ('s' <= (c) && (c) <= 'z'))
6496 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6497 #endif
6498
6499 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6500 int
6501 main ()
6502 {
6503   int i;
6504   for (i = 0; i < 256; i++)
6505     if (XOR (islower (i), ISLOWER (i))
6506         || toupper (i) != TOUPPER (i))
6507       exit(2);
6508   exit (0);
6509 }
6510 _ACEOF
6511 rm -f conftest$ac_exeext
6512 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6513   (eval $ac_link) 2>&5
6514   ac_status=$?
6515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6516   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6517   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6518   (eval $ac_try) 2>&5
6519   ac_status=$?
6520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6521   (exit $ac_status); }; }; then
6522   :
6523 else
6524   echo "$as_me: program exited with status $ac_status" >&5
6525 echo "$as_me: failed program was:" >&5
6526 sed 's/^/| /' conftest.$ac_ext >&5
6527
6528 ( exit $ac_status )
6529 ac_cv_header_stdc=no
6530 fi
6531 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6532 fi
6533 fi
6534 fi
6535 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6536 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6537 if test $ac_cv_header_stdc = yes; then
6538
6539 cat >>confdefs.h <<\_ACEOF
6540 #define STDC_HEADERS 1
6541 _ACEOF
6542
6543 fi
6544
6545 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6556                   inttypes.h stdint.h unistd.h
6557 do
6558 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6559 echo "$as_me:$LINENO: checking for $ac_header" >&5
6560 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6561 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6562   echo $ECHO_N "(cached) $ECHO_C" >&6
6563 else
6564   cat >conftest.$ac_ext <<_ACEOF
6565 /* confdefs.h.  */
6566 _ACEOF
6567 cat confdefs.h >>conftest.$ac_ext
6568 cat >>conftest.$ac_ext <<_ACEOF
6569 /* end confdefs.h.  */
6570 $ac_includes_default
6571
6572 #include <$ac_header>
6573 _ACEOF
6574 rm -f conftest.$ac_objext
6575 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6576   (eval $ac_compile) 2>conftest.er1
6577   ac_status=$?
6578   grep -v '^ *+' conftest.er1 >conftest.err
6579   rm -f conftest.er1
6580   cat conftest.err >&5
6581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6582   (exit $ac_status); } &&
6583          { ac_try='test -z "$ac_c_werror_flag"
6584                          || test ! -s conftest.err'
6585   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6586   (eval $ac_try) 2>&5
6587   ac_status=$?
6588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6589   (exit $ac_status); }; } &&
6590          { ac_try='test -s conftest.$ac_objext'
6591   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6592   (eval $ac_try) 2>&5
6593   ac_status=$?
6594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6595   (exit $ac_status); }; }; then
6596   eval "$as_ac_Header=yes"
6597 else
6598   echo "$as_me: failed program was:" >&5
6599 sed 's/^/| /' conftest.$ac_ext >&5
6600
6601 eval "$as_ac_Header=no"
6602 fi
6603 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6604 fi
6605 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6606 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6607 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6608   cat >>confdefs.h <<_ACEOF
6609 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6610 _ACEOF
6611
6612 fi
6613
6614 done
6615
6616
6617
6618 for ac_header in dlfcn.h
6619 do
6620 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6621 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6622   echo "$as_me:$LINENO: checking for $ac_header" >&5
6623 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6624 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6625   echo $ECHO_N "(cached) $ECHO_C" >&6
6626 fi
6627 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6628 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6629 else
6630   # Is the header compilable?
6631 echo "$as_me:$LINENO: checking $ac_header usability" >&5
6632 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6633 cat >conftest.$ac_ext <<_ACEOF
6634 /* confdefs.h.  */
6635 _ACEOF
6636 cat confdefs.h >>conftest.$ac_ext
6637 cat >>conftest.$ac_ext <<_ACEOF
6638 /* end confdefs.h.  */
6639 $ac_includes_default
6640 #include <$ac_header>
6641 _ACEOF
6642 rm -f conftest.$ac_objext
6643 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6644   (eval $ac_compile) 2>conftest.er1
6645   ac_status=$?
6646   grep -v '^ *+' conftest.er1 >conftest.err
6647   rm -f conftest.er1
6648   cat conftest.err >&5
6649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6650   (exit $ac_status); } &&
6651          { ac_try='test -z "$ac_c_werror_flag"
6652                          || test ! -s conftest.err'
6653   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6654   (eval $ac_try) 2>&5
6655   ac_status=$?
6656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6657   (exit $ac_status); }; } &&
6658          { ac_try='test -s conftest.$ac_objext'
6659   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6660   (eval $ac_try) 2>&5
6661   ac_status=$?
6662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6663   (exit $ac_status); }; }; then
6664   ac_header_compiler=yes
6665 else
6666   echo "$as_me: failed program was:" >&5
6667 sed 's/^/| /' conftest.$ac_ext >&5
6668
6669 ac_header_compiler=no
6670 fi
6671 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6672 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6673 echo "${ECHO_T}$ac_header_compiler" >&6
6674
6675 # Is the header present?
6676 echo "$as_me:$LINENO: checking $ac_header presence" >&5
6677 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6678 cat >conftest.$ac_ext <<_ACEOF
6679 /* confdefs.h.  */
6680 _ACEOF
6681 cat confdefs.h >>conftest.$ac_ext
6682 cat >>conftest.$ac_ext <<_ACEOF
6683 /* end confdefs.h.  */
6684 #include <$ac_header>
6685 _ACEOF
6686 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6687   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6688   ac_status=$?
6689   grep -v '^ *+' conftest.er1 >conftest.err
6690   rm -f conftest.er1
6691   cat conftest.err >&5
6692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6693   (exit $ac_status); } >/dev/null; then
6694   if test -s conftest.err; then
6695     ac_cpp_err=$ac_c_preproc_warn_flag
6696     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6697   else
6698     ac_cpp_err=
6699   fi
6700 else
6701   ac_cpp_err=yes
6702 fi
6703 if test -z "$ac_cpp_err"; then
6704   ac_header_preproc=yes
6705 else
6706   echo "$as_me: failed program was:" >&5
6707 sed 's/^/| /' conftest.$ac_ext >&5
6708
6709   ac_header_preproc=no
6710 fi
6711 rm -f conftest.err conftest.$ac_ext
6712 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6713 echo "${ECHO_T}$ac_header_preproc" >&6
6714
6715 # So?  What about this header?
6716 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6717   yes:no: )
6718     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6719 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6720     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6721 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6722     ac_header_preproc=yes
6723     ;;
6724   no:yes:* )
6725     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6726 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6727     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6728 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6729     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6730 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6731     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6732 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6733     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6734 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6735     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6736 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6737     (
6738       cat <<\_ASBOX
6739 ## --------------------------------------------- ##
6740 ## Report this to <http://www.openldap.org/its/> ##
6741 ## --------------------------------------------- ##
6742 _ASBOX
6743     ) |
6744       sed "s/^/$as_me: WARNING:     /" >&2
6745     ;;
6746 esac
6747 echo "$as_me:$LINENO: checking for $ac_header" >&5
6748 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6749 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6750   echo $ECHO_N "(cached) $ECHO_C" >&6
6751 else
6752   eval "$as_ac_Header=\$ac_header_preproc"
6753 fi
6754 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6755 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6756
6757 fi
6758 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6759   cat >>confdefs.h <<_ACEOF
6760 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6761 _ACEOF
6762
6763 fi
6764
6765 done
6766
6767
6768 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
6769
6770 # find the maximum length of command line arguments
6771 echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
6772 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
6773 if test "${lt_cv_sys_max_cmd_len+set}" = set; then
6774   echo $ECHO_N "(cached) $ECHO_C" >&6
6775 else
6776     i=0
6777   teststring="ABCD"
6778
6779   case $build_os in
6780   msdosdjgpp*)
6781     # On DJGPP, this test can blow up pretty badly due to problems in libc
6782     # (any single argument exceeding 2000 bytes causes a buffer overrun
6783     # during glob expansion).  Even if it were fixed, the result of this
6784     # check would be larger than it should be.
6785     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
6786     ;;
6787
6788   gnu*)
6789     # Under GNU Hurd, this test is not required because there is
6790     # no limit to the length of command line arguments.
6791     # Libtool will interpret -1 as no limit whatsoever
6792     lt_cv_sys_max_cmd_len=-1;
6793     ;;
6794
6795   cygwin* | mingw*)
6796     # On Win9x/ME, this test blows up -- it succeeds, but takes
6797     # about 5 minutes as the teststring grows exponentially.
6798     # Worse, since 9x/ME are not pre-emptively multitasking,
6799     # you end up with a "frozen" computer, even though with patience
6800     # the test eventually succeeds (with a max line length of 256k).
6801     # Instead, let's just punt: use the minimum linelength reported by
6802     # all of the supported platforms: 8192 (on NT/2K/XP).
6803     lt_cv_sys_max_cmd_len=8192;
6804     ;;
6805
6806   amigaos*)
6807     # On AmigaOS with pdksh, this test takes hours, literally.
6808     # So we just punt and use a minimum line length of 8192.
6809     lt_cv_sys_max_cmd_len=8192;
6810     ;;
6811
6812   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
6813     # This has been around since 386BSD, at least.  Likely further.
6814     if test -x /sbin/sysctl; then
6815       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
6816     elif test -x /usr/sbin/sysctl; then
6817       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
6818     else
6819       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
6820     fi
6821     # And add a safety zone
6822     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6823     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6824     ;;
6825   osf*)
6826     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
6827     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
6828     # nice to cause kernel panics so lets avoid the loop below.
6829     # First set a reasonable default.
6830     lt_cv_sys_max_cmd_len=16384
6831     #
6832     if test -x /sbin/sysconfig; then
6833       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
6834         *1*) lt_cv_sys_max_cmd_len=-1 ;;
6835       esac
6836     fi
6837     ;;
6838   *)
6839     # If test is not a shell built-in, we'll probably end up computing a
6840     # maximum length that is only half of the actual maximum length, but
6841     # we can't tell.
6842     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
6843     while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
6844                = "XX$teststring") >/dev/null 2>&1 &&
6845             new_result=`expr "X$teststring" : ".*" 2>&1` &&
6846             lt_cv_sys_max_cmd_len=$new_result &&
6847             test $i != 17 # 1/2 MB should be enough
6848     do
6849       i=`expr $i + 1`
6850       teststring=$teststring$teststring
6851     done
6852     teststring=
6853     # Add a significant safety factor because C++ compilers can tack on massive
6854     # amounts of additional arguments before passing them to the linker.
6855     # It appears as though 1/2 is a usable value.
6856     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6857     ;;
6858   esac
6859
6860 fi
6861
6862 if test -n $lt_cv_sys_max_cmd_len ; then
6863   echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
6864 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
6865 else
6866   echo "$as_me:$LINENO: result: none" >&5
6867 echo "${ECHO_T}none" >&6
6868 fi
6869
6870
6871
6872
6873 # Check for command to grab the raw symbol name followed by C symbol from nm.
6874 echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
6875 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
6876 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
6877   echo $ECHO_N "(cached) $ECHO_C" >&6
6878 else
6879
6880 # These are sane defaults that work on at least a few old systems.
6881 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
6882
6883 # Character class describing NM global symbol codes.
6884 symcode='[BCDEGRST]'
6885
6886 # Regexp to match symbols that can be accessed directly from C.
6887 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
6888
6889 # Transform an extracted symbol line into a proper C declaration
6890 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6891
6892 # Transform an extracted symbol line into symbol name and symbol address
6893 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'"
6894
6895 # Define system-specific variables.
6896 case $host_os in
6897 aix*)
6898   symcode='[BCDT]'
6899   ;;
6900 cygwin* | mingw* | pw32*)
6901   symcode='[ABCDGISTW]'
6902   ;;
6903 hpux*) # Its linker distinguishes data from code symbols
6904   if test "$host_cpu" = ia64; then
6905     symcode='[ABCDEGRST]'
6906   fi
6907   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6908   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'"
6909   ;;
6910 linux*)
6911   if test "$host_cpu" = ia64; then
6912     symcode='[ABCDGIRSTW]'
6913     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6914     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'"
6915   fi
6916   ;;
6917 irix* | nonstopux*)
6918   symcode='[BCDEGRST]'
6919   ;;
6920 osf*)
6921   symcode='[BCDEGQRST]'
6922   ;;
6923 solaris* | sysv5*)
6924   symcode='[BDRT]'
6925   ;;
6926 sysv4)
6927   symcode='[DFNSTU]'
6928   ;;
6929 esac
6930
6931 # Handle CRLF in mingw tool chain
6932 opt_cr=
6933 case $build_os in
6934 mingw*)
6935   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6936   ;;
6937 esac
6938
6939 # If we're using GNU nm, then use its standard symbol codes.
6940 case `$NM -V 2>&1` in
6941 *GNU* | *'with BFD'*)
6942   symcode='[ABCDGIRSTW]' ;;
6943 esac
6944
6945 # Try without a prefix undercore, then with it.
6946 for ac_symprfx in "" "_"; do
6947
6948   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6949   symxfrm="\\1 $ac_symprfx\\2 \\2"
6950
6951   # Write the raw and C identifiers.
6952   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[       ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6953
6954   # Check to see that the pipe works correctly.
6955   pipe_works=no
6956
6957   rm -f conftest*
6958   cat > conftest.$ac_ext <<EOF
6959 #ifdef __cplusplus
6960 extern "C" {
6961 #endif
6962 char nm_test_var;
6963 void nm_test_func(){}
6964 #ifdef __cplusplus
6965 }
6966 #endif
6967 int main(){nm_test_var='a';nm_test_func();return(0);}
6968 EOF
6969
6970   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6971   (eval $ac_compile) 2>&5
6972   ac_status=$?
6973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6974   (exit $ac_status); }; then
6975     # Now try to grab the symbols.
6976     nlist=conftest.nm
6977     if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
6978   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
6979   ac_status=$?
6980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6981   (exit $ac_status); } && test -s "$nlist"; then
6982       # Try sorting and uniquifying the output.
6983       if sort "$nlist" | uniq > "$nlist"T; then
6984         mv -f "$nlist"T "$nlist"
6985       else
6986         rm -f "$nlist"T
6987       fi
6988
6989       # Make sure that we snagged all the symbols we need.
6990       if grep ' nm_test_var$' "$nlist" >/dev/null; then
6991         if grep ' nm_test_func$' "$nlist" >/dev/null; then
6992           cat <<EOF > conftest.$ac_ext
6993 #ifdef __cplusplus
6994 extern "C" {
6995 #endif
6996
6997 EOF
6998           # Now generate the symbol file.
6999           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
7000
7001           cat <<EOF >> conftest.$ac_ext
7002 #if defined (__STDC__) && __STDC__
7003 # define lt_ptr_t void *
7004 #else
7005 # define lt_ptr_t char *
7006 # define const
7007 #endif
7008
7009 /* The mapping between symbol names and symbols. */
7010 const struct {
7011   const char *name;
7012   lt_ptr_t address;
7013 }
7014 lt_preloaded_symbols[] =
7015 {
7016 EOF
7017           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
7018           cat <<\EOF >> conftest.$ac_ext
7019   {0, (lt_ptr_t) 0}
7020 };
7021
7022 #ifdef __cplusplus
7023 }
7024 #endif
7025 EOF
7026           # Now try linking the two files.
7027           mv conftest.$ac_objext conftstm.$ac_objext
7028           lt_save_LIBS="$LIBS"
7029           lt_save_CFLAGS="$CFLAGS"
7030           LIBS="conftstm.$ac_objext"
7031           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7032           if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7033   (eval $ac_link) 2>&5
7034   ac_status=$?
7035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7036   (exit $ac_status); } && test -s conftest${ac_exeext}; then
7037             pipe_works=yes
7038           fi
7039           LIBS="$lt_save_LIBS"
7040           CFLAGS="$lt_save_CFLAGS"
7041         else
7042           echo "cannot find nm_test_func in $nlist" >&5
7043         fi
7044       else
7045         echo "cannot find nm_test_var in $nlist" >&5
7046       fi
7047     else
7048       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7049     fi
7050   else
7051     echo "$progname: failed program was:" >&5
7052     cat conftest.$ac_ext >&5
7053   fi
7054   rm -f conftest* conftst*
7055
7056   # Do not use the global_symbol_pipe unless it works.
7057   if test "$pipe_works" = yes; then
7058     break
7059   else
7060     lt_cv_sys_global_symbol_pipe=
7061   fi
7062 done
7063
7064 fi
7065
7066 if test -z "$lt_cv_sys_global_symbol_pipe"; then
7067   lt_cv_sys_global_symbol_to_cdecl=
7068 fi
7069 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7070   echo "$as_me:$LINENO: result: failed" >&5
7071 echo "${ECHO_T}failed" >&6
7072 else
7073   echo "$as_me:$LINENO: result: ok" >&5
7074 echo "${ECHO_T}ok" >&6
7075 fi
7076
7077 echo "$as_me:$LINENO: checking for objdir" >&5
7078 echo $ECHO_N "checking for objdir... $ECHO_C" >&6
7079 if test "${lt_cv_objdir+set}" = set; then
7080   echo $ECHO_N "(cached) $ECHO_C" >&6
7081 else
7082   rm -f .libs 2>/dev/null
7083 mkdir .libs 2>/dev/null
7084 if test -d .libs; then
7085   lt_cv_objdir=.libs
7086 else
7087   # MS-DOS does not allow filenames that begin with a dot.
7088   lt_cv_objdir=_libs
7089 fi
7090 rmdir .libs 2>/dev/null
7091 fi
7092 echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
7093 echo "${ECHO_T}$lt_cv_objdir" >&6
7094 objdir=$lt_cv_objdir
7095
7096
7097
7098
7099
7100 case $host_os in
7101 aix3*)
7102   # AIX sometimes has problems with the GCC collect2 program.  For some
7103   # reason, if we set the COLLECT_NAMES environment variable, the problems
7104   # vanish in a puff of smoke.
7105   if test "X${COLLECT_NAMES+set}" != Xset; then
7106     COLLECT_NAMES=
7107     export COLLECT_NAMES
7108   fi
7109   ;;
7110 esac
7111
7112 # Sed substitution that helps us do robust quoting.  It backslashifies
7113 # metacharacters that are still active within double-quoted strings.
7114 Xsed='sed -e 1s/^X//'
7115 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
7116
7117 # Same as above, but do not quote variable references.
7118 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
7119
7120 # Sed substitution to delay expansion of an escaped shell variable in a
7121 # double_quote_subst'ed string.
7122 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7123
7124 # Sed substitution to avoid accidental globbing in evaled expressions
7125 no_glob_subst='s/\*/\\\*/g'
7126
7127 # Constants:
7128 rm="rm -f"
7129
7130 # Global variables:
7131 default_ofile=libtool
7132 can_build_shared=yes
7133
7134 # All known linkers require a `.a' archive for static linking (except MSVC,
7135 # which needs '.lib').
7136 libext=a
7137 ltmain="$ac_aux_dir/ltmain.sh"
7138 ofile="$default_ofile"
7139 with_gnu_ld="$lt_cv_prog_gnu_ld"
7140
7141 if test -n "$ac_tool_prefix"; then
7142   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7143 set dummy ${ac_tool_prefix}ar; ac_word=$2
7144 echo "$as_me:$LINENO: checking for $ac_word" >&5
7145 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7146 if test "${ac_cv_prog_AR+set}" = set; then
7147   echo $ECHO_N "(cached) $ECHO_C" >&6
7148 else
7149   if test -n "$AR"; then
7150   ac_cv_prog_AR="$AR" # Let the user override the test.
7151 else
7152 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7153 for as_dir in $PATH
7154 do
7155   IFS=$as_save_IFS
7156   test -z "$as_dir" && as_dir=.
7157   for ac_exec_ext in '' $ac_executable_extensions; do
7158   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7159     ac_cv_prog_AR="${ac_tool_prefix}ar"
7160     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7161     break 2
7162   fi
7163 done
7164 done
7165
7166 fi
7167 fi
7168 AR=$ac_cv_prog_AR
7169 if test -n "$AR"; then
7170   echo "$as_me:$LINENO: result: $AR" >&5
7171 echo "${ECHO_T}$AR" >&6
7172 else
7173   echo "$as_me:$LINENO: result: no" >&5
7174 echo "${ECHO_T}no" >&6
7175 fi
7176
7177 fi
7178 if test -z "$ac_cv_prog_AR"; then
7179   ac_ct_AR=$AR
7180   # Extract the first word of "ar", so it can be a program name with args.
7181 set dummy ar; ac_word=$2
7182 echo "$as_me:$LINENO: checking for $ac_word" >&5
7183 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7184 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
7185   echo $ECHO_N "(cached) $ECHO_C" >&6
7186 else
7187   if test -n "$ac_ct_AR"; then
7188   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7189 else
7190 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7191 for as_dir in $PATH
7192 do
7193   IFS=$as_save_IFS
7194   test -z "$as_dir" && as_dir=.
7195   for ac_exec_ext in '' $ac_executable_extensions; do
7196   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7197     ac_cv_prog_ac_ct_AR="ar"
7198     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7199     break 2
7200   fi
7201 done
7202 done
7203
7204   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
7205 fi
7206 fi
7207 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7208 if test -n "$ac_ct_AR"; then
7209   echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
7210 echo "${ECHO_T}$ac_ct_AR" >&6
7211 else
7212   echo "$as_me:$LINENO: result: no" >&5
7213 echo "${ECHO_T}no" >&6
7214 fi
7215
7216   AR=$ac_ct_AR
7217 else
7218   AR="$ac_cv_prog_AR"
7219 fi
7220
7221 if test -n "$ac_tool_prefix"; then
7222   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7223 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7224 echo "$as_me:$LINENO: checking for $ac_word" >&5
7225 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7226 if test "${ac_cv_prog_RANLIB+set}" = set; then
7227   echo $ECHO_N "(cached) $ECHO_C" >&6
7228 else
7229   if test -n "$RANLIB"; then
7230   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7231 else
7232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7233 for as_dir in $PATH
7234 do
7235   IFS=$as_save_IFS
7236   test -z "$as_dir" && as_dir=.
7237   for ac_exec_ext in '' $ac_executable_extensions; do
7238   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7239     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7240     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7241     break 2
7242   fi
7243 done
7244 done
7245
7246 fi
7247 fi
7248 RANLIB=$ac_cv_prog_RANLIB
7249 if test -n "$RANLIB"; then
7250   echo "$as_me:$LINENO: result: $RANLIB" >&5
7251 echo "${ECHO_T}$RANLIB" >&6
7252 else
7253   echo "$as_me:$LINENO: result: no" >&5
7254 echo "${ECHO_T}no" >&6
7255 fi
7256
7257 fi
7258 if test -z "$ac_cv_prog_RANLIB"; then
7259   ac_ct_RANLIB=$RANLIB
7260   # Extract the first word of "ranlib", so it can be a program name with args.
7261 set dummy ranlib; ac_word=$2
7262 echo "$as_me:$LINENO: checking for $ac_word" >&5
7263 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7264 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7265   echo $ECHO_N "(cached) $ECHO_C" >&6
7266 else
7267   if test -n "$ac_ct_RANLIB"; then
7268   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7269 else
7270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7271 for as_dir in $PATH
7272 do
7273   IFS=$as_save_IFS
7274   test -z "$as_dir" && as_dir=.
7275   for ac_exec_ext in '' $ac_executable_extensions; do
7276   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7277     ac_cv_prog_ac_ct_RANLIB="ranlib"
7278     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7279     break 2
7280   fi
7281 done
7282 done
7283
7284   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7285 fi
7286 fi
7287 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7288 if test -n "$ac_ct_RANLIB"; then
7289   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7290 echo "${ECHO_T}$ac_ct_RANLIB" >&6
7291 else
7292   echo "$as_me:$LINENO: result: no" >&5
7293 echo "${ECHO_T}no" >&6
7294 fi
7295
7296   RANLIB=$ac_ct_RANLIB
7297 else
7298   RANLIB="$ac_cv_prog_RANLIB"
7299 fi
7300
7301 if test -n "$ac_tool_prefix"; then
7302   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7303 set dummy ${ac_tool_prefix}strip; ac_word=$2
7304 echo "$as_me:$LINENO: checking for $ac_word" >&5
7305 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7306 if test "${ac_cv_prog_STRIP+set}" = set; then
7307   echo $ECHO_N "(cached) $ECHO_C" >&6
7308 else
7309   if test -n "$STRIP"; then
7310   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7311 else
7312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7313 for as_dir in $PATH
7314 do
7315   IFS=$as_save_IFS
7316   test -z "$as_dir" && as_dir=.
7317   for ac_exec_ext in '' $ac_executable_extensions; do
7318   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7319     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7320     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7321     break 2
7322   fi
7323 done
7324 done
7325
7326 fi
7327 fi
7328 STRIP=$ac_cv_prog_STRIP
7329 if test -n "$STRIP"; then
7330   echo "$as_me:$LINENO: result: $STRIP" >&5
7331 echo "${ECHO_T}$STRIP" >&6
7332 else
7333   echo "$as_me:$LINENO: result: no" >&5
7334 echo "${ECHO_T}no" >&6
7335 fi
7336
7337 fi
7338 if test -z "$ac_cv_prog_STRIP"; then
7339   ac_ct_STRIP=$STRIP
7340   # Extract the first word of "strip", so it can be a program name with args.
7341 set dummy strip; ac_word=$2
7342 echo "$as_me:$LINENO: checking for $ac_word" >&5
7343 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7344 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
7345   echo $ECHO_N "(cached) $ECHO_C" >&6
7346 else
7347   if test -n "$ac_ct_STRIP"; then
7348   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7349 else
7350 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7351 for as_dir in $PATH
7352 do
7353   IFS=$as_save_IFS
7354   test -z "$as_dir" && as_dir=.
7355   for ac_exec_ext in '' $ac_executable_extensions; do
7356   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7357     ac_cv_prog_ac_ct_STRIP="strip"
7358     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7359     break 2
7360   fi
7361 done
7362 done
7363
7364   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
7365 fi
7366 fi
7367 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7368 if test -n "$ac_ct_STRIP"; then
7369   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
7370 echo "${ECHO_T}$ac_ct_STRIP" >&6
7371 else
7372   echo "$as_me:$LINENO: result: no" >&5
7373 echo "${ECHO_T}no" >&6
7374 fi
7375
7376   STRIP=$ac_ct_STRIP
7377 else
7378   STRIP="$ac_cv_prog_STRIP"
7379 fi
7380
7381
7382 old_CC="$CC"
7383 old_CFLAGS="$CFLAGS"
7384
7385 # Set sane defaults for various variables
7386 test -z "$AR" && AR=ar
7387 test -z "$AR_FLAGS" && AR_FLAGS=cru
7388 test -z "$AS" && AS=as
7389 test -z "$CC" && CC=cc
7390 test -z "$LTCC" && LTCC=$CC
7391 test -z "$DLLTOOL" && DLLTOOL=dlltool
7392 test -z "$LD" && LD=ld
7393 test -z "$LN_S" && LN_S="ln -s"
7394 test -z "$MAGIC_CMD" && MAGIC_CMD=file
7395 test -z "$NM" && NM=nm
7396 test -z "$SED" && SED=sed
7397 test -z "$OBJDUMP" && OBJDUMP=objdump
7398 test -z "$RANLIB" && RANLIB=:
7399 test -z "$STRIP" && STRIP=:
7400 test -z "$ac_objext" && ac_objext=o
7401
7402 # Determine commands to create old-style static archives.
7403 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
7404 old_postinstall_cmds='chmod 644 $oldlib'
7405 old_postuninstall_cmds=
7406
7407 if test -n "$RANLIB"; then
7408   case $host_os in
7409   openbsd*)
7410     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
7411     ;;
7412   *)
7413     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
7414     ;;
7415   esac
7416   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
7417 fi
7418
7419 for cc_temp in $compiler""; do
7420   case $cc_temp in
7421     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
7422     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
7423     \-*) ;;
7424     *) break;;
7425   esac
7426 done
7427 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
7428
7429
7430 # Only perform the check for file, if the check method requires it
7431 case $deplibs_check_method in
7432 file_magic*)
7433   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
7434     echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
7435 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
7436 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
7437   echo $ECHO_N "(cached) $ECHO_C" >&6
7438 else
7439   case $MAGIC_CMD in
7440 [\\/*] |  ?:[\\/]*)
7441   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7442   ;;
7443 *)
7444   lt_save_MAGIC_CMD="$MAGIC_CMD"
7445   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7446   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7447   for ac_dir in $ac_dummy; do
7448     IFS="$lt_save_ifs"
7449     test -z "$ac_dir" && ac_dir=.
7450     if test -f $ac_dir/${ac_tool_prefix}file; then
7451       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
7452       if test -n "$file_magic_test_file"; then
7453         case $deplibs_check_method in
7454         "file_magic "*)
7455           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7456           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7457           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7458             $EGREP "$file_magic_regex" > /dev/null; then
7459             :
7460           else
7461             cat <<EOF 1>&2
7462
7463 *** Warning: the command libtool uses to detect shared libraries,
7464 *** $file_magic_cmd, produces output that libtool cannot recognize.
7465 *** The result is that libtool may fail to recognize shared libraries
7466 *** as such.  This will affect the creation of libtool libraries that
7467 *** depend on shared libraries, but programs linked with such libtool
7468 *** libraries will work regardless of this problem.  Nevertheless, you
7469 *** may want to report the problem to your system manager and/or to
7470 *** bug-libtool@gnu.org
7471
7472 EOF
7473           fi ;;
7474         esac
7475       fi
7476       break
7477     fi
7478   done
7479   IFS="$lt_save_ifs"
7480   MAGIC_CMD="$lt_save_MAGIC_CMD"
7481   ;;
7482 esac
7483 fi
7484
7485 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7486 if test -n "$MAGIC_CMD"; then
7487   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
7488 echo "${ECHO_T}$MAGIC_CMD" >&6
7489 else
7490   echo "$as_me:$LINENO: result: no" >&5
7491 echo "${ECHO_T}no" >&6
7492 fi
7493
7494 if test -z "$lt_cv_path_MAGIC_CMD"; then
7495   if test -n "$ac_tool_prefix"; then
7496     echo "$as_me:$LINENO: checking for file" >&5
7497 echo $ECHO_N "checking for file... $ECHO_C" >&6
7498 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
7499   echo $ECHO_N "(cached) $ECHO_C" >&6
7500 else
7501   case $MAGIC_CMD in
7502 [\\/*] |  ?:[\\/]*)
7503   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7504   ;;
7505 *)
7506   lt_save_MAGIC_CMD="$MAGIC_CMD"
7507   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7508   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7509   for ac_dir in $ac_dummy; do
7510     IFS="$lt_save_ifs"
7511     test -z "$ac_dir" && ac_dir=.
7512     if test -f $ac_dir/file; then
7513       lt_cv_path_MAGIC_CMD="$ac_dir/file"
7514       if test -n "$file_magic_test_file"; then
7515         case $deplibs_check_method in
7516         "file_magic "*)
7517           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7518           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7519           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7520             $EGREP "$file_magic_regex" > /dev/null; then
7521             :
7522           else
7523             cat <<EOF 1>&2
7524
7525 *** Warning: the command libtool uses to detect shared libraries,
7526 *** $file_magic_cmd, produces output that libtool cannot recognize.
7527 *** The result is that libtool may fail to recognize shared libraries
7528 *** as such.  This will affect the creation of libtool libraries that
7529 *** depend on shared libraries, but programs linked with such libtool
7530 *** libraries will work regardless of this problem.  Nevertheless, you
7531 *** may want to report the problem to your system manager and/or to
7532 *** bug-libtool@gnu.org
7533
7534 EOF
7535           fi ;;
7536         esac
7537       fi
7538       break
7539     fi
7540   done
7541   IFS="$lt_save_ifs"
7542   MAGIC_CMD="$lt_save_MAGIC_CMD"
7543   ;;
7544 esac
7545 fi
7546
7547 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7548 if test -n "$MAGIC_CMD"; then
7549   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
7550 echo "${ECHO_T}$MAGIC_CMD" >&6
7551 else
7552   echo "$as_me:$LINENO: result: no" >&5
7553 echo "${ECHO_T}no" >&6
7554 fi
7555
7556   else
7557     MAGIC_CMD=:
7558   fi
7559 fi
7560
7561   fi
7562   ;;
7563 esac
7564
7565 enable_dlopen=yes
7566 enable_win32_dll=yes
7567
7568 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
7569 if test "${enable_libtool_lock+set}" = set; then
7570   enableval="$enable_libtool_lock"
7571
7572 fi;
7573 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
7574
7575
7576 # Check whether --with-pic or --without-pic was given.
7577 if test "${with_pic+set}" = set; then
7578   withval="$with_pic"
7579   pic_mode="$withval"
7580 else
7581   pic_mode=default
7582 fi;
7583 test -z "$pic_mode" && pic_mode=default
7584
7585 # Use C for the default configuration in the libtool script
7586 tagname=
7587 lt_save_CC="$CC"
7588 ac_ext=c
7589 ac_cpp='$CPP $CPPFLAGS'
7590 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7591 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7592 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7593
7594
7595 # Source file extension for C test sources.
7596 ac_ext=c
7597
7598 # Object file extension for compiled C test sources.
7599 objext=o
7600 objext=$objext
7601
7602 # Code to be used in simple compile tests
7603 lt_simple_compile_test_code="int some_variable = 0;\n"
7604
7605 # Code to be used in simple link tests
7606 lt_simple_link_test_code='int main(){return(0);}\n'
7607
7608
7609 # If no C compiler was specified, use CC.
7610 LTCC=${LTCC-"$CC"}
7611
7612 # Allow CC to be a program name with arguments.
7613 compiler=$CC
7614
7615
7616 # save warnings/boilerplate of simple test code
7617 ac_outfile=conftest.$ac_objext
7618 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
7619 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
7620 _lt_compiler_boilerplate=`cat conftest.err`
7621 $rm conftest*
7622
7623 ac_outfile=conftest.$ac_objext
7624 printf "$lt_simple_link_test_code" >conftest.$ac_ext
7625 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
7626 _lt_linker_boilerplate=`cat conftest.err`
7627 $rm conftest*
7628
7629
7630 #
7631 # Check for any special shared library compilation flags.
7632 #
7633 lt_prog_cc_shlib=
7634 if test "$GCC" = no; then
7635   case $host_os in
7636   sco3.2v5*)
7637     lt_prog_cc_shlib='-belf'
7638     ;;
7639   esac
7640 fi
7641 if test -n "$lt_prog_cc_shlib"; then
7642   { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
7643 echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
7644   if echo "$old_CC $old_CFLAGS " | grep "[      ]$lt_prog_cc_shlib[     ]" >/dev/null; then :
7645   else
7646     { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
7647 echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
7648     lt_cv_prog_cc_can_build_shared=no
7649   fi
7650 fi
7651
7652
7653 #
7654 # Check to make sure the static flag actually works.
7655 #
7656 echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5
7657 echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6
7658 if test "${lt_prog_compiler_static_works+set}" = set; then
7659   echo $ECHO_N "(cached) $ECHO_C" >&6
7660 else
7661   lt_prog_compiler_static_works=no
7662    save_LDFLAGS="$LDFLAGS"
7663    LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
7664    printf "$lt_simple_link_test_code" > conftest.$ac_ext
7665    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
7666      # The linker can only warn and ignore the option if not recognized
7667      # So say no if there are warnings
7668      if test -s conftest.err; then
7669        # Append any errors to the config.log.
7670        cat conftest.err 1>&5
7671        $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
7672        $SED '/^$/d' conftest.err >conftest.er2
7673        if diff conftest.exp conftest.er2 >/dev/null; then
7674          lt_prog_compiler_static_works=yes
7675        fi
7676      else
7677        lt_prog_compiler_static_works=yes
7678      fi
7679    fi
7680    $rm conftest*
7681    LDFLAGS="$save_LDFLAGS"
7682
7683 fi
7684 echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
7685 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
7686
7687 if test x"$lt_prog_compiler_static_works" = xyes; then
7688     :
7689 else
7690     lt_prog_compiler_static=
7691 fi
7692
7693
7694
7695
7696 lt_prog_compiler_no_builtin_flag=
7697
7698 if test "$GCC" = yes; then
7699   lt_prog_compiler_no_builtin_flag=' -fno-builtin'
7700
7701
7702 echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
7703 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
7704 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
7705   echo $ECHO_N "(cached) $ECHO_C" >&6
7706 else
7707   lt_cv_prog_compiler_rtti_exceptions=no
7708   ac_outfile=conftest.$ac_objext
7709    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7710    lt_compiler_flag="-fno-rtti -fno-exceptions"
7711    # Insert the option either (1) after the last *FLAGS variable, or
7712    # (2) before a word containing "conftest.", or (3) at the end.
7713    # Note that $ac_compile itself does not contain backslashes and begins
7714    # with a dollar sign (not a hyphen), so the echo should work correctly.
7715    # The option is referenced via a variable to avoid confusing sed.
7716    lt_compile=`echo "$ac_compile" | $SED \
7717    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7718    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7719    -e 's:$: $lt_compiler_flag:'`
7720    (eval echo "\"\$as_me:7720: $lt_compile\"" >&5)
7721    (eval "$lt_compile" 2>conftest.err)
7722    ac_status=$?
7723    cat conftest.err >&5
7724    echo "$as_me:7724: \$? = $ac_status" >&5
7725    if (exit $ac_status) && test -s "$ac_outfile"; then
7726      # The compiler can only warn and ignore the option if not recognized
7727      # So say no if there are warnings other than the usual output.
7728      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
7729      $SED '/^$/d' conftest.err >conftest.er2
7730      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
7731        lt_cv_prog_compiler_rtti_exceptions=yes
7732      fi
7733    fi
7734    $rm conftest*
7735
7736 fi
7737 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
7738 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
7739
7740 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
7741     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
7742 else
7743     :
7744 fi
7745
7746 fi
7747
7748 lt_prog_compiler_wl=
7749 lt_prog_compiler_pic=
7750 lt_prog_compiler_static=
7751
7752 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
7753 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
7754
7755   if test "$GCC" = yes; then
7756     lt_prog_compiler_wl='-Wl,'
7757     lt_prog_compiler_static='-static'
7758
7759     case $host_os in
7760       aix*)
7761       # All AIX code is PIC.
7762       if test "$host_cpu" = ia64; then
7763         # AIX 5 now supports IA64 processor
7764         lt_prog_compiler_static='-Bstatic'
7765       fi
7766       ;;
7767
7768     amigaos*)
7769       # FIXME: we need at least 68020 code to build shared libraries, but
7770       # adding the `-m68020' flag to GCC prevents building anything better,
7771       # like `-m68040'.
7772       lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
7773       ;;
7774
7775     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7776       # PIC is the default for these OSes.
7777       ;;
7778
7779     mingw* | pw32* | os2*)
7780       # This hack is so that the source file can tell whether it is being
7781       # built for inclusion in a dll (and should export symbols for example).
7782       lt_prog_compiler_pic='-DDLL_EXPORT'
7783       ;;
7784
7785     darwin* | rhapsody*)
7786       # PIC is the default on this platform
7787       # Common symbols not allowed in MH_DYLIB files
7788       lt_prog_compiler_pic='-fno-common'
7789       ;;
7790
7791     msdosdjgpp*)
7792       # Just because we use GCC doesn't mean we suddenly get shared libraries
7793       # on systems that don't support them.
7794       lt_prog_compiler_can_build_shared=no
7795       enable_shared=no
7796       ;;
7797
7798     sysv4*MP*)
7799       if test -d /usr/nec; then
7800         lt_prog_compiler_pic=-Kconform_pic
7801       fi
7802       ;;
7803
7804     hpux*)
7805       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7806       # not for PA HP-UX.
7807       case $host_cpu in
7808       hppa*64*|ia64*)
7809         # +Z the default
7810         ;;
7811       *)
7812         lt_prog_compiler_pic='-fPIC'
7813         ;;
7814       esac
7815       ;;
7816
7817     *)
7818       lt_prog_compiler_pic='-fPIC'
7819       ;;
7820     esac
7821   else
7822     # PORTME Check for flag to pass linker flags through the system compiler.
7823     case $host_os in
7824     aix*)
7825       lt_prog_compiler_wl='-Wl,'
7826       if test "$host_cpu" = ia64; then
7827         # AIX 5 now supports IA64 processor
7828         lt_prog_compiler_static='-Bstatic'
7829       else
7830         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
7831       fi
7832       ;;
7833       darwin*)
7834         # PIC is the default on this platform
7835         # Common symbols not allowed in MH_DYLIB files
7836        case $cc_basename in
7837          xlc*)
7838          lt_prog_compiler_pic='-qnocommon'
7839          lt_prog_compiler_wl='-Wl,'
7840          ;;
7841        esac
7842        ;;
7843
7844     mingw* | pw32* | os2*)
7845       # This hack is so that the source file can tell whether it is being
7846       # built for inclusion in a dll (and should export symbols for example).
7847       lt_prog_compiler_pic='-DDLL_EXPORT'
7848       ;;
7849
7850     hpux9* | hpux10* | hpux11*)
7851       lt_prog_compiler_wl='-Wl,'
7852       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7853       # not for PA HP-UX.
7854       case $host_cpu in
7855       hppa*64*|ia64*)
7856         # +Z the default
7857         ;;
7858       *)
7859         lt_prog_compiler_pic='+Z'
7860         ;;
7861       esac
7862       # Is there a better lt_prog_compiler_static that works with the bundled CC?
7863       lt_prog_compiler_static='${wl}-a ${wl}archive'
7864       ;;
7865
7866     irix5* | irix6* | nonstopux*)
7867       lt_prog_compiler_wl='-Wl,'
7868       # PIC (with -KPIC) is the default.
7869       lt_prog_compiler_static='-non_shared'
7870       ;;
7871
7872     newsos6)
7873       lt_prog_compiler_pic='-KPIC'
7874       lt_prog_compiler_static='-Bstatic'
7875       ;;
7876
7877     linux*)
7878       case $cc_basename in
7879       icc* | ecc*)
7880         lt_prog_compiler_wl='-Wl,'
7881         lt_prog_compiler_pic='-KPIC'
7882         lt_prog_compiler_static='-static'
7883         ;;
7884       pgcc* | pgf77* | pgf90* | pgf95*)
7885         # Portland Group compilers (*not* the Pentium gcc compiler,
7886         # which looks to be a dead project)
7887         lt_prog_compiler_wl='-Wl,'
7888         lt_prog_compiler_pic='-fpic'
7889         lt_prog_compiler_static='-Bstatic'
7890         ;;
7891       ccc*)
7892         lt_prog_compiler_wl='-Wl,'
7893         # All Alpha code is PIC.
7894         lt_prog_compiler_static='-non_shared'
7895         ;;
7896       esac
7897       ;;
7898
7899     osf3* | osf4* | osf5*)
7900       lt_prog_compiler_wl='-Wl,'
7901       # All OSF/1 code is PIC.
7902       lt_prog_compiler_static='-non_shared'
7903       ;;
7904
7905     sco3.2v5*)
7906       lt_prog_compiler_pic='-Kpic'
7907       lt_prog_compiler_static='-dn'
7908       ;;
7909
7910     solaris*)
7911       lt_prog_compiler_pic='-KPIC'
7912       lt_prog_compiler_static='-Bstatic'
7913       case $cc_basename in
7914       f77* | f90* | f95*)
7915         lt_prog_compiler_wl='-Qoption ld ';;
7916       *)
7917         lt_prog_compiler_wl='-Wl,';;
7918       esac
7919       ;;
7920
7921     sunos4*)
7922       lt_prog_compiler_wl='-Qoption ld '
7923       lt_prog_compiler_pic='-PIC'
7924       lt_prog_compiler_static='-Bstatic'
7925       ;;
7926
7927     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7928       lt_prog_compiler_wl='-Wl,'
7929       lt_prog_compiler_pic='-KPIC'
7930       lt_prog_compiler_static='-Bstatic'
7931       ;;
7932
7933     sysv4*MP*)
7934       if test -d /usr/nec ;then
7935         lt_prog_compiler_pic='-Kconform_pic'
7936         lt_prog_compiler_static='-Bstatic'
7937       fi
7938       ;;
7939
7940     unicos*)
7941       lt_prog_compiler_wl='-Wl,'
7942       lt_prog_compiler_can_build_shared=no
7943       ;;
7944
7945     uts4*)
7946       lt_prog_compiler_pic='-pic'
7947       lt_prog_compiler_static='-Bstatic'
7948       ;;
7949
7950     *)
7951       lt_prog_compiler_can_build_shared=no
7952       ;;
7953     esac
7954   fi
7955
7956 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
7957 echo "${ECHO_T}$lt_prog_compiler_pic" >&6
7958
7959 #
7960 # Check to make sure the PIC flag actually works.
7961 #
7962 if test -n "$lt_prog_compiler_pic"; then
7963
7964 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
7965 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
7966 if test "${lt_prog_compiler_pic_works+set}" = set; then
7967   echo $ECHO_N "(cached) $ECHO_C" >&6
7968 else
7969   lt_prog_compiler_pic_works=no
7970   ac_outfile=conftest.$ac_objext
7971    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7972    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
7973    # Insert the option either (1) after the last *FLAGS variable, or
7974    # (2) before a word containing "conftest.", or (3) at the end.
7975    # Note that $ac_compile itself does not contain backslashes and begins
7976    # with a dollar sign (not a hyphen), so the echo should work correctly.
7977    # The option is referenced via a variable to avoid confusing sed.
7978    lt_compile=`echo "$ac_compile" | $SED \
7979    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7980    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7981    -e 's:$: $lt_compiler_flag:'`
7982    (eval echo "\"\$as_me:7982: $lt_compile\"" >&5)
7983    (eval "$lt_compile" 2>conftest.err)
7984    ac_status=$?
7985    cat conftest.err >&5
7986    echo "$as_me:7986: \$? = $ac_status" >&5
7987    if (exit $ac_status) && test -s "$ac_outfile"; then
7988      # The compiler can only warn and ignore the option if not recognized
7989      # So say no if there are warnings other than the usual output.
7990      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
7991      $SED '/^$/d' conftest.err >conftest.er2
7992      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
7993        lt_prog_compiler_pic_works=yes
7994      fi
7995    fi
7996    $rm conftest*
7997
7998 fi
7999 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
8000 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
8001
8002 if test x"$lt_prog_compiler_pic_works" = xyes; then
8003     case $lt_prog_compiler_pic in
8004      "" | " "*) ;;
8005      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
8006      esac
8007 else
8008     lt_prog_compiler_pic=
8009      lt_prog_compiler_can_build_shared=no
8010 fi
8011
8012 fi
8013 case $host_os in
8014   # For platforms which do not support PIC, -DPIC is meaningless:
8015   *djgpp*)
8016     lt_prog_compiler_pic=
8017     ;;
8018   *)
8019     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
8020     ;;
8021 esac
8022
8023 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
8024 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
8025 if test "${lt_cv_prog_compiler_c_o+set}" = set; then
8026   echo $ECHO_N "(cached) $ECHO_C" >&6
8027 else
8028   lt_cv_prog_compiler_c_o=no
8029    $rm -r conftest 2>/dev/null
8030    mkdir conftest
8031    cd conftest
8032    mkdir out
8033    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8034
8035    lt_compiler_flag="-o out/conftest2.$ac_objext"
8036    # Insert the option either (1) after the last *FLAGS variable, or
8037    # (2) before a word containing "conftest.", or (3) at the end.
8038    # Note that $ac_compile itself does not contain backslashes and begins
8039    # with a dollar sign (not a hyphen), so the echo should work correctly.
8040    lt_compile=`echo "$ac_compile" | $SED \
8041    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8042    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8043    -e 's:$: $lt_compiler_flag:'`
8044    (eval echo "\"\$as_me:8044: $lt_compile\"" >&5)
8045    (eval "$lt_compile" 2>out/conftest.err)
8046    ac_status=$?
8047    cat out/conftest.err >&5
8048    echo "$as_me:8048: \$? = $ac_status" >&5
8049    if (exit $ac_status) && test -s out/conftest2.$ac_objext
8050    then
8051      # The compiler can only warn and ignore the option if not recognized
8052      # So say no if there are warnings
8053      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
8054      $SED '/^$/d' out/conftest.err >out/conftest.er2
8055      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8056        lt_cv_prog_compiler_c_o=yes
8057      fi
8058    fi
8059    chmod u+w . 2>&5
8060    $rm conftest*
8061    # SGI C++ compiler will create directory out/ii_files/ for
8062    # template instantiation
8063    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
8064    $rm out/* && rmdir out
8065    cd ..
8066    rmdir conftest
8067    $rm conftest*
8068
8069 fi
8070 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
8071 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
8072
8073
8074 hard_links="nottested"
8075 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
8076   # do not overwrite the value of need_locks provided by the user
8077   echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
8078 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
8079   hard_links=yes
8080   $rm conftest*
8081   ln conftest.a conftest.b 2>/dev/null && hard_links=no
8082   touch conftest.a
8083   ln conftest.a conftest.b 2>&5 || hard_links=no
8084   ln conftest.a conftest.b 2>/dev/null && hard_links=no
8085   echo "$as_me:$LINENO: result: $hard_links" >&5
8086 echo "${ECHO_T}$hard_links" >&6
8087   if test "$hard_links" = no; then
8088     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
8089 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
8090     need_locks=warn
8091   fi
8092 else
8093   need_locks=no
8094 fi
8095
8096 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
8097 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
8098
8099   runpath_var=
8100   allow_undefined_flag=
8101   enable_shared_with_static_runtimes=no
8102   archive_cmds=
8103   archive_expsym_cmds=
8104   old_archive_From_new_cmds=
8105   old_archive_from_expsyms_cmds=
8106   export_dynamic_flag_spec=
8107   whole_archive_flag_spec=
8108   thread_safe_flag_spec=
8109   hardcode_libdir_flag_spec=
8110   hardcode_libdir_flag_spec_ld=
8111   hardcode_libdir_separator=
8112   hardcode_direct=no
8113   hardcode_minus_L=no
8114   hardcode_shlibpath_var=unsupported
8115   link_all_deplibs=unknown
8116   hardcode_automatic=no
8117   module_cmds=
8118   module_expsym_cmds=
8119   always_export_symbols=no
8120   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8121   # include_expsyms should be a list of space-separated symbols to be *always*
8122   # included in the symbol list
8123   include_expsyms=
8124   # exclude_expsyms can be an extended regexp of symbols to exclude
8125   # it will be wrapped by ` (' and `)$', so one must not match beginning or
8126   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
8127   # as well as any symbol that contains `d'.
8128   exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
8129   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8130   # platforms (ab)use it in PIC code, but their linkers get confused if
8131   # the symbol is explicitly referenced.  Since portable code cannot
8132   # rely on this symbol name, it's probably fine to never include it in
8133   # preloaded symbol tables.
8134   extract_expsyms_cmds=
8135   # Just being paranoid about ensuring that cc_basename is set.
8136   for cc_temp in $compiler""; do
8137   case $cc_temp in
8138     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8139     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8140     \-*) ;;
8141     *) break;;
8142   esac
8143 done
8144 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8145
8146   case $host_os in
8147   cygwin* | mingw* | pw32*)
8148     # FIXME: the MSVC++ port hasn't been tested in a loooong time
8149     # When not using gcc, we currently assume that we are using
8150     # Microsoft Visual C++.
8151     if test "$GCC" != yes; then
8152       with_gnu_ld=no
8153     fi
8154     ;;
8155   openbsd*)
8156     with_gnu_ld=no
8157     ;;
8158   esac
8159
8160   ld_shlibs=yes
8161   if test "$with_gnu_ld" = yes; then
8162     # If archive_cmds runs LD, not CC, wlarc should be empty
8163     wlarc='${wl}'
8164
8165     # Set some defaults for GNU ld with shared library support. These
8166     # are reset later if shared libraries are not supported. Putting them
8167     # here allows them to be overridden if necessary.
8168     runpath_var=LD_RUN_PATH
8169     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
8170     export_dynamic_flag_spec='${wl}--export-dynamic'
8171     # ancient GNU ld didn't support --whole-archive et. al.
8172     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
8173         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8174       else
8175         whole_archive_flag_spec=
8176     fi
8177     supports_anon_versioning=no
8178     case `$LD -v 2>/dev/null` in
8179       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
8180       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8181       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8182       *\ 2.11.*) ;; # other 2.11 versions
8183       *) supports_anon_versioning=yes ;;
8184     esac
8185
8186     # See if GNU ld supports shared libraries.
8187     case $host_os in
8188     aix3* | aix4* | aix5*)
8189       # On AIX/PPC, the GNU linker is very broken
8190       if test "$host_cpu" != ia64; then
8191         ld_shlibs=no
8192         cat <<EOF 1>&2
8193
8194 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
8195 *** to be unable to reliably create shared libraries on AIX.
8196 *** Therefore, libtool is disabling shared libraries support.  If you
8197 *** really care for shared libraries, you may want to modify your PATH
8198 *** so that a non-GNU linker is found, and then restart.
8199
8200 EOF
8201       fi
8202       ;;
8203
8204     amigaos*)
8205       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)'
8206       hardcode_libdir_flag_spec='-L$libdir'
8207       hardcode_minus_L=yes
8208
8209       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
8210       # that the semantics of dynamic libraries on AmigaOS, at least up
8211       # to version 4, is to share data among multiple programs linked
8212       # with the same dynamic library.  Since this doesn't match the
8213       # behavior of shared libraries on other platforms, we can't use
8214       # them.
8215       ld_shlibs=no
8216       ;;
8217
8218     beos*)
8219       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8220         allow_undefined_flag=unsupported
8221         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8222         # support --undefined.  This deserves some investigation.  FIXME
8223         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8224       else
8225         ld_shlibs=no
8226       fi
8227       ;;
8228
8229     cygwin* | mingw* | pw32*)
8230       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
8231       # as there is no search path for DLLs.
8232       hardcode_libdir_flag_spec='-L$libdir'
8233       allow_undefined_flag=unsupported
8234       always_export_symbols=no
8235       enable_shared_with_static_runtimes=yes
8236       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
8237
8238       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8239         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8240         # If the export-symbols file already is a .def file (1st line
8241         # is EXPORTS), use it as is; otherwise, prepend...
8242         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8243           cp $export_symbols $output_objdir/$soname.def;
8244         else
8245           echo EXPORTS > $output_objdir/$soname.def;
8246           cat $export_symbols >> $output_objdir/$soname.def;
8247         fi~
8248         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
8249       else
8250         ld_shlibs=no
8251       fi
8252       ;;
8253
8254     linux*)
8255       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8256         tmp_addflag=
8257         case $cc_basename,$host_cpu in
8258         pgcc*)                          # Portland Group C compiler
8259           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'
8260           tmp_addflag=' $pic_flag'
8261           ;;
8262         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
8263           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'
8264           tmp_addflag=' $pic_flag -Mnomain' ;;
8265         ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
8266           tmp_addflag=' -i_dynamic' ;;
8267         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
8268           tmp_addflag=' -i_dynamic -nofor_main' ;;
8269         ifc* | ifort*)                  # Intel Fortran compiler
8270           tmp_addflag=' -nofor_main' ;;
8271         esac
8272         archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8273
8274         if test $supports_anon_versioning = yes; then
8275           archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
8276   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8277   $echo "local: *; };" >> $output_objdir/$libname.ver~
8278           $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8279         fi
8280       else
8281         ld_shlibs=no
8282       fi
8283       ;;
8284
8285     netbsd*)
8286       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8287         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
8288         wlarc=
8289       else
8290         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8291         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8292       fi
8293       ;;
8294
8295     solaris* | sysv5*)
8296       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
8297         ld_shlibs=no
8298         cat <<EOF 1>&2
8299
8300 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
8301 *** create shared libraries on Solaris systems.  Therefore, libtool
8302 *** is disabling shared libraries support.  We urge you to upgrade GNU
8303 *** binutils to release 2.9.1 or newer.  Another option is to modify
8304 *** your PATH or compiler configuration so that the native linker is
8305 *** used, and then restart.
8306
8307 EOF
8308       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8309         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8310         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8311       else
8312         ld_shlibs=no
8313       fi
8314       ;;
8315
8316     sunos4*)
8317       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8318       wlarc=
8319       hardcode_direct=yes
8320       hardcode_shlibpath_var=no
8321       ;;
8322
8323     *)
8324       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8325         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8326         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8327       else
8328         ld_shlibs=no
8329       fi
8330       ;;
8331     esac
8332
8333     if test "$ld_shlibs" = no; then
8334       runpath_var=
8335       hardcode_libdir_flag_spec=
8336       export_dynamic_flag_spec=
8337       whole_archive_flag_spec=
8338     fi
8339   else
8340     # PORTME fill in a description of your system's linker (not GNU ld)
8341     case $host_os in
8342     aix3*)
8343       allow_undefined_flag=unsupported
8344       always_export_symbols=yes
8345       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'
8346       # Note: this linker hardcodes the directories in LIBPATH if there
8347       # are no directories specified by -L.
8348       hardcode_minus_L=yes
8349       if test "$GCC" = yes && test -z "$link_static_flag"; then
8350         # Neither direct hardcoding nor static linking is supported with a
8351         # broken collect2.
8352         hardcode_direct=unsupported
8353       fi
8354       ;;
8355
8356     aix4* | aix5*)
8357       if test "$host_cpu" = ia64; then
8358         # On IA64, the linker does run time linking by default, so we don't
8359         # have to do anything special.
8360         aix_use_runtimelinking=no
8361         exp_sym_flag='-Bexport'
8362         no_entry_flag=""
8363       else
8364         # If we're using GNU nm, then we don't want the "-C" option.
8365         # -C means demangle to AIX nm, but means don't demangle with GNU nm
8366         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
8367           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'
8368         else
8369           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'
8370         fi
8371         aix_use_runtimelinking=no
8372
8373         # Test if we are trying to use run time linking or normal
8374         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8375         # need to do runtime linking.
8376         case $host_os in aix4.[23]|aix4.[23].*|aix5*)
8377           for ld_flag in $LDFLAGS; do
8378           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
8379             aix_use_runtimelinking=yes
8380             break
8381           fi
8382           done
8383         esac
8384
8385         exp_sym_flag='-bexport'
8386         no_entry_flag='-bnoentry'
8387       fi
8388
8389       # When large executables or shared objects are built, AIX ld can
8390       # have problems creating the table of contents.  If linking a library
8391       # or program results in "error TOC overflow" add -mminimal-toc to
8392       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
8393       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8394
8395       archive_cmds=''
8396       hardcode_direct=yes
8397       hardcode_libdir_separator=':'
8398       link_all_deplibs=yes
8399
8400       if test "$GCC" = yes; then
8401         case $host_os in aix4.[012]|aix4.[012].*)
8402         # We only want to do this on AIX 4.2 and lower, the check
8403         # below for broken collect2 doesn't work under 4.3+
8404           collect2name=`${CC} -print-prog-name=collect2`
8405           if test -f "$collect2name" && \
8406            strings "$collect2name" | grep resolve_lib_name >/dev/null
8407           then
8408           # We have reworked collect2
8409           hardcode_direct=yes
8410           else
8411           # We have old collect2
8412           hardcode_direct=unsupported
8413           # It fails to find uninstalled libraries when the uninstalled
8414           # path is not listed in the libpath.  Setting hardcode_minus_L
8415           # to unsupported forces relinking
8416           hardcode_minus_L=yes
8417           hardcode_libdir_flag_spec='-L$libdir'
8418           hardcode_libdir_separator=
8419           fi
8420         esac
8421         shared_flag='-shared'
8422         if test "$aix_use_runtimelinking" = yes; then
8423           shared_flag="$shared_flag "'${wl}-G'
8424         fi
8425       else
8426         # not using gcc
8427         if test "$host_cpu" = ia64; then
8428         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8429         # chokes on -Wl,-G. The following line is correct:
8430           shared_flag='-G'
8431         else
8432         if test "$aix_use_runtimelinking" = yes; then
8433             shared_flag='${wl}-G'
8434           else
8435             shared_flag='${wl}-bM:SRE'
8436         fi
8437         fi
8438       fi
8439
8440       # It seems that -bexpall does not export symbols beginning with
8441       # underscore (_), so it is better to generate a list of symbols to export.
8442       always_export_symbols=yes
8443       if test "$aix_use_runtimelinking" = yes; then
8444         # Warning - without using the other runtime loading flags (-brtl),
8445         # -berok will link without error, but may produce a broken library.
8446         allow_undefined_flag='-berok'
8447        # Determine the default libpath from the value encoded in an empty executable.
8448        cat >conftest.$ac_ext <<_ACEOF
8449 /* confdefs.h.  */
8450 _ACEOF
8451 cat confdefs.h >>conftest.$ac_ext
8452 cat >>conftest.$ac_ext <<_ACEOF
8453 /* end confdefs.h.  */
8454
8455 int
8456 main ()
8457 {
8458
8459   ;
8460   return 0;
8461 }
8462 _ACEOF
8463 rm -f conftest.$ac_objext conftest$ac_exeext
8464 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8465   (eval $ac_link) 2>conftest.er1
8466   ac_status=$?
8467   grep -v '^ *+' conftest.er1 >conftest.err
8468   rm -f conftest.er1
8469   cat conftest.err >&5
8470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8471   (exit $ac_status); } &&
8472          { ac_try='test -z "$ac_c_werror_flag"
8473                          || test ! -s conftest.err'
8474   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8475   (eval $ac_try) 2>&5
8476   ac_status=$?
8477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8478   (exit $ac_status); }; } &&
8479          { ac_try='test -s conftest$ac_exeext'
8480   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8481   (eval $ac_try) 2>&5
8482   ac_status=$?
8483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8484   (exit $ac_status); }; }; then
8485
8486 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
8487 }'`
8488 # Check for a 64-bit object if we didn't find anything.
8489 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; }
8490 }'`; fi
8491 else
8492   echo "$as_me: failed program was:" >&5
8493 sed 's/^/| /' conftest.$ac_ext >&5
8494
8495 fi
8496 rm -f conftest.err conftest.$ac_objext \
8497       conftest$ac_exeext conftest.$ac_ext
8498 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8499
8500        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8501         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"
8502        else
8503         if test "$host_cpu" = ia64; then
8504           hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
8505           allow_undefined_flag="-z nodefs"
8506           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"
8507         else
8508          # Determine the default libpath from the value encoded in an empty executable.
8509          cat >conftest.$ac_ext <<_ACEOF
8510 /* confdefs.h.  */
8511 _ACEOF
8512 cat confdefs.h >>conftest.$ac_ext
8513 cat >>conftest.$ac_ext <<_ACEOF
8514 /* end confdefs.h.  */
8515
8516 int
8517 main ()
8518 {
8519
8520   ;
8521   return 0;
8522 }
8523 _ACEOF
8524 rm -f conftest.$ac_objext conftest$ac_exeext
8525 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8526   (eval $ac_link) 2>conftest.er1
8527   ac_status=$?
8528   grep -v '^ *+' conftest.er1 >conftest.err
8529   rm -f conftest.er1
8530   cat conftest.err >&5
8531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8532   (exit $ac_status); } &&
8533          { ac_try='test -z "$ac_c_werror_flag"
8534                          || test ! -s conftest.err'
8535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8536   (eval $ac_try) 2>&5
8537   ac_status=$?
8538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8539   (exit $ac_status); }; } &&
8540          { ac_try='test -s conftest$ac_exeext'
8541   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8542   (eval $ac_try) 2>&5
8543   ac_status=$?
8544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8545   (exit $ac_status); }; }; then
8546
8547 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
8548 }'`
8549 # Check for a 64-bit object if we didn't find anything.
8550 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; }
8551 }'`; fi
8552 else
8553   echo "$as_me: failed program was:" >&5
8554 sed 's/^/| /' conftest.$ac_ext >&5
8555
8556 fi
8557 rm -f conftest.err conftest.$ac_objext \
8558       conftest$ac_exeext conftest.$ac_ext
8559 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8560
8561          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8562           # Warning - without using the other run time loading flags,
8563           # -berok will link without error, but may produce a broken library.
8564           no_undefined_flag=' ${wl}-bernotok'
8565           allow_undefined_flag=' ${wl}-berok'
8566           # -bexpall does not export symbols beginning with underscore (_)
8567           always_export_symbols=yes
8568           # Exported symbols can be pulled into shared objects from archives
8569           whole_archive_flag_spec=' '
8570           archive_cmds_need_lc=yes
8571           # This is similar to how AIX traditionally builds its shared libraries.
8572           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'
8573         fi
8574       fi
8575       ;;
8576
8577     amigaos*)
8578       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)'
8579       hardcode_libdir_flag_spec='-L$libdir'
8580       hardcode_minus_L=yes
8581       # see comment about different semantics on the GNU ld section
8582       ld_shlibs=no
8583       ;;
8584
8585     bsdi[45]*)
8586       export_dynamic_flag_spec=-rdynamic
8587       ;;
8588
8589     cygwin* | mingw* | pw32*)
8590       # When not using gcc, we currently assume that we are using
8591       # Microsoft Visual C++.
8592       # hardcode_libdir_flag_spec is actually meaningless, as there is
8593       # no search path for DLLs.
8594       hardcode_libdir_flag_spec=' '
8595       allow_undefined_flag=unsupported
8596       # Tell ltmain to make .lib files, not .a files.
8597       libext=lib
8598       # Tell ltmain to make .dll files, not .so files.
8599       shrext_cmds=".dll"
8600       # FIXME: Setting linknames here is a bad hack.
8601       archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
8602       # The linker will automatically build a .lib file if we build a DLL.
8603       old_archive_From_new_cmds='true'
8604       # FIXME: Should let the user specify the lib program.
8605       old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
8606       fix_srcfile_path='`cygpath -w "$srcfile"`'
8607       enable_shared_with_static_runtimes=yes
8608       ;;
8609
8610     darwin* | rhapsody*)
8611       case $host_os in
8612         rhapsody* | darwin1.[012])
8613          allow_undefined_flag='${wl}-undefined ${wl}suppress'
8614          ;;
8615        *) # Darwin 1.3 on
8616          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8617            allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8618          else
8619            case ${MACOSX_DEPLOYMENT_TARGET} in
8620              10.[012])
8621                allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8622                ;;
8623              10.*)
8624                allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
8625                ;;
8626            esac
8627          fi
8628          ;;
8629       esac
8630       archive_cmds_need_lc=no
8631       hardcode_direct=no
8632       hardcode_automatic=yes
8633       hardcode_shlibpath_var=unsupported
8634       whole_archive_flag_spec=''
8635       link_all_deplibs=yes
8636     if test "$GCC" = yes ; then
8637         output_verbose_link_cmd='echo'
8638         archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
8639       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8640       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8641       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}'
8642       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}'
8643     else
8644       case $cc_basename in
8645         xlc*)
8646          output_verbose_link_cmd='echo'
8647          archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
8648          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8649           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8650          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}'
8651           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}'
8652           ;;
8653        *)
8654          ld_shlibs=no
8655           ;;
8656       esac
8657     fi
8658       ;;
8659
8660     dgux*)
8661       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8662       hardcode_libdir_flag_spec='-L$libdir'
8663       hardcode_shlibpath_var=no
8664       ;;
8665
8666     freebsd1*)
8667       ld_shlibs=no
8668       ;;
8669
8670     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8671     # support.  Future versions do this automatically, but an explicit c++rt0.o
8672     # does not break anything, and helps significantly (at the cost of a little
8673     # extra space).
8674     freebsd2.2*)
8675       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
8676       hardcode_libdir_flag_spec='-R$libdir'
8677       hardcode_direct=yes
8678       hardcode_shlibpath_var=no
8679       ;;
8680
8681     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8682     freebsd2*)
8683       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8684       hardcode_direct=yes
8685       hardcode_minus_L=yes
8686       hardcode_shlibpath_var=no
8687       ;;
8688
8689     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
8690     freebsd* | kfreebsd*-gnu | dragonfly*)
8691       archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
8692       hardcode_libdir_flag_spec='-R$libdir'
8693       hardcode_direct=yes
8694       hardcode_shlibpath_var=no
8695       ;;
8696
8697     hpux9*)
8698       if test "$GCC" = yes; then
8699         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'
8700       else
8701         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'
8702       fi
8703       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8704       hardcode_libdir_separator=:
8705       hardcode_direct=yes
8706
8707       # hardcode_minus_L: Not really in the search PATH,
8708       # but as the default location of the library.
8709       hardcode_minus_L=yes
8710       export_dynamic_flag_spec='${wl}-E'
8711       ;;
8712
8713     hpux10* | hpux11*)
8714       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8715         case $host_cpu in
8716         hppa*64*|ia64*)
8717           archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8718           ;;
8719         *)
8720           archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8721           ;;
8722         esac
8723       else
8724         case $host_cpu in
8725         hppa*64*|ia64*)
8726           archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
8727           ;;
8728         *)
8729           archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
8730           ;;
8731         esac
8732       fi
8733       if test "$with_gnu_ld" = no; then
8734         case $host_cpu in
8735         hppa*64*)
8736           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8737           hardcode_libdir_flag_spec_ld='+b $libdir'
8738           hardcode_libdir_separator=:
8739           hardcode_direct=no
8740           hardcode_shlibpath_var=no
8741           ;;
8742         ia64*)
8743           hardcode_libdir_flag_spec='-L$libdir'
8744           hardcode_direct=no
8745           hardcode_shlibpath_var=no
8746
8747           # hardcode_minus_L: Not really in the search PATH,
8748           # but as the default location of the library.
8749           hardcode_minus_L=yes
8750           ;;
8751         *)
8752           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8753           hardcode_libdir_separator=:
8754           hardcode_direct=yes
8755           export_dynamic_flag_spec='${wl}-E'
8756
8757           # hardcode_minus_L: Not really in the search PATH,
8758           # but as the default location of the library.
8759           hardcode_minus_L=yes
8760           ;;
8761         esac
8762       fi
8763       ;;
8764
8765     irix5* | irix6* | nonstopux*)
8766       if test "$GCC" = yes; then
8767         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'
8768       else
8769         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'
8770         hardcode_libdir_flag_spec_ld='-rpath $libdir'
8771       fi
8772       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8773       hardcode_libdir_separator=:
8774       link_all_deplibs=yes
8775       ;;
8776
8777     netbsd*)
8778       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8779         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
8780       else
8781         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
8782       fi
8783       hardcode_libdir_flag_spec='-R$libdir'
8784       hardcode_direct=yes
8785       hardcode_shlibpath_var=no
8786       ;;
8787
8788     newsos6)
8789       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8790       hardcode_direct=yes
8791       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8792       hardcode_libdir_separator=:
8793       hardcode_shlibpath_var=no
8794       ;;
8795
8796     openbsd*)
8797       hardcode_direct=yes
8798       hardcode_shlibpath_var=no
8799       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8800         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8801         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
8802         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8803         export_dynamic_flag_spec='${wl}-E'
8804       else
8805        case $host_os in
8806          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
8807            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8808            hardcode_libdir_flag_spec='-R$libdir'
8809            ;;
8810          *)
8811            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8812            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8813            ;;
8814        esac
8815       fi
8816       ;;
8817
8818     os2*)
8819       hardcode_libdir_flag_spec='-L$libdir'
8820       hardcode_minus_L=yes
8821       allow_undefined_flag=unsupported
8822       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'
8823       old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
8824       ;;
8825
8826     osf3*)
8827       if test "$GCC" = yes; then
8828         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8829         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'
8830       else
8831         allow_undefined_flag=' -expect_unresolved \*'
8832         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'
8833       fi
8834       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8835       hardcode_libdir_separator=:
8836       ;;
8837
8838     osf4* | osf5*)      # as osf3* with the addition of -msym flag
8839       if test "$GCC" = yes; then
8840         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8841         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'
8842         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8843       else
8844         allow_undefined_flag=' -expect_unresolved \*'
8845         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'
8846         archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
8847         $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'
8848
8849         # Both c and cxx compiler support -rpath directly
8850         hardcode_libdir_flag_spec='-rpath $libdir'
8851       fi
8852       hardcode_libdir_separator=:
8853       ;;
8854
8855     sco3.2v5*)
8856       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8857       hardcode_shlibpath_var=no
8858       export_dynamic_flag_spec='${wl}-Bexport'
8859       runpath_var=LD_RUN_PATH
8860       hardcode_runpath_var=yes
8861       ;;
8862
8863     solaris*)
8864       no_undefined_flag=' -z text'
8865       if test "$GCC" = yes; then
8866         wlarc='${wl}'
8867         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8868         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8869           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
8870       else
8871         wlarc=''
8872         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8873         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8874         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8875       fi
8876       hardcode_libdir_flag_spec='-R$libdir'
8877       hardcode_shlibpath_var=no
8878       case $host_os in
8879       solaris2.[0-5] | solaris2.[0-5].*) ;;
8880       *)
8881         # The compiler driver will combine linker options so we
8882         # cannot just pass the convience library names through
8883         # without $wl, iff we do not link with $LD.
8884         # Luckily, gcc supports the same syntax we need for Sun Studio.
8885         # Supported since Solaris 2.6 (maybe 2.5.1?)
8886         case $wlarc in
8887         '')
8888           whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
8889         *)
8890           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' ;;
8891         esac ;;
8892       esac
8893       link_all_deplibs=yes
8894       ;;
8895
8896     sunos4*)
8897       if test "x$host_vendor" = xsequent; then
8898         # Use $CC to link under sequent, because it throws in some extra .o
8899         # files that make .init and .fini sections work.
8900         archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
8901       else
8902         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
8903       fi
8904       hardcode_libdir_flag_spec='-L$libdir'
8905       hardcode_direct=yes
8906       hardcode_minus_L=yes
8907       hardcode_shlibpath_var=no
8908       ;;
8909
8910     sysv4)
8911       case $host_vendor in
8912         sni)
8913           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8914           hardcode_direct=yes # is this really true???
8915         ;;
8916         siemens)
8917           ## LD is ld it makes a PLAMLIB
8918           ## CC just makes a GrossModule.
8919           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8920           reload_cmds='$CC -r -o $output$reload_objs'
8921           hardcode_direct=no
8922         ;;
8923         motorola)
8924           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8925           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
8926         ;;
8927       esac
8928       runpath_var='LD_RUN_PATH'
8929       hardcode_shlibpath_var=no
8930       ;;
8931
8932     sysv4.3*)
8933       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8934       hardcode_shlibpath_var=no
8935       export_dynamic_flag_spec='-Bexport'
8936       ;;
8937
8938     sysv4*MP*)
8939       if test -d /usr/nec; then
8940         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8941         hardcode_shlibpath_var=no
8942         runpath_var=LD_RUN_PATH
8943         hardcode_runpath_var=yes
8944         ld_shlibs=yes
8945       fi
8946       ;;
8947
8948     sysv4.2uw2*)
8949       archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8950       hardcode_direct=yes
8951       hardcode_minus_L=no
8952       hardcode_shlibpath_var=no
8953       hardcode_runpath_var=yes
8954       runpath_var=LD_RUN_PATH
8955       ;;
8956
8957    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
8958       no_undefined_flag='${wl}-z ${wl}text'
8959       if test "$GCC" = yes; then
8960         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8961       else
8962         archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8963       fi
8964       runpath_var='LD_RUN_PATH'
8965       hardcode_shlibpath_var=no
8966       ;;
8967
8968     sysv5*)
8969       no_undefined_flag=' -z text'
8970       # $CC -shared without GNU ld will not create a library from C++
8971       # object files and a static libstdc++, better avoid it by now
8972       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8973       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8974                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8975       hardcode_libdir_flag_spec=
8976       hardcode_shlibpath_var=no
8977       runpath_var='LD_RUN_PATH'
8978       ;;
8979
8980     uts4*)
8981       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8982       hardcode_libdir_flag_spec='-L$libdir'
8983       hardcode_shlibpath_var=no
8984       ;;
8985
8986     *)
8987       ld_shlibs=no
8988       ;;
8989     esac
8990   fi
8991
8992 echo "$as_me:$LINENO: result: $ld_shlibs" >&5
8993 echo "${ECHO_T}$ld_shlibs" >&6
8994 test "$ld_shlibs" = no && can_build_shared=no
8995
8996 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
8997 if test "$GCC" = yes; then
8998   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
8999 fi
9000
9001 #
9002 # Do we need to explicitly link libc?
9003 #
9004 case "x$archive_cmds_need_lc" in
9005 x|xyes)
9006   # Assume -lc should be added
9007   archive_cmds_need_lc=yes
9008
9009   if test "$enable_shared" = yes && test "$GCC" = yes; then
9010     case $archive_cmds in
9011     *'~'*)
9012       # FIXME: we may have to deal with multi-command sequences.
9013       ;;
9014     '$CC '*)
9015       # Test whether the compiler implicitly links with -lc since on some
9016       # systems, -lgcc has to come before -lc. If gcc already passes -lc
9017       # to ld, don't add -lc before -lgcc.
9018       echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
9019 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
9020       $rm conftest*
9021       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
9022
9023       if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9024   (eval $ac_compile) 2>&5
9025   ac_status=$?
9026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9027   (exit $ac_status); } 2>conftest.err; then
9028         soname=conftest
9029         lib=conftest
9030         libobjs=conftest.$ac_objext
9031         deplibs=
9032         wl=$lt_prog_compiler_wl
9033         compiler_flags=-v
9034         linker_flags=-v
9035         verstring=
9036         output_objdir=.
9037         libname=conftest
9038         lt_save_allow_undefined_flag=$allow_undefined_flag
9039         allow_undefined_flag=
9040         if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
9041   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
9042   ac_status=$?
9043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9044   (exit $ac_status); }
9045         then
9046           archive_cmds_need_lc=no
9047         else
9048           archive_cmds_need_lc=yes
9049         fi
9050         allow_undefined_flag=$lt_save_allow_undefined_flag
9051       else
9052         cat conftest.err 1>&5
9053       fi
9054       $rm conftest*
9055       echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
9056 echo "${ECHO_T}$archive_cmds_need_lc" >&6
9057       ;;
9058     esac
9059   fi
9060   ;;
9061 esac
9062
9063 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
9064 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
9065 library_names_spec=
9066 libname_spec='lib$name'
9067 soname_spec=
9068 shrext_cmds=".so"
9069 postinstall_cmds=
9070 postuninstall_cmds=
9071 finish_cmds=
9072 finish_eval=
9073 shlibpath_var=
9074 shlibpath_overrides_runpath=unknown
9075 version_type=none
9076 dynamic_linker="$host_os ld.so"
9077 sys_lib_dlsearch_path_spec="/lib /usr/lib"
9078 if test "$GCC" = yes; then
9079   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9080   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
9081     # if the path contains ";" then we assume it to be the separator
9082     # otherwise default to the standard path separator (i.e. ":") - it is
9083     # assumed that no part of a normal pathname contains ";" but that should
9084     # okay in the real world where ";" in dirpaths is itself problematic.
9085     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9086   else
9087     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
9088   fi
9089 else
9090   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
9091 fi
9092 need_lib_prefix=unknown
9093 hardcode_into_libs=no
9094
9095 # when you set need_version to no, make sure it does not cause -set_version
9096 # flags to be left without arguments
9097 need_version=unknown
9098
9099 case $host_os in
9100 aix3*)
9101   version_type=linux
9102   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
9103   shlibpath_var=LIBPATH
9104
9105   # AIX 3 has no versioning support, so we append a major version to the name.
9106   soname_spec='${libname}${release}${shared_ext}$major'
9107   ;;
9108
9109 aix4* | aix5*)
9110   version_type=linux
9111   need_lib_prefix=no
9112   need_version=no
9113   hardcode_into_libs=yes
9114   if test "$host_cpu" = ia64; then
9115     # AIX 5 supports IA64
9116     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
9117     shlibpath_var=LD_LIBRARY_PATH
9118   else
9119     # With GCC up to 2.95.x, collect2 would create an import file
9120     # for dependence libraries.  The import file would start with
9121     # the line `#! .'.  This would cause the generated library to
9122     # depend on `.', always an invalid library.  This was fixed in
9123     # development snapshots of GCC prior to 3.0.
9124     case $host_os in
9125       aix4 | aix4.[01] | aix4.[01].*)
9126       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
9127            echo ' yes '
9128            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
9129         :
9130       else
9131         can_build_shared=no
9132       fi
9133       ;;
9134     esac
9135     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
9136     # soname into executable. Probably we can add versioning support to
9137     # collect2, so additional links can be useful in future.
9138     if test "$aix_use_runtimelinking" = yes; then
9139       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
9140       # instead of lib<name>.a to let people know that these are not
9141       # typical AIX shared libraries.
9142       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9143     else
9144       # We preserve .a as extension for shared libraries through AIX4.2
9145       # and later when we are not doing run time linking.
9146       library_names_spec='${libname}${release}.a $libname.a'
9147       soname_spec='${libname}${release}${shared_ext}$major'
9148     fi
9149     shlibpath_var=LIBPATH
9150   fi
9151   ;;
9152
9153 amigaos*)
9154   library_names_spec='$libname.ixlibrary $libname.a'
9155   # Create ${libname}_ixlibrary.a entries in /sys/libs.
9156   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'
9157   ;;
9158
9159 beos*)
9160   library_names_spec='${libname}${shared_ext}'
9161   dynamic_linker="$host_os ld.so"
9162   shlibpath_var=LIBRARY_PATH
9163   ;;
9164
9165 bsdi[45]*)
9166   version_type=linux
9167   need_version=no
9168   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9169   soname_spec='${libname}${release}${shared_ext}$major'
9170   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
9171   shlibpath_var=LD_LIBRARY_PATH
9172   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
9173   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
9174   # the default ld.so.conf also contains /usr/contrib/lib and
9175   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
9176   # libtool to hard-code these into programs
9177   ;;
9178
9179 cygwin* | mingw* | pw32*)
9180   version_type=windows
9181   shrext_cmds=".dll"
9182   need_version=no
9183   need_lib_prefix=no
9184
9185   case $GCC,$host_os in
9186   yes,cygwin* | yes,mingw* | yes,pw32*)
9187     library_names_spec='$libname.dll.a'
9188     # DLL is installed to $(libdir)/../bin by postinstall_cmds
9189     postinstall_cmds='base_file=`basename \${file}`~
9190       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
9191       dldir=$destdir/`dirname \$dlpath`~
9192       test -d \$dldir || mkdir -p \$dldir~
9193       $install_prog $dir/$dlname \$dldir/$dlname~
9194       chmod a+x \$dldir/$dlname'
9195     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
9196       dlpath=$dir/\$dldll~
9197        $rm \$dlpath'
9198     shlibpath_overrides_runpath=yes
9199
9200     case $host_os in
9201     cygwin*)
9202       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
9203       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9204       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
9205       ;;
9206     mingw*)
9207       # MinGW DLLs use traditional 'lib' prefix
9208       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9209       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9210       if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
9211         # It is most probably a Windows format PATH printed by
9212         # mingw gcc, but we are running on Cygwin. Gcc prints its search
9213         # path with ; separators, and with drive letters. We can handle the
9214         # drive letters (cygwin fileutils understands them), so leave them,
9215         # especially as we might pass files found there to a mingw objdump,
9216         # which wouldn't understand a cygwinified path. Ahh.
9217         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9218       else
9219         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
9220       fi
9221       ;;
9222     pw32*)
9223       # pw32 DLLs use 'pw' prefix rather than 'lib'
9224       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9225       ;;
9226     esac
9227     ;;
9228
9229   *)
9230     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
9231     ;;
9232   esac
9233   dynamic_linker='Win32 ld.exe'
9234   # FIXME: first we should search . and the directory the executable is in
9235   shlibpath_var=PATH
9236   ;;
9237
9238 darwin* | rhapsody*)
9239   dynamic_linker="$host_os dyld"
9240   version_type=darwin
9241   need_lib_prefix=no
9242   need_version=no
9243   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
9244   soname_spec='${libname}${release}${major}$shared_ext'
9245   shlibpath_overrides_runpath=yes
9246   shlibpath_var=DYLD_LIBRARY_PATH
9247   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
9248   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
9249   if test "$GCC" = yes; then
9250     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"`
9251   else
9252     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
9253   fi
9254   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
9255   ;;
9256
9257 dgux*)
9258   version_type=linux
9259   need_lib_prefix=no
9260   need_version=no
9261   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
9262   soname_spec='${libname}${release}${shared_ext}$major'
9263   shlibpath_var=LD_LIBRARY_PATH
9264   ;;
9265
9266 freebsd1*)
9267   dynamic_linker=no
9268   ;;
9269
9270 kfreebsd*-gnu)
9271   version_type=linux
9272   need_lib_prefix=no
9273   need_version=no
9274   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9275   soname_spec='${libname}${release}${shared_ext}$major'
9276   shlibpath_var=LD_LIBRARY_PATH
9277   shlibpath_overrides_runpath=no
9278   hardcode_into_libs=yes
9279   dynamic_linker='GNU ld.so'
9280   ;;
9281
9282 freebsd* | dragonfly*)
9283   # DragonFly does not have aout.  When/if they implement a new
9284   # versioning mechanism, adjust this.
9285   if test -x /usr/bin/objformat; then
9286     objformat=`/usr/bin/objformat`
9287   else
9288     case $host_os in
9289     freebsd[123]*) objformat=aout ;;
9290     *) objformat=elf ;;
9291     esac
9292   fi
9293   version_type=freebsd-$objformat
9294   case $version_type in
9295     freebsd-elf*)
9296       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
9297       need_version=no
9298       need_lib_prefix=no
9299       ;;
9300     freebsd-*)
9301       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
9302       need_version=yes
9303       ;;
9304   esac
9305   shlibpath_var=LD_LIBRARY_PATH
9306   case $host_os in
9307   freebsd2*)
9308     shlibpath_overrides_runpath=yes
9309     ;;
9310   freebsd3.[01]* | freebsdelf3.[01]*)
9311     shlibpath_overrides_runpath=yes
9312     hardcode_into_libs=yes
9313     ;;
9314   *) # from 3.2 on
9315     shlibpath_overrides_runpath=no
9316     hardcode_into_libs=yes
9317     ;;
9318   esac
9319   ;;
9320
9321 gnu*)
9322   version_type=linux
9323   need_lib_prefix=no
9324   need_version=no
9325   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
9326   soname_spec='${libname}${release}${shared_ext}$major'
9327   shlibpath_var=LD_LIBRARY_PATH
9328   hardcode_into_libs=yes
9329   ;;
9330
9331 hpux9* | hpux10* | hpux11*)
9332   # Give a soname corresponding to the major version so that dld.sl refuses to
9333   # link against other versions.
9334   version_type=sunos
9335   need_lib_prefix=no
9336   need_version=no
9337   case $host_cpu in
9338   ia64*)
9339     shrext_cmds='.so'
9340     hardcode_into_libs=yes
9341     dynamic_linker="$host_os dld.so"
9342     shlibpath_var=LD_LIBRARY_PATH
9343     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9344     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9345     soname_spec='${libname}${release}${shared_ext}$major'
9346     if test "X$HPUX_IA64_MODE" = X32; then
9347       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
9348     else
9349       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
9350     fi
9351     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9352     ;;
9353    hppa*64*)
9354      shrext_cmds='.sl'
9355      hardcode_into_libs=yes
9356      dynamic_linker="$host_os dld.sl"
9357      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
9358      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9359      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9360      soname_spec='${libname}${release}${shared_ext}$major'
9361      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
9362      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9363      ;;
9364    *)
9365     shrext_cmds='.sl'
9366     dynamic_linker="$host_os dld.sl"
9367     shlibpath_var=SHLIB_PATH
9368     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
9369     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9370     soname_spec='${libname}${release}${shared_ext}$major'
9371     ;;
9372   esac
9373   # HP-UX runs *really* slowly unless shared libraries are mode 555.
9374   postinstall_cmds='chmod 555 $lib'
9375   ;;
9376
9377 irix5* | irix6* | nonstopux*)
9378   case $host_os in
9379     nonstopux*) version_type=nonstopux ;;
9380     *)
9381         if test "$lt_cv_prog_gnu_ld" = yes; then
9382                 version_type=linux
9383         else
9384                 version_type=irix
9385         fi ;;
9386   esac
9387   need_lib_prefix=no
9388   need_version=no
9389   soname_spec='${libname}${release}${shared_ext}$major'
9390   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
9391   case $host_os in
9392   irix5* | nonstopux*)
9393     libsuff= shlibsuff=
9394     ;;
9395   *)
9396     case $LD in # libtool.m4 will add one of these switches to LD
9397     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
9398       libsuff= shlibsuff= libmagic=32-bit;;
9399     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
9400       libsuff=32 shlibsuff=N32 libmagic=N32;;
9401     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
9402       libsuff=64 shlibsuff=64 libmagic=64-bit;;
9403     *) libsuff= shlibsuff= libmagic=never-match;;
9404     esac
9405     ;;
9406   esac
9407   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
9408   shlibpath_overrides_runpath=no
9409   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
9410   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
9411   hardcode_into_libs=yes
9412   ;;
9413
9414 # No shared lib support for Linux oldld, aout, or coff.
9415 linux*oldld* | linux*aout* | linux*coff*)
9416   dynamic_linker=no
9417   ;;
9418
9419 # This must be Linux ELF.
9420 linux*)
9421   version_type=linux
9422   need_lib_prefix=no
9423   need_version=no
9424   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9425   soname_spec='${libname}${release}${shared_ext}$major'
9426   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
9427   shlibpath_var=LD_LIBRARY_PATH
9428   shlibpath_overrides_runpath=no
9429   # This implies no fast_install, which is unacceptable.
9430   # Some rework will be needed to allow for fast_install
9431   # before this can be enabled.
9432   hardcode_into_libs=yes
9433
9434   # Append ld.so.conf contents to the search path
9435   if test -f /etc/ld.so.conf; then
9436     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' ' '`
9437     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
9438   fi
9439
9440   # We used to test for /lib/ld.so.1 and disable shared libraries on
9441   # powerpc, because MkLinux only supported shared libraries with the
9442   # GNU dynamic linker.  Since this was broken with cross compilers,
9443   # most powerpc-linux boxes support dynamic linking these days and
9444   # people can always --disable-shared, the test was removed, and we
9445   # assume the GNU/Linux dynamic linker is in use.
9446   dynamic_linker='GNU/Linux ld.so'
9447   ;;
9448
9449 knetbsd*-gnu)
9450   version_type=linux
9451   need_lib_prefix=no
9452   need_version=no
9453   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9454   soname_spec='${libname}${release}${shared_ext}$major'
9455   shlibpath_var=LD_LIBRARY_PATH
9456   shlibpath_overrides_runpath=no
9457   hardcode_into_libs=yes
9458   dynamic_linker='GNU ld.so'
9459   ;;
9460
9461 netbsd*)
9462   version_type=sunos
9463   need_lib_prefix=no
9464   need_version=no
9465   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9466     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9467     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9468     dynamic_linker='NetBSD (a.out) ld.so'
9469   else
9470     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9471     soname_spec='${libname}${release}${shared_ext}$major'
9472     dynamic_linker='NetBSD ld.elf_so'
9473   fi
9474   shlibpath_var=LD_LIBRARY_PATH
9475   shlibpath_overrides_runpath=yes
9476   hardcode_into_libs=yes
9477   ;;
9478
9479 newsos6)
9480   version_type=linux
9481   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9482   shlibpath_var=LD_LIBRARY_PATH
9483   shlibpath_overrides_runpath=yes
9484   ;;
9485
9486 nto-qnx*)
9487   version_type=linux
9488   need_lib_prefix=no
9489   need_version=no
9490   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9491   soname_spec='${libname}${release}${shared_ext}$major'
9492   shlibpath_var=LD_LIBRARY_PATH
9493   shlibpath_overrides_runpath=yes
9494   ;;
9495
9496 openbsd*)
9497   version_type=sunos
9498   need_lib_prefix=no
9499   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
9500   case $host_os in
9501     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
9502     *)                         need_version=no  ;;
9503   esac
9504   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9505   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9506   shlibpath_var=LD_LIBRARY_PATH
9507   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9508     case $host_os in
9509       openbsd2.[89] | openbsd2.[89].*)
9510         shlibpath_overrides_runpath=no
9511         ;;
9512       *)
9513         shlibpath_overrides_runpath=yes
9514         ;;
9515       esac
9516   else
9517     shlibpath_overrides_runpath=yes
9518   fi
9519   ;;
9520
9521 os2*)
9522   libname_spec='$name'
9523   shrext_cmds=".dll"
9524   need_lib_prefix=no
9525   library_names_spec='$libname${shared_ext} $libname.a'
9526   dynamic_linker='OS/2 ld.exe'
9527   shlibpath_var=LIBPATH
9528   ;;
9529
9530 osf3* | osf4* | osf5*)
9531   version_type=osf
9532   need_lib_prefix=no
9533   need_version=no
9534   soname_spec='${libname}${release}${shared_ext}$major'
9535   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9536   shlibpath_var=LD_LIBRARY_PATH
9537   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
9538   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
9539   ;;
9540
9541 sco3.2v5*)
9542   version_type=osf
9543   soname_spec='${libname}${release}${shared_ext}$major'
9544   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9545   shlibpath_var=LD_LIBRARY_PATH
9546   ;;
9547
9548 solaris*)
9549   version_type=linux
9550   need_lib_prefix=no
9551   need_version=no
9552   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9553   soname_spec='${libname}${release}${shared_ext}$major'
9554   shlibpath_var=LD_LIBRARY_PATH
9555   shlibpath_overrides_runpath=yes
9556   hardcode_into_libs=yes
9557   # ldd complains unless libraries are executable
9558   postinstall_cmds='chmod +x $lib'
9559   ;;
9560
9561 sunos4*)
9562   version_type=sunos
9563   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9564   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
9565   shlibpath_var=LD_LIBRARY_PATH
9566   shlibpath_overrides_runpath=yes
9567   if test "$with_gnu_ld" = yes; then
9568     need_lib_prefix=no
9569   fi
9570   need_version=yes
9571   ;;
9572
9573 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9574   version_type=linux
9575   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9576   soname_spec='${libname}${release}${shared_ext}$major'
9577   shlibpath_var=LD_LIBRARY_PATH
9578   case $host_vendor in
9579     sni)
9580       shlibpath_overrides_runpath=no
9581       need_lib_prefix=no
9582       export_dynamic_flag_spec='${wl}-Blargedynsym'
9583       runpath_var=LD_RUN_PATH
9584       ;;
9585     siemens)
9586       need_lib_prefix=no
9587       ;;
9588     motorola)
9589       need_lib_prefix=no
9590       need_version=no
9591       shlibpath_overrides_runpath=no
9592       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
9593       ;;
9594   esac
9595   ;;
9596
9597 sysv4*MP*)
9598   if test -d /usr/nec ;then
9599     version_type=linux
9600     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
9601     soname_spec='$libname${shared_ext}.$major'
9602     shlibpath_var=LD_LIBRARY_PATH
9603   fi
9604   ;;
9605
9606 uts4*)
9607   version_type=linux
9608   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9609   soname_spec='${libname}${release}${shared_ext}$major'
9610   shlibpath_var=LD_LIBRARY_PATH
9611   ;;
9612
9613 *)
9614   dynamic_linker=no
9615   ;;
9616 esac
9617 echo "$as_me:$LINENO: result: $dynamic_linker" >&5
9618 echo "${ECHO_T}$dynamic_linker" >&6
9619 test "$dynamic_linker" = no && can_build_shared=no
9620
9621 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
9622 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
9623 hardcode_action=
9624 if test -n "$hardcode_libdir_flag_spec" || \
9625    test -n "$runpath_var" || \
9626    test "X$hardcode_automatic" = "Xyes" ; then
9627
9628   # We can hardcode non-existant directories.
9629   if test "$hardcode_direct" != no &&
9630      # If the only mechanism to avoid hardcoding is shlibpath_var, we
9631      # have to relink, otherwise we might link with an installed library
9632      # when we should be linking with a yet-to-be-installed one
9633      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
9634      test "$hardcode_minus_L" != no; then
9635     # Linking always hardcodes the temporary library directory.
9636     hardcode_action=relink
9637   else
9638     # We can link without hardcoding, and we can hardcode nonexisting dirs.
9639     hardcode_action=immediate
9640   fi
9641 else
9642   # We cannot hardcode anything, or else we can only hardcode existing
9643   # directories.
9644   hardcode_action=unsupported
9645 fi
9646 echo "$as_me:$LINENO: result: $hardcode_action" >&5
9647 echo "${ECHO_T}$hardcode_action" >&6
9648
9649 if test "$hardcode_action" = relink; then
9650   # Fast installation is not supported
9651   enable_fast_install=no
9652 elif test "$shlibpath_overrides_runpath" = yes ||
9653      test "$enable_shared" = no; then
9654   # Fast installation is not necessary
9655   enable_fast_install=needless
9656 fi
9657
9658 striplib=
9659 old_striplib=
9660 echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
9661 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
9662 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
9663   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
9664   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
9665   echo "$as_me:$LINENO: result: yes" >&5
9666 echo "${ECHO_T}yes" >&6
9667 else
9668 # FIXME - insert some real tests, host_os isn't really good enough
9669   case $host_os in
9670    darwin*)
9671        if test -n "$STRIP" ; then
9672          striplib="$STRIP -x"
9673          echo "$as_me:$LINENO: result: yes" >&5
9674 echo "${ECHO_T}yes" >&6
9675        else
9676   echo "$as_me:$LINENO: result: no" >&5
9677 echo "${ECHO_T}no" >&6
9678 fi
9679        ;;
9680    *)
9681   echo "$as_me:$LINENO: result: no" >&5
9682 echo "${ECHO_T}no" >&6
9683     ;;
9684   esac
9685 fi
9686
9687 if test "x$enable_dlopen" != xyes; then
9688   enable_dlopen=unknown
9689   enable_dlopen_self=unknown
9690   enable_dlopen_self_static=unknown
9691 else
9692   lt_cv_dlopen=no
9693   lt_cv_dlopen_libs=
9694
9695   case $host_os in
9696   beos*)
9697     lt_cv_dlopen="load_add_on"
9698     lt_cv_dlopen_libs=
9699     lt_cv_dlopen_self=yes
9700     ;;
9701
9702   mingw* | pw32*)
9703     lt_cv_dlopen="LoadLibrary"
9704     lt_cv_dlopen_libs=
9705    ;;
9706
9707   cygwin*)
9708     lt_cv_dlopen="dlopen"
9709     lt_cv_dlopen_libs=
9710    ;;
9711
9712   darwin*)
9713   # if libdl is installed we need to link against it
9714     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9715 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9716 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9717   echo $ECHO_N "(cached) $ECHO_C" >&6
9718 else
9719   ac_check_lib_save_LIBS=$LIBS
9720 LIBS="-ldl  $LIBS"
9721 cat >conftest.$ac_ext <<_ACEOF
9722 /* confdefs.h.  */
9723 _ACEOF
9724 cat confdefs.h >>conftest.$ac_ext
9725 cat >>conftest.$ac_ext <<_ACEOF
9726 /* end confdefs.h.  */
9727
9728 /* Override any gcc2 internal prototype to avoid an error.  */
9729 #ifdef __cplusplus
9730 extern "C"
9731 #endif
9732 /* We use char because int might match the return type of a gcc2
9733    builtin and then its argument prototype would still apply.  */
9734 char dlopen ();
9735 int
9736 main ()
9737 {
9738 dlopen ();
9739   ;
9740   return 0;
9741 }
9742 _ACEOF
9743 rm -f conftest.$ac_objext conftest$ac_exeext
9744 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9745   (eval $ac_link) 2>conftest.er1
9746   ac_status=$?
9747   grep -v '^ *+' conftest.er1 >conftest.err
9748   rm -f conftest.er1
9749   cat conftest.err >&5
9750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9751   (exit $ac_status); } &&
9752          { ac_try='test -z "$ac_c_werror_flag"
9753                          || test ! -s conftest.err'
9754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9755   (eval $ac_try) 2>&5
9756   ac_status=$?
9757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9758   (exit $ac_status); }; } &&
9759          { ac_try='test -s conftest$ac_exeext'
9760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9761   (eval $ac_try) 2>&5
9762   ac_status=$?
9763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9764   (exit $ac_status); }; }; then
9765   ac_cv_lib_dl_dlopen=yes
9766 else
9767   echo "$as_me: failed program was:" >&5
9768 sed 's/^/| /' conftest.$ac_ext >&5
9769
9770 ac_cv_lib_dl_dlopen=no
9771 fi
9772 rm -f conftest.err conftest.$ac_objext \
9773       conftest$ac_exeext conftest.$ac_ext
9774 LIBS=$ac_check_lib_save_LIBS
9775 fi
9776 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9777 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9778 if test $ac_cv_lib_dl_dlopen = yes; then
9779   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
9780 else
9781
9782     lt_cv_dlopen="dyld"
9783     lt_cv_dlopen_libs=
9784     lt_cv_dlopen_self=yes
9785
9786 fi
9787
9788    ;;
9789
9790   *)
9791     echo "$as_me:$LINENO: checking for shl_load" >&5
9792 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
9793 if test "${ac_cv_func_shl_load+set}" = set; then
9794   echo $ECHO_N "(cached) $ECHO_C" >&6
9795 else
9796   cat >conftest.$ac_ext <<_ACEOF
9797 /* confdefs.h.  */
9798 _ACEOF
9799 cat confdefs.h >>conftest.$ac_ext
9800 cat >>conftest.$ac_ext <<_ACEOF
9801 /* end confdefs.h.  */
9802 /* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
9803    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9804 #define shl_load innocuous_shl_load
9805
9806 /* System header to define __stub macros and hopefully few prototypes,
9807     which can conflict with char shl_load (); below.
9808     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9809     <limits.h> exists even on freestanding compilers.  */
9810
9811 #ifdef __STDC__
9812 # include <limits.h>
9813 #else
9814 # include <assert.h>
9815 #endif
9816
9817 #undef shl_load
9818
9819 /* Override any gcc2 internal prototype to avoid an error.  */
9820 #ifdef __cplusplus
9821 extern "C"
9822 {
9823 #endif
9824 /* We use char because int might match the return type of a gcc2
9825    builtin and then its argument prototype would still apply.  */
9826 char shl_load ();
9827 /* The GNU C library defines this for functions which it implements
9828     to always fail with ENOSYS.  Some functions are actually named
9829     something starting with __ and the normal name is an alias.  */
9830 #if defined (__stub_shl_load) || defined (__stub___shl_load)
9831 choke me
9832 #else
9833 char (*f) () = shl_load;
9834 #endif
9835 #ifdef __cplusplus
9836 }
9837 #endif
9838
9839 int
9840 main ()
9841 {
9842 return f != shl_load;
9843   ;
9844   return 0;
9845 }
9846 _ACEOF
9847 rm -f conftest.$ac_objext conftest$ac_exeext
9848 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9849   (eval $ac_link) 2>conftest.er1
9850   ac_status=$?
9851   grep -v '^ *+' conftest.er1 >conftest.err
9852   rm -f conftest.er1
9853   cat conftest.err >&5
9854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9855   (exit $ac_status); } &&
9856          { ac_try='test -z "$ac_c_werror_flag"
9857                          || test ! -s conftest.err'
9858   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9859   (eval $ac_try) 2>&5
9860   ac_status=$?
9861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9862   (exit $ac_status); }; } &&
9863          { ac_try='test -s conftest$ac_exeext'
9864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9865   (eval $ac_try) 2>&5
9866   ac_status=$?
9867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9868   (exit $ac_status); }; }; then
9869   ac_cv_func_shl_load=yes
9870 else
9871   echo "$as_me: failed program was:" >&5
9872 sed 's/^/| /' conftest.$ac_ext >&5
9873
9874 ac_cv_func_shl_load=no
9875 fi
9876 rm -f conftest.err conftest.$ac_objext \
9877       conftest$ac_exeext conftest.$ac_ext
9878 fi
9879 echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
9880 echo "${ECHO_T}$ac_cv_func_shl_load" >&6
9881 if test $ac_cv_func_shl_load = yes; then
9882   lt_cv_dlopen="shl_load"
9883 else
9884   echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9885 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9886 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9887   echo $ECHO_N "(cached) $ECHO_C" >&6
9888 else
9889   ac_check_lib_save_LIBS=$LIBS
9890 LIBS="-ldld  $LIBS"
9891 cat >conftest.$ac_ext <<_ACEOF
9892 /* confdefs.h.  */
9893 _ACEOF
9894 cat confdefs.h >>conftest.$ac_ext
9895 cat >>conftest.$ac_ext <<_ACEOF
9896 /* end confdefs.h.  */
9897
9898 /* Override any gcc2 internal prototype to avoid an error.  */
9899 #ifdef __cplusplus
9900 extern "C"
9901 #endif
9902 /* We use char because int might match the return type of a gcc2
9903    builtin and then its argument prototype would still apply.  */
9904 char shl_load ();
9905 int
9906 main ()
9907 {
9908 shl_load ();
9909   ;
9910   return 0;
9911 }
9912 _ACEOF
9913 rm -f conftest.$ac_objext conftest$ac_exeext
9914 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9915   (eval $ac_link) 2>conftest.er1
9916   ac_status=$?
9917   grep -v '^ *+' conftest.er1 >conftest.err
9918   rm -f conftest.er1
9919   cat conftest.err >&5
9920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9921   (exit $ac_status); } &&
9922          { ac_try='test -z "$ac_c_werror_flag"
9923                          || test ! -s conftest.err'
9924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9925   (eval $ac_try) 2>&5
9926   ac_status=$?
9927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9928   (exit $ac_status); }; } &&
9929          { ac_try='test -s conftest$ac_exeext'
9930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9931   (eval $ac_try) 2>&5
9932   ac_status=$?
9933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9934   (exit $ac_status); }; }; then
9935   ac_cv_lib_dld_shl_load=yes
9936 else
9937   echo "$as_me: failed program was:" >&5
9938 sed 's/^/| /' conftest.$ac_ext >&5
9939
9940 ac_cv_lib_dld_shl_load=no
9941 fi
9942 rm -f conftest.err conftest.$ac_objext \
9943       conftest$ac_exeext conftest.$ac_ext
9944 LIBS=$ac_check_lib_save_LIBS
9945 fi
9946 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9947 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9948 if test $ac_cv_lib_dld_shl_load = yes; then
9949   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
9950 else
9951   echo "$as_me:$LINENO: checking for dlopen" >&5
9952 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
9953 if test "${ac_cv_func_dlopen+set}" = set; then
9954   echo $ECHO_N "(cached) $ECHO_C" >&6
9955 else
9956   cat >conftest.$ac_ext <<_ACEOF
9957 /* confdefs.h.  */
9958 _ACEOF
9959 cat confdefs.h >>conftest.$ac_ext
9960 cat >>conftest.$ac_ext <<_ACEOF
9961 /* end confdefs.h.  */
9962 /* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
9963    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9964 #define dlopen innocuous_dlopen
9965
9966 /* System header to define __stub macros and hopefully few prototypes,
9967     which can conflict with char dlopen (); below.
9968     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9969     <limits.h> exists even on freestanding compilers.  */
9970
9971 #ifdef __STDC__
9972 # include <limits.h>
9973 #else
9974 # include <assert.h>
9975 #endif
9976
9977 #undef dlopen
9978
9979 /* Override any gcc2 internal prototype to avoid an error.  */
9980 #ifdef __cplusplus
9981 extern "C"
9982 {
9983 #endif
9984 /* We use char because int might match the return type of a gcc2
9985    builtin and then its argument prototype would still apply.  */
9986 char dlopen ();
9987 /* The GNU C library defines this for functions which it implements
9988     to always fail with ENOSYS.  Some functions are actually named
9989     something starting with __ and the normal name is an alias.  */
9990 #if defined (__stub_dlopen) || defined (__stub___dlopen)
9991 choke me
9992 #else
9993 char (*f) () = dlopen;
9994 #endif
9995 #ifdef __cplusplus
9996 }
9997 #endif
9998
9999 int
10000 main ()
10001 {
10002 return f != dlopen;
10003   ;
10004   return 0;
10005 }
10006 _ACEOF
10007 rm -f conftest.$ac_objext conftest$ac_exeext
10008 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10009   (eval $ac_link) 2>conftest.er1
10010   ac_status=$?
10011   grep -v '^ *+' conftest.er1 >conftest.err
10012   rm -f conftest.er1
10013   cat conftest.err >&5
10014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10015   (exit $ac_status); } &&
10016          { ac_try='test -z "$ac_c_werror_flag"
10017                          || test ! -s conftest.err'
10018   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10019   (eval $ac_try) 2>&5
10020   ac_status=$?
10021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10022   (exit $ac_status); }; } &&
10023          { ac_try='test -s conftest$ac_exeext'
10024   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10025   (eval $ac_try) 2>&5
10026   ac_status=$?
10027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10028   (exit $ac_status); }; }; then
10029   ac_cv_func_dlopen=yes
10030 else
10031   echo "$as_me: failed program was:" >&5
10032 sed 's/^/| /' conftest.$ac_ext >&5
10033
10034 ac_cv_func_dlopen=no
10035 fi
10036 rm -f conftest.err conftest.$ac_objext \
10037       conftest$ac_exeext conftest.$ac_ext
10038 fi
10039 echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
10040 echo "${ECHO_T}$ac_cv_func_dlopen" >&6
10041 if test $ac_cv_func_dlopen = yes; then
10042   lt_cv_dlopen="dlopen"
10043 else
10044   echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10045 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10046 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10047   echo $ECHO_N "(cached) $ECHO_C" >&6
10048 else
10049   ac_check_lib_save_LIBS=$LIBS
10050 LIBS="-ldl  $LIBS"
10051 cat >conftest.$ac_ext <<_ACEOF
10052 /* confdefs.h.  */
10053 _ACEOF
10054 cat confdefs.h >>conftest.$ac_ext
10055 cat >>conftest.$ac_ext <<_ACEOF
10056 /* end confdefs.h.  */
10057
10058 /* Override any gcc2 internal prototype to avoid an error.  */
10059 #ifdef __cplusplus
10060 extern "C"
10061 #endif
10062 /* We use char because int might match the return type of a gcc2
10063    builtin and then its argument prototype would still apply.  */
10064 char dlopen ();
10065 int
10066 main ()
10067 {
10068 dlopen ();
10069   ;
10070   return 0;
10071 }
10072 _ACEOF
10073 rm -f conftest.$ac_objext conftest$ac_exeext
10074 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10075   (eval $ac_link) 2>conftest.er1
10076   ac_status=$?
10077   grep -v '^ *+' conftest.er1 >conftest.err
10078   rm -f conftest.er1
10079   cat conftest.err >&5
10080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10081   (exit $ac_status); } &&
10082          { ac_try='test -z "$ac_c_werror_flag"
10083                          || test ! -s conftest.err'
10084   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10085   (eval $ac_try) 2>&5
10086   ac_status=$?
10087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10088   (exit $ac_status); }; } &&
10089          { ac_try='test -s conftest$ac_exeext'
10090   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10091   (eval $ac_try) 2>&5
10092   ac_status=$?
10093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10094   (exit $ac_status); }; }; then
10095   ac_cv_lib_dl_dlopen=yes
10096 else
10097   echo "$as_me: failed program was:" >&5
10098 sed 's/^/| /' conftest.$ac_ext >&5
10099
10100 ac_cv_lib_dl_dlopen=no
10101 fi
10102 rm -f conftest.err conftest.$ac_objext \
10103       conftest$ac_exeext conftest.$ac_ext
10104 LIBS=$ac_check_lib_save_LIBS
10105 fi
10106 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10107 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10108 if test $ac_cv_lib_dl_dlopen = yes; then
10109   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10110 else
10111   echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
10112 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
10113 if test "${ac_cv_lib_svld_dlopen+set}" = set; then
10114   echo $ECHO_N "(cached) $ECHO_C" >&6
10115 else
10116   ac_check_lib_save_LIBS=$LIBS
10117 LIBS="-lsvld  $LIBS"
10118 cat >conftest.$ac_ext <<_ACEOF
10119 /* confdefs.h.  */
10120 _ACEOF
10121 cat confdefs.h >>conftest.$ac_ext
10122 cat >>conftest.$ac_ext <<_ACEOF
10123 /* end confdefs.h.  */
10124
10125 /* Override any gcc2 internal prototype to avoid an error.  */
10126 #ifdef __cplusplus
10127 extern "C"
10128 #endif
10129 /* We use char because int might match the return type of a gcc2
10130    builtin and then its argument prototype would still apply.  */
10131 char dlopen ();
10132 int
10133 main ()
10134 {
10135 dlopen ();
10136   ;
10137   return 0;
10138 }
10139 _ACEOF
10140 rm -f conftest.$ac_objext conftest$ac_exeext
10141 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10142   (eval $ac_link) 2>conftest.er1
10143   ac_status=$?
10144   grep -v '^ *+' conftest.er1 >conftest.err
10145   rm -f conftest.er1
10146   cat conftest.err >&5
10147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10148   (exit $ac_status); } &&
10149          { ac_try='test -z "$ac_c_werror_flag"
10150                          || test ! -s conftest.err'
10151   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10152   (eval $ac_try) 2>&5
10153   ac_status=$?
10154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10155   (exit $ac_status); }; } &&
10156          { ac_try='test -s conftest$ac_exeext'
10157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10158   (eval $ac_try) 2>&5
10159   ac_status=$?
10160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10161   (exit $ac_status); }; }; then
10162   ac_cv_lib_svld_dlopen=yes
10163 else
10164   echo "$as_me: failed program was:" >&5
10165 sed 's/^/| /' conftest.$ac_ext >&5
10166
10167 ac_cv_lib_svld_dlopen=no
10168 fi
10169 rm -f conftest.err conftest.$ac_objext \
10170       conftest$ac_exeext conftest.$ac_ext
10171 LIBS=$ac_check_lib_save_LIBS
10172 fi
10173 echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
10174 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
10175 if test $ac_cv_lib_svld_dlopen = yes; then
10176   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
10177 else
10178   echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
10179 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
10180 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
10181   echo $ECHO_N "(cached) $ECHO_C" >&6
10182 else
10183   ac_check_lib_save_LIBS=$LIBS
10184 LIBS="-ldld  $LIBS"
10185 cat >conftest.$ac_ext <<_ACEOF
10186 /* confdefs.h.  */
10187 _ACEOF
10188 cat confdefs.h >>conftest.$ac_ext
10189 cat >>conftest.$ac_ext <<_ACEOF
10190 /* end confdefs.h.  */
10191
10192 /* Override any gcc2 internal prototype to avoid an error.  */
10193 #ifdef __cplusplus
10194 extern "C"
10195 #endif
10196 /* We use char because int might match the return type of a gcc2
10197    builtin and then its argument prototype would still apply.  */
10198 char dld_link ();
10199 int
10200 main ()
10201 {
10202 dld_link ();
10203   ;
10204   return 0;
10205 }
10206 _ACEOF
10207 rm -f conftest.$ac_objext conftest$ac_exeext
10208 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10209   (eval $ac_link) 2>conftest.er1
10210   ac_status=$?
10211   grep -v '^ *+' conftest.er1 >conftest.err
10212   rm -f conftest.er1
10213   cat conftest.err >&5
10214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10215   (exit $ac_status); } &&
10216          { ac_try='test -z "$ac_c_werror_flag"
10217                          || test ! -s conftest.err'
10218   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10219   (eval $ac_try) 2>&5
10220   ac_status=$?
10221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10222   (exit $ac_status); }; } &&
10223          { ac_try='test -s conftest$ac_exeext'
10224   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10225   (eval $ac_try) 2>&5
10226   ac_status=$?
10227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10228   (exit $ac_status); }; }; then
10229   ac_cv_lib_dld_dld_link=yes
10230 else
10231   echo "$as_me: failed program was:" >&5
10232 sed 's/^/| /' conftest.$ac_ext >&5
10233
10234 ac_cv_lib_dld_dld_link=no
10235 fi
10236 rm -f conftest.err conftest.$ac_objext \
10237       conftest$ac_exeext conftest.$ac_ext
10238 LIBS=$ac_check_lib_save_LIBS
10239 fi
10240 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
10241 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
10242 if test $ac_cv_lib_dld_dld_link = yes; then
10243   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
10244 fi
10245
10246
10247 fi
10248
10249
10250 fi
10251
10252
10253 fi
10254
10255
10256 fi
10257
10258
10259 fi
10260
10261     ;;
10262   esac
10263
10264   if test "x$lt_cv_dlopen" != xno; then
10265     enable_dlopen=yes
10266   else
10267     enable_dlopen=no
10268   fi
10269
10270   case $lt_cv_dlopen in
10271   dlopen)
10272     save_CPPFLAGS="$CPPFLAGS"
10273     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
10274
10275     save_LDFLAGS="$LDFLAGS"
10276     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
10277
10278     save_LIBS="$LIBS"
10279     LIBS="$lt_cv_dlopen_libs $LIBS"
10280
10281     echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
10282 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
10283 if test "${lt_cv_dlopen_self+set}" = set; then
10284   echo $ECHO_N "(cached) $ECHO_C" >&6
10285 else
10286           if test "$cross_compiling" = yes; then :
10287   lt_cv_dlopen_self=cross
10288 else
10289   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10290   lt_status=$lt_dlunknown
10291   cat > conftest.$ac_ext <<EOF
10292 #line 10292 "configure"
10293 #include "confdefs.h"
10294
10295 #if HAVE_DLFCN_H
10296 #include <dlfcn.h>
10297 #endif
10298
10299 #include <stdio.h>
10300
10301 #ifdef RTLD_GLOBAL
10302 #  define LT_DLGLOBAL           RTLD_GLOBAL
10303 #else
10304 #  ifdef DL_GLOBAL
10305 #    define LT_DLGLOBAL         DL_GLOBAL
10306 #  else
10307 #    define LT_DLGLOBAL         0
10308 #  endif
10309 #endif
10310
10311 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10312    find out it does not work in some platform. */
10313 #ifndef LT_DLLAZY_OR_NOW
10314 #  ifdef RTLD_LAZY
10315 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10316 #  else
10317 #    ifdef DL_LAZY
10318 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10319 #    else
10320 #      ifdef RTLD_NOW
10321 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10322 #      else
10323 #        ifdef DL_NOW
10324 #          define LT_DLLAZY_OR_NOW      DL_NOW
10325 #        else
10326 #          define LT_DLLAZY_OR_NOW      0
10327 #        endif
10328 #      endif
10329 #    endif
10330 #  endif
10331 #endif
10332
10333 #ifdef __cplusplus
10334 extern "C" void exit (int);
10335 #endif
10336
10337 void fnord() { int i=42;}
10338 int main ()
10339 {
10340   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10341   int status = $lt_dlunknown;
10342
10343   if (self)
10344     {
10345       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10346       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10347       /* dlclose (self); */
10348     }
10349
10350     exit (status);
10351 }
10352 EOF
10353   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10354   (eval $ac_link) 2>&5
10355   ac_status=$?
10356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10357   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
10358     (./conftest; exit; ) >&5 2>/dev/null
10359     lt_status=$?
10360     case x$lt_status in
10361       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
10362       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
10363       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
10364     esac
10365   else :
10366     # compilation failed
10367     lt_cv_dlopen_self=no
10368   fi
10369 fi
10370 rm -fr conftest*
10371
10372
10373 fi
10374 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
10375 echo "${ECHO_T}$lt_cv_dlopen_self" >&6
10376
10377     if test "x$lt_cv_dlopen_self" = xyes; then
10378       LDFLAGS="$LDFLAGS $link_static_flag"
10379       echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
10380 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
10381 if test "${lt_cv_dlopen_self_static+set}" = set; then
10382   echo $ECHO_N "(cached) $ECHO_C" >&6
10383 else
10384           if test "$cross_compiling" = yes; then :
10385   lt_cv_dlopen_self_static=cross
10386 else
10387   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10388   lt_status=$lt_dlunknown
10389   cat > conftest.$ac_ext <<EOF
10390 #line 10390 "configure"
10391 #include "confdefs.h"
10392
10393 #if HAVE_DLFCN_H
10394 #include <dlfcn.h>
10395 #endif
10396
10397 #include <stdio.h>
10398
10399 #ifdef RTLD_GLOBAL
10400 #  define LT_DLGLOBAL           RTLD_GLOBAL
10401 #else
10402 #  ifdef DL_GLOBAL
10403 #    define LT_DLGLOBAL         DL_GLOBAL
10404 #  else
10405 #    define LT_DLGLOBAL         0
10406 #  endif
10407 #endif
10408
10409 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10410    find out it does not work in some platform. */
10411 #ifndef LT_DLLAZY_OR_NOW
10412 #  ifdef RTLD_LAZY
10413 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10414 #  else
10415 #    ifdef DL_LAZY
10416 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10417 #    else
10418 #      ifdef RTLD_NOW
10419 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10420 #      else
10421 #        ifdef DL_NOW
10422 #          define LT_DLLAZY_OR_NOW      DL_NOW
10423 #        else
10424 #          define LT_DLLAZY_OR_NOW      0
10425 #        endif
10426 #      endif
10427 #    endif
10428 #  endif
10429 #endif
10430
10431 #ifdef __cplusplus
10432 extern "C" void exit (int);
10433 #endif
10434
10435 void fnord() { int i=42;}
10436 int main ()
10437 {
10438   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10439   int status = $lt_dlunknown;
10440
10441   if (self)
10442     {
10443       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10444       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10445       /* dlclose (self); */
10446     }
10447
10448     exit (status);
10449 }
10450 EOF
10451   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10452   (eval $ac_link) 2>&5
10453   ac_status=$?
10454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10455   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
10456     (./conftest; exit; ) >&5 2>/dev/null
10457     lt_status=$?
10458     case x$lt_status in
10459       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
10460       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
10461       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
10462     esac
10463   else :
10464     # compilation failed
10465     lt_cv_dlopen_self_static=no
10466   fi
10467 fi
10468 rm -fr conftest*
10469
10470
10471 fi
10472 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
10473 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
10474     fi
10475
10476     CPPFLAGS="$save_CPPFLAGS"
10477     LDFLAGS="$save_LDFLAGS"
10478     LIBS="$save_LIBS"
10479     ;;
10480   esac
10481
10482   case $lt_cv_dlopen_self in
10483   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
10484   *) enable_dlopen_self=unknown ;;
10485   esac
10486
10487   case $lt_cv_dlopen_self_static in
10488   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
10489   *) enable_dlopen_self_static=unknown ;;
10490   esac
10491 fi
10492
10493
10494 # Report which librarie types wil actually be built
10495 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
10496 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
10497 echo "$as_me:$LINENO: result: $can_build_shared" >&5
10498 echo "${ECHO_T}$can_build_shared" >&6
10499
10500 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
10501 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
10502 test "$can_build_shared" = "no" && enable_shared=no
10503
10504 # On AIX, shared libraries and static libraries use the same namespace, and
10505 # are all built from PIC.
10506 case $host_os in
10507 aix3*)
10508   test "$enable_shared" = yes && enable_static=no
10509   if test -n "$RANLIB"; then
10510     archive_cmds="$archive_cmds~\$RANLIB \$lib"
10511     postinstall_cmds='$RANLIB $lib'
10512   fi
10513   ;;
10514
10515 aix4* | aix5*)
10516   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
10517     test "$enable_shared" = yes && enable_static=no
10518   fi
10519     ;;
10520 esac
10521 echo "$as_me:$LINENO: result: $enable_shared" >&5
10522 echo "${ECHO_T}$enable_shared" >&6
10523
10524 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
10525 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
10526 # Make sure either enable_shared or enable_static is yes.
10527 test "$enable_shared" = yes || enable_static=yes
10528 echo "$as_me:$LINENO: result: $enable_static" >&5
10529 echo "${ECHO_T}$enable_static" >&6
10530
10531 # The else clause should only fire when bootstrapping the
10532 # libtool distribution, otherwise you forgot to ship ltmain.sh
10533 # with your package, and you will get complaints that there are
10534 # no rules to generate ltmain.sh.
10535 if test -f "$ltmain"; then
10536   # See if we are running on zsh, and set the options which allow our commands through
10537   # without removal of \ escapes.
10538   if test -n "${ZSH_VERSION+set}" ; then
10539     setopt NO_GLOB_SUBST
10540   fi
10541   # Now quote all the things that may contain metacharacters while being
10542   # careful not to overquote the AC_SUBSTed values.  We take copies of the
10543   # variables and quote the copies for generation of the libtool script.
10544   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
10545     SED SHELL STRIP \
10546     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
10547     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
10548     deplibs_check_method reload_flag reload_cmds need_locks \
10549     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
10550     lt_cv_sys_global_symbol_to_c_name_address \
10551     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
10552     old_postinstall_cmds old_postuninstall_cmds \
10553     compiler \
10554     CC \
10555     LD \
10556     lt_prog_compiler_wl \
10557     lt_prog_compiler_pic \
10558     lt_prog_compiler_static \
10559     lt_prog_compiler_no_builtin_flag \
10560     export_dynamic_flag_spec \
10561     thread_safe_flag_spec \
10562     whole_archive_flag_spec \
10563     enable_shared_with_static_runtimes \
10564     old_archive_cmds \
10565     old_archive_from_new_cmds \
10566     predep_objects \
10567     postdep_objects \
10568     predeps \
10569     postdeps \
10570     compiler_lib_search_path \
10571     archive_cmds \
10572     archive_expsym_cmds \
10573     postinstall_cmds \
10574     postuninstall_cmds \
10575     old_archive_from_expsyms_cmds \
10576     allow_undefined_flag \
10577     no_undefined_flag \
10578     export_symbols_cmds \
10579     hardcode_libdir_flag_spec \
10580     hardcode_libdir_flag_spec_ld \
10581     hardcode_libdir_separator \
10582     hardcode_automatic \
10583     module_cmds \
10584     module_expsym_cmds \
10585     lt_cv_prog_compiler_c_o \
10586     exclude_expsyms \
10587     include_expsyms; do
10588
10589     case $var in
10590     old_archive_cmds | \
10591     old_archive_from_new_cmds | \
10592     archive_cmds | \
10593     archive_expsym_cmds | \
10594     module_cmds | \
10595     module_expsym_cmds | \
10596     old_archive_from_expsyms_cmds | \
10597     export_symbols_cmds | \
10598     extract_expsyms_cmds | reload_cmds | finish_cmds | \
10599     postinstall_cmds | postuninstall_cmds | \
10600     old_postinstall_cmds | old_postuninstall_cmds | \
10601     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
10602       # Double-quote double-evaled strings.
10603       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
10604       ;;
10605     *)
10606       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
10607       ;;
10608     esac
10609   done
10610
10611   case $lt_echo in
10612   *'\$0 --fallback-echo"')
10613     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
10614     ;;
10615   esac
10616
10617 cfgfile="${ofile}T"
10618   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
10619   $rm -f "$cfgfile"
10620   { echo "$as_me:$LINENO: creating $ofile" >&5
10621 echo "$as_me: creating $ofile" >&6;}
10622
10623   cat <<__EOF__ >> "$cfgfile"
10624 #! $SHELL
10625
10626 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
10627 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
10628 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
10629 #
10630 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
10631 # Free Software Foundation, Inc.
10632 #
10633 # This file is part of GNU Libtool:
10634 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
10635 #
10636 # This program is free software; you can redistribute it and/or modify
10637 # it under the terms of the GNU General Public License as published by
10638 # the Free Software Foundation; either version 2 of the License, or
10639 # (at your option) any later version.
10640 #
10641 # This program is distributed in the hope that it will be useful, but
10642 # WITHOUT ANY WARRANTY; without even the implied warranty of
10643 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10644 # General Public License for more details.
10645 #
10646 # You should have received a copy of the GNU General Public License
10647 # along with this program; if not, write to the Free Software
10648 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
10649 #
10650 # As a special exception to the GNU General Public License, if you
10651 # distribute this file as part of a program that contains a
10652 # configuration script generated by Autoconf, you may include it under
10653 # the same distribution terms that you use for the rest of that program.
10654
10655 # A sed program that does not truncate output.
10656 SED=$lt_SED
10657
10658 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
10659 Xsed="$SED -e 1s/^X//"
10660
10661 # The HP-UX ksh and POSIX shell print the target directory to stdout
10662 # if CDPATH is set.
10663 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
10664
10665 # The names of the tagged configurations supported by this script.
10666 available_tags=
10667
10668 # ### BEGIN LIBTOOL CONFIG
10669
10670 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10671
10672 # Shell to use when invoking shell scripts.
10673 SHELL=$lt_SHELL
10674
10675 # Whether or not to build shared libraries.
10676 build_libtool_libs=$enable_shared
10677
10678 # Whether or not to build static libraries.
10679 build_old_libs=$enable_static
10680
10681 # Whether or not to add -lc for building shared libraries.
10682 build_libtool_need_lc=$archive_cmds_need_lc
10683
10684 # Whether or not to disallow shared libs when runtime libs are static
10685 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
10686
10687 # Whether or not to optimize for fast installation.
10688 fast_install=$enable_fast_install
10689
10690 # The host system.
10691 host_alias=$host_alias
10692 host=$host
10693 host_os=$host_os
10694
10695 # The build system.
10696 build_alias=$build_alias
10697 build=$build
10698 build_os=$build_os
10699
10700 # An echo program that does not interpret backslashes.
10701 echo=$lt_echo
10702
10703 # The archiver.
10704 AR=$lt_AR
10705 AR_FLAGS=$lt_AR_FLAGS
10706
10707 # A C compiler.
10708 LTCC=$lt_LTCC
10709
10710 # A language-specific compiler.
10711 CC=$lt_compiler
10712
10713 # Is the compiler the GNU C compiler?
10714 with_gcc=$GCC
10715
10716 # An ERE matcher.
10717 EGREP=$lt_EGREP
10718
10719 # The linker used to build libraries.
10720 LD=$lt_LD
10721
10722 # Whether we need hard or soft links.
10723 LN_S=$lt_LN_S
10724
10725 # A BSD-compatible nm program.
10726 NM=$lt_NM
10727
10728 # A symbol stripping program
10729 STRIP=$lt_STRIP
10730
10731 # Used to examine libraries when file_magic_cmd begins "file"
10732 MAGIC_CMD=$MAGIC_CMD
10733
10734 # Used on cygwin: DLL creation program.
10735 DLLTOOL="$DLLTOOL"
10736
10737 # Used on cygwin: object dumper.
10738 OBJDUMP="$OBJDUMP"
10739
10740 # Used on cygwin: assembler.
10741 AS="$AS"
10742
10743 # The name of the directory that contains temporary libtool files.
10744 objdir=$objdir
10745
10746 # How to create reloadable object files.
10747 reload_flag=$lt_reload_flag
10748 reload_cmds=$lt_reload_cmds
10749
10750 # How to pass a linker flag through the compiler.
10751 wl=$lt_lt_prog_compiler_wl
10752
10753 # Object file suffix (normally "o").
10754 objext="$ac_objext"
10755
10756 # Old archive suffix (normally "a").
10757 libext="$libext"
10758
10759 # Shared library suffix (normally ".so").
10760 shrext_cmds='$shrext_cmds'
10761
10762 # Executable file suffix (normally "").
10763 exeext="$exeext"
10764
10765 # Additional compiler flags for building library objects.
10766 pic_flag=$lt_lt_prog_compiler_pic
10767 pic_mode=$pic_mode
10768
10769 # What is the maximum length of a command?
10770 max_cmd_len=$lt_cv_sys_max_cmd_len
10771
10772 # Does compiler simultaneously support -c and -o options?
10773 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
10774
10775 # Must we lock files when doing compilation?
10776 need_locks=$lt_need_locks
10777
10778 # Do we need the lib prefix for modules?
10779 need_lib_prefix=$need_lib_prefix
10780
10781 # Do we need a version for libraries?
10782 need_version=$need_version
10783
10784 # Whether dlopen is supported.
10785 dlopen_support=$enable_dlopen
10786
10787 # Whether dlopen of programs is supported.
10788 dlopen_self=$enable_dlopen_self
10789
10790 # Whether dlopen of statically linked programs is supported.
10791 dlopen_self_static=$enable_dlopen_self_static
10792
10793 # Compiler flag to prevent dynamic linking.
10794 link_static_flag=$lt_lt_prog_compiler_static
10795
10796 # Compiler flag to turn off builtin functions.
10797 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
10798
10799 # Compiler flag to allow reflexive dlopens.
10800 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
10801
10802 # Compiler flag to generate shared objects directly from archives.
10803 whole_archive_flag_spec=$lt_whole_archive_flag_spec
10804
10805 # Compiler flag to generate thread-safe objects.
10806 thread_safe_flag_spec=$lt_thread_safe_flag_spec
10807
10808 # Library versioning type.
10809 version_type=$version_type
10810
10811 # Format of library name prefix.
10812 libname_spec=$lt_libname_spec
10813
10814 # List of archive names.  First name is the real one, the rest are links.
10815 # The last name is the one that the linker finds with -lNAME.
10816 library_names_spec=$lt_library_names_spec
10817
10818 # The coded name of the library, if different from the real name.
10819 soname_spec=$lt_soname_spec
10820
10821 # Commands used to build and install an old-style archive.
10822 RANLIB=$lt_RANLIB
10823 old_archive_cmds=$lt_old_archive_cmds
10824 old_postinstall_cmds=$lt_old_postinstall_cmds
10825 old_postuninstall_cmds=$lt_old_postuninstall_cmds
10826
10827 # Create an old-style archive from a shared archive.
10828 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
10829
10830 # Create a temporary old-style archive to link instead of a shared archive.
10831 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
10832
10833 # Commands used to build and install a shared archive.
10834 archive_cmds=$lt_archive_cmds
10835 archive_expsym_cmds=$lt_archive_expsym_cmds
10836 postinstall_cmds=$lt_postinstall_cmds
10837 postuninstall_cmds=$lt_postuninstall_cmds
10838
10839 # Commands used to build a loadable module (assumed same as above if empty)
10840 module_cmds=$lt_module_cmds
10841 module_expsym_cmds=$lt_module_expsym_cmds
10842
10843 # Commands to strip libraries.
10844 old_striplib=$lt_old_striplib
10845 striplib=$lt_striplib
10846
10847 # Dependencies to place before the objects being linked to create a
10848 # shared library.
10849 predep_objects=$lt_predep_objects
10850
10851 # Dependencies to place after the objects being linked to create a
10852 # shared library.
10853 postdep_objects=$lt_postdep_objects
10854
10855 # Dependencies to place before the objects being linked to create a
10856 # shared library.
10857 predeps=$lt_predeps
10858
10859 # Dependencies to place after the objects being linked to create a
10860 # shared library.
10861 postdeps=$lt_postdeps
10862
10863 # The library search path used internally by the compiler when linking
10864 # a shared library.
10865 compiler_lib_search_path=$lt_compiler_lib_search_path
10866
10867 # Method to check whether dependent libraries are shared objects.
10868 deplibs_check_method=$lt_deplibs_check_method
10869
10870 # Command to use when deplibs_check_method == file_magic.
10871 file_magic_cmd=$lt_file_magic_cmd
10872
10873 # Flag that allows shared libraries with undefined symbols to be built.
10874 allow_undefined_flag=$lt_allow_undefined_flag
10875
10876 # Flag that forces no undefined symbols.
10877 no_undefined_flag=$lt_no_undefined_flag
10878
10879 # Commands used to finish a libtool library installation in a directory.
10880 finish_cmds=$lt_finish_cmds
10881
10882 # Same as above, but a single script fragment to be evaled but not shown.
10883 finish_eval=$lt_finish_eval
10884
10885 # Take the output of nm and produce a listing of raw symbols and C names.
10886 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
10887
10888 # Transform the output of nm in a proper C declaration
10889 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
10890
10891 # Transform the output of nm in a C name address pair
10892 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
10893
10894 # This is the shared library runtime path variable.
10895 runpath_var=$runpath_var
10896
10897 # This is the shared library path variable.
10898 shlibpath_var=$shlibpath_var
10899
10900 # Is shlibpath searched before the hard-coded library search path?
10901 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
10902
10903 # How to hardcode a shared library path into an executable.
10904 hardcode_action=$hardcode_action
10905
10906 # Whether we should hardcode library paths into libraries.
10907 hardcode_into_libs=$hardcode_into_libs
10908
10909 # Flag to hardcode \$libdir into a binary during linking.
10910 # This must work even if \$libdir does not exist.
10911 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
10912
10913 # If ld is used when linking, flag to hardcode \$libdir into
10914 # a binary during linking. This must work even if \$libdir does
10915 # not exist.
10916 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
10917
10918 # Whether we need a single -rpath flag with a separated argument.
10919 hardcode_libdir_separator=$lt_hardcode_libdir_separator
10920
10921 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
10922 # resulting binary.
10923 hardcode_direct=$hardcode_direct
10924
10925 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
10926 # resulting binary.
10927 hardcode_minus_L=$hardcode_minus_L
10928
10929 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
10930 # the resulting binary.
10931 hardcode_shlibpath_var=$hardcode_shlibpath_var
10932
10933 # Set to yes if building a shared library automatically hardcodes DIR into the library
10934 # and all subsequent libraries and executables linked against it.
10935 hardcode_automatic=$hardcode_automatic
10936
10937 # Variables whose values should be saved in libtool wrapper scripts and
10938 # restored at relink time.
10939 variables_saved_for_relink="$variables_saved_for_relink"
10940
10941 # Whether libtool must link a program against all its dependency libraries.
10942 link_all_deplibs=$link_all_deplibs
10943
10944 # Compile-time system search path for libraries
10945 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
10946
10947 # Run-time system search path for libraries
10948 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
10949
10950 # Fix the shell variable \$srcfile for the compiler.
10951 fix_srcfile_path="$fix_srcfile_path"
10952
10953 # Set to yes if exported symbols are required.
10954 always_export_symbols=$always_export_symbols
10955
10956 # The commands to list exported symbols.
10957 export_symbols_cmds=$lt_export_symbols_cmds
10958
10959 # The commands to extract the exported symbol list from a shared archive.
10960 extract_expsyms_cmds=$lt_extract_expsyms_cmds
10961
10962 # Symbols that should not be listed in the preloaded symbols.
10963 exclude_expsyms=$lt_exclude_expsyms
10964
10965 # Symbols that must always be exported.
10966 include_expsyms=$lt_include_expsyms
10967
10968 # ### END LIBTOOL CONFIG
10969
10970 __EOF__
10971
10972
10973   case $host_os in
10974   aix3*)
10975     cat <<\EOF >> "$cfgfile"
10976
10977 # AIX sometimes has problems with the GCC collect2 program.  For some
10978 # reason, if we set the COLLECT_NAMES environment variable, the problems
10979 # vanish in a puff of smoke.
10980 if test "X${COLLECT_NAMES+set}" != Xset; then
10981   COLLECT_NAMES=
10982   export COLLECT_NAMES
10983 fi
10984 EOF
10985     ;;
10986   esac
10987
10988   # We use sed instead of cat because bash on DJGPP gets confused if
10989   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
10990   # text mode, it properly converts lines to CR/LF.  This bash problem
10991   # is reportedly fixed, but why not run on old versions too?
10992   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
10993
10994   mv -f "$cfgfile" "$ofile" || \
10995     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
10996   chmod +x "$ofile"
10997
10998 else
10999   # If there is no Makefile yet, we rely on a make rule to execute
11000   # `config.status --recheck' to rerun these tests and create the
11001   # libtool script then.
11002   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
11003   if test -f "$ltmain_in"; then
11004     test -f Makefile && make "$ltmain"
11005   fi
11006 fi
11007
11008
11009 ac_ext=c
11010 ac_cpp='$CPP $CPPFLAGS'
11011 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11012 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11013 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11014
11015 CC="$lt_save_CC"
11016
11017
11018 # Check whether --with-tags or --without-tags was given.
11019 if test "${with_tags+set}" = set; then
11020   withval="$with_tags"
11021   tagnames="$withval"
11022 fi;
11023
11024 if test -f "$ltmain" && test -n "$tagnames"; then
11025   if test ! -f "${ofile}"; then
11026     { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
11027 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
11028   fi
11029
11030   if test -z "$LTCC"; then
11031     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
11032     if test -z "$LTCC"; then
11033       { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
11034 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
11035     else
11036       { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
11037 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
11038     fi
11039   fi
11040
11041   # Extract list of available tagged configurations in $ofile.
11042   # Note that this assumes the entire list is on one line.
11043   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
11044
11045   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
11046   for tagname in $tagnames; do
11047     IFS="$lt_save_ifs"
11048     # Check whether tagname contains only valid characters
11049     case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
11050     "") ;;
11051     *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
11052 echo "$as_me: error: invalid tag name: $tagname" >&2;}
11053    { (exit 1); exit 1; }; }
11054         ;;
11055     esac
11056
11057     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
11058     then
11059       { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
11060 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
11061    { (exit 1); exit 1; }; }
11062     fi
11063
11064     # Update the list of available tags.
11065     if test -n "$tagname"; then
11066       echo appending configuration tag \"$tagname\" to $ofile
11067
11068       case $tagname in
11069       CXX)
11070         if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
11071             ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
11072             (test "X$CXX" != "Xg++"))) ; then
11073           :
11074         else
11075           tagname=""
11076         fi
11077         ;;
11078
11079       F77)
11080         if test -n "$F77" && test "X$F77" != "Xno"; then
11081           :
11082         else
11083           tagname=""
11084         fi
11085         ;;
11086
11087       GCJ)
11088         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
11089           :
11090         else
11091           tagname=""
11092         fi
11093         ;;
11094
11095       RC)
11096
11097
11098
11099 # Source file extension for RC test sources.
11100 ac_ext=rc
11101
11102 # Object file extension for compiled RC test sources.
11103 objext=o
11104 objext_RC=$objext
11105
11106 # Code to be used in simple compile tests
11107 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
11108
11109 # Code to be used in simple link tests
11110 lt_simple_link_test_code="$lt_simple_compile_test_code"
11111
11112 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11113
11114 # If no C compiler was specified, use CC.
11115 LTCC=${LTCC-"$CC"}
11116
11117 # Allow CC to be a program name with arguments.
11118 compiler=$CC
11119
11120
11121 # save warnings/boilerplate of simple test code
11122 ac_outfile=conftest.$ac_objext
11123 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
11124 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11125 _lt_compiler_boilerplate=`cat conftest.err`
11126 $rm conftest*
11127
11128 ac_outfile=conftest.$ac_objext
11129 printf "$lt_simple_link_test_code" >conftest.$ac_ext
11130 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11131 _lt_linker_boilerplate=`cat conftest.err`
11132 $rm conftest*
11133
11134
11135 # Allow CC to be a program name with arguments.
11136 lt_save_CC="$CC"
11137 CC=${RC-"windres"}
11138 compiler=$CC
11139 compiler_RC=$CC
11140 for cc_temp in $compiler""; do
11141   case $cc_temp in
11142     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
11143     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
11144     \-*) ;;
11145     *) break;;
11146   esac
11147 done
11148 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
11149
11150 lt_cv_prog_compiler_c_o_RC=yes
11151
11152 # The else clause should only fire when bootstrapping the
11153 # libtool distribution, otherwise you forgot to ship ltmain.sh
11154 # with your package, and you will get complaints that there are
11155 # no rules to generate ltmain.sh.
11156 if test -f "$ltmain"; then
11157   # See if we are running on zsh, and set the options which allow our commands through
11158   # without removal of \ escapes.
11159   if test -n "${ZSH_VERSION+set}" ; then
11160     setopt NO_GLOB_SUBST
11161   fi
11162   # Now quote all the things that may contain metacharacters while being
11163   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11164   # variables and quote the copies for generation of the libtool script.
11165   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11166     SED SHELL STRIP \
11167     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11168     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11169     deplibs_check_method reload_flag reload_cmds need_locks \
11170     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11171     lt_cv_sys_global_symbol_to_c_name_address \
11172     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11173     old_postinstall_cmds old_postuninstall_cmds \
11174     compiler_RC \
11175     CC_RC \
11176     LD_RC \
11177     lt_prog_compiler_wl_RC \
11178     lt_prog_compiler_pic_RC \
11179     lt_prog_compiler_static_RC \
11180     lt_prog_compiler_no_builtin_flag_RC \
11181     export_dynamic_flag_spec_RC \
11182     thread_safe_flag_spec_RC \
11183     whole_archive_flag_spec_RC \
11184     enable_shared_with_static_runtimes_RC \
11185     old_archive_cmds_RC \
11186     old_archive_from_new_cmds_RC \
11187     predep_objects_RC \
11188     postdep_objects_RC \
11189     predeps_RC \
11190     postdeps_RC \
11191     compiler_lib_search_path_RC \
11192     archive_cmds_RC \
11193     archive_expsym_cmds_RC \
11194     postinstall_cmds_RC \
11195     postuninstall_cmds_RC \
11196     old_archive_from_expsyms_cmds_RC \
11197     allow_undefined_flag_RC \
11198     no_undefined_flag_RC \
11199     export_symbols_cmds_RC \
11200     hardcode_libdir_flag_spec_RC \
11201     hardcode_libdir_flag_spec_ld_RC \
11202     hardcode_libdir_separator_RC \
11203     hardcode_automatic_RC \
11204     module_cmds_RC \
11205     module_expsym_cmds_RC \
11206     lt_cv_prog_compiler_c_o_RC \
11207     exclude_expsyms_RC \
11208     include_expsyms_RC; do
11209
11210     case $var in
11211     old_archive_cmds_RC | \
11212     old_archive_from_new_cmds_RC | \
11213     archive_cmds_RC | \
11214     archive_expsym_cmds_RC | \
11215     module_cmds_RC | \
11216     module_expsym_cmds_RC | \
11217     old_archive_from_expsyms_cmds_RC | \
11218     export_symbols_cmds_RC | \
11219     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11220     postinstall_cmds | postuninstall_cmds | \
11221     old_postinstall_cmds | old_postuninstall_cmds | \
11222     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11223       # Double-quote double-evaled strings.
11224       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11225       ;;
11226     *)
11227       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11228       ;;
11229     esac
11230   done
11231
11232   case $lt_echo in
11233   *'\$0 --fallback-echo"')
11234     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11235     ;;
11236   esac
11237
11238 cfgfile="$ofile"
11239
11240   cat <<__EOF__ >> "$cfgfile"
11241 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
11242
11243 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11244
11245 # Shell to use when invoking shell scripts.
11246 SHELL=$lt_SHELL
11247
11248 # Whether or not to build shared libraries.
11249 build_libtool_libs=$enable_shared
11250
11251 # Whether or not to build static libraries.
11252 build_old_libs=$enable_static
11253
11254 # Whether or not to add -lc for building shared libraries.
11255 build_libtool_need_lc=$archive_cmds_need_lc_RC
11256
11257 # Whether or not to disallow shared libs when runtime libs are static
11258 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
11259
11260 # Whether or not to optimize for fast installation.
11261 fast_install=$enable_fast_install
11262
11263 # The host system.
11264 host_alias=$host_alias
11265 host=$host
11266 host_os=$host_os
11267
11268 # The build system.
11269 build_alias=$build_alias
11270 build=$build
11271 build_os=$build_os
11272
11273 # An echo program that does not interpret backslashes.
11274 echo=$lt_echo
11275
11276 # The archiver.
11277 AR=$lt_AR
11278 AR_FLAGS=$lt_AR_FLAGS
11279
11280 # A C compiler.
11281 LTCC=$lt_LTCC
11282
11283 # A language-specific compiler.
11284 CC=$lt_compiler_RC
11285
11286 # Is the compiler the GNU C compiler?
11287 with_gcc=$GCC_RC
11288
11289 # An ERE matcher.
11290 EGREP=$lt_EGREP
11291
11292 # The linker used to build libraries.
11293 LD=$lt_LD_RC
11294
11295 # Whether we need hard or soft links.
11296 LN_S=$lt_LN_S
11297
11298 # A BSD-compatible nm program.
11299 NM=$lt_NM
11300
11301 # A symbol stripping program
11302 STRIP=$lt_STRIP
11303
11304 # Used to examine libraries when file_magic_cmd begins "file"
11305 MAGIC_CMD=$MAGIC_CMD
11306
11307 # Used on cygwin: DLL creation program.
11308 DLLTOOL="$DLLTOOL"
11309
11310 # Used on cygwin: object dumper.
11311 OBJDUMP="$OBJDUMP"
11312
11313 # Used on cygwin: assembler.
11314 AS="$AS"
11315
11316 # The name of the directory that contains temporary libtool files.
11317 objdir=$objdir
11318
11319 # How to create reloadable object files.
11320 reload_flag=$lt_reload_flag
11321 reload_cmds=$lt_reload_cmds
11322
11323 # How to pass a linker flag through the compiler.
11324 wl=$lt_lt_prog_compiler_wl_RC
11325
11326 # Object file suffix (normally "o").
11327 objext="$ac_objext"
11328
11329 # Old archive suffix (normally "a").
11330 libext="$libext"
11331
11332 # Shared library suffix (normally ".so").
11333 shrext_cmds='$shrext_cmds'
11334
11335 # Executable file suffix (normally "").
11336 exeext="$exeext"
11337
11338 # Additional compiler flags for building library objects.
11339 pic_flag=$lt_lt_prog_compiler_pic_RC
11340 pic_mode=$pic_mode
11341
11342 # What is the maximum length of a command?
11343 max_cmd_len=$lt_cv_sys_max_cmd_len
11344
11345 # Does compiler simultaneously support -c and -o options?
11346 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
11347
11348 # Must we lock files when doing compilation?
11349 need_locks=$lt_need_locks
11350
11351 # Do we need the lib prefix for modules?
11352 need_lib_prefix=$need_lib_prefix
11353
11354 # Do we need a version for libraries?
11355 need_version=$need_version
11356
11357 # Whether dlopen is supported.
11358 dlopen_support=$enable_dlopen
11359
11360 # Whether dlopen of programs is supported.
11361 dlopen_self=$enable_dlopen_self
11362
11363 # Whether dlopen of statically linked programs is supported.
11364 dlopen_self_static=$enable_dlopen_self_static
11365
11366 # Compiler flag to prevent dynamic linking.
11367 link_static_flag=$lt_lt_prog_compiler_static_RC
11368
11369 # Compiler flag to turn off builtin functions.
11370 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
11371
11372 # Compiler flag to allow reflexive dlopens.
11373 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
11374
11375 # Compiler flag to generate shared objects directly from archives.
11376 whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
11377
11378 # Compiler flag to generate thread-safe objects.
11379 thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
11380
11381 # Library versioning type.
11382 version_type=$version_type
11383
11384 # Format of library name prefix.
11385 libname_spec=$lt_libname_spec
11386
11387 # List of archive names.  First name is the real one, the rest are links.
11388 # The last name is the one that the linker finds with -lNAME.
11389 library_names_spec=$lt_library_names_spec
11390
11391 # The coded name of the library, if different from the real name.
11392 soname_spec=$lt_soname_spec
11393
11394 # Commands used to build and install an old-style archive.
11395 RANLIB=$lt_RANLIB
11396 old_archive_cmds=$lt_old_archive_cmds_RC
11397 old_postinstall_cmds=$lt_old_postinstall_cmds
11398 old_postuninstall_cmds=$lt_old_postuninstall_cmds
11399
11400 # Create an old-style archive from a shared archive.
11401 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
11402
11403 # Create a temporary old-style archive to link instead of a shared archive.
11404 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
11405
11406 # Commands used to build and install a shared archive.
11407 archive_cmds=$lt_archive_cmds_RC
11408 archive_expsym_cmds=$lt_archive_expsym_cmds_RC
11409 postinstall_cmds=$lt_postinstall_cmds
11410 postuninstall_cmds=$lt_postuninstall_cmds
11411
11412 # Commands used to build a loadable module (assumed same as above if empty)
11413 module_cmds=$lt_module_cmds_RC
11414 module_expsym_cmds=$lt_module_expsym_cmds_RC
11415
11416 # Commands to strip libraries.
11417 old_striplib=$lt_old_striplib
11418 striplib=$lt_striplib
11419
11420 # Dependencies to place before the objects being linked to create a
11421 # shared library.
11422 predep_objects=$lt_predep_objects_RC
11423
11424 # Dependencies to place after the objects being linked to create a
11425 # shared library.
11426 postdep_objects=$lt_postdep_objects_RC
11427
11428 # Dependencies to place before the objects being linked to create a
11429 # shared library.
11430 predeps=$lt_predeps_RC
11431
11432 # Dependencies to place after the objects being linked to create a
11433 # shared library.
11434 postdeps=$lt_postdeps_RC
11435
11436 # The library search path used internally by the compiler when linking
11437 # a shared library.
11438 compiler_lib_search_path=$lt_compiler_lib_search_path_RC
11439
11440 # Method to check whether dependent libraries are shared objects.
11441 deplibs_check_method=$lt_deplibs_check_method
11442
11443 # Command to use when deplibs_check_method == file_magic.
11444 file_magic_cmd=$lt_file_magic_cmd
11445
11446 # Flag that allows shared libraries with undefined symbols to be built.
11447 allow_undefined_flag=$lt_allow_undefined_flag_RC
11448
11449 # Flag that forces no undefined symbols.
11450 no_undefined_flag=$lt_no_undefined_flag_RC
11451
11452 # Commands used to finish a libtool library installation in a directory.
11453 finish_cmds=$lt_finish_cmds
11454
11455 # Same as above, but a single script fragment to be evaled but not shown.
11456 finish_eval=$lt_finish_eval
11457
11458 # Take the output of nm and produce a listing of raw symbols and C names.
11459 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
11460
11461 # Transform the output of nm in a proper C declaration
11462 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
11463
11464 # Transform the output of nm in a C name address pair
11465 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
11466
11467 # This is the shared library runtime path variable.
11468 runpath_var=$runpath_var
11469
11470 # This is the shared library path variable.
11471 shlibpath_var=$shlibpath_var
11472
11473 # Is shlibpath searched before the hard-coded library search path?
11474 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
11475
11476 # How to hardcode a shared library path into an executable.
11477 hardcode_action=$hardcode_action_RC
11478
11479 # Whether we should hardcode library paths into libraries.
11480 hardcode_into_libs=$hardcode_into_libs
11481
11482 # Flag to hardcode \$libdir into a binary during linking.
11483 # This must work even if \$libdir does not exist.
11484 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
11485
11486 # If ld is used when linking, flag to hardcode \$libdir into
11487 # a binary during linking. This must work even if \$libdir does
11488 # not exist.
11489 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
11490
11491 # Whether we need a single -rpath flag with a separated argument.
11492 hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
11493
11494 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
11495 # resulting binary.
11496 hardcode_direct=$hardcode_direct_RC
11497
11498 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
11499 # resulting binary.
11500 hardcode_minus_L=$hardcode_minus_L_RC
11501
11502 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
11503 # the resulting binary.
11504 hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
11505
11506 # Set to yes if building a shared library automatically hardcodes DIR into the library
11507 # and all subsequent libraries and executables linked against it.
11508 hardcode_automatic=$hardcode_automatic_RC
11509
11510 # Variables whose values should be saved in libtool wrapper scripts and
11511 # restored at relink time.
11512 variables_saved_for_relink="$variables_saved_for_relink"
11513
11514 # Whether libtool must link a program against all its dependency libraries.
11515 link_all_deplibs=$link_all_deplibs_RC
11516
11517 # Compile-time system search path for libraries
11518 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
11519
11520 # Run-time system search path for libraries
11521 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
11522
11523 # Fix the shell variable \$srcfile for the compiler.
11524 fix_srcfile_path="$fix_srcfile_path_RC"
11525
11526 # Set to yes if exported symbols are required.
11527 always_export_symbols=$always_export_symbols_RC
11528
11529 # The commands to list exported symbols.
11530 export_symbols_cmds=$lt_export_symbols_cmds_RC
11531
11532 # The commands to extract the exported symbol list from a shared archive.
11533 extract_expsyms_cmds=$lt_extract_expsyms_cmds
11534
11535 # Symbols that should not be listed in the preloaded symbols.
11536 exclude_expsyms=$lt_exclude_expsyms_RC
11537
11538 # Symbols that must always be exported.
11539 include_expsyms=$lt_include_expsyms_RC
11540
11541 # ### END LIBTOOL TAG CONFIG: $tagname
11542
11543 __EOF__
11544
11545
11546 else
11547   # If there is no Makefile yet, we rely on a make rule to execute
11548   # `config.status --recheck' to rerun these tests and create the
11549   # libtool script then.
11550   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
11551   if test -f "$ltmain_in"; then
11552     test -f Makefile && make "$ltmain"
11553   fi
11554 fi
11555
11556
11557 ac_ext=c
11558 ac_cpp='$CPP $CPPFLAGS'
11559 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11560 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11561 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11562
11563 CC="$lt_save_CC"
11564
11565         ;;
11566
11567       *)
11568         { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
11569 echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
11570    { (exit 1); exit 1; }; }
11571         ;;
11572       esac
11573
11574       # Append the new tag name to the list of available tags.
11575       if test -n "$tagname" ; then
11576       available_tags="$available_tags $tagname"
11577     fi
11578     fi
11579   done
11580   IFS="$lt_save_ifs"
11581
11582   # Now substitute the updated list of available tags.
11583   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
11584     mv "${ofile}T" "$ofile"
11585     chmod +x "$ofile"
11586   else
11587     rm -f "${ofile}T"
11588     { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
11589 echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
11590    { (exit 1); exit 1; }; }
11591   fi
11592 fi
11593
11594
11595
11596 # This can be used to rebuild libtool when needed
11597 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
11598
11599 # Always use our own libtool.
11600 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
11601
11602 # Prevent multiple expansion
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613 ol_link_perl=no
11614 if test $ol_enable_perl != no ; then
11615         # Extract the first word of "perl", so it can be a program name with args.
11616 set dummy perl; ac_word=$2
11617 echo "$as_me:$LINENO: checking for $ac_word" >&5
11618 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11619 if test "${ac_cv_path_PERLBIN+set}" = set; then
11620   echo $ECHO_N "(cached) $ECHO_C" >&6
11621 else
11622   case $PERLBIN in
11623   [\\/]* | ?:[\\/]*)
11624   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
11625   ;;
11626   *)
11627   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11628 for as_dir in $PATH
11629 do
11630   IFS=$as_save_IFS
11631   test -z "$as_dir" && as_dir=.
11632   for ac_exec_ext in '' $ac_executable_extensions; do
11633   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11634     ac_cv_path_PERLBIN="$as_dir/$ac_word$ac_exec_ext"
11635     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11636     break 2
11637   fi
11638 done
11639 done
11640
11641   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
11642   ;;
11643 esac
11644 fi
11645 PERLBIN=$ac_cv_path_PERLBIN
11646
11647 if test -n "$PERLBIN"; then
11648   echo "$as_me:$LINENO: result: $PERLBIN" >&5
11649 echo "${ECHO_T}$PERLBIN" >&6
11650 else
11651   echo "$as_me:$LINENO: result: no" >&5
11652 echo "${ECHO_T}no" >&6
11653 fi
11654
11655
11656         if test "no$PERLBIN" = "no" ; then
11657                 if test $ol_enable_perl = yes ; then
11658                         { { echo "$as_me:$LINENO: error: could not locate perl" >&5
11659 echo "$as_me: error: could not locate perl" >&2;}
11660    { (exit 1); exit 1; }; }
11661                 fi
11662
11663         else
11664                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
11665                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
11666
11667                 if test x"$ol_enable_perl" = "xyes" ; then
11668                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
11669                 else
11670                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
11671                 fi
11672                                 ol_link_perl=yes
11673         fi
11674 fi
11675
11676 ac_ext=c
11677 ac_cpp='$CPP $CPPFLAGS'
11678 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11679 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11680 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11681 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
11682 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
11683 # On Suns, sometimes $CPP names a directory.
11684 if test -n "$CPP" && test -d "$CPP"; then
11685   CPP=
11686 fi
11687 if test -z "$CPP"; then
11688   if test "${ac_cv_prog_CPP+set}" = set; then
11689   echo $ECHO_N "(cached) $ECHO_C" >&6
11690 else
11691       # Double quotes because CPP needs to be expanded
11692     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
11693     do
11694       ac_preproc_ok=false
11695 for ac_c_preproc_warn_flag in '' yes
11696 do
11697   # Use a header file that comes with gcc, so configuring glibc
11698   # with a fresh cross-compiler works.
11699   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11700   # <limits.h> exists even on freestanding compilers.
11701   # On the NeXT, cc -E runs the code through the compiler's parser,
11702   # not just through cpp. "Syntax error" is here to catch this case.
11703   cat >conftest.$ac_ext <<_ACEOF
11704 /* confdefs.h.  */
11705 _ACEOF
11706 cat confdefs.h >>conftest.$ac_ext
11707 cat >>conftest.$ac_ext <<_ACEOF
11708 /* end confdefs.h.  */
11709 #ifdef __STDC__
11710 # include <limits.h>
11711 #else
11712 # include <assert.h>
11713 #endif
11714                      Syntax error
11715 _ACEOF
11716 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11717   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11718   ac_status=$?
11719   grep -v '^ *+' conftest.er1 >conftest.err
11720   rm -f conftest.er1
11721   cat conftest.err >&5
11722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11723   (exit $ac_status); } >/dev/null; then
11724   if test -s conftest.err; then
11725     ac_cpp_err=$ac_c_preproc_warn_flag
11726     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11727   else
11728     ac_cpp_err=
11729   fi
11730 else
11731   ac_cpp_err=yes
11732 fi
11733 if test -z "$ac_cpp_err"; then
11734   :
11735 else
11736   echo "$as_me: failed program was:" >&5
11737 sed 's/^/| /' conftest.$ac_ext >&5
11738
11739   # Broken: fails on valid input.
11740 continue
11741 fi
11742 rm -f conftest.err conftest.$ac_ext
11743
11744   # OK, works on sane cases.  Now check whether non-existent headers
11745   # can be detected and how.
11746   cat >conftest.$ac_ext <<_ACEOF
11747 /* confdefs.h.  */
11748 _ACEOF
11749 cat confdefs.h >>conftest.$ac_ext
11750 cat >>conftest.$ac_ext <<_ACEOF
11751 /* end confdefs.h.  */
11752 #include <ac_nonexistent.h>
11753 _ACEOF
11754 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11755   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11756   ac_status=$?
11757   grep -v '^ *+' conftest.er1 >conftest.err
11758   rm -f conftest.er1
11759   cat conftest.err >&5
11760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11761   (exit $ac_status); } >/dev/null; then
11762   if test -s conftest.err; then
11763     ac_cpp_err=$ac_c_preproc_warn_flag
11764     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11765   else
11766     ac_cpp_err=
11767   fi
11768 else
11769   ac_cpp_err=yes
11770 fi
11771 if test -z "$ac_cpp_err"; then
11772   # Broken: success on invalid input.
11773 continue
11774 else
11775   echo "$as_me: failed program was:" >&5
11776 sed 's/^/| /' conftest.$ac_ext >&5
11777
11778   # Passes both tests.
11779 ac_preproc_ok=:
11780 break
11781 fi
11782 rm -f conftest.err conftest.$ac_ext
11783
11784 done
11785 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
11786 rm -f conftest.err conftest.$ac_ext
11787 if $ac_preproc_ok; then
11788   break
11789 fi
11790
11791     done
11792     ac_cv_prog_CPP=$CPP
11793
11794 fi
11795   CPP=$ac_cv_prog_CPP
11796 else
11797   ac_cv_prog_CPP=$CPP
11798 fi
11799 echo "$as_me:$LINENO: result: $CPP" >&5
11800 echo "${ECHO_T}$CPP" >&6
11801 ac_preproc_ok=false
11802 for ac_c_preproc_warn_flag in '' yes
11803 do
11804   # Use a header file that comes with gcc, so configuring glibc
11805   # with a fresh cross-compiler works.
11806   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11807   # <limits.h> exists even on freestanding compilers.
11808   # On the NeXT, cc -E runs the code through the compiler's parser,
11809   # not just through cpp. "Syntax error" is here to catch this case.
11810   cat >conftest.$ac_ext <<_ACEOF
11811 /* confdefs.h.  */
11812 _ACEOF
11813 cat confdefs.h >>conftest.$ac_ext
11814 cat >>conftest.$ac_ext <<_ACEOF
11815 /* end confdefs.h.  */
11816 #ifdef __STDC__
11817 # include <limits.h>
11818 #else
11819 # include <assert.h>
11820 #endif
11821                      Syntax error
11822 _ACEOF
11823 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11824   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11825   ac_status=$?
11826   grep -v '^ *+' conftest.er1 >conftest.err
11827   rm -f conftest.er1
11828   cat conftest.err >&5
11829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11830   (exit $ac_status); } >/dev/null; then
11831   if test -s conftest.err; then
11832     ac_cpp_err=$ac_c_preproc_warn_flag
11833     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11834   else
11835     ac_cpp_err=
11836   fi
11837 else
11838   ac_cpp_err=yes
11839 fi
11840 if test -z "$ac_cpp_err"; then
11841   :
11842 else
11843   echo "$as_me: failed program was:" >&5
11844 sed 's/^/| /' conftest.$ac_ext >&5
11845
11846   # Broken: fails on valid input.
11847 continue
11848 fi
11849 rm -f conftest.err conftest.$ac_ext
11850
11851   # OK, works on sane cases.  Now check whether non-existent headers
11852   # can be detected and how.
11853   cat >conftest.$ac_ext <<_ACEOF
11854 /* confdefs.h.  */
11855 _ACEOF
11856 cat confdefs.h >>conftest.$ac_ext
11857 cat >>conftest.$ac_ext <<_ACEOF
11858 /* end confdefs.h.  */
11859 #include <ac_nonexistent.h>
11860 _ACEOF
11861 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11862   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11863   ac_status=$?
11864   grep -v '^ *+' conftest.er1 >conftest.err
11865   rm -f conftest.er1
11866   cat conftest.err >&5
11867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11868   (exit $ac_status); } >/dev/null; then
11869   if test -s conftest.err; then
11870     ac_cpp_err=$ac_c_preproc_warn_flag
11871     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11872   else
11873     ac_cpp_err=
11874   fi
11875 else
11876   ac_cpp_err=yes
11877 fi
11878 if test -z "$ac_cpp_err"; then
11879   # Broken: success on invalid input.
11880 continue
11881 else
11882   echo "$as_me: failed program was:" >&5
11883 sed 's/^/| /' conftest.$ac_ext >&5
11884
11885   # Passes both tests.
11886 ac_preproc_ok=:
11887 break
11888 fi
11889 rm -f conftest.err conftest.$ac_ext
11890
11891 done
11892 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
11893 rm -f conftest.err conftest.$ac_ext
11894 if $ac_preproc_ok; then
11895   :
11896 else
11897   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
11898 See \`config.log' for more details." >&5
11899 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
11900 See \`config.log' for more details." >&2;}
11901    { (exit 1); exit 1; }; }
11902 fi
11903
11904 ac_ext=c
11905 ac_cpp='$CPP $CPPFLAGS'
11906 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11907 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11908 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11909
11910
11911 case $host_os in
11912   *mingw32* ) ac_cv_mingw32=yes ;;
11913   *cygwin* ) ac_cv_cygwin=yes ;;
11914 esac
11915
11916
11917
11918
11919 cat >>confdefs.h <<_ACEOF
11920 #define EXEEXT "${EXEEXT}"
11921 _ACEOF
11922
11923
11924 echo "$as_me:$LINENO: checking for be_app in -lbe" >&5
11925 echo $ECHO_N "checking for be_app in -lbe... $ECHO_C" >&6
11926 if test "${ac_cv_lib_be_be_app+set}" = set; then
11927   echo $ECHO_N "(cached) $ECHO_C" >&6
11928 else
11929   ac_check_lib_save_LIBS=$LIBS
11930 LIBS="-lbe -lroot -lnet $LIBS"
11931 cat >conftest.$ac_ext <<_ACEOF
11932 /* confdefs.h.  */
11933 _ACEOF
11934 cat confdefs.h >>conftest.$ac_ext
11935 cat >>conftest.$ac_ext <<_ACEOF
11936 /* end confdefs.h.  */
11937
11938 /* Override any gcc2 internal prototype to avoid an error.  */
11939 #ifdef __cplusplus
11940 extern "C"
11941 #endif
11942 /* We use char because int might match the return type of a gcc2
11943    builtin and then its argument prototype would still apply.  */
11944 char be_app ();
11945 int
11946 main ()
11947 {
11948 be_app ();
11949   ;
11950   return 0;
11951 }
11952 _ACEOF
11953 rm -f conftest.$ac_objext conftest$ac_exeext
11954 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11955   (eval $ac_link) 2>conftest.er1
11956   ac_status=$?
11957   grep -v '^ *+' conftest.er1 >conftest.err
11958   rm -f conftest.er1
11959   cat conftest.err >&5
11960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11961   (exit $ac_status); } &&
11962          { ac_try='test -z "$ac_c_werror_flag"
11963                          || test ! -s conftest.err'
11964   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11965   (eval $ac_try) 2>&5
11966   ac_status=$?
11967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11968   (exit $ac_status); }; } &&
11969          { ac_try='test -s conftest$ac_exeext'
11970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11971   (eval $ac_try) 2>&5
11972   ac_status=$?
11973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11974   (exit $ac_status); }; }; then
11975   ac_cv_lib_be_be_app=yes
11976 else
11977   echo "$as_me: failed program was:" >&5
11978 sed 's/^/| /' conftest.$ac_ext >&5
11979
11980 ac_cv_lib_be_be_app=no
11981 fi
11982 rm -f conftest.err conftest.$ac_objext \
11983       conftest$ac_exeext conftest.$ac_ext
11984 LIBS=$ac_check_lib_save_LIBS
11985 fi
11986 echo "$as_me:$LINENO: result: $ac_cv_lib_be_be_app" >&5
11987 echo "${ECHO_T}$ac_cv_lib_be_be_app" >&6
11988 if test $ac_cv_lib_be_be_app = yes; then
11989   LIBS="$LIBS -lbe -lroot -lnet"
11990 else
11991   :
11992 fi
11993
11994
11995 ac_ext=c
11996 ac_cpp='$CPP $CPPFLAGS'
11997 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11998 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11999 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12000 if test -n "$ac_tool_prefix"; then
12001   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
12002 set dummy ${ac_tool_prefix}gcc; ac_word=$2
12003 echo "$as_me:$LINENO: checking for $ac_word" >&5
12004 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12005 if test "${ac_cv_prog_CC+set}" = set; then
12006   echo $ECHO_N "(cached) $ECHO_C" >&6
12007 else
12008   if test -n "$CC"; then
12009   ac_cv_prog_CC="$CC" # Let the user override the test.
12010 else
12011 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12012 for as_dir in $PATH
12013 do
12014   IFS=$as_save_IFS
12015   test -z "$as_dir" && as_dir=.
12016   for ac_exec_ext in '' $ac_executable_extensions; do
12017   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12018     ac_cv_prog_CC="${ac_tool_prefix}gcc"
12019     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12020     break 2
12021   fi
12022 done
12023 done
12024
12025 fi
12026 fi
12027 CC=$ac_cv_prog_CC
12028 if test -n "$CC"; then
12029   echo "$as_me:$LINENO: result: $CC" >&5
12030 echo "${ECHO_T}$CC" >&6
12031 else
12032   echo "$as_me:$LINENO: result: no" >&5
12033 echo "${ECHO_T}no" >&6
12034 fi
12035
12036 fi
12037 if test -z "$ac_cv_prog_CC"; then
12038   ac_ct_CC=$CC
12039   # Extract the first word of "gcc", so it can be a program name with args.
12040 set dummy gcc; ac_word=$2
12041 echo "$as_me:$LINENO: checking for $ac_word" >&5
12042 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12043 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
12044   echo $ECHO_N "(cached) $ECHO_C" >&6
12045 else
12046   if test -n "$ac_ct_CC"; then
12047   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12048 else
12049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12050 for as_dir in $PATH
12051 do
12052   IFS=$as_save_IFS
12053   test -z "$as_dir" && as_dir=.
12054   for ac_exec_ext in '' $ac_executable_extensions; do
12055   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12056     ac_cv_prog_ac_ct_CC="gcc"
12057     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12058     break 2
12059   fi
12060 done
12061 done
12062
12063 fi
12064 fi
12065 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12066 if test -n "$ac_ct_CC"; then
12067   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
12068 echo "${ECHO_T}$ac_ct_CC" >&6
12069 else
12070   echo "$as_me:$LINENO: result: no" >&5
12071 echo "${ECHO_T}no" >&6
12072 fi
12073
12074   CC=$ac_ct_CC
12075 else
12076   CC="$ac_cv_prog_CC"
12077 fi
12078
12079 if test -z "$CC"; then
12080   if test -n "$ac_tool_prefix"; then
12081   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
12082 set dummy ${ac_tool_prefix}cc; ac_word=$2
12083 echo "$as_me:$LINENO: checking for $ac_word" >&5
12084 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12085 if test "${ac_cv_prog_CC+set}" = set; then
12086   echo $ECHO_N "(cached) $ECHO_C" >&6
12087 else
12088   if test -n "$CC"; then
12089   ac_cv_prog_CC="$CC" # Let the user override the test.
12090 else
12091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12092 for as_dir in $PATH
12093 do
12094   IFS=$as_save_IFS
12095   test -z "$as_dir" && as_dir=.
12096   for ac_exec_ext in '' $ac_executable_extensions; do
12097   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12098     ac_cv_prog_CC="${ac_tool_prefix}cc"
12099     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12100     break 2
12101   fi
12102 done
12103 done
12104
12105 fi
12106 fi
12107 CC=$ac_cv_prog_CC
12108 if test -n "$CC"; then
12109   echo "$as_me:$LINENO: result: $CC" >&5
12110 echo "${ECHO_T}$CC" >&6
12111 else
12112   echo "$as_me:$LINENO: result: no" >&5
12113 echo "${ECHO_T}no" >&6
12114 fi
12115
12116 fi
12117 if test -z "$ac_cv_prog_CC"; then
12118   ac_ct_CC=$CC
12119   # Extract the first word of "cc", so it can be a program name with args.
12120 set dummy cc; ac_word=$2
12121 echo "$as_me:$LINENO: checking for $ac_word" >&5
12122 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12123 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
12124   echo $ECHO_N "(cached) $ECHO_C" >&6
12125 else
12126   if test -n "$ac_ct_CC"; then
12127   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12128 else
12129 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12130 for as_dir in $PATH
12131 do
12132   IFS=$as_save_IFS
12133   test -z "$as_dir" && as_dir=.
12134   for ac_exec_ext in '' $ac_executable_extensions; do
12135   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12136     ac_cv_prog_ac_ct_CC="cc"
12137     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12138     break 2
12139   fi
12140 done
12141 done
12142
12143 fi
12144 fi
12145 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12146 if test -n "$ac_ct_CC"; then
12147   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
12148 echo "${ECHO_T}$ac_ct_CC" >&6
12149 else
12150   echo "$as_me:$LINENO: result: no" >&5
12151 echo "${ECHO_T}no" >&6
12152 fi
12153
12154   CC=$ac_ct_CC
12155 else
12156   CC="$ac_cv_prog_CC"
12157 fi
12158
12159 fi
12160 if test -z "$CC"; then
12161   # Extract the first word of "cc", so it can be a program name with args.
12162 set dummy cc; ac_word=$2
12163 echo "$as_me:$LINENO: checking for $ac_word" >&5
12164 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12165 if test "${ac_cv_prog_CC+set}" = set; then
12166   echo $ECHO_N "(cached) $ECHO_C" >&6
12167 else
12168   if test -n "$CC"; then
12169   ac_cv_prog_CC="$CC" # Let the user override the test.
12170 else
12171   ac_prog_rejected=no
12172 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12173 for as_dir in $PATH
12174 do
12175   IFS=$as_save_IFS
12176   test -z "$as_dir" && as_dir=.
12177   for ac_exec_ext in '' $ac_executable_extensions; do
12178   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12179     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
12180        ac_prog_rejected=yes
12181        continue
12182      fi
12183     ac_cv_prog_CC="cc"
12184     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12185     break 2
12186   fi
12187 done
12188 done
12189
12190 if test $ac_prog_rejected = yes; then
12191   # We found a bogon in the path, so make sure we never use it.
12192   set dummy $ac_cv_prog_CC
12193   shift
12194   if test $# != 0; then
12195     # We chose a different compiler from the bogus one.
12196     # However, it has the same basename, so the bogon will be chosen
12197     # first if we set CC to just the basename; use the full file name.
12198     shift
12199     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
12200   fi
12201 fi
12202 fi
12203 fi
12204 CC=$ac_cv_prog_CC
12205 if test -n "$CC"; then
12206   echo "$as_me:$LINENO: result: $CC" >&5
12207 echo "${ECHO_T}$CC" >&6
12208 else
12209   echo "$as_me:$LINENO: result: no" >&5
12210 echo "${ECHO_T}no" >&6
12211 fi
12212
12213 fi
12214 if test -z "$CC"; then
12215   if test -n "$ac_tool_prefix"; then
12216   for ac_prog in cl
12217   do
12218     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12219 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12220 echo "$as_me:$LINENO: checking for $ac_word" >&5
12221 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12222 if test "${ac_cv_prog_CC+set}" = set; then
12223   echo $ECHO_N "(cached) $ECHO_C" >&6
12224 else
12225   if test -n "$CC"; then
12226   ac_cv_prog_CC="$CC" # Let the user override the test.
12227 else
12228 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12229 for as_dir in $PATH
12230 do
12231   IFS=$as_save_IFS
12232   test -z "$as_dir" && as_dir=.
12233   for ac_exec_ext in '' $ac_executable_extensions; do
12234   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12235     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
12236     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12237     break 2
12238   fi
12239 done
12240 done
12241
12242 fi
12243 fi
12244 CC=$ac_cv_prog_CC
12245 if test -n "$CC"; then
12246   echo "$as_me:$LINENO: result: $CC" >&5
12247 echo "${ECHO_T}$CC" >&6
12248 else
12249   echo "$as_me:$LINENO: result: no" >&5
12250 echo "${ECHO_T}no" >&6
12251 fi
12252
12253     test -n "$CC" && break
12254   done
12255 fi
12256 if test -z "$CC"; then
12257   ac_ct_CC=$CC
12258   for ac_prog in cl
12259 do
12260   # Extract the first word of "$ac_prog", so it can be a program name with args.
12261 set dummy $ac_prog; ac_word=$2
12262 echo "$as_me:$LINENO: checking for $ac_word" >&5
12263 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12264 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
12265   echo $ECHO_N "(cached) $ECHO_C" >&6
12266 else
12267   if test -n "$ac_ct_CC"; then
12268   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12269 else
12270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12271 for as_dir in $PATH
12272 do
12273   IFS=$as_save_IFS
12274   test -z "$as_dir" && as_dir=.
12275   for ac_exec_ext in '' $ac_executable_extensions; do
12276   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12277     ac_cv_prog_ac_ct_CC="$ac_prog"
12278     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12279     break 2
12280   fi
12281 done
12282 done
12283
12284 fi
12285 fi
12286 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12287 if test -n "$ac_ct_CC"; then
12288   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
12289 echo "${ECHO_T}$ac_ct_CC" >&6
12290 else
12291   echo "$as_me:$LINENO: result: no" >&5
12292 echo "${ECHO_T}no" >&6
12293 fi
12294
12295   test -n "$ac_ct_CC" && break
12296 done
12297
12298   CC=$ac_ct_CC
12299 fi
12300
12301 fi
12302
12303
12304 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
12305 See \`config.log' for more details." >&5
12306 echo "$as_me: error: no acceptable C compiler found in \$PATH
12307 See \`config.log' for more details." >&2;}
12308    { (exit 1); exit 1; }; }
12309
12310 # Provide some information about the compiler.
12311 echo "$as_me:$LINENO:" \
12312      "checking for C compiler version" >&5
12313 ac_compiler=`set X $ac_compile; echo $2`
12314 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
12315   (eval $ac_compiler --version </dev/null >&5) 2>&5
12316   ac_status=$?
12317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12318   (exit $ac_status); }
12319 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
12320   (eval $ac_compiler -v </dev/null >&5) 2>&5
12321   ac_status=$?
12322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12323   (exit $ac_status); }
12324 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
12325   (eval $ac_compiler -V </dev/null >&5) 2>&5
12326   ac_status=$?
12327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12328   (exit $ac_status); }
12329
12330 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
12331 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
12332 if test "${ac_cv_c_compiler_gnu+set}" = set; then
12333   echo $ECHO_N "(cached) $ECHO_C" >&6
12334 else
12335   cat >conftest.$ac_ext <<_ACEOF
12336 /* confdefs.h.  */
12337 _ACEOF
12338 cat confdefs.h >>conftest.$ac_ext
12339 cat >>conftest.$ac_ext <<_ACEOF
12340 /* end confdefs.h.  */
12341
12342 int
12343 main ()
12344 {
12345 #ifndef __GNUC__
12346        choke me
12347 #endif
12348
12349   ;
12350   return 0;
12351 }
12352 _ACEOF
12353 rm -f conftest.$ac_objext
12354 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12355   (eval $ac_compile) 2>conftest.er1
12356   ac_status=$?
12357   grep -v '^ *+' conftest.er1 >conftest.err
12358   rm -f conftest.er1
12359   cat conftest.err >&5
12360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12361   (exit $ac_status); } &&
12362          { ac_try='test -z "$ac_c_werror_flag"
12363                          || test ! -s conftest.err'
12364   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12365   (eval $ac_try) 2>&5
12366   ac_status=$?
12367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12368   (exit $ac_status); }; } &&
12369          { ac_try='test -s conftest.$ac_objext'
12370   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12371   (eval $ac_try) 2>&5
12372   ac_status=$?
12373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12374   (exit $ac_status); }; }; then
12375   ac_compiler_gnu=yes
12376 else
12377   echo "$as_me: failed program was:" >&5
12378 sed 's/^/| /' conftest.$ac_ext >&5
12379
12380 ac_compiler_gnu=no
12381 fi
12382 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12383 ac_cv_c_compiler_gnu=$ac_compiler_gnu
12384
12385 fi
12386 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
12387 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
12388 GCC=`test $ac_compiler_gnu = yes && echo yes`
12389 ac_test_CFLAGS=${CFLAGS+set}
12390 ac_save_CFLAGS=$CFLAGS
12391 CFLAGS="-g"
12392 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
12393 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
12394 if test "${ac_cv_prog_cc_g+set}" = set; then
12395   echo $ECHO_N "(cached) $ECHO_C" >&6
12396 else
12397   cat >conftest.$ac_ext <<_ACEOF
12398 /* confdefs.h.  */
12399 _ACEOF
12400 cat confdefs.h >>conftest.$ac_ext
12401 cat >>conftest.$ac_ext <<_ACEOF
12402 /* end confdefs.h.  */
12403
12404 int
12405 main ()
12406 {
12407
12408   ;
12409   return 0;
12410 }
12411 _ACEOF
12412 rm -f conftest.$ac_objext
12413 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12414   (eval $ac_compile) 2>conftest.er1
12415   ac_status=$?
12416   grep -v '^ *+' conftest.er1 >conftest.err
12417   rm -f conftest.er1
12418   cat conftest.err >&5
12419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12420   (exit $ac_status); } &&
12421          { ac_try='test -z "$ac_c_werror_flag"
12422                          || test ! -s conftest.err'
12423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12424   (eval $ac_try) 2>&5
12425   ac_status=$?
12426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12427   (exit $ac_status); }; } &&
12428          { ac_try='test -s conftest.$ac_objext'
12429   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12430   (eval $ac_try) 2>&5
12431   ac_status=$?
12432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12433   (exit $ac_status); }; }; then
12434   ac_cv_prog_cc_g=yes
12435 else
12436   echo "$as_me: failed program was:" >&5
12437 sed 's/^/| /' conftest.$ac_ext >&5
12438
12439 ac_cv_prog_cc_g=no
12440 fi
12441 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12442 fi
12443 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
12444 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
12445 if test "$ac_test_CFLAGS" = set; then
12446   CFLAGS=$ac_save_CFLAGS
12447 elif test $ac_cv_prog_cc_g = yes; then
12448   if test "$GCC" = yes; then
12449     CFLAGS="-g -O2"
12450   else
12451     CFLAGS="-g"
12452   fi
12453 else
12454   if test "$GCC" = yes; then
12455     CFLAGS="-O2"
12456   else
12457     CFLAGS=
12458   fi
12459 fi
12460 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
12461 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
12462 if test "${ac_cv_prog_cc_stdc+set}" = set; then
12463   echo $ECHO_N "(cached) $ECHO_C" >&6
12464 else
12465   ac_cv_prog_cc_stdc=no
12466 ac_save_CC=$CC
12467 cat >conftest.$ac_ext <<_ACEOF
12468 /* confdefs.h.  */
12469 _ACEOF
12470 cat confdefs.h >>conftest.$ac_ext
12471 cat >>conftest.$ac_ext <<_ACEOF
12472 /* end confdefs.h.  */
12473 #include <stdarg.h>
12474 #include <stdio.h>
12475 #include <sys/types.h>
12476 #include <sys/stat.h>
12477 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12478 struct buf { int x; };
12479 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12480 static char *e (p, i)
12481      char **p;
12482      int i;
12483 {
12484   return p[i];
12485 }
12486 static char *f (char * (*g) (char **, int), char **p, ...)
12487 {
12488   char *s;
12489   va_list v;
12490   va_start (v,p);
12491   s = g (p, va_arg (v,int));
12492   va_end (v);
12493   return s;
12494 }
12495
12496 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
12497    function prototypes and stuff, but not '\xHH' hex character constants.
12498    These don't provoke an error unfortunately, instead are silently treated
12499    as 'x'.  The following induces an error, until -std1 is added to get
12500    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
12501    array size at least.  It's necessary to write '\x00'==0 to get something
12502    that's true only with -std1.  */
12503 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
12504
12505 int test (int i, double x);
12506 struct s1 {int (*f) (int a);};
12507 struct s2 {int (*f) (double a);};
12508 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12509 int argc;
12510 char **argv;
12511 int
12512 main ()
12513 {
12514 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12515   ;
12516   return 0;
12517 }
12518 _ACEOF
12519 # Don't try gcc -ansi; that turns off useful extensions and
12520 # breaks some systems' header files.
12521 # AIX                   -qlanglvl=ansi
12522 # Ultrix and OSF/1      -std1
12523 # HP-UX 10.20 and later -Ae
12524 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12525 # SVR4                  -Xc -D__EXTENSIONS__
12526 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12527 do
12528   CC="$ac_save_CC $ac_arg"
12529   rm -f conftest.$ac_objext
12530 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12531   (eval $ac_compile) 2>conftest.er1
12532   ac_status=$?
12533   grep -v '^ *+' conftest.er1 >conftest.err
12534   rm -f conftest.er1
12535   cat conftest.err >&5
12536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12537   (exit $ac_status); } &&
12538          { ac_try='test -z "$ac_c_werror_flag"
12539                          || test ! -s conftest.err'
12540   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12541   (eval $ac_try) 2>&5
12542   ac_status=$?
12543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12544   (exit $ac_status); }; } &&
12545          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
12551   ac_cv_prog_cc_stdc=$ac_arg
12552 break
12553 else
12554   echo "$as_me: failed program was:" >&5
12555 sed 's/^/| /' conftest.$ac_ext >&5
12556
12557 fi
12558 rm -f conftest.err conftest.$ac_objext
12559 done
12560 rm -f conftest.$ac_ext conftest.$ac_objext
12561 CC=$ac_save_CC
12562
12563 fi
12564
12565 case "x$ac_cv_prog_cc_stdc" in
12566   x|xno)
12567     echo "$as_me:$LINENO: result: none needed" >&5
12568 echo "${ECHO_T}none needed" >&6 ;;
12569   *)
12570     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
12571 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12572     CC="$CC $ac_cv_prog_cc_stdc" ;;
12573 esac
12574
12575 # Some people use a C++ compiler to compile C.  Since we use `exit',
12576 # in C++ we need to declare it.  In case someone uses the same compiler
12577 # for both compiling C and C++ we need to have the C++ compiler decide
12578 # the declaration of exit, since it's the most demanding environment.
12579 cat >conftest.$ac_ext <<_ACEOF
12580 #ifndef __cplusplus
12581   choke me
12582 #endif
12583 _ACEOF
12584 rm -f conftest.$ac_objext
12585 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12586   (eval $ac_compile) 2>conftest.er1
12587   ac_status=$?
12588   grep -v '^ *+' conftest.er1 >conftest.err
12589   rm -f conftest.er1
12590   cat conftest.err >&5
12591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12592   (exit $ac_status); } &&
12593          { ac_try='test -z "$ac_c_werror_flag"
12594                          || test ! -s conftest.err'
12595   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12596   (eval $ac_try) 2>&5
12597   ac_status=$?
12598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12599   (exit $ac_status); }; } &&
12600          { ac_try='test -s conftest.$ac_objext'
12601   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12602   (eval $ac_try) 2>&5
12603   ac_status=$?
12604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12605   (exit $ac_status); }; }; then
12606   for ac_declaration in \
12607    '' \
12608    'extern "C" void std::exit (int) throw (); using std::exit;' \
12609    'extern "C" void std::exit (int); using std::exit;' \
12610    'extern "C" void exit (int) throw ();' \
12611    'extern "C" void exit (int);' \
12612    'void exit (int);'
12613 do
12614   cat >conftest.$ac_ext <<_ACEOF
12615 /* confdefs.h.  */
12616 _ACEOF
12617 cat confdefs.h >>conftest.$ac_ext
12618 cat >>conftest.$ac_ext <<_ACEOF
12619 /* end confdefs.h.  */
12620 $ac_declaration
12621 #include <stdlib.h>
12622 int
12623 main ()
12624 {
12625 exit (42);
12626   ;
12627   return 0;
12628 }
12629 _ACEOF
12630 rm -f conftest.$ac_objext
12631 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12632   (eval $ac_compile) 2>conftest.er1
12633   ac_status=$?
12634   grep -v '^ *+' conftest.er1 >conftest.err
12635   rm -f conftest.er1
12636   cat conftest.err >&5
12637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12638   (exit $ac_status); } &&
12639          { ac_try='test -z "$ac_c_werror_flag"
12640                          || test ! -s conftest.err'
12641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12642   (eval $ac_try) 2>&5
12643   ac_status=$?
12644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12645   (exit $ac_status); }; } &&
12646          { ac_try='test -s conftest.$ac_objext'
12647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12648   (eval $ac_try) 2>&5
12649   ac_status=$?
12650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12651   (exit $ac_status); }; }; then
12652   :
12653 else
12654   echo "$as_me: failed program was:" >&5
12655 sed 's/^/| /' conftest.$ac_ext >&5
12656
12657 continue
12658 fi
12659 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12660   cat >conftest.$ac_ext <<_ACEOF
12661 /* confdefs.h.  */
12662 _ACEOF
12663 cat confdefs.h >>conftest.$ac_ext
12664 cat >>conftest.$ac_ext <<_ACEOF
12665 /* end confdefs.h.  */
12666 $ac_declaration
12667 int
12668 main ()
12669 {
12670 exit (42);
12671   ;
12672   return 0;
12673 }
12674 _ACEOF
12675 rm -f conftest.$ac_objext
12676 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12677   (eval $ac_compile) 2>conftest.er1
12678   ac_status=$?
12679   grep -v '^ *+' conftest.er1 >conftest.err
12680   rm -f conftest.er1
12681   cat conftest.err >&5
12682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12683   (exit $ac_status); } &&
12684          { ac_try='test -z "$ac_c_werror_flag"
12685                          || test ! -s conftest.err'
12686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12687   (eval $ac_try) 2>&5
12688   ac_status=$?
12689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12690   (exit $ac_status); }; } &&
12691          { ac_try='test -s conftest.$ac_objext'
12692   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12693   (eval $ac_try) 2>&5
12694   ac_status=$?
12695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12696   (exit $ac_status); }; }; then
12697   break
12698 else
12699   echo "$as_me: failed program was:" >&5
12700 sed 's/^/| /' conftest.$ac_ext >&5
12701
12702 fi
12703 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12704 done
12705 rm -f conftest*
12706 if test -n "$ac_declaration"; then
12707   echo '#ifdef __cplusplus' >>confdefs.h
12708   echo $ac_declaration      >>confdefs.h
12709   echo '#endif'             >>confdefs.h
12710 fi
12711
12712 else
12713   echo "$as_me: failed program was:" >&5
12714 sed 's/^/| /' conftest.$ac_ext >&5
12715
12716 fi
12717 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12718 ac_ext=c
12719 ac_cpp='$CPP $CPPFLAGS'
12720 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12721 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12722 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12723
12724 depcc="$CC"   am_compiler_list=
12725
12726 echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
12727 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
12728 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
12729   echo $ECHO_N "(cached) $ECHO_C" >&6
12730 else
12731   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
12732   # We make a subdir and do the tests there.  Otherwise we can end up
12733   # making bogus files that we don't know about and never remove.  For
12734   # instance it was reported that on HP-UX the gcc test will end up
12735   # making a dummy file named `D' -- because `-MD' means `put the output
12736   # in D'.
12737   mkdir conftest.dir
12738   # Copy depcomp to subdir because otherwise we won't find it if we're
12739   # using a relative directory.
12740   cp "$am_depcomp" conftest.dir
12741   cd conftest.dir
12742   # We will build objects and dependencies in a subdirectory because
12743   # it helps to detect inapplicable dependency modes.  For instance
12744   # both Tru64's cc and ICC support -MD to output dependencies as a
12745   # side effect of compilation, but ICC will put the dependencies in
12746   # the current directory while Tru64 will put them in the object
12747   # directory.
12748   mkdir sub
12749
12750   am_cv_CC_dependencies_compiler_type=none
12751   if test "$am_compiler_list" = ""; then
12752      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
12753   fi
12754   for depmode in $am_compiler_list; do
12755     # Setup a source with many dependencies, because some compilers
12756     # like to wrap large dependency lists on column 80 (with \), and
12757     # we should not choose a depcomp mode which is confused by this.
12758     #
12759     # We need to recreate these files for each test, as the compiler may
12760     # overwrite some of them when testing with obscure command lines.
12761     # This happens at least with the AIX C compiler.
12762     : > sub/conftest.c
12763     for i in 1 2 3 4 5 6; do
12764       echo '#include "conftst'$i'.h"' >> sub/conftest.c
12765       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
12766       # Solaris 8's {/usr,}/bin/sh.
12767       touch sub/conftst$i.h
12768     done
12769     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
12770
12771     case $depmode in
12772     nosideeffect)
12773       # after this tag, mechanisms are not by side-effect, so they'll
12774       # only be used when explicitly requested
12775       if test "x$enable_dependency_tracking" = xyes; then
12776         continue
12777       else
12778         break
12779       fi
12780       ;;
12781     none) break ;;
12782     esac
12783     # We check with `-c' and `-o' for the sake of the "dashmstdout"
12784     # mode.  It turns out that the SunPro C++ compiler does not properly
12785     # handle `-M -o', and we need to detect this.
12786     if depmode=$depmode \
12787        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
12788        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
12789        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
12790          >/dev/null 2>conftest.err &&
12791        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
12792        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
12793        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
12794       # icc doesn't choke on unknown options, it will just issue warnings
12795       # or remarks (even with -Werror).  So we grep stderr for any message
12796       # that says an option was ignored or not supported.
12797       # When given -MP, icc 7.0 and 7.1 complain thusly:
12798       #   icc: Command line warning: ignoring option '-M'; no argument required
12799       # The diagnosis changed in icc 8.0:
12800       #   icc: Command line remark: option '-MP' not supported
12801       if (grep 'ignoring option' conftest.err ||
12802           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
12803         am_cv_CC_dependencies_compiler_type=$depmode
12804         break
12805       fi
12806     fi
12807   done
12808
12809   cd ..
12810   rm -rf conftest.dir
12811 else
12812   am_cv_CC_dependencies_compiler_type=none
12813 fi
12814
12815 fi
12816 echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
12817 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
12818 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
12819
12820
12821
12822 if
12823   test "x$enable_dependency_tracking" != xno \
12824   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
12825   am__fastdepCC_TRUE=
12826   am__fastdepCC_FALSE='#'
12827 else
12828   am__fastdepCC_TRUE='#'
12829   am__fastdepCC_FALSE=
12830 fi
12831
12832
12833 if test "X${ac_cv_prog_cc_stdc}" = "Xno" ; then
12834         { { echo "$as_me:$LINENO: error: OpenLDAP requires compiler to support STDC constructs." >&5
12835 echo "$as_me: error: OpenLDAP requires compiler to support STDC constructs." >&2;}
12836    { (exit 1); exit 1; }; }
12837 fi
12838
12839 # test for make depend flag
12840 OL_MKDEP=
12841 OL_MKDEP_FLAGS=
12842 if test -z "${MKDEP}"; then
12843         OL_MKDEP="${CC-cc}"
12844         if test -z "${MKDEP_FLAGS}"; then
12845                 echo "$as_me:$LINENO: checking for ${OL_MKDEP} depend flag" >&5
12846 echo $ECHO_N "checking for ${OL_MKDEP} depend flag... $ECHO_C" >&6
12847 if test "${ol_cv_mkdep+set}" = set; then
12848   echo $ECHO_N "(cached) $ECHO_C" >&6
12849 else
12850
12851                         ol_cv_mkdep=no
12852                         for flag in "-M" "-xM"; do
12853                                 cat > conftest.c <<EOF
12854  noCode;
12855 EOF
12856                                 if { ac_try='$OL_MKDEP $flag conftest.c'
12857   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12858   (eval $ac_try) 2>&5
12859   ac_status=$?
12860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12861   (exit $ac_status); }; } \
12862                                         | grep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
12863                                 then
12864                                         if test ! -f conftest."${ac_object}" ; then
12865                                                 ol_cv_mkdep=$flag
12866                                                 OL_MKDEP_FLAGS="$flag"
12867                                                 break
12868                                         fi
12869                                 fi
12870                         done
12871                         rm -f conftest*
12872
12873 fi
12874 echo "$as_me:$LINENO: result: $ol_cv_mkdep" >&5
12875 echo "${ECHO_T}$ol_cv_mkdep" >&6
12876         else
12877                 cc_cv_mkdep=yes
12878                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
12879         fi
12880 else
12881         cc_cv_mkdep=yes
12882         OL_MKDEP="${MKDEP}"
12883         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
12884 fi
12885
12886
12887
12888 if test "${ol_cv_mkdep}" = no ; then
12889         # this will soon become an error
12890         { echo "$as_me:$LINENO: WARNING: do not know how to generate dependencies" >&5
12891 echo "$as_me: WARNING: do not know how to generate dependencies" >&2;}
12892 fi
12893
12894 echo "$as_me:$LINENO: checking for afopen in -ls" >&5
12895 echo $ECHO_N "checking for afopen in -ls... $ECHO_C" >&6
12896 if test "${ac_cv_lib_s_afopen+set}" = set; then
12897   echo $ECHO_N "(cached) $ECHO_C" >&6
12898 else
12899   ac_check_lib_save_LIBS=$LIBS
12900 LIBS="-ls  $LIBS"
12901 cat >conftest.$ac_ext <<_ACEOF
12902 /* confdefs.h.  */
12903 _ACEOF
12904 cat confdefs.h >>conftest.$ac_ext
12905 cat >>conftest.$ac_ext <<_ACEOF
12906 /* end confdefs.h.  */
12907
12908 /* Override any gcc2 internal prototype to avoid an error.  */
12909 #ifdef __cplusplus
12910 extern "C"
12911 #endif
12912 /* We use char because int might match the return type of a gcc2
12913    builtin and then its argument prototype would still apply.  */
12914 char afopen ();
12915 int
12916 main ()
12917 {
12918 afopen ();
12919   ;
12920   return 0;
12921 }
12922 _ACEOF
12923 rm -f conftest.$ac_objext conftest$ac_exeext
12924 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12925   (eval $ac_link) 2>conftest.er1
12926   ac_status=$?
12927   grep -v '^ *+' conftest.er1 >conftest.err
12928   rm -f conftest.er1
12929   cat conftest.err >&5
12930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12931   (exit $ac_status); } &&
12932          { ac_try='test -z "$ac_c_werror_flag"
12933                          || test ! -s conftest.err'
12934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12935   (eval $ac_try) 2>&5
12936   ac_status=$?
12937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12938   (exit $ac_status); }; } &&
12939          { ac_try='test -s conftest$ac_exeext'
12940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12941   (eval $ac_try) 2>&5
12942   ac_status=$?
12943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12944   (exit $ac_status); }; }; then
12945   ac_cv_lib_s_afopen=yes
12946 else
12947   echo "$as_me: failed program was:" >&5
12948 sed 's/^/| /' conftest.$ac_ext >&5
12949
12950 ac_cv_lib_s_afopen=no
12951 fi
12952 rm -f conftest.err conftest.$ac_objext \
12953       conftest$ac_exeext conftest.$ac_ext
12954 LIBS=$ac_check_lib_save_LIBS
12955 fi
12956 echo "$as_me:$LINENO: result: $ac_cv_lib_s_afopen" >&5
12957 echo "${ECHO_T}$ac_cv_lib_s_afopen" >&6
12958 if test $ac_cv_lib_s_afopen = yes; then
12959
12960         AUTH_LIBS=-ls
12961
12962 cat >>confdefs.h <<\_ACEOF
12963 #define HAVE_AIX_SECURITY 1
12964 _ACEOF
12965
12966
12967 fi
12968
12969
12970 case "$target" in
12971 *-ibm-openedition)
12972         ac_cv_func_getopt=no
12973
12974 cat >>confdefs.h <<\_ACEOF
12975 #define BOTH_STRINGS_H 1
12976 _ACEOF
12977
12978         ;;
12979 esac
12980
12981 ol_link_modules=no
12982 WITH_MODULES_ENABLED=no
12983 if test $ol_enable_modules != no ; then
12984
12985 for ac_header in ltdl.h
12986 do
12987 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12988 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12989   echo "$as_me:$LINENO: checking for $ac_header" >&5
12990 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12991 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12992   echo $ECHO_N "(cached) $ECHO_C" >&6
12993 fi
12994 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12995 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12996 else
12997   # Is the header compilable?
12998 echo "$as_me:$LINENO: checking $ac_header usability" >&5
12999 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13000 cat >conftest.$ac_ext <<_ACEOF
13001 /* confdefs.h.  */
13002 _ACEOF
13003 cat confdefs.h >>conftest.$ac_ext
13004 cat >>conftest.$ac_ext <<_ACEOF
13005 /* end confdefs.h.  */
13006 $ac_includes_default
13007 #include <$ac_header>
13008 _ACEOF
13009 rm -f conftest.$ac_objext
13010 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13011   (eval $ac_compile) 2>conftest.er1
13012   ac_status=$?
13013   grep -v '^ *+' conftest.er1 >conftest.err
13014   rm -f conftest.er1
13015   cat conftest.err >&5
13016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13017   (exit $ac_status); } &&
13018          { ac_try='test -z "$ac_c_werror_flag"
13019                          || test ! -s conftest.err'
13020   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13021   (eval $ac_try) 2>&5
13022   ac_status=$?
13023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13024   (exit $ac_status); }; } &&
13025          { ac_try='test -s conftest.$ac_objext'
13026   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13027   (eval $ac_try) 2>&5
13028   ac_status=$?
13029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13030   (exit $ac_status); }; }; then
13031   ac_header_compiler=yes
13032 else
13033   echo "$as_me: failed program was:" >&5
13034 sed 's/^/| /' conftest.$ac_ext >&5
13035
13036 ac_header_compiler=no
13037 fi
13038 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13039 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13040 echo "${ECHO_T}$ac_header_compiler" >&6
13041
13042 # Is the header present?
13043 echo "$as_me:$LINENO: checking $ac_header presence" >&5
13044 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13045 cat >conftest.$ac_ext <<_ACEOF
13046 /* confdefs.h.  */
13047 _ACEOF
13048 cat confdefs.h >>conftest.$ac_ext
13049 cat >>conftest.$ac_ext <<_ACEOF
13050 /* end confdefs.h.  */
13051 #include <$ac_header>
13052 _ACEOF
13053 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13054   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13055   ac_status=$?
13056   grep -v '^ *+' conftest.er1 >conftest.err
13057   rm -f conftest.er1
13058   cat conftest.err >&5
13059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13060   (exit $ac_status); } >/dev/null; then
13061   if test -s conftest.err; then
13062     ac_cpp_err=$ac_c_preproc_warn_flag
13063     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13064   else
13065     ac_cpp_err=
13066   fi
13067 else
13068   ac_cpp_err=yes
13069 fi
13070 if test -z "$ac_cpp_err"; then
13071   ac_header_preproc=yes
13072 else
13073   echo "$as_me: failed program was:" >&5
13074 sed 's/^/| /' conftest.$ac_ext >&5
13075
13076   ac_header_preproc=no
13077 fi
13078 rm -f conftest.err conftest.$ac_ext
13079 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13080 echo "${ECHO_T}$ac_header_preproc" >&6
13081
13082 # So?  What about this header?
13083 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13084   yes:no: )
13085     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13086 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13087     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13088 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13089     ac_header_preproc=yes
13090     ;;
13091   no:yes:* )
13092     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13093 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13094     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13095 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13096     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13097 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13098     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13099 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13100     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13101 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13102     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13103 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13104     (
13105       cat <<\_ASBOX
13106 ## --------------------------------------------- ##
13107 ## Report this to <http://www.openldap.org/its/> ##
13108 ## --------------------------------------------- ##
13109 _ASBOX
13110     ) |
13111       sed "s/^/$as_me: WARNING:     /" >&2
13112     ;;
13113 esac
13114 echo "$as_me:$LINENO: checking for $ac_header" >&5
13115 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13116 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13117   echo $ECHO_N "(cached) $ECHO_C" >&6
13118 else
13119   eval "$as_ac_Header=\$ac_header_preproc"
13120 fi
13121 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13122 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13123
13124 fi
13125 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13126   cat >>confdefs.h <<_ACEOF
13127 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13128 _ACEOF
13129
13130 fi
13131
13132 done
13133
13134
13135         if test $ac_cv_header_ltdl_h = no ; then
13136                 { { echo "$as_me:$LINENO: error: could not locate libtool ltdl.h" >&5
13137 echo "$as_me: error: could not locate libtool ltdl.h" >&2;}
13138    { (exit 1); exit 1; }; }
13139         fi
13140
13141         echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
13142 echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6
13143 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
13144   echo $ECHO_N "(cached) $ECHO_C" >&6
13145 else
13146   ac_check_lib_save_LIBS=$LIBS
13147 LIBS="-lltdl  $LIBS"
13148 cat >conftest.$ac_ext <<_ACEOF
13149 /* confdefs.h.  */
13150 _ACEOF
13151 cat confdefs.h >>conftest.$ac_ext
13152 cat >>conftest.$ac_ext <<_ACEOF
13153 /* end confdefs.h.  */
13154
13155 /* Override any gcc2 internal prototype to avoid an error.  */
13156 #ifdef __cplusplus
13157 extern "C"
13158 #endif
13159 /* We use char because int might match the return type of a gcc2
13160    builtin and then its argument prototype would still apply.  */
13161 char lt_dlinit ();
13162 int
13163 main ()
13164 {
13165 lt_dlinit ();
13166   ;
13167   return 0;
13168 }
13169 _ACEOF
13170 rm -f conftest.$ac_objext conftest$ac_exeext
13171 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13172   (eval $ac_link) 2>conftest.er1
13173   ac_status=$?
13174   grep -v '^ *+' conftest.er1 >conftest.err
13175   rm -f conftest.er1
13176   cat conftest.err >&5
13177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13178   (exit $ac_status); } &&
13179          { ac_try='test -z "$ac_c_werror_flag"
13180                          || test ! -s conftest.err'
13181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13182   (eval $ac_try) 2>&5
13183   ac_status=$?
13184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13185   (exit $ac_status); }; } &&
13186          { ac_try='test -s conftest$ac_exeext'
13187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13188   (eval $ac_try) 2>&5
13189   ac_status=$?
13190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13191   (exit $ac_status); }; }; then
13192   ac_cv_lib_ltdl_lt_dlinit=yes
13193 else
13194   echo "$as_me: failed program was:" >&5
13195 sed 's/^/| /' conftest.$ac_ext >&5
13196
13197 ac_cv_lib_ltdl_lt_dlinit=no
13198 fi
13199 rm -f conftest.err conftest.$ac_objext \
13200       conftest$ac_exeext conftest.$ac_ext
13201 LIBS=$ac_check_lib_save_LIBS
13202 fi
13203 echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
13204 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6
13205 if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
13206
13207                 MODULES_LIBS=-lltdl
13208
13209 cat >>confdefs.h <<\_ACEOF
13210 #define HAVE_LIBLTDL 1
13211 _ACEOF
13212
13213
13214 fi
13215
13216
13217         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
13218                 { { echo "$as_me:$LINENO: error: could not locate libtool -lltdl" >&5
13219 echo "$as_me: error: could not locate libtool -lltdl" >&2;}
13220    { (exit 1); exit 1; }; }
13221         fi
13222         ol_link_modules=yes
13223         WITH_MODULES_ENABLED=yes
13224
13225 else
13226         for i in $Backends; do
13227                 eval "ol_tmp=\$ol_enable_$i"
13228                 if test $ol_tmp = mod ; then
13229                         { echo "$as_me:$LINENO: WARNING: building static $i backend" >&5
13230 echo "$as_me: WARNING: building static $i backend" >&2;}
13231                         eval "ol_enable_$i=yes"
13232                 fi
13233         done
13234         for i in $Overlays; do
13235                 eval "ol_tmp=\$ol_enable_$i"
13236                 if test $ol_tmp = mod ; then
13237                         { echo "$as_me:$LINENO: WARNING: building static $i overlay" >&5
13238 echo "$as_me: WARNING: building static $i overlay" >&2;}
13239                         eval "ol_enable_$i=yes"
13240                 fi
13241         done
13242 fi
13243
13244 # test for EBCDIC
13245 echo "$as_me:$LINENO: checking for EBCDIC" >&5
13246 echo $ECHO_N "checking for EBCDIC... $ECHO_C" >&6
13247 if test "${ol_cv_cpp_ebcdic+set}" = set; then
13248   echo $ECHO_N "(cached) $ECHO_C" >&6
13249 else
13250
13251         cat >conftest.$ac_ext <<_ACEOF
13252 /* confdefs.h.  */
13253 _ACEOF
13254 cat confdefs.h >>conftest.$ac_ext
13255 cat >>conftest.$ac_ext <<_ACEOF
13256 /* end confdefs.h.  */
13257
13258 #if !('M' == 0xd4)
13259 #include <__ASCII__/generate_error.h>
13260 #endif
13261
13262 _ACEOF
13263 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13264   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13265   ac_status=$?
13266   grep -v '^ *+' conftest.er1 >conftest.err
13267   rm -f conftest.er1
13268   cat conftest.err >&5
13269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13270   (exit $ac_status); } >/dev/null; then
13271   if test -s conftest.err; then
13272     ac_cpp_err=$ac_c_preproc_warn_flag
13273     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13274   else
13275     ac_cpp_err=
13276   fi
13277 else
13278   ac_cpp_err=yes
13279 fi
13280 if test -z "$ac_cpp_err"; then
13281   ol_cv_cpp_ebcdic=yes
13282 else
13283   echo "$as_me: failed program was:" >&5
13284 sed 's/^/| /' conftest.$ac_ext >&5
13285
13286   ol_cv_cpp_ebcdic=no
13287 fi
13288 rm -f conftest.err conftest.$ac_ext
13289 fi
13290 echo "$as_me:$LINENO: result: $ol_cv_cpp_ebcdic" >&5
13291 echo "${ECHO_T}$ol_cv_cpp_ebcdic" >&6
13292 if test $ol_cv_cpp_ebcdic = yes ; then
13293
13294 cat >>confdefs.h <<\_ACEOF
13295 #define HAVE_EBCDIC 1
13296 _ACEOF
13297
13298 fi
13299
13300 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
13301 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13302 if test "${ol_cv_header_stdc+set}" = set; then
13303   echo $ECHO_N "(cached) $ECHO_C" >&6
13304 else
13305   cat >conftest.$ac_ext <<_ACEOF
13306 /* confdefs.h.  */
13307 _ACEOF
13308 cat confdefs.h >>conftest.$ac_ext
13309 cat >>conftest.$ac_ext <<_ACEOF
13310 /* end confdefs.h.  */
13311 #include <stdlib.h>
13312 #include <stdarg.h>
13313 #include <string.h>
13314 #include <float.h>
13315 _ACEOF
13316 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13317   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13318   ac_status=$?
13319   grep -v '^ *+' conftest.er1 >conftest.err
13320   rm -f conftest.er1
13321   cat conftest.err >&5
13322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13323   (exit $ac_status); } >/dev/null; then
13324   if test -s conftest.err; then
13325     ac_cpp_err=$ac_c_preproc_warn_flag
13326     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13327   else
13328     ac_cpp_err=
13329   fi
13330 else
13331   ac_cpp_err=yes
13332 fi
13333 if test -z "$ac_cpp_err"; then
13334   ol_cv_header_stdc=yes
13335 else
13336   echo "$as_me: failed program was:" >&5
13337 sed 's/^/| /' conftest.$ac_ext >&5
13338
13339   ol_cv_header_stdc=no
13340 fi
13341 rm -f conftest.err conftest.$ac_ext
13342
13343 if test $ol_cv_header_stdc = yes; then
13344   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13345 cat >conftest.$ac_ext <<_ACEOF
13346 /* confdefs.h.  */
13347 _ACEOF
13348 cat confdefs.h >>conftest.$ac_ext
13349 cat >>conftest.$ac_ext <<_ACEOF
13350 /* end confdefs.h.  */
13351 #include <string.h>
13352
13353 _ACEOF
13354 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13355   $EGREP "memchr" >/dev/null 2>&1; then
13356   :
13357 else
13358   ol_cv_header_stdc=no
13359 fi
13360 rm -f conftest*
13361
13362 fi
13363
13364 if test $ol_cv_header_stdc = yes; then
13365   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13366 cat >conftest.$ac_ext <<_ACEOF
13367 /* confdefs.h.  */
13368 _ACEOF
13369 cat confdefs.h >>conftest.$ac_ext
13370 cat >>conftest.$ac_ext <<_ACEOF
13371 /* end confdefs.h.  */
13372 #include <stdlib.h>
13373
13374 _ACEOF
13375 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13376   $EGREP "free" >/dev/null 2>&1; then
13377   :
13378 else
13379   ol_cv_header_stdc=no
13380 fi
13381 rm -f conftest*
13382
13383 fi
13384
13385 if test $ol_cv_header_stdc = yes; then
13386   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13387 if test "$cross_compiling" = yes; then
13388   :
13389 else
13390   cat >conftest.$ac_ext <<_ACEOF
13391 /* confdefs.h.  */
13392 _ACEOF
13393 cat confdefs.h >>conftest.$ac_ext
13394 cat >>conftest.$ac_ext <<_ACEOF
13395 /* end confdefs.h.  */
13396 #include <ctype.h>
13397 #ifndef HAVE_EBCDIC
13398 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13399 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13400 #else
13401 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13402                 || ('j' <= (c) && (c) <= 'r') \
13403                 || ('s' <= (c) && (c) <= 'z'))
13404 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
13405 #endif
13406 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13407 int main () { int i; for (i = 0; i < 256; i++)
13408 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13409 exit (0); }
13410
13411 _ACEOF
13412 rm -f conftest$ac_exeext
13413 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13414   (eval $ac_link) 2>&5
13415   ac_status=$?
13416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13417   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13419   (eval $ac_try) 2>&5
13420   ac_status=$?
13421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13422   (exit $ac_status); }; }; then
13423   :
13424 else
13425   echo "$as_me: program exited with status $ac_status" >&5
13426 echo "$as_me: failed program was:" >&5
13427 sed 's/^/| /' conftest.$ac_ext >&5
13428
13429 ( exit $ac_status )
13430 ol_cv_header_stdc=no
13431 fi
13432 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13433 fi
13434 fi
13435 fi
13436 echo "$as_me:$LINENO: result: $ol_cv_header_stdc" >&5
13437 echo "${ECHO_T}$ol_cv_header_stdc" >&6
13438 if test $ol_cv_header_stdc = yes; then
13439   cat >>confdefs.h <<\_ACEOF
13440 #define STDC_HEADERS 1
13441 _ACEOF
13442
13443 fi
13444 ac_cv_header_stdc=disable
13445
13446
13447 if test $ol_cv_header_stdc != yes; then
13448         { echo "$as_me:$LINENO: WARNING: could not locate Standard C compliant headers" >&5
13449 echo "$as_me: WARNING: could not locate Standard C compliant headers" >&2;}
13450 fi
13451
13452
13453
13454
13455
13456
13457 ac_header_dirent=no
13458 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13459   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13460 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
13461 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13462 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13463   echo $ECHO_N "(cached) $ECHO_C" >&6
13464 else
13465   cat >conftest.$ac_ext <<_ACEOF
13466 /* confdefs.h.  */
13467 _ACEOF
13468 cat confdefs.h >>conftest.$ac_ext
13469 cat >>conftest.$ac_ext <<_ACEOF
13470 /* end confdefs.h.  */
13471 #include <sys/types.h>
13472 #include <$ac_hdr>
13473
13474 int
13475 main ()
13476 {
13477 if ((DIR *) 0)
13478 return 0;
13479   ;
13480   return 0;
13481 }
13482 _ACEOF
13483 rm -f conftest.$ac_objext
13484 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13485   (eval $ac_compile) 2>conftest.er1
13486   ac_status=$?
13487   grep -v '^ *+' conftest.er1 >conftest.err
13488   rm -f conftest.er1
13489   cat conftest.err >&5
13490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13491   (exit $ac_status); } &&
13492          { ac_try='test -z "$ac_c_werror_flag"
13493                          || test ! -s conftest.err'
13494   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13495   (eval $ac_try) 2>&5
13496   ac_status=$?
13497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13498   (exit $ac_status); }; } &&
13499          { ac_try='test -s conftest.$ac_objext'
13500   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13501   (eval $ac_try) 2>&5
13502   ac_status=$?
13503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13504   (exit $ac_status); }; }; then
13505   eval "$as_ac_Header=yes"
13506 else
13507   echo "$as_me: failed program was:" >&5
13508 sed 's/^/| /' conftest.$ac_ext >&5
13509
13510 eval "$as_ac_Header=no"
13511 fi
13512 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13513 fi
13514 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13515 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13516 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13517   cat >>confdefs.h <<_ACEOF
13518 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13519 _ACEOF
13520
13521 ac_header_dirent=$ac_hdr; break
13522 fi
13523
13524 done
13525 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13526 if test $ac_header_dirent = dirent.h; then
13527   echo "$as_me:$LINENO: checking for library containing opendir" >&5
13528 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
13529 if test "${ac_cv_search_opendir+set}" = set; then
13530   echo $ECHO_N "(cached) $ECHO_C" >&6
13531 else
13532   ac_func_search_save_LIBS=$LIBS
13533 ac_cv_search_opendir=no
13534 cat >conftest.$ac_ext <<_ACEOF
13535 /* confdefs.h.  */
13536 _ACEOF
13537 cat confdefs.h >>conftest.$ac_ext
13538 cat >>conftest.$ac_ext <<_ACEOF
13539 /* end confdefs.h.  */
13540
13541 /* Override any gcc2 internal prototype to avoid an error.  */
13542 #ifdef __cplusplus
13543 extern "C"
13544 #endif
13545 /* We use char because int might match the return type of a gcc2
13546    builtin and then its argument prototype would still apply.  */
13547 char opendir ();
13548 int
13549 main ()
13550 {
13551 opendir ();
13552   ;
13553   return 0;
13554 }
13555 _ACEOF
13556 rm -f conftest.$ac_objext conftest$ac_exeext
13557 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13558   (eval $ac_link) 2>conftest.er1
13559   ac_status=$?
13560   grep -v '^ *+' conftest.er1 >conftest.err
13561   rm -f conftest.er1
13562   cat conftest.err >&5
13563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13564   (exit $ac_status); } &&
13565          { ac_try='test -z "$ac_c_werror_flag"
13566                          || test ! -s conftest.err'
13567   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13568   (eval $ac_try) 2>&5
13569   ac_status=$?
13570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13571   (exit $ac_status); }; } &&
13572          { ac_try='test -s conftest$ac_exeext'
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); }; }; then
13578   ac_cv_search_opendir="none required"
13579 else
13580   echo "$as_me: failed program was:" >&5
13581 sed 's/^/| /' conftest.$ac_ext >&5
13582
13583 fi
13584 rm -f conftest.err conftest.$ac_objext \
13585       conftest$ac_exeext conftest.$ac_ext
13586 if test "$ac_cv_search_opendir" = no; then
13587   for ac_lib in dir; do
13588     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13589     cat >conftest.$ac_ext <<_ACEOF
13590 /* confdefs.h.  */
13591 _ACEOF
13592 cat confdefs.h >>conftest.$ac_ext
13593 cat >>conftest.$ac_ext <<_ACEOF
13594 /* end confdefs.h.  */
13595
13596 /* Override any gcc2 internal prototype to avoid an error.  */
13597 #ifdef __cplusplus
13598 extern "C"
13599 #endif
13600 /* We use char because int might match the return type of a gcc2
13601    builtin and then its argument prototype would still apply.  */
13602 char opendir ();
13603 int
13604 main ()
13605 {
13606 opendir ();
13607   ;
13608   return 0;
13609 }
13610 _ACEOF
13611 rm -f conftest.$ac_objext conftest$ac_exeext
13612 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13613   (eval $ac_link) 2>conftest.er1
13614   ac_status=$?
13615   grep -v '^ *+' conftest.er1 >conftest.err
13616   rm -f conftest.er1
13617   cat conftest.err >&5
13618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13619   (exit $ac_status); } &&
13620          { ac_try='test -z "$ac_c_werror_flag"
13621                          || test ! -s conftest.err'
13622   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13623   (eval $ac_try) 2>&5
13624   ac_status=$?
13625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13626   (exit $ac_status); }; } &&
13627          { ac_try='test -s conftest$ac_exeext'
13628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13629   (eval $ac_try) 2>&5
13630   ac_status=$?
13631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13632   (exit $ac_status); }; }; then
13633   ac_cv_search_opendir="-l$ac_lib"
13634 break
13635 else
13636   echo "$as_me: failed program was:" >&5
13637 sed 's/^/| /' conftest.$ac_ext >&5
13638
13639 fi
13640 rm -f conftest.err conftest.$ac_objext \
13641       conftest$ac_exeext conftest.$ac_ext
13642   done
13643 fi
13644 LIBS=$ac_func_search_save_LIBS
13645 fi
13646 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
13647 echo "${ECHO_T}$ac_cv_search_opendir" >&6
13648 if test "$ac_cv_search_opendir" != no; then
13649   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
13650
13651 fi
13652
13653 else
13654   echo "$as_me:$LINENO: checking for library containing opendir" >&5
13655 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
13656 if test "${ac_cv_search_opendir+set}" = set; then
13657   echo $ECHO_N "(cached) $ECHO_C" >&6
13658 else
13659   ac_func_search_save_LIBS=$LIBS
13660 ac_cv_search_opendir=no
13661 cat >conftest.$ac_ext <<_ACEOF
13662 /* confdefs.h.  */
13663 _ACEOF
13664 cat confdefs.h >>conftest.$ac_ext
13665 cat >>conftest.$ac_ext <<_ACEOF
13666 /* end confdefs.h.  */
13667
13668 /* Override any gcc2 internal prototype to avoid an error.  */
13669 #ifdef __cplusplus
13670 extern "C"
13671 #endif
13672 /* We use char because int might match the return type of a gcc2
13673    builtin and then its argument prototype would still apply.  */
13674 char opendir ();
13675 int
13676 main ()
13677 {
13678 opendir ();
13679   ;
13680   return 0;
13681 }
13682 _ACEOF
13683 rm -f conftest.$ac_objext conftest$ac_exeext
13684 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13685   (eval $ac_link) 2>conftest.er1
13686   ac_status=$?
13687   grep -v '^ *+' conftest.er1 >conftest.err
13688   rm -f conftest.er1
13689   cat conftest.err >&5
13690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13691   (exit $ac_status); } &&
13692          { ac_try='test -z "$ac_c_werror_flag"
13693                          || test ! -s conftest.err'
13694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13695   (eval $ac_try) 2>&5
13696   ac_status=$?
13697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13698   (exit $ac_status); }; } &&
13699          { ac_try='test -s conftest$ac_exeext'
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); }; }; then
13705   ac_cv_search_opendir="none required"
13706 else
13707   echo "$as_me: failed program was:" >&5
13708 sed 's/^/| /' conftest.$ac_ext >&5
13709
13710 fi
13711 rm -f conftest.err conftest.$ac_objext \
13712       conftest$ac_exeext conftest.$ac_ext
13713 if test "$ac_cv_search_opendir" = no; then
13714   for ac_lib in x; do
13715     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13716     cat >conftest.$ac_ext <<_ACEOF
13717 /* confdefs.h.  */
13718 _ACEOF
13719 cat confdefs.h >>conftest.$ac_ext
13720 cat >>conftest.$ac_ext <<_ACEOF
13721 /* end confdefs.h.  */
13722
13723 /* Override any gcc2 internal prototype to avoid an error.  */
13724 #ifdef __cplusplus
13725 extern "C"
13726 #endif
13727 /* We use char because int might match the return type of a gcc2
13728    builtin and then its argument prototype would still apply.  */
13729 char opendir ();
13730 int
13731 main ()
13732 {
13733 opendir ();
13734   ;
13735   return 0;
13736 }
13737 _ACEOF
13738 rm -f conftest.$ac_objext conftest$ac_exeext
13739 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13740   (eval $ac_link) 2>conftest.er1
13741   ac_status=$?
13742   grep -v '^ *+' conftest.er1 >conftest.err
13743   rm -f conftest.er1
13744   cat conftest.err >&5
13745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13746   (exit $ac_status); } &&
13747          { ac_try='test -z "$ac_c_werror_flag"
13748                          || test ! -s conftest.err'
13749   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13750   (eval $ac_try) 2>&5
13751   ac_status=$?
13752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13753   (exit $ac_status); }; } &&
13754          { ac_try='test -s conftest$ac_exeext'
13755   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13756   (eval $ac_try) 2>&5
13757   ac_status=$?
13758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13759   (exit $ac_status); }; }; then
13760   ac_cv_search_opendir="-l$ac_lib"
13761 break
13762 else
13763   echo "$as_me: failed program was:" >&5
13764 sed 's/^/| /' conftest.$ac_ext >&5
13765
13766 fi
13767 rm -f conftest.err conftest.$ac_objext \
13768       conftest$ac_exeext conftest.$ac_ext
13769   done
13770 fi
13771 LIBS=$ac_func_search_save_LIBS
13772 fi
13773 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
13774 echo "${ECHO_T}$ac_cv_search_opendir" >&6
13775 if test "$ac_cv_search_opendir" != no; then
13776   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
13777
13778 fi
13779
13780 fi
13781
13782 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
13783 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
13784 if test "${ac_cv_header_sys_wait_h+set}" = set; then
13785   echo $ECHO_N "(cached) $ECHO_C" >&6
13786 else
13787   cat >conftest.$ac_ext <<_ACEOF
13788 /* confdefs.h.  */
13789 _ACEOF
13790 cat confdefs.h >>conftest.$ac_ext
13791 cat >>conftest.$ac_ext <<_ACEOF
13792 /* end confdefs.h.  */
13793 #include <sys/types.h>
13794 #include <sys/wait.h>
13795 #ifndef WEXITSTATUS
13796 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
13797 #endif
13798 #ifndef WIFEXITED
13799 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
13800 #endif
13801
13802 int
13803 main ()
13804 {
13805   int s;
13806   wait (&s);
13807   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
13808   ;
13809   return 0;
13810 }
13811 _ACEOF
13812 rm -f conftest.$ac_objext
13813 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13814   (eval $ac_compile) 2>conftest.er1
13815   ac_status=$?
13816   grep -v '^ *+' conftest.er1 >conftest.err
13817   rm -f conftest.er1
13818   cat conftest.err >&5
13819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13820   (exit $ac_status); } &&
13821          { ac_try='test -z "$ac_c_werror_flag"
13822                          || test ! -s conftest.err'
13823   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13824   (eval $ac_try) 2>&5
13825   ac_status=$?
13826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13827   (exit $ac_status); }; } &&
13828          { ac_try='test -s conftest.$ac_objext'
13829   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13830   (eval $ac_try) 2>&5
13831   ac_status=$?
13832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13833   (exit $ac_status); }; }; then
13834   ac_cv_header_sys_wait_h=yes
13835 else
13836   echo "$as_me: failed program was:" >&5
13837 sed 's/^/| /' conftest.$ac_ext >&5
13838
13839 ac_cv_header_sys_wait_h=no
13840 fi
13841 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13842 fi
13843 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
13844 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
13845 if test $ac_cv_header_sys_wait_h = yes; then
13846
13847 cat >>confdefs.h <<\_ACEOF
13848 #define HAVE_SYS_WAIT_H 1
13849 _ACEOF
13850
13851 fi
13852
13853 echo "$as_me:$LINENO: checking whether termios.h defines TIOCGWINSZ" >&5
13854 echo $ECHO_N "checking whether termios.h defines TIOCGWINSZ... $ECHO_C" >&6
13855 if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then
13856   echo $ECHO_N "(cached) $ECHO_C" >&6
13857 else
13858   cat >conftest.$ac_ext <<_ACEOF
13859 /* confdefs.h.  */
13860 _ACEOF
13861 cat confdefs.h >>conftest.$ac_ext
13862 cat >>conftest.$ac_ext <<_ACEOF
13863 /* end confdefs.h.  */
13864 #include <sys/types.h>
13865 #include <termios.h>
13866 #ifdef TIOCGWINSZ
13867   yes
13868 #endif
13869
13870 _ACEOF
13871 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13872   $EGREP "yes" >/dev/null 2>&1; then
13873   ac_cv_sys_tiocgwinsz_in_termios_h=yes
13874 else
13875   ac_cv_sys_tiocgwinsz_in_termios_h=no
13876 fi
13877 rm -f conftest*
13878
13879 fi
13880 echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
13881 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_termios_h" >&6
13882
13883 if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
13884   echo "$as_me:$LINENO: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
13885 echo $ECHO_N "checking whether sys/ioctl.h defines TIOCGWINSZ... $ECHO_C" >&6
13886 if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then
13887   echo $ECHO_N "(cached) $ECHO_C" >&6
13888 else
13889   cat >conftest.$ac_ext <<_ACEOF
13890 /* confdefs.h.  */
13891 _ACEOF
13892 cat confdefs.h >>conftest.$ac_ext
13893 cat >>conftest.$ac_ext <<_ACEOF
13894 /* end confdefs.h.  */
13895 #include <sys/types.h>
13896 #include <sys/ioctl.h>
13897 #ifdef TIOCGWINSZ
13898   yes
13899 #endif
13900
13901 _ACEOF
13902 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13903   $EGREP "yes" >/dev/null 2>&1; then
13904   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
13905 else
13906   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
13907 fi
13908 rm -f conftest*
13909
13910 fi
13911 echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
13912 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6
13913
13914   if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
13915
13916 cat >>confdefs.h <<\_ACEOF
13917 #define GWINSZ_IN_SYS_IOCTL 1
13918 _ACEOF
13919
13920   fi
13921 fi
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968 for ac_header in \
13969         arpa/inet.h             \
13970         arpa/nameser.h  \
13971         assert.h                \
13972         bits/types.h    \
13973         conio.h                 \
13974         crypt.h                 \
13975         direct.h                \
13976         errno.h                 \
13977         fcntl.h                 \
13978         filio.h                 \
13979         getopt.h                \
13980         grp.h                   \
13981         io.h                    \
13982         libutil.h               \
13983         limits.h                \
13984         locale.h                \
13985         malloc.h                \
13986         memory.h                \
13987         psap.h                  \
13988         pwd.h                   \
13989         process.h               \
13990         sgtty.h                 \
13991         shadow.h                \
13992         stddef.h                \
13993         string.h                \
13994         strings.h               \
13995         sysexits.h              \
13996         sys/file.h              \
13997         sys/filio.h             \
13998         sys/errno.h             \
13999         sys/ioctl.h             \
14000         sys/param.h             \
14001         sys/resource.h  \
14002         sys/select.h    \
14003         sys/socket.h    \
14004         sys/stat.h              \
14005         sys/syslog.h    \
14006         sys/time.h              \
14007         sys/types.h             \
14008         sys/uio.h               \
14009         syslog.h                \
14010         termios.h               \
14011         unistd.h                \
14012         utime.h                 \
14013
14014 do
14015 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14016 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14017   echo "$as_me:$LINENO: checking for $ac_header" >&5
14018 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14019 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14020   echo $ECHO_N "(cached) $ECHO_C" >&6
14021 fi
14022 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14023 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14024 else
14025   # Is the header compilable?
14026 echo "$as_me:$LINENO: checking $ac_header usability" >&5
14027 echo $ECHO_N "checking $ac_header usability... $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 $ac_includes_default
14035 #include <$ac_header>
14036 _ACEOF
14037 rm -f conftest.$ac_objext
14038 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14039   (eval $ac_compile) 2>conftest.er1
14040   ac_status=$?
14041   grep -v '^ *+' conftest.er1 >conftest.err
14042   rm -f conftest.er1
14043   cat conftest.err >&5
14044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14045   (exit $ac_status); } &&
14046          { ac_try='test -z "$ac_c_werror_flag"
14047                          || test ! -s conftest.err'
14048   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14049   (eval $ac_try) 2>&5
14050   ac_status=$?
14051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14052   (exit $ac_status); }; } &&
14053          { ac_try='test -s conftest.$ac_objext'
14054   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14055   (eval $ac_try) 2>&5
14056   ac_status=$?
14057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14058   (exit $ac_status); }; }; then
14059   ac_header_compiler=yes
14060 else
14061   echo "$as_me: failed program was:" >&5
14062 sed 's/^/| /' conftest.$ac_ext >&5
14063
14064 ac_header_compiler=no
14065 fi
14066 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14067 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14068 echo "${ECHO_T}$ac_header_compiler" >&6
14069
14070 # Is the header present?
14071 echo "$as_me:$LINENO: checking $ac_header presence" >&5
14072 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14073 cat >conftest.$ac_ext <<_ACEOF
14074 /* confdefs.h.  */
14075 _ACEOF
14076 cat confdefs.h >>conftest.$ac_ext
14077 cat >>conftest.$ac_ext <<_ACEOF
14078 /* end confdefs.h.  */
14079 #include <$ac_header>
14080 _ACEOF
14081 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14082   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14083   ac_status=$?
14084   grep -v '^ *+' conftest.er1 >conftest.err
14085   rm -f conftest.er1
14086   cat conftest.err >&5
14087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14088   (exit $ac_status); } >/dev/null; then
14089   if test -s conftest.err; then
14090     ac_cpp_err=$ac_c_preproc_warn_flag
14091     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
14092   else
14093     ac_cpp_err=
14094   fi
14095 else
14096   ac_cpp_err=yes
14097 fi
14098 if test -z "$ac_cpp_err"; then
14099   ac_header_preproc=yes
14100 else
14101   echo "$as_me: failed program was:" >&5
14102 sed 's/^/| /' conftest.$ac_ext >&5
14103
14104   ac_header_preproc=no
14105 fi
14106 rm -f conftest.err conftest.$ac_ext
14107 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14108 echo "${ECHO_T}$ac_header_preproc" >&6
14109
14110 # So?  What about this header?
14111 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14112   yes:no: )
14113     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14114 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14115     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14116 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14117     ac_header_preproc=yes
14118     ;;
14119   no:yes:* )
14120     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14121 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14122     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
14123 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
14124     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14125 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14126     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
14127 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
14128     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14129 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14130     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14131 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14132     (
14133       cat <<\_ASBOX
14134 ## --------------------------------------------- ##
14135 ## Report this to <http://www.openldap.org/its/> ##
14136 ## --------------------------------------------- ##
14137 _ASBOX
14138     ) |
14139       sed "s/^/$as_me: WARNING:     /" >&2
14140     ;;
14141 esac
14142 echo "$as_me:$LINENO: checking for $ac_header" >&5
14143 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14144 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14145   echo $ECHO_N "(cached) $ECHO_C" >&6
14146 else
14147   eval "$as_ac_Header=\$ac_header_preproc"
14148 fi
14149 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14150 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14151
14152 fi
14153 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14154   cat >>confdefs.h <<_ACEOF
14155 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14156 _ACEOF
14157
14158 fi
14159
14160 done
14161
14162
14163 if test "$ac_cv_mingw32" = yes ; then
14164
14165
14166 for ac_header in winsock.h winsock2.h
14167 do
14168 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14169 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14170   echo "$as_me:$LINENO: checking for $ac_header" >&5
14171 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14172 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14173   echo $ECHO_N "(cached) $ECHO_C" >&6
14174 fi
14175 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14176 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14177 else
14178   # Is the header compilable?
14179 echo "$as_me:$LINENO: checking $ac_header usability" >&5
14180 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14181 cat >conftest.$ac_ext <<_ACEOF
14182 /* confdefs.h.  */
14183 _ACEOF
14184 cat confdefs.h >>conftest.$ac_ext
14185 cat >>conftest.$ac_ext <<_ACEOF
14186 /* end confdefs.h.  */
14187 $ac_includes_default
14188 #include <$ac_header>
14189 _ACEOF
14190 rm -f conftest.$ac_objext
14191 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14192   (eval $ac_compile) 2>conftest.er1
14193   ac_status=$?
14194   grep -v '^ *+' conftest.er1 >conftest.err
14195   rm -f conftest.er1
14196   cat conftest.err >&5
14197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14198   (exit $ac_status); } &&
14199          { ac_try='test -z "$ac_c_werror_flag"
14200                          || test ! -s conftest.err'
14201   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14202   (eval $ac_try) 2>&5
14203   ac_status=$?
14204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14205   (exit $ac_status); }; } &&
14206          { ac_try='test -s conftest.$ac_objext'
14207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14208   (eval $ac_try) 2>&5
14209   ac_status=$?
14210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14211   (exit $ac_status); }; }; then
14212   ac_header_compiler=yes
14213 else
14214   echo "$as_me: failed program was:" >&5
14215 sed 's/^/| /' conftest.$ac_ext >&5
14216
14217 ac_header_compiler=no
14218 fi
14219 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14220 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14221 echo "${ECHO_T}$ac_header_compiler" >&6
14222
14223 # Is the header present?
14224 echo "$as_me:$LINENO: checking $ac_header presence" >&5
14225 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14226 cat >conftest.$ac_ext <<_ACEOF
14227 /* confdefs.h.  */
14228 _ACEOF
14229 cat confdefs.h >>conftest.$ac_ext
14230 cat >>conftest.$ac_ext <<_ACEOF
14231 /* end confdefs.h.  */
14232 #include <$ac_header>
14233 _ACEOF
14234 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14235   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14236   ac_status=$?
14237   grep -v '^ *+' conftest.er1 >conftest.err
14238   rm -f conftest.er1
14239   cat conftest.err >&5
14240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14241   (exit $ac_status); } >/dev/null; then
14242   if test -s conftest.err; then
14243     ac_cpp_err=$ac_c_preproc_warn_flag
14244     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
14245   else
14246     ac_cpp_err=
14247   fi
14248 else
14249   ac_cpp_err=yes
14250 fi
14251 if test -z "$ac_cpp_err"; then
14252   ac_header_preproc=yes
14253 else
14254   echo "$as_me: failed program was:" >&5
14255 sed 's/^/| /' conftest.$ac_ext >&5
14256
14257   ac_header_preproc=no
14258 fi
14259 rm -f conftest.err conftest.$ac_ext
14260 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14261 echo "${ECHO_T}$ac_header_preproc" >&6
14262
14263 # So?  What about this header?
14264 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14265   yes:no: )
14266     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14267 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14268     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14269 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14270     ac_header_preproc=yes
14271     ;;
14272   no:yes:* )
14273     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14274 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14275     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
14276 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
14277     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14278 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14279     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
14280 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
14281     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14282 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14283     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14284 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14285     (
14286       cat <<\_ASBOX
14287 ## --------------------------------------------- ##
14288 ## Report this to <http://www.openldap.org/its/> ##
14289 ## --------------------------------------------- ##
14290 _ASBOX
14291     ) |
14292       sed "s/^/$as_me: WARNING:     /" >&2
14293     ;;
14294 esac
14295 echo "$as_me:$LINENO: checking for $ac_header" >&5
14296 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14297 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14298   echo $ECHO_N "(cached) $ECHO_C" >&6
14299 else
14300   eval "$as_ac_Header=\$ac_header_preproc"
14301 fi
14302 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14303 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14304
14305 fi
14306 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14307   cat >>confdefs.h <<_ACEOF
14308 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14309 _ACEOF
14310
14311 fi
14312
14313 done
14314
14315 fi
14316
14317
14318 for ac_header in resolv.h
14319 do
14320 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14321 echo "$as_me:$LINENO: checking for $ac_header" >&5
14322 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14323 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14324   echo $ECHO_N "(cached) $ECHO_C" >&6
14325 else
14326   cat >conftest.$ac_ext <<_ACEOF
14327 /* confdefs.h.  */
14328 _ACEOF
14329 cat confdefs.h >>conftest.$ac_ext
14330 cat >>conftest.$ac_ext <<_ACEOF
14331 /* end confdefs.h.  */
14332 $ac_includes_default
14333 #include <netinet/in.h>
14334
14335
14336 #include <$ac_header>
14337 _ACEOF
14338 rm -f conftest.$ac_objext
14339 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14340   (eval $ac_compile) 2>conftest.er1
14341   ac_status=$?
14342   grep -v '^ *+' conftest.er1 >conftest.err
14343   rm -f conftest.er1
14344   cat conftest.err >&5
14345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14346   (exit $ac_status); } &&
14347          { ac_try='test -z "$ac_c_werror_flag"
14348                          || test ! -s conftest.err'
14349   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14350   (eval $ac_try) 2>&5
14351   ac_status=$?
14352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14353   (exit $ac_status); }; } &&
14354          { ac_try='test -s conftest.$ac_objext'
14355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14356   (eval $ac_try) 2>&5
14357   ac_status=$?
14358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14359   (exit $ac_status); }; }; then
14360   eval "$as_ac_Header=yes"
14361 else
14362   echo "$as_me: failed program was:" >&5
14363 sed 's/^/| /' conftest.$ac_ext >&5
14364
14365 eval "$as_ac_Header=no"
14366 fi
14367 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14368 fi
14369 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14370 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14371 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14372   cat >>confdefs.h <<_ACEOF
14373 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14374 _ACEOF
14375
14376 fi
14377
14378 done
14379
14380
14381
14382 for ac_header in netinet/tcp.h
14383 do
14384 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14385 echo "$as_me:$LINENO: checking for $ac_header" >&5
14386 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14387 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14388   echo $ECHO_N "(cached) $ECHO_C" >&6
14389 else
14390   cat >conftest.$ac_ext <<_ACEOF
14391 /* confdefs.h.  */
14392 _ACEOF
14393 cat confdefs.h >>conftest.$ac_ext
14394 cat >>conftest.$ac_ext <<_ACEOF
14395 /* end confdefs.h.  */
14396 $ac_includes_default
14397 #include <netinet/in.h>
14398
14399
14400 #include <$ac_header>
14401 _ACEOF
14402 rm -f conftest.$ac_objext
14403 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14404   (eval $ac_compile) 2>conftest.er1
14405   ac_status=$?
14406   grep -v '^ *+' conftest.er1 >conftest.err
14407   rm -f conftest.er1
14408   cat conftest.err >&5
14409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14410   (exit $ac_status); } &&
14411          { ac_try='test -z "$ac_c_werror_flag"
14412                          || test ! -s conftest.err'
14413   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14414   (eval $ac_try) 2>&5
14415   ac_status=$?
14416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14417   (exit $ac_status); }; } &&
14418          { ac_try='test -s conftest.$ac_objext'
14419   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14420   (eval $ac_try) 2>&5
14421   ac_status=$?
14422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14423   (exit $ac_status); }; }; then
14424   eval "$as_ac_Header=yes"
14425 else
14426   echo "$as_me: failed program was:" >&5
14427 sed 's/^/| /' conftest.$ac_ext >&5
14428
14429 eval "$as_ac_Header=no"
14430 fi
14431 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14432 fi
14433 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14434 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14435 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14436   cat >>confdefs.h <<_ACEOF
14437 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14438 _ACEOF
14439
14440 fi
14441
14442 done
14443
14444
14445
14446 for ac_header in sys/ucred.h
14447 do
14448 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14449 echo "$as_me:$LINENO: checking for $ac_header" >&5
14450 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14451 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14452   echo $ECHO_N "(cached) $ECHO_C" >&6
14453 else
14454   cat >conftest.$ac_ext <<_ACEOF
14455 /* confdefs.h.  */
14456 _ACEOF
14457 cat confdefs.h >>conftest.$ac_ext
14458 cat >>conftest.$ac_ext <<_ACEOF
14459 /* end confdefs.h.  */
14460 $ac_includes_default
14461 #ifdef HAVE_SYS_PARAM_H
14462 #include <sys/param.h>
14463 #endif
14464
14465
14466 #include <$ac_header>
14467 _ACEOF
14468 rm -f conftest.$ac_objext
14469 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14470   (eval $ac_compile) 2>conftest.er1
14471   ac_status=$?
14472   grep -v '^ *+' conftest.er1 >conftest.err
14473   rm -f conftest.er1
14474   cat conftest.err >&5
14475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14476   (exit $ac_status); } &&
14477          { ac_try='test -z "$ac_c_werror_flag"
14478                          || test ! -s conftest.err'
14479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14480   (eval $ac_try) 2>&5
14481   ac_status=$?
14482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14483   (exit $ac_status); }; } &&
14484          { ac_try='test -s conftest.$ac_objext'
14485   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14486   (eval $ac_try) 2>&5
14487   ac_status=$?
14488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14489   (exit $ac_status); }; }; then
14490   eval "$as_ac_Header=yes"
14491 else
14492   echo "$as_me: failed program was:" >&5
14493 sed 's/^/| /' conftest.$ac_ext >&5
14494
14495 eval "$as_ac_Header=no"
14496 fi
14497 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14498 fi
14499 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14500 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14501 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14502   cat >>confdefs.h <<_ACEOF
14503 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14504 _ACEOF
14505
14506 fi
14507
14508 done
14509
14510
14511
14512
14513
14514 for ac_func in sigaction sigset
14515 do
14516 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14517 echo "$as_me:$LINENO: checking for $ac_func" >&5
14518 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14519 if eval "test \"\${$as_ac_var+set}\" = set"; then
14520   echo $ECHO_N "(cached) $ECHO_C" >&6
14521 else
14522   cat >conftest.$ac_ext <<_ACEOF
14523 /* confdefs.h.  */
14524 _ACEOF
14525 cat confdefs.h >>conftest.$ac_ext
14526 cat >>conftest.$ac_ext <<_ACEOF
14527 /* end confdefs.h.  */
14528 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14529    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14530 #define $ac_func innocuous_$ac_func
14531
14532 /* System header to define __stub macros and hopefully few prototypes,
14533     which can conflict with char $ac_func (); below.
14534     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14535     <limits.h> exists even on freestanding compilers.  */
14536
14537 #ifdef __STDC__
14538 # include <limits.h>
14539 #else
14540 # include <assert.h>
14541 #endif
14542
14543 #undef $ac_func
14544
14545 /* Override any gcc2 internal prototype to avoid an error.  */
14546 #ifdef __cplusplus
14547 extern "C"
14548 {
14549 #endif
14550 /* We use char because int might match the return type of a gcc2
14551    builtin and then its argument prototype would still apply.  */
14552 char $ac_func ();
14553 /* The GNU C library defines this for functions which it implements
14554     to always fail with ENOSYS.  Some functions are actually named
14555     something starting with __ and the normal name is an alias.  */
14556 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14557 choke me
14558 #else
14559 char (*f) () = $ac_func;
14560 #endif
14561 #ifdef __cplusplus
14562 }
14563 #endif
14564
14565 int
14566 main ()
14567 {
14568 return f != $ac_func;
14569   ;
14570   return 0;
14571 }
14572 _ACEOF
14573 rm -f conftest.$ac_objext conftest$ac_exeext
14574 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14575   (eval $ac_link) 2>conftest.er1
14576   ac_status=$?
14577   grep -v '^ *+' conftest.er1 >conftest.err
14578   rm -f conftest.er1
14579   cat conftest.err >&5
14580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14581   (exit $ac_status); } &&
14582          { ac_try='test -z "$ac_c_werror_flag"
14583                          || test ! -s conftest.err'
14584   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14585   (eval $ac_try) 2>&5
14586   ac_status=$?
14587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14588   (exit $ac_status); }; } &&
14589          { ac_try='test -s conftest$ac_exeext'
14590   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14591   (eval $ac_try) 2>&5
14592   ac_status=$?
14593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14594   (exit $ac_status); }; }; then
14595   eval "$as_ac_var=yes"
14596 else
14597   echo "$as_me: failed program was:" >&5
14598 sed 's/^/| /' conftest.$ac_ext >&5
14599
14600 eval "$as_ac_var=no"
14601 fi
14602 rm -f conftest.err conftest.$ac_objext \
14603       conftest$ac_exeext conftest.$ac_ext
14604 fi
14605 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14606 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14607 if test `eval echo '${'$as_ac_var'}'` = yes; then
14608   cat >>confdefs.h <<_ACEOF
14609 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14610 _ACEOF
14611
14612 fi
14613 done
14614
14615
14616 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
14617
14618 echo "$as_me:$LINENO: checking for sigset in -lV3" >&5
14619 echo $ECHO_N "checking for sigset in -lV3... $ECHO_C" >&6
14620 if test "${ac_cv_lib_V3_sigset+set}" = set; then
14621   echo $ECHO_N "(cached) $ECHO_C" >&6
14622 else
14623   ac_check_lib_save_LIBS=$LIBS
14624 LIBS="-lV3  $LIBS"
14625 cat >conftest.$ac_ext <<_ACEOF
14626 /* confdefs.h.  */
14627 _ACEOF
14628 cat confdefs.h >>conftest.$ac_ext
14629 cat >>conftest.$ac_ext <<_ACEOF
14630 /* end confdefs.h.  */
14631
14632 /* Override any gcc2 internal prototype to avoid an error.  */
14633 #ifdef __cplusplus
14634 extern "C"
14635 #endif
14636 /* We use char because int might match the return type of a gcc2
14637    builtin and then its argument prototype would still apply.  */
14638 char sigset ();
14639 int
14640 main ()
14641 {
14642 sigset ();
14643   ;
14644   return 0;
14645 }
14646 _ACEOF
14647 rm -f conftest.$ac_objext conftest$ac_exeext
14648 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14649   (eval $ac_link) 2>conftest.er1
14650   ac_status=$?
14651   grep -v '^ *+' conftest.er1 >conftest.err
14652   rm -f conftest.er1
14653   cat conftest.err >&5
14654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14655   (exit $ac_status); } &&
14656          { ac_try='test -z "$ac_c_werror_flag"
14657                          || test ! -s conftest.err'
14658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14659   (eval $ac_try) 2>&5
14660   ac_status=$?
14661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14662   (exit $ac_status); }; } &&
14663          { ac_try='test -s conftest$ac_exeext'
14664   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14665   (eval $ac_try) 2>&5
14666   ac_status=$?
14667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14668   (exit $ac_status); }; }; then
14669   ac_cv_lib_V3_sigset=yes
14670 else
14671   echo "$as_me: failed program was:" >&5
14672 sed 's/^/| /' conftest.$ac_ext >&5
14673
14674 ac_cv_lib_V3_sigset=no
14675 fi
14676 rm -f conftest.err conftest.$ac_objext \
14677       conftest$ac_exeext conftest.$ac_ext
14678 LIBS=$ac_check_lib_save_LIBS
14679 fi
14680 echo "$as_me:$LINENO: result: $ac_cv_lib_V3_sigset" >&5
14681 echo "${ECHO_T}$ac_cv_lib_V3_sigset" >&6
14682 if test $ac_cv_lib_V3_sigset = yes; then
14683   cat >>confdefs.h <<_ACEOF
14684 #define HAVE_LIBV3 1
14685 _ACEOF
14686
14687   LIBS="-lV3 $LIBS"
14688
14689 fi
14690
14691 fi
14692
14693 if test "$ac_cv_header_winsock_h" = yes; then
14694 echo "$as_me:$LINENO: checking for winsock" >&5
14695 echo $ECHO_N "checking for winsock... $ECHO_C" >&6
14696 if test "${ol_cv_winsock+set}" = set; then
14697   echo $ECHO_N "(cached) $ECHO_C" >&6
14698 else
14699   save_LIBS="$LIBS"
14700 for curlib in ws2_32 wsock32; do
14701         LIBS="$LIBS -l$curlib"
14702         cat >conftest.$ac_ext <<_ACEOF
14703 /* confdefs.h.  */
14704 _ACEOF
14705 cat confdefs.h >>conftest.$ac_ext
14706 cat >>conftest.$ac_ext <<_ACEOF
14707 /* end confdefs.h.  */
14708 #include <winsock.h>
14709
14710 int
14711 main ()
14712 {
14713
14714                         socket(0,0,0);
14715                         select(0,NULL,NULL,NULL,NULL);
14716                         closesocket(0);
14717                         gethostname(NULL,0);
14718
14719   ;
14720   return 0;
14721 }
14722 _ACEOF
14723 rm -f conftest.$ac_objext conftest$ac_exeext
14724 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14725   (eval $ac_link) 2>conftest.er1
14726   ac_status=$?
14727   grep -v '^ *+' conftest.er1 >conftest.err
14728   rm -f conftest.er1
14729   cat conftest.err >&5
14730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14731   (exit $ac_status); } &&
14732          { ac_try='test -z "$ac_c_werror_flag"
14733                          || test ! -s conftest.err'
14734   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14735   (eval $ac_try) 2>&5
14736   ac_status=$?
14737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14738   (exit $ac_status); }; } &&
14739          { ac_try='test -s conftest$ac_exeext'
14740   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14741   (eval $ac_try) 2>&5
14742   ac_status=$?
14743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14744   (exit $ac_status); }; }; then
14745   ol_cv_winsock=yes
14746 else
14747   echo "$as_me: failed program was:" >&5
14748 sed 's/^/| /' conftest.$ac_ext >&5
14749
14750 ol_cv_winsock=no
14751 fi
14752 rm -f conftest.err conftest.$ac_objext \
14753       conftest$ac_exeext conftest.$ac_ext
14754
14755         if test $ol_cv_winsock = yes; then
14756
14757 cat >>confdefs.h <<\_ACEOF
14758 #define HAVE_WINSOCK 1
14759 _ACEOF
14760
14761                 ac_cv_func_socket=yes
14762                 ac_cv_func_select=yes
14763                 ac_cv_func_closesocket=yes
14764                 ac_cv_func_gethostname=yes
14765                 if test $curlib = ws2_32; then
14766                         ol_cv_winsock=winsock2
14767
14768 cat >>confdefs.h <<\_ACEOF
14769 #define HAVE_WINSOCK2 1
14770 _ACEOF
14771
14772                 fi
14773                 break
14774         fi
14775         LIBS="$save_LIBS"
14776 done
14777 fi
14778 echo "$as_me:$LINENO: result: $ol_cv_winsock" >&5
14779 echo "${ECHO_T}$ol_cv_winsock" >&6
14780 fi
14781
14782
14783 echo "$as_me:$LINENO: checking for socket" >&5
14784 echo $ECHO_N "checking for socket... $ECHO_C" >&6
14785 if test "${ac_cv_func_socket+set}" = set; then
14786   echo $ECHO_N "(cached) $ECHO_C" >&6
14787 else
14788   cat >conftest.$ac_ext <<_ACEOF
14789 /* confdefs.h.  */
14790 _ACEOF
14791 cat confdefs.h >>conftest.$ac_ext
14792 cat >>conftest.$ac_ext <<_ACEOF
14793 /* end confdefs.h.  */
14794 /* Define socket to an innocuous variant, in case <limits.h> declares socket.
14795    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14796 #define socket innocuous_socket
14797
14798 /* System header to define __stub macros and hopefully few prototypes,
14799     which can conflict with char socket (); below.
14800     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14801     <limits.h> exists even on freestanding compilers.  */
14802
14803 #ifdef __STDC__
14804 # include <limits.h>
14805 #else
14806 # include <assert.h>
14807 #endif
14808
14809 #undef socket
14810
14811 /* Override any gcc2 internal prototype to avoid an error.  */
14812 #ifdef __cplusplus
14813 extern "C"
14814 {
14815 #endif
14816 /* We use char because int might match the return type of a gcc2
14817    builtin and then its argument prototype would still apply.  */
14818 char socket ();
14819 /* The GNU C library defines this for functions which it implements
14820     to always fail with ENOSYS.  Some functions are actually named
14821     something starting with __ and the normal name is an alias.  */
14822 #if defined (__stub_socket) || defined (__stub___socket)
14823 choke me
14824 #else
14825 char (*f) () = socket;
14826 #endif
14827 #ifdef __cplusplus
14828 }
14829 #endif
14830
14831 int
14832 main ()
14833 {
14834 return f != socket;
14835   ;
14836   return 0;
14837 }
14838 _ACEOF
14839 rm -f conftest.$ac_objext conftest$ac_exeext
14840 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14841   (eval $ac_link) 2>conftest.er1
14842   ac_status=$?
14843   grep -v '^ *+' conftest.er1 >conftest.err
14844   rm -f conftest.er1
14845   cat conftest.err >&5
14846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14847   (exit $ac_status); } &&
14848          { ac_try='test -z "$ac_c_werror_flag"
14849                          || test ! -s conftest.err'
14850   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14851   (eval $ac_try) 2>&5
14852   ac_status=$?
14853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14854   (exit $ac_status); }; } &&
14855          { ac_try='test -s conftest$ac_exeext'
14856   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14857   (eval $ac_try) 2>&5
14858   ac_status=$?
14859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14860   (exit $ac_status); }; }; then
14861   ac_cv_func_socket=yes
14862 else
14863   echo "$as_me: failed program was:" >&5
14864 sed 's/^/| /' conftest.$ac_ext >&5
14865
14866 ac_cv_func_socket=no
14867 fi
14868 rm -f conftest.err conftest.$ac_objext \
14869       conftest$ac_exeext conftest.$ac_ext
14870 fi
14871 echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
14872 echo "${ECHO_T}$ac_cv_func_socket" >&6
14873 if test $ac_cv_func_socket = yes; then
14874   :
14875 else
14876
14877
14878 echo "$as_me:$LINENO: checking for main in -lsocket" >&5
14879 echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
14880 if test "${ac_cv_lib_socket_main+set}" = set; then
14881   echo $ECHO_N "(cached) $ECHO_C" >&6
14882 else
14883   ac_check_lib_save_LIBS=$LIBS
14884 LIBS="-lsocket  $LIBS"
14885 cat >conftest.$ac_ext <<_ACEOF
14886 /* confdefs.h.  */
14887 _ACEOF
14888 cat confdefs.h >>conftest.$ac_ext
14889 cat >>conftest.$ac_ext <<_ACEOF
14890 /* end confdefs.h.  */
14891
14892
14893 int
14894 main ()
14895 {
14896 main ();
14897   ;
14898   return 0;
14899 }
14900 _ACEOF
14901 rm -f conftest.$ac_objext conftest$ac_exeext
14902 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14903   (eval $ac_link) 2>conftest.er1
14904   ac_status=$?
14905   grep -v '^ *+' conftest.er1 >conftest.err
14906   rm -f conftest.er1
14907   cat conftest.err >&5
14908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14909   (exit $ac_status); } &&
14910          { ac_try='test -z "$ac_c_werror_flag"
14911                          || test ! -s conftest.err'
14912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14913   (eval $ac_try) 2>&5
14914   ac_status=$?
14915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14916   (exit $ac_status); }; } &&
14917          { ac_try='test -s conftest$ac_exeext'
14918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14919   (eval $ac_try) 2>&5
14920   ac_status=$?
14921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14922   (exit $ac_status); }; }; then
14923   ac_cv_lib_socket_main=yes
14924 else
14925   echo "$as_me: failed program was:" >&5
14926 sed 's/^/| /' conftest.$ac_ext >&5
14927
14928 ac_cv_lib_socket_main=no
14929 fi
14930 rm -f conftest.err conftest.$ac_objext \
14931       conftest$ac_exeext conftest.$ac_ext
14932 LIBS=$ac_check_lib_save_LIBS
14933 fi
14934 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
14935 echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
14936 if test $ac_cv_lib_socket_main = yes; then
14937   cat >>confdefs.h <<_ACEOF
14938 #define HAVE_LIBSOCKET 1
14939 _ACEOF
14940
14941   LIBS="-lsocket $LIBS"
14942
14943 fi
14944
14945
14946 echo "$as_me:$LINENO: checking for main in -lnet" >&5
14947 echo $ECHO_N "checking for main in -lnet... $ECHO_C" >&6
14948 if test "${ac_cv_lib_net_main+set}" = set; then
14949   echo $ECHO_N "(cached) $ECHO_C" >&6
14950 else
14951   ac_check_lib_save_LIBS=$LIBS
14952 LIBS="-lnet  $LIBS"
14953 cat >conftest.$ac_ext <<_ACEOF
14954 /* confdefs.h.  */
14955 _ACEOF
14956 cat confdefs.h >>conftest.$ac_ext
14957 cat >>conftest.$ac_ext <<_ACEOF
14958 /* end confdefs.h.  */
14959
14960
14961 int
14962 main ()
14963 {
14964 main ();
14965   ;
14966   return 0;
14967 }
14968 _ACEOF
14969 rm -f conftest.$ac_objext conftest$ac_exeext
14970 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14971   (eval $ac_link) 2>conftest.er1
14972   ac_status=$?
14973   grep -v '^ *+' conftest.er1 >conftest.err
14974   rm -f conftest.er1
14975   cat conftest.err >&5
14976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14977   (exit $ac_status); } &&
14978          { ac_try='test -z "$ac_c_werror_flag"
14979                          || test ! -s conftest.err'
14980   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14981   (eval $ac_try) 2>&5
14982   ac_status=$?
14983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14984   (exit $ac_status); }; } &&
14985          { ac_try='test -s conftest$ac_exeext'
14986   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14987   (eval $ac_try) 2>&5
14988   ac_status=$?
14989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14990   (exit $ac_status); }; }; then
14991   ac_cv_lib_net_main=yes
14992 else
14993   echo "$as_me: failed program was:" >&5
14994 sed 's/^/| /' conftest.$ac_ext >&5
14995
14996 ac_cv_lib_net_main=no
14997 fi
14998 rm -f conftest.err conftest.$ac_objext \
14999       conftest$ac_exeext conftest.$ac_ext
15000 LIBS=$ac_check_lib_save_LIBS
15001 fi
15002 echo "$as_me:$LINENO: result: $ac_cv_lib_net_main" >&5
15003 echo "${ECHO_T}$ac_cv_lib_net_main" >&6
15004 if test $ac_cv_lib_net_main = yes; then
15005   cat >>confdefs.h <<_ACEOF
15006 #define HAVE_LIBNET 1
15007 _ACEOF
15008
15009   LIBS="-lnet $LIBS"
15010
15011 fi
15012
15013
15014 echo "$as_me:$LINENO: checking for main in -lnsl_s" >&5
15015 echo $ECHO_N "checking for main in -lnsl_s... $ECHO_C" >&6
15016 if test "${ac_cv_lib_nsl_s_main+set}" = set; then
15017   echo $ECHO_N "(cached) $ECHO_C" >&6
15018 else
15019   ac_check_lib_save_LIBS=$LIBS
15020 LIBS="-lnsl_s  $LIBS"
15021 cat >conftest.$ac_ext <<_ACEOF
15022 /* confdefs.h.  */
15023 _ACEOF
15024 cat confdefs.h >>conftest.$ac_ext
15025 cat >>conftest.$ac_ext <<_ACEOF
15026 /* end confdefs.h.  */
15027
15028
15029 int
15030 main ()
15031 {
15032 main ();
15033   ;
15034   return 0;
15035 }
15036 _ACEOF
15037 rm -f conftest.$ac_objext conftest$ac_exeext
15038 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15039   (eval $ac_link) 2>conftest.er1
15040   ac_status=$?
15041   grep -v '^ *+' conftest.er1 >conftest.err
15042   rm -f conftest.er1
15043   cat conftest.err >&5
15044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15045   (exit $ac_status); } &&
15046          { ac_try='test -z "$ac_c_werror_flag"
15047                          || test ! -s conftest.err'
15048   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15049   (eval $ac_try) 2>&5
15050   ac_status=$?
15051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15052   (exit $ac_status); }; } &&
15053          { ac_try='test -s conftest$ac_exeext'
15054   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15055   (eval $ac_try) 2>&5
15056   ac_status=$?
15057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15058   (exit $ac_status); }; }; then
15059   ac_cv_lib_nsl_s_main=yes
15060 else
15061   echo "$as_me: failed program was:" >&5
15062 sed 's/^/| /' conftest.$ac_ext >&5
15063
15064 ac_cv_lib_nsl_s_main=no
15065 fi
15066 rm -f conftest.err conftest.$ac_objext \
15067       conftest$ac_exeext conftest.$ac_ext
15068 LIBS=$ac_check_lib_save_LIBS
15069 fi
15070 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_s_main" >&5
15071 echo "${ECHO_T}$ac_cv_lib_nsl_s_main" >&6
15072 if test $ac_cv_lib_nsl_s_main = yes; then
15073   cat >>confdefs.h <<_ACEOF
15074 #define HAVE_LIBNSL_S 1
15075 _ACEOF
15076
15077   LIBS="-lnsl_s $LIBS"
15078
15079 fi
15080
15081
15082 echo "$as_me:$LINENO: checking for main in -lnsl" >&5
15083 echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
15084 if test "${ac_cv_lib_nsl_main+set}" = set; then
15085   echo $ECHO_N "(cached) $ECHO_C" >&6
15086 else
15087   ac_check_lib_save_LIBS=$LIBS
15088 LIBS="-lnsl  $LIBS"
15089 cat >conftest.$ac_ext <<_ACEOF
15090 /* confdefs.h.  */
15091 _ACEOF
15092 cat confdefs.h >>conftest.$ac_ext
15093 cat >>conftest.$ac_ext <<_ACEOF
15094 /* end confdefs.h.  */
15095
15096
15097 int
15098 main ()
15099 {
15100 main ();
15101   ;
15102   return 0;
15103 }
15104 _ACEOF
15105 rm -f conftest.$ac_objext conftest$ac_exeext
15106 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15107   (eval $ac_link) 2>conftest.er1
15108   ac_status=$?
15109   grep -v '^ *+' conftest.er1 >conftest.err
15110   rm -f conftest.er1
15111   cat conftest.err >&5
15112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15113   (exit $ac_status); } &&
15114          { ac_try='test -z "$ac_c_werror_flag"
15115                          || test ! -s conftest.err'
15116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15117   (eval $ac_try) 2>&5
15118   ac_status=$?
15119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15120   (exit $ac_status); }; } &&
15121          { ac_try='test -s conftest$ac_exeext'
15122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15123   (eval $ac_try) 2>&5
15124   ac_status=$?
15125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15126   (exit $ac_status); }; }; then
15127   ac_cv_lib_nsl_main=yes
15128 else
15129   echo "$as_me: failed program was:" >&5
15130 sed 's/^/| /' conftest.$ac_ext >&5
15131
15132 ac_cv_lib_nsl_main=no
15133 fi
15134 rm -f conftest.err conftest.$ac_objext \
15135       conftest$ac_exeext conftest.$ac_ext
15136 LIBS=$ac_check_lib_save_LIBS
15137 fi
15138 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
15139 echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
15140 if test $ac_cv_lib_nsl_main = yes; then
15141   cat >>confdefs.h <<_ACEOF
15142 #define HAVE_LIBNSL 1
15143 _ACEOF
15144
15145   LIBS="-lnsl $LIBS"
15146
15147 fi
15148
15149
15150 echo "$as_me:$LINENO: checking for socket in -linet" >&5
15151 echo $ECHO_N "checking for socket in -linet... $ECHO_C" >&6
15152 if test "${ac_cv_lib_inet_socket+set}" = set; then
15153   echo $ECHO_N "(cached) $ECHO_C" >&6
15154 else
15155   ac_check_lib_save_LIBS=$LIBS
15156 LIBS="-linet  $LIBS"
15157 cat >conftest.$ac_ext <<_ACEOF
15158 /* confdefs.h.  */
15159 _ACEOF
15160 cat confdefs.h >>conftest.$ac_ext
15161 cat >>conftest.$ac_ext <<_ACEOF
15162 /* end confdefs.h.  */
15163
15164 /* Override any gcc2 internal prototype to avoid an error.  */
15165 #ifdef __cplusplus
15166 extern "C"
15167 #endif
15168 /* We use char because int might match the return type of a gcc2
15169    builtin and then its argument prototype would still apply.  */
15170 char socket ();
15171 int
15172 main ()
15173 {
15174 socket ();
15175   ;
15176   return 0;
15177 }
15178 _ACEOF
15179 rm -f conftest.$ac_objext conftest$ac_exeext
15180 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15181   (eval $ac_link) 2>conftest.er1
15182   ac_status=$?
15183   grep -v '^ *+' conftest.er1 >conftest.err
15184   rm -f conftest.er1
15185   cat conftest.err >&5
15186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15187   (exit $ac_status); } &&
15188          { ac_try='test -z "$ac_c_werror_flag"
15189                          || test ! -s conftest.err'
15190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15191   (eval $ac_try) 2>&5
15192   ac_status=$?
15193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15194   (exit $ac_status); }; } &&
15195          { ac_try='test -s conftest$ac_exeext'
15196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15197   (eval $ac_try) 2>&5
15198   ac_status=$?
15199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15200   (exit $ac_status); }; }; then
15201   ac_cv_lib_inet_socket=yes
15202 else
15203   echo "$as_me: failed program was:" >&5
15204 sed 's/^/| /' conftest.$ac_ext >&5
15205
15206 ac_cv_lib_inet_socket=no
15207 fi
15208 rm -f conftest.err conftest.$ac_objext \
15209       conftest$ac_exeext conftest.$ac_ext
15210 LIBS=$ac_check_lib_save_LIBS
15211 fi
15212 echo "$as_me:$LINENO: result: $ac_cv_lib_inet_socket" >&5
15213 echo "${ECHO_T}$ac_cv_lib_inet_socket" >&6
15214 if test $ac_cv_lib_inet_socket = yes; then
15215   cat >>confdefs.h <<_ACEOF
15216 #define HAVE_LIBINET 1
15217 _ACEOF
15218
15219   LIBS="-linet $LIBS"
15220
15221 fi
15222
15223
15224 echo "$as_me:$LINENO: checking for main in -lgen" >&5
15225 echo $ECHO_N "checking for main in -lgen... $ECHO_C" >&6
15226 if test "${ac_cv_lib_gen_main+set}" = set; then
15227   echo $ECHO_N "(cached) $ECHO_C" >&6
15228 else
15229   ac_check_lib_save_LIBS=$LIBS
15230 LIBS="-lgen  $LIBS"
15231 cat >conftest.$ac_ext <<_ACEOF
15232 /* confdefs.h.  */
15233 _ACEOF
15234 cat confdefs.h >>conftest.$ac_ext
15235 cat >>conftest.$ac_ext <<_ACEOF
15236 /* end confdefs.h.  */
15237
15238
15239 int
15240 main ()
15241 {
15242 main ();
15243   ;
15244   return 0;
15245 }
15246 _ACEOF
15247 rm -f conftest.$ac_objext conftest$ac_exeext
15248 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15249   (eval $ac_link) 2>conftest.er1
15250   ac_status=$?
15251   grep -v '^ *+' conftest.er1 >conftest.err
15252   rm -f conftest.er1
15253   cat conftest.err >&5
15254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15255   (exit $ac_status); } &&
15256          { ac_try='test -z "$ac_c_werror_flag"
15257                          || test ! -s conftest.err'
15258   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15259   (eval $ac_try) 2>&5
15260   ac_status=$?
15261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15262   (exit $ac_status); }; } &&
15263          { ac_try='test -s conftest$ac_exeext'
15264   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15265   (eval $ac_try) 2>&5
15266   ac_status=$?
15267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15268   (exit $ac_status); }; }; then
15269   ac_cv_lib_gen_main=yes
15270 else
15271   echo "$as_me: failed program was:" >&5
15272 sed 's/^/| /' conftest.$ac_ext >&5
15273
15274 ac_cv_lib_gen_main=no
15275 fi
15276 rm -f conftest.err conftest.$ac_objext \
15277       conftest$ac_exeext conftest.$ac_ext
15278 LIBS=$ac_check_lib_save_LIBS
15279 fi
15280 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_main" >&5
15281 echo "${ECHO_T}$ac_cv_lib_gen_main" >&6
15282 if test $ac_cv_lib_gen_main = yes; then
15283   cat >>confdefs.h <<_ACEOF
15284 #define HAVE_LIBGEN 1
15285 _ACEOF
15286
15287   LIBS="-lgen $LIBS"
15288
15289 fi
15290
15291
15292 fi
15293
15294
15295 echo "$as_me:$LINENO: checking for select" >&5
15296 echo $ECHO_N "checking for select... $ECHO_C" >&6
15297 if test "${ac_cv_func_select+set}" = set; then
15298   echo $ECHO_N "(cached) $ECHO_C" >&6
15299 else
15300   cat >conftest.$ac_ext <<_ACEOF
15301 /* confdefs.h.  */
15302 _ACEOF
15303 cat confdefs.h >>conftest.$ac_ext
15304 cat >>conftest.$ac_ext <<_ACEOF
15305 /* end confdefs.h.  */
15306 /* Define select to an innocuous variant, in case <limits.h> declares select.
15307    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15308 #define select innocuous_select
15309
15310 /* System header to define __stub macros and hopefully few prototypes,
15311     which can conflict with char select (); below.
15312     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15313     <limits.h> exists even on freestanding compilers.  */
15314
15315 #ifdef __STDC__
15316 # include <limits.h>
15317 #else
15318 # include <assert.h>
15319 #endif
15320
15321 #undef select
15322
15323 /* Override any gcc2 internal prototype to avoid an error.  */
15324 #ifdef __cplusplus
15325 extern "C"
15326 {
15327 #endif
15328 /* We use char because int might match the return type of a gcc2
15329    builtin and then its argument prototype would still apply.  */
15330 char select ();
15331 /* The GNU C library defines this for functions which it implements
15332     to always fail with ENOSYS.  Some functions are actually named
15333     something starting with __ and the normal name is an alias.  */
15334 #if defined (__stub_select) || defined (__stub___select)
15335 choke me
15336 #else
15337 char (*f) () = select;
15338 #endif
15339 #ifdef __cplusplus
15340 }
15341 #endif
15342
15343 int
15344 main ()
15345 {
15346 return f != select;
15347   ;
15348   return 0;
15349 }
15350 _ACEOF
15351 rm -f conftest.$ac_objext conftest$ac_exeext
15352 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15353   (eval $ac_link) 2>conftest.er1
15354   ac_status=$?
15355   grep -v '^ *+' conftest.er1 >conftest.err
15356   rm -f conftest.er1
15357   cat conftest.err >&5
15358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15359   (exit $ac_status); } &&
15360          { ac_try='test -z "$ac_c_werror_flag"
15361                          || test ! -s conftest.err'
15362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15363   (eval $ac_try) 2>&5
15364   ac_status=$?
15365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15366   (exit $ac_status); }; } &&
15367          { ac_try='test -s conftest$ac_exeext'
15368   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15369   (eval $ac_try) 2>&5
15370   ac_status=$?
15371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15372   (exit $ac_status); }; }; then
15373   ac_cv_func_select=yes
15374 else
15375   echo "$as_me: failed program was:" >&5
15376 sed 's/^/| /' conftest.$ac_ext >&5
15377
15378 ac_cv_func_select=no
15379 fi
15380 rm -f conftest.err conftest.$ac_objext \
15381       conftest$ac_exeext conftest.$ac_ext
15382 fi
15383 echo "$as_me:$LINENO: result: $ac_cv_func_select" >&5
15384 echo "${ECHO_T}$ac_cv_func_select" >&6
15385 if test $ac_cv_func_select = yes; then
15386   :
15387 else
15388   { { echo "$as_me:$LINENO: error: select() required." >&5
15389 echo "$as_me: error: select() required." >&2;}
15390    { (exit 1); exit 1; }; }
15391 fi
15392
15393
15394 if test "${ac_cv_header_winsock_h}" != yes; then
15395
15396
15397 for ac_header in sys/select.h sys/socket.h
15398 do
15399 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15400 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15401   echo "$as_me:$LINENO: checking for $ac_header" >&5
15402 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15403 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15404   echo $ECHO_N "(cached) $ECHO_C" >&6
15405 fi
15406 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15407 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15408 else
15409   # Is the header compilable?
15410 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15411 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15412 cat >conftest.$ac_ext <<_ACEOF
15413 /* confdefs.h.  */
15414 _ACEOF
15415 cat confdefs.h >>conftest.$ac_ext
15416 cat >>conftest.$ac_ext <<_ACEOF
15417 /* end confdefs.h.  */
15418 $ac_includes_default
15419 #include <$ac_header>
15420 _ACEOF
15421 rm -f conftest.$ac_objext
15422 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15423   (eval $ac_compile) 2>conftest.er1
15424   ac_status=$?
15425   grep -v '^ *+' conftest.er1 >conftest.err
15426   rm -f conftest.er1
15427   cat conftest.err >&5
15428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15429   (exit $ac_status); } &&
15430          { ac_try='test -z "$ac_c_werror_flag"
15431                          || test ! -s conftest.err'
15432   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15433   (eval $ac_try) 2>&5
15434   ac_status=$?
15435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15436   (exit $ac_status); }; } &&
15437          { ac_try='test -s conftest.$ac_objext'
15438   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15439   (eval $ac_try) 2>&5
15440   ac_status=$?
15441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15442   (exit $ac_status); }; }; then
15443   ac_header_compiler=yes
15444 else
15445   echo "$as_me: failed program was:" >&5
15446 sed 's/^/| /' conftest.$ac_ext >&5
15447
15448 ac_header_compiler=no
15449 fi
15450 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15451 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15452 echo "${ECHO_T}$ac_header_compiler" >&6
15453
15454 # Is the header present?
15455 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15456 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15457 cat >conftest.$ac_ext <<_ACEOF
15458 /* confdefs.h.  */
15459 _ACEOF
15460 cat confdefs.h >>conftest.$ac_ext
15461 cat >>conftest.$ac_ext <<_ACEOF
15462 /* end confdefs.h.  */
15463 #include <$ac_header>
15464 _ACEOF
15465 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15466   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15467   ac_status=$?
15468   grep -v '^ *+' conftest.er1 >conftest.err
15469   rm -f conftest.er1
15470   cat conftest.err >&5
15471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15472   (exit $ac_status); } >/dev/null; then
15473   if test -s conftest.err; then
15474     ac_cpp_err=$ac_c_preproc_warn_flag
15475     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15476   else
15477     ac_cpp_err=
15478   fi
15479 else
15480   ac_cpp_err=yes
15481 fi
15482 if test -z "$ac_cpp_err"; then
15483   ac_header_preproc=yes
15484 else
15485   echo "$as_me: failed program was:" >&5
15486 sed 's/^/| /' conftest.$ac_ext >&5
15487
15488   ac_header_preproc=no
15489 fi
15490 rm -f conftest.err conftest.$ac_ext
15491 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15492 echo "${ECHO_T}$ac_header_preproc" >&6
15493
15494 # So?  What about this header?
15495 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15496   yes:no: )
15497     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15498 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15499     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15500 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15501     ac_header_preproc=yes
15502     ;;
15503   no:yes:* )
15504     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15505 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15506     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15507 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15508     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15509 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15510     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15511 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15512     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15513 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15514     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15515 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15516     (
15517       cat <<\_ASBOX
15518 ## --------------------------------------------- ##
15519 ## Report this to <http://www.openldap.org/its/> ##
15520 ## --------------------------------------------- ##
15521 _ASBOX
15522     ) |
15523       sed "s/^/$as_me: WARNING:     /" >&2
15524     ;;
15525 esac
15526 echo "$as_me:$LINENO: checking for $ac_header" >&5
15527 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15528 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15529   echo $ECHO_N "(cached) $ECHO_C" >&6
15530 else
15531   eval "$as_ac_Header=\$ac_header_preproc"
15532 fi
15533 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15534 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15535
15536 fi
15537 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15538   cat >>confdefs.h <<_ACEOF
15539 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15540 _ACEOF
15541
15542 fi
15543
15544 done
15545
15546 echo "$as_me:$LINENO: checking types of arguments for select" >&5
15547 echo $ECHO_N "checking types of arguments for select... $ECHO_C" >&6
15548 if test "${ac_cv_func_select_args+set}" = set; then
15549   echo $ECHO_N "(cached) $ECHO_C" >&6
15550 else
15551   for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
15552  for ac_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
15553   for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
15554    cat >conftest.$ac_ext <<_ACEOF
15555 /* confdefs.h.  */
15556 _ACEOF
15557 cat confdefs.h >>conftest.$ac_ext
15558 cat >>conftest.$ac_ext <<_ACEOF
15559 /* end confdefs.h.  */
15560 $ac_includes_default
15561 #if HAVE_SYS_SELECT_H
15562 # include <sys/select.h>
15563 #endif
15564 #if HAVE_SYS_SOCKET_H
15565 # include <sys/socket.h>
15566 #endif
15567
15568 int
15569 main ()
15570 {
15571 extern int select ($ac_arg1,
15572                                             $ac_arg234, $ac_arg234, $ac_arg234,
15573                                             $ac_arg5);
15574   ;
15575   return 0;
15576 }
15577 _ACEOF
15578 rm -f conftest.$ac_objext
15579 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15580   (eval $ac_compile) 2>conftest.er1
15581   ac_status=$?
15582   grep -v '^ *+' conftest.er1 >conftest.err
15583   rm -f conftest.er1
15584   cat conftest.err >&5
15585   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15586   (exit $ac_status); } &&
15587          { ac_try='test -z "$ac_c_werror_flag"
15588                          || test ! -s conftest.err'
15589   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15590   (eval $ac_try) 2>&5
15591   ac_status=$?
15592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15593   (exit $ac_status); }; } &&
15594          { ac_try='test -s conftest.$ac_objext'
15595   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15596   (eval $ac_try) 2>&5
15597   ac_status=$?
15598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15599   (exit $ac_status); }; }; then
15600   ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
15601 else
15602   echo "$as_me: failed program was:" >&5
15603 sed 's/^/| /' conftest.$ac_ext >&5
15604
15605 fi
15606 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15607   done
15608  done
15609 done
15610 # Provide a safe default value.
15611 : ${ac_cv_func_select_args='int,int *,struct timeval *'}
15612
15613 fi
15614 echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5
15615 echo "${ECHO_T}$ac_cv_func_select_args" >&6
15616 ac_save_IFS=$IFS; IFS=','
15617 set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
15618 IFS=$ac_save_IFS
15619 shift
15620
15621 cat >>confdefs.h <<_ACEOF
15622 #define SELECT_TYPE_ARG1 $1
15623 _ACEOF
15624
15625
15626 cat >>confdefs.h <<_ACEOF
15627 #define SELECT_TYPE_ARG234 ($2)
15628 _ACEOF
15629
15630
15631 cat >>confdefs.h <<_ACEOF
15632 #define SELECT_TYPE_ARG5 ($3)
15633 _ACEOF
15634
15635 rm -f conftest*
15636
15637 fi
15638
15639
15640
15641 for ac_func in poll
15642 do
15643 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15644 echo "$as_me:$LINENO: checking for $ac_func" >&5
15645 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15646 if eval "test \"\${$as_ac_var+set}\" = set"; then
15647   echo $ECHO_N "(cached) $ECHO_C" >&6
15648 else
15649   cat >conftest.$ac_ext <<_ACEOF
15650 /* confdefs.h.  */
15651 _ACEOF
15652 cat confdefs.h >>conftest.$ac_ext
15653 cat >>conftest.$ac_ext <<_ACEOF
15654 /* end confdefs.h.  */
15655 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15656    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15657 #define $ac_func innocuous_$ac_func
15658
15659 /* System header to define __stub macros and hopefully few prototypes,
15660     which can conflict with char $ac_func (); below.
15661     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15662     <limits.h> exists even on freestanding compilers.  */
15663
15664 #ifdef __STDC__
15665 # include <limits.h>
15666 #else
15667 # include <assert.h>
15668 #endif
15669
15670 #undef $ac_func
15671
15672 /* Override any gcc2 internal prototype to avoid an error.  */
15673 #ifdef __cplusplus
15674 extern "C"
15675 {
15676 #endif
15677 /* We use char because int might match the return type of a gcc2
15678    builtin and then its argument prototype would still apply.  */
15679 char $ac_func ();
15680 /* The GNU C library defines this for functions which it implements
15681     to always fail with ENOSYS.  Some functions are actually named
15682     something starting with __ and the normal name is an alias.  */
15683 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15684 choke me
15685 #else
15686 char (*f) () = $ac_func;
15687 #endif
15688 #ifdef __cplusplus
15689 }
15690 #endif
15691
15692 int
15693 main ()
15694 {
15695 return f != $ac_func;
15696   ;
15697   return 0;
15698 }
15699 _ACEOF
15700 rm -f conftest.$ac_objext conftest$ac_exeext
15701 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15702   (eval $ac_link) 2>conftest.er1
15703   ac_status=$?
15704   grep -v '^ *+' conftest.er1 >conftest.err
15705   rm -f conftest.er1
15706   cat conftest.err >&5
15707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15708   (exit $ac_status); } &&
15709          { ac_try='test -z "$ac_c_werror_flag"
15710                          || test ! -s conftest.err'
15711   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15712   (eval $ac_try) 2>&5
15713   ac_status=$?
15714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15715   (exit $ac_status); }; } &&
15716          { ac_try='test -s conftest$ac_exeext'
15717   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15718   (eval $ac_try) 2>&5
15719   ac_status=$?
15720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15721   (exit $ac_status); }; }; then
15722   eval "$as_ac_var=yes"
15723 else
15724   echo "$as_me: failed program was:" >&5
15725 sed 's/^/| /' conftest.$ac_ext >&5
15726
15727 eval "$as_ac_var=no"
15728 fi
15729 rm -f conftest.err conftest.$ac_objext \
15730       conftest$ac_exeext conftest.$ac_ext
15731 fi
15732 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15733 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15734 if test `eval echo '${'$as_ac_var'}'` = yes; then
15735   cat >>confdefs.h <<_ACEOF
15736 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15737 _ACEOF
15738
15739 fi
15740 done
15741
15742
15743 for ac_header in poll.h
15744 do
15745 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15746 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15747   echo "$as_me:$LINENO: checking for $ac_header" >&5
15748 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15749 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15750   echo $ECHO_N "(cached) $ECHO_C" >&6
15751 fi
15752 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15753 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15754 else
15755   # Is the header compilable?
15756 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15757 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15758 cat >conftest.$ac_ext <<_ACEOF
15759 /* confdefs.h.  */
15760 _ACEOF
15761 cat confdefs.h >>conftest.$ac_ext
15762 cat >>conftest.$ac_ext <<_ACEOF
15763 /* end confdefs.h.  */
15764 $ac_includes_default
15765 #include <$ac_header>
15766 _ACEOF
15767 rm -f conftest.$ac_objext
15768 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15769   (eval $ac_compile) 2>conftest.er1
15770   ac_status=$?
15771   grep -v '^ *+' conftest.er1 >conftest.err
15772   rm -f conftest.er1
15773   cat conftest.err >&5
15774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15775   (exit $ac_status); } &&
15776          { ac_try='test -z "$ac_c_werror_flag"
15777                          || test ! -s conftest.err'
15778   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15779   (eval $ac_try) 2>&5
15780   ac_status=$?
15781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15782   (exit $ac_status); }; } &&
15783          { ac_try='test -s conftest.$ac_objext'
15784   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15785   (eval $ac_try) 2>&5
15786   ac_status=$?
15787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15788   (exit $ac_status); }; }; then
15789   ac_header_compiler=yes
15790 else
15791   echo "$as_me: failed program was:" >&5
15792 sed 's/^/| /' conftest.$ac_ext >&5
15793
15794 ac_header_compiler=no
15795 fi
15796 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15797 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15798 echo "${ECHO_T}$ac_header_compiler" >&6
15799
15800 # Is the header present?
15801 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15802 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15803 cat >conftest.$ac_ext <<_ACEOF
15804 /* confdefs.h.  */
15805 _ACEOF
15806 cat confdefs.h >>conftest.$ac_ext
15807 cat >>conftest.$ac_ext <<_ACEOF
15808 /* end confdefs.h.  */
15809 #include <$ac_header>
15810 _ACEOF
15811 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15812   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15813   ac_status=$?
15814   grep -v '^ *+' conftest.er1 >conftest.err
15815   rm -f conftest.er1
15816   cat conftest.err >&5
15817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15818   (exit $ac_status); } >/dev/null; then
15819   if test -s conftest.err; then
15820     ac_cpp_err=$ac_c_preproc_warn_flag
15821     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15822   else
15823     ac_cpp_err=
15824   fi
15825 else
15826   ac_cpp_err=yes
15827 fi
15828 if test -z "$ac_cpp_err"; then
15829   ac_header_preproc=yes
15830 else
15831   echo "$as_me: failed program was:" >&5
15832 sed 's/^/| /' conftest.$ac_ext >&5
15833
15834   ac_header_preproc=no
15835 fi
15836 rm -f conftest.err conftest.$ac_ext
15837 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15838 echo "${ECHO_T}$ac_header_preproc" >&6
15839
15840 # So?  What about this header?
15841 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15842   yes:no: )
15843     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15844 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15845     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15846 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15847     ac_header_preproc=yes
15848     ;;
15849   no:yes:* )
15850     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15851 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15852     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15853 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15854     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15855 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15856     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15857 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15858     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15859 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15860     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15861 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15862     (
15863       cat <<\_ASBOX
15864 ## --------------------------------------------- ##
15865 ## Report this to <http://www.openldap.org/its/> ##
15866 ## --------------------------------------------- ##
15867 _ASBOX
15868     ) |
15869       sed "s/^/$as_me: WARNING:     /" >&2
15870     ;;
15871 esac
15872 echo "$as_me:$LINENO: checking for $ac_header" >&5
15873 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15874 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15875   echo $ECHO_N "(cached) $ECHO_C" >&6
15876 else
15877   eval "$as_ac_Header=\$ac_header_preproc"
15878 fi
15879 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15880 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15881
15882 fi
15883 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15884   cat >>confdefs.h <<_ACEOF
15885 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15886 _ACEOF
15887
15888 fi
15889
15890 done
15891
15892
15893
15894 for ac_header in sys/epoll.h
15895 do
15896 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15897 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15898   echo "$as_me:$LINENO: checking for $ac_header" >&5
15899 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15900 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15901   echo $ECHO_N "(cached) $ECHO_C" >&6
15902 fi
15903 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15904 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15905 else
15906   # Is the header compilable?
15907 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15908 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15909 cat >conftest.$ac_ext <<_ACEOF
15910 /* confdefs.h.  */
15911 _ACEOF
15912 cat confdefs.h >>conftest.$ac_ext
15913 cat >>conftest.$ac_ext <<_ACEOF
15914 /* end confdefs.h.  */
15915 $ac_includes_default
15916 #include <$ac_header>
15917 _ACEOF
15918 rm -f conftest.$ac_objext
15919 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15920   (eval $ac_compile) 2>conftest.er1
15921   ac_status=$?
15922   grep -v '^ *+' conftest.er1 >conftest.err
15923   rm -f conftest.er1
15924   cat conftest.err >&5
15925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15926   (exit $ac_status); } &&
15927          { ac_try='test -z "$ac_c_werror_flag"
15928                          || test ! -s conftest.err'
15929   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15930   (eval $ac_try) 2>&5
15931   ac_status=$?
15932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15933   (exit $ac_status); }; } &&
15934          { ac_try='test -s conftest.$ac_objext'
15935   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15936   (eval $ac_try) 2>&5
15937   ac_status=$?
15938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15939   (exit $ac_status); }; }; then
15940   ac_header_compiler=yes
15941 else
15942   echo "$as_me: failed program was:" >&5
15943 sed 's/^/| /' conftest.$ac_ext >&5
15944
15945 ac_header_compiler=no
15946 fi
15947 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15948 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15949 echo "${ECHO_T}$ac_header_compiler" >&6
15950
15951 # Is the header present?
15952 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15953 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15954 cat >conftest.$ac_ext <<_ACEOF
15955 /* confdefs.h.  */
15956 _ACEOF
15957 cat confdefs.h >>conftest.$ac_ext
15958 cat >>conftest.$ac_ext <<_ACEOF
15959 /* end confdefs.h.  */
15960 #include <$ac_header>
15961 _ACEOF
15962 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15963   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15964   ac_status=$?
15965   grep -v '^ *+' conftest.er1 >conftest.err
15966   rm -f conftest.er1
15967   cat conftest.err >&5
15968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15969   (exit $ac_status); } >/dev/null; then
15970   if test -s conftest.err; then
15971     ac_cpp_err=$ac_c_preproc_warn_flag
15972     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15973   else
15974     ac_cpp_err=
15975   fi
15976 else
15977   ac_cpp_err=yes
15978 fi
15979 if test -z "$ac_cpp_err"; then
15980   ac_header_preproc=yes
15981 else
15982   echo "$as_me: failed program was:" >&5
15983 sed 's/^/| /' conftest.$ac_ext >&5
15984
15985   ac_header_preproc=no
15986 fi
15987 rm -f conftest.err conftest.$ac_ext
15988 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15989 echo "${ECHO_T}$ac_header_preproc" >&6
15990
15991 # So?  What about this header?
15992 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15993   yes:no: )
15994     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15995 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15996     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15997 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15998     ac_header_preproc=yes
15999     ;;
16000   no:yes:* )
16001     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16002 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16003     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
16004 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
16005     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16006 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16007     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
16008 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
16009     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16010 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16011     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16012 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
16013     (
16014       cat <<\_ASBOX
16015 ## --------------------------------------------- ##
16016 ## Report this to <http://www.openldap.org/its/> ##
16017 ## --------------------------------------------- ##
16018 _ASBOX
16019     ) |
16020       sed "s/^/$as_me: WARNING:     /" >&2
16021     ;;
16022 esac
16023 echo "$as_me:$LINENO: checking for $ac_header" >&5
16024 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16025 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16026   echo $ECHO_N "(cached) $ECHO_C" >&6
16027 else
16028   eval "$as_ac_Header=\$ac_header_preproc"
16029 fi
16030 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16031 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16032
16033 fi
16034 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16035   cat >>confdefs.h <<_ACEOF
16036 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16037 _ACEOF
16038
16039 fi
16040
16041 done
16042
16043 if test "${ac_cv_header_sys_epoll_h}" = yes; then
16044 echo "$as_me:$LINENO: checking for epoll system call" >&5
16045 echo $ECHO_N "checking for epoll system call... $ECHO_C" >&6
16046 if test "$cross_compiling" = yes; then
16047   echo "$as_me:$LINENO: result: no" >&5
16048 echo "${ECHO_T}no" >&6
16049 else
16050   cat >conftest.$ac_ext <<_ACEOF
16051 /* confdefs.h.  */
16052 _ACEOF
16053 cat confdefs.h >>conftest.$ac_ext
16054 cat >>conftest.$ac_ext <<_ACEOF
16055 /* end confdefs.h.  */
16056 int main(int argc, char *argv)
16057 {
16058         int epfd = epoll_create(256);
16059         exit (epfd == -1 ? 1 : 0);
16060 }
16061 _ACEOF
16062 rm -f conftest$ac_exeext
16063 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16064   (eval $ac_link) 2>&5
16065   ac_status=$?
16066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16067   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16068   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16069   (eval $ac_try) 2>&5
16070   ac_status=$?
16071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16072   (exit $ac_status); }; }; then
16073   echo "$as_me:$LINENO: result: yes" >&5
16074 echo "${ECHO_T}yes" >&6
16075
16076 cat >>confdefs.h <<\_ACEOF
16077 #define HAVE_EPOLL 1
16078 _ACEOF
16079
16080 else
16081   echo "$as_me: program exited with status $ac_status" >&5
16082 echo "$as_me: failed program was:" >&5
16083 sed 's/^/| /' conftest.$ac_ext >&5
16084
16085 ( exit $ac_status )
16086 echo "$as_me:$LINENO: result: no" >&5
16087 echo "${ECHO_T}no" >&6
16088 fi
16089 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16090 fi
16091 fi
16092
16093 # strerror checks
16094 echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5
16095 echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6
16096 if test "${ol_cv_dcl_sys_errlist+set}" = set; then
16097   echo $ECHO_N "(cached) $ECHO_C" >&6
16098 else
16099
16100         cat >conftest.$ac_ext <<_ACEOF
16101 /* confdefs.h.  */
16102 _ACEOF
16103 cat confdefs.h >>conftest.$ac_ext
16104 cat >>conftest.$ac_ext <<_ACEOF
16105 /* end confdefs.h.  */
16106
16107 #include <stdio.h>
16108 #include <sys/types.h>
16109 #include <errno.h>
16110 #ifdef WINNT
16111 #include <stdlib.h>
16112 #endif
16113 int
16114 main ()
16115 {
16116 char *c = (char *) *sys_errlist
16117   ;
16118   return 0;
16119 }
16120 _ACEOF
16121 rm -f conftest.$ac_objext
16122 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16123   (eval $ac_compile) 2>conftest.er1
16124   ac_status=$?
16125   grep -v '^ *+' conftest.er1 >conftest.err
16126   rm -f conftest.er1
16127   cat conftest.err >&5
16128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16129   (exit $ac_status); } &&
16130          { ac_try='test -z "$ac_c_werror_flag"
16131                          || test ! -s conftest.err'
16132   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16133   (eval $ac_try) 2>&5
16134   ac_status=$?
16135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16136   (exit $ac_status); }; } &&
16137          { ac_try='test -s conftest.$ac_objext'
16138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16139   (eval $ac_try) 2>&5
16140   ac_status=$?
16141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16142   (exit $ac_status); }; }; then
16143   ol_cv_dcl_sys_errlist=yes
16144         ol_cv_have_sys_errlist=yes
16145 else
16146   echo "$as_me: failed program was:" >&5
16147 sed 's/^/| /' conftest.$ac_ext >&5
16148
16149 ol_cv_dcl_sys_errlist=no
16150 fi
16151 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16152 fi
16153 echo "$as_me:$LINENO: result: $ol_cv_dcl_sys_errlist" >&5
16154 echo "${ECHO_T}$ol_cv_dcl_sys_errlist" >&6
16155 #
16156 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16157 if test $ol_cv_dcl_sys_errlist = no ; then
16158
16159 cat >>confdefs.h <<\_ACEOF
16160 #define DECL_SYS_ERRLIST 1
16161 _ACEOF
16162
16163
16164         echo "$as_me:$LINENO: checking existence of sys_errlist" >&5
16165 echo $ECHO_N "checking existence of sys_errlist... $ECHO_C" >&6
16166 if test "${ol_cv_have_sys_errlist+set}" = set; then
16167   echo $ECHO_N "(cached) $ECHO_C" >&6
16168 else
16169
16170                 cat >conftest.$ac_ext <<_ACEOF
16171 /* confdefs.h.  */
16172 _ACEOF
16173 cat confdefs.h >>conftest.$ac_ext
16174 cat >>conftest.$ac_ext <<_ACEOF
16175 /* end confdefs.h.  */
16176 #include <errno.h>
16177 int
16178 main ()
16179 {
16180 char *c = (char *) *sys_errlist
16181   ;
16182   return 0;
16183 }
16184 _ACEOF
16185 rm -f conftest.$ac_objext conftest$ac_exeext
16186 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16187   (eval $ac_link) 2>conftest.er1
16188   ac_status=$?
16189   grep -v '^ *+' conftest.er1 >conftest.err
16190   rm -f conftest.er1
16191   cat conftest.err >&5
16192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16193   (exit $ac_status); } &&
16194          { ac_try='test -z "$ac_c_werror_flag"
16195                          || test ! -s conftest.err'
16196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16197   (eval $ac_try) 2>&5
16198   ac_status=$?
16199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16200   (exit $ac_status); }; } &&
16201          { ac_try='test -s conftest$ac_exeext'
16202   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16203   (eval $ac_try) 2>&5
16204   ac_status=$?
16205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16206   (exit $ac_status); }; }; then
16207   ol_cv_have_sys_errlist=yes
16208 else
16209   echo "$as_me: failed program was:" >&5
16210 sed 's/^/| /' conftest.$ac_ext >&5
16211
16212 ol_cv_have_sys_errlist=no
16213 fi
16214 rm -f conftest.err conftest.$ac_objext \
16215       conftest$ac_exeext conftest.$ac_ext
16216 fi
16217 echo "$as_me:$LINENO: result: $ol_cv_have_sys_errlist" >&5
16218 echo "${ECHO_T}$ol_cv_have_sys_errlist" >&6
16219 fi
16220 if test $ol_cv_have_sys_errlist = yes ; then
16221
16222 cat >>confdefs.h <<\_ACEOF
16223 #define HAVE_SYS_ERRLIST 1
16224 _ACEOF
16225
16226 fi
16227
16228
16229 for ac_func in strerror strerror_r
16230 do
16231 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16232 echo "$as_me:$LINENO: checking for $ac_func" >&5
16233 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16234 if eval "test \"\${$as_ac_var+set}\" = set"; then
16235   echo $ECHO_N "(cached) $ECHO_C" >&6
16236 else
16237   cat >conftest.$ac_ext <<_ACEOF
16238 /* confdefs.h.  */
16239 _ACEOF
16240 cat confdefs.h >>conftest.$ac_ext
16241 cat >>conftest.$ac_ext <<_ACEOF
16242 /* end confdefs.h.  */
16243 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16244    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16245 #define $ac_func innocuous_$ac_func
16246
16247 /* System header to define __stub macros and hopefully few prototypes,
16248     which can conflict with char $ac_func (); below.
16249     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16250     <limits.h> exists even on freestanding compilers.  */
16251
16252 #ifdef __STDC__
16253 # include <limits.h>
16254 #else
16255 # include <assert.h>
16256 #endif
16257
16258 #undef $ac_func
16259
16260 /* Override any gcc2 internal prototype to avoid an error.  */
16261 #ifdef __cplusplus
16262 extern "C"
16263 {
16264 #endif
16265 /* We use char because int might match the return type of a gcc2
16266    builtin and then its argument prototype would still apply.  */
16267 char $ac_func ();
16268 /* The GNU C library defines this for functions which it implements
16269     to always fail with ENOSYS.  Some functions are actually named
16270     something starting with __ and the normal name is an alias.  */
16271 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16272 choke me
16273 #else
16274 char (*f) () = $ac_func;
16275 #endif
16276 #ifdef __cplusplus
16277 }
16278 #endif
16279
16280 int
16281 main ()
16282 {
16283 return f != $ac_func;
16284   ;
16285   return 0;
16286 }
16287 _ACEOF
16288 rm -f conftest.$ac_objext conftest$ac_exeext
16289 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16290   (eval $ac_link) 2>conftest.er1
16291   ac_status=$?
16292   grep -v '^ *+' conftest.er1 >conftest.err
16293   rm -f conftest.er1
16294   cat conftest.err >&5
16295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16296   (exit $ac_status); } &&
16297          { ac_try='test -z "$ac_c_werror_flag"
16298                          || test ! -s conftest.err'
16299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16300   (eval $ac_try) 2>&5
16301   ac_status=$?
16302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16303   (exit $ac_status); }; } &&
16304          { ac_try='test -s conftest$ac_exeext'
16305   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16306   (eval $ac_try) 2>&5
16307   ac_status=$?
16308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16309   (exit $ac_status); }; }; then
16310   eval "$as_ac_var=yes"
16311 else
16312   echo "$as_me: failed program was:" >&5
16313 sed 's/^/| /' conftest.$ac_ext >&5
16314
16315 eval "$as_ac_var=no"
16316 fi
16317 rm -f conftest.err conftest.$ac_objext \
16318       conftest$ac_exeext conftest.$ac_ext
16319 fi
16320 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16321 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16322 if test `eval echo '${'$as_ac_var'}'` = yes; then
16323   cat >>confdefs.h <<_ACEOF
16324 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16325 _ACEOF
16326
16327 fi
16328 done
16329
16330 ol_cv_func_strerror_r=no
16331 if test "${ac_cv_func_strerror_r}" = yes ; then
16332         echo "$as_me:$LINENO: checking non-posix strerror_r" >&5
16333 echo $ECHO_N "checking non-posix strerror_r... $ECHO_C" >&6
16334 if test "${ol_cv_nonposix_strerror_r+set}" = set; then
16335   echo $ECHO_N "(cached) $ECHO_C" >&6
16336 else
16337
16338         cat >conftest.$ac_ext <<_ACEOF
16339 /* confdefs.h.  */
16340 _ACEOF
16341 cat confdefs.h >>conftest.$ac_ext
16342 cat >>conftest.$ac_ext <<_ACEOF
16343 /* end confdefs.h.  */
16344 #include <string.h>
16345 _ACEOF
16346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16347   $EGREP "strerror_r" >/dev/null 2>&1; then
16348   ol_decl_strerror_r=yes
16349 else
16350   ol_decl_strerror_r=no
16351 fi
16352 rm -f conftest*
16353
16354         if test $ol_decl_strerror_r = yes ; then
16355                 cat >conftest.$ac_ext <<_ACEOF
16356 /* confdefs.h.  */
16357 _ACEOF
16358 cat confdefs.h >>conftest.$ac_ext
16359 cat >>conftest.$ac_ext <<_ACEOF
16360 /* end confdefs.h.  */
16361 #include <string.h>
16362 int
16363 main ()
16364 {
16365    /* from autoconf 2.59 */
16366                                 char buf[100];
16367                                 char x = *strerror_r (0, buf, sizeof buf);
16368                                 char *p = strerror_r (0, buf, sizeof buf);
16369
16370   ;
16371   return 0;
16372 }
16373 _ACEOF
16374 rm -f conftest.$ac_objext
16375 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16376   (eval $ac_compile) 2>conftest.er1
16377   ac_status=$?
16378   grep -v '^ *+' conftest.er1 >conftest.err
16379   rm -f conftest.er1
16380   cat conftest.err >&5
16381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16382   (exit $ac_status); } &&
16383          { ac_try='test -z "$ac_c_werror_flag"
16384                          || test ! -s conftest.err'
16385   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16386   (eval $ac_try) 2>&5
16387   ac_status=$?
16388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16389   (exit $ac_status); }; } &&
16390          { ac_try='test -s conftest.$ac_objext'
16391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16392   (eval $ac_try) 2>&5
16393   ac_status=$?
16394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16395   (exit $ac_status); }; }; then
16396   ol_cv_nonposix_strerror_r=yes
16397 else
16398   echo "$as_me: failed program was:" >&5
16399 sed 's/^/| /' conftest.$ac_ext >&5
16400
16401 ol_cv_nonposix_strerror_r=no
16402 fi
16403 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16404         else
16405                 if test "$cross_compiling" = yes; then
16406   ol_cv_nonposix_strerror=no
16407 else
16408   cat >conftest.$ac_ext <<_ACEOF
16409 /* confdefs.h.  */
16410 _ACEOF
16411 cat confdefs.h >>conftest.$ac_ext
16412 cat >>conftest.$ac_ext <<_ACEOF
16413 /* end confdefs.h.  */
16414
16415                         main() {
16416                                 char buf[100];
16417                                 buf[0] = 0;
16418                                 strerror_r( 1, buf, sizeof buf );
16419                                 exit( buf[0] == 0 );
16420                         }
16421
16422 _ACEOF
16423 rm -f conftest$ac_exeext
16424 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16425   (eval $ac_link) 2>&5
16426   ac_status=$?
16427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16428   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16429   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16430   (eval $ac_try) 2>&5
16431   ac_status=$?
16432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16433   (exit $ac_status); }; }; then
16434   ol_cv_nonposix_strerror_r=yes
16435 else
16436   echo "$as_me: program exited with status $ac_status" >&5
16437 echo "$as_me: failed program was:" >&5
16438 sed 's/^/| /' conftest.$ac_ext >&5
16439
16440 ( exit $ac_status )
16441 ol_cv_nonposix_strerror=no
16442 fi
16443 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16444 fi
16445         fi
16446
16447 fi
16448 echo "$as_me:$LINENO: result: $ol_cv_nonposix_strerror_r" >&5
16449 echo "${ECHO_T}$ol_cv_nonposix_strerror_r" >&6
16450 if test $ol_cv_nonposix_strerror_r = yes ; then
16451
16452 cat >>confdefs.h <<\_ACEOF
16453 #define HAVE_NONPOSIX_STRERROR_R 1
16454 _ACEOF
16455
16456 fi
16457
16458 elif test "${ac_cv_func_strerror}" = no ; then
16459         echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5
16460 echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6
16461 if test "${ol_cv_dcl_sys_errlist+set}" = set; then
16462   echo $ECHO_N "(cached) $ECHO_C" >&6
16463 else
16464
16465         cat >conftest.$ac_ext <<_ACEOF
16466 /* confdefs.h.  */
16467 _ACEOF
16468 cat confdefs.h >>conftest.$ac_ext
16469 cat >>conftest.$ac_ext <<_ACEOF
16470 /* end confdefs.h.  */
16471
16472 #include <stdio.h>
16473 #include <sys/types.h>
16474 #include <errno.h>
16475 #ifdef WINNT
16476 #include <stdlib.h>
16477 #endif
16478 int
16479 main ()
16480 {
16481 char *c = (char *) *sys_errlist
16482   ;
16483   return 0;
16484 }
16485 _ACEOF
16486 rm -f conftest.$ac_objext
16487 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16488   (eval $ac_compile) 2>conftest.er1
16489   ac_status=$?
16490   grep -v '^ *+' conftest.er1 >conftest.err
16491   rm -f conftest.er1
16492   cat conftest.err >&5
16493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16494   (exit $ac_status); } &&
16495          { ac_try='test -z "$ac_c_werror_flag"
16496                          || test ! -s conftest.err'
16497   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16498   (eval $ac_try) 2>&5
16499   ac_status=$?
16500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16501   (exit $ac_status); }; } &&
16502          { ac_try='test -s conftest.$ac_objext'
16503   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16504   (eval $ac_try) 2>&5
16505   ac_status=$?
16506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16507   (exit $ac_status); }; }; then
16508   ol_cv_dcl_sys_errlist=yes
16509         ol_cv_have_sys_errlist=yes
16510 else
16511   echo "$as_me: failed program was:" >&5
16512 sed 's/^/| /' conftest.$ac_ext >&5
16513
16514 ol_cv_dcl_sys_errlist=no
16515 fi
16516 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16517 fi
16518 echo "$as_me:$LINENO: result: $ol_cv_dcl_sys_errlist" >&5
16519 echo "${ECHO_T}$ol_cv_dcl_sys_errlist" >&6
16520 #
16521 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16522 if test $ol_cv_dcl_sys_errlist = no ; then
16523
16524 cat >>confdefs.h <<\_ACEOF
16525 #define DECL_SYS_ERRLIST 1
16526 _ACEOF
16527
16528
16529         echo "$as_me:$LINENO: checking existence of sys_errlist" >&5
16530 echo $ECHO_N "checking existence of sys_errlist... $ECHO_C" >&6
16531 if test "${ol_cv_have_sys_errlist+set}" = set; then
16532   echo $ECHO_N "(cached) $ECHO_C" >&6
16533 else
16534
16535                 cat >conftest.$ac_ext <<_ACEOF
16536 /* confdefs.h.  */
16537 _ACEOF
16538 cat confdefs.h >>conftest.$ac_ext
16539 cat >>conftest.$ac_ext <<_ACEOF
16540 /* end confdefs.h.  */
16541 #include <errno.h>
16542 int
16543 main ()
16544 {
16545 char *c = (char *) *sys_errlist
16546   ;
16547   return 0;
16548 }
16549 _ACEOF
16550 rm -f conftest.$ac_objext conftest$ac_exeext
16551 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16552   (eval $ac_link) 2>conftest.er1
16553   ac_status=$?
16554   grep -v '^ *+' conftest.er1 >conftest.err
16555   rm -f conftest.er1
16556   cat conftest.err >&5
16557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16558   (exit $ac_status); } &&
16559          { ac_try='test -z "$ac_c_werror_flag"
16560                          || test ! -s conftest.err'
16561   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16562   (eval $ac_try) 2>&5
16563   ac_status=$?
16564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16565   (exit $ac_status); }; } &&
16566          { ac_try='test -s conftest$ac_exeext'
16567   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16568   (eval $ac_try) 2>&5
16569   ac_status=$?
16570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16571   (exit $ac_status); }; }; then
16572   ol_cv_have_sys_errlist=yes
16573 else
16574   echo "$as_me: failed program was:" >&5
16575 sed 's/^/| /' conftest.$ac_ext >&5
16576
16577 ol_cv_have_sys_errlist=no
16578 fi
16579 rm -f conftest.err conftest.$ac_objext \
16580       conftest$ac_exeext conftest.$ac_ext
16581 fi
16582 echo "$as_me:$LINENO: result: $ol_cv_have_sys_errlist" >&5
16583 echo "${ECHO_T}$ol_cv_have_sys_errlist" >&6
16584 fi
16585 if test $ol_cv_have_sys_errlist = yes ; then
16586
16587 cat >>confdefs.h <<\_ACEOF
16588 #define HAVE_SYS_ERRLIST 1
16589 _ACEOF
16590
16591 fi
16592
16593 fi
16594
16595
16596
16597 for ac_header in regex.h
16598 do
16599 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16600 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16601   echo "$as_me:$LINENO: checking for $ac_header" >&5
16602 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16603 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16604   echo $ECHO_N "(cached) $ECHO_C" >&6
16605 fi
16606 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16607 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16608 else
16609   # Is the header compilable?
16610 echo "$as_me:$LINENO: checking $ac_header usability" >&5
16611 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16612 cat >conftest.$ac_ext <<_ACEOF
16613 /* confdefs.h.  */
16614 _ACEOF
16615 cat confdefs.h >>conftest.$ac_ext
16616 cat >>conftest.$ac_ext <<_ACEOF
16617 /* end confdefs.h.  */
16618 $ac_includes_default
16619 #include <$ac_header>
16620 _ACEOF
16621 rm -f conftest.$ac_objext
16622 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16623   (eval $ac_compile) 2>conftest.er1
16624   ac_status=$?
16625   grep -v '^ *+' conftest.er1 >conftest.err
16626   rm -f conftest.er1
16627   cat conftest.err >&5
16628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16629   (exit $ac_status); } &&
16630          { ac_try='test -z "$ac_c_werror_flag"
16631                          || test ! -s conftest.err'
16632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16633   (eval $ac_try) 2>&5
16634   ac_status=$?
16635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16636   (exit $ac_status); }; } &&
16637          { ac_try='test -s conftest.$ac_objext'
16638   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16639   (eval $ac_try) 2>&5
16640   ac_status=$?
16641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16642   (exit $ac_status); }; }; then
16643   ac_header_compiler=yes
16644 else
16645   echo "$as_me: failed program was:" >&5
16646 sed 's/^/| /' conftest.$ac_ext >&5
16647
16648 ac_header_compiler=no
16649 fi
16650 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16651 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16652 echo "${ECHO_T}$ac_header_compiler" >&6
16653
16654 # Is the header present?
16655 echo "$as_me:$LINENO: checking $ac_header presence" >&5
16656 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16657 cat >conftest.$ac_ext <<_ACEOF
16658 /* confdefs.h.  */
16659 _ACEOF
16660 cat confdefs.h >>conftest.$ac_ext
16661 cat >>conftest.$ac_ext <<_ACEOF
16662 /* end confdefs.h.  */
16663 #include <$ac_header>
16664 _ACEOF
16665 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16666   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16667   ac_status=$?
16668   grep -v '^ *+' conftest.er1 >conftest.err
16669   rm -f conftest.er1
16670   cat conftest.err >&5
16671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16672   (exit $ac_status); } >/dev/null; then
16673   if test -s conftest.err; then
16674     ac_cpp_err=$ac_c_preproc_warn_flag
16675     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16676   else
16677     ac_cpp_err=
16678   fi
16679 else
16680   ac_cpp_err=yes
16681 fi
16682 if test -z "$ac_cpp_err"; then
16683   ac_header_preproc=yes
16684 else
16685   echo "$as_me: failed program was:" >&5
16686 sed 's/^/| /' conftest.$ac_ext >&5
16687
16688   ac_header_preproc=no
16689 fi
16690 rm -f conftest.err conftest.$ac_ext
16691 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16692 echo "${ECHO_T}$ac_header_preproc" >&6
16693
16694 # So?  What about this header?
16695 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16696   yes:no: )
16697     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16698 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16699     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16700 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16701     ac_header_preproc=yes
16702     ;;
16703   no:yes:* )
16704     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16705 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16706     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
16707 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
16708     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16709 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16710     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
16711 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
16712     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16713 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16714     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16715 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
16716     (
16717       cat <<\_ASBOX
16718 ## --------------------------------------------- ##
16719 ## Report this to <http://www.openldap.org/its/> ##
16720 ## --------------------------------------------- ##
16721 _ASBOX
16722     ) |
16723       sed "s/^/$as_me: WARNING:     /" >&2
16724     ;;
16725 esac
16726 echo "$as_me:$LINENO: checking for $ac_header" >&5
16727 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16728 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16729   echo $ECHO_N "(cached) $ECHO_C" >&6
16730 else
16731   eval "$as_ac_Header=\$ac_header_preproc"
16732 fi
16733 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16734 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16735
16736 fi
16737 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16738   cat >>confdefs.h <<_ACEOF
16739 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16740 _ACEOF
16741
16742 fi
16743
16744 done
16745
16746 if test "$ac_cv_header_regex_h" != yes ; then
16747         { { echo "$as_me:$LINENO: error: POSIX regex.h required." >&5
16748 echo "$as_me: error: POSIX regex.h required." >&2;}
16749    { (exit 1); exit 1; }; }
16750 fi
16751 echo "$as_me:$LINENO: checking for library containing regfree" >&5
16752 echo $ECHO_N "checking for library containing regfree... $ECHO_C" >&6
16753 if test "${ac_cv_search_regfree+set}" = set; then
16754   echo $ECHO_N "(cached) $ECHO_C" >&6
16755 else
16756   ac_func_search_save_LIBS=$LIBS
16757 ac_cv_search_regfree=no
16758 cat >conftest.$ac_ext <<_ACEOF
16759 /* confdefs.h.  */
16760 _ACEOF
16761 cat confdefs.h >>conftest.$ac_ext
16762 cat >>conftest.$ac_ext <<_ACEOF
16763 /* end confdefs.h.  */
16764
16765 /* Override any gcc2 internal prototype to avoid an error.  */
16766 #ifdef __cplusplus
16767 extern "C"
16768 #endif
16769 /* We use char because int might match the return type of a gcc2
16770    builtin and then its argument prototype would still apply.  */
16771 char regfree ();
16772 int
16773 main ()
16774 {
16775 regfree ();
16776   ;
16777   return 0;
16778 }
16779 _ACEOF
16780 rm -f conftest.$ac_objext conftest$ac_exeext
16781 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16782   (eval $ac_link) 2>conftest.er1
16783   ac_status=$?
16784   grep -v '^ *+' conftest.er1 >conftest.err
16785   rm -f conftest.er1
16786   cat conftest.err >&5
16787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16788   (exit $ac_status); } &&
16789          { ac_try='test -z "$ac_c_werror_flag"
16790                          || test ! -s conftest.err'
16791   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16792   (eval $ac_try) 2>&5
16793   ac_status=$?
16794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16795   (exit $ac_status); }; } &&
16796          { ac_try='test -s conftest$ac_exeext'
16797   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16798   (eval $ac_try) 2>&5
16799   ac_status=$?
16800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16801   (exit $ac_status); }; }; then
16802   ac_cv_search_regfree="none required"
16803 else
16804   echo "$as_me: failed program was:" >&5
16805 sed 's/^/| /' conftest.$ac_ext >&5
16806
16807 fi
16808 rm -f conftest.err conftest.$ac_objext \
16809       conftest$ac_exeext conftest.$ac_ext
16810 if test "$ac_cv_search_regfree" = no; then
16811   for ac_lib in regex gnuregex; do
16812     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16813     cat >conftest.$ac_ext <<_ACEOF
16814 /* confdefs.h.  */
16815 _ACEOF
16816 cat confdefs.h >>conftest.$ac_ext
16817 cat >>conftest.$ac_ext <<_ACEOF
16818 /* end confdefs.h.  */
16819
16820 /* Override any gcc2 internal prototype to avoid an error.  */
16821 #ifdef __cplusplus
16822 extern "C"
16823 #endif
16824 /* We use char because int might match the return type of a gcc2
16825    builtin and then its argument prototype would still apply.  */
16826 char regfree ();
16827 int
16828 main ()
16829 {
16830 regfree ();
16831   ;
16832   return 0;
16833 }
16834 _ACEOF
16835 rm -f conftest.$ac_objext conftest$ac_exeext
16836 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16837   (eval $ac_link) 2>conftest.er1
16838   ac_status=$?
16839   grep -v '^ *+' conftest.er1 >conftest.err
16840   rm -f conftest.er1
16841   cat conftest.err >&5
16842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16843   (exit $ac_status); } &&
16844          { ac_try='test -z "$ac_c_werror_flag"
16845                          || test ! -s conftest.err'
16846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16847   (eval $ac_try) 2>&5
16848   ac_status=$?
16849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16850   (exit $ac_status); }; } &&
16851          { ac_try='test -s conftest$ac_exeext'
16852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16853   (eval $ac_try) 2>&5
16854   ac_status=$?
16855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16856   (exit $ac_status); }; }; then
16857   ac_cv_search_regfree="-l$ac_lib"
16858 break
16859 else
16860   echo "$as_me: failed program was:" >&5
16861 sed 's/^/| /' conftest.$ac_ext >&5
16862
16863 fi
16864 rm -f conftest.err conftest.$ac_objext \
16865       conftest$ac_exeext conftest.$ac_ext
16866   done
16867 fi
16868 LIBS=$ac_func_search_save_LIBS
16869 fi
16870 echo "$as_me:$LINENO: result: $ac_cv_search_regfree" >&5
16871 echo "${ECHO_T}$ac_cv_search_regfree" >&6
16872 if test "$ac_cv_search_regfree" != no; then
16873   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
16874   :
16875 else
16876   { { echo "$as_me:$LINENO: error: POSIX regex required." >&5
16877 echo "$as_me: error: POSIX regex required." >&2;}
16878    { (exit 1); exit 1; }; }
16879 fi
16880
16881
16882
16883 echo "$as_me:$LINENO: checking for compatible POSIX regex" >&5
16884 echo $ECHO_N "checking for compatible POSIX regex... $ECHO_C" >&6
16885 if test "${ol_cv_c_posix_regex+set}" = set; then
16886   echo $ECHO_N "(cached) $ECHO_C" >&6
16887 else
16888
16889         if test "$cross_compiling" = yes; then
16890   ol_cv_c_posix_regex=cross
16891 else
16892   cat >conftest.$ac_ext <<_ACEOF
16893 /* confdefs.h.  */
16894 _ACEOF
16895 cat confdefs.h >>conftest.$ac_ext
16896 cat >>conftest.$ac_ext <<_ACEOF
16897 /* end confdefs.h.  */
16898
16899 #include <sys/types.h>
16900 #include <regex.h>
16901 static char *pattern, *string;
16902 main()
16903 {
16904         int rc;
16905         regex_t re;
16906
16907         pattern = "^A";
16908
16909         if(regcomp(&re, pattern, 0)) {
16910                 return -1;
16911         }
16912
16913         string = "ALL MATCH";
16914
16915         rc = regexec(&re, string, 0, (void*)0, 0);
16916
16917         regfree(&re);
16918
16919         return rc;
16920 }
16921 _ACEOF
16922 rm -f conftest$ac_exeext
16923 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16924   (eval $ac_link) 2>&5
16925   ac_status=$?
16926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16927   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16929   (eval $ac_try) 2>&5
16930   ac_status=$?
16931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16932   (exit $ac_status); }; }; then
16933   ol_cv_c_posix_regex=yes
16934 else
16935   echo "$as_me: program exited with status $ac_status" >&5
16936 echo "$as_me: failed program was:" >&5
16937 sed 's/^/| /' conftest.$ac_ext >&5
16938
16939 ( exit $ac_status )
16940 ol_cv_c_posix_regex=no
16941 fi
16942 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16943 fi
16944 fi
16945 echo "$as_me:$LINENO: result: $ol_cv_c_posix_regex" >&5
16946 echo "${ECHO_T}$ol_cv_c_posix_regex" >&6
16947
16948 if test "$ol_cv_c_posix_regex" = no ; then
16949         { { echo "$as_me:$LINENO: error: broken POSIX regex!" >&5
16950 echo "$as_me: error: broken POSIX regex!" >&2;}
16951    { (exit 1); exit 1; }; }
16952 fi
16953
16954
16955 have_uuid=no
16956
16957 for ac_header in sys/uuid.h
16958 do
16959 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16960 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16961   echo "$as_me:$LINENO: checking for $ac_header" >&5
16962 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16963 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16964   echo $ECHO_N "(cached) $ECHO_C" >&6
16965 fi
16966 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16967 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16968 else
16969   # Is the header compilable?
16970 echo "$as_me:$LINENO: checking $ac_header usability" >&5
16971 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16972 cat >conftest.$ac_ext <<_ACEOF
16973 /* confdefs.h.  */
16974 _ACEOF
16975 cat confdefs.h >>conftest.$ac_ext
16976 cat >>conftest.$ac_ext <<_ACEOF
16977 /* end confdefs.h.  */
16978 $ac_includes_default
16979 #include <$ac_header>
16980 _ACEOF
16981 rm -f conftest.$ac_objext
16982 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16983   (eval $ac_compile) 2>conftest.er1
16984   ac_status=$?
16985   grep -v '^ *+' conftest.er1 >conftest.err
16986   rm -f conftest.er1
16987   cat conftest.err >&5
16988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16989   (exit $ac_status); } &&
16990          { ac_try='test -z "$ac_c_werror_flag"
16991                          || test ! -s conftest.err'
16992   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16993   (eval $ac_try) 2>&5
16994   ac_status=$?
16995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16996   (exit $ac_status); }; } &&
16997          { ac_try='test -s conftest.$ac_objext'
16998   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16999   (eval $ac_try) 2>&5
17000   ac_status=$?
17001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17002   (exit $ac_status); }; }; then
17003   ac_header_compiler=yes
17004 else
17005   echo "$as_me: failed program was:" >&5
17006 sed 's/^/| /' conftest.$ac_ext >&5
17007
17008 ac_header_compiler=no
17009 fi
17010 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17011 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17012 echo "${ECHO_T}$ac_header_compiler" >&6
17013
17014 # Is the header present?
17015 echo "$as_me:$LINENO: checking $ac_header presence" >&5
17016 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17017 cat >conftest.$ac_ext <<_ACEOF
17018 /* confdefs.h.  */
17019 _ACEOF
17020 cat confdefs.h >>conftest.$ac_ext
17021 cat >>conftest.$ac_ext <<_ACEOF
17022 /* end confdefs.h.  */
17023 #include <$ac_header>
17024 _ACEOF
17025 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17026   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17027   ac_status=$?
17028   grep -v '^ *+' conftest.er1 >conftest.err
17029   rm -f conftest.er1
17030   cat conftest.err >&5
17031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17032   (exit $ac_status); } >/dev/null; then
17033   if test -s conftest.err; then
17034     ac_cpp_err=$ac_c_preproc_warn_flag
17035     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17036   else
17037     ac_cpp_err=
17038   fi
17039 else
17040   ac_cpp_err=yes
17041 fi
17042 if test -z "$ac_cpp_err"; then
17043   ac_header_preproc=yes
17044 else
17045   echo "$as_me: failed program was:" >&5
17046 sed 's/^/| /' conftest.$ac_ext >&5
17047
17048   ac_header_preproc=no
17049 fi
17050 rm -f conftest.err conftest.$ac_ext
17051 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17052 echo "${ECHO_T}$ac_header_preproc" >&6
17053
17054 # So?  What about this header?
17055 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17056   yes:no: )
17057     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17058 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17059     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17060 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17061     ac_header_preproc=yes
17062     ;;
17063   no:yes:* )
17064     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17065 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17066     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17067 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17068     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17069 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17070     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17071 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17072     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17073 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17074     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17075 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17076     (
17077       cat <<\_ASBOX
17078 ## --------------------------------------------- ##
17079 ## Report this to <http://www.openldap.org/its/> ##
17080 ## --------------------------------------------- ##
17081 _ASBOX
17082     ) |
17083       sed "s/^/$as_me: WARNING:     /" >&2
17084     ;;
17085 esac
17086 echo "$as_me:$LINENO: checking for $ac_header" >&5
17087 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17088 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17089   echo $ECHO_N "(cached) $ECHO_C" >&6
17090 else
17091   eval "$as_ac_Header=\$ac_header_preproc"
17092 fi
17093 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17094 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17095
17096 fi
17097 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17098   cat >>confdefs.h <<_ACEOF
17099 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17100 _ACEOF
17101
17102 fi
17103
17104 done
17105
17106 if test $ac_cv_header_sys_uuid_h = yes ; then
17107         save_LIBS="$LIBS"
17108         echo "$as_me:$LINENO: checking for library containing uuid_to_str" >&5
17109 echo $ECHO_N "checking for library containing uuid_to_str... $ECHO_C" >&6
17110 if test "${ac_cv_search_uuid_to_str+set}" = set; then
17111   echo $ECHO_N "(cached) $ECHO_C" >&6
17112 else
17113   ac_func_search_save_LIBS=$LIBS
17114 ac_cv_search_uuid_to_str=no
17115 cat >conftest.$ac_ext <<_ACEOF
17116 /* confdefs.h.  */
17117 _ACEOF
17118 cat confdefs.h >>conftest.$ac_ext
17119 cat >>conftest.$ac_ext <<_ACEOF
17120 /* end confdefs.h.  */
17121
17122 /* Override any gcc2 internal prototype to avoid an error.  */
17123 #ifdef __cplusplus
17124 extern "C"
17125 #endif
17126 /* We use char because int might match the return type of a gcc2
17127    builtin and then its argument prototype would still apply.  */
17128 char uuid_to_str ();
17129 int
17130 main ()
17131 {
17132 uuid_to_str ();
17133   ;
17134   return 0;
17135 }
17136 _ACEOF
17137 rm -f conftest.$ac_objext conftest$ac_exeext
17138 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17139   (eval $ac_link) 2>conftest.er1
17140   ac_status=$?
17141   grep -v '^ *+' conftest.er1 >conftest.err
17142   rm -f conftest.er1
17143   cat conftest.err >&5
17144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17145   (exit $ac_status); } &&
17146          { ac_try='test -z "$ac_c_werror_flag"
17147                          || test ! -s conftest.err'
17148   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17149   (eval $ac_try) 2>&5
17150   ac_status=$?
17151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17152   (exit $ac_status); }; } &&
17153          { ac_try='test -s conftest$ac_exeext'
17154   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17155   (eval $ac_try) 2>&5
17156   ac_status=$?
17157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17158   (exit $ac_status); }; }; then
17159   ac_cv_search_uuid_to_str="none required"
17160 else
17161   echo "$as_me: failed program was:" >&5
17162 sed 's/^/| /' conftest.$ac_ext >&5
17163
17164 fi
17165 rm -f conftest.err conftest.$ac_objext \
17166       conftest$ac_exeext conftest.$ac_ext
17167 if test "$ac_cv_search_uuid_to_str" = no; then
17168   for ac_lib in uuid; do
17169     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17170     cat >conftest.$ac_ext <<_ACEOF
17171 /* confdefs.h.  */
17172 _ACEOF
17173 cat confdefs.h >>conftest.$ac_ext
17174 cat >>conftest.$ac_ext <<_ACEOF
17175 /* end confdefs.h.  */
17176
17177 /* Override any gcc2 internal prototype to avoid an error.  */
17178 #ifdef __cplusplus
17179 extern "C"
17180 #endif
17181 /* We use char because int might match the return type of a gcc2
17182    builtin and then its argument prototype would still apply.  */
17183 char uuid_to_str ();
17184 int
17185 main ()
17186 {
17187 uuid_to_str ();
17188   ;
17189   return 0;
17190 }
17191 _ACEOF
17192 rm -f conftest.$ac_objext conftest$ac_exeext
17193 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17194   (eval $ac_link) 2>conftest.er1
17195   ac_status=$?
17196   grep -v '^ *+' conftest.er1 >conftest.err
17197   rm -f conftest.er1
17198   cat conftest.err >&5
17199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17200   (exit $ac_status); } &&
17201          { ac_try='test -z "$ac_c_werror_flag"
17202                          || test ! -s conftest.err'
17203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17204   (eval $ac_try) 2>&5
17205   ac_status=$?
17206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17207   (exit $ac_status); }; } &&
17208          { ac_try='test -s conftest$ac_exeext'
17209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17210   (eval $ac_try) 2>&5
17211   ac_status=$?
17212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17213   (exit $ac_status); }; }; then
17214   ac_cv_search_uuid_to_str="-l$ac_lib"
17215 break
17216 else
17217   echo "$as_me: failed program was:" >&5
17218 sed 's/^/| /' conftest.$ac_ext >&5
17219
17220 fi
17221 rm -f conftest.err conftest.$ac_objext \
17222       conftest$ac_exeext conftest.$ac_ext
17223   done
17224 fi
17225 LIBS=$ac_func_search_save_LIBS
17226 fi
17227 echo "$as_me:$LINENO: result: $ac_cv_search_uuid_to_str" >&5
17228 echo "${ECHO_T}$ac_cv_search_uuid_to_str" >&6
17229 if test "$ac_cv_search_uuid_to_str" != no; then
17230   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
17231   have_uuid=yes
17232 else
17233   :
17234 fi
17235
17236         LIBS="$save_LIBS"
17237
17238         if test have_uuid = yes ; then
17239
17240 cat >>confdefs.h <<\_ACEOF
17241 #define HAVE_UUID_TO_STR 1
17242 _ACEOF
17243
17244
17245                 test "$ac_cv_search_uuid_to_str" = "none required" || \
17246                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
17247         fi
17248 fi
17249
17250 if test $have_uuid = no ; then
17251         echo "$as_me:$LINENO: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
17252 echo $ECHO_N "checking to see if -lrpcrt4 is needed for win32 UUID support... $ECHO_C" >&6
17253         save_LIBS="$LIBS"
17254         LIBS="$LIBS -lrpcrt4"
17255         cat >conftest.$ac_ext <<_ACEOF
17256 /* confdefs.h.  */
17257 _ACEOF
17258 cat confdefs.h >>conftest.$ac_ext
17259 cat >>conftest.$ac_ext <<_ACEOF
17260 /* end confdefs.h.  */
17261
17262                 int __stdcall UuidCreate(void *);
17263                 int __stdcall UuidToStringA(void *,void **);
17264
17265 int
17266 main ()
17267 {
17268
17269                 UuidCreate(0);
17270                 UuidToStringA(0,0);
17271
17272   ;
17273   return 0;
17274 }
17275 _ACEOF
17276 rm -f conftest.$ac_objext conftest$ac_exeext
17277 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17278   (eval $ac_link) 2>conftest.er1
17279   ac_status=$?
17280   grep -v '^ *+' conftest.er1 >conftest.err
17281   rm -f conftest.er1
17282   cat conftest.err >&5
17283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17284   (exit $ac_status); } &&
17285          { ac_try='test -z "$ac_c_werror_flag"
17286                          || test ! -s conftest.err'
17287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17288   (eval $ac_try) 2>&5
17289   ac_status=$?
17290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17291   (exit $ac_status); }; } &&
17292          { ac_try='test -s conftest$ac_exeext'
17293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17294   (eval $ac_try) 2>&5
17295   ac_status=$?
17296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17297   (exit $ac_status); }; }; then
17298   need_rpcrt=yes
17299 else
17300   echo "$as_me: failed program was:" >&5
17301 sed 's/^/| /' conftest.$ac_ext >&5
17302
17303 need_rpcrt=no
17304 fi
17305 rm -f conftest.err conftest.$ac_objext \
17306       conftest$ac_exeext conftest.$ac_ext
17307         if test $need_rpcrt = yes; then
17308                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
17309         fi
17310         LIBS="$save_LIBS"
17311         echo "$as_me:$LINENO: result: $need_rpcrt" >&5
17312 echo "${ECHO_T}$need_rpcrt" >&6
17313 fi
17314
17315 ol_cv_lib_resolver=no
17316 if test $ol_cv_lib_resolver = no ; then
17317         echo "$as_me:$LINENO: checking for resolver link (default)" >&5
17318 echo $ECHO_N "checking for resolver link (default)... $ECHO_C" >&6
17319 if test "${ol_cv_resolver_none+set}" = set; then
17320   echo $ECHO_N "(cached) $ECHO_C" >&6
17321 else
17322
17323         ol_RESOLVER_LIB=
17324         ol_LIBS=$LIBS
17325         LIBS="$ol_RESOLVER_LIB $LIBS"
17326
17327         cat >conftest.$ac_ext <<_ACEOF
17328 /* confdefs.h.  */
17329 _ACEOF
17330 cat confdefs.h >>conftest.$ac_ext
17331 cat >>conftest.$ac_ext <<_ACEOF
17332 /* end confdefs.h.  */
17333
17334 #ifdef HAVE_SYS_TYPES_H
17335 #       include <sys/types.h>
17336 #endif
17337 #include <netinet/in.h>
17338 #ifdef HAVE_ARPA_NAMESER_H
17339 #       include <arpa/nameser.h>
17340 #endif
17341 #ifdef HAVE_RESOLV_H
17342 #       include <resolv.h>
17343 #endif
17344
17345 int
17346 main ()
17347 {
17348 {
17349         int len, status;
17350         char *request = NULL;
17351         unsigned char reply[64*1024];
17352         unsigned char host[64*1024];
17353         unsigned char *p;
17354
17355 #ifdef NS_HFIXEDSZ
17356         /* Bind 8/9 interface */
17357         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17358 #else
17359         /* Bind 4 interface */
17360 # ifndef T_SRV
17361 #  define T_SRV 33
17362 # endif
17363         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17364 #endif
17365         p = reply;
17366 #ifdef NS_HFIXEDSZ
17367         /* Bind 8/9 interface */
17368         p += NS_HFIXEDSZ;
17369 #elif defined(HFIXEDSZ)
17370         /* Bind 4 interface w/ HFIXEDSZ */
17371         p += HFIXEDSZ;
17372 #else
17373         /* Bind 4 interface w/o HFIXEDSZ */
17374         p += sizeof(HEADER);
17375 #endif
17376         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17377 }
17378   ;
17379   return 0;
17380 }
17381 _ACEOF
17382 rm -f conftest.$ac_objext conftest$ac_exeext
17383 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17384   (eval $ac_link) 2>conftest.er1
17385   ac_status=$?
17386   grep -v '^ *+' conftest.er1 >conftest.err
17387   rm -f conftest.er1
17388   cat conftest.err >&5
17389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17390   (exit $ac_status); } &&
17391          { ac_try='test -z "$ac_c_werror_flag"
17392                          || test ! -s conftest.err'
17393   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17394   (eval $ac_try) 2>&5
17395   ac_status=$?
17396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17397   (exit $ac_status); }; } &&
17398          { ac_try='test -s conftest$ac_exeext'
17399   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17400   (eval $ac_try) 2>&5
17401   ac_status=$?
17402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17403   (exit $ac_status); }; }; then
17404   ol_cv_resolver_none=yes
17405 else
17406   echo "$as_me: failed program was:" >&5
17407 sed 's/^/| /' conftest.$ac_ext >&5
17408
17409 ol_cv_resolver_none=no
17410 fi
17411 rm -f conftest.err conftest.$ac_objext \
17412       conftest$ac_exeext conftest.$ac_ext
17413
17414         LIBS="$ol_LIBS"
17415
17416 fi
17417 echo "$as_me:$LINENO: result: $ol_cv_resolver_none" >&5
17418 echo "${ECHO_T}$ol_cv_resolver_none" >&6
17419
17420         if test $ol_cv_resolver_none = yes ; then
17421                 ol_cv_lib_resolver=yes
17422         fi
17423 fi
17424
17425 if test $ol_cv_lib_resolver = no ; then
17426         echo "$as_me:$LINENO: checking for resolver link (-lresolv)" >&5
17427 echo $ECHO_N "checking for resolver link (-lresolv)... $ECHO_C" >&6
17428 if test "${ol_cv_resolver_resolv+set}" = set; then
17429   echo $ECHO_N "(cached) $ECHO_C" >&6
17430 else
17431
17432         ol_RESOLVER_LIB=-lresolv
17433         ol_LIBS=$LIBS
17434         LIBS="$ol_RESOLVER_LIB $LIBS"
17435
17436         cat >conftest.$ac_ext <<_ACEOF
17437 /* confdefs.h.  */
17438 _ACEOF
17439 cat confdefs.h >>conftest.$ac_ext
17440 cat >>conftest.$ac_ext <<_ACEOF
17441 /* end confdefs.h.  */
17442
17443 #ifdef HAVE_SYS_TYPES_H
17444 #       include <sys/types.h>
17445 #endif
17446 #include <netinet/in.h>
17447 #ifdef HAVE_ARPA_NAMESER_H
17448 #       include <arpa/nameser.h>
17449 #endif
17450 #ifdef HAVE_RESOLV_H
17451 #       include <resolv.h>
17452 #endif
17453
17454 int
17455 main ()
17456 {
17457 {
17458         int len, status;
17459         char *request = NULL;
17460         unsigned char reply[64*1024];
17461         unsigned char host[64*1024];
17462         unsigned char *p;
17463
17464 #ifdef NS_HFIXEDSZ
17465         /* Bind 8/9 interface */
17466         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17467 #else
17468         /* Bind 4 interface */
17469 # ifndef T_SRV
17470 #  define T_SRV 33
17471 # endif
17472         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17473 #endif
17474         p = reply;
17475 #ifdef NS_HFIXEDSZ
17476         /* Bind 8/9 interface */
17477         p += NS_HFIXEDSZ;
17478 #elif defined(HFIXEDSZ)
17479         /* Bind 4 interface w/ HFIXEDSZ */
17480         p += HFIXEDSZ;
17481 #else
17482         /* Bind 4 interface w/o HFIXEDSZ */
17483         p += sizeof(HEADER);
17484 #endif
17485         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17486 }
17487   ;
17488   return 0;
17489 }
17490 _ACEOF
17491 rm -f conftest.$ac_objext conftest$ac_exeext
17492 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17493   (eval $ac_link) 2>conftest.er1
17494   ac_status=$?
17495   grep -v '^ *+' conftest.er1 >conftest.err
17496   rm -f conftest.er1
17497   cat conftest.err >&5
17498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17499   (exit $ac_status); } &&
17500          { ac_try='test -z "$ac_c_werror_flag"
17501                          || test ! -s conftest.err'
17502   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17503   (eval $ac_try) 2>&5
17504   ac_status=$?
17505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17506   (exit $ac_status); }; } &&
17507          { ac_try='test -s conftest$ac_exeext'
17508   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17509   (eval $ac_try) 2>&5
17510   ac_status=$?
17511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17512   (exit $ac_status); }; }; then
17513   ol_cv_resolver_resolv=yes
17514 else
17515   echo "$as_me: failed program was:" >&5
17516 sed 's/^/| /' conftest.$ac_ext >&5
17517
17518 ol_cv_resolver_resolv=no
17519 fi
17520 rm -f conftest.err conftest.$ac_objext \
17521       conftest$ac_exeext conftest.$ac_ext
17522
17523         LIBS="$ol_LIBS"
17524
17525 fi
17526 echo "$as_me:$LINENO: result: $ol_cv_resolver_resolv" >&5
17527 echo "${ECHO_T}$ol_cv_resolver_resolv" >&6
17528
17529         if test $ol_cv_resolver_resolv = yes ; then
17530                 ol_cv_lib_resolver=-lresolv
17531         fi
17532 fi
17533
17534 if test $ol_cv_lib_resolver = no ; then
17535         echo "$as_me:$LINENO: checking for resolver link (-lbind)" >&5
17536 echo $ECHO_N "checking for resolver link (-lbind)... $ECHO_C" >&6
17537 if test "${ol_cv_resolver_bind+set}" = set; then
17538   echo $ECHO_N "(cached) $ECHO_C" >&6
17539 else
17540
17541         ol_RESOLVER_LIB=-lbind
17542         ol_LIBS=$LIBS
17543         LIBS="$ol_RESOLVER_LIB $LIBS"
17544
17545         cat >conftest.$ac_ext <<_ACEOF
17546 /* confdefs.h.  */
17547 _ACEOF
17548 cat confdefs.h >>conftest.$ac_ext
17549 cat >>conftest.$ac_ext <<_ACEOF
17550 /* end confdefs.h.  */
17551
17552 #ifdef HAVE_SYS_TYPES_H
17553 #       include <sys/types.h>
17554 #endif
17555 #include <netinet/in.h>
17556 #ifdef HAVE_ARPA_NAMESER_H
17557 #       include <arpa/nameser.h>
17558 #endif
17559 #ifdef HAVE_RESOLV_H
17560 #       include <resolv.h>
17561 #endif
17562
17563 int
17564 main ()
17565 {
17566 {
17567         int len, status;
17568         char *request = NULL;
17569         unsigned char reply[64*1024];
17570         unsigned char host[64*1024];
17571         unsigned char *p;
17572
17573 #ifdef NS_HFIXEDSZ
17574         /* Bind 8/9 interface */
17575         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17576 #else
17577         /* Bind 4 interface */
17578 # ifndef T_SRV
17579 #  define T_SRV 33
17580 # endif
17581         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17582 #endif
17583         p = reply;
17584 #ifdef NS_HFIXEDSZ
17585         /* Bind 8/9 interface */
17586         p += NS_HFIXEDSZ;
17587 #elif defined(HFIXEDSZ)
17588         /* Bind 4 interface w/ HFIXEDSZ */
17589         p += HFIXEDSZ;
17590 #else
17591         /* Bind 4 interface w/o HFIXEDSZ */
17592         p += sizeof(HEADER);
17593 #endif
17594         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17595 }
17596   ;
17597   return 0;
17598 }
17599 _ACEOF
17600 rm -f conftest.$ac_objext conftest$ac_exeext
17601 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17602   (eval $ac_link) 2>conftest.er1
17603   ac_status=$?
17604   grep -v '^ *+' conftest.er1 >conftest.err
17605   rm -f conftest.er1
17606   cat conftest.err >&5
17607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17608   (exit $ac_status); } &&
17609          { ac_try='test -z "$ac_c_werror_flag"
17610                          || test ! -s conftest.err'
17611   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17612   (eval $ac_try) 2>&5
17613   ac_status=$?
17614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17615   (exit $ac_status); }; } &&
17616          { ac_try='test -s conftest$ac_exeext'
17617   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17618   (eval $ac_try) 2>&5
17619   ac_status=$?
17620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17621   (exit $ac_status); }; }; then
17622   ol_cv_resolver_bind=yes
17623 else
17624   echo "$as_me: failed program was:" >&5
17625 sed 's/^/| /' conftest.$ac_ext >&5
17626
17627 ol_cv_resolver_bind=no
17628 fi
17629 rm -f conftest.err conftest.$ac_objext \
17630       conftest$ac_exeext conftest.$ac_ext
17631
17632         LIBS="$ol_LIBS"
17633
17634 fi
17635 echo "$as_me:$LINENO: result: $ol_cv_resolver_bind" >&5
17636 echo "${ECHO_T}$ol_cv_resolver_bind" >&6
17637
17638         if test $ol_cv_resolver_bind = yes ; then
17639                 ol_cv_lib_resolver=-lbind
17640         fi
17641 fi
17642
17643
17644
17645 ol_link_dnssrv=no
17646 if test "$ol_cv_lib_resolver" != no ; then
17647
17648 cat >>confdefs.h <<\_ACEOF
17649 #define HAVE_RES_QUERY 1
17650 _ACEOF
17651
17652
17653         if test "$ol_enable_dnssrv" != no ; then
17654                 ol_link_dnssrv=yes
17655         fi
17656
17657         if test "$ol_cv_lib_resolver" != yes ; then
17658                 LIBS="$ol_cv_lib_resolver $LIBS"
17659         fi
17660 fi
17661
17662 if test "$ol_enable_dnssrv" = yes || test "$ol_enable_dnssrv" = mod ; then
17663         if test "$ol_link_dnssrv" = no ; then
17664                 { { echo "$as_me:$LINENO: error: DNSSRV requires res_query()" >&5
17665 echo "$as_me: error: DNSSRV requires res_query()" >&2;}
17666    { (exit 1); exit 1; }; }
17667         fi
17668 else
17669         ol_enable_dnssrv=no
17670 fi
17671
17672
17673 for ac_func in hstrerror
17674 do
17675 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17676 echo "$as_me:$LINENO: checking for $ac_func" >&5
17677 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17678 if eval "test \"\${$as_ac_var+set}\" = set"; then
17679   echo $ECHO_N "(cached) $ECHO_C" >&6
17680 else
17681   cat >conftest.$ac_ext <<_ACEOF
17682 /* confdefs.h.  */
17683 _ACEOF
17684 cat confdefs.h >>conftest.$ac_ext
17685 cat >>conftest.$ac_ext <<_ACEOF
17686 /* end confdefs.h.  */
17687 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17688    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17689 #define $ac_func innocuous_$ac_func
17690
17691 /* System header to define __stub macros and hopefully few prototypes,
17692     which can conflict with char $ac_func (); below.
17693     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17694     <limits.h> exists even on freestanding compilers.  */
17695
17696 #ifdef __STDC__
17697 # include <limits.h>
17698 #else
17699 # include <assert.h>
17700 #endif
17701
17702 #undef $ac_func
17703
17704 /* Override any gcc2 internal prototype to avoid an error.  */
17705 #ifdef __cplusplus
17706 extern "C"
17707 {
17708 #endif
17709 /* We use char because int might match the return type of a gcc2
17710    builtin and then its argument prototype would still apply.  */
17711 char $ac_func ();
17712 /* The GNU C library defines this for functions which it implements
17713     to always fail with ENOSYS.  Some functions are actually named
17714     something starting with __ and the normal name is an alias.  */
17715 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17716 choke me
17717 #else
17718 char (*f) () = $ac_func;
17719 #endif
17720 #ifdef __cplusplus
17721 }
17722 #endif
17723
17724 int
17725 main ()
17726 {
17727 return f != $ac_func;
17728   ;
17729   return 0;
17730 }
17731 _ACEOF
17732 rm -f conftest.$ac_objext conftest$ac_exeext
17733 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17734   (eval $ac_link) 2>conftest.er1
17735   ac_status=$?
17736   grep -v '^ *+' conftest.er1 >conftest.err
17737   rm -f conftest.er1
17738   cat conftest.err >&5
17739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17740   (exit $ac_status); } &&
17741          { ac_try='test -z "$ac_c_werror_flag"
17742                          || test ! -s conftest.err'
17743   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17744   (eval $ac_try) 2>&5
17745   ac_status=$?
17746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17747   (exit $ac_status); }; } &&
17748          { ac_try='test -s conftest$ac_exeext'
17749   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17750   (eval $ac_try) 2>&5
17751   ac_status=$?
17752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17753   (exit $ac_status); }; }; then
17754   eval "$as_ac_var=yes"
17755 else
17756   echo "$as_me: failed program was:" >&5
17757 sed 's/^/| /' conftest.$ac_ext >&5
17758
17759 eval "$as_ac_var=no"
17760 fi
17761 rm -f conftest.err conftest.$ac_objext \
17762       conftest$ac_exeext conftest.$ac_ext
17763 fi
17764 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17765 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17766 if test `eval echo '${'$as_ac_var'}'` = yes; then
17767   cat >>confdefs.h <<_ACEOF
17768 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17769 _ACEOF
17770
17771 fi
17772 done
17773
17774
17775
17776
17777
17778
17779 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop
17780 do
17781 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17782 echo "$as_me:$LINENO: checking for $ac_func" >&5
17783 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17784 if eval "test \"\${$as_ac_var+set}\" = set"; then
17785   echo $ECHO_N "(cached) $ECHO_C" >&6
17786 else
17787   cat >conftest.$ac_ext <<_ACEOF
17788 /* confdefs.h.  */
17789 _ACEOF
17790 cat confdefs.h >>conftest.$ac_ext
17791 cat >>conftest.$ac_ext <<_ACEOF
17792 /* end confdefs.h.  */
17793 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17794    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17795 #define $ac_func innocuous_$ac_func
17796
17797 /* System header to define __stub macros and hopefully few prototypes,
17798     which can conflict with char $ac_func (); below.
17799     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17800     <limits.h> exists even on freestanding compilers.  */
17801
17802 #ifdef __STDC__
17803 # include <limits.h>
17804 #else
17805 # include <assert.h>
17806 #endif
17807
17808 #undef $ac_func
17809
17810 /* Override any gcc2 internal prototype to avoid an error.  */
17811 #ifdef __cplusplus
17812 extern "C"
17813 {
17814 #endif
17815 /* We use char because int might match the return type of a gcc2
17816    builtin and then its argument prototype would still apply.  */
17817 char $ac_func ();
17818 /* The GNU C library defines this for functions which it implements
17819     to always fail with ENOSYS.  Some functions are actually named
17820     something starting with __ and the normal name is an alias.  */
17821 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17822 choke me
17823 #else
17824 char (*f) () = $ac_func;
17825 #endif
17826 #ifdef __cplusplus
17827 }
17828 #endif
17829
17830 int
17831 main ()
17832 {
17833 return f != $ac_func;
17834   ;
17835   return 0;
17836 }
17837 _ACEOF
17838 rm -f conftest.$ac_objext conftest$ac_exeext
17839 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17840   (eval $ac_link) 2>conftest.er1
17841   ac_status=$?
17842   grep -v '^ *+' conftest.er1 >conftest.err
17843   rm -f conftest.er1
17844   cat conftest.err >&5
17845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17846   (exit $ac_status); } &&
17847          { ac_try='test -z "$ac_c_werror_flag"
17848                          || test ! -s conftest.err'
17849   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17850   (eval $ac_try) 2>&5
17851   ac_status=$?
17852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17853   (exit $ac_status); }; } &&
17854          { ac_try='test -s conftest$ac_exeext'
17855   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17856   (eval $ac_try) 2>&5
17857   ac_status=$?
17858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17859   (exit $ac_status); }; }; then
17860   eval "$as_ac_var=yes"
17861 else
17862   echo "$as_me: failed program was:" >&5
17863 sed 's/^/| /' conftest.$ac_ext >&5
17864
17865 eval "$as_ac_var=no"
17866 fi
17867 rm -f conftest.err conftest.$ac_objext \
17868       conftest$ac_exeext conftest.$ac_ext
17869 fi
17870 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17871 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17872 if test `eval echo '${'$as_ac_var'}'` = yes; then
17873   cat >>confdefs.h <<_ACEOF
17874 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17875 _ACEOF
17876
17877 fi
17878 done
17879
17880
17881 ol_link_ipv6=no
17882 if test $ac_cv_func_getaddrinfo = no || test $ac_cv_func_inet_ntop = no ; then
17883         if test $ol_enable_ipv6 = yes ; then
17884                 { { echo "$as_me:$LINENO: error: IPv6 support requires getaddrinfo() and inet_ntop()" >&5
17885 echo "$as_me: error: IPv6 support requires getaddrinfo() and inet_ntop()" >&2;}
17886    { (exit 1); exit 1; }; }
17887         fi
17888 elif test $ol_enable_ipv6 != no ; then
17889         echo "$as_me:$LINENO: checking INET6_ADDRSTRLEN" >&5
17890 echo $ECHO_N "checking INET6_ADDRSTRLEN... $ECHO_C" >&6
17891 if test "${ol_cv_inet6_addrstrlen+set}" = set; then
17892   echo $ECHO_N "(cached) $ECHO_C" >&6
17893 else
17894
17895                 cat >conftest.$ac_ext <<_ACEOF
17896 /* confdefs.h.  */
17897 _ACEOF
17898 cat confdefs.h >>conftest.$ac_ext
17899 cat >>conftest.$ac_ext <<_ACEOF
17900 /* end confdefs.h.  */
17901
17902 #                       include <netinet/in.h>
17903 #                       ifdef INET6_ADDRSTRLEN
17904                                 __has_inet6_addrstrlen__;
17905 #                       endif
17906
17907 _ACEOF
17908 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17909   $EGREP "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
17910   ol_cv_inet6_addrstrlen=yes
17911 else
17912   ol_cv_inet6_addrstrlen=no
17913 fi
17914 rm -f conftest*
17915
17916 fi
17917 echo "$as_me:$LINENO: result: $ol_cv_inet6_addrstrlen" >&5
17918 echo "${ECHO_T}$ol_cv_inet6_addrstrlen" >&6
17919
17920
17921         echo "$as_me:$LINENO: checking struct sockaddr_storage" >&5
17922 echo $ECHO_N "checking struct sockaddr_storage... $ECHO_C" >&6
17923 if test "${ol_cv_struct_sockaddr_storage+set}" = set; then
17924   echo $ECHO_N "(cached) $ECHO_C" >&6
17925 else
17926
17927                 cat >conftest.$ac_ext <<_ACEOF
17928 /* confdefs.h.  */
17929 _ACEOF
17930 cat confdefs.h >>conftest.$ac_ext
17931 cat >>conftest.$ac_ext <<_ACEOF
17932 /* end confdefs.h.  */
17933
17934 #include <sys/types.h>
17935 #include <sys/socket.h>
17936
17937 int
17938 main ()
17939 {
17940
17941                         struct sockaddr_storage ss;
17942
17943   ;
17944   return 0;
17945 }
17946 _ACEOF
17947 rm -f conftest.$ac_objext
17948 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17949   (eval $ac_compile) 2>conftest.er1
17950   ac_status=$?
17951   grep -v '^ *+' conftest.er1 >conftest.err
17952   rm -f conftest.er1
17953   cat conftest.err >&5
17954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17955   (exit $ac_status); } &&
17956          { ac_try='test -z "$ac_c_werror_flag"
17957                          || test ! -s conftest.err'
17958   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17959   (eval $ac_try) 2>&5
17960   ac_status=$?
17961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17962   (exit $ac_status); }; } &&
17963          { ac_try='test -s conftest.$ac_objext'
17964   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17965   (eval $ac_try) 2>&5
17966   ac_status=$?
17967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17968   (exit $ac_status); }; }; then
17969   ol_cv_struct_sockaddr_storage=yes
17970 else
17971   echo "$as_me: failed program was:" >&5
17972 sed 's/^/| /' conftest.$ac_ext >&5
17973
17974 ol_cv_struct_sockaddr_storage=no
17975 fi
17976 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17977 fi
17978 echo "$as_me:$LINENO: result: $ol_cv_struct_sockaddr_storage" >&5
17979 echo "${ECHO_T}$ol_cv_struct_sockaddr_storage" >&6
17980
17981         if test $ol_cv_inet6_addrstrlen = yes &&
17982            test $ol_cv_struct_sockaddr_storage = yes ; then
17983                 ol_link_ipv6=yes
17984         elif test $ol_enable_ipv6 = yes &&
17985              test $ol_cv_inet6_addrstrlen = no ; then
17986                 { { echo "$as_me:$LINENO: error: IPv6 support requires INET6_ADDRSTRLEN" >&5
17987 echo "$as_me: error: IPv6 support requires INET6_ADDRSTRLEN" >&2;}
17988    { (exit 1); exit 1; }; }
17989         elif test $ol_enable_ipv6 = yes &&
17990              test $ol_cv_struct_sockaddr_storage = no ; then
17991                 { { echo "$as_me:$LINENO: error: IPv6 support requires struct sockaddr_storage" >&5
17992 echo "$as_me: error: IPv6 support requires struct sockaddr_storage" >&2;}
17993    { (exit 1); exit 1; }; }
17994         fi
17995 fi
17996
17997 if test $ol_enable_local != no ; then
17998
17999 for ac_header in sys/un.h
18000 do
18001 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18002 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18003   echo "$as_me:$LINENO: checking for $ac_header" >&5
18004 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18005 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18006   echo $ECHO_N "(cached) $ECHO_C" >&6
18007 fi
18008 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18009 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18010 else
18011   # Is the header compilable?
18012 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18013 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18014 cat >conftest.$ac_ext <<_ACEOF
18015 /* confdefs.h.  */
18016 _ACEOF
18017 cat confdefs.h >>conftest.$ac_ext
18018 cat >>conftest.$ac_ext <<_ACEOF
18019 /* end confdefs.h.  */
18020 $ac_includes_default
18021 #include <$ac_header>
18022 _ACEOF
18023 rm -f conftest.$ac_objext
18024 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18025   (eval $ac_compile) 2>conftest.er1
18026   ac_status=$?
18027   grep -v '^ *+' conftest.er1 >conftest.err
18028   rm -f conftest.er1
18029   cat conftest.err >&5
18030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18031   (exit $ac_status); } &&
18032          { ac_try='test -z "$ac_c_werror_flag"
18033                          || test ! -s conftest.err'
18034   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18035   (eval $ac_try) 2>&5
18036   ac_status=$?
18037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18038   (exit $ac_status); }; } &&
18039          { ac_try='test -s conftest.$ac_objext'
18040   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18041   (eval $ac_try) 2>&5
18042   ac_status=$?
18043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18044   (exit $ac_status); }; }; then
18045   ac_header_compiler=yes
18046 else
18047   echo "$as_me: failed program was:" >&5
18048 sed 's/^/| /' conftest.$ac_ext >&5
18049
18050 ac_header_compiler=no
18051 fi
18052 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18053 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18054 echo "${ECHO_T}$ac_header_compiler" >&6
18055
18056 # Is the header present?
18057 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18058 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18059 cat >conftest.$ac_ext <<_ACEOF
18060 /* confdefs.h.  */
18061 _ACEOF
18062 cat confdefs.h >>conftest.$ac_ext
18063 cat >>conftest.$ac_ext <<_ACEOF
18064 /* end confdefs.h.  */
18065 #include <$ac_header>
18066 _ACEOF
18067 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18068   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18069   ac_status=$?
18070   grep -v '^ *+' conftest.er1 >conftest.err
18071   rm -f conftest.er1
18072   cat conftest.err >&5
18073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18074   (exit $ac_status); } >/dev/null; then
18075   if test -s conftest.err; then
18076     ac_cpp_err=$ac_c_preproc_warn_flag
18077     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18078   else
18079     ac_cpp_err=
18080   fi
18081 else
18082   ac_cpp_err=yes
18083 fi
18084 if test -z "$ac_cpp_err"; then
18085   ac_header_preproc=yes
18086 else
18087   echo "$as_me: failed program was:" >&5
18088 sed 's/^/| /' conftest.$ac_ext >&5
18089
18090   ac_header_preproc=no
18091 fi
18092 rm -f conftest.err conftest.$ac_ext
18093 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18094 echo "${ECHO_T}$ac_header_preproc" >&6
18095
18096 # So?  What about this header?
18097 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18098   yes:no: )
18099     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18100 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18101     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18102 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18103     ac_header_preproc=yes
18104     ;;
18105   no:yes:* )
18106     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18107 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18108     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18109 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18110     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18111 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18112     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18113 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18114     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18115 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18116     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18117 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18118     (
18119       cat <<\_ASBOX
18120 ## --------------------------------------------- ##
18121 ## Report this to <http://www.openldap.org/its/> ##
18122 ## --------------------------------------------- ##
18123 _ASBOX
18124     ) |
18125       sed "s/^/$as_me: WARNING:     /" >&2
18126     ;;
18127 esac
18128 echo "$as_me:$LINENO: checking for $ac_header" >&5
18129 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18130 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18131   echo $ECHO_N "(cached) $ECHO_C" >&6
18132 else
18133   eval "$as_ac_Header=\$ac_header_preproc"
18134 fi
18135 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18136 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18137
18138 fi
18139 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18140   cat >>confdefs.h <<_ACEOF
18141 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18142 _ACEOF
18143
18144 fi
18145
18146 done
18147
18148
18149         if test $ol_enable_local = auto ; then
18150                 ol_enable_local=$ac_cv_header_sys_un_h
18151         elif test $ac_cv_header_sys_un_h = no ; then
18152                 { { echo "$as_me:$LINENO: error: AF_LOCAL domain support requires sys/un.h" >&5
18153 echo "$as_me: error: AF_LOCAL domain support requires sys/un.h" >&2;}
18154    { (exit 1); exit 1; }; }
18155         fi
18156 fi
18157
18158 ol_link_kbind=no
18159 ol_link_krb5=no
18160 ol_link_krb4=no
18161
18162 case $ol_with_kerberos in yes | auto | k5 | k5only | k425)
18163
18164
18165 for ac_header in krb5.h
18166 do
18167 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18168 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18169   echo "$as_me:$LINENO: checking for $ac_header" >&5
18170 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18171 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18172   echo $ECHO_N "(cached) $ECHO_C" >&6
18173 fi
18174 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18175 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18176 else
18177   # Is the header compilable?
18178 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18179 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18180 cat >conftest.$ac_ext <<_ACEOF
18181 /* confdefs.h.  */
18182 _ACEOF
18183 cat confdefs.h >>conftest.$ac_ext
18184 cat >>conftest.$ac_ext <<_ACEOF
18185 /* end confdefs.h.  */
18186 $ac_includes_default
18187 #include <$ac_header>
18188 _ACEOF
18189 rm -f conftest.$ac_objext
18190 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18191   (eval $ac_compile) 2>conftest.er1
18192   ac_status=$?
18193   grep -v '^ *+' conftest.er1 >conftest.err
18194   rm -f conftest.er1
18195   cat conftest.err >&5
18196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18197   (exit $ac_status); } &&
18198          { ac_try='test -z "$ac_c_werror_flag"
18199                          || test ! -s conftest.err'
18200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18201   (eval $ac_try) 2>&5
18202   ac_status=$?
18203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18204   (exit $ac_status); }; } &&
18205          { ac_try='test -s conftest.$ac_objext'
18206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18207   (eval $ac_try) 2>&5
18208   ac_status=$?
18209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18210   (exit $ac_status); }; }; then
18211   ac_header_compiler=yes
18212 else
18213   echo "$as_me: failed program was:" >&5
18214 sed 's/^/| /' conftest.$ac_ext >&5
18215
18216 ac_header_compiler=no
18217 fi
18218 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18219 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18220 echo "${ECHO_T}$ac_header_compiler" >&6
18221
18222 # Is the header present?
18223 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18224 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18225 cat >conftest.$ac_ext <<_ACEOF
18226 /* confdefs.h.  */
18227 _ACEOF
18228 cat confdefs.h >>conftest.$ac_ext
18229 cat >>conftest.$ac_ext <<_ACEOF
18230 /* end confdefs.h.  */
18231 #include <$ac_header>
18232 _ACEOF
18233 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18234   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18235   ac_status=$?
18236   grep -v '^ *+' conftest.er1 >conftest.err
18237   rm -f conftest.er1
18238   cat conftest.err >&5
18239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18240   (exit $ac_status); } >/dev/null; then
18241   if test -s conftest.err; then
18242     ac_cpp_err=$ac_c_preproc_warn_flag
18243     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18244   else
18245     ac_cpp_err=
18246   fi
18247 else
18248   ac_cpp_err=yes
18249 fi
18250 if test -z "$ac_cpp_err"; then
18251   ac_header_preproc=yes
18252 else
18253   echo "$as_me: failed program was:" >&5
18254 sed 's/^/| /' conftest.$ac_ext >&5
18255
18256   ac_header_preproc=no
18257 fi
18258 rm -f conftest.err conftest.$ac_ext
18259 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18260 echo "${ECHO_T}$ac_header_preproc" >&6
18261
18262 # So?  What about this header?
18263 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18264   yes:no: )
18265     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18266 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18267     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18268 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18269     ac_header_preproc=yes
18270     ;;
18271   no:yes:* )
18272     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18273 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18274     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18275 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18276     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18277 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18278     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18279 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18280     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18281 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18282     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18283 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18284     (
18285       cat <<\_ASBOX
18286 ## --------------------------------------------- ##
18287 ## Report this to <http://www.openldap.org/its/> ##
18288 ## --------------------------------------------- ##
18289 _ASBOX
18290     ) |
18291       sed "s/^/$as_me: WARNING:     /" >&2
18292     ;;
18293 esac
18294 echo "$as_me:$LINENO: checking for $ac_header" >&5
18295 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18296 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18297   echo $ECHO_N "(cached) $ECHO_C" >&6
18298 else
18299   eval "$as_ac_Header=\$ac_header_preproc"
18300 fi
18301 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18302 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18303
18304 fi
18305 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18306   cat >>confdefs.h <<_ACEOF
18307 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18308 _ACEOF
18309
18310 fi
18311
18312 done
18313
18314
18315         if test $ac_cv_header_krb5_h = yes ; then
18316
18317 for ac_header in heim_err.h
18318 do
18319 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18320 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18321   echo "$as_me:$LINENO: checking for $ac_header" >&5
18322 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18323 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18324   echo $ECHO_N "(cached) $ECHO_C" >&6
18325 fi
18326 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18327 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18328 else
18329   # Is the header compilable?
18330 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18331 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18332 cat >conftest.$ac_ext <<_ACEOF
18333 /* confdefs.h.  */
18334 _ACEOF
18335 cat confdefs.h >>conftest.$ac_ext
18336 cat >>conftest.$ac_ext <<_ACEOF
18337 /* end confdefs.h.  */
18338 $ac_includes_default
18339 #include <$ac_header>
18340 _ACEOF
18341 rm -f conftest.$ac_objext
18342 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18343   (eval $ac_compile) 2>conftest.er1
18344   ac_status=$?
18345   grep -v '^ *+' conftest.er1 >conftest.err
18346   rm -f conftest.er1
18347   cat conftest.err >&5
18348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18349   (exit $ac_status); } &&
18350          { ac_try='test -z "$ac_c_werror_flag"
18351                          || test ! -s conftest.err'
18352   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18353   (eval $ac_try) 2>&5
18354   ac_status=$?
18355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18356   (exit $ac_status); }; } &&
18357          { ac_try='test -s conftest.$ac_objext'
18358   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18359   (eval $ac_try) 2>&5
18360   ac_status=$?
18361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18362   (exit $ac_status); }; }; then
18363   ac_header_compiler=yes
18364 else
18365   echo "$as_me: failed program was:" >&5
18366 sed 's/^/| /' conftest.$ac_ext >&5
18367
18368 ac_header_compiler=no
18369 fi
18370 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18371 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18372 echo "${ECHO_T}$ac_header_compiler" >&6
18373
18374 # Is the header present?
18375 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18376 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18377 cat >conftest.$ac_ext <<_ACEOF
18378 /* confdefs.h.  */
18379 _ACEOF
18380 cat confdefs.h >>conftest.$ac_ext
18381 cat >>conftest.$ac_ext <<_ACEOF
18382 /* end confdefs.h.  */
18383 #include <$ac_header>
18384 _ACEOF
18385 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18386   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18387   ac_status=$?
18388   grep -v '^ *+' conftest.er1 >conftest.err
18389   rm -f conftest.er1
18390   cat conftest.err >&5
18391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18392   (exit $ac_status); } >/dev/null; then
18393   if test -s conftest.err; then
18394     ac_cpp_err=$ac_c_preproc_warn_flag
18395     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18396   else
18397     ac_cpp_err=
18398   fi
18399 else
18400   ac_cpp_err=yes
18401 fi
18402 if test -z "$ac_cpp_err"; then
18403   ac_header_preproc=yes
18404 else
18405   echo "$as_me: failed program was:" >&5
18406 sed 's/^/| /' conftest.$ac_ext >&5
18407
18408   ac_header_preproc=no
18409 fi
18410 rm -f conftest.err conftest.$ac_ext
18411 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18412 echo "${ECHO_T}$ac_header_preproc" >&6
18413
18414 # So?  What about this header?
18415 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18416   yes:no: )
18417     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18418 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18419     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18420 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18421     ac_header_preproc=yes
18422     ;;
18423   no:yes:* )
18424     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18425 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18426     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18427 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18428     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18429 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18430     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18431 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18432     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18433 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18434     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18435 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18436     (
18437       cat <<\_ASBOX
18438 ## --------------------------------------------- ##
18439 ## Report this to <http://www.openldap.org/its/> ##
18440 ## --------------------------------------------- ##
18441 _ASBOX
18442     ) |
18443       sed "s/^/$as_me: WARNING:     /" >&2
18444     ;;
18445 esac
18446 echo "$as_me:$LINENO: checking for $ac_header" >&5
18447 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18448 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18449   echo $ECHO_N "(cached) $ECHO_C" >&6
18450 else
18451   eval "$as_ac_Header=\$ac_header_preproc"
18452 fi
18453 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18454 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18455
18456 fi
18457 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18458   cat >>confdefs.h <<_ACEOF
18459 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18460 _ACEOF
18461
18462 fi
18463
18464 done
18465
18466                 if test $ac_cv_header_heim_err_h = yes ; then
18467                         krb5_impl=heimdal
18468                 else
18469                         krb5_impl=mit
18470                 fi
18471
18472                 if test $krb5_impl = mit; then
18473                         echo "$as_me:$LINENO: checking for main in -lk5crypto" >&5
18474 echo $ECHO_N "checking for main in -lk5crypto... $ECHO_C" >&6
18475 if test "${ac_cv_lib_k5crypto_main+set}" = set; then
18476   echo $ECHO_N "(cached) $ECHO_C" >&6
18477 else
18478   ac_check_lib_save_LIBS=$LIBS
18479 LIBS="-lk5crypto  $LIBS"
18480 cat >conftest.$ac_ext <<_ACEOF
18481 /* confdefs.h.  */
18482 _ACEOF
18483 cat confdefs.h >>conftest.$ac_ext
18484 cat >>conftest.$ac_ext <<_ACEOF
18485 /* end confdefs.h.  */
18486
18487
18488 int
18489 main ()
18490 {
18491 main ();
18492   ;
18493   return 0;
18494 }
18495 _ACEOF
18496 rm -f conftest.$ac_objext conftest$ac_exeext
18497 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18498   (eval $ac_link) 2>conftest.er1
18499   ac_status=$?
18500   grep -v '^ *+' conftest.er1 >conftest.err
18501   rm -f conftest.er1
18502   cat conftest.err >&5
18503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18504   (exit $ac_status); } &&
18505          { ac_try='test -z "$ac_c_werror_flag"
18506                          || test ! -s conftest.err'
18507   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18508   (eval $ac_try) 2>&5
18509   ac_status=$?
18510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18511   (exit $ac_status); }; } &&
18512          { ac_try='test -s conftest$ac_exeext'
18513   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18514   (eval $ac_try) 2>&5
18515   ac_status=$?
18516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18517   (exit $ac_status); }; }; then
18518   ac_cv_lib_k5crypto_main=yes
18519 else
18520   echo "$as_me: failed program was:" >&5
18521 sed 's/^/| /' conftest.$ac_ext >&5
18522
18523 ac_cv_lib_k5crypto_main=no
18524 fi
18525 rm -f conftest.err conftest.$ac_objext \
18526       conftest$ac_exeext conftest.$ac_ext
18527 LIBS=$ac_check_lib_save_LIBS
18528 fi
18529 echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_main" >&5
18530 echo "${ECHO_T}$ac_cv_lib_k5crypto_main" >&6
18531 if test $ac_cv_lib_k5crypto_main = yes; then
18532   krb5crypto=k5crypto
18533 else
18534   krb5crypto=crypto
18535 fi
18536
18537
18538                         echo "$as_me:$LINENO: checking for main in -lkrb5" >&5
18539 echo $ECHO_N "checking for main in -lkrb5... $ECHO_C" >&6
18540 if test "${ac_cv_lib_krb5_main+set}" = set; then
18541   echo $ECHO_N "(cached) $ECHO_C" >&6
18542 else
18543   ac_check_lib_save_LIBS=$LIBS
18544 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
18545 cat >conftest.$ac_ext <<_ACEOF
18546 /* confdefs.h.  */
18547 _ACEOF
18548 cat confdefs.h >>conftest.$ac_ext
18549 cat >>conftest.$ac_ext <<_ACEOF
18550 /* end confdefs.h.  */
18551
18552
18553 int
18554 main ()
18555 {
18556 main ();
18557   ;
18558   return 0;
18559 }
18560 _ACEOF
18561 rm -f conftest.$ac_objext conftest$ac_exeext
18562 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18563   (eval $ac_link) 2>conftest.er1
18564   ac_status=$?
18565   grep -v '^ *+' conftest.er1 >conftest.err
18566   rm -f conftest.er1
18567   cat conftest.err >&5
18568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18569   (exit $ac_status); } &&
18570          { ac_try='test -z "$ac_c_werror_flag"
18571                          || test ! -s conftest.err'
18572   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18573   (eval $ac_try) 2>&5
18574   ac_status=$?
18575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18576   (exit $ac_status); }; } &&
18577          { ac_try='test -s conftest$ac_exeext'
18578   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18579   (eval $ac_try) 2>&5
18580   ac_status=$?
18581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18582   (exit $ac_status); }; }; then
18583   ac_cv_lib_krb5_main=yes
18584 else
18585   echo "$as_me: failed program was:" >&5
18586 sed 's/^/| /' conftest.$ac_ext >&5
18587
18588 ac_cv_lib_krb5_main=no
18589 fi
18590 rm -f conftest.err conftest.$ac_objext \
18591       conftest$ac_exeext conftest.$ac_ext
18592 LIBS=$ac_check_lib_save_LIBS
18593 fi
18594 echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_main" >&5
18595 echo "${ECHO_T}$ac_cv_lib_krb5_main" >&6
18596 if test $ac_cv_lib_krb5_main = yes; then
18597   have_krb5=yes
18598                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
18599 else
18600   have_krb5=no
18601 fi
18602
18603
18604                 elif test $krb5_impl = heimdal; then
18605                         echo "$as_me:$LINENO: checking for main in -ldes" >&5
18606 echo $ECHO_N "checking for main in -ldes... $ECHO_C" >&6
18607 if test "${ac_cv_lib_des_main+set}" = set; then
18608   echo $ECHO_N "(cached) $ECHO_C" >&6
18609 else
18610   ac_check_lib_save_LIBS=$LIBS
18611 LIBS="-ldes  $LIBS"
18612 cat >conftest.$ac_ext <<_ACEOF
18613 /* confdefs.h.  */
18614 _ACEOF
18615 cat confdefs.h >>conftest.$ac_ext
18616 cat >>conftest.$ac_ext <<_ACEOF
18617 /* end confdefs.h.  */
18618
18619
18620 int
18621 main ()
18622 {
18623 main ();
18624   ;
18625   return 0;
18626 }
18627 _ACEOF
18628 rm -f conftest.$ac_objext conftest$ac_exeext
18629 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18630   (eval $ac_link) 2>conftest.er1
18631   ac_status=$?
18632   grep -v '^ *+' conftest.er1 >conftest.err
18633   rm -f conftest.er1
18634   cat conftest.err >&5
18635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18636   (exit $ac_status); } &&
18637          { ac_try='test -z "$ac_c_werror_flag"
18638                          || test ! -s conftest.err'
18639   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18640   (eval $ac_try) 2>&5
18641   ac_status=$?
18642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18643   (exit $ac_status); }; } &&
18644          { ac_try='test -s conftest$ac_exeext'
18645   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18646   (eval $ac_try) 2>&5
18647   ac_status=$?
18648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18649   (exit $ac_status); }; }; then
18650   ac_cv_lib_des_main=yes
18651 else
18652   echo "$as_me: failed program was:" >&5
18653 sed 's/^/| /' conftest.$ac_ext >&5
18654
18655 ac_cv_lib_des_main=no
18656 fi
18657 rm -f conftest.err conftest.$ac_objext \
18658       conftest$ac_exeext conftest.$ac_ext
18659 LIBS=$ac_check_lib_save_LIBS
18660 fi
18661 echo "$as_me:$LINENO: result: $ac_cv_lib_des_main" >&5
18662 echo "${ECHO_T}$ac_cv_lib_des_main" >&6
18663 if test $ac_cv_lib_des_main = yes; then
18664   krb5crypto=des
18665 else
18666   krb5crypto=crypto
18667 fi
18668
18669
18670                         echo "$as_me:$LINENO: checking for main in -lkrb5" >&5
18671 echo $ECHO_N "checking for main in -lkrb5... $ECHO_C" >&6
18672 if test "${ac_cv_lib_krb5_main+set}" = set; then
18673   echo $ECHO_N "(cached) $ECHO_C" >&6
18674 else
18675   ac_check_lib_save_LIBS=$LIBS
18676 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
18677 cat >conftest.$ac_ext <<_ACEOF
18678 /* confdefs.h.  */
18679 _ACEOF
18680 cat confdefs.h >>conftest.$ac_ext
18681 cat >>conftest.$ac_ext <<_ACEOF
18682 /* end confdefs.h.  */
18683
18684
18685 int
18686 main ()
18687 {
18688 main ();
18689   ;
18690   return 0;
18691 }
18692 _ACEOF
18693 rm -f conftest.$ac_objext conftest$ac_exeext
18694 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18695   (eval $ac_link) 2>conftest.er1
18696   ac_status=$?
18697   grep -v '^ *+' conftest.er1 >conftest.err
18698   rm -f conftest.er1
18699   cat conftest.err >&5
18700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18701   (exit $ac_status); } &&
18702          { ac_try='test -z "$ac_c_werror_flag"
18703                          || test ! -s conftest.err'
18704   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18705   (eval $ac_try) 2>&5
18706   ac_status=$?
18707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18708   (exit $ac_status); }; } &&
18709          { ac_try='test -s conftest$ac_exeext'
18710   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18711   (eval $ac_try) 2>&5
18712   ac_status=$?
18713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18714   (exit $ac_status); }; }; then
18715   ac_cv_lib_krb5_main=yes
18716 else
18717   echo "$as_me: failed program was:" >&5
18718 sed 's/^/| /' conftest.$ac_ext >&5
18719
18720 ac_cv_lib_krb5_main=no
18721 fi
18722 rm -f conftest.err conftest.$ac_objext \
18723       conftest$ac_exeext conftest.$ac_ext
18724 LIBS=$ac_check_lib_save_LIBS
18725 fi
18726 echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_main" >&5
18727 echo "${ECHO_T}$ac_cv_lib_krb5_main" >&6
18728 if test $ac_cv_lib_krb5_main = yes; then
18729   have_krb5=yes
18730                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
18731 else
18732   have_krb5=no
18733 fi
18734
18735
18736
18737 cat >>confdefs.h <<\_ACEOF
18738 #define HAVE_HEIMDAL_KERBEROS 1
18739 _ACEOF
18740
18741
18742                 else
18743                         have_krb5=no
18744                         { echo "$as_me:$LINENO: WARNING: Unrecognized Kerberos5 Implementation" >&5
18745 echo "$as_me: WARNING: Unrecognized Kerberos5 Implementation" >&2;}
18746                 fi
18747
18748                 if test $have_krb5 = yes ; then
18749                         ol_link_krb5=yes
18750
18751
18752 cat >>confdefs.h <<\_ACEOF
18753 #define HAVE_KRB5 1
18754 _ACEOF
18755
18756
18757                         if test $ol_with_kerberos = k5only ; then
18758                                 ol_with_kerberos=found
18759                         fi
18760
18761                 elif test $ol_with_kerberos != auto ; then
18762                         { { echo "$as_me:$LINENO: error: Required Kerberos 5 support not available" >&5
18763 echo "$as_me: error: Required Kerberos 5 support not available" >&2;}
18764    { (exit 1); exit 1; }; }
18765                 fi
18766
18767         fi
18768         ;;
18769 esac
18770
18771 if test $ol_link_krb5 = yes &&
18772    { test $ol_with_kerberos = yes ||
18773      test $ol_with_kerberos = auto ||
18774      test $ol_with_kerberos = k425; }; then
18775
18776
18777
18778 for ac_header in kerberosIV/krb.h kerberosIV/des.h
18779 do
18780 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18781 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18782   echo "$as_me:$LINENO: checking for $ac_header" >&5
18783 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18784 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18785   echo $ECHO_N "(cached) $ECHO_C" >&6
18786 fi
18787 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18788 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18789 else
18790   # Is the header compilable?
18791 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18792 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18793 cat >conftest.$ac_ext <<_ACEOF
18794 /* confdefs.h.  */
18795 _ACEOF
18796 cat confdefs.h >>conftest.$ac_ext
18797 cat >>conftest.$ac_ext <<_ACEOF
18798 /* end confdefs.h.  */
18799 $ac_includes_default
18800 #include <$ac_header>
18801 _ACEOF
18802 rm -f conftest.$ac_objext
18803 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18804   (eval $ac_compile) 2>conftest.er1
18805   ac_status=$?
18806   grep -v '^ *+' conftest.er1 >conftest.err
18807   rm -f conftest.er1
18808   cat conftest.err >&5
18809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18810   (exit $ac_status); } &&
18811          { ac_try='test -z "$ac_c_werror_flag"
18812                          || test ! -s conftest.err'
18813   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18814   (eval $ac_try) 2>&5
18815   ac_status=$?
18816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18817   (exit $ac_status); }; } &&
18818          { ac_try='test -s conftest.$ac_objext'
18819   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18820   (eval $ac_try) 2>&5
18821   ac_status=$?
18822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18823   (exit $ac_status); }; }; then
18824   ac_header_compiler=yes
18825 else
18826   echo "$as_me: failed program was:" >&5
18827 sed 's/^/| /' conftest.$ac_ext >&5
18828
18829 ac_header_compiler=no
18830 fi
18831 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18832 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18833 echo "${ECHO_T}$ac_header_compiler" >&6
18834
18835 # Is the header present?
18836 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18837 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18838 cat >conftest.$ac_ext <<_ACEOF
18839 /* confdefs.h.  */
18840 _ACEOF
18841 cat confdefs.h >>conftest.$ac_ext
18842 cat >>conftest.$ac_ext <<_ACEOF
18843 /* end confdefs.h.  */
18844 #include <$ac_header>
18845 _ACEOF
18846 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18847   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18848   ac_status=$?
18849   grep -v '^ *+' conftest.er1 >conftest.err
18850   rm -f conftest.er1
18851   cat conftest.err >&5
18852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18853   (exit $ac_status); } >/dev/null; then
18854   if test -s conftest.err; then
18855     ac_cpp_err=$ac_c_preproc_warn_flag
18856     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18857   else
18858     ac_cpp_err=
18859   fi
18860 else
18861   ac_cpp_err=yes
18862 fi
18863 if test -z "$ac_cpp_err"; then
18864   ac_header_preproc=yes
18865 else
18866   echo "$as_me: failed program was:" >&5
18867 sed 's/^/| /' conftest.$ac_ext >&5
18868
18869   ac_header_preproc=no
18870 fi
18871 rm -f conftest.err conftest.$ac_ext
18872 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18873 echo "${ECHO_T}$ac_header_preproc" >&6
18874
18875 # So?  What about this header?
18876 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18877   yes:no: )
18878     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18879 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18880     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18881 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18882     ac_header_preproc=yes
18883     ;;
18884   no:yes:* )
18885     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18886 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18887     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18888 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18889     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18890 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18891     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18892 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18893     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18894 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18895     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18896 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18897     (
18898       cat <<\_ASBOX
18899 ## --------------------------------------------- ##
18900 ## Report this to <http://www.openldap.org/its/> ##
18901 ## --------------------------------------------- ##
18902 _ASBOX
18903     ) |
18904       sed "s/^/$as_me: WARNING:     /" >&2
18905     ;;
18906 esac
18907 echo "$as_me:$LINENO: checking for $ac_header" >&5
18908 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18909 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18910   echo $ECHO_N "(cached) $ECHO_C" >&6
18911 else
18912   eval "$as_ac_Header=\$ac_header_preproc"
18913 fi
18914 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18915 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18916
18917 fi
18918 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18919   cat >>confdefs.h <<_ACEOF
18920 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18921 _ACEOF
18922
18923 fi
18924
18925 done
18926
18927
18928         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
18929                 if test $krb5_impl = mit; then
18930                         echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
18931 echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6
18932 if test "${ac_cv_lib_krb4_main+set}" = set; then
18933   echo $ECHO_N "(cached) $ECHO_C" >&6
18934 else
18935   ac_check_lib_save_LIBS=$LIBS
18936 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
18937 cat >conftest.$ac_ext <<_ACEOF
18938 /* confdefs.h.  */
18939 _ACEOF
18940 cat confdefs.h >>conftest.$ac_ext
18941 cat >>conftest.$ac_ext <<_ACEOF
18942 /* end confdefs.h.  */
18943
18944
18945 int
18946 main ()
18947 {
18948 main ();
18949   ;
18950   return 0;
18951 }
18952 _ACEOF
18953 rm -f conftest.$ac_objext conftest$ac_exeext
18954 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18955   (eval $ac_link) 2>conftest.er1
18956   ac_status=$?
18957   grep -v '^ *+' conftest.er1 >conftest.err
18958   rm -f conftest.er1
18959   cat conftest.err >&5
18960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18961   (exit $ac_status); } &&
18962          { ac_try='test -z "$ac_c_werror_flag"
18963                          || test ! -s conftest.err'
18964   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18965   (eval $ac_try) 2>&5
18966   ac_status=$?
18967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18968   (exit $ac_status); }; } &&
18969          { ac_try='test -s conftest$ac_exeext'
18970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18971   (eval $ac_try) 2>&5
18972   ac_status=$?
18973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18974   (exit $ac_status); }; }; then
18975   ac_cv_lib_krb4_main=yes
18976 else
18977   echo "$as_me: failed program was:" >&5
18978 sed 's/^/| /' conftest.$ac_ext >&5
18979
18980 ac_cv_lib_krb4_main=no
18981 fi
18982 rm -f conftest.err conftest.$ac_objext \
18983       conftest$ac_exeext conftest.$ac_ext
18984 LIBS=$ac_check_lib_save_LIBS
18985 fi
18986 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5
18987 echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6
18988 if test $ac_cv_lib_krb4_main = yes; then
18989   have_k425=yes
18990                                 KRB4_LIBS="-lkrb4 -ldes425"
18991 else
18992   have_k425=no
18993 fi
18994
18995
18996                 elif test $krb5_impl = heimdal; then
18997                         echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
18998 echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6
18999 if test "${ac_cv_lib_krb4_main+set}" = set; then
19000   echo $ECHO_N "(cached) $ECHO_C" >&6
19001 else
19002   ac_check_lib_save_LIBS=$LIBS
19003 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
19004 cat >conftest.$ac_ext <<_ACEOF
19005 /* confdefs.h.  */
19006 _ACEOF
19007 cat confdefs.h >>conftest.$ac_ext
19008 cat >>conftest.$ac_ext <<_ACEOF
19009 /* end confdefs.h.  */
19010
19011
19012 int
19013 main ()
19014 {
19015 main ();
19016   ;
19017   return 0;
19018 }
19019 _ACEOF
19020 rm -f conftest.$ac_objext conftest$ac_exeext
19021 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19022   (eval $ac_link) 2>conftest.er1
19023   ac_status=$?
19024   grep -v '^ *+' conftest.er1 >conftest.err
19025   rm -f conftest.er1
19026   cat conftest.err >&5
19027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19028   (exit $ac_status); } &&
19029          { ac_try='test -z "$ac_c_werror_flag"
19030                          || test ! -s conftest.err'
19031   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19032   (eval $ac_try) 2>&5
19033   ac_status=$?
19034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19035   (exit $ac_status); }; } &&
19036          { ac_try='test -s conftest$ac_exeext'
19037   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19038   (eval $ac_try) 2>&5
19039   ac_status=$?
19040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19041   (exit $ac_status); }; }; then
19042   ac_cv_lib_krb4_main=yes
19043 else
19044   echo "$as_me: failed program was:" >&5
19045 sed 's/^/| /' conftest.$ac_ext >&5
19046
19047 ac_cv_lib_krb4_main=no
19048 fi
19049 rm -f conftest.err conftest.$ac_objext \
19050       conftest$ac_exeext conftest.$ac_ext
19051 LIBS=$ac_check_lib_save_LIBS
19052 fi
19053 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5
19054 echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6
19055 if test $ac_cv_lib_krb4_main = yes; then
19056   have_k425=yes
19057                                 KRB4_LIBS="-lkrb4"
19058 else
19059   have_k425=no
19060 fi
19061
19062
19063                 else
19064                         have_425=no
19065                         { echo "$as_me:$LINENO: WARNING: Unrecongized Kerberos V Implementation" >&5
19066 echo "$as_me: WARNING: Unrecongized Kerberos V Implementation" >&2;}
19067                 fi
19068
19069                 if test $have_k425 = yes ; then
19070                         ol_with_kerberos=found
19071                         ol_link_krb4=yes
19072
19073
19074 cat >>confdefs.h <<\_ACEOF
19075 #define HAVE_KRB425 1
19076 _ACEOF
19077
19078
19079 cat >>confdefs.h <<\_ACEOF
19080 #define HAVE_KRB4 1
19081 _ACEOF
19082
19083
19084                         echo "$as_me:$LINENO: checking for des_debug in Kerberos libraries" >&5
19085 echo $ECHO_N "checking for des_debug in Kerberos libraries... $ECHO_C" >&6
19086 if test "${ol_cv_var_des_debug+set}" = set; then
19087   echo $ECHO_N "(cached) $ECHO_C" >&6
19088 else
19089
19090                                                                 save_LIBS="$LIBS"
19091                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
19092                                 cat >conftest.$ac_ext <<_ACEOF
19093 /* confdefs.h.  */
19094 _ACEOF
19095 cat confdefs.h >>conftest.$ac_ext
19096 cat >>conftest.$ac_ext <<_ACEOF
19097 /* end confdefs.h.  */
19098
19099 #include <kerberosIV/krb.h>
19100 #include <kerberosIV/des.h>
19101 extern int des_debug;
19102
19103 int
19104 main ()
19105 {
19106
19107 des_debug = 1;
19108
19109   ;
19110   return 0;
19111 }
19112 _ACEOF
19113 rm -f conftest.$ac_objext conftest$ac_exeext
19114 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19115   (eval $ac_link) 2>conftest.er1
19116   ac_status=$?
19117   grep -v '^ *+' conftest.er1 >conftest.err
19118   rm -f conftest.er1
19119   cat conftest.err >&5
19120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19121   (exit $ac_status); } &&
19122          { ac_try='test -z "$ac_c_werror_flag"
19123                          || test ! -s conftest.err'
19124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19125   (eval $ac_try) 2>&5
19126   ac_status=$?
19127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19128   (exit $ac_status); }; } &&
19129          { ac_try='test -s conftest$ac_exeext'
19130   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19131   (eval $ac_try) 2>&5
19132   ac_status=$?
19133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19134   (exit $ac_status); }; }; then
19135   ol_cv_var_des_debug=yes
19136 else
19137   echo "$as_me: failed program was:" >&5
19138 sed 's/^/| /' conftest.$ac_ext >&5
19139
19140 ol_cv_var_des_debug=no
19141 fi
19142 rm -f conftest.err conftest.$ac_objext \
19143       conftest$ac_exeext conftest.$ac_ext
19144                                                                 LIBS="$save_LIBS"
19145
19146 fi
19147 echo "$as_me:$LINENO: result: $ol_cv_var_des_debug" >&5
19148 echo "${ECHO_T}$ol_cv_var_des_debug" >&6
19149
19150                         if test $ol_cv_var_des_debug = yes ; then
19151
19152 cat >>confdefs.h <<\_ACEOF
19153 #define HAVE_DES_DEBUG 1
19154 _ACEOF
19155
19156                         fi
19157
19158                         LIBS="$save_LIBS"
19159                 fi
19160         fi
19161 fi
19162
19163 if test $ol_link_krb5 = yes ; then
19164         ol_with_kerberos=found
19165 fi
19166
19167 case $ol_with_kerberos in yes | auto | k4 | kth)
19168
19169
19170
19171
19172 for ac_header in krb.h des.h krb-archaeology.h
19173 do
19174 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19175 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19176   echo "$as_me:$LINENO: checking for $ac_header" >&5
19177 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19178 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19179   echo $ECHO_N "(cached) $ECHO_C" >&6
19180 fi
19181 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19182 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19183 else
19184   # Is the header compilable?
19185 echo "$as_me:$LINENO: checking $ac_header usability" >&5
19186 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19187 cat >conftest.$ac_ext <<_ACEOF
19188 /* confdefs.h.  */
19189 _ACEOF
19190 cat confdefs.h >>conftest.$ac_ext
19191 cat >>conftest.$ac_ext <<_ACEOF
19192 /* end confdefs.h.  */
19193 $ac_includes_default
19194 #include <$ac_header>
19195 _ACEOF
19196 rm -f conftest.$ac_objext
19197 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19198   (eval $ac_compile) 2>conftest.er1
19199   ac_status=$?
19200   grep -v '^ *+' conftest.er1 >conftest.err
19201   rm -f conftest.er1
19202   cat conftest.err >&5
19203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19204   (exit $ac_status); } &&
19205          { ac_try='test -z "$ac_c_werror_flag"
19206                          || test ! -s conftest.err'
19207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19208   (eval $ac_try) 2>&5
19209   ac_status=$?
19210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19211   (exit $ac_status); }; } &&
19212          { ac_try='test -s conftest.$ac_objext'
19213   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19214   (eval $ac_try) 2>&5
19215   ac_status=$?
19216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19217   (exit $ac_status); }; }; then
19218   ac_header_compiler=yes
19219 else
19220   echo "$as_me: failed program was:" >&5
19221 sed 's/^/| /' conftest.$ac_ext >&5
19222
19223 ac_header_compiler=no
19224 fi
19225 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19226 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19227 echo "${ECHO_T}$ac_header_compiler" >&6
19228
19229 # Is the header present?
19230 echo "$as_me:$LINENO: checking $ac_header presence" >&5
19231 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19232 cat >conftest.$ac_ext <<_ACEOF
19233 /* confdefs.h.  */
19234 _ACEOF
19235 cat confdefs.h >>conftest.$ac_ext
19236 cat >>conftest.$ac_ext <<_ACEOF
19237 /* end confdefs.h.  */
19238 #include <$ac_header>
19239 _ACEOF
19240 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19241   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19242   ac_status=$?
19243   grep -v '^ *+' conftest.er1 >conftest.err
19244   rm -f conftest.er1
19245   cat conftest.err >&5
19246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19247   (exit $ac_status); } >/dev/null; then
19248   if test -s conftest.err; then
19249     ac_cpp_err=$ac_c_preproc_warn_flag
19250     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19251   else
19252     ac_cpp_err=
19253   fi
19254 else
19255   ac_cpp_err=yes
19256 fi
19257 if test -z "$ac_cpp_err"; then
19258   ac_header_preproc=yes
19259 else
19260   echo "$as_me: failed program was:" >&5
19261 sed 's/^/| /' conftest.$ac_ext >&5
19262
19263   ac_header_preproc=no
19264 fi
19265 rm -f conftest.err conftest.$ac_ext
19266 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19267 echo "${ECHO_T}$ac_header_preproc" >&6
19268
19269 # So?  What about this header?
19270 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19271   yes:no: )
19272     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19273 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19274     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19275 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19276     ac_header_preproc=yes
19277     ;;
19278   no:yes:* )
19279     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19280 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19281     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19282 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19283     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19284 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19285     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19286 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19287     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19288 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19289     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19290 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19291     (
19292       cat <<\_ASBOX
19293 ## --------------------------------------------- ##
19294 ## Report this to <http://www.openldap.org/its/> ##
19295 ## --------------------------------------------- ##
19296 _ASBOX
19297     ) |
19298       sed "s/^/$as_me: WARNING:     /" >&2
19299     ;;
19300 esac
19301 echo "$as_me:$LINENO: checking for $ac_header" >&5
19302 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19303 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19304   echo $ECHO_N "(cached) $ECHO_C" >&6
19305 else
19306   eval "$as_ac_Header=\$ac_header_preproc"
19307 fi
19308 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19309 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19310
19311 fi
19312 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19313   cat >>confdefs.h <<_ACEOF
19314 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19315 _ACEOF
19316
19317 fi
19318
19319 done
19320
19321
19322         if test $ac_cv_header_krb_h = yes ; then
19323                 echo "$as_me:$LINENO: checking for main in -lkrb" >&5
19324 echo $ECHO_N "checking for main in -lkrb... $ECHO_C" >&6
19325 if test "${ac_cv_lib_krb_main+set}" = set; then
19326   echo $ECHO_N "(cached) $ECHO_C" >&6
19327 else
19328   ac_check_lib_save_LIBS=$LIBS
19329 LIBS="-lkrb -ldes $LIBS"
19330 cat >conftest.$ac_ext <<_ACEOF
19331 /* confdefs.h.  */
19332 _ACEOF
19333 cat confdefs.h >>conftest.$ac_ext
19334 cat >>conftest.$ac_ext <<_ACEOF
19335 /* end confdefs.h.  */
19336
19337
19338 int
19339 main ()
19340 {
19341 main ();
19342   ;
19343   return 0;
19344 }
19345 _ACEOF
19346 rm -f conftest.$ac_objext conftest$ac_exeext
19347 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19348   (eval $ac_link) 2>conftest.er1
19349   ac_status=$?
19350   grep -v '^ *+' conftest.er1 >conftest.err
19351   rm -f conftest.er1
19352   cat conftest.err >&5
19353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19354   (exit $ac_status); } &&
19355          { ac_try='test -z "$ac_c_werror_flag"
19356                          || test ! -s conftest.err'
19357   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19358   (eval $ac_try) 2>&5
19359   ac_status=$?
19360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19361   (exit $ac_status); }; } &&
19362          { ac_try='test -s conftest$ac_exeext'
19363   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19364   (eval $ac_try) 2>&5
19365   ac_status=$?
19366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19367   (exit $ac_status); }; }; then
19368   ac_cv_lib_krb_main=yes
19369 else
19370   echo "$as_me: failed program was:" >&5
19371 sed 's/^/| /' conftest.$ac_ext >&5
19372
19373 ac_cv_lib_krb_main=no
19374 fi
19375 rm -f conftest.err conftest.$ac_objext \
19376       conftest$ac_exeext conftest.$ac_ext
19377 LIBS=$ac_check_lib_save_LIBS
19378 fi
19379 echo "$as_me:$LINENO: result: $ac_cv_lib_krb_main" >&5
19380 echo "${ECHO_T}$ac_cv_lib_krb_main" >&6
19381 if test $ac_cv_lib_krb_main = yes; then
19382   have_k4=yes
19383 else
19384   have_k4=no
19385 fi
19386
19387
19388                 if test $have_k4 = yes ; then
19389                         ol_with_kerberos=found
19390                         ol_link_krb4=yes
19391
19392
19393 cat >>confdefs.h <<\_ACEOF
19394 #define HAVE_KRB4 1
19395 _ACEOF
19396
19397
19398                         KRB4_LIBS="-lkrb -ldes"
19399
19400                         if test $ac_cv_header_krb_archaeology_h = yes ; then
19401
19402 cat >>confdefs.h <<\_ACEOF
19403 #define HAVE_KTH_KERBEROS 1
19404 _ACEOF
19405
19406                         fi
19407                 fi
19408         fi
19409         ;;
19410 esac
19411
19412 if test $ol_link_krb4 = yes && test $ol_enable_kbind != no ; then
19413         ol_link_kbind=yes
19414
19415 elif test $ol_enable_kbind = yes ; then
19416         { { echo "$as_me:$LINENO: error: Kerberos IV detection failed" >&5
19417 echo "$as_me: error: Kerberos IV detection failed" >&2;}
19418    { (exit 1); exit 1; }; }
19419 fi
19420
19421 if test $ol_link_krb4 = yes || test $ol_link_krb5 = yes ; then
19422
19423 cat >>confdefs.h <<\_ACEOF
19424 #define HAVE_KERBEROS 1
19425 _ACEOF
19426
19427
19428 elif test $ol_with_kerberos != auto && test $ol_with_kerberos != no ; then
19429         { { echo "$as_me:$LINENO: error: Kerberos detection failed" >&5
19430 echo "$as_me: error: Kerberos detection failed" >&2;}
19431    { (exit 1); exit 1; }; }
19432 fi
19433
19434
19435 ol_link_tls=no
19436 if test $ol_with_tls != no ; then
19437
19438 for ac_header in openssl/ssl.h
19439 do
19440 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19441 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19442   echo "$as_me:$LINENO: checking for $ac_header" >&5
19443 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19444 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19445   echo $ECHO_N "(cached) $ECHO_C" >&6
19446 fi
19447 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19448 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19449 else
19450   # Is the header compilable?
19451 echo "$as_me:$LINENO: checking $ac_header usability" >&5
19452 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19453 cat >conftest.$ac_ext <<_ACEOF
19454 /* confdefs.h.  */
19455 _ACEOF
19456 cat confdefs.h >>conftest.$ac_ext
19457 cat >>conftest.$ac_ext <<_ACEOF
19458 /* end confdefs.h.  */
19459 $ac_includes_default
19460 #include <$ac_header>
19461 _ACEOF
19462 rm -f conftest.$ac_objext
19463 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19464   (eval $ac_compile) 2>conftest.er1
19465   ac_status=$?
19466   grep -v '^ *+' conftest.er1 >conftest.err
19467   rm -f conftest.er1
19468   cat conftest.err >&5
19469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19470   (exit $ac_status); } &&
19471          { ac_try='test -z "$ac_c_werror_flag"
19472                          || test ! -s conftest.err'
19473   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19474   (eval $ac_try) 2>&5
19475   ac_status=$?
19476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19477   (exit $ac_status); }; } &&
19478          { ac_try='test -s conftest.$ac_objext'
19479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19480   (eval $ac_try) 2>&5
19481   ac_status=$?
19482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19483   (exit $ac_status); }; }; then
19484   ac_header_compiler=yes
19485 else
19486   echo "$as_me: failed program was:" >&5
19487 sed 's/^/| /' conftest.$ac_ext >&5
19488
19489 ac_header_compiler=no
19490 fi
19491 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19492 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19493 echo "${ECHO_T}$ac_header_compiler" >&6
19494
19495 # Is the header present?
19496 echo "$as_me:$LINENO: checking $ac_header presence" >&5
19497 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19498 cat >conftest.$ac_ext <<_ACEOF
19499 /* confdefs.h.  */
19500 _ACEOF
19501 cat confdefs.h >>conftest.$ac_ext
19502 cat >>conftest.$ac_ext <<_ACEOF
19503 /* end confdefs.h.  */
19504 #include <$ac_header>
19505 _ACEOF
19506 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19507   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19508   ac_status=$?
19509   grep -v '^ *+' conftest.er1 >conftest.err
19510   rm -f conftest.er1
19511   cat conftest.err >&5
19512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19513   (exit $ac_status); } >/dev/null; then
19514   if test -s conftest.err; then
19515     ac_cpp_err=$ac_c_preproc_warn_flag
19516     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19517   else
19518     ac_cpp_err=
19519   fi
19520 else
19521   ac_cpp_err=yes
19522 fi
19523 if test -z "$ac_cpp_err"; then
19524   ac_header_preproc=yes
19525 else
19526   echo "$as_me: failed program was:" >&5
19527 sed 's/^/| /' conftest.$ac_ext >&5
19528
19529   ac_header_preproc=no
19530 fi
19531 rm -f conftest.err conftest.$ac_ext
19532 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19533 echo "${ECHO_T}$ac_header_preproc" >&6
19534
19535 # So?  What about this header?
19536 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19537   yes:no: )
19538     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19539 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19540     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19541 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19542     ac_header_preproc=yes
19543     ;;
19544   no:yes:* )
19545     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19546 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19547     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19548 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19549     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19550 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19551     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19552 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19553     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19554 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19555     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19556 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19557     (
19558       cat <<\_ASBOX
19559 ## --------------------------------------------- ##
19560 ## Report this to <http://www.openldap.org/its/> ##
19561 ## --------------------------------------------- ##
19562 _ASBOX
19563     ) |
19564       sed "s/^/$as_me: WARNING:     /" >&2
19565     ;;
19566 esac
19567 echo "$as_me:$LINENO: checking for $ac_header" >&5
19568 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19569 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19570   echo $ECHO_N "(cached) $ECHO_C" >&6
19571 else
19572   eval "$as_ac_Header=\$ac_header_preproc"
19573 fi
19574 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19575 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19576
19577 fi
19578 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19579   cat >>confdefs.h <<_ACEOF
19580 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19581 _ACEOF
19582
19583 fi
19584
19585 done
19586
19587
19588         if test $ac_cv_header_openssl_ssl_h = yes ; then
19589                 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
19590 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
19591 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
19592   echo $ECHO_N "(cached) $ECHO_C" >&6
19593 else
19594   ac_check_lib_save_LIBS=$LIBS
19595 LIBS="-lssl -lcrypto $LIBS"
19596 cat >conftest.$ac_ext <<_ACEOF
19597 /* confdefs.h.  */
19598 _ACEOF
19599 cat confdefs.h >>conftest.$ac_ext
19600 cat >>conftest.$ac_ext <<_ACEOF
19601 /* end confdefs.h.  */
19602
19603 /* Override any gcc2 internal prototype to avoid an error.  */
19604 #ifdef __cplusplus
19605 extern "C"
19606 #endif
19607 /* We use char because int might match the return type of a gcc2
19608    builtin and then its argument prototype would still apply.  */
19609 char SSL_library_init ();
19610 int
19611 main ()
19612 {
19613 SSL_library_init ();
19614   ;
19615   return 0;
19616 }
19617 _ACEOF
19618 rm -f conftest.$ac_objext conftest$ac_exeext
19619 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19620   (eval $ac_link) 2>conftest.er1
19621   ac_status=$?
19622   grep -v '^ *+' conftest.er1 >conftest.err
19623   rm -f conftest.er1
19624   cat conftest.err >&5
19625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19626   (exit $ac_status); } &&
19627          { ac_try='test -z "$ac_c_werror_flag"
19628                          || test ! -s conftest.err'
19629   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19630   (eval $ac_try) 2>&5
19631   ac_status=$?
19632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19633   (exit $ac_status); }; } &&
19634          { ac_try='test -s conftest$ac_exeext'
19635   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19636   (eval $ac_try) 2>&5
19637   ac_status=$?
19638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19639   (exit $ac_status); }; }; then
19640   ac_cv_lib_ssl_SSL_library_init=yes
19641 else
19642   echo "$as_me: failed program was:" >&5
19643 sed 's/^/| /' conftest.$ac_ext >&5
19644
19645 ac_cv_lib_ssl_SSL_library_init=no
19646 fi
19647 rm -f conftest.err conftest.$ac_objext \
19648       conftest$ac_exeext conftest.$ac_ext
19649 LIBS=$ac_check_lib_save_LIBS
19650 fi
19651 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
19652 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
19653 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
19654   have_openssl=yes
19655                         need_rsaref=no
19656 else
19657   have_openssl=no
19658 fi
19659
19660
19661                 if test $have_openssl = no ; then
19662                         echo "$as_me:$LINENO: checking for ssl3_accept in -lssl" >&5
19663 echo $ECHO_N "checking for ssl3_accept in -lssl... $ECHO_C" >&6
19664 if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then
19665   echo $ECHO_N "(cached) $ECHO_C" >&6
19666 else
19667   ac_check_lib_save_LIBS=$LIBS
19668 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
19669 cat >conftest.$ac_ext <<_ACEOF
19670 /* confdefs.h.  */
19671 _ACEOF
19672 cat confdefs.h >>conftest.$ac_ext
19673 cat >>conftest.$ac_ext <<_ACEOF
19674 /* end confdefs.h.  */
19675
19676 /* Override any gcc2 internal prototype to avoid an error.  */
19677 #ifdef __cplusplus
19678 extern "C"
19679 #endif
19680 /* We use char because int might match the return type of a gcc2
19681    builtin and then its argument prototype would still apply.  */
19682 char ssl3_accept ();
19683 int
19684 main ()
19685 {
19686 ssl3_accept ();
19687   ;
19688   return 0;
19689 }
19690 _ACEOF
19691 rm -f conftest.$ac_objext conftest$ac_exeext
19692 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19693   (eval $ac_link) 2>conftest.er1
19694   ac_status=$?
19695   grep -v '^ *+' conftest.er1 >conftest.err
19696   rm -f conftest.er1
19697   cat conftest.err >&5
19698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19699   (exit $ac_status); } &&
19700          { ac_try='test -z "$ac_c_werror_flag"
19701                          || test ! -s conftest.err'
19702   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19703   (eval $ac_try) 2>&5
19704   ac_status=$?
19705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19706   (exit $ac_status); }; } &&
19707          { ac_try='test -s conftest$ac_exeext'
19708   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19709   (eval $ac_try) 2>&5
19710   ac_status=$?
19711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19712   (exit $ac_status); }; }; then
19713   ac_cv_lib_ssl_ssl3_accept=yes
19714 else
19715   echo "$as_me: failed program was:" >&5
19716 sed 's/^/| /' conftest.$ac_ext >&5
19717
19718 ac_cv_lib_ssl_ssl3_accept=no
19719 fi
19720 rm -f conftest.err conftest.$ac_objext \
19721       conftest$ac_exeext conftest.$ac_ext
19722 LIBS=$ac_check_lib_save_LIBS
19723 fi
19724 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_ssl3_accept" >&5
19725 echo "${ECHO_T}$ac_cv_lib_ssl_ssl3_accept" >&6
19726 if test $ac_cv_lib_ssl_ssl3_accept = yes; then
19727   have_openssl=yes
19728                                 need_rsaref=yes
19729 else
19730   have_openssl=no
19731 fi
19732
19733                 fi
19734
19735                 if test $have_openssl = yes ; then
19736                         ol_with_tls=found
19737                         ol_link_tls=yes
19738
19739
19740 cat >>confdefs.h <<\_ACEOF
19741 #define HAVE_OPENSSL 1
19742 _ACEOF
19743
19744
19745                         if test $need_rsaref = yes; then
19746
19747 cat >>confdefs.h <<\_ACEOF
19748 #define HAVE_RSAREF 1
19749 _ACEOF
19750
19751
19752                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
19753                         else
19754                                 TLS_LIBS="-lssl -lcrypto"
19755                         fi
19756                 fi
19757                 echo "$as_me:$LINENO: checking OpenSSL library version (CRL checking capability)" >&5
19758 echo $ECHO_N "checking OpenSSL library version (CRL checking capability)... $ECHO_C" >&6
19759 if test "${ol_cv_ssl_crl_compat+set}" = set; then
19760   echo $ECHO_N "(cached) $ECHO_C" >&6
19761 else
19762
19763         cat >conftest.$ac_ext <<_ACEOF
19764 /* confdefs.h.  */
19765 _ACEOF
19766 cat confdefs.h >>conftest.$ac_ext
19767 cat >>conftest.$ac_ext <<_ACEOF
19768 /* end confdefs.h.  */
19769
19770 #ifdef HAVE_OPENSSL_SSL_H
19771 #include <openssl/ssl.h>
19772 #else
19773 #include <ssl.h>
19774 #endif
19775
19776 /* Require 0.9.7d+ */
19777 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
19778         char *__ssl_compat = "0.9.7d";
19779 #endif
19780
19781 _ACEOF
19782 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19783   $EGREP "__ssl_compat" >/dev/null 2>&1; then
19784   ol_cv_ssl_crl_compat=yes
19785 else
19786   ol_cv_ssl_crl_compat=no
19787 fi
19788 rm -f conftest*
19789
19790 fi
19791 echo "$as_me:$LINENO: result: $ol_cv_ssl_crl_compat" >&5
19792 echo "${ECHO_T}$ol_cv_ssl_crl_compat" >&6
19793
19794                 if test $ol_cv_ssl_crl_compat = no ; then
19795                         ol_link_ssl=no
19796                 else
19797
19798 cat >>confdefs.h <<\_ACEOF
19799 #define HAVE_OPENSSL_CRL 1
19800 _ACEOF
19801
19802                 fi
19803         fi
19804
19805 else
19806         { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5
19807 echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
19808 fi
19809
19810 WITH_TLS=no
19811 if test $ol_link_tls = yes ; then
19812
19813 cat >>confdefs.h <<\_ACEOF
19814 #define HAVE_TLS 1
19815 _ACEOF
19816
19817         WITH_TLS=yes
19818
19819 elif test $ol_with_tls = auto ; then
19820         { echo "$as_me:$LINENO: WARNING: Could not locate TLS/SSL package" >&5
19821 echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;}
19822         { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5
19823 echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
19824
19825 elif test $ol_with_tls != no ; then
19826         { { echo "$as_me:$LINENO: error: Could not locate TLS/SSL package" >&5
19827 echo "$as_me: error: Could not locate TLS/SSL package" >&2;}
19828    { (exit 1); exit 1; }; }
19829 fi
19830
19831 if test $ol_enable_lmpasswd != no; then
19832         if test $ol_link_tls != yes ; then
19833                 { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5
19834 echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;}
19835    { (exit 1); exit 1; }; }
19836         fi
19837
19838
19839 cat >>confdefs.h <<\_ACEOF
19840 #define SLAPD_LMHASH 1
19841 _ACEOF
19842
19843 fi
19844
19845 ol_link_threads=no
19846
19847 case $ol_with_threads in auto | yes | nt)
19848
19849
19850         echo "$as_me:$LINENO: checking for _beginthread" >&5
19851 echo $ECHO_N "checking for _beginthread... $ECHO_C" >&6
19852 if test "${ac_cv_func__beginthread+set}" = set; then
19853   echo $ECHO_N "(cached) $ECHO_C" >&6
19854 else
19855   cat >conftest.$ac_ext <<_ACEOF
19856 /* confdefs.h.  */
19857 _ACEOF
19858 cat confdefs.h >>conftest.$ac_ext
19859 cat >>conftest.$ac_ext <<_ACEOF
19860 /* end confdefs.h.  */
19861 /* Define _beginthread to an innocuous variant, in case <limits.h> declares _beginthread.
19862    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19863 #define _beginthread innocuous__beginthread
19864
19865 /* System header to define __stub macros and hopefully few prototypes,
19866     which can conflict with char _beginthread (); below.
19867     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19868     <limits.h> exists even on freestanding compilers.  */
19869
19870 #ifdef __STDC__
19871 # include <limits.h>
19872 #else
19873 # include <assert.h>
19874 #endif
19875
19876 #undef _beginthread
19877
19878 /* Override any gcc2 internal prototype to avoid an error.  */
19879 #ifdef __cplusplus
19880 extern "C"
19881 {
19882 #endif
19883 /* We use char because int might match the return type of a gcc2
19884    builtin and then its argument prototype would still apply.  */
19885 char _beginthread ();
19886 /* The GNU C library defines this for functions which it implements
19887     to always fail with ENOSYS.  Some functions are actually named
19888     something starting with __ and the normal name is an alias.  */
19889 #if defined (__stub__beginthread) || defined (__stub____beginthread)
19890 choke me
19891 #else
19892 char (*f) () = _beginthread;
19893 #endif
19894 #ifdef __cplusplus
19895 }
19896 #endif
19897
19898 int
19899 main ()
19900 {
19901 return f != _beginthread;
19902   ;
19903   return 0;
19904 }
19905 _ACEOF
19906 rm -f conftest.$ac_objext conftest$ac_exeext
19907 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19908   (eval $ac_link) 2>conftest.er1
19909   ac_status=$?
19910   grep -v '^ *+' conftest.er1 >conftest.err
19911   rm -f conftest.er1
19912   cat conftest.err >&5
19913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19914   (exit $ac_status); } &&
19915          { ac_try='test -z "$ac_c_werror_flag"
19916                          || test ! -s conftest.err'
19917   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19918   (eval $ac_try) 2>&5
19919   ac_status=$?
19920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19921   (exit $ac_status); }; } &&
19922          { ac_try='test -s conftest$ac_exeext'
19923   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19924   (eval $ac_try) 2>&5
19925   ac_status=$?
19926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19927   (exit $ac_status); }; }; then
19928   ac_cv_func__beginthread=yes
19929 else
19930   echo "$as_me: failed program was:" >&5
19931 sed 's/^/| /' conftest.$ac_ext >&5
19932
19933 ac_cv_func__beginthread=no
19934 fi
19935 rm -f conftest.err conftest.$ac_objext \
19936       conftest$ac_exeext conftest.$ac_ext
19937 fi
19938 echo "$as_me:$LINENO: result: $ac_cv_func__beginthread" >&5
19939 echo "${ECHO_T}$ac_cv_func__beginthread" >&6
19940
19941
19942         if test $ac_cv_func__beginthread = yes ; then
19943
19944 cat >>confdefs.h <<\_ACEOF
19945 #define HAVE_NT_THREADS 1
19946 _ACEOF
19947
19948                 ol_cv_nt_threads=yes
19949         fi
19950
19951
19952         if test "$ol_cv_nt_threads" = yes ; then
19953                 ol_link_threads=nt
19954                 ol_with_threads=found
19955                 ol_with_yielding_select=yes
19956
19957
19958 cat >>confdefs.h <<\_ACEOF
19959 #define HAVE_NT_SERVICE_MANAGER 1
19960 _ACEOF
19961
19962
19963 cat >>confdefs.h <<\_ACEOF
19964 #define HAVE_NT_EVENT_LOG 1
19965 _ACEOF
19966
19967         fi
19968
19969         if test $ol_with_threads = nt ; then
19970                 { { echo "$as_me:$LINENO: error: could not locate NT Threads" >&5
19971 echo "$as_me: error: could not locate NT Threads" >&2;}
19972    { (exit 1); exit 1; }; }
19973         fi
19974         ;;
19975 esac
19976
19977 case $ol_with_threads in auto | yes | posix)
19978
19979
19980 for ac_header in pthread.h
19981 do
19982 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19983 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19984   echo "$as_me:$LINENO: checking for $ac_header" >&5
19985 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19986 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19987   echo $ECHO_N "(cached) $ECHO_C" >&6
19988 fi
19989 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19990 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19991 else
19992   # Is the header compilable?
19993 echo "$as_me:$LINENO: checking $ac_header usability" >&5
19994 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19995 cat >conftest.$ac_ext <<_ACEOF
19996 /* confdefs.h.  */
19997 _ACEOF
19998 cat confdefs.h >>conftest.$ac_ext
19999 cat >>conftest.$ac_ext <<_ACEOF
20000 /* end confdefs.h.  */
20001 $ac_includes_default
20002 #include <$ac_header>
20003 _ACEOF
20004 rm -f conftest.$ac_objext
20005 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20006   (eval $ac_compile) 2>conftest.er1
20007   ac_status=$?
20008   grep -v '^ *+' conftest.er1 >conftest.err
20009   rm -f conftest.er1
20010   cat conftest.err >&5
20011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20012   (exit $ac_status); } &&
20013          { ac_try='test -z "$ac_c_werror_flag"
20014                          || test ! -s conftest.err'
20015   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20016   (eval $ac_try) 2>&5
20017   ac_status=$?
20018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20019   (exit $ac_status); }; } &&
20020          { ac_try='test -s conftest.$ac_objext'
20021   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20022   (eval $ac_try) 2>&5
20023   ac_status=$?
20024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20025   (exit $ac_status); }; }; then
20026   ac_header_compiler=yes
20027 else
20028   echo "$as_me: failed program was:" >&5
20029 sed 's/^/| /' conftest.$ac_ext >&5
20030
20031 ac_header_compiler=no
20032 fi
20033 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20034 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20035 echo "${ECHO_T}$ac_header_compiler" >&6
20036
20037 # Is the header present?
20038 echo "$as_me:$LINENO: checking $ac_header presence" >&5
20039 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20040 cat >conftest.$ac_ext <<_ACEOF
20041 /* confdefs.h.  */
20042 _ACEOF
20043 cat confdefs.h >>conftest.$ac_ext
20044 cat >>conftest.$ac_ext <<_ACEOF
20045 /* end confdefs.h.  */
20046 #include <$ac_header>
20047 _ACEOF
20048 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20049   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20050   ac_status=$?
20051   grep -v '^ *+' conftest.er1 >conftest.err
20052   rm -f conftest.er1
20053   cat conftest.err >&5
20054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20055   (exit $ac_status); } >/dev/null; then
20056   if test -s conftest.err; then
20057     ac_cpp_err=$ac_c_preproc_warn_flag
20058     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20059   else
20060     ac_cpp_err=
20061   fi
20062 else
20063   ac_cpp_err=yes
20064 fi
20065 if test -z "$ac_cpp_err"; then
20066   ac_header_preproc=yes
20067 else
20068   echo "$as_me: failed program was:" >&5
20069 sed 's/^/| /' conftest.$ac_ext >&5
20070
20071   ac_header_preproc=no
20072 fi
20073 rm -f conftest.err conftest.$ac_ext
20074 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20075 echo "${ECHO_T}$ac_header_preproc" >&6
20076
20077 # So?  What about this header?
20078 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20079   yes:no: )
20080     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20081 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
20082     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20083 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20084     ac_header_preproc=yes
20085     ;;
20086   no:yes:* )
20087     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20088 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
20089     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
20090 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
20091     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20092 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20093     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
20094 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
20095     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20096 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
20097     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20098 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
20099     (
20100       cat <<\_ASBOX
20101 ## --------------------------------------------- ##
20102 ## Report this to <http://www.openldap.org/its/> ##
20103 ## --------------------------------------------- ##
20104 _ASBOX
20105     ) |
20106       sed "s/^/$as_me: WARNING:     /" >&2
20107     ;;
20108 esac
20109 echo "$as_me:$LINENO: checking for $ac_header" >&5
20110 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20111 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20112   echo $ECHO_N "(cached) $ECHO_C" >&6
20113 else
20114   eval "$as_ac_Header=\$ac_header_preproc"
20115 fi
20116 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20117 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20118
20119 fi
20120 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20121   cat >>confdefs.h <<_ACEOF
20122 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20123 _ACEOF
20124
20125 fi
20126
20127 done
20128
20129
20130         if test $ac_cv_header_pthread_h = yes ; then
20131                 echo "$as_me:$LINENO: checking POSIX thread version" >&5
20132 echo $ECHO_N "checking POSIX thread version... $ECHO_C" >&6
20133 if test "${ol_cv_pthread_version+set}" = set; then
20134   echo $ECHO_N "(cached) $ECHO_C" >&6
20135 else
20136
20137         cat >conftest.$ac_ext <<_ACEOF
20138 /* confdefs.h.  */
20139 _ACEOF
20140 cat confdefs.h >>conftest.$ac_ext
20141 cat >>conftest.$ac_ext <<_ACEOF
20142 /* end confdefs.h.  */
20143
20144 #               include <pthread.h>
20145
20146 int
20147 main ()
20148 {
20149
20150                 int i = PTHREAD_CREATE_JOINABLE;
20151
20152   ;
20153   return 0;
20154 }
20155 _ACEOF
20156 rm -f conftest.$ac_objext
20157 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20158   (eval $ac_compile) 2>conftest.er1
20159   ac_status=$?
20160   grep -v '^ *+' conftest.er1 >conftest.err
20161   rm -f conftest.er1
20162   cat conftest.err >&5
20163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20164   (exit $ac_status); } &&
20165          { ac_try='test -z "$ac_c_werror_flag"
20166                          || test ! -s conftest.err'
20167   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20168   (eval $ac_try) 2>&5
20169   ac_status=$?
20170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20171   (exit $ac_status); }; } &&
20172          { ac_try='test -s conftest.$ac_objext'
20173   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20174   (eval $ac_try) 2>&5
20175   ac_status=$?
20176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20177   (exit $ac_status); }; }; then
20178
20179         cat >conftest.$ac_ext <<_ACEOF
20180 /* confdefs.h.  */
20181 _ACEOF
20182 cat confdefs.h >>conftest.$ac_ext
20183 cat >>conftest.$ac_ext <<_ACEOF
20184 /* end confdefs.h.  */
20185 #include <pthread.h>
20186
20187 _ACEOF
20188 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20189   $EGREP "pthread_detach" >/dev/null 2>&1; then
20190   ol_cv_pthread_version=10
20191 else
20192   ol_cv_pthread_version=8
20193 fi
20194 rm -f conftest*
20195
20196 else
20197   echo "$as_me: failed program was:" >&5
20198 sed 's/^/| /' conftest.$ac_ext >&5
20199
20200
20201         cat >conftest.$ac_ext <<_ACEOF
20202 /* confdefs.h.  */
20203 _ACEOF
20204 cat confdefs.h >>conftest.$ac_ext
20205 cat >>conftest.$ac_ext <<_ACEOF
20206 /* end confdefs.h.  */
20207
20208 #               include <pthread.h>
20209 #               ifdef PTHREAD_CREATE_UNDETACHED
20210                 draft7
20211 #               endif
20212
20213 _ACEOF
20214 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20215   $EGREP "draft7" >/dev/null 2>&1; then
20216   ol_cv_pthread_version=7
20217 else
20218
20219         cat >conftest.$ac_ext <<_ACEOF
20220 /* confdefs.h.  */
20221 _ACEOF
20222 cat confdefs.h >>conftest.$ac_ext
20223 cat >>conftest.$ac_ext <<_ACEOF
20224 /* end confdefs.h.  */
20225 #include <pthread.h>
20226
20227 _ACEOF
20228 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20229   $EGREP "pthread_attr_init" >/dev/null 2>&1; then
20230   ol_cv_pthread_version=6
20231 else
20232
20233         cat >conftest.$ac_ext <<_ACEOF
20234 /* confdefs.h.  */
20235 _ACEOF
20236 cat confdefs.h >>conftest.$ac_ext
20237 cat >>conftest.$ac_ext <<_ACEOF
20238 /* end confdefs.h.  */
20239
20240 #               include <pthread.h>
20241 #ifdef          PTHREAD_MUTEX_INITIALIZER
20242                 draft5
20243 #endif
20244
20245 _ACEOF
20246 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20247   $EGREP "draft5" >/dev/null 2>&1; then
20248   ol_cv_pthread_version=5
20249 else
20250   ol_cv_pthread_version=4
20251 fi
20252 rm -f conftest*
20253
20254 fi
20255 rm -f conftest*
20256
20257 fi
20258 rm -f conftest*
20259
20260 fi
20261 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20262
20263 fi
20264 echo "$as_me:$LINENO: result: $ol_cv_pthread_version" >&5
20265 echo "${ECHO_T}$ol_cv_pthread_version" >&6
20266
20267
20268                 if test $ol_cv_pthread_version != 0 ; then
20269
20270 cat >>confdefs.h <<_ACEOF
20271 #define HAVE_PTHREADS $ol_cv_pthread_version
20272 _ACEOF
20273
20274                 else
20275                         { { echo "$as_me:$LINENO: error: unknown pthread version" >&5
20276 echo "$as_me: error: unknown pthread version" >&2;}
20277    { (exit 1); exit 1; }; }
20278                 fi
20279
20280                 # consider threads found
20281                 ol_with_threads=found
20282
20283
20284         echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5
20285 echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6
20286 if test "${ol_cv_header_linux_threads+set}" = set; then
20287   echo $ECHO_N "(cached) $ECHO_C" >&6
20288 else
20289   cat >conftest.$ac_ext <<_ACEOF
20290 /* confdefs.h.  */
20291 _ACEOF
20292 cat confdefs.h >>conftest.$ac_ext
20293 cat >>conftest.$ac_ext <<_ACEOF
20294 /* end confdefs.h.  */
20295 #include <pthread.h>
20296 _ACEOF
20297 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20298   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then
20299   ol_cv_header_linux_threads=yes
20300 else
20301   ol_cv_header_linux_threads=no
20302 fi
20303 rm -f conftest*
20304
20305
20306 fi
20307 echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5
20308 echo "${ECHO_T}$ol_cv_header_linux_threads" >&6
20309         if test $ol_cv_header_linux_threads = yes; then
20310
20311 cat >>confdefs.h <<\_ACEOF
20312 #define HAVE_LINUX_THREADS 1
20313 _ACEOF
20314
20315         fi
20316
20317
20318         echo "$as_me:$LINENO: checking for GNU Pth pthread.h" >&5
20319 echo $ECHO_N "checking for GNU Pth pthread.h... $ECHO_C" >&6
20320 if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then
20321   echo $ECHO_N "(cached) $ECHO_C" >&6
20322 else
20323   cat >conftest.$ac_ext <<_ACEOF
20324 /* confdefs.h.  */
20325 _ACEOF
20326 cat confdefs.h >>conftest.$ac_ext
20327 cat >>conftest.$ac_ext <<_ACEOF
20328 /* end confdefs.h.  */
20329 #include <pthread.h>
20330 #ifdef _POSIX_THREAD_IS_GNU_PTH
20331         __gnu_pth__;
20332 #endif
20333
20334 _ACEOF
20335 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20336   $EGREP "__gnu_pth__" >/dev/null 2>&1; then
20337   ol_cv_header_gnu_pth_pthread_h=yes
20338 else
20339   ol_cv_header_gnu_pth_pthread_h=no
20340 fi
20341 rm -f conftest*
20342
20343
20344 fi
20345 echo "$as_me:$LINENO: result: $ol_cv_header_gnu_pth_pthread_h" >&5
20346 echo "${ECHO_T}$ol_cv_header_gnu_pth_pthread_h" >&6
20347
20348
20349                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
20350
20351 for ac_header in sched.h
20352 do
20353 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20354 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20355   echo "$as_me:$LINENO: checking for $ac_header" >&5
20356 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20357 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20358   echo $ECHO_N "(cached) $ECHO_C" >&6
20359 fi
20360 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20361 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20362 else
20363   # Is the header compilable?
20364 echo "$as_me:$LINENO: checking $ac_header usability" >&5
20365 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20366 cat >conftest.$ac_ext <<_ACEOF
20367 /* confdefs.h.  */
20368 _ACEOF
20369 cat confdefs.h >>conftest.$ac_ext
20370 cat >>conftest.$ac_ext <<_ACEOF
20371 /* end confdefs.h.  */
20372 $ac_includes_default
20373 #include <$ac_header>
20374 _ACEOF
20375 rm -f conftest.$ac_objext
20376 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20377   (eval $ac_compile) 2>conftest.er1
20378   ac_status=$?
20379   grep -v '^ *+' conftest.er1 >conftest.err
20380   rm -f conftest.er1
20381   cat conftest.err >&5
20382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20383   (exit $ac_status); } &&
20384          { ac_try='test -z "$ac_c_werror_flag"
20385                          || test ! -s conftest.err'
20386   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20387   (eval $ac_try) 2>&5
20388   ac_status=$?
20389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20390   (exit $ac_status); }; } &&
20391          { ac_try='test -s conftest.$ac_objext'
20392   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20393   (eval $ac_try) 2>&5
20394   ac_status=$?
20395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20396   (exit $ac_status); }; }; then
20397   ac_header_compiler=yes
20398 else
20399   echo "$as_me: failed program was:" >&5
20400 sed 's/^/| /' conftest.$ac_ext >&5
20401
20402 ac_header_compiler=no
20403 fi
20404 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20405 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20406 echo "${ECHO_T}$ac_header_compiler" >&6
20407
20408 # Is the header present?
20409 echo "$as_me:$LINENO: checking $ac_header presence" >&5
20410 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20411 cat >conftest.$ac_ext <<_ACEOF
20412 /* confdefs.h.  */
20413 _ACEOF
20414 cat confdefs.h >>conftest.$ac_ext
20415 cat >>conftest.$ac_ext <<_ACEOF
20416 /* end confdefs.h.  */
20417 #include <$ac_header>
20418 _ACEOF
20419 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20420   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20421   ac_status=$?
20422   grep -v '^ *+' conftest.er1 >conftest.err
20423   rm -f conftest.er1
20424   cat conftest.err >&5
20425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20426   (exit $ac_status); } >/dev/null; then
20427   if test -s conftest.err; then
20428     ac_cpp_err=$ac_c_preproc_warn_flag
20429     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20430   else
20431     ac_cpp_err=
20432   fi
20433 else
20434   ac_cpp_err=yes
20435 fi
20436 if test -z "$ac_cpp_err"; then
20437   ac_header_preproc=yes
20438 else
20439   echo "$as_me: failed program was:" >&5
20440 sed 's/^/| /' conftest.$ac_ext >&5
20441
20442   ac_header_preproc=no
20443 fi
20444 rm -f conftest.err conftest.$ac_ext
20445 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20446 echo "${ECHO_T}$ac_header_preproc" >&6
20447
20448 # So?  What about this header?
20449 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20450   yes:no: )
20451     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20452 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
20453     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20454 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20455     ac_header_preproc=yes
20456     ;;
20457   no:yes:* )
20458     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20459 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
20460     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
20461 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
20462     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20463 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20464     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
20465 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
20466     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20467 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
20468     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20469 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
20470     (
20471       cat <<\_ASBOX
20472 ## --------------------------------------------- ##
20473 ## Report this to <http://www.openldap.org/its/> ##
20474 ## --------------------------------------------- ##
20475 _ASBOX
20476     ) |
20477       sed "s/^/$as_me: WARNING:     /" >&2
20478     ;;
20479 esac
20480 echo "$as_me:$LINENO: checking for $ac_header" >&5
20481 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20482 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20483   echo $ECHO_N "(cached) $ECHO_C" >&6
20484 else
20485   eval "$as_ac_Header=\$ac_header_preproc"
20486 fi
20487 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20488 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20489
20490 fi
20491 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20492   cat >>confdefs.h <<_ACEOF
20493 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20494 _ACEOF
20495
20496 fi
20497
20498 done
20499
20500                 fi
20501
20502
20503                                 echo "$as_me:$LINENO: checking for pthread_create in default libraries" >&5
20504 echo $ECHO_N "checking for pthread_create in default libraries... $ECHO_C" >&6
20505 if test "${ol_cv_pthread_create+set}" = set; then
20506   echo $ECHO_N "(cached) $ECHO_C" >&6
20507 else
20508
20509                         if test "$cross_compiling" = yes; then
20510   cat >conftest.$ac_ext <<_ACEOF
20511 /* confdefs.h.  */
20512 _ACEOF
20513 cat confdefs.h >>conftest.$ac_ext
20514 cat >>conftest.$ac_ext <<_ACEOF
20515 /* end confdefs.h.  */
20516
20517 /* pthread test headers */
20518 #include <pthread.h>
20519 #if HAVE_PTHREADS < 7
20520 #include <errno.h>
20521 #endif
20522 #ifndef NULL
20523 #define NULL (void*)0
20524 #endif
20525
20526 static void *task(p)
20527         void *p;
20528 {
20529         return (void *) (p == NULL);
20530 }
20531
20532 int
20533 main ()
20534 {
20535
20536         /* pthread test function */
20537 #ifndef PTHREAD_CREATE_DETACHED
20538 #define PTHREAD_CREATE_DETACHED 1
20539 #endif
20540         pthread_t t;
20541         int status;
20542         int detach = PTHREAD_CREATE_DETACHED;
20543
20544 #if HAVE_PTHREADS > 4
20545         /* Final pthreads */
20546         pthread_attr_t attr;
20547
20548         status = pthread_attr_init(&attr);
20549         if( status ) return status;
20550
20551 #if HAVE_PTHREADS < 7
20552         status = pthread_attr_setdetachstate(&attr, &detach);
20553         if( status < 0 ) status = errno;
20554 #else
20555         status = pthread_attr_setdetachstate(&attr, detach);
20556 #endif
20557         if( status ) return status;
20558         status = pthread_create( &t, &attr, task, NULL );
20559 #if HAVE_PTHREADS < 7
20560         if( status < 0 ) status = errno;
20561 #endif
20562         if( status ) return status;
20563 #else
20564         /* Draft 4 pthreads */
20565         status = pthread_create( &t, pthread_attr_default, task, NULL );
20566         if( status ) return errno;
20567
20568         /* give thread a chance to complete */
20569         /* it should remain joinable and hence detachable */
20570         sleep( 1 );
20571
20572         status = pthread_detach( &t );
20573         if( status ) return errno;
20574 #endif
20575
20576 #ifdef HAVE_LINUX_THREADS
20577         pthread_kill_other_threads_np();
20578 #endif
20579
20580         return 0;
20581
20582   ;
20583   return 0;
20584 }
20585 _ACEOF
20586 rm -f conftest.$ac_objext conftest$ac_exeext
20587 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20588   (eval $ac_link) 2>conftest.er1
20589   ac_status=$?
20590   grep -v '^ *+' conftest.er1 >conftest.err
20591   rm -f conftest.er1
20592   cat conftest.err >&5
20593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20594   (exit $ac_status); } &&
20595          { ac_try='test -z "$ac_c_werror_flag"
20596                          || test ! -s conftest.err'
20597   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20598   (eval $ac_try) 2>&5
20599   ac_status=$?
20600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20601   (exit $ac_status); }; } &&
20602          { ac_try='test -s conftest$ac_exeext'
20603   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20604   (eval $ac_try) 2>&5
20605   ac_status=$?
20606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20607   (exit $ac_status); }; }; then
20608   ol_cv_pthread_create=yes
20609 else
20610   echo "$as_me: failed program was:" >&5
20611 sed 's/^/| /' conftest.$ac_ext >&5
20612
20613 ol_cv_pthread_create=no
20614 fi
20615 rm -f conftest.err conftest.$ac_objext \
20616       conftest$ac_exeext conftest.$ac_ext
20617 else
20618   cat >conftest.$ac_ext <<_ACEOF
20619 /* confdefs.h.  */
20620 _ACEOF
20621 cat confdefs.h >>conftest.$ac_ext
20622 cat >>conftest.$ac_ext <<_ACEOF
20623 /* end confdefs.h.  */
20624
20625 /* pthread test headers */
20626 #include <pthread.h>
20627 #if HAVE_PTHREADS < 7
20628 #include <errno.h>
20629 #endif
20630 #ifndef NULL
20631 #define NULL (void*)0
20632 #endif
20633
20634 static void *task(p)
20635         void *p;
20636 {
20637         return (void *) (p == NULL);
20638 }
20639
20640
20641 int main(argc, argv)
20642         int argc;
20643         char **argv;
20644 {
20645
20646         /* pthread test function */
20647 #ifndef PTHREAD_CREATE_DETACHED
20648 #define PTHREAD_CREATE_DETACHED 1
20649 #endif
20650         pthread_t t;
20651         int status;
20652         int detach = PTHREAD_CREATE_DETACHED;
20653
20654 #if HAVE_PTHREADS > 4
20655         /* Final pthreads */
20656         pthread_attr_t attr;
20657
20658         status = pthread_attr_init(&attr);
20659         if( status ) return status;
20660
20661 #if HAVE_PTHREADS < 7
20662         status = pthread_attr_setdetachstate(&attr, &detach);
20663         if( status < 0 ) status = errno;
20664 #else
20665         status = pthread_attr_setdetachstate(&attr, detach);
20666 #endif
20667         if( status ) return status;
20668         status = pthread_create( &t, &attr, task, NULL );
20669 #if HAVE_PTHREADS < 7
20670         if( status < 0 ) status = errno;
20671 #endif
20672         if( status ) return status;
20673 #else
20674         /* Draft 4 pthreads */
20675         status = pthread_create( &t, pthread_attr_default, task, NULL );
20676         if( status ) return errno;
20677
20678         /* give thread a chance to complete */
20679         /* it should remain joinable and hence detachable */
20680         sleep( 1 );
20681
20682         status = pthread_detach( &t );
20683         if( status ) return errno;
20684 #endif
20685
20686 #ifdef HAVE_LINUX_THREADS
20687         pthread_kill_other_threads_np();
20688 #endif
20689
20690         return 0;
20691
20692 }
20693
20694 _ACEOF
20695 rm -f conftest$ac_exeext
20696 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20697   (eval $ac_link) 2>&5
20698   ac_status=$?
20699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20700   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20702   (eval $ac_try) 2>&5
20703   ac_status=$?
20704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20705   (exit $ac_status); }; }; then
20706   ol_cv_pthread_create=yes
20707 else
20708   echo "$as_me: program exited with status $ac_status" >&5
20709 echo "$as_me: failed program was:" >&5
20710 sed 's/^/| /' conftest.$ac_ext >&5
20711
20712 ( exit $ac_status )
20713 ol_cv_pthread_create=no
20714 fi
20715 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20716 fi
20717 fi
20718 echo "$as_me:$LINENO: result: $ol_cv_pthread_create" >&5
20719 echo "${ECHO_T}$ol_cv_pthread_create" >&6
20720
20721                 if test $ol_cv_pthread_create != no ; then
20722                         ol_link_threads=posix
20723                         ol_link_pthreads=""
20724                 fi
20725
20726                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
20727 if test "$ol_link_threads" = no ; then
20728         # try -kthread
20729         echo "$as_me:$LINENO: checking for pthread link with -kthread" >&5
20730 echo $ECHO_N "checking for pthread link with -kthread... $ECHO_C" >&6
20731 if test "${ol_cv_pthread_kthread+set}" = set; then
20732   echo $ECHO_N "(cached) $ECHO_C" >&6
20733 else
20734
20735                 # save the flags
20736                 ol_LIBS="$LIBS"
20737                 LIBS="-kthread $LIBS"
20738
20739                 if test "$cross_compiling" = yes; then
20740   cat >conftest.$ac_ext <<_ACEOF
20741 /* confdefs.h.  */
20742 _ACEOF
20743 cat confdefs.h >>conftest.$ac_ext
20744 cat >>conftest.$ac_ext <<_ACEOF
20745 /* end confdefs.h.  */
20746
20747 /* pthread test headers */
20748 #include <pthread.h>
20749 #if HAVE_PTHREADS < 7
20750 #include <errno.h>
20751 #endif
20752 #ifndef NULL
20753 #define NULL (void*)0
20754 #endif
20755
20756 static void *task(p)
20757         void *p;
20758 {
20759         return (void *) (p == NULL);
20760 }
20761
20762 int
20763 main ()
20764 {
20765
20766         /* pthread test function */
20767 #ifndef PTHREAD_CREATE_DETACHED
20768 #define PTHREAD_CREATE_DETACHED 1
20769 #endif
20770         pthread_t t;
20771         int status;
20772         int detach = PTHREAD_CREATE_DETACHED;
20773
20774 #if HAVE_PTHREADS > 4
20775         /* Final pthreads */
20776         pthread_attr_t attr;
20777
20778         status = pthread_attr_init(&attr);
20779         if( status ) return status;
20780
20781 #if HAVE_PTHREADS < 7
20782         status = pthread_attr_setdetachstate(&attr, &detach);
20783         if( status < 0 ) status = errno;
20784 #else
20785         status = pthread_attr_setdetachstate(&attr, detach);
20786 #endif
20787         if( status ) return status;
20788         status = pthread_create( &t, &attr, task, NULL );
20789 #if HAVE_PTHREADS < 7
20790         if( status < 0 ) status = errno;
20791 #endif
20792         if( status ) return status;
20793 #else
20794         /* Draft 4 pthreads */
20795         status = pthread_create( &t, pthread_attr_default, task, NULL );
20796         if( status ) return errno;
20797
20798         /* give thread a chance to complete */
20799         /* it should remain joinable and hence detachable */
20800         sleep( 1 );
20801
20802         status = pthread_detach( &t );
20803         if( status ) return errno;
20804 #endif
20805
20806 #ifdef HAVE_LINUX_THREADS
20807         pthread_kill_other_threads_np();
20808 #endif
20809
20810         return 0;
20811
20812   ;
20813   return 0;
20814 }
20815 _ACEOF
20816 rm -f conftest.$ac_objext conftest$ac_exeext
20817 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20818   (eval $ac_link) 2>conftest.er1
20819   ac_status=$?
20820   grep -v '^ *+' conftest.er1 >conftest.err
20821   rm -f conftest.er1
20822   cat conftest.err >&5
20823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20824   (exit $ac_status); } &&
20825          { ac_try='test -z "$ac_c_werror_flag"
20826                          || test ! -s conftest.err'
20827   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20828   (eval $ac_try) 2>&5
20829   ac_status=$?
20830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20831   (exit $ac_status); }; } &&
20832          { ac_try='test -s conftest$ac_exeext'
20833   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20834   (eval $ac_try) 2>&5
20835   ac_status=$?
20836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20837   (exit $ac_status); }; }; then
20838   ol_cv_pthread_kthread=yes
20839 else
20840   echo "$as_me: failed program was:" >&5
20841 sed 's/^/| /' conftest.$ac_ext >&5
20842
20843 ol_cv_pthread_kthread=no
20844 fi
20845 rm -f conftest.err conftest.$ac_objext \
20846       conftest$ac_exeext conftest.$ac_ext
20847 else
20848   cat >conftest.$ac_ext <<_ACEOF
20849 /* confdefs.h.  */
20850 _ACEOF
20851 cat confdefs.h >>conftest.$ac_ext
20852 cat >>conftest.$ac_ext <<_ACEOF
20853 /* end confdefs.h.  */
20854
20855 /* pthread test headers */
20856 #include <pthread.h>
20857 #if HAVE_PTHREADS < 7
20858 #include <errno.h>
20859 #endif
20860 #ifndef NULL
20861 #define NULL (void*)0
20862 #endif
20863
20864 static void *task(p)
20865         void *p;
20866 {
20867         return (void *) (p == NULL);
20868 }
20869
20870
20871 int main(argc, argv)
20872         int argc;
20873         char **argv;
20874 {
20875
20876         /* pthread test function */
20877 #ifndef PTHREAD_CREATE_DETACHED
20878 #define PTHREAD_CREATE_DETACHED 1
20879 #endif
20880         pthread_t t;
20881         int status;
20882         int detach = PTHREAD_CREATE_DETACHED;
20883
20884 #if HAVE_PTHREADS > 4
20885         /* Final pthreads */
20886         pthread_attr_t attr;
20887
20888         status = pthread_attr_init(&attr);
20889         if( status ) return status;
20890
20891 #if HAVE_PTHREADS < 7
20892         status = pthread_attr_setdetachstate(&attr, &detach);
20893         if( status < 0 ) status = errno;
20894 #else
20895         status = pthread_attr_setdetachstate(&attr, detach);
20896 #endif
20897         if( status ) return status;
20898         status = pthread_create( &t, &attr, task, NULL );
20899 #if HAVE_PTHREADS < 7
20900         if( status < 0 ) status = errno;
20901 #endif
20902         if( status ) return status;
20903 #else
20904         /* Draft 4 pthreads */
20905         status = pthread_create( &t, pthread_attr_default, task, NULL );
20906         if( status ) return errno;
20907
20908         /* give thread a chance to complete */
20909         /* it should remain joinable and hence detachable */
20910         sleep( 1 );
20911
20912         status = pthread_detach( &t );
20913         if( status ) return errno;
20914 #endif
20915
20916 #ifdef HAVE_LINUX_THREADS
20917         pthread_kill_other_threads_np();
20918 #endif
20919
20920         return 0;
20921
20922 }
20923
20924 _ACEOF
20925 rm -f conftest$ac_exeext
20926 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20927   (eval $ac_link) 2>&5
20928   ac_status=$?
20929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20930   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20931   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20932   (eval $ac_try) 2>&5
20933   ac_status=$?
20934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20935   (exit $ac_status); }; }; then
20936   ol_cv_pthread_kthread=yes
20937 else
20938   echo "$as_me: program exited with status $ac_status" >&5
20939 echo "$as_me: failed program was:" >&5
20940 sed 's/^/| /' conftest.$ac_ext >&5
20941
20942 ( exit $ac_status )
20943 ol_cv_pthread_kthread=no
20944 fi
20945 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20946 fi
20947
20948                 # restore the LIBS
20949                 LIBS="$ol_LIBS"
20950
20951 fi
20952 echo "$as_me:$LINENO: result: $ol_cv_pthread_kthread" >&5
20953 echo "${ECHO_T}$ol_cv_pthread_kthread" >&6
20954
20955         if test $ol_cv_pthread_kthread = yes ; then
20956                 ol_link_pthreads="-kthread"
20957                 ol_link_threads=posix
20958         fi
20959 fi
20960
20961                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
20962 if test "$ol_link_threads" = no ; then
20963         # try -pthread
20964         echo "$as_me:$LINENO: checking for pthread link with -pthread" >&5
20965 echo $ECHO_N "checking for pthread link with -pthread... $ECHO_C" >&6
20966 if test "${ol_cv_pthread_pthread+set}" = set; then
20967   echo $ECHO_N "(cached) $ECHO_C" >&6
20968 else
20969
20970                 # save the flags
20971                 ol_LIBS="$LIBS"
20972                 LIBS="-pthread $LIBS"
20973
20974                 if test "$cross_compiling" = yes; then
20975   cat >conftest.$ac_ext <<_ACEOF
20976 /* confdefs.h.  */
20977 _ACEOF
20978 cat confdefs.h >>conftest.$ac_ext
20979 cat >>conftest.$ac_ext <<_ACEOF
20980 /* end confdefs.h.  */
20981
20982 /* pthread test headers */
20983 #include <pthread.h>
20984 #if HAVE_PTHREADS < 7
20985 #include <errno.h>
20986 #endif
20987 #ifndef NULL
20988 #define NULL (void*)0
20989 #endif
20990
20991 static void *task(p)
20992         void *p;
20993 {
20994         return (void *) (p == NULL);
20995 }
20996
20997 int
20998 main ()
20999 {
21000
21001         /* pthread test function */
21002 #ifndef PTHREAD_CREATE_DETACHED
21003 #define PTHREAD_CREATE_DETACHED 1
21004 #endif
21005         pthread_t t;
21006         int status;
21007         int detach = PTHREAD_CREATE_DETACHED;
21008
21009 #if HAVE_PTHREADS > 4
21010         /* Final pthreads */
21011         pthread_attr_t attr;
21012
21013         status = pthread_attr_init(&attr);
21014         if( status ) return status;
21015
21016 #if HAVE_PTHREADS < 7
21017         status = pthread_attr_setdetachstate(&attr, &detach);
21018         if( status < 0 ) status = errno;
21019 #else
21020         status = pthread_attr_setdetachstate(&attr, detach);
21021 #endif
21022         if( status ) return status;
21023         status = pthread_create( &t, &attr, task, NULL );
21024 #if HAVE_PTHREADS < 7
21025         if( status < 0 ) status = errno;
21026 #endif
21027         if( status ) return status;
21028 #else
21029         /* Draft 4 pthreads */
21030         status = pthread_create( &t, pthread_attr_default, task, NULL );
21031         if( status ) return errno;
21032
21033         /* give thread a chance to complete */
21034         /* it should remain joinable and hence detachable */
21035         sleep( 1 );
21036
21037         status = pthread_detach( &t );
21038         if( status ) return errno;
21039 #endif
21040
21041 #ifdef HAVE_LINUX_THREADS
21042         pthread_kill_other_threads_np();
21043 #endif
21044
21045         return 0;
21046
21047   ;
21048   return 0;
21049 }
21050 _ACEOF
21051 rm -f conftest.$ac_objext conftest$ac_exeext
21052 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21053   (eval $ac_link) 2>conftest.er1
21054   ac_status=$?
21055   grep -v '^ *+' conftest.er1 >conftest.err
21056   rm -f conftest.er1
21057   cat conftest.err >&5
21058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21059   (exit $ac_status); } &&
21060          { ac_try='test -z "$ac_c_werror_flag"
21061                          || test ! -s conftest.err'
21062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21063   (eval $ac_try) 2>&5
21064   ac_status=$?
21065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21066   (exit $ac_status); }; } &&
21067          { ac_try='test -s conftest$ac_exeext'
21068   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21069   (eval $ac_try) 2>&5
21070   ac_status=$?
21071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21072   (exit $ac_status); }; }; then
21073   ol_cv_pthread_pthread=yes
21074 else
21075   echo "$as_me: failed program was:" >&5
21076 sed 's/^/| /' conftest.$ac_ext >&5
21077
21078 ol_cv_pthread_pthread=no
21079 fi
21080 rm -f conftest.err conftest.$ac_objext \
21081       conftest$ac_exeext conftest.$ac_ext
21082 else
21083   cat >conftest.$ac_ext <<_ACEOF
21084 /* confdefs.h.  */
21085 _ACEOF
21086 cat confdefs.h >>conftest.$ac_ext
21087 cat >>conftest.$ac_ext <<_ACEOF
21088 /* end confdefs.h.  */
21089
21090 /* pthread test headers */
21091 #include <pthread.h>
21092 #if HAVE_PTHREADS < 7
21093 #include <errno.h>
21094 #endif
21095 #ifndef NULL
21096 #define NULL (void*)0
21097 #endif
21098
21099 static void *task(p)
21100         void *p;
21101 {
21102         return (void *) (p == NULL);
21103 }
21104
21105
21106 int main(argc, argv)
21107         int argc;
21108         char **argv;
21109 {
21110
21111         /* pthread test function */
21112 #ifndef PTHREAD_CREATE_DETACHED
21113 #define PTHREAD_CREATE_DETACHED 1
21114 #endif
21115         pthread_t t;
21116         int status;
21117         int detach = PTHREAD_CREATE_DETACHED;
21118
21119 #if HAVE_PTHREADS > 4
21120         /* Final pthreads */
21121         pthread_attr_t attr;
21122
21123         status = pthread_attr_init(&attr);
21124         if( status ) return status;
21125
21126 #if HAVE_PTHREADS < 7
21127         status = pthread_attr_setdetachstate(&attr, &detach);
21128         if( status < 0 ) status = errno;
21129 #else
21130         status = pthread_attr_setdetachstate(&attr, detach);
21131 #endif
21132         if( status ) return status;
21133         status = pthread_create( &t, &attr, task, NULL );
21134 #if HAVE_PTHREADS < 7
21135         if( status < 0 ) status = errno;
21136 #endif
21137         if( status ) return status;
21138 #else
21139         /* Draft 4 pthreads */
21140         status = pthread_create( &t, pthread_attr_default, task, NULL );
21141         if( status ) return errno;
21142
21143         /* give thread a chance to complete */
21144         /* it should remain joinable and hence detachable */
21145         sleep( 1 );
21146
21147         status = pthread_detach( &t );
21148         if( status ) return errno;
21149 #endif
21150
21151 #ifdef HAVE_LINUX_THREADS
21152         pthread_kill_other_threads_np();
21153 #endif
21154
21155         return 0;
21156
21157 }
21158
21159 _ACEOF
21160 rm -f conftest$ac_exeext
21161 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21162   (eval $ac_link) 2>&5
21163   ac_status=$?
21164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21165   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21166   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21167   (eval $ac_try) 2>&5
21168   ac_status=$?
21169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21170   (exit $ac_status); }; }; then
21171   ol_cv_pthread_pthread=yes
21172 else
21173   echo "$as_me: program exited with status $ac_status" >&5
21174 echo "$as_me: failed program was:" >&5
21175 sed 's/^/| /' conftest.$ac_ext >&5
21176
21177 ( exit $ac_status )
21178 ol_cv_pthread_pthread=no
21179 fi
21180 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21181 fi
21182
21183                 # restore the LIBS
21184                 LIBS="$ol_LIBS"
21185
21186 fi
21187 echo "$as_me:$LINENO: result: $ol_cv_pthread_pthread" >&5
21188 echo "${ECHO_T}$ol_cv_pthread_pthread" >&6
21189
21190         if test $ol_cv_pthread_pthread = yes ; then
21191                 ol_link_pthreads="-pthread"
21192                 ol_link_threads=posix
21193         fi
21194 fi
21195
21196                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
21197 if test "$ol_link_threads" = no ; then
21198         # try -pthreads
21199         echo "$as_me:$LINENO: checking for pthread link with -pthreads" >&5
21200 echo $ECHO_N "checking for pthread link with -pthreads... $ECHO_C" >&6
21201 if test "${ol_cv_pthread_pthreads+set}" = set; then
21202   echo $ECHO_N "(cached) $ECHO_C" >&6
21203 else
21204
21205                 # save the flags
21206                 ol_LIBS="$LIBS"
21207                 LIBS="-pthreads $LIBS"
21208
21209                 if test "$cross_compiling" = yes; then
21210   cat >conftest.$ac_ext <<_ACEOF
21211 /* confdefs.h.  */
21212 _ACEOF
21213 cat confdefs.h >>conftest.$ac_ext
21214 cat >>conftest.$ac_ext <<_ACEOF
21215 /* end confdefs.h.  */
21216
21217 /* pthread test headers */
21218 #include <pthread.h>
21219 #if HAVE_PTHREADS < 7
21220 #include <errno.h>
21221 #endif
21222 #ifndef NULL
21223 #define NULL (void*)0
21224 #endif
21225
21226 static void *task(p)
21227         void *p;
21228 {
21229         return (void *) (p == NULL);
21230 }
21231
21232 int
21233 main ()
21234 {
21235
21236         /* pthread test function */
21237 #ifndef PTHREAD_CREATE_DETACHED
21238 #define PTHREAD_CREATE_DETACHED 1
21239 #endif
21240         pthread_t t;
21241         int status;
21242         int detach = PTHREAD_CREATE_DETACHED;
21243
21244 #if HAVE_PTHREADS > 4
21245         /* Final pthreads */
21246         pthread_attr_t attr;
21247
21248         status = pthread_attr_init(&attr);
21249         if( status ) return status;
21250
21251 #if HAVE_PTHREADS < 7
21252         status = pthread_attr_setdetachstate(&attr, &detach);
21253         if( status < 0 ) status = errno;
21254 #else
21255         status = pthread_attr_setdetachstate(&attr, detach);
21256 #endif
21257         if( status ) return status;
21258         status = pthread_create( &t, &attr, task, NULL );
21259 #if HAVE_PTHREADS < 7
21260         if( status < 0 ) status = errno;
21261 #endif
21262         if( status ) return status;
21263 #else
21264         /* Draft 4 pthreads */
21265         status = pthread_create( &t, pthread_attr_default, task, NULL );
21266         if( status ) return errno;
21267
21268         /* give thread a chance to complete */
21269         /* it should remain joinable and hence detachable */
21270         sleep( 1 );
21271
21272         status = pthread_detach( &t );
21273         if( status ) return errno;
21274 #endif
21275
21276 #ifdef HAVE_LINUX_THREADS
21277         pthread_kill_other_threads_np();
21278 #endif
21279
21280         return 0;
21281
21282   ;
21283   return 0;
21284 }
21285 _ACEOF
21286 rm -f conftest.$ac_objext conftest$ac_exeext
21287 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21288   (eval $ac_link) 2>conftest.er1
21289   ac_status=$?
21290   grep -v '^ *+' conftest.er1 >conftest.err
21291   rm -f conftest.er1
21292   cat conftest.err >&5
21293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21294   (exit $ac_status); } &&
21295          { ac_try='test -z "$ac_c_werror_flag"
21296                          || test ! -s conftest.err'
21297   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21298   (eval $ac_try) 2>&5
21299   ac_status=$?
21300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21301   (exit $ac_status); }; } &&
21302          { ac_try='test -s conftest$ac_exeext'
21303   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21304   (eval $ac_try) 2>&5
21305   ac_status=$?
21306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21307   (exit $ac_status); }; }; then
21308   ol_cv_pthread_pthreads=yes
21309 else
21310   echo "$as_me: failed program was:" >&5
21311 sed 's/^/| /' conftest.$ac_ext >&5
21312
21313 ol_cv_pthread_pthreads=no
21314 fi
21315 rm -f conftest.err conftest.$ac_objext \
21316       conftest$ac_exeext conftest.$ac_ext
21317 else
21318   cat >conftest.$ac_ext <<_ACEOF
21319 /* confdefs.h.  */
21320 _ACEOF
21321 cat confdefs.h >>conftest.$ac_ext
21322 cat >>conftest.$ac_ext <<_ACEOF
21323 /* end confdefs.h.  */
21324
21325 /* pthread test headers */
21326 #include <pthread.h>
21327 #if HAVE_PTHREADS < 7
21328 #include <errno.h>
21329 #endif
21330 #ifndef NULL
21331 #define NULL (void*)0
21332 #endif
21333
21334 static void *task(p)
21335         void *p;
21336 {
21337         return (void *) (p == NULL);
21338 }
21339
21340
21341 int main(argc, argv)
21342         int argc;
21343         char **argv;
21344 {
21345
21346         /* pthread test function */
21347 #ifndef PTHREAD_CREATE_DETACHED
21348 #define PTHREAD_CREATE_DETACHED 1
21349 #endif
21350         pthread_t t;
21351         int status;
21352         int detach = PTHREAD_CREATE_DETACHED;
21353
21354 #if HAVE_PTHREADS > 4
21355         /* Final pthreads */
21356         pthread_attr_t attr;
21357
21358         status = pthread_attr_init(&attr);
21359         if( status ) return status;
21360
21361 #if HAVE_PTHREADS < 7
21362         status = pthread_attr_setdetachstate(&attr, &detach);
21363         if( status < 0 ) status = errno;
21364 #else
21365         status = pthread_attr_setdetachstate(&attr, detach);
21366 #endif
21367         if( status ) return status;
21368         status = pthread_create( &t, &attr, task, NULL );
21369 #if HAVE_PTHREADS < 7
21370         if( status < 0 ) status = errno;
21371 #endif
21372         if( status ) return status;
21373 #else
21374         /* Draft 4 pthreads */
21375         status = pthread_create( &t, pthread_attr_default, task, NULL );
21376         if( status ) return errno;
21377
21378         /* give thread a chance to complete */
21379         /* it should remain joinable and hence detachable */
21380         sleep( 1 );
21381
21382         status = pthread_detach( &t );
21383         if( status ) return errno;
21384 #endif
21385
21386 #ifdef HAVE_LINUX_THREADS
21387         pthread_kill_other_threads_np();
21388 #endif
21389
21390         return 0;
21391
21392 }
21393
21394 _ACEOF
21395 rm -f conftest$ac_exeext
21396 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21397   (eval $ac_link) 2>&5
21398   ac_status=$?
21399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21400   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21401   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21402   (eval $ac_try) 2>&5
21403   ac_status=$?
21404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21405   (exit $ac_status); }; }; then
21406   ol_cv_pthread_pthreads=yes
21407 else
21408   echo "$as_me: program exited with status $ac_status" >&5
21409 echo "$as_me: failed program was:" >&5
21410 sed 's/^/| /' conftest.$ac_ext >&5
21411
21412 ( exit $ac_status )
21413 ol_cv_pthread_pthreads=no
21414 fi
21415 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21416 fi
21417
21418                 # restore the LIBS
21419                 LIBS="$ol_LIBS"
21420
21421 fi
21422 echo "$as_me:$LINENO: result: $ol_cv_pthread_pthreads" >&5
21423 echo "${ECHO_T}$ol_cv_pthread_pthreads" >&6
21424
21425         if test $ol_cv_pthread_pthreads = yes ; then
21426                 ol_link_pthreads="-pthreads"
21427                 ol_link_threads=posix
21428         fi
21429 fi
21430
21431                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
21432 if test "$ol_link_threads" = no ; then
21433         # try -mthreads
21434         echo "$as_me:$LINENO: checking for pthread link with -mthreads" >&5
21435 echo $ECHO_N "checking for pthread link with -mthreads... $ECHO_C" >&6
21436 if test "${ol_cv_pthread_mthreads+set}" = set; then
21437   echo $ECHO_N "(cached) $ECHO_C" >&6
21438 else
21439
21440                 # save the flags
21441                 ol_LIBS="$LIBS"
21442                 LIBS="-mthreads $LIBS"
21443
21444                 if test "$cross_compiling" = yes; then
21445   cat >conftest.$ac_ext <<_ACEOF
21446 /* confdefs.h.  */
21447 _ACEOF
21448 cat confdefs.h >>conftest.$ac_ext
21449 cat >>conftest.$ac_ext <<_ACEOF
21450 /* end confdefs.h.  */
21451
21452 /* pthread test headers */
21453 #include <pthread.h>
21454 #if HAVE_PTHREADS < 7
21455 #include <errno.h>
21456 #endif
21457 #ifndef NULL
21458 #define NULL (void*)0
21459 #endif
21460
21461 static void *task(p)
21462         void *p;
21463 {
21464         return (void *) (p == NULL);
21465 }
21466
21467 int
21468 main ()
21469 {
21470
21471         /* pthread test function */
21472 #ifndef PTHREAD_CREATE_DETACHED
21473 #define PTHREAD_CREATE_DETACHED 1
21474 #endif
21475         pthread_t t;
21476         int status;
21477         int detach = PTHREAD_CREATE_DETACHED;
21478
21479 #if HAVE_PTHREADS > 4
21480         /* Final pthreads */
21481         pthread_attr_t attr;
21482
21483         status = pthread_attr_init(&attr);
21484         if( status ) return status;
21485
21486 #if HAVE_PTHREADS < 7
21487         status = pthread_attr_setdetachstate(&attr, &detach);
21488         if( status < 0 ) status = errno;
21489 #else
21490         status = pthread_attr_setdetachstate(&attr, detach);
21491 #endif
21492         if( status ) return status;
21493         status = pthread_create( &t, &attr, task, NULL );
21494 #if HAVE_PTHREADS < 7
21495         if( status < 0 ) status = errno;
21496 #endif
21497         if( status ) return status;
21498 #else
21499         /* Draft 4 pthreads */
21500         status = pthread_create( &t, pthread_attr_default, task, NULL );
21501         if( status ) return errno;
21502
21503         /* give thread a chance to complete */
21504         /* it should remain joinable and hence detachable */
21505         sleep( 1 );
21506
21507         status = pthread_detach( &t );
21508         if( status ) return errno;
21509 #endif
21510
21511 #ifdef HAVE_LINUX_THREADS
21512         pthread_kill_other_threads_np();
21513 #endif
21514
21515         return 0;
21516
21517   ;
21518   return 0;
21519 }
21520 _ACEOF
21521 rm -f conftest.$ac_objext conftest$ac_exeext
21522 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21523   (eval $ac_link) 2>conftest.er1
21524   ac_status=$?
21525   grep -v '^ *+' conftest.er1 >conftest.err
21526   rm -f conftest.er1
21527   cat conftest.err >&5
21528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21529   (exit $ac_status); } &&
21530          { ac_try='test -z "$ac_c_werror_flag"
21531                          || test ! -s conftest.err'
21532   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21533   (eval $ac_try) 2>&5
21534   ac_status=$?
21535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21536   (exit $ac_status); }; } &&
21537          { ac_try='test -s conftest$ac_exeext'
21538   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21539   (eval $ac_try) 2>&5
21540   ac_status=$?
21541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21542   (exit $ac_status); }; }; then
21543   ol_cv_pthread_mthreads=yes
21544 else
21545   echo "$as_me: failed program was:" >&5
21546 sed 's/^/| /' conftest.$ac_ext >&5
21547
21548 ol_cv_pthread_mthreads=no
21549 fi
21550 rm -f conftest.err conftest.$ac_objext \
21551       conftest$ac_exeext conftest.$ac_ext
21552 else
21553   cat >conftest.$ac_ext <<_ACEOF
21554 /* confdefs.h.  */
21555 _ACEOF
21556 cat confdefs.h >>conftest.$ac_ext
21557 cat >>conftest.$ac_ext <<_ACEOF
21558 /* end confdefs.h.  */
21559
21560 /* pthread test headers */
21561 #include <pthread.h>
21562 #if HAVE_PTHREADS < 7
21563 #include <errno.h>
21564 #endif
21565 #ifndef NULL
21566 #define NULL (void*)0
21567 #endif
21568
21569 static void *task(p)
21570         void *p;
21571 {
21572         return (void *) (p == NULL);
21573 }
21574
21575
21576 int main(argc, argv)
21577         int argc;
21578         char **argv;
21579 {
21580
21581         /* pthread test function */
21582 #ifndef PTHREAD_CREATE_DETACHED
21583 #define PTHREAD_CREATE_DETACHED 1
21584 #endif
21585         pthread_t t;
21586         int status;
21587         int detach = PTHREAD_CREATE_DETACHED;
21588
21589 #if HAVE_PTHREADS > 4
21590         /* Final pthreads */
21591         pthread_attr_t attr;
21592
21593         status = pthread_attr_init(&attr);
21594         if( status ) return status;
21595
21596 #if HAVE_PTHREADS < 7
21597         status = pthread_attr_setdetachstate(&attr, &detach);
21598         if( status < 0 ) status = errno;
21599 #else
21600         status = pthread_attr_setdetachstate(&attr, detach);
21601 #endif
21602         if( status ) return status;
21603         status = pthread_create( &t, &attr, task, NULL );
21604 #if HAVE_PTHREADS < 7
21605         if( status < 0 ) status = errno;
21606 #endif
21607         if( status ) return status;
21608 #else
21609         /* Draft 4 pthreads */
21610         status = pthread_create( &t, pthread_attr_default, task, NULL );
21611         if( status ) return errno;
21612
21613         /* give thread a chance to complete */
21614         /* it should remain joinable and hence detachable */
21615         sleep( 1 );
21616
21617         status = pthread_detach( &t );
21618         if( status ) return errno;
21619 #endif
21620
21621 #ifdef HAVE_LINUX_THREADS
21622         pthread_kill_other_threads_np();
21623 #endif
21624
21625         return 0;
21626
21627 }
21628
21629 _ACEOF
21630 rm -f conftest$ac_exeext
21631 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21632   (eval $ac_link) 2>&5
21633   ac_status=$?
21634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21635   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21636   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21637   (eval $ac_try) 2>&5
21638   ac_status=$?
21639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21640   (exit $ac_status); }; }; then
21641   ol_cv_pthread_mthreads=yes
21642 else
21643   echo "$as_me: program exited with status $ac_status" >&5
21644 echo "$as_me: failed program was:" >&5
21645 sed 's/^/| /' conftest.$ac_ext >&5
21646
21647 ( exit $ac_status )
21648 ol_cv_pthread_mthreads=no
21649 fi
21650 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21651 fi
21652
21653                 # restore the LIBS
21654                 LIBS="$ol_LIBS"
21655
21656 fi
21657 echo "$as_me:$LINENO: result: $ol_cv_pthread_mthreads" >&5
21658 echo "${ECHO_T}$ol_cv_pthread_mthreads" >&6
21659
21660         if test $ol_cv_pthread_mthreads = yes ; then
21661                 ol_link_pthreads="-mthreads"
21662                 ol_link_threads=posix
21663         fi
21664 fi
21665
21666                 # Pthread try link: -thread (ol_cv_pthread_thread)
21667 if test "$ol_link_threads" = no ; then
21668         # try -thread
21669         echo "$as_me:$LINENO: checking for pthread link with -thread" >&5
21670 echo $ECHO_N "checking for pthread link with -thread... $ECHO_C" >&6
21671 if test "${ol_cv_pthread_thread+set}" = set; then
21672   echo $ECHO_N "(cached) $ECHO_C" >&6
21673 else
21674
21675                 # save the flags
21676                 ol_LIBS="$LIBS"
21677                 LIBS="-thread $LIBS"
21678
21679                 if test "$cross_compiling" = yes; then
21680   cat >conftest.$ac_ext <<_ACEOF
21681 /* confdefs.h.  */
21682 _ACEOF
21683 cat confdefs.h >>conftest.$ac_ext
21684 cat >>conftest.$ac_ext <<_ACEOF
21685 /* end confdefs.h.  */
21686
21687 /* pthread test headers */
21688 #include <pthread.h>
21689 #if HAVE_PTHREADS < 7
21690 #include <errno.h>
21691 #endif
21692 #ifndef NULL
21693 #define NULL (void*)0
21694 #endif
21695
21696 static void *task(p)
21697         void *p;
21698 {
21699         return (void *) (p == NULL);
21700 }
21701
21702 int
21703 main ()
21704 {
21705
21706         /* pthread test function */
21707 #ifndef PTHREAD_CREATE_DETACHED
21708 #define PTHREAD_CREATE_DETACHED 1
21709 #endif
21710         pthread_t t;
21711         int status;
21712         int detach = PTHREAD_CREATE_DETACHED;
21713
21714 #if HAVE_PTHREADS > 4
21715         /* Final pthreads */
21716         pthread_attr_t attr;
21717
21718         status = pthread_attr_init(&attr);
21719         if( status ) return status;
21720
21721 #if HAVE_PTHREADS < 7
21722         status = pthread_attr_setdetachstate(&attr, &detach);
21723         if( status < 0 ) status = errno;
21724 #else
21725         status = pthread_attr_setdetachstate(&attr, detach);
21726 #endif
21727         if( status ) return status;
21728         status = pthread_create( &t, &attr, task, NULL );
21729 #if HAVE_PTHREADS < 7
21730         if( status < 0 ) status = errno;
21731 #endif
21732         if( status ) return status;
21733 #else
21734         /* Draft 4 pthreads */
21735         status = pthread_create( &t, pthread_attr_default, task, NULL );
21736         if( status ) return errno;
21737
21738         /* give thread a chance to complete */
21739         /* it should remain joinable and hence detachable */
21740         sleep( 1 );
21741
21742         status = pthread_detach( &t );
21743         if( status ) return errno;
21744 #endif
21745
21746 #ifdef HAVE_LINUX_THREADS
21747         pthread_kill_other_threads_np();
21748 #endif
21749
21750         return 0;
21751
21752   ;
21753   return 0;
21754 }
21755 _ACEOF
21756 rm -f conftest.$ac_objext conftest$ac_exeext
21757 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21758   (eval $ac_link) 2>conftest.er1
21759   ac_status=$?
21760   grep -v '^ *+' conftest.er1 >conftest.err
21761   rm -f conftest.er1
21762   cat conftest.err >&5
21763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21764   (exit $ac_status); } &&
21765          { ac_try='test -z "$ac_c_werror_flag"
21766                          || test ! -s conftest.err'
21767   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21768   (eval $ac_try) 2>&5
21769   ac_status=$?
21770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21771   (exit $ac_status); }; } &&
21772          { ac_try='test -s conftest$ac_exeext'
21773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21774   (eval $ac_try) 2>&5
21775   ac_status=$?
21776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21777   (exit $ac_status); }; }; then
21778   ol_cv_pthread_thread=yes
21779 else
21780   echo "$as_me: failed program was:" >&5
21781 sed 's/^/| /' conftest.$ac_ext >&5
21782
21783 ol_cv_pthread_thread=no
21784 fi
21785 rm -f conftest.err conftest.$ac_objext \
21786       conftest$ac_exeext conftest.$ac_ext
21787 else
21788   cat >conftest.$ac_ext <<_ACEOF
21789 /* confdefs.h.  */
21790 _ACEOF
21791 cat confdefs.h >>conftest.$ac_ext
21792 cat >>conftest.$ac_ext <<_ACEOF
21793 /* end confdefs.h.  */
21794
21795 /* pthread test headers */
21796 #include <pthread.h>
21797 #if HAVE_PTHREADS < 7
21798 #include <errno.h>
21799 #endif
21800 #ifndef NULL
21801 #define NULL (void*)0
21802 #endif
21803
21804 static void *task(p)
21805         void *p;
21806 {
21807         return (void *) (p == NULL);
21808 }
21809
21810
21811 int main(argc, argv)
21812         int argc;
21813         char **argv;
21814 {
21815
21816         /* pthread test function */
21817 #ifndef PTHREAD_CREATE_DETACHED
21818 #define PTHREAD_CREATE_DETACHED 1
21819 #endif
21820         pthread_t t;
21821         int status;
21822         int detach = PTHREAD_CREATE_DETACHED;
21823
21824 #if HAVE_PTHREADS > 4
21825         /* Final pthreads */
21826         pthread_attr_t attr;
21827
21828         status = pthread_attr_init(&attr);
21829         if( status ) return status;
21830
21831 #if HAVE_PTHREADS < 7
21832         status = pthread_attr_setdetachstate(&attr, &detach);
21833         if( status < 0 ) status = errno;
21834 #else
21835         status = pthread_attr_setdetachstate(&attr, detach);
21836 #endif
21837         if( status ) return status;
21838         status = pthread_create( &t, &attr, task, NULL );
21839 #if HAVE_PTHREADS < 7
21840         if( status < 0 ) status = errno;
21841 #endif
21842         if( status ) return status;
21843 #else
21844         /* Draft 4 pthreads */
21845         status = pthread_create( &t, pthread_attr_default, task, NULL );
21846         if( status ) return errno;
21847
21848         /* give thread a chance to complete */
21849         /* it should remain joinable and hence detachable */
21850         sleep( 1 );
21851
21852         status = pthread_detach( &t );
21853         if( status ) return errno;
21854 #endif
21855
21856 #ifdef HAVE_LINUX_THREADS
21857         pthread_kill_other_threads_np();
21858 #endif
21859
21860         return 0;
21861
21862 }
21863
21864 _ACEOF
21865 rm -f conftest$ac_exeext
21866 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21867   (eval $ac_link) 2>&5
21868   ac_status=$?
21869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21870   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21871   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21872   (eval $ac_try) 2>&5
21873   ac_status=$?
21874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21875   (exit $ac_status); }; }; then
21876   ol_cv_pthread_thread=yes
21877 else
21878   echo "$as_me: program exited with status $ac_status" >&5
21879 echo "$as_me: failed program was:" >&5
21880 sed 's/^/| /' conftest.$ac_ext >&5
21881
21882 ( exit $ac_status )
21883 ol_cv_pthread_thread=no
21884 fi
21885 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21886 fi
21887
21888                 # restore the LIBS
21889                 LIBS="$ol_LIBS"
21890
21891 fi
21892 echo "$as_me:$LINENO: result: $ol_cv_pthread_thread" >&5
21893 echo "${ECHO_T}$ol_cv_pthread_thread" >&6
21894
21895         if test $ol_cv_pthread_thread = yes ; then
21896                 ol_link_pthreads="-thread"
21897                 ol_link_threads=posix
21898         fi
21899 fi
21900
21901
21902                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
21903 if test "$ol_link_threads" = no ; then
21904         # try -lpthread -lmach -lexc -lc_r
21905         echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
21906 echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc -lc_r... $ECHO_C" >&6
21907 if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then
21908   echo $ECHO_N "(cached) $ECHO_C" >&6
21909 else
21910
21911                 # save the flags
21912                 ol_LIBS="$LIBS"
21913                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
21914
21915                 if test "$cross_compiling" = yes; then
21916   cat >conftest.$ac_ext <<_ACEOF
21917 /* confdefs.h.  */
21918 _ACEOF
21919 cat confdefs.h >>conftest.$ac_ext
21920 cat >>conftest.$ac_ext <<_ACEOF
21921 /* end confdefs.h.  */
21922
21923 /* pthread test headers */
21924 #include <pthread.h>
21925 #if HAVE_PTHREADS < 7
21926 #include <errno.h>
21927 #endif
21928 #ifndef NULL
21929 #define NULL (void*)0
21930 #endif
21931
21932 static void *task(p)
21933         void *p;
21934 {
21935         return (void *) (p == NULL);
21936 }
21937
21938 int
21939 main ()
21940 {
21941
21942         /* pthread test function */
21943 #ifndef PTHREAD_CREATE_DETACHED
21944 #define PTHREAD_CREATE_DETACHED 1
21945 #endif
21946         pthread_t t;
21947         int status;
21948         int detach = PTHREAD_CREATE_DETACHED;
21949
21950 #if HAVE_PTHREADS > 4
21951         /* Final pthreads */
21952         pthread_attr_t attr;
21953
21954         status = pthread_attr_init(&attr);
21955         if( status ) return status;
21956
21957 #if HAVE_PTHREADS < 7
21958         status = pthread_attr_setdetachstate(&attr, &detach);
21959         if( status < 0 ) status = errno;
21960 #else
21961         status = pthread_attr_setdetachstate(&attr, detach);
21962 #endif
21963         if( status ) return status;
21964         status = pthread_create( &t, &attr, task, NULL );
21965 #if HAVE_PTHREADS < 7
21966         if( status < 0 ) status = errno;
21967 #endif
21968         if( status ) return status;
21969 #else
21970         /* Draft 4 pthreads */
21971         status = pthread_create( &t, pthread_attr_default, task, NULL );
21972         if( status ) return errno;
21973
21974         /* give thread a chance to complete */
21975         /* it should remain joinable and hence detachable */
21976         sleep( 1 );
21977
21978         status = pthread_detach( &t );
21979         if( status ) return errno;
21980 #endif
21981
21982 #ifdef HAVE_LINUX_THREADS
21983         pthread_kill_other_threads_np();
21984 #endif
21985
21986         return 0;
21987
21988   ;
21989   return 0;
21990 }
21991 _ACEOF
21992 rm -f conftest.$ac_objext conftest$ac_exeext
21993 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21994   (eval $ac_link) 2>conftest.er1
21995   ac_status=$?
21996   grep -v '^ *+' conftest.er1 >conftest.err
21997   rm -f conftest.er1
21998   cat conftest.err >&5
21999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22000   (exit $ac_status); } &&
22001          { ac_try='test -z "$ac_c_werror_flag"
22002                          || test ! -s conftest.err'
22003   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22004   (eval $ac_try) 2>&5
22005   ac_status=$?
22006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22007   (exit $ac_status); }; } &&
22008          { ac_try='test -s conftest$ac_exeext'
22009   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22010   (eval $ac_try) 2>&5
22011   ac_status=$?
22012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22013   (exit $ac_status); }; }; then
22014   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
22015 else
22016   echo "$as_me: failed program was:" >&5
22017 sed 's/^/| /' conftest.$ac_ext >&5
22018
22019 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
22020 fi
22021 rm -f conftest.err conftest.$ac_objext \
22022       conftest$ac_exeext conftest.$ac_ext
22023 else
22024   cat >conftest.$ac_ext <<_ACEOF
22025 /* confdefs.h.  */
22026 _ACEOF
22027 cat confdefs.h >>conftest.$ac_ext
22028 cat >>conftest.$ac_ext <<_ACEOF
22029 /* end confdefs.h.  */
22030
22031 /* pthread test headers */
22032 #include <pthread.h>
22033 #if HAVE_PTHREADS < 7
22034 #include <errno.h>
22035 #endif
22036 #ifndef NULL
22037 #define NULL (void*)0
22038 #endif
22039
22040 static void *task(p)
22041         void *p;
22042 {
22043         return (void *) (p == NULL);
22044 }
22045
22046
22047 int main(argc, argv)
22048         int argc;
22049         char **argv;
22050 {
22051
22052         /* pthread test function */
22053 #ifndef PTHREAD_CREATE_DETACHED
22054 #define PTHREAD_CREATE_DETACHED 1
22055 #endif
22056         pthread_t t;
22057         int status;
22058         int detach = PTHREAD_CREATE_DETACHED;
22059
22060 #if HAVE_PTHREADS > 4
22061         /* Final pthreads */
22062         pthread_attr_t attr;
22063
22064         status = pthread_attr_init(&attr);
22065         if( status ) return status;
22066
22067 #if HAVE_PTHREADS < 7
22068         status = pthread_attr_setdetachstate(&attr, &detach);
22069         if( status < 0 ) status = errno;
22070 #else
22071         status = pthread_attr_setdetachstate(&attr, detach);
22072 #endif
22073         if( status ) return status;
22074         status = pthread_create( &t, &attr, task, NULL );
22075 #if HAVE_PTHREADS < 7
22076         if( status < 0 ) status = errno;
22077 #endif
22078         if( status ) return status;
22079 #else
22080         /* Draft 4 pthreads */
22081         status = pthread_create( &t, pthread_attr_default, task, NULL );
22082         if( status ) return errno;
22083
22084         /* give thread a chance to complete */
22085         /* it should remain joinable and hence detachable */
22086         sleep( 1 );
22087
22088         status = pthread_detach( &t );
22089         if( status ) return errno;
22090 #endif
22091
22092 #ifdef HAVE_LINUX_THREADS
22093         pthread_kill_other_threads_np();
22094 #endif
22095
22096         return 0;
22097
22098 }
22099
22100 _ACEOF
22101 rm -f conftest$ac_exeext
22102 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22103   (eval $ac_link) 2>&5
22104   ac_status=$?
22105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22106   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22107   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22108   (eval $ac_try) 2>&5
22109   ac_status=$?
22110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22111   (exit $ac_status); }; }; then
22112   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
22113 else
22114   echo "$as_me: program exited with status $ac_status" >&5
22115 echo "$as_me: failed program was:" >&5
22116 sed 's/^/| /' conftest.$ac_ext >&5
22117
22118 ( exit $ac_status )
22119 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
22120 fi
22121 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22122 fi
22123
22124                 # restore the LIBS
22125                 LIBS="$ol_LIBS"
22126
22127 fi
22128 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
22129 echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6
22130
22131         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
22132                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
22133                 ol_link_threads=posix
22134         fi
22135 fi
22136
22137                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
22138 if test "$ol_link_threads" = no ; then
22139         # try -lpthread -lmach -lexc
22140         echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc" >&5
22141 echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc... $ECHO_C" >&6
22142 if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then
22143   echo $ECHO_N "(cached) $ECHO_C" >&6
22144 else
22145
22146                 # save the flags
22147                 ol_LIBS="$LIBS"
22148                 LIBS="-lpthread -lmach -lexc $LIBS"
22149
22150                 if test "$cross_compiling" = yes; then
22151   cat >conftest.$ac_ext <<_ACEOF
22152 /* confdefs.h.  */
22153 _ACEOF
22154 cat confdefs.h >>conftest.$ac_ext
22155 cat >>conftest.$ac_ext <<_ACEOF
22156 /* end confdefs.h.  */
22157
22158 /* pthread test headers */
22159 #include <pthread.h>
22160 #if HAVE_PTHREADS < 7
22161 #include <errno.h>
22162 #endif
22163 #ifndef NULL
22164 #define NULL (void*)0
22165 #endif
22166
22167 static void *task(p)
22168         void *p;
22169 {
22170         return (void *) (p == NULL);
22171 }
22172
22173 int
22174 main ()
22175 {
22176
22177         /* pthread test function */
22178 #ifndef PTHREAD_CREATE_DETACHED
22179 #define PTHREAD_CREATE_DETACHED 1
22180 #endif
22181         pthread_t t;
22182         int status;
22183         int detach = PTHREAD_CREATE_DETACHED;
22184
22185 #if HAVE_PTHREADS > 4
22186         /* Final pthreads */
22187         pthread_attr_t attr;
22188
22189         status = pthread_attr_init(&attr);
22190         if( status ) return status;
22191
22192 #if HAVE_PTHREADS < 7
22193         status = pthread_attr_setdetachstate(&attr, &detach);
22194         if( status < 0 ) status = errno;
22195 #else
22196         status = pthread_attr_setdetachstate(&attr, detach);
22197 #endif
22198         if( status ) return status;
22199         status = pthread_create( &t, &attr, task, NULL );
22200 #if HAVE_PTHREADS < 7
22201         if( status < 0 ) status = errno;
22202 #endif
22203         if( status ) return status;
22204 #else
22205         /* Draft 4 pthreads */
22206         status = pthread_create( &t, pthread_attr_default, task, NULL );
22207         if( status ) return errno;
22208
22209         /* give thread a chance to complete */
22210         /* it should remain joinable and hence detachable */
22211         sleep( 1 );
22212
22213         status = pthread_detach( &t );
22214         if( status ) return errno;
22215 #endif
22216
22217 #ifdef HAVE_LINUX_THREADS
22218         pthread_kill_other_threads_np();
22219 #endif
22220
22221         return 0;
22222
22223   ;
22224   return 0;
22225 }
22226 _ACEOF
22227 rm -f conftest.$ac_objext conftest$ac_exeext
22228 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22229   (eval $ac_link) 2>conftest.er1
22230   ac_status=$?
22231   grep -v '^ *+' conftest.er1 >conftest.err
22232   rm -f conftest.er1
22233   cat conftest.err >&5
22234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22235   (exit $ac_status); } &&
22236          { ac_try='test -z "$ac_c_werror_flag"
22237                          || test ! -s conftest.err'
22238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22239   (eval $ac_try) 2>&5
22240   ac_status=$?
22241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22242   (exit $ac_status); }; } &&
22243          { ac_try='test -s conftest$ac_exeext'
22244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22245   (eval $ac_try) 2>&5
22246   ac_status=$?
22247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22248   (exit $ac_status); }; }; then
22249   ol_cv_pthread_lpthread_lmach_lexc=yes
22250 else
22251   echo "$as_me: failed program was:" >&5
22252 sed 's/^/| /' conftest.$ac_ext >&5
22253
22254 ol_cv_pthread_lpthread_lmach_lexc=no
22255 fi
22256 rm -f conftest.err conftest.$ac_objext \
22257       conftest$ac_exeext conftest.$ac_ext
22258 else
22259   cat >conftest.$ac_ext <<_ACEOF
22260 /* confdefs.h.  */
22261 _ACEOF
22262 cat confdefs.h >>conftest.$ac_ext
22263 cat >>conftest.$ac_ext <<_ACEOF
22264 /* end confdefs.h.  */
22265
22266 /* pthread test headers */
22267 #include <pthread.h>
22268 #if HAVE_PTHREADS < 7
22269 #include <errno.h>
22270 #endif
22271 #ifndef NULL
22272 #define NULL (void*)0
22273 #endif
22274
22275 static void *task(p)
22276         void *p;
22277 {
22278         return (void *) (p == NULL);
22279 }
22280
22281
22282 int main(argc, argv)
22283         int argc;
22284         char **argv;
22285 {
22286
22287         /* pthread test function */
22288 #ifndef PTHREAD_CREATE_DETACHED
22289 #define PTHREAD_CREATE_DETACHED 1
22290 #endif
22291         pthread_t t;
22292         int status;
22293         int detach = PTHREAD_CREATE_DETACHED;
22294
22295 #if HAVE_PTHREADS > 4
22296         /* Final pthreads */
22297         pthread_attr_t attr;
22298
22299         status = pthread_attr_init(&attr);
22300         if( status ) return status;
22301
22302 #if HAVE_PTHREADS < 7
22303         status = pthread_attr_setdetachstate(&attr, &detach);
22304         if( status < 0 ) status = errno;
22305 #else
22306         status = pthread_attr_setdetachstate(&attr, detach);
22307 #endif
22308         if( status ) return status;
22309         status = pthread_create( &t, &attr, task, NULL );
22310 #if HAVE_PTHREADS < 7
22311         if( status < 0 ) status = errno;
22312 #endif
22313         if( status ) return status;
22314 #else
22315         /* Draft 4 pthreads */
22316         status = pthread_create( &t, pthread_attr_default, task, NULL );
22317         if( status ) return errno;
22318
22319         /* give thread a chance to complete */
22320         /* it should remain joinable and hence detachable */
22321         sleep( 1 );
22322
22323         status = pthread_detach( &t );
22324         if( status ) return errno;
22325 #endif
22326
22327 #ifdef HAVE_LINUX_THREADS
22328         pthread_kill_other_threads_np();
22329 #endif
22330
22331         return 0;
22332
22333 }
22334
22335 _ACEOF
22336 rm -f conftest$ac_exeext
22337 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22338   (eval $ac_link) 2>&5
22339   ac_status=$?
22340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22341   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22342   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22343   (eval $ac_try) 2>&5
22344   ac_status=$?
22345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22346   (exit $ac_status); }; }; then
22347   ol_cv_pthread_lpthread_lmach_lexc=yes
22348 else
22349   echo "$as_me: program exited with status $ac_status" >&5
22350 echo "$as_me: failed program was:" >&5
22351 sed 's/^/| /' conftest.$ac_ext >&5
22352
22353 ( exit $ac_status )
22354 ol_cv_pthread_lpthread_lmach_lexc=no
22355 fi
22356 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22357 fi
22358
22359                 # restore the LIBS
22360                 LIBS="$ol_LIBS"
22361
22362 fi
22363 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
22364 echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc" >&6
22365
22366         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
22367                 ol_link_pthreads="-lpthread -lmach -lexc"
22368                 ol_link_threads=posix
22369         fi
22370 fi
22371
22372
22373                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
22374 if test "$ol_link_threads" = no ; then
22375         # try -lpthread -Wl,-woff,85
22376         echo "$as_me:$LINENO: checking for pthread link with -lpthread -Wl,-woff,85" >&5
22377 echo $ECHO_N "checking for pthread link with -lpthread -Wl,-woff,85... $ECHO_C" >&6
22378 if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then
22379   echo $ECHO_N "(cached) $ECHO_C" >&6
22380 else
22381
22382                 # save the flags
22383                 ol_LIBS="$LIBS"
22384                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
22385
22386                 if test "$cross_compiling" = yes; then
22387   cat >conftest.$ac_ext <<_ACEOF
22388 /* confdefs.h.  */
22389 _ACEOF
22390 cat confdefs.h >>conftest.$ac_ext
22391 cat >>conftest.$ac_ext <<_ACEOF
22392 /* end confdefs.h.  */
22393
22394 /* pthread test headers */
22395 #include <pthread.h>
22396 #if HAVE_PTHREADS < 7
22397 #include <errno.h>
22398 #endif
22399 #ifndef NULL
22400 #define NULL (void*)0
22401 #endif
22402
22403 static void *task(p)
22404         void *p;
22405 {
22406         return (void *) (p == NULL);
22407 }
22408
22409 int
22410 main ()
22411 {
22412
22413         /* pthread test function */
22414 #ifndef PTHREAD_CREATE_DETACHED
22415 #define PTHREAD_CREATE_DETACHED 1
22416 #endif
22417         pthread_t t;
22418         int status;
22419         int detach = PTHREAD_CREATE_DETACHED;
22420
22421 #if HAVE_PTHREADS > 4
22422         /* Final pthreads */
22423         pthread_attr_t attr;
22424
22425         status = pthread_attr_init(&attr);
22426         if( status ) return status;
22427
22428 #if HAVE_PTHREADS < 7
22429         status = pthread_attr_setdetachstate(&attr, &detach);
22430         if( status < 0 ) status = errno;
22431 #else
22432         status = pthread_attr_setdetachstate(&attr, detach);
22433 #endif
22434         if( status ) return status;
22435         status = pthread_create( &t, &attr, task, NULL );
22436 #if HAVE_PTHREADS < 7
22437         if( status < 0 ) status = errno;
22438 #endif
22439         if( status ) return status;
22440 #else
22441         /* Draft 4 pthreads */
22442         status = pthread_create( &t, pthread_attr_default, task, NULL );
22443         if( status ) return errno;
22444
22445         /* give thread a chance to complete */
22446         /* it should remain joinable and hence detachable */
22447         sleep( 1 );
22448
22449         status = pthread_detach( &t );
22450         if( status ) return errno;
22451 #endif
22452
22453 #ifdef HAVE_LINUX_THREADS
22454         pthread_kill_other_threads_np();
22455 #endif
22456
22457         return 0;
22458
22459   ;
22460   return 0;
22461 }
22462 _ACEOF
22463 rm -f conftest.$ac_objext conftest$ac_exeext
22464 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22465   (eval $ac_link) 2>conftest.er1
22466   ac_status=$?
22467   grep -v '^ *+' conftest.er1 >conftest.err
22468   rm -f conftest.er1
22469   cat conftest.err >&5
22470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22471   (exit $ac_status); } &&
22472          { ac_try='test -z "$ac_c_werror_flag"
22473                          || test ! -s conftest.err'
22474   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22475   (eval $ac_try) 2>&5
22476   ac_status=$?
22477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22478   (exit $ac_status); }; } &&
22479          { ac_try='test -s conftest$ac_exeext'
22480   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22481   (eval $ac_try) 2>&5
22482   ac_status=$?
22483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22484   (exit $ac_status); }; }; then
22485   ol_cv_pthread_lib_lpthread_woff=yes
22486 else
22487   echo "$as_me: failed program was:" >&5
22488 sed 's/^/| /' conftest.$ac_ext >&5
22489
22490 ol_cv_pthread_lib_lpthread_woff=no
22491 fi
22492 rm -f conftest.err conftest.$ac_objext \
22493       conftest$ac_exeext conftest.$ac_ext
22494 else
22495   cat >conftest.$ac_ext <<_ACEOF
22496 /* confdefs.h.  */
22497 _ACEOF
22498 cat confdefs.h >>conftest.$ac_ext
22499 cat >>conftest.$ac_ext <<_ACEOF
22500 /* end confdefs.h.  */
22501
22502 /* pthread test headers */
22503 #include <pthread.h>
22504 #if HAVE_PTHREADS < 7
22505 #include <errno.h>
22506 #endif
22507 #ifndef NULL
22508 #define NULL (void*)0
22509 #endif
22510
22511 static void *task(p)
22512         void *p;
22513 {
22514         return (void *) (p == NULL);
22515 }
22516
22517
22518 int main(argc, argv)
22519         int argc;
22520         char **argv;
22521 {
22522
22523         /* pthread test function */
22524 #ifndef PTHREAD_CREATE_DETACHED
22525 #define PTHREAD_CREATE_DETACHED 1
22526 #endif
22527         pthread_t t;
22528         int status;
22529         int detach = PTHREAD_CREATE_DETACHED;
22530
22531 #if HAVE_PTHREADS > 4
22532         /* Final pthreads */
22533         pthread_attr_t attr;
22534
22535         status = pthread_attr_init(&attr);
22536         if( status ) return status;
22537
22538 #if HAVE_PTHREADS < 7
22539         status = pthread_attr_setdetachstate(&attr, &detach);
22540         if( status < 0 ) status = errno;
22541 #else
22542         status = pthread_attr_setdetachstate(&attr, detach);
22543 #endif
22544         if( status ) return status;
22545         status = pthread_create( &t, &attr, task, NULL );
22546 #if HAVE_PTHREADS < 7
22547         if( status < 0 ) status = errno;
22548 #endif
22549         if( status ) return status;
22550 #else
22551         /* Draft 4 pthreads */
22552         status = pthread_create( &t, pthread_attr_default, task, NULL );
22553         if( status ) return errno;
22554
22555         /* give thread a chance to complete */
22556         /* it should remain joinable and hence detachable */
22557         sleep( 1 );
22558
22559         status = pthread_detach( &t );
22560         if( status ) return errno;
22561 #endif
22562
22563 #ifdef HAVE_LINUX_THREADS
22564         pthread_kill_other_threads_np();
22565 #endif
22566
22567         return 0;
22568
22569 }
22570
22571 _ACEOF
22572 rm -f conftest$ac_exeext
22573 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22574   (eval $ac_link) 2>&5
22575   ac_status=$?
22576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22577   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22578   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22579   (eval $ac_try) 2>&5
22580   ac_status=$?
22581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22582   (exit $ac_status); }; }; then
22583   ol_cv_pthread_lib_lpthread_woff=yes
22584 else
22585   echo "$as_me: program exited with status $ac_status" >&5
22586 echo "$as_me: failed program was:" >&5
22587 sed 's/^/| /' conftest.$ac_ext >&5
22588
22589 ( exit $ac_status )
22590 ol_cv_pthread_lib_lpthread_woff=no
22591 fi
22592 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22593 fi
22594
22595                 # restore the LIBS
22596                 LIBS="$ol_LIBS"
22597
22598 fi
22599 echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthread_woff" >&5
22600 echo "${ECHO_T}$ol_cv_pthread_lib_lpthread_woff" >&6
22601
22602         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
22603                 ol_link_pthreads="-lpthread -Wl,-woff,85"
22604                 ol_link_threads=posix
22605         fi
22606 fi
22607
22608
22609                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
22610 if test "$ol_link_threads" = no ; then
22611         # try -lpthread
22612         echo "$as_me:$LINENO: checking for pthread link with -lpthread" >&5
22613 echo $ECHO_N "checking for pthread link with -lpthread... $ECHO_C" >&6
22614 if test "${ol_cv_pthread_lpthread+set}" = set; then
22615   echo $ECHO_N "(cached) $ECHO_C" >&6
22616 else
22617
22618                 # save the flags
22619                 ol_LIBS="$LIBS"
22620                 LIBS="-lpthread $LIBS"
22621
22622                 if test "$cross_compiling" = yes; then
22623   cat >conftest.$ac_ext <<_ACEOF
22624 /* confdefs.h.  */
22625 _ACEOF
22626 cat confdefs.h >>conftest.$ac_ext
22627 cat >>conftest.$ac_ext <<_ACEOF
22628 /* end confdefs.h.  */
22629
22630 /* pthread test headers */
22631 #include <pthread.h>
22632 #if HAVE_PTHREADS < 7
22633 #include <errno.h>
22634 #endif
22635 #ifndef NULL
22636 #define NULL (void*)0
22637 #endif
22638
22639 static void *task(p)
22640         void *p;
22641 {
22642         return (void *) (p == NULL);
22643 }
22644
22645 int
22646 main ()
22647 {
22648
22649         /* pthread test function */
22650 #ifndef PTHREAD_CREATE_DETACHED
22651 #define PTHREAD_CREATE_DETACHED 1
22652 #endif
22653         pthread_t t;
22654         int status;
22655         int detach = PTHREAD_CREATE_DETACHED;
22656
22657 #if HAVE_PTHREADS > 4
22658         /* Final pthreads */
22659         pthread_attr_t attr;
22660
22661         status = pthread_attr_init(&attr);
22662         if( status ) return status;
22663
22664 #if HAVE_PTHREADS < 7
22665         status = pthread_attr_setdetachstate(&attr, &detach);
22666         if( status < 0 ) status = errno;
22667 #else
22668         status = pthread_attr_setdetachstate(&attr, detach);
22669 #endif
22670         if( status ) return status;
22671         status = pthread_create( &t, &attr, task, NULL );
22672 #if HAVE_PTHREADS < 7
22673         if( status < 0 ) status = errno;
22674 #endif
22675         if( status ) return status;
22676 #else
22677         /* Draft 4 pthreads */
22678         status = pthread_create( &t, pthread_attr_default, task, NULL );
22679         if( status ) return errno;
22680
22681         /* give thread a chance to complete */
22682         /* it should remain joinable and hence detachable */
22683         sleep( 1 );
22684
22685         status = pthread_detach( &t );
22686         if( status ) return errno;
22687 #endif
22688
22689 #ifdef HAVE_LINUX_THREADS
22690         pthread_kill_other_threads_np();
22691 #endif
22692
22693         return 0;
22694
22695   ;
22696   return 0;
22697 }
22698 _ACEOF
22699 rm -f conftest.$ac_objext conftest$ac_exeext
22700 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22701   (eval $ac_link) 2>conftest.er1
22702   ac_status=$?
22703   grep -v '^ *+' conftest.er1 >conftest.err
22704   rm -f conftest.er1
22705   cat conftest.err >&5
22706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22707   (exit $ac_status); } &&
22708          { ac_try='test -z "$ac_c_werror_flag"
22709                          || test ! -s conftest.err'
22710   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22711   (eval $ac_try) 2>&5
22712   ac_status=$?
22713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22714   (exit $ac_status); }; } &&
22715          { ac_try='test -s conftest$ac_exeext'
22716   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22717   (eval $ac_try) 2>&5
22718   ac_status=$?
22719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22720   (exit $ac_status); }; }; then
22721   ol_cv_pthread_lpthread=yes
22722 else
22723   echo "$as_me: failed program was:" >&5
22724 sed 's/^/| /' conftest.$ac_ext >&5
22725
22726 ol_cv_pthread_lpthread=no
22727 fi
22728 rm -f conftest.err conftest.$ac_objext \
22729       conftest$ac_exeext conftest.$ac_ext
22730 else
22731   cat >conftest.$ac_ext <<_ACEOF
22732 /* confdefs.h.  */
22733 _ACEOF
22734 cat confdefs.h >>conftest.$ac_ext
22735 cat >>conftest.$ac_ext <<_ACEOF
22736 /* end confdefs.h.  */
22737
22738 /* pthread test headers */
22739 #include <pthread.h>
22740 #if HAVE_PTHREADS < 7
22741 #include <errno.h>
22742 #endif
22743 #ifndef NULL
22744 #define NULL (void*)0
22745 #endif
22746
22747 static void *task(p)
22748         void *p;
22749 {
22750         return (void *) (p == NULL);
22751 }
22752
22753
22754 int main(argc, argv)
22755         int argc;
22756         char **argv;
22757 {
22758
22759         /* pthread test function */
22760 #ifndef PTHREAD_CREATE_DETACHED
22761 #define PTHREAD_CREATE_DETACHED 1
22762 #endif
22763         pthread_t t;
22764         int status;
22765         int detach = PTHREAD_CREATE_DETACHED;
22766
22767 #if HAVE_PTHREADS > 4
22768         /* Final pthreads */
22769         pthread_attr_t attr;
22770
22771         status = pthread_attr_init(&attr);
22772         if( status ) return status;
22773
22774 #if HAVE_PTHREADS < 7
22775         status = pthread_attr_setdetachstate(&attr, &detach);
22776         if( status < 0 ) status = errno;
22777 #else
22778         status = pthread_attr_setdetachstate(&attr, detach);
22779 #endif
22780         if( status ) return status;
22781         status = pthread_create( &t, &attr, task, NULL );
22782 #if HAVE_PTHREADS < 7
22783         if( status < 0 ) status = errno;
22784 #endif
22785         if( status ) return status;
22786 #else
22787         /* Draft 4 pthreads */
22788         status = pthread_create( &t, pthread_attr_default, task, NULL );
22789         if( status ) return errno;
22790
22791         /* give thread a chance to complete */
22792         /* it should remain joinable and hence detachable */
22793         sleep( 1 );
22794
22795         status = pthread_detach( &t );
22796         if( status ) return errno;
22797 #endif
22798
22799 #ifdef HAVE_LINUX_THREADS
22800         pthread_kill_other_threads_np();
22801 #endif
22802
22803         return 0;
22804
22805 }
22806
22807 _ACEOF
22808 rm -f conftest$ac_exeext
22809 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22810   (eval $ac_link) 2>&5
22811   ac_status=$?
22812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22813   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22814   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22815   (eval $ac_try) 2>&5
22816   ac_status=$?
22817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22818   (exit $ac_status); }; }; then
22819   ol_cv_pthread_lpthread=yes
22820 else
22821   echo "$as_me: program exited with status $ac_status" >&5
22822 echo "$as_me: failed program was:" >&5
22823 sed 's/^/| /' conftest.$ac_ext >&5
22824
22825 ( exit $ac_status )
22826 ol_cv_pthread_lpthread=no
22827 fi
22828 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22829 fi
22830
22831                 # restore the LIBS
22832                 LIBS="$ol_LIBS"
22833
22834 fi
22835 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread" >&5
22836 echo "${ECHO_T}$ol_cv_pthread_lpthread" >&6
22837
22838         if test $ol_cv_pthread_lpthread = yes ; then
22839                 ol_link_pthreads="-lpthread"
22840                 ol_link_threads=posix
22841         fi
22842 fi
22843
22844                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
22845 if test "$ol_link_threads" = no ; then
22846         # try -lc_r
22847         echo "$as_me:$LINENO: checking for pthread link with -lc_r" >&5
22848 echo $ECHO_N "checking for pthread link with -lc_r... $ECHO_C" >&6
22849 if test "${ol_cv_pthread_lc_r+set}" = set; then
22850   echo $ECHO_N "(cached) $ECHO_C" >&6
22851 else
22852
22853                 # save the flags
22854                 ol_LIBS="$LIBS"
22855                 LIBS="-lc_r $LIBS"
22856
22857                 if test "$cross_compiling" = yes; then
22858   cat >conftest.$ac_ext <<_ACEOF
22859 /* confdefs.h.  */
22860 _ACEOF
22861 cat confdefs.h >>conftest.$ac_ext
22862 cat >>conftest.$ac_ext <<_ACEOF
22863 /* end confdefs.h.  */
22864
22865 /* pthread test headers */
22866 #include <pthread.h>
22867 #if HAVE_PTHREADS < 7
22868 #include <errno.h>
22869 #endif
22870 #ifndef NULL
22871 #define NULL (void*)0
22872 #endif
22873
22874 static void *task(p)
22875         void *p;
22876 {
22877         return (void *) (p == NULL);
22878 }
22879
22880 int
22881 main ()
22882 {
22883
22884         /* pthread test function */
22885 #ifndef PTHREAD_CREATE_DETACHED
22886 #define PTHREAD_CREATE_DETACHED 1
22887 #endif
22888         pthread_t t;
22889         int status;
22890         int detach = PTHREAD_CREATE_DETACHED;
22891
22892 #if HAVE_PTHREADS > 4
22893         /* Final pthreads */
22894         pthread_attr_t attr;
22895
22896         status = pthread_attr_init(&attr);
22897         if( status ) return status;
22898
22899 #if HAVE_PTHREADS < 7
22900         status = pthread_attr_setdetachstate(&attr, &detach);
22901         if( status < 0 ) status = errno;
22902 #else
22903         status = pthread_attr_setdetachstate(&attr, detach);
22904 #endif
22905         if( status ) return status;
22906         status = pthread_create( &t, &attr, task, NULL );
22907 #if HAVE_PTHREADS < 7
22908         if( status < 0 ) status = errno;
22909 #endif
22910         if( status ) return status;
22911 #else
22912         /* Draft 4 pthreads */
22913         status = pthread_create( &t, pthread_attr_default, task, NULL );
22914         if( status ) return errno;
22915
22916         /* give thread a chance to complete */
22917         /* it should remain joinable and hence detachable */
22918         sleep( 1 );
22919
22920         status = pthread_detach( &t );
22921         if( status ) return errno;
22922 #endif
22923
22924 #ifdef HAVE_LINUX_THREADS
22925         pthread_kill_other_threads_np();
22926 #endif
22927
22928         return 0;
22929
22930   ;
22931   return 0;
22932 }
22933 _ACEOF
22934 rm -f conftest.$ac_objext conftest$ac_exeext
22935 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22936   (eval $ac_link) 2>conftest.er1
22937   ac_status=$?
22938   grep -v '^ *+' conftest.er1 >conftest.err
22939   rm -f conftest.er1
22940   cat conftest.err >&5
22941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22942   (exit $ac_status); } &&
22943          { ac_try='test -z "$ac_c_werror_flag"
22944                          || test ! -s conftest.err'
22945   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22946   (eval $ac_try) 2>&5
22947   ac_status=$?
22948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22949   (exit $ac_status); }; } &&
22950          { ac_try='test -s conftest$ac_exeext'
22951   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22952   (eval $ac_try) 2>&5
22953   ac_status=$?
22954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22955   (exit $ac_status); }; }; then
22956   ol_cv_pthread_lc_r=yes
22957 else
22958   echo "$as_me: failed program was:" >&5
22959 sed 's/^/| /' conftest.$ac_ext >&5
22960
22961 ol_cv_pthread_lc_r=no
22962 fi
22963 rm -f conftest.err conftest.$ac_objext \
22964       conftest$ac_exeext conftest.$ac_ext
22965 else
22966   cat >conftest.$ac_ext <<_ACEOF
22967 /* confdefs.h.  */
22968 _ACEOF
22969 cat confdefs.h >>conftest.$ac_ext
22970 cat >>conftest.$ac_ext <<_ACEOF
22971 /* end confdefs.h.  */
22972
22973 /* pthread test headers */
22974 #include <pthread.h>
22975 #if HAVE_PTHREADS < 7
22976 #include <errno.h>
22977 #endif
22978 #ifndef NULL
22979 #define NULL (void*)0
22980 #endif
22981
22982 static void *task(p)
22983         void *p;
22984 {
22985         return (void *) (p == NULL);
22986 }
22987
22988
22989 int main(argc, argv)
22990         int argc;
22991         char **argv;
22992 {
22993
22994         /* pthread test function */
22995 #ifndef PTHREAD_CREATE_DETACHED
22996 #define PTHREAD_CREATE_DETACHED 1
22997 #endif
22998         pthread_t t;
22999         int status;
23000         int detach = PTHREAD_CREATE_DETACHED;
23001
23002 #if HAVE_PTHREADS > 4
23003         /* Final pthreads */
23004         pthread_attr_t attr;
23005
23006         status = pthread_attr_init(&attr);
23007         if( status ) return status;
23008
23009 #if HAVE_PTHREADS < 7
23010         status = pthread_attr_setdetachstate(&attr, &detach);
23011         if( status < 0 ) status = errno;
23012 #else
23013         status = pthread_attr_setdetachstate(&attr, detach);
23014 #endif
23015         if( status ) return status;
23016         status = pthread_create( &t, &attr, task, NULL );
23017 #if HAVE_PTHREADS < 7
23018         if( status < 0 ) status = errno;
23019 #endif
23020         if( status ) return status;
23021 #else
23022         /* Draft 4 pthreads */
23023         status = pthread_create( &t, pthread_attr_default, task, NULL );
23024         if( status ) return errno;
23025
23026         /* give thread a chance to complete */
23027         /* it should remain joinable and hence detachable */
23028         sleep( 1 );
23029
23030         status = pthread_detach( &t );
23031         if( status ) return errno;
23032 #endif
23033
23034 #ifdef HAVE_LINUX_THREADS
23035         pthread_kill_other_threads_np();
23036 #endif
23037
23038         return 0;
23039
23040 }
23041
23042 _ACEOF
23043 rm -f conftest$ac_exeext
23044 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23045   (eval $ac_link) 2>&5
23046   ac_status=$?
23047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23048   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23050   (eval $ac_try) 2>&5
23051   ac_status=$?
23052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23053   (exit $ac_status); }; }; then
23054   ol_cv_pthread_lc_r=yes
23055 else
23056   echo "$as_me: program exited with status $ac_status" >&5
23057 echo "$as_me: failed program was:" >&5
23058 sed 's/^/| /' conftest.$ac_ext >&5
23059
23060 ( exit $ac_status )
23061 ol_cv_pthread_lc_r=no
23062 fi
23063 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23064 fi
23065
23066                 # restore the LIBS
23067                 LIBS="$ol_LIBS"
23068
23069 fi
23070 echo "$as_me:$LINENO: result: $ol_cv_pthread_lc_r" >&5
23071 echo "${ECHO_T}$ol_cv_pthread_lc_r" >&6
23072
23073         if test $ol_cv_pthread_lc_r = yes ; then
23074                 ol_link_pthreads="-lc_r"
23075                 ol_link_threads=posix
23076         fi
23077 fi
23078
23079
23080                 # Pthread try link: -threads (ol_cv_pthread_threads)
23081 if test "$ol_link_threads" = no ; then
23082         # try -threads
23083         echo "$as_me:$LINENO: checking for pthread link with -threads" >&5
23084 echo $ECHO_N "checking for pthread link with -threads... $ECHO_C" >&6
23085 if test "${ol_cv_pthread_threads+set}" = set; then
23086   echo $ECHO_N "(cached) $ECHO_C" >&6
23087 else
23088
23089                 # save the flags
23090                 ol_LIBS="$LIBS"
23091                 LIBS="-threads $LIBS"
23092
23093                 if test "$cross_compiling" = yes; then
23094   cat >conftest.$ac_ext <<_ACEOF
23095 /* confdefs.h.  */
23096 _ACEOF
23097 cat confdefs.h >>conftest.$ac_ext
23098 cat >>conftest.$ac_ext <<_ACEOF
23099 /* end confdefs.h.  */
23100
23101 /* pthread test headers */
23102 #include <pthread.h>
23103 #if HAVE_PTHREADS < 7
23104 #include <errno.h>
23105 #endif
23106 #ifndef NULL
23107 #define NULL (void*)0
23108 #endif
23109
23110 static void *task(p)
23111         void *p;
23112 {
23113         return (void *) (p == NULL);
23114 }
23115
23116 int
23117 main ()
23118 {
23119
23120         /* pthread test function */
23121 #ifndef PTHREAD_CREATE_DETACHED
23122 #define PTHREAD_CREATE_DETACHED 1
23123 #endif
23124         pthread_t t;
23125         int status;
23126         int detach = PTHREAD_CREATE_DETACHED;
23127
23128 #if HAVE_PTHREADS > 4
23129         /* Final pthreads */
23130         pthread_attr_t attr;
23131
23132         status = pthread_attr_init(&attr);
23133         if( status ) return status;
23134
23135 #if HAVE_PTHREADS < 7
23136         status = pthread_attr_setdetachstate(&attr, &detach);
23137         if( status < 0 ) status = errno;
23138 #else
23139         status = pthread_attr_setdetachstate(&attr, detach);
23140 #endif
23141         if( status ) return status;
23142         status = pthread_create( &t, &attr, task, NULL );
23143 #if HAVE_PTHREADS < 7
23144         if( status < 0 ) status = errno;
23145 #endif
23146         if( status ) return status;
23147 #else
23148         /* Draft 4 pthreads */
23149         status = pthread_create( &t, pthread_attr_default, task, NULL );
23150         if( status ) return errno;
23151
23152         /* give thread a chance to complete */
23153         /* it should remain joinable and hence detachable */
23154         sleep( 1 );
23155
23156         status = pthread_detach( &t );
23157         if( status ) return errno;
23158 #endif
23159
23160 #ifdef HAVE_LINUX_THREADS
23161         pthread_kill_other_threads_np();
23162 #endif
23163
23164         return 0;
23165
23166   ;
23167   return 0;
23168 }
23169 _ACEOF
23170 rm -f conftest.$ac_objext conftest$ac_exeext
23171 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23172   (eval $ac_link) 2>conftest.er1
23173   ac_status=$?
23174   grep -v '^ *+' conftest.er1 >conftest.err
23175   rm -f conftest.er1
23176   cat conftest.err >&5
23177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23178   (exit $ac_status); } &&
23179          { ac_try='test -z "$ac_c_werror_flag"
23180                          || test ! -s conftest.err'
23181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23182   (eval $ac_try) 2>&5
23183   ac_status=$?
23184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23185   (exit $ac_status); }; } &&
23186          { ac_try='test -s conftest$ac_exeext'
23187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23188   (eval $ac_try) 2>&5
23189   ac_status=$?
23190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23191   (exit $ac_status); }; }; then
23192   ol_cv_pthread_threads=yes
23193 else
23194   echo "$as_me: failed program was:" >&5
23195 sed 's/^/| /' conftest.$ac_ext >&5
23196
23197 ol_cv_pthread_threads=no
23198 fi
23199 rm -f conftest.err conftest.$ac_objext \
23200       conftest$ac_exeext conftest.$ac_ext
23201 else
23202   cat >conftest.$ac_ext <<_ACEOF
23203 /* confdefs.h.  */
23204 _ACEOF
23205 cat confdefs.h >>conftest.$ac_ext
23206 cat >>conftest.$ac_ext <<_ACEOF
23207 /* end confdefs.h.  */
23208
23209 /* pthread test headers */
23210 #include <pthread.h>
23211 #if HAVE_PTHREADS < 7
23212 #include <errno.h>
23213 #endif
23214 #ifndef NULL
23215 #define NULL (void*)0
23216 #endif
23217
23218 static void *task(p)
23219         void *p;
23220 {
23221         return (void *) (p == NULL);
23222 }
23223
23224
23225 int main(argc, argv)
23226         int argc;
23227         char **argv;
23228 {
23229
23230         /* pthread test function */
23231 #ifndef PTHREAD_CREATE_DETACHED
23232 #define PTHREAD_CREATE_DETACHED 1
23233 #endif
23234         pthread_t t;
23235         int status;
23236         int detach = PTHREAD_CREATE_DETACHED;
23237
23238 #if HAVE_PTHREADS > 4
23239         /* Final pthreads */
23240         pthread_attr_t attr;
23241
23242         status = pthread_attr_init(&attr);
23243         if( status ) return status;
23244
23245 #if HAVE_PTHREADS < 7
23246         status = pthread_attr_setdetachstate(&attr, &detach);
23247         if( status < 0 ) status = errno;
23248 #else
23249         status = pthread_attr_setdetachstate(&attr, detach);
23250 #endif
23251         if( status ) return status;
23252         status = pthread_create( &t, &attr, task, NULL );
23253 #if HAVE_PTHREADS < 7
23254         if( status < 0 ) status = errno;
23255 #endif
23256         if( status ) return status;
23257 #else
23258         /* Draft 4 pthreads */
23259         status = pthread_create( &t, pthread_attr_default, task, NULL );
23260         if( status ) return errno;
23261
23262         /* give thread a chance to complete */
23263         /* it should remain joinable and hence detachable */
23264         sleep( 1 );
23265
23266         status = pthread_detach( &t );
23267         if( status ) return errno;
23268 #endif
23269
23270 #ifdef HAVE_LINUX_THREADS
23271         pthread_kill_other_threads_np();
23272 #endif
23273
23274         return 0;
23275
23276 }
23277
23278 _ACEOF
23279 rm -f conftest$ac_exeext
23280 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23281   (eval $ac_link) 2>&5
23282   ac_status=$?
23283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23284   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23285   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23286   (eval $ac_try) 2>&5
23287   ac_status=$?
23288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23289   (exit $ac_status); }; }; then
23290   ol_cv_pthread_threads=yes
23291 else
23292   echo "$as_me: program exited with status $ac_status" >&5
23293 echo "$as_me: failed program was:" >&5
23294 sed 's/^/| /' conftest.$ac_ext >&5
23295
23296 ( exit $ac_status )
23297 ol_cv_pthread_threads=no
23298 fi
23299 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23300 fi
23301
23302                 # restore the LIBS
23303                 LIBS="$ol_LIBS"
23304
23305 fi
23306 echo "$as_me:$LINENO: result: $ol_cv_pthread_threads" >&5
23307 echo "${ECHO_T}$ol_cv_pthread_threads" >&6
23308
23309         if test $ol_cv_pthread_threads = yes ; then
23310                 ol_link_pthreads="-threads"
23311                 ol_link_threads=posix
23312         fi
23313 fi
23314
23315
23316                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
23317 if test "$ol_link_threads" = no ; then
23318         # try -lpthreads -lmach -lexc -lc_r
23319         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
23320 echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc -lc_r... $ECHO_C" >&6
23321 if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then
23322   echo $ECHO_N "(cached) $ECHO_C" >&6
23323 else
23324
23325                 # save the flags
23326                 ol_LIBS="$LIBS"
23327                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
23328
23329                 if test "$cross_compiling" = yes; then
23330   cat >conftest.$ac_ext <<_ACEOF
23331 /* confdefs.h.  */
23332 _ACEOF
23333 cat confdefs.h >>conftest.$ac_ext
23334 cat >>conftest.$ac_ext <<_ACEOF
23335 /* end confdefs.h.  */
23336
23337 /* pthread test headers */
23338 #include <pthread.h>
23339 #if HAVE_PTHREADS < 7
23340 #include <errno.h>
23341 #endif
23342 #ifndef NULL
23343 #define NULL (void*)0
23344 #endif
23345
23346 static void *task(p)
23347         void *p;
23348 {
23349         return (void *) (p == NULL);
23350 }
23351
23352 int
23353 main ()
23354 {
23355
23356         /* pthread test function */
23357 #ifndef PTHREAD_CREATE_DETACHED
23358 #define PTHREAD_CREATE_DETACHED 1
23359 #endif
23360         pthread_t t;
23361         int status;
23362         int detach = PTHREAD_CREATE_DETACHED;
23363
23364 #if HAVE_PTHREADS > 4
23365         /* Final pthreads */
23366         pthread_attr_t attr;
23367
23368         status = pthread_attr_init(&attr);
23369         if( status ) return status;
23370
23371 #if HAVE_PTHREADS < 7
23372         status = pthread_attr_setdetachstate(&attr, &detach);
23373         if( status < 0 ) status = errno;
23374 #else
23375         status = pthread_attr_setdetachstate(&attr, detach);
23376 #endif
23377         if( status ) return status;
23378         status = pthread_create( &t, &attr, task, NULL );
23379 #if HAVE_PTHREADS < 7
23380         if( status < 0 ) status = errno;
23381 #endif
23382         if( status ) return status;
23383 #else
23384         /* Draft 4 pthreads */
23385         status = pthread_create( &t, pthread_attr_default, task, NULL );
23386         if( status ) return errno;
23387
23388         /* give thread a chance to complete */
23389         /* it should remain joinable and hence detachable */
23390         sleep( 1 );
23391
23392         status = pthread_detach( &t );
23393         if( status ) return errno;
23394 #endif
23395
23396 #ifdef HAVE_LINUX_THREADS
23397         pthread_kill_other_threads_np();
23398 #endif
23399
23400         return 0;
23401
23402   ;
23403   return 0;
23404 }
23405 _ACEOF
23406 rm -f conftest.$ac_objext conftest$ac_exeext
23407 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23408   (eval $ac_link) 2>conftest.er1
23409   ac_status=$?
23410   grep -v '^ *+' conftest.er1 >conftest.err
23411   rm -f conftest.er1
23412   cat conftest.err >&5
23413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23414   (exit $ac_status); } &&
23415          { ac_try='test -z "$ac_c_werror_flag"
23416                          || test ! -s conftest.err'
23417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23418   (eval $ac_try) 2>&5
23419   ac_status=$?
23420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23421   (exit $ac_status); }; } &&
23422          { ac_try='test -s conftest$ac_exeext'
23423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23424   (eval $ac_try) 2>&5
23425   ac_status=$?
23426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23427   (exit $ac_status); }; }; then
23428   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
23429 else
23430   echo "$as_me: failed program was:" >&5
23431 sed 's/^/| /' conftest.$ac_ext >&5
23432
23433 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
23434 fi
23435 rm -f conftest.err conftest.$ac_objext \
23436       conftest$ac_exeext conftest.$ac_ext
23437 else
23438   cat >conftest.$ac_ext <<_ACEOF
23439 /* confdefs.h.  */
23440 _ACEOF
23441 cat confdefs.h >>conftest.$ac_ext
23442 cat >>conftest.$ac_ext <<_ACEOF
23443 /* end confdefs.h.  */
23444
23445 /* pthread test headers */
23446 #include <pthread.h>
23447 #if HAVE_PTHREADS < 7
23448 #include <errno.h>
23449 #endif
23450 #ifndef NULL
23451 #define NULL (void*)0
23452 #endif
23453
23454 static void *task(p)
23455         void *p;
23456 {
23457         return (void *) (p == NULL);
23458 }
23459
23460
23461 int main(argc, argv)
23462         int argc;
23463         char **argv;
23464 {
23465
23466         /* pthread test function */
23467 #ifndef PTHREAD_CREATE_DETACHED
23468 #define PTHREAD_CREATE_DETACHED 1
23469 #endif
23470         pthread_t t;
23471         int status;
23472         int detach = PTHREAD_CREATE_DETACHED;
23473
23474 #if HAVE_PTHREADS > 4
23475         /* Final pthreads */
23476         pthread_attr_t attr;
23477
23478         status = pthread_attr_init(&attr);
23479         if( status ) return status;
23480
23481 #if HAVE_PTHREADS < 7
23482         status = pthread_attr_setdetachstate(&attr, &detach);
23483         if( status < 0 ) status = errno;
23484 #else
23485         status = pthread_attr_setdetachstate(&attr, detach);
23486 #endif
23487         if( status ) return status;
23488         status = pthread_create( &t, &attr, task, NULL );
23489 #if HAVE_PTHREADS < 7
23490         if( status < 0 ) status = errno;
23491 #endif
23492         if( status ) return status;
23493 #else
23494         /* Draft 4 pthreads */
23495         status = pthread_create( &t, pthread_attr_default, task, NULL );
23496         if( status ) return errno;
23497
23498         /* give thread a chance to complete */
23499         /* it should remain joinable and hence detachable */
23500         sleep( 1 );
23501
23502         status = pthread_detach( &t );
23503         if( status ) return errno;
23504 #endif
23505
23506 #ifdef HAVE_LINUX_THREADS
23507         pthread_kill_other_threads_np();
23508 #endif
23509
23510         return 0;
23511
23512 }
23513
23514 _ACEOF
23515 rm -f conftest$ac_exeext
23516 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23517   (eval $ac_link) 2>&5
23518   ac_status=$?
23519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23520   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23521   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23522   (eval $ac_try) 2>&5
23523   ac_status=$?
23524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23525   (exit $ac_status); }; }; then
23526   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
23527 else
23528   echo "$as_me: program exited with status $ac_status" >&5
23529 echo "$as_me: failed program was:" >&5
23530 sed 's/^/| /' conftest.$ac_ext >&5
23531
23532 ( exit $ac_status )
23533 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
23534 fi
23535 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23536 fi
23537
23538                 # restore the LIBS
23539                 LIBS="$ol_LIBS"
23540
23541 fi
23542 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
23543 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6
23544
23545         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
23546                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
23547                 ol_link_threads=posix
23548         fi
23549 fi
23550
23551                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
23552 if test "$ol_link_threads" = no ; then
23553         # try -lpthreads -lmach -lexc
23554         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc" >&5
23555 echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc... $ECHO_C" >&6
23556 if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then
23557   echo $ECHO_N "(cached) $ECHO_C" >&6
23558 else
23559
23560                 # save the flags
23561                 ol_LIBS="$LIBS"
23562                 LIBS="-lpthreads -lmach -lexc $LIBS"
23563
23564                 if test "$cross_compiling" = yes; then
23565   cat >conftest.$ac_ext <<_ACEOF
23566 /* confdefs.h.  */
23567 _ACEOF
23568 cat confdefs.h >>conftest.$ac_ext
23569 cat >>conftest.$ac_ext <<_ACEOF
23570 /* end confdefs.h.  */
23571
23572 /* pthread test headers */
23573 #include <pthread.h>
23574 #if HAVE_PTHREADS < 7
23575 #include <errno.h>
23576 #endif
23577 #ifndef NULL
23578 #define NULL (void*)0
23579 #endif
23580
23581 static void *task(p)
23582         void *p;
23583 {
23584         return (void *) (p == NULL);
23585 }
23586
23587 int
23588 main ()
23589 {
23590
23591         /* pthread test function */
23592 #ifndef PTHREAD_CREATE_DETACHED
23593 #define PTHREAD_CREATE_DETACHED 1
23594 #endif
23595         pthread_t t;
23596         int status;
23597         int detach = PTHREAD_CREATE_DETACHED;
23598
23599 #if HAVE_PTHREADS > 4
23600         /* Final pthreads */
23601         pthread_attr_t attr;
23602
23603         status = pthread_attr_init(&attr);
23604         if( status ) return status;
23605
23606 #if HAVE_PTHREADS < 7
23607         status = pthread_attr_setdetachstate(&attr, &detach);
23608         if( status < 0 ) status = errno;
23609 #else
23610         status = pthread_attr_setdetachstate(&attr, detach);
23611 #endif
23612         if( status ) return status;
23613         status = pthread_create( &t, &attr, task, NULL );
23614 #if HAVE_PTHREADS < 7
23615         if( status < 0 ) status = errno;
23616 #endif
23617         if( status ) return status;
23618 #else
23619         /* Draft 4 pthreads */
23620         status = pthread_create( &t, pthread_attr_default, task, NULL );
23621         if( status ) return errno;
23622
23623         /* give thread a chance to complete */
23624         /* it should remain joinable and hence detachable */
23625         sleep( 1 );
23626
23627         status = pthread_detach( &t );
23628         if( status ) return errno;
23629 #endif
23630
23631 #ifdef HAVE_LINUX_THREADS
23632         pthread_kill_other_threads_np();
23633 #endif
23634
23635         return 0;
23636
23637   ;
23638   return 0;
23639 }
23640 _ACEOF
23641 rm -f conftest.$ac_objext conftest$ac_exeext
23642 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23643   (eval $ac_link) 2>conftest.er1
23644   ac_status=$?
23645   grep -v '^ *+' conftest.er1 >conftest.err
23646   rm -f conftest.er1
23647   cat conftest.err >&5
23648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23649   (exit $ac_status); } &&
23650          { ac_try='test -z "$ac_c_werror_flag"
23651                          || test ! -s conftest.err'
23652   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23653   (eval $ac_try) 2>&5
23654   ac_status=$?
23655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23656   (exit $ac_status); }; } &&
23657          { ac_try='test -s conftest$ac_exeext'
23658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23659   (eval $ac_try) 2>&5
23660   ac_status=$?
23661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23662   (exit $ac_status); }; }; then
23663   ol_cv_pthread_lpthreads_lmach_lexc=yes
23664 else
23665   echo "$as_me: failed program was:" >&5
23666 sed 's/^/| /' conftest.$ac_ext >&5
23667
23668 ol_cv_pthread_lpthreads_lmach_lexc=no
23669 fi
23670 rm -f conftest.err conftest.$ac_objext \
23671       conftest$ac_exeext conftest.$ac_ext
23672 else
23673   cat >conftest.$ac_ext <<_ACEOF
23674 /* confdefs.h.  */
23675 _ACEOF
23676 cat confdefs.h >>conftest.$ac_ext
23677 cat >>conftest.$ac_ext <<_ACEOF
23678 /* end confdefs.h.  */
23679
23680 /* pthread test headers */
23681 #include <pthread.h>
23682 #if HAVE_PTHREADS < 7
23683 #include <errno.h>
23684 #endif
23685 #ifndef NULL
23686 #define NULL (void*)0
23687 #endif
23688
23689 static void *task(p)
23690         void *p;
23691 {
23692         return (void *) (p == NULL);
23693 }
23694
23695
23696 int main(argc, argv)
23697         int argc;
23698         char **argv;
23699 {
23700
23701         /* pthread test function */
23702 #ifndef PTHREAD_CREATE_DETACHED
23703 #define PTHREAD_CREATE_DETACHED 1
23704 #endif
23705         pthread_t t;
23706         int status;
23707         int detach = PTHREAD_CREATE_DETACHED;
23708
23709 #if HAVE_PTHREADS > 4
23710         /* Final pthreads */
23711         pthread_attr_t attr;
23712
23713         status = pthread_attr_init(&attr);
23714         if( status ) return status;
23715
23716 #if HAVE_PTHREADS < 7
23717         status = pthread_attr_setdetachstate(&attr, &detach);
23718         if( status < 0 ) status = errno;
23719 #else
23720         status = pthread_attr_setdetachstate(&attr, detach);
23721 #endif
23722         if( status ) return status;
23723         status = pthread_create( &t, &attr, task, NULL );
23724 #if HAVE_PTHREADS < 7
23725         if( status < 0 ) status = errno;
23726 #endif
23727         if( status ) return status;
23728 #else
23729         /* Draft 4 pthreads */
23730         status = pthread_create( &t, pthread_attr_default, task, NULL );
23731         if( status ) return errno;
23732
23733         /* give thread a chance to complete */
23734         /* it should remain joinable and hence detachable */
23735         sleep( 1 );
23736
23737         status = pthread_detach( &t );
23738         if( status ) return errno;
23739 #endif
23740
23741 #ifdef HAVE_LINUX_THREADS
23742         pthread_kill_other_threads_np();
23743 #endif
23744
23745         return 0;
23746
23747 }
23748
23749 _ACEOF
23750 rm -f conftest$ac_exeext
23751 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23752   (eval $ac_link) 2>&5
23753   ac_status=$?
23754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23755   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23757   (eval $ac_try) 2>&5
23758   ac_status=$?
23759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23760   (exit $ac_status); }; }; then
23761   ol_cv_pthread_lpthreads_lmach_lexc=yes
23762 else
23763   echo "$as_me: program exited with status $ac_status" >&5
23764 echo "$as_me: failed program was:" >&5
23765 sed 's/^/| /' conftest.$ac_ext >&5
23766
23767 ( exit $ac_status )
23768 ol_cv_pthread_lpthreads_lmach_lexc=no
23769 fi
23770 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23771 fi
23772
23773                 # restore the LIBS
23774                 LIBS="$ol_LIBS"
23775
23776 fi
23777 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
23778 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc" >&6
23779
23780         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
23781                 ol_link_pthreads="-lpthreads -lmach -lexc"
23782                 ol_link_threads=posix
23783         fi
23784 fi
23785
23786                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
23787 if test "$ol_link_threads" = no ; then
23788         # try -lpthreads -lexc
23789         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lexc" >&5
23790 echo $ECHO_N "checking for pthread link with -lpthreads -lexc... $ECHO_C" >&6
23791 if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then
23792   echo $ECHO_N "(cached) $ECHO_C" >&6
23793 else
23794
23795                 # save the flags
23796                 ol_LIBS="$LIBS"
23797                 LIBS="-lpthreads -lexc $LIBS"
23798
23799                 if test "$cross_compiling" = yes; then
23800   cat >conftest.$ac_ext <<_ACEOF
23801 /* confdefs.h.  */
23802 _ACEOF
23803 cat confdefs.h >>conftest.$ac_ext
23804 cat >>conftest.$ac_ext <<_ACEOF
23805 /* end confdefs.h.  */
23806
23807 /* pthread test headers */
23808 #include <pthread.h>
23809 #if HAVE_PTHREADS < 7
23810 #include <errno.h>
23811 #endif
23812 #ifndef NULL
23813 #define NULL (void*)0
23814 #endif
23815
23816 static void *task(p)
23817         void *p;
23818 {
23819         return (void *) (p == NULL);
23820 }
23821
23822 int
23823 main ()
23824 {
23825
23826         /* pthread test function */
23827 #ifndef PTHREAD_CREATE_DETACHED
23828 #define PTHREAD_CREATE_DETACHED 1
23829 #endif
23830         pthread_t t;
23831         int status;
23832         int detach = PTHREAD_CREATE_DETACHED;
23833
23834 #if HAVE_PTHREADS > 4
23835         /* Final pthreads */
23836         pthread_attr_t attr;
23837
23838         status = pthread_attr_init(&attr);
23839         if( status ) return status;
23840
23841 #if HAVE_PTHREADS < 7
23842         status = pthread_attr_setdetachstate(&attr, &detach);
23843         if( status < 0 ) status = errno;
23844 #else
23845         status = pthread_attr_setdetachstate(&attr, detach);
23846 #endif
23847         if( status ) return status;
23848         status = pthread_create( &t, &attr, task, NULL );
23849 #if HAVE_PTHREADS < 7
23850         if( status < 0 ) status = errno;
23851 #endif
23852         if( status ) return status;
23853 #else
23854         /* Draft 4 pthreads */
23855         status = pthread_create( &t, pthread_attr_default, task, NULL );
23856         if( status ) return errno;
23857
23858         /* give thread a chance to complete */
23859         /* it should remain joinable and hence detachable */
23860         sleep( 1 );
23861
23862         status = pthread_detach( &t );
23863         if( status ) return errno;
23864 #endif
23865
23866 #ifdef HAVE_LINUX_THREADS
23867         pthread_kill_other_threads_np();
23868 #endif
23869
23870         return 0;
23871
23872   ;
23873   return 0;
23874 }
23875 _ACEOF
23876 rm -f conftest.$ac_objext conftest$ac_exeext
23877 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23878   (eval $ac_link) 2>conftest.er1
23879   ac_status=$?
23880   grep -v '^ *+' conftest.er1 >conftest.err
23881   rm -f conftest.er1
23882   cat conftest.err >&5
23883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23884   (exit $ac_status); } &&
23885          { ac_try='test -z "$ac_c_werror_flag"
23886                          || test ! -s conftest.err'
23887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23888   (eval $ac_try) 2>&5
23889   ac_status=$?
23890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23891   (exit $ac_status); }; } &&
23892          { ac_try='test -s conftest$ac_exeext'
23893   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23894   (eval $ac_try) 2>&5
23895   ac_status=$?
23896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23897   (exit $ac_status); }; }; then
23898   ol_cv_pthread_lpthreads_lexc=yes
23899 else
23900   echo "$as_me: failed program was:" >&5
23901 sed 's/^/| /' conftest.$ac_ext >&5
23902
23903 ol_cv_pthread_lpthreads_lexc=no
23904 fi
23905 rm -f conftest.err conftest.$ac_objext \
23906       conftest$ac_exeext conftest.$ac_ext
23907 else
23908   cat >conftest.$ac_ext <<_ACEOF
23909 /* confdefs.h.  */
23910 _ACEOF
23911 cat confdefs.h >>conftest.$ac_ext
23912 cat >>conftest.$ac_ext <<_ACEOF
23913 /* end confdefs.h.  */
23914
23915 /* pthread test headers */
23916 #include <pthread.h>
23917 #if HAVE_PTHREADS < 7
23918 #include <errno.h>
23919 #endif
23920 #ifndef NULL
23921 #define NULL (void*)0
23922 #endif
23923
23924 static void *task(p)
23925         void *p;
23926 {
23927         return (void *) (p == NULL);
23928 }
23929
23930
23931 int main(argc, argv)
23932         int argc;
23933         char **argv;
23934 {
23935
23936         /* pthread test function */
23937 #ifndef PTHREAD_CREATE_DETACHED
23938 #define PTHREAD_CREATE_DETACHED 1
23939 #endif
23940         pthread_t t;
23941         int status;
23942         int detach = PTHREAD_CREATE_DETACHED;
23943
23944 #if HAVE_PTHREADS > 4
23945         /* Final pthreads */
23946         pthread_attr_t attr;
23947
23948         status = pthread_attr_init(&attr);
23949         if( status ) return status;
23950
23951 #if HAVE_PTHREADS < 7
23952         status = pthread_attr_setdetachstate(&attr, &detach);
23953         if( status < 0 ) status = errno;
23954 #else
23955         status = pthread_attr_setdetachstate(&attr, detach);
23956 #endif
23957         if( status ) return status;
23958         status = pthread_create( &t, &attr, task, NULL );
23959 #if HAVE_PTHREADS < 7
23960         if( status < 0 ) status = errno;
23961 #endif
23962         if( status ) return status;
23963 #else
23964         /* Draft 4 pthreads */
23965         status = pthread_create( &t, pthread_attr_default, task, NULL );
23966         if( status ) return errno;
23967
23968         /* give thread a chance to complete */
23969         /* it should remain joinable and hence detachable */
23970         sleep( 1 );
23971
23972         status = pthread_detach( &t );
23973         if( status ) return errno;
23974 #endif
23975
23976 #ifdef HAVE_LINUX_THREADS
23977         pthread_kill_other_threads_np();
23978 #endif
23979
23980         return 0;
23981
23982 }
23983
23984 _ACEOF
23985 rm -f conftest$ac_exeext
23986 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23987   (eval $ac_link) 2>&5
23988   ac_status=$?
23989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23990   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23991   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23992   (eval $ac_try) 2>&5
23993   ac_status=$?
23994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23995   (exit $ac_status); }; }; then
23996   ol_cv_pthread_lpthreads_lexc=yes
23997 else
23998   echo "$as_me: program exited with status $ac_status" >&5
23999 echo "$as_me: failed program was:" >&5
24000 sed 's/^/| /' conftest.$ac_ext >&5
24001
24002 ( exit $ac_status )
24003 ol_cv_pthread_lpthreads_lexc=no
24004 fi
24005 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24006 fi
24007
24008                 # restore the LIBS
24009                 LIBS="$ol_LIBS"
24010
24011 fi
24012 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lexc" >&5
24013 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lexc" >&6
24014
24015         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
24016                 ol_link_pthreads="-lpthreads -lexc"
24017                 ol_link_threads=posix
24018         fi
24019 fi
24020
24021
24022                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
24023 if test "$ol_link_threads" = no ; then
24024         # try -lpthreads
24025         echo "$as_me:$LINENO: checking for pthread link with -lpthreads" >&5
24026 echo $ECHO_N "checking for pthread link with -lpthreads... $ECHO_C" >&6
24027 if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then
24028   echo $ECHO_N "(cached) $ECHO_C" >&6
24029 else
24030
24031                 # save the flags
24032                 ol_LIBS="$LIBS"
24033                 LIBS="-lpthreads $LIBS"
24034
24035                 if test "$cross_compiling" = yes; then
24036   cat >conftest.$ac_ext <<_ACEOF
24037 /* confdefs.h.  */
24038 _ACEOF
24039 cat confdefs.h >>conftest.$ac_ext
24040 cat >>conftest.$ac_ext <<_ACEOF
24041 /* end confdefs.h.  */
24042
24043 /* pthread test headers */
24044 #include <pthread.h>
24045 #if HAVE_PTHREADS < 7
24046 #include <errno.h>
24047 #endif
24048 #ifndef NULL
24049 #define NULL (void*)0
24050 #endif
24051
24052 static void *task(p)
24053         void *p;
24054 {
24055         return (void *) (p == NULL);
24056 }
24057
24058 int
24059 main ()
24060 {
24061
24062         /* pthread test function */
24063 #ifndef PTHREAD_CREATE_DETACHED
24064 #define PTHREAD_CREATE_DETACHED 1
24065 #endif
24066         pthread_t t;
24067         int status;
24068         int detach = PTHREAD_CREATE_DETACHED;
24069
24070 #if HAVE_PTHREADS > 4
24071         /* Final pthreads */
24072         pthread_attr_t attr;
24073
24074         status = pthread_attr_init(&attr);
24075         if( status ) return status;
24076
24077 #if HAVE_PTHREADS < 7
24078         status = pthread_attr_setdetachstate(&attr, &detach);
24079         if( status < 0 ) status = errno;
24080 #else
24081         status = pthread_attr_setdetachstate(&attr, detach);
24082 #endif
24083         if( status ) return status;
24084         status = pthread_create( &t, &attr, task, NULL );
24085 #if HAVE_PTHREADS < 7
24086         if( status < 0 ) status = errno;
24087 #endif
24088         if( status ) return status;
24089 #else
24090         /* Draft 4 pthreads */
24091         status = pthread_create( &t, pthread_attr_default, task, NULL );
24092         if( status ) return errno;
24093
24094         /* give thread a chance to complete */
24095         /* it should remain joinable and hence detachable */
24096         sleep( 1 );
24097
24098         status = pthread_detach( &t );
24099         if( status ) return errno;
24100 #endif
24101
24102 #ifdef HAVE_LINUX_THREADS
24103         pthread_kill_other_threads_np();
24104 #endif
24105
24106         return 0;
24107
24108   ;
24109   return 0;
24110 }
24111 _ACEOF
24112 rm -f conftest.$ac_objext conftest$ac_exeext
24113 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24114   (eval $ac_link) 2>conftest.er1
24115   ac_status=$?
24116   grep -v '^ *+' conftest.er1 >conftest.err
24117   rm -f conftest.er1
24118   cat conftest.err >&5
24119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24120   (exit $ac_status); } &&
24121          { ac_try='test -z "$ac_c_werror_flag"
24122                          || test ! -s conftest.err'
24123   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24124   (eval $ac_try) 2>&5
24125   ac_status=$?
24126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24127   (exit $ac_status); }; } &&
24128          { ac_try='test -s conftest$ac_exeext'
24129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24130   (eval $ac_try) 2>&5
24131   ac_status=$?
24132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24133   (exit $ac_status); }; }; then
24134   ol_cv_pthread_lib_lpthreads=yes
24135 else
24136   echo "$as_me: failed program was:" >&5
24137 sed 's/^/| /' conftest.$ac_ext >&5
24138
24139 ol_cv_pthread_lib_lpthreads=no
24140 fi
24141 rm -f conftest.err conftest.$ac_objext \
24142       conftest$ac_exeext conftest.$ac_ext
24143 else
24144   cat >conftest.$ac_ext <<_ACEOF
24145 /* confdefs.h.  */
24146 _ACEOF
24147 cat confdefs.h >>conftest.$ac_ext
24148 cat >>conftest.$ac_ext <<_ACEOF
24149 /* end confdefs.h.  */
24150
24151 /* pthread test headers */
24152 #include <pthread.h>
24153 #if HAVE_PTHREADS < 7
24154 #include <errno.h>
24155 #endif
24156 #ifndef NULL
24157 #define NULL (void*)0
24158 #endif
24159
24160 static void *task(p)
24161         void *p;
24162 {
24163         return (void *) (p == NULL);
24164 }
24165
24166
24167 int main(argc, argv)
24168         int argc;
24169         char **argv;
24170 {
24171
24172         /* pthread test function */
24173 #ifndef PTHREAD_CREATE_DETACHED
24174 #define PTHREAD_CREATE_DETACHED 1
24175 #endif
24176         pthread_t t;
24177         int status;
24178         int detach = PTHREAD_CREATE_DETACHED;
24179
24180 #if HAVE_PTHREADS > 4
24181         /* Final pthreads */
24182         pthread_attr_t attr;
24183
24184         status = pthread_attr_init(&attr);
24185         if( status ) return status;
24186
24187 #if HAVE_PTHREADS < 7
24188         status = pthread_attr_setdetachstate(&attr, &detach);
24189         if( status < 0 ) status = errno;
24190 #else
24191         status = pthread_attr_setdetachstate(&attr, detach);
24192 #endif
24193         if( status ) return status;
24194         status = pthread_create( &t, &attr, task, NULL );
24195 #if HAVE_PTHREADS < 7
24196         if( status < 0 ) status = errno;
24197 #endif
24198         if( status ) return status;
24199 #else
24200         /* Draft 4 pthreads */
24201         status = pthread_create( &t, pthread_attr_default, task, NULL );
24202         if( status ) return errno;
24203
24204         /* give thread a chance to complete */
24205         /* it should remain joinable and hence detachable */
24206         sleep( 1 );
24207
24208         status = pthread_detach( &t );
24209         if( status ) return errno;
24210 #endif
24211
24212 #ifdef HAVE_LINUX_THREADS
24213         pthread_kill_other_threads_np();
24214 #endif
24215
24216         return 0;
24217
24218 }
24219
24220 _ACEOF
24221 rm -f conftest$ac_exeext
24222 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24223   (eval $ac_link) 2>&5
24224   ac_status=$?
24225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24226   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24227   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24228   (eval $ac_try) 2>&5
24229   ac_status=$?
24230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24231   (exit $ac_status); }; }; then
24232   ol_cv_pthread_lib_lpthreads=yes
24233 else
24234   echo "$as_me: program exited with status $ac_status" >&5
24235 echo "$as_me: failed program was:" >&5
24236 sed 's/^/| /' conftest.$ac_ext >&5
24237
24238 ( exit $ac_status )
24239 ol_cv_pthread_lib_lpthreads=no
24240 fi
24241 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24242 fi
24243
24244                 # restore the LIBS
24245                 LIBS="$ol_LIBS"
24246
24247 fi
24248 echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthreads" >&5
24249 echo "${ECHO_T}$ol_cv_pthread_lib_lpthreads" >&6
24250
24251         if test $ol_cv_pthread_lib_lpthreads = yes ; then
24252                 ol_link_pthreads="-lpthreads"
24253                 ol_link_threads=posix
24254         fi
24255 fi
24256
24257
24258                 if test $ol_link_threads != no ; then
24259                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
24260
24261                                                 save_CPPFLAGS="$CPPFLAGS"
24262                         save_LIBS="$LIBS"
24263                         LIBS="$LTHREAD_LIBS $LIBS"
24264
24265
24266
24267
24268 for ac_func in sched_yield pthread_yield thr_yield
24269 do
24270 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24271 echo "$as_me:$LINENO: checking for $ac_func" >&5
24272 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24273 if eval "test \"\${$as_ac_var+set}\" = set"; then
24274   echo $ECHO_N "(cached) $ECHO_C" >&6
24275 else
24276   cat >conftest.$ac_ext <<_ACEOF
24277 /* confdefs.h.  */
24278 _ACEOF
24279 cat confdefs.h >>conftest.$ac_ext
24280 cat >>conftest.$ac_ext <<_ACEOF
24281 /* end confdefs.h.  */
24282 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24283    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24284 #define $ac_func innocuous_$ac_func
24285
24286 /* System header to define __stub macros and hopefully few prototypes,
24287     which can conflict with char $ac_func (); below.
24288     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24289     <limits.h> exists even on freestanding compilers.  */
24290
24291 #ifdef __STDC__
24292 # include <limits.h>
24293 #else
24294 # include <assert.h>
24295 #endif
24296
24297 #undef $ac_func
24298
24299 /* Override any gcc2 internal prototype to avoid an error.  */
24300 #ifdef __cplusplus
24301 extern "C"
24302 {
24303 #endif
24304 /* We use char because int might match the return type of a gcc2
24305    builtin and then its argument prototype would still apply.  */
24306 char $ac_func ();
24307 /* The GNU C library defines this for functions which it implements
24308     to always fail with ENOSYS.  Some functions are actually named
24309     something starting with __ and the normal name is an alias.  */
24310 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24311 choke me
24312 #else
24313 char (*f) () = $ac_func;
24314 #endif
24315 #ifdef __cplusplus
24316 }
24317 #endif
24318
24319 int
24320 main ()
24321 {
24322 return f != $ac_func;
24323   ;
24324   return 0;
24325 }
24326 _ACEOF
24327 rm -f conftest.$ac_objext conftest$ac_exeext
24328 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24329   (eval $ac_link) 2>conftest.er1
24330   ac_status=$?
24331   grep -v '^ *+' conftest.er1 >conftest.err
24332   rm -f conftest.er1
24333   cat conftest.err >&5
24334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24335   (exit $ac_status); } &&
24336          { ac_try='test -z "$ac_c_werror_flag"
24337                          || test ! -s conftest.err'
24338   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24339   (eval $ac_try) 2>&5
24340   ac_status=$?
24341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24342   (exit $ac_status); }; } &&
24343          { ac_try='test -s conftest$ac_exeext'
24344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24345   (eval $ac_try) 2>&5
24346   ac_status=$?
24347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24348   (exit $ac_status); }; }; then
24349   eval "$as_ac_var=yes"
24350 else
24351   echo "$as_me: failed program was:" >&5
24352 sed 's/^/| /' conftest.$ac_ext >&5
24353
24354 eval "$as_ac_var=no"
24355 fi
24356 rm -f conftest.err conftest.$ac_objext \
24357       conftest$ac_exeext conftest.$ac_ext
24358 fi
24359 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24360 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24361 if test `eval echo '${'$as_ac_var'}'` = yes; then
24362   cat >>confdefs.h <<_ACEOF
24363 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24364 _ACEOF
24365
24366 fi
24367 done
24368
24369
24370                         if test $ac_cv_func_sched_yield = no &&
24371                            test $ac_cv_func_pthread_yield = no &&
24372                            test $ac_cv_func_thr_yield = no ; then
24373                                                                 echo "$as_me:$LINENO: checking for sched_yield in -lrt" >&5
24374 echo $ECHO_N "checking for sched_yield in -lrt... $ECHO_C" >&6
24375 if test "${ac_cv_lib_rt_sched_yield+set}" = set; then
24376   echo $ECHO_N "(cached) $ECHO_C" >&6
24377 else
24378   ac_check_lib_save_LIBS=$LIBS
24379 LIBS="-lrt  $LIBS"
24380 cat >conftest.$ac_ext <<_ACEOF
24381 /* confdefs.h.  */
24382 _ACEOF
24383 cat confdefs.h >>conftest.$ac_ext
24384 cat >>conftest.$ac_ext <<_ACEOF
24385 /* end confdefs.h.  */
24386
24387 /* Override any gcc2 internal prototype to avoid an error.  */
24388 #ifdef __cplusplus
24389 extern "C"
24390 #endif
24391 /* We use char because int might match the return type of a gcc2
24392    builtin and then its argument prototype would still apply.  */
24393 char sched_yield ();
24394 int
24395 main ()
24396 {
24397 sched_yield ();
24398   ;
24399   return 0;
24400 }
24401 _ACEOF
24402 rm -f conftest.$ac_objext conftest$ac_exeext
24403 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24404   (eval $ac_link) 2>conftest.er1
24405   ac_status=$?
24406   grep -v '^ *+' conftest.er1 >conftest.err
24407   rm -f conftest.er1
24408   cat conftest.err >&5
24409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24410   (exit $ac_status); } &&
24411          { ac_try='test -z "$ac_c_werror_flag"
24412                          || test ! -s conftest.err'
24413   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24414   (eval $ac_try) 2>&5
24415   ac_status=$?
24416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24417   (exit $ac_status); }; } &&
24418          { ac_try='test -s conftest$ac_exeext'
24419   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24420   (eval $ac_try) 2>&5
24421   ac_status=$?
24422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24423   (exit $ac_status); }; }; then
24424   ac_cv_lib_rt_sched_yield=yes
24425 else
24426   echo "$as_me: failed program was:" >&5
24427 sed 's/^/| /' conftest.$ac_ext >&5
24428
24429 ac_cv_lib_rt_sched_yield=no
24430 fi
24431 rm -f conftest.err conftest.$ac_objext \
24432       conftest$ac_exeext conftest.$ac_ext
24433 LIBS=$ac_check_lib_save_LIBS
24434 fi
24435 echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_yield" >&5
24436 echo "${ECHO_T}$ac_cv_lib_rt_sched_yield" >&6
24437 if test $ac_cv_lib_rt_sched_yield = yes; then
24438   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
24439
24440 cat >>confdefs.h <<\_ACEOF
24441 #define HAVE_SCHED_YIELD 1
24442 _ACEOF
24443
24444                                         ac_cv_func_sched_yield=yes
24445 else
24446   ac_cv_func_sched_yield=no
24447 fi
24448
24449                         fi
24450                         if test $ac_cv_func_sched_yield = no &&
24451                            test $ac_cv_func_pthread_yield = no &&
24452                            test "$ac_cv_func_thr_yield" = no ; then
24453                                 { echo "$as_me:$LINENO: WARNING: could not locate sched_yield() or pthread_yield()" >&5
24454 echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
24455                         fi
24456
24457
24458
24459 for ac_func in pthread_kill pthread_rwlock_destroy
24460 do
24461 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24462 echo "$as_me:$LINENO: checking for $ac_func" >&5
24463 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24464 if eval "test \"\${$as_ac_var+set}\" = set"; then
24465   echo $ECHO_N "(cached) $ECHO_C" >&6
24466 else
24467   cat >conftest.$ac_ext <<_ACEOF
24468 /* confdefs.h.  */
24469 _ACEOF
24470 cat confdefs.h >>conftest.$ac_ext
24471 cat >>conftest.$ac_ext <<_ACEOF
24472 /* end confdefs.h.  */
24473 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24474    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24475 #define $ac_func innocuous_$ac_func
24476
24477 /* System header to define __stub macros and hopefully few prototypes,
24478     which can conflict with char $ac_func (); below.
24479     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24480     <limits.h> exists even on freestanding compilers.  */
24481
24482 #ifdef __STDC__
24483 # include <limits.h>
24484 #else
24485 # include <assert.h>
24486 #endif
24487
24488 #undef $ac_func
24489
24490 /* Override any gcc2 internal prototype to avoid an error.  */
24491 #ifdef __cplusplus
24492 extern "C"
24493 {
24494 #endif
24495 /* We use char because int might match the return type of a gcc2
24496    builtin and then its argument prototype would still apply.  */
24497 char $ac_func ();
24498 /* The GNU C library defines this for functions which it implements
24499     to always fail with ENOSYS.  Some functions are actually named
24500     something starting with __ and the normal name is an alias.  */
24501 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24502 choke me
24503 #else
24504 char (*f) () = $ac_func;
24505 #endif
24506 #ifdef __cplusplus
24507 }
24508 #endif
24509
24510 int
24511 main ()
24512 {
24513 return f != $ac_func;
24514   ;
24515   return 0;
24516 }
24517 _ACEOF
24518 rm -f conftest.$ac_objext conftest$ac_exeext
24519 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24520   (eval $ac_link) 2>conftest.er1
24521   ac_status=$?
24522   grep -v '^ *+' conftest.er1 >conftest.err
24523   rm -f conftest.er1
24524   cat conftest.err >&5
24525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24526   (exit $ac_status); } &&
24527          { ac_try='test -z "$ac_c_werror_flag"
24528                          || test ! -s conftest.err'
24529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24530   (eval $ac_try) 2>&5
24531   ac_status=$?
24532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24533   (exit $ac_status); }; } &&
24534          { ac_try='test -s conftest$ac_exeext'
24535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24536   (eval $ac_try) 2>&5
24537   ac_status=$?
24538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24539   (exit $ac_status); }; }; then
24540   eval "$as_ac_var=yes"
24541 else
24542   echo "$as_me: failed program was:" >&5
24543 sed 's/^/| /' conftest.$ac_ext >&5
24544
24545 eval "$as_ac_var=no"
24546 fi
24547 rm -f conftest.err conftest.$ac_objext \
24548       conftest$ac_exeext conftest.$ac_ext
24549 fi
24550 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24551 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24552 if test `eval echo '${'$as_ac_var'}'` = yes; then
24553   cat >>confdefs.h <<_ACEOF
24554 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24555 _ACEOF
24556
24557 fi
24558 done
24559
24560
24561                                                                         echo "$as_me:$LINENO: checking for pthread_detach with <pthread.h>" >&5
24562 echo $ECHO_N "checking for pthread_detach with <pthread.h>... $ECHO_C" >&6
24563 if test "${ol_cv_func_pthread_detach+set}" = set; then
24564   echo $ECHO_N "(cached) $ECHO_C" >&6
24565 else
24566
24567                                                                 cat >conftest.$ac_ext <<_ACEOF
24568 /* confdefs.h.  */
24569 _ACEOF
24570 cat confdefs.h >>conftest.$ac_ext
24571 cat >>conftest.$ac_ext <<_ACEOF
24572 /* end confdefs.h.  */
24573
24574 #include <pthread.h>
24575 #ifndef NULL
24576 #define NULL (void*)0
24577 #endif
24578
24579 int
24580 main ()
24581 {
24582 pthread_detach(NULL);
24583   ;
24584   return 0;
24585 }
24586 _ACEOF
24587 rm -f conftest.$ac_objext conftest$ac_exeext
24588 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24589   (eval $ac_link) 2>conftest.er1
24590   ac_status=$?
24591   grep -v '^ *+' conftest.er1 >conftest.err
24592   rm -f conftest.er1
24593   cat conftest.err >&5
24594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24595   (exit $ac_status); } &&
24596          { ac_try='test -z "$ac_c_werror_flag"
24597                          || test ! -s conftest.err'
24598   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24599   (eval $ac_try) 2>&5
24600   ac_status=$?
24601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24602   (exit $ac_status); }; } &&
24603          { ac_try='test -s conftest$ac_exeext'
24604   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24605   (eval $ac_try) 2>&5
24606   ac_status=$?
24607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24608   (exit $ac_status); }; }; then
24609   ol_cv_func_pthread_detach=yes
24610 else
24611   echo "$as_me: failed program was:" >&5
24612 sed 's/^/| /' conftest.$ac_ext >&5
24613
24614 ol_cv_func_pthread_detach=no
24615 fi
24616 rm -f conftest.err conftest.$ac_objext \
24617       conftest$ac_exeext conftest.$ac_ext
24618
24619 fi
24620 echo "$as_me:$LINENO: result: $ol_cv_func_pthread_detach" >&5
24621 echo "${ECHO_T}$ol_cv_func_pthread_detach" >&6
24622
24623                         if test $ol_cv_func_pthread_detach = no ; then
24624                                 { { echo "$as_me:$LINENO: error: could not locate pthread_detach()" >&5
24625 echo "$as_me: error: could not locate pthread_detach()" >&2;}
24626    { (exit 1); exit 1; }; }
24627                         fi
24628
24629
24630 cat >>confdefs.h <<\_ACEOF
24631 #define HAVE_PTHREAD_DETACH 1
24632 _ACEOF
24633
24634
24635
24636
24637
24638
24639 for ac_func in \
24640                                 pthread_setconcurrency \
24641                                 pthread_getconcurrency \
24642                                 thr_setconcurrency \
24643                                 thr_getconcurrency \
24644
24645 do
24646 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24647 echo "$as_me:$LINENO: checking for $ac_func" >&5
24648 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24649 if eval "test \"\${$as_ac_var+set}\" = set"; then
24650   echo $ECHO_N "(cached) $ECHO_C" >&6
24651 else
24652   cat >conftest.$ac_ext <<_ACEOF
24653 /* confdefs.h.  */
24654 _ACEOF
24655 cat confdefs.h >>conftest.$ac_ext
24656 cat >>conftest.$ac_ext <<_ACEOF
24657 /* end confdefs.h.  */
24658 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24659    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24660 #define $ac_func innocuous_$ac_func
24661
24662 /* System header to define __stub macros and hopefully few prototypes,
24663     which can conflict with char $ac_func (); below.
24664     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24665     <limits.h> exists even on freestanding compilers.  */
24666
24667 #ifdef __STDC__
24668 # include <limits.h>
24669 #else
24670 # include <assert.h>
24671 #endif
24672
24673 #undef $ac_func
24674
24675 /* Override any gcc2 internal prototype to avoid an error.  */
24676 #ifdef __cplusplus
24677 extern "C"
24678 {
24679 #endif
24680 /* We use char because int might match the return type of a gcc2
24681    builtin and then its argument prototype would still apply.  */
24682 char $ac_func ();
24683 /* The GNU C library defines this for functions which it implements
24684     to always fail with ENOSYS.  Some functions are actually named
24685     something starting with __ and the normal name is an alias.  */
24686 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24687 choke me
24688 #else
24689 char (*f) () = $ac_func;
24690 #endif
24691 #ifdef __cplusplus
24692 }
24693 #endif
24694
24695 int
24696 main ()
24697 {
24698 return f != $ac_func;
24699   ;
24700   return 0;
24701 }
24702 _ACEOF
24703 rm -f conftest.$ac_objext conftest$ac_exeext
24704 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24705   (eval $ac_link) 2>conftest.er1
24706   ac_status=$?
24707   grep -v '^ *+' conftest.er1 >conftest.err
24708   rm -f conftest.er1
24709   cat conftest.err >&5
24710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24711   (exit $ac_status); } &&
24712          { ac_try='test -z "$ac_c_werror_flag"
24713                          || test ! -s conftest.err'
24714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24715   (eval $ac_try) 2>&5
24716   ac_status=$?
24717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24718   (exit $ac_status); }; } &&
24719          { ac_try='test -s conftest$ac_exeext'
24720   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24721   (eval $ac_try) 2>&5
24722   ac_status=$?
24723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24724   (exit $ac_status); }; }; then
24725   eval "$as_ac_var=yes"
24726 else
24727   echo "$as_me: failed program was:" >&5
24728 sed 's/^/| /' conftest.$ac_ext >&5
24729
24730 eval "$as_ac_var=no"
24731 fi
24732 rm -f conftest.err conftest.$ac_objext \
24733       conftest$ac_exeext conftest.$ac_ext
24734 fi
24735 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24736 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24737 if test `eval echo '${'$as_ac_var'}'` = yes; then
24738   cat >>confdefs.h <<_ACEOF
24739 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24740 _ACEOF
24741
24742 fi
24743 done
24744
24745
24746
24747
24748 for ac_func in pthread_kill_other_threads_np
24749 do
24750 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24751 echo "$as_me:$LINENO: checking for $ac_func" >&5
24752 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24753 if eval "test \"\${$as_ac_var+set}\" = set"; then
24754   echo $ECHO_N "(cached) $ECHO_C" >&6
24755 else
24756   cat >conftest.$ac_ext <<_ACEOF
24757 /* confdefs.h.  */
24758 _ACEOF
24759 cat confdefs.h >>conftest.$ac_ext
24760 cat >>conftest.$ac_ext <<_ACEOF
24761 /* end confdefs.h.  */
24762 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24763    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24764 #define $ac_func innocuous_$ac_func
24765
24766 /* System header to define __stub macros and hopefully few prototypes,
24767     which can conflict with char $ac_func (); below.
24768     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24769     <limits.h> exists even on freestanding compilers.  */
24770
24771 #ifdef __STDC__
24772 # include <limits.h>
24773 #else
24774 # include <assert.h>
24775 #endif
24776
24777 #undef $ac_func
24778
24779 /* Override any gcc2 internal prototype to avoid an error.  */
24780 #ifdef __cplusplus
24781 extern "C"
24782 {
24783 #endif
24784 /* We use char because int might match the return type of a gcc2
24785    builtin and then its argument prototype would still apply.  */
24786 char $ac_func ();
24787 /* The GNU C library defines this for functions which it implements
24788     to always fail with ENOSYS.  Some functions are actually named
24789     something starting with __ and the normal name is an alias.  */
24790 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24791 choke me
24792 #else
24793 char (*f) () = $ac_func;
24794 #endif
24795 #ifdef __cplusplus
24796 }
24797 #endif
24798
24799 int
24800 main ()
24801 {
24802 return f != $ac_func;
24803   ;
24804   return 0;
24805 }
24806 _ACEOF
24807 rm -f conftest.$ac_objext conftest$ac_exeext
24808 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24809   (eval $ac_link) 2>conftest.er1
24810   ac_status=$?
24811   grep -v '^ *+' conftest.er1 >conftest.err
24812   rm -f conftest.er1
24813   cat conftest.err >&5
24814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24815   (exit $ac_status); } &&
24816          { ac_try='test -z "$ac_c_werror_flag"
24817                          || test ! -s conftest.err'
24818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24819   (eval $ac_try) 2>&5
24820   ac_status=$?
24821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24822   (exit $ac_status); }; } &&
24823          { ac_try='test -s conftest$ac_exeext'
24824   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24825   (eval $ac_try) 2>&5
24826   ac_status=$?
24827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24828   (exit $ac_status); }; }; then
24829   eval "$as_ac_var=yes"
24830 else
24831   echo "$as_me: failed program was:" >&5
24832 sed 's/^/| /' conftest.$ac_ext >&5
24833
24834 eval "$as_ac_var=no"
24835 fi
24836 rm -f conftest.err conftest.$ac_objext \
24837       conftest$ac_exeext conftest.$ac_ext
24838 fi
24839 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24840 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24841 if test `eval echo '${'$as_ac_var'}'` = yes; then
24842   cat >>confdefs.h <<_ACEOF
24843 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24844 _ACEOF
24845
24846 fi
24847 done
24848
24849         echo "$as_me:$LINENO: checking for LinuxThreads implementation" >&5
24850 echo $ECHO_N "checking for LinuxThreads implementation... $ECHO_C" >&6
24851 if test "${ol_cv_sys_linux_threads+set}" = set; then
24852   echo $ECHO_N "(cached) $ECHO_C" >&6
24853 else
24854   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
24855 fi
24856 echo "$as_me:$LINENO: result: $ol_cv_sys_linux_threads" >&5
24857 echo "${ECHO_T}$ol_cv_sys_linux_threads" >&6
24858
24859
24860
24861
24862         echo "$as_me:$LINENO: checking for LinuxThreads consistency" >&5
24863 echo $ECHO_N "checking for LinuxThreads consistency... $ECHO_C" >&6
24864 if test "${ol_cv_linux_threads+set}" = set; then
24865   echo $ECHO_N "(cached) $ECHO_C" >&6
24866 else
24867
24868                 if test $ol_cv_header_linux_threads = yes &&
24869                    test $ol_cv_sys_linux_threads = yes; then
24870                         ol_cv_linux_threads=yes
24871                 elif test $ol_cv_header_linux_threads = no &&
24872                      test $ol_cv_sys_linux_threads = no; then
24873                         ol_cv_linux_threads=no
24874                 else
24875                         ol_cv_linux_threads=error
24876                 fi
24877
24878 fi
24879 echo "$as_me:$LINENO: result: $ol_cv_linux_threads" >&5
24880 echo "${ECHO_T}$ol_cv_linux_threads" >&6
24881
24882
24883                         if test $ol_cv_linux_threads = error; then
24884                                 { { echo "$as_me:$LINENO: error: LinuxThreads header/library mismatch" >&5
24885 echo "$as_me: error: LinuxThreads header/library mismatch" >&2;}
24886    { (exit 1); exit 1; }; };
24887                         fi
24888
24889                         echo "$as_me:$LINENO: checking if pthread_create() works" >&5
24890 echo $ECHO_N "checking if pthread_create() works... $ECHO_C" >&6
24891 if test "${ol_cv_pthread_create_works+set}" = set; then
24892   echo $ECHO_N "(cached) $ECHO_C" >&6
24893 else
24894
24895                         if test "$cross_compiling" = yes; then
24896                                 ol_cv_pthread_create_works=yes
24897 else
24898   cat >conftest.$ac_ext <<_ACEOF
24899 /* confdefs.h.  */
24900 _ACEOF
24901 cat confdefs.h >>conftest.$ac_ext
24902 cat >>conftest.$ac_ext <<_ACEOF
24903 /* end confdefs.h.  */
24904
24905 /* pthread test headers */
24906 #include <pthread.h>
24907 #if HAVE_PTHREADS < 7
24908 #include <errno.h>
24909 #endif
24910 #ifndef NULL
24911 #define NULL (void*)0
24912 #endif
24913
24914 static void *task(p)
24915         void *p;
24916 {
24917         return (void *) (p == NULL);
24918 }
24919
24920
24921 int main(argc, argv)
24922         int argc;
24923         char **argv;
24924 {
24925
24926         /* pthread test function */
24927 #ifndef PTHREAD_CREATE_DETACHED
24928 #define PTHREAD_CREATE_DETACHED 1
24929 #endif
24930         pthread_t t;
24931         int status;
24932         int detach = PTHREAD_CREATE_DETACHED;
24933
24934 #if HAVE_PTHREADS > 4
24935         /* Final pthreads */
24936         pthread_attr_t attr;
24937
24938         status = pthread_attr_init(&attr);
24939         if( status ) return status;
24940
24941 #if HAVE_PTHREADS < 7
24942         status = pthread_attr_setdetachstate(&attr, &detach);
24943         if( status < 0 ) status = errno;
24944 #else
24945         status = pthread_attr_setdetachstate(&attr, detach);
24946 #endif
24947         if( status ) return status;
24948         status = pthread_create( &t, &attr, task, NULL );
24949 #if HAVE_PTHREADS < 7
24950         if( status < 0 ) status = errno;
24951 #endif
24952         if( status ) return status;
24953 #else
24954         /* Draft 4 pthreads */
24955         status = pthread_create( &t, pthread_attr_default, task, NULL );
24956         if( status ) return errno;
24957
24958         /* give thread a chance to complete */
24959         /* it should remain joinable and hence detachable */
24960         sleep( 1 );
24961
24962         status = pthread_detach( &t );
24963         if( status ) return errno;
24964 #endif
24965
24966 #ifdef HAVE_LINUX_THREADS
24967         pthread_kill_other_threads_np();
24968 #endif
24969
24970         return 0;
24971
24972 }
24973
24974 _ACEOF
24975 rm -f conftest$ac_exeext
24976 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24977   (eval $ac_link) 2>&5
24978   ac_status=$?
24979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24980   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24981   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24982   (eval $ac_try) 2>&5
24983   ac_status=$?
24984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24985   (exit $ac_status); }; }; then
24986   ol_cv_pthread_create_works=yes
24987 else
24988   echo "$as_me: program exited with status $ac_status" >&5
24989 echo "$as_me: failed program was:" >&5
24990 sed 's/^/| /' conftest.$ac_ext >&5
24991
24992 ( exit $ac_status )
24993 ol_cv_pthread_create_works=no
24994 fi
24995 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24996 fi
24997 fi
24998 echo "$as_me:$LINENO: result: $ol_cv_pthread_create_works" >&5
24999 echo "${ECHO_T}$ol_cv_pthread_create_works" >&6
25000
25001                         if test $ol_cv_pthread_create_works = no ; then
25002                                 { { echo "$as_me:$LINENO: error: pthread_create is not usable, check environment settings" >&5
25003 echo "$as_me: error: pthread_create is not usable, check environment settings" >&2;}
25004    { (exit 1); exit 1; }; }
25005                         fi
25006
25007                         ol_replace_broken_yield=no
25008
25009                         if test $ol_replace_broken_yield = yes ; then
25010
25011 cat >>confdefs.h <<\_ACEOF
25012 #define REPLACE_BROKEN_YIELD 1
25013 _ACEOF
25014
25015                         fi
25016
25017                                                 if test $ol_with_yielding_select = auto ; then
25018                                 echo "$as_me:$LINENO: checking if select yields when using pthreads" >&5
25019 echo $ECHO_N "checking if select yields when using pthreads... $ECHO_C" >&6
25020 if test "${ol_cv_pthread_select_yields+set}" = set; then
25021   echo $ECHO_N "(cached) $ECHO_C" >&6
25022 else
25023
25024                                 if test "$cross_compiling" = yes; then
25025   ol_cv_pthread_select_yields=cross
25026 else
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
25034 #include <sys/types.h>
25035 #include <sys/time.h>
25036 #include <unistd.h>
25037 #include <pthread.h>
25038 #ifndef NULL
25039 #define NULL (void*) 0
25040 #endif
25041
25042 static int fildes[2];
25043
25044 static void *task(p)
25045         void *p;
25046 {
25047         int i;
25048         struct timeval tv;
25049
25050         fd_set rfds;
25051
25052         tv.tv_sec=10;
25053         tv.tv_usec=0;
25054
25055         FD_ZERO(&rfds);
25056         FD_SET(fildes[0], &rfds);
25057
25058         /* we're not interested in any fds */
25059         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
25060
25061         if(i < 0) {
25062                 perror("select");
25063                 exit(10);
25064         }
25065
25066         exit(0); /* if we exit here, the select blocked the whole process */
25067 }
25068
25069 int main(argc, argv)
25070         int argc;
25071         char **argv;
25072 {
25073         pthread_t t;
25074
25075         /* create a pipe to select */
25076         if(pipe(&fildes[0])) {
25077                 perror("select");
25078                 exit(1);
25079         }
25080
25081 #ifdef HAVE_PTHREAD_SETCONCURRENCY
25082         (void) pthread_setconcurrency(2);
25083 #else
25084 #ifdef HAVE_THR_SETCONCURRENCY
25085         /* Set Solaris LWP concurrency to 2 */
25086         thr_setconcurrency(2);
25087 #endif
25088 #endif
25089
25090 #if HAVE_PTHREADS < 6
25091         pthread_create(&t, pthread_attr_default, task, NULL);
25092 #else
25093         pthread_create(&t, NULL, task, NULL);
25094 #endif
25095
25096         /* make sure task runs first */
25097 #if HAVE_THR_YIELD
25098         thr_yield();
25099 #elif defined( HAVE_SCHED_YIELD )
25100         sched_yield();
25101 #elif defined( HAVE_PTHREAD_YIELD )
25102         pthread_yield();
25103 #endif
25104
25105         exit(2);
25106 }
25107 _ACEOF
25108 rm -f conftest$ac_exeext
25109 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25110   (eval $ac_link) 2>&5
25111   ac_status=$?
25112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25113   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25114   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25115   (eval $ac_try) 2>&5
25116   ac_status=$?
25117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25118   (exit $ac_status); }; }; then
25119   ol_cv_pthread_select_yields=no
25120 else
25121   echo "$as_me: program exited with status $ac_status" >&5
25122 echo "$as_me: failed program was:" >&5
25123 sed 's/^/| /' conftest.$ac_ext >&5
25124
25125 ( exit $ac_status )
25126 ol_cv_pthread_select_yields=yes
25127 fi
25128 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25129 fi
25130 fi
25131 echo "$as_me:$LINENO: result: $ol_cv_pthread_select_yields" >&5
25132 echo "${ECHO_T}$ol_cv_pthread_select_yields" >&6
25133
25134                                 if test $ol_cv_pthread_select_yields = cross ; then
25135                                         { { echo "$as_me:$LINENO: error: crossing compiling: use --with-yielding_select=yes|no|manual" >&5
25136 echo "$as_me: error: crossing compiling: use --with-yielding_select=yes|no|manual" >&2;}
25137    { (exit 1); exit 1; }; }
25138                                 fi
25139
25140                                 if test $ol_cv_pthread_select_yields = yes ; then
25141                                         ol_with_yielding_select=yes
25142                                 fi
25143                         fi
25144
25145                                                 CPPFLAGS="$save_CPPFLAGS"
25146                         LIBS="$save_LIBS"
25147                 else
25148                         { { echo "$as_me:$LINENO: error: could not locate usable POSIX Threads" >&5
25149 echo "$as_me: error: could not locate usable POSIX Threads" >&2;}
25150    { (exit 1); exit 1; }; }
25151                 fi
25152         fi
25153
25154         if test $ol_with_threads = posix ; then
25155                 { { echo "$as_me:$LINENO: error: could not locate POSIX Threads" >&5
25156 echo "$as_me: error: could not locate POSIX Threads" >&2;}
25157    { (exit 1); exit 1; }; }
25158         fi
25159         ;;
25160 esac
25161
25162 case $ol_with_threads in auto | yes | mach)
25163
25164
25165
25166 for ac_header in mach/cthreads.h cthreads.h
25167 do
25168 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25169 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25170   echo "$as_me:$LINENO: checking for $ac_header" >&5
25171 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25172 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25173   echo $ECHO_N "(cached) $ECHO_C" >&6
25174 fi
25175 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25176 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25177 else
25178   # Is the header compilable?
25179 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25180 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25181 cat >conftest.$ac_ext <<_ACEOF
25182 /* confdefs.h.  */
25183 _ACEOF
25184 cat confdefs.h >>conftest.$ac_ext
25185 cat >>conftest.$ac_ext <<_ACEOF
25186 /* end confdefs.h.  */
25187 $ac_includes_default
25188 #include <$ac_header>
25189 _ACEOF
25190 rm -f conftest.$ac_objext
25191 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25192   (eval $ac_compile) 2>conftest.er1
25193   ac_status=$?
25194   grep -v '^ *+' conftest.er1 >conftest.err
25195   rm -f conftest.er1
25196   cat conftest.err >&5
25197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25198   (exit $ac_status); } &&
25199          { ac_try='test -z "$ac_c_werror_flag"
25200                          || test ! -s conftest.err'
25201   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25202   (eval $ac_try) 2>&5
25203   ac_status=$?
25204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25205   (exit $ac_status); }; } &&
25206          { ac_try='test -s conftest.$ac_objext'
25207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25208   (eval $ac_try) 2>&5
25209   ac_status=$?
25210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25211   (exit $ac_status); }; }; then
25212   ac_header_compiler=yes
25213 else
25214   echo "$as_me: failed program was:" >&5
25215 sed 's/^/| /' conftest.$ac_ext >&5
25216
25217 ac_header_compiler=no
25218 fi
25219 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25220 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25221 echo "${ECHO_T}$ac_header_compiler" >&6
25222
25223 # Is the header present?
25224 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25225 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
25226 cat >conftest.$ac_ext <<_ACEOF
25227 /* confdefs.h.  */
25228 _ACEOF
25229 cat confdefs.h >>conftest.$ac_ext
25230 cat >>conftest.$ac_ext <<_ACEOF
25231 /* end confdefs.h.  */
25232 #include <$ac_header>
25233 _ACEOF
25234 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25235   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25236   ac_status=$?
25237   grep -v '^ *+' conftest.er1 >conftest.err
25238   rm -f conftest.er1
25239   cat conftest.err >&5
25240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25241   (exit $ac_status); } >/dev/null; then
25242   if test -s conftest.err; then
25243     ac_cpp_err=$ac_c_preproc_warn_flag
25244     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25245   else
25246     ac_cpp_err=
25247   fi
25248 else
25249   ac_cpp_err=yes
25250 fi
25251 if test -z "$ac_cpp_err"; then
25252   ac_header_preproc=yes
25253 else
25254   echo "$as_me: failed program was:" >&5
25255 sed 's/^/| /' conftest.$ac_ext >&5
25256
25257   ac_header_preproc=no
25258 fi
25259 rm -f conftest.err conftest.$ac_ext
25260 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25261 echo "${ECHO_T}$ac_header_preproc" >&6
25262
25263 # So?  What about this header?
25264 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25265   yes:no: )
25266     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25267 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25268     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25269 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25270     ac_header_preproc=yes
25271     ;;
25272   no:yes:* )
25273     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25274 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25275     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25276 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25277     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25278 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25279     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25280 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25281     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25282 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25283     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25284 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25285     (
25286       cat <<\_ASBOX
25287 ## --------------------------------------------- ##
25288 ## Report this to <http://www.openldap.org/its/> ##
25289 ## --------------------------------------------- ##
25290 _ASBOX
25291     ) |
25292       sed "s/^/$as_me: WARNING:     /" >&2
25293     ;;
25294 esac
25295 echo "$as_me:$LINENO: checking for $ac_header" >&5
25296 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25297 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25298   echo $ECHO_N "(cached) $ECHO_C" >&6
25299 else
25300   eval "$as_ac_Header=\$ac_header_preproc"
25301 fi
25302 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25303 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25304
25305 fi
25306 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25307   cat >>confdefs.h <<_ACEOF
25308 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25309 _ACEOF
25310
25311 fi
25312
25313 done
25314
25315         if test $ac_cv_header_mach_cthreads_h = yes ; then
25316                 ol_with_threads=found
25317
25318                                 echo "$as_me:$LINENO: checking for cthread_fork" >&5
25319 echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6
25320 if test "${ac_cv_func_cthread_fork+set}" = set; then
25321   echo $ECHO_N "(cached) $ECHO_C" >&6
25322 else
25323   cat >conftest.$ac_ext <<_ACEOF
25324 /* confdefs.h.  */
25325 _ACEOF
25326 cat confdefs.h >>conftest.$ac_ext
25327 cat >>conftest.$ac_ext <<_ACEOF
25328 /* end confdefs.h.  */
25329 /* Define cthread_fork to an innocuous variant, in case <limits.h> declares cthread_fork.
25330    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
25331 #define cthread_fork innocuous_cthread_fork
25332
25333 /* System header to define __stub macros and hopefully few prototypes,
25334     which can conflict with char cthread_fork (); below.
25335     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25336     <limits.h> exists even on freestanding compilers.  */
25337
25338 #ifdef __STDC__
25339 # include <limits.h>
25340 #else
25341 # include <assert.h>
25342 #endif
25343
25344 #undef cthread_fork
25345
25346 /* Override any gcc2 internal prototype to avoid an error.  */
25347 #ifdef __cplusplus
25348 extern "C"
25349 {
25350 #endif
25351 /* We use char because int might match the return type of a gcc2
25352    builtin and then its argument prototype would still apply.  */
25353 char cthread_fork ();
25354 /* The GNU C library defines this for functions which it implements
25355     to always fail with ENOSYS.  Some functions are actually named
25356     something starting with __ and the normal name is an alias.  */
25357 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
25358 choke me
25359 #else
25360 char (*f) () = cthread_fork;
25361 #endif
25362 #ifdef __cplusplus
25363 }
25364 #endif
25365
25366 int
25367 main ()
25368 {
25369 return f != cthread_fork;
25370   ;
25371   return 0;
25372 }
25373 _ACEOF
25374 rm -f conftest.$ac_objext conftest$ac_exeext
25375 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25376   (eval $ac_link) 2>conftest.er1
25377   ac_status=$?
25378   grep -v '^ *+' conftest.er1 >conftest.err
25379   rm -f conftest.er1
25380   cat conftest.err >&5
25381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25382   (exit $ac_status); } &&
25383          { ac_try='test -z "$ac_c_werror_flag"
25384                          || test ! -s conftest.err'
25385   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25386   (eval $ac_try) 2>&5
25387   ac_status=$?
25388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25389   (exit $ac_status); }; } &&
25390          { ac_try='test -s conftest$ac_exeext'
25391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25392   (eval $ac_try) 2>&5
25393   ac_status=$?
25394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25395   (exit $ac_status); }; }; then
25396   ac_cv_func_cthread_fork=yes
25397 else
25398   echo "$as_me: failed program was:" >&5
25399 sed 's/^/| /' conftest.$ac_ext >&5
25400
25401 ac_cv_func_cthread_fork=no
25402 fi
25403 rm -f conftest.err conftest.$ac_objext \
25404       conftest$ac_exeext conftest.$ac_ext
25405 fi
25406 echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5
25407 echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6
25408 if test $ac_cv_func_cthread_fork = yes; then
25409   ol_link_threads=yes
25410 fi
25411
25412
25413                 if test $ol_link_threads = no ; then
25414                                                                         echo "$as_me:$LINENO: checking for cthread_fork with -all_load" >&5
25415 echo $ECHO_N "checking for cthread_fork with -all_load... $ECHO_C" >&6
25416 if test "${ol_cv_cthread_all_load+set}" = set; then
25417   echo $ECHO_N "(cached) $ECHO_C" >&6
25418 else
25419
25420                                                                 save_LIBS="$LIBS"
25421                                 LIBS="-all_load $LIBS"
25422                                 cat >conftest.$ac_ext <<_ACEOF
25423 /* confdefs.h.  */
25424 _ACEOF
25425 cat confdefs.h >>conftest.$ac_ext
25426 cat >>conftest.$ac_ext <<_ACEOF
25427 /* end confdefs.h.  */
25428 #include <mach/cthreads.h>
25429 int
25430 main ()
25431 {
25432
25433                                         cthread_fork((void *)0, (void *)0);
25434
25435   ;
25436   return 0;
25437 }
25438 _ACEOF
25439 rm -f conftest.$ac_objext conftest$ac_exeext
25440 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25441   (eval $ac_link) 2>conftest.er1
25442   ac_status=$?
25443   grep -v '^ *+' conftest.er1 >conftest.err
25444   rm -f conftest.er1
25445   cat conftest.err >&5
25446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25447   (exit $ac_status); } &&
25448          { ac_try='test -z "$ac_c_werror_flag"
25449                          || test ! -s conftest.err'
25450   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25451   (eval $ac_try) 2>&5
25452   ac_status=$?
25453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25454   (exit $ac_status); }; } &&
25455          { ac_try='test -s conftest$ac_exeext'
25456   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25457   (eval $ac_try) 2>&5
25458   ac_status=$?
25459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25460   (exit $ac_status); }; }; then
25461   ol_cv_cthread_all_load=yes
25462 else
25463   echo "$as_me: failed program was:" >&5
25464 sed 's/^/| /' conftest.$ac_ext >&5
25465
25466 ol_cv_cthread_all_load=no
25467 fi
25468 rm -f conftest.err conftest.$ac_objext \
25469       conftest$ac_exeext conftest.$ac_ext
25470                                                                 LIBS="$save_LIBS"
25471
25472 fi
25473 echo "$as_me:$LINENO: result: $ol_cv_cthread_all_load" >&5
25474 echo "${ECHO_T}$ol_cv_cthread_all_load" >&6
25475
25476                         if test $ol_cv_cthread_all_load = yes ; then
25477                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
25478                                 ol_link_threads=mach
25479                                 ol_with_threads=found
25480                         fi
25481                 fi
25482
25483         elif test $ac_cv_header_cthreads_h = yes ; then
25484
25485                 ol_with_threads=found
25486
25487                                 save_LIBS="$LIBS"
25488                 LIBS="$LIBS -lthreads"
25489                 echo "$as_me:$LINENO: checking for cthread_fork" >&5
25490 echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6
25491 if test "${ac_cv_func_cthread_fork+set}" = set; then
25492   echo $ECHO_N "(cached) $ECHO_C" >&6
25493 else
25494   cat >conftest.$ac_ext <<_ACEOF
25495 /* confdefs.h.  */
25496 _ACEOF
25497 cat confdefs.h >>conftest.$ac_ext
25498 cat >>conftest.$ac_ext <<_ACEOF
25499 /* end confdefs.h.  */
25500 /* Define cthread_fork to an innocuous variant, in case <limits.h> declares cthread_fork.
25501    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
25502 #define cthread_fork innocuous_cthread_fork
25503
25504 /* System header to define __stub macros and hopefully few prototypes,
25505     which can conflict with char cthread_fork (); below.
25506     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25507     <limits.h> exists even on freestanding compilers.  */
25508
25509 #ifdef __STDC__
25510 # include <limits.h>
25511 #else
25512 # include <assert.h>
25513 #endif
25514
25515 #undef cthread_fork
25516
25517 /* Override any gcc2 internal prototype to avoid an error.  */
25518 #ifdef __cplusplus
25519 extern "C"
25520 {
25521 #endif
25522 /* We use char because int might match the return type of a gcc2
25523    builtin and then its argument prototype would still apply.  */
25524 char cthread_fork ();
25525 /* The GNU C library defines this for functions which it implements
25526     to always fail with ENOSYS.  Some functions are actually named
25527     something starting with __ and the normal name is an alias.  */
25528 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
25529 choke me
25530 #else
25531 char (*f) () = cthread_fork;
25532 #endif
25533 #ifdef __cplusplus
25534 }
25535 #endif
25536
25537 int
25538 main ()
25539 {
25540 return f != cthread_fork;
25541   ;
25542   return 0;
25543 }
25544 _ACEOF
25545 rm -f conftest.$ac_objext conftest$ac_exeext
25546 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25547   (eval $ac_link) 2>conftest.er1
25548   ac_status=$?
25549   grep -v '^ *+' conftest.er1 >conftest.err
25550   rm -f conftest.er1
25551   cat conftest.err >&5
25552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25553   (exit $ac_status); } &&
25554          { ac_try='test -z "$ac_c_werror_flag"
25555                          || test ! -s conftest.err'
25556   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25557   (eval $ac_try) 2>&5
25558   ac_status=$?
25559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25560   (exit $ac_status); }; } &&
25561          { ac_try='test -s conftest$ac_exeext'
25562   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25563   (eval $ac_try) 2>&5
25564   ac_status=$?
25565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25566   (exit $ac_status); }; }; then
25567   ac_cv_func_cthread_fork=yes
25568 else
25569   echo "$as_me: failed program was:" >&5
25570 sed 's/^/| /' conftest.$ac_ext >&5
25571
25572 ac_cv_func_cthread_fork=no
25573 fi
25574 rm -f conftest.err conftest.$ac_objext \
25575       conftest$ac_exeext conftest.$ac_ext
25576 fi
25577 echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5
25578 echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6
25579 if test $ac_cv_func_cthread_fork = yes; then
25580   ol_link_threads=yes
25581 fi
25582
25583                 LIBS="$save_LIBS"
25584
25585                 if test $ol_link_threads = yes ; then
25586                         LTHREAD_LIBS="-lthreads"
25587                         ol_link_threads=mach
25588                         ol_with_threads=found
25589                 else
25590                         { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5
25591 echo "$as_me: error: could not link with Mach CThreads" >&2;}
25592    { (exit 1); exit 1; }; }
25593                 fi
25594
25595         elif test $ol_with_threads = mach ; then
25596                 { { echo "$as_me:$LINENO: error: could not locate Mach CThreads" >&5
25597 echo "$as_me: error: could not locate Mach CThreads" >&2;}
25598    { (exit 1); exit 1; }; }
25599         fi
25600
25601         if test $ol_link_threads = mach ; then
25602
25603 cat >>confdefs.h <<\_ACEOF
25604 #define HAVE_MACH_CTHREADS 1
25605 _ACEOF
25606
25607         elif test $ol_with_threads = found ; then
25608                 { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5
25609 echo "$as_me: error: could not link with Mach CThreads" >&2;}
25610    { (exit 1); exit 1; }; }
25611         fi
25612         ;;
25613 esac
25614
25615 case $ol_with_threads in auto | yes | pth)
25616
25617
25618 for ac_header in pth.h
25619 do
25620 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25621 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25622   echo "$as_me:$LINENO: checking for $ac_header" >&5
25623 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25624 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25625   echo $ECHO_N "(cached) $ECHO_C" >&6
25626 fi
25627 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25628 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25629 else
25630   # Is the header compilable?
25631 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25632 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25633 cat >conftest.$ac_ext <<_ACEOF
25634 /* confdefs.h.  */
25635 _ACEOF
25636 cat confdefs.h >>conftest.$ac_ext
25637 cat >>conftest.$ac_ext <<_ACEOF
25638 /* end confdefs.h.  */
25639 $ac_includes_default
25640 #include <$ac_header>
25641 _ACEOF
25642 rm -f conftest.$ac_objext
25643 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25644   (eval $ac_compile) 2>conftest.er1
25645   ac_status=$?
25646   grep -v '^ *+' conftest.er1 >conftest.err
25647   rm -f conftest.er1
25648   cat conftest.err >&5
25649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25650   (exit $ac_status); } &&
25651          { ac_try='test -z "$ac_c_werror_flag"
25652                          || test ! -s conftest.err'
25653   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25654   (eval $ac_try) 2>&5
25655   ac_status=$?
25656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25657   (exit $ac_status); }; } &&
25658          { ac_try='test -s conftest.$ac_objext'
25659   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25660   (eval $ac_try) 2>&5
25661   ac_status=$?
25662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25663   (exit $ac_status); }; }; then
25664   ac_header_compiler=yes
25665 else
25666   echo "$as_me: failed program was:" >&5
25667 sed 's/^/| /' conftest.$ac_ext >&5
25668
25669 ac_header_compiler=no
25670 fi
25671 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25672 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25673 echo "${ECHO_T}$ac_header_compiler" >&6
25674
25675 # Is the header present?
25676 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25677 echo $ECHO_N "checking $ac_header presence... $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 #include <$ac_header>
25685 _ACEOF
25686 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25687   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25688   ac_status=$?
25689   grep -v '^ *+' conftest.er1 >conftest.err
25690   rm -f conftest.er1
25691   cat conftest.err >&5
25692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25693   (exit $ac_status); } >/dev/null; then
25694   if test -s conftest.err; then
25695     ac_cpp_err=$ac_c_preproc_warn_flag
25696     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25697   else
25698     ac_cpp_err=
25699   fi
25700 else
25701   ac_cpp_err=yes
25702 fi
25703 if test -z "$ac_cpp_err"; then
25704   ac_header_preproc=yes
25705 else
25706   echo "$as_me: failed program was:" >&5
25707 sed 's/^/| /' conftest.$ac_ext >&5
25708
25709   ac_header_preproc=no
25710 fi
25711 rm -f conftest.err conftest.$ac_ext
25712 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25713 echo "${ECHO_T}$ac_header_preproc" >&6
25714
25715 # So?  What about this header?
25716 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25717   yes:no: )
25718     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25719 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25720     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25721 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25722     ac_header_preproc=yes
25723     ;;
25724   no:yes:* )
25725     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25726 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25727     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25728 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25729     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25730 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25731     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25732 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25733     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25734 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25735     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25736 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25737     (
25738       cat <<\_ASBOX
25739 ## --------------------------------------------- ##
25740 ## Report this to <http://www.openldap.org/its/> ##
25741 ## --------------------------------------------- ##
25742 _ASBOX
25743     ) |
25744       sed "s/^/$as_me: WARNING:     /" >&2
25745     ;;
25746 esac
25747 echo "$as_me:$LINENO: checking for $ac_header" >&5
25748 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25749 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25750   echo $ECHO_N "(cached) $ECHO_C" >&6
25751 else
25752   eval "$as_ac_Header=\$ac_header_preproc"
25753 fi
25754 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25755 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25756
25757 fi
25758 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25759   cat >>confdefs.h <<_ACEOF
25760 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25761 _ACEOF
25762
25763 fi
25764
25765 done
25766
25767
25768         if test $ac_cv_header_pth_h = yes ; then
25769                 echo "$as_me:$LINENO: checking for pth_version in -lpth" >&5
25770 echo $ECHO_N "checking for pth_version in -lpth... $ECHO_C" >&6
25771 if test "${ac_cv_lib_pth_pth_version+set}" = set; then
25772   echo $ECHO_N "(cached) $ECHO_C" >&6
25773 else
25774   ac_check_lib_save_LIBS=$LIBS
25775 LIBS="-lpth  $LIBS"
25776 cat >conftest.$ac_ext <<_ACEOF
25777 /* confdefs.h.  */
25778 _ACEOF
25779 cat confdefs.h >>conftest.$ac_ext
25780 cat >>conftest.$ac_ext <<_ACEOF
25781 /* end confdefs.h.  */
25782
25783 /* Override any gcc2 internal prototype to avoid an error.  */
25784 #ifdef __cplusplus
25785 extern "C"
25786 #endif
25787 /* We use char because int might match the return type of a gcc2
25788    builtin and then its argument prototype would still apply.  */
25789 char pth_version ();
25790 int
25791 main ()
25792 {
25793 pth_version ();
25794   ;
25795   return 0;
25796 }
25797 _ACEOF
25798 rm -f conftest.$ac_objext conftest$ac_exeext
25799 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25800   (eval $ac_link) 2>conftest.er1
25801   ac_status=$?
25802   grep -v '^ *+' conftest.er1 >conftest.err
25803   rm -f conftest.er1
25804   cat conftest.err >&5
25805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25806   (exit $ac_status); } &&
25807          { ac_try='test -z "$ac_c_werror_flag"
25808                          || test ! -s conftest.err'
25809   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25810   (eval $ac_try) 2>&5
25811   ac_status=$?
25812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25813   (exit $ac_status); }; } &&
25814          { ac_try='test -s conftest$ac_exeext'
25815   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25816   (eval $ac_try) 2>&5
25817   ac_status=$?
25818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25819   (exit $ac_status); }; }; then
25820   ac_cv_lib_pth_pth_version=yes
25821 else
25822   echo "$as_me: failed program was:" >&5
25823 sed 's/^/| /' conftest.$ac_ext >&5
25824
25825 ac_cv_lib_pth_pth_version=no
25826 fi
25827 rm -f conftest.err conftest.$ac_objext \
25828       conftest$ac_exeext conftest.$ac_ext
25829 LIBS=$ac_check_lib_save_LIBS
25830 fi
25831 echo "$as_me:$LINENO: result: $ac_cv_lib_pth_pth_version" >&5
25832 echo "${ECHO_T}$ac_cv_lib_pth_pth_version" >&6
25833 if test $ac_cv_lib_pth_pth_version = yes; then
25834   have_pth=yes
25835 else
25836   have_pth=no
25837 fi
25838
25839
25840                 if test $have_pth = yes ; then
25841
25842 cat >>confdefs.h <<\_ACEOF
25843 #define HAVE_GNU_PTH 1
25844 _ACEOF
25845
25846                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
25847                         ol_link_threads=pth
25848                         ol_with_threads=found
25849
25850                         if test $ol_with_yielding_select = auto ; then
25851                                 ol_with_yielding_select=yes
25852                         fi
25853                 fi
25854         fi
25855         ;;
25856 esac
25857
25858 case $ol_with_threads in auto | yes | lwp)
25859
25860
25861
25862 for ac_header in thread.h synch.h
25863 do
25864 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25865 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25866   echo "$as_me:$LINENO: checking for $ac_header" >&5
25867 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25868 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25869   echo $ECHO_N "(cached) $ECHO_C" >&6
25870 fi
25871 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25872 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25873 else
25874   # Is the header compilable?
25875 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25876 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25877 cat >conftest.$ac_ext <<_ACEOF
25878 /* confdefs.h.  */
25879 _ACEOF
25880 cat confdefs.h >>conftest.$ac_ext
25881 cat >>conftest.$ac_ext <<_ACEOF
25882 /* end confdefs.h.  */
25883 $ac_includes_default
25884 #include <$ac_header>
25885 _ACEOF
25886 rm -f conftest.$ac_objext
25887 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25888   (eval $ac_compile) 2>conftest.er1
25889   ac_status=$?
25890   grep -v '^ *+' conftest.er1 >conftest.err
25891   rm -f conftest.er1
25892   cat conftest.err >&5
25893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25894   (exit $ac_status); } &&
25895          { ac_try='test -z "$ac_c_werror_flag"
25896                          || test ! -s conftest.err'
25897   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25898   (eval $ac_try) 2>&5
25899   ac_status=$?
25900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25901   (exit $ac_status); }; } &&
25902          { ac_try='test -s conftest.$ac_objext'
25903   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25904   (eval $ac_try) 2>&5
25905   ac_status=$?
25906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25907   (exit $ac_status); }; }; then
25908   ac_header_compiler=yes
25909 else
25910   echo "$as_me: failed program was:" >&5
25911 sed 's/^/| /' conftest.$ac_ext >&5
25912
25913 ac_header_compiler=no
25914 fi
25915 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25916 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25917 echo "${ECHO_T}$ac_header_compiler" >&6
25918
25919 # Is the header present?
25920 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25921 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
25922 cat >conftest.$ac_ext <<_ACEOF
25923 /* confdefs.h.  */
25924 _ACEOF
25925 cat confdefs.h >>conftest.$ac_ext
25926 cat >>conftest.$ac_ext <<_ACEOF
25927 /* end confdefs.h.  */
25928 #include <$ac_header>
25929 _ACEOF
25930 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25931   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25932   ac_status=$?
25933   grep -v '^ *+' conftest.er1 >conftest.err
25934   rm -f conftest.er1
25935   cat conftest.err >&5
25936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25937   (exit $ac_status); } >/dev/null; then
25938   if test -s conftest.err; then
25939     ac_cpp_err=$ac_c_preproc_warn_flag
25940     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25941   else
25942     ac_cpp_err=
25943   fi
25944 else
25945   ac_cpp_err=yes
25946 fi
25947 if test -z "$ac_cpp_err"; then
25948   ac_header_preproc=yes
25949 else
25950   echo "$as_me: failed program was:" >&5
25951 sed 's/^/| /' conftest.$ac_ext >&5
25952
25953   ac_header_preproc=no
25954 fi
25955 rm -f conftest.err conftest.$ac_ext
25956 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25957 echo "${ECHO_T}$ac_header_preproc" >&6
25958
25959 # So?  What about this header?
25960 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25961   yes:no: )
25962     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25963 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25964     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25965 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25966     ac_header_preproc=yes
25967     ;;
25968   no:yes:* )
25969     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25970 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25971     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25972 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25973     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25974 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25975     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25976 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25977     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25978 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25979     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25980 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25981     (
25982       cat <<\_ASBOX
25983 ## --------------------------------------------- ##
25984 ## Report this to <http://www.openldap.org/its/> ##
25985 ## --------------------------------------------- ##
25986 _ASBOX
25987     ) |
25988       sed "s/^/$as_me: WARNING:     /" >&2
25989     ;;
25990 esac
25991 echo "$as_me:$LINENO: checking for $ac_header" >&5
25992 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25993 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25994   echo $ECHO_N "(cached) $ECHO_C" >&6
25995 else
25996   eval "$as_ac_Header=\$ac_header_preproc"
25997 fi
25998 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25999 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26000
26001 fi
26002 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26003   cat >>confdefs.h <<_ACEOF
26004 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26005 _ACEOF
26006
26007 fi
26008
26009 done
26010
26011         if test $ac_cv_header_thread_h = yes &&
26012            test $ac_cv_header_synch_h = yes ; then
26013                 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
26014 echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
26015 if test "${ac_cv_lib_thread_thr_create+set}" = set; then
26016   echo $ECHO_N "(cached) $ECHO_C" >&6
26017 else
26018   ac_check_lib_save_LIBS=$LIBS
26019 LIBS="-lthread  $LIBS"
26020 cat >conftest.$ac_ext <<_ACEOF
26021 /* confdefs.h.  */
26022 _ACEOF
26023 cat confdefs.h >>conftest.$ac_ext
26024 cat >>conftest.$ac_ext <<_ACEOF
26025 /* end confdefs.h.  */
26026
26027 /* Override any gcc2 internal prototype to avoid an error.  */
26028 #ifdef __cplusplus
26029 extern "C"
26030 #endif
26031 /* We use char because int might match the return type of a gcc2
26032    builtin and then its argument prototype would still apply.  */
26033 char thr_create ();
26034 int
26035 main ()
26036 {
26037 thr_create ();
26038   ;
26039   return 0;
26040 }
26041 _ACEOF
26042 rm -f conftest.$ac_objext conftest$ac_exeext
26043 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26044   (eval $ac_link) 2>conftest.er1
26045   ac_status=$?
26046   grep -v '^ *+' conftest.er1 >conftest.err
26047   rm -f conftest.er1
26048   cat conftest.err >&5
26049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26050   (exit $ac_status); } &&
26051          { ac_try='test -z "$ac_c_werror_flag"
26052                          || test ! -s conftest.err'
26053   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26054   (eval $ac_try) 2>&5
26055   ac_status=$?
26056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26057   (exit $ac_status); }; } &&
26058          { ac_try='test -s conftest$ac_exeext'
26059   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26060   (eval $ac_try) 2>&5
26061   ac_status=$?
26062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26063   (exit $ac_status); }; }; then
26064   ac_cv_lib_thread_thr_create=yes
26065 else
26066   echo "$as_me: failed program was:" >&5
26067 sed 's/^/| /' conftest.$ac_ext >&5
26068
26069 ac_cv_lib_thread_thr_create=no
26070 fi
26071 rm -f conftest.err conftest.$ac_objext \
26072       conftest$ac_exeext conftest.$ac_ext
26073 LIBS=$ac_check_lib_save_LIBS
26074 fi
26075 echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
26076 echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
26077 if test $ac_cv_lib_thread_thr_create = yes; then
26078   have_thr=yes
26079 else
26080   have_thr=no
26081 fi
26082
26083
26084                 if test $have_thr = yes ; then
26085
26086 cat >>confdefs.h <<\_ACEOF
26087 #define HAVE_THR 1
26088 _ACEOF
26089
26090                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
26091                         ol_link_threads=thr
26092
26093                         if test $ol_with_yielding_select = auto ; then
26094                                 ol_with_yielding_select=yes
26095                         fi
26096
26097
26098
26099 for ac_func in \
26100                                 thr_setconcurrency \
26101                                 thr_getconcurrency \
26102
26103 do
26104 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
26105 echo "$as_me:$LINENO: checking for $ac_func" >&5
26106 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
26107 if eval "test \"\${$as_ac_var+set}\" = set"; then
26108   echo $ECHO_N "(cached) $ECHO_C" >&6
26109 else
26110   cat >conftest.$ac_ext <<_ACEOF
26111 /* confdefs.h.  */
26112 _ACEOF
26113 cat confdefs.h >>conftest.$ac_ext
26114 cat >>conftest.$ac_ext <<_ACEOF
26115 /* end confdefs.h.  */
26116 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
26117    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
26118 #define $ac_func innocuous_$ac_func
26119
26120 /* System header to define __stub macros and hopefully few prototypes,
26121     which can conflict with char $ac_func (); below.
26122     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
26123     <limits.h> exists even on freestanding compilers.  */
26124
26125 #ifdef __STDC__
26126 # include <limits.h>
26127 #else
26128 # include <assert.h>
26129 #endif
26130
26131 #undef $ac_func
26132
26133 /* Override any gcc2 internal prototype to avoid an error.  */
26134 #ifdef __cplusplus
26135 extern "C"
26136 {
26137 #endif
26138 /* We use char because int might match the return type of a gcc2
26139    builtin and then its argument prototype would still apply.  */
26140 char $ac_func ();
26141 /* The GNU C library defines this for functions which it implements
26142     to always fail with ENOSYS.  Some functions are actually named
26143     something starting with __ and the normal name is an alias.  */
26144 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
26145 choke me
26146 #else
26147 char (*f) () = $ac_func;
26148 #endif
26149 #ifdef __cplusplus
26150 }
26151 #endif
26152
26153 int
26154 main ()
26155 {
26156 return f != $ac_func;
26157   ;
26158   return 0;
26159 }
26160 _ACEOF
26161 rm -f conftest.$ac_objext conftest$ac_exeext
26162 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26163   (eval $ac_link) 2>conftest.er1
26164   ac_status=$?
26165   grep -v '^ *+' conftest.er1 >conftest.err
26166   rm -f conftest.er1
26167   cat conftest.err >&5
26168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26169   (exit $ac_status); } &&
26170          { ac_try='test -z "$ac_c_werror_flag"
26171                          || test ! -s conftest.err'
26172   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26173   (eval $ac_try) 2>&5
26174   ac_status=$?
26175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26176   (exit $ac_status); }; } &&
26177          { ac_try='test -s conftest$ac_exeext'
26178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26179   (eval $ac_try) 2>&5
26180   ac_status=$?
26181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26182   (exit $ac_status); }; }; then
26183   eval "$as_ac_var=yes"
26184 else
26185   echo "$as_me: failed program was:" >&5
26186 sed 's/^/| /' conftest.$ac_ext >&5
26187
26188 eval "$as_ac_var=no"
26189 fi
26190 rm -f conftest.err conftest.$ac_objext \
26191       conftest$ac_exeext conftest.$ac_ext
26192 fi
26193 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
26194 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
26195 if test `eval echo '${'$as_ac_var'}'` = yes; then
26196   cat >>confdefs.h <<_ACEOF
26197 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
26198 _ACEOF
26199
26200 fi
26201 done
26202
26203                 fi
26204         fi
26205
26206
26207 for ac_header in lwp/lwp.h
26208 do
26209 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26210 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26211   echo "$as_me:$LINENO: checking for $ac_header" >&5
26212 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26213 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26214   echo $ECHO_N "(cached) $ECHO_C" >&6
26215 fi
26216 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26217 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26218 else
26219   # Is the header compilable?
26220 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26221 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26222 cat >conftest.$ac_ext <<_ACEOF
26223 /* confdefs.h.  */
26224 _ACEOF
26225 cat confdefs.h >>conftest.$ac_ext
26226 cat >>conftest.$ac_ext <<_ACEOF
26227 /* end confdefs.h.  */
26228 $ac_includes_default
26229 #include <$ac_header>
26230 _ACEOF
26231 rm -f conftest.$ac_objext
26232 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26233   (eval $ac_compile) 2>conftest.er1
26234   ac_status=$?
26235   grep -v '^ *+' conftest.er1 >conftest.err
26236   rm -f conftest.er1
26237   cat conftest.err >&5
26238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26239   (exit $ac_status); } &&
26240          { ac_try='test -z "$ac_c_werror_flag"
26241                          || test ! -s conftest.err'
26242   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26243   (eval $ac_try) 2>&5
26244   ac_status=$?
26245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26246   (exit $ac_status); }; } &&
26247          { ac_try='test -s conftest.$ac_objext'
26248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26249   (eval $ac_try) 2>&5
26250   ac_status=$?
26251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26252   (exit $ac_status); }; }; then
26253   ac_header_compiler=yes
26254 else
26255   echo "$as_me: failed program was:" >&5
26256 sed 's/^/| /' conftest.$ac_ext >&5
26257
26258 ac_header_compiler=no
26259 fi
26260 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26261 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26262 echo "${ECHO_T}$ac_header_compiler" >&6
26263
26264 # Is the header present?
26265 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26266 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26267 cat >conftest.$ac_ext <<_ACEOF
26268 /* confdefs.h.  */
26269 _ACEOF
26270 cat confdefs.h >>conftest.$ac_ext
26271 cat >>conftest.$ac_ext <<_ACEOF
26272 /* end confdefs.h.  */
26273 #include <$ac_header>
26274 _ACEOF
26275 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26276   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26277   ac_status=$?
26278   grep -v '^ *+' conftest.er1 >conftest.err
26279   rm -f conftest.er1
26280   cat conftest.err >&5
26281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26282   (exit $ac_status); } >/dev/null; then
26283   if test -s conftest.err; then
26284     ac_cpp_err=$ac_c_preproc_warn_flag
26285     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26286   else
26287     ac_cpp_err=
26288   fi
26289 else
26290   ac_cpp_err=yes
26291 fi
26292 if test -z "$ac_cpp_err"; then
26293   ac_header_preproc=yes
26294 else
26295   echo "$as_me: failed program was:" >&5
26296 sed 's/^/| /' conftest.$ac_ext >&5
26297
26298   ac_header_preproc=no
26299 fi
26300 rm -f conftest.err conftest.$ac_ext
26301 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26302 echo "${ECHO_T}$ac_header_preproc" >&6
26303
26304 # So?  What about this header?
26305 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26306   yes:no: )
26307     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26308 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26309     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26310 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26311     ac_header_preproc=yes
26312     ;;
26313   no:yes:* )
26314     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26315 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26316     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26317 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26318     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26319 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26320     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26321 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26322     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26323 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26324     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26325 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26326     (
26327       cat <<\_ASBOX
26328 ## --------------------------------------------- ##
26329 ## Report this to <http://www.openldap.org/its/> ##
26330 ## --------------------------------------------- ##
26331 _ASBOX
26332     ) |
26333       sed "s/^/$as_me: WARNING:     /" >&2
26334     ;;
26335 esac
26336 echo "$as_me:$LINENO: checking for $ac_header" >&5
26337 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26338 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26339   echo $ECHO_N "(cached) $ECHO_C" >&6
26340 else
26341   eval "$as_ac_Header=\$ac_header_preproc"
26342 fi
26343 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26344 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26345
26346 fi
26347 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26348   cat >>confdefs.h <<_ACEOF
26349 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26350 _ACEOF
26351
26352 fi
26353
26354 done
26355
26356         if test $ac_cv_header_lwp_lwp_h = yes ; then
26357                 echo "$as_me:$LINENO: checking for lwp_create in -llwp" >&5
26358 echo $ECHO_N "checking for lwp_create in -llwp... $ECHO_C" >&6
26359 if test "${ac_cv_lib_lwp_lwp_create+set}" = set; then
26360   echo $ECHO_N "(cached) $ECHO_C" >&6
26361 else
26362   ac_check_lib_save_LIBS=$LIBS
26363 LIBS="-llwp  $LIBS"
26364 cat >conftest.$ac_ext <<_ACEOF
26365 /* confdefs.h.  */
26366 _ACEOF
26367 cat confdefs.h >>conftest.$ac_ext
26368 cat >>conftest.$ac_ext <<_ACEOF
26369 /* end confdefs.h.  */
26370
26371 /* Override any gcc2 internal prototype to avoid an error.  */
26372 #ifdef __cplusplus
26373 extern "C"
26374 #endif
26375 /* We use char because int might match the return type of a gcc2
26376    builtin and then its argument prototype would still apply.  */
26377 char lwp_create ();
26378 int
26379 main ()
26380 {
26381 lwp_create ();
26382   ;
26383   return 0;
26384 }
26385 _ACEOF
26386 rm -f conftest.$ac_objext conftest$ac_exeext
26387 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26388   (eval $ac_link) 2>conftest.er1
26389   ac_status=$?
26390   grep -v '^ *+' conftest.er1 >conftest.err
26391   rm -f conftest.er1
26392   cat conftest.err >&5
26393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26394   (exit $ac_status); } &&
26395          { ac_try='test -z "$ac_c_werror_flag"
26396                          || test ! -s conftest.err'
26397   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26398   (eval $ac_try) 2>&5
26399   ac_status=$?
26400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26401   (exit $ac_status); }; } &&
26402          { ac_try='test -s conftest$ac_exeext'
26403   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26404   (eval $ac_try) 2>&5
26405   ac_status=$?
26406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26407   (exit $ac_status); }; }; then
26408   ac_cv_lib_lwp_lwp_create=yes
26409 else
26410   echo "$as_me: failed program was:" >&5
26411 sed 's/^/| /' conftest.$ac_ext >&5
26412
26413 ac_cv_lib_lwp_lwp_create=no
26414 fi
26415 rm -f conftest.err conftest.$ac_objext \
26416       conftest$ac_exeext conftest.$ac_ext
26417 LIBS=$ac_check_lib_save_LIBS
26418 fi
26419 echo "$as_me:$LINENO: result: $ac_cv_lib_lwp_lwp_create" >&5
26420 echo "${ECHO_T}$ac_cv_lib_lwp_lwp_create" >&6
26421 if test $ac_cv_lib_lwp_lwp_create = yes; then
26422   have_lwp=yes
26423 else
26424   have_lwp=no
26425 fi
26426
26427
26428                 if test $have_lwp = yes ; then
26429
26430 cat >>confdefs.h <<\_ACEOF
26431 #define HAVE_LWP 1
26432 _ACEOF
26433
26434                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
26435                         ol_link_threads=lwp
26436
26437                         if test $ol_with_yielding_select = auto ; then
26438                                 ol_with_yielding_select=no
26439                         fi
26440                 fi
26441         fi
26442         ;;
26443 esac
26444
26445 if test $ol_with_yielding_select = yes ; then
26446
26447 cat >>confdefs.h <<\_ACEOF
26448 #define HAVE_YIELDING_SELECT 1
26449 _ACEOF
26450
26451 fi
26452
26453 if test $ol_with_threads = manual ; then
26454                 ol_link_threads=yes
26455
26456         { echo "$as_me:$LINENO: WARNING: thread defines and link options must be set manually" >&5
26457 echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
26458
26459
26460
26461 for ac_header in pthread.h sched.h
26462 do
26463 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26464 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26465   echo "$as_me:$LINENO: checking for $ac_header" >&5
26466 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26467 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26468   echo $ECHO_N "(cached) $ECHO_C" >&6
26469 fi
26470 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26471 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26472 else
26473   # Is the header compilable?
26474 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26475 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26476 cat >conftest.$ac_ext <<_ACEOF
26477 /* confdefs.h.  */
26478 _ACEOF
26479 cat confdefs.h >>conftest.$ac_ext
26480 cat >>conftest.$ac_ext <<_ACEOF
26481 /* end confdefs.h.  */
26482 $ac_includes_default
26483 #include <$ac_header>
26484 _ACEOF
26485 rm -f conftest.$ac_objext
26486 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26487   (eval $ac_compile) 2>conftest.er1
26488   ac_status=$?
26489   grep -v '^ *+' conftest.er1 >conftest.err
26490   rm -f conftest.er1
26491   cat conftest.err >&5
26492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26493   (exit $ac_status); } &&
26494          { ac_try='test -z "$ac_c_werror_flag"
26495                          || test ! -s conftest.err'
26496   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26497   (eval $ac_try) 2>&5
26498   ac_status=$?
26499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26500   (exit $ac_status); }; } &&
26501          { ac_try='test -s conftest.$ac_objext'
26502   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26503   (eval $ac_try) 2>&5
26504   ac_status=$?
26505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26506   (exit $ac_status); }; }; then
26507   ac_header_compiler=yes
26508 else
26509   echo "$as_me: failed program was:" >&5
26510 sed 's/^/| /' conftest.$ac_ext >&5
26511
26512 ac_header_compiler=no
26513 fi
26514 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26515 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26516 echo "${ECHO_T}$ac_header_compiler" >&6
26517
26518 # Is the header present?
26519 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26520 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26521 cat >conftest.$ac_ext <<_ACEOF
26522 /* confdefs.h.  */
26523 _ACEOF
26524 cat confdefs.h >>conftest.$ac_ext
26525 cat >>conftest.$ac_ext <<_ACEOF
26526 /* end confdefs.h.  */
26527 #include <$ac_header>
26528 _ACEOF
26529 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26530   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26531   ac_status=$?
26532   grep -v '^ *+' conftest.er1 >conftest.err
26533   rm -f conftest.er1
26534   cat conftest.err >&5
26535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26536   (exit $ac_status); } >/dev/null; then
26537   if test -s conftest.err; then
26538     ac_cpp_err=$ac_c_preproc_warn_flag
26539     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26540   else
26541     ac_cpp_err=
26542   fi
26543 else
26544   ac_cpp_err=yes
26545 fi
26546 if test -z "$ac_cpp_err"; then
26547   ac_header_preproc=yes
26548 else
26549   echo "$as_me: failed program was:" >&5
26550 sed 's/^/| /' conftest.$ac_ext >&5
26551
26552   ac_header_preproc=no
26553 fi
26554 rm -f conftest.err conftest.$ac_ext
26555 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26556 echo "${ECHO_T}$ac_header_preproc" >&6
26557
26558 # So?  What about this header?
26559 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26560   yes:no: )
26561     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26562 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26563     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26564 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26565     ac_header_preproc=yes
26566     ;;
26567   no:yes:* )
26568     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26569 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26570     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26571 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26572     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26573 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26574     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26575 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26576     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26577 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26578     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26579 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26580     (
26581       cat <<\_ASBOX
26582 ## --------------------------------------------- ##
26583 ## Report this to <http://www.openldap.org/its/> ##
26584 ## --------------------------------------------- ##
26585 _ASBOX
26586     ) |
26587       sed "s/^/$as_me: WARNING:     /" >&2
26588     ;;
26589 esac
26590 echo "$as_me:$LINENO: checking for $ac_header" >&5
26591 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26592 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26593   echo $ECHO_N "(cached) $ECHO_C" >&6
26594 else
26595   eval "$as_ac_Header=\$ac_header_preproc"
26596 fi
26597 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26598 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26599
26600 fi
26601 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26602   cat >>confdefs.h <<_ACEOF
26603 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26604 _ACEOF
26605
26606 fi
26607
26608 done
26609
26610
26611
26612 for ac_func in sched_yield pthread_yield
26613 do
26614 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
26615 echo "$as_me:$LINENO: checking for $ac_func" >&5
26616 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
26617 if eval "test \"\${$as_ac_var+set}\" = set"; then
26618   echo $ECHO_N "(cached) $ECHO_C" >&6
26619 else
26620   cat >conftest.$ac_ext <<_ACEOF
26621 /* confdefs.h.  */
26622 _ACEOF
26623 cat confdefs.h >>conftest.$ac_ext
26624 cat >>conftest.$ac_ext <<_ACEOF
26625 /* end confdefs.h.  */
26626 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
26627    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
26628 #define $ac_func innocuous_$ac_func
26629
26630 /* System header to define __stub macros and hopefully few prototypes,
26631     which can conflict with char $ac_func (); below.
26632     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
26633     <limits.h> exists even on freestanding compilers.  */
26634
26635 #ifdef __STDC__
26636 # include <limits.h>
26637 #else
26638 # include <assert.h>
26639 #endif
26640
26641 #undef $ac_func
26642
26643 /* Override any gcc2 internal prototype to avoid an error.  */
26644 #ifdef __cplusplus
26645 extern "C"
26646 {
26647 #endif
26648 /* We use char because int might match the return type of a gcc2
26649    builtin and then its argument prototype would still apply.  */
26650 char $ac_func ();
26651 /* The GNU C library defines this for functions which it implements
26652     to always fail with ENOSYS.  Some functions are actually named
26653     something starting with __ and the normal name is an alias.  */
26654 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
26655 choke me
26656 #else
26657 char (*f) () = $ac_func;
26658 #endif
26659 #ifdef __cplusplus
26660 }
26661 #endif
26662
26663 int
26664 main ()
26665 {
26666 return f != $ac_func;
26667   ;
26668   return 0;
26669 }
26670 _ACEOF
26671 rm -f conftest.$ac_objext conftest$ac_exeext
26672 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26673   (eval $ac_link) 2>conftest.er1
26674   ac_status=$?
26675   grep -v '^ *+' conftest.er1 >conftest.err
26676   rm -f conftest.er1
26677   cat conftest.err >&5
26678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26679   (exit $ac_status); } &&
26680          { ac_try='test -z "$ac_c_werror_flag"
26681                          || test ! -s conftest.err'
26682   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26683   (eval $ac_try) 2>&5
26684   ac_status=$?
26685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26686   (exit $ac_status); }; } &&
26687          { ac_try='test -s conftest$ac_exeext'
26688   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26689   (eval $ac_try) 2>&5
26690   ac_status=$?
26691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26692   (exit $ac_status); }; }; then
26693   eval "$as_ac_var=yes"
26694 else
26695   echo "$as_me: failed program was:" >&5
26696 sed 's/^/| /' conftest.$ac_ext >&5
26697
26698 eval "$as_ac_var=no"
26699 fi
26700 rm -f conftest.err conftest.$ac_objext \
26701       conftest$ac_exeext conftest.$ac_ext
26702 fi
26703 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
26704 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
26705 if test `eval echo '${'$as_ac_var'}'` = yes; then
26706   cat >>confdefs.h <<_ACEOF
26707 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
26708 _ACEOF
26709
26710 fi
26711 done
26712
26713
26714         echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5
26715 echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6
26716 if test "${ol_cv_header_linux_threads+set}" = set; then
26717   echo $ECHO_N "(cached) $ECHO_C" >&6
26718 else
26719   cat >conftest.$ac_ext <<_ACEOF
26720 /* confdefs.h.  */
26721 _ACEOF
26722 cat confdefs.h >>conftest.$ac_ext
26723 cat >>conftest.$ac_ext <<_ACEOF
26724 /* end confdefs.h.  */
26725 #include <pthread.h>
26726 _ACEOF
26727 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26728   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then
26729   ol_cv_header_linux_threads=yes
26730 else
26731   ol_cv_header_linux_threads=no
26732 fi
26733 rm -f conftest*
26734
26735
26736 fi
26737 echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5
26738 echo "${ECHO_T}$ol_cv_header_linux_threads" >&6
26739         if test $ol_cv_header_linux_threads = yes; then
26740
26741 cat >>confdefs.h <<\_ACEOF
26742 #define HAVE_LINUX_THREADS 1
26743 _ACEOF
26744
26745         fi
26746
26747
26748
26749 for ac_header in mach/cthreads.h
26750 do
26751 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26752 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26753   echo "$as_me:$LINENO: checking for $ac_header" >&5
26754 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26755 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26756   echo $ECHO_N "(cached) $ECHO_C" >&6
26757 fi
26758 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26759 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26760 else
26761   # Is the header compilable?
26762 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26763 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26764 cat >conftest.$ac_ext <<_ACEOF
26765 /* confdefs.h.  */
26766 _ACEOF
26767 cat confdefs.h >>conftest.$ac_ext
26768 cat >>conftest.$ac_ext <<_ACEOF
26769 /* end confdefs.h.  */
26770 $ac_includes_default
26771 #include <$ac_header>
26772 _ACEOF
26773 rm -f conftest.$ac_objext
26774 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26775   (eval $ac_compile) 2>conftest.er1
26776   ac_status=$?
26777   grep -v '^ *+' conftest.er1 >conftest.err
26778   rm -f conftest.er1
26779   cat conftest.err >&5
26780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26781   (exit $ac_status); } &&
26782          { ac_try='test -z "$ac_c_werror_flag"
26783                          || test ! -s conftest.err'
26784   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26785   (eval $ac_try) 2>&5
26786   ac_status=$?
26787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26788   (exit $ac_status); }; } &&
26789          { ac_try='test -s conftest.$ac_objext'
26790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26791   (eval $ac_try) 2>&5
26792   ac_status=$?
26793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26794   (exit $ac_status); }; }; then
26795   ac_header_compiler=yes
26796 else
26797   echo "$as_me: failed program was:" >&5
26798 sed 's/^/| /' conftest.$ac_ext >&5
26799
26800 ac_header_compiler=no
26801 fi
26802 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26803 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26804 echo "${ECHO_T}$ac_header_compiler" >&6
26805
26806 # Is the header present?
26807 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26808 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26809 cat >conftest.$ac_ext <<_ACEOF
26810 /* confdefs.h.  */
26811 _ACEOF
26812 cat confdefs.h >>conftest.$ac_ext
26813 cat >>conftest.$ac_ext <<_ACEOF
26814 /* end confdefs.h.  */
26815 #include <$ac_header>
26816 _ACEOF
26817 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26818   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26819   ac_status=$?
26820   grep -v '^ *+' conftest.er1 >conftest.err
26821   rm -f conftest.er1
26822   cat conftest.err >&5
26823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26824   (exit $ac_status); } >/dev/null; then
26825   if test -s conftest.err; then
26826     ac_cpp_err=$ac_c_preproc_warn_flag
26827     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26828   else
26829     ac_cpp_err=
26830   fi
26831 else
26832   ac_cpp_err=yes
26833 fi
26834 if test -z "$ac_cpp_err"; then
26835   ac_header_preproc=yes
26836 else
26837   echo "$as_me: failed program was:" >&5
26838 sed 's/^/| /' conftest.$ac_ext >&5
26839
26840   ac_header_preproc=no
26841 fi
26842 rm -f conftest.err conftest.$ac_ext
26843 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26844 echo "${ECHO_T}$ac_header_preproc" >&6
26845
26846 # So?  What about this header?
26847 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26848   yes:no: )
26849     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26850 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26851     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26852 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26853     ac_header_preproc=yes
26854     ;;
26855   no:yes:* )
26856     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26857 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26858     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26859 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26860     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26861 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26862     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26863 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26864     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26865 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26866     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26867 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26868     (
26869       cat <<\_ASBOX
26870 ## --------------------------------------------- ##
26871 ## Report this to <http://www.openldap.org/its/> ##
26872 ## --------------------------------------------- ##
26873 _ASBOX
26874     ) |
26875       sed "s/^/$as_me: WARNING:     /" >&2
26876     ;;
26877 esac
26878 echo "$as_me:$LINENO: checking for $ac_header" >&5
26879 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26880 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26881   echo $ECHO_N "(cached) $ECHO_C" >&6
26882 else
26883   eval "$as_ac_Header=\$ac_header_preproc"
26884 fi
26885 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26886 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26887
26888 fi
26889 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26890   cat >>confdefs.h <<_ACEOF
26891 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26892 _ACEOF
26893
26894 fi
26895
26896 done
26897
26898
26899 for ac_header in lwp/lwp.h
26900 do
26901 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26902 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26903   echo "$as_me:$LINENO: checking for $ac_header" >&5
26904 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26905 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26906   echo $ECHO_N "(cached) $ECHO_C" >&6
26907 fi
26908 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26909 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26910 else
26911   # Is the header compilable?
26912 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26913 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26914 cat >conftest.$ac_ext <<_ACEOF
26915 /* confdefs.h.  */
26916 _ACEOF
26917 cat confdefs.h >>conftest.$ac_ext
26918 cat >>conftest.$ac_ext <<_ACEOF
26919 /* end confdefs.h.  */
26920 $ac_includes_default
26921 #include <$ac_header>
26922 _ACEOF
26923 rm -f conftest.$ac_objext
26924 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26925   (eval $ac_compile) 2>conftest.er1
26926   ac_status=$?
26927   grep -v '^ *+' conftest.er1 >conftest.err
26928   rm -f conftest.er1
26929   cat conftest.err >&5
26930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26931   (exit $ac_status); } &&
26932          { ac_try='test -z "$ac_c_werror_flag"
26933                          || test ! -s conftest.err'
26934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26935   (eval $ac_try) 2>&5
26936   ac_status=$?
26937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26938   (exit $ac_status); }; } &&
26939          { ac_try='test -s conftest.$ac_objext'
26940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26941   (eval $ac_try) 2>&5
26942   ac_status=$?
26943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26944   (exit $ac_status); }; }; then
26945   ac_header_compiler=yes
26946 else
26947   echo "$as_me: failed program was:" >&5
26948 sed 's/^/| /' conftest.$ac_ext >&5
26949
26950 ac_header_compiler=no
26951 fi
26952 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26953 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26954 echo "${ECHO_T}$ac_header_compiler" >&6
26955
26956 # Is the header present?
26957 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26958 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26959 cat >conftest.$ac_ext <<_ACEOF
26960 /* confdefs.h.  */
26961 _ACEOF
26962 cat confdefs.h >>conftest.$ac_ext
26963 cat >>conftest.$ac_ext <<_ACEOF
26964 /* end confdefs.h.  */
26965 #include <$ac_header>
26966 _ACEOF
26967 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26968   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26969   ac_status=$?
26970   grep -v '^ *+' conftest.er1 >conftest.err
26971   rm -f conftest.er1
26972   cat conftest.err >&5
26973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26974   (exit $ac_status); } >/dev/null; then
26975   if test -s conftest.err; then
26976     ac_cpp_err=$ac_c_preproc_warn_flag
26977     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26978   else
26979     ac_cpp_err=
26980   fi
26981 else
26982   ac_cpp_err=yes
26983 fi
26984 if test -z "$ac_cpp_err"; then
26985   ac_header_preproc=yes
26986 else
26987   echo "$as_me: failed program was:" >&5
26988 sed 's/^/| /' conftest.$ac_ext >&5
26989
26990   ac_header_preproc=no
26991 fi
26992 rm -f conftest.err conftest.$ac_ext
26993 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26994 echo "${ECHO_T}$ac_header_preproc" >&6
26995
26996 # So?  What about this header?
26997 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26998   yes:no: )
26999     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27000 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27001     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
27002 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
27003     ac_header_preproc=yes
27004     ;;
27005   no:yes:* )
27006     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27007 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27008     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
27009 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
27010     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
27011 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
27012     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
27013 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
27014     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27015 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27016     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
27017 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
27018     (
27019       cat <<\_ASBOX
27020 ## --------------------------------------------- ##
27021 ## Report this to <http://www.openldap.org/its/> ##
27022 ## --------------------------------------------- ##
27023 _ASBOX
27024     ) |
27025       sed "s/^/$as_me: WARNING:     /" >&2
27026     ;;
27027 esac
27028 echo "$as_me:$LINENO: checking for $ac_header" >&5
27029 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27030 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27031   echo $ECHO_N "(cached) $ECHO_C" >&6
27032 else
27033   eval "$as_ac_Header=\$ac_header_preproc"
27034 fi
27035 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27036 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27037
27038 fi
27039 if test `eval echo '${'$as_ac_Header'}'` = yes; then
27040   cat >>confdefs.h <<_ACEOF
27041 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
27042 _ACEOF
27043
27044 fi
27045
27046 done
27047
27048
27049
27050 for ac_header in thread.h synch.h
27051 do
27052 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
27053 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27054   echo "$as_me:$LINENO: checking for $ac_header" >&5
27055 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27056 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27057   echo $ECHO_N "(cached) $ECHO_C" >&6
27058 fi
27059 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27060 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27061 else
27062   # Is the header compilable?
27063 echo "$as_me:$LINENO: checking $ac_header usability" >&5
27064 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
27065 cat >conftest.$ac_ext <<_ACEOF
27066 /* confdefs.h.  */
27067 _ACEOF
27068 cat confdefs.h >>conftest.$ac_ext
27069 cat >>conftest.$ac_ext <<_ACEOF
27070 /* end confdefs.h.  */
27071 $ac_includes_default
27072 #include <$ac_header>
27073 _ACEOF
27074 rm -f conftest.$ac_objext
27075 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27076   (eval $ac_compile) 2>conftest.er1
27077   ac_status=$?
27078   grep -v '^ *+' conftest.er1 >conftest.err
27079   rm -f conftest.er1
27080   cat conftest.err >&5
27081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27082   (exit $ac_status); } &&
27083          { ac_try='test -z "$ac_c_werror_flag"
27084                          || test ! -s conftest.err'
27085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27086   (eval $ac_try) 2>&5
27087   ac_status=$?
27088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27089   (exit $ac_status); }; } &&
27090          { ac_try='test -s conftest.$ac_objext'
27091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27092   (eval $ac_try) 2>&5
27093   ac_status=$?
27094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27095   (exit $ac_status); }; }; then
27096   ac_header_compiler=yes
27097 else
27098   echo "$as_me: failed program was:" >&5
27099 sed 's/^/| /' conftest.$ac_ext >&5
27100
27101 ac_header_compiler=no
27102 fi
27103 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27104 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27105 echo "${ECHO_T}$ac_header_compiler" >&6
27106
27107 # Is the header present?
27108 echo "$as_me:$LINENO: checking $ac_header presence" >&5
27109 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
27110 cat >conftest.$ac_ext <<_ACEOF
27111 /* confdefs.h.  */
27112 _ACEOF
27113 cat confdefs.h >>conftest.$ac_ext
27114 cat >>conftest.$ac_ext <<_ACEOF
27115 /* end confdefs.h.  */
27116 #include <$ac_header>
27117 _ACEOF
27118 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
27119   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
27120   ac_status=$?
27121   grep -v '^ *+' conftest.er1 >conftest.err
27122   rm -f conftest.er1
27123   cat conftest.err >&5
27124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27125   (exit $ac_status); } >/dev/null; then
27126   if test -s conftest.err; then
27127     ac_cpp_err=$ac_c_preproc_warn_flag
27128     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
27129   else
27130     ac_cpp_err=
27131   fi
27132 else
27133   ac_cpp_err=yes
27134 fi
27135 if test -z "$ac_cpp_err"; then
27136   ac_header_preproc=yes
27137 else
27138   echo "$as_me: failed program was:" >&5
27139 sed 's/^/| /' conftest.$ac_ext >&5
27140
27141   ac_header_preproc=no
27142 fi
27143 rm -f conftest.err conftest.$ac_ext
27144 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27145 echo "${ECHO_T}$ac_header_preproc" >&6
27146
27147 # So?  What about this header?
27148 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
27149   yes:no: )
27150     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27151 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27152     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
27153 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
27154     ac_header_preproc=yes
27155     ;;
27156   no:yes:* )
27157     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27158 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27159     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
27160 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
27161     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
27162 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
27163     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
27164 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
27165     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27166 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27167     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
27168 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
27169     (
27170       cat <<\_ASBOX
27171 ## --------------------------------------------- ##
27172 ## Report this to <http://www.openldap.org/its/> ##
27173 ## --------------------------------------------- ##
27174 _ASBOX
27175     ) |
27176       sed "s/^/$as_me: WARNING:     /" >&2
27177     ;;
27178 esac
27179 echo "$as_me:$LINENO: checking for $ac_header" >&5
27180 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27181 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27182   echo $ECHO_N "(cached) $ECHO_C" >&6
27183 else
27184   eval "$as_ac_Header=\$ac_header_preproc"
27185 fi
27186 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27187 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27188
27189 fi
27190 if test `eval echo '${'$as_ac_Header'}'` = yes; then
27191   cat >>confdefs.h <<_ACEOF
27192 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
27193 _ACEOF
27194
27195 fi
27196
27197 done
27198
27199 fi
27200
27201 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
27202                         cat >>confdefs.h <<\_ACEOF
27203 #define REENTRANT 1
27204 _ACEOF
27205
27206         cat >>confdefs.h <<\_ACEOF
27207 #define _REENTRANT 1
27208 _ACEOF
27209
27210         cat >>confdefs.h <<\_ACEOF
27211 #define THREAD_SAFE 1
27212 _ACEOF
27213
27214         cat >>confdefs.h <<\_ACEOF
27215 #define _THREAD_SAFE 1
27216 _ACEOF
27217
27218         cat >>confdefs.h <<\_ACEOF
27219 #define THREADSAFE 1
27220 _ACEOF
27221
27222         cat >>confdefs.h <<\_ACEOF
27223 #define _THREADSAFE 1
27224 _ACEOF
27225
27226         cat >>confdefs.h <<\_ACEOF
27227 #define _SGI_MP_SOURCE 1
27228 _ACEOF
27229
27230
27231                         echo "$as_me:$LINENO: checking for thread specific errno" >&5
27232 echo $ECHO_N "checking for thread specific errno... $ECHO_C" >&6
27233 if test "${ol_cv_errno_thread_specific+set}" = set; then
27234   echo $ECHO_N "(cached) $ECHO_C" >&6
27235 else
27236
27237                 cat >conftest.$ac_ext <<_ACEOF
27238 /* confdefs.h.  */
27239 _ACEOF
27240 cat confdefs.h >>conftest.$ac_ext
27241 cat >>conftest.$ac_ext <<_ACEOF
27242 /* end confdefs.h.  */
27243 #include <errno.h>
27244 int
27245 main ()
27246 {
27247 errno = 0;
27248   ;
27249   return 0;
27250 }
27251 _ACEOF
27252 rm -f conftest.$ac_objext conftest$ac_exeext
27253 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27254   (eval $ac_link) 2>conftest.er1
27255   ac_status=$?
27256   grep -v '^ *+' conftest.er1 >conftest.err
27257   rm -f conftest.er1
27258   cat conftest.err >&5
27259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27260   (exit $ac_status); } &&
27261          { ac_try='test -z "$ac_c_werror_flag"
27262                          || test ! -s conftest.err'
27263   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27264   (eval $ac_try) 2>&5
27265   ac_status=$?
27266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27267   (exit $ac_status); }; } &&
27268          { ac_try='test -s conftest$ac_exeext'
27269   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27270   (eval $ac_try) 2>&5
27271   ac_status=$?
27272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27273   (exit $ac_status); }; }; then
27274   ol_cv_errno_thread_specific=yes
27275 else
27276   echo "$as_me: failed program was:" >&5
27277 sed 's/^/| /' conftest.$ac_ext >&5
27278
27279 ol_cv_errno_thread_specific=no
27280 fi
27281 rm -f conftest.err conftest.$ac_objext \
27282       conftest$ac_exeext conftest.$ac_ext
27283
27284 fi
27285 echo "$as_me:$LINENO: result: $ol_cv_errno_thread_specific" >&5
27286 echo "${ECHO_T}$ol_cv_errno_thread_specific" >&6
27287
27288                         echo "$as_me:$LINENO: checking for thread specific h_errno" >&5
27289 echo $ECHO_N "checking for thread specific h_errno... $ECHO_C" >&6
27290 if test "${ol_cv_h_errno_thread_specific+set}" = set; then
27291   echo $ECHO_N "(cached) $ECHO_C" >&6
27292 else
27293
27294                 cat >conftest.$ac_ext <<_ACEOF
27295 /* confdefs.h.  */
27296 _ACEOF
27297 cat confdefs.h >>conftest.$ac_ext
27298 cat >>conftest.$ac_ext <<_ACEOF
27299 /* end confdefs.h.  */
27300 #include <netdb.h>
27301 int
27302 main ()
27303 {
27304 h_errno = 0;
27305   ;
27306   return 0;
27307 }
27308 _ACEOF
27309 rm -f conftest.$ac_objext conftest$ac_exeext
27310 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27311   (eval $ac_link) 2>conftest.er1
27312   ac_status=$?
27313   grep -v '^ *+' conftest.er1 >conftest.err
27314   rm -f conftest.er1
27315   cat conftest.err >&5
27316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27317   (exit $ac_status); } &&
27318          { ac_try='test -z "$ac_c_werror_flag"
27319                          || test ! -s conftest.err'
27320   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27321   (eval $ac_try) 2>&5
27322   ac_status=$?
27323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27324   (exit $ac_status); }; } &&
27325          { ac_try='test -s conftest$ac_exeext'
27326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27327   (eval $ac_try) 2>&5
27328   ac_status=$?
27329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27330   (exit $ac_status); }; }; then
27331   ol_cv_h_errno_thread_specific=yes
27332 else
27333   echo "$as_me: failed program was:" >&5
27334 sed 's/^/| /' conftest.$ac_ext >&5
27335
27336 ol_cv_h_errno_thread_specific=no
27337 fi
27338 rm -f conftest.err conftest.$ac_objext \
27339       conftest$ac_exeext conftest.$ac_ext
27340
27341 fi
27342 echo "$as_me:$LINENO: result: $ol_cv_h_errno_thread_specific" >&5
27343 echo "${ECHO_T}$ol_cv_h_errno_thread_specific" >&6
27344
27345         if test $ol_cv_errno_thread_specific != yes ||
27346            test $ol_cv_h_errno_thread_specific != yes ; then
27347                 LIBS="$LTHREAD_LIBS $LIBS"
27348                 LTHREAD_LIBS=""
27349         fi
27350
27351 fi
27352
27353 if test $ol_link_threads = no ; then
27354         if test $ol_with_threads = yes ; then
27355                 { { echo "$as_me:$LINENO: error: no suitable thread support" >&5
27356 echo "$as_me: error: no suitable thread support" >&2;}
27357    { (exit 1); exit 1; }; }
27358         fi
27359
27360         if test $ol_with_threads = auto ; then
27361                 { echo "$as_me:$LINENO: WARNING: no suitable thread support, disabling threads" >&5
27362 echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
27363                 ol_with_threads=no
27364         fi
27365
27366
27367 cat >>confdefs.h <<\_ACEOF
27368 #define NO_THREADS 1
27369 _ACEOF
27370
27371         LTHREAD_LIBS=""
27372         BUILD_THREAD=no
27373 else
27374         BUILD_THREAD=yes
27375 fi
27376
27377 if test $ol_link_threads != no ; then
27378
27379 cat >>confdefs.h <<\_ACEOF
27380 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
27381 _ACEOF
27382
27383 fi
27384
27385
27386
27387
27388 for ac_func in \
27389         ctime_r                 \
27390         gethostbyname_r gethostbyaddr_r \
27391
27392 do
27393 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
27394 echo "$as_me:$LINENO: checking for $ac_func" >&5
27395 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
27396 if eval "test \"\${$as_ac_var+set}\" = set"; then
27397   echo $ECHO_N "(cached) $ECHO_C" >&6
27398 else
27399   cat >conftest.$ac_ext <<_ACEOF
27400 /* confdefs.h.  */
27401 _ACEOF
27402 cat confdefs.h >>conftest.$ac_ext
27403 cat >>conftest.$ac_ext <<_ACEOF
27404 /* end confdefs.h.  */
27405 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
27406    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
27407 #define $ac_func innocuous_$ac_func
27408
27409 /* System header to define __stub macros and hopefully few prototypes,
27410     which can conflict with char $ac_func (); below.
27411     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
27412     <limits.h> exists even on freestanding compilers.  */
27413
27414 #ifdef __STDC__
27415 # include <limits.h>
27416 #else
27417 # include <assert.h>
27418 #endif
27419
27420 #undef $ac_func
27421
27422 /* Override any gcc2 internal prototype to avoid an error.  */
27423 #ifdef __cplusplus
27424 extern "C"
27425 {
27426 #endif
27427 /* We use char because int might match the return type of a gcc2
27428    builtin and then its argument prototype would still apply.  */
27429 char $ac_func ();
27430 /* The GNU C library defines this for functions which it implements
27431     to always fail with ENOSYS.  Some functions are actually named
27432     something starting with __ and the normal name is an alias.  */
27433 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
27434 choke me
27435 #else
27436 char (*f) () = $ac_func;
27437 #endif
27438 #ifdef __cplusplus
27439 }
27440 #endif
27441
27442 int
27443 main ()
27444 {
27445 return f != $ac_func;
27446   ;
27447   return 0;
27448 }
27449 _ACEOF
27450 rm -f conftest.$ac_objext conftest$ac_exeext
27451 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27452   (eval $ac_link) 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_exeext'
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   eval "$as_ac_var=yes"
27473 else
27474   echo "$as_me: failed program was:" >&5
27475 sed 's/^/| /' conftest.$ac_ext >&5
27476
27477 eval "$as_ac_var=no"
27478 fi
27479 rm -f conftest.err conftest.$ac_objext \
27480       conftest$ac_exeext conftest.$ac_ext
27481 fi
27482 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
27483 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
27484 if test `eval echo '${'$as_ac_var'}'` = yes; then
27485   cat >>confdefs.h <<_ACEOF
27486 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
27487 _ACEOF
27488
27489 fi
27490 done
27491
27492
27493 if test "$ac_cv_func_ctime_r" = no ; then
27494         ol_cv_func_ctime_r_nargs=0
27495 else
27496         echo "$as_me:$LINENO: checking number of arguments of ctime_r" >&5
27497 echo $ECHO_N "checking number of arguments of ctime_r... $ECHO_C" >&6
27498 if test "${ol_cv_func_ctime_r_nargs+set}" = set; then
27499   echo $ECHO_N "(cached) $ECHO_C" >&6
27500 else
27501   cat >conftest.$ac_ext <<_ACEOF
27502 /* confdefs.h.  */
27503 _ACEOF
27504 cat confdefs.h >>conftest.$ac_ext
27505 cat >>conftest.$ac_ext <<_ACEOF
27506 /* end confdefs.h.  */
27507 #include <time.h>
27508 int
27509 main ()
27510 {
27511 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
27512   ;
27513   return 0;
27514 }
27515 _ACEOF
27516 rm -f conftest.$ac_objext
27517 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27518   (eval $ac_compile) 2>conftest.er1
27519   ac_status=$?
27520   grep -v '^ *+' conftest.er1 >conftest.err
27521   rm -f conftest.er1
27522   cat conftest.err >&5
27523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27524   (exit $ac_status); } &&
27525          { ac_try='test -z "$ac_c_werror_flag"
27526                          || test ! -s conftest.err'
27527   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27528   (eval $ac_try) 2>&5
27529   ac_status=$?
27530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27531   (exit $ac_status); }; } &&
27532          { ac_try='test -s conftest.$ac_objext'
27533   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27534   (eval $ac_try) 2>&5
27535   ac_status=$?
27536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27537   (exit $ac_status); }; }; then
27538   ol_cv_func_ctime_r_nargs3=yes
27539 else
27540   echo "$as_me: failed program was:" >&5
27541 sed 's/^/| /' conftest.$ac_ext >&5
27542
27543 ol_cv_func_ctime_r_nargs3=no
27544 fi
27545 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27546
27547         cat >conftest.$ac_ext <<_ACEOF
27548 /* confdefs.h.  */
27549 _ACEOF
27550 cat confdefs.h >>conftest.$ac_ext
27551 cat >>conftest.$ac_ext <<_ACEOF
27552 /* end confdefs.h.  */
27553 #include <time.h>
27554 int
27555 main ()
27556 {
27557 time_t ti; char *buffer; ctime_r(&ti,buffer);
27558   ;
27559   return 0;
27560 }
27561 _ACEOF
27562 rm -f conftest.$ac_objext
27563 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27564   (eval $ac_compile) 2>conftest.er1
27565   ac_status=$?
27566   grep -v '^ *+' conftest.er1 >conftest.err
27567   rm -f conftest.er1
27568   cat conftest.err >&5
27569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27570   (exit $ac_status); } &&
27571          { ac_try='test -z "$ac_c_werror_flag"
27572                          || test ! -s conftest.err'
27573   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27574   (eval $ac_try) 2>&5
27575   ac_status=$?
27576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27577   (exit $ac_status); }; } &&
27578          { ac_try='test -s conftest.$ac_objext'
27579   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27580   (eval $ac_try) 2>&5
27581   ac_status=$?
27582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27583   (exit $ac_status); }; }; then
27584   ol_cv_func_ctime_r_nargs2=yes
27585 else
27586   echo "$as_me: failed program was:" >&5
27587 sed 's/^/| /' conftest.$ac_ext >&5
27588
27589 ol_cv_func_ctime_r_nargs2=no
27590 fi
27591 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27592
27593         if test $ol_cv_func_ctime_r_nargs3 = yes &&
27594            test $ol_cv_func_ctime_r_nargs2 = no ; then
27595
27596                 ol_cv_func_ctime_r_nargs=3
27597
27598         elif test $ol_cv_func_ctime_r_nargs3 = no &&
27599              test $ol_cv_func_ctime_r_nargs2 = yes ; then
27600
27601                 ol_cv_func_ctime_r_nargs=2
27602
27603         else
27604                 ol_cv_func_ctime_r_nargs=0
27605         fi
27606
27607 fi
27608 echo "$as_me:$LINENO: result: $ol_cv_func_ctime_r_nargs" >&5
27609 echo "${ECHO_T}$ol_cv_func_ctime_r_nargs" >&6
27610
27611   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
27612
27613 cat >>confdefs.h <<_ACEOF
27614 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
27615 _ACEOF
27616
27617   fi
27618
27619 fi
27620
27621 if test "$ac_cv_func_gethostbyname_r" = yes ; then
27622         echo "$as_me:$LINENO: checking number of arguments of gethostbyname_r" >&5
27623 echo $ECHO_N "checking number of arguments of gethostbyname_r... $ECHO_C" >&6
27624 if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then
27625   echo $ECHO_N "(cached) $ECHO_C" >&6
27626 else
27627   cat >conftest.$ac_ext <<_ACEOF
27628 /* confdefs.h.  */
27629 _ACEOF
27630 cat confdefs.h >>conftest.$ac_ext
27631 cat >>conftest.$ac_ext <<_ACEOF
27632 /* end confdefs.h.  */
27633 #include <sys/types.h>
27634 #include <sys/socket.h>
27635 #include <netinet/in.h>
27636 #include <netdb.h>
27637 #define BUFSIZE (sizeof(struct hostent)+10)
27638 int
27639 main ()
27640 {
27641 struct hostent hent; char buffer[BUFSIZE];
27642                 int bufsize=BUFSIZE;int h_errno;
27643                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
27644                         buffer, bufsize, &h_errno);
27645   ;
27646   return 0;
27647 }
27648 _ACEOF
27649 rm -f conftest.$ac_objext
27650 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27651   (eval $ac_compile) 2>conftest.er1
27652   ac_status=$?
27653   grep -v '^ *+' conftest.er1 >conftest.err
27654   rm -f conftest.er1
27655   cat conftest.err >&5
27656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27657   (exit $ac_status); } &&
27658          { ac_try='test -z "$ac_c_werror_flag"
27659                          || test ! -s conftest.err'
27660   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27661   (eval $ac_try) 2>&5
27662   ac_status=$?
27663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27664   (exit $ac_status); }; } &&
27665          { ac_try='test -s conftest.$ac_objext'
27666   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27667   (eval $ac_try) 2>&5
27668   ac_status=$?
27669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27670   (exit $ac_status); }; }; then
27671   ol_cv_func_gethostbyname_r_nargs5=yes
27672 else
27673   echo "$as_me: failed program was:" >&5
27674 sed 's/^/| /' conftest.$ac_ext >&5
27675
27676 ol_cv_func_gethostbyname_r_nargs5=no
27677 fi
27678 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27679
27680         cat >conftest.$ac_ext <<_ACEOF
27681 /* confdefs.h.  */
27682 _ACEOF
27683 cat confdefs.h >>conftest.$ac_ext
27684 cat >>conftest.$ac_ext <<_ACEOF
27685 /* end confdefs.h.  */
27686 #include <sys/types.h>
27687 #include <sys/socket.h>
27688 #include <netinet/in.h>
27689 #include <netdb.h>
27690 #define BUFSIZE (sizeof(struct hostent)+10)
27691 int
27692 main ()
27693 {
27694 struct hostent hent;struct hostent *rhent;
27695                 char buffer[BUFSIZE];
27696                 int bufsize=BUFSIZE;int h_errno;
27697                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
27698                         &rhent, &h_errno);
27699   ;
27700   return 0;
27701 }
27702 _ACEOF
27703 rm -f conftest.$ac_objext
27704 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27705   (eval $ac_compile) 2>conftest.er1
27706   ac_status=$?
27707   grep -v '^ *+' conftest.er1 >conftest.err
27708   rm -f conftest.er1
27709   cat conftest.err >&5
27710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27711   (exit $ac_status); } &&
27712          { ac_try='test -z "$ac_c_werror_flag"
27713                          || test ! -s conftest.err'
27714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27715   (eval $ac_try) 2>&5
27716   ac_status=$?
27717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27718   (exit $ac_status); }; } &&
27719          { ac_try='test -s conftest.$ac_objext'
27720   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27721   (eval $ac_try) 2>&5
27722   ac_status=$?
27723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27724   (exit $ac_status); }; }; then
27725   ol_cv_func_gethostbyname_r_nargs6=yes
27726 else
27727   echo "$as_me: failed program was:" >&5
27728 sed 's/^/| /' conftest.$ac_ext >&5
27729
27730 ol_cv_func_gethostbyname_r_nargs6=no
27731 fi
27732 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27733
27734         if test $ol_cv_func_gethostbyname_r_nargs5 = yes &&
27735            test $ol_cv_func_gethostbyname_r_nargs6 = no ; then
27736
27737                 ol_cv_func_gethostbyname_r_nargs=5
27738
27739         elif test $ol_cv_func_gethostbyname_r_nargs5 = no &&
27740              test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
27741
27742                 ol_cv_func_gethostbyname_r_nargs=6
27743
27744         else
27745                 ol_cv_func_gethostbyname_r_nargs=0
27746         fi
27747
27748 fi
27749 echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyname_r_nargs" >&5
27750 echo "${ECHO_T}$ol_cv_func_gethostbyname_r_nargs" >&6
27751   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
27752
27753 cat >>confdefs.h <<_ACEOF
27754 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
27755 _ACEOF
27756
27757   fi
27758
27759 else
27760         ol_cv_func_gethostbyname_r_nargs=0
27761 fi
27762
27763 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
27764         echo "$as_me:$LINENO: checking number of arguments of gethostbyaddr_r" >&5
27765 echo $ECHO_N "checking number of arguments of gethostbyaddr_r... $ECHO_C" >&6
27766 if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then
27767   echo $ECHO_N "(cached) $ECHO_C" >&6
27768 else
27769   cat >conftest.$ac_ext <<_ACEOF
27770 /* confdefs.h.  */
27771 _ACEOF
27772 cat confdefs.h >>conftest.$ac_ext
27773 cat >>conftest.$ac_ext <<_ACEOF
27774 /* end confdefs.h.  */
27775 #include <sys/types.h>
27776 #include <sys/socket.h>
27777 #include <netinet/in.h>
27778 #include <netdb.h>
27779 #define BUFSIZE (sizeof(struct hostent)+10)
27780 int
27781 main ()
27782 {
27783 struct hostent hent; char buffer[BUFSIZE];
27784             struct in_addr add;
27785             size_t alen=sizeof(struct in_addr);
27786             int bufsize=BUFSIZE;int h_errno;
27787                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
27788                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
27789   ;
27790   return 0;
27791 }
27792 _ACEOF
27793 rm -f conftest.$ac_objext
27794 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27795   (eval $ac_compile) 2>conftest.er1
27796   ac_status=$?
27797   grep -v '^ *+' conftest.er1 >conftest.err
27798   rm -f conftest.er1
27799   cat conftest.err >&5
27800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27801   (exit $ac_status); } &&
27802          { ac_try='test -z "$ac_c_werror_flag"
27803                          || test ! -s conftest.err'
27804   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27805   (eval $ac_try) 2>&5
27806   ac_status=$?
27807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27808   (exit $ac_status); }; } &&
27809          { ac_try='test -s conftest.$ac_objext'
27810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27811   (eval $ac_try) 2>&5
27812   ac_status=$?
27813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27814   (exit $ac_status); }; }; then
27815   ol_cv_func_gethostbyaddr_r_nargs7=yes
27816 else
27817   echo "$as_me: failed program was:" >&5
27818 sed 's/^/| /' conftest.$ac_ext >&5
27819
27820 ol_cv_func_gethostbyaddr_r_nargs7=no
27821 fi
27822 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27823
27824         cat >conftest.$ac_ext <<_ACEOF
27825 /* confdefs.h.  */
27826 _ACEOF
27827 cat confdefs.h >>conftest.$ac_ext
27828 cat >>conftest.$ac_ext <<_ACEOF
27829 /* end confdefs.h.  */
27830 #include <sys/types.h>
27831 #include <sys/socket.h>
27832 #include <netinet/in.h>
27833 #include <netdb.h>
27834 #define BUFSIZE (sizeof(struct hostent)+10)
27835 int
27836 main ()
27837 {
27838 struct hostent hent;
27839                 struct hostent *rhent; char buffer[BUFSIZE];
27840                 struct in_addr add;
27841                 size_t alen=sizeof(struct in_addr);
27842                 int bufsize=BUFSIZE;int h_errno;
27843                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
27844                         alen, AF_INET, &hent, buffer, bufsize,
27845                         &rhent, &h_errno);
27846   ;
27847   return 0;
27848 }
27849 _ACEOF
27850 rm -f conftest.$ac_objext
27851 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27852   (eval $ac_compile) 2>conftest.er1
27853   ac_status=$?
27854   grep -v '^ *+' conftest.er1 >conftest.err
27855   rm -f conftest.er1
27856   cat conftest.err >&5
27857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27858   (exit $ac_status); } &&
27859          { ac_try='test -z "$ac_c_werror_flag"
27860                          || test ! -s conftest.err'
27861   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27862   (eval $ac_try) 2>&5
27863   ac_status=$?
27864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27865   (exit $ac_status); }; } &&
27866          { ac_try='test -s conftest.$ac_objext'
27867   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27868   (eval $ac_try) 2>&5
27869   ac_status=$?
27870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27871   (exit $ac_status); }; }; then
27872   ol_cv_func_gethostbyaddr_r_nargs8=yes
27873 else
27874   echo "$as_me: failed program was:" >&5
27875 sed 's/^/| /' conftest.$ac_ext >&5
27876
27877 ol_cv_func_gethostbyaddr_r_nargs8=no
27878 fi
27879 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27880
27881         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes &&
27882            test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
27883
27884                 ol_cv_func_gethostbyaddr_r_nargs=7
27885
27886         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no &&
27887              test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
27888
27889                 ol_cv_func_gethostbyaddr_r_nargs=8
27890
27891         else
27892                 ol_cv_func_gethostbyaddr_r_nargs=0
27893         fi
27894
27895 fi
27896 echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5
27897 echo "${ECHO_T}$ol_cv_func_gethostbyaddr_r_nargs" >&6
27898   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
27899
27900 cat >>confdefs.h <<_ACEOF
27901 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
27902 _ACEOF
27903
27904   fi
27905
27906 else
27907         ol_cv_func_gethostbyaddr_r_nargs=0
27908 fi
27909
27910 ol_link_ldbm=no
27911
27912 case $ol_enable_ldbm_api in auto | berkeley | bcompat)
27913
27914         if test $ol_enable_ldbm_api = bcompat; then \
27915
27916
27917 for ac_header in db_185.h db.h
27918 do
27919 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
27920 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27921   echo "$as_me:$LINENO: checking for $ac_header" >&5
27922 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27923 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27924   echo $ECHO_N "(cached) $ECHO_C" >&6
27925 fi
27926 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27927 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27928 else
27929   # Is the header compilable?
27930 echo "$as_me:$LINENO: checking $ac_header usability" >&5
27931 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
27932 cat >conftest.$ac_ext <<_ACEOF
27933 /* confdefs.h.  */
27934 _ACEOF
27935 cat confdefs.h >>conftest.$ac_ext
27936 cat >>conftest.$ac_ext <<_ACEOF
27937 /* end confdefs.h.  */
27938 $ac_includes_default
27939 #include <$ac_header>
27940 _ACEOF
27941 rm -f conftest.$ac_objext
27942 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27943   (eval $ac_compile) 2>conftest.er1
27944   ac_status=$?
27945   grep -v '^ *+' conftest.er1 >conftest.err
27946   rm -f conftest.er1
27947   cat conftest.err >&5
27948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27949   (exit $ac_status); } &&
27950          { ac_try='test -z "$ac_c_werror_flag"
27951                          || test ! -s conftest.err'
27952   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27953   (eval $ac_try) 2>&5
27954   ac_status=$?
27955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27956   (exit $ac_status); }; } &&
27957          { ac_try='test -s conftest.$ac_objext'
27958   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27959   (eval $ac_try) 2>&5
27960   ac_status=$?
27961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27962   (exit $ac_status); }; }; then
27963   ac_header_compiler=yes
27964 else
27965   echo "$as_me: failed program was:" >&5
27966 sed 's/^/| /' conftest.$ac_ext >&5
27967
27968 ac_header_compiler=no
27969 fi
27970 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27971 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27972 echo "${ECHO_T}$ac_header_compiler" >&6
27973
27974 # Is the header present?
27975 echo "$as_me:$LINENO: checking $ac_header presence" >&5
27976 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
27977 cat >conftest.$ac_ext <<_ACEOF
27978 /* confdefs.h.  */
27979 _ACEOF
27980 cat confdefs.h >>conftest.$ac_ext
27981 cat >>conftest.$ac_ext <<_ACEOF
27982 /* end confdefs.h.  */
27983 #include <$ac_header>
27984 _ACEOF
27985 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
27986   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
27987   ac_status=$?
27988   grep -v '^ *+' conftest.er1 >conftest.err
27989   rm -f conftest.er1
27990   cat conftest.err >&5
27991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27992   (exit $ac_status); } >/dev/null; then
27993   if test -s conftest.err; then
27994     ac_cpp_err=$ac_c_preproc_warn_flag
27995     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
27996   else
27997     ac_cpp_err=
27998   fi
27999 else
28000   ac_cpp_err=yes
28001 fi
28002 if test -z "$ac_cpp_err"; then
28003   ac_header_preproc=yes
28004 else
28005   echo "$as_me: failed program was:" >&5
28006 sed 's/^/| /' conftest.$ac_ext >&5
28007
28008   ac_header_preproc=no
28009 fi
28010 rm -f conftest.err conftest.$ac_ext
28011 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
28012 echo "${ECHO_T}$ac_header_preproc" >&6
28013
28014 # So?  What about this header?
28015 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
28016   yes:no: )
28017     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
28018 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
28019     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
28020 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
28021     ac_header_preproc=yes
28022     ;;
28023   no:yes:* )
28024     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
28025 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
28026     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
28027 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
28028     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
28029 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
28030     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
28031 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
28032     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
28033 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
28034     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
28035 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
28036     (
28037       cat <<\_ASBOX
28038 ## --------------------------------------------- ##
28039 ## Report this to <http://www.openldap.org/its/> ##
28040 ## --------------------------------------------- ##
28041 _ASBOX
28042     ) |
28043       sed "s/^/$as_me: WARNING:     /" >&2
28044     ;;
28045 esac
28046 echo "$as_me:$LINENO: checking for $ac_header" >&5
28047 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
28048 if eval "test \"\${$as_ac_Header+set}\" = set"; then
28049   echo $ECHO_N "(cached) $ECHO_C" >&6
28050 else
28051   eval "$as_ac_Header=\$ac_header_preproc"
28052 fi
28053 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
28054 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
28055
28056 fi
28057 if test `eval echo '${'$as_ac_Header'}'` = yes; then
28058   cat >>confdefs.h <<_ACEOF
28059 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
28060 _ACEOF
28061
28062 fi
28063
28064 done
28065
28066 if test $ac_cv_header_db_185_h = yes || test $ac_cv_header_db_h = yes; then
28067         echo "$as_me:$LINENO: checking if Berkeley DB header compatibility" >&5
28068 echo $ECHO_N "checking if Berkeley DB header compatibility... $ECHO_C" >&6
28069 if test "${ol_cv_header_db1+set}" = set; then
28070   echo $ECHO_N "(cached) $ECHO_C" >&6
28071 else
28072
28073                 cat >conftest.$ac_ext <<_ACEOF
28074 /* confdefs.h.  */
28075 _ACEOF
28076 cat confdefs.h >>conftest.$ac_ext
28077 cat >>conftest.$ac_ext <<_ACEOF
28078 /* end confdefs.h.  */
28079
28080 #if HAVE_DB_185_H
28081 #       include <db_185.h>
28082 #else
28083 #       include <db.h>
28084 #endif
28085
28086  /* this check could be improved */
28087 #ifndef DB_VERSION_MAJOR
28088 #       define DB_VERSION_MAJOR 1
28089 #endif
28090
28091 #if DB_VERSION_MAJOR == 1
28092         __db_version_1
28093 #endif
28094
28095 _ACEOF
28096 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28097   $EGREP "__db_version_1" >/dev/null 2>&1; then
28098   ol_cv_header_db1=yes
28099 else
28100   ol_cv_header_db1=no
28101 fi
28102 rm -f conftest*
28103
28104 fi
28105 echo "$as_me:$LINENO: result: $ol_cv_header_db1" >&5
28106 echo "${ECHO_T}$ol_cv_header_db1" >&6
28107
28108         if test $ol_cv_header_db1 = yes ; then
28109                 ol_cv_lib_db=no
28110
28111 echo "$as_me:$LINENO: checking for Berkeley DB major version" >&5
28112 echo $ECHO_N "checking for Berkeley DB major version... $ECHO_C" >&6
28113 if test "${ol_cv_bdb_major+set}" = set; then
28114   echo $ECHO_N "(cached) $ECHO_C" >&6
28115 else
28116
28117         ol_cv_bdb_major=0
28118         if test $ol_cv_bdb_major = 0 ; then
28119                 cat >conftest.$ac_ext <<_ACEOF
28120 /* confdefs.h.  */
28121 _ACEOF
28122 cat confdefs.h >>conftest.$ac_ext
28123 cat >>conftest.$ac_ext <<_ACEOF
28124 /* end confdefs.h.  */
28125
28126 #include <db.h>
28127 #ifndef DB_VERSION_MAJOR
28128 #       define DB_VERSION_MAJOR 1
28129 #endif
28130 #if DB_VERSION_MAJOR == 4
28131 __db_version
28132 #endif
28133
28134 _ACEOF
28135 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28136   $EGREP "__db_version" >/dev/null 2>&1; then
28137   ol_cv_bdb_major=4
28138 else
28139   :
28140 fi
28141 rm -f conftest*
28142
28143         fi
28144         if test $ol_cv_bdb_major = 0 ; then
28145                 cat >conftest.$ac_ext <<_ACEOF
28146 /* confdefs.h.  */
28147 _ACEOF
28148 cat confdefs.h >>conftest.$ac_ext
28149 cat >>conftest.$ac_ext <<_ACEOF
28150 /* end confdefs.h.  */
28151
28152 #include <db.h>
28153 #ifndef DB_VERSION_MAJOR
28154 #       define DB_VERSION_MAJOR 1
28155 #endif
28156 #if DB_VERSION_MAJOR == 3
28157 __db_version
28158 #endif
28159
28160 _ACEOF
28161 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28162   $EGREP "__db_version" >/dev/null 2>&1; then
28163   ol_cv_bdb_major=3
28164 else
28165   :
28166 fi
28167 rm -f conftest*
28168
28169         fi
28170         if test $ol_cv_bdb_major = 0 ; then
28171                 cat >conftest.$ac_ext <<_ACEOF
28172 /* confdefs.h.  */
28173 _ACEOF
28174 cat confdefs.h >>conftest.$ac_ext
28175 cat >>conftest.$ac_ext <<_ACEOF
28176 /* end confdefs.h.  */
28177
28178 #include <db.h>
28179 #ifndef DB_VERSION_MAJOR
28180 #       define DB_VERSION_MAJOR 1
28181 #endif
28182 #if DB_VERSION_MAJOR == 2
28183 __db_version
28184 #endif
28185
28186 _ACEOF
28187 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28188   $EGREP "__db_version" >/dev/null 2>&1; then
28189   ol_cv_bdb_major=2
28190 else
28191   :
28192 fi
28193 rm -f conftest*
28194
28195         fi
28196         if test $ol_cv_bdb_major = 0 ; then
28197                 cat >conftest.$ac_ext <<_ACEOF
28198 /* confdefs.h.  */
28199 _ACEOF
28200 cat confdefs.h >>conftest.$ac_ext
28201 cat >>conftest.$ac_ext <<_ACEOF
28202 /* end confdefs.h.  */
28203
28204 #include <db.h>
28205 #ifndef DB_VERSION_MAJOR
28206 #       define DB_VERSION_MAJOR 1
28207 #endif
28208 #if DB_VERSION_MAJOR == 1
28209 __db_version
28210 #endif
28211
28212 _ACEOF
28213 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28214   $EGREP "__db_version" >/dev/null 2>&1; then
28215   ol_cv_bdb_major=1
28216 else
28217   :
28218 fi
28219 rm -f conftest*
28220
28221         fi
28222
28223         if test $ol_cv_bdb_major = 0 ; then
28224                 { { echo "$as_me:$LINENO: error: Unknown Berkeley DB major version" >&5
28225 echo "$as_me: error: Unknown Berkeley DB major version" >&2;}
28226    { (exit 1); exit 1; }; }
28227         fi
28228
28229 fi
28230 echo "$as_me:$LINENO: result: $ol_cv_bdb_major" >&5
28231 echo "${ECHO_T}$ol_cv_bdb_major" >&6
28232
28233 echo "$as_me:$LINENO: checking for Berkeley DB minor version" >&5
28234 echo $ECHO_N "checking for Berkeley DB minor version... $ECHO_C" >&6
28235 if test "${ol_cv_bdb_minor+set}" = set; then
28236   echo $ECHO_N "(cached) $ECHO_C" >&6
28237 else
28238
28239         ol_cv_bdb_minor=0
28240         if test $ol_cv_bdb_minor = 0 ; then
28241                 cat >conftest.$ac_ext <<_ACEOF
28242 /* confdefs.h.  */
28243 _ACEOF
28244 cat confdefs.h >>conftest.$ac_ext
28245 cat >>conftest.$ac_ext <<_ACEOF
28246 /* end confdefs.h.  */
28247
28248 #include <db.h>
28249 #ifndef DB_VERSION_MINOR
28250 #       define DB_VERSION_MINOR 0
28251 #endif
28252 #if DB_VERSION_MINOR == 9
28253 __db_version
28254 #endif
28255
28256 _ACEOF
28257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28258   $EGREP "__db_version" >/dev/null 2>&1; then
28259   ol_cv_bdb_minor=9
28260 else
28261   :
28262 fi
28263 rm -f conftest*
28264
28265         fi
28266         if test $ol_cv_bdb_minor = 0 ; then
28267                 cat >conftest.$ac_ext <<_ACEOF
28268 /* confdefs.h.  */
28269 _ACEOF
28270 cat confdefs.h >>conftest.$ac_ext
28271 cat >>conftest.$ac_ext <<_ACEOF
28272 /* end confdefs.h.  */
28273
28274 #include <db.h>
28275 #ifndef DB_VERSION_MINOR
28276 #       define DB_VERSION_MINOR 0
28277 #endif
28278 #if DB_VERSION_MINOR == 8
28279 __db_version
28280 #endif
28281
28282 _ACEOF
28283 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28284   $EGREP "__db_version" >/dev/null 2>&1; then
28285   ol_cv_bdb_minor=8
28286 else
28287   :
28288 fi
28289 rm -f conftest*
28290
28291         fi
28292         if test $ol_cv_bdb_minor = 0 ; then
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 #include <db.h>
28301 #ifndef DB_VERSION_MINOR
28302 #       define DB_VERSION_MINOR 0
28303 #endif
28304 #if DB_VERSION_MINOR == 7
28305 __db_version
28306 #endif
28307
28308 _ACEOF
28309 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28310   $EGREP "__db_version" >/dev/null 2>&1; then
28311   ol_cv_bdb_minor=7
28312 else
28313   :
28314 fi
28315 rm -f conftest*
28316
28317         fi
28318         if test $ol_cv_bdb_minor = 0 ; then
28319                 cat >conftest.$ac_ext <<_ACEOF
28320 /* confdefs.h.  */
28321 _ACEOF
28322 cat confdefs.h >>conftest.$ac_ext
28323 cat >>conftest.$ac_ext <<_ACEOF
28324 /* end confdefs.h.  */
28325
28326 #include <db.h>
28327 #ifndef DB_VERSION_MINOR
28328 #       define DB_VERSION_MINOR 0
28329 #endif
28330 #if DB_VERSION_MINOR == 6
28331 __db_version
28332 #endif
28333
28334 _ACEOF
28335 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28336   $EGREP "__db_version" >/dev/null 2>&1; then
28337   ol_cv_bdb_minor=6
28338 else
28339   :
28340 fi
28341 rm -f conftest*
28342
28343         fi
28344         if test $ol_cv_bdb_minor = 0 ; then
28345                 cat >conftest.$ac_ext <<_ACEOF
28346 /* confdefs.h.  */
28347 _ACEOF
28348 cat confdefs.h >>conftest.$ac_ext
28349 cat >>conftest.$ac_ext <<_ACEOF
28350 /* end confdefs.h.  */
28351
28352 #include <db.h>
28353 #ifndef DB_VERSION_MINOR
28354 #       define DB_VERSION_MINOR 0
28355 #endif
28356 #if DB_VERSION_MINOR == 5
28357 __db_version
28358 #endif
28359
28360 _ACEOF
28361 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28362   $EGREP "__db_version" >/dev/null 2>&1; then
28363   ol_cv_bdb_minor=5
28364 else
28365   :
28366 fi
28367 rm -f conftest*
28368
28369         fi
28370         if test $ol_cv_bdb_minor = 0 ; then
28371                 cat >conftest.$ac_ext <<_ACEOF
28372 /* confdefs.h.  */
28373 _ACEOF
28374 cat confdefs.h >>conftest.$ac_ext
28375 cat >>conftest.$ac_ext <<_ACEOF
28376 /* end confdefs.h.  */
28377
28378 #include <db.h>
28379 #ifndef DB_VERSION_MINOR
28380 #       define DB_VERSION_MINOR 0
28381 #endif
28382 #if DB_VERSION_MINOR == 4
28383 __db_version
28384 #endif
28385
28386 _ACEOF
28387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28388   $EGREP "__db_version" >/dev/null 2>&1; then
28389   ol_cv_bdb_minor=4
28390 else
28391   :
28392 fi
28393 rm -f conftest*
28394
28395         fi
28396         if test $ol_cv_bdb_minor = 0 ; then
28397                 cat >conftest.$ac_ext <<_ACEOF
28398 /* confdefs.h.  */
28399 _ACEOF
28400 cat confdefs.h >>conftest.$ac_ext
28401 cat >>conftest.$ac_ext <<_ACEOF
28402 /* end confdefs.h.  */
28403
28404 #include <db.h>
28405 #ifndef DB_VERSION_MINOR
28406 #       define DB_VERSION_MINOR 0
28407 #endif
28408 #if DB_VERSION_MINOR == 3
28409 __db_version
28410 #endif
28411
28412 _ACEOF
28413 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28414   $EGREP "__db_version" >/dev/null 2>&1; then
28415   ol_cv_bdb_minor=3
28416 else
28417   :
28418 fi
28419 rm -f conftest*
28420
28421         fi
28422         if test $ol_cv_bdb_minor = 0 ; then
28423                 cat >conftest.$ac_ext <<_ACEOF
28424 /* confdefs.h.  */
28425 _ACEOF
28426 cat confdefs.h >>conftest.$ac_ext
28427 cat >>conftest.$ac_ext <<_ACEOF
28428 /* end confdefs.h.  */
28429
28430 #include <db.h>
28431 #ifndef DB_VERSION_MINOR
28432 #       define DB_VERSION_MINOR 0
28433 #endif
28434 #if DB_VERSION_MINOR == 2
28435 __db_version
28436 #endif
28437
28438 _ACEOF
28439 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28440   $EGREP "__db_version" >/dev/null 2>&1; then
28441   ol_cv_bdb_minor=2
28442 else
28443   :
28444 fi
28445 rm -f conftest*
28446
28447         fi
28448         if test $ol_cv_bdb_minor = 0 ; then
28449                 cat >conftest.$ac_ext <<_ACEOF
28450 /* confdefs.h.  */
28451 _ACEOF
28452 cat confdefs.h >>conftest.$ac_ext
28453 cat >>conftest.$ac_ext <<_ACEOF
28454 /* end confdefs.h.  */
28455
28456 #include <db.h>
28457 #ifndef DB_VERSION_MINOR
28458 #       define DB_VERSION_MINOR 0
28459 #endif
28460 #if DB_VERSION_MINOR == 1
28461 __db_version
28462 #endif
28463
28464 _ACEOF
28465 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28466   $EGREP "__db_version" >/dev/null 2>&1; then
28467   ol_cv_bdb_minor=1
28468 else
28469   :
28470 fi
28471 rm -f conftest*
28472
28473         fi
28474
28475 fi
28476 echo "$as_me:$LINENO: result: $ol_cv_bdb_minor" >&5
28477 echo "${ECHO_T}$ol_cv_bdb_minor" >&6
28478
28479 if test $ol_cv_bdb_major = 4 ; then
28480         if test $ol_cv_bdb_minor = 5 ; then
28481                 if test $ol_cv_lib_db = no ; then
28482         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb45)" >&5
28483 echo $ECHO_N "checking for Berkeley DB link (-ldb45)... $ECHO_C" >&6
28484 if test "${ol_cv_db_db45+set}" = set; then
28485   echo $ECHO_N "(cached) $ECHO_C" >&6
28486 else
28487
28488         ol_DB_LIB=-ldb45
28489         ol_LIBS=$LIBS
28490         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28491
28492         cat >conftest.$ac_ext <<_ACEOF
28493 /* confdefs.h.  */
28494 _ACEOF
28495 cat confdefs.h >>conftest.$ac_ext
28496 cat >>conftest.$ac_ext <<_ACEOF
28497 /* end confdefs.h.  */
28498
28499 #ifdef HAVE_DB_185_H
28500 # include <db_185.h>
28501 #else
28502 # include <db.h>
28503 #endif
28504
28505 #ifndef DB_VERSION_MAJOR
28506 # define DB_VERSION_MAJOR 1
28507 #endif
28508
28509 #ifndef NULL
28510 #define NULL ((void*)0)
28511 #endif
28512
28513 int
28514 main ()
28515 {
28516
28517 #if DB_VERSION_MAJOR > 1
28518         {
28519                 char *version;
28520                 int major, minor, patch;
28521
28522                 version = db_version( &major, &minor, &patch );
28523
28524                 if( major != DB_VERSION_MAJOR ||
28525                         minor < DB_VERSION_MINOR )
28526                 {
28527                         printf("Berkeley DB version mismatch\n"
28528                                 "\theader: %s\n\tlibrary: %s\n",
28529                                 DB_VERSION_STRING, version);
28530                         return 1;
28531                 }
28532         }
28533 #endif
28534
28535 #if DB_VERSION_MAJOR > 2
28536         db_env_create( NULL, 0 );
28537 #elif DB_VERSION_MAJOR > 1
28538         db_appexit( NULL );
28539 #else
28540         (void) dbopen( NULL, 0, 0, 0, NULL);
28541 #endif
28542
28543   ;
28544   return 0;
28545 }
28546 _ACEOF
28547 rm -f conftest.$ac_objext conftest$ac_exeext
28548 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28549   (eval $ac_link) 2>conftest.er1
28550   ac_status=$?
28551   grep -v '^ *+' conftest.er1 >conftest.err
28552   rm -f conftest.er1
28553   cat conftest.err >&5
28554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28555   (exit $ac_status); } &&
28556          { ac_try='test -z "$ac_c_werror_flag"
28557                          || test ! -s conftest.err'
28558   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28559   (eval $ac_try) 2>&5
28560   ac_status=$?
28561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28562   (exit $ac_status); }; } &&
28563          { ac_try='test -s conftest$ac_exeext'
28564   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28565   (eval $ac_try) 2>&5
28566   ac_status=$?
28567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28568   (exit $ac_status); }; }; then
28569   ol_cv_db_db45=yes
28570 else
28571   echo "$as_me: failed program was:" >&5
28572 sed 's/^/| /' conftest.$ac_ext >&5
28573
28574 ol_cv_db_db45=no
28575 fi
28576 rm -f conftest.err conftest.$ac_objext \
28577       conftest$ac_exeext conftest.$ac_ext
28578
28579         LIBS="$ol_LIBS"
28580
28581 fi
28582 echo "$as_me:$LINENO: result: $ol_cv_db_db45" >&5
28583 echo "${ECHO_T}$ol_cv_db_db45" >&6
28584
28585         if test $ol_cv_db_db45 = yes ; then
28586                 ol_cv_lib_db=-ldb45
28587         fi
28588 fi
28589
28590                 if test $ol_cv_lib_db = no ; then
28591         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-45)" >&5
28592 echo $ECHO_N "checking for Berkeley DB link (-ldb-45)... $ECHO_C" >&6
28593 if test "${ol_cv_db_db_45+set}" = set; then
28594   echo $ECHO_N "(cached) $ECHO_C" >&6
28595 else
28596
28597         ol_DB_LIB=-ldb-45
28598         ol_LIBS=$LIBS
28599         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28600
28601         cat >conftest.$ac_ext <<_ACEOF
28602 /* confdefs.h.  */
28603 _ACEOF
28604 cat confdefs.h >>conftest.$ac_ext
28605 cat >>conftest.$ac_ext <<_ACEOF
28606 /* end confdefs.h.  */
28607
28608 #ifdef HAVE_DB_185_H
28609 # include <db_185.h>
28610 #else
28611 # include <db.h>
28612 #endif
28613
28614 #ifndef DB_VERSION_MAJOR
28615 # define DB_VERSION_MAJOR 1
28616 #endif
28617
28618 #ifndef NULL
28619 #define NULL ((void*)0)
28620 #endif
28621
28622 int
28623 main ()
28624 {
28625
28626 #if DB_VERSION_MAJOR > 1
28627         {
28628                 char *version;
28629                 int major, minor, patch;
28630
28631                 version = db_version( &major, &minor, &patch );
28632
28633                 if( major != DB_VERSION_MAJOR ||
28634                         minor < DB_VERSION_MINOR )
28635                 {
28636                         printf("Berkeley DB version mismatch\n"
28637                                 "\theader: %s\n\tlibrary: %s\n",
28638                                 DB_VERSION_STRING, version);
28639                         return 1;
28640                 }
28641         }
28642 #endif
28643
28644 #if DB_VERSION_MAJOR > 2
28645         db_env_create( NULL, 0 );
28646 #elif DB_VERSION_MAJOR > 1
28647         db_appexit( NULL );
28648 #else
28649         (void) dbopen( NULL, 0, 0, 0, NULL);
28650 #endif
28651
28652   ;
28653   return 0;
28654 }
28655 _ACEOF
28656 rm -f conftest.$ac_objext conftest$ac_exeext
28657 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28658   (eval $ac_link) 2>conftest.er1
28659   ac_status=$?
28660   grep -v '^ *+' conftest.er1 >conftest.err
28661   rm -f conftest.er1
28662   cat conftest.err >&5
28663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28664   (exit $ac_status); } &&
28665          { ac_try='test -z "$ac_c_werror_flag"
28666                          || test ! -s conftest.err'
28667   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28668   (eval $ac_try) 2>&5
28669   ac_status=$?
28670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28671   (exit $ac_status); }; } &&
28672          { ac_try='test -s conftest$ac_exeext'
28673   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28674   (eval $ac_try) 2>&5
28675   ac_status=$?
28676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28677   (exit $ac_status); }; }; then
28678   ol_cv_db_db_45=yes
28679 else
28680   echo "$as_me: failed program was:" >&5
28681 sed 's/^/| /' conftest.$ac_ext >&5
28682
28683 ol_cv_db_db_45=no
28684 fi
28685 rm -f conftest.err conftest.$ac_objext \
28686       conftest$ac_exeext conftest.$ac_ext
28687
28688         LIBS="$ol_LIBS"
28689
28690 fi
28691 echo "$as_me:$LINENO: result: $ol_cv_db_db_45" >&5
28692 echo "${ECHO_T}$ol_cv_db_db_45" >&6
28693
28694         if test $ol_cv_db_db_45 = yes ; then
28695                 ol_cv_lib_db=-ldb-45
28696         fi
28697 fi
28698
28699                 if test $ol_cv_lib_db = no ; then
28700         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.5)" >&5
28701 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.5)... $ECHO_C" >&6
28702 if test "${ol_cv_db_db_4_dot_5+set}" = set; then
28703   echo $ECHO_N "(cached) $ECHO_C" >&6
28704 else
28705
28706         ol_DB_LIB=-ldb-4.5
28707         ol_LIBS=$LIBS
28708         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28709
28710         cat >conftest.$ac_ext <<_ACEOF
28711 /* confdefs.h.  */
28712 _ACEOF
28713 cat confdefs.h >>conftest.$ac_ext
28714 cat >>conftest.$ac_ext <<_ACEOF
28715 /* end confdefs.h.  */
28716
28717 #ifdef HAVE_DB_185_H
28718 # include <db_185.h>
28719 #else
28720 # include <db.h>
28721 #endif
28722
28723 #ifndef DB_VERSION_MAJOR
28724 # define DB_VERSION_MAJOR 1
28725 #endif
28726
28727 #ifndef NULL
28728 #define NULL ((void*)0)
28729 #endif
28730
28731 int
28732 main ()
28733 {
28734
28735 #if DB_VERSION_MAJOR > 1
28736         {
28737                 char *version;
28738                 int major, minor, patch;
28739
28740                 version = db_version( &major, &minor, &patch );
28741
28742                 if( major != DB_VERSION_MAJOR ||
28743                         minor < DB_VERSION_MINOR )
28744                 {
28745                         printf("Berkeley DB version mismatch\n"
28746                                 "\theader: %s\n\tlibrary: %s\n",
28747                                 DB_VERSION_STRING, version);
28748                         return 1;
28749                 }
28750         }
28751 #endif
28752
28753 #if DB_VERSION_MAJOR > 2
28754         db_env_create( NULL, 0 );
28755 #elif DB_VERSION_MAJOR > 1
28756         db_appexit( NULL );
28757 #else
28758         (void) dbopen( NULL, 0, 0, 0, NULL);
28759 #endif
28760
28761   ;
28762   return 0;
28763 }
28764 _ACEOF
28765 rm -f conftest.$ac_objext conftest$ac_exeext
28766 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28767   (eval $ac_link) 2>conftest.er1
28768   ac_status=$?
28769   grep -v '^ *+' conftest.er1 >conftest.err
28770   rm -f conftest.er1
28771   cat conftest.err >&5
28772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28773   (exit $ac_status); } &&
28774          { ac_try='test -z "$ac_c_werror_flag"
28775                          || test ! -s conftest.err'
28776   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28777   (eval $ac_try) 2>&5
28778   ac_status=$?
28779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28780   (exit $ac_status); }; } &&
28781          { ac_try='test -s conftest$ac_exeext'
28782   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28783   (eval $ac_try) 2>&5
28784   ac_status=$?
28785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28786   (exit $ac_status); }; }; then
28787   ol_cv_db_db_4_dot_5=yes
28788 else
28789   echo "$as_me: failed program was:" >&5
28790 sed 's/^/| /' conftest.$ac_ext >&5
28791
28792 ol_cv_db_db_4_dot_5=no
28793 fi
28794 rm -f conftest.err conftest.$ac_objext \
28795       conftest$ac_exeext conftest.$ac_ext
28796
28797         LIBS="$ol_LIBS"
28798
28799 fi
28800 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_5" >&5
28801 echo "${ECHO_T}$ol_cv_db_db_4_dot_5" >&6
28802
28803         if test $ol_cv_db_db_4_dot_5 = yes ; then
28804                 ol_cv_lib_db=-ldb-4.5
28805         fi
28806 fi
28807
28808                 if test $ol_cv_lib_db = no ; then
28809         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-5)" >&5
28810 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-5)... $ECHO_C" >&6
28811 if test "${ol_cv_db_db_4_5+set}" = set; then
28812   echo $ECHO_N "(cached) $ECHO_C" >&6
28813 else
28814
28815         ol_DB_LIB=-ldb-4-5
28816         ol_LIBS=$LIBS
28817         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28818
28819         cat >conftest.$ac_ext <<_ACEOF
28820 /* confdefs.h.  */
28821 _ACEOF
28822 cat confdefs.h >>conftest.$ac_ext
28823 cat >>conftest.$ac_ext <<_ACEOF
28824 /* end confdefs.h.  */
28825
28826 #ifdef HAVE_DB_185_H
28827 # include <db_185.h>
28828 #else
28829 # include <db.h>
28830 #endif
28831
28832 #ifndef DB_VERSION_MAJOR
28833 # define DB_VERSION_MAJOR 1
28834 #endif
28835
28836 #ifndef NULL
28837 #define NULL ((void*)0)
28838 #endif
28839
28840 int
28841 main ()
28842 {
28843
28844 #if DB_VERSION_MAJOR > 1
28845         {
28846                 char *version;
28847                 int major, minor, patch;
28848
28849                 version = db_version( &major, &minor, &patch );
28850
28851                 if( major != DB_VERSION_MAJOR ||
28852                         minor < DB_VERSION_MINOR )
28853                 {
28854                         printf("Berkeley DB version mismatch\n"
28855                                 "\theader: %s\n\tlibrary: %s\n",
28856                                 DB_VERSION_STRING, version);
28857                         return 1;
28858                 }
28859         }
28860 #endif
28861
28862 #if DB_VERSION_MAJOR > 2
28863         db_env_create( NULL, 0 );
28864 #elif DB_VERSION_MAJOR > 1
28865         db_appexit( NULL );
28866 #else
28867         (void) dbopen( NULL, 0, 0, 0, NULL);
28868 #endif
28869
28870   ;
28871   return 0;
28872 }
28873 _ACEOF
28874 rm -f conftest.$ac_objext conftest$ac_exeext
28875 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28876   (eval $ac_link) 2>conftest.er1
28877   ac_status=$?
28878   grep -v '^ *+' conftest.er1 >conftest.err
28879   rm -f conftest.er1
28880   cat conftest.err >&5
28881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28882   (exit $ac_status); } &&
28883          { ac_try='test -z "$ac_c_werror_flag"
28884                          || test ! -s conftest.err'
28885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28886   (eval $ac_try) 2>&5
28887   ac_status=$?
28888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28889   (exit $ac_status); }; } &&
28890          { ac_try='test -s conftest$ac_exeext'
28891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28892   (eval $ac_try) 2>&5
28893   ac_status=$?
28894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28895   (exit $ac_status); }; }; then
28896   ol_cv_db_db_4_5=yes
28897 else
28898   echo "$as_me: failed program was:" >&5
28899 sed 's/^/| /' conftest.$ac_ext >&5
28900
28901 ol_cv_db_db_4_5=no
28902 fi
28903 rm -f conftest.err conftest.$ac_objext \
28904       conftest$ac_exeext conftest.$ac_ext
28905
28906         LIBS="$ol_LIBS"
28907
28908 fi
28909 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_5" >&5
28910 echo "${ECHO_T}$ol_cv_db_db_4_5" >&6
28911
28912         if test $ol_cv_db_db_4_5 = yes ; then
28913                 ol_cv_lib_db=-ldb-4-5
28914         fi
28915 fi
28916
28917         elif test $ol_cv_bdb_minor = 4 ; then
28918                 if test $ol_cv_lib_db = no ; then
28919         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb44)" >&5
28920 echo $ECHO_N "checking for Berkeley DB link (-ldb44)... $ECHO_C" >&6
28921 if test "${ol_cv_db_db44+set}" = set; then
28922   echo $ECHO_N "(cached) $ECHO_C" >&6
28923 else
28924
28925         ol_DB_LIB=-ldb44
28926         ol_LIBS=$LIBS
28927         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28928
28929         cat >conftest.$ac_ext <<_ACEOF
28930 /* confdefs.h.  */
28931 _ACEOF
28932 cat confdefs.h >>conftest.$ac_ext
28933 cat >>conftest.$ac_ext <<_ACEOF
28934 /* end confdefs.h.  */
28935
28936 #ifdef HAVE_DB_185_H
28937 # include <db_185.h>
28938 #else
28939 # include <db.h>
28940 #endif
28941
28942 #ifndef DB_VERSION_MAJOR
28943 # define DB_VERSION_MAJOR 1
28944 #endif
28945
28946 #ifndef NULL
28947 #define NULL ((void*)0)
28948 #endif
28949
28950 int
28951 main ()
28952 {
28953
28954 #if DB_VERSION_MAJOR > 1
28955         {
28956                 char *version;
28957                 int major, minor, patch;
28958
28959                 version = db_version( &major, &minor, &patch );
28960
28961                 if( major != DB_VERSION_MAJOR ||
28962                         minor < DB_VERSION_MINOR )
28963                 {
28964                         printf("Berkeley DB version mismatch\n"
28965                                 "\theader: %s\n\tlibrary: %s\n",
28966                                 DB_VERSION_STRING, version);
28967                         return 1;
28968                 }
28969         }
28970 #endif
28971
28972 #if DB_VERSION_MAJOR > 2
28973         db_env_create( NULL, 0 );
28974 #elif DB_VERSION_MAJOR > 1
28975         db_appexit( NULL );
28976 #else
28977         (void) dbopen( NULL, 0, 0, 0, NULL);
28978 #endif
28979
28980   ;
28981   return 0;
28982 }
28983 _ACEOF
28984 rm -f conftest.$ac_objext conftest$ac_exeext
28985 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28986   (eval $ac_link) 2>conftest.er1
28987   ac_status=$?
28988   grep -v '^ *+' conftest.er1 >conftest.err
28989   rm -f conftest.er1
28990   cat conftest.err >&5
28991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28992   (exit $ac_status); } &&
28993          { ac_try='test -z "$ac_c_werror_flag"
28994                          || test ! -s conftest.err'
28995   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28996   (eval $ac_try) 2>&5
28997   ac_status=$?
28998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28999   (exit $ac_status); }; } &&
29000          { ac_try='test -s conftest$ac_exeext'
29001   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29002   (eval $ac_try) 2>&5
29003   ac_status=$?
29004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29005   (exit $ac_status); }; }; then
29006   ol_cv_db_db44=yes
29007 else
29008   echo "$as_me: failed program was:" >&5
29009 sed 's/^/| /' conftest.$ac_ext >&5
29010
29011 ol_cv_db_db44=no
29012 fi
29013 rm -f conftest.err conftest.$ac_objext \
29014       conftest$ac_exeext conftest.$ac_ext
29015
29016         LIBS="$ol_LIBS"
29017
29018 fi
29019 echo "$as_me:$LINENO: result: $ol_cv_db_db44" >&5
29020 echo "${ECHO_T}$ol_cv_db_db44" >&6
29021
29022         if test $ol_cv_db_db44 = yes ; then
29023                 ol_cv_lib_db=-ldb44
29024         fi
29025 fi
29026
29027                 if test $ol_cv_lib_db = no ; then
29028         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-44)" >&5
29029 echo $ECHO_N "checking for Berkeley DB link (-ldb-44)... $ECHO_C" >&6
29030 if test "${ol_cv_db_db_44+set}" = set; then
29031   echo $ECHO_N "(cached) $ECHO_C" >&6
29032 else
29033
29034         ol_DB_LIB=-ldb-44
29035         ol_LIBS=$LIBS
29036         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29037
29038         cat >conftest.$ac_ext <<_ACEOF
29039 /* confdefs.h.  */
29040 _ACEOF
29041 cat confdefs.h >>conftest.$ac_ext
29042 cat >>conftest.$ac_ext <<_ACEOF
29043 /* end confdefs.h.  */
29044
29045 #ifdef HAVE_DB_185_H
29046 # include <db_185.h>
29047 #else
29048 # include <db.h>
29049 #endif
29050
29051 #ifndef DB_VERSION_MAJOR
29052 # define DB_VERSION_MAJOR 1
29053 #endif
29054
29055 #ifndef NULL
29056 #define NULL ((void*)0)
29057 #endif
29058
29059 int
29060 main ()
29061 {
29062
29063 #if DB_VERSION_MAJOR > 1
29064         {
29065                 char *version;
29066                 int major, minor, patch;
29067
29068                 version = db_version( &major, &minor, &patch );
29069
29070                 if( major != DB_VERSION_MAJOR ||
29071                         minor < DB_VERSION_MINOR )
29072                 {
29073                         printf("Berkeley DB version mismatch\n"
29074                                 "\theader: %s\n\tlibrary: %s\n",
29075                                 DB_VERSION_STRING, version);
29076                         return 1;
29077                 }
29078         }
29079 #endif
29080
29081 #if DB_VERSION_MAJOR > 2
29082         db_env_create( NULL, 0 );
29083 #elif DB_VERSION_MAJOR > 1
29084         db_appexit( NULL );
29085 #else
29086         (void) dbopen( NULL, 0, 0, 0, NULL);
29087 #endif
29088
29089   ;
29090   return 0;
29091 }
29092 _ACEOF
29093 rm -f conftest.$ac_objext conftest$ac_exeext
29094 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29095   (eval $ac_link) 2>conftest.er1
29096   ac_status=$?
29097   grep -v '^ *+' conftest.er1 >conftest.err
29098   rm -f conftest.er1
29099   cat conftest.err >&5
29100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29101   (exit $ac_status); } &&
29102          { ac_try='test -z "$ac_c_werror_flag"
29103                          || test ! -s conftest.err'
29104   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29105   (eval $ac_try) 2>&5
29106   ac_status=$?
29107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29108   (exit $ac_status); }; } &&
29109          { ac_try='test -s conftest$ac_exeext'
29110   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29111   (eval $ac_try) 2>&5
29112   ac_status=$?
29113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29114   (exit $ac_status); }; }; then
29115   ol_cv_db_db_44=yes
29116 else
29117   echo "$as_me: failed program was:" >&5
29118 sed 's/^/| /' conftest.$ac_ext >&5
29119
29120 ol_cv_db_db_44=no
29121 fi
29122 rm -f conftest.err conftest.$ac_objext \
29123       conftest$ac_exeext conftest.$ac_ext
29124
29125         LIBS="$ol_LIBS"
29126
29127 fi
29128 echo "$as_me:$LINENO: result: $ol_cv_db_db_44" >&5
29129 echo "${ECHO_T}$ol_cv_db_db_44" >&6
29130
29131         if test $ol_cv_db_db_44 = yes ; then
29132                 ol_cv_lib_db=-ldb-44
29133         fi
29134 fi
29135
29136                 if test $ol_cv_lib_db = no ; then
29137         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.4)" >&5
29138 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.4)... $ECHO_C" >&6
29139 if test "${ol_cv_db_db_4_dot_4+set}" = set; then
29140   echo $ECHO_N "(cached) $ECHO_C" >&6
29141 else
29142
29143         ol_DB_LIB=-ldb-4.4
29144         ol_LIBS=$LIBS
29145         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29146
29147         cat >conftest.$ac_ext <<_ACEOF
29148 /* confdefs.h.  */
29149 _ACEOF
29150 cat confdefs.h >>conftest.$ac_ext
29151 cat >>conftest.$ac_ext <<_ACEOF
29152 /* end confdefs.h.  */
29153
29154 #ifdef HAVE_DB_185_H
29155 # include <db_185.h>
29156 #else
29157 # include <db.h>
29158 #endif
29159
29160 #ifndef DB_VERSION_MAJOR
29161 # define DB_VERSION_MAJOR 1
29162 #endif
29163
29164 #ifndef NULL
29165 #define NULL ((void*)0)
29166 #endif
29167
29168 int
29169 main ()
29170 {
29171
29172 #if DB_VERSION_MAJOR > 1
29173         {
29174                 char *version;
29175                 int major, minor, patch;
29176
29177                 version = db_version( &major, &minor, &patch );
29178
29179                 if( major != DB_VERSION_MAJOR ||
29180                         minor < DB_VERSION_MINOR )
29181                 {
29182                         printf("Berkeley DB version mismatch\n"
29183                                 "\theader: %s\n\tlibrary: %s\n",
29184                                 DB_VERSION_STRING, version);
29185                         return 1;
29186                 }
29187         }
29188 #endif
29189
29190 #if DB_VERSION_MAJOR > 2
29191         db_env_create( NULL, 0 );
29192 #elif DB_VERSION_MAJOR > 1
29193         db_appexit( NULL );
29194 #else
29195         (void) dbopen( NULL, 0, 0, 0, NULL);
29196 #endif
29197
29198   ;
29199   return 0;
29200 }
29201 _ACEOF
29202 rm -f conftest.$ac_objext conftest$ac_exeext
29203 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29204   (eval $ac_link) 2>conftest.er1
29205   ac_status=$?
29206   grep -v '^ *+' conftest.er1 >conftest.err
29207   rm -f conftest.er1
29208   cat conftest.err >&5
29209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29210   (exit $ac_status); } &&
29211          { ac_try='test -z "$ac_c_werror_flag"
29212                          || test ! -s conftest.err'
29213   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29214   (eval $ac_try) 2>&5
29215   ac_status=$?
29216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29217   (exit $ac_status); }; } &&
29218          { ac_try='test -s conftest$ac_exeext'
29219   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29220   (eval $ac_try) 2>&5
29221   ac_status=$?
29222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29223   (exit $ac_status); }; }; then
29224   ol_cv_db_db_4_dot_4=yes
29225 else
29226   echo "$as_me: failed program was:" >&5
29227 sed 's/^/| /' conftest.$ac_ext >&5
29228
29229 ol_cv_db_db_4_dot_4=no
29230 fi
29231 rm -f conftest.err conftest.$ac_objext \
29232       conftest$ac_exeext conftest.$ac_ext
29233
29234         LIBS="$ol_LIBS"
29235
29236 fi
29237 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_4" >&5
29238 echo "${ECHO_T}$ol_cv_db_db_4_dot_4" >&6
29239
29240         if test $ol_cv_db_db_4_dot_4 = yes ; then
29241                 ol_cv_lib_db=-ldb-4.4
29242         fi
29243 fi
29244
29245                 if test $ol_cv_lib_db = no ; then
29246         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-4)" >&5
29247 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-4)... $ECHO_C" >&6
29248 if test "${ol_cv_db_db_4_4+set}" = set; then
29249   echo $ECHO_N "(cached) $ECHO_C" >&6
29250 else
29251
29252         ol_DB_LIB=-ldb-4-4
29253         ol_LIBS=$LIBS
29254         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29255
29256         cat >conftest.$ac_ext <<_ACEOF
29257 /* confdefs.h.  */
29258 _ACEOF
29259 cat confdefs.h >>conftest.$ac_ext
29260 cat >>conftest.$ac_ext <<_ACEOF
29261 /* end confdefs.h.  */
29262
29263 #ifdef HAVE_DB_185_H
29264 # include <db_185.h>
29265 #else
29266 # include <db.h>
29267 #endif
29268
29269 #ifndef DB_VERSION_MAJOR
29270 # define DB_VERSION_MAJOR 1
29271 #endif
29272
29273 #ifndef NULL
29274 #define NULL ((void*)0)
29275 #endif
29276
29277 int
29278 main ()
29279 {
29280
29281 #if DB_VERSION_MAJOR > 1
29282         {
29283                 char *version;
29284                 int major, minor, patch;
29285
29286                 version = db_version( &major, &minor, &patch );
29287
29288                 if( major != DB_VERSION_MAJOR ||
29289                         minor < DB_VERSION_MINOR )
29290                 {
29291                         printf("Berkeley DB version mismatch\n"
29292                                 "\theader: %s\n\tlibrary: %s\n",
29293                                 DB_VERSION_STRING, version);
29294                         return 1;
29295                 }
29296         }
29297 #endif
29298
29299 #if DB_VERSION_MAJOR > 2
29300         db_env_create( NULL, 0 );
29301 #elif DB_VERSION_MAJOR > 1
29302         db_appexit( NULL );
29303 #else
29304         (void) dbopen( NULL, 0, 0, 0, NULL);
29305 #endif
29306
29307   ;
29308   return 0;
29309 }
29310 _ACEOF
29311 rm -f conftest.$ac_objext conftest$ac_exeext
29312 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29313   (eval $ac_link) 2>conftest.er1
29314   ac_status=$?
29315   grep -v '^ *+' conftest.er1 >conftest.err
29316   rm -f conftest.er1
29317   cat conftest.err >&5
29318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29319   (exit $ac_status); } &&
29320          { ac_try='test -z "$ac_c_werror_flag"
29321                          || test ! -s conftest.err'
29322   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29323   (eval $ac_try) 2>&5
29324   ac_status=$?
29325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29326   (exit $ac_status); }; } &&
29327          { ac_try='test -s conftest$ac_exeext'
29328   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29329   (eval $ac_try) 2>&5
29330   ac_status=$?
29331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29332   (exit $ac_status); }; }; then
29333   ol_cv_db_db_4_4=yes
29334 else
29335   echo "$as_me: failed program was:" >&5
29336 sed 's/^/| /' conftest.$ac_ext >&5
29337
29338 ol_cv_db_db_4_4=no
29339 fi
29340 rm -f conftest.err conftest.$ac_objext \
29341       conftest$ac_exeext conftest.$ac_ext
29342
29343         LIBS="$ol_LIBS"
29344
29345 fi
29346 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_4" >&5
29347 echo "${ECHO_T}$ol_cv_db_db_4_4" >&6
29348
29349         if test $ol_cv_db_db_4_4 = yes ; then
29350                 ol_cv_lib_db=-ldb-4-4
29351         fi
29352 fi
29353
29354         elif test $ol_cv_bdb_minor = 3 ; then
29355                 if test $ol_cv_lib_db = no ; then
29356         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb43)" >&5
29357 echo $ECHO_N "checking for Berkeley DB link (-ldb43)... $ECHO_C" >&6
29358 if test "${ol_cv_db_db43+set}" = set; then
29359   echo $ECHO_N "(cached) $ECHO_C" >&6
29360 else
29361
29362         ol_DB_LIB=-ldb43
29363         ol_LIBS=$LIBS
29364         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29365
29366         cat >conftest.$ac_ext <<_ACEOF
29367 /* confdefs.h.  */
29368 _ACEOF
29369 cat confdefs.h >>conftest.$ac_ext
29370 cat >>conftest.$ac_ext <<_ACEOF
29371 /* end confdefs.h.  */
29372
29373 #ifdef HAVE_DB_185_H
29374 # include <db_185.h>
29375 #else
29376 # include <db.h>
29377 #endif
29378
29379 #ifndef DB_VERSION_MAJOR
29380 # define DB_VERSION_MAJOR 1
29381 #endif
29382
29383 #ifndef NULL
29384 #define NULL ((void*)0)
29385 #endif
29386
29387 int
29388 main ()
29389 {
29390
29391 #if DB_VERSION_MAJOR > 1
29392         {
29393                 char *version;
29394                 int major, minor, patch;
29395
29396                 version = db_version( &major, &minor, &patch );
29397
29398                 if( major != DB_VERSION_MAJOR ||
29399                         minor < DB_VERSION_MINOR )
29400                 {
29401                         printf("Berkeley DB version mismatch\n"
29402                                 "\theader: %s\n\tlibrary: %s\n",
29403                                 DB_VERSION_STRING, version);
29404                         return 1;
29405                 }
29406         }
29407 #endif
29408
29409 #if DB_VERSION_MAJOR > 2
29410         db_env_create( NULL, 0 );
29411 #elif DB_VERSION_MAJOR > 1
29412         db_appexit( NULL );
29413 #else
29414         (void) dbopen( NULL, 0, 0, 0, NULL);
29415 #endif
29416
29417   ;
29418   return 0;
29419 }
29420 _ACEOF
29421 rm -f conftest.$ac_objext conftest$ac_exeext
29422 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29423   (eval $ac_link) 2>conftest.er1
29424   ac_status=$?
29425   grep -v '^ *+' conftest.er1 >conftest.err
29426   rm -f conftest.er1
29427   cat conftest.err >&5
29428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29429   (exit $ac_status); } &&
29430          { ac_try='test -z "$ac_c_werror_flag"
29431                          || test ! -s conftest.err'
29432   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29433   (eval $ac_try) 2>&5
29434   ac_status=$?
29435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29436   (exit $ac_status); }; } &&
29437          { ac_try='test -s conftest$ac_exeext'
29438   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29439   (eval $ac_try) 2>&5
29440   ac_status=$?
29441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29442   (exit $ac_status); }; }; then
29443   ol_cv_db_db43=yes
29444 else
29445   echo "$as_me: failed program was:" >&5
29446 sed 's/^/| /' conftest.$ac_ext >&5
29447
29448 ol_cv_db_db43=no
29449 fi
29450 rm -f conftest.err conftest.$ac_objext \
29451       conftest$ac_exeext conftest.$ac_ext
29452
29453         LIBS="$ol_LIBS"
29454
29455 fi
29456 echo "$as_me:$LINENO: result: $ol_cv_db_db43" >&5
29457 echo "${ECHO_T}$ol_cv_db_db43" >&6
29458
29459         if test $ol_cv_db_db43 = yes ; then
29460                 ol_cv_lib_db=-ldb43
29461         fi
29462 fi
29463
29464                 if test $ol_cv_lib_db = no ; then
29465         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-43)" >&5
29466 echo $ECHO_N "checking for Berkeley DB link (-ldb-43)... $ECHO_C" >&6
29467 if test "${ol_cv_db_db_43+set}" = set; then
29468   echo $ECHO_N "(cached) $ECHO_C" >&6
29469 else
29470
29471         ol_DB_LIB=-ldb-43
29472         ol_LIBS=$LIBS
29473         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29474
29475         cat >conftest.$ac_ext <<_ACEOF
29476 /* confdefs.h.  */
29477 _ACEOF
29478 cat confdefs.h >>conftest.$ac_ext
29479 cat >>conftest.$ac_ext <<_ACEOF
29480 /* end confdefs.h.  */
29481
29482 #ifdef HAVE_DB_185_H
29483 # include <db_185.h>
29484 #else
29485 # include <db.h>
29486 #endif
29487
29488 #ifndef DB_VERSION_MAJOR
29489 # define DB_VERSION_MAJOR 1
29490 #endif
29491
29492 #ifndef NULL
29493 #define NULL ((void*)0)
29494 #endif
29495
29496 int
29497 main ()
29498 {
29499
29500 #if DB_VERSION_MAJOR > 1
29501         {
29502                 char *version;
29503                 int major, minor, patch;
29504
29505                 version = db_version( &major, &minor, &patch );
29506
29507                 if( major != DB_VERSION_MAJOR ||
29508                         minor < DB_VERSION_MINOR )
29509                 {
29510                         printf("Berkeley DB version mismatch\n"
29511                                 "\theader: %s\n\tlibrary: %s\n",
29512                                 DB_VERSION_STRING, version);
29513                         return 1;
29514                 }
29515         }
29516 #endif
29517
29518 #if DB_VERSION_MAJOR > 2
29519         db_env_create( NULL, 0 );
29520 #elif DB_VERSION_MAJOR > 1
29521         db_appexit( NULL );
29522 #else
29523         (void) dbopen( NULL, 0, 0, 0, NULL);
29524 #endif
29525
29526   ;
29527   return 0;
29528 }
29529 _ACEOF
29530 rm -f conftest.$ac_objext conftest$ac_exeext
29531 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29532   (eval $ac_link) 2>conftest.er1
29533   ac_status=$?
29534   grep -v '^ *+' conftest.er1 >conftest.err
29535   rm -f conftest.er1
29536   cat conftest.err >&5
29537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29538   (exit $ac_status); } &&
29539          { ac_try='test -z "$ac_c_werror_flag"
29540                          || test ! -s conftest.err'
29541   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29542   (eval $ac_try) 2>&5
29543   ac_status=$?
29544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29545   (exit $ac_status); }; } &&
29546          { ac_try='test -s conftest$ac_exeext'
29547   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29548   (eval $ac_try) 2>&5
29549   ac_status=$?
29550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29551   (exit $ac_status); }; }; then
29552   ol_cv_db_db_43=yes
29553 else
29554   echo "$as_me: failed program was:" >&5
29555 sed 's/^/| /' conftest.$ac_ext >&5
29556
29557 ol_cv_db_db_43=no
29558 fi
29559 rm -f conftest.err conftest.$ac_objext \
29560       conftest$ac_exeext conftest.$ac_ext
29561
29562         LIBS="$ol_LIBS"
29563
29564 fi
29565 echo "$as_me:$LINENO: result: $ol_cv_db_db_43" >&5
29566 echo "${ECHO_T}$ol_cv_db_db_43" >&6
29567
29568         if test $ol_cv_db_db_43 = yes ; then
29569                 ol_cv_lib_db=-ldb-43
29570         fi
29571 fi
29572
29573                 if test $ol_cv_lib_db = no ; then
29574         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.3)" >&5
29575 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.3)... $ECHO_C" >&6
29576 if test "${ol_cv_db_db_4_dot_3+set}" = set; then
29577   echo $ECHO_N "(cached) $ECHO_C" >&6
29578 else
29579
29580         ol_DB_LIB=-ldb-4.3
29581         ol_LIBS=$LIBS
29582         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29583
29584         cat >conftest.$ac_ext <<_ACEOF
29585 /* confdefs.h.  */
29586 _ACEOF
29587 cat confdefs.h >>conftest.$ac_ext
29588 cat >>conftest.$ac_ext <<_ACEOF
29589 /* end confdefs.h.  */
29590
29591 #ifdef HAVE_DB_185_H
29592 # include <db_185.h>
29593 #else
29594 # include <db.h>
29595 #endif
29596
29597 #ifndef DB_VERSION_MAJOR
29598 # define DB_VERSION_MAJOR 1
29599 #endif
29600
29601 #ifndef NULL
29602 #define NULL ((void*)0)
29603 #endif
29604
29605 int
29606 main ()
29607 {
29608
29609 #if DB_VERSION_MAJOR > 1
29610         {
29611                 char *version;
29612                 int major, minor, patch;
29613
29614                 version = db_version( &major, &minor, &patch );
29615
29616                 if( major != DB_VERSION_MAJOR ||
29617                         minor < DB_VERSION_MINOR )
29618                 {
29619                         printf("Berkeley DB version mismatch\n"
29620                                 "\theader: %s\n\tlibrary: %s\n",
29621                                 DB_VERSION_STRING, version);
29622                         return 1;
29623                 }
29624         }
29625 #endif
29626
29627 #if DB_VERSION_MAJOR > 2
29628         db_env_create( NULL, 0 );
29629 #elif DB_VERSION_MAJOR > 1
29630         db_appexit( NULL );
29631 #else
29632         (void) dbopen( NULL, 0, 0, 0, NULL);
29633 #endif
29634
29635   ;
29636   return 0;
29637 }
29638 _ACEOF
29639 rm -f conftest.$ac_objext conftest$ac_exeext
29640 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29641   (eval $ac_link) 2>conftest.er1
29642   ac_status=$?
29643   grep -v '^ *+' conftest.er1 >conftest.err
29644   rm -f conftest.er1
29645   cat conftest.err >&5
29646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29647   (exit $ac_status); } &&
29648          { ac_try='test -z "$ac_c_werror_flag"
29649                          || test ! -s conftest.err'
29650   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29651   (eval $ac_try) 2>&5
29652   ac_status=$?
29653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29654   (exit $ac_status); }; } &&
29655          { ac_try='test -s conftest$ac_exeext'
29656   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29657   (eval $ac_try) 2>&5
29658   ac_status=$?
29659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29660   (exit $ac_status); }; }; then
29661   ol_cv_db_db_4_dot_3=yes
29662 else
29663   echo "$as_me: failed program was:" >&5
29664 sed 's/^/| /' conftest.$ac_ext >&5
29665
29666 ol_cv_db_db_4_dot_3=no
29667 fi
29668 rm -f conftest.err conftest.$ac_objext \
29669       conftest$ac_exeext conftest.$ac_ext
29670
29671         LIBS="$ol_LIBS"
29672
29673 fi
29674 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_3" >&5
29675 echo "${ECHO_T}$ol_cv_db_db_4_dot_3" >&6
29676
29677         if test $ol_cv_db_db_4_dot_3 = yes ; then
29678                 ol_cv_lib_db=-ldb-4.3
29679         fi
29680 fi
29681
29682                 if test $ol_cv_lib_db = no ; then
29683         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-3)" >&5
29684 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-3)... $ECHO_C" >&6
29685 if test "${ol_cv_db_db_4_3+set}" = set; then
29686   echo $ECHO_N "(cached) $ECHO_C" >&6
29687 else
29688
29689         ol_DB_LIB=-ldb-4-3
29690         ol_LIBS=$LIBS
29691         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29692
29693         cat >conftest.$ac_ext <<_ACEOF
29694 /* confdefs.h.  */
29695 _ACEOF
29696 cat confdefs.h >>conftest.$ac_ext
29697 cat >>conftest.$ac_ext <<_ACEOF
29698 /* end confdefs.h.  */
29699
29700 #ifdef HAVE_DB_185_H
29701 # include <db_185.h>
29702 #else
29703 # include <db.h>
29704 #endif
29705
29706 #ifndef DB_VERSION_MAJOR
29707 # define DB_VERSION_MAJOR 1
29708 #endif
29709
29710 #ifndef NULL
29711 #define NULL ((void*)0)
29712 #endif
29713
29714 int
29715 main ()
29716 {
29717
29718 #if DB_VERSION_MAJOR > 1
29719         {
29720                 char *version;
29721                 int major, minor, patch;
29722
29723                 version = db_version( &major, &minor, &patch );
29724
29725                 if( major != DB_VERSION_MAJOR ||
29726                         minor < DB_VERSION_MINOR )
29727                 {
29728                         printf("Berkeley DB version mismatch\n"
29729                                 "\theader: %s\n\tlibrary: %s\n",
29730                                 DB_VERSION_STRING, version);
29731                         return 1;
29732                 }
29733         }
29734 #endif
29735
29736 #if DB_VERSION_MAJOR > 2
29737         db_env_create( NULL, 0 );
29738 #elif DB_VERSION_MAJOR > 1
29739         db_appexit( NULL );
29740 #else
29741         (void) dbopen( NULL, 0, 0, 0, NULL);
29742 #endif
29743
29744   ;
29745   return 0;
29746 }
29747 _ACEOF
29748 rm -f conftest.$ac_objext conftest$ac_exeext
29749 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29750   (eval $ac_link) 2>conftest.er1
29751   ac_status=$?
29752   grep -v '^ *+' conftest.er1 >conftest.err
29753   rm -f conftest.er1
29754   cat conftest.err >&5
29755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29756   (exit $ac_status); } &&
29757          { ac_try='test -z "$ac_c_werror_flag"
29758                          || test ! -s conftest.err'
29759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29760   (eval $ac_try) 2>&5
29761   ac_status=$?
29762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29763   (exit $ac_status); }; } &&
29764          { ac_try='test -s conftest$ac_exeext'
29765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29766   (eval $ac_try) 2>&5
29767   ac_status=$?
29768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29769   (exit $ac_status); }; }; then
29770   ol_cv_db_db_4_3=yes
29771 else
29772   echo "$as_me: failed program was:" >&5
29773 sed 's/^/| /' conftest.$ac_ext >&5
29774
29775 ol_cv_db_db_4_3=no
29776 fi
29777 rm -f conftest.err conftest.$ac_objext \
29778       conftest$ac_exeext conftest.$ac_ext
29779
29780         LIBS="$ol_LIBS"
29781
29782 fi
29783 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_3" >&5
29784 echo "${ECHO_T}$ol_cv_db_db_4_3" >&6
29785
29786         if test $ol_cv_db_db_4_3 = yes ; then
29787                 ol_cv_lib_db=-ldb-4-3
29788         fi
29789 fi
29790
29791         elif test $ol_cv_bdb_minor = 2 ; then
29792                 if test $ol_cv_lib_db = no ; then
29793         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb42)" >&5
29794 echo $ECHO_N "checking for Berkeley DB link (-ldb42)... $ECHO_C" >&6
29795 if test "${ol_cv_db_db42+set}" = set; then
29796   echo $ECHO_N "(cached) $ECHO_C" >&6
29797 else
29798
29799         ol_DB_LIB=-ldb42
29800         ol_LIBS=$LIBS
29801         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29802
29803         cat >conftest.$ac_ext <<_ACEOF
29804 /* confdefs.h.  */
29805 _ACEOF
29806 cat confdefs.h >>conftest.$ac_ext
29807 cat >>conftest.$ac_ext <<_ACEOF
29808 /* end confdefs.h.  */
29809
29810 #ifdef HAVE_DB_185_H
29811 # include <db_185.h>
29812 #else
29813 # include <db.h>
29814 #endif
29815
29816 #ifndef DB_VERSION_MAJOR
29817 # define DB_VERSION_MAJOR 1
29818 #endif
29819
29820 #ifndef NULL
29821 #define NULL ((void*)0)
29822 #endif
29823
29824 int
29825 main ()
29826 {
29827
29828 #if DB_VERSION_MAJOR > 1
29829         {
29830                 char *version;
29831                 int major, minor, patch;
29832
29833                 version = db_version( &major, &minor, &patch );
29834
29835                 if( major != DB_VERSION_MAJOR ||
29836                         minor < DB_VERSION_MINOR )
29837                 {
29838                         printf("Berkeley DB version mismatch\n"
29839                                 "\theader: %s\n\tlibrary: %s\n",
29840                                 DB_VERSION_STRING, version);
29841                         return 1;
29842                 }
29843         }
29844 #endif
29845
29846 #if DB_VERSION_MAJOR > 2
29847         db_env_create( NULL, 0 );
29848 #elif DB_VERSION_MAJOR > 1
29849         db_appexit( NULL );
29850 #else
29851         (void) dbopen( NULL, 0, 0, 0, NULL);
29852 #endif
29853
29854   ;
29855   return 0;
29856 }
29857 _ACEOF
29858 rm -f conftest.$ac_objext conftest$ac_exeext
29859 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29860   (eval $ac_link) 2>conftest.er1
29861   ac_status=$?
29862   grep -v '^ *+' conftest.er1 >conftest.err
29863   rm -f conftest.er1
29864   cat conftest.err >&5
29865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29866   (exit $ac_status); } &&
29867          { ac_try='test -z "$ac_c_werror_flag"
29868                          || test ! -s conftest.err'
29869   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29870   (eval $ac_try) 2>&5
29871   ac_status=$?
29872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29873   (exit $ac_status); }; } &&
29874          { ac_try='test -s conftest$ac_exeext'
29875   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29876   (eval $ac_try) 2>&5
29877   ac_status=$?
29878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29879   (exit $ac_status); }; }; then
29880   ol_cv_db_db42=yes
29881 else
29882   echo "$as_me: failed program was:" >&5
29883 sed 's/^/| /' conftest.$ac_ext >&5
29884
29885 ol_cv_db_db42=no
29886 fi
29887 rm -f conftest.err conftest.$ac_objext \
29888       conftest$ac_exeext conftest.$ac_ext
29889
29890         LIBS="$ol_LIBS"
29891
29892 fi
29893 echo "$as_me:$LINENO: result: $ol_cv_db_db42" >&5
29894 echo "${ECHO_T}$ol_cv_db_db42" >&6
29895
29896         if test $ol_cv_db_db42 = yes ; then
29897                 ol_cv_lib_db=-ldb42
29898         fi
29899 fi
29900
29901                 if test $ol_cv_lib_db = no ; then
29902         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-42)" >&5
29903 echo $ECHO_N "checking for Berkeley DB link (-ldb-42)... $ECHO_C" >&6
29904 if test "${ol_cv_db_db_42+set}" = set; then
29905   echo $ECHO_N "(cached) $ECHO_C" >&6
29906 else
29907
29908         ol_DB_LIB=-ldb-42
29909         ol_LIBS=$LIBS
29910         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29911
29912         cat >conftest.$ac_ext <<_ACEOF
29913 /* confdefs.h.  */
29914 _ACEOF
29915 cat confdefs.h >>conftest.$ac_ext
29916 cat >>conftest.$ac_ext <<_ACEOF
29917 /* end confdefs.h.  */
29918
29919 #ifdef HAVE_DB_185_H
29920 # include <db_185.h>
29921 #else
29922 # include <db.h>
29923 #endif
29924
29925 #ifndef DB_VERSION_MAJOR
29926 # define DB_VERSION_MAJOR 1
29927 #endif
29928
29929 #ifndef NULL
29930 #define NULL ((void*)0)
29931 #endif
29932
29933 int
29934 main ()
29935 {
29936
29937 #if DB_VERSION_MAJOR > 1
29938         {
29939                 char *version;
29940                 int major, minor, patch;
29941
29942                 version = db_version( &major, &minor, &patch );
29943
29944                 if( major != DB_VERSION_MAJOR ||
29945                         minor < DB_VERSION_MINOR )
29946                 {
29947                         printf("Berkeley DB version mismatch\n"
29948                                 "\theader: %s\n\tlibrary: %s\n",
29949                                 DB_VERSION_STRING, version);
29950                         return 1;
29951                 }
29952         }
29953 #endif
29954
29955 #if DB_VERSION_MAJOR > 2
29956         db_env_create( NULL, 0 );
29957 #elif DB_VERSION_MAJOR > 1
29958         db_appexit( NULL );
29959 #else
29960         (void) dbopen( NULL, 0, 0, 0, NULL);
29961 #endif
29962
29963   ;
29964   return 0;
29965 }
29966 _ACEOF
29967 rm -f conftest.$ac_objext conftest$ac_exeext
29968 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29969   (eval $ac_link) 2>conftest.er1
29970   ac_status=$?
29971   grep -v '^ *+' conftest.er1 >conftest.err
29972   rm -f conftest.er1
29973   cat conftest.err >&5
29974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29975   (exit $ac_status); } &&
29976          { ac_try='test -z "$ac_c_werror_flag"
29977                          || test ! -s conftest.err'
29978   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29979   (eval $ac_try) 2>&5
29980   ac_status=$?
29981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29982   (exit $ac_status); }; } &&
29983          { ac_try='test -s conftest$ac_exeext'
29984   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29985   (eval $ac_try) 2>&5
29986   ac_status=$?
29987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29988   (exit $ac_status); }; }; then
29989   ol_cv_db_db_42=yes
29990 else
29991   echo "$as_me: failed program was:" >&5
29992 sed 's/^/| /' conftest.$ac_ext >&5
29993
29994 ol_cv_db_db_42=no
29995 fi
29996 rm -f conftest.err conftest.$ac_objext \
29997       conftest$ac_exeext conftest.$ac_ext
29998
29999         LIBS="$ol_LIBS"
30000
30001 fi
30002 echo "$as_me:$LINENO: result: $ol_cv_db_db_42" >&5
30003 echo "${ECHO_T}$ol_cv_db_db_42" >&6
30004
30005         if test $ol_cv_db_db_42 = yes ; then
30006                 ol_cv_lib_db=-ldb-42
30007         fi
30008 fi
30009
30010                 if test $ol_cv_lib_db = no ; then
30011         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.2)" >&5
30012 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.2)... $ECHO_C" >&6
30013 if test "${ol_cv_db_db_4_dot_2+set}" = set; then
30014   echo $ECHO_N "(cached) $ECHO_C" >&6
30015 else
30016
30017         ol_DB_LIB=-ldb-4.2
30018         ol_LIBS=$LIBS
30019         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30020
30021         cat >conftest.$ac_ext <<_ACEOF
30022 /* confdefs.h.  */
30023 _ACEOF
30024 cat confdefs.h >>conftest.$ac_ext
30025 cat >>conftest.$ac_ext <<_ACEOF
30026 /* end confdefs.h.  */
30027
30028 #ifdef HAVE_DB_185_H
30029 # include <db_185.h>
30030 #else
30031 # include <db.h>
30032 #endif
30033
30034 #ifndef DB_VERSION_MAJOR
30035 # define DB_VERSION_MAJOR 1
30036 #endif
30037
30038 #ifndef NULL
30039 #define NULL ((void*)0)
30040 #endif
30041
30042 int
30043 main ()
30044 {
30045
30046 #if DB_VERSION_MAJOR > 1
30047         {
30048                 char *version;
30049                 int major, minor, patch;
30050
30051                 version = db_version( &major, &minor, &patch );
30052
30053                 if( major != DB_VERSION_MAJOR ||
30054                         minor < DB_VERSION_MINOR )
30055                 {
30056                         printf("Berkeley DB version mismatch\n"
30057                                 "\theader: %s\n\tlibrary: %s\n",
30058                                 DB_VERSION_STRING, version);
30059                         return 1;
30060                 }
30061         }
30062 #endif
30063
30064 #if DB_VERSION_MAJOR > 2
30065         db_env_create( NULL, 0 );
30066 #elif DB_VERSION_MAJOR > 1
30067         db_appexit( NULL );
30068 #else
30069         (void) dbopen( NULL, 0, 0, 0, NULL);
30070 #endif
30071
30072   ;
30073   return 0;
30074 }
30075 _ACEOF
30076 rm -f conftest.$ac_objext conftest$ac_exeext
30077 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30078   (eval $ac_link) 2>conftest.er1
30079   ac_status=$?
30080   grep -v '^ *+' conftest.er1 >conftest.err
30081   rm -f conftest.er1
30082   cat conftest.err >&5
30083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30084   (exit $ac_status); } &&
30085          { ac_try='test -z "$ac_c_werror_flag"
30086                          || test ! -s conftest.err'
30087   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30088   (eval $ac_try) 2>&5
30089   ac_status=$?
30090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30091   (exit $ac_status); }; } &&
30092          { ac_try='test -s conftest$ac_exeext'
30093   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30094   (eval $ac_try) 2>&5
30095   ac_status=$?
30096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30097   (exit $ac_status); }; }; then
30098   ol_cv_db_db_4_dot_2=yes
30099 else
30100   echo "$as_me: failed program was:" >&5
30101 sed 's/^/| /' conftest.$ac_ext >&5
30102
30103 ol_cv_db_db_4_dot_2=no
30104 fi
30105 rm -f conftest.err conftest.$ac_objext \
30106       conftest$ac_exeext conftest.$ac_ext
30107
30108         LIBS="$ol_LIBS"
30109
30110 fi
30111 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_2" >&5
30112 echo "${ECHO_T}$ol_cv_db_db_4_dot_2" >&6
30113
30114         if test $ol_cv_db_db_4_dot_2 = yes ; then
30115                 ol_cv_lib_db=-ldb-4.2
30116         fi
30117 fi
30118
30119                 if test $ol_cv_lib_db = no ; then
30120         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-2)" >&5
30121 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-2)... $ECHO_C" >&6
30122 if test "${ol_cv_db_db_4_2+set}" = set; then
30123   echo $ECHO_N "(cached) $ECHO_C" >&6
30124 else
30125
30126         ol_DB_LIB=-ldb-4-2
30127         ol_LIBS=$LIBS
30128         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30129
30130         cat >conftest.$ac_ext <<_ACEOF
30131 /* confdefs.h.  */
30132 _ACEOF
30133 cat confdefs.h >>conftest.$ac_ext
30134 cat >>conftest.$ac_ext <<_ACEOF
30135 /* end confdefs.h.  */
30136
30137 #ifdef HAVE_DB_185_H
30138 # include <db_185.h>
30139 #else
30140 # include <db.h>
30141 #endif
30142
30143 #ifndef DB_VERSION_MAJOR
30144 # define DB_VERSION_MAJOR 1
30145 #endif
30146
30147 #ifndef NULL
30148 #define NULL ((void*)0)
30149 #endif
30150
30151 int
30152 main ()
30153 {
30154
30155 #if DB_VERSION_MAJOR > 1
30156         {
30157                 char *version;
30158                 int major, minor, patch;
30159
30160                 version = db_version( &major, &minor, &patch );
30161
30162                 if( major != DB_VERSION_MAJOR ||
30163                         minor < DB_VERSION_MINOR )
30164                 {
30165                         printf("Berkeley DB version mismatch\n"
30166                                 "\theader: %s\n\tlibrary: %s\n",
30167                                 DB_VERSION_STRING, version);
30168                         return 1;
30169                 }
30170         }
30171 #endif
30172
30173 #if DB_VERSION_MAJOR > 2
30174         db_env_create( NULL, 0 );
30175 #elif DB_VERSION_MAJOR > 1
30176         db_appexit( NULL );
30177 #else
30178         (void) dbopen( NULL, 0, 0, 0, NULL);
30179 #endif
30180
30181   ;
30182   return 0;
30183 }
30184 _ACEOF
30185 rm -f conftest.$ac_objext conftest$ac_exeext
30186 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30187   (eval $ac_link) 2>conftest.er1
30188   ac_status=$?
30189   grep -v '^ *+' conftest.er1 >conftest.err
30190   rm -f conftest.er1
30191   cat conftest.err >&5
30192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30193   (exit $ac_status); } &&
30194          { ac_try='test -z "$ac_c_werror_flag"
30195                          || test ! -s conftest.err'
30196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30197   (eval $ac_try) 2>&5
30198   ac_status=$?
30199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30200   (exit $ac_status); }; } &&
30201          { ac_try='test -s conftest$ac_exeext'
30202   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30203   (eval $ac_try) 2>&5
30204   ac_status=$?
30205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30206   (exit $ac_status); }; }; then
30207   ol_cv_db_db_4_2=yes
30208 else
30209   echo "$as_me: failed program was:" >&5
30210 sed 's/^/| /' conftest.$ac_ext >&5
30211
30212 ol_cv_db_db_4_2=no
30213 fi
30214 rm -f conftest.err conftest.$ac_objext \
30215       conftest$ac_exeext conftest.$ac_ext
30216
30217         LIBS="$ol_LIBS"
30218
30219 fi
30220 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_2" >&5
30221 echo "${ECHO_T}$ol_cv_db_db_4_2" >&6
30222
30223         if test $ol_cv_db_db_4_2 = yes ; then
30224                 ol_cv_lib_db=-ldb-4-2
30225         fi
30226 fi
30227
30228         elif test $ol_cv_bdb_minor = 1 ; then
30229                 if test $ol_cv_lib_db = no ; then
30230         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb41)" >&5
30231 echo $ECHO_N "checking for Berkeley DB link (-ldb41)... $ECHO_C" >&6
30232 if test "${ol_cv_db_db41+set}" = set; then
30233   echo $ECHO_N "(cached) $ECHO_C" >&6
30234 else
30235
30236         ol_DB_LIB=-ldb41
30237         ol_LIBS=$LIBS
30238         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30239
30240         cat >conftest.$ac_ext <<_ACEOF
30241 /* confdefs.h.  */
30242 _ACEOF
30243 cat confdefs.h >>conftest.$ac_ext
30244 cat >>conftest.$ac_ext <<_ACEOF
30245 /* end confdefs.h.  */
30246
30247 #ifdef HAVE_DB_185_H
30248 # include <db_185.h>
30249 #else
30250 # include <db.h>
30251 #endif
30252
30253 #ifndef DB_VERSION_MAJOR
30254 # define DB_VERSION_MAJOR 1
30255 #endif
30256
30257 #ifndef NULL
30258 #define NULL ((void*)0)
30259 #endif
30260
30261 int
30262 main ()
30263 {
30264
30265 #if DB_VERSION_MAJOR > 1
30266         {
30267                 char *version;
30268                 int major, minor, patch;
30269
30270                 version = db_version( &major, &minor, &patch );
30271
30272                 if( major != DB_VERSION_MAJOR ||
30273                         minor < DB_VERSION_MINOR )
30274                 {
30275                         printf("Berkeley DB version mismatch\n"
30276                                 "\theader: %s\n\tlibrary: %s\n",
30277                                 DB_VERSION_STRING, version);
30278                         return 1;
30279                 }
30280         }
30281 #endif
30282
30283 #if DB_VERSION_MAJOR > 2
30284         db_env_create( NULL, 0 );
30285 #elif DB_VERSION_MAJOR > 1
30286         db_appexit( NULL );
30287 #else
30288         (void) dbopen( NULL, 0, 0, 0, NULL);
30289 #endif
30290
30291   ;
30292   return 0;
30293 }
30294 _ACEOF
30295 rm -f conftest.$ac_objext conftest$ac_exeext
30296 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30297   (eval $ac_link) 2>conftest.er1
30298   ac_status=$?
30299   grep -v '^ *+' conftest.er1 >conftest.err
30300   rm -f conftest.er1
30301   cat conftest.err >&5
30302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30303   (exit $ac_status); } &&
30304          { ac_try='test -z "$ac_c_werror_flag"
30305                          || test ! -s conftest.err'
30306   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30307   (eval $ac_try) 2>&5
30308   ac_status=$?
30309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30310   (exit $ac_status); }; } &&
30311          { ac_try='test -s conftest$ac_exeext'
30312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30313   (eval $ac_try) 2>&5
30314   ac_status=$?
30315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30316   (exit $ac_status); }; }; then
30317   ol_cv_db_db41=yes
30318 else
30319   echo "$as_me: failed program was:" >&5
30320 sed 's/^/| /' conftest.$ac_ext >&5
30321
30322 ol_cv_db_db41=no
30323 fi
30324 rm -f conftest.err conftest.$ac_objext \
30325       conftest$ac_exeext conftest.$ac_ext
30326
30327         LIBS="$ol_LIBS"
30328
30329 fi
30330 echo "$as_me:$LINENO: result: $ol_cv_db_db41" >&5
30331 echo "${ECHO_T}$ol_cv_db_db41" >&6
30332
30333         if test $ol_cv_db_db41 = yes ; then
30334                 ol_cv_lib_db=-ldb41
30335         fi
30336 fi
30337
30338                 if test $ol_cv_lib_db = no ; then
30339         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-41)" >&5
30340 echo $ECHO_N "checking for Berkeley DB link (-ldb-41)... $ECHO_C" >&6
30341 if test "${ol_cv_db_db_41+set}" = set; then
30342   echo $ECHO_N "(cached) $ECHO_C" >&6
30343 else
30344
30345         ol_DB_LIB=-ldb-41
30346         ol_LIBS=$LIBS
30347         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30348
30349         cat >conftest.$ac_ext <<_ACEOF
30350 /* confdefs.h.  */
30351 _ACEOF
30352 cat confdefs.h >>conftest.$ac_ext
30353 cat >>conftest.$ac_ext <<_ACEOF
30354 /* end confdefs.h.  */
30355
30356 #ifdef HAVE_DB_185_H
30357 # include <db_185.h>
30358 #else
30359 # include <db.h>
30360 #endif
30361
30362 #ifndef DB_VERSION_MAJOR
30363 # define DB_VERSION_MAJOR 1
30364 #endif
30365
30366 #ifndef NULL
30367 #define NULL ((void*)0)
30368 #endif
30369
30370 int
30371 main ()
30372 {
30373
30374 #if DB_VERSION_MAJOR > 1
30375         {
30376                 char *version;
30377                 int major, minor, patch;
30378
30379                 version = db_version( &major, &minor, &patch );
30380
30381                 if( major != DB_VERSION_MAJOR ||
30382                         minor < DB_VERSION_MINOR )
30383                 {
30384                         printf("Berkeley DB version mismatch\n"
30385                                 "\theader: %s\n\tlibrary: %s\n",
30386                                 DB_VERSION_STRING, version);
30387                         return 1;
30388                 }
30389         }
30390 #endif
30391
30392 #if DB_VERSION_MAJOR > 2
30393         db_env_create( NULL, 0 );
30394 #elif DB_VERSION_MAJOR > 1
30395         db_appexit( NULL );
30396 #else
30397         (void) dbopen( NULL, 0, 0, 0, NULL);
30398 #endif
30399
30400   ;
30401   return 0;
30402 }
30403 _ACEOF
30404 rm -f conftest.$ac_objext conftest$ac_exeext
30405 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30406   (eval $ac_link) 2>conftest.er1
30407   ac_status=$?
30408   grep -v '^ *+' conftest.er1 >conftest.err
30409   rm -f conftest.er1
30410   cat conftest.err >&5
30411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30412   (exit $ac_status); } &&
30413          { ac_try='test -z "$ac_c_werror_flag"
30414                          || test ! -s conftest.err'
30415   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30416   (eval $ac_try) 2>&5
30417   ac_status=$?
30418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30419   (exit $ac_status); }; } &&
30420          { ac_try='test -s conftest$ac_exeext'
30421   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30422   (eval $ac_try) 2>&5
30423   ac_status=$?
30424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30425   (exit $ac_status); }; }; then
30426   ol_cv_db_db_41=yes
30427 else
30428   echo "$as_me: failed program was:" >&5
30429 sed 's/^/| /' conftest.$ac_ext >&5
30430
30431 ol_cv_db_db_41=no
30432 fi
30433 rm -f conftest.err conftest.$ac_objext \
30434       conftest$ac_exeext conftest.$ac_ext
30435
30436         LIBS="$ol_LIBS"
30437
30438 fi
30439 echo "$as_me:$LINENO: result: $ol_cv_db_db_41" >&5
30440 echo "${ECHO_T}$ol_cv_db_db_41" >&6
30441
30442         if test $ol_cv_db_db_41 = yes ; then
30443                 ol_cv_lib_db=-ldb-41
30444         fi
30445 fi
30446
30447                 if test $ol_cv_lib_db = no ; then
30448         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.1)" >&5
30449 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.1)... $ECHO_C" >&6
30450 if test "${ol_cv_db_db_4_dot_1+set}" = set; then
30451   echo $ECHO_N "(cached) $ECHO_C" >&6
30452 else
30453
30454         ol_DB_LIB=-ldb-4.1
30455         ol_LIBS=$LIBS
30456         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30457
30458         cat >conftest.$ac_ext <<_ACEOF
30459 /* confdefs.h.  */
30460 _ACEOF
30461 cat confdefs.h >>conftest.$ac_ext
30462 cat >>conftest.$ac_ext <<_ACEOF
30463 /* end confdefs.h.  */
30464
30465 #ifdef HAVE_DB_185_H
30466 # include <db_185.h>
30467 #else
30468 # include <db.h>
30469 #endif
30470
30471 #ifndef DB_VERSION_MAJOR
30472 # define DB_VERSION_MAJOR 1
30473 #endif
30474
30475 #ifndef NULL
30476 #define NULL ((void*)0)
30477 #endif
30478
30479 int
30480 main ()
30481 {
30482
30483 #if DB_VERSION_MAJOR > 1
30484         {
30485                 char *version;
30486                 int major, minor, patch;
30487
30488                 version = db_version( &major, &minor, &patch );
30489
30490                 if( major != DB_VERSION_MAJOR ||
30491                         minor < DB_VERSION_MINOR )
30492                 {
30493                         printf("Berkeley DB version mismatch\n"
30494                                 "\theader: %s\n\tlibrary: %s\n",
30495                                 DB_VERSION_STRING, version);
30496                         return 1;
30497                 }
30498         }
30499 #endif
30500
30501 #if DB_VERSION_MAJOR > 2
30502         db_env_create( NULL, 0 );
30503 #elif DB_VERSION_MAJOR > 1
30504         db_appexit( NULL );
30505 #else
30506         (void) dbopen( NULL, 0, 0, 0, NULL);
30507 #endif
30508
30509   ;
30510   return 0;
30511 }
30512 _ACEOF
30513 rm -f conftest.$ac_objext conftest$ac_exeext
30514 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30515   (eval $ac_link) 2>conftest.er1
30516   ac_status=$?
30517   grep -v '^ *+' conftest.er1 >conftest.err
30518   rm -f conftest.er1
30519   cat conftest.err >&5
30520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30521   (exit $ac_status); } &&
30522          { ac_try='test -z "$ac_c_werror_flag"
30523                          || test ! -s conftest.err'
30524   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30525   (eval $ac_try) 2>&5
30526   ac_status=$?
30527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30528   (exit $ac_status); }; } &&
30529          { ac_try='test -s conftest$ac_exeext'
30530   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30531   (eval $ac_try) 2>&5
30532   ac_status=$?
30533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30534   (exit $ac_status); }; }; then
30535   ol_cv_db_db_4_dot_1=yes
30536 else
30537   echo "$as_me: failed program was:" >&5
30538 sed 's/^/| /' conftest.$ac_ext >&5
30539
30540 ol_cv_db_db_4_dot_1=no
30541 fi
30542 rm -f conftest.err conftest.$ac_objext \
30543       conftest$ac_exeext conftest.$ac_ext
30544
30545         LIBS="$ol_LIBS"
30546
30547 fi
30548 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_1" >&5
30549 echo "${ECHO_T}$ol_cv_db_db_4_dot_1" >&6
30550
30551         if test $ol_cv_db_db_4_dot_1 = yes ; then
30552                 ol_cv_lib_db=-ldb-4.1
30553         fi
30554 fi
30555
30556                 if test $ol_cv_lib_db = no ; then
30557         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-1)" >&5
30558 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-1)... $ECHO_C" >&6
30559 if test "${ol_cv_db_db_4_1+set}" = set; then
30560   echo $ECHO_N "(cached) $ECHO_C" >&6
30561 else
30562
30563         ol_DB_LIB=-ldb-4-1
30564         ol_LIBS=$LIBS
30565         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30566
30567         cat >conftest.$ac_ext <<_ACEOF
30568 /* confdefs.h.  */
30569 _ACEOF
30570 cat confdefs.h >>conftest.$ac_ext
30571 cat >>conftest.$ac_ext <<_ACEOF
30572 /* end confdefs.h.  */
30573
30574 #ifdef HAVE_DB_185_H
30575 # include <db_185.h>
30576 #else
30577 # include <db.h>
30578 #endif
30579
30580 #ifndef DB_VERSION_MAJOR
30581 # define DB_VERSION_MAJOR 1
30582 #endif
30583
30584 #ifndef NULL
30585 #define NULL ((void*)0)
30586 #endif
30587
30588 int
30589 main ()
30590 {
30591
30592 #if DB_VERSION_MAJOR > 1
30593         {
30594                 char *version;
30595                 int major, minor, patch;
30596
30597                 version = db_version( &major, &minor, &patch );
30598
30599                 if( major != DB_VERSION_MAJOR ||
30600                         minor < DB_VERSION_MINOR )
30601                 {
30602                         printf("Berkeley DB version mismatch\n"
30603                                 "\theader: %s\n\tlibrary: %s\n",
30604                                 DB_VERSION_STRING, version);
30605                         return 1;
30606                 }
30607         }
30608 #endif
30609
30610 #if DB_VERSION_MAJOR > 2
30611         db_env_create( NULL, 0 );
30612 #elif DB_VERSION_MAJOR > 1
30613         db_appexit( NULL );
30614 #else
30615         (void) dbopen( NULL, 0, 0, 0, NULL);
30616 #endif
30617
30618   ;
30619   return 0;
30620 }
30621 _ACEOF
30622 rm -f conftest.$ac_objext conftest$ac_exeext
30623 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30624   (eval $ac_link) 2>conftest.er1
30625   ac_status=$?
30626   grep -v '^ *+' conftest.er1 >conftest.err
30627   rm -f conftest.er1
30628   cat conftest.err >&5
30629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30630   (exit $ac_status); } &&
30631          { ac_try='test -z "$ac_c_werror_flag"
30632                          || test ! -s conftest.err'
30633   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30634   (eval $ac_try) 2>&5
30635   ac_status=$?
30636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30637   (exit $ac_status); }; } &&
30638          { ac_try='test -s conftest$ac_exeext'
30639   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30640   (eval $ac_try) 2>&5
30641   ac_status=$?
30642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30643   (exit $ac_status); }; }; then
30644   ol_cv_db_db_4_1=yes
30645 else
30646   echo "$as_me: failed program was:" >&5
30647 sed 's/^/| /' conftest.$ac_ext >&5
30648
30649 ol_cv_db_db_4_1=no
30650 fi
30651 rm -f conftest.err conftest.$ac_objext \
30652       conftest$ac_exeext conftest.$ac_ext
30653
30654         LIBS="$ol_LIBS"
30655
30656 fi
30657 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_1" >&5
30658 echo "${ECHO_T}$ol_cv_db_db_4_1" >&6
30659
30660         if test $ol_cv_db_db_4_1 = yes ; then
30661                 ol_cv_lib_db=-ldb-4-1
30662         fi
30663 fi
30664
30665         fi
30666         if test $ol_cv_lib_db = no ; then
30667         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4)" >&5
30668 echo $ECHO_N "checking for Berkeley DB link (-ldb-4)... $ECHO_C" >&6
30669 if test "${ol_cv_db_db_4+set}" = set; then
30670   echo $ECHO_N "(cached) $ECHO_C" >&6
30671 else
30672
30673         ol_DB_LIB=-ldb-4
30674         ol_LIBS=$LIBS
30675         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30676
30677         cat >conftest.$ac_ext <<_ACEOF
30678 /* confdefs.h.  */
30679 _ACEOF
30680 cat confdefs.h >>conftest.$ac_ext
30681 cat >>conftest.$ac_ext <<_ACEOF
30682 /* end confdefs.h.  */
30683
30684 #ifdef HAVE_DB_185_H
30685 # include <db_185.h>
30686 #else
30687 # include <db.h>
30688 #endif
30689
30690 #ifndef DB_VERSION_MAJOR
30691 # define DB_VERSION_MAJOR 1
30692 #endif
30693
30694 #ifndef NULL
30695 #define NULL ((void*)0)
30696 #endif
30697
30698 int
30699 main ()
30700 {
30701
30702 #if DB_VERSION_MAJOR > 1
30703         {
30704                 char *version;
30705                 int major, minor, patch;
30706
30707                 version = db_version( &major, &minor, &patch );
30708
30709                 if( major != DB_VERSION_MAJOR ||
30710                         minor < DB_VERSION_MINOR )
30711                 {
30712                         printf("Berkeley DB version mismatch\n"
30713                                 "\theader: %s\n\tlibrary: %s\n",
30714                                 DB_VERSION_STRING, version);
30715                         return 1;
30716                 }
30717         }
30718 #endif
30719
30720 #if DB_VERSION_MAJOR > 2
30721         db_env_create( NULL, 0 );
30722 #elif DB_VERSION_MAJOR > 1
30723         db_appexit( NULL );
30724 #else
30725         (void) dbopen( NULL, 0, 0, 0, NULL);
30726 #endif
30727
30728   ;
30729   return 0;
30730 }
30731 _ACEOF
30732 rm -f conftest.$ac_objext conftest$ac_exeext
30733 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30734   (eval $ac_link) 2>conftest.er1
30735   ac_status=$?
30736   grep -v '^ *+' conftest.er1 >conftest.err
30737   rm -f conftest.er1
30738   cat conftest.err >&5
30739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30740   (exit $ac_status); } &&
30741          { ac_try='test -z "$ac_c_werror_flag"
30742                          || test ! -s conftest.err'
30743   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30744   (eval $ac_try) 2>&5
30745   ac_status=$?
30746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30747   (exit $ac_status); }; } &&
30748          { ac_try='test -s conftest$ac_exeext'
30749   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30750   (eval $ac_try) 2>&5
30751   ac_status=$?
30752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30753   (exit $ac_status); }; }; then
30754   ol_cv_db_db_4=yes
30755 else
30756   echo "$as_me: failed program was:" >&5
30757 sed 's/^/| /' conftest.$ac_ext >&5
30758
30759 ol_cv_db_db_4=no
30760 fi
30761 rm -f conftest.err conftest.$ac_objext \
30762       conftest$ac_exeext conftest.$ac_ext
30763
30764         LIBS="$ol_LIBS"
30765
30766 fi
30767 echo "$as_me:$LINENO: result: $ol_cv_db_db_4" >&5
30768 echo "${ECHO_T}$ol_cv_db_db_4" >&6
30769
30770         if test $ol_cv_db_db_4 = yes ; then
30771                 ol_cv_lib_db=-ldb-4
30772         fi
30773 fi
30774
30775         if test $ol_cv_lib_db = no ; then
30776         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb4)" >&5
30777 echo $ECHO_N "checking for Berkeley DB link (-ldb4)... $ECHO_C" >&6
30778 if test "${ol_cv_db_db4+set}" = set; then
30779   echo $ECHO_N "(cached) $ECHO_C" >&6
30780 else
30781
30782         ol_DB_LIB=-ldb4
30783         ol_LIBS=$LIBS
30784         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30785
30786         cat >conftest.$ac_ext <<_ACEOF
30787 /* confdefs.h.  */
30788 _ACEOF
30789 cat confdefs.h >>conftest.$ac_ext
30790 cat >>conftest.$ac_ext <<_ACEOF
30791 /* end confdefs.h.  */
30792
30793 #ifdef HAVE_DB_185_H
30794 # include <db_185.h>
30795 #else
30796 # include <db.h>
30797 #endif
30798
30799 #ifndef DB_VERSION_MAJOR
30800 # define DB_VERSION_MAJOR 1
30801 #endif
30802
30803 #ifndef NULL
30804 #define NULL ((void*)0)
30805 #endif
30806
30807 int
30808 main ()
30809 {
30810
30811 #if DB_VERSION_MAJOR > 1
30812         {
30813                 char *version;
30814                 int major, minor, patch;
30815
30816                 version = db_version( &major, &minor, &patch );
30817
30818                 if( major != DB_VERSION_MAJOR ||
30819                         minor < DB_VERSION_MINOR )
30820                 {
30821                         printf("Berkeley DB version mismatch\n"
30822                                 "\theader: %s\n\tlibrary: %s\n",
30823                                 DB_VERSION_STRING, version);
30824                         return 1;
30825                 }
30826         }
30827 #endif
30828
30829 #if DB_VERSION_MAJOR > 2
30830         db_env_create( NULL, 0 );
30831 #elif DB_VERSION_MAJOR > 1
30832         db_appexit( NULL );
30833 #else
30834         (void) dbopen( NULL, 0, 0, 0, NULL);
30835 #endif
30836
30837   ;
30838   return 0;
30839 }
30840 _ACEOF
30841 rm -f conftest.$ac_objext conftest$ac_exeext
30842 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30843   (eval $ac_link) 2>conftest.er1
30844   ac_status=$?
30845   grep -v '^ *+' conftest.er1 >conftest.err
30846   rm -f conftest.er1
30847   cat conftest.err >&5
30848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30849   (exit $ac_status); } &&
30850          { ac_try='test -z "$ac_c_werror_flag"
30851                          || test ! -s conftest.err'
30852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30853   (eval $ac_try) 2>&5
30854   ac_status=$?
30855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30856   (exit $ac_status); }; } &&
30857          { ac_try='test -s conftest$ac_exeext'
30858   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30859   (eval $ac_try) 2>&5
30860   ac_status=$?
30861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30862   (exit $ac_status); }; }; then
30863   ol_cv_db_db4=yes
30864 else
30865   echo "$as_me: failed program was:" >&5
30866 sed 's/^/| /' conftest.$ac_ext >&5
30867
30868 ol_cv_db_db4=no
30869 fi
30870 rm -f conftest.err conftest.$ac_objext \
30871       conftest$ac_exeext conftest.$ac_ext
30872
30873         LIBS="$ol_LIBS"
30874
30875 fi
30876 echo "$as_me:$LINENO: result: $ol_cv_db_db4" >&5
30877 echo "${ECHO_T}$ol_cv_db_db4" >&6
30878
30879         if test $ol_cv_db_db4 = yes ; then
30880                 ol_cv_lib_db=-ldb4
30881         fi
30882 fi
30883
30884         if test $ol_cv_lib_db = no ; then
30885         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb)" >&5
30886 echo $ECHO_N "checking for Berkeley DB link (-ldb)... $ECHO_C" >&6
30887 if test "${ol_cv_db_db+set}" = set; then
30888   echo $ECHO_N "(cached) $ECHO_C" >&6
30889 else
30890
30891         ol_DB_LIB=-ldb
30892         ol_LIBS=$LIBS
30893         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30894
30895         cat >conftest.$ac_ext <<_ACEOF
30896 /* confdefs.h.  */
30897 _ACEOF
30898 cat confdefs.h >>conftest.$ac_ext
30899 cat >>conftest.$ac_ext <<_ACEOF
30900 /* end confdefs.h.  */
30901
30902 #ifdef HAVE_DB_185_H
30903 # include <db_185.h>
30904 #else
30905 # include <db.h>
30906 #endif
30907
30908 #ifndef DB_VERSION_MAJOR
30909 # define DB_VERSION_MAJOR 1
30910 #endif
30911
30912 #ifndef NULL
30913 #define NULL ((void*)0)
30914 #endif
30915
30916 int
30917 main ()
30918 {
30919
30920 #if DB_VERSION_MAJOR > 1
30921         {
30922                 char *version;
30923                 int major, minor, patch;
30924
30925                 version = db_version( &major, &minor, &patch );
30926
30927                 if( major != DB_VERSION_MAJOR ||
30928                         minor < DB_VERSION_MINOR )
30929                 {
30930                         printf("Berkeley DB version mismatch\n"
30931                                 "\theader: %s\n\tlibrary: %s\n",
30932                                 DB_VERSION_STRING, version);
30933                         return 1;
30934                 }
30935         }
30936 #endif
30937
30938 #if DB_VERSION_MAJOR > 2
30939         db_env_create( NULL, 0 );
30940 #elif DB_VERSION_MAJOR > 1
30941         db_appexit( NULL );
30942 #else
30943         (void) dbopen( NULL, 0, 0, 0, NULL);
30944 #endif
30945
30946   ;
30947   return 0;
30948 }
30949 _ACEOF
30950 rm -f conftest.$ac_objext conftest$ac_exeext
30951 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30952   (eval $ac_link) 2>conftest.er1
30953   ac_status=$?
30954   grep -v '^ *+' conftest.er1 >conftest.err
30955   rm -f conftest.er1
30956   cat conftest.err >&5
30957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30958   (exit $ac_status); } &&
30959          { ac_try='test -z "$ac_c_werror_flag"
30960                          || test ! -s conftest.err'
30961   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30962   (eval $ac_try) 2>&5
30963   ac_status=$?
30964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30965   (exit $ac_status); }; } &&
30966          { ac_try='test -s conftest$ac_exeext'
30967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30968   (eval $ac_try) 2>&5
30969   ac_status=$?
30970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30971   (exit $ac_status); }; }; then
30972   ol_cv_db_db=yes
30973 else
30974   echo "$as_me: failed program was:" >&5
30975 sed 's/^/| /' conftest.$ac_ext >&5
30976
30977 ol_cv_db_db=no
30978 fi
30979 rm -f conftest.err conftest.$ac_objext \
30980       conftest$ac_exeext conftest.$ac_ext
30981
30982         LIBS="$ol_LIBS"
30983
30984 fi
30985 echo "$as_me:$LINENO: result: $ol_cv_db_db" >&5
30986 echo "${ECHO_T}$ol_cv_db_db" >&6
30987
30988         if test $ol_cv_db_db = yes ; then
30989                 ol_cv_lib_db=-ldb
30990         fi
30991 fi
30992
30993
30994 elif test $ol_cv_bdb_major = 3 ; then
30995         if test $ol_cv_lib_db = no ; then
30996         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb3)" >&5
30997 echo $ECHO_N "checking for Berkeley DB link (-ldb3)... $ECHO_C" >&6
30998 if test "${ol_cv_db_db3+set}" = set; then
30999   echo $ECHO_N "(cached) $ECHO_C" >&6
31000 else
31001
31002         ol_DB_LIB=-ldb3
31003         ol_LIBS=$LIBS
31004         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31005
31006         cat >conftest.$ac_ext <<_ACEOF
31007 /* confdefs.h.  */
31008 _ACEOF
31009 cat confdefs.h >>conftest.$ac_ext
31010 cat >>conftest.$ac_ext <<_ACEOF
31011 /* end confdefs.h.  */
31012
31013 #ifdef HAVE_DB_185_H
31014 # include <db_185.h>
31015 #else
31016 # include <db.h>
31017 #endif
31018
31019 #ifndef DB_VERSION_MAJOR
31020 # define DB_VERSION_MAJOR 1
31021 #endif
31022
31023 #ifndef NULL
31024 #define NULL ((void*)0)
31025 #endif
31026
31027 int
31028 main ()
31029 {
31030
31031 #if DB_VERSION_MAJOR > 1
31032         {
31033                 char *version;
31034                 int major, minor, patch;
31035
31036                 version = db_version( &major, &minor, &patch );
31037
31038                 if( major != DB_VERSION_MAJOR ||
31039                         minor < DB_VERSION_MINOR )
31040                 {
31041                         printf("Berkeley DB version mismatch\n"
31042                                 "\theader: %s\n\tlibrary: %s\n",
31043                                 DB_VERSION_STRING, version);
31044                         return 1;
31045                 }
31046         }
31047 #endif
31048
31049 #if DB_VERSION_MAJOR > 2
31050         db_env_create( NULL, 0 );
31051 #elif DB_VERSION_MAJOR > 1
31052         db_appexit( NULL );
31053 #else
31054         (void) dbopen( NULL, 0, 0, 0, NULL);
31055 #endif
31056
31057   ;
31058   return 0;
31059 }
31060 _ACEOF
31061 rm -f conftest.$ac_objext conftest$ac_exeext
31062 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31063   (eval $ac_link) 2>conftest.er1
31064   ac_status=$?
31065   grep -v '^ *+' conftest.er1 >conftest.err
31066   rm -f conftest.er1
31067   cat conftest.err >&5
31068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31069   (exit $ac_status); } &&
31070          { ac_try='test -z "$ac_c_werror_flag"
31071                          || test ! -s conftest.err'
31072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31073   (eval $ac_try) 2>&5
31074   ac_status=$?
31075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31076   (exit $ac_status); }; } &&
31077          { ac_try='test -s conftest$ac_exeext'
31078   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31079   (eval $ac_try) 2>&5
31080   ac_status=$?
31081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31082   (exit $ac_status); }; }; then
31083   ol_cv_db_db3=yes
31084 else
31085   echo "$as_me: failed program was:" >&5
31086 sed 's/^/| /' conftest.$ac_ext >&5
31087
31088 ol_cv_db_db3=no
31089 fi
31090 rm -f conftest.err conftest.$ac_objext \
31091       conftest$ac_exeext conftest.$ac_ext
31092
31093         LIBS="$ol_LIBS"
31094
31095 fi
31096 echo "$as_me:$LINENO: result: $ol_cv_db_db3" >&5
31097 echo "${ECHO_T}$ol_cv_db_db3" >&6
31098
31099         if test $ol_cv_db_db3 = yes ; then
31100                 ol_cv_lib_db=-ldb3
31101         fi
31102 fi
31103
31104         if test $ol_cv_lib_db = no ; then
31105         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-3)" >&5
31106 echo $ECHO_N "checking for Berkeley DB link (-ldb-3)... $ECHO_C" >&6
31107 if test "${ol_cv_db_db_3+set}" = set; then
31108   echo $ECHO_N "(cached) $ECHO_C" >&6
31109 else
31110
31111         ol_DB_LIB=-ldb-3
31112         ol_LIBS=$LIBS
31113         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31114
31115         cat >conftest.$ac_ext <<_ACEOF
31116 /* confdefs.h.  */
31117 _ACEOF
31118 cat confdefs.h >>conftest.$ac_ext
31119 cat >>conftest.$ac_ext <<_ACEOF
31120 /* end confdefs.h.  */
31121
31122 #ifdef HAVE_DB_185_H
31123 # include <db_185.h>
31124 #else
31125 # include <db.h>
31126 #endif
31127
31128 #ifndef DB_VERSION_MAJOR
31129 # define DB_VERSION_MAJOR 1
31130 #endif
31131
31132 #ifndef NULL
31133 #define NULL ((void*)0)
31134 #endif
31135
31136 int
31137 main ()
31138 {
31139
31140 #if DB_VERSION_MAJOR > 1
31141         {
31142                 char *version;
31143                 int major, minor, patch;
31144
31145                 version = db_version( &major, &minor, &patch );
31146
31147                 if( major != DB_VERSION_MAJOR ||
31148                         minor < DB_VERSION_MINOR )
31149                 {
31150                         printf("Berkeley DB version mismatch\n"
31151                                 "\theader: %s\n\tlibrary: %s\n",
31152                                 DB_VERSION_STRING, version);
31153                         return 1;
31154                 }
31155         }
31156 #endif
31157
31158 #if DB_VERSION_MAJOR > 2
31159         db_env_create( NULL, 0 );
31160 #elif DB_VERSION_MAJOR > 1
31161         db_appexit( NULL );
31162 #else
31163         (void) dbopen( NULL, 0, 0, 0, NULL);
31164 #endif
31165
31166   ;
31167   return 0;
31168 }
31169 _ACEOF
31170 rm -f conftest.$ac_objext conftest$ac_exeext
31171 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31172   (eval $ac_link) 2>conftest.er1
31173   ac_status=$?
31174   grep -v '^ *+' conftest.er1 >conftest.err
31175   rm -f conftest.er1
31176   cat conftest.err >&5
31177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31178   (exit $ac_status); } &&
31179          { ac_try='test -z "$ac_c_werror_flag"
31180                          || test ! -s conftest.err'
31181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31182   (eval $ac_try) 2>&5
31183   ac_status=$?
31184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31185   (exit $ac_status); }; } &&
31186          { ac_try='test -s conftest$ac_exeext'
31187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31188   (eval $ac_try) 2>&5
31189   ac_status=$?
31190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31191   (exit $ac_status); }; }; then
31192   ol_cv_db_db_3=yes
31193 else
31194   echo "$as_me: failed program was:" >&5
31195 sed 's/^/| /' conftest.$ac_ext >&5
31196
31197 ol_cv_db_db_3=no
31198 fi
31199 rm -f conftest.err conftest.$ac_objext \
31200       conftest$ac_exeext conftest.$ac_ext
31201
31202         LIBS="$ol_LIBS"
31203
31204 fi
31205 echo "$as_me:$LINENO: result: $ol_cv_db_db_3" >&5
31206 echo "${ECHO_T}$ol_cv_db_db_3" >&6
31207
31208         if test $ol_cv_db_db_3 = yes ; then
31209                 ol_cv_lib_db=-ldb-3
31210         fi
31211 fi
31212
31213
31214 elif test $ol_cv_bdb_major = 2 ; then
31215         if test $ol_cv_lib_db = no ; then
31216         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb2)" >&5
31217 echo $ECHO_N "checking for Berkeley DB link (-ldb2)... $ECHO_C" >&6
31218 if test "${ol_cv_db_db2+set}" = set; then
31219   echo $ECHO_N "(cached) $ECHO_C" >&6
31220 else
31221
31222         ol_DB_LIB=-ldb2
31223         ol_LIBS=$LIBS
31224         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31225
31226         cat >conftest.$ac_ext <<_ACEOF
31227 /* confdefs.h.  */
31228 _ACEOF
31229 cat confdefs.h >>conftest.$ac_ext
31230 cat >>conftest.$ac_ext <<_ACEOF
31231 /* end confdefs.h.  */
31232
31233 #ifdef HAVE_DB_185_H
31234 # include <db_185.h>
31235 #else
31236 # include <db.h>
31237 #endif
31238
31239 #ifndef DB_VERSION_MAJOR
31240 # define DB_VERSION_MAJOR 1
31241 #endif
31242
31243 #ifndef NULL
31244 #define NULL ((void*)0)
31245 #endif
31246
31247 int
31248 main ()
31249 {
31250
31251 #if DB_VERSION_MAJOR > 1
31252         {
31253                 char *version;
31254                 int major, minor, patch;
31255
31256                 version = db_version( &major, &minor, &patch );
31257
31258                 if( major != DB_VERSION_MAJOR ||
31259                         minor < DB_VERSION_MINOR )
31260                 {
31261                         printf("Berkeley DB version mismatch\n"
31262                                 "\theader: %s\n\tlibrary: %s\n",
31263                                 DB_VERSION_STRING, version);
31264                         return 1;
31265                 }
31266         }
31267 #endif
31268
31269 #if DB_VERSION_MAJOR > 2
31270         db_env_create( NULL, 0 );
31271 #elif DB_VERSION_MAJOR > 1
31272         db_appexit( NULL );
31273 #else
31274         (void) dbopen( NULL, 0, 0, 0, NULL);
31275 #endif
31276
31277   ;
31278   return 0;
31279 }
31280 _ACEOF
31281 rm -f conftest.$ac_objext conftest$ac_exeext
31282 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31283   (eval $ac_link) 2>conftest.er1
31284   ac_status=$?
31285   grep -v '^ *+' conftest.er1 >conftest.err
31286   rm -f conftest.er1
31287   cat conftest.err >&5
31288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31289   (exit $ac_status); } &&
31290          { ac_try='test -z "$ac_c_werror_flag"
31291                          || test ! -s conftest.err'
31292   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31293   (eval $ac_try) 2>&5
31294   ac_status=$?
31295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31296   (exit $ac_status); }; } &&
31297          { ac_try='test -s conftest$ac_exeext'
31298   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31299   (eval $ac_try) 2>&5
31300   ac_status=$?
31301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31302   (exit $ac_status); }; }; then
31303   ol_cv_db_db2=yes
31304 else
31305   echo "$as_me: failed program was:" >&5
31306 sed 's/^/| /' conftest.$ac_ext >&5
31307
31308 ol_cv_db_db2=no
31309 fi
31310 rm -f conftest.err conftest.$ac_objext \
31311       conftest$ac_exeext conftest.$ac_ext
31312
31313         LIBS="$ol_LIBS"
31314
31315 fi
31316 echo "$as_me:$LINENO: result: $ol_cv_db_db2" >&5
31317 echo "${ECHO_T}$ol_cv_db_db2" >&6
31318
31319         if test $ol_cv_db_db2 = yes ; then
31320                 ol_cv_lib_db=-ldb2
31321         fi
31322 fi
31323
31324         if test $ol_cv_lib_db = no ; then
31325         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-2)" >&5
31326 echo $ECHO_N "checking for Berkeley DB link (-ldb-2)... $ECHO_C" >&6
31327 if test "${ol_cv_db_db_2+set}" = set; then
31328   echo $ECHO_N "(cached) $ECHO_C" >&6
31329 else
31330
31331         ol_DB_LIB=-ldb-2
31332         ol_LIBS=$LIBS
31333         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31334
31335         cat >conftest.$ac_ext <<_ACEOF
31336 /* confdefs.h.  */
31337 _ACEOF
31338 cat confdefs.h >>conftest.$ac_ext
31339 cat >>conftest.$ac_ext <<_ACEOF
31340 /* end confdefs.h.  */
31341
31342 #ifdef HAVE_DB_185_H
31343 # include <db_185.h>
31344 #else
31345 # include <db.h>
31346 #endif
31347
31348 #ifndef DB_VERSION_MAJOR
31349 # define DB_VERSION_MAJOR 1
31350 #endif
31351
31352 #ifndef NULL
31353 #define NULL ((void*)0)
31354 #endif
31355
31356 int
31357 main ()
31358 {
31359
31360 #if DB_VERSION_MAJOR > 1
31361         {
31362                 char *version;
31363                 int major, minor, patch;
31364
31365                 version = db_version( &major, &minor, &patch );
31366
31367                 if( major != DB_VERSION_MAJOR ||
31368                         minor < DB_VERSION_MINOR )
31369                 {
31370                         printf("Berkeley DB version mismatch\n"
31371                                 "\theader: %s\n\tlibrary: %s\n",
31372                                 DB_VERSION_STRING, version);
31373                         return 1;
31374                 }
31375         }
31376 #endif
31377
31378 #if DB_VERSION_MAJOR > 2
31379         db_env_create( NULL, 0 );
31380 #elif DB_VERSION_MAJOR > 1
31381         db_appexit( NULL );
31382 #else
31383         (void) dbopen( NULL, 0, 0, 0, NULL);
31384 #endif
31385
31386   ;
31387   return 0;
31388 }
31389 _ACEOF
31390 rm -f conftest.$ac_objext conftest$ac_exeext
31391 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31392   (eval $ac_link) 2>conftest.er1
31393   ac_status=$?
31394   grep -v '^ *+' conftest.er1 >conftest.err
31395   rm -f conftest.er1
31396   cat conftest.err >&5
31397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31398   (exit $ac_status); } &&
31399          { ac_try='test -z "$ac_c_werror_flag"
31400                          || test ! -s conftest.err'
31401   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31402   (eval $ac_try) 2>&5
31403   ac_status=$?
31404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31405   (exit $ac_status); }; } &&
31406          { ac_try='test -s conftest$ac_exeext'
31407   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31408   (eval $ac_try) 2>&5
31409   ac_status=$?
31410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31411   (exit $ac_status); }; }; then
31412   ol_cv_db_db_2=yes
31413 else
31414   echo "$as_me: failed program was:" >&5
31415 sed 's/^/| /' conftest.$ac_ext >&5
31416
31417 ol_cv_db_db_2=no
31418 fi
31419 rm -f conftest.err conftest.$ac_objext \
31420       conftest$ac_exeext conftest.$ac_ext
31421
31422         LIBS="$ol_LIBS"
31423
31424 fi
31425 echo "$as_me:$LINENO: result: $ol_cv_db_db_2" >&5
31426 echo "${ECHO_T}$ol_cv_db_db_2" >&6
31427
31428         if test $ol_cv_db_db_2 = yes ; then
31429                 ol_cv_lib_db=-ldb-2
31430         fi
31431 fi
31432
31433
31434 elif test $ol_cv_bdb_major = 1 ; then
31435         if test $ol_cv_lib_db = no ; then
31436         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb1)" >&5
31437 echo $ECHO_N "checking for Berkeley DB link (-ldb1)... $ECHO_C" >&6
31438 if test "${ol_cv_db_db1+set}" = set; then
31439   echo $ECHO_N "(cached) $ECHO_C" >&6
31440 else
31441
31442         ol_DB_LIB=-ldb1
31443         ol_LIBS=$LIBS
31444         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31445
31446         cat >conftest.$ac_ext <<_ACEOF
31447 /* confdefs.h.  */
31448 _ACEOF
31449 cat confdefs.h >>conftest.$ac_ext
31450 cat >>conftest.$ac_ext <<_ACEOF
31451 /* end confdefs.h.  */
31452
31453 #ifdef HAVE_DB_185_H
31454 # include <db_185.h>
31455 #else
31456 # include <db.h>
31457 #endif
31458
31459 #ifndef DB_VERSION_MAJOR
31460 # define DB_VERSION_MAJOR 1
31461 #endif
31462
31463 #ifndef NULL
31464 #define NULL ((void*)0)
31465 #endif
31466
31467 int
31468 main ()
31469 {
31470
31471 #if DB_VERSION_MAJOR > 1
31472         {
31473                 char *version;
31474                 int major, minor, patch;
31475
31476                 version = db_version( &major, &minor, &patch );
31477
31478                 if( major != DB_VERSION_MAJOR ||
31479                         minor < DB_VERSION_MINOR )
31480                 {
31481                         printf("Berkeley DB version mismatch\n"
31482                                 "\theader: %s\n\tlibrary: %s\n",
31483                                 DB_VERSION_STRING, version);
31484                         return 1;
31485                 }
31486         }
31487 #endif
31488
31489 #if DB_VERSION_MAJOR > 2
31490         db_env_create( NULL, 0 );
31491 #elif DB_VERSION_MAJOR > 1
31492         db_appexit( NULL );
31493 #else
31494         (void) dbopen( NULL, 0, 0, 0, NULL);
31495 #endif
31496
31497   ;
31498   return 0;
31499 }
31500 _ACEOF
31501 rm -f conftest.$ac_objext conftest$ac_exeext
31502 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31503   (eval $ac_link) 2>conftest.er1
31504   ac_status=$?
31505   grep -v '^ *+' conftest.er1 >conftest.err
31506   rm -f conftest.er1
31507   cat conftest.err >&5
31508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31509   (exit $ac_status); } &&
31510          { ac_try='test -z "$ac_c_werror_flag"
31511                          || test ! -s conftest.err'
31512   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31513   (eval $ac_try) 2>&5
31514   ac_status=$?
31515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31516   (exit $ac_status); }; } &&
31517          { ac_try='test -s conftest$ac_exeext'
31518   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31519   (eval $ac_try) 2>&5
31520   ac_status=$?
31521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31522   (exit $ac_status); }; }; then
31523   ol_cv_db_db1=yes
31524 else
31525   echo "$as_me: failed program was:" >&5
31526 sed 's/^/| /' conftest.$ac_ext >&5
31527
31528 ol_cv_db_db1=no
31529 fi
31530 rm -f conftest.err conftest.$ac_objext \
31531       conftest$ac_exeext conftest.$ac_ext
31532
31533         LIBS="$ol_LIBS"
31534
31535 fi
31536 echo "$as_me:$LINENO: result: $ol_cv_db_db1" >&5
31537 echo "${ECHO_T}$ol_cv_db_db1" >&6
31538
31539         if test $ol_cv_db_db1 = yes ; then
31540                 ol_cv_lib_db=-ldb1
31541         fi
31542 fi
31543
31544         if test $ol_cv_lib_db = no ; then
31545         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-1)" >&5
31546 echo $ECHO_N "checking for Berkeley DB link (-ldb-1)... $ECHO_C" >&6
31547 if test "${ol_cv_db_db_1+set}" = set; then
31548   echo $ECHO_N "(cached) $ECHO_C" >&6
31549 else
31550
31551         ol_DB_LIB=-ldb-1
31552         ol_LIBS=$LIBS
31553         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31554
31555         cat >conftest.$ac_ext <<_ACEOF
31556 /* confdefs.h.  */
31557 _ACEOF
31558 cat confdefs.h >>conftest.$ac_ext
31559 cat >>conftest.$ac_ext <<_ACEOF
31560 /* end confdefs.h.  */
31561
31562 #ifdef HAVE_DB_185_H
31563 # include <db_185.h>
31564 #else
31565 # include <db.h>
31566 #endif
31567
31568 #ifndef DB_VERSION_MAJOR
31569 # define DB_VERSION_MAJOR 1
31570 #endif
31571
31572 #ifndef NULL
31573 #define NULL ((void*)0)
31574 #endif
31575
31576 int
31577 main ()
31578 {
31579
31580 #if DB_VERSION_MAJOR > 1
31581         {
31582                 char *version;
31583                 int major, minor, patch;
31584
31585                 version = db_version( &major, &minor, &patch );
31586
31587                 if( major != DB_VERSION_MAJOR ||
31588                         minor < DB_VERSION_MINOR )
31589                 {
31590                         printf("Berkeley DB version mismatch\n"
31591                                 "\theader: %s\n\tlibrary: %s\n",
31592                                 DB_VERSION_STRING, version);
31593                         return 1;
31594                 }
31595         }
31596 #endif
31597
31598 #if DB_VERSION_MAJOR > 2
31599         db_env_create( NULL, 0 );
31600 #elif DB_VERSION_MAJOR > 1
31601         db_appexit( NULL );
31602 #else
31603         (void) dbopen( NULL, 0, 0, 0, NULL);
31604 #endif
31605
31606   ;
31607   return 0;
31608 }
31609 _ACEOF
31610 rm -f conftest.$ac_objext conftest$ac_exeext
31611 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31612   (eval $ac_link) 2>conftest.er1
31613   ac_status=$?
31614   grep -v '^ *+' conftest.er1 >conftest.err
31615   rm -f conftest.er1
31616   cat conftest.err >&5
31617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31618   (exit $ac_status); } &&
31619          { ac_try='test -z "$ac_c_werror_flag"
31620                          || test ! -s conftest.err'
31621   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31622   (eval $ac_try) 2>&5
31623   ac_status=$?
31624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31625   (exit $ac_status); }; } &&
31626          { ac_try='test -s conftest$ac_exeext'
31627   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31628   (eval $ac_try) 2>&5
31629   ac_status=$?
31630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31631   (exit $ac_status); }; }; then
31632   ol_cv_db_db_1=yes
31633 else
31634   echo "$as_me: failed program was:" >&5
31635 sed 's/^/| /' conftest.$ac_ext >&5
31636
31637 ol_cv_db_db_1=no
31638 fi
31639 rm -f conftest.err conftest.$ac_objext \
31640       conftest$ac_exeext conftest.$ac_ext
31641
31642         LIBS="$ol_LIBS"
31643
31644 fi
31645 echo "$as_me:$LINENO: result: $ol_cv_db_db_1" >&5
31646 echo "${ECHO_T}$ol_cv_db_db_1" >&6
31647
31648         if test $ol_cv_db_db_1 = yes ; then
31649                 ol_cv_lib_db=-ldb-1
31650         fi
31651 fi
31652
31653 fi
31654 if test $ol_cv_lib_db = no ; then
31655         echo "$as_me:$LINENO: checking for Berkeley DB link (default)" >&5
31656 echo $ECHO_N "checking for Berkeley DB link (default)... $ECHO_C" >&6
31657 if test "${ol_cv_db_none+set}" = set; then
31658   echo $ECHO_N "(cached) $ECHO_C" >&6
31659 else
31660
31661         ol_DB_LIB=
31662         ol_LIBS=$LIBS
31663         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31664
31665         cat >conftest.$ac_ext <<_ACEOF
31666 /* confdefs.h.  */
31667 _ACEOF
31668 cat confdefs.h >>conftest.$ac_ext
31669 cat >>conftest.$ac_ext <<_ACEOF
31670 /* end confdefs.h.  */
31671
31672 #ifdef HAVE_DB_185_H
31673 # include <db_185.h>
31674 #else
31675 # include <db.h>
31676 #endif
31677
31678 #ifndef DB_VERSION_MAJOR
31679 # define DB_VERSION_MAJOR 1
31680 #endif
31681
31682 #ifndef NULL
31683 #define NULL ((void*)0)
31684 #endif
31685
31686 int
31687 main ()
31688 {
31689
31690 #if DB_VERSION_MAJOR > 1
31691         {
31692                 char *version;
31693                 int major, minor, patch;
31694
31695                 version = db_version( &major, &minor, &patch );
31696
31697                 if( major != DB_VERSION_MAJOR ||
31698                         minor < DB_VERSION_MINOR )
31699                 {
31700                         printf("Berkeley DB version mismatch\n"
31701                                 "\theader: %s\n\tlibrary: %s\n",
31702                                 DB_VERSION_STRING, version);
31703                         return 1;
31704                 }
31705         }
31706 #endif
31707
31708 #if DB_VERSION_MAJOR > 2
31709         db_env_create( NULL, 0 );
31710 #elif DB_VERSION_MAJOR > 1
31711         db_appexit( NULL );
31712 #else
31713         (void) dbopen( NULL, 0, 0, 0, NULL);
31714 #endif
31715
31716   ;
31717   return 0;
31718 }
31719 _ACEOF
31720 rm -f conftest.$ac_objext conftest$ac_exeext
31721 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31722   (eval $ac_link) 2>conftest.er1
31723   ac_status=$?
31724   grep -v '^ *+' conftest.er1 >conftest.err
31725   rm -f conftest.er1
31726   cat conftest.err >&5
31727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31728   (exit $ac_status); } &&
31729          { ac_try='test -z "$ac_c_werror_flag"
31730                          || test ! -s conftest.err'
31731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31732   (eval $ac_try) 2>&5
31733   ac_status=$?
31734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31735   (exit $ac_status); }; } &&
31736          { ac_try='test -s conftest$ac_exeext'
31737   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31738   (eval $ac_try) 2>&5
31739   ac_status=$?
31740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31741   (exit $ac_status); }; }; then
31742   ol_cv_db_none=yes
31743 else
31744   echo "$as_me: failed program was:" >&5
31745 sed 's/^/| /' conftest.$ac_ext >&5
31746
31747 ol_cv_db_none=no
31748 fi
31749 rm -f conftest.err conftest.$ac_objext \
31750       conftest$ac_exeext conftest.$ac_ext
31751
31752         LIBS="$ol_LIBS"
31753
31754 fi
31755 echo "$as_me:$LINENO: result: $ol_cv_db_none" >&5
31756 echo "${ECHO_T}$ol_cv_db_none" >&6
31757
31758         if test $ol_cv_db_none = yes ; then
31759                 ol_cv_lib_db=yes
31760         fi
31761 fi
31762
31763
31764                 if test "$ol_cv_lib_db" != no ; then
31765                         ol_cv_berkeley_db=yes
31766                 fi
31767         fi
31768 fi
31769
31770         else
31771                 ol_cv_berkeley_db=no
31772
31773 for ac_header in db.h
31774 do
31775 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
31776 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31777   echo "$as_me:$LINENO: checking for $ac_header" >&5
31778 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31779 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31780   echo $ECHO_N "(cached) $ECHO_C" >&6
31781 fi
31782 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
31783 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
31784 else
31785   # Is the header compilable?
31786 echo "$as_me:$LINENO: checking $ac_header usability" >&5
31787 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
31788 cat >conftest.$ac_ext <<_ACEOF
31789 /* confdefs.h.  */
31790 _ACEOF
31791 cat confdefs.h >>conftest.$ac_ext
31792 cat >>conftest.$ac_ext <<_ACEOF
31793 /* end confdefs.h.  */
31794 $ac_includes_default
31795 #include <$ac_header>
31796 _ACEOF
31797 rm -f conftest.$ac_objext
31798 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
31799   (eval $ac_compile) 2>conftest.er1
31800   ac_status=$?
31801   grep -v '^ *+' conftest.er1 >conftest.err
31802   rm -f conftest.er1
31803   cat conftest.err >&5
31804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31805   (exit $ac_status); } &&
31806          { ac_try='test -z "$ac_c_werror_flag"
31807                          || test ! -s conftest.err'
31808   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31809   (eval $ac_try) 2>&5
31810   ac_status=$?
31811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31812   (exit $ac_status); }; } &&
31813          { ac_try='test -s conftest.$ac_objext'
31814   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31815   (eval $ac_try) 2>&5
31816   ac_status=$?
31817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31818   (exit $ac_status); }; }; then
31819   ac_header_compiler=yes
31820 else
31821   echo "$as_me: failed program was:" >&5
31822 sed 's/^/| /' conftest.$ac_ext >&5
31823
31824 ac_header_compiler=no
31825 fi
31826 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
31827 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
31828 echo "${ECHO_T}$ac_header_compiler" >&6
31829
31830 # Is the header present?
31831 echo "$as_me:$LINENO: checking $ac_header presence" >&5
31832 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
31833 cat >conftest.$ac_ext <<_ACEOF
31834 /* confdefs.h.  */
31835 _ACEOF
31836 cat confdefs.h >>conftest.$ac_ext
31837 cat >>conftest.$ac_ext <<_ACEOF
31838 /* end confdefs.h.  */
31839 #include <$ac_header>
31840 _ACEOF
31841 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
31842   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
31843   ac_status=$?
31844   grep -v '^ *+' conftest.er1 >conftest.err
31845   rm -f conftest.er1
31846   cat conftest.err >&5
31847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31848   (exit $ac_status); } >/dev/null; then
31849   if test -s conftest.err; then
31850     ac_cpp_err=$ac_c_preproc_warn_flag
31851     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
31852   else
31853     ac_cpp_err=
31854   fi
31855 else
31856   ac_cpp_err=yes
31857 fi
31858 if test -z "$ac_cpp_err"; then
31859   ac_header_preproc=yes
31860 else
31861   echo "$as_me: failed program was:" >&5
31862 sed 's/^/| /' conftest.$ac_ext >&5
31863
31864   ac_header_preproc=no
31865 fi
31866 rm -f conftest.err conftest.$ac_ext
31867 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
31868 echo "${ECHO_T}$ac_header_preproc" >&6
31869
31870 # So?  What about this header?
31871 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
31872   yes:no: )
31873     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
31874 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
31875     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
31876 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
31877     ac_header_preproc=yes
31878     ;;
31879   no:yes:* )
31880     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
31881 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
31882     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
31883 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
31884     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
31885 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
31886     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
31887 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
31888     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
31889 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
31890     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
31891 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
31892     (
31893       cat <<\_ASBOX
31894 ## --------------------------------------------- ##
31895 ## Report this to <http://www.openldap.org/its/> ##
31896 ## --------------------------------------------- ##
31897 _ASBOX
31898     ) |
31899       sed "s/^/$as_me: WARNING:     /" >&2
31900     ;;
31901 esac
31902 echo "$as_me:$LINENO: checking for $ac_header" >&5
31903 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31904 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31905   echo $ECHO_N "(cached) $ECHO_C" >&6
31906 else
31907   eval "$as_ac_Header=\$ac_header_preproc"
31908 fi
31909 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
31910 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
31911
31912 fi
31913 if test `eval echo '${'$as_ac_Header'}'` = yes; then
31914   cat >>confdefs.h <<_ACEOF
31915 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
31916 _ACEOF
31917
31918 fi
31919
31920 done
31921
31922 if test $ac_cv_header_db_h = yes; then
31923         ol_cv_lib_db=no
31924
31925 echo "$as_me:$LINENO: checking for Berkeley DB major version" >&5
31926 echo $ECHO_N "checking for Berkeley DB major version... $ECHO_C" >&6
31927 if test "${ol_cv_bdb_major+set}" = set; then
31928   echo $ECHO_N "(cached) $ECHO_C" >&6
31929 else
31930
31931         ol_cv_bdb_major=0
31932         if test $ol_cv_bdb_major = 0 ; then
31933                 cat >conftest.$ac_ext <<_ACEOF
31934 /* confdefs.h.  */
31935 _ACEOF
31936 cat confdefs.h >>conftest.$ac_ext
31937 cat >>conftest.$ac_ext <<_ACEOF
31938 /* end confdefs.h.  */
31939
31940 #include <db.h>
31941 #ifndef DB_VERSION_MAJOR
31942 #       define DB_VERSION_MAJOR 1
31943 #endif
31944 #if DB_VERSION_MAJOR == 4
31945 __db_version
31946 #endif
31947
31948 _ACEOF
31949 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31950   $EGREP "__db_version" >/dev/null 2>&1; then
31951   ol_cv_bdb_major=4
31952 else
31953   :
31954 fi
31955 rm -f conftest*
31956
31957         fi
31958         if test $ol_cv_bdb_major = 0 ; then
31959                 cat >conftest.$ac_ext <<_ACEOF
31960 /* confdefs.h.  */
31961 _ACEOF
31962 cat confdefs.h >>conftest.$ac_ext
31963 cat >>conftest.$ac_ext <<_ACEOF
31964 /* end confdefs.h.  */
31965
31966 #include <db.h>
31967 #ifndef DB_VERSION_MAJOR
31968 #       define DB_VERSION_MAJOR 1
31969 #endif
31970 #if DB_VERSION_MAJOR == 3
31971 __db_version
31972 #endif
31973
31974 _ACEOF
31975 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31976   $EGREP "__db_version" >/dev/null 2>&1; then
31977   ol_cv_bdb_major=3
31978 else
31979   :
31980 fi
31981 rm -f conftest*
31982
31983         fi
31984         if test $ol_cv_bdb_major = 0 ; then
31985                 cat >conftest.$ac_ext <<_ACEOF
31986 /* confdefs.h.  */
31987 _ACEOF
31988 cat confdefs.h >>conftest.$ac_ext
31989 cat >>conftest.$ac_ext <<_ACEOF
31990 /* end confdefs.h.  */
31991
31992 #include <db.h>
31993 #ifndef DB_VERSION_MAJOR
31994 #       define DB_VERSION_MAJOR 1
31995 #endif
31996 #if DB_VERSION_MAJOR == 2
31997 __db_version
31998 #endif
31999
32000 _ACEOF
32001 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32002   $EGREP "__db_version" >/dev/null 2>&1; then
32003   ol_cv_bdb_major=2
32004 else
32005   :
32006 fi
32007 rm -f conftest*
32008
32009         fi
32010         if test $ol_cv_bdb_major = 0 ; then
32011                 cat >conftest.$ac_ext <<_ACEOF
32012 /* confdefs.h.  */
32013 _ACEOF
32014 cat confdefs.h >>conftest.$ac_ext
32015 cat >>conftest.$ac_ext <<_ACEOF
32016 /* end confdefs.h.  */
32017
32018 #include <db.h>
32019 #ifndef DB_VERSION_MAJOR
32020 #       define DB_VERSION_MAJOR 1
32021 #endif
32022 #if DB_VERSION_MAJOR == 1
32023 __db_version
32024 #endif
32025
32026 _ACEOF
32027 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32028   $EGREP "__db_version" >/dev/null 2>&1; then
32029   ol_cv_bdb_major=1
32030 else
32031   :
32032 fi
32033 rm -f conftest*
32034
32035         fi
32036
32037         if test $ol_cv_bdb_major = 0 ; then
32038                 { { echo "$as_me:$LINENO: error: Unknown Berkeley DB major version" >&5
32039 echo "$as_me: error: Unknown Berkeley DB major version" >&2;}
32040    { (exit 1); exit 1; }; }
32041         fi
32042
32043 fi
32044 echo "$as_me:$LINENO: result: $ol_cv_bdb_major" >&5
32045 echo "${ECHO_T}$ol_cv_bdb_major" >&6
32046
32047 echo "$as_me:$LINENO: checking for Berkeley DB minor version" >&5
32048 echo $ECHO_N "checking for Berkeley DB minor version... $ECHO_C" >&6
32049 if test "${ol_cv_bdb_minor+set}" = set; then
32050   echo $ECHO_N "(cached) $ECHO_C" >&6
32051 else
32052
32053         ol_cv_bdb_minor=0
32054         if test $ol_cv_bdb_minor = 0 ; then
32055                 cat >conftest.$ac_ext <<_ACEOF
32056 /* confdefs.h.  */
32057 _ACEOF
32058 cat confdefs.h >>conftest.$ac_ext
32059 cat >>conftest.$ac_ext <<_ACEOF
32060 /* end confdefs.h.  */
32061
32062 #include <db.h>
32063 #ifndef DB_VERSION_MINOR
32064 #       define DB_VERSION_MINOR 0
32065 #endif
32066 #if DB_VERSION_MINOR == 9
32067 __db_version
32068 #endif
32069
32070 _ACEOF
32071 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32072   $EGREP "__db_version" >/dev/null 2>&1; then
32073   ol_cv_bdb_minor=9
32074 else
32075   :
32076 fi
32077 rm -f conftest*
32078
32079         fi
32080         if test $ol_cv_bdb_minor = 0 ; then
32081                 cat >conftest.$ac_ext <<_ACEOF
32082 /* confdefs.h.  */
32083 _ACEOF
32084 cat confdefs.h >>conftest.$ac_ext
32085 cat >>conftest.$ac_ext <<_ACEOF
32086 /* end confdefs.h.  */
32087
32088 #include <db.h>
32089 #ifndef DB_VERSION_MINOR
32090 #       define DB_VERSION_MINOR 0
32091 #endif
32092 #if DB_VERSION_MINOR == 8
32093 __db_version
32094 #endif
32095
32096 _ACEOF
32097 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32098   $EGREP "__db_version" >/dev/null 2>&1; then
32099   ol_cv_bdb_minor=8
32100 else
32101   :
32102 fi
32103 rm -f conftest*
32104
32105         fi
32106         if test $ol_cv_bdb_minor = 0 ; then
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 #include <db.h>
32115 #ifndef DB_VERSION_MINOR
32116 #       define DB_VERSION_MINOR 0
32117 #endif
32118 #if DB_VERSION_MINOR == 7
32119 __db_version
32120 #endif
32121
32122 _ACEOF
32123 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32124   $EGREP "__db_version" >/dev/null 2>&1; then
32125   ol_cv_bdb_minor=7
32126 else
32127   :
32128 fi
32129 rm -f conftest*
32130
32131         fi
32132         if test $ol_cv_bdb_minor = 0 ; then
32133                 cat >conftest.$ac_ext <<_ACEOF
32134 /* confdefs.h.  */
32135 _ACEOF
32136 cat confdefs.h >>conftest.$ac_ext
32137 cat >>conftest.$ac_ext <<_ACEOF
32138 /* end confdefs.h.  */
32139
32140 #include <db.h>
32141 #ifndef DB_VERSION_MINOR
32142 #       define DB_VERSION_MINOR 0
32143 #endif
32144 #if DB_VERSION_MINOR == 6
32145 __db_version
32146 #endif
32147
32148 _ACEOF
32149 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32150   $EGREP "__db_version" >/dev/null 2>&1; then
32151   ol_cv_bdb_minor=6
32152 else
32153   :
32154 fi
32155 rm -f conftest*
32156
32157         fi
32158         if test $ol_cv_bdb_minor = 0 ; then
32159                 cat >conftest.$ac_ext <<_ACEOF
32160 /* confdefs.h.  */
32161 _ACEOF
32162 cat confdefs.h >>conftest.$ac_ext
32163 cat >>conftest.$ac_ext <<_ACEOF
32164 /* end confdefs.h.  */
32165
32166 #include <db.h>
32167 #ifndef DB_VERSION_MINOR
32168 #       define DB_VERSION_MINOR 0
32169 #endif
32170 #if DB_VERSION_MINOR == 5
32171 __db_version
32172 #endif
32173
32174 _ACEOF
32175 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32176   $EGREP "__db_version" >/dev/null 2>&1; then
32177   ol_cv_bdb_minor=5
32178 else
32179   :
32180 fi
32181 rm -f conftest*
32182
32183         fi
32184         if test $ol_cv_bdb_minor = 0 ; then
32185                 cat >conftest.$ac_ext <<_ACEOF
32186 /* confdefs.h.  */
32187 _ACEOF
32188 cat confdefs.h >>conftest.$ac_ext
32189 cat >>conftest.$ac_ext <<_ACEOF
32190 /* end confdefs.h.  */
32191
32192 #include <db.h>
32193 #ifndef DB_VERSION_MINOR
32194 #       define DB_VERSION_MINOR 0
32195 #endif
32196 #if DB_VERSION_MINOR == 4
32197 __db_version
32198 #endif
32199
32200 _ACEOF
32201 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32202   $EGREP "__db_version" >/dev/null 2>&1; then
32203   ol_cv_bdb_minor=4
32204 else
32205   :
32206 fi
32207 rm -f conftest*
32208
32209         fi
32210         if test $ol_cv_bdb_minor = 0 ; then
32211                 cat >conftest.$ac_ext <<_ACEOF
32212 /* confdefs.h.  */
32213 _ACEOF
32214 cat confdefs.h >>conftest.$ac_ext
32215 cat >>conftest.$ac_ext <<_ACEOF
32216 /* end confdefs.h.  */
32217
32218 #include <db.h>
32219 #ifndef DB_VERSION_MINOR
32220 #       define DB_VERSION_MINOR 0
32221 #endif
32222 #if DB_VERSION_MINOR == 3
32223 __db_version
32224 #endif
32225
32226 _ACEOF
32227 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32228   $EGREP "__db_version" >/dev/null 2>&1; then
32229   ol_cv_bdb_minor=3
32230 else
32231   :
32232 fi
32233 rm -f conftest*
32234
32235         fi
32236         if test $ol_cv_bdb_minor = 0 ; then
32237                 cat >conftest.$ac_ext <<_ACEOF
32238 /* confdefs.h.  */
32239 _ACEOF
32240 cat confdefs.h >>conftest.$ac_ext
32241 cat >>conftest.$ac_ext <<_ACEOF
32242 /* end confdefs.h.  */
32243
32244 #include <db.h>
32245 #ifndef DB_VERSION_MINOR
32246 #       define DB_VERSION_MINOR 0
32247 #endif
32248 #if DB_VERSION_MINOR == 2
32249 __db_version
32250 #endif
32251
32252 _ACEOF
32253 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32254   $EGREP "__db_version" >/dev/null 2>&1; then
32255   ol_cv_bdb_minor=2
32256 else
32257   :
32258 fi
32259 rm -f conftest*
32260
32261         fi
32262         if test $ol_cv_bdb_minor = 0 ; then
32263                 cat >conftest.$ac_ext <<_ACEOF
32264 /* confdefs.h.  */
32265 _ACEOF
32266 cat confdefs.h >>conftest.$ac_ext
32267 cat >>conftest.$ac_ext <<_ACEOF
32268 /* end confdefs.h.  */
32269
32270 #include <db.h>
32271 #ifndef DB_VERSION_MINOR
32272 #       define DB_VERSION_MINOR 0
32273 #endif
32274 #if DB_VERSION_MINOR == 1
32275 __db_version
32276 #endif
32277
32278 _ACEOF
32279 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32280   $EGREP "__db_version" >/dev/null 2>&1; then
32281   ol_cv_bdb_minor=1
32282 else
32283   :
32284 fi
32285 rm -f conftest*
32286
32287         fi
32288
32289 fi
32290 echo "$as_me:$LINENO: result: $ol_cv_bdb_minor" >&5
32291 echo "${ECHO_T}$ol_cv_bdb_minor" >&6
32292
32293 if test $ol_cv_bdb_major = 4 ; then
32294         if test $ol_cv_bdb_minor = 5 ; then
32295                 if test $ol_cv_lib_db = no ; then
32296         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb45)" >&5
32297 echo $ECHO_N "checking for Berkeley DB link (-ldb45)... $ECHO_C" >&6
32298 if test "${ol_cv_db_db45+set}" = set; then
32299   echo $ECHO_N "(cached) $ECHO_C" >&6
32300 else
32301
32302         ol_DB_LIB=-ldb45
32303         ol_LIBS=$LIBS
32304         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32305
32306         cat >conftest.$ac_ext <<_ACEOF
32307 /* confdefs.h.  */
32308 _ACEOF
32309 cat confdefs.h >>conftest.$ac_ext
32310 cat >>conftest.$ac_ext <<_ACEOF
32311 /* end confdefs.h.  */
32312
32313 #ifdef HAVE_DB_185_H
32314 # include <db_185.h>
32315 #else
32316 # include <db.h>
32317 #endif
32318
32319 #ifndef DB_VERSION_MAJOR
32320 # define DB_VERSION_MAJOR 1
32321 #endif
32322
32323 #ifndef NULL
32324 #define NULL ((void*)0)
32325 #endif
32326
32327 int
32328 main ()
32329 {
32330
32331 #if DB_VERSION_MAJOR > 1
32332         {
32333                 char *version;
32334                 int major, minor, patch;
32335
32336                 version = db_version( &major, &minor, &patch );
32337
32338                 if( major != DB_VERSION_MAJOR ||
32339                         minor < DB_VERSION_MINOR )
32340                 {
32341                         printf("Berkeley DB version mismatch\n"
32342                                 "\theader: %s\n\tlibrary: %s\n",
32343                                 DB_VERSION_STRING, version);
32344                         return 1;
32345                 }
32346         }
32347 #endif
32348
32349 #if DB_VERSION_MAJOR > 2
32350         db_env_create( NULL, 0 );
32351 #elif DB_VERSION_MAJOR > 1
32352         db_appexit( NULL );
32353 #else
32354         (void) dbopen( NULL, 0, 0, 0, NULL);
32355 #endif
32356
32357   ;
32358   return 0;
32359 }
32360 _ACEOF
32361 rm -f conftest.$ac_objext conftest$ac_exeext
32362 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32363   (eval $ac_link) 2>conftest.er1
32364   ac_status=$?
32365   grep -v '^ *+' conftest.er1 >conftest.err
32366   rm -f conftest.er1
32367   cat conftest.err >&5
32368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32369   (exit $ac_status); } &&
32370          { ac_try='test -z "$ac_c_werror_flag"
32371                          || test ! -s conftest.err'
32372   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32373   (eval $ac_try) 2>&5
32374   ac_status=$?
32375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32376   (exit $ac_status); }; } &&
32377          { ac_try='test -s conftest$ac_exeext'
32378   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32379   (eval $ac_try) 2>&5
32380   ac_status=$?
32381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32382   (exit $ac_status); }; }; then
32383   ol_cv_db_db45=yes
32384 else
32385   echo "$as_me: failed program was:" >&5
32386 sed 's/^/| /' conftest.$ac_ext >&5
32387
32388 ol_cv_db_db45=no
32389 fi
32390 rm -f conftest.err conftest.$ac_objext \
32391       conftest$ac_exeext conftest.$ac_ext
32392
32393         LIBS="$ol_LIBS"
32394
32395 fi
32396 echo "$as_me:$LINENO: result: $ol_cv_db_db45" >&5
32397 echo "${ECHO_T}$ol_cv_db_db45" >&6
32398
32399         if test $ol_cv_db_db45 = yes ; then
32400                 ol_cv_lib_db=-ldb45
32401         fi
32402 fi
32403
32404                 if test $ol_cv_lib_db = no ; then
32405         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-45)" >&5
32406 echo $ECHO_N "checking for Berkeley DB link (-ldb-45)... $ECHO_C" >&6
32407 if test "${ol_cv_db_db_45+set}" = set; then
32408   echo $ECHO_N "(cached) $ECHO_C" >&6
32409 else
32410
32411         ol_DB_LIB=-ldb-45
32412         ol_LIBS=$LIBS
32413         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32414
32415         cat >conftest.$ac_ext <<_ACEOF
32416 /* confdefs.h.  */
32417 _ACEOF
32418 cat confdefs.h >>conftest.$ac_ext
32419 cat >>conftest.$ac_ext <<_ACEOF
32420 /* end confdefs.h.  */
32421
32422 #ifdef HAVE_DB_185_H
32423 # include <db_185.h>
32424 #else
32425 # include <db.h>
32426 #endif
32427
32428 #ifndef DB_VERSION_MAJOR
32429 # define DB_VERSION_MAJOR 1
32430 #endif
32431
32432 #ifndef NULL
32433 #define NULL ((void*)0)
32434 #endif
32435
32436 int
32437 main ()
32438 {
32439
32440 #if DB_VERSION_MAJOR > 1
32441         {
32442                 char *version;
32443                 int major, minor, patch;
32444
32445                 version = db_version( &major, &minor, &patch );
32446
32447                 if( major != DB_VERSION_MAJOR ||
32448                         minor < DB_VERSION_MINOR )
32449                 {
32450                         printf("Berkeley DB version mismatch\n"
32451                                 "\theader: %s\n\tlibrary: %s\n",
32452                                 DB_VERSION_STRING, version);
32453                         return 1;
32454                 }
32455         }
32456 #endif
32457
32458 #if DB_VERSION_MAJOR > 2
32459         db_env_create( NULL, 0 );
32460 #elif DB_VERSION_MAJOR > 1
32461         db_appexit( NULL );
32462 #else
32463         (void) dbopen( NULL, 0, 0, 0, NULL);
32464 #endif
32465
32466   ;
32467   return 0;
32468 }
32469 _ACEOF
32470 rm -f conftest.$ac_objext conftest$ac_exeext
32471 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32472   (eval $ac_link) 2>conftest.er1
32473   ac_status=$?
32474   grep -v '^ *+' conftest.er1 >conftest.err
32475   rm -f conftest.er1
32476   cat conftest.err >&5
32477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32478   (exit $ac_status); } &&
32479          { ac_try='test -z "$ac_c_werror_flag"
32480                          || test ! -s conftest.err'
32481   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32482   (eval $ac_try) 2>&5
32483   ac_status=$?
32484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32485   (exit $ac_status); }; } &&
32486          { ac_try='test -s conftest$ac_exeext'
32487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32488   (eval $ac_try) 2>&5
32489   ac_status=$?
32490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32491   (exit $ac_status); }; }; then
32492   ol_cv_db_db_45=yes
32493 else
32494   echo "$as_me: failed program was:" >&5
32495 sed 's/^/| /' conftest.$ac_ext >&5
32496
32497 ol_cv_db_db_45=no
32498 fi
32499 rm -f conftest.err conftest.$ac_objext \
32500       conftest$ac_exeext conftest.$ac_ext
32501
32502         LIBS="$ol_LIBS"
32503
32504 fi
32505 echo "$as_me:$LINENO: result: $ol_cv_db_db_45" >&5
32506 echo "${ECHO_T}$ol_cv_db_db_45" >&6
32507
32508         if test $ol_cv_db_db_45 = yes ; then
32509                 ol_cv_lib_db=-ldb-45
32510         fi
32511 fi
32512
32513                 if test $ol_cv_lib_db = no ; then
32514         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.5)" >&5
32515 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.5)... $ECHO_C" >&6
32516 if test "${ol_cv_db_db_4_dot_5+set}" = set; then
32517   echo $ECHO_N "(cached) $ECHO_C" >&6
32518 else
32519
32520         ol_DB_LIB=-ldb-4.5
32521         ol_LIBS=$LIBS
32522         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32523
32524         cat >conftest.$ac_ext <<_ACEOF
32525 /* confdefs.h.  */
32526 _ACEOF
32527 cat confdefs.h >>conftest.$ac_ext
32528 cat >>conftest.$ac_ext <<_ACEOF
32529 /* end confdefs.h.  */
32530
32531 #ifdef HAVE_DB_185_H
32532 # include <db_185.h>
32533 #else
32534 # include <db.h>
32535 #endif
32536
32537 #ifndef DB_VERSION_MAJOR
32538 # define DB_VERSION_MAJOR 1
32539 #endif
32540
32541 #ifndef NULL
32542 #define NULL ((void*)0)
32543 #endif
32544
32545 int
32546 main ()
32547 {
32548
32549 #if DB_VERSION_MAJOR > 1
32550         {
32551                 char *version;
32552                 int major, minor, patch;
32553
32554                 version = db_version( &major, &minor, &patch );
32555
32556                 if( major != DB_VERSION_MAJOR ||
32557                         minor < DB_VERSION_MINOR )
32558                 {
32559                         printf("Berkeley DB version mismatch\n"
32560                                 "\theader: %s\n\tlibrary: %s\n",
32561                                 DB_VERSION_STRING, version);
32562                         return 1;
32563                 }
32564         }
32565 #endif
32566
32567 #if DB_VERSION_MAJOR > 2
32568         db_env_create( NULL, 0 );
32569 #elif DB_VERSION_MAJOR > 1
32570         db_appexit( NULL );
32571 #else
32572         (void) dbopen( NULL, 0, 0, 0, NULL);
32573 #endif
32574
32575   ;
32576   return 0;
32577 }
32578 _ACEOF
32579 rm -f conftest.$ac_objext conftest$ac_exeext
32580 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32581   (eval $ac_link) 2>conftest.er1
32582   ac_status=$?
32583   grep -v '^ *+' conftest.er1 >conftest.err
32584   rm -f conftest.er1
32585   cat conftest.err >&5
32586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32587   (exit $ac_status); } &&
32588          { ac_try='test -z "$ac_c_werror_flag"
32589                          || test ! -s conftest.err'
32590   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32591   (eval $ac_try) 2>&5
32592   ac_status=$?
32593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32594   (exit $ac_status); }; } &&
32595          { ac_try='test -s conftest$ac_exeext'
32596   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32597   (eval $ac_try) 2>&5
32598   ac_status=$?
32599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32600   (exit $ac_status); }; }; then
32601   ol_cv_db_db_4_dot_5=yes
32602 else
32603   echo "$as_me: failed program was:" >&5
32604 sed 's/^/| /' conftest.$ac_ext >&5
32605
32606 ol_cv_db_db_4_dot_5=no
32607 fi
32608 rm -f conftest.err conftest.$ac_objext \
32609       conftest$ac_exeext conftest.$ac_ext
32610
32611         LIBS="$ol_LIBS"
32612
32613 fi
32614 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_5" >&5
32615 echo "${ECHO_T}$ol_cv_db_db_4_dot_5" >&6
32616
32617         if test $ol_cv_db_db_4_dot_5 = yes ; then
32618                 ol_cv_lib_db=-ldb-4.5
32619         fi
32620 fi
32621
32622                 if test $ol_cv_lib_db = no ; then
32623         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-5)" >&5
32624 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-5)... $ECHO_C" >&6
32625 if test "${ol_cv_db_db_4_5+set}" = set; then
32626   echo $ECHO_N "(cached) $ECHO_C" >&6
32627 else
32628
32629         ol_DB_LIB=-ldb-4-5
32630         ol_LIBS=$LIBS
32631         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32632
32633         cat >conftest.$ac_ext <<_ACEOF
32634 /* confdefs.h.  */
32635 _ACEOF
32636 cat confdefs.h >>conftest.$ac_ext
32637 cat >>conftest.$ac_ext <<_ACEOF
32638 /* end confdefs.h.  */
32639
32640 #ifdef HAVE_DB_185_H
32641 # include <db_185.h>
32642 #else
32643 # include <db.h>
32644 #endif
32645
32646 #ifndef DB_VERSION_MAJOR
32647 # define DB_VERSION_MAJOR 1
32648 #endif
32649
32650 #ifndef NULL
32651 #define NULL ((void*)0)
32652 #endif
32653
32654 int
32655 main ()
32656 {
32657
32658 #if DB_VERSION_MAJOR > 1
32659         {
32660                 char *version;
32661                 int major, minor, patch;
32662
32663                 version = db_version( &major, &minor, &patch );
32664
32665                 if( major != DB_VERSION_MAJOR ||
32666                         minor < DB_VERSION_MINOR )
32667                 {
32668                         printf("Berkeley DB version mismatch\n"
32669                                 "\theader: %s\n\tlibrary: %s\n",
32670                                 DB_VERSION_STRING, version);
32671                         return 1;
32672                 }
32673         }
32674 #endif
32675
32676 #if DB_VERSION_MAJOR > 2
32677         db_env_create( NULL, 0 );
32678 #elif DB_VERSION_MAJOR > 1
32679         db_appexit( NULL );
32680 #else
32681         (void) dbopen( NULL, 0, 0, 0, NULL);
32682 #endif
32683
32684   ;
32685   return 0;
32686 }
32687 _ACEOF
32688 rm -f conftest.$ac_objext conftest$ac_exeext
32689 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32690   (eval $ac_link) 2>conftest.er1
32691   ac_status=$?
32692   grep -v '^ *+' conftest.er1 >conftest.err
32693   rm -f conftest.er1
32694   cat conftest.err >&5
32695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32696   (exit $ac_status); } &&
32697          { ac_try='test -z "$ac_c_werror_flag"
32698                          || test ! -s conftest.err'
32699   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32700   (eval $ac_try) 2>&5
32701   ac_status=$?
32702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32703   (exit $ac_status); }; } &&
32704          { ac_try='test -s conftest$ac_exeext'
32705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32706   (eval $ac_try) 2>&5
32707   ac_status=$?
32708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32709   (exit $ac_status); }; }; then
32710   ol_cv_db_db_4_5=yes
32711 else
32712   echo "$as_me: failed program was:" >&5
32713 sed 's/^/| /' conftest.$ac_ext >&5
32714
32715 ol_cv_db_db_4_5=no
32716 fi
32717 rm -f conftest.err conftest.$ac_objext \
32718       conftest$ac_exeext conftest.$ac_ext
32719
32720         LIBS="$ol_LIBS"
32721
32722 fi
32723 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_5" >&5
32724 echo "${ECHO_T}$ol_cv_db_db_4_5" >&6
32725
32726         if test $ol_cv_db_db_4_5 = yes ; then
32727                 ol_cv_lib_db=-ldb-4-5
32728         fi
32729 fi
32730
32731         elif test $ol_cv_bdb_minor = 4 ; then
32732                 if test $ol_cv_lib_db = no ; then
32733         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb44)" >&5
32734 echo $ECHO_N "checking for Berkeley DB link (-ldb44)... $ECHO_C" >&6
32735 if test "${ol_cv_db_db44+set}" = set; then
32736   echo $ECHO_N "(cached) $ECHO_C" >&6
32737 else
32738
32739         ol_DB_LIB=-ldb44
32740         ol_LIBS=$LIBS
32741         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32742
32743         cat >conftest.$ac_ext <<_ACEOF
32744 /* confdefs.h.  */
32745 _ACEOF
32746 cat confdefs.h >>conftest.$ac_ext
32747 cat >>conftest.$ac_ext <<_ACEOF
32748 /* end confdefs.h.  */
32749
32750 #ifdef HAVE_DB_185_H
32751 # include <db_185.h>
32752 #else
32753 # include <db.h>
32754 #endif
32755
32756 #ifndef DB_VERSION_MAJOR
32757 # define DB_VERSION_MAJOR 1
32758 #endif
32759
32760 #ifndef NULL
32761 #define NULL ((void*)0)
32762 #endif
32763
32764 int
32765 main ()
32766 {
32767
32768 #if DB_VERSION_MAJOR > 1
32769         {
32770                 char *version;
32771                 int major, minor, patch;
32772
32773                 version = db_version( &major, &minor, &patch );
32774
32775                 if( major != DB_VERSION_MAJOR ||
32776                         minor < DB_VERSION_MINOR )
32777                 {
32778                         printf("Berkeley DB version mismatch\n"
32779                                 "\theader: %s\n\tlibrary: %s\n",
32780                                 DB_VERSION_STRING, version);
32781                         return 1;
32782                 }
32783         }
32784 #endif
32785
32786 #if DB_VERSION_MAJOR > 2
32787         db_env_create( NULL, 0 );
32788 #elif DB_VERSION_MAJOR > 1
32789         db_appexit( NULL );
32790 #else
32791         (void) dbopen( NULL, 0, 0, 0, NULL);
32792 #endif
32793
32794   ;
32795   return 0;
32796 }
32797 _ACEOF
32798 rm -f conftest.$ac_objext conftest$ac_exeext
32799 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32800   (eval $ac_link) 2>conftest.er1
32801   ac_status=$?
32802   grep -v '^ *+' conftest.er1 >conftest.err
32803   rm -f conftest.er1
32804   cat conftest.err >&5
32805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32806   (exit $ac_status); } &&
32807          { ac_try='test -z "$ac_c_werror_flag"
32808                          || test ! -s conftest.err'
32809   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32810   (eval $ac_try) 2>&5
32811   ac_status=$?
32812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32813   (exit $ac_status); }; } &&
32814          { ac_try='test -s conftest$ac_exeext'
32815   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32816   (eval $ac_try) 2>&5
32817   ac_status=$?
32818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32819   (exit $ac_status); }; }; then
32820   ol_cv_db_db44=yes
32821 else
32822   echo "$as_me: failed program was:" >&5
32823 sed 's/^/| /' conftest.$ac_ext >&5
32824
32825 ol_cv_db_db44=no
32826 fi
32827 rm -f conftest.err conftest.$ac_objext \
32828       conftest$ac_exeext conftest.$ac_ext
32829
32830         LIBS="$ol_LIBS"
32831
32832 fi
32833 echo "$as_me:$LINENO: result: $ol_cv_db_db44" >&5
32834 echo "${ECHO_T}$ol_cv_db_db44" >&6
32835
32836         if test $ol_cv_db_db44 = yes ; then
32837                 ol_cv_lib_db=-ldb44
32838         fi
32839 fi
32840
32841                 if test $ol_cv_lib_db = no ; then
32842         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-44)" >&5
32843 echo $ECHO_N "checking for Berkeley DB link (-ldb-44)... $ECHO_C" >&6
32844 if test "${ol_cv_db_db_44+set}" = set; then
32845   echo $ECHO_N "(cached) $ECHO_C" >&6
32846 else
32847
32848         ol_DB_LIB=-ldb-44
32849         ol_LIBS=$LIBS
32850         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32851
32852         cat >conftest.$ac_ext <<_ACEOF
32853 /* confdefs.h.  */
32854 _ACEOF
32855 cat confdefs.h >>conftest.$ac_ext
32856 cat >>conftest.$ac_ext <<_ACEOF
32857 /* end confdefs.h.  */
32858
32859 #ifdef HAVE_DB_185_H
32860 # include <db_185.h>
32861 #else
32862 # include <db.h>
32863 #endif
32864
32865 #ifndef DB_VERSION_MAJOR
32866 # define DB_VERSION_MAJOR 1
32867 #endif
32868
32869 #ifndef NULL
32870 #define NULL ((void*)0)
32871 #endif
32872
32873 int
32874 main ()
32875 {
32876
32877 #if DB_VERSION_MAJOR > 1
32878         {
32879                 char *version;
32880                 int major, minor, patch;
32881
32882                 version = db_version( &major, &minor, &patch );
32883
32884                 if( major != DB_VERSION_MAJOR ||
32885                         minor < DB_VERSION_MINOR )
32886                 {
32887                         printf("Berkeley DB version mismatch\n"
32888                                 "\theader: %s\n\tlibrary: %s\n",
32889                                 DB_VERSION_STRING, version);
32890                         return 1;
32891                 }
32892         }
32893 #endif
32894
32895 #if DB_VERSION_MAJOR > 2
32896         db_env_create( NULL, 0 );
32897 #elif DB_VERSION_MAJOR > 1
32898         db_appexit( NULL );
32899 #else
32900         (void) dbopen( NULL, 0, 0, 0, NULL);
32901 #endif
32902
32903   ;
32904   return 0;
32905 }
32906 _ACEOF
32907 rm -f conftest.$ac_objext conftest$ac_exeext
32908 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32909   (eval $ac_link) 2>conftest.er1
32910   ac_status=$?
32911   grep -v '^ *+' conftest.er1 >conftest.err
32912   rm -f conftest.er1
32913   cat conftest.err >&5
32914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32915   (exit $ac_status); } &&
32916          { ac_try='test -z "$ac_c_werror_flag"
32917                          || test ! -s conftest.err'
32918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32919   (eval $ac_try) 2>&5
32920   ac_status=$?
32921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32922   (exit $ac_status); }; } &&
32923          { ac_try='test -s conftest$ac_exeext'
32924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32925   (eval $ac_try) 2>&5
32926   ac_status=$?
32927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32928   (exit $ac_status); }; }; then
32929   ol_cv_db_db_44=yes
32930 else
32931   echo "$as_me: failed program was:" >&5
32932 sed 's/^/| /' conftest.$ac_ext >&5
32933
32934 ol_cv_db_db_44=no
32935 fi
32936 rm -f conftest.err conftest.$ac_objext \
32937       conftest$ac_exeext conftest.$ac_ext
32938
32939         LIBS="$ol_LIBS"
32940
32941 fi
32942 echo "$as_me:$LINENO: result: $ol_cv_db_db_44" >&5
32943 echo "${ECHO_T}$ol_cv_db_db_44" >&6
32944
32945         if test $ol_cv_db_db_44 = yes ; then
32946                 ol_cv_lib_db=-ldb-44
32947         fi
32948 fi
32949
32950                 if test $ol_cv_lib_db = no ; then
32951         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.4)" >&5
32952 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.4)... $ECHO_C" >&6
32953 if test "${ol_cv_db_db_4_dot_4+set}" = set; then
32954   echo $ECHO_N "(cached) $ECHO_C" >&6
32955 else
32956
32957         ol_DB_LIB=-ldb-4.4
32958         ol_LIBS=$LIBS
32959         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32960
32961         cat >conftest.$ac_ext <<_ACEOF
32962 /* confdefs.h.  */
32963 _ACEOF
32964 cat confdefs.h >>conftest.$ac_ext
32965 cat >>conftest.$ac_ext <<_ACEOF
32966 /* end confdefs.h.  */
32967
32968 #ifdef HAVE_DB_185_H
32969 # include <db_185.h>
32970 #else
32971 # include <db.h>
32972 #endif
32973
32974 #ifndef DB_VERSION_MAJOR
32975 # define DB_VERSION_MAJOR 1
32976 #endif
32977
32978 #ifndef NULL
32979 #define NULL ((void*)0)
32980 #endif
32981
32982 int
32983 main ()
32984 {
32985
32986 #if DB_VERSION_MAJOR > 1
32987         {
32988                 char *version;
32989                 int major, minor, patch;
32990
32991                 version = db_version( &major, &minor, &patch );
32992
32993                 if( major != DB_VERSION_MAJOR ||
32994                         minor < DB_VERSION_MINOR )
32995                 {
32996                         printf("Berkeley DB version mismatch\n"
32997                                 "\theader: %s\n\tlibrary: %s\n",
32998                                 DB_VERSION_STRING, version);
32999                         return 1;
33000                 }
33001         }
33002 #endif
33003
33004 #if DB_VERSION_MAJOR > 2
33005         db_env_create( NULL, 0 );
33006 #elif DB_VERSION_MAJOR > 1
33007         db_appexit( NULL );
33008 #else
33009         (void) dbopen( NULL, 0, 0, 0, NULL);
33010 #endif
33011
33012   ;
33013   return 0;
33014 }
33015 _ACEOF
33016 rm -f conftest.$ac_objext conftest$ac_exeext
33017 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33018   (eval $ac_link) 2>conftest.er1
33019   ac_status=$?
33020   grep -v '^ *+' conftest.er1 >conftest.err
33021   rm -f conftest.er1
33022   cat conftest.err >&5
33023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33024   (exit $ac_status); } &&
33025          { ac_try='test -z "$ac_c_werror_flag"
33026                          || test ! -s conftest.err'
33027   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33028   (eval $ac_try) 2>&5
33029   ac_status=$?
33030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33031   (exit $ac_status); }; } &&
33032          { ac_try='test -s conftest$ac_exeext'
33033   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33034   (eval $ac_try) 2>&5
33035   ac_status=$?
33036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33037   (exit $ac_status); }; }; then
33038   ol_cv_db_db_4_dot_4=yes
33039 else
33040   echo "$as_me: failed program was:" >&5
33041 sed 's/^/| /' conftest.$ac_ext >&5
33042
33043 ol_cv_db_db_4_dot_4=no
33044 fi
33045 rm -f conftest.err conftest.$ac_objext \
33046       conftest$ac_exeext conftest.$ac_ext
33047
33048         LIBS="$ol_LIBS"
33049
33050 fi
33051 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_4" >&5
33052 echo "${ECHO_T}$ol_cv_db_db_4_dot_4" >&6
33053
33054         if test $ol_cv_db_db_4_dot_4 = yes ; then
33055                 ol_cv_lib_db=-ldb-4.4
33056         fi
33057 fi
33058
33059                 if test $ol_cv_lib_db = no ; then
33060         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-4)" >&5
33061 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-4)... $ECHO_C" >&6
33062 if test "${ol_cv_db_db_4_4+set}" = set; then
33063   echo $ECHO_N "(cached) $ECHO_C" >&6
33064 else
33065
33066         ol_DB_LIB=-ldb-4-4
33067         ol_LIBS=$LIBS
33068         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33069
33070         cat >conftest.$ac_ext <<_ACEOF
33071 /* confdefs.h.  */
33072 _ACEOF
33073 cat confdefs.h >>conftest.$ac_ext
33074 cat >>conftest.$ac_ext <<_ACEOF
33075 /* end confdefs.h.  */
33076
33077 #ifdef HAVE_DB_185_H
33078 # include <db_185.h>
33079 #else
33080 # include <db.h>
33081 #endif
33082
33083 #ifndef DB_VERSION_MAJOR
33084 # define DB_VERSION_MAJOR 1
33085 #endif
33086
33087 #ifndef NULL
33088 #define NULL ((void*)0)
33089 #endif
33090
33091 int
33092 main ()
33093 {
33094
33095 #if DB_VERSION_MAJOR > 1
33096         {
33097                 char *version;
33098                 int major, minor, patch;
33099
33100                 version = db_version( &major, &minor, &patch );
33101
33102                 if( major != DB_VERSION_MAJOR ||
33103                         minor < DB_VERSION_MINOR )
33104                 {
33105                         printf("Berkeley DB version mismatch\n"
33106                                 "\theader: %s\n\tlibrary: %s\n",
33107                                 DB_VERSION_STRING, version);
33108                         return 1;
33109                 }
33110         }
33111 #endif
33112
33113 #if DB_VERSION_MAJOR > 2
33114         db_env_create( NULL, 0 );
33115 #elif DB_VERSION_MAJOR > 1
33116         db_appexit( NULL );
33117 #else
33118         (void) dbopen( NULL, 0, 0, 0, NULL);
33119 #endif
33120
33121   ;
33122   return 0;
33123 }
33124 _ACEOF
33125 rm -f conftest.$ac_objext conftest$ac_exeext
33126 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33127   (eval $ac_link) 2>conftest.er1
33128   ac_status=$?
33129   grep -v '^ *+' conftest.er1 >conftest.err
33130   rm -f conftest.er1
33131   cat conftest.err >&5
33132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33133   (exit $ac_status); } &&
33134          { ac_try='test -z "$ac_c_werror_flag"
33135                          || test ! -s conftest.err'
33136   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33137   (eval $ac_try) 2>&5
33138   ac_status=$?
33139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33140   (exit $ac_status); }; } &&
33141          { ac_try='test -s conftest$ac_exeext'
33142   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33143   (eval $ac_try) 2>&5
33144   ac_status=$?
33145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33146   (exit $ac_status); }; }; then
33147   ol_cv_db_db_4_4=yes
33148 else
33149   echo "$as_me: failed program was:" >&5
33150 sed 's/^/| /' conftest.$ac_ext >&5
33151
33152 ol_cv_db_db_4_4=no
33153 fi
33154 rm -f conftest.err conftest.$ac_objext \
33155       conftest$ac_exeext conftest.$ac_ext
33156
33157         LIBS="$ol_LIBS"
33158
33159 fi
33160 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_4" >&5
33161 echo "${ECHO_T}$ol_cv_db_db_4_4" >&6
33162
33163         if test $ol_cv_db_db_4_4 = yes ; then
33164                 ol_cv_lib_db=-ldb-4-4
33165         fi
33166 fi
33167
33168         elif test $ol_cv_bdb_minor = 3 ; then
33169                 if test $ol_cv_lib_db = no ; then
33170         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb43)" >&5
33171 echo $ECHO_N "checking for Berkeley DB link (-ldb43)... $ECHO_C" >&6
33172 if test "${ol_cv_db_db43+set}" = set; then
33173   echo $ECHO_N "(cached) $ECHO_C" >&6
33174 else
33175
33176         ol_DB_LIB=-ldb43
33177         ol_LIBS=$LIBS
33178         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33179
33180         cat >conftest.$ac_ext <<_ACEOF
33181 /* confdefs.h.  */
33182 _ACEOF
33183 cat confdefs.h >>conftest.$ac_ext
33184 cat >>conftest.$ac_ext <<_ACEOF
33185 /* end confdefs.h.  */
33186
33187 #ifdef HAVE_DB_185_H
33188 # include <db_185.h>
33189 #else
33190 # include <db.h>
33191 #endif
33192
33193 #ifndef DB_VERSION_MAJOR
33194 # define DB_VERSION_MAJOR 1
33195 #endif
33196
33197 #ifndef NULL
33198 #define NULL ((void*)0)
33199 #endif
33200
33201 int
33202 main ()
33203 {
33204
33205 #if DB_VERSION_MAJOR > 1
33206         {
33207                 char *version;
33208                 int major, minor, patch;
33209
33210                 version = db_version( &major, &minor, &patch );
33211
33212                 if( major != DB_VERSION_MAJOR ||
33213                         minor < DB_VERSION_MINOR )
33214                 {
33215                         printf("Berkeley DB version mismatch\n"
33216                                 "\theader: %s\n\tlibrary: %s\n",
33217                                 DB_VERSION_STRING, version);
33218                         return 1;
33219                 }
33220         }
33221 #endif
33222
33223 #if DB_VERSION_MAJOR > 2
33224         db_env_create( NULL, 0 );
33225 #elif DB_VERSION_MAJOR > 1
33226         db_appexit( NULL );
33227 #else
33228         (void) dbopen( NULL, 0, 0, 0, NULL);
33229 #endif
33230
33231   ;
33232   return 0;
33233 }
33234 _ACEOF
33235 rm -f conftest.$ac_objext conftest$ac_exeext
33236 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33237   (eval $ac_link) 2>conftest.er1
33238   ac_status=$?
33239   grep -v '^ *+' conftest.er1 >conftest.err
33240   rm -f conftest.er1
33241   cat conftest.err >&5
33242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33243   (exit $ac_status); } &&
33244          { ac_try='test -z "$ac_c_werror_flag"
33245                          || test ! -s conftest.err'
33246   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33247   (eval $ac_try) 2>&5
33248   ac_status=$?
33249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33250   (exit $ac_status); }; } &&
33251          { ac_try='test -s conftest$ac_exeext'
33252   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33253   (eval $ac_try) 2>&5
33254   ac_status=$?
33255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33256   (exit $ac_status); }; }; then
33257   ol_cv_db_db43=yes
33258 else
33259   echo "$as_me: failed program was:" >&5
33260 sed 's/^/| /' conftest.$ac_ext >&5
33261
33262 ol_cv_db_db43=no
33263 fi
33264 rm -f conftest.err conftest.$ac_objext \
33265       conftest$ac_exeext conftest.$ac_ext
33266
33267         LIBS="$ol_LIBS"
33268
33269 fi
33270 echo "$as_me:$LINENO: result: $ol_cv_db_db43" >&5
33271 echo "${ECHO_T}$ol_cv_db_db43" >&6
33272
33273         if test $ol_cv_db_db43 = yes ; then
33274                 ol_cv_lib_db=-ldb43
33275         fi
33276 fi
33277
33278                 if test $ol_cv_lib_db = no ; then
33279         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-43)" >&5
33280 echo $ECHO_N "checking for Berkeley DB link (-ldb-43)... $ECHO_C" >&6
33281 if test "${ol_cv_db_db_43+set}" = set; then
33282   echo $ECHO_N "(cached) $ECHO_C" >&6
33283 else
33284
33285         ol_DB_LIB=-ldb-43
33286         ol_LIBS=$LIBS
33287         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33288
33289         cat >conftest.$ac_ext <<_ACEOF
33290 /* confdefs.h.  */
33291 _ACEOF
33292 cat confdefs.h >>conftest.$ac_ext
33293 cat >>conftest.$ac_ext <<_ACEOF
33294 /* end confdefs.h.  */
33295
33296 #ifdef HAVE_DB_185_H
33297 # include <db_185.h>
33298 #else
33299 # include <db.h>
33300 #endif
33301
33302 #ifndef DB_VERSION_MAJOR
33303 # define DB_VERSION_MAJOR 1
33304 #endif
33305
33306 #ifndef NULL
33307 #define NULL ((void*)0)
33308 #endif
33309
33310 int
33311 main ()
33312 {
33313
33314 #if DB_VERSION_MAJOR > 1
33315         {
33316                 char *version;
33317                 int major, minor, patch;
33318
33319                 version = db_version( &major, &minor, &patch );
33320
33321                 if( major != DB_VERSION_MAJOR ||
33322                         minor < DB_VERSION_MINOR )
33323                 {
33324                         printf("Berkeley DB version mismatch\n"
33325                                 "\theader: %s\n\tlibrary: %s\n",
33326                                 DB_VERSION_STRING, version);
33327                         return 1;
33328                 }
33329         }
33330 #endif
33331
33332 #if DB_VERSION_MAJOR > 2
33333         db_env_create( NULL, 0 );
33334 #elif DB_VERSION_MAJOR > 1
33335         db_appexit( NULL );
33336 #else
33337         (void) dbopen( NULL, 0, 0, 0, NULL);
33338 #endif
33339
33340   ;
33341   return 0;
33342 }
33343 _ACEOF
33344 rm -f conftest.$ac_objext conftest$ac_exeext
33345 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33346   (eval $ac_link) 2>conftest.er1
33347   ac_status=$?
33348   grep -v '^ *+' conftest.er1 >conftest.err
33349   rm -f conftest.er1
33350   cat conftest.err >&5
33351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33352   (exit $ac_status); } &&
33353          { ac_try='test -z "$ac_c_werror_flag"
33354                          || test ! -s conftest.err'
33355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33356   (eval $ac_try) 2>&5
33357   ac_status=$?
33358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33359   (exit $ac_status); }; } &&
33360          { ac_try='test -s conftest$ac_exeext'
33361   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33362   (eval $ac_try) 2>&5
33363   ac_status=$?
33364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33365   (exit $ac_status); }; }; then
33366   ol_cv_db_db_43=yes
33367 else
33368   echo "$as_me: failed program was:" >&5
33369 sed 's/^/| /' conftest.$ac_ext >&5
33370
33371 ol_cv_db_db_43=no
33372 fi
33373 rm -f conftest.err conftest.$ac_objext \
33374       conftest$ac_exeext conftest.$ac_ext
33375
33376         LIBS="$ol_LIBS"
33377
33378 fi
33379 echo "$as_me:$LINENO: result: $ol_cv_db_db_43" >&5
33380 echo "${ECHO_T}$ol_cv_db_db_43" >&6
33381
33382         if test $ol_cv_db_db_43 = yes ; then
33383                 ol_cv_lib_db=-ldb-43
33384         fi
33385 fi
33386
33387                 if test $ol_cv_lib_db = no ; then
33388         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.3)" >&5
33389 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.3)... $ECHO_C" >&6
33390 if test "${ol_cv_db_db_4_dot_3+set}" = set; then
33391   echo $ECHO_N "(cached) $ECHO_C" >&6
33392 else
33393
33394         ol_DB_LIB=-ldb-4.3
33395         ol_LIBS=$LIBS
33396         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33397
33398         cat >conftest.$ac_ext <<_ACEOF
33399 /* confdefs.h.  */
33400 _ACEOF
33401 cat confdefs.h >>conftest.$ac_ext
33402 cat >>conftest.$ac_ext <<_ACEOF
33403 /* end confdefs.h.  */
33404
33405 #ifdef HAVE_DB_185_H
33406 # include <db_185.h>
33407 #else
33408 # include <db.h>
33409 #endif
33410
33411 #ifndef DB_VERSION_MAJOR
33412 # define DB_VERSION_MAJOR 1
33413 #endif
33414
33415 #ifndef NULL
33416 #define NULL ((void*)0)
33417 #endif
33418
33419 int
33420 main ()
33421 {
33422
33423 #if DB_VERSION_MAJOR > 1
33424         {
33425                 char *version;
33426                 int major, minor, patch;
33427
33428                 version = db_version( &major, &minor, &patch );
33429
33430                 if( major != DB_VERSION_MAJOR ||
33431                         minor < DB_VERSION_MINOR )
33432                 {
33433                         printf("Berkeley DB version mismatch\n"
33434                                 "\theader: %s\n\tlibrary: %s\n",
33435                                 DB_VERSION_STRING, version);
33436                         return 1;
33437                 }
33438         }
33439 #endif
33440
33441 #if DB_VERSION_MAJOR > 2
33442         db_env_create( NULL, 0 );
33443 #elif DB_VERSION_MAJOR > 1
33444         db_appexit( NULL );
33445 #else
33446         (void) dbopen( NULL, 0, 0, 0, NULL);
33447 #endif
33448
33449   ;
33450   return 0;
33451 }
33452 _ACEOF
33453 rm -f conftest.$ac_objext conftest$ac_exeext
33454 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33455   (eval $ac_link) 2>conftest.er1
33456   ac_status=$?
33457   grep -v '^ *+' conftest.er1 >conftest.err
33458   rm -f conftest.er1
33459   cat conftest.err >&5
33460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33461   (exit $ac_status); } &&
33462          { ac_try='test -z "$ac_c_werror_flag"
33463                          || test ! -s conftest.err'
33464   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33465   (eval $ac_try) 2>&5
33466   ac_status=$?
33467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33468   (exit $ac_status); }; } &&
33469          { ac_try='test -s conftest$ac_exeext'
33470   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33471   (eval $ac_try) 2>&5
33472   ac_status=$?
33473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33474   (exit $ac_status); }; }; then
33475   ol_cv_db_db_4_dot_3=yes
33476 else
33477   echo "$as_me: failed program was:" >&5
33478 sed 's/^/| /' conftest.$ac_ext >&5
33479
33480 ol_cv_db_db_4_dot_3=no
33481 fi
33482 rm -f conftest.err conftest.$ac_objext \
33483       conftest$ac_exeext conftest.$ac_ext
33484
33485         LIBS="$ol_LIBS"
33486
33487 fi
33488 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_3" >&5
33489 echo "${ECHO_T}$ol_cv_db_db_4_dot_3" >&6
33490
33491         if test $ol_cv_db_db_4_dot_3 = yes ; then
33492                 ol_cv_lib_db=-ldb-4.3
33493         fi
33494 fi
33495
33496                 if test $ol_cv_lib_db = no ; then
33497         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-3)" >&5
33498 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-3)... $ECHO_C" >&6
33499 if test "${ol_cv_db_db_4_3+set}" = set; then
33500   echo $ECHO_N "(cached) $ECHO_C" >&6
33501 else
33502
33503         ol_DB_LIB=-ldb-4-3
33504         ol_LIBS=$LIBS
33505         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33506
33507         cat >conftest.$ac_ext <<_ACEOF
33508 /* confdefs.h.  */
33509 _ACEOF
33510 cat confdefs.h >>conftest.$ac_ext
33511 cat >>conftest.$ac_ext <<_ACEOF
33512 /* end confdefs.h.  */
33513
33514 #ifdef HAVE_DB_185_H
33515 # include <db_185.h>
33516 #else
33517 # include <db.h>
33518 #endif
33519
33520 #ifndef DB_VERSION_MAJOR
33521 # define DB_VERSION_MAJOR 1
33522 #endif
33523
33524 #ifndef NULL
33525 #define NULL ((void*)0)
33526 #endif
33527
33528 int
33529 main ()
33530 {
33531
33532 #if DB_VERSION_MAJOR > 1
33533         {
33534                 char *version;
33535                 int major, minor, patch;
33536
33537                 version = db_version( &major, &minor, &patch );
33538
33539                 if( major != DB_VERSION_MAJOR ||
33540                         minor < DB_VERSION_MINOR )
33541                 {
33542                         printf("Berkeley DB version mismatch\n"
33543                                 "\theader: %s\n\tlibrary: %s\n",
33544                                 DB_VERSION_STRING, version);
33545                         return 1;
33546                 }
33547         }
33548 #endif
33549
33550 #if DB_VERSION_MAJOR > 2
33551         db_env_create( NULL, 0 );
33552 #elif DB_VERSION_MAJOR > 1
33553         db_appexit( NULL );
33554 #else
33555         (void) dbopen( NULL, 0, 0, 0, NULL);
33556 #endif
33557
33558   ;
33559   return 0;
33560 }
33561 _ACEOF
33562 rm -f conftest.$ac_objext conftest$ac_exeext
33563 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33564   (eval $ac_link) 2>conftest.er1
33565   ac_status=$?
33566   grep -v '^ *+' conftest.er1 >conftest.err
33567   rm -f conftest.er1
33568   cat conftest.err >&5
33569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33570   (exit $ac_status); } &&
33571          { ac_try='test -z "$ac_c_werror_flag"
33572                          || test ! -s conftest.err'
33573   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33574   (eval $ac_try) 2>&5
33575   ac_status=$?
33576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33577   (exit $ac_status); }; } &&
33578          { ac_try='test -s conftest$ac_exeext'
33579   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33580   (eval $ac_try) 2>&5
33581   ac_status=$?
33582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33583   (exit $ac_status); }; }; then
33584   ol_cv_db_db_4_3=yes
33585 else
33586   echo "$as_me: failed program was:" >&5
33587 sed 's/^/| /' conftest.$ac_ext >&5
33588
33589 ol_cv_db_db_4_3=no
33590 fi
33591 rm -f conftest.err conftest.$ac_objext \
33592       conftest$ac_exeext conftest.$ac_ext
33593
33594         LIBS="$ol_LIBS"
33595
33596 fi
33597 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_3" >&5
33598 echo "${ECHO_T}$ol_cv_db_db_4_3" >&6
33599
33600         if test $ol_cv_db_db_4_3 = yes ; then
33601                 ol_cv_lib_db=-ldb-4-3
33602         fi
33603 fi
33604
33605         elif test $ol_cv_bdb_minor = 2 ; then
33606                 if test $ol_cv_lib_db = no ; then
33607         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb42)" >&5
33608 echo $ECHO_N "checking for Berkeley DB link (-ldb42)... $ECHO_C" >&6
33609 if test "${ol_cv_db_db42+set}" = set; then
33610   echo $ECHO_N "(cached) $ECHO_C" >&6
33611 else
33612
33613         ol_DB_LIB=-ldb42
33614         ol_LIBS=$LIBS
33615         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33616
33617         cat >conftest.$ac_ext <<_ACEOF
33618 /* confdefs.h.  */
33619 _ACEOF
33620 cat confdefs.h >>conftest.$ac_ext
33621 cat >>conftest.$ac_ext <<_ACEOF
33622 /* end confdefs.h.  */
33623
33624 #ifdef HAVE_DB_185_H
33625 # include <db_185.h>
33626 #else
33627 # include <db.h>
33628 #endif
33629
33630 #ifndef DB_VERSION_MAJOR
33631 # define DB_VERSION_MAJOR 1
33632 #endif
33633
33634 #ifndef NULL
33635 #define NULL ((void*)0)
33636 #endif
33637
33638 int
33639 main ()
33640 {
33641
33642 #if DB_VERSION_MAJOR > 1
33643         {
33644                 char *version;
33645                 int major, minor, patch;
33646
33647                 version = db_version( &major, &minor, &patch );
33648
33649                 if( major != DB_VERSION_MAJOR ||
33650                         minor < DB_VERSION_MINOR )
33651                 {
33652                         printf("Berkeley DB version mismatch\n"
33653                                 "\theader: %s\n\tlibrary: %s\n",
33654                                 DB_VERSION_STRING, version);
33655                         return 1;
33656                 }
33657         }
33658 #endif
33659
33660 #if DB_VERSION_MAJOR > 2
33661         db_env_create( NULL, 0 );
33662 #elif DB_VERSION_MAJOR > 1
33663         db_appexit( NULL );
33664 #else
33665         (void) dbopen( NULL, 0, 0, 0, NULL);
33666 #endif
33667
33668   ;
33669   return 0;
33670 }
33671 _ACEOF
33672 rm -f conftest.$ac_objext conftest$ac_exeext
33673 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33674   (eval $ac_link) 2>conftest.er1
33675   ac_status=$?
33676   grep -v '^ *+' conftest.er1 >conftest.err
33677   rm -f conftest.er1
33678   cat conftest.err >&5
33679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33680   (exit $ac_status); } &&
33681          { ac_try='test -z "$ac_c_werror_flag"
33682                          || test ! -s conftest.err'
33683   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33684   (eval $ac_try) 2>&5
33685   ac_status=$?
33686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33687   (exit $ac_status); }; } &&
33688          { ac_try='test -s conftest$ac_exeext'
33689   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33690   (eval $ac_try) 2>&5
33691   ac_status=$?
33692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33693   (exit $ac_status); }; }; then
33694   ol_cv_db_db42=yes
33695 else
33696   echo "$as_me: failed program was:" >&5
33697 sed 's/^/| /' conftest.$ac_ext >&5
33698
33699 ol_cv_db_db42=no
33700 fi
33701 rm -f conftest.err conftest.$ac_objext \
33702       conftest$ac_exeext conftest.$ac_ext
33703
33704         LIBS="$ol_LIBS"
33705
33706 fi
33707 echo "$as_me:$LINENO: result: $ol_cv_db_db42" >&5
33708 echo "${ECHO_T}$ol_cv_db_db42" >&6
33709
33710         if test $ol_cv_db_db42 = yes ; then
33711                 ol_cv_lib_db=-ldb42
33712         fi
33713 fi
33714
33715                 if test $ol_cv_lib_db = no ; then
33716         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-42)" >&5
33717 echo $ECHO_N "checking for Berkeley DB link (-ldb-42)... $ECHO_C" >&6
33718 if test "${ol_cv_db_db_42+set}" = set; then
33719   echo $ECHO_N "(cached) $ECHO_C" >&6
33720 else
33721
33722         ol_DB_LIB=-ldb-42
33723         ol_LIBS=$LIBS
33724         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33725
33726         cat >conftest.$ac_ext <<_ACEOF
33727 /* confdefs.h.  */
33728 _ACEOF
33729 cat confdefs.h >>conftest.$ac_ext
33730 cat >>conftest.$ac_ext <<_ACEOF
33731 /* end confdefs.h.  */
33732
33733 #ifdef HAVE_DB_185_H
33734 # include <db_185.h>
33735 #else
33736 # include <db.h>
33737 #endif
33738
33739 #ifndef DB_VERSION_MAJOR
33740 # define DB_VERSION_MAJOR 1
33741 #endif
33742
33743 #ifndef NULL
33744 #define NULL ((void*)0)
33745 #endif
33746
33747 int
33748 main ()
33749 {
33750
33751 #if DB_VERSION_MAJOR > 1
33752         {
33753                 char *version;
33754                 int major, minor, patch;
33755
33756                 version = db_version( &major, &minor, &patch );
33757
33758                 if( major != DB_VERSION_MAJOR ||
33759                         minor < DB_VERSION_MINOR )
33760                 {
33761                         printf("Berkeley DB version mismatch\n"
33762                                 "\theader: %s\n\tlibrary: %s\n",
33763                                 DB_VERSION_STRING, version);
33764                         return 1;
33765                 }
33766         }
33767 #endif
33768
33769 #if DB_VERSION_MAJOR > 2
33770         db_env_create( NULL, 0 );
33771 #elif DB_VERSION_MAJOR > 1
33772         db_appexit( NULL );
33773 #else
33774         (void) dbopen( NULL, 0, 0, 0, NULL);
33775 #endif
33776
33777   ;
33778   return 0;
33779 }
33780 _ACEOF
33781 rm -f conftest.$ac_objext conftest$ac_exeext
33782 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33783   (eval $ac_link) 2>conftest.er1
33784   ac_status=$?
33785   grep -v '^ *+' conftest.er1 >conftest.err
33786   rm -f conftest.er1
33787   cat conftest.err >&5
33788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33789   (exit $ac_status); } &&
33790          { ac_try='test -z "$ac_c_werror_flag"
33791                          || test ! -s conftest.err'
33792   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33793   (eval $ac_try) 2>&5
33794   ac_status=$?
33795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33796   (exit $ac_status); }; } &&
33797          { ac_try='test -s conftest$ac_exeext'
33798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33799   (eval $ac_try) 2>&5
33800   ac_status=$?
33801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33802   (exit $ac_status); }; }; then
33803   ol_cv_db_db_42=yes
33804 else
33805   echo "$as_me: failed program was:" >&5
33806 sed 's/^/| /' conftest.$ac_ext >&5
33807
33808 ol_cv_db_db_42=no
33809 fi
33810 rm -f conftest.err conftest.$ac_objext \
33811       conftest$ac_exeext conftest.$ac_ext
33812
33813         LIBS="$ol_LIBS"
33814
33815 fi
33816 echo "$as_me:$LINENO: result: $ol_cv_db_db_42" >&5
33817 echo "${ECHO_T}$ol_cv_db_db_42" >&6
33818
33819         if test $ol_cv_db_db_42 = yes ; then
33820                 ol_cv_lib_db=-ldb-42
33821         fi
33822 fi
33823
33824                 if test $ol_cv_lib_db = no ; then
33825         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.2)" >&5
33826 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.2)... $ECHO_C" >&6
33827 if test "${ol_cv_db_db_4_dot_2+set}" = set; then
33828   echo $ECHO_N "(cached) $ECHO_C" >&6
33829 else
33830
33831         ol_DB_LIB=-ldb-4.2
33832         ol_LIBS=$LIBS
33833         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33834
33835         cat >conftest.$ac_ext <<_ACEOF
33836 /* confdefs.h.  */
33837 _ACEOF
33838 cat confdefs.h >>conftest.$ac_ext
33839 cat >>conftest.$ac_ext <<_ACEOF
33840 /* end confdefs.h.  */
33841
33842 #ifdef HAVE_DB_185_H
33843 # include <db_185.h>
33844 #else
33845 # include <db.h>
33846 #endif
33847
33848 #ifndef DB_VERSION_MAJOR
33849 # define DB_VERSION_MAJOR 1
33850 #endif
33851
33852 #ifndef NULL
33853 #define NULL ((void*)0)
33854 #endif
33855
33856 int
33857 main ()
33858 {
33859
33860 #if DB_VERSION_MAJOR > 1
33861         {
33862                 char *version;
33863                 int major, minor, patch;
33864
33865                 version = db_version( &major, &minor, &patch );
33866
33867                 if( major != DB_VERSION_MAJOR ||
33868                         minor < DB_VERSION_MINOR )
33869                 {
33870                         printf("Berkeley DB version mismatch\n"
33871                                 "\theader: %s\n\tlibrary: %s\n",
33872                                 DB_VERSION_STRING, version);
33873                         return 1;
33874                 }
33875         }
33876 #endif
33877
33878 #if DB_VERSION_MAJOR > 2
33879         db_env_create( NULL, 0 );
33880 #elif DB_VERSION_MAJOR > 1
33881         db_appexit( NULL );
33882 #else
33883         (void) dbopen( NULL, 0, 0, 0, NULL);
33884 #endif
33885
33886   ;
33887   return 0;
33888 }
33889 _ACEOF
33890 rm -f conftest.$ac_objext conftest$ac_exeext
33891 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33892   (eval $ac_link) 2>conftest.er1
33893   ac_status=$?
33894   grep -v '^ *+' conftest.er1 >conftest.err
33895   rm -f conftest.er1
33896   cat conftest.err >&5
33897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33898   (exit $ac_status); } &&
33899          { ac_try='test -z "$ac_c_werror_flag"
33900                          || test ! -s conftest.err'
33901   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33902   (eval $ac_try) 2>&5
33903   ac_status=$?
33904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33905   (exit $ac_status); }; } &&
33906          { ac_try='test -s conftest$ac_exeext'
33907   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33908   (eval $ac_try) 2>&5
33909   ac_status=$?
33910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33911   (exit $ac_status); }; }; then
33912   ol_cv_db_db_4_dot_2=yes
33913 else
33914   echo "$as_me: failed program was:" >&5
33915 sed 's/^/| /' conftest.$ac_ext >&5
33916
33917 ol_cv_db_db_4_dot_2=no
33918 fi
33919 rm -f conftest.err conftest.$ac_objext \
33920       conftest$ac_exeext conftest.$ac_ext
33921
33922         LIBS="$ol_LIBS"
33923
33924 fi
33925 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_2" >&5
33926 echo "${ECHO_T}$ol_cv_db_db_4_dot_2" >&6
33927
33928         if test $ol_cv_db_db_4_dot_2 = yes ; then
33929                 ol_cv_lib_db=-ldb-4.2
33930         fi
33931 fi
33932
33933                 if test $ol_cv_lib_db = no ; then
33934         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-2)" >&5
33935 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-2)... $ECHO_C" >&6
33936 if test "${ol_cv_db_db_4_2+set}" = set; then
33937   echo $ECHO_N "(cached) $ECHO_C" >&6
33938 else
33939
33940         ol_DB_LIB=-ldb-4-2
33941         ol_LIBS=$LIBS
33942         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33943
33944         cat >conftest.$ac_ext <<_ACEOF
33945 /* confdefs.h.  */
33946 _ACEOF
33947 cat confdefs.h >>conftest.$ac_ext
33948 cat >>conftest.$ac_ext <<_ACEOF
33949 /* end confdefs.h.  */
33950
33951 #ifdef HAVE_DB_185_H
33952 # include <db_185.h>
33953 #else
33954 # include <db.h>
33955 #endif
33956
33957 #ifndef DB_VERSION_MAJOR
33958 # define DB_VERSION_MAJOR 1
33959 #endif
33960
33961 #ifndef NULL
33962 #define NULL ((void*)0)
33963 #endif
33964
33965 int
33966 main ()
33967 {
33968
33969 #if DB_VERSION_MAJOR > 1
33970         {
33971                 char *version;
33972                 int major, minor, patch;
33973
33974                 version = db_version( &major, &minor, &patch );
33975
33976                 if( major != DB_VERSION_MAJOR ||
33977                         minor < DB_VERSION_MINOR )
33978                 {
33979                         printf("Berkeley DB version mismatch\n"
33980                                 "\theader: %s\n\tlibrary: %s\n",
33981                                 DB_VERSION_STRING, version);
33982                         return 1;
33983                 }
33984         }
33985 #endif
33986
33987 #if DB_VERSION_MAJOR > 2
33988         db_env_create( NULL, 0 );
33989 #elif DB_VERSION_MAJOR > 1
33990         db_appexit( NULL );
33991 #else
33992         (void) dbopen( NULL, 0, 0, 0, NULL);
33993 #endif
33994
33995   ;
33996   return 0;
33997 }
33998 _ACEOF
33999 rm -f conftest.$ac_objext conftest$ac_exeext
34000 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34001   (eval $ac_link) 2>conftest.er1
34002   ac_status=$?
34003   grep -v '^ *+' conftest.er1 >conftest.err
34004   rm -f conftest.er1
34005   cat conftest.err >&5
34006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34007   (exit $ac_status); } &&
34008          { ac_try='test -z "$ac_c_werror_flag"
34009                          || test ! -s conftest.err'
34010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34011   (eval $ac_try) 2>&5
34012   ac_status=$?
34013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34014   (exit $ac_status); }; } &&
34015          { ac_try='test -s conftest$ac_exeext'
34016   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34017   (eval $ac_try) 2>&5
34018   ac_status=$?
34019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34020   (exit $ac_status); }; }; then
34021   ol_cv_db_db_4_2=yes
34022 else
34023   echo "$as_me: failed program was:" >&5
34024 sed 's/^/| /' conftest.$ac_ext >&5
34025
34026 ol_cv_db_db_4_2=no
34027 fi
34028 rm -f conftest.err conftest.$ac_objext \
34029       conftest$ac_exeext conftest.$ac_ext
34030
34031         LIBS="$ol_LIBS"
34032
34033 fi
34034 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_2" >&5
34035 echo "${ECHO_T}$ol_cv_db_db_4_2" >&6
34036
34037         if test $ol_cv_db_db_4_2 = yes ; then
34038                 ol_cv_lib_db=-ldb-4-2
34039         fi
34040 fi
34041
34042         elif test $ol_cv_bdb_minor = 1 ; then
34043                 if test $ol_cv_lib_db = no ; then
34044         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb41)" >&5
34045 echo $ECHO_N "checking for Berkeley DB link (-ldb41)... $ECHO_C" >&6
34046 if test "${ol_cv_db_db41+set}" = set; then
34047   echo $ECHO_N "(cached) $ECHO_C" >&6
34048 else
34049
34050         ol_DB_LIB=-ldb41
34051         ol_LIBS=$LIBS
34052         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34053
34054         cat >conftest.$ac_ext <<_ACEOF
34055 /* confdefs.h.  */
34056 _ACEOF
34057 cat confdefs.h >>conftest.$ac_ext
34058 cat >>conftest.$ac_ext <<_ACEOF
34059 /* end confdefs.h.  */
34060
34061 #ifdef HAVE_DB_185_H
34062 # include <db_185.h>
34063 #else
34064 # include <db.h>
34065 #endif
34066
34067 #ifndef DB_VERSION_MAJOR
34068 # define DB_VERSION_MAJOR 1
34069 #endif
34070
34071 #ifndef NULL
34072 #define NULL ((void*)0)
34073 #endif
34074
34075 int
34076 main ()
34077 {
34078
34079 #if DB_VERSION_MAJOR > 1
34080         {
34081                 char *version;
34082                 int major, minor, patch;
34083
34084                 version = db_version( &major, &minor, &patch );
34085
34086                 if( major != DB_VERSION_MAJOR ||
34087                         minor < DB_VERSION_MINOR )
34088                 {
34089                         printf("Berkeley DB version mismatch\n"
34090                                 "\theader: %s\n\tlibrary: %s\n",
34091                                 DB_VERSION_STRING, version);
34092                         return 1;
34093                 }
34094         }
34095 #endif
34096
34097 #if DB_VERSION_MAJOR > 2
34098         db_env_create( NULL, 0 );
34099 #elif DB_VERSION_MAJOR > 1
34100         db_appexit( NULL );
34101 #else
34102         (void) dbopen( NULL, 0, 0, 0, NULL);
34103 #endif
34104
34105   ;
34106   return 0;
34107 }
34108 _ACEOF
34109 rm -f conftest.$ac_objext conftest$ac_exeext
34110 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34111   (eval $ac_link) 2>conftest.er1
34112   ac_status=$?
34113   grep -v '^ *+' conftest.er1 >conftest.err
34114   rm -f conftest.er1
34115   cat conftest.err >&5
34116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34117   (exit $ac_status); } &&
34118          { ac_try='test -z "$ac_c_werror_flag"
34119                          || test ! -s conftest.err'
34120   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34121   (eval $ac_try) 2>&5
34122   ac_status=$?
34123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34124   (exit $ac_status); }; } &&
34125          { ac_try='test -s conftest$ac_exeext'
34126   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34127   (eval $ac_try) 2>&5
34128   ac_status=$?
34129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34130   (exit $ac_status); }; }; then
34131   ol_cv_db_db41=yes
34132 else
34133   echo "$as_me: failed program was:" >&5
34134 sed 's/^/| /' conftest.$ac_ext >&5
34135
34136 ol_cv_db_db41=no
34137 fi
34138 rm -f conftest.err conftest.$ac_objext \
34139       conftest$ac_exeext conftest.$ac_ext
34140
34141         LIBS="$ol_LIBS"
34142
34143 fi
34144 echo "$as_me:$LINENO: result: $ol_cv_db_db41" >&5
34145 echo "${ECHO_T}$ol_cv_db_db41" >&6
34146
34147         if test $ol_cv_db_db41 = yes ; then
34148                 ol_cv_lib_db=-ldb41
34149         fi
34150 fi
34151
34152                 if test $ol_cv_lib_db = no ; then
34153         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-41)" >&5
34154 echo $ECHO_N "checking for Berkeley DB link (-ldb-41)... $ECHO_C" >&6
34155 if test "${ol_cv_db_db_41+set}" = set; then
34156   echo $ECHO_N "(cached) $ECHO_C" >&6
34157 else
34158
34159         ol_DB_LIB=-ldb-41
34160         ol_LIBS=$LIBS
34161         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34162
34163         cat >conftest.$ac_ext <<_ACEOF
34164 /* confdefs.h.  */
34165 _ACEOF
34166 cat confdefs.h >>conftest.$ac_ext
34167 cat >>conftest.$ac_ext <<_ACEOF
34168 /* end confdefs.h.  */
34169
34170 #ifdef HAVE_DB_185_H
34171 # include <db_185.h>
34172 #else
34173 # include <db.h>
34174 #endif
34175
34176 #ifndef DB_VERSION_MAJOR
34177 # define DB_VERSION_MAJOR 1
34178 #endif
34179
34180 #ifndef NULL
34181 #define NULL ((void*)0)
34182 #endif
34183
34184 int
34185 main ()
34186 {
34187
34188 #if DB_VERSION_MAJOR > 1
34189         {
34190                 char *version;
34191                 int major, minor, patch;
34192
34193                 version = db_version( &major, &minor, &patch );
34194
34195                 if( major != DB_VERSION_MAJOR ||
34196                         minor < DB_VERSION_MINOR )
34197                 {
34198                         printf("Berkeley DB version mismatch\n"
34199                                 "\theader: %s\n\tlibrary: %s\n",
34200                                 DB_VERSION_STRING, version);
34201                         return 1;
34202                 }
34203         }
34204 #endif
34205
34206 #if DB_VERSION_MAJOR > 2
34207         db_env_create( NULL, 0 );
34208 #elif DB_VERSION_MAJOR > 1
34209         db_appexit( NULL );
34210 #else
34211         (void) dbopen( NULL, 0, 0, 0, NULL);
34212 #endif
34213
34214   ;
34215   return 0;
34216 }
34217 _ACEOF
34218 rm -f conftest.$ac_objext conftest$ac_exeext
34219 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34220   (eval $ac_link) 2>conftest.er1
34221   ac_status=$?
34222   grep -v '^ *+' conftest.er1 >conftest.err
34223   rm -f conftest.er1
34224   cat conftest.err >&5
34225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34226   (exit $ac_status); } &&
34227          { ac_try='test -z "$ac_c_werror_flag"
34228                          || test ! -s conftest.err'
34229   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34230   (eval $ac_try) 2>&5
34231   ac_status=$?
34232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34233   (exit $ac_status); }; } &&
34234          { ac_try='test -s conftest$ac_exeext'
34235   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34236   (eval $ac_try) 2>&5
34237   ac_status=$?
34238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34239   (exit $ac_status); }; }; then
34240   ol_cv_db_db_41=yes
34241 else
34242   echo "$as_me: failed program was:" >&5
34243 sed 's/^/| /' conftest.$ac_ext >&5
34244
34245 ol_cv_db_db_41=no
34246 fi
34247 rm -f conftest.err conftest.$ac_objext \
34248       conftest$ac_exeext conftest.$ac_ext
34249
34250         LIBS="$ol_LIBS"
34251
34252 fi
34253 echo "$as_me:$LINENO: result: $ol_cv_db_db_41" >&5
34254 echo "${ECHO_T}$ol_cv_db_db_41" >&6
34255
34256         if test $ol_cv_db_db_41 = yes ; then
34257                 ol_cv_lib_db=-ldb-41
34258         fi
34259 fi
34260
34261                 if test $ol_cv_lib_db = no ; then
34262         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.1)" >&5
34263 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.1)... $ECHO_C" >&6
34264 if test "${ol_cv_db_db_4_dot_1+set}" = set; then
34265   echo $ECHO_N "(cached) $ECHO_C" >&6
34266 else
34267
34268         ol_DB_LIB=-ldb-4.1
34269         ol_LIBS=$LIBS
34270         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34271
34272         cat >conftest.$ac_ext <<_ACEOF
34273 /* confdefs.h.  */
34274 _ACEOF
34275 cat confdefs.h >>conftest.$ac_ext
34276 cat >>conftest.$ac_ext <<_ACEOF
34277 /* end confdefs.h.  */
34278
34279 #ifdef HAVE_DB_185_H
34280 # include <db_185.h>
34281 #else
34282 # include <db.h>
34283 #endif
34284
34285 #ifndef DB_VERSION_MAJOR
34286 # define DB_VERSION_MAJOR 1
34287 #endif
34288
34289 #ifndef NULL
34290 #define NULL ((void*)0)
34291 #endif
34292
34293 int
34294 main ()
34295 {
34296
34297 #if DB_VERSION_MAJOR > 1
34298         {
34299                 char *version;
34300                 int major, minor, patch;
34301
34302                 version = db_version( &major, &minor, &patch );
34303
34304                 if( major != DB_VERSION_MAJOR ||
34305                         minor < DB_VERSION_MINOR )
34306                 {
34307                         printf("Berkeley DB version mismatch\n"
34308                                 "\theader: %s\n\tlibrary: %s\n",
34309                                 DB_VERSION_STRING, version);
34310                         return 1;
34311                 }
34312         }
34313 #endif
34314
34315 #if DB_VERSION_MAJOR > 2
34316         db_env_create( NULL, 0 );
34317 #elif DB_VERSION_MAJOR > 1
34318         db_appexit( NULL );
34319 #else
34320         (void) dbopen( NULL, 0, 0, 0, NULL);
34321 #endif
34322
34323   ;
34324   return 0;
34325 }
34326 _ACEOF
34327 rm -f conftest.$ac_objext conftest$ac_exeext
34328 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34329   (eval $ac_link) 2>conftest.er1
34330   ac_status=$?
34331   grep -v '^ *+' conftest.er1 >conftest.err
34332   rm -f conftest.er1
34333   cat conftest.err >&5
34334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34335   (exit $ac_status); } &&
34336          { ac_try='test -z "$ac_c_werror_flag"
34337                          || test ! -s conftest.err'
34338   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34339   (eval $ac_try) 2>&5
34340   ac_status=$?
34341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34342   (exit $ac_status); }; } &&
34343          { ac_try='test -s conftest$ac_exeext'
34344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34345   (eval $ac_try) 2>&5
34346   ac_status=$?
34347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34348   (exit $ac_status); }; }; then
34349   ol_cv_db_db_4_dot_1=yes
34350 else
34351   echo "$as_me: failed program was:" >&5
34352 sed 's/^/| /' conftest.$ac_ext >&5
34353
34354 ol_cv_db_db_4_dot_1=no
34355 fi
34356 rm -f conftest.err conftest.$ac_objext \
34357       conftest$ac_exeext conftest.$ac_ext
34358
34359         LIBS="$ol_LIBS"
34360
34361 fi
34362 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_1" >&5
34363 echo "${ECHO_T}$ol_cv_db_db_4_dot_1" >&6
34364
34365         if test $ol_cv_db_db_4_dot_1 = yes ; then
34366                 ol_cv_lib_db=-ldb-4.1
34367         fi
34368 fi
34369
34370                 if test $ol_cv_lib_db = no ; then
34371         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-1)" >&5
34372 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-1)... $ECHO_C" >&6
34373 if test "${ol_cv_db_db_4_1+set}" = set; then
34374   echo $ECHO_N "(cached) $ECHO_C" >&6
34375 else
34376
34377         ol_DB_LIB=-ldb-4-1
34378         ol_LIBS=$LIBS
34379         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34380
34381         cat >conftest.$ac_ext <<_ACEOF
34382 /* confdefs.h.  */
34383 _ACEOF
34384 cat confdefs.h >>conftest.$ac_ext
34385 cat >>conftest.$ac_ext <<_ACEOF
34386 /* end confdefs.h.  */
34387
34388 #ifdef HAVE_DB_185_H
34389 # include <db_185.h>
34390 #else
34391 # include <db.h>
34392 #endif
34393
34394 #ifndef DB_VERSION_MAJOR
34395 # define DB_VERSION_MAJOR 1
34396 #endif
34397
34398 #ifndef NULL
34399 #define NULL ((void*)0)
34400 #endif
34401
34402 int
34403 main ()
34404 {
34405
34406 #if DB_VERSION_MAJOR > 1
34407         {
34408                 char *version;
34409                 int major, minor, patch;
34410
34411                 version = db_version( &major, &minor, &patch );
34412
34413                 if( major != DB_VERSION_MAJOR ||
34414                         minor < DB_VERSION_MINOR )
34415                 {
34416                         printf("Berkeley DB version mismatch\n"
34417                                 "\theader: %s\n\tlibrary: %s\n",
34418                                 DB_VERSION_STRING, version);
34419                         return 1;
34420                 }
34421         }
34422 #endif
34423
34424 #if DB_VERSION_MAJOR > 2
34425         db_env_create( NULL, 0 );
34426 #elif DB_VERSION_MAJOR > 1
34427         db_appexit( NULL );
34428 #else
34429         (void) dbopen( NULL, 0, 0, 0, NULL);
34430 #endif
34431
34432   ;
34433   return 0;
34434 }
34435 _ACEOF
34436 rm -f conftest.$ac_objext conftest$ac_exeext
34437 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34438   (eval $ac_link) 2>conftest.er1
34439   ac_status=$?
34440   grep -v '^ *+' conftest.er1 >conftest.err
34441   rm -f conftest.er1
34442   cat conftest.err >&5
34443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34444   (exit $ac_status); } &&
34445          { ac_try='test -z "$ac_c_werror_flag"
34446                          || test ! -s conftest.err'
34447   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34448   (eval $ac_try) 2>&5
34449   ac_status=$?
34450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34451   (exit $ac_status); }; } &&
34452          { ac_try='test -s conftest$ac_exeext'
34453   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34454   (eval $ac_try) 2>&5
34455   ac_status=$?
34456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34457   (exit $ac_status); }; }; then
34458   ol_cv_db_db_4_1=yes
34459 else
34460   echo "$as_me: failed program was:" >&5
34461 sed 's/^/| /' conftest.$ac_ext >&5
34462
34463 ol_cv_db_db_4_1=no
34464 fi
34465 rm -f conftest.err conftest.$ac_objext \
34466       conftest$ac_exeext conftest.$ac_ext
34467
34468         LIBS="$ol_LIBS"
34469
34470 fi
34471 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_1" >&5
34472 echo "${ECHO_T}$ol_cv_db_db_4_1" >&6
34473
34474         if test $ol_cv_db_db_4_1 = yes ; then
34475                 ol_cv_lib_db=-ldb-4-1
34476         fi
34477 fi
34478
34479         fi
34480         if test $ol_cv_lib_db = no ; then
34481         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4)" >&5
34482 echo $ECHO_N "checking for Berkeley DB link (-ldb-4)... $ECHO_C" >&6
34483 if test "${ol_cv_db_db_4+set}" = set; then
34484   echo $ECHO_N "(cached) $ECHO_C" >&6
34485 else
34486
34487         ol_DB_LIB=-ldb-4
34488         ol_LIBS=$LIBS
34489         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34490
34491         cat >conftest.$ac_ext <<_ACEOF
34492 /* confdefs.h.  */
34493 _ACEOF
34494 cat confdefs.h >>conftest.$ac_ext
34495 cat >>conftest.$ac_ext <<_ACEOF
34496 /* end confdefs.h.  */
34497
34498 #ifdef HAVE_DB_185_H
34499 # include <db_185.h>
34500 #else
34501 # include <db.h>
34502 #endif
34503
34504 #ifndef DB_VERSION_MAJOR
34505 # define DB_VERSION_MAJOR 1
34506 #endif
34507
34508 #ifndef NULL
34509 #define NULL ((void*)0)
34510 #endif
34511
34512 int
34513 main ()
34514 {
34515
34516 #if DB_VERSION_MAJOR > 1
34517         {
34518                 char *version;
34519                 int major, minor, patch;
34520
34521                 version = db_version( &major, &minor, &patch );
34522
34523                 if( major != DB_VERSION_MAJOR ||
34524                         minor < DB_VERSION_MINOR )
34525                 {
34526                         printf("Berkeley DB version mismatch\n"
34527                                 "\theader: %s\n\tlibrary: %s\n",
34528                                 DB_VERSION_STRING, version);
34529                         return 1;
34530                 }
34531         }
34532 #endif
34533
34534 #if DB_VERSION_MAJOR > 2
34535         db_env_create( NULL, 0 );
34536 #elif DB_VERSION_MAJOR > 1
34537         db_appexit( NULL );
34538 #else
34539         (void) dbopen( NULL, 0, 0, 0, NULL);
34540 #endif
34541
34542   ;
34543   return 0;
34544 }
34545 _ACEOF
34546 rm -f conftest.$ac_objext conftest$ac_exeext
34547 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34548   (eval $ac_link) 2>conftest.er1
34549   ac_status=$?
34550   grep -v '^ *+' conftest.er1 >conftest.err
34551   rm -f conftest.er1
34552   cat conftest.err >&5
34553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34554   (exit $ac_status); } &&
34555          { ac_try='test -z "$ac_c_werror_flag"
34556                          || test ! -s conftest.err'
34557   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34558   (eval $ac_try) 2>&5
34559   ac_status=$?
34560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34561   (exit $ac_status); }; } &&
34562          { ac_try='test -s conftest$ac_exeext'
34563   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34564   (eval $ac_try) 2>&5
34565   ac_status=$?
34566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34567   (exit $ac_status); }; }; then
34568   ol_cv_db_db_4=yes
34569 else
34570   echo "$as_me: failed program was:" >&5
34571 sed 's/^/| /' conftest.$ac_ext >&5
34572
34573 ol_cv_db_db_4=no
34574 fi
34575 rm -f conftest.err conftest.$ac_objext \
34576       conftest$ac_exeext conftest.$ac_ext
34577
34578         LIBS="$ol_LIBS"
34579
34580 fi
34581 echo "$as_me:$LINENO: result: $ol_cv_db_db_4" >&5
34582 echo "${ECHO_T}$ol_cv_db_db_4" >&6
34583
34584         if test $ol_cv_db_db_4 = yes ; then
34585                 ol_cv_lib_db=-ldb-4
34586         fi
34587 fi
34588
34589         if test $ol_cv_lib_db = no ; then
34590         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb4)" >&5
34591 echo $ECHO_N "checking for Berkeley DB link (-ldb4)... $ECHO_C" >&6
34592 if test "${ol_cv_db_db4+set}" = set; then
34593   echo $ECHO_N "(cached) $ECHO_C" >&6
34594 else
34595
34596         ol_DB_LIB=-ldb4
34597         ol_LIBS=$LIBS
34598         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34599
34600         cat >conftest.$ac_ext <<_ACEOF
34601 /* confdefs.h.  */
34602 _ACEOF
34603 cat confdefs.h >>conftest.$ac_ext
34604 cat >>conftest.$ac_ext <<_ACEOF
34605 /* end confdefs.h.  */
34606
34607 #ifdef HAVE_DB_185_H
34608 # include <db_185.h>
34609 #else
34610 # include <db.h>
34611 #endif
34612
34613 #ifndef DB_VERSION_MAJOR
34614 # define DB_VERSION_MAJOR 1
34615 #endif
34616
34617 #ifndef NULL
34618 #define NULL ((void*)0)
34619 #endif
34620
34621 int
34622 main ()
34623 {
34624
34625 #if DB_VERSION_MAJOR > 1
34626         {
34627                 char *version;
34628                 int major, minor, patch;
34629
34630                 version = db_version( &major, &minor, &patch );
34631
34632                 if( major != DB_VERSION_MAJOR ||
34633                         minor < DB_VERSION_MINOR )
34634                 {
34635                         printf("Berkeley DB version mismatch\n"
34636                                 "\theader: %s\n\tlibrary: %s\n",
34637                                 DB_VERSION_STRING, version);
34638                         return 1;
34639                 }
34640         }
34641 #endif
34642
34643 #if DB_VERSION_MAJOR > 2
34644         db_env_create( NULL, 0 );
34645 #elif DB_VERSION_MAJOR > 1
34646         db_appexit( NULL );
34647 #else
34648         (void) dbopen( NULL, 0, 0, 0, NULL);
34649 #endif
34650
34651   ;
34652   return 0;
34653 }
34654 _ACEOF
34655 rm -f conftest.$ac_objext conftest$ac_exeext
34656 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34657   (eval $ac_link) 2>conftest.er1
34658   ac_status=$?
34659   grep -v '^ *+' conftest.er1 >conftest.err
34660   rm -f conftest.er1
34661   cat conftest.err >&5
34662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34663   (exit $ac_status); } &&
34664          { ac_try='test -z "$ac_c_werror_flag"
34665                          || test ! -s conftest.err'
34666   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34667   (eval $ac_try) 2>&5
34668   ac_status=$?
34669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34670   (exit $ac_status); }; } &&
34671          { ac_try='test -s conftest$ac_exeext'
34672   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34673   (eval $ac_try) 2>&5
34674   ac_status=$?
34675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34676   (exit $ac_status); }; }; then
34677   ol_cv_db_db4=yes
34678 else
34679   echo "$as_me: failed program was:" >&5
34680 sed 's/^/| /' conftest.$ac_ext >&5
34681
34682 ol_cv_db_db4=no
34683 fi
34684 rm -f conftest.err conftest.$ac_objext \
34685       conftest$ac_exeext conftest.$ac_ext
34686
34687         LIBS="$ol_LIBS"
34688
34689 fi
34690 echo "$as_me:$LINENO: result: $ol_cv_db_db4" >&5
34691 echo "${ECHO_T}$ol_cv_db_db4" >&6
34692
34693         if test $ol_cv_db_db4 = yes ; then
34694                 ol_cv_lib_db=-ldb4
34695         fi
34696 fi
34697
34698         if test $ol_cv_lib_db = no ; then
34699         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb)" >&5
34700 echo $ECHO_N "checking for Berkeley DB link (-ldb)... $ECHO_C" >&6
34701 if test "${ol_cv_db_db+set}" = set; then
34702   echo $ECHO_N "(cached) $ECHO_C" >&6
34703 else
34704
34705         ol_DB_LIB=-ldb
34706         ol_LIBS=$LIBS
34707         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34708
34709         cat >conftest.$ac_ext <<_ACEOF
34710 /* confdefs.h.  */
34711 _ACEOF
34712 cat confdefs.h >>conftest.$ac_ext
34713 cat >>conftest.$ac_ext <<_ACEOF
34714 /* end confdefs.h.  */
34715
34716 #ifdef HAVE_DB_185_H
34717 # include <db_185.h>
34718 #else
34719 # include <db.h>
34720 #endif
34721
34722 #ifndef DB_VERSION_MAJOR
34723 # define DB_VERSION_MAJOR 1
34724 #endif
34725
34726 #ifndef NULL
34727 #define NULL ((void*)0)
34728 #endif
34729
34730 int
34731 main ()
34732 {
34733
34734 #if DB_VERSION_MAJOR > 1
34735         {
34736                 char *version;
34737                 int major, minor, patch;
34738
34739                 version = db_version( &major, &minor, &patch );
34740
34741                 if( major != DB_VERSION_MAJOR ||
34742                         minor < DB_VERSION_MINOR )
34743                 {
34744                         printf("Berkeley DB version mismatch\n"
34745                                 "\theader: %s\n\tlibrary: %s\n",
34746                                 DB_VERSION_STRING, version);
34747                         return 1;
34748                 }
34749         }
34750 #endif
34751
34752 #if DB_VERSION_MAJOR > 2
34753         db_env_create( NULL, 0 );
34754 #elif DB_VERSION_MAJOR > 1
34755         db_appexit( NULL );
34756 #else
34757         (void) dbopen( NULL, 0, 0, 0, NULL);
34758 #endif
34759
34760   ;
34761   return 0;
34762 }
34763 _ACEOF
34764 rm -f conftest.$ac_objext conftest$ac_exeext
34765 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34766   (eval $ac_link) 2>conftest.er1
34767   ac_status=$?
34768   grep -v '^ *+' conftest.er1 >conftest.err
34769   rm -f conftest.er1
34770   cat conftest.err >&5
34771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34772   (exit $ac_status); } &&
34773          { ac_try='test -z "$ac_c_werror_flag"
34774                          || test ! -s conftest.err'
34775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34776   (eval $ac_try) 2>&5
34777   ac_status=$?
34778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34779   (exit $ac_status); }; } &&
34780          { ac_try='test -s conftest$ac_exeext'
34781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34782   (eval $ac_try) 2>&5
34783   ac_status=$?
34784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34785   (exit $ac_status); }; }; then
34786   ol_cv_db_db=yes
34787 else
34788   echo "$as_me: failed program was:" >&5
34789 sed 's/^/| /' conftest.$ac_ext >&5
34790
34791 ol_cv_db_db=no
34792 fi
34793 rm -f conftest.err conftest.$ac_objext \
34794       conftest$ac_exeext conftest.$ac_ext
34795
34796         LIBS="$ol_LIBS"
34797
34798 fi
34799 echo "$as_me:$LINENO: result: $ol_cv_db_db" >&5
34800 echo "${ECHO_T}$ol_cv_db_db" >&6
34801
34802         if test $ol_cv_db_db = yes ; then
34803                 ol_cv_lib_db=-ldb
34804         fi
34805 fi
34806
34807
34808 elif test $ol_cv_bdb_major = 3 ; then
34809         if test $ol_cv_lib_db = no ; then
34810         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb3)" >&5
34811 echo $ECHO_N "checking for Berkeley DB link (-ldb3)... $ECHO_C" >&6
34812 if test "${ol_cv_db_db3+set}" = set; then
34813   echo $ECHO_N "(cached) $ECHO_C" >&6
34814 else
34815
34816         ol_DB_LIB=-ldb3
34817         ol_LIBS=$LIBS
34818         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34819
34820         cat >conftest.$ac_ext <<_ACEOF
34821 /* confdefs.h.  */
34822 _ACEOF
34823 cat confdefs.h >>conftest.$ac_ext
34824 cat >>conftest.$ac_ext <<_ACEOF
34825 /* end confdefs.h.  */
34826
34827 #ifdef HAVE_DB_185_H
34828 # include <db_185.h>
34829 #else
34830 # include <db.h>
34831 #endif
34832
34833 #ifndef DB_VERSION_MAJOR
34834 # define DB_VERSION_MAJOR 1
34835 #endif
34836
34837 #ifndef NULL
34838 #define NULL ((void*)0)
34839 #endif
34840
34841 int
34842 main ()
34843 {
34844
34845 #if DB_VERSION_MAJOR > 1
34846         {
34847                 char *version;
34848                 int major, minor, patch;
34849
34850                 version = db_version( &major, &minor, &patch );
34851
34852                 if( major != DB_VERSION_MAJOR ||
34853                         minor < DB_VERSION_MINOR )
34854                 {
34855                         printf("Berkeley DB version mismatch\n"
34856                                 "\theader: %s\n\tlibrary: %s\n",
34857                                 DB_VERSION_STRING, version);
34858                         return 1;
34859                 }
34860         }
34861 #endif
34862
34863 #if DB_VERSION_MAJOR > 2
34864         db_env_create( NULL, 0 );
34865 #elif DB_VERSION_MAJOR > 1
34866         db_appexit( NULL );
34867 #else
34868         (void) dbopen( NULL, 0, 0, 0, NULL);
34869 #endif
34870
34871   ;
34872   return 0;
34873 }
34874 _ACEOF
34875 rm -f conftest.$ac_objext conftest$ac_exeext
34876 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34877   (eval $ac_link) 2>conftest.er1
34878   ac_status=$?
34879   grep -v '^ *+' conftest.er1 >conftest.err
34880   rm -f conftest.er1
34881   cat conftest.err >&5
34882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34883   (exit $ac_status); } &&
34884          { ac_try='test -z "$ac_c_werror_flag"
34885                          || test ! -s conftest.err'
34886   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34887   (eval $ac_try) 2>&5
34888   ac_status=$?
34889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34890   (exit $ac_status); }; } &&
34891          { ac_try='test -s conftest$ac_exeext'
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); }; }; then
34897   ol_cv_db_db3=yes
34898 else
34899   echo "$as_me: failed program was:" >&5
34900 sed 's/^/| /' conftest.$ac_ext >&5
34901
34902 ol_cv_db_db3=no
34903 fi
34904 rm -f conftest.err conftest.$ac_objext \
34905       conftest$ac_exeext conftest.$ac_ext
34906
34907         LIBS="$ol_LIBS"
34908
34909 fi
34910 echo "$as_me:$LINENO: result: $ol_cv_db_db3" >&5
34911 echo "${ECHO_T}$ol_cv_db_db3" >&6
34912
34913         if test $ol_cv_db_db3 = yes ; then
34914                 ol_cv_lib_db=-ldb3
34915         fi
34916 fi
34917
34918         if test $ol_cv_lib_db = no ; then
34919         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-3)" >&5
34920 echo $ECHO_N "checking for Berkeley DB link (-ldb-3)... $ECHO_C" >&6
34921 if test "${ol_cv_db_db_3+set}" = set; then
34922   echo $ECHO_N "(cached) $ECHO_C" >&6
34923 else
34924
34925         ol_DB_LIB=-ldb-3
34926         ol_LIBS=$LIBS
34927         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34928
34929         cat >conftest.$ac_ext <<_ACEOF
34930 /* confdefs.h.  */
34931 _ACEOF
34932 cat confdefs.h >>conftest.$ac_ext
34933 cat >>conftest.$ac_ext <<_ACEOF
34934 /* end confdefs.h.  */
34935
34936 #ifdef HAVE_DB_185_H
34937 # include <db_185.h>
34938 #else
34939 # include <db.h>
34940 #endif
34941
34942 #ifndef DB_VERSION_MAJOR
34943 # define DB_VERSION_MAJOR 1
34944 #endif
34945
34946 #ifndef NULL
34947 #define NULL ((void*)0)
34948 #endif
34949
34950 int
34951 main ()
34952 {
34953
34954 #if DB_VERSION_MAJOR > 1
34955         {
34956                 char *version;
34957                 int major, minor, patch;
34958
34959                 version = db_version( &major, &minor, &patch );
34960
34961                 if( major != DB_VERSION_MAJOR ||
34962                         minor < DB_VERSION_MINOR )
34963                 {
34964                         printf("Berkeley DB version mismatch\n"
34965                                 "\theader: %s\n\tlibrary: %s\n",
34966                                 DB_VERSION_STRING, version);
34967                         return 1;
34968                 }
34969         }
34970 #endif
34971
34972 #if DB_VERSION_MAJOR > 2
34973         db_env_create( NULL, 0 );
34974 #elif DB_VERSION_MAJOR > 1
34975         db_appexit( NULL );
34976 #else
34977         (void) dbopen( NULL, 0, 0, 0, NULL);
34978 #endif
34979
34980   ;
34981   return 0;
34982 }
34983 _ACEOF
34984 rm -f conftest.$ac_objext conftest$ac_exeext
34985 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34986   (eval $ac_link) 2>conftest.er1
34987   ac_status=$?
34988   grep -v '^ *+' conftest.er1 >conftest.err
34989   rm -f conftest.er1
34990   cat conftest.err >&5
34991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34992   (exit $ac_status); } &&
34993          { ac_try='test -z "$ac_c_werror_flag"
34994                          || test ! -s conftest.err'
34995   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34996   (eval $ac_try) 2>&5
34997   ac_status=$?
34998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34999   (exit $ac_status); }; } &&
35000          { ac_try='test -s conftest$ac_exeext'
35001   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35002   (eval $ac_try) 2>&5
35003   ac_status=$?
35004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35005   (exit $ac_status); }; }; then
35006   ol_cv_db_db_3=yes
35007 else
35008   echo "$as_me: failed program was:" >&5
35009 sed 's/^/| /' conftest.$ac_ext >&5
35010
35011 ol_cv_db_db_3=no
35012 fi
35013 rm -f conftest.err conftest.$ac_objext \
35014       conftest$ac_exeext conftest.$ac_ext
35015
35016         LIBS="$ol_LIBS"
35017
35018 fi
35019 echo "$as_me:$LINENO: result: $ol_cv_db_db_3" >&5
35020 echo "${ECHO_T}$ol_cv_db_db_3" >&6
35021
35022         if test $ol_cv_db_db_3 = yes ; then
35023                 ol_cv_lib_db=-ldb-3
35024         fi
35025 fi
35026
35027
35028 elif test $ol_cv_bdb_major = 2 ; then
35029         if test $ol_cv_lib_db = no ; then
35030         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb2)" >&5
35031 echo $ECHO_N "checking for Berkeley DB link (-ldb2)... $ECHO_C" >&6
35032 if test "${ol_cv_db_db2+set}" = set; then
35033   echo $ECHO_N "(cached) $ECHO_C" >&6
35034 else
35035
35036         ol_DB_LIB=-ldb2
35037         ol_LIBS=$LIBS
35038         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
35039
35040         cat >conftest.$ac_ext <<_ACEOF
35041 /* confdefs.h.  */
35042 _ACEOF
35043 cat confdefs.h >>conftest.$ac_ext
35044 cat >>conftest.$ac_ext <<_ACEOF
35045 /* end confdefs.h.  */
35046
35047 #ifdef HAVE_DB_185_H
35048 # include <db_185.h>
35049 #else
35050 # include <db.h>
35051 #endif
35052
35053 #ifndef DB_VERSION_MAJOR
35054 # define DB_VERSION_MAJOR 1
35055 #endif
35056
35057 #ifndef NULL
35058 #define NULL ((void*)0)
35059 #endif
35060
35061 int
35062 main ()
35063 {
35064
35065 #if DB_VERSION_MAJOR > 1
35066         {
35067                 char *version;
35068                 int major, minor, patch;
35069
35070                 version = db_version( &major, &minor, &patch );
35071
35072                 if( major != DB_VERSION_MAJOR ||
35073                         minor < DB_VERSION_MINOR )
35074                 {
35075                         printf("Berkeley DB version mismatch\n"
35076                                 "\theader: %s\n\tlibrary: %s\n",
35077                                 DB_VERSION_STRING, version);
35078                         return 1;
35079                 }
35080         }
35081 #endif
35082
35083 #if DB_VERSION_MAJOR > 2
35084         db_env_create( NULL, 0 );
35085 #elif DB_VERSION_MAJOR > 1
35086         db_appexit( NULL );
35087 #else
35088         (void) dbopen( NULL, 0, 0, 0, NULL);
35089 #endif
35090
35091   ;
35092   return 0;
35093 }
35094 _ACEOF
35095 rm -f conftest.$ac_objext conftest$ac_exeext
35096 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35097   (eval $ac_link) 2>conftest.er1
35098   ac_status=$?
35099   grep -v '^ *+' conftest.er1 >conftest.err
35100   rm -f conftest.er1
35101   cat conftest.err >&5
35102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35103   (exit $ac_status); } &&
35104          { ac_try='test -z "$ac_c_werror_flag"
35105                          || test ! -s conftest.err'
35106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35107   (eval $ac_try) 2>&5
35108   ac_status=$?
35109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35110   (exit $ac_status); }; } &&
35111          { ac_try='test -s conftest$ac_exeext'
35112   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35113   (eval $ac_try) 2>&5
35114   ac_status=$?
35115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35116   (exit $ac_status); }; }; then
35117   ol_cv_db_db2=yes
35118 else
35119   echo "$as_me: failed program was:" >&5
35120 sed 's/^/| /' conftest.$ac_ext >&5
35121
35122 ol_cv_db_db2=no
35123 fi
35124 rm -f conftest.err conftest.$ac_objext \
35125       conftest$ac_exeext conftest.$ac_ext
35126
35127         LIBS="$ol_LIBS"
35128
35129 fi
35130 echo "$as_me:$LINENO: result: $ol_cv_db_db2" >&5
35131 echo "${ECHO_T}$ol_cv_db_db2" >&6
35132
35133         if test $ol_cv_db_db2 = yes ; then
35134                 ol_cv_lib_db=-ldb2
35135         fi
35136 fi
35137
35138         if test $ol_cv_lib_db = no ; then
35139         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-2)" >&5
35140 echo $ECHO_N "checking for Berkeley DB link (-ldb-2)... $ECHO_C" >&6
35141 if test "${ol_cv_db_db_2+set}" = set; then
35142   echo $ECHO_N "(cached) $ECHO_C" >&6
35143 else
35144
35145         ol_DB_LIB=-ldb-2
35146         ol_LIBS=$LIBS
35147         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
35148
35149         cat >conftest.$ac_ext <<_ACEOF
35150 /* confdefs.h.  */
35151 _ACEOF
35152 cat confdefs.h >>conftest.$ac_ext
35153 cat >>conftest.$ac_ext <<_ACEOF
35154 /* end confdefs.h.  */
35155
35156 #ifdef HAVE_DB_185_H
35157 # include <db_185.h>
35158 #else
35159 # include <db.h>
35160 #endif
35161
35162 #ifndef DB_VERSION_MAJOR
35163 # define DB_VERSION_MAJOR 1
35164 #endif
35165
35166 #ifndef NULL
35167 #define NULL ((void*)0)
35168 #endif
35169
35170 int
35171 main ()
35172 {
35173
35174 #if DB_VERSION_MAJOR > 1
35175         {
35176                 char *version;
35177                 int major, minor, patch;
35178
35179                 version = db_version( &major, &minor, &patch );
35180
35181                 if( major != DB_VERSION_MAJOR ||
35182                         minor < DB_VERSION_MINOR )
35183                 {
35184                         printf("Berkeley DB version mismatch\n"
35185                                 "\theader: %s\n\tlibrary: %s\n",
35186                                 DB_VERSION_STRING, version);
35187                         return 1;
35188                 }
35189         }
35190 #endif
35191
35192 #if DB_VERSION_MAJOR > 2
35193         db_env_create( NULL, 0 );
35194 #elif DB_VERSION_MAJOR > 1
35195         db_appexit( NULL );
35196 #else
35197         (void) dbopen( NULL, 0, 0, 0, NULL);
35198 #endif
35199
35200   ;
35201   return 0;
35202 }
35203 _ACEOF
35204 rm -f conftest.$ac_objext conftest$ac_exeext
35205 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35206   (eval $ac_link) 2>conftest.er1
35207   ac_status=$?
35208   grep -v '^ *+' conftest.er1 >conftest.err
35209   rm -f conftest.er1
35210   cat conftest.err >&5
35211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35212   (exit $ac_status); } &&
35213          { ac_try='test -z "$ac_c_werror_flag"
35214                          || test ! -s conftest.err'
35215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35216   (eval $ac_try) 2>&5
35217   ac_status=$?
35218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35219   (exit $ac_status); }; } &&
35220          { ac_try='test -s conftest$ac_exeext'
35221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35222   (eval $ac_try) 2>&5
35223   ac_status=$?
35224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35225   (exit $ac_status); }; }; then
35226   ol_cv_db_db_2=yes
35227 else
35228   echo "$as_me: failed program was:" >&5
35229 sed 's/^/| /' conftest.$ac_ext >&5
35230
35231 ol_cv_db_db_2=no
35232 fi
35233 rm -f conftest.err conftest.$ac_objext \
35234       conftest$ac_exeext conftest.$ac_ext
35235
35236         LIBS="$ol_LIBS"
35237
35238 fi
35239 echo "$as_me:$LINENO: result: $ol_cv_db_db_2" >&5
35240 echo "${ECHO_T}$ol_cv_db_db_2" >&6
35241
35242         if test $ol_cv_db_db_2 = yes ; then
35243                 ol_cv_lib_db=-ldb-2
35244         fi
35245 fi
35246
35247
35248 elif test $ol_cv_bdb_major = 1 ; then
35249         if test $ol_cv_lib_db = no ; then
35250         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb1)" >&5
35251 echo $ECHO_N "checking for Berkeley DB link (-ldb1)... $ECHO_C" >&6
35252 if test "${ol_cv_db_db1+set}" = set; then
35253   echo $ECHO_N "(cached) $ECHO_C" >&6
35254 else
35255
35256         ol_DB_LIB=-ldb1
35257         ol_LIBS=$LIBS
35258         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
35259
35260         cat >conftest.$ac_ext <<_ACEOF
35261 /* confdefs.h.  */
35262 _ACEOF
35263 cat confdefs.h >>conftest.$ac_ext
35264 cat >>conftest.$ac_ext <<_ACEOF
35265 /* end confdefs.h.  */
35266
35267 #ifdef HAVE_DB_185_H
35268 # include <db_185.h>
35269 #else
35270 # include <db.h>
35271 #endif
35272
35273 #ifndef DB_VERSION_MAJOR
35274 # define DB_VERSION_MAJOR 1
35275 #endif
35276
35277 #ifndef NULL
35278 #define NULL ((void*)0)
35279 #endif
35280
35281 int
35282 main ()
35283 {
35284
35285 #if DB_VERSION_MAJOR > 1
35286         {
35287                 char *version;
35288                 int major, minor, patch;
35289
35290                 version = db_version( &major, &minor, &patch );
35291
35292                 if( major != DB_VERSION_MAJOR ||
35293                         minor < DB_VERSION_MINOR )
35294                 {
35295                         printf("Berkeley DB version mismatch\n"
35296                                 "\theader: %s\n\tlibrary: %s\n",
35297                                 DB_VERSION_STRING, version);
35298                         return 1;
35299                 }
35300         }
35301 #endif
35302
35303 #if DB_VERSION_MAJOR > 2
35304         db_env_create( NULL, 0 );
35305 #elif DB_VERSION_MAJOR > 1
35306         db_appexit( NULL );
35307 #else
35308         (void) dbopen( NULL, 0, 0, 0, NULL);
35309 #endif
35310
35311   ;
35312   return 0;
35313 }
35314 _ACEOF
35315 rm -f conftest.$ac_objext conftest$ac_exeext
35316 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35317   (eval $ac_link) 2>conftest.er1
35318   ac_status=$?
35319   grep -v '^ *+' conftest.er1 >conftest.err
35320   rm -f conftest.er1
35321   cat conftest.err >&5
35322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35323   (exit $ac_status); } &&
35324          { ac_try='test -z "$ac_c_werror_flag"
35325                          || test ! -s conftest.err'
35326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35327   (eval $ac_try) 2>&5
35328   ac_status=$?
35329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35330   (exit $ac_status); }; } &&
35331          { ac_try='test -s conftest$ac_exeext'
35332   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35333   (eval $ac_try) 2>&5
35334   ac_status=$?
35335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35336   (exit $ac_status); }; }; then
35337   ol_cv_db_db1=yes
35338 else
35339   echo "$as_me: failed program was:" >&5
35340 sed 's/^/| /' conftest.$ac_ext >&5
35341
35342 ol_cv_db_db1=no
35343 fi
35344 rm -f conftest.err conftest.$ac_objext \
35345       conftest$ac_exeext conftest.$ac_ext
35346
35347         LIBS="$ol_LIBS"
35348
35349 fi
35350 echo "$as_me:$LINENO: result: $ol_cv_db_db1" >&5
35351 echo "${ECHO_T}$ol_cv_db_db1" >&6
35352
35353         if test $ol_cv_db_db1 = yes ; then
35354                 ol_cv_lib_db=-ldb1
35355         fi
35356 fi
35357
35358         if test $ol_cv_lib_db = no ; then
35359         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-1)" >&5
35360 echo $ECHO_N "checking for Berkeley DB link (-ldb-1)... $ECHO_C" >&6
35361 if test "${ol_cv_db_db_1+set}" = set; then
35362   echo $ECHO_N "(cached) $ECHO_C" >&6
35363 else
35364
35365         ol_DB_LIB=-ldb-1
35366         ol_LIBS=$LIBS
35367         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
35368
35369         cat >conftest.$ac_ext <<_ACEOF
35370 /* confdefs.h.  */
35371 _ACEOF
35372 cat confdefs.h >>conftest.$ac_ext
35373 cat >>conftest.$ac_ext <<_ACEOF
35374 /* end confdefs.h.  */
35375
35376 #ifdef HAVE_DB_185_H
35377 # include <db_185.h>
35378 #else
35379 # include <db.h>
35380 #endif
35381
35382 #ifndef DB_VERSION_MAJOR
35383 # define DB_VERSION_MAJOR 1
35384 #endif
35385
35386 #ifndef NULL
35387 #define NULL ((void*)0)
35388 #endif
35389
35390 int
35391 main ()
35392 {
35393
35394 #if DB_VERSION_MAJOR > 1
35395         {
35396                 char *version;
35397                 int major, minor, patch;
35398
35399                 version = db_version( &major, &minor, &patch );
35400
35401                 if( major != DB_VERSION_MAJOR ||
35402                         minor < DB_VERSION_MINOR )
35403                 {
35404                         printf("Berkeley DB version mismatch\n"
35405                                 "\theader: %s\n\tlibrary: %s\n",
35406                                 DB_VERSION_STRING, version);
35407                         return 1;
35408                 }
35409         }
35410 #endif
35411
35412 #if DB_VERSION_MAJOR > 2
35413         db_env_create( NULL, 0 );
35414 #elif DB_VERSION_MAJOR > 1
35415         db_appexit( NULL );
35416 #else
35417         (void) dbopen( NULL, 0, 0, 0, NULL);
35418 #endif
35419
35420   ;
35421   return 0;
35422 }
35423 _ACEOF
35424 rm -f conftest.$ac_objext conftest$ac_exeext
35425 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35426   (eval $ac_link) 2>conftest.er1
35427   ac_status=$?
35428   grep -v '^ *+' conftest.er1 >conftest.err
35429   rm -f conftest.er1
35430   cat conftest.err >&5
35431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35432   (exit $ac_status); } &&
35433          { ac_try='test -z "$ac_c_werror_flag"
35434                          || test ! -s conftest.err'
35435   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35436   (eval $ac_try) 2>&5
35437   ac_status=$?
35438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35439   (exit $ac_status); }; } &&
35440          { ac_try='test -s conftest$ac_exeext'
35441   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35442   (eval $ac_try) 2>&5
35443   ac_status=$?
35444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35445   (exit $ac_status); }; }; then
35446   ol_cv_db_db_1=yes
35447 else
35448   echo "$as_me: failed program was:" >&5
35449 sed 's/^/| /' conftest.$ac_ext >&5
35450
35451 ol_cv_db_db_1=no
35452 fi
35453 rm -f conftest.err conftest.$ac_objext \
35454       conftest$ac_exeext conftest.$ac_ext
35455
35456         LIBS="$ol_LIBS"
35457
35458 fi
35459 echo "$as_me:$LINENO: result: $ol_cv_db_db_1" >&5
35460 echo "${ECHO_T}$ol_cv_db_db_1" >&6
35461
35462         if test $ol_cv_db_db_1 = yes ; then
35463                 ol_cv_lib_db=-ldb-1
35464         fi
35465 fi
35466
35467 fi
35468 if test $ol_cv_lib_db = no ; then
35469         echo "$as_me:$LINENO: checking for Berkeley DB link (default)" >&5
35470 echo $ECHO_N "checking for Berkeley DB link (default)... $ECHO_C" >&6
35471 if test "${ol_cv_db_none+set}" = set; then
35472   echo $ECHO_N "(cached) $ECHO_C" >&6
35473 else
35474
35475         ol_DB_LIB=
35476         ol_LIBS=$LIBS
35477         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
35478
35479         cat >conftest.$ac_ext <<_ACEOF
35480 /* confdefs.h.  */
35481 _ACEOF
35482 cat confdefs.h >>conftest.$ac_ext
35483 cat >>conftest.$ac_ext <<_ACEOF
35484 /* end confdefs.h.  */
35485
35486 #ifdef HAVE_DB_185_H
35487 # include <db_185.h>
35488 #else
35489 # include <db.h>
35490 #endif
35491
35492 #ifndef DB_VERSION_MAJOR
35493 # define DB_VERSION_MAJOR 1
35494 #endif
35495
35496 #ifndef NULL
35497 #define NULL ((void*)0)
35498 #endif
35499
35500 int
35501 main ()
35502 {
35503
35504 #if DB_VERSION_MAJOR > 1
35505         {
35506                 char *version;
35507                 int major, minor, patch;
35508
35509                 version = db_version( &major, &minor, &patch );
35510
35511                 if( major != DB_VERSION_MAJOR ||
35512                         minor < DB_VERSION_MINOR )
35513                 {
35514                         printf("Berkeley DB version mismatch\n"
35515                                 "\theader: %s\n\tlibrary: %s\n",
35516                                 DB_VERSION_STRING, version);
35517                         return 1;
35518                 }
35519         }
35520 #endif
35521
35522 #if DB_VERSION_MAJOR > 2
35523         db_env_create( NULL, 0 );
35524 #elif DB_VERSION_MAJOR > 1
35525         db_appexit( NULL );
35526 #else
35527         (void) dbopen( NULL, 0, 0, 0, NULL);
35528 #endif
35529
35530   ;
35531   return 0;
35532 }
35533 _ACEOF
35534 rm -f conftest.$ac_objext conftest$ac_exeext
35535 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35536   (eval $ac_link) 2>conftest.er1
35537   ac_status=$?
35538   grep -v '^ *+' conftest.er1 >conftest.err
35539   rm -f conftest.er1
35540   cat conftest.err >&5
35541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35542   (exit $ac_status); } &&
35543          { ac_try='test -z "$ac_c_werror_flag"
35544                          || test ! -s conftest.err'
35545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35546   (eval $ac_try) 2>&5
35547   ac_status=$?
35548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35549   (exit $ac_status); }; } &&
35550          { ac_try='test -s conftest$ac_exeext'
35551   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35552   (eval $ac_try) 2>&5
35553   ac_status=$?
35554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35555   (exit $ac_status); }; }; then
35556   ol_cv_db_none=yes
35557 else
35558   echo "$as_me: failed program was:" >&5
35559 sed 's/^/| /' conftest.$ac_ext >&5
35560
35561 ol_cv_db_none=no
35562 fi
35563 rm -f conftest.err conftest.$ac_objext \
35564       conftest$ac_exeext conftest.$ac_ext
35565
35566         LIBS="$ol_LIBS"
35567
35568 fi
35569 echo "$as_me:$LINENO: result: $ol_cv_db_none" >&5
35570 echo "${ECHO_T}$ol_cv_db_none" >&6
35571
35572         if test $ol_cv_db_none = yes ; then
35573                 ol_cv_lib_db=yes
35574         fi
35575 fi
35576
35577
35578         if test "$ol_cv_lib_db" != no ; then
35579                 ol_cv_berkeley_db=yes
35580                 echo "$as_me:$LINENO: checking for Berkeley DB version match" >&5
35581 echo $ECHO_N "checking for Berkeley DB version match... $ECHO_C" >&6
35582 if test "${ol_cv_berkeley_db_version+set}" = set; then
35583   echo $ECHO_N "(cached) $ECHO_C" >&6
35584 else
35585
35586         ol_LIBS="$LIBS"
35587         LIBS="$LTHREAD_LIBS $LIBS"
35588         if test $ol_cv_lib_db != yes ; then
35589                 LIBS="$ol_cv_lib_db $LIBS"
35590         fi
35591
35592         if test "$cross_compiling" = yes; then
35593   ol_cv_berkeley_db_version=cross
35594 else
35595   cat >conftest.$ac_ext <<_ACEOF
35596 /* confdefs.h.  */
35597 _ACEOF
35598 cat confdefs.h >>conftest.$ac_ext
35599 cat >>conftest.$ac_ext <<_ACEOF
35600 /* end confdefs.h.  */
35601
35602 #ifdef HAVE_DB_185_H
35603         choke me;
35604 #else
35605 #include <db.h>
35606 #endif
35607 #ifndef DB_VERSION_MAJOR
35608 # define DB_VERSION_MAJOR 1
35609 #endif
35610 #ifndef NULL
35611 #define NULL ((void *)0)
35612 #endif
35613 main()
35614 {
35615 #if DB_VERSION_MAJOR > 1
35616         char *version;
35617         int major, minor, patch;
35618
35619         version = db_version( &major, &minor, &patch );
35620
35621         if( major != DB_VERSION_MAJOR ||
35622                 minor != DB_VERSION_MINOR ||
35623                 patch != DB_VERSION_PATCH )
35624         {
35625                 printf("Berkeley DB version mismatch\n"
35626                         "\theader: %s\n\tlibrary: %s\n",
35627                         DB_VERSION_STRING, version);
35628                 return 1;
35629         }
35630 #endif
35631
35632         return 0;
35633 }
35634 _ACEOF
35635 rm -f conftest$ac_exeext
35636 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35637   (eval $ac_link) 2>&5
35638   ac_status=$?
35639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35640   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
35641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35642   (eval $ac_try) 2>&5
35643   ac_status=$?
35644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35645   (exit $ac_status); }; }; then
35646   ol_cv_berkeley_db_version=yes
35647 else
35648   echo "$as_me: program exited with status $ac_status" >&5
35649 echo "$as_me: failed program was:" >&5
35650 sed 's/^/| /' conftest.$ac_ext >&5
35651
35652 ( exit $ac_status )
35653 ol_cv_berkeley_db_version=no
35654 fi
35655 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
35656 fi
35657
35658         LIBS="$ol_LIBS"
35659
35660 fi
35661 echo "$as_me:$LINENO: result: $ol_cv_berkeley_db_version" >&5
35662 echo "${ECHO_T}$ol_cv_berkeley_db_version" >&6
35663
35664         if test $ol_cv_berkeley_db_version = no ; then
35665                 { { echo "$as_me:$LINENO: error: Berkeley DB version mismatch" >&5
35666 echo "$as_me: error: Berkeley DB version mismatch" >&2;}
35667    { (exit 1); exit 1; }; }
35668         fi
35669
35670                 echo "$as_me:$LINENO: checking for Berkeley DB thread support" >&5
35671 echo $ECHO_N "checking for Berkeley DB thread support... $ECHO_C" >&6
35672 if test "${ol_cv_berkeley_db_thread+set}" = set; then
35673   echo $ECHO_N "(cached) $ECHO_C" >&6
35674 else
35675
35676         ol_LIBS="$LIBS"
35677         LIBS="$LTHREAD_LIBS $LIBS"
35678         if test $ol_cv_lib_db != yes ; then
35679                 LIBS="$ol_cv_lib_db $LIBS"
35680         fi
35681
35682         if test "$cross_compiling" = yes; then
35683   ol_cv_berkeley_db_thread=cross
35684 else
35685   cat >conftest.$ac_ext <<_ACEOF
35686 /* confdefs.h.  */
35687 _ACEOF
35688 cat confdefs.h >>conftest.$ac_ext
35689 cat >>conftest.$ac_ext <<_ACEOF
35690 /* end confdefs.h.  */
35691
35692 #ifdef HAVE_DB_185_H
35693         choke me;
35694 #else
35695 #include <db.h>
35696 #endif
35697 #ifndef NULL
35698 #define NULL ((void *)0)
35699 #endif
35700 main()
35701 {
35702         int rc;
35703         u_int32_t flags = DB_CREATE |
35704 #ifdef DB_PRIVATE
35705                 DB_PRIVATE |
35706 #endif
35707                 DB_THREAD;
35708
35709 #if DB_VERSION_MAJOR > 2
35710         DB_ENV *env = NULL;
35711
35712         rc = db_env_create( &env, 0 );
35713
35714         flags |= DB_INIT_MPOOL;
35715 #ifdef DB_MPOOL_PRIVATE
35716         flags |= DB_MPOOL_PRIVATE;
35717 #endif
35718
35719         if( rc ) {
35720                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
35721                 return rc;
35722         }
35723
35724 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
35725         rc = (env->open)( env, NULL, flags, 0 );
35726 #else
35727         rc = (env->open)( env, NULL, NULL, flags, 0 );
35728 #endif
35729
35730         if ( rc == 0 ) {
35731                 rc = env->close( env, 0 );
35732         }
35733
35734         if( rc ) {
35735                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
35736                 return rc;
35737         }
35738
35739 #else
35740         DB_ENV env;
35741         memset( &env, '\0', sizeof(env) );
35742
35743         rc = db_appinit( NULL, NULL, &env, flags );
35744
35745         if( rc == 0 ) {
35746                 db_appexit( &env );
35747         }
35748
35749         unlink("__db_mpool.share");
35750         unlink("__db_lock.share");
35751 #endif
35752
35753         return rc;
35754 }
35755 _ACEOF
35756 rm -f conftest$ac_exeext
35757 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35758   (eval $ac_link) 2>&5
35759   ac_status=$?
35760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35761   (exit $ac_status); } && { ac_try='./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   ol_cv_berkeley_db_thread=yes
35768 else
35769   echo "$as_me: program exited with status $ac_status" >&5
35770 echo "$as_me: failed program was:" >&5
35771 sed 's/^/| /' conftest.$ac_ext >&5
35772
35773 ( exit $ac_status )
35774 ol_cv_berkeley_db_thread=no
35775 fi
35776 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
35777 fi
35778
35779         LIBS="$ol_LIBS"
35780
35781 fi
35782 echo "$as_me:$LINENO: result: $ol_cv_berkeley_db_thread" >&5
35783 echo "${ECHO_T}$ol_cv_berkeley_db_thread" >&6
35784
35785         if test $ol_cv_berkeley_db_thread != no ; then
35786
35787 cat >>confdefs.h <<\_ACEOF
35788 #define HAVE_BERKELEY_DB_THREAD 1
35789 _ACEOF
35790
35791         fi
35792
35793         fi
35794 fi
35795
35796         fi
35797
35798         if test $ol_cv_berkeley_db != no ; then
35799
35800 cat >>confdefs.h <<\_ACEOF
35801 #define HAVE_BERKELEY_DB 1
35802 _ACEOF
35803
35804
35805                 ol_link_ldbm=berkeley
35806                 ol_enable_ldbm_api=berkeley
35807
35808                 if test $ol_enable_ldbm_type = hash ; then
35809
35810 cat >>confdefs.h <<\_ACEOF
35811 #define LDBM_USE_DBHASH 1
35812 _ACEOF
35813
35814                 else
35815
35816 cat >>confdefs.h <<\_ACEOF
35817 #define LDBM_USE_DBBTREE 1
35818 _ACEOF
35819
35820                 fi
35821
35822                                                 if test $ol_cv_lib_db != yes ; then
35823                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
35824                 fi
35825         fi
35826         ;;
35827 esac
35828
35829 if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
35830         if test $ol_link_ldbm != berkeley ; then
35831                 { { echo "$as_me:$LINENO: error: BDB/HDB: BerkeleyDB not available" >&5
35832 echo "$as_me: error: BDB/HDB: BerkeleyDB not available" >&2;}
35833    { (exit 1); exit 1; }; }
35834         else
35835                 echo "$as_me:$LINENO: checking Berkeley DB version for BDB/HDB backends" >&5
35836 echo $ECHO_N "checking Berkeley DB version for BDB/HDB backends... $ECHO_C" >&6
35837 if test "${ol_cv_bdb_compat+set}" = set; then
35838   echo $ECHO_N "(cached) $ECHO_C" >&6
35839 else
35840
35841         cat >conftest.$ac_ext <<_ACEOF
35842 /* confdefs.h.  */
35843 _ACEOF
35844 cat confdefs.h >>conftest.$ac_ext
35845 cat >>conftest.$ac_ext <<_ACEOF
35846 /* end confdefs.h.  */
35847
35848 #include <db.h>
35849
35850  /* this check could be improved */
35851 #ifndef DB_VERSION_MAJOR
35852 #       define DB_VERSION_MAJOR 1
35853 #endif
35854 #ifndef DB_VERSION_MINOR
35855 #       define DB_VERSION_MINOR 0
35856 #endif
35857
35858 /* require 4.2 or later */
35859 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
35860         __db_version_compat
35861 #endif
35862
35863 _ACEOF
35864 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
35865   $EGREP "__db_version_compat" >/dev/null 2>&1; then
35866   ol_cv_bdb_compat=yes
35867 else
35868   ol_cv_bdb_compat=no
35869 fi
35870 rm -f conftest*
35871
35872 fi
35873 echo "$as_me:$LINENO: result: $ol_cv_bdb_compat" >&5
35874 echo "${ECHO_T}$ol_cv_bdb_compat" >&6
35875
35876
35877                 if test $ol_cv_bdb_compat != yes ; then
35878                         { { echo "$as_me:$LINENO: error: BDB/HDB: BerkeleyDB version incompatible" >&5
35879 echo "$as_me: error: BDB/HDB: BerkeleyDB version incompatible" >&2;}
35880    { (exit 1); exit 1; }; }
35881                 fi
35882         fi
35883 fi
35884
35885 if test $ol_link_ldbm = no && test $ol_enable_ldbm_type = btree ; then
35886         { echo "$as_me:$LINENO: WARNING: Could not find LDBM with BTREE support" >&5
35887 echo "$as_me: WARNING: Could not find LDBM with BTREE support" >&2;}
35888         ol_enable_ldbm_api=none
35889 fi
35890
35891 if test $ol_enable_ldbm_api = auto || test $ol_enable_ldbm_api = mdbm ; then
35892         echo "$as_me:$LINENO: checking for MDBM library" >&5
35893 echo $ECHO_N "checking for MDBM library... $ECHO_C" >&6
35894 if test "${ol_cv_lib_mdbm+set}" = set; then
35895   echo $ECHO_N "(cached) $ECHO_C" >&6
35896 else
35897         ol_LIBS="$LIBS"
35898         echo "$as_me:$LINENO: checking for mdbm_set_chain" >&5
35899 echo $ECHO_N "checking for mdbm_set_chain... $ECHO_C" >&6
35900 if test "${ac_cv_func_mdbm_set_chain+set}" = set; then
35901   echo $ECHO_N "(cached) $ECHO_C" >&6
35902 else
35903   cat >conftest.$ac_ext <<_ACEOF
35904 /* confdefs.h.  */
35905 _ACEOF
35906 cat confdefs.h >>conftest.$ac_ext
35907 cat >>conftest.$ac_ext <<_ACEOF
35908 /* end confdefs.h.  */
35909 /* Define mdbm_set_chain to an innocuous variant, in case <limits.h> declares mdbm_set_chain.
35910    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
35911 #define mdbm_set_chain innocuous_mdbm_set_chain
35912
35913 /* System header to define __stub macros and hopefully few prototypes,
35914     which can conflict with char mdbm_set_chain (); below.
35915     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35916     <limits.h> exists even on freestanding compilers.  */
35917
35918 #ifdef __STDC__
35919 # include <limits.h>
35920 #else
35921 # include <assert.h>
35922 #endif
35923
35924 #undef mdbm_set_chain
35925
35926 /* Override any gcc2 internal prototype to avoid an error.  */
35927 #ifdef __cplusplus
35928 extern "C"
35929 {
35930 #endif
35931 /* We use char because int might match the return type of a gcc2
35932    builtin and then its argument prototype would still apply.  */
35933 char mdbm_set_chain ();
35934 /* The GNU C library defines this for functions which it implements
35935     to always fail with ENOSYS.  Some functions are actually named
35936     something starting with __ and the normal name is an alias.  */
35937 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
35938 choke me
35939 #else
35940 char (*f) () = mdbm_set_chain;
35941 #endif
35942 #ifdef __cplusplus
35943 }
35944 #endif
35945
35946 int
35947 main ()
35948 {
35949 return f != mdbm_set_chain;
35950   ;
35951   return 0;
35952 }
35953 _ACEOF
35954 rm -f conftest.$ac_objext conftest$ac_exeext
35955 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35956   (eval $ac_link) 2>conftest.er1
35957   ac_status=$?
35958   grep -v '^ *+' conftest.er1 >conftest.err
35959   rm -f conftest.er1
35960   cat conftest.err >&5
35961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35962   (exit $ac_status); } &&
35963          { ac_try='test -z "$ac_c_werror_flag"
35964                          || test ! -s conftest.err'
35965   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35966   (eval $ac_try) 2>&5
35967   ac_status=$?
35968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35969   (exit $ac_status); }; } &&
35970          { ac_try='test -s conftest$ac_exeext'
35971   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35972   (eval $ac_try) 2>&5
35973   ac_status=$?
35974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35975   (exit $ac_status); }; }; then
35976   ac_cv_func_mdbm_set_chain=yes
35977 else
35978   echo "$as_me: failed program was:" >&5
35979 sed 's/^/| /' conftest.$ac_ext >&5
35980
35981 ac_cv_func_mdbm_set_chain=no
35982 fi
35983 rm -f conftest.err conftest.$ac_objext \
35984       conftest$ac_exeext conftest.$ac_ext
35985 fi
35986 echo "$as_me:$LINENO: result: $ac_cv_func_mdbm_set_chain" >&5
35987 echo "${ECHO_T}$ac_cv_func_mdbm_set_chain" >&6
35988 if test $ac_cv_func_mdbm_set_chain = yes; then
35989   ol_cv_lib_mdbm=yes
35990 else
35991
35992                 echo "$as_me:$LINENO: checking for mdbm_set_chain in -lmdbm" >&5
35993 echo $ECHO_N "checking for mdbm_set_chain in -lmdbm... $ECHO_C" >&6
35994 if test "${ac_cv_lib_mdbm_mdbm_set_chain+set}" = set; then
35995   echo $ECHO_N "(cached) $ECHO_C" >&6
35996 else
35997   ac_check_lib_save_LIBS=$LIBS
35998 LIBS="-lmdbm  $LIBS"
35999 cat >conftest.$ac_ext <<_ACEOF
36000 /* confdefs.h.  */
36001 _ACEOF
36002 cat confdefs.h >>conftest.$ac_ext
36003 cat >>conftest.$ac_ext <<_ACEOF
36004 /* end confdefs.h.  */
36005
36006 /* Override any gcc2 internal prototype to avoid an error.  */
36007 #ifdef __cplusplus
36008 extern "C"
36009 #endif
36010 /* We use char because int might match the return type of a gcc2
36011    builtin and then its argument prototype would still apply.  */
36012 char mdbm_set_chain ();
36013 int
36014 main ()
36015 {
36016 mdbm_set_chain ();
36017   ;
36018   return 0;
36019 }
36020 _ACEOF
36021 rm -f conftest.$ac_objext conftest$ac_exeext
36022 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36023   (eval $ac_link) 2>conftest.er1
36024   ac_status=$?
36025   grep -v '^ *+' conftest.er1 >conftest.err
36026   rm -f conftest.er1
36027   cat conftest.err >&5
36028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36029   (exit $ac_status); } &&
36030          { ac_try='test -z "$ac_c_werror_flag"
36031                          || test ! -s conftest.err'
36032   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36033   (eval $ac_try) 2>&5
36034   ac_status=$?
36035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36036   (exit $ac_status); }; } &&
36037          { ac_try='test -s conftest$ac_exeext'
36038   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36039   (eval $ac_try) 2>&5
36040   ac_status=$?
36041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36042   (exit $ac_status); }; }; then
36043   ac_cv_lib_mdbm_mdbm_set_chain=yes
36044 else
36045   echo "$as_me: failed program was:" >&5
36046 sed 's/^/| /' conftest.$ac_ext >&5
36047
36048 ac_cv_lib_mdbm_mdbm_set_chain=no
36049 fi
36050 rm -f conftest.err conftest.$ac_objext \
36051       conftest$ac_exeext conftest.$ac_ext
36052 LIBS=$ac_check_lib_save_LIBS
36053 fi
36054 echo "$as_me:$LINENO: result: $ac_cv_lib_mdbm_mdbm_set_chain" >&5
36055 echo "${ECHO_T}$ac_cv_lib_mdbm_mdbm_set_chain" >&6
36056 if test $ac_cv_lib_mdbm_mdbm_set_chain = yes; then
36057   ol_cv_lib_mdbm=-lmdbm
36058 else
36059   ol_cv_lib_mdbm=no
36060 fi
36061
36062
36063 fi
36064
36065         LIBS="$ol_LIBS"
36066
36067 fi
36068 echo "$as_me:$LINENO: result: $ol_cv_lib_mdbm" >&5
36069 echo "${ECHO_T}$ol_cv_lib_mdbm" >&6
36070
36071
36072
36073 for ac_header in mdbm.h
36074 do
36075 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
36076 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36077   echo "$as_me:$LINENO: checking for $ac_header" >&5
36078 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36079 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36080   echo $ECHO_N "(cached) $ECHO_C" >&6
36081 fi
36082 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36083 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36084 else
36085   # Is the header compilable?
36086 echo "$as_me:$LINENO: checking $ac_header usability" >&5
36087 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
36088 cat >conftest.$ac_ext <<_ACEOF
36089 /* confdefs.h.  */
36090 _ACEOF
36091 cat confdefs.h >>conftest.$ac_ext
36092 cat >>conftest.$ac_ext <<_ACEOF
36093 /* end confdefs.h.  */
36094 $ac_includes_default
36095 #include <$ac_header>
36096 _ACEOF
36097 rm -f conftest.$ac_objext
36098 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36099   (eval $ac_compile) 2>conftest.er1
36100   ac_status=$?
36101   grep -v '^ *+' conftest.er1 >conftest.err
36102   rm -f conftest.er1
36103   cat conftest.err >&5
36104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36105   (exit $ac_status); } &&
36106          { ac_try='test -z "$ac_c_werror_flag"
36107                          || test ! -s conftest.err'
36108   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36109   (eval $ac_try) 2>&5
36110   ac_status=$?
36111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36112   (exit $ac_status); }; } &&
36113          { ac_try='test -s conftest.$ac_objext'
36114   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36115   (eval $ac_try) 2>&5
36116   ac_status=$?
36117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36118   (exit $ac_status); }; }; then
36119   ac_header_compiler=yes
36120 else
36121   echo "$as_me: failed program was:" >&5
36122 sed 's/^/| /' conftest.$ac_ext >&5
36123
36124 ac_header_compiler=no
36125 fi
36126 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36127 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
36128 echo "${ECHO_T}$ac_header_compiler" >&6
36129
36130 # Is the header present?
36131 echo "$as_me:$LINENO: checking $ac_header presence" >&5
36132 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
36133 cat >conftest.$ac_ext <<_ACEOF
36134 /* confdefs.h.  */
36135 _ACEOF
36136 cat confdefs.h >>conftest.$ac_ext
36137 cat >>conftest.$ac_ext <<_ACEOF
36138 /* end confdefs.h.  */
36139 #include <$ac_header>
36140 _ACEOF
36141 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
36142   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
36143   ac_status=$?
36144   grep -v '^ *+' conftest.er1 >conftest.err
36145   rm -f conftest.er1
36146   cat conftest.err >&5
36147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36148   (exit $ac_status); } >/dev/null; then
36149   if test -s conftest.err; then
36150     ac_cpp_err=$ac_c_preproc_warn_flag
36151     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
36152   else
36153     ac_cpp_err=
36154   fi
36155 else
36156   ac_cpp_err=yes
36157 fi
36158 if test -z "$ac_cpp_err"; then
36159   ac_header_preproc=yes
36160 else
36161   echo "$as_me: failed program was:" >&5
36162 sed 's/^/| /' conftest.$ac_ext >&5
36163
36164   ac_header_preproc=no
36165 fi
36166 rm -f conftest.err conftest.$ac_ext
36167 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
36168 echo "${ECHO_T}$ac_header_preproc" >&6
36169
36170 # So?  What about this header?
36171 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
36172   yes:no: )
36173     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
36174 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
36175     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
36176 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
36177     ac_header_preproc=yes
36178     ;;
36179   no:yes:* )
36180     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
36181 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
36182     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
36183 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
36184     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
36185 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
36186     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
36187 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
36188     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
36189 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
36190     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
36191 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
36192     (
36193       cat <<\_ASBOX
36194 ## --------------------------------------------- ##
36195 ## Report this to <http://www.openldap.org/its/> ##
36196 ## --------------------------------------------- ##
36197 _ASBOX
36198     ) |
36199       sed "s/^/$as_me: WARNING:     /" >&2
36200     ;;
36201 esac
36202 echo "$as_me:$LINENO: checking for $ac_header" >&5
36203 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36204 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36205   echo $ECHO_N "(cached) $ECHO_C" >&6
36206 else
36207   eval "$as_ac_Header=\$ac_header_preproc"
36208 fi
36209 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36210 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36211
36212 fi
36213 if test `eval echo '${'$as_ac_Header'}'` = yes; then
36214   cat >>confdefs.h <<_ACEOF
36215 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
36216 _ACEOF
36217
36218 fi
36219
36220 done
36221
36222  echo "$as_me:$LINENO: checking for db" >&5
36223 echo $ECHO_N "checking for db... $ECHO_C" >&6
36224 if test "${ol_cv_mdbm+set}" = set; then
36225   echo $ECHO_N "(cached) $ECHO_C" >&6
36226 else
36227
36228         if test $ol_cv_lib_mdbm = no || test $ac_cv_header_mdbm_h = no ; then
36229                 ol_cv_mdbm=no
36230         else
36231                 ol_cv_mdbm=yes
36232         fi
36233
36234 fi
36235 echo "$as_me:$LINENO: result: $ol_cv_mdbm" >&5
36236 echo "${ECHO_T}$ol_cv_mdbm" >&6
36237  if test $ol_cv_mdbm = yes ; then
36238
36239 cat >>confdefs.h <<\_ACEOF
36240 #define HAVE_MDBM 1
36241 _ACEOF
36242
36243  fi
36244
36245
36246         if test $ol_cv_mdbm = yes ; then
36247                 ol_link_ldbm=mdbm
36248                 ol_enable_ldbm_api=mdbm
36249                 if test $ol_cv_lib_mdbm != yes ; then
36250                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
36251                 fi
36252         fi
36253 fi
36254
36255 if test $ol_enable_ldbm_api = auto || test $ol_enable_ldbm_api = gdbm ; then
36256         echo "$as_me:$LINENO: checking for GDBM library" >&5
36257 echo $ECHO_N "checking for GDBM library... $ECHO_C" >&6
36258 if test "${ol_cv_lib_gdbm+set}" = set; then
36259   echo $ECHO_N "(cached) $ECHO_C" >&6
36260 else
36261         ol_LIBS="$LIBS"
36262         echo "$as_me:$LINENO: checking for gdbm_open" >&5
36263 echo $ECHO_N "checking for gdbm_open... $ECHO_C" >&6
36264 if test "${ac_cv_func_gdbm_open+set}" = set; then
36265   echo $ECHO_N "(cached) $ECHO_C" >&6
36266 else
36267   cat >conftest.$ac_ext <<_ACEOF
36268 /* confdefs.h.  */
36269 _ACEOF
36270 cat confdefs.h >>conftest.$ac_ext
36271 cat >>conftest.$ac_ext <<_ACEOF
36272 /* end confdefs.h.  */
36273 /* Define gdbm_open to an innocuous variant, in case <limits.h> declares gdbm_open.
36274    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
36275 #define gdbm_open innocuous_gdbm_open
36276
36277 /* System header to define __stub macros and hopefully few prototypes,
36278     which can conflict with char gdbm_open (); below.
36279     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36280     <limits.h> exists even on freestanding compilers.  */
36281
36282 #ifdef __STDC__
36283 # include <limits.h>
36284 #else
36285 # include <assert.h>
36286 #endif
36287
36288 #undef gdbm_open
36289
36290 /* Override any gcc2 internal prototype to avoid an error.  */
36291 #ifdef __cplusplus
36292 extern "C"
36293 {
36294 #endif
36295 /* We use char because int might match the return type of a gcc2
36296    builtin and then its argument prototype would still apply.  */
36297 char gdbm_open ();
36298 /* The GNU C library defines this for functions which it implements
36299     to always fail with ENOSYS.  Some functions are actually named
36300     something starting with __ and the normal name is an alias.  */
36301 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
36302 choke me
36303 #else
36304 char (*f) () = gdbm_open;
36305 #endif
36306 #ifdef __cplusplus
36307 }
36308 #endif
36309
36310 int
36311 main ()
36312 {
36313 return f != gdbm_open;
36314   ;
36315   return 0;
36316 }
36317 _ACEOF
36318 rm -f conftest.$ac_objext conftest$ac_exeext
36319 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36320   (eval $ac_link) 2>conftest.er1
36321   ac_status=$?
36322   grep -v '^ *+' conftest.er1 >conftest.err
36323   rm -f conftest.er1
36324   cat conftest.err >&5
36325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36326   (exit $ac_status); } &&
36327          { ac_try='test -z "$ac_c_werror_flag"
36328                          || test ! -s conftest.err'
36329   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36330   (eval $ac_try) 2>&5
36331   ac_status=$?
36332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36333   (exit $ac_status); }; } &&
36334          { ac_try='test -s conftest$ac_exeext'
36335   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36336   (eval $ac_try) 2>&5
36337   ac_status=$?
36338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36339   (exit $ac_status); }; }; then
36340   ac_cv_func_gdbm_open=yes
36341 else
36342   echo "$as_me: failed program was:" >&5
36343 sed 's/^/| /' conftest.$ac_ext >&5
36344
36345 ac_cv_func_gdbm_open=no
36346 fi
36347 rm -f conftest.err conftest.$ac_objext \
36348       conftest$ac_exeext conftest.$ac_ext
36349 fi
36350 echo "$as_me:$LINENO: result: $ac_cv_func_gdbm_open" >&5
36351 echo "${ECHO_T}$ac_cv_func_gdbm_open" >&6
36352 if test $ac_cv_func_gdbm_open = yes; then
36353   ol_cv_lib_gdbm=yes
36354 else
36355
36356                 echo "$as_me:$LINENO: checking for gdbm_open in -lgdbm" >&5
36357 echo $ECHO_N "checking for gdbm_open in -lgdbm... $ECHO_C" >&6
36358 if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then
36359   echo $ECHO_N "(cached) $ECHO_C" >&6
36360 else
36361   ac_check_lib_save_LIBS=$LIBS
36362 LIBS="-lgdbm  $LIBS"
36363 cat >conftest.$ac_ext <<_ACEOF
36364 /* confdefs.h.  */
36365 _ACEOF
36366 cat confdefs.h >>conftest.$ac_ext
36367 cat >>conftest.$ac_ext <<_ACEOF
36368 /* end confdefs.h.  */
36369
36370 /* Override any gcc2 internal prototype to avoid an error.  */
36371 #ifdef __cplusplus
36372 extern "C"
36373 #endif
36374 /* We use char because int might match the return type of a gcc2
36375    builtin and then its argument prototype would still apply.  */
36376 char gdbm_open ();
36377 int
36378 main ()
36379 {
36380 gdbm_open ();
36381   ;
36382   return 0;
36383 }
36384 _ACEOF
36385 rm -f conftest.$ac_objext conftest$ac_exeext
36386 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36387   (eval $ac_link) 2>conftest.er1
36388   ac_status=$?
36389   grep -v '^ *+' conftest.er1 >conftest.err
36390   rm -f conftest.er1
36391   cat conftest.err >&5
36392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36393   (exit $ac_status); } &&
36394          { ac_try='test -z "$ac_c_werror_flag"
36395                          || test ! -s conftest.err'
36396   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36397   (eval $ac_try) 2>&5
36398   ac_status=$?
36399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36400   (exit $ac_status); }; } &&
36401          { ac_try='test -s conftest$ac_exeext'
36402   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36403   (eval $ac_try) 2>&5
36404   ac_status=$?
36405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36406   (exit $ac_status); }; }; then
36407   ac_cv_lib_gdbm_gdbm_open=yes
36408 else
36409   echo "$as_me: failed program was:" >&5
36410 sed 's/^/| /' conftest.$ac_ext >&5
36411
36412 ac_cv_lib_gdbm_gdbm_open=no
36413 fi
36414 rm -f conftest.err conftest.$ac_objext \
36415       conftest$ac_exeext conftest.$ac_ext
36416 LIBS=$ac_check_lib_save_LIBS
36417 fi
36418 echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_gdbm_open" >&5
36419 echo "${ECHO_T}$ac_cv_lib_gdbm_gdbm_open" >&6
36420 if test $ac_cv_lib_gdbm_gdbm_open = yes; then
36421   ol_cv_lib_gdbm=-lgdbm
36422 else
36423   ol_cv_lib_gdbm=no
36424 fi
36425
36426
36427 fi
36428
36429         LIBS="$ol_LIBS"
36430
36431 fi
36432 echo "$as_me:$LINENO: result: $ol_cv_lib_gdbm" >&5
36433 echo "${ECHO_T}$ol_cv_lib_gdbm" >&6
36434
36435
36436
36437 for ac_header in gdbm.h
36438 do
36439 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
36440 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36441   echo "$as_me:$LINENO: checking for $ac_header" >&5
36442 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36443 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36444   echo $ECHO_N "(cached) $ECHO_C" >&6
36445 fi
36446 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36447 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36448 else
36449   # Is the header compilable?
36450 echo "$as_me:$LINENO: checking $ac_header usability" >&5
36451 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
36452 cat >conftest.$ac_ext <<_ACEOF
36453 /* confdefs.h.  */
36454 _ACEOF
36455 cat confdefs.h >>conftest.$ac_ext
36456 cat >>conftest.$ac_ext <<_ACEOF
36457 /* end confdefs.h.  */
36458 $ac_includes_default
36459 #include <$ac_header>
36460 _ACEOF
36461 rm -f conftest.$ac_objext
36462 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36463   (eval $ac_compile) 2>conftest.er1
36464   ac_status=$?
36465   grep -v '^ *+' conftest.er1 >conftest.err
36466   rm -f conftest.er1
36467   cat conftest.err >&5
36468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36469   (exit $ac_status); } &&
36470          { ac_try='test -z "$ac_c_werror_flag"
36471                          || test ! -s conftest.err'
36472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36473   (eval $ac_try) 2>&5
36474   ac_status=$?
36475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36476   (exit $ac_status); }; } &&
36477          { ac_try='test -s conftest.$ac_objext'
36478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36479   (eval $ac_try) 2>&5
36480   ac_status=$?
36481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36482   (exit $ac_status); }; }; then
36483   ac_header_compiler=yes
36484 else
36485   echo "$as_me: failed program was:" >&5
36486 sed 's/^/| /' conftest.$ac_ext >&5
36487
36488 ac_header_compiler=no
36489 fi
36490 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36491 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
36492 echo "${ECHO_T}$ac_header_compiler" >&6
36493
36494 # Is the header present?
36495 echo "$as_me:$LINENO: checking $ac_header presence" >&5
36496 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
36497 cat >conftest.$ac_ext <<_ACEOF
36498 /* confdefs.h.  */
36499 _ACEOF
36500 cat confdefs.h >>conftest.$ac_ext
36501 cat >>conftest.$ac_ext <<_ACEOF
36502 /* end confdefs.h.  */
36503 #include <$ac_header>
36504 _ACEOF
36505 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
36506   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
36507   ac_status=$?
36508   grep -v '^ *+' conftest.er1 >conftest.err
36509   rm -f conftest.er1
36510   cat conftest.err >&5
36511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36512   (exit $ac_status); } >/dev/null; then
36513   if test -s conftest.err; then
36514     ac_cpp_err=$ac_c_preproc_warn_flag
36515     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
36516   else
36517     ac_cpp_err=
36518   fi
36519 else
36520   ac_cpp_err=yes
36521 fi
36522 if test -z "$ac_cpp_err"; then
36523   ac_header_preproc=yes
36524 else
36525   echo "$as_me: failed program was:" >&5
36526 sed 's/^/| /' conftest.$ac_ext >&5
36527
36528   ac_header_preproc=no
36529 fi
36530 rm -f conftest.err conftest.$ac_ext
36531 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
36532 echo "${ECHO_T}$ac_header_preproc" >&6
36533
36534 # So?  What about this header?
36535 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
36536   yes:no: )
36537     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
36538 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
36539     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
36540 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
36541     ac_header_preproc=yes
36542     ;;
36543   no:yes:* )
36544     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
36545 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
36546     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
36547 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
36548     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
36549 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
36550     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
36551 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
36552     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
36553 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
36554     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
36555 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
36556     (
36557       cat <<\_ASBOX
36558 ## --------------------------------------------- ##
36559 ## Report this to <http://www.openldap.org/its/> ##
36560 ## --------------------------------------------- ##
36561 _ASBOX
36562     ) |
36563       sed "s/^/$as_me: WARNING:     /" >&2
36564     ;;
36565 esac
36566 echo "$as_me:$LINENO: checking for $ac_header" >&5
36567 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36568 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36569   echo $ECHO_N "(cached) $ECHO_C" >&6
36570 else
36571   eval "$as_ac_Header=\$ac_header_preproc"
36572 fi
36573 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36574 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36575
36576 fi
36577 if test `eval echo '${'$as_ac_Header'}'` = yes; then
36578   cat >>confdefs.h <<_ACEOF
36579 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
36580 _ACEOF
36581
36582 fi
36583
36584 done
36585
36586  echo "$as_me:$LINENO: checking for db" >&5
36587 echo $ECHO_N "checking for db... $ECHO_C" >&6
36588 if test "${ol_cv_gdbm+set}" = set; then
36589   echo $ECHO_N "(cached) $ECHO_C" >&6
36590 else
36591
36592         if test $ol_cv_lib_gdbm = no || test $ac_cv_header_gdbm_h = no ; then
36593                 ol_cv_gdbm=no
36594         else
36595                 ol_cv_gdbm=yes
36596         fi
36597
36598 fi
36599 echo "$as_me:$LINENO: result: $ol_cv_gdbm" >&5
36600 echo "${ECHO_T}$ol_cv_gdbm" >&6
36601  if test $ol_cv_gdbm = yes ; then
36602
36603 cat >>confdefs.h <<\_ACEOF
36604 #define HAVE_GDBM 1
36605 _ACEOF
36606
36607  fi
36608
36609
36610         if test $ol_cv_gdbm = yes ; then
36611                 ol_link_ldbm=gdbm
36612                 ol_enable_ldbm_api=gdbm
36613
36614                 if test $ol_cv_lib_gdbm != yes ; then
36615                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
36616                 fi
36617         fi
36618 fi
36619
36620 if test $ol_enable_ldbm_api = ndbm ; then
36621         echo "$as_me:$LINENO: checking for NDBM library" >&5
36622 echo $ECHO_N "checking for NDBM library... $ECHO_C" >&6
36623 if test "${ol_cv_lib_ndbm+set}" = set; then
36624   echo $ECHO_N "(cached) $ECHO_C" >&6
36625 else
36626         ol_LIBS="$LIBS"
36627         echo "$as_me:$LINENO: checking for dbm_open" >&5
36628 echo $ECHO_N "checking for dbm_open... $ECHO_C" >&6
36629 if test "${ac_cv_func_dbm_open+set}" = set; then
36630   echo $ECHO_N "(cached) $ECHO_C" >&6
36631 else
36632   cat >conftest.$ac_ext <<_ACEOF
36633 /* confdefs.h.  */
36634 _ACEOF
36635 cat confdefs.h >>conftest.$ac_ext
36636 cat >>conftest.$ac_ext <<_ACEOF
36637 /* end confdefs.h.  */
36638 /* Define dbm_open to an innocuous variant, in case <limits.h> declares dbm_open.
36639    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
36640 #define dbm_open innocuous_dbm_open
36641
36642 /* System header to define __stub macros and hopefully few prototypes,
36643     which can conflict with char dbm_open (); below.
36644     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36645     <limits.h> exists even on freestanding compilers.  */
36646
36647 #ifdef __STDC__
36648 # include <limits.h>
36649 #else
36650 # include <assert.h>
36651 #endif
36652
36653 #undef dbm_open
36654
36655 /* Override any gcc2 internal prototype to avoid an error.  */
36656 #ifdef __cplusplus
36657 extern "C"
36658 {
36659 #endif
36660 /* We use char because int might match the return type of a gcc2
36661    builtin and then its argument prototype would still apply.  */
36662 char dbm_open ();
36663 /* The GNU C library defines this for functions which it implements
36664     to always fail with ENOSYS.  Some functions are actually named
36665     something starting with __ and the normal name is an alias.  */
36666 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
36667 choke me
36668 #else
36669 char (*f) () = dbm_open;
36670 #endif
36671 #ifdef __cplusplus
36672 }
36673 #endif
36674
36675 int
36676 main ()
36677 {
36678 return f != dbm_open;
36679   ;
36680   return 0;
36681 }
36682 _ACEOF
36683 rm -f conftest.$ac_objext conftest$ac_exeext
36684 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36685   (eval $ac_link) 2>conftest.er1
36686   ac_status=$?
36687   grep -v '^ *+' conftest.er1 >conftest.err
36688   rm -f conftest.er1
36689   cat conftest.err >&5
36690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36691   (exit $ac_status); } &&
36692          { ac_try='test -z "$ac_c_werror_flag"
36693                          || test ! -s conftest.err'
36694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36695   (eval $ac_try) 2>&5
36696   ac_status=$?
36697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36698   (exit $ac_status); }; } &&
36699          { ac_try='test -s conftest$ac_exeext'
36700   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36701   (eval $ac_try) 2>&5
36702   ac_status=$?
36703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36704   (exit $ac_status); }; }; then
36705   ac_cv_func_dbm_open=yes
36706 else
36707   echo "$as_me: failed program was:" >&5
36708 sed 's/^/| /' conftest.$ac_ext >&5
36709
36710 ac_cv_func_dbm_open=no
36711 fi
36712 rm -f conftest.err conftest.$ac_objext \
36713       conftest$ac_exeext conftest.$ac_ext
36714 fi
36715 echo "$as_me:$LINENO: result: $ac_cv_func_dbm_open" >&5
36716 echo "${ECHO_T}$ac_cv_func_dbm_open" >&6
36717 if test $ac_cv_func_dbm_open = yes; then
36718   ol_cv_lib_ndbm=yes
36719 else
36720
36721                 echo "$as_me:$LINENO: checking for dbm_open in -lndbm" >&5
36722 echo $ECHO_N "checking for dbm_open in -lndbm... $ECHO_C" >&6
36723 if test "${ac_cv_lib_ndbm_dbm_open+set}" = set; then
36724   echo $ECHO_N "(cached) $ECHO_C" >&6
36725 else
36726   ac_check_lib_save_LIBS=$LIBS
36727 LIBS="-lndbm  $LIBS"
36728 cat >conftest.$ac_ext <<_ACEOF
36729 /* confdefs.h.  */
36730 _ACEOF
36731 cat confdefs.h >>conftest.$ac_ext
36732 cat >>conftest.$ac_ext <<_ACEOF
36733 /* end confdefs.h.  */
36734
36735 /* Override any gcc2 internal prototype to avoid an error.  */
36736 #ifdef __cplusplus
36737 extern "C"
36738 #endif
36739 /* We use char because int might match the return type of a gcc2
36740    builtin and then its argument prototype would still apply.  */
36741 char dbm_open ();
36742 int
36743 main ()
36744 {
36745 dbm_open ();
36746   ;
36747   return 0;
36748 }
36749 _ACEOF
36750 rm -f conftest.$ac_objext conftest$ac_exeext
36751 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36752   (eval $ac_link) 2>conftest.er1
36753   ac_status=$?
36754   grep -v '^ *+' conftest.er1 >conftest.err
36755   rm -f conftest.er1
36756   cat conftest.err >&5
36757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36758   (exit $ac_status); } &&
36759          { ac_try='test -z "$ac_c_werror_flag"
36760                          || test ! -s conftest.err'
36761   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36762   (eval $ac_try) 2>&5
36763   ac_status=$?
36764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36765   (exit $ac_status); }; } &&
36766          { ac_try='test -s conftest$ac_exeext'
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); }; }; then
36772   ac_cv_lib_ndbm_dbm_open=yes
36773 else
36774   echo "$as_me: failed program was:" >&5
36775 sed 's/^/| /' conftest.$ac_ext >&5
36776
36777 ac_cv_lib_ndbm_dbm_open=no
36778 fi
36779 rm -f conftest.err conftest.$ac_objext \
36780       conftest$ac_exeext conftest.$ac_ext
36781 LIBS=$ac_check_lib_save_LIBS
36782 fi
36783 echo "$as_me:$LINENO: result: $ac_cv_lib_ndbm_dbm_open" >&5
36784 echo "${ECHO_T}$ac_cv_lib_ndbm_dbm_open" >&6
36785 if test $ac_cv_lib_ndbm_dbm_open = yes; then
36786   ol_cv_lib_ndbm=-lndbm
36787 else
36788
36789                         echo "$as_me:$LINENO: checking for dbm_open in -ldbm" >&5
36790 echo $ECHO_N "checking for dbm_open in -ldbm... $ECHO_C" >&6
36791 if test "${ac_cv_lib_dbm_dbm_open+set}" = set; then
36792   echo $ECHO_N "(cached) $ECHO_C" >&6
36793 else
36794   ac_check_lib_save_LIBS=$LIBS
36795 LIBS="-ldbm  $LIBS"
36796 cat >conftest.$ac_ext <<_ACEOF
36797 /* confdefs.h.  */
36798 _ACEOF
36799 cat confdefs.h >>conftest.$ac_ext
36800 cat >>conftest.$ac_ext <<_ACEOF
36801 /* end confdefs.h.  */
36802
36803 /* Override any gcc2 internal prototype to avoid an error.  */
36804 #ifdef __cplusplus
36805 extern "C"
36806 #endif
36807 /* We use char because int might match the return type of a gcc2
36808    builtin and then its argument prototype would still apply.  */
36809 char dbm_open ();
36810 int
36811 main ()
36812 {
36813 dbm_open ();
36814   ;
36815   return 0;
36816 }
36817 _ACEOF
36818 rm -f conftest.$ac_objext conftest$ac_exeext
36819 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36820   (eval $ac_link) 2>conftest.er1
36821   ac_status=$?
36822   grep -v '^ *+' conftest.er1 >conftest.err
36823   rm -f conftest.er1
36824   cat conftest.err >&5
36825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36826   (exit $ac_status); } &&
36827          { ac_try='test -z "$ac_c_werror_flag"
36828                          || test ! -s conftest.err'
36829   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36830   (eval $ac_try) 2>&5
36831   ac_status=$?
36832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36833   (exit $ac_status); }; } &&
36834          { ac_try='test -s conftest$ac_exeext'
36835   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36836   (eval $ac_try) 2>&5
36837   ac_status=$?
36838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36839   (exit $ac_status); }; }; then
36840   ac_cv_lib_dbm_dbm_open=yes
36841 else
36842   echo "$as_me: failed program was:" >&5
36843 sed 's/^/| /' conftest.$ac_ext >&5
36844
36845 ac_cv_lib_dbm_dbm_open=no
36846 fi
36847 rm -f conftest.err conftest.$ac_objext \
36848       conftest$ac_exeext conftest.$ac_ext
36849 LIBS=$ac_check_lib_save_LIBS
36850 fi
36851 echo "$as_me:$LINENO: result: $ac_cv_lib_dbm_dbm_open" >&5
36852 echo "${ECHO_T}$ac_cv_lib_dbm_dbm_open" >&6
36853 if test $ac_cv_lib_dbm_dbm_open = yes; then
36854   ol_cv_lib_ndbm=-ldbm
36855 else
36856   ol_cv_lib_ndbm=no
36857 fi
36858
36859 fi
36860
36861
36862 fi
36863
36864         LIBS="$ol_LIBS"
36865
36866 fi
36867 echo "$as_me:$LINENO: result: $ol_cv_lib_ndbm" >&5
36868 echo "${ECHO_T}$ol_cv_lib_ndbm" >&6
36869
36870
36871
36872 for ac_header in ndbm.h
36873 do
36874 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
36875 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36876   echo "$as_me:$LINENO: checking for $ac_header" >&5
36877 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36878 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36879   echo $ECHO_N "(cached) $ECHO_C" >&6
36880 fi
36881 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36882 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36883 else
36884   # Is the header compilable?
36885 echo "$as_me:$LINENO: checking $ac_header usability" >&5
36886 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
36887 cat >conftest.$ac_ext <<_ACEOF
36888 /* confdefs.h.  */
36889 _ACEOF
36890 cat confdefs.h >>conftest.$ac_ext
36891 cat >>conftest.$ac_ext <<_ACEOF
36892 /* end confdefs.h.  */
36893 $ac_includes_default
36894 #include <$ac_header>
36895 _ACEOF
36896 rm -f conftest.$ac_objext
36897 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36898   (eval $ac_compile) 2>conftest.er1
36899   ac_status=$?
36900   grep -v '^ *+' conftest.er1 >conftest.err
36901   rm -f conftest.er1
36902   cat conftest.err >&5
36903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36904   (exit $ac_status); } &&
36905          { ac_try='test -z "$ac_c_werror_flag"
36906                          || test ! -s conftest.err'
36907   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36908   (eval $ac_try) 2>&5
36909   ac_status=$?
36910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36911   (exit $ac_status); }; } &&
36912          { ac_try='test -s conftest.$ac_objext'
36913   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36914   (eval $ac_try) 2>&5
36915   ac_status=$?
36916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36917   (exit $ac_status); }; }; then
36918   ac_header_compiler=yes
36919 else
36920   echo "$as_me: failed program was:" >&5
36921 sed 's/^/| /' conftest.$ac_ext >&5
36922
36923 ac_header_compiler=no
36924 fi
36925 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36926 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
36927 echo "${ECHO_T}$ac_header_compiler" >&6
36928
36929 # Is the header present?
36930 echo "$as_me:$LINENO: checking $ac_header presence" >&5
36931 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
36932 cat >conftest.$ac_ext <<_ACEOF
36933 /* confdefs.h.  */
36934 _ACEOF
36935 cat confdefs.h >>conftest.$ac_ext
36936 cat >>conftest.$ac_ext <<_ACEOF
36937 /* end confdefs.h.  */
36938 #include <$ac_header>
36939 _ACEOF
36940 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
36941   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
36942   ac_status=$?
36943   grep -v '^ *+' conftest.er1 >conftest.err
36944   rm -f conftest.er1
36945   cat conftest.err >&5
36946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36947   (exit $ac_status); } >/dev/null; then
36948   if test -s conftest.err; then
36949     ac_cpp_err=$ac_c_preproc_warn_flag
36950     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
36951   else
36952     ac_cpp_err=
36953   fi
36954 else
36955   ac_cpp_err=yes
36956 fi
36957 if test -z "$ac_cpp_err"; then
36958   ac_header_preproc=yes
36959 else
36960   echo "$as_me: failed program was:" >&5
36961 sed 's/^/| /' conftest.$ac_ext >&5
36962
36963   ac_header_preproc=no
36964 fi
36965 rm -f conftest.err conftest.$ac_ext
36966 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
36967 echo "${ECHO_T}$ac_header_preproc" >&6
36968
36969 # So?  What about this header?
36970 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
36971   yes:no: )
36972     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
36973 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
36974     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
36975 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
36976     ac_header_preproc=yes
36977     ;;
36978   no:yes:* )
36979     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
36980 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
36981     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
36982 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
36983     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
36984 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
36985     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
36986 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
36987     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
36988 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
36989     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
36990 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
36991     (
36992       cat <<\_ASBOX
36993 ## --------------------------------------------- ##
36994 ## Report this to <http://www.openldap.org/its/> ##
36995 ## --------------------------------------------- ##
36996 _ASBOX
36997     ) |
36998       sed "s/^/$as_me: WARNING:     /" >&2
36999     ;;
37000 esac
37001 echo "$as_me:$LINENO: checking for $ac_header" >&5
37002 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37003 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37004   echo $ECHO_N "(cached) $ECHO_C" >&6
37005 else
37006   eval "$as_ac_Header=\$ac_header_preproc"
37007 fi
37008 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37009 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37010
37011 fi
37012 if test `eval echo '${'$as_ac_Header'}'` = yes; then
37013   cat >>confdefs.h <<_ACEOF
37014 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
37015 _ACEOF
37016
37017 fi
37018
37019 done
37020
37021  echo "$as_me:$LINENO: checking for db" >&5
37022 echo $ECHO_N "checking for db... $ECHO_C" >&6
37023 if test "${ol_cv_ndbm+set}" = set; then
37024   echo $ECHO_N "(cached) $ECHO_C" >&6
37025 else
37026
37027         if test $ol_cv_lib_ndbm = no || test $ac_cv_header_ndbm_h = no ; then
37028                 ol_cv_ndbm=no
37029         else
37030                 ol_cv_ndbm=yes
37031         fi
37032
37033 fi
37034 echo "$as_me:$LINENO: result: $ol_cv_ndbm" >&5
37035 echo "${ECHO_T}$ol_cv_ndbm" >&6
37036  if test $ol_cv_ndbm = yes ; then
37037
37038 cat >>confdefs.h <<\_ACEOF
37039 #define HAVE_NDBM 1
37040 _ACEOF
37041
37042  fi
37043
37044
37045         if test $ol_cv_ndbm = yes ; then
37046                 ol_link_ldbm=ndbm
37047                 ol_enable_ldbm_api=ndbm
37048
37049                 if test $ol_cv_lib_ndbm != yes ; then
37050                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
37051                 fi
37052         fi
37053 fi
37054
37055 if test $ol_link_ldbm = no && test $ol_enable_ldbm != no ; then
37056         { { echo "$as_me:$LINENO: error: could not find suitable LDBM backend" >&5
37057 echo "$as_me: error: could not find suitable LDBM backend" >&2;}
37058    { (exit 1); exit 1; }; }
37059 fi
37060
37061 if test $ol_enable_bdb = yes ||
37062    test $ol_enable_hdb = yes ||
37063    test $ol_enable_ldbm = yes ; then
37064         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
37065 fi
37066
37067
37068 if test $ol_enable_dynamic = yes && test $enable_shared = yes ; then
37069         BUILD_LIBS_DYNAMIC=shared
37070
37071 cat >>confdefs.h <<\_ACEOF
37072 #define LDAP_LIBS_DYNAMIC 1
37073 _ACEOF
37074
37075         LTSTATIC=""
37076 else
37077         BUILD_LIBS_DYNAMIC=static
37078         LTSTATIC="-static"
37079 fi
37080
37081 if test $ol_enable_wrappers != no ; then
37082
37083 for ac_header in tcpd.h
37084 do
37085 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
37086 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37087   echo "$as_me:$LINENO: checking for $ac_header" >&5
37088 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37089 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37090   echo $ECHO_N "(cached) $ECHO_C" >&6
37091 fi
37092 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37093 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37094 else
37095   # Is the header compilable?
37096 echo "$as_me:$LINENO: checking $ac_header usability" >&5
37097 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
37098 cat >conftest.$ac_ext <<_ACEOF
37099 /* confdefs.h.  */
37100 _ACEOF
37101 cat confdefs.h >>conftest.$ac_ext
37102 cat >>conftest.$ac_ext <<_ACEOF
37103 /* end confdefs.h.  */
37104 $ac_includes_default
37105 #include <$ac_header>
37106 _ACEOF
37107 rm -f conftest.$ac_objext
37108 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37109   (eval $ac_compile) 2>conftest.er1
37110   ac_status=$?
37111   grep -v '^ *+' conftest.er1 >conftest.err
37112   rm -f conftest.er1
37113   cat conftest.err >&5
37114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37115   (exit $ac_status); } &&
37116          { ac_try='test -z "$ac_c_werror_flag"
37117                          || test ! -s conftest.err'
37118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37119   (eval $ac_try) 2>&5
37120   ac_status=$?
37121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37122   (exit $ac_status); }; } &&
37123          { ac_try='test -s conftest.$ac_objext'
37124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37125   (eval $ac_try) 2>&5
37126   ac_status=$?
37127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37128   (exit $ac_status); }; }; then
37129   ac_header_compiler=yes
37130 else
37131   echo "$as_me: failed program was:" >&5
37132 sed 's/^/| /' conftest.$ac_ext >&5
37133
37134 ac_header_compiler=no
37135 fi
37136 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37137 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
37138 echo "${ECHO_T}$ac_header_compiler" >&6
37139
37140 # Is the header present?
37141 echo "$as_me:$LINENO: checking $ac_header presence" >&5
37142 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
37143 cat >conftest.$ac_ext <<_ACEOF
37144 /* confdefs.h.  */
37145 _ACEOF
37146 cat confdefs.h >>conftest.$ac_ext
37147 cat >>conftest.$ac_ext <<_ACEOF
37148 /* end confdefs.h.  */
37149 #include <$ac_header>
37150 _ACEOF
37151 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
37152   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
37153   ac_status=$?
37154   grep -v '^ *+' conftest.er1 >conftest.err
37155   rm -f conftest.er1
37156   cat conftest.err >&5
37157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37158   (exit $ac_status); } >/dev/null; then
37159   if test -s conftest.err; then
37160     ac_cpp_err=$ac_c_preproc_warn_flag
37161     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
37162   else
37163     ac_cpp_err=
37164   fi
37165 else
37166   ac_cpp_err=yes
37167 fi
37168 if test -z "$ac_cpp_err"; then
37169   ac_header_preproc=yes
37170 else
37171   echo "$as_me: failed program was:" >&5
37172 sed 's/^/| /' conftest.$ac_ext >&5
37173
37174   ac_header_preproc=no
37175 fi
37176 rm -f conftest.err conftest.$ac_ext
37177 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
37178 echo "${ECHO_T}$ac_header_preproc" >&6
37179
37180 # So?  What about this header?
37181 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
37182   yes:no: )
37183     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
37184 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
37185     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
37186 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
37187     ac_header_preproc=yes
37188     ;;
37189   no:yes:* )
37190     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
37191 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
37192     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
37193 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
37194     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
37195 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
37196     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
37197 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
37198     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
37199 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
37200     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
37201 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
37202     (
37203       cat <<\_ASBOX
37204 ## --------------------------------------------- ##
37205 ## Report this to <http://www.openldap.org/its/> ##
37206 ## --------------------------------------------- ##
37207 _ASBOX
37208     ) |
37209       sed "s/^/$as_me: WARNING:     /" >&2
37210     ;;
37211 esac
37212 echo "$as_me:$LINENO: checking for $ac_header" >&5
37213 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37214 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37215   echo $ECHO_N "(cached) $ECHO_C" >&6
37216 else
37217   eval "$as_ac_Header=\$ac_header_preproc"
37218 fi
37219 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37220 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37221
37222 fi
37223 if test `eval echo '${'$as_ac_Header'}'` = yes; then
37224   cat >>confdefs.h <<_ACEOF
37225 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
37226 _ACEOF
37227
37228                 echo "$as_me:$LINENO: checking for TCP wrappers library" >&5
37229 echo $ECHO_N "checking for TCP wrappers library... $ECHO_C" >&6
37230                 save_LIBS="$LIBS"
37231                 LIBS="$LIBS -lwrap"
37232                 cat >conftest.$ac_ext <<_ACEOF
37233 /* confdefs.h.  */
37234 _ACEOF
37235 cat confdefs.h >>conftest.$ac_ext
37236 cat >>conftest.$ac_ext <<_ACEOF
37237 /* end confdefs.h.  */
37238
37239 #include <tcpd.h>
37240 int allow_severity = 0;
37241 int deny_severity  = 0;
37242
37243 struct request_info *req;
37244
37245 int
37246 main ()
37247 {
37248
37249 hosts_access(req)
37250
37251   ;
37252   return 0;
37253 }
37254 _ACEOF
37255 rm -f conftest.$ac_objext conftest$ac_exeext
37256 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37257   (eval $ac_link) 2>conftest.er1
37258   ac_status=$?
37259   grep -v '^ *+' conftest.er1 >conftest.err
37260   rm -f conftest.er1
37261   cat conftest.err >&5
37262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37263   (exit $ac_status); } &&
37264          { ac_try='test -z "$ac_c_werror_flag"
37265                          || test ! -s conftest.err'
37266   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37267   (eval $ac_try) 2>&5
37268   ac_status=$?
37269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37270   (exit $ac_status); }; } &&
37271          { ac_try='test -s conftest$ac_exeext'
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); }; }; then
37277   echo "$as_me:$LINENO: result: -lwrap" >&5
37278 echo "${ECHO_T}-lwrap" >&6
37279                 have_wrappers=yes
37280                 LIBS="$save_LIBS"
37281 else
37282   echo "$as_me: failed program was:" >&5
37283 sed 's/^/| /' conftest.$ac_ext >&5
37284
37285
37286                                 LIBS="$LIBS -lnsl"
37287                 cat >conftest.$ac_ext <<_ACEOF
37288 /* confdefs.h.  */
37289 _ACEOF
37290 cat confdefs.h >>conftest.$ac_ext
37291 cat >>conftest.$ac_ext <<_ACEOF
37292 /* end confdefs.h.  */
37293
37294 #include <tcpd.h>
37295 int allow_severity = 0;
37296 int deny_severity  = 0;
37297
37298 struct request_info *req;
37299
37300 int
37301 main ()
37302 {
37303
37304 hosts_access(req)
37305
37306   ;
37307   return 0;
37308 }
37309 _ACEOF
37310 rm -f conftest.$ac_objext conftest$ac_exeext
37311 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37312   (eval $ac_link) 2>conftest.er1
37313   ac_status=$?
37314   grep -v '^ *+' conftest.er1 >conftest.err
37315   rm -f conftest.er1
37316   cat conftest.err >&5
37317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37318   (exit $ac_status); } &&
37319          { ac_try='test -z "$ac_c_werror_flag"
37320                          || test ! -s conftest.err'
37321   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37322   (eval $ac_try) 2>&5
37323   ac_status=$?
37324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37325   (exit $ac_status); }; } &&
37326          { ac_try='test -s conftest$ac_exeext'
37327   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37328   (eval $ac_try) 2>&5
37329   ac_status=$?
37330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37331   (exit $ac_status); }; }; then
37332   echo "$as_me:$LINENO: result: -lwrap -lnsl" >&5
37333 echo "${ECHO_T}-lwrap -lnsl" >&6
37334                 have_wrappers=yes
37335                 LIBS="$save_LIBS -lnsl"
37336 else
37337   echo "$as_me: failed program was:" >&5
37338 sed 's/^/| /' conftest.$ac_ext >&5
37339
37340
37341                 echo "$as_me:$LINENO: result: no" >&5
37342 echo "${ECHO_T}no" >&6
37343                 have_wrappers=no
37344                 LIBS=$save_LIBS
37345 fi
37346 rm -f conftest.err conftest.$ac_objext \
37347       conftest$ac_exeext conftest.$ac_ext
37348 fi
37349 rm -f conftest.err conftest.$ac_objext \
37350       conftest$ac_exeext conftest.$ac_ext
37351 else
37352   have_wrappers=no
37353 fi
37354
37355 done
37356
37357
37358         if test $have_wrappers = yes ; then
37359
37360 cat >>confdefs.h <<\_ACEOF
37361 #define HAVE_TCPD 1
37362 _ACEOF
37363
37364                 WRAP_LIBS="-lwrap"
37365         elif test $ol_enable_wrappers = yes ; then
37366                 { { echo "$as_me:$LINENO: error: could not find TCP wrappers, select apppropriate options or disable" >&5
37367 echo "$as_me: error: could not find TCP wrappers, select apppropriate options or disable" >&2;}
37368    { (exit 1); exit 1; }; }
37369         else
37370                 { echo "$as_me:$LINENO: WARNING: could not find TCP wrappers, support disabled" >&5
37371 echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
37372                 WRAP_LIBS=""
37373         fi
37374 fi
37375
37376 if test $ol_enable_syslog != no ; then
37377         echo "$as_me:$LINENO: checking for openlog" >&5
37378 echo $ECHO_N "checking for openlog... $ECHO_C" >&6
37379 if test "${ac_cv_func_openlog+set}" = set; then
37380   echo $ECHO_N "(cached) $ECHO_C" >&6
37381 else
37382   cat >conftest.$ac_ext <<_ACEOF
37383 /* confdefs.h.  */
37384 _ACEOF
37385 cat confdefs.h >>conftest.$ac_ext
37386 cat >>conftest.$ac_ext <<_ACEOF
37387 /* end confdefs.h.  */
37388 /* Define openlog to an innocuous variant, in case <limits.h> declares openlog.
37389    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
37390 #define openlog innocuous_openlog
37391
37392 /* System header to define __stub macros and hopefully few prototypes,
37393     which can conflict with char openlog (); below.
37394     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
37395     <limits.h> exists even on freestanding compilers.  */
37396
37397 #ifdef __STDC__
37398 # include <limits.h>
37399 #else
37400 # include <assert.h>
37401 #endif
37402
37403 #undef openlog
37404
37405 /* Override any gcc2 internal prototype to avoid an error.  */
37406 #ifdef __cplusplus
37407 extern "C"
37408 {
37409 #endif
37410 /* We use char because int might match the return type of a gcc2
37411    builtin and then its argument prototype would still apply.  */
37412 char openlog ();
37413 /* The GNU C library defines this for functions which it implements
37414     to always fail with ENOSYS.  Some functions are actually named
37415     something starting with __ and the normal name is an alias.  */
37416 #if defined (__stub_openlog) || defined (__stub___openlog)
37417 choke me
37418 #else
37419 char (*f) () = openlog;
37420 #endif
37421 #ifdef __cplusplus
37422 }
37423 #endif
37424
37425 int
37426 main ()
37427 {
37428 return f != openlog;
37429   ;
37430   return 0;
37431 }
37432 _ACEOF
37433 rm -f conftest.$ac_objext conftest$ac_exeext
37434 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37435   (eval $ac_link) 2>conftest.er1
37436   ac_status=$?
37437   grep -v '^ *+' conftest.er1 >conftest.err
37438   rm -f conftest.er1
37439   cat conftest.err >&5
37440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37441   (exit $ac_status); } &&
37442          { ac_try='test -z "$ac_c_werror_flag"
37443                          || test ! -s conftest.err'
37444   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37445   (eval $ac_try) 2>&5
37446   ac_status=$?
37447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37448   (exit $ac_status); }; } &&
37449          { ac_try='test -s conftest$ac_exeext'
37450   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37451   (eval $ac_try) 2>&5
37452   ac_status=$?
37453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37454   (exit $ac_status); }; }; then
37455   ac_cv_func_openlog=yes
37456 else
37457   echo "$as_me: failed program was:" >&5
37458 sed 's/^/| /' conftest.$ac_ext >&5
37459
37460 ac_cv_func_openlog=no
37461 fi
37462 rm -f conftest.err conftest.$ac_objext \
37463       conftest$ac_exeext conftest.$ac_ext
37464 fi
37465 echo "$as_me:$LINENO: result: $ac_cv_func_openlog" >&5
37466 echo "${ECHO_T}$ac_cv_func_openlog" >&6
37467
37468         if test $ac_cv_func_openlog = no && test $ol_enable_syslog = yes; then
37469                 { { echo "$as_me:$LINENO: error: could not find syslog" >&5
37470 echo "$as_me: error: could not find syslog" >&2;}
37471    { (exit select appropriate options or disable); exit select appropriate options or disable; }; }
37472         fi
37473         ol_enable_syslog=$ac_cv_func_openlog
37474 fi
37475
37476 ol_link_sql=no
37477 if test $ol_enable_sql != no ; then
37478
37479
37480 for ac_header in sql.h sqlext.h
37481 do
37482 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
37483 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37484   echo "$as_me:$LINENO: checking for $ac_header" >&5
37485 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37486 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37487   echo $ECHO_N "(cached) $ECHO_C" >&6
37488 fi
37489 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37490 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37491 else
37492   # Is the header compilable?
37493 echo "$as_me:$LINENO: checking $ac_header usability" >&5
37494 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
37495 cat >conftest.$ac_ext <<_ACEOF
37496 /* confdefs.h.  */
37497 _ACEOF
37498 cat confdefs.h >>conftest.$ac_ext
37499 cat >>conftest.$ac_ext <<_ACEOF
37500 /* end confdefs.h.  */
37501 $ac_includes_default
37502 #include <$ac_header>
37503 _ACEOF
37504 rm -f conftest.$ac_objext
37505 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37506   (eval $ac_compile) 2>conftest.er1
37507   ac_status=$?
37508   grep -v '^ *+' conftest.er1 >conftest.err
37509   rm -f conftest.er1
37510   cat conftest.err >&5
37511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37512   (exit $ac_status); } &&
37513          { ac_try='test -z "$ac_c_werror_flag"
37514                          || test ! -s conftest.err'
37515   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37516   (eval $ac_try) 2>&5
37517   ac_status=$?
37518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37519   (exit $ac_status); }; } &&
37520          { ac_try='test -s conftest.$ac_objext'
37521   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37522   (eval $ac_try) 2>&5
37523   ac_status=$?
37524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37525   (exit $ac_status); }; }; then
37526   ac_header_compiler=yes
37527 else
37528   echo "$as_me: failed program was:" >&5
37529 sed 's/^/| /' conftest.$ac_ext >&5
37530
37531 ac_header_compiler=no
37532 fi
37533 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37534 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
37535 echo "${ECHO_T}$ac_header_compiler" >&6
37536
37537 # Is the header present?
37538 echo "$as_me:$LINENO: checking $ac_header presence" >&5
37539 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
37540 cat >conftest.$ac_ext <<_ACEOF
37541 /* confdefs.h.  */
37542 _ACEOF
37543 cat confdefs.h >>conftest.$ac_ext
37544 cat >>conftest.$ac_ext <<_ACEOF
37545 /* end confdefs.h.  */
37546 #include <$ac_header>
37547 _ACEOF
37548 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
37549   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
37550   ac_status=$?
37551   grep -v '^ *+' conftest.er1 >conftest.err
37552   rm -f conftest.er1
37553   cat conftest.err >&5
37554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37555   (exit $ac_status); } >/dev/null; then
37556   if test -s conftest.err; then
37557     ac_cpp_err=$ac_c_preproc_warn_flag
37558     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
37559   else
37560     ac_cpp_err=
37561   fi
37562 else
37563   ac_cpp_err=yes
37564 fi
37565 if test -z "$ac_cpp_err"; then
37566   ac_header_preproc=yes
37567 else
37568   echo "$as_me: failed program was:" >&5
37569 sed 's/^/| /' conftest.$ac_ext >&5
37570
37571   ac_header_preproc=no
37572 fi
37573 rm -f conftest.err conftest.$ac_ext
37574 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
37575 echo "${ECHO_T}$ac_header_preproc" >&6
37576
37577 # So?  What about this header?
37578 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
37579   yes:no: )
37580     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
37581 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
37582     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
37583 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
37584     ac_header_preproc=yes
37585     ;;
37586   no:yes:* )
37587     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
37588 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
37589     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
37590 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
37591     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
37592 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
37593     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
37594 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
37595     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
37596 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
37597     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
37598 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
37599     (
37600       cat <<\_ASBOX
37601 ## --------------------------------------------- ##
37602 ## Report this to <http://www.openldap.org/its/> ##
37603 ## --------------------------------------------- ##
37604 _ASBOX
37605     ) |
37606       sed "s/^/$as_me: WARNING:     /" >&2
37607     ;;
37608 esac
37609 echo "$as_me:$LINENO: checking for $ac_header" >&5
37610 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37611 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37612   echo $ECHO_N "(cached) $ECHO_C" >&6
37613 else
37614   eval "$as_ac_Header=\$ac_header_preproc"
37615 fi
37616 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37617 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37618
37619 fi
37620 if test `eval echo '${'$as_ac_Header'}'` = yes; then
37621   cat >>confdefs.h <<_ACEOF
37622 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
37623 _ACEOF
37624
37625 else
37626
37627                 { { echo "$as_me:$LINENO: error: could not locate SQL headers" >&5
37628 echo "$as_me: error: could not locate SQL headers" >&2;}
37629    { (exit 1); exit 1; }; }
37630
37631 fi
37632
37633 done
37634
37635
37636         sql_LIBS="$LIBS"
37637         LIBS="$LTHREAD_LIBS"
37638
37639         if test $ol_with_odbc = auto ; then
37640                 ol_with_odbc="iodbc unixodbc"
37641         fi
37642
37643         for odbc in $ol_with_odbc ; do
37644                 if test $ol_link_sql = no ; then
37645                         case $odbc in
37646                         iodbc)
37647                                 echo "$as_me:$LINENO: checking for SQLDriverConnect in -liodbc" >&5
37648 echo $ECHO_N "checking for SQLDriverConnect in -liodbc... $ECHO_C" >&6
37649 if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then
37650   echo $ECHO_N "(cached) $ECHO_C" >&6
37651 else
37652   ac_check_lib_save_LIBS=$LIBS
37653 LIBS="-liodbc  $LIBS"
37654 cat >conftest.$ac_ext <<_ACEOF
37655 /* confdefs.h.  */
37656 _ACEOF
37657 cat confdefs.h >>conftest.$ac_ext
37658 cat >>conftest.$ac_ext <<_ACEOF
37659 /* end confdefs.h.  */
37660
37661 /* Override any gcc2 internal prototype to avoid an error.  */
37662 #ifdef __cplusplus
37663 extern "C"
37664 #endif
37665 /* We use char because int might match the return type of a gcc2
37666    builtin and then its argument prototype would still apply.  */
37667 char SQLDriverConnect ();
37668 int
37669 main ()
37670 {
37671 SQLDriverConnect ();
37672   ;
37673   return 0;
37674 }
37675 _ACEOF
37676 rm -f conftest.$ac_objext conftest$ac_exeext
37677 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37678   (eval $ac_link) 2>conftest.er1
37679   ac_status=$?
37680   grep -v '^ *+' conftest.er1 >conftest.err
37681   rm -f conftest.er1
37682   cat conftest.err >&5
37683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37684   (exit $ac_status); } &&
37685          { ac_try='test -z "$ac_c_werror_flag"
37686                          || test ! -s conftest.err'
37687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37688   (eval $ac_try) 2>&5
37689   ac_status=$?
37690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37691   (exit $ac_status); }; } &&
37692          { ac_try='test -s conftest$ac_exeext'
37693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37694   (eval $ac_try) 2>&5
37695   ac_status=$?
37696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37697   (exit $ac_status); }; }; then
37698   ac_cv_lib_iodbc_SQLDriverConnect=yes
37699 else
37700   echo "$as_me: failed program was:" >&5
37701 sed 's/^/| /' conftest.$ac_ext >&5
37702
37703 ac_cv_lib_iodbc_SQLDriverConnect=no
37704 fi
37705 rm -f conftest.err conftest.$ac_objext \
37706       conftest$ac_exeext conftest.$ac_ext
37707 LIBS=$ac_check_lib_save_LIBS
37708 fi
37709 echo "$as_me:$LINENO: result: $ac_cv_lib_iodbc_SQLDriverConnect" >&5
37710 echo "${ECHO_T}$ac_cv_lib_iodbc_SQLDriverConnect" >&6
37711 if test $ac_cv_lib_iodbc_SQLDriverConnect = yes; then
37712   have_iodbc=yes
37713 else
37714   have_iodbc=no
37715 fi
37716
37717                                 if test $have_iodbc = yes ; then
37718                                         ol_link_sql="-liodbc"
37719                                 fi
37720                                 ;;
37721
37722                         unixodbc)
37723                                 echo "$as_me:$LINENO: checking for SQLDriverConnect in -lodbc" >&5
37724 echo $ECHO_N "checking for SQLDriverConnect in -lodbc... $ECHO_C" >&6
37725 if test "${ac_cv_lib_odbc_SQLDriverConnect+set}" = set; then
37726   echo $ECHO_N "(cached) $ECHO_C" >&6
37727 else
37728   ac_check_lib_save_LIBS=$LIBS
37729 LIBS="-lodbc  $LIBS"
37730 cat >conftest.$ac_ext <<_ACEOF
37731 /* confdefs.h.  */
37732 _ACEOF
37733 cat confdefs.h >>conftest.$ac_ext
37734 cat >>conftest.$ac_ext <<_ACEOF
37735 /* end confdefs.h.  */
37736
37737 /* Override any gcc2 internal prototype to avoid an error.  */
37738 #ifdef __cplusplus
37739 extern "C"
37740 #endif
37741 /* We use char because int might match the return type of a gcc2
37742    builtin and then its argument prototype would still apply.  */
37743 char SQLDriverConnect ();
37744 int
37745 main ()
37746 {
37747 SQLDriverConnect ();
37748   ;
37749   return 0;
37750 }
37751 _ACEOF
37752 rm -f conftest.$ac_objext conftest$ac_exeext
37753 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37754   (eval $ac_link) 2>conftest.er1
37755   ac_status=$?
37756   grep -v '^ *+' conftest.er1 >conftest.err
37757   rm -f conftest.er1
37758   cat conftest.err >&5
37759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37760   (exit $ac_status); } &&
37761          { ac_try='test -z "$ac_c_werror_flag"
37762                          || test ! -s conftest.err'
37763   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37764   (eval $ac_try) 2>&5
37765   ac_status=$?
37766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37767   (exit $ac_status); }; } &&
37768          { ac_try='test -s conftest$ac_exeext'
37769   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37770   (eval $ac_try) 2>&5
37771   ac_status=$?
37772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37773   (exit $ac_status); }; }; then
37774   ac_cv_lib_odbc_SQLDriverConnect=yes
37775 else
37776   echo "$as_me: failed program was:" >&5
37777 sed 's/^/| /' conftest.$ac_ext >&5
37778
37779 ac_cv_lib_odbc_SQLDriverConnect=no
37780 fi
37781 rm -f conftest.err conftest.$ac_objext \
37782       conftest$ac_exeext conftest.$ac_ext
37783 LIBS=$ac_check_lib_save_LIBS
37784 fi
37785 echo "$as_me:$LINENO: result: $ac_cv_lib_odbc_SQLDriverConnect" >&5
37786 echo "${ECHO_T}$ac_cv_lib_odbc_SQLDriverConnect" >&6
37787 if test $ac_cv_lib_odbc_SQLDriverConnect = yes; then
37788   have_odbc=yes
37789 else
37790   have_odbc=no
37791 fi
37792
37793                                 if test $have_odbc = yes ; then
37794                                         ol_link_sql="-lodbc"
37795                                 fi
37796                                 ;;
37797
37798                         *)
37799                                 { { echo "$as_me:$LINENO: error: unknown ODBC library" >&5
37800 echo "$as_me: error: unknown ODBC library" >&2;}
37801    { (exit 1); exit 1; }; }
37802                                 ;;
37803                         esac
37804                 fi
37805         done
37806
37807         LIBS="$sql_LIBS"
37808
37809         if test $ol_link_sql != no ; then
37810                 SLAPD_SQL_LIBS="$ol_link_sql"
37811
37812         elif test $ol_enable_sql != auto ; then
37813                 { { echo "$as_me:$LINENO: error: could not locate suitable ODBC library" >&5
37814 echo "$as_me: error: could not locate suitable ODBC library" >&2;}
37815    { (exit 1); exit 1; }; }
37816         fi
37817 fi
37818
37819 WITH_SASL=no
37820 ol_link_sasl=no
37821 ol_link_spasswd=no
37822 if test $ol_with_cyrus_sasl != no ; then
37823
37824
37825 for ac_header in sasl/sasl.h sasl.h
37826 do
37827 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
37828 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37829   echo "$as_me:$LINENO: checking for $ac_header" >&5
37830 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37831 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37832   echo $ECHO_N "(cached) $ECHO_C" >&6
37833 fi
37834 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37835 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37836 else
37837   # Is the header compilable?
37838 echo "$as_me:$LINENO: checking $ac_header usability" >&5
37839 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
37840 cat >conftest.$ac_ext <<_ACEOF
37841 /* confdefs.h.  */
37842 _ACEOF
37843 cat confdefs.h >>conftest.$ac_ext
37844 cat >>conftest.$ac_ext <<_ACEOF
37845 /* end confdefs.h.  */
37846 $ac_includes_default
37847 #include <$ac_header>
37848 _ACEOF
37849 rm -f conftest.$ac_objext
37850 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37851   (eval $ac_compile) 2>conftest.er1
37852   ac_status=$?
37853   grep -v '^ *+' conftest.er1 >conftest.err
37854   rm -f conftest.er1
37855   cat conftest.err >&5
37856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37857   (exit $ac_status); } &&
37858          { ac_try='test -z "$ac_c_werror_flag"
37859                          || test ! -s conftest.err'
37860   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37861   (eval $ac_try) 2>&5
37862   ac_status=$?
37863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37864   (exit $ac_status); }; } &&
37865          { ac_try='test -s conftest.$ac_objext'
37866   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37867   (eval $ac_try) 2>&5
37868   ac_status=$?
37869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37870   (exit $ac_status); }; }; then
37871   ac_header_compiler=yes
37872 else
37873   echo "$as_me: failed program was:" >&5
37874 sed 's/^/| /' conftest.$ac_ext >&5
37875
37876 ac_header_compiler=no
37877 fi
37878 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37879 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
37880 echo "${ECHO_T}$ac_header_compiler" >&6
37881
37882 # Is the header present?
37883 echo "$as_me:$LINENO: checking $ac_header presence" >&5
37884 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
37885 cat >conftest.$ac_ext <<_ACEOF
37886 /* confdefs.h.  */
37887 _ACEOF
37888 cat confdefs.h >>conftest.$ac_ext
37889 cat >>conftest.$ac_ext <<_ACEOF
37890 /* end confdefs.h.  */
37891 #include <$ac_header>
37892 _ACEOF
37893 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
37894   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
37895   ac_status=$?
37896   grep -v '^ *+' conftest.er1 >conftest.err
37897   rm -f conftest.er1
37898   cat conftest.err >&5
37899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37900   (exit $ac_status); } >/dev/null; then
37901   if test -s conftest.err; then
37902     ac_cpp_err=$ac_c_preproc_warn_flag
37903     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
37904   else
37905     ac_cpp_err=
37906   fi
37907 else
37908   ac_cpp_err=yes
37909 fi
37910 if test -z "$ac_cpp_err"; then
37911   ac_header_preproc=yes
37912 else
37913   echo "$as_me: failed program was:" >&5
37914 sed 's/^/| /' conftest.$ac_ext >&5
37915
37916   ac_header_preproc=no
37917 fi
37918 rm -f conftest.err conftest.$ac_ext
37919 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
37920 echo "${ECHO_T}$ac_header_preproc" >&6
37921
37922 # So?  What about this header?
37923 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
37924   yes:no: )
37925     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
37926 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
37927     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
37928 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
37929     ac_header_preproc=yes
37930     ;;
37931   no:yes:* )
37932     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
37933 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
37934     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
37935 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
37936     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
37937 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
37938     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
37939 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
37940     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
37941 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
37942     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
37943 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
37944     (
37945       cat <<\_ASBOX
37946 ## --------------------------------------------- ##
37947 ## Report this to <http://www.openldap.org/its/> ##
37948 ## --------------------------------------------- ##
37949 _ASBOX
37950     ) |
37951       sed "s/^/$as_me: WARNING:     /" >&2
37952     ;;
37953 esac
37954 echo "$as_me:$LINENO: checking for $ac_header" >&5
37955 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37956 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37957   echo $ECHO_N "(cached) $ECHO_C" >&6
37958 else
37959   eval "$as_ac_Header=\$ac_header_preproc"
37960 fi
37961 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37962 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37963
37964 fi
37965 if test `eval echo '${'$as_ac_Header'}'` = yes; then
37966   cat >>confdefs.h <<_ACEOF
37967 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
37968 _ACEOF
37969
37970 fi
37971
37972 done
37973
37974
37975         if test $ac_cv_header_sasl_sasl_h = yes ||
37976            test $ac_cv_header_sasl_h = yes; then
37977                 echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl2" >&5
37978 echo $ECHO_N "checking for sasl_client_init in -lsasl2... $ECHO_C" >&6
37979 if test "${ac_cv_lib_sasl2_sasl_client_init+set}" = set; then
37980   echo $ECHO_N "(cached) $ECHO_C" >&6
37981 else
37982   ac_check_lib_save_LIBS=$LIBS
37983 LIBS="-lsasl2  $LIBS"
37984 cat >conftest.$ac_ext <<_ACEOF
37985 /* confdefs.h.  */
37986 _ACEOF
37987 cat confdefs.h >>conftest.$ac_ext
37988 cat >>conftest.$ac_ext <<_ACEOF
37989 /* end confdefs.h.  */
37990
37991 /* Override any gcc2 internal prototype to avoid an error.  */
37992 #ifdef __cplusplus
37993 extern "C"
37994 #endif
37995 /* We use char because int might match the return type of a gcc2
37996    builtin and then its argument prototype would still apply.  */
37997 char sasl_client_init ();
37998 int
37999 main ()
38000 {
38001 sasl_client_init ();
38002   ;
38003   return 0;
38004 }
38005 _ACEOF
38006 rm -f conftest.$ac_objext conftest$ac_exeext
38007 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38008   (eval $ac_link) 2>conftest.er1
38009   ac_status=$?
38010   grep -v '^ *+' conftest.er1 >conftest.err
38011   rm -f conftest.er1
38012   cat conftest.err >&5
38013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38014   (exit $ac_status); } &&
38015          { ac_try='test -z "$ac_c_werror_flag"
38016                          || test ! -s conftest.err'
38017   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38018   (eval $ac_try) 2>&5
38019   ac_status=$?
38020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38021   (exit $ac_status); }; } &&
38022          { ac_try='test -s conftest$ac_exeext'
38023   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38024   (eval $ac_try) 2>&5
38025   ac_status=$?
38026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38027   (exit $ac_status); }; }; then
38028   ac_cv_lib_sasl2_sasl_client_init=yes
38029 else
38030   echo "$as_me: failed program was:" >&5
38031 sed 's/^/| /' conftest.$ac_ext >&5
38032
38033 ac_cv_lib_sasl2_sasl_client_init=no
38034 fi
38035 rm -f conftest.err conftest.$ac_objext \
38036       conftest$ac_exeext conftest.$ac_ext
38037 LIBS=$ac_check_lib_save_LIBS
38038 fi
38039 echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_sasl_client_init" >&5
38040 echo "${ECHO_T}$ac_cv_lib_sasl2_sasl_client_init" >&6
38041 if test $ac_cv_lib_sasl2_sasl_client_init = yes; then
38042   ol_link_sasl="-lsasl2"
38043 else
38044   echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl" >&5
38045 echo $ECHO_N "checking for sasl_client_init in -lsasl... $ECHO_C" >&6
38046 if test "${ac_cv_lib_sasl_sasl_client_init+set}" = set; then
38047   echo $ECHO_N "(cached) $ECHO_C" >&6
38048 else
38049   ac_check_lib_save_LIBS=$LIBS
38050 LIBS="-lsasl  $LIBS"
38051 cat >conftest.$ac_ext <<_ACEOF
38052 /* confdefs.h.  */
38053 _ACEOF
38054 cat confdefs.h >>conftest.$ac_ext
38055 cat >>conftest.$ac_ext <<_ACEOF
38056 /* end confdefs.h.  */
38057
38058 /* Override any gcc2 internal prototype to avoid an error.  */
38059 #ifdef __cplusplus
38060 extern "C"
38061 #endif
38062 /* We use char because int might match the return type of a gcc2
38063    builtin and then its argument prototype would still apply.  */
38064 char sasl_client_init ();
38065 int
38066 main ()
38067 {
38068 sasl_client_init ();
38069   ;
38070   return 0;
38071 }
38072 _ACEOF
38073 rm -f conftest.$ac_objext conftest$ac_exeext
38074 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38075   (eval $ac_link) 2>conftest.er1
38076   ac_status=$?
38077   grep -v '^ *+' conftest.er1 >conftest.err
38078   rm -f conftest.er1
38079   cat conftest.err >&5
38080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38081   (exit $ac_status); } &&
38082          { ac_try='test -z "$ac_c_werror_flag"
38083                          || test ! -s conftest.err'
38084   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38085   (eval $ac_try) 2>&5
38086   ac_status=$?
38087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38088   (exit $ac_status); }; } &&
38089          { ac_try='test -s conftest$ac_exeext'
38090   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38091   (eval $ac_try) 2>&5
38092   ac_status=$?
38093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38094   (exit $ac_status); }; }; then
38095   ac_cv_lib_sasl_sasl_client_init=yes
38096 else
38097   echo "$as_me: failed program was:" >&5
38098 sed 's/^/| /' conftest.$ac_ext >&5
38099
38100 ac_cv_lib_sasl_sasl_client_init=no
38101 fi
38102 rm -f conftest.err conftest.$ac_objext \
38103       conftest$ac_exeext conftest.$ac_ext
38104 LIBS=$ac_check_lib_save_LIBS
38105 fi
38106 echo "$as_me:$LINENO: result: $ac_cv_lib_sasl_sasl_client_init" >&5
38107 echo "${ECHO_T}$ac_cv_lib_sasl_sasl_client_init" >&6
38108 if test $ac_cv_lib_sasl_sasl_client_init = yes; then
38109   ol_link_sasl="-lsasl"
38110 fi
38111
38112 fi
38113
38114         fi
38115
38116         if test $ol_link_sasl = no ; then
38117                 if test $ol_with_cyrus_sasl != auto ; then
38118                         { { echo "$as_me:$LINENO: error: Could not locate Cyrus SASL" >&5
38119 echo "$as_me: error: Could not locate Cyrus SASL" >&2;}
38120    { (exit 1); exit 1; }; }
38121                 else
38122                         { echo "$as_me:$LINENO: WARNING: Could not locate Cyrus SASL" >&5
38123 echo "$as_me: WARNING: Could not locate Cyrus SASL" >&2;}
38124                         { echo "$as_me:$LINENO: WARNING: SASL authentication not supported!" >&5
38125 echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
38126                         if test $ol_link_tls = no ; then
38127                                 { echo "$as_me:$LINENO: WARNING: Strong authentication not supported!" >&5
38128 echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
38129                         fi
38130                 fi
38131         else
38132                 echo "$as_me:$LINENO: checking Cyrus SASL library version" >&5
38133 echo $ECHO_N "checking Cyrus SASL library version... $ECHO_C" >&6
38134 if test "${ol_cv_sasl_compat+set}" = set; then
38135   echo $ECHO_N "(cached) $ECHO_C" >&6
38136 else
38137
38138         cat >conftest.$ac_ext <<_ACEOF
38139 /* confdefs.h.  */
38140 _ACEOF
38141 cat confdefs.h >>conftest.$ac_ext
38142 cat >>conftest.$ac_ext <<_ACEOF
38143 /* end confdefs.h.  */
38144
38145 #ifdef HAVE_SASL_SASL_H
38146 #include <sasl/sasl.h>
38147 #else
38148 #include <sasl.h>
38149 #endif
38150
38151 /* Require 2.1.15+ */
38152 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
38153         char *__sasl_compat = "2.2+ or better okay (we guess)";
38154 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
38155         && SASL_VERSION_STEP >=15
38156         char *__sasl_compat = "2.1.15+ or better okay";
38157 #endif
38158
38159 _ACEOF
38160 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
38161   $EGREP "__sasl_compat" >/dev/null 2>&1; then
38162   ol_cv_sasl_compat=yes
38163 else
38164   ol_cv_sasl_compat=no
38165 fi
38166 rm -f conftest*
38167
38168 fi
38169 echo "$as_me:$LINENO: result: $ol_cv_sasl_compat" >&5
38170 echo "${ECHO_T}$ol_cv_sasl_compat" >&6
38171
38172                 if test $ol_cv_sasl_compat = no ; then
38173                         ol_link_sasl=no
38174                         { { echo "$as_me:$LINENO: error: Cyrus SASL library located but is incompatible" >&5
38175 echo "$as_me: error: Cyrus SASL library located but is incompatible" >&2;}
38176    { (exit 1); exit 1; }; }
38177                 fi
38178
38179
38180 cat >>confdefs.h <<\_ACEOF
38181 #define HAVE_CYRUS_SASL 1
38182 _ACEOF
38183
38184                 SASL_LIBS="$ol_link_sasl"
38185                 if test $ol_enable_spasswd != no ; then
38186                         ol_link_spasswd=yes
38187                 fi
38188
38189                 ac_save_LIBS="$LIBS"
38190                 LIBS="$LIBS $ol_link_sasl"
38191                 echo "$as_me:$LINENO: checking for sasl_version" >&5
38192 echo $ECHO_N "checking for sasl_version... $ECHO_C" >&6
38193 if test "${ac_cv_func_sasl_version+set}" = set; then
38194   echo $ECHO_N "(cached) $ECHO_C" >&6
38195 else
38196   cat >conftest.$ac_ext <<_ACEOF
38197 /* confdefs.h.  */
38198 _ACEOF
38199 cat confdefs.h >>conftest.$ac_ext
38200 cat >>conftest.$ac_ext <<_ACEOF
38201 /* end confdefs.h.  */
38202 /* Define sasl_version to an innocuous variant, in case <limits.h> declares sasl_version.
38203    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
38204 #define sasl_version innocuous_sasl_version
38205
38206 /* System header to define __stub macros and hopefully few prototypes,
38207     which can conflict with char sasl_version (); below.
38208     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
38209     <limits.h> exists even on freestanding compilers.  */
38210
38211 #ifdef __STDC__
38212 # include <limits.h>
38213 #else
38214 # include <assert.h>
38215 #endif
38216
38217 #undef sasl_version
38218
38219 /* Override any gcc2 internal prototype to avoid an error.  */
38220 #ifdef __cplusplus
38221 extern "C"
38222 {
38223 #endif
38224 /* We use char because int might match the return type of a gcc2
38225    builtin and then its argument prototype would still apply.  */
38226 char sasl_version ();
38227 /* The GNU C library defines this for functions which it implements
38228     to always fail with ENOSYS.  Some functions are actually named
38229     something starting with __ and the normal name is an alias.  */
38230 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
38231 choke me
38232 #else
38233 char (*f) () = sasl_version;
38234 #endif
38235 #ifdef __cplusplus
38236 }
38237 #endif
38238
38239 int
38240 main ()
38241 {
38242 return f != sasl_version;
38243   ;
38244   return 0;
38245 }
38246 _ACEOF
38247 rm -f conftest.$ac_objext conftest$ac_exeext
38248 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38249   (eval $ac_link) 2>conftest.er1
38250   ac_status=$?
38251   grep -v '^ *+' conftest.er1 >conftest.err
38252   rm -f conftest.er1
38253   cat conftest.err >&5
38254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38255   (exit $ac_status); } &&
38256          { ac_try='test -z "$ac_c_werror_flag"
38257                          || test ! -s conftest.err'
38258   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38259   (eval $ac_try) 2>&5
38260   ac_status=$?
38261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38262   (exit $ac_status); }; } &&
38263          { ac_try='test -s conftest$ac_exeext'
38264   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38265   (eval $ac_try) 2>&5
38266   ac_status=$?
38267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38268   (exit $ac_status); }; }; then
38269   ac_cv_func_sasl_version=yes
38270 else
38271   echo "$as_me: failed program was:" >&5
38272 sed 's/^/| /' conftest.$ac_ext >&5
38273
38274 ac_cv_func_sasl_version=no
38275 fi
38276 rm -f conftest.err conftest.$ac_objext \
38277       conftest$ac_exeext conftest.$ac_ext
38278 fi
38279 echo "$as_me:$LINENO: result: $ac_cv_func_sasl_version" >&5
38280 echo "${ECHO_T}$ac_cv_func_sasl_version" >&6
38281 if test $ac_cv_func_sasl_version = yes; then
38282
38283 cat >>confdefs.h <<\_ACEOF
38284 #define HAVE_SASL_VERSION 1
38285 _ACEOF
38286
38287 fi
38288
38289                 LIBS="$ac_save_LIBS"
38290
38291                 WITH_SASL=yes
38292         fi
38293
38294 else
38295         { echo "$as_me:$LINENO: WARNING: SASL authentication not supported!" >&5
38296 echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
38297         if test $ol_link_tls = no ; then
38298                 { echo "$as_me:$LINENO: WARNING: Strong authentication not supported!" >&5
38299 echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
38300         fi
38301 fi
38302
38303 if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
38304         dev=no
38305         if test -r /dev/urandom ; then
38306                 dev="/dev/urandom";
38307         elif test -r /idev/urandom ; then
38308                 dev="/idev/urandom";
38309         elif test -r /dev/srandom ; then
38310                 dev="/dev/srandom";
38311         elif test -r /dev/random ; then
38312                 dev="/dev/random";
38313         elif test -r /idev/random ; then
38314                 dev="/idev/random";
38315         fi
38316
38317         if test $dev != no ; then
38318
38319 cat >>confdefs.h <<_ACEOF
38320 #define URANDOM_DEVICE "$dev"
38321 _ACEOF
38322
38323         fi
38324 fi
38325
38326 ol_link_fetch=no
38327 if test $ol_with_fetch != no ; then
38328         ol_LIBS=$LIBS
38329 LIBS="-lfetch -lcom_err $LIBS"
38330 echo "$as_me:$LINENO: checking fetch(3) library" >&5
38331 echo $ECHO_N "checking fetch(3) library... $ECHO_C" >&6
38332 if test "${ol_cv_lib_fetch+set}" = set; then
38333   echo $ECHO_N "(cached) $ECHO_C" >&6
38334 else
38335
38336         cat >conftest.$ac_ext <<_ACEOF
38337 /* confdefs.h.  */
38338 _ACEOF
38339 cat confdefs.h >>conftest.$ac_ext
38340 cat >>conftest.$ac_ext <<_ACEOF
38341 /* end confdefs.h.  */
38342
38343 #include <sys/param.h>
38344 #include <stdio.h>
38345 #include <fetch.h>
38346 int
38347 main ()
38348 {
38349 struct url *u = fetchParseURL("file:///");
38350   ;
38351   return 0;
38352 }
38353 _ACEOF
38354 rm -f conftest.$ac_objext conftest$ac_exeext
38355 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38356   (eval $ac_link) 2>conftest.er1
38357   ac_status=$?
38358   grep -v '^ *+' conftest.er1 >conftest.err
38359   rm -f conftest.er1
38360   cat conftest.err >&5
38361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38362   (exit $ac_status); } &&
38363          { ac_try='test -z "$ac_c_werror_flag"
38364                          || test ! -s conftest.err'
38365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38366   (eval $ac_try) 2>&5
38367   ac_status=$?
38368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38369   (exit $ac_status); }; } &&
38370          { ac_try='test -s conftest$ac_exeext'
38371   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38372   (eval $ac_try) 2>&5
38373   ac_status=$?
38374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38375   (exit $ac_status); }; }; then
38376   ol_cv_lib_fetch=yes
38377 else
38378   echo "$as_me: failed program was:" >&5
38379 sed 's/^/| /' conftest.$ac_ext >&5
38380
38381 ol_cv_lib_fetch=no
38382 fi
38383 rm -f conftest.err conftest.$ac_objext \
38384       conftest$ac_exeext conftest.$ac_ext
38385 fi
38386 echo "$as_me:$LINENO: result: $ol_cv_lib_fetch" >&5
38387 echo "${ECHO_T}$ol_cv_lib_fetch" >&6
38388 LIBS=$ol_LIBS
38389 if test $ol_cv_lib_fetch != no ; then
38390         ol_link_fetch="-lfetch -lcom_err"
38391
38392 cat >>confdefs.h <<\_ACEOF
38393 #define HAVE_FETCH 1
38394 _ACEOF
38395
38396 fi
38397
38398
38399         if test $ol_cv_lib_fetch != no ; then
38400                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
38401                 ol_link_fetch=freebsd
38402
38403         elif test $ol_with_fetch != auto ; then
38404                 { { echo "$as_me:$LINENO: error: no suitable API for --with-fetch=$ol_with_fetch" >&5
38405 echo "$as_me: error: no suitable API for --with-fetch=$ol_with_fetch" >&2;}
38406    { (exit 1); exit 1; }; }
38407         fi
38408 fi
38409
38410 if test $ol_enable_crypt != no ; then
38411         save_LIBS="$LIBS"
38412         LIBS="$TLS_LIBS $LIBS"
38413
38414         echo "$as_me:$LINENO: checking for crypt" >&5
38415 echo $ECHO_N "checking for crypt... $ECHO_C" >&6
38416 if test "${ac_cv_func_crypt+set}" = set; then
38417   echo $ECHO_N "(cached) $ECHO_C" >&6
38418 else
38419   cat >conftest.$ac_ext <<_ACEOF
38420 /* confdefs.h.  */
38421 _ACEOF
38422 cat confdefs.h >>conftest.$ac_ext
38423 cat >>conftest.$ac_ext <<_ACEOF
38424 /* end confdefs.h.  */
38425 /* Define crypt to an innocuous variant, in case <limits.h> declares crypt.
38426    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
38427 #define crypt innocuous_crypt
38428
38429 /* System header to define __stub macros and hopefully few prototypes,
38430     which can conflict with char crypt (); below.
38431     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
38432     <limits.h> exists even on freestanding compilers.  */
38433
38434 #ifdef __STDC__
38435 # include <limits.h>
38436 #else
38437 # include <assert.h>
38438 #endif
38439
38440 #undef crypt
38441
38442 /* Override any gcc2 internal prototype to avoid an error.  */
38443 #ifdef __cplusplus
38444 extern "C"
38445 {
38446 #endif
38447 /* We use char because int might match the return type of a gcc2
38448    builtin and then its argument prototype would still apply.  */
38449 char crypt ();
38450 /* The GNU C library defines this for functions which it implements
38451     to always fail with ENOSYS.  Some functions are actually named
38452     something starting with __ and the normal name is an alias.  */
38453 #if defined (__stub_crypt) || defined (__stub___crypt)
38454 choke me
38455 #else
38456 char (*f) () = crypt;
38457 #endif
38458 #ifdef __cplusplus
38459 }
38460 #endif
38461
38462 int
38463 main ()
38464 {
38465 return f != crypt;
38466   ;
38467   return 0;
38468 }
38469 _ACEOF
38470 rm -f conftest.$ac_objext conftest$ac_exeext
38471 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38472   (eval $ac_link) 2>conftest.er1
38473   ac_status=$?
38474   grep -v '^ *+' conftest.er1 >conftest.err
38475   rm -f conftest.er1
38476   cat conftest.err >&5
38477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38478   (exit $ac_status); } &&
38479          { ac_try='test -z "$ac_c_werror_flag"
38480                          || test ! -s conftest.err'
38481   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38482   (eval $ac_try) 2>&5
38483   ac_status=$?
38484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38485   (exit $ac_status); }; } &&
38486          { ac_try='test -s conftest$ac_exeext'
38487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38488   (eval $ac_try) 2>&5
38489   ac_status=$?
38490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38491   (exit $ac_status); }; }; then
38492   ac_cv_func_crypt=yes
38493 else
38494   echo "$as_me: failed program was:" >&5
38495 sed 's/^/| /' conftest.$ac_ext >&5
38496
38497 ac_cv_func_crypt=no
38498 fi
38499 rm -f conftest.err conftest.$ac_objext \
38500       conftest$ac_exeext conftest.$ac_ext
38501 fi
38502 echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
38503 echo "${ECHO_T}$ac_cv_func_crypt" >&6
38504 if test $ac_cv_func_crypt = yes; then
38505   have_crypt=yes
38506 else
38507
38508                 LIBS="$save_LIBS"
38509                 echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
38510 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
38511 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
38512   echo $ECHO_N "(cached) $ECHO_C" >&6
38513 else
38514   ac_check_lib_save_LIBS=$LIBS
38515 LIBS="-lcrypt  $LIBS"
38516 cat >conftest.$ac_ext <<_ACEOF
38517 /* confdefs.h.  */
38518 _ACEOF
38519 cat confdefs.h >>conftest.$ac_ext
38520 cat >>conftest.$ac_ext <<_ACEOF
38521 /* end confdefs.h.  */
38522
38523 /* Override any gcc2 internal prototype to avoid an error.  */
38524 #ifdef __cplusplus
38525 extern "C"
38526 #endif
38527 /* We use char because int might match the return type of a gcc2
38528    builtin and then its argument prototype would still apply.  */
38529 char crypt ();
38530 int
38531 main ()
38532 {
38533 crypt ();
38534   ;
38535   return 0;
38536 }
38537 _ACEOF
38538 rm -f conftest.$ac_objext conftest$ac_exeext
38539 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38540   (eval $ac_link) 2>conftest.er1
38541   ac_status=$?
38542   grep -v '^ *+' conftest.er1 >conftest.err
38543   rm -f conftest.er1
38544   cat conftest.err >&5
38545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38546   (exit $ac_status); } &&
38547          { ac_try='test -z "$ac_c_werror_flag"
38548                          || test ! -s conftest.err'
38549   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38550   (eval $ac_try) 2>&5
38551   ac_status=$?
38552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38553   (exit $ac_status); }; } &&
38554          { ac_try='test -s conftest$ac_exeext'
38555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38556   (eval $ac_try) 2>&5
38557   ac_status=$?
38558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38559   (exit $ac_status); }; }; then
38560   ac_cv_lib_crypt_crypt=yes
38561 else
38562   echo "$as_me: failed program was:" >&5
38563 sed 's/^/| /' conftest.$ac_ext >&5
38564
38565 ac_cv_lib_crypt_crypt=no
38566 fi
38567 rm -f conftest.err conftest.$ac_objext \
38568       conftest$ac_exeext conftest.$ac_ext
38569 LIBS=$ac_check_lib_save_LIBS
38570 fi
38571 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
38572 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
38573 if test $ac_cv_lib_crypt_crypt = yes; then
38574   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
38575                         have_crypt=yes
38576 else
38577   have_crypt=no
38578 fi
38579
38580 fi
38581
38582
38583         LIBS="$save_LIBS"
38584
38585         if test $have_crypt = yes ; then
38586
38587 cat >>confdefs.h <<\_ACEOF
38588 #define HAVE_CRYPT 1
38589 _ACEOF
38590
38591         else
38592                 { echo "$as_me:$LINENO: WARNING: could not find crypt" >&5
38593 echo "$as_me: WARNING: could not find crypt" >&2;}
38594                 if test $ol_enable_crypt = yes ; then
38595                         { { echo "$as_me:$LINENO: error: could not find crypt, select appropriate options or disable" >&5
38596 echo "$as_me: error: could not find crypt, select appropriate options or disable" >&2;}
38597    { (exit 1); exit 1; }; }
38598                 fi
38599
38600                 { echo "$as_me:$LINENO: WARNING: disabling crypt support" >&5
38601 echo "$as_me: WARNING: disabling crypt support" >&2;}
38602                 ol_enable_crypt=no
38603         fi
38604 fi
38605
38606 if test $ol_enable_proctitle != no ; then
38607         echo "$as_me:$LINENO: checking for setproctitle" >&5
38608 echo $ECHO_N "checking for setproctitle... $ECHO_C" >&6
38609 if test "${ac_cv_func_setproctitle+set}" = set; then
38610   echo $ECHO_N "(cached) $ECHO_C" >&6
38611 else
38612   cat >conftest.$ac_ext <<_ACEOF
38613 /* confdefs.h.  */
38614 _ACEOF
38615 cat confdefs.h >>conftest.$ac_ext
38616 cat >>conftest.$ac_ext <<_ACEOF
38617 /* end confdefs.h.  */
38618 /* Define setproctitle to an innocuous variant, in case <limits.h> declares setproctitle.
38619    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
38620 #define setproctitle innocuous_setproctitle
38621
38622 /* System header to define __stub macros and hopefully few prototypes,
38623     which can conflict with char setproctitle (); below.
38624     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
38625     <limits.h> exists even on freestanding compilers.  */
38626
38627 #ifdef __STDC__
38628 # include <limits.h>
38629 #else
38630 # include <assert.h>
38631 #endif
38632
38633 #undef setproctitle
38634
38635 /* Override any gcc2 internal prototype to avoid an error.  */
38636 #ifdef __cplusplus
38637 extern "C"
38638 {
38639 #endif
38640 /* We use char because int might match the return type of a gcc2
38641    builtin and then its argument prototype would still apply.  */
38642 char setproctitle ();
38643 /* The GNU C library defines this for functions which it implements
38644     to always fail with ENOSYS.  Some functions are actually named
38645     something starting with __ and the normal name is an alias.  */
38646 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
38647 choke me
38648 #else
38649 char (*f) () = setproctitle;
38650 #endif
38651 #ifdef __cplusplus
38652 }
38653 #endif
38654
38655 int
38656 main ()
38657 {
38658 return f != setproctitle;
38659   ;
38660   return 0;
38661 }
38662 _ACEOF
38663 rm -f conftest.$ac_objext conftest$ac_exeext
38664 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38665   (eval $ac_link) 2>conftest.er1
38666   ac_status=$?
38667   grep -v '^ *+' conftest.er1 >conftest.err
38668   rm -f conftest.er1
38669   cat conftest.err >&5
38670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38671   (exit $ac_status); } &&
38672          { ac_try='test -z "$ac_c_werror_flag"
38673                          || test ! -s conftest.err'
38674   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38675   (eval $ac_try) 2>&5
38676   ac_status=$?
38677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38678   (exit $ac_status); }; } &&
38679          { ac_try='test -s conftest$ac_exeext'
38680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38681   (eval $ac_try) 2>&5
38682   ac_status=$?
38683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38684   (exit $ac_status); }; }; then
38685   ac_cv_func_setproctitle=yes
38686 else
38687   echo "$as_me: failed program was:" >&5
38688 sed 's/^/| /' conftest.$ac_ext >&5
38689
38690 ac_cv_func_setproctitle=no
38691 fi
38692 rm -f conftest.err conftest.$ac_objext \
38693       conftest$ac_exeext conftest.$ac_ext
38694 fi
38695 echo "$as_me:$LINENO: result: $ac_cv_func_setproctitle" >&5
38696 echo "${ECHO_T}$ac_cv_func_setproctitle" >&6
38697 if test $ac_cv_func_setproctitle = yes; then
38698   have_setproctitle=yes
38699 else
38700
38701                 echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
38702 echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
38703 if test "${ac_cv_lib_util_setproctitle+set}" = set; then
38704   echo $ECHO_N "(cached) $ECHO_C" >&6
38705 else
38706   ac_check_lib_save_LIBS=$LIBS
38707 LIBS="-lutil  $LIBS"
38708 cat >conftest.$ac_ext <<_ACEOF
38709 /* confdefs.h.  */
38710 _ACEOF
38711 cat confdefs.h >>conftest.$ac_ext
38712 cat >>conftest.$ac_ext <<_ACEOF
38713 /* end confdefs.h.  */
38714
38715 /* Override any gcc2 internal prototype to avoid an error.  */
38716 #ifdef __cplusplus
38717 extern "C"
38718 #endif
38719 /* We use char because int might match the return type of a gcc2
38720    builtin and then its argument prototype would still apply.  */
38721 char setproctitle ();
38722 int
38723 main ()
38724 {
38725 setproctitle ();
38726   ;
38727   return 0;
38728 }
38729 _ACEOF
38730 rm -f conftest.$ac_objext conftest$ac_exeext
38731 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38732   (eval $ac_link) 2>conftest.er1
38733   ac_status=$?
38734   grep -v '^ *+' conftest.er1 >conftest.err
38735   rm -f conftest.er1
38736   cat conftest.err >&5
38737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38738   (exit $ac_status); } &&
38739          { ac_try='test -z "$ac_c_werror_flag"
38740                          || test ! -s conftest.err'
38741   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38742   (eval $ac_try) 2>&5
38743   ac_status=$?
38744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38745   (exit $ac_status); }; } &&
38746          { ac_try='test -s conftest$ac_exeext'
38747   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38748   (eval $ac_try) 2>&5
38749   ac_status=$?
38750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38751   (exit $ac_status); }; }; then
38752   ac_cv_lib_util_setproctitle=yes
38753 else
38754   echo "$as_me: failed program was:" >&5
38755 sed 's/^/| /' conftest.$ac_ext >&5
38756
38757 ac_cv_lib_util_setproctitle=no
38758 fi
38759 rm -f conftest.err conftest.$ac_objext \
38760       conftest$ac_exeext conftest.$ac_ext
38761 LIBS=$ac_check_lib_save_LIBS
38762 fi
38763 echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
38764 echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
38765 if test $ac_cv_lib_util_setproctitle = yes; then
38766   have_setproctitle=yes
38767                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
38768 else
38769   have_setproctitle=no
38770                         case $LIBOBJS in
38771     "setproctitle.$ac_objext"   | \
38772   *" setproctitle.$ac_objext"   | \
38773     "setproctitle.$ac_objext "* | \
38774   *" setproctitle.$ac_objext "* ) ;;
38775   *) LIBOBJS="$LIBOBJS setproctitle.$ac_objext" ;;
38776 esac
38777
38778                         LIBSRCS="$LIBSRCS setproctitle.c"
38779 fi
38780
38781 fi
38782
38783
38784         if test $have_setproctitle = yes ; then
38785
38786 cat >>confdefs.h <<\_ACEOF
38787 #define HAVE_SETPROCTITLE 1
38788 _ACEOF
38789
38790         fi
38791 fi
38792
38793 if test $ol_enable_slp != no ; then
38794
38795 for ac_header in slp.h
38796 do
38797 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
38798 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38799   echo "$as_me:$LINENO: checking for $ac_header" >&5
38800 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
38801 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38802   echo $ECHO_N "(cached) $ECHO_C" >&6
38803 fi
38804 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
38805 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
38806 else
38807   # Is the header compilable?
38808 echo "$as_me:$LINENO: checking $ac_header usability" >&5
38809 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
38810 cat >conftest.$ac_ext <<_ACEOF
38811 /* confdefs.h.  */
38812 _ACEOF
38813 cat confdefs.h >>conftest.$ac_ext
38814 cat >>conftest.$ac_ext <<_ACEOF
38815 /* end confdefs.h.  */
38816 $ac_includes_default
38817 #include <$ac_header>
38818 _ACEOF
38819 rm -f conftest.$ac_objext
38820 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38821   (eval $ac_compile) 2>conftest.er1
38822   ac_status=$?
38823   grep -v '^ *+' conftest.er1 >conftest.err
38824   rm -f conftest.er1
38825   cat conftest.err >&5
38826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38827   (exit $ac_status); } &&
38828          { ac_try='test -z "$ac_c_werror_flag"
38829                          || test ! -s conftest.err'
38830   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38831   (eval $ac_try) 2>&5
38832   ac_status=$?
38833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38834   (exit $ac_status); }; } &&
38835          { ac_try='test -s conftest.$ac_objext'
38836   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38837   (eval $ac_try) 2>&5
38838   ac_status=$?
38839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38840   (exit $ac_status); }; }; then
38841   ac_header_compiler=yes
38842 else
38843   echo "$as_me: failed program was:" >&5
38844 sed 's/^/| /' conftest.$ac_ext >&5
38845
38846 ac_header_compiler=no
38847 fi
38848 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38849 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
38850 echo "${ECHO_T}$ac_header_compiler" >&6
38851
38852 # Is the header present?
38853 echo "$as_me:$LINENO: checking $ac_header presence" >&5
38854 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
38855 cat >conftest.$ac_ext <<_ACEOF
38856 /* confdefs.h.  */
38857 _ACEOF
38858 cat confdefs.h >>conftest.$ac_ext
38859 cat >>conftest.$ac_ext <<_ACEOF
38860 /* end confdefs.h.  */
38861 #include <$ac_header>
38862 _ACEOF
38863 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
38864   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
38865   ac_status=$?
38866   grep -v '^ *+' conftest.er1 >conftest.err
38867   rm -f conftest.er1
38868   cat conftest.err >&5
38869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38870   (exit $ac_status); } >/dev/null; then
38871   if test -s conftest.err; then
38872     ac_cpp_err=$ac_c_preproc_warn_flag
38873     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
38874   else
38875     ac_cpp_err=
38876   fi
38877 else
38878   ac_cpp_err=yes
38879 fi
38880 if test -z "$ac_cpp_err"; then
38881   ac_header_preproc=yes
38882 else
38883   echo "$as_me: failed program was:" >&5
38884 sed 's/^/| /' conftest.$ac_ext >&5
38885
38886   ac_header_preproc=no
38887 fi
38888 rm -f conftest.err conftest.$ac_ext
38889 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
38890 echo "${ECHO_T}$ac_header_preproc" >&6
38891
38892 # So?  What about this header?
38893 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
38894   yes:no: )
38895     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
38896 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
38897     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
38898 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
38899     ac_header_preproc=yes
38900     ;;
38901   no:yes:* )
38902     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
38903 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
38904     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
38905 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
38906     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
38907 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
38908     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
38909 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
38910     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
38911 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
38912     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
38913 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
38914     (
38915       cat <<\_ASBOX
38916 ## --------------------------------------------- ##
38917 ## Report this to <http://www.openldap.org/its/> ##
38918 ## --------------------------------------------- ##
38919 _ASBOX
38920     ) |
38921       sed "s/^/$as_me: WARNING:     /" >&2
38922     ;;
38923 esac
38924 echo "$as_me:$LINENO: checking for $ac_header" >&5
38925 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
38926 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38927   echo $ECHO_N "(cached) $ECHO_C" >&6
38928 else
38929   eval "$as_ac_Header=\$ac_header_preproc"
38930 fi
38931 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
38932 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
38933
38934 fi
38935 if test `eval echo '${'$as_ac_Header'}'` = yes; then
38936   cat >>confdefs.h <<_ACEOF
38937 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
38938 _ACEOF
38939
38940 fi
38941
38942 done
38943
38944
38945         if test $ac_cv_header_slp_h = yes ; then
38946                 echo "$as_me:$LINENO: checking for SLPOpen in -lslp" >&5
38947 echo $ECHO_N "checking for SLPOpen in -lslp... $ECHO_C" >&6
38948 if test "${ac_cv_lib_slp_SLPOpen+set}" = set; then
38949   echo $ECHO_N "(cached) $ECHO_C" >&6
38950 else
38951   ac_check_lib_save_LIBS=$LIBS
38952 LIBS="-lslp  $LIBS"
38953 cat >conftest.$ac_ext <<_ACEOF
38954 /* confdefs.h.  */
38955 _ACEOF
38956 cat confdefs.h >>conftest.$ac_ext
38957 cat >>conftest.$ac_ext <<_ACEOF
38958 /* end confdefs.h.  */
38959
38960 /* Override any gcc2 internal prototype to avoid an error.  */
38961 #ifdef __cplusplus
38962 extern "C"
38963 #endif
38964 /* We use char because int might match the return type of a gcc2
38965    builtin and then its argument prototype would still apply.  */
38966 char SLPOpen ();
38967 int
38968 main ()
38969 {
38970 SLPOpen ();
38971   ;
38972   return 0;
38973 }
38974 _ACEOF
38975 rm -f conftest.$ac_objext conftest$ac_exeext
38976 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38977   (eval $ac_link) 2>conftest.er1
38978   ac_status=$?
38979   grep -v '^ *+' conftest.er1 >conftest.err
38980   rm -f conftest.er1
38981   cat conftest.err >&5
38982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38983   (exit $ac_status); } &&
38984          { ac_try='test -z "$ac_c_werror_flag"
38985                          || test ! -s conftest.err'
38986   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38987   (eval $ac_try) 2>&5
38988   ac_status=$?
38989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38990   (exit $ac_status); }; } &&
38991          { ac_try='test -s conftest$ac_exeext'
38992   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38993   (eval $ac_try) 2>&5
38994   ac_status=$?
38995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38996   (exit $ac_status); }; }; then
38997   ac_cv_lib_slp_SLPOpen=yes
38998 else
38999   echo "$as_me: failed program was:" >&5
39000 sed 's/^/| /' conftest.$ac_ext >&5
39001
39002 ac_cv_lib_slp_SLPOpen=no
39003 fi
39004 rm -f conftest.err conftest.$ac_objext \
39005       conftest$ac_exeext conftest.$ac_ext
39006 LIBS=$ac_check_lib_save_LIBS
39007 fi
39008 echo "$as_me:$LINENO: result: $ac_cv_lib_slp_SLPOpen" >&5
39009 echo "${ECHO_T}$ac_cv_lib_slp_SLPOpen" >&6
39010 if test $ac_cv_lib_slp_SLPOpen = yes; then
39011   have_slp=yes
39012 else
39013   have_slp=no
39014 fi
39015
39016                 if test $have_slp = yes ; then
39017
39018 cat >>confdefs.h <<\_ACEOF
39019 #define HAVE_SLP 1
39020 _ACEOF
39021
39022                         SLAPD_SLP_LIBS=-lslp
39023                 fi
39024
39025         elif test $ol_enable_slp = yes ; then
39026                 { { echo "$as_me:$LINENO: error: SLP not found" >&5
39027 echo "$as_me: error: SLP not found" >&2;}
39028    { (exit 1); exit 1; }; }
39029         fi
39030 fi
39031
39032
39033 echo "$as_me:$LINENO: checking for mode_t" >&5
39034 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
39035 if test "${ac_cv_type_mode_t+set}" = set; then
39036   echo $ECHO_N "(cached) $ECHO_C" >&6
39037 else
39038   cat >conftest.$ac_ext <<_ACEOF
39039 /* confdefs.h.  */
39040 _ACEOF
39041 cat confdefs.h >>conftest.$ac_ext
39042 cat >>conftest.$ac_ext <<_ACEOF
39043 /* end confdefs.h.  */
39044 $ac_includes_default
39045 int
39046 main ()
39047 {
39048 if ((mode_t *) 0)
39049   return 0;
39050 if (sizeof (mode_t))
39051   return 0;
39052   ;
39053   return 0;
39054 }
39055 _ACEOF
39056 rm -f conftest.$ac_objext
39057 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39058   (eval $ac_compile) 2>conftest.er1
39059   ac_status=$?
39060   grep -v '^ *+' conftest.er1 >conftest.err
39061   rm -f conftest.er1
39062   cat conftest.err >&5
39063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39064   (exit $ac_status); } &&
39065          { ac_try='test -z "$ac_c_werror_flag"
39066                          || test ! -s conftest.err'
39067   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39068   (eval $ac_try) 2>&5
39069   ac_status=$?
39070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39071   (exit $ac_status); }; } &&
39072          { ac_try='test -s conftest.$ac_objext'
39073   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39074   (eval $ac_try) 2>&5
39075   ac_status=$?
39076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39077   (exit $ac_status); }; }; then
39078   ac_cv_type_mode_t=yes
39079 else
39080   echo "$as_me: failed program was:" >&5
39081 sed 's/^/| /' conftest.$ac_ext >&5
39082
39083 ac_cv_type_mode_t=no
39084 fi
39085 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39086 fi
39087 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
39088 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
39089 if test $ac_cv_type_mode_t = yes; then
39090   :
39091 else
39092
39093 cat >>confdefs.h <<_ACEOF
39094 #define mode_t int
39095 _ACEOF
39096
39097 fi
39098
39099 echo "$as_me:$LINENO: checking for off_t" >&5
39100 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
39101 if test "${ac_cv_type_off_t+set}" = set; then
39102   echo $ECHO_N "(cached) $ECHO_C" >&6
39103 else
39104   cat >conftest.$ac_ext <<_ACEOF
39105 /* confdefs.h.  */
39106 _ACEOF
39107 cat confdefs.h >>conftest.$ac_ext
39108 cat >>conftest.$ac_ext <<_ACEOF
39109 /* end confdefs.h.  */
39110 $ac_includes_default
39111 int
39112 main ()
39113 {
39114 if ((off_t *) 0)
39115   return 0;
39116 if (sizeof (off_t))
39117   return 0;
39118   ;
39119   return 0;
39120 }
39121 _ACEOF
39122 rm -f conftest.$ac_objext
39123 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39124   (eval $ac_compile) 2>conftest.er1
39125   ac_status=$?
39126   grep -v '^ *+' conftest.er1 >conftest.err
39127   rm -f conftest.er1
39128   cat conftest.err >&5
39129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39130   (exit $ac_status); } &&
39131          { ac_try='test -z "$ac_c_werror_flag"
39132                          || test ! -s conftest.err'
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); }; } &&
39138          { ac_try='test -s conftest.$ac_objext'
39139   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39140   (eval $ac_try) 2>&5
39141   ac_status=$?
39142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39143   (exit $ac_status); }; }; then
39144   ac_cv_type_off_t=yes
39145 else
39146   echo "$as_me: failed program was:" >&5
39147 sed 's/^/| /' conftest.$ac_ext >&5
39148
39149 ac_cv_type_off_t=no
39150 fi
39151 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39152 fi
39153 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
39154 echo "${ECHO_T}$ac_cv_type_off_t" >&6
39155 if test $ac_cv_type_off_t = yes; then
39156   :
39157 else
39158
39159 cat >>confdefs.h <<_ACEOF
39160 #define off_t long
39161 _ACEOF
39162
39163 fi
39164
39165 echo "$as_me:$LINENO: checking for pid_t" >&5
39166 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
39167 if test "${ac_cv_type_pid_t+set}" = set; then
39168   echo $ECHO_N "(cached) $ECHO_C" >&6
39169 else
39170   cat >conftest.$ac_ext <<_ACEOF
39171 /* confdefs.h.  */
39172 _ACEOF
39173 cat confdefs.h >>conftest.$ac_ext
39174 cat >>conftest.$ac_ext <<_ACEOF
39175 /* end confdefs.h.  */
39176 $ac_includes_default
39177 int
39178 main ()
39179 {
39180 if ((pid_t *) 0)
39181   return 0;
39182 if (sizeof (pid_t))
39183   return 0;
39184   ;
39185   return 0;
39186 }
39187 _ACEOF
39188 rm -f conftest.$ac_objext
39189 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39190   (eval $ac_compile) 2>conftest.er1
39191   ac_status=$?
39192   grep -v '^ *+' conftest.er1 >conftest.err
39193   rm -f conftest.er1
39194   cat conftest.err >&5
39195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39196   (exit $ac_status); } &&
39197          { ac_try='test -z "$ac_c_werror_flag"
39198                          || test ! -s conftest.err'
39199   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39200   (eval $ac_try) 2>&5
39201   ac_status=$?
39202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39203   (exit $ac_status); }; } &&
39204          { ac_try='test -s conftest.$ac_objext'
39205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39206   (eval $ac_try) 2>&5
39207   ac_status=$?
39208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39209   (exit $ac_status); }; }; then
39210   ac_cv_type_pid_t=yes
39211 else
39212   echo "$as_me: failed program was:" >&5
39213 sed 's/^/| /' conftest.$ac_ext >&5
39214
39215 ac_cv_type_pid_t=no
39216 fi
39217 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39218 fi
39219 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
39220 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
39221 if test $ac_cv_type_pid_t = yes; then
39222   :
39223 else
39224
39225 cat >>confdefs.h <<_ACEOF
39226 #define pid_t int
39227 _ACEOF
39228
39229 fi
39230
39231 echo "$as_me:$LINENO: checking for ssize_t" >&5
39232 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
39233 if test "${ac_cv_type_ssize_t+set}" = set; then
39234   echo $ECHO_N "(cached) $ECHO_C" >&6
39235 else
39236   cat >conftest.$ac_ext <<_ACEOF
39237 /* confdefs.h.  */
39238 _ACEOF
39239 cat confdefs.h >>conftest.$ac_ext
39240 cat >>conftest.$ac_ext <<_ACEOF
39241 /* end confdefs.h.  */
39242 $ac_includes_default
39243 int
39244 main ()
39245 {
39246 if ((ssize_t *) 0)
39247   return 0;
39248 if (sizeof (ssize_t))
39249   return 0;
39250   ;
39251   return 0;
39252 }
39253 _ACEOF
39254 rm -f conftest.$ac_objext
39255 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39256   (eval $ac_compile) 2>conftest.er1
39257   ac_status=$?
39258   grep -v '^ *+' conftest.er1 >conftest.err
39259   rm -f conftest.er1
39260   cat conftest.err >&5
39261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39262   (exit $ac_status); } &&
39263          { ac_try='test -z "$ac_c_werror_flag"
39264                          || test ! -s conftest.err'
39265   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39266   (eval $ac_try) 2>&5
39267   ac_status=$?
39268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39269   (exit $ac_status); }; } &&
39270          { ac_try='test -s conftest.$ac_objext'
39271   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39272   (eval $ac_try) 2>&5
39273   ac_status=$?
39274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39275   (exit $ac_status); }; }; then
39276   ac_cv_type_ssize_t=yes
39277 else
39278   echo "$as_me: failed program was:" >&5
39279 sed 's/^/| /' conftest.$ac_ext >&5
39280
39281 ac_cv_type_ssize_t=no
39282 fi
39283 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39284 fi
39285 echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
39286 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
39287 if test $ac_cv_type_ssize_t = yes; then
39288   :
39289 else
39290
39291 cat >>confdefs.h <<_ACEOF
39292 #define ssize_t signed int
39293 _ACEOF
39294
39295 fi
39296
39297 echo "$as_me:$LINENO: checking for caddr_t" >&5
39298 echo $ECHO_N "checking for caddr_t... $ECHO_C" >&6
39299 if test "${ac_cv_type_caddr_t+set}" = set; then
39300   echo $ECHO_N "(cached) $ECHO_C" >&6
39301 else
39302   cat >conftest.$ac_ext <<_ACEOF
39303 /* confdefs.h.  */
39304 _ACEOF
39305 cat confdefs.h >>conftest.$ac_ext
39306 cat >>conftest.$ac_ext <<_ACEOF
39307 /* end confdefs.h.  */
39308 $ac_includes_default
39309 int
39310 main ()
39311 {
39312 if ((caddr_t *) 0)
39313   return 0;
39314 if (sizeof (caddr_t))
39315   return 0;
39316   ;
39317   return 0;
39318 }
39319 _ACEOF
39320 rm -f conftest.$ac_objext
39321 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39322   (eval $ac_compile) 2>conftest.er1
39323   ac_status=$?
39324   grep -v '^ *+' conftest.er1 >conftest.err
39325   rm -f conftest.er1
39326   cat conftest.err >&5
39327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39328   (exit $ac_status); } &&
39329          { ac_try='test -z "$ac_c_werror_flag"
39330                          || test ! -s conftest.err'
39331   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39332   (eval $ac_try) 2>&5
39333   ac_status=$?
39334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39335   (exit $ac_status); }; } &&
39336          { ac_try='test -s conftest.$ac_objext'
39337   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39338   (eval $ac_try) 2>&5
39339   ac_status=$?
39340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39341   (exit $ac_status); }; }; then
39342   ac_cv_type_caddr_t=yes
39343 else
39344   echo "$as_me: failed program was:" >&5
39345 sed 's/^/| /' conftest.$ac_ext >&5
39346
39347 ac_cv_type_caddr_t=no
39348 fi
39349 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39350 fi
39351 echo "$as_me:$LINENO: result: $ac_cv_type_caddr_t" >&5
39352 echo "${ECHO_T}$ac_cv_type_caddr_t" >&6
39353 if test $ac_cv_type_caddr_t = yes; then
39354   :
39355 else
39356
39357 cat >>confdefs.h <<_ACEOF
39358 #define caddr_t char *
39359 _ACEOF
39360
39361 fi
39362
39363 echo "$as_me:$LINENO: checking for size_t" >&5
39364 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
39365 if test "${ac_cv_type_size_t+set}" = set; then
39366   echo $ECHO_N "(cached) $ECHO_C" >&6
39367 else
39368   cat >conftest.$ac_ext <<_ACEOF
39369 /* confdefs.h.  */
39370 _ACEOF
39371 cat confdefs.h >>conftest.$ac_ext
39372 cat >>conftest.$ac_ext <<_ACEOF
39373 /* end confdefs.h.  */
39374 $ac_includes_default
39375 int
39376 main ()
39377 {
39378 if ((size_t *) 0)
39379   return 0;
39380 if (sizeof (size_t))
39381   return 0;
39382   ;
39383   return 0;
39384 }
39385 _ACEOF
39386 rm -f conftest.$ac_objext
39387 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39388   (eval $ac_compile) 2>conftest.er1
39389   ac_status=$?
39390   grep -v '^ *+' conftest.er1 >conftest.err
39391   rm -f conftest.er1
39392   cat conftest.err >&5
39393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39394   (exit $ac_status); } &&
39395          { ac_try='test -z "$ac_c_werror_flag"
39396                          || test ! -s conftest.err'
39397   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39398   (eval $ac_try) 2>&5
39399   ac_status=$?
39400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39401   (exit $ac_status); }; } &&
39402          { ac_try='test -s conftest.$ac_objext'
39403   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39404   (eval $ac_try) 2>&5
39405   ac_status=$?
39406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39407   (exit $ac_status); }; }; then
39408   ac_cv_type_size_t=yes
39409 else
39410   echo "$as_me: failed program was:" >&5
39411 sed 's/^/| /' conftest.$ac_ext >&5
39412
39413 ac_cv_type_size_t=no
39414 fi
39415 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39416 fi
39417 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
39418 echo "${ECHO_T}$ac_cv_type_size_t" >&6
39419 if test $ac_cv_type_size_t = yes; then
39420   :
39421 else
39422
39423 cat >>confdefs.h <<_ACEOF
39424 #define size_t unsigned
39425 _ACEOF
39426
39427 fi
39428
39429
39430 echo "$as_me:$LINENO: checking for long long" >&5
39431 echo $ECHO_N "checking for long long... $ECHO_C" >&6
39432 if test "${ac_cv_type_long_long+set}" = set; then
39433   echo $ECHO_N "(cached) $ECHO_C" >&6
39434 else
39435   cat >conftest.$ac_ext <<_ACEOF
39436 /* confdefs.h.  */
39437 _ACEOF
39438 cat confdefs.h >>conftest.$ac_ext
39439 cat >>conftest.$ac_ext <<_ACEOF
39440 /* end confdefs.h.  */
39441 $ac_includes_default
39442 int
39443 main ()
39444 {
39445 if ((long long *) 0)
39446   return 0;
39447 if (sizeof (long long))
39448   return 0;
39449   ;
39450   return 0;
39451 }
39452 _ACEOF
39453 rm -f conftest.$ac_objext
39454 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39455   (eval $ac_compile) 2>conftest.er1
39456   ac_status=$?
39457   grep -v '^ *+' conftest.er1 >conftest.err
39458   rm -f conftest.er1
39459   cat conftest.err >&5
39460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39461   (exit $ac_status); } &&
39462          { ac_try='test -z "$ac_c_werror_flag"
39463                          || test ! -s conftest.err'
39464   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39465   (eval $ac_try) 2>&5
39466   ac_status=$?
39467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39468   (exit $ac_status); }; } &&
39469          { ac_try='test -s conftest.$ac_objext'
39470   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39471   (eval $ac_try) 2>&5
39472   ac_status=$?
39473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39474   (exit $ac_status); }; }; then
39475   ac_cv_type_long_long=yes
39476 else
39477   echo "$as_me: failed program was:" >&5
39478 sed 's/^/| /' conftest.$ac_ext >&5
39479
39480 ac_cv_type_long_long=no
39481 fi
39482 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39483 fi
39484 echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
39485 echo "${ECHO_T}$ac_cv_type_long_long" >&6
39486 if test $ac_cv_type_long_long = yes; then
39487
39488 cat >>confdefs.h <<_ACEOF
39489 #define HAVE_LONG_LONG 1
39490 _ACEOF
39491
39492
39493 fi
39494
39495 echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
39496 echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
39497 if test "${ac_cv_type_ptrdiff_t+set}" = set; then
39498   echo $ECHO_N "(cached) $ECHO_C" >&6
39499 else
39500   cat >conftest.$ac_ext <<_ACEOF
39501 /* confdefs.h.  */
39502 _ACEOF
39503 cat confdefs.h >>conftest.$ac_ext
39504 cat >>conftest.$ac_ext <<_ACEOF
39505 /* end confdefs.h.  */
39506 $ac_includes_default
39507 int
39508 main ()
39509 {
39510 if ((ptrdiff_t *) 0)
39511   return 0;
39512 if (sizeof (ptrdiff_t))
39513   return 0;
39514   ;
39515   return 0;
39516 }
39517 _ACEOF
39518 rm -f conftest.$ac_objext
39519 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39520   (eval $ac_compile) 2>conftest.er1
39521   ac_status=$?
39522   grep -v '^ *+' conftest.er1 >conftest.err
39523   rm -f conftest.er1
39524   cat conftest.err >&5
39525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39526   (exit $ac_status); } &&
39527          { ac_try='test -z "$ac_c_werror_flag"
39528                          || test ! -s conftest.err'
39529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39530   (eval $ac_try) 2>&5
39531   ac_status=$?
39532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39533   (exit $ac_status); }; } &&
39534          { ac_try='test -s conftest.$ac_objext'
39535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39536   (eval $ac_try) 2>&5
39537   ac_status=$?
39538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39539   (exit $ac_status); }; }; then
39540   ac_cv_type_ptrdiff_t=yes
39541 else
39542   echo "$as_me: failed program was:" >&5
39543 sed 's/^/| /' conftest.$ac_ext >&5
39544
39545 ac_cv_type_ptrdiff_t=no
39546 fi
39547 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39548 fi
39549 echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
39550 echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6
39551 if test $ac_cv_type_ptrdiff_t = yes; then
39552
39553 cat >>confdefs.h <<_ACEOF
39554 #define HAVE_PTRDIFF_T 1
39555 _ACEOF
39556
39557
39558 fi
39559
39560
39561
39562 echo "$as_me:$LINENO: checking for socklen_t" >&5
39563 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
39564 if test "${ac_cv_type_socklen_t+set}" = set; then
39565   echo $ECHO_N "(cached) $ECHO_C" >&6
39566 else
39567   cat >conftest.$ac_ext <<_ACEOF
39568 /* confdefs.h.  */
39569 _ACEOF
39570 cat confdefs.h >>conftest.$ac_ext
39571 cat >>conftest.$ac_ext <<_ACEOF
39572 /* end confdefs.h.  */
39573 $ac_includes_default
39574 #ifdef HAVE_SYS_SOCKET_H
39575 #include <sys/socket.h>
39576 #endif
39577
39578 int
39579 main ()
39580 {
39581 if ((socklen_t *) 0)
39582   return 0;
39583 if (sizeof (socklen_t))
39584   return 0;
39585   ;
39586   return 0;
39587 }
39588 _ACEOF
39589 rm -f conftest.$ac_objext
39590 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39591   (eval $ac_compile) 2>conftest.er1
39592   ac_status=$?
39593   grep -v '^ *+' conftest.er1 >conftest.err
39594   rm -f conftest.er1
39595   cat conftest.err >&5
39596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39597   (exit $ac_status); } &&
39598          { ac_try='test -z "$ac_c_werror_flag"
39599                          || test ! -s conftest.err'
39600   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39601   (eval $ac_try) 2>&5
39602   ac_status=$?
39603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39604   (exit $ac_status); }; } &&
39605          { ac_try='test -s conftest.$ac_objext'
39606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39607   (eval $ac_try) 2>&5
39608   ac_status=$?
39609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39610   (exit $ac_status); }; }; then
39611   ac_cv_type_socklen_t=yes
39612 else
39613   echo "$as_me: failed program was:" >&5
39614 sed 's/^/| /' conftest.$ac_ext >&5
39615
39616 ac_cv_type_socklen_t=no
39617 fi
39618 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39619 fi
39620 echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
39621 echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
39622
39623
39624 echo "$as_me:$LINENO: checking the type of arg 3 to accept()" >&5
39625 echo $ECHO_N "checking the type of arg 3 to accept()... $ECHO_C" >&6
39626 if test "${ol_cv_type_ber_socklen_t+set}" = set; then
39627   echo $ECHO_N "(cached) $ECHO_C" >&6
39628 else
39629
39630         set socklen_t int unsigned "unsigned long" long size_t
39631         test "$ac_cv_type_socklen_t" = yes || shift
39632         ol_cv_type_ber_socklen_t=$1 guessing="guessing "
39633         for lentype in "$@" ; do for addrtype in "struct sockaddr" void ; do
39634                 cat >conftest.$ac_ext <<_ACEOF
39635 /* confdefs.h.  */
39636 _ACEOF
39637 cat confdefs.h >>conftest.$ac_ext
39638 cat >>conftest.$ac_ext <<_ACEOF
39639 /* end confdefs.h.  */
39640 $ac_includes_default
39641 #ifdef HAVE_SYS_SOCKET_H
39642 #include <sys/socket.h>
39643 #endif
39644 extern int accept(int s, $addrtype *ap, $lentype *lp);
39645
39646 int
39647 main ()
39648 {
39649
39650 accept(0, (struct sockaddr *) 0, ($lentype *) 0);
39651
39652   ;
39653   return 0;
39654 }
39655 _ACEOF
39656 rm -f conftest.$ac_objext
39657 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39658   (eval $ac_compile) 2>conftest.er1
39659   ac_status=$?
39660   grep -v '^ *+' conftest.er1 >conftest.err
39661   rm -f conftest.er1
39662   cat conftest.err >&5
39663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39664   (exit $ac_status); } &&
39665          { ac_try='test -z "$ac_c_werror_flag"
39666                          || test ! -s conftest.err'
39667   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39668   (eval $ac_try) 2>&5
39669   ac_status=$?
39670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39671   (exit $ac_status); }; } &&
39672          { ac_try='test -s conftest.$ac_objext'
39673   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39674   (eval $ac_try) 2>&5
39675   ac_status=$?
39676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39677   (exit $ac_status); }; }; then
39678   ol_cv_type_ber_socklen_t=$lentype guessing= ; break 2
39679 else
39680   echo "$as_me: failed program was:" >&5
39681 sed 's/^/| /' conftest.$ac_ext >&5
39682
39683 fi
39684 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39685         done ; done
39686 fi
39687
39688 echo "$as_me:$LINENO: result: $guessing$ol_cv_type_ber_socklen_t *" >&5
39689 echo "${ECHO_T}$guessing$ol_cv_type_ber_socklen_t *" >&6
39690
39691 cat >>confdefs.h <<_ACEOF
39692 #define ber_socklen_t $ol_cv_type_ber_socklen_t
39693 _ACEOF
39694
39695
39696 if test "$ac_cv_type_socklen_t" != yes; then
39697
39698 cat >>confdefs.h <<_ACEOF
39699 #define socklen_t $ol_cv_type_ber_socklen_t
39700 _ACEOF
39701
39702 fi
39703
39704
39705 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
39706 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
39707 if test "${ac_cv_type_signal+set}" = set; then
39708   echo $ECHO_N "(cached) $ECHO_C" >&6
39709 else
39710   cat >conftest.$ac_ext <<_ACEOF
39711 /* confdefs.h.  */
39712 _ACEOF
39713 cat confdefs.h >>conftest.$ac_ext
39714 cat >>conftest.$ac_ext <<_ACEOF
39715 /* end confdefs.h.  */
39716 #include <sys/types.h>
39717 #include <signal.h>
39718 #ifdef signal
39719 # undef signal
39720 #endif
39721 #ifdef __cplusplus
39722 extern "C" void (*signal (int, void (*)(int)))(int);
39723 #else
39724 void (*signal ()) ();
39725 #endif
39726
39727 int
39728 main ()
39729 {
39730 int i;
39731   ;
39732   return 0;
39733 }
39734 _ACEOF
39735 rm -f conftest.$ac_objext
39736 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39737   (eval $ac_compile) 2>conftest.er1
39738   ac_status=$?
39739   grep -v '^ *+' conftest.er1 >conftest.err
39740   rm -f conftest.er1
39741   cat conftest.err >&5
39742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39743   (exit $ac_status); } &&
39744          { ac_try='test -z "$ac_c_werror_flag"
39745                          || test ! -s conftest.err'
39746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39747   (eval $ac_try) 2>&5
39748   ac_status=$?
39749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39750   (exit $ac_status); }; } &&
39751          { ac_try='test -s conftest.$ac_objext'
39752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39753   (eval $ac_try) 2>&5
39754   ac_status=$?
39755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39756   (exit $ac_status); }; }; then
39757   ac_cv_type_signal=void
39758 else
39759   echo "$as_me: failed program was:" >&5
39760 sed 's/^/| /' conftest.$ac_ext >&5
39761
39762 ac_cv_type_signal=int
39763 fi
39764 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39765 fi
39766 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
39767 echo "${ECHO_T}$ac_cv_type_signal" >&6
39768
39769 cat >>confdefs.h <<_ACEOF
39770 #define RETSIGTYPE $ac_cv_type_signal
39771 _ACEOF
39772
39773
39774
39775 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
39776 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
39777 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
39778   echo $ECHO_N "(cached) $ECHO_C" >&6
39779 else
39780   cat >conftest.$ac_ext <<_ACEOF
39781 /* confdefs.h.  */
39782 _ACEOF
39783 cat confdefs.h >>conftest.$ac_ext
39784 cat >>conftest.$ac_ext <<_ACEOF
39785 /* end confdefs.h.  */
39786 $ac_includes_default
39787 #include <signal.h>
39788
39789
39790 int
39791 main ()
39792 {
39793 if ((sig_atomic_t *) 0)
39794   return 0;
39795 if (sizeof (sig_atomic_t))
39796   return 0;
39797   ;
39798   return 0;
39799 }
39800 _ACEOF
39801 rm -f conftest.$ac_objext
39802 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39803   (eval $ac_compile) 2>conftest.er1
39804   ac_status=$?
39805   grep -v '^ *+' conftest.er1 >conftest.err
39806   rm -f conftest.er1
39807   cat conftest.err >&5
39808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39809   (exit $ac_status); } &&
39810          { ac_try='test -z "$ac_c_werror_flag"
39811                          || test ! -s conftest.err'
39812   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39813   (eval $ac_try) 2>&5
39814   ac_status=$?
39815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39816   (exit $ac_status); }; } &&
39817          { ac_try='test -s conftest.$ac_objext'
39818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39819   (eval $ac_try) 2>&5
39820   ac_status=$?
39821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39822   (exit $ac_status); }; }; then
39823   ac_cv_type_sig_atomic_t=yes
39824 else
39825   echo "$as_me: failed program was:" >&5
39826 sed 's/^/| /' conftest.$ac_ext >&5
39827
39828 ac_cv_type_sig_atomic_t=no
39829 fi
39830 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39831 fi
39832 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
39833 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
39834 if test $ac_cv_type_sig_atomic_t = yes; then
39835   :
39836 else
39837
39838 cat >>confdefs.h <<_ACEOF
39839 #define sig_atomic_t int
39840 _ACEOF
39841
39842 fi
39843
39844
39845 echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
39846 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
39847 if test "${ac_cv_type_uid_t+set}" = set; then
39848   echo $ECHO_N "(cached) $ECHO_C" >&6
39849 else
39850   cat >conftest.$ac_ext <<_ACEOF
39851 /* confdefs.h.  */
39852 _ACEOF
39853 cat confdefs.h >>conftest.$ac_ext
39854 cat >>conftest.$ac_ext <<_ACEOF
39855 /* end confdefs.h.  */
39856 #include <sys/types.h>
39857
39858 _ACEOF
39859 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
39860   $EGREP "uid_t" >/dev/null 2>&1; then
39861   ac_cv_type_uid_t=yes
39862 else
39863   ac_cv_type_uid_t=no
39864 fi
39865 rm -f conftest*
39866
39867 fi
39868 echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
39869 echo "${ECHO_T}$ac_cv_type_uid_t" >&6
39870 if test $ac_cv_type_uid_t = no; then
39871
39872 cat >>confdefs.h <<\_ACEOF
39873 #define uid_t int
39874 _ACEOF
39875
39876
39877 cat >>confdefs.h <<\_ACEOF
39878 #define gid_t int
39879 _ACEOF
39880
39881 fi
39882
39883
39884 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
39885 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
39886 if test "${ac_cv_header_time+set}" = set; then
39887   echo $ECHO_N "(cached) $ECHO_C" >&6
39888 else
39889   cat >conftest.$ac_ext <<_ACEOF
39890 /* confdefs.h.  */
39891 _ACEOF
39892 cat confdefs.h >>conftest.$ac_ext
39893 cat >>conftest.$ac_ext <<_ACEOF
39894 /* end confdefs.h.  */
39895 #include <sys/types.h>
39896 #include <sys/time.h>
39897 #include <time.h>
39898
39899 int
39900 main ()
39901 {
39902 if ((struct tm *) 0)
39903 return 0;
39904   ;
39905   return 0;
39906 }
39907 _ACEOF
39908 rm -f conftest.$ac_objext
39909 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39910   (eval $ac_compile) 2>conftest.er1
39911   ac_status=$?
39912   grep -v '^ *+' conftest.er1 >conftest.err
39913   rm -f conftest.er1
39914   cat conftest.err >&5
39915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39916   (exit $ac_status); } &&
39917          { ac_try='test -z "$ac_c_werror_flag"
39918                          || test ! -s conftest.err'
39919   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39920   (eval $ac_try) 2>&5
39921   ac_status=$?
39922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39923   (exit $ac_status); }; } &&
39924          { ac_try='test -s conftest.$ac_objext'
39925   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39926   (eval $ac_try) 2>&5
39927   ac_status=$?
39928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39929   (exit $ac_status); }; }; then
39930   ac_cv_header_time=yes
39931 else
39932   echo "$as_me: failed program was:" >&5
39933 sed 's/^/| /' conftest.$ac_ext >&5
39934
39935 ac_cv_header_time=no
39936 fi
39937 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39938 fi
39939 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
39940 echo "${ECHO_T}$ac_cv_header_time" >&6
39941 if test $ac_cv_header_time = yes; then
39942
39943 cat >>confdefs.h <<\_ACEOF
39944 #define TIME_WITH_SYS_TIME 1
39945 _ACEOF
39946
39947 fi
39948
39949 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
39950 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
39951 if test "${ac_cv_struct_tm+set}" = set; then
39952   echo $ECHO_N "(cached) $ECHO_C" >&6
39953 else
39954   cat >conftest.$ac_ext <<_ACEOF
39955 /* confdefs.h.  */
39956 _ACEOF
39957 cat confdefs.h >>conftest.$ac_ext
39958 cat >>conftest.$ac_ext <<_ACEOF
39959 /* end confdefs.h.  */
39960 #include <sys/types.h>
39961 #include <time.h>
39962
39963 int
39964 main ()
39965 {
39966 struct tm *tp; tp->tm_sec;
39967   ;
39968   return 0;
39969 }
39970 _ACEOF
39971 rm -f conftest.$ac_objext
39972 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39973   (eval $ac_compile) 2>conftest.er1
39974   ac_status=$?
39975   grep -v '^ *+' conftest.er1 >conftest.err
39976   rm -f conftest.er1
39977   cat conftest.err >&5
39978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39979   (exit $ac_status); } &&
39980          { ac_try='test -z "$ac_c_werror_flag"
39981                          || test ! -s conftest.err'
39982   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39983   (eval $ac_try) 2>&5
39984   ac_status=$?
39985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39986   (exit $ac_status); }; } &&
39987          { ac_try='test -s conftest.$ac_objext'
39988   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39989   (eval $ac_try) 2>&5
39990   ac_status=$?
39991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39992   (exit $ac_status); }; }; then
39993   ac_cv_struct_tm=time.h
39994 else
39995   echo "$as_me: failed program was:" >&5
39996 sed 's/^/| /' conftest.$ac_ext >&5
39997
39998 ac_cv_struct_tm=sys/time.h
39999 fi
40000 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40001 fi
40002 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
40003 echo "${ECHO_T}$ac_cv_struct_tm" >&6
40004 if test $ac_cv_struct_tm = sys/time.h; then
40005
40006 cat >>confdefs.h <<\_ACEOF
40007 #define TM_IN_SYS_TIME 1
40008 _ACEOF
40009
40010 fi
40011
40012 echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
40013 echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
40014 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
40015   echo $ECHO_N "(cached) $ECHO_C" >&6
40016 else
40017   cat >conftest.$ac_ext <<_ACEOF
40018 /* confdefs.h.  */
40019 _ACEOF
40020 cat confdefs.h >>conftest.$ac_ext
40021 cat >>conftest.$ac_ext <<_ACEOF
40022 /* end confdefs.h.  */
40023 $ac_includes_default
40024 int
40025 main ()
40026 {
40027 static struct stat ac_aggr;
40028 if (ac_aggr.st_blksize)
40029 return 0;
40030   ;
40031   return 0;
40032 }
40033 _ACEOF
40034 rm -f conftest.$ac_objext
40035 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40036   (eval $ac_compile) 2>conftest.er1
40037   ac_status=$?
40038   grep -v '^ *+' conftest.er1 >conftest.err
40039   rm -f conftest.er1
40040   cat conftest.err >&5
40041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40042   (exit $ac_status); } &&
40043          { ac_try='test -z "$ac_c_werror_flag"
40044                          || test ! -s conftest.err'
40045   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40046   (eval $ac_try) 2>&5
40047   ac_status=$?
40048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40049   (exit $ac_status); }; } &&
40050          { ac_try='test -s conftest.$ac_objext'
40051   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40052   (eval $ac_try) 2>&5
40053   ac_status=$?
40054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40055   (exit $ac_status); }; }; then
40056   ac_cv_member_struct_stat_st_blksize=yes
40057 else
40058   echo "$as_me: failed program was:" >&5
40059 sed 's/^/| /' conftest.$ac_ext >&5
40060
40061 cat >conftest.$ac_ext <<_ACEOF
40062 /* confdefs.h.  */
40063 _ACEOF
40064 cat confdefs.h >>conftest.$ac_ext
40065 cat >>conftest.$ac_ext <<_ACEOF
40066 /* end confdefs.h.  */
40067 $ac_includes_default
40068 int
40069 main ()
40070 {
40071 static struct stat ac_aggr;
40072 if (sizeof ac_aggr.st_blksize)
40073 return 0;
40074   ;
40075   return 0;
40076 }
40077 _ACEOF
40078 rm -f conftest.$ac_objext
40079 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40080   (eval $ac_compile) 2>conftest.er1
40081   ac_status=$?
40082   grep -v '^ *+' conftest.er1 >conftest.err
40083   rm -f conftest.er1
40084   cat conftest.err >&5
40085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40086   (exit $ac_status); } &&
40087          { ac_try='test -z "$ac_c_werror_flag"
40088                          || test ! -s conftest.err'
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); }; } &&
40094          { ac_try='test -s conftest.$ac_objext'
40095   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40096   (eval $ac_try) 2>&5
40097   ac_status=$?
40098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40099   (exit $ac_status); }; }; then
40100   ac_cv_member_struct_stat_st_blksize=yes
40101 else
40102   echo "$as_me: failed program was:" >&5
40103 sed 's/^/| /' conftest.$ac_ext >&5
40104
40105 ac_cv_member_struct_stat_st_blksize=no
40106 fi
40107 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40108 fi
40109 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40110 fi
40111 echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
40112 echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
40113 if test $ac_cv_member_struct_stat_st_blksize = yes; then
40114
40115 cat >>confdefs.h <<_ACEOF
40116 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
40117 _ACEOF
40118
40119
40120 fi
40121
40122 echo "$as_me:$LINENO: checking for struct passwd.pw_gecos" >&5
40123 echo $ECHO_N "checking for struct passwd.pw_gecos... $ECHO_C" >&6
40124 if test "${ac_cv_member_struct_passwd_pw_gecos+set}" = set; then
40125   echo $ECHO_N "(cached) $ECHO_C" >&6
40126 else
40127   cat >conftest.$ac_ext <<_ACEOF
40128 /* confdefs.h.  */
40129 _ACEOF
40130 cat confdefs.h >>conftest.$ac_ext
40131 cat >>conftest.$ac_ext <<_ACEOF
40132 /* end confdefs.h.  */
40133 $ac_includes_default
40134 #include <pwd.h>
40135
40136 int
40137 main ()
40138 {
40139 static struct passwd ac_aggr;
40140 if (ac_aggr.pw_gecos)
40141 return 0;
40142   ;
40143   return 0;
40144 }
40145 _ACEOF
40146 rm -f conftest.$ac_objext
40147 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40148   (eval $ac_compile) 2>conftest.er1
40149   ac_status=$?
40150   grep -v '^ *+' conftest.er1 >conftest.err
40151   rm -f conftest.er1
40152   cat conftest.err >&5
40153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40154   (exit $ac_status); } &&
40155          { ac_try='test -z "$ac_c_werror_flag"
40156                          || test ! -s conftest.err'
40157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40158   (eval $ac_try) 2>&5
40159   ac_status=$?
40160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40161   (exit $ac_status); }; } &&
40162          { ac_try='test -s conftest.$ac_objext'
40163   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40164   (eval $ac_try) 2>&5
40165   ac_status=$?
40166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40167   (exit $ac_status); }; }; then
40168   ac_cv_member_struct_passwd_pw_gecos=yes
40169 else
40170   echo "$as_me: failed program was:" >&5
40171 sed 's/^/| /' conftest.$ac_ext >&5
40172
40173 cat >conftest.$ac_ext <<_ACEOF
40174 /* confdefs.h.  */
40175 _ACEOF
40176 cat confdefs.h >>conftest.$ac_ext
40177 cat >>conftest.$ac_ext <<_ACEOF
40178 /* end confdefs.h.  */
40179 $ac_includes_default
40180 #include <pwd.h>
40181
40182 int
40183 main ()
40184 {
40185 static struct passwd ac_aggr;
40186 if (sizeof ac_aggr.pw_gecos)
40187 return 0;
40188   ;
40189   return 0;
40190 }
40191 _ACEOF
40192 rm -f conftest.$ac_objext
40193 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40194   (eval $ac_compile) 2>conftest.er1
40195   ac_status=$?
40196   grep -v '^ *+' conftest.er1 >conftest.err
40197   rm -f conftest.er1
40198   cat conftest.err >&5
40199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40200   (exit $ac_status); } &&
40201          { ac_try='test -z "$ac_c_werror_flag"
40202                          || test ! -s conftest.err'
40203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40204   (eval $ac_try) 2>&5
40205   ac_status=$?
40206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40207   (exit $ac_status); }; } &&
40208          { ac_try='test -s conftest.$ac_objext'
40209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40210   (eval $ac_try) 2>&5
40211   ac_status=$?
40212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40213   (exit $ac_status); }; }; then
40214   ac_cv_member_struct_passwd_pw_gecos=yes
40215 else
40216   echo "$as_me: failed program was:" >&5
40217 sed 's/^/| /' conftest.$ac_ext >&5
40218
40219 ac_cv_member_struct_passwd_pw_gecos=no
40220 fi
40221 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40222 fi
40223 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40224 fi
40225 echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_gecos" >&5
40226 echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_gecos" >&6
40227 if test $ac_cv_member_struct_passwd_pw_gecos = yes; then
40228
40229 cat >>confdefs.h <<_ACEOF
40230 #define HAVE_STRUCT_PASSWD_PW_GECOS 1
40231 _ACEOF
40232
40233
40234 fi
40235
40236 echo "$as_me:$LINENO: checking for struct passwd.pw_passwd" >&5
40237 echo $ECHO_N "checking for struct passwd.pw_passwd... $ECHO_C" >&6
40238 if test "${ac_cv_member_struct_passwd_pw_passwd+set}" = set; then
40239   echo $ECHO_N "(cached) $ECHO_C" >&6
40240 else
40241   cat >conftest.$ac_ext <<_ACEOF
40242 /* confdefs.h.  */
40243 _ACEOF
40244 cat confdefs.h >>conftest.$ac_ext
40245 cat >>conftest.$ac_ext <<_ACEOF
40246 /* end confdefs.h.  */
40247 $ac_includes_default
40248 #include <pwd.h>
40249
40250 int
40251 main ()
40252 {
40253 static struct passwd ac_aggr;
40254 if (ac_aggr.pw_passwd)
40255 return 0;
40256   ;
40257   return 0;
40258 }
40259 _ACEOF
40260 rm -f conftest.$ac_objext
40261 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40262   (eval $ac_compile) 2>conftest.er1
40263   ac_status=$?
40264   grep -v '^ *+' conftest.er1 >conftest.err
40265   rm -f conftest.er1
40266   cat conftest.err >&5
40267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40268   (exit $ac_status); } &&
40269          { ac_try='test -z "$ac_c_werror_flag"
40270                          || test ! -s conftest.err'
40271   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40272   (eval $ac_try) 2>&5
40273   ac_status=$?
40274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40275   (exit $ac_status); }; } &&
40276          { ac_try='test -s conftest.$ac_objext'
40277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40278   (eval $ac_try) 2>&5
40279   ac_status=$?
40280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40281   (exit $ac_status); }; }; then
40282   ac_cv_member_struct_passwd_pw_passwd=yes
40283 else
40284   echo "$as_me: failed program was:" >&5
40285 sed 's/^/| /' conftest.$ac_ext >&5
40286
40287 cat >conftest.$ac_ext <<_ACEOF
40288 /* confdefs.h.  */
40289 _ACEOF
40290 cat confdefs.h >>conftest.$ac_ext
40291 cat >>conftest.$ac_ext <<_ACEOF
40292 /* end confdefs.h.  */
40293 $ac_includes_default
40294 #include <pwd.h>
40295
40296 int
40297 main ()
40298 {
40299 static struct passwd ac_aggr;
40300 if (sizeof ac_aggr.pw_passwd)
40301 return 0;
40302   ;
40303   return 0;
40304 }
40305 _ACEOF
40306 rm -f conftest.$ac_objext
40307 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40308   (eval $ac_compile) 2>conftest.er1
40309   ac_status=$?
40310   grep -v '^ *+' conftest.er1 >conftest.err
40311   rm -f conftest.er1
40312   cat conftest.err >&5
40313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40314   (exit $ac_status); } &&
40315          { ac_try='test -z "$ac_c_werror_flag"
40316                          || test ! -s conftest.err'
40317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40318   (eval $ac_try) 2>&5
40319   ac_status=$?
40320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40321   (exit $ac_status); }; } &&
40322          { ac_try='test -s conftest.$ac_objext'
40323   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40324   (eval $ac_try) 2>&5
40325   ac_status=$?
40326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40327   (exit $ac_status); }; }; then
40328   ac_cv_member_struct_passwd_pw_passwd=yes
40329 else
40330   echo "$as_me: failed program was:" >&5
40331 sed 's/^/| /' conftest.$ac_ext >&5
40332
40333 ac_cv_member_struct_passwd_pw_passwd=no
40334 fi
40335 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40336 fi
40337 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40338 fi
40339 echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_passwd" >&5
40340 echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_passwd" >&6
40341 if test $ac_cv_member_struct_passwd_pw_passwd = yes; then
40342
40343 cat >>confdefs.h <<_ACEOF
40344 #define HAVE_STRUCT_PASSWD_PW_PASSWD 1
40345 _ACEOF
40346
40347
40348 fi
40349
40350
40351 echo "$as_me:$LINENO: checking if toupper() requires islower()" >&5
40352 echo $ECHO_N "checking if toupper() requires islower()... $ECHO_C" >&6
40353 if test "${ol_cv_c_upper_lower+set}" = set; then
40354   echo $ECHO_N "(cached) $ECHO_C" >&6
40355 else
40356
40357         if test "$cross_compiling" = yes; then
40358   ol_cv_c_upper_lower=safe
40359 else
40360   cat >conftest.$ac_ext <<_ACEOF
40361 /* confdefs.h.  */
40362 _ACEOF
40363 cat confdefs.h >>conftest.$ac_ext
40364 cat >>conftest.$ac_ext <<_ACEOF
40365 /* end confdefs.h.  */
40366
40367 #include <ctype.h>
40368 main()
40369 {
40370         if ('C' == toupper('C'))
40371                 exit(0);
40372         else
40373                 exit(1);
40374 }
40375 _ACEOF
40376 rm -f conftest$ac_exeext
40377 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
40378   (eval $ac_link) 2>&5
40379   ac_status=$?
40380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40381   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
40382   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40383   (eval $ac_try) 2>&5
40384   ac_status=$?
40385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40386   (exit $ac_status); }; }; then
40387   ol_cv_c_upper_lower=no
40388 else
40389   echo "$as_me: program exited with status $ac_status" >&5
40390 echo "$as_me: failed program was:" >&5
40391 sed 's/^/| /' conftest.$ac_ext >&5
40392
40393 ( exit $ac_status )
40394 ol_cv_c_upper_lower=yes
40395 fi
40396 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
40397 fi
40398 fi
40399 echo "$as_me:$LINENO: result: $ol_cv_c_upper_lower" >&5
40400 echo "${ECHO_T}$ol_cv_c_upper_lower" >&6
40401 if test $ol_cv_c_upper_lower != no ; then
40402
40403 cat >>confdefs.h <<\_ACEOF
40404 #define C_UPPER_LOWER 1
40405 _ACEOF
40406
40407 fi
40408
40409 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
40410 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
40411 if test "${ac_cv_c_const+set}" = set; then
40412   echo $ECHO_N "(cached) $ECHO_C" >&6
40413 else
40414   cat >conftest.$ac_ext <<_ACEOF
40415 /* confdefs.h.  */
40416 _ACEOF
40417 cat confdefs.h >>conftest.$ac_ext
40418 cat >>conftest.$ac_ext <<_ACEOF
40419 /* end confdefs.h.  */
40420
40421 int
40422 main ()
40423 {
40424 /* FIXME: Include the comments suggested by Paul. */
40425 #ifndef __cplusplus
40426   /* Ultrix mips cc rejects this.  */
40427   typedef int charset[2];
40428   const charset x;
40429   /* SunOS 4.1.1 cc rejects this.  */
40430   char const *const *ccp;
40431   char **p;
40432   /* NEC SVR4.0.2 mips cc rejects this.  */
40433   struct point {int x, y;};
40434   static struct point const zero = {0,0};
40435   /* AIX XL C 1.02.0.0 rejects this.
40436      It does not let you subtract one const X* pointer from another in
40437      an arm of an if-expression whose if-part is not a constant
40438      expression */
40439   const char *g = "string";
40440   ccp = &g + (g ? g-g : 0);
40441   /* HPUX 7.0 cc rejects these. */
40442   ++ccp;
40443   p = (char**) ccp;
40444   ccp = (char const *const *) p;
40445   { /* SCO 3.2v4 cc rejects this.  */
40446     char *t;
40447     char const *s = 0 ? (char *) 0 : (char const *) 0;
40448
40449     *t++ = 0;
40450   }
40451   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
40452     int x[] = {25, 17};
40453     const int *foo = &x[0];
40454     ++foo;
40455   }
40456   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
40457     typedef const int *iptr;
40458     iptr p = 0;
40459     ++p;
40460   }
40461   { /* AIX XL C 1.02.0.0 rejects this saying
40462        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
40463     struct s { int j; const int *ap[3]; };
40464     struct s *b; b->j = 5;
40465   }
40466   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
40467     const int foo = 10;
40468   }
40469 #endif
40470
40471   ;
40472   return 0;
40473 }
40474 _ACEOF
40475 rm -f conftest.$ac_objext
40476 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40477   (eval $ac_compile) 2>conftest.er1
40478   ac_status=$?
40479   grep -v '^ *+' conftest.er1 >conftest.err
40480   rm -f conftest.er1
40481   cat conftest.err >&5
40482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40483   (exit $ac_status); } &&
40484          { ac_try='test -z "$ac_c_werror_flag"
40485                          || test ! -s conftest.err'
40486   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40487   (eval $ac_try) 2>&5
40488   ac_status=$?
40489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40490   (exit $ac_status); }; } &&
40491          { ac_try='test -s conftest.$ac_objext'
40492   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40493   (eval $ac_try) 2>&5
40494   ac_status=$?
40495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40496   (exit $ac_status); }; }; then
40497   ac_cv_c_const=yes
40498 else
40499   echo "$as_me: failed program was:" >&5
40500 sed 's/^/| /' conftest.$ac_ext >&5
40501
40502 ac_cv_c_const=no
40503 fi
40504 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40505 fi
40506 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
40507 echo "${ECHO_T}$ac_cv_c_const" >&6
40508 if test $ac_cv_c_const = no; then
40509
40510 cat >>confdefs.h <<\_ACEOF
40511 #define const
40512 _ACEOF
40513
40514 fi
40515
40516 echo "$as_me:$LINENO: checking if compiler understands volatile" >&5
40517 echo $ECHO_N "checking if compiler understands volatile... $ECHO_C" >&6
40518 if test "${ol_cv_c_volatile+set}" = set; then
40519   echo $ECHO_N "(cached) $ECHO_C" >&6
40520 else
40521   cat >conftest.$ac_ext <<_ACEOF
40522 /* confdefs.h.  */
40523 _ACEOF
40524 cat confdefs.h >>conftest.$ac_ext
40525 cat >>conftest.$ac_ext <<_ACEOF
40526 /* end confdefs.h.  */
40527 int x, y, z;
40528 int
40529 main ()
40530 {
40531 volatile int a; int * volatile b = x ? &y : &z;
40532       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
40533       *b = 0;
40534   ;
40535   return 0;
40536 }
40537 _ACEOF
40538 rm -f conftest.$ac_objext
40539 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40540   (eval $ac_compile) 2>conftest.er1
40541   ac_status=$?
40542   grep -v '^ *+' conftest.er1 >conftest.err
40543   rm -f conftest.er1
40544   cat conftest.err >&5
40545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40546   (exit $ac_status); } &&
40547          { ac_try='test -z "$ac_c_werror_flag"
40548                          || test ! -s conftest.err'
40549   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40550   (eval $ac_try) 2>&5
40551   ac_status=$?
40552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40553   (exit $ac_status); }; } &&
40554          { ac_try='test -s conftest.$ac_objext'
40555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40556   (eval $ac_try) 2>&5
40557   ac_status=$?
40558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40559   (exit $ac_status); }; }; then
40560   ol_cv_c_volatile=yes
40561 else
40562   echo "$as_me: failed program was:" >&5
40563 sed 's/^/| /' conftest.$ac_ext >&5
40564
40565 ol_cv_c_volatile=no
40566 fi
40567 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40568 fi
40569 echo "$as_me:$LINENO: result: $ol_cv_c_volatile" >&5
40570 echo "${ECHO_T}$ol_cv_c_volatile" >&6
40571   if test $ol_cv_c_volatile = yes; then
40572     :
40573   else
40574
40575 cat >>confdefs.h <<\_ACEOF
40576 #define volatile
40577 _ACEOF
40578
40579   fi
40580
40581
40582 if test $cross_compiling = yes ; then
40583         { echo "$as_me:$LINENO: WARNING: Crossing compiling... all bets are off!" >&5
40584 echo "$as_me: WARNING: Crossing compiling... all bets are off!" >&2;}
40585
40586 cat >>confdefs.h <<\_ACEOF
40587 #define CROSS_COMPILING 1
40588 _ACEOF
40589
40590 else
40591         echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
40592 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
40593 if test "${ac_cv_c_bigendian+set}" = set; then
40594   echo $ECHO_N "(cached) $ECHO_C" >&6
40595 else
40596   # See if sys/param.h defines the BYTE_ORDER macro.
40597 cat >conftest.$ac_ext <<_ACEOF
40598 /* confdefs.h.  */
40599 _ACEOF
40600 cat confdefs.h >>conftest.$ac_ext
40601 cat >>conftest.$ac_ext <<_ACEOF
40602 /* end confdefs.h.  */
40603 #include <sys/types.h>
40604 #include <sys/param.h>
40605
40606 int
40607 main ()
40608 {
40609 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
40610  bogus endian macros
40611 #endif
40612
40613   ;
40614   return 0;
40615 }
40616 _ACEOF
40617 rm -f conftest.$ac_objext
40618 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40619   (eval $ac_compile) 2>conftest.er1
40620   ac_status=$?
40621   grep -v '^ *+' conftest.er1 >conftest.err
40622   rm -f conftest.er1
40623   cat conftest.err >&5
40624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40625   (exit $ac_status); } &&
40626          { ac_try='test -z "$ac_c_werror_flag"
40627                          || test ! -s conftest.err'
40628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40629   (eval $ac_try) 2>&5
40630   ac_status=$?
40631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40632   (exit $ac_status); }; } &&
40633          { ac_try='test -s conftest.$ac_objext'
40634   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40635   (eval $ac_try) 2>&5
40636   ac_status=$?
40637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40638   (exit $ac_status); }; }; then
40639   # It does; now see whether it defined to BIG_ENDIAN or not.
40640 cat >conftest.$ac_ext <<_ACEOF
40641 /* confdefs.h.  */
40642 _ACEOF
40643 cat confdefs.h >>conftest.$ac_ext
40644 cat >>conftest.$ac_ext <<_ACEOF
40645 /* end confdefs.h.  */
40646 #include <sys/types.h>
40647 #include <sys/param.h>
40648
40649 int
40650 main ()
40651 {
40652 #if BYTE_ORDER != BIG_ENDIAN
40653  not big endian
40654 #endif
40655
40656   ;
40657   return 0;
40658 }
40659 _ACEOF
40660 rm -f conftest.$ac_objext
40661 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40662   (eval $ac_compile) 2>conftest.er1
40663   ac_status=$?
40664   grep -v '^ *+' conftest.er1 >conftest.err
40665   rm -f conftest.er1
40666   cat conftest.err >&5
40667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40668   (exit $ac_status); } &&
40669          { ac_try='test -z "$ac_c_werror_flag"
40670                          || test ! -s conftest.err'
40671   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40672   (eval $ac_try) 2>&5
40673   ac_status=$?
40674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40675   (exit $ac_status); }; } &&
40676          { ac_try='test -s conftest.$ac_objext'
40677   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40678   (eval $ac_try) 2>&5
40679   ac_status=$?
40680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40681   (exit $ac_status); }; }; then
40682   ac_cv_c_bigendian=yes
40683 else
40684   echo "$as_me: failed program was:" >&5
40685 sed 's/^/| /' conftest.$ac_ext >&5
40686
40687 ac_cv_c_bigendian=no
40688 fi
40689 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40690 else
40691   echo "$as_me: failed program was:" >&5
40692 sed 's/^/| /' conftest.$ac_ext >&5
40693
40694 # It does not; compile a test program.
40695 if test "$cross_compiling" = yes; then
40696   # try to guess the endianness by grepping values into an object file
40697   ac_cv_c_bigendian=unknown
40698   cat >conftest.$ac_ext <<_ACEOF
40699 /* confdefs.h.  */
40700 _ACEOF
40701 cat confdefs.h >>conftest.$ac_ext
40702 cat >>conftest.$ac_ext <<_ACEOF
40703 /* end confdefs.h.  */
40704 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
40705 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
40706 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
40707 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
40708 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
40709 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
40710 int
40711 main ()
40712 {
40713  _ascii (); _ebcdic ();
40714   ;
40715   return 0;
40716 }
40717 _ACEOF
40718 rm -f conftest.$ac_objext
40719 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40720   (eval $ac_compile) 2>conftest.er1
40721   ac_status=$?
40722   grep -v '^ *+' conftest.er1 >conftest.err
40723   rm -f conftest.er1
40724   cat conftest.err >&5
40725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40726   (exit $ac_status); } &&
40727          { ac_try='test -z "$ac_c_werror_flag"
40728                          || test ! -s conftest.err'
40729   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40730   (eval $ac_try) 2>&5
40731   ac_status=$?
40732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40733   (exit $ac_status); }; } &&
40734          { ac_try='test -s conftest.$ac_objext'
40735   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40736   (eval $ac_try) 2>&5
40737   ac_status=$?
40738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40739   (exit $ac_status); }; }; then
40740   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
40741   ac_cv_c_bigendian=yes
40742 fi
40743 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
40744   if test "$ac_cv_c_bigendian" = unknown; then
40745     ac_cv_c_bigendian=no
40746   else
40747     # finding both strings is unlikely to happen, but who knows?
40748     ac_cv_c_bigendian=unknown
40749   fi
40750 fi
40751 else
40752   echo "$as_me: failed program was:" >&5
40753 sed 's/^/| /' conftest.$ac_ext >&5
40754
40755 fi
40756 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40757 else
40758   cat >conftest.$ac_ext <<_ACEOF
40759 /* confdefs.h.  */
40760 _ACEOF
40761 cat confdefs.h >>conftest.$ac_ext
40762 cat >>conftest.$ac_ext <<_ACEOF
40763 /* end confdefs.h.  */
40764 int
40765 main ()
40766 {
40767   /* Are we little or big endian?  From Harbison&Steele.  */
40768   union
40769   {
40770     long l;
40771     char c[sizeof (long)];
40772   } u;
40773   u.l = 1;
40774   exit (u.c[sizeof (long) - 1] == 1);
40775 }
40776 _ACEOF
40777 rm -f conftest$ac_exeext
40778 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
40779   (eval $ac_link) 2>&5
40780   ac_status=$?
40781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40782   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
40783   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40784   (eval $ac_try) 2>&5
40785   ac_status=$?
40786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40787   (exit $ac_status); }; }; then
40788   ac_cv_c_bigendian=no
40789 else
40790   echo "$as_me: program exited with status $ac_status" >&5
40791 echo "$as_me: failed program was:" >&5
40792 sed 's/^/| /' conftest.$ac_ext >&5
40793
40794 ( exit $ac_status )
40795 ac_cv_c_bigendian=yes
40796 fi
40797 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
40798 fi
40799 fi
40800 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40801 fi
40802 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
40803 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
40804 case $ac_cv_c_bigendian in
40805   yes)
40806
40807 cat >>confdefs.h <<\_ACEOF
40808 #define WORDS_BIGENDIAN 1
40809 _ACEOF
40810  ;;
40811   no)
40812      ;;
40813   *)
40814     { { echo "$as_me:$LINENO: error: unknown endianness
40815 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
40816 echo "$as_me: error: unknown endianness
40817 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
40818    { (exit 1); exit 1; }; } ;;
40819 esac
40820
40821 fi
40822
40823 echo "$as_me:$LINENO: checking for short" >&5
40824 echo $ECHO_N "checking for short... $ECHO_C" >&6
40825 if test "${ac_cv_type_short+set}" = set; then
40826   echo $ECHO_N "(cached) $ECHO_C" >&6
40827 else
40828   cat >conftest.$ac_ext <<_ACEOF
40829 /* confdefs.h.  */
40830 _ACEOF
40831 cat confdefs.h >>conftest.$ac_ext
40832 cat >>conftest.$ac_ext <<_ACEOF
40833 /* end confdefs.h.  */
40834 $ac_includes_default
40835 int
40836 main ()
40837 {
40838 if ((short *) 0)
40839   return 0;
40840 if (sizeof (short))
40841   return 0;
40842   ;
40843   return 0;
40844 }
40845 _ACEOF
40846 rm -f conftest.$ac_objext
40847 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40848   (eval $ac_compile) 2>conftest.er1
40849   ac_status=$?
40850   grep -v '^ *+' conftest.er1 >conftest.err
40851   rm -f conftest.er1
40852   cat conftest.err >&5
40853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40854   (exit $ac_status); } &&
40855          { ac_try='test -z "$ac_c_werror_flag"
40856                          || test ! -s conftest.err'
40857   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40858   (eval $ac_try) 2>&5
40859   ac_status=$?
40860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40861   (exit $ac_status); }; } &&
40862          { ac_try='test -s conftest.$ac_objext'
40863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40864   (eval $ac_try) 2>&5
40865   ac_status=$?
40866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40867   (exit $ac_status); }; }; then
40868   ac_cv_type_short=yes
40869 else
40870   echo "$as_me: failed program was:" >&5
40871 sed 's/^/| /' conftest.$ac_ext >&5
40872
40873 ac_cv_type_short=no
40874 fi
40875 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40876 fi
40877 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
40878 echo "${ECHO_T}$ac_cv_type_short" >&6
40879
40880 echo "$as_me:$LINENO: checking size of short" >&5
40881 echo $ECHO_N "checking size of short... $ECHO_C" >&6
40882 if test "${ac_cv_sizeof_short+set}" = set; then
40883   echo $ECHO_N "(cached) $ECHO_C" >&6
40884 else
40885   if test "$ac_cv_type_short" = yes; then
40886   # The cast to unsigned long works around a bug in the HP C Compiler
40887   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40888   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40889   # This bug is HP SR number 8606223364.
40890   if test "$cross_compiling" = yes; then
40891   # Depending upon the size, compute the lo and hi bounds.
40892 cat >conftest.$ac_ext <<_ACEOF
40893 /* confdefs.h.  */
40894 _ACEOF
40895 cat confdefs.h >>conftest.$ac_ext
40896 cat >>conftest.$ac_ext <<_ACEOF
40897 /* end confdefs.h.  */
40898 $ac_includes_default
40899 int
40900 main ()
40901 {
40902 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
40903 test_array [0] = 0
40904
40905   ;
40906   return 0;
40907 }
40908 _ACEOF
40909 rm -f conftest.$ac_objext
40910 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40911   (eval $ac_compile) 2>conftest.er1
40912   ac_status=$?
40913   grep -v '^ *+' conftest.er1 >conftest.err
40914   rm -f conftest.er1
40915   cat conftest.err >&5
40916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40917   (exit $ac_status); } &&
40918          { ac_try='test -z "$ac_c_werror_flag"
40919                          || test ! -s conftest.err'
40920   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40921   (eval $ac_try) 2>&5
40922   ac_status=$?
40923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40924   (exit $ac_status); }; } &&
40925          { ac_try='test -s conftest.$ac_objext'
40926   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40927   (eval $ac_try) 2>&5
40928   ac_status=$?
40929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40930   (exit $ac_status); }; }; then
40931   ac_lo=0 ac_mid=0
40932   while :; do
40933     cat >conftest.$ac_ext <<_ACEOF
40934 /* confdefs.h.  */
40935 _ACEOF
40936 cat confdefs.h >>conftest.$ac_ext
40937 cat >>conftest.$ac_ext <<_ACEOF
40938 /* end confdefs.h.  */
40939 $ac_includes_default
40940 int
40941 main ()
40942 {
40943 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
40944 test_array [0] = 0
40945
40946   ;
40947   return 0;
40948 }
40949 _ACEOF
40950 rm -f conftest.$ac_objext
40951 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40952   (eval $ac_compile) 2>conftest.er1
40953   ac_status=$?
40954   grep -v '^ *+' conftest.er1 >conftest.err
40955   rm -f conftest.er1
40956   cat conftest.err >&5
40957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40958   (exit $ac_status); } &&
40959          { ac_try='test -z "$ac_c_werror_flag"
40960                          || test ! -s conftest.err'
40961   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40962   (eval $ac_try) 2>&5
40963   ac_status=$?
40964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40965   (exit $ac_status); }; } &&
40966          { ac_try='test -s conftest.$ac_objext'
40967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40968   (eval $ac_try) 2>&5
40969   ac_status=$?
40970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40971   (exit $ac_status); }; }; then
40972   ac_hi=$ac_mid; break
40973 else
40974   echo "$as_me: failed program was:" >&5
40975 sed 's/^/| /' conftest.$ac_ext >&5
40976
40977 ac_lo=`expr $ac_mid + 1`
40978                     if test $ac_lo -le $ac_mid; then
40979                       ac_lo= ac_hi=
40980                       break
40981                     fi
40982                     ac_mid=`expr 2 '*' $ac_mid + 1`
40983 fi
40984 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40985   done
40986 else
40987   echo "$as_me: failed program was:" >&5
40988 sed 's/^/| /' conftest.$ac_ext >&5
40989
40990 cat >conftest.$ac_ext <<_ACEOF
40991 /* confdefs.h.  */
40992 _ACEOF
40993 cat confdefs.h >>conftest.$ac_ext
40994 cat >>conftest.$ac_ext <<_ACEOF
40995 /* end confdefs.h.  */
40996 $ac_includes_default
40997 int
40998 main ()
40999 {
41000 static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
41001 test_array [0] = 0
41002
41003   ;
41004   return 0;
41005 }
41006 _ACEOF
41007 rm -f conftest.$ac_objext
41008 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41009   (eval $ac_compile) 2>conftest.er1
41010   ac_status=$?
41011   grep -v '^ *+' conftest.er1 >conftest.err
41012   rm -f conftest.er1
41013   cat conftest.err >&5
41014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41015   (exit $ac_status); } &&
41016          { ac_try='test -z "$ac_c_werror_flag"
41017                          || test ! -s conftest.err'
41018   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41019   (eval $ac_try) 2>&5
41020   ac_status=$?
41021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41022   (exit $ac_status); }; } &&
41023          { ac_try='test -s conftest.$ac_objext'
41024   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41025   (eval $ac_try) 2>&5
41026   ac_status=$?
41027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41028   (exit $ac_status); }; }; then
41029   ac_hi=-1 ac_mid=-1
41030   while :; do
41031     cat >conftest.$ac_ext <<_ACEOF
41032 /* confdefs.h.  */
41033 _ACEOF
41034 cat confdefs.h >>conftest.$ac_ext
41035 cat >>conftest.$ac_ext <<_ACEOF
41036 /* end confdefs.h.  */
41037 $ac_includes_default
41038 int
41039 main ()
41040 {
41041 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
41042 test_array [0] = 0
41043
41044   ;
41045   return 0;
41046 }
41047 _ACEOF
41048 rm -f conftest.$ac_objext
41049 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41050   (eval $ac_compile) 2>conftest.er1
41051   ac_status=$?
41052   grep -v '^ *+' conftest.er1 >conftest.err
41053   rm -f conftest.er1
41054   cat conftest.err >&5
41055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41056   (exit $ac_status); } &&
41057          { ac_try='test -z "$ac_c_werror_flag"
41058                          || test ! -s conftest.err'
41059   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41060   (eval $ac_try) 2>&5
41061   ac_status=$?
41062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41063   (exit $ac_status); }; } &&
41064          { ac_try='test -s conftest.$ac_objext'
41065   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41066   (eval $ac_try) 2>&5
41067   ac_status=$?
41068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41069   (exit $ac_status); }; }; then
41070   ac_lo=$ac_mid; break
41071 else
41072   echo "$as_me: failed program was:" >&5
41073 sed 's/^/| /' conftest.$ac_ext >&5
41074
41075 ac_hi=`expr '(' $ac_mid ')' - 1`
41076                        if test $ac_mid -le $ac_hi; then
41077                          ac_lo= ac_hi=
41078                          break
41079                        fi
41080                        ac_mid=`expr 2 '*' $ac_mid`
41081 fi
41082 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41083   done
41084 else
41085   echo "$as_me: failed program was:" >&5
41086 sed 's/^/| /' conftest.$ac_ext >&5
41087
41088 ac_lo= ac_hi=
41089 fi
41090 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41091 fi
41092 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41093 # Binary search between lo and hi bounds.
41094 while test "x$ac_lo" != "x$ac_hi"; do
41095   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
41096   cat >conftest.$ac_ext <<_ACEOF
41097 /* confdefs.h.  */
41098 _ACEOF
41099 cat confdefs.h >>conftest.$ac_ext
41100 cat >>conftest.$ac_ext <<_ACEOF
41101 /* end confdefs.h.  */
41102 $ac_includes_default
41103 int
41104 main ()
41105 {
41106 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
41107 test_array [0] = 0
41108
41109   ;
41110   return 0;
41111 }
41112 _ACEOF
41113 rm -f conftest.$ac_objext
41114 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41115   (eval $ac_compile) 2>conftest.er1
41116   ac_status=$?
41117   grep -v '^ *+' conftest.er1 >conftest.err
41118   rm -f conftest.er1
41119   cat conftest.err >&5
41120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41121   (exit $ac_status); } &&
41122          { ac_try='test -z "$ac_c_werror_flag"
41123                          || test ! -s conftest.err'
41124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41125   (eval $ac_try) 2>&5
41126   ac_status=$?
41127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41128   (exit $ac_status); }; } &&
41129          { ac_try='test -s conftest.$ac_objext'
41130   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41131   (eval $ac_try) 2>&5
41132   ac_status=$?
41133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41134   (exit $ac_status); }; }; then
41135   ac_hi=$ac_mid
41136 else
41137   echo "$as_me: failed program was:" >&5
41138 sed 's/^/| /' conftest.$ac_ext >&5
41139
41140 ac_lo=`expr '(' $ac_mid ')' + 1`
41141 fi
41142 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41143 done
41144 case $ac_lo in
41145 ?*) ac_cv_sizeof_short=$ac_lo;;
41146 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
41147 See \`config.log' for more details." >&5
41148 echo "$as_me: error: cannot compute sizeof (short), 77
41149 See \`config.log' for more details." >&2;}
41150    { (exit 1); exit 1; }; } ;;
41151 esac
41152 else
41153   if test "$cross_compiling" = yes; then
41154   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
41155 See \`config.log' for more details." >&5
41156 echo "$as_me: error: cannot run test program while cross compiling
41157 See \`config.log' for more details." >&2;}
41158    { (exit 1); exit 1; }; }
41159 else
41160   cat >conftest.$ac_ext <<_ACEOF
41161 /* confdefs.h.  */
41162 _ACEOF
41163 cat confdefs.h >>conftest.$ac_ext
41164 cat >>conftest.$ac_ext <<_ACEOF
41165 /* end confdefs.h.  */
41166 $ac_includes_default
41167 long longval () { return (long) (sizeof (short)); }
41168 unsigned long ulongval () { return (long) (sizeof (short)); }
41169 #include <stdio.h>
41170 #include <stdlib.h>
41171 int
41172 main ()
41173 {
41174
41175   FILE *f = fopen ("conftest.val", "w");
41176   if (! f)
41177     exit (1);
41178   if (((long) (sizeof (short))) < 0)
41179     {
41180       long i = longval ();
41181       if (i != ((long) (sizeof (short))))
41182         exit (1);
41183       fprintf (f, "%ld\n", i);
41184     }
41185   else
41186     {
41187       unsigned long i = ulongval ();
41188       if (i != ((long) (sizeof (short))))
41189         exit (1);
41190       fprintf (f, "%lu\n", i);
41191     }
41192   exit (ferror (f) || fclose (f) != 0);
41193
41194   ;
41195   return 0;
41196 }
41197 _ACEOF
41198 rm -f conftest$ac_exeext
41199 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
41200   (eval $ac_link) 2>&5
41201   ac_status=$?
41202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41203   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
41204   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41205   (eval $ac_try) 2>&5
41206   ac_status=$?
41207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41208   (exit $ac_status); }; }; then
41209   ac_cv_sizeof_short=`cat conftest.val`
41210 else
41211   echo "$as_me: program exited with status $ac_status" >&5
41212 echo "$as_me: failed program was:" >&5
41213 sed 's/^/| /' conftest.$ac_ext >&5
41214
41215 ( exit $ac_status )
41216 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
41217 See \`config.log' for more details." >&5
41218 echo "$as_me: error: cannot compute sizeof (short), 77
41219 See \`config.log' for more details." >&2;}
41220    { (exit 1); exit 1; }; }
41221 fi
41222 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
41223 fi
41224 fi
41225 rm -f conftest.val
41226 else
41227   ac_cv_sizeof_short=0
41228 fi
41229 fi
41230 echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
41231 echo "${ECHO_T}$ac_cv_sizeof_short" >&6
41232 cat >>confdefs.h <<_ACEOF
41233 #define SIZEOF_SHORT $ac_cv_sizeof_short
41234 _ACEOF
41235
41236
41237 echo "$as_me:$LINENO: checking for int" >&5
41238 echo $ECHO_N "checking for int... $ECHO_C" >&6
41239 if test "${ac_cv_type_int+set}" = set; then
41240   echo $ECHO_N "(cached) $ECHO_C" >&6
41241 else
41242   cat >conftest.$ac_ext <<_ACEOF
41243 /* confdefs.h.  */
41244 _ACEOF
41245 cat confdefs.h >>conftest.$ac_ext
41246 cat >>conftest.$ac_ext <<_ACEOF
41247 /* end confdefs.h.  */
41248 $ac_includes_default
41249 int
41250 main ()
41251 {
41252 if ((int *) 0)
41253   return 0;
41254 if (sizeof (int))
41255   return 0;
41256   ;
41257   return 0;
41258 }
41259 _ACEOF
41260 rm -f conftest.$ac_objext
41261 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41262   (eval $ac_compile) 2>conftest.er1
41263   ac_status=$?
41264   grep -v '^ *+' conftest.er1 >conftest.err
41265   rm -f conftest.er1
41266   cat conftest.err >&5
41267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41268   (exit $ac_status); } &&
41269          { ac_try='test -z "$ac_c_werror_flag"
41270                          || test ! -s conftest.err'
41271   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41272   (eval $ac_try) 2>&5
41273   ac_status=$?
41274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41275   (exit $ac_status); }; } &&
41276          { ac_try='test -s conftest.$ac_objext'
41277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41278   (eval $ac_try) 2>&5
41279   ac_status=$?
41280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41281   (exit $ac_status); }; }; then
41282   ac_cv_type_int=yes
41283 else
41284   echo "$as_me: failed program was:" >&5
41285 sed 's/^/| /' conftest.$ac_ext >&5
41286
41287 ac_cv_type_int=no
41288 fi
41289 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41290 fi
41291 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
41292 echo "${ECHO_T}$ac_cv_type_int" >&6
41293
41294 echo "$as_me:$LINENO: checking size of int" >&5
41295 echo $ECHO_N "checking size of int... $ECHO_C" >&6
41296 if test "${ac_cv_sizeof_int+set}" = set; then
41297   echo $ECHO_N "(cached) $ECHO_C" >&6
41298 else
41299   if test "$ac_cv_type_int" = yes; then
41300   # The cast to unsigned long works around a bug in the HP C Compiler
41301   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41302   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41303   # This bug is HP SR number 8606223364.
41304   if test "$cross_compiling" = yes; then
41305   # Depending upon the size, compute the lo and hi bounds.
41306 cat >conftest.$ac_ext <<_ACEOF
41307 /* confdefs.h.  */
41308 _ACEOF
41309 cat confdefs.h >>conftest.$ac_ext
41310 cat >>conftest.$ac_ext <<_ACEOF
41311 /* end confdefs.h.  */
41312 $ac_includes_default
41313 int
41314 main ()
41315 {
41316 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
41317 test_array [0] = 0
41318
41319   ;
41320   return 0;
41321 }
41322 _ACEOF
41323 rm -f conftest.$ac_objext
41324 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41325   (eval $ac_compile) 2>conftest.er1
41326   ac_status=$?
41327   grep -v '^ *+' conftest.er1 >conftest.err
41328   rm -f conftest.er1
41329   cat conftest.err >&5
41330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41331   (exit $ac_status); } &&
41332          { ac_try='test -z "$ac_c_werror_flag"
41333                          || test ! -s conftest.err'
41334   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41335   (eval $ac_try) 2>&5
41336   ac_status=$?
41337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41338   (exit $ac_status); }; } &&
41339          { ac_try='test -s conftest.$ac_objext'
41340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41341   (eval $ac_try) 2>&5
41342   ac_status=$?
41343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41344   (exit $ac_status); }; }; then
41345   ac_lo=0 ac_mid=0
41346   while :; do
41347     cat >conftest.$ac_ext <<_ACEOF
41348 /* confdefs.h.  */
41349 _ACEOF
41350 cat confdefs.h >>conftest.$ac_ext
41351 cat >>conftest.$ac_ext <<_ACEOF
41352 /* end confdefs.h.  */
41353 $ac_includes_default
41354 int
41355 main ()
41356 {
41357 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
41358 test_array [0] = 0
41359
41360   ;
41361   return 0;
41362 }
41363 _ACEOF
41364 rm -f conftest.$ac_objext
41365 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41366   (eval $ac_compile) 2>conftest.er1
41367   ac_status=$?
41368   grep -v '^ *+' conftest.er1 >conftest.err
41369   rm -f conftest.er1
41370   cat conftest.err >&5
41371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41372   (exit $ac_status); } &&
41373          { ac_try='test -z "$ac_c_werror_flag"
41374                          || test ! -s conftest.err'
41375   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41376   (eval $ac_try) 2>&5
41377   ac_status=$?
41378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41379   (exit $ac_status); }; } &&
41380          { ac_try='test -s conftest.$ac_objext'
41381   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41382   (eval $ac_try) 2>&5
41383   ac_status=$?
41384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41385   (exit $ac_status); }; }; then
41386   ac_hi=$ac_mid; break
41387 else
41388   echo "$as_me: failed program was:" >&5
41389 sed 's/^/| /' conftest.$ac_ext >&5
41390
41391 ac_lo=`expr $ac_mid + 1`
41392                     if test $ac_lo -le $ac_mid; then
41393                       ac_lo= ac_hi=
41394                       break
41395                     fi
41396                     ac_mid=`expr 2 '*' $ac_mid + 1`
41397 fi
41398 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41399   done
41400 else
41401   echo "$as_me: failed program was:" >&5
41402 sed 's/^/| /' conftest.$ac_ext >&5
41403
41404 cat >conftest.$ac_ext <<_ACEOF
41405 /* confdefs.h.  */
41406 _ACEOF
41407 cat confdefs.h >>conftest.$ac_ext
41408 cat >>conftest.$ac_ext <<_ACEOF
41409 /* end confdefs.h.  */
41410 $ac_includes_default
41411 int
41412 main ()
41413 {
41414 static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
41415 test_array [0] = 0
41416
41417   ;
41418   return 0;
41419 }
41420 _ACEOF
41421 rm -f conftest.$ac_objext
41422 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41423   (eval $ac_compile) 2>conftest.er1
41424   ac_status=$?
41425   grep -v '^ *+' conftest.er1 >conftest.err
41426   rm -f conftest.er1
41427   cat conftest.err >&5
41428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41429   (exit $ac_status); } &&
41430          { ac_try='test -z "$ac_c_werror_flag"
41431                          || test ! -s conftest.err'
41432   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41433   (eval $ac_try) 2>&5
41434   ac_status=$?
41435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41436   (exit $ac_status); }; } &&
41437          { ac_try='test -s conftest.$ac_objext'
41438   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41439   (eval $ac_try) 2>&5
41440   ac_status=$?
41441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41442   (exit $ac_status); }; }; then
41443   ac_hi=-1 ac_mid=-1
41444   while :; do
41445     cat >conftest.$ac_ext <<_ACEOF
41446 /* confdefs.h.  */
41447 _ACEOF
41448 cat confdefs.h >>conftest.$ac_ext
41449 cat >>conftest.$ac_ext <<_ACEOF
41450 /* end confdefs.h.  */
41451 $ac_includes_default
41452 int
41453 main ()
41454 {
41455 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
41456 test_array [0] = 0
41457
41458   ;
41459   return 0;
41460 }
41461 _ACEOF
41462 rm -f conftest.$ac_objext
41463 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41464   (eval $ac_compile) 2>conftest.er1
41465   ac_status=$?
41466   grep -v '^ *+' conftest.er1 >conftest.err
41467   rm -f conftest.er1
41468   cat conftest.err >&5
41469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41470   (exit $ac_status); } &&
41471          { ac_try='test -z "$ac_c_werror_flag"
41472                          || test ! -s conftest.err'
41473   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41474   (eval $ac_try) 2>&5
41475   ac_status=$?
41476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41477   (exit $ac_status); }; } &&
41478          { ac_try='test -s conftest.$ac_objext'
41479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41480   (eval $ac_try) 2>&5
41481   ac_status=$?
41482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41483   (exit $ac_status); }; }; then
41484   ac_lo=$ac_mid; break
41485 else
41486   echo "$as_me: failed program was:" >&5
41487 sed 's/^/| /' conftest.$ac_ext >&5
41488
41489 ac_hi=`expr '(' $ac_mid ')' - 1`
41490                        if test $ac_mid -le $ac_hi; then
41491                          ac_lo= ac_hi=
41492                          break
41493                        fi
41494                        ac_mid=`expr 2 '*' $ac_mid`
41495 fi
41496 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41497   done
41498 else
41499   echo "$as_me: failed program was:" >&5
41500 sed 's/^/| /' conftest.$ac_ext >&5
41501
41502 ac_lo= ac_hi=
41503 fi
41504 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41505 fi
41506 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41507 # Binary search between lo and hi bounds.
41508 while test "x$ac_lo" != "x$ac_hi"; do
41509   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
41510   cat >conftest.$ac_ext <<_ACEOF
41511 /* confdefs.h.  */
41512 _ACEOF
41513 cat confdefs.h >>conftest.$ac_ext
41514 cat >>conftest.$ac_ext <<_ACEOF
41515 /* end confdefs.h.  */
41516 $ac_includes_default
41517 int
41518 main ()
41519 {
41520 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
41521 test_array [0] = 0
41522
41523   ;
41524   return 0;
41525 }
41526 _ACEOF
41527 rm -f conftest.$ac_objext
41528 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41529   (eval $ac_compile) 2>conftest.er1
41530   ac_status=$?
41531   grep -v '^ *+' conftest.er1 >conftest.err
41532   rm -f conftest.er1
41533   cat conftest.err >&5
41534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41535   (exit $ac_status); } &&
41536          { ac_try='test -z "$ac_c_werror_flag"
41537                          || test ! -s conftest.err'
41538   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41539   (eval $ac_try) 2>&5
41540   ac_status=$?
41541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41542   (exit $ac_status); }; } &&
41543          { ac_try='test -s conftest.$ac_objext'
41544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41545   (eval $ac_try) 2>&5
41546   ac_status=$?
41547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41548   (exit $ac_status); }; }; then
41549   ac_hi=$ac_mid
41550 else
41551   echo "$as_me: failed program was:" >&5
41552 sed 's/^/| /' conftest.$ac_ext >&5
41553
41554 ac_lo=`expr '(' $ac_mid ')' + 1`
41555 fi
41556 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41557 done
41558 case $ac_lo in
41559 ?*) ac_cv_sizeof_int=$ac_lo;;
41560 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
41561 See \`config.log' for more details." >&5
41562 echo "$as_me: error: cannot compute sizeof (int), 77
41563 See \`config.log' for more details." >&2;}
41564    { (exit 1); exit 1; }; } ;;
41565 esac
41566 else
41567   if test "$cross_compiling" = yes; then
41568   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
41569 See \`config.log' for more details." >&5
41570 echo "$as_me: error: cannot run test program while cross compiling
41571 See \`config.log' for more details." >&2;}
41572    { (exit 1); exit 1; }; }
41573 else
41574   cat >conftest.$ac_ext <<_ACEOF
41575 /* confdefs.h.  */
41576 _ACEOF
41577 cat confdefs.h >>conftest.$ac_ext
41578 cat >>conftest.$ac_ext <<_ACEOF
41579 /* end confdefs.h.  */
41580 $ac_includes_default
41581 long longval () { return (long) (sizeof (int)); }
41582 unsigned long ulongval () { return (long) (sizeof (int)); }
41583 #include <stdio.h>
41584 #include <stdlib.h>
41585 int
41586 main ()
41587 {
41588
41589   FILE *f = fopen ("conftest.val", "w");
41590   if (! f)
41591     exit (1);
41592   if (((long) (sizeof (int))) < 0)
41593     {
41594       long i = longval ();
41595       if (i != ((long) (sizeof (int))))
41596         exit (1);
41597       fprintf (f, "%ld\n", i);
41598     }
41599   else
41600     {
41601       unsigned long i = ulongval ();
41602       if (i != ((long) (sizeof (int))))
41603         exit (1);
41604       fprintf (f, "%lu\n", i);
41605     }
41606   exit (ferror (f) || fclose (f) != 0);
41607
41608   ;
41609   return 0;
41610 }
41611 _ACEOF
41612 rm -f conftest$ac_exeext
41613 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
41614   (eval $ac_link) 2>&5
41615   ac_status=$?
41616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41617   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
41618   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41619   (eval $ac_try) 2>&5
41620   ac_status=$?
41621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41622   (exit $ac_status); }; }; then
41623   ac_cv_sizeof_int=`cat conftest.val`
41624 else
41625   echo "$as_me: program exited with status $ac_status" >&5
41626 echo "$as_me: failed program was:" >&5
41627 sed 's/^/| /' conftest.$ac_ext >&5
41628
41629 ( exit $ac_status )
41630 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
41631 See \`config.log' for more details." >&5
41632 echo "$as_me: error: cannot compute sizeof (int), 77
41633 See \`config.log' for more details." >&2;}
41634    { (exit 1); exit 1; }; }
41635 fi
41636 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
41637 fi
41638 fi
41639 rm -f conftest.val
41640 else
41641   ac_cv_sizeof_int=0
41642 fi
41643 fi
41644 echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
41645 echo "${ECHO_T}$ac_cv_sizeof_int" >&6
41646 cat >>confdefs.h <<_ACEOF
41647 #define SIZEOF_INT $ac_cv_sizeof_int
41648 _ACEOF
41649
41650
41651 echo "$as_me:$LINENO: checking for long" >&5
41652 echo $ECHO_N "checking for long... $ECHO_C" >&6
41653 if test "${ac_cv_type_long+set}" = set; then
41654   echo $ECHO_N "(cached) $ECHO_C" >&6
41655 else
41656   cat >conftest.$ac_ext <<_ACEOF
41657 /* confdefs.h.  */
41658 _ACEOF
41659 cat confdefs.h >>conftest.$ac_ext
41660 cat >>conftest.$ac_ext <<_ACEOF
41661 /* end confdefs.h.  */
41662 $ac_includes_default
41663 int
41664 main ()
41665 {
41666 if ((long *) 0)
41667   return 0;
41668 if (sizeof (long))
41669   return 0;
41670   ;
41671   return 0;
41672 }
41673 _ACEOF
41674 rm -f conftest.$ac_objext
41675 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41676   (eval $ac_compile) 2>conftest.er1
41677   ac_status=$?
41678   grep -v '^ *+' conftest.er1 >conftest.err
41679   rm -f conftest.er1
41680   cat conftest.err >&5
41681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41682   (exit $ac_status); } &&
41683          { ac_try='test -z "$ac_c_werror_flag"
41684                          || test ! -s conftest.err'
41685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41686   (eval $ac_try) 2>&5
41687   ac_status=$?
41688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41689   (exit $ac_status); }; } &&
41690          { ac_try='test -s conftest.$ac_objext'
41691   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41692   (eval $ac_try) 2>&5
41693   ac_status=$?
41694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41695   (exit $ac_status); }; }; then
41696   ac_cv_type_long=yes
41697 else
41698   echo "$as_me: failed program was:" >&5
41699 sed 's/^/| /' conftest.$ac_ext >&5
41700
41701 ac_cv_type_long=no
41702 fi
41703 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41704 fi
41705 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
41706 echo "${ECHO_T}$ac_cv_type_long" >&6
41707
41708 echo "$as_me:$LINENO: checking size of long" >&5
41709 echo $ECHO_N "checking size of long... $ECHO_C" >&6
41710 if test "${ac_cv_sizeof_long+set}" = set; then
41711   echo $ECHO_N "(cached) $ECHO_C" >&6
41712 else
41713   if test "$ac_cv_type_long" = yes; then
41714   # The cast to unsigned long works around a bug in the HP C Compiler
41715   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41716   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41717   # This bug is HP SR number 8606223364.
41718   if test "$cross_compiling" = yes; then
41719   # Depending upon the size, compute the lo and hi bounds.
41720 cat >conftest.$ac_ext <<_ACEOF
41721 /* confdefs.h.  */
41722 _ACEOF
41723 cat confdefs.h >>conftest.$ac_ext
41724 cat >>conftest.$ac_ext <<_ACEOF
41725 /* end confdefs.h.  */
41726 $ac_includes_default
41727 int
41728 main ()
41729 {
41730 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
41731 test_array [0] = 0
41732
41733   ;
41734   return 0;
41735 }
41736 _ACEOF
41737 rm -f conftest.$ac_objext
41738 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41739   (eval $ac_compile) 2>conftest.er1
41740   ac_status=$?
41741   grep -v '^ *+' conftest.er1 >conftest.err
41742   rm -f conftest.er1
41743   cat conftest.err >&5
41744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41745   (exit $ac_status); } &&
41746          { ac_try='test -z "$ac_c_werror_flag"
41747                          || test ! -s conftest.err'
41748   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41749   (eval $ac_try) 2>&5
41750   ac_status=$?
41751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41752   (exit $ac_status); }; } &&
41753          { ac_try='test -s conftest.$ac_objext'
41754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41755   (eval $ac_try) 2>&5
41756   ac_status=$?
41757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41758   (exit $ac_status); }; }; then
41759   ac_lo=0 ac_mid=0
41760   while :; do
41761     cat >conftest.$ac_ext <<_ACEOF
41762 /* confdefs.h.  */
41763 _ACEOF
41764 cat confdefs.h >>conftest.$ac_ext
41765 cat >>conftest.$ac_ext <<_ACEOF
41766 /* end confdefs.h.  */
41767 $ac_includes_default
41768 int
41769 main ()
41770 {
41771 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
41772 test_array [0] = 0
41773
41774   ;
41775   return 0;
41776 }
41777 _ACEOF
41778 rm -f conftest.$ac_objext
41779 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41780   (eval $ac_compile) 2>conftest.er1
41781   ac_status=$?
41782   grep -v '^ *+' conftest.er1 >conftest.err
41783   rm -f conftest.er1
41784   cat conftest.err >&5
41785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41786   (exit $ac_status); } &&
41787          { ac_try='test -z "$ac_c_werror_flag"
41788                          || test ! -s conftest.err'
41789   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41790   (eval $ac_try) 2>&5
41791   ac_status=$?
41792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41793   (exit $ac_status); }; } &&
41794          { ac_try='test -s conftest.$ac_objext'
41795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41796   (eval $ac_try) 2>&5
41797   ac_status=$?
41798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41799   (exit $ac_status); }; }; then
41800   ac_hi=$ac_mid; break
41801 else
41802   echo "$as_me: failed program was:" >&5
41803 sed 's/^/| /' conftest.$ac_ext >&5
41804
41805 ac_lo=`expr $ac_mid + 1`
41806                     if test $ac_lo -le $ac_mid; then
41807                       ac_lo= ac_hi=
41808                       break
41809                     fi
41810                     ac_mid=`expr 2 '*' $ac_mid + 1`
41811 fi
41812 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41813   done
41814 else
41815   echo "$as_me: failed program was:" >&5
41816 sed 's/^/| /' conftest.$ac_ext >&5
41817
41818 cat >conftest.$ac_ext <<_ACEOF
41819 /* confdefs.h.  */
41820 _ACEOF
41821 cat confdefs.h >>conftest.$ac_ext
41822 cat >>conftest.$ac_ext <<_ACEOF
41823 /* end confdefs.h.  */
41824 $ac_includes_default
41825 int
41826 main ()
41827 {
41828 static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
41829 test_array [0] = 0
41830
41831   ;
41832   return 0;
41833 }
41834 _ACEOF
41835 rm -f conftest.$ac_objext
41836 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41837   (eval $ac_compile) 2>conftest.er1
41838   ac_status=$?
41839   grep -v '^ *+' conftest.er1 >conftest.err
41840   rm -f conftest.er1
41841   cat conftest.err >&5
41842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41843   (exit $ac_status); } &&
41844          { ac_try='test -z "$ac_c_werror_flag"
41845                          || test ! -s conftest.err'
41846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41847   (eval $ac_try) 2>&5
41848   ac_status=$?
41849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41850   (exit $ac_status); }; } &&
41851          { ac_try='test -s conftest.$ac_objext'
41852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41853   (eval $ac_try) 2>&5
41854   ac_status=$?
41855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41856   (exit $ac_status); }; }; then
41857   ac_hi=-1 ac_mid=-1
41858   while :; do
41859     cat >conftest.$ac_ext <<_ACEOF
41860 /* confdefs.h.  */
41861 _ACEOF
41862 cat confdefs.h >>conftest.$ac_ext
41863 cat >>conftest.$ac_ext <<_ACEOF
41864 /* end confdefs.h.  */
41865 $ac_includes_default
41866 int
41867 main ()
41868 {
41869 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
41870 test_array [0] = 0
41871
41872   ;
41873   return 0;
41874 }
41875 _ACEOF
41876 rm -f conftest.$ac_objext
41877 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41878   (eval $ac_compile) 2>conftest.er1
41879   ac_status=$?
41880   grep -v '^ *+' conftest.er1 >conftest.err
41881   rm -f conftest.er1
41882   cat conftest.err >&5
41883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41884   (exit $ac_status); } &&
41885          { ac_try='test -z "$ac_c_werror_flag"
41886                          || test ! -s conftest.err'
41887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41888   (eval $ac_try) 2>&5
41889   ac_status=$?
41890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41891   (exit $ac_status); }; } &&
41892          { ac_try='test -s conftest.$ac_objext'
41893   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41894   (eval $ac_try) 2>&5
41895   ac_status=$?
41896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41897   (exit $ac_status); }; }; then
41898   ac_lo=$ac_mid; break
41899 else
41900   echo "$as_me: failed program was:" >&5
41901 sed 's/^/| /' conftest.$ac_ext >&5
41902
41903 ac_hi=`expr '(' $ac_mid ')' - 1`
41904                        if test $ac_mid -le $ac_hi; then
41905                          ac_lo= ac_hi=
41906                          break
41907                        fi
41908                        ac_mid=`expr 2 '*' $ac_mid`
41909 fi
41910 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41911   done
41912 else
41913   echo "$as_me: failed program was:" >&5
41914 sed 's/^/| /' conftest.$ac_ext >&5
41915
41916 ac_lo= ac_hi=
41917 fi
41918 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41919 fi
41920 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41921 # Binary search between lo and hi bounds.
41922 while test "x$ac_lo" != "x$ac_hi"; do
41923   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
41924   cat >conftest.$ac_ext <<_ACEOF
41925 /* confdefs.h.  */
41926 _ACEOF
41927 cat confdefs.h >>conftest.$ac_ext
41928 cat >>conftest.$ac_ext <<_ACEOF
41929 /* end confdefs.h.  */
41930 $ac_includes_default
41931 int
41932 main ()
41933 {
41934 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
41935 test_array [0] = 0
41936
41937   ;
41938   return 0;
41939 }
41940 _ACEOF
41941 rm -f conftest.$ac_objext
41942 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41943   (eval $ac_compile) 2>conftest.er1
41944   ac_status=$?
41945   grep -v '^ *+' conftest.er1 >conftest.err
41946   rm -f conftest.er1
41947   cat conftest.err >&5
41948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41949   (exit $ac_status); } &&
41950          { ac_try='test -z "$ac_c_werror_flag"
41951                          || test ! -s conftest.err'
41952   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41953   (eval $ac_try) 2>&5
41954   ac_status=$?
41955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41956   (exit $ac_status); }; } &&
41957          { ac_try='test -s conftest.$ac_objext'
41958   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41959   (eval $ac_try) 2>&5
41960   ac_status=$?
41961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
41962   (exit $ac_status); }; }; then
41963   ac_hi=$ac_mid
41964 else
41965   echo "$as_me: failed program was:" >&5
41966 sed 's/^/| /' conftest.$ac_ext >&5
41967
41968 ac_lo=`expr '(' $ac_mid ')' + 1`
41969 fi
41970 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
41971 done
41972 case $ac_lo in
41973 ?*) ac_cv_sizeof_long=$ac_lo;;
41974 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
41975 See \`config.log' for more details." >&5
41976 echo "$as_me: error: cannot compute sizeof (long), 77
41977 See \`config.log' for more details." >&2;}
41978    { (exit 1); exit 1; }; } ;;
41979 esac
41980 else
41981   if test "$cross_compiling" = yes; then
41982   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
41983 See \`config.log' for more details." >&5
41984 echo "$as_me: error: cannot run test program while cross compiling
41985 See \`config.log' for more details." >&2;}
41986    { (exit 1); exit 1; }; }
41987 else
41988   cat >conftest.$ac_ext <<_ACEOF
41989 /* confdefs.h.  */
41990 _ACEOF
41991 cat confdefs.h >>conftest.$ac_ext
41992 cat >>conftest.$ac_ext <<_ACEOF
41993 /* end confdefs.h.  */
41994 $ac_includes_default
41995 long longval () { return (long) (sizeof (long)); }
41996 unsigned long ulongval () { return (long) (sizeof (long)); }
41997 #include <stdio.h>
41998 #include <stdlib.h>
41999 int
42000 main ()
42001 {
42002
42003   FILE *f = fopen ("conftest.val", "w");
42004   if (! f)
42005     exit (1);
42006   if (((long) (sizeof (long))) < 0)
42007     {
42008       long i = longval ();
42009       if (i != ((long) (sizeof (long))))
42010         exit (1);
42011       fprintf (f, "%ld\n", i);
42012     }
42013   else
42014     {
42015       unsigned long i = ulongval ();
42016       if (i != ((long) (sizeof (long))))
42017         exit (1);
42018       fprintf (f, "%lu\n", i);
42019     }
42020   exit (ferror (f) || fclose (f) != 0);
42021
42022   ;
42023   return 0;
42024 }
42025 _ACEOF
42026 rm -f conftest$ac_exeext
42027 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42028   (eval $ac_link) 2>&5
42029   ac_status=$?
42030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42031   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
42032   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42033   (eval $ac_try) 2>&5
42034   ac_status=$?
42035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42036   (exit $ac_status); }; }; then
42037   ac_cv_sizeof_long=`cat conftest.val`
42038 else
42039   echo "$as_me: program exited with status $ac_status" >&5
42040 echo "$as_me: failed program was:" >&5
42041 sed 's/^/| /' conftest.$ac_ext >&5
42042
42043 ( exit $ac_status )
42044 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
42045 See \`config.log' for more details." >&5
42046 echo "$as_me: error: cannot compute sizeof (long), 77
42047 See \`config.log' for more details." >&2;}
42048    { (exit 1); exit 1; }; }
42049 fi
42050 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
42051 fi
42052 fi
42053 rm -f conftest.val
42054 else
42055   ac_cv_sizeof_long=0
42056 fi
42057 fi
42058 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
42059 echo "${ECHO_T}$ac_cv_sizeof_long" >&6
42060 cat >>confdefs.h <<_ACEOF
42061 #define SIZEOF_LONG $ac_cv_sizeof_long
42062 _ACEOF
42063
42064
42065 echo "$as_me:$LINENO: checking for long long" >&5
42066 echo $ECHO_N "checking for long long... $ECHO_C" >&6
42067 if test "${ac_cv_type_long_long+set}" = set; then
42068   echo $ECHO_N "(cached) $ECHO_C" >&6
42069 else
42070   cat >conftest.$ac_ext <<_ACEOF
42071 /* confdefs.h.  */
42072 _ACEOF
42073 cat confdefs.h >>conftest.$ac_ext
42074 cat >>conftest.$ac_ext <<_ACEOF
42075 /* end confdefs.h.  */
42076 $ac_includes_default
42077 int
42078 main ()
42079 {
42080 if ((long long *) 0)
42081   return 0;
42082 if (sizeof (long long))
42083   return 0;
42084   ;
42085   return 0;
42086 }
42087 _ACEOF
42088 rm -f conftest.$ac_objext
42089 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42090   (eval $ac_compile) 2>conftest.er1
42091   ac_status=$?
42092   grep -v '^ *+' conftest.er1 >conftest.err
42093   rm -f conftest.er1
42094   cat conftest.err >&5
42095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42096   (exit $ac_status); } &&
42097          { ac_try='test -z "$ac_c_werror_flag"
42098                          || test ! -s conftest.err'
42099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42100   (eval $ac_try) 2>&5
42101   ac_status=$?
42102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42103   (exit $ac_status); }; } &&
42104          { ac_try='test -s conftest.$ac_objext'
42105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42106   (eval $ac_try) 2>&5
42107   ac_status=$?
42108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42109   (exit $ac_status); }; }; then
42110   ac_cv_type_long_long=yes
42111 else
42112   echo "$as_me: failed program was:" >&5
42113 sed 's/^/| /' conftest.$ac_ext >&5
42114
42115 ac_cv_type_long_long=no
42116 fi
42117 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42118 fi
42119 echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
42120 echo "${ECHO_T}$ac_cv_type_long_long" >&6
42121
42122 echo "$as_me:$LINENO: checking size of long long" >&5
42123 echo $ECHO_N "checking size of long long... $ECHO_C" >&6
42124 if test "${ac_cv_sizeof_long_long+set}" = set; then
42125   echo $ECHO_N "(cached) $ECHO_C" >&6
42126 else
42127   if test "$ac_cv_type_long_long" = yes; then
42128   # The cast to unsigned long works around a bug in the HP C Compiler
42129   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42130   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42131   # This bug is HP SR number 8606223364.
42132   if test "$cross_compiling" = yes; then
42133   # Depending upon the size, compute the lo and hi bounds.
42134 cat >conftest.$ac_ext <<_ACEOF
42135 /* confdefs.h.  */
42136 _ACEOF
42137 cat confdefs.h >>conftest.$ac_ext
42138 cat >>conftest.$ac_ext <<_ACEOF
42139 /* end confdefs.h.  */
42140 $ac_includes_default
42141 int
42142 main ()
42143 {
42144 static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
42145 test_array [0] = 0
42146
42147   ;
42148   return 0;
42149 }
42150 _ACEOF
42151 rm -f conftest.$ac_objext
42152 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42153   (eval $ac_compile) 2>conftest.er1
42154   ac_status=$?
42155   grep -v '^ *+' conftest.er1 >conftest.err
42156   rm -f conftest.er1
42157   cat conftest.err >&5
42158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42159   (exit $ac_status); } &&
42160          { ac_try='test -z "$ac_c_werror_flag"
42161                          || test ! -s conftest.err'
42162   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42163   (eval $ac_try) 2>&5
42164   ac_status=$?
42165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42166   (exit $ac_status); }; } &&
42167          { ac_try='test -s conftest.$ac_objext'
42168   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42169   (eval $ac_try) 2>&5
42170   ac_status=$?
42171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42172   (exit $ac_status); }; }; then
42173   ac_lo=0 ac_mid=0
42174   while :; do
42175     cat >conftest.$ac_ext <<_ACEOF
42176 /* confdefs.h.  */
42177 _ACEOF
42178 cat confdefs.h >>conftest.$ac_ext
42179 cat >>conftest.$ac_ext <<_ACEOF
42180 /* end confdefs.h.  */
42181 $ac_includes_default
42182 int
42183 main ()
42184 {
42185 static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
42186 test_array [0] = 0
42187
42188   ;
42189   return 0;
42190 }
42191 _ACEOF
42192 rm -f conftest.$ac_objext
42193 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42194   (eval $ac_compile) 2>conftest.er1
42195   ac_status=$?
42196   grep -v '^ *+' conftest.er1 >conftest.err
42197   rm -f conftest.er1
42198   cat conftest.err >&5
42199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42200   (exit $ac_status); } &&
42201          { ac_try='test -z "$ac_c_werror_flag"
42202                          || test ! -s conftest.err'
42203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42204   (eval $ac_try) 2>&5
42205   ac_status=$?
42206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42207   (exit $ac_status); }; } &&
42208          { ac_try='test -s conftest.$ac_objext'
42209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42210   (eval $ac_try) 2>&5
42211   ac_status=$?
42212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42213   (exit $ac_status); }; }; then
42214   ac_hi=$ac_mid; break
42215 else
42216   echo "$as_me: failed program was:" >&5
42217 sed 's/^/| /' conftest.$ac_ext >&5
42218
42219 ac_lo=`expr $ac_mid + 1`
42220                     if test $ac_lo -le $ac_mid; then
42221                       ac_lo= ac_hi=
42222                       break
42223                     fi
42224                     ac_mid=`expr 2 '*' $ac_mid + 1`
42225 fi
42226 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42227   done
42228 else
42229   echo "$as_me: failed program was:" >&5
42230 sed 's/^/| /' conftest.$ac_ext >&5
42231
42232 cat >conftest.$ac_ext <<_ACEOF
42233 /* confdefs.h.  */
42234 _ACEOF
42235 cat confdefs.h >>conftest.$ac_ext
42236 cat >>conftest.$ac_ext <<_ACEOF
42237 /* end confdefs.h.  */
42238 $ac_includes_default
42239 int
42240 main ()
42241 {
42242 static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
42243 test_array [0] = 0
42244
42245   ;
42246   return 0;
42247 }
42248 _ACEOF
42249 rm -f conftest.$ac_objext
42250 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42251   (eval $ac_compile) 2>conftest.er1
42252   ac_status=$?
42253   grep -v '^ *+' conftest.er1 >conftest.err
42254   rm -f conftest.er1
42255   cat conftest.err >&5
42256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42257   (exit $ac_status); } &&
42258          { ac_try='test -z "$ac_c_werror_flag"
42259                          || test ! -s conftest.err'
42260   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42261   (eval $ac_try) 2>&5
42262   ac_status=$?
42263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42264   (exit $ac_status); }; } &&
42265          { ac_try='test -s conftest.$ac_objext'
42266   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42267   (eval $ac_try) 2>&5
42268   ac_status=$?
42269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42270   (exit $ac_status); }; }; then
42271   ac_hi=-1 ac_mid=-1
42272   while :; do
42273     cat >conftest.$ac_ext <<_ACEOF
42274 /* confdefs.h.  */
42275 _ACEOF
42276 cat confdefs.h >>conftest.$ac_ext
42277 cat >>conftest.$ac_ext <<_ACEOF
42278 /* end confdefs.h.  */
42279 $ac_includes_default
42280 int
42281 main ()
42282 {
42283 static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
42284 test_array [0] = 0
42285
42286   ;
42287   return 0;
42288 }
42289 _ACEOF
42290 rm -f conftest.$ac_objext
42291 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42292   (eval $ac_compile) 2>conftest.er1
42293   ac_status=$?
42294   grep -v '^ *+' conftest.er1 >conftest.err
42295   rm -f conftest.er1
42296   cat conftest.err >&5
42297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42298   (exit $ac_status); } &&
42299          { ac_try='test -z "$ac_c_werror_flag"
42300                          || test ! -s conftest.err'
42301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42302   (eval $ac_try) 2>&5
42303   ac_status=$?
42304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42305   (exit $ac_status); }; } &&
42306          { ac_try='test -s conftest.$ac_objext'
42307   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42308   (eval $ac_try) 2>&5
42309   ac_status=$?
42310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42311   (exit $ac_status); }; }; then
42312   ac_lo=$ac_mid; break
42313 else
42314   echo "$as_me: failed program was:" >&5
42315 sed 's/^/| /' conftest.$ac_ext >&5
42316
42317 ac_hi=`expr '(' $ac_mid ')' - 1`
42318                        if test $ac_mid -le $ac_hi; then
42319                          ac_lo= ac_hi=
42320                          break
42321                        fi
42322                        ac_mid=`expr 2 '*' $ac_mid`
42323 fi
42324 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42325   done
42326 else
42327   echo "$as_me: failed program was:" >&5
42328 sed 's/^/| /' conftest.$ac_ext >&5
42329
42330 ac_lo= ac_hi=
42331 fi
42332 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42333 fi
42334 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42335 # Binary search between lo and hi bounds.
42336 while test "x$ac_lo" != "x$ac_hi"; do
42337   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
42338   cat >conftest.$ac_ext <<_ACEOF
42339 /* confdefs.h.  */
42340 _ACEOF
42341 cat confdefs.h >>conftest.$ac_ext
42342 cat >>conftest.$ac_ext <<_ACEOF
42343 /* end confdefs.h.  */
42344 $ac_includes_default
42345 int
42346 main ()
42347 {
42348 static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
42349 test_array [0] = 0
42350
42351   ;
42352   return 0;
42353 }
42354 _ACEOF
42355 rm -f conftest.$ac_objext
42356 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42357   (eval $ac_compile) 2>conftest.er1
42358   ac_status=$?
42359   grep -v '^ *+' conftest.er1 >conftest.err
42360   rm -f conftest.er1
42361   cat conftest.err >&5
42362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42363   (exit $ac_status); } &&
42364          { ac_try='test -z "$ac_c_werror_flag"
42365                          || test ! -s conftest.err'
42366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42367   (eval $ac_try) 2>&5
42368   ac_status=$?
42369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42370   (exit $ac_status); }; } &&
42371          { ac_try='test -s conftest.$ac_objext'
42372   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42373   (eval $ac_try) 2>&5
42374   ac_status=$?
42375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42376   (exit $ac_status); }; }; then
42377   ac_hi=$ac_mid
42378 else
42379   echo "$as_me: failed program was:" >&5
42380 sed 's/^/| /' conftest.$ac_ext >&5
42381
42382 ac_lo=`expr '(' $ac_mid ')' + 1`
42383 fi
42384 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42385 done
42386 case $ac_lo in
42387 ?*) ac_cv_sizeof_long_long=$ac_lo;;
42388 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
42389 See \`config.log' for more details." >&5
42390 echo "$as_me: error: cannot compute sizeof (long long), 77
42391 See \`config.log' for more details." >&2;}
42392    { (exit 1); exit 1; }; } ;;
42393 esac
42394 else
42395   if test "$cross_compiling" = yes; then
42396   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
42397 See \`config.log' for more details." >&5
42398 echo "$as_me: error: cannot run test program while cross compiling
42399 See \`config.log' for more details." >&2;}
42400    { (exit 1); exit 1; }; }
42401 else
42402   cat >conftest.$ac_ext <<_ACEOF
42403 /* confdefs.h.  */
42404 _ACEOF
42405 cat confdefs.h >>conftest.$ac_ext
42406 cat >>conftest.$ac_ext <<_ACEOF
42407 /* end confdefs.h.  */
42408 $ac_includes_default
42409 long longval () { return (long) (sizeof (long long)); }
42410 unsigned long ulongval () { return (long) (sizeof (long long)); }
42411 #include <stdio.h>
42412 #include <stdlib.h>
42413 int
42414 main ()
42415 {
42416
42417   FILE *f = fopen ("conftest.val", "w");
42418   if (! f)
42419     exit (1);
42420   if (((long) (sizeof (long long))) < 0)
42421     {
42422       long i = longval ();
42423       if (i != ((long) (sizeof (long long))))
42424         exit (1);
42425       fprintf (f, "%ld\n", i);
42426     }
42427   else
42428     {
42429       unsigned long i = ulongval ();
42430       if (i != ((long) (sizeof (long long))))
42431         exit (1);
42432       fprintf (f, "%lu\n", i);
42433     }
42434   exit (ferror (f) || fclose (f) != 0);
42435
42436   ;
42437   return 0;
42438 }
42439 _ACEOF
42440 rm -f conftest$ac_exeext
42441 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42442   (eval $ac_link) 2>&5
42443   ac_status=$?
42444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42445   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
42446   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42447   (eval $ac_try) 2>&5
42448   ac_status=$?
42449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42450   (exit $ac_status); }; }; then
42451   ac_cv_sizeof_long_long=`cat conftest.val`
42452 else
42453   echo "$as_me: program exited with status $ac_status" >&5
42454 echo "$as_me: failed program was:" >&5
42455 sed 's/^/| /' conftest.$ac_ext >&5
42456
42457 ( exit $ac_status )
42458 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
42459 See \`config.log' for more details." >&5
42460 echo "$as_me: error: cannot compute sizeof (long long), 77
42461 See \`config.log' for more details." >&2;}
42462    { (exit 1); exit 1; }; }
42463 fi
42464 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
42465 fi
42466 fi
42467 rm -f conftest.val
42468 else
42469   ac_cv_sizeof_long_long=0
42470 fi
42471 fi
42472 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
42473 echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
42474 cat >>confdefs.h <<_ACEOF
42475 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
42476 _ACEOF
42477
42478
42479 echo "$as_me:$LINENO: checking for wchar_t" >&5
42480 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
42481 if test "${ac_cv_type_wchar_t+set}" = set; then
42482   echo $ECHO_N "(cached) $ECHO_C" >&6
42483 else
42484   cat >conftest.$ac_ext <<_ACEOF
42485 /* confdefs.h.  */
42486 _ACEOF
42487 cat confdefs.h >>conftest.$ac_ext
42488 cat >>conftest.$ac_ext <<_ACEOF
42489 /* end confdefs.h.  */
42490 $ac_includes_default
42491 int
42492 main ()
42493 {
42494 if ((wchar_t *) 0)
42495   return 0;
42496 if (sizeof (wchar_t))
42497   return 0;
42498   ;
42499   return 0;
42500 }
42501 _ACEOF
42502 rm -f conftest.$ac_objext
42503 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42504   (eval $ac_compile) 2>conftest.er1
42505   ac_status=$?
42506   grep -v '^ *+' conftest.er1 >conftest.err
42507   rm -f conftest.er1
42508   cat conftest.err >&5
42509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42510   (exit $ac_status); } &&
42511          { ac_try='test -z "$ac_c_werror_flag"
42512                          || test ! -s conftest.err'
42513   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42514   (eval $ac_try) 2>&5
42515   ac_status=$?
42516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42517   (exit $ac_status); }; } &&
42518          { ac_try='test -s conftest.$ac_objext'
42519   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42520   (eval $ac_try) 2>&5
42521   ac_status=$?
42522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42523   (exit $ac_status); }; }; then
42524   ac_cv_type_wchar_t=yes
42525 else
42526   echo "$as_me: failed program was:" >&5
42527 sed 's/^/| /' conftest.$ac_ext >&5
42528
42529 ac_cv_type_wchar_t=no
42530 fi
42531 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42532 fi
42533 echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
42534 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
42535
42536 echo "$as_me:$LINENO: checking size of wchar_t" >&5
42537 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
42538 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
42539   echo $ECHO_N "(cached) $ECHO_C" >&6
42540 else
42541   if test "$ac_cv_type_wchar_t" = yes; then
42542   # The cast to unsigned long works around a bug in the HP C Compiler
42543   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42544   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42545   # This bug is HP SR number 8606223364.
42546   if test "$cross_compiling" = yes; then
42547   # Depending upon the size, compute the lo and hi bounds.
42548 cat >conftest.$ac_ext <<_ACEOF
42549 /* confdefs.h.  */
42550 _ACEOF
42551 cat confdefs.h >>conftest.$ac_ext
42552 cat >>conftest.$ac_ext <<_ACEOF
42553 /* end confdefs.h.  */
42554 $ac_includes_default
42555 int
42556 main ()
42557 {
42558 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
42559 test_array [0] = 0
42560
42561   ;
42562   return 0;
42563 }
42564 _ACEOF
42565 rm -f conftest.$ac_objext
42566 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42567   (eval $ac_compile) 2>conftest.er1
42568   ac_status=$?
42569   grep -v '^ *+' conftest.er1 >conftest.err
42570   rm -f conftest.er1
42571   cat conftest.err >&5
42572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42573   (exit $ac_status); } &&
42574          { ac_try='test -z "$ac_c_werror_flag"
42575                          || test ! -s conftest.err'
42576   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42577   (eval $ac_try) 2>&5
42578   ac_status=$?
42579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42580   (exit $ac_status); }; } &&
42581          { ac_try='test -s conftest.$ac_objext'
42582   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42583   (eval $ac_try) 2>&5
42584   ac_status=$?
42585   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42586   (exit $ac_status); }; }; then
42587   ac_lo=0 ac_mid=0
42588   while :; do
42589     cat >conftest.$ac_ext <<_ACEOF
42590 /* confdefs.h.  */
42591 _ACEOF
42592 cat confdefs.h >>conftest.$ac_ext
42593 cat >>conftest.$ac_ext <<_ACEOF
42594 /* end confdefs.h.  */
42595 $ac_includes_default
42596 int
42597 main ()
42598 {
42599 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
42600 test_array [0] = 0
42601
42602   ;
42603   return 0;
42604 }
42605 _ACEOF
42606 rm -f conftest.$ac_objext
42607 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42608   (eval $ac_compile) 2>conftest.er1
42609   ac_status=$?
42610   grep -v '^ *+' conftest.er1 >conftest.err
42611   rm -f conftest.er1
42612   cat conftest.err >&5
42613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42614   (exit $ac_status); } &&
42615          { ac_try='test -z "$ac_c_werror_flag"
42616                          || test ! -s conftest.err'
42617   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42618   (eval $ac_try) 2>&5
42619   ac_status=$?
42620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42621   (exit $ac_status); }; } &&
42622          { ac_try='test -s conftest.$ac_objext'
42623   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42624   (eval $ac_try) 2>&5
42625   ac_status=$?
42626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42627   (exit $ac_status); }; }; then
42628   ac_hi=$ac_mid; break
42629 else
42630   echo "$as_me: failed program was:" >&5
42631 sed 's/^/| /' conftest.$ac_ext >&5
42632
42633 ac_lo=`expr $ac_mid + 1`
42634                     if test $ac_lo -le $ac_mid; then
42635                       ac_lo= ac_hi=
42636                       break
42637                     fi
42638                     ac_mid=`expr 2 '*' $ac_mid + 1`
42639 fi
42640 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42641   done
42642 else
42643   echo "$as_me: failed program was:" >&5
42644 sed 's/^/| /' conftest.$ac_ext >&5
42645
42646 cat >conftest.$ac_ext <<_ACEOF
42647 /* confdefs.h.  */
42648 _ACEOF
42649 cat confdefs.h >>conftest.$ac_ext
42650 cat >>conftest.$ac_ext <<_ACEOF
42651 /* end confdefs.h.  */
42652 $ac_includes_default
42653 int
42654 main ()
42655 {
42656 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
42657 test_array [0] = 0
42658
42659   ;
42660   return 0;
42661 }
42662 _ACEOF
42663 rm -f conftest.$ac_objext
42664 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42665   (eval $ac_compile) 2>conftest.er1
42666   ac_status=$?
42667   grep -v '^ *+' conftest.er1 >conftest.err
42668   rm -f conftest.er1
42669   cat conftest.err >&5
42670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42671   (exit $ac_status); } &&
42672          { ac_try='test -z "$ac_c_werror_flag"
42673                          || test ! -s conftest.err'
42674   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42675   (eval $ac_try) 2>&5
42676   ac_status=$?
42677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42678   (exit $ac_status); }; } &&
42679          { ac_try='test -s conftest.$ac_objext'
42680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42681   (eval $ac_try) 2>&5
42682   ac_status=$?
42683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42684   (exit $ac_status); }; }; then
42685   ac_hi=-1 ac_mid=-1
42686   while :; do
42687     cat >conftest.$ac_ext <<_ACEOF
42688 /* confdefs.h.  */
42689 _ACEOF
42690 cat confdefs.h >>conftest.$ac_ext
42691 cat >>conftest.$ac_ext <<_ACEOF
42692 /* end confdefs.h.  */
42693 $ac_includes_default
42694 int
42695 main ()
42696 {
42697 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
42698 test_array [0] = 0
42699
42700   ;
42701   return 0;
42702 }
42703 _ACEOF
42704 rm -f conftest.$ac_objext
42705 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42706   (eval $ac_compile) 2>conftest.er1
42707   ac_status=$?
42708   grep -v '^ *+' conftest.er1 >conftest.err
42709   rm -f conftest.er1
42710   cat conftest.err >&5
42711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42712   (exit $ac_status); } &&
42713          { ac_try='test -z "$ac_c_werror_flag"
42714                          || test ! -s conftest.err'
42715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42716   (eval $ac_try) 2>&5
42717   ac_status=$?
42718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42719   (exit $ac_status); }; } &&
42720          { ac_try='test -s conftest.$ac_objext'
42721   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42722   (eval $ac_try) 2>&5
42723   ac_status=$?
42724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42725   (exit $ac_status); }; }; then
42726   ac_lo=$ac_mid; break
42727 else
42728   echo "$as_me: failed program was:" >&5
42729 sed 's/^/| /' conftest.$ac_ext >&5
42730
42731 ac_hi=`expr '(' $ac_mid ')' - 1`
42732                        if test $ac_mid -le $ac_hi; then
42733                          ac_lo= ac_hi=
42734                          break
42735                        fi
42736                        ac_mid=`expr 2 '*' $ac_mid`
42737 fi
42738 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42739   done
42740 else
42741   echo "$as_me: failed program was:" >&5
42742 sed 's/^/| /' conftest.$ac_ext >&5
42743
42744 ac_lo= ac_hi=
42745 fi
42746 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42747 fi
42748 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42749 # Binary search between lo and hi bounds.
42750 while test "x$ac_lo" != "x$ac_hi"; do
42751   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
42752   cat >conftest.$ac_ext <<_ACEOF
42753 /* confdefs.h.  */
42754 _ACEOF
42755 cat confdefs.h >>conftest.$ac_ext
42756 cat >>conftest.$ac_ext <<_ACEOF
42757 /* end confdefs.h.  */
42758 $ac_includes_default
42759 int
42760 main ()
42761 {
42762 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
42763 test_array [0] = 0
42764
42765   ;
42766   return 0;
42767 }
42768 _ACEOF
42769 rm -f conftest.$ac_objext
42770 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42771   (eval $ac_compile) 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_objext'
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_hi=$ac_mid
42792 else
42793   echo "$as_me: failed program was:" >&5
42794 sed 's/^/| /' conftest.$ac_ext >&5
42795
42796 ac_lo=`expr '(' $ac_mid ')' + 1`
42797 fi
42798 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42799 done
42800 case $ac_lo in
42801 ?*) ac_cv_sizeof_wchar_t=$ac_lo;;
42802 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
42803 See \`config.log' for more details." >&5
42804 echo "$as_me: error: cannot compute sizeof (wchar_t), 77
42805 See \`config.log' for more details." >&2;}
42806    { (exit 1); exit 1; }; } ;;
42807 esac
42808 else
42809   if test "$cross_compiling" = yes; then
42810   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
42811 See \`config.log' for more details." >&5
42812 echo "$as_me: error: cannot run test program while cross compiling
42813 See \`config.log' for more details." >&2;}
42814    { (exit 1); exit 1; }; }
42815 else
42816   cat >conftest.$ac_ext <<_ACEOF
42817 /* confdefs.h.  */
42818 _ACEOF
42819 cat confdefs.h >>conftest.$ac_ext
42820 cat >>conftest.$ac_ext <<_ACEOF
42821 /* end confdefs.h.  */
42822 $ac_includes_default
42823 long longval () { return (long) (sizeof (wchar_t)); }
42824 unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
42825 #include <stdio.h>
42826 #include <stdlib.h>
42827 int
42828 main ()
42829 {
42830
42831   FILE *f = fopen ("conftest.val", "w");
42832   if (! f)
42833     exit (1);
42834   if (((long) (sizeof (wchar_t))) < 0)
42835     {
42836       long i = longval ();
42837       if (i != ((long) (sizeof (wchar_t))))
42838         exit (1);
42839       fprintf (f, "%ld\n", i);
42840     }
42841   else
42842     {
42843       unsigned long i = ulongval ();
42844       if (i != ((long) (sizeof (wchar_t))))
42845         exit (1);
42846       fprintf (f, "%lu\n", i);
42847     }
42848   exit (ferror (f) || fclose (f) != 0);
42849
42850   ;
42851   return 0;
42852 }
42853 _ACEOF
42854 rm -f conftest$ac_exeext
42855 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42856   (eval $ac_link) 2>&5
42857   ac_status=$?
42858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42859   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
42860   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42861   (eval $ac_try) 2>&5
42862   ac_status=$?
42863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42864   (exit $ac_status); }; }; then
42865   ac_cv_sizeof_wchar_t=`cat conftest.val`
42866 else
42867   echo "$as_me: program exited with status $ac_status" >&5
42868 echo "$as_me: failed program was:" >&5
42869 sed 's/^/| /' conftest.$ac_ext >&5
42870
42871 ( exit $ac_status )
42872 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
42873 See \`config.log' for more details." >&5
42874 echo "$as_me: error: cannot compute sizeof (wchar_t), 77
42875 See \`config.log' for more details." >&2;}
42876    { (exit 1); exit 1; }; }
42877 fi
42878 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
42879 fi
42880 fi
42881 rm -f conftest.val
42882 else
42883   ac_cv_sizeof_wchar_t=0
42884 fi
42885 fi
42886 echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
42887 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
42888 cat >>confdefs.h <<_ACEOF
42889 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
42890 _ACEOF
42891
42892
42893
42894 if test "$ac_cv_sizeof_int" -lt 4 ; then
42895         { echo "$as_me:$LINENO: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&5
42896 echo "$as_me: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&2;}
42897
42898
42899 cat >>confdefs.h <<\_ACEOF
42900 #define LBER_INT_T long
42901 _ACEOF
42902
42903 else
42904
42905 cat >>confdefs.h <<\_ACEOF
42906 #define LBER_INT_T int
42907 _ACEOF
42908
42909 fi
42910
42911
42912 cat >>confdefs.h <<\_ACEOF
42913 #define LBER_LEN_T long
42914 _ACEOF
42915
42916
42917 cat >>confdefs.h <<\_ACEOF
42918 #define LBER_SOCKET_T int
42919 _ACEOF
42920
42921
42922 cat >>confdefs.h <<\_ACEOF
42923 #define LBER_TAG_T long
42924 _ACEOF
42925
42926
42927 if test $ol_with_mp = longlong || test $ol_with_mp = auto ; then
42928         if test $ac_cv_sizeof_long_long -gt 4 ; then
42929                 ol_with_mp=longlong
42930
42931 cat >>confdefs.h <<\_ACEOF
42932 #define USE_MP_LONG_LONG 1
42933 _ACEOF
42934
42935         elif test $ol_with_mp = longlong ; then
42936                 { { echo "$as_me:$LINENO: error: long long unusable for multiple precision" >&5
42937 echo "$as_me: error: long long unusable for multiple precision" >&2;}
42938    { (exit 1); exit 1; }; }
42939         fi
42940 fi
42941 if test $ol_with_mp = long || test $ol_with_mp = auto ; then
42942         if test $ac_cv_sizeof_long -gt 4 ; then
42943                 ol_with_mp=long
42944
42945 cat >>confdefs.h <<\_ACEOF
42946 #define USE_MP_LONG 1
42947 _ACEOF
42948
42949         elif test $ol_with_mp = long ; then
42950                 { { echo "$as_me:$LINENO: error: long unusable for multiple precision" >&5
42951 echo "$as_me: error: long unusable for multiple precision" >&2;}
42952    { (exit 1); exit 1; }; }
42953         fi
42954 fi
42955 if test $ol_with_mp = bignum || test $ol_with_mp = auto ; then
42956
42957 for ac_header in openssl/bn.h
42958 do
42959 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
42960 if eval "test \"\${$as_ac_Header+set}\" = set"; then
42961   echo "$as_me:$LINENO: checking for $ac_header" >&5
42962 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
42963 if eval "test \"\${$as_ac_Header+set}\" = set"; then
42964   echo $ECHO_N "(cached) $ECHO_C" >&6
42965 fi
42966 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
42967 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
42968 else
42969   # Is the header compilable?
42970 echo "$as_me:$LINENO: checking $ac_header usability" >&5
42971 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
42972 cat >conftest.$ac_ext <<_ACEOF
42973 /* confdefs.h.  */
42974 _ACEOF
42975 cat confdefs.h >>conftest.$ac_ext
42976 cat >>conftest.$ac_ext <<_ACEOF
42977 /* end confdefs.h.  */
42978 $ac_includes_default
42979 #include <$ac_header>
42980 _ACEOF
42981 rm -f conftest.$ac_objext
42982 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42983   (eval $ac_compile) 2>conftest.er1
42984   ac_status=$?
42985   grep -v '^ *+' conftest.er1 >conftest.err
42986   rm -f conftest.er1
42987   cat conftest.err >&5
42988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42989   (exit $ac_status); } &&
42990          { ac_try='test -z "$ac_c_werror_flag"
42991                          || test ! -s conftest.err'
42992   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42993   (eval $ac_try) 2>&5
42994   ac_status=$?
42995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42996   (exit $ac_status); }; } &&
42997          { ac_try='test -s conftest.$ac_objext'
42998   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42999   (eval $ac_try) 2>&5
43000   ac_status=$?
43001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43002   (exit $ac_status); }; }; then
43003   ac_header_compiler=yes
43004 else
43005   echo "$as_me: failed program was:" >&5
43006 sed 's/^/| /' conftest.$ac_ext >&5
43007
43008 ac_header_compiler=no
43009 fi
43010 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
43011 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
43012 echo "${ECHO_T}$ac_header_compiler" >&6
43013
43014 # Is the header present?
43015 echo "$as_me:$LINENO: checking $ac_header presence" >&5
43016 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
43017 cat >conftest.$ac_ext <<_ACEOF
43018 /* confdefs.h.  */
43019 _ACEOF
43020 cat confdefs.h >>conftest.$ac_ext
43021 cat >>conftest.$ac_ext <<_ACEOF
43022 /* end confdefs.h.  */
43023 #include <$ac_header>
43024 _ACEOF
43025 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
43026   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
43027   ac_status=$?
43028   grep -v '^ *+' conftest.er1 >conftest.err
43029   rm -f conftest.er1
43030   cat conftest.err >&5
43031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43032   (exit $ac_status); } >/dev/null; then
43033   if test -s conftest.err; then
43034     ac_cpp_err=$ac_c_preproc_warn_flag
43035     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
43036   else
43037     ac_cpp_err=
43038   fi
43039 else
43040   ac_cpp_err=yes
43041 fi
43042 if test -z "$ac_cpp_err"; then
43043   ac_header_preproc=yes
43044 else
43045   echo "$as_me: failed program was:" >&5
43046 sed 's/^/| /' conftest.$ac_ext >&5
43047
43048   ac_header_preproc=no
43049 fi
43050 rm -f conftest.err conftest.$ac_ext
43051 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
43052 echo "${ECHO_T}$ac_header_preproc" >&6
43053
43054 # So?  What about this header?
43055 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
43056   yes:no: )
43057     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
43058 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
43059     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
43060 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
43061     ac_header_preproc=yes
43062     ;;
43063   no:yes:* )
43064     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
43065 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
43066     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
43067 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
43068     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
43069 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
43070     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
43071 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
43072     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
43073 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
43074     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
43075 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
43076     (
43077       cat <<\_ASBOX
43078 ## --------------------------------------------- ##
43079 ## Report this to <http://www.openldap.org/its/> ##
43080 ## --------------------------------------------- ##
43081 _ASBOX
43082     ) |
43083       sed "s/^/$as_me: WARNING:     /" >&2
43084     ;;
43085 esac
43086 echo "$as_me:$LINENO: checking for $ac_header" >&5
43087 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
43088 if eval "test \"\${$as_ac_Header+set}\" = set"; then
43089   echo $ECHO_N "(cached) $ECHO_C" >&6
43090 else
43091   eval "$as_ac_Header=\$ac_header_preproc"
43092 fi
43093 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
43094 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
43095
43096 fi
43097 if test `eval echo '${'$as_ac_Header'}'` = yes; then
43098   cat >>confdefs.h <<_ACEOF
43099 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
43100 _ACEOF
43101
43102 fi
43103
43104 done
43105
43106
43107 for ac_header in openssl/crypto.h
43108 do
43109 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
43110 if eval "test \"\${$as_ac_Header+set}\" = set"; then
43111   echo "$as_me:$LINENO: checking for $ac_header" >&5
43112 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
43113 if eval "test \"\${$as_ac_Header+set}\" = set"; then
43114   echo $ECHO_N "(cached) $ECHO_C" >&6
43115 fi
43116 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
43117 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
43118 else
43119   # Is the header compilable?
43120 echo "$as_me:$LINENO: checking $ac_header usability" >&5
43121 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
43122 cat >conftest.$ac_ext <<_ACEOF
43123 /* confdefs.h.  */
43124 _ACEOF
43125 cat confdefs.h >>conftest.$ac_ext
43126 cat >>conftest.$ac_ext <<_ACEOF
43127 /* end confdefs.h.  */
43128 $ac_includes_default
43129 #include <$ac_header>
43130 _ACEOF
43131 rm -f conftest.$ac_objext
43132 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
43133   (eval $ac_compile) 2>conftest.er1
43134   ac_status=$?
43135   grep -v '^ *+' conftest.er1 >conftest.err
43136   rm -f conftest.er1
43137   cat conftest.err >&5
43138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43139   (exit $ac_status); } &&
43140          { ac_try='test -z "$ac_c_werror_flag"
43141                          || test ! -s conftest.err'
43142   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43143   (eval $ac_try) 2>&5
43144   ac_status=$?
43145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43146   (exit $ac_status); }; } &&
43147          { ac_try='test -s conftest.$ac_objext'
43148   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43149   (eval $ac_try) 2>&5
43150   ac_status=$?
43151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43152   (exit $ac_status); }; }; then
43153   ac_header_compiler=yes
43154 else
43155   echo "$as_me: failed program was:" >&5
43156 sed 's/^/| /' conftest.$ac_ext >&5
43157
43158 ac_header_compiler=no
43159 fi
43160 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
43161 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
43162 echo "${ECHO_T}$ac_header_compiler" >&6
43163
43164 # Is the header present?
43165 echo "$as_me:$LINENO: checking $ac_header presence" >&5
43166 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
43167 cat >conftest.$ac_ext <<_ACEOF
43168 /* confdefs.h.  */
43169 _ACEOF
43170 cat confdefs.h >>conftest.$ac_ext
43171 cat >>conftest.$ac_ext <<_ACEOF
43172 /* end confdefs.h.  */
43173 #include <$ac_header>
43174 _ACEOF
43175 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
43176   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
43177   ac_status=$?
43178   grep -v '^ *+' conftest.er1 >conftest.err
43179   rm -f conftest.er1
43180   cat conftest.err >&5
43181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43182   (exit $ac_status); } >/dev/null; then
43183   if test -s conftest.err; then
43184     ac_cpp_err=$ac_c_preproc_warn_flag
43185     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
43186   else
43187     ac_cpp_err=
43188   fi
43189 else
43190   ac_cpp_err=yes
43191 fi
43192 if test -z "$ac_cpp_err"; then
43193   ac_header_preproc=yes
43194 else
43195   echo "$as_me: failed program was:" >&5
43196 sed 's/^/| /' conftest.$ac_ext >&5
43197
43198   ac_header_preproc=no
43199 fi
43200 rm -f conftest.err conftest.$ac_ext
43201 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
43202 echo "${ECHO_T}$ac_header_preproc" >&6
43203
43204 # So?  What about this header?
43205 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
43206   yes:no: )
43207     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
43208 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
43209     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
43210 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
43211     ac_header_preproc=yes
43212     ;;
43213   no:yes:* )
43214     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
43215 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
43216     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
43217 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
43218     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
43219 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
43220     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
43221 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
43222     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
43223 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
43224     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
43225 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
43226     (
43227       cat <<\_ASBOX
43228 ## --------------------------------------------- ##
43229 ## Report this to <http://www.openldap.org/its/> ##
43230 ## --------------------------------------------- ##
43231 _ASBOX
43232     ) |
43233       sed "s/^/$as_me: WARNING:     /" >&2
43234     ;;
43235 esac
43236 echo "$as_me:$LINENO: checking for $ac_header" >&5
43237 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
43238 if eval "test \"\${$as_ac_Header+set}\" = set"; then
43239   echo $ECHO_N "(cached) $ECHO_C" >&6
43240 else
43241   eval "$as_ac_Header=\$ac_header_preproc"
43242 fi
43243 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
43244 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
43245
43246 fi
43247 if test `eval echo '${'$as_ac_Header'}'` = yes; then
43248   cat >>confdefs.h <<_ACEOF
43249 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
43250 _ACEOF
43251
43252 fi
43253
43254 done
43255
43256         if test "$ac_cv_header_openssl_bn_h" = "yes" &&
43257                 test "$ac_cv_header_openssl_crypto_h" = "yes" &&
43258                 test "$ol_with_tls" = "found" ; then
43259                 ol_with_mp=bignum
43260
43261 cat >>confdefs.h <<\_ACEOF
43262 #define USE_MP_BIGNUM 1
43263 _ACEOF
43264
43265         elif test $ol_with_mp = bignum ; then
43266                 { { echo "$as_me:$LINENO: error: bignum not available" >&5
43267 echo "$as_me: error: bignum not available" >&2;}
43268    { (exit 1); exit 1; }; }
43269         fi
43270 fi
43271 if test $ol_with_mp = gmp || test $ol_with_mp = auto ; then
43272
43273 for ac_header in gmp.h
43274 do
43275 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
43276 if eval "test \"\${$as_ac_Header+set}\" = set"; then
43277   echo "$as_me:$LINENO: checking for $ac_header" >&5
43278 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
43279 if eval "test \"\${$as_ac_Header+set}\" = set"; then
43280   echo $ECHO_N "(cached) $ECHO_C" >&6
43281 fi
43282 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
43283 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
43284 else
43285   # Is the header compilable?
43286 echo "$as_me:$LINENO: checking $ac_header usability" >&5
43287 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
43288 cat >conftest.$ac_ext <<_ACEOF
43289 /* confdefs.h.  */
43290 _ACEOF
43291 cat confdefs.h >>conftest.$ac_ext
43292 cat >>conftest.$ac_ext <<_ACEOF
43293 /* end confdefs.h.  */
43294 $ac_includes_default
43295 #include <$ac_header>
43296 _ACEOF
43297 rm -f conftest.$ac_objext
43298 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
43299   (eval $ac_compile) 2>conftest.er1
43300   ac_status=$?
43301   grep -v '^ *+' conftest.er1 >conftest.err
43302   rm -f conftest.er1
43303   cat conftest.err >&5
43304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43305   (exit $ac_status); } &&
43306          { ac_try='test -z "$ac_c_werror_flag"
43307                          || test ! -s conftest.err'
43308   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43309   (eval $ac_try) 2>&5
43310   ac_status=$?
43311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43312   (exit $ac_status); }; } &&
43313          { ac_try='test -s conftest.$ac_objext'
43314   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43315   (eval $ac_try) 2>&5
43316   ac_status=$?
43317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43318   (exit $ac_status); }; }; then
43319   ac_header_compiler=yes
43320 else
43321   echo "$as_me: failed program was:" >&5
43322 sed 's/^/| /' conftest.$ac_ext >&5
43323
43324 ac_header_compiler=no
43325 fi
43326 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
43327 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
43328 echo "${ECHO_T}$ac_header_compiler" >&6
43329
43330 # Is the header present?
43331 echo "$as_me:$LINENO: checking $ac_header presence" >&5
43332 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
43333 cat >conftest.$ac_ext <<_ACEOF
43334 /* confdefs.h.  */
43335 _ACEOF
43336 cat confdefs.h >>conftest.$ac_ext
43337 cat >>conftest.$ac_ext <<_ACEOF
43338 /* end confdefs.h.  */
43339 #include <$ac_header>
43340 _ACEOF
43341 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
43342   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
43343   ac_status=$?
43344   grep -v '^ *+' conftest.er1 >conftest.err
43345   rm -f conftest.er1
43346   cat conftest.err >&5
43347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43348   (exit $ac_status); } >/dev/null; then
43349   if test -s conftest.err; then
43350     ac_cpp_err=$ac_c_preproc_warn_flag
43351     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
43352   else
43353     ac_cpp_err=
43354   fi
43355 else
43356   ac_cpp_err=yes
43357 fi
43358 if test -z "$ac_cpp_err"; then
43359   ac_header_preproc=yes
43360 else
43361   echo "$as_me: failed program was:" >&5
43362 sed 's/^/| /' conftest.$ac_ext >&5
43363
43364   ac_header_preproc=no
43365 fi
43366 rm -f conftest.err conftest.$ac_ext
43367 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
43368 echo "${ECHO_T}$ac_header_preproc" >&6
43369
43370 # So?  What about this header?
43371 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
43372   yes:no: )
43373     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
43374 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
43375     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
43376 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
43377     ac_header_preproc=yes
43378     ;;
43379   no:yes:* )
43380     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
43381 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
43382     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
43383 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
43384     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
43385 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
43386     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
43387 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
43388     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
43389 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
43390     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
43391 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
43392     (
43393       cat <<\_ASBOX
43394 ## --------------------------------------------- ##
43395 ## Report this to <http://www.openldap.org/its/> ##
43396 ## --------------------------------------------- ##
43397 _ASBOX
43398     ) |
43399       sed "s/^/$as_me: WARNING:     /" >&2
43400     ;;
43401 esac
43402 echo "$as_me:$LINENO: checking for $ac_header" >&5
43403 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
43404 if eval "test \"\${$as_ac_Header+set}\" = set"; then
43405   echo $ECHO_N "(cached) $ECHO_C" >&6
43406 else
43407   eval "$as_ac_Header=\$ac_header_preproc"
43408 fi
43409 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
43410 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
43411
43412 fi
43413 if test `eval echo '${'$as_ac_Header'}'` = yes; then
43414   cat >>confdefs.h <<_ACEOF
43415 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
43416 _ACEOF
43417
43418 fi
43419
43420 done
43421
43422
43423 echo "$as_me:$LINENO: checking for __gmpz_add_ui in -lgmp" >&5
43424 echo $ECHO_N "checking for __gmpz_add_ui in -lgmp... $ECHO_C" >&6
43425 if test "${ac_cv_lib_gmp___gmpz_add_ui+set}" = set; then
43426   echo $ECHO_N "(cached) $ECHO_C" >&6
43427 else
43428   ac_check_lib_save_LIBS=$LIBS
43429 LIBS="-lgmp  $LIBS"
43430 cat >conftest.$ac_ext <<_ACEOF
43431 /* confdefs.h.  */
43432 _ACEOF
43433 cat confdefs.h >>conftest.$ac_ext
43434 cat >>conftest.$ac_ext <<_ACEOF
43435 /* end confdefs.h.  */
43436
43437 /* Override any gcc2 internal prototype to avoid an error.  */
43438 #ifdef __cplusplus
43439 extern "C"
43440 #endif
43441 /* We use char because int might match the return type of a gcc2
43442    builtin and then its argument prototype would still apply.  */
43443 char __gmpz_add_ui ();
43444 int
43445 main ()
43446 {
43447 __gmpz_add_ui ();
43448   ;
43449   return 0;
43450 }
43451 _ACEOF
43452 rm -f conftest.$ac_objext conftest$ac_exeext
43453 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43454   (eval $ac_link) 2>conftest.er1
43455   ac_status=$?
43456   grep -v '^ *+' conftest.er1 >conftest.err
43457   rm -f conftest.er1
43458   cat conftest.err >&5
43459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43460   (exit $ac_status); } &&
43461          { ac_try='test -z "$ac_c_werror_flag"
43462                          || test ! -s conftest.err'
43463   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43464   (eval $ac_try) 2>&5
43465   ac_status=$?
43466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43467   (exit $ac_status); }; } &&
43468          { ac_try='test -s conftest$ac_exeext'
43469   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43470   (eval $ac_try) 2>&5
43471   ac_status=$?
43472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43473   (exit $ac_status); }; }; then
43474   ac_cv_lib_gmp___gmpz_add_ui=yes
43475 else
43476   echo "$as_me: failed program was:" >&5
43477 sed 's/^/| /' conftest.$ac_ext >&5
43478
43479 ac_cv_lib_gmp___gmpz_add_ui=no
43480 fi
43481 rm -f conftest.err conftest.$ac_objext \
43482       conftest$ac_exeext conftest.$ac_ext
43483 LIBS=$ac_check_lib_save_LIBS
43484 fi
43485 echo "$as_me:$LINENO: result: $ac_cv_lib_gmp___gmpz_add_ui" >&5
43486 echo "${ECHO_T}$ac_cv_lib_gmp___gmpz_add_ui" >&6
43487 if test $ac_cv_lib_gmp___gmpz_add_ui = yes; then
43488   cat >>confdefs.h <<_ACEOF
43489 #define HAVE_LIBGMP 1
43490 _ACEOF
43491
43492   LIBS="-lgmp $LIBS"
43493
43494 fi
43495
43496         if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp___gmpz_add_ui = yes ; then
43497
43498 cat >>confdefs.h <<\_ACEOF
43499 #define USE_MP_GMP 1
43500 _ACEOF
43501
43502                 ol_with_mp=gmp
43503         elif test $ol_with_mp = gmp ; then
43504                 { { echo "$as_me:$LINENO: error: gmp not available" >&5
43505 echo "$as_me: error: gmp not available" >&2;}
43506    { (exit 1); exit 1; }; }
43507         fi
43508 fi
43509 if test $ol_with_mp = auto ; then
43510         ol_with_mp=no
43511 fi
43512
43513 echo "$as_me:$LINENO: checking for working memcmp" >&5
43514 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
43515 if test "${ac_cv_func_memcmp_working+set}" = set; then
43516   echo $ECHO_N "(cached) $ECHO_C" >&6
43517 else
43518   if test "$cross_compiling" = yes; then
43519   ac_cv_func_memcmp_working=no
43520 else
43521   cat >conftest.$ac_ext <<_ACEOF
43522 /* confdefs.h.  */
43523 _ACEOF
43524 cat confdefs.h >>conftest.$ac_ext
43525 cat >>conftest.$ac_ext <<_ACEOF
43526 /* end confdefs.h.  */
43527 $ac_includes_default
43528 int
43529 main ()
43530 {
43531
43532   /* Some versions of memcmp are not 8-bit clean.  */
43533   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
43534   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
43535     exit (1);
43536
43537   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
43538      or more and with at least one buffer not starting on a 4-byte boundary.
43539      William Lewis provided this test program.   */
43540   {
43541     char foo[21];
43542     char bar[21];
43543     int i;
43544     for (i = 0; i < 4; i++)
43545       {
43546         char *a = foo + i;
43547         char *b = bar + i;
43548         strcpy (a, "--------01111111");
43549         strcpy (b, "--------10000000");
43550         if (memcmp (a, b, 16) >= 0)
43551           exit (1);
43552       }
43553     exit (0);
43554   }
43555
43556   ;
43557   return 0;
43558 }
43559 _ACEOF
43560 rm -f conftest$ac_exeext
43561 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43562   (eval $ac_link) 2>&5
43563   ac_status=$?
43564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43565   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
43566   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43567   (eval $ac_try) 2>&5
43568   ac_status=$?
43569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43570   (exit $ac_status); }; }; then
43571   ac_cv_func_memcmp_working=yes
43572 else
43573   echo "$as_me: program exited with status $ac_status" >&5
43574 echo "$as_me: failed program was:" >&5
43575 sed 's/^/| /' conftest.$ac_ext >&5
43576
43577 ( exit $ac_status )
43578 ac_cv_func_memcmp_working=no
43579 fi
43580 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
43581 fi
43582 fi
43583 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
43584 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
43585 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
43586     "memcmp.$ac_objext"   | \
43587   *" memcmp.$ac_objext"   | \
43588     "memcmp.$ac_objext "* | \
43589   *" memcmp.$ac_objext "* ) ;;
43590   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
43591 esac
43592
43593
43594
43595 if test $ac_cv_func_memcmp_working = no ; then
43596
43597 cat >>confdefs.h <<\_ACEOF
43598 #define NEED_MEMCMP_REPLACEMENT 1
43599 _ACEOF
43600
43601 fi
43602
43603
43604 for ac_func in strftime
43605 do
43606 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
43607 echo "$as_me:$LINENO: checking for $ac_func" >&5
43608 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
43609 if eval "test \"\${$as_ac_var+set}\" = set"; then
43610   echo $ECHO_N "(cached) $ECHO_C" >&6
43611 else
43612   cat >conftest.$ac_ext <<_ACEOF
43613 /* confdefs.h.  */
43614 _ACEOF
43615 cat confdefs.h >>conftest.$ac_ext
43616 cat >>conftest.$ac_ext <<_ACEOF
43617 /* end confdefs.h.  */
43618 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
43619    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43620 #define $ac_func innocuous_$ac_func
43621
43622 /* System header to define __stub macros and hopefully few prototypes,
43623     which can conflict with char $ac_func (); below.
43624     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43625     <limits.h> exists even on freestanding compilers.  */
43626
43627 #ifdef __STDC__
43628 # include <limits.h>
43629 #else
43630 # include <assert.h>
43631 #endif
43632
43633 #undef $ac_func
43634
43635 /* Override any gcc2 internal prototype to avoid an error.  */
43636 #ifdef __cplusplus
43637 extern "C"
43638 {
43639 #endif
43640 /* We use char because int might match the return type of a gcc2
43641    builtin and then its argument prototype would still apply.  */
43642 char $ac_func ();
43643 /* The GNU C library defines this for functions which it implements
43644     to always fail with ENOSYS.  Some functions are actually named
43645     something starting with __ and the normal name is an alias.  */
43646 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
43647 choke me
43648 #else
43649 char (*f) () = $ac_func;
43650 #endif
43651 #ifdef __cplusplus
43652 }
43653 #endif
43654
43655 int
43656 main ()
43657 {
43658 return f != $ac_func;
43659   ;
43660   return 0;
43661 }
43662 _ACEOF
43663 rm -f conftest.$ac_objext conftest$ac_exeext
43664 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43665   (eval $ac_link) 2>conftest.er1
43666   ac_status=$?
43667   grep -v '^ *+' conftest.er1 >conftest.err
43668   rm -f conftest.er1
43669   cat conftest.err >&5
43670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43671   (exit $ac_status); } &&
43672          { ac_try='test -z "$ac_c_werror_flag"
43673                          || test ! -s conftest.err'
43674   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43675   (eval $ac_try) 2>&5
43676   ac_status=$?
43677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43678   (exit $ac_status); }; } &&
43679          { ac_try='test -s conftest$ac_exeext'
43680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43681   (eval $ac_try) 2>&5
43682   ac_status=$?
43683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43684   (exit $ac_status); }; }; then
43685   eval "$as_ac_var=yes"
43686 else
43687   echo "$as_me: failed program was:" >&5
43688 sed 's/^/| /' conftest.$ac_ext >&5
43689
43690 eval "$as_ac_var=no"
43691 fi
43692 rm -f conftest.err conftest.$ac_objext \
43693       conftest$ac_exeext conftest.$ac_ext
43694 fi
43695 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
43696 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
43697 if test `eval echo '${'$as_ac_var'}'` = yes; then
43698   cat >>confdefs.h <<_ACEOF
43699 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
43700 _ACEOF
43701
43702 else
43703   # strftime is in -lintl on SCO UNIX.
43704 echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
43705 echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
43706 if test "${ac_cv_lib_intl_strftime+set}" = set; then
43707   echo $ECHO_N "(cached) $ECHO_C" >&6
43708 else
43709   ac_check_lib_save_LIBS=$LIBS
43710 LIBS="-lintl  $LIBS"
43711 cat >conftest.$ac_ext <<_ACEOF
43712 /* confdefs.h.  */
43713 _ACEOF
43714 cat confdefs.h >>conftest.$ac_ext
43715 cat >>conftest.$ac_ext <<_ACEOF
43716 /* end confdefs.h.  */
43717
43718 /* Override any gcc2 internal prototype to avoid an error.  */
43719 #ifdef __cplusplus
43720 extern "C"
43721 #endif
43722 /* We use char because int might match the return type of a gcc2
43723    builtin and then its argument prototype would still apply.  */
43724 char strftime ();
43725 int
43726 main ()
43727 {
43728 strftime ();
43729   ;
43730   return 0;
43731 }
43732 _ACEOF
43733 rm -f conftest.$ac_objext conftest$ac_exeext
43734 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43735   (eval $ac_link) 2>conftest.er1
43736   ac_status=$?
43737   grep -v '^ *+' conftest.er1 >conftest.err
43738   rm -f conftest.er1
43739   cat conftest.err >&5
43740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43741   (exit $ac_status); } &&
43742          { ac_try='test -z "$ac_c_werror_flag"
43743                          || test ! -s conftest.err'
43744   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43745   (eval $ac_try) 2>&5
43746   ac_status=$?
43747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43748   (exit $ac_status); }; } &&
43749          { ac_try='test -s conftest$ac_exeext'
43750   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43751   (eval $ac_try) 2>&5
43752   ac_status=$?
43753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43754   (exit $ac_status); }; }; then
43755   ac_cv_lib_intl_strftime=yes
43756 else
43757   echo "$as_me: failed program was:" >&5
43758 sed 's/^/| /' conftest.$ac_ext >&5
43759
43760 ac_cv_lib_intl_strftime=no
43761 fi
43762 rm -f conftest.err conftest.$ac_objext \
43763       conftest$ac_exeext conftest.$ac_ext
43764 LIBS=$ac_check_lib_save_LIBS
43765 fi
43766 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
43767 echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
43768 if test $ac_cv_lib_intl_strftime = yes; then
43769   cat >>confdefs.h <<\_ACEOF
43770 #define HAVE_STRFTIME 1
43771 _ACEOF
43772
43773 LIBS="-lintl $LIBS"
43774 fi
43775
43776 fi
43777 done
43778
43779
43780 echo "$as_me:$LINENO: checking for inet_aton()" >&5
43781 echo $ECHO_N "checking for inet_aton()... $ECHO_C" >&6
43782 if test "${ol_cv_func_inet_aton+set}" = set; then
43783   echo $ECHO_N "(cached) $ECHO_C" >&6
43784 else
43785   cat >conftest.$ac_ext <<_ACEOF
43786 /* confdefs.h.  */
43787 _ACEOF
43788 cat confdefs.h >>conftest.$ac_ext
43789 cat >>conftest.$ac_ext <<_ACEOF
43790 /* end confdefs.h.  */
43791
43792 #ifdef HAVE_SYS_TYPES_H
43793 #       include <sys/types.h>
43794 #endif
43795 #ifdef HAVE_SYS_SOCKET_H
43796 #       include <sys/socket.h>
43797 #       ifdef HAVE_SYS_SELECT_H
43798 #               include <sys/select.h>
43799 #       endif
43800 #       include <netinet/in.h>
43801 #       ifdef HAVE_ARPA_INET_H
43802 #               include <arpa/inet.h>
43803 #       endif
43804 #endif
43805
43806 int
43807 main ()
43808 {
43809 struct in_addr in;
43810 int rc = inet_aton( "255.255.255.255", &in );
43811   ;
43812   return 0;
43813 }
43814 _ACEOF
43815 rm -f conftest.$ac_objext conftest$ac_exeext
43816 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43817   (eval $ac_link) 2>conftest.er1
43818   ac_status=$?
43819   grep -v '^ *+' conftest.er1 >conftest.err
43820   rm -f conftest.er1
43821   cat conftest.err >&5
43822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43823   (exit $ac_status); } &&
43824          { ac_try='test -z "$ac_c_werror_flag"
43825                          || test ! -s conftest.err'
43826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43827   (eval $ac_try) 2>&5
43828   ac_status=$?
43829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43830   (exit $ac_status); }; } &&
43831          { ac_try='test -s conftest$ac_exeext'
43832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43833   (eval $ac_try) 2>&5
43834   ac_status=$?
43835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43836   (exit $ac_status); }; }; then
43837   ol_cv_func_inet_aton=yes
43838 else
43839   echo "$as_me: failed program was:" >&5
43840 sed 's/^/| /' conftest.$ac_ext >&5
43841
43842 ol_cv_func_inet_aton=no
43843 fi
43844 rm -f conftest.err conftest.$ac_objext \
43845       conftest$ac_exeext conftest.$ac_ext
43846 fi
43847 echo "$as_me:$LINENO: result: $ol_cv_func_inet_aton" >&5
43848 echo "${ECHO_T}$ol_cv_func_inet_aton" >&6
43849   if test $ol_cv_func_inet_aton != no; then
43850
43851 cat >>confdefs.h <<\_ACEOF
43852 #define HAVE_INET_ATON 1
43853 _ACEOF
43854
43855   fi
43856
43857
43858 echo "$as_me:$LINENO: checking for _spawnlp" >&5
43859 echo $ECHO_N "checking for _spawnlp... $ECHO_C" >&6
43860 if test "${ac_cv_func__spawnlp+set}" = set; then
43861   echo $ECHO_N "(cached) $ECHO_C" >&6
43862 else
43863   cat >conftest.$ac_ext <<_ACEOF
43864 /* confdefs.h.  */
43865 _ACEOF
43866 cat confdefs.h >>conftest.$ac_ext
43867 cat >>conftest.$ac_ext <<_ACEOF
43868 /* end confdefs.h.  */
43869 /* Define _spawnlp to an innocuous variant, in case <limits.h> declares _spawnlp.
43870    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43871 #define _spawnlp innocuous__spawnlp
43872
43873 /* System header to define __stub macros and hopefully few prototypes,
43874     which can conflict with char _spawnlp (); below.
43875     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43876     <limits.h> exists even on freestanding compilers.  */
43877
43878 #ifdef __STDC__
43879 # include <limits.h>
43880 #else
43881 # include <assert.h>
43882 #endif
43883
43884 #undef _spawnlp
43885
43886 /* Override any gcc2 internal prototype to avoid an error.  */
43887 #ifdef __cplusplus
43888 extern "C"
43889 {
43890 #endif
43891 /* We use char because int might match the return type of a gcc2
43892    builtin and then its argument prototype would still apply.  */
43893 char _spawnlp ();
43894 /* The GNU C library defines this for functions which it implements
43895     to always fail with ENOSYS.  Some functions are actually named
43896     something starting with __ and the normal name is an alias.  */
43897 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
43898 choke me
43899 #else
43900 char (*f) () = _spawnlp;
43901 #endif
43902 #ifdef __cplusplus
43903 }
43904 #endif
43905
43906 int
43907 main ()
43908 {
43909 return f != _spawnlp;
43910   ;
43911   return 0;
43912 }
43913 _ACEOF
43914 rm -f conftest.$ac_objext conftest$ac_exeext
43915 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43916   (eval $ac_link) 2>conftest.er1
43917   ac_status=$?
43918   grep -v '^ *+' conftest.er1 >conftest.err
43919   rm -f conftest.er1
43920   cat conftest.err >&5
43921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43922   (exit $ac_status); } &&
43923          { ac_try='test -z "$ac_c_werror_flag"
43924                          || test ! -s conftest.err'
43925   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43926   (eval $ac_try) 2>&5
43927   ac_status=$?
43928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43929   (exit $ac_status); }; } &&
43930          { ac_try='test -s conftest$ac_exeext'
43931   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43932   (eval $ac_try) 2>&5
43933   ac_status=$?
43934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43935   (exit $ac_status); }; }; then
43936   ac_cv_func__spawnlp=yes
43937 else
43938   echo "$as_me: failed program was:" >&5
43939 sed 's/^/| /' conftest.$ac_ext >&5
43940
43941 ac_cv_func__spawnlp=no
43942 fi
43943 rm -f conftest.err conftest.$ac_objext \
43944       conftest$ac_exeext conftest.$ac_ext
43945 fi
43946 echo "$as_me:$LINENO: result: $ac_cv_func__spawnlp" >&5
43947 echo "${ECHO_T}$ac_cv_func__spawnlp" >&6
43948 if test $ac_cv_func__spawnlp = yes; then
43949
43950 cat >>confdefs.h <<\_ACEOF
43951 #define HAVE_SPAWNLP 1
43952 _ACEOF
43953
43954 fi
43955
43956
43957 echo "$as_me:$LINENO: checking for _snprintf" >&5
43958 echo $ECHO_N "checking for _snprintf... $ECHO_C" >&6
43959 if test "${ac_cv_func__snprintf+set}" = set; then
43960   echo $ECHO_N "(cached) $ECHO_C" >&6
43961 else
43962   cat >conftest.$ac_ext <<_ACEOF
43963 /* confdefs.h.  */
43964 _ACEOF
43965 cat confdefs.h >>conftest.$ac_ext
43966 cat >>conftest.$ac_ext <<_ACEOF
43967 /* end confdefs.h.  */
43968 /* Define _snprintf to an innocuous variant, in case <limits.h> declares _snprintf.
43969    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43970 #define _snprintf innocuous__snprintf
43971
43972 /* System header to define __stub macros and hopefully few prototypes,
43973     which can conflict with char _snprintf (); below.
43974     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43975     <limits.h> exists even on freestanding compilers.  */
43976
43977 #ifdef __STDC__
43978 # include <limits.h>
43979 #else
43980 # include <assert.h>
43981 #endif
43982
43983 #undef _snprintf
43984
43985 /* Override any gcc2 internal prototype to avoid an error.  */
43986 #ifdef __cplusplus
43987 extern "C"
43988 {
43989 #endif
43990 /* We use char because int might match the return type of a gcc2
43991    builtin and then its argument prototype would still apply.  */
43992 char _snprintf ();
43993 /* The GNU C library defines this for functions which it implements
43994     to always fail with ENOSYS.  Some functions are actually named
43995     something starting with __ and the normal name is an alias.  */
43996 #if defined (__stub__snprintf) || defined (__stub____snprintf)
43997 choke me
43998 #else
43999 char (*f) () = _snprintf;
44000 #endif
44001 #ifdef __cplusplus
44002 }
44003 #endif
44004
44005 int
44006 main ()
44007 {
44008 return f != _snprintf;
44009   ;
44010   return 0;
44011 }
44012 _ACEOF
44013 rm -f conftest.$ac_objext conftest$ac_exeext
44014 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
44015   (eval $ac_link) 2>conftest.er1
44016   ac_status=$?
44017   grep -v '^ *+' conftest.er1 >conftest.err
44018   rm -f conftest.er1
44019   cat conftest.err >&5
44020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44021   (exit $ac_status); } &&
44022          { ac_try='test -z "$ac_c_werror_flag"
44023                          || test ! -s conftest.err'
44024   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44025   (eval $ac_try) 2>&5
44026   ac_status=$?
44027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44028   (exit $ac_status); }; } &&
44029          { ac_try='test -s conftest$ac_exeext'
44030   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44031   (eval $ac_try) 2>&5
44032   ac_status=$?
44033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44034   (exit $ac_status); }; }; then
44035   ac_cv_func__snprintf=yes
44036 else
44037   echo "$as_me: failed program was:" >&5
44038 sed 's/^/| /' conftest.$ac_ext >&5
44039
44040 ac_cv_func__snprintf=no
44041 fi
44042 rm -f conftest.err conftest.$ac_objext \
44043       conftest$ac_exeext conftest.$ac_ext
44044 fi
44045 echo "$as_me:$LINENO: result: $ac_cv_func__snprintf" >&5
44046 echo "${ECHO_T}$ac_cv_func__snprintf" >&6
44047 if test $ac_cv_func__snprintf = yes; then
44048   ac_cv_func_snprintf=yes
44049
44050 cat >>confdefs.h <<\_ACEOF
44051 #define snprintf _snprintf
44052 _ACEOF
44053
44054
44055 fi
44056
44057
44058 echo "$as_me:$LINENO: checking for _vsnprintf" >&5
44059 echo $ECHO_N "checking for _vsnprintf... $ECHO_C" >&6
44060 if test "${ac_cv_func__vsnprintf+set}" = set; then
44061   echo $ECHO_N "(cached) $ECHO_C" >&6
44062 else
44063   cat >conftest.$ac_ext <<_ACEOF
44064 /* confdefs.h.  */
44065 _ACEOF
44066 cat confdefs.h >>conftest.$ac_ext
44067 cat >>conftest.$ac_ext <<_ACEOF
44068 /* end confdefs.h.  */
44069 /* Define _vsnprintf to an innocuous variant, in case <limits.h> declares _vsnprintf.
44070    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
44071 #define _vsnprintf innocuous__vsnprintf
44072
44073 /* System header to define __stub macros and hopefully few prototypes,
44074     which can conflict with char _vsnprintf (); below.
44075     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
44076     <limits.h> exists even on freestanding compilers.  */
44077
44078 #ifdef __STDC__
44079 # include <limits.h>
44080 #else
44081 # include <assert.h>
44082 #endif
44083
44084 #undef _vsnprintf
44085
44086 /* Override any gcc2 internal prototype to avoid an error.  */
44087 #ifdef __cplusplus
44088 extern "C"
44089 {
44090 #endif
44091 /* We use char because int might match the return type of a gcc2
44092    builtin and then its argument prototype would still apply.  */
44093 char _vsnprintf ();
44094 /* The GNU C library defines this for functions which it implements
44095     to always fail with ENOSYS.  Some functions are actually named
44096     something starting with __ and the normal name is an alias.  */
44097 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
44098 choke me
44099 #else
44100 char (*f) () = _vsnprintf;
44101 #endif
44102 #ifdef __cplusplus
44103 }
44104 #endif
44105
44106 int
44107 main ()
44108 {
44109 return f != _vsnprintf;
44110   ;
44111   return 0;
44112 }
44113 _ACEOF
44114 rm -f conftest.$ac_objext conftest$ac_exeext
44115 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
44116   (eval $ac_link) 2>conftest.er1
44117   ac_status=$?
44118   grep -v '^ *+' conftest.er1 >conftest.err
44119   rm -f conftest.er1
44120   cat conftest.err >&5
44121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44122   (exit $ac_status); } &&
44123          { ac_try='test -z "$ac_c_werror_flag"
44124                          || test ! -s conftest.err'
44125   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44126   (eval $ac_try) 2>&5
44127   ac_status=$?
44128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44129   (exit $ac_status); }; } &&
44130          { ac_try='test -s conftest$ac_exeext'
44131   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44132   (eval $ac_try) 2>&5
44133   ac_status=$?
44134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44135   (exit $ac_status); }; }; then
44136   ac_cv_func__vsnprintf=yes
44137 else
44138   echo "$as_me: failed program was:" >&5
44139 sed 's/^/| /' conftest.$ac_ext >&5
44140
44141 ac_cv_func__vsnprintf=no
44142 fi
44143 rm -f conftest.err conftest.$ac_objext \
44144       conftest$ac_exeext conftest.$ac_ext
44145 fi
44146 echo "$as_me:$LINENO: result: $ac_cv_func__vsnprintf" >&5
44147 echo "${ECHO_T}$ac_cv_func__vsnprintf" >&6
44148 if test $ac_cv_func__vsnprintf = yes; then
44149   ac_cv_func_vsnprintf=yes
44150
44151 cat >>confdefs.h <<\_ACEOF
44152 #define vsnprintf _vsnprintf
44153 _ACEOF
44154
44155
44156 fi
44157
44158
44159
44160 for ac_func in vprintf
44161 do
44162 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
44163 echo "$as_me:$LINENO: checking for $ac_func" >&5
44164 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
44165 if eval "test \"\${$as_ac_var+set}\" = set"; then
44166   echo $ECHO_N "(cached) $ECHO_C" >&6
44167 else
44168   cat >conftest.$ac_ext <<_ACEOF
44169 /* confdefs.h.  */
44170 _ACEOF
44171 cat confdefs.h >>conftest.$ac_ext
44172 cat >>conftest.$ac_ext <<_ACEOF
44173 /* end confdefs.h.  */
44174 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
44175    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
44176 #define $ac_func innocuous_$ac_func
44177
44178 /* System header to define __stub macros and hopefully few prototypes,
44179     which can conflict with char $ac_func (); below.
44180     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
44181     <limits.h> exists even on freestanding compilers.  */
44182
44183 #ifdef __STDC__
44184 # include <limits.h>
44185 #else
44186 # include <assert.h>
44187 #endif
44188
44189 #undef $ac_func
44190
44191 /* Override any gcc2 internal prototype to avoid an error.  */
44192 #ifdef __cplusplus
44193 extern "C"
44194 {
44195 #endif
44196 /* We use char because int might match the return type of a gcc2
44197    builtin and then its argument prototype would still apply.  */
44198 char $ac_func ();
44199 /* The GNU C library defines this for functions which it implements
44200     to always fail with ENOSYS.  Some functions are actually named
44201     something starting with __ and the normal name is an alias.  */
44202 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
44203 choke me
44204 #else
44205 char (*f) () = $ac_func;
44206 #endif
44207 #ifdef __cplusplus
44208 }
44209 #endif
44210
44211 int
44212 main ()
44213 {
44214 return f != $ac_func;
44215   ;
44216   return 0;
44217 }
44218 _ACEOF
44219 rm -f conftest.$ac_objext conftest$ac_exeext
44220 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
44221   (eval $ac_link) 2>conftest.er1
44222   ac_status=$?
44223   grep -v '^ *+' conftest.er1 >conftest.err
44224   rm -f conftest.er1
44225   cat conftest.err >&5
44226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44227   (exit $ac_status); } &&
44228          { ac_try='test -z "$ac_c_werror_flag"
44229                          || test ! -s conftest.err'
44230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44231   (eval $ac_try) 2>&5
44232   ac_status=$?
44233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44234   (exit $ac_status); }; } &&
44235          { ac_try='test -s conftest$ac_exeext'
44236   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44237   (eval $ac_try) 2>&5
44238   ac_status=$?
44239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44240   (exit $ac_status); }; }; then
44241   eval "$as_ac_var=yes"
44242 else
44243   echo "$as_me: failed program was:" >&5
44244 sed 's/^/| /' conftest.$ac_ext >&5
44245
44246 eval "$as_ac_var=no"
44247 fi
44248 rm -f conftest.err conftest.$ac_objext \
44249       conftest$ac_exeext conftest.$ac_ext
44250 fi
44251 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
44252 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
44253 if test `eval echo '${'$as_ac_var'}'` = yes; then
44254   cat >>confdefs.h <<_ACEOF
44255 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
44256 _ACEOF
44257
44258 echo "$as_me:$LINENO: checking for _doprnt" >&5
44259 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
44260 if test "${ac_cv_func__doprnt+set}" = set; then
44261   echo $ECHO_N "(cached) $ECHO_C" >&6
44262 else
44263   cat >conftest.$ac_ext <<_ACEOF
44264 /* confdefs.h.  */
44265 _ACEOF
44266 cat confdefs.h >>conftest.$ac_ext
44267 cat >>conftest.$ac_ext <<_ACEOF
44268 /* end confdefs.h.  */
44269 /* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
44270    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
44271 #define _doprnt innocuous__doprnt
44272
44273 /* System header to define __stub macros and hopefully few prototypes,
44274     which can conflict with char _doprnt (); below.
44275     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
44276     <limits.h> exists even on freestanding compilers.  */
44277
44278 #ifdef __STDC__
44279 # include <limits.h>
44280 #else
44281 # include <assert.h>
44282 #endif
44283
44284 #undef _doprnt
44285
44286 /* Override any gcc2 internal prototype to avoid an error.  */
44287 #ifdef __cplusplus
44288 extern "C"
44289 {
44290 #endif
44291 /* We use char because int might match the return type of a gcc2
44292    builtin and then its argument prototype would still apply.  */
44293 char _doprnt ();
44294 /* The GNU C library defines this for functions which it implements
44295     to always fail with ENOSYS.  Some functions are actually named
44296     something starting with __ and the normal name is an alias.  */
44297 #if defined (__stub__doprnt) || defined (__stub____doprnt)
44298 choke me
44299 #else
44300 char (*f) () = _doprnt;
44301 #endif
44302 #ifdef __cplusplus
44303 }
44304 #endif
44305
44306 int
44307 main ()
44308 {
44309 return f != _doprnt;
44310   ;
44311   return 0;
44312 }
44313 _ACEOF
44314 rm -f conftest.$ac_objext conftest$ac_exeext
44315 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
44316   (eval $ac_link) 2>conftest.er1
44317   ac_status=$?
44318   grep -v '^ *+' conftest.er1 >conftest.err
44319   rm -f conftest.er1
44320   cat conftest.err >&5
44321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44322   (exit $ac_status); } &&
44323          { ac_try='test -z "$ac_c_werror_flag"
44324                          || test ! -s conftest.err'
44325   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44326   (eval $ac_try) 2>&5
44327   ac_status=$?
44328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44329   (exit $ac_status); }; } &&
44330          { ac_try='test -s conftest$ac_exeext'
44331   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44332   (eval $ac_try) 2>&5
44333   ac_status=$?
44334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44335   (exit $ac_status); }; }; then
44336   ac_cv_func__doprnt=yes
44337 else
44338   echo "$as_me: failed program was:" >&5
44339 sed 's/^/| /' conftest.$ac_ext >&5
44340
44341 ac_cv_func__doprnt=no
44342 fi
44343 rm -f conftest.err conftest.$ac_objext \
44344       conftest$ac_exeext conftest.$ac_ext
44345 fi
44346 echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
44347 echo "${ECHO_T}$ac_cv_func__doprnt" >&6
44348 if test $ac_cv_func__doprnt = yes; then
44349
44350 cat >>confdefs.h <<\_ACEOF
44351 #define HAVE_DOPRNT 1
44352 _ACEOF
44353
44354 fi
44355
44356 fi
44357 done
44358
44359
44360
44361 if test $ac_cv_func_vprintf = yes ; then
44362
44363
44364 for ac_func in snprintf vsnprintf
44365 do
44366 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
44367 echo "$as_me:$LINENO: checking for $ac_func" >&5
44368 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
44369 if eval "test \"\${$as_ac_var+set}\" = set"; then
44370   echo $ECHO_N "(cached) $ECHO_C" >&6
44371 else
44372   cat >conftest.$ac_ext <<_ACEOF
44373 /* confdefs.h.  */
44374 _ACEOF
44375 cat confdefs.h >>conftest.$ac_ext
44376 cat >>conftest.$ac_ext <<_ACEOF
44377 /* end confdefs.h.  */
44378 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
44379    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
44380 #define $ac_func innocuous_$ac_func
44381
44382 /* System header to define __stub macros and hopefully few prototypes,
44383     which can conflict with char $ac_func (); below.
44384     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
44385     <limits.h> exists even on freestanding compilers.  */
44386
44387 #ifdef __STDC__
44388 # include <limits.h>
44389 #else
44390 # include <assert.h>
44391 #endif
44392
44393 #undef $ac_func
44394
44395 /* Override any gcc2 internal prototype to avoid an error.  */
44396 #ifdef __cplusplus
44397 extern "C"
44398 {
44399 #endif
44400 /* We use char because int might match the return type of a gcc2
44401    builtin and then its argument prototype would still apply.  */
44402 char $ac_func ();
44403 /* The GNU C library defines this for functions which it implements
44404     to always fail with ENOSYS.  Some functions are actually named
44405     something starting with __ and the normal name is an alias.  */
44406 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
44407 choke me
44408 #else
44409 char (*f) () = $ac_func;
44410 #endif
44411 #ifdef __cplusplus
44412 }
44413 #endif
44414
44415 int
44416 main ()
44417 {
44418 return f != $ac_func;
44419   ;
44420   return 0;
44421 }
44422 _ACEOF
44423 rm -f conftest.$ac_objext conftest$ac_exeext
44424 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
44425   (eval $ac_link) 2>conftest.er1
44426   ac_status=$?
44427   grep -v '^ *+' conftest.er1 >conftest.err
44428   rm -f conftest.er1
44429   cat conftest.err >&5
44430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44431   (exit $ac_status); } &&
44432          { ac_try='test -z "$ac_c_werror_flag"
44433                          || test ! -s conftest.err'
44434   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44435   (eval $ac_try) 2>&5
44436   ac_status=$?
44437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44438   (exit $ac_status); }; } &&
44439          { ac_try='test -s conftest$ac_exeext'
44440   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44441   (eval $ac_try) 2>&5
44442   ac_status=$?
44443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44444   (exit $ac_status); }; }; then
44445   eval "$as_ac_var=yes"
44446 else
44447   echo "$as_me: failed program was:" >&5
44448 sed 's/^/| /' conftest.$ac_ext >&5
44449
44450 eval "$as_ac_var=no"
44451 fi
44452 rm -f conftest.err conftest.$ac_objext \
44453       conftest$ac_exeext conftest.$ac_ext
44454 fi
44455 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
44456 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
44457 if test `eval echo '${'$as_ac_var'}'` = yes; then
44458   cat >>confdefs.h <<_ACEOF
44459 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
44460 _ACEOF
44461
44462 fi
44463 done
44464
44465 fi
44466
44467
44468
44469
44470
44471
44472
44473
44474
44475
44476
44477
44478
44479
44480
44481
44482
44483
44484
44485
44486
44487
44488
44489
44490
44491
44492
44493
44494
44495
44496
44497
44498
44499
44500
44501
44502
44503
44504
44505
44506
44507
44508
44509
44510
44511
44512
44513
44514
44515
44516
44517
44518
44519
44520
44521 for ac_func in \
44522         bcopy                   \
44523         closesocket             \
44524         chroot                  \
44525         endgrent                \
44526         endpwent                \
44527         fcntl                   \
44528         flock                   \
44529         fstat                   \
44530         getdtablesize   \
44531         getgrgid                \
44532         gethostname             \
44533         getpass                 \
44534         getpassphrase   \
44535         getpwuid                \
44536         getpwnam                \
44537         getspnam                \
44538         gettimeofday    \
44539         initgroups              \
44540         inet_ntoa_b             \
44541         lockf                   \
44542         memcpy                  \
44543         memmove                 \
44544         memrchr                 \
44545         mkstemp                 \
44546         mktemp                  \
44547         pipe                    \
44548         read                    \
44549         recv                    \
44550         recvfrom                \
44551         setpwfile               \
44552         setgid                  \
44553         setegid                 \
44554         setsid                  \
44555         setuid                  \
44556         seteuid                 \
44557         signal                  \
44558         strdup                  \
44559         strpbrk                 \
44560         strrchr                 \
44561         strsep                  \
44562         strstr                  \
44563         strtol                  \
44564         strtoul                 \
44565         strtoq                  \
44566         strtouq                 \
44567         strtoll                 \
44568         strspn                  \
44569         sysconf                 \
44570         waitpid                 \
44571         wait4                   \
44572         write                   \
44573         send                    \
44574         sendmsg                 \
44575         sendto                  \
44576
44577 do
44578 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
44579 echo "$as_me:$LINENO: checking for $ac_func" >&5
44580 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
44581 if eval "test \"\${$as_ac_var+set}\" = set"; then
44582   echo $ECHO_N "(cached) $ECHO_C" >&6
44583 else
44584   cat >conftest.$ac_ext <<_ACEOF
44585 /* confdefs.h.  */
44586 _ACEOF
44587 cat confdefs.h >>conftest.$ac_ext
44588 cat >>conftest.$ac_ext <<_ACEOF
44589 /* end confdefs.h.  */
44590 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
44591    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
44592 #define $ac_func innocuous_$ac_func
44593
44594 /* System header to define __stub macros and hopefully few prototypes,
44595     which can conflict with char $ac_func (); below.
44596     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
44597     <limits.h> exists even on freestanding compilers.  */
44598
44599 #ifdef __STDC__
44600 # include <limits.h>
44601 #else
44602 # include <assert.h>
44603 #endif
44604
44605 #undef $ac_func
44606
44607 /* Override any gcc2 internal prototype to avoid an error.  */
44608 #ifdef __cplusplus
44609 extern "C"
44610 {
44611 #endif
44612 /* We use char because int might match the return type of a gcc2
44613    builtin and then its argument prototype would still apply.  */
44614 char $ac_func ();
44615 /* The GNU C library defines this for functions which it implements
44616     to always fail with ENOSYS.  Some functions are actually named
44617     something starting with __ and the normal name is an alias.  */
44618 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
44619 choke me
44620 #else
44621 char (*f) () = $ac_func;
44622 #endif
44623 #ifdef __cplusplus
44624 }
44625 #endif
44626
44627 int
44628 main ()
44629 {
44630 return f != $ac_func;
44631   ;
44632   return 0;
44633 }
44634 _ACEOF
44635 rm -f conftest.$ac_objext conftest$ac_exeext
44636 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
44637   (eval $ac_link) 2>conftest.er1
44638   ac_status=$?
44639   grep -v '^ *+' conftest.er1 >conftest.err
44640   rm -f conftest.er1
44641   cat conftest.err >&5
44642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44643   (exit $ac_status); } &&
44644          { ac_try='test -z "$ac_c_werror_flag"
44645                          || test ! -s conftest.err'
44646   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44647   (eval $ac_try) 2>&5
44648   ac_status=$?
44649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44650   (exit $ac_status); }; } &&
44651          { ac_try='test -s conftest$ac_exeext'
44652   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44653   (eval $ac_try) 2>&5
44654   ac_status=$?
44655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44656   (exit $ac_status); }; }; then
44657   eval "$as_ac_var=yes"
44658 else
44659   echo "$as_me: failed program was:" >&5
44660 sed 's/^/| /' conftest.$ac_ext >&5
44661
44662 eval "$as_ac_var=no"
44663 fi
44664 rm -f conftest.err conftest.$ac_objext \
44665       conftest$ac_exeext conftest.$ac_ext
44666 fi
44667 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
44668 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
44669 if test `eval echo '${'$as_ac_var'}'` = yes; then
44670   cat >>confdefs.h <<_ACEOF
44671 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
44672 _ACEOF
44673
44674 fi
44675 done
44676
44677
44678
44679
44680 for ac_func in getopt getpeereid
44681 do
44682 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
44683 echo "$as_me:$LINENO: checking for $ac_func" >&5
44684 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
44685 if eval "test \"\${$as_ac_var+set}\" = set"; then
44686   echo $ECHO_N "(cached) $ECHO_C" >&6
44687 else
44688   cat >conftest.$ac_ext <<_ACEOF
44689 /* confdefs.h.  */
44690 _ACEOF
44691 cat confdefs.h >>conftest.$ac_ext
44692 cat >>conftest.$ac_ext <<_ACEOF
44693 /* end confdefs.h.  */
44694 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
44695    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
44696 #define $ac_func innocuous_$ac_func
44697
44698 /* System header to define __stub macros and hopefully few prototypes,
44699     which can conflict with char $ac_func (); below.
44700     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
44701     <limits.h> exists even on freestanding compilers.  */
44702
44703 #ifdef __STDC__
44704 # include <limits.h>
44705 #else
44706 # include <assert.h>
44707 #endif
44708
44709 #undef $ac_func
44710
44711 /* Override any gcc2 internal prototype to avoid an error.  */
44712 #ifdef __cplusplus
44713 extern "C"
44714 {
44715 #endif
44716 /* We use char because int might match the return type of a gcc2
44717    builtin and then its argument prototype would still apply.  */
44718 char $ac_func ();
44719 /* The GNU C library defines this for functions which it implements
44720     to always fail with ENOSYS.  Some functions are actually named
44721     something starting with __ and the normal name is an alias.  */
44722 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
44723 choke me
44724 #else
44725 char (*f) () = $ac_func;
44726 #endif
44727 #ifdef __cplusplus
44728 }
44729 #endif
44730
44731 int
44732 main ()
44733 {
44734 return f != $ac_func;
44735   ;
44736   return 0;
44737 }
44738 _ACEOF
44739 rm -f conftest.$ac_objext conftest$ac_exeext
44740 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
44741   (eval $ac_link) 2>conftest.er1
44742   ac_status=$?
44743   grep -v '^ *+' conftest.er1 >conftest.err
44744   rm -f conftest.er1
44745   cat conftest.err >&5
44746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44747   (exit $ac_status); } &&
44748          { ac_try='test -z "$ac_c_werror_flag"
44749                          || test ! -s conftest.err'
44750   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44751   (eval $ac_try) 2>&5
44752   ac_status=$?
44753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44754   (exit $ac_status); }; } &&
44755          { ac_try='test -s conftest$ac_exeext'
44756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44757   (eval $ac_try) 2>&5
44758   ac_status=$?
44759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44760   (exit $ac_status); }; }; then
44761   eval "$as_ac_var=yes"
44762 else
44763   echo "$as_me: failed program was:" >&5
44764 sed 's/^/| /' conftest.$ac_ext >&5
44765
44766 eval "$as_ac_var=no"
44767 fi
44768 rm -f conftest.err conftest.$ac_objext \
44769       conftest$ac_exeext conftest.$ac_ext
44770 fi
44771 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
44772 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
44773 if test `eval echo '${'$as_ac_var'}'` = yes; then
44774   cat >>confdefs.h <<_ACEOF
44775 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
44776 _ACEOF
44777
44778 else
44779   case $LIBOBJS in
44780     "$ac_func.$ac_objext"   | \
44781   *" $ac_func.$ac_objext"   | \
44782     "$ac_func.$ac_objext "* | \
44783   *" $ac_func.$ac_objext "* ) ;;
44784   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
44785 esac
44786
44787 fi
44788 done
44789
44790
44791
44792 if test "$ac_cv_func_getopt" != yes; then
44793         LIBSRCS="$LIBSRCS getopt.c"
44794 fi
44795 if test "$ac_cv_func_getpeereid" != yes; then
44796         echo "$as_me:$LINENO: checking for struct msghdr.msg_accrightslen" >&5
44797 echo $ECHO_N "checking for struct msghdr.msg_accrightslen... $ECHO_C" >&6
44798 if test "${ac_cv_member_struct_msghdr_msg_accrightslen+set}" = set; then
44799   echo $ECHO_N "(cached) $ECHO_C" >&6
44800 else
44801   cat >conftest.$ac_ext <<_ACEOF
44802 /* confdefs.h.  */
44803 _ACEOF
44804 cat confdefs.h >>conftest.$ac_ext
44805 cat >>conftest.$ac_ext <<_ACEOF
44806 /* end confdefs.h.  */
44807 $ac_includes_default
44808 #ifdef HAVE_SYS_SOCKET_H
44809 #include <sys/socket.h>
44810 #endif
44811
44812 int
44813 main ()
44814 {
44815 static struct msghdr ac_aggr;
44816 if (ac_aggr.msg_accrightslen)
44817 return 0;
44818   ;
44819   return 0;
44820 }
44821 _ACEOF
44822 rm -f conftest.$ac_objext
44823 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
44824   (eval $ac_compile) 2>conftest.er1
44825   ac_status=$?
44826   grep -v '^ *+' conftest.er1 >conftest.err
44827   rm -f conftest.er1
44828   cat conftest.err >&5
44829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44830   (exit $ac_status); } &&
44831          { ac_try='test -z "$ac_c_werror_flag"
44832                          || test ! -s conftest.err'
44833   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44834   (eval $ac_try) 2>&5
44835   ac_status=$?
44836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44837   (exit $ac_status); }; } &&
44838          { ac_try='test -s conftest.$ac_objext'
44839   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44840   (eval $ac_try) 2>&5
44841   ac_status=$?
44842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44843   (exit $ac_status); }; }; then
44844   ac_cv_member_struct_msghdr_msg_accrightslen=yes
44845 else
44846   echo "$as_me: failed program was:" >&5
44847 sed 's/^/| /' conftest.$ac_ext >&5
44848
44849 cat >conftest.$ac_ext <<_ACEOF
44850 /* confdefs.h.  */
44851 _ACEOF
44852 cat confdefs.h >>conftest.$ac_ext
44853 cat >>conftest.$ac_ext <<_ACEOF
44854 /* end confdefs.h.  */
44855 $ac_includes_default
44856 #ifdef HAVE_SYS_SOCKET_H
44857 #include <sys/socket.h>
44858 #endif
44859
44860 int
44861 main ()
44862 {
44863 static struct msghdr ac_aggr;
44864 if (sizeof ac_aggr.msg_accrightslen)
44865 return 0;
44866   ;
44867   return 0;
44868 }
44869 _ACEOF
44870 rm -f conftest.$ac_objext
44871 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
44872   (eval $ac_compile) 2>conftest.er1
44873   ac_status=$?
44874   grep -v '^ *+' conftest.er1 >conftest.err
44875   rm -f conftest.er1
44876   cat conftest.err >&5
44877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44878   (exit $ac_status); } &&
44879          { ac_try='test -z "$ac_c_werror_flag"
44880                          || test ! -s conftest.err'
44881   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44882   (eval $ac_try) 2>&5
44883   ac_status=$?
44884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44885   (exit $ac_status); }; } &&
44886          { ac_try='test -s conftest.$ac_objext'
44887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44888   (eval $ac_try) 2>&5
44889   ac_status=$?
44890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44891   (exit $ac_status); }; }; then
44892   ac_cv_member_struct_msghdr_msg_accrightslen=yes
44893 else
44894   echo "$as_me: failed program was:" >&5
44895 sed 's/^/| /' conftest.$ac_ext >&5
44896
44897 ac_cv_member_struct_msghdr_msg_accrightslen=no
44898 fi
44899 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
44900 fi
44901 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
44902 fi
44903 echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_accrightslen" >&5
44904 echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_accrightslen" >&6
44905 if test $ac_cv_member_struct_msghdr_msg_accrightslen = yes; then
44906
44907 cat >>confdefs.h <<_ACEOF
44908 #define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTSLEN 1
44909 _ACEOF
44910
44911
44912 fi
44913
44914         if test "$ac_cv_member_struct_msghdr_msg_accrightslen" != yes; then
44915                 echo "$as_me:$LINENO: checking for struct msghdr.msg_control" >&5
44916 echo $ECHO_N "checking for struct msghdr.msg_control... $ECHO_C" >&6
44917 if test "${ac_cv_member_struct_msghdr_msg_control+set}" = set; then
44918   echo $ECHO_N "(cached) $ECHO_C" >&6
44919 else
44920   cat >conftest.$ac_ext <<_ACEOF
44921 /* confdefs.h.  */
44922 _ACEOF
44923 cat confdefs.h >>conftest.$ac_ext
44924 cat >>conftest.$ac_ext <<_ACEOF
44925 /* end confdefs.h.  */
44926 $ac_includes_default
44927 #ifdef HAVE_SYS_SOCKET_H
44928 #include <sys/socket.h>
44929 #endif
44930
44931 int
44932 main ()
44933 {
44934 static struct msghdr ac_aggr;
44935 if (ac_aggr.msg_control)
44936 return 0;
44937   ;
44938   return 0;
44939 }
44940 _ACEOF
44941 rm -f conftest.$ac_objext
44942 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
44943   (eval $ac_compile) 2>conftest.er1
44944   ac_status=$?
44945   grep -v '^ *+' conftest.er1 >conftest.err
44946   rm -f conftest.er1
44947   cat conftest.err >&5
44948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44949   (exit $ac_status); } &&
44950          { ac_try='test -z "$ac_c_werror_flag"
44951                          || test ! -s conftest.err'
44952   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44953   (eval $ac_try) 2>&5
44954   ac_status=$?
44955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44956   (exit $ac_status); }; } &&
44957          { ac_try='test -s conftest.$ac_objext'
44958   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44959   (eval $ac_try) 2>&5
44960   ac_status=$?
44961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44962   (exit $ac_status); }; }; then
44963   ac_cv_member_struct_msghdr_msg_control=yes
44964 else
44965   echo "$as_me: failed program was:" >&5
44966 sed 's/^/| /' conftest.$ac_ext >&5
44967
44968 cat >conftest.$ac_ext <<_ACEOF
44969 /* confdefs.h.  */
44970 _ACEOF
44971 cat confdefs.h >>conftest.$ac_ext
44972 cat >>conftest.$ac_ext <<_ACEOF
44973 /* end confdefs.h.  */
44974 $ac_includes_default
44975 #ifdef HAVE_SYS_SOCKET_H
44976 #include <sys/socket.h>
44977 #endif
44978
44979 int
44980 main ()
44981 {
44982 static struct msghdr ac_aggr;
44983 if (sizeof ac_aggr.msg_control)
44984 return 0;
44985   ;
44986   return 0;
44987 }
44988 _ACEOF
44989 rm -f conftest.$ac_objext
44990 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
44991   (eval $ac_compile) 2>conftest.er1
44992   ac_status=$?
44993   grep -v '^ *+' conftest.er1 >conftest.err
44994   rm -f conftest.er1
44995   cat conftest.err >&5
44996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44997   (exit $ac_status); } &&
44998          { ac_try='test -z "$ac_c_werror_flag"
44999                          || test ! -s conftest.err'
45000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
45001   (eval $ac_try) 2>&5
45002   ac_status=$?
45003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
45004   (exit $ac_status); }; } &&
45005          { ac_try='test -s conftest.$ac_objext'
45006   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
45007   (eval $ac_try) 2>&5
45008   ac_status=$?
45009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
45010   (exit $ac_status); }; }; then
45011   ac_cv_member_struct_msghdr_msg_control=yes
45012 else
45013   echo "$as_me: failed program was:" >&5
45014 sed 's/^/| /' conftest.$ac_ext >&5
45015
45016 ac_cv_member_struct_msghdr_msg_control=no
45017 fi
45018 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
45019 fi
45020 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
45021 fi
45022 echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_control" >&5
45023 echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_control" >&6
45024 if test $ac_cv_member_struct_msghdr_msg_control = yes; then
45025
45026 cat >>confdefs.h <<_ACEOF
45027 #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
45028 _ACEOF
45029
45030
45031 fi
45032
45033         fi
45034         LIBSRCS="$LIBSRCS getpeereid.c"
45035 fi
45036 if test "$ac_cv_func_snprintf" != yes ||
45037    test "$ac_cv_func_vsnprintf" != yes; then
45038         if test "$ac_cv_func_snprintf" != yes; then
45039
45040 cat >>confdefs.h <<\_ACEOF
45041 #define snprintf ber_pvt_snprintf
45042 _ACEOF
45043
45044         fi
45045         if test "$ac_cv_func_vsnprintf" != yes; then
45046
45047 cat >>confdefs.h <<\_ACEOF
45048 #define vsnprintf ber_pvt_vsnprintf
45049 _ACEOF
45050
45051         fi
45052 fi
45053
45054
45055 if test "$ol_enable_slapi" != no ; then
45056
45057 for ac_header in ltdl.h
45058 do
45059 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
45060 if eval "test \"\${$as_ac_Header+set}\" = set"; then
45061   echo "$as_me:$LINENO: checking for $ac_header" >&5
45062 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
45063 if eval "test \"\${$as_ac_Header+set}\" = set"; then
45064   echo $ECHO_N "(cached) $ECHO_C" >&6
45065 fi
45066 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
45067 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
45068 else
45069   # Is the header compilable?
45070 echo "$as_me:$LINENO: checking $ac_header usability" >&5
45071 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
45072 cat >conftest.$ac_ext <<_ACEOF
45073 /* confdefs.h.  */
45074 _ACEOF
45075 cat confdefs.h >>conftest.$ac_ext
45076 cat >>conftest.$ac_ext <<_ACEOF
45077 /* end confdefs.h.  */
45078 $ac_includes_default
45079 #include <$ac_header>
45080 _ACEOF
45081 rm -f conftest.$ac_objext
45082 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
45083   (eval $ac_compile) 2>conftest.er1
45084   ac_status=$?
45085   grep -v '^ *+' conftest.er1 >conftest.err
45086   rm -f conftest.er1
45087   cat conftest.err >&5
45088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
45089   (exit $ac_status); } &&
45090          { ac_try='test -z "$ac_c_werror_flag"
45091                          || test ! -s conftest.err'
45092   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
45093   (eval $ac_try) 2>&5
45094   ac_status=$?
45095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
45096   (exit $ac_status); }; } &&
45097          { ac_try='test -s conftest.$ac_objext'
45098   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
45099   (eval $ac_try) 2>&5
45100   ac_status=$?
45101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
45102   (exit $ac_status); }; }; then
45103   ac_header_compiler=yes
45104 else
45105   echo "$as_me: failed program was:" >&5
45106 sed 's/^/| /' conftest.$ac_ext >&5
45107
45108 ac_header_compiler=no
45109 fi
45110 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
45111 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
45112 echo "${ECHO_T}$ac_header_compiler" >&6
45113
45114 # Is the header present?
45115 echo "$as_me:$LINENO: checking $ac_header presence" >&5
45116 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
45117 cat >conftest.$ac_ext <<_ACEOF
45118 /* confdefs.h.  */
45119 _ACEOF
45120 cat confdefs.h >>conftest.$ac_ext
45121 cat >>conftest.$ac_ext <<_ACEOF
45122 /* end confdefs.h.  */
45123 #include <$ac_header>
45124 _ACEOF
45125 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
45126   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
45127   ac_status=$?
45128   grep -v '^ *+' conftest.er1 >conftest.err
45129   rm -f conftest.er1
45130   cat conftest.err >&5
45131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
45132   (exit $ac_status); } >/dev/null; then
45133   if test -s conftest.err; then
45134     ac_cpp_err=$ac_c_preproc_warn_flag
45135     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
45136   else
45137     ac_cpp_err=
45138   fi
45139 else
45140   ac_cpp_err=yes
45141 fi
45142 if test -z "$ac_cpp_err"; then
45143   ac_header_preproc=yes
45144 else
45145   echo "$as_me: failed program was:" >&5
45146 sed 's/^/| /' conftest.$ac_ext >&5
45147
45148   ac_header_preproc=no
45149 fi
45150 rm -f conftest.err conftest.$ac_ext
45151 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
45152 echo "${ECHO_T}$ac_header_preproc" >&6
45153
45154 # So?  What about this header?
45155 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
45156   yes:no: )
45157     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
45158 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
45159     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
45160 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
45161     ac_header_preproc=yes
45162     ;;
45163   no:yes:* )
45164     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
45165 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
45166     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
45167 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
45168     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
45169 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
45170     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
45171 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
45172     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
45173 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
45174     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
45175 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
45176     (
45177       cat <<\_ASBOX
45178 ## --------------------------------------------- ##
45179 ## Report this to <http://www.openldap.org/its/> ##
45180 ## --------------------------------------------- ##
45181 _ASBOX
45182     ) |
45183       sed "s/^/$as_me: WARNING:     /" >&2
45184     ;;
45185 esac
45186 echo "$as_me:$LINENO: checking for $ac_header" >&5
45187 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
45188 if eval "test \"\${$as_ac_Header+set}\" = set"; then
45189   echo $ECHO_N "(cached) $ECHO_C" >&6
45190 else
45191   eval "$as_ac_Header=\$ac_header_preproc"
45192 fi
45193 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
45194 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
45195
45196 fi
45197 if test `eval echo '${'$as_ac_Header'}'` = yes; then
45198   cat >>confdefs.h <<_ACEOF
45199 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
45200 _ACEOF
45201
45202 fi
45203
45204 done
45205
45206
45207         if test $ac_cv_header_ltdl_h != yes ; then
45208                 { { echo "$as_me:$LINENO: error: could not locate <ltdl.h>" >&5
45209 echo "$as_me: error: could not locate <ltdl.h>" >&2;}
45210    { (exit 1); exit 1; }; }
45211         fi
45212         echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
45213 echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6
45214 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
45215   echo $ECHO_N "(cached) $ECHO_C" >&6
45216 else
45217   ac_check_lib_save_LIBS=$LIBS
45218 LIBS="-lltdl  $LIBS"
45219 cat >conftest.$ac_ext <<_ACEOF
45220 /* confdefs.h.  */
45221 _ACEOF
45222 cat confdefs.h >>conftest.$ac_ext
45223 cat >>conftest.$ac_ext <<_ACEOF
45224 /* end confdefs.h.  */
45225
45226 /* Override any gcc2 internal prototype to avoid an error.  */
45227 #ifdef __cplusplus
45228 extern "C"
45229 #endif
45230 /* We use char because int might match the return type of a gcc2
45231    builtin and then its argument prototype would still apply.  */
45232 char lt_dlinit ();
45233 int
45234 main ()
45235 {
45236 lt_dlinit ();
45237   ;
45238   return 0;
45239 }
45240 _ACEOF
45241 rm -f conftest.$ac_objext conftest$ac_exeext
45242 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
45243   (eval $ac_link) 2>conftest.er1
45244   ac_status=$?
45245   grep -v '^ *+' conftest.er1 >conftest.err
45246   rm -f conftest.er1
45247   cat conftest.err >&5
45248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
45249   (exit $ac_status); } &&
45250          { ac_try='test -z "$ac_c_werror_flag"
45251                          || test ! -s conftest.err'
45252   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
45253   (eval $ac_try) 2>&5
45254   ac_status=$?
45255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
45256   (exit $ac_status); }; } &&
45257          { ac_try='test -s conftest$ac_exeext'
45258   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
45259   (eval $ac_try) 2>&5
45260   ac_status=$?
45261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
45262   (exit $ac_status); }; }; then
45263   ac_cv_lib_ltdl_lt_dlinit=yes
45264 else
45265   echo "$as_me: failed program was:" >&5
45266 sed 's/^/| /' conftest.$ac_ext >&5
45267
45268 ac_cv_lib_ltdl_lt_dlinit=no
45269 fi
45270 rm -f conftest.err conftest.$ac_objext \
45271       conftest$ac_exeext conftest.$ac_ext
45272 LIBS=$ac_check_lib_save_LIBS
45273 fi
45274 echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
45275 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6
45276 if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
45277
45278                 SLAPI_LIBS=-lltdl
45279                 LIBSLAPI=libslapi.a
45280                 LIBSLAPITOOLS=../libslapi.a
45281
45282 cat >>confdefs.h <<\_ACEOF
45283 #define HAVE_LIBLTDL 1
45284 _ACEOF
45285
45286
45287 else
45288   { { echo "$as_me:$LINENO: error: could not locate libtool -lltdl" >&5
45289 echo "$as_me: error: could not locate libtool -lltdl" >&2;}
45290    { (exit 1); exit 1; }; }
45291 fi
45292
45293
45294
45295 cat >>confdefs.h <<\_ACEOF
45296 #define LDAP_SLAPI 1
45297 _ACEOF
45298
45299 fi
45300
45301 if test "$ol_enable_debug" != no ; then
45302
45303 cat >>confdefs.h <<\_ACEOF
45304 #define LDAP_DEBUG 1
45305 _ACEOF
45306
45307 fi
45308 if test "$ol_enable_syslog" = yes ; then
45309
45310 cat >>confdefs.h <<\_ACEOF
45311 #define LDAP_SYSLOG 1
45312 _ACEOF
45313
45314 fi
45315 if test "$ol_link_kbind" != no ; then
45316
45317 cat >>confdefs.h <<\_ACEOF
45318 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
45319 _ACEOF
45320
45321 fi
45322 if test "$ol_enable_proctitle" != no ; then
45323
45324 cat >>confdefs.h <<\_ACEOF
45325 #define LDAP_PROCTITLE 1
45326 _ACEOF
45327
45328 fi
45329 if test "$ol_enable_referrals" != no ; then
45330
45331 cat >>confdefs.h <<\_ACEOF
45332 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
45333 _ACEOF
45334
45335 fi
45336 if test "$ol_enable_local" != no; then
45337
45338 cat >>confdefs.h <<\_ACEOF
45339 #define LDAP_PF_LOCAL 1
45340 _ACEOF
45341
45342 fi
45343 if test "$ol_link_ipv6" != no; then
45344
45345 cat >>confdefs.h <<\_ACEOF
45346 #define LDAP_PF_INET6 1
45347 _ACEOF
45348
45349 fi
45350 if test "$ol_enable_cleartext" != no ; then
45351
45352 cat >>confdefs.h <<\_ACEOF
45353 #define SLAPD_CLEARTEXT 1
45354 _ACEOF
45355
45356 fi
45357 if test "$ol_enable_crypt" != no ; then
45358
45359 cat >>confdefs.h <<\_ACEOF
45360 #define SLAPD_CRYPT 1
45361 _ACEOF
45362
45363 fi
45364 if test "$ol_link_spasswd" != no ; then
45365
45366 cat >>confdefs.h <<\_ACEOF
45367 #define SLAPD_SPASSWD 1
45368 _ACEOF
45369
45370 fi
45371 if test "$ol_enable_multimaster" != no ; then
45372
45373 cat >>confdefs.h <<\_ACEOF
45374 #define SLAPD_MULTIMASTER 1
45375 _ACEOF
45376
45377 fi
45378 if test "$ol_enable_rlookups" != no ; then
45379
45380 cat >>confdefs.h <<\_ACEOF
45381 #define SLAPD_RLOOKUPS 1
45382 _ACEOF
45383
45384 fi
45385 if test "$ol_enable_aci" != no ; then
45386
45387 cat >>confdefs.h <<\_ACEOF
45388 #define SLAPD_ACI_ENABLED 1
45389 _ACEOF
45390
45391         WITH_ACI_ENABLED=yes
45392 else
45393         WITH_ACI_ENABLED=no
45394 fi
45395
45396 if test "$ol_link_modules" != no ; then
45397
45398 cat >>confdefs.h <<\_ACEOF
45399 #define SLAPD_MODULES 1
45400 _ACEOF
45401
45402         BUILD_SLAPD=yes
45403         SLAPD_MODULES_LDFLAGS="-dlopen self"
45404 fi
45405
45406
45407 cat >>confdefs.h <<\_ACEOF
45408 #define SLAPD_MOD_STATIC 1
45409 _ACEOF
45410
45411
45412 cat >>confdefs.h <<\_ACEOF
45413 #define SLAPD_MOD_DYNAMIC 2
45414 _ACEOF
45415
45416
45417 if test "$ol_enable_bdb" != no ; then
45418         BUILD_SLAPD=yes
45419         BUILD_BDB=$ol_enable_bdb
45420         if test "$ol_enable_bdb" = mod ; then
45421                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
45422                 MFLAG=SLAPD_MOD_DYNAMIC
45423         else
45424                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
45425                 MFLAG=SLAPD_MOD_STATIC
45426         fi
45427
45428 cat >>confdefs.h <<_ACEOF
45429 #define SLAPD_BDB $MFLAG
45430 _ACEOF
45431
45432 fi
45433
45434 if test "$ol_enable_dnssrv" != no ; then
45435         BUILD_SLAPD=yes
45436         BUILD_DNSSRV=$ol_enable_dnssrv
45437         if test "$ol_enable_dnssrv" = mod ; then
45438                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
45439                 MFLAG=SLAPD_MOD_DYNAMIC
45440         else
45441                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
45442                 MFLAG=SLAPD_MOD_STATIC
45443         fi
45444
45445 cat >>confdefs.h <<_ACEOF
45446 #define SLAPD_DNSSRV $MFLAG
45447 _ACEOF
45448
45449 fi
45450
45451 if test "$ol_enable_hdb" != no ; then
45452         BUILD_SLAPD=yes
45453         BUILD_HDB=$ol_enable_hdb
45454         if test "$ol_enable_hdb" = mod ; then
45455                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
45456                 MFLAG=SLAPD_MOD_DYNAMIC
45457         else
45458                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
45459                 MFLAG=SLAPD_MOD_STATIC
45460         fi
45461
45462 cat >>confdefs.h <<_ACEOF
45463 #define SLAPD_HDB $MFLAG
45464 _ACEOF
45465
45466 fi
45467
45468 if test "$ol_enable_ldap" != no ; then
45469         BUILD_SLAPD=yes
45470         BUILD_LDAP=$ol_enable_ldap
45471         if test "$ol_enable_ldap" = mod ; then
45472                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
45473                 MFLAG=SLAPD_MOD_DYNAMIC
45474         else
45475                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
45476                 MFLAG=SLAPD_MOD_STATIC
45477         fi
45478
45479 cat >>confdefs.h <<_ACEOF
45480 #define SLAPD_LDAP $MFLAG
45481 _ACEOF
45482
45483 fi
45484
45485 if test "$ol_link_ldbm" != no && test $ol_enable_ldbm != no; then
45486         BUILD_SLAPD=yes
45487         BUILD_LDBM=$ol_enable_ldbm
45488         if test "$ol_enable_ldbm" = mod ; then
45489                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
45490                 MFLAG=SLAPD_MOD_DYNAMIC
45491         else
45492                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
45493                 MFLAG=SLAPD_MOD_STATIC
45494         fi
45495
45496 cat >>confdefs.h <<_ACEOF
45497 #define SLAPD_LDBM $MFLAG
45498 _ACEOF
45499
45500 fi
45501
45502 if test "$ol_enable_meta" != no ; then
45503         BUILD_SLAPD=yes
45504         BUILD_META=$ol_enable_meta
45505         BUILD_REWRITE=yes
45506         if test "$ol_enable_meta" = mod ; then
45507                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
45508                 MFLAG=SLAPD_MOD_DYNAMIC
45509         else
45510                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
45511                 MFLAG=SLAPD_MOD_STATIC
45512         fi
45513
45514 cat >>confdefs.h <<_ACEOF
45515 #define SLAPD_META $MFLAG
45516 _ACEOF
45517
45518 fi
45519
45520 if test "$ol_enable_monitor" != no ; then
45521         BUILD_SLAPD=yes
45522         BUILD_MONITOR=$ol_enable_monitor
45523         if test "$ol_enable_monitor" = mod ; then
45524                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
45525                 MFLAG=SLAPD_MOD_DYNAMIC
45526         else
45527                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
45528                 MFLAG=SLAPD_MOD_STATIC
45529         fi
45530
45531 cat >>confdefs.h <<_ACEOF
45532 #define SLAPD_MONITOR $MFLAG
45533 _ACEOF
45534
45535 fi
45536
45537 if test "$ol_enable_null" != no ; then
45538         BUILD_SLAPD=yes
45539         BUILD_NULL=$ol_enable_null
45540         if test "$ol_enable_null" = mod ; then
45541                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
45542                 MFLAG=SLAPD_MOD_DYNAMIC
45543         else
45544                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
45545                 MFLAG=SLAPD_MOD_STATIC
45546         fi
45547
45548 cat >>confdefs.h <<_ACEOF
45549 #define SLAPD_NULL $MFLAG
45550 _ACEOF
45551
45552 fi
45553
45554 if test "$ol_enable_passwd" != no ; then
45555         BUILD_SLAPD=yes
45556         BUILD_PASSWD=$ol_enable_passwd
45557         if test "$ol_enable_passwd" = mod ; then
45558                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
45559                 MFLAG=SLAPD_MOD_DYNAMIC
45560         else
45561                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
45562                 MFLAG=SLAPD_MOD_STATIC
45563         fi
45564
45565 cat >>confdefs.h <<_ACEOF
45566 #define SLAPD_PASSWD $MFLAG
45567 _ACEOF
45568
45569 fi
45570
45571 if test "$ol_link_perl" != no ; then
45572         BUILD_SLAPD=yes
45573         BUILD_PERL=$ol_enable_perl
45574         if test "$ol_enable_perl" = mod ; then
45575                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
45576                 MFLAG=SLAPD_MOD_DYNAMIC
45577         else
45578                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
45579                 MFLAG=SLAPD_MOD_STATIC
45580         fi
45581
45582 cat >>confdefs.h <<_ACEOF
45583 #define SLAPD_PERL $MFLAG
45584 _ACEOF
45585
45586 fi
45587
45588 if test "$ol_enable_relay" != no ; then
45589         BUILD_SLAPD=yes
45590         BUILD_RELAY=$ol_enable_relay
45591         if test "$ol_enable_relay" = mod ; then
45592                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
45593                 MFLAG=SLAPD_MOD_DYNAMIC
45594         else
45595                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
45596                 MFLAG=SLAPD_MOD_STATIC
45597         fi
45598
45599 cat >>confdefs.h <<_ACEOF
45600 #define SLAPD_RELAY $MFLAG
45601 _ACEOF
45602
45603 fi
45604
45605 if test "$ol_enable_shell" != no ; then
45606         if test "$ol_link_threads" != no ; then
45607                 { echo "$as_me:$LINENO: WARNING: Use of --without-threads is recommended with back-shell" >&5
45608 echo "$as_me: WARNING: Use of --without-threads is recommended with back-shell" >&2;}
45609         fi
45610         BUILD_SLAPD=yes
45611         BUILD_SHELL=$ol_enable_shell
45612         if test "$ol_enable_shell" = mod ; then
45613                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
45614                 MFLAG=SLAPD_MOD_DYNAMIC
45615         else
45616                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
45617                 MFLAG=SLAPD_MOD_STATIC
45618         fi
45619
45620 cat >>confdefs.h <<_ACEOF
45621 #define SLAPD_SHELL $MFLAG
45622 _ACEOF
45623
45624 fi
45625
45626 if test "$ol_link_sql" != no ; then
45627         BUILD_SLAPD=yes
45628         BUILD_SQL=$ol_enable_sql
45629         if test "$ol_enable_sql" = mod; then
45630                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
45631                 MFLAG=SLAPD_MOD_DYNAMIC
45632         else
45633                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
45634                 MFLAG=SLAPD_MOD_STATIC
45635         fi
45636
45637 cat >>confdefs.h <<_ACEOF
45638 #define SLAPD_SQL $MFLAG
45639 _ACEOF
45640
45641 fi
45642
45643 if test "$ol_enable_accesslog" != no ; then
45644         BUILD_ACCESSLOG=$ol_enable_accesslog
45645         if test "$ol_enable_accesslog" = mod ; then
45646                 MFLAG=SLAPD_MOD_DYNAMIC
45647                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
45648         else
45649                 MFLAG=SLAPD_MOD_STATIC
45650                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
45651         fi
45652
45653 cat >>confdefs.h <<_ACEOF
45654 #define SLAPD_OVER_ACCESSLOG $MFLAG
45655 _ACEOF
45656
45657 fi
45658
45659 if test "$ol_enable_auditlog" != no ; then
45660         BUILD_AUDITLOG=$ol_enable_auditlog
45661         if test "$ol_enable_auditlog" = mod ; then
45662                 MFLAG=SLAPD_MOD_DYNAMIC
45663                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS auditlog.la"
45664         else
45665                 MFLAG=SLAPD_MOD_STATIC
45666                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS auditlog.o"
45667         fi
45668
45669 cat >>confdefs.h <<_ACEOF
45670 #define SLAPD_OVER_AUDITLOG $MFLAG
45671 _ACEOF
45672
45673 fi
45674
45675 if test "$ol_enable_denyop" != no ; then
45676         BUILD_DENYOP=$ol_enable_denyop
45677         if test "$ol_enable_denyop" = mod ; then
45678                 MFLAG=SLAPD_MOD_DYNAMIC
45679                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
45680         else
45681                 MFLAG=SLAPD_MOD_STATIC
45682                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS denyop.o"
45683         fi
45684
45685 cat >>confdefs.h <<_ACEOF
45686 #define SLAPD_OVER_DENYOP $MFLAG
45687 _ACEOF
45688
45689 fi
45690
45691 if test "$ol_enable_dyngroup" != no ; then
45692         BUILD_DYNGROUP=$ol_enable_dyngroup
45693         if test "$ol_enable_dyngroup" = mod ; then
45694                 MFLAG=SLAPD_MOD_DYNAMIC
45695                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
45696         else
45697                 MFLAG=SLAPD_MOD_STATIC
45698                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
45699         fi
45700
45701 cat >>confdefs.h <<_ACEOF
45702 #define SLAPD_OVER_DYNGROUP $MFLAG
45703 _ACEOF
45704
45705 fi
45706
45707 if test "$ol_enable_dynlist" != no ; then
45708         BUILD_DYNLIST=$ol_enable_dynlist
45709         if test "$ol_enable_dynlist" = mod ; then
45710                 MFLAG=SLAPD_MOD_DYNAMIC
45711                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
45712         else
45713                 MFLAG=SLAPD_MOD_STATIC
45714                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
45715         fi
45716
45717 cat >>confdefs.h <<_ACEOF
45718 #define SLAPD_OVER_DYNLIST $MFLAG
45719 _ACEOF
45720
45721 fi
45722
45723 if test "$ol_enable_lastmod" != no ; then
45724         BUILD_LASTMOD=$ol_enable_lastmod
45725         if test "$ol_enable_lastmod" = mod ; then
45726                 MFLAG=SLAPD_MOD_DYNAMIC
45727                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
45728         else
45729                 MFLAG=SLAPD_MOD_STATIC
45730                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS lastmod.o"
45731         fi
45732
45733 cat >>confdefs.h <<_ACEOF
45734 #define SLAPD_OVER_LASTMOD $MFLAG
45735 _ACEOF
45736
45737 fi
45738
45739 if test "$ol_enable_ppolicy" != no ; then
45740         BUILD_PPOLICY=$ol_enable_ppolicy
45741         if test "$ol_enable_ppolicy" = mod ; then
45742                 MFLAG=SLAPD_MOD_DYNAMIC
45743                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
45744         else
45745                 MFLAG=SLAPD_MOD_STATIC
45746                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
45747         fi
45748
45749 cat >>confdefs.h <<_ACEOF
45750 #define SLAPD_OVER_PPOLICY $MFLAG
45751 _ACEOF
45752
45753 fi
45754
45755 if test "$ol_enable_proxycache" != no ; then
45756         BUILD_PROXYCACHE=$ol_enable_proxycache
45757         if test "$ol_enable_proxycache" = mod ; then
45758                 MFLAG=SLAPD_MOD_DYNAMIC
45759                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
45760         else
45761                 MFLAG=SLAPD_MOD_STATIC
45762                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
45763         fi
45764
45765 cat >>confdefs.h <<_ACEOF
45766 #define SLAPD_OVER_PROXYCACHE $MFLAG
45767 _ACEOF
45768
45769 fi
45770
45771 if test "$ol_enable_refint" != no ; then
45772         BUILD_REFINT=$ol_enable_refint
45773         if test "$ol_enable_refint" = mod ; then
45774                 MFLAG=SLAPD_MOD_DYNAMIC
45775                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
45776         else
45777                 MFLAG=SLAPD_MOD_STATIC
45778                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
45779         fi
45780
45781 cat >>confdefs.h <<_ACEOF
45782 #define SLAPD_OVER_REFINT $MFLAG
45783 _ACEOF
45784
45785 fi
45786
45787 if test "$ol_enable_retcode" != no ; then
45788         BUILD_RETCODE=$ol_enable_retcode
45789         if test "$ol_enable_retcode" = mod ; then
45790                 MFLAG=SLAPD_MOD_DYNAMIC
45791                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
45792         else
45793                 MFLAG=SLAPD_MOD_STATIC
45794                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
45795         fi
45796
45797 cat >>confdefs.h <<_ACEOF
45798 #define SLAPD_OVER_RETCODE $MFLAG
45799 _ACEOF
45800
45801 fi
45802
45803 if test "$ol_enable_rwm" != no ; then
45804         BUILD_REWRITE=yes
45805         BUILD_RWM=$ol_enable_rwm
45806         if test "$ol_enable_rwm" = mod ; then
45807                 MFLAG=SLAPD_MOD_DYNAMIC
45808                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
45809         else
45810                 MFLAG=SLAPD_MOD_STATIC
45811                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
45812         fi
45813
45814 cat >>confdefs.h <<_ACEOF
45815 #define SLAPD_OVER_RWM $MFLAG
45816 _ACEOF
45817
45818 fi
45819
45820 if test "$ol_enable_syncprov" != no ; then
45821         BUILD_SYNCPROV=$ol_enable_syncprov
45822         if test "$ol_enable_syncprov" = mod ; then
45823                 MFLAG=SLAPD_MOD_DYNAMIC
45824                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
45825         else
45826                 MFLAG=SLAPD_MOD_STATIC
45827                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
45828         fi
45829
45830 cat >>confdefs.h <<_ACEOF
45831 #define SLAPD_OVER_SYNCPROV $MFLAG
45832 _ACEOF
45833
45834 fi
45835
45836 if test "$ol_enable_translucent" != no ; then
45837         BUILD_TRANSLUCENT=$ol_enable_translucent
45838         if test "$ol_enable_translucent" = mod ; then
45839                 MFLAG=SLAPD_MOD_DYNAMIC
45840                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
45841         else
45842                 MFLAG=SLAPD_MOD_STATIC
45843                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
45844         fi
45845
45846 cat >>confdefs.h <<_ACEOF
45847 #define SLAPD_OVER_TRANSLUCENT $MFLAG
45848 _ACEOF
45849
45850 fi
45851
45852 if test "$ol_enable_unique" != no ; then
45853         BUILD_UNIQUE=$ol_enable_unique
45854         if test "$ol_enable_unique" = mod ; then
45855                 MFLAG=SLAPD_MOD_DYNAMIC
45856                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
45857         else
45858                 MFLAG=SLAPD_MOD_STATIC
45859                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
45860         fi
45861
45862 cat >>confdefs.h <<_ACEOF
45863 #define SLAPD_OVER_UNIQUE $MFLAG
45864 _ACEOF
45865
45866 fi
45867
45868 if test "$ol_enable_valsort" != no ; then
45869         BUILD_VALSORT=$ol_enable_valsort
45870         if test "$ol_enable_valsort" = mod ; then
45871                 MFLAG=SLAPD_MOD_DYNAMIC
45872                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS valsort.la"
45873         else
45874                 MFLAG=SLAPD_MOD_STATIC
45875                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS valsort.o"
45876         fi
45877
45878 cat >>confdefs.h <<_ACEOF
45879 #define SLAPD_OVER_VALSORT $MFLAG
45880 _ACEOF
45881
45882 fi
45883
45884 if test "$ol_enable_slurpd" != no &&
45885    test "$ol_link_threads" != no &&
45886    test $BUILD_SLAPD = yes ; then
45887         BUILD_SLURPD=yes
45888 fi
45889
45890 if test "$ol_enable_rewrite" != no ; then
45891
45892 cat >>confdefs.h <<\_ACEOF
45893 #define ENABLE_REWRITE 1
45894 _ACEOF
45895
45896         BUILD_REWRITE=yes
45897 fi
45898
45899 if test "$ol_enable_slapi" != no ; then
45900
45901 cat >>confdefs.h <<\_ACEOF
45902 #define ENABLE_SLAPI 1
45903 _ACEOF
45904
45905         BUILD_SLAPI=yes
45906         SLAPD_SLAPI_DEPEND=libslapi.a
45907 fi
45908
45909
45910
45911 if test "$ac_cv_mingw32" = yes ; then
45912         PLAT=NT
45913         SLAPD_MODULES_LDFLAGS=
45914 else
45915         PLAT=UNIX
45916 fi
45917
45918
45919
45920
45921
45922
45923
45924
45925
45926
45927
45928
45929
45930
45931
45932
45933
45934
45935
45936
45937
45938
45939
45940
45941
45942
45943
45944
45945
45946
45947
45948
45949
45950
45951
45952
45953
45954
45955
45956
45957
45958
45959
45960
45961
45962
45963
45964
45965
45966
45967
45968
45969
45970
45971
45972
45973
45974
45975
45976
45977
45978
45979
45980
45981
45982
45983
45984
45985
45986
45987
45988
45989
45990
45991
45992
45993
45994
45995
45996
45997
45998
45999 # Check whether --with-xxinstall or --without-xxinstall was given.
46000 if test "${with_xxinstall+set}" = set; then
46001   withval="$with_xxinstall"
46002
46003 fi;
46004
46005
46006                                                                                                                                                                                                                                                                                                                                                                                                                 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"
46007
46008
46009           ac_config_commands="$ac_config_commands default"
46010
46011
46012
46013 test "x$prefix" = xNONE && prefix=$ac_default_prefix
46014 # Let make expand exec_prefix.
46015 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
46016
46017 # VPATH may cause trouble with some makes, so we remove $(srcdir),
46018 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
46019 # trailing colons and then remove the whole line if VPATH becomes empty
46020 # (actually we leave an empty line to preserve line numbers).
46021 if test "x$srcdir" = x.; then
46022   ac_vpsub='/^[  ]*VPATH[        ]*=/{
46023 s/:*\$(srcdir):*/:/;
46024 s/:*\${srcdir}:*/:/;
46025 s/:*@srcdir@:*/:/;
46026 s/^\([^=]*=[     ]*\):*/\1/;
46027 s/:*$//;
46028 s/^[^=]*=[       ]*$//;
46029 }'
46030 fi
46031
46032 DEFS=-DHAVE_CONFIG_H
46033
46034 ac_libobjs=
46035 ac_ltlibobjs=
46036 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
46037   # 1. Remove the extension, and $U if already installed.
46038   ac_i=`echo "$ac_i" |
46039          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
46040   # 2. Add them.
46041   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
46042   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
46043 done
46044 LIBOBJS=$ac_libobjs
46045
46046 LTLIBOBJS=$ac_ltlibobjs
46047
46048
46049 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
46050   { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
46051 Usually this means the macro was only invoked conditionally." >&5
46052 echo "$as_me: error: conditional \"AMDEP\" was never defined.
46053 Usually this means the macro was only invoked conditionally." >&2;}
46054    { (exit 1); exit 1; }; }
46055 fi
46056 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
46057   { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
46058 Usually this means the macro was only invoked conditionally." >&5
46059 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
46060 Usually this means the macro was only invoked conditionally." >&2;}
46061    { (exit 1); exit 1; }; }
46062 fi
46063 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
46064   { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
46065 Usually this means the macro was only invoked conditionally." >&5
46066 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
46067 Usually this means the macro was only invoked conditionally." >&2;}
46068    { (exit 1); exit 1; }; }
46069 fi
46070
46071 : ${CONFIG_STATUS=./config.status}
46072 ac_clean_files_save=$ac_clean_files
46073 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
46074 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
46075 echo "$as_me: creating $CONFIG_STATUS" >&6;}
46076 cat >$CONFIG_STATUS <<_ACEOF
46077 #! $SHELL
46078 # Generated by $as_me.
46079 # Run this file to recreate the current configuration.
46080 # Compiler output produced by configure, useful for debugging
46081 # configure, is in config.log if it exists.
46082
46083 debug=false
46084 ac_cs_recheck=false
46085 ac_cs_silent=false
46086 SHELL=\${CONFIG_SHELL-$SHELL}
46087 _ACEOF
46088
46089 cat >>$CONFIG_STATUS <<\_ACEOF
46090 ## --------------------- ##
46091 ## M4sh Initialization.  ##
46092 ## --------------------- ##
46093
46094 # Be Bourne compatible
46095 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
46096   emulate sh
46097   NULLCMD=:
46098   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
46099   # is contrary to our usage.  Disable this feature.
46100   alias -g '${1+"$@"}'='"$@"'
46101 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
46102   set -o posix
46103 fi
46104 DUALCASE=1; export DUALCASE # for MKS sh
46105
46106 # Support unset when possible.
46107 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
46108   as_unset=unset
46109 else
46110   as_unset=false
46111 fi
46112
46113
46114 # Work around bugs in pre-3.0 UWIN ksh.
46115 $as_unset ENV MAIL MAILPATH
46116 PS1='$ '
46117 PS2='> '
46118 PS4='+ '
46119
46120 # NLS nuisances.
46121 for as_var in \
46122   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
46123   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
46124   LC_TELEPHONE LC_TIME
46125 do
46126   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
46127     eval $as_var=C; export $as_var
46128   else
46129     $as_unset $as_var
46130   fi
46131 done
46132
46133 # Required to use basename.
46134 if expr a : '\(a\)' >/dev/null 2>&1; then
46135   as_expr=expr
46136 else
46137   as_expr=false
46138 fi
46139
46140 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
46141   as_basename=basename
46142 else
46143   as_basename=false
46144 fi
46145
46146
46147 # Name of the executable.
46148 as_me=`$as_basename "$0" ||
46149 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
46150          X"$0" : 'X\(//\)$' \| \
46151          X"$0" : 'X\(/\)$' \| \
46152          .     : '\(.\)' 2>/dev/null ||
46153 echo X/"$0" |
46154     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
46155           /^X\/\(\/\/\)$/{ s//\1/; q; }
46156           /^X\/\(\/\).*/{ s//\1/; q; }
46157           s/.*/./; q'`
46158
46159
46160 # PATH needs CR, and LINENO needs CR and PATH.
46161 # Avoid depending upon Character Ranges.
46162 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
46163 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
46164 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
46165 as_cr_digits='0123456789'
46166 as_cr_alnum=$as_cr_Letters$as_cr_digits
46167
46168 # The user is always right.
46169 if test "${PATH_SEPARATOR+set}" != set; then
46170   echo "#! /bin/sh" >conf$$.sh
46171   echo  "exit 0"   >>conf$$.sh
46172   chmod +x conf$$.sh
46173   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
46174     PATH_SEPARATOR=';'
46175   else
46176     PATH_SEPARATOR=:
46177   fi
46178   rm -f conf$$.sh
46179 fi
46180
46181
46182   as_lineno_1=$LINENO
46183   as_lineno_2=$LINENO
46184   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
46185   test "x$as_lineno_1" != "x$as_lineno_2" &&
46186   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
46187   # Find who we are.  Look in the path if we contain no path at all
46188   # relative or not.
46189   case $0 in
46190     *[\\/]* ) as_myself=$0 ;;
46191     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46192 for as_dir in $PATH
46193 do
46194   IFS=$as_save_IFS
46195   test -z "$as_dir" && as_dir=.
46196   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
46197 done
46198
46199        ;;
46200   esac
46201   # We did not find ourselves, most probably we were run as `sh COMMAND'
46202   # in which case we are not to be found in the path.
46203   if test "x$as_myself" = x; then
46204     as_myself=$0
46205   fi
46206   if test ! -f "$as_myself"; then
46207     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
46208 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
46209    { (exit 1); exit 1; }; }
46210   fi
46211   case $CONFIG_SHELL in
46212   '')
46213     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46214 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
46215 do
46216   IFS=$as_save_IFS
46217   test -z "$as_dir" && as_dir=.
46218   for as_base in sh bash ksh sh5; do
46219          case $as_dir in
46220          /*)
46221            if ("$as_dir/$as_base" -c '
46222   as_lineno_1=$LINENO
46223   as_lineno_2=$LINENO
46224   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
46225   test "x$as_lineno_1" != "x$as_lineno_2" &&
46226   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
46227              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
46228              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
46229              CONFIG_SHELL=$as_dir/$as_base
46230              export CONFIG_SHELL
46231              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
46232            fi;;
46233          esac
46234        done
46235 done
46236 ;;
46237   esac
46238
46239   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
46240   # uniformly replaced by the line number.  The first 'sed' inserts a
46241   # line-number line before each line; the second 'sed' does the real
46242   # work.  The second script uses 'N' to pair each line-number line
46243   # with the numbered line, and appends trailing '-' during
46244   # substitution so that $LINENO is not a special case at line end.
46245   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
46246   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
46247   sed '=' <$as_myself |
46248     sed '
46249       N
46250       s,$,-,
46251       : loop
46252       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
46253       t loop
46254       s,-$,,
46255       s,^['$as_cr_digits']*\n,,
46256     ' >$as_me.lineno &&
46257   chmod +x $as_me.lineno ||
46258     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
46259 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
46260    { (exit 1); exit 1; }; }
46261
46262   # Don't try to exec as it changes $[0], causing all sort of problems
46263   # (the dirname of $[0] is not the place where we might find the
46264   # original and so on.  Autoconf is especially sensible to this).
46265   . ./$as_me.lineno
46266   # Exit status is that of the last command.
46267   exit
46268 }
46269
46270
46271 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
46272   *c*,-n*) ECHO_N= ECHO_C='
46273 ' ECHO_T='      ' ;;
46274   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
46275   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
46276 esac
46277
46278 if expr a : '\(a\)' >/dev/null 2>&1; then
46279   as_expr=expr
46280 else
46281   as_expr=false
46282 fi
46283
46284 rm -f conf$$ conf$$.exe conf$$.file
46285 echo >conf$$.file
46286 if ln -s conf$$.file conf$$ 2>/dev/null; then
46287   # We could just check for DJGPP; but this test a) works b) is more generic
46288   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46289   if test -f conf$$.exe; then
46290     # Don't use ln at all; we don't have any links
46291     as_ln_s='cp -p'
46292   else
46293     as_ln_s='ln -s'
46294   fi
46295 elif ln conf$$.file conf$$ 2>/dev/null; then
46296   as_ln_s=ln
46297 else
46298   as_ln_s='cp -p'
46299 fi
46300 rm -f conf$$ conf$$.exe conf$$.file
46301
46302 if mkdir -p . 2>/dev/null; then
46303   as_mkdir_p=:
46304 else
46305   test -d ./-p && rmdir ./-p
46306   as_mkdir_p=false
46307 fi
46308
46309 as_executable_p="test -f"
46310
46311 # Sed expression to map a string onto a valid CPP name.
46312 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
46313
46314 # Sed expression to map a string onto a valid variable name.
46315 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
46316
46317
46318 # IFS
46319 # We need space, tab and new line, in precisely that order.
46320 as_nl='
46321 '
46322 IFS="   $as_nl"
46323
46324 # CDPATH.
46325 $as_unset CDPATH
46326
46327 exec 6>&1
46328
46329 # Open the log real soon, to keep \$[0] and so on meaningful, and to
46330 # report actual input values of CONFIG_FILES etc. instead of their
46331 # values after options handling.  Logging --version etc. is OK.
46332 exec 5>>config.log
46333 {
46334   echo
46335   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
46336 ## Running $as_me. ##
46337 _ASBOX
46338 } >&5
46339 cat >&5 <<_CSEOF
46340
46341 This file was extended by $as_me, which was
46342 generated by GNU Autoconf 2.59.  Invocation command line was
46343
46344   CONFIG_FILES    = $CONFIG_FILES
46345   CONFIG_HEADERS  = $CONFIG_HEADERS
46346   CONFIG_LINKS    = $CONFIG_LINKS
46347   CONFIG_COMMANDS = $CONFIG_COMMANDS
46348   $ $0 $@
46349
46350 _CSEOF
46351 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
46352 echo >&5
46353 _ACEOF
46354
46355 # Files that config.status was made for.
46356 if test -n "$ac_config_files"; then
46357   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
46358 fi
46359
46360 if test -n "$ac_config_headers"; then
46361   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
46362 fi
46363
46364 if test -n "$ac_config_links"; then
46365   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
46366 fi
46367
46368 if test -n "$ac_config_commands"; then
46369   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
46370 fi
46371
46372 cat >>$CONFIG_STATUS <<\_ACEOF
46373
46374 ac_cs_usage="\
46375 \`$as_me' instantiates files from templates according to the
46376 current configuration.
46377
46378 Usage: $0 [OPTIONS] [FILE]...
46379
46380   -h, --help       print this help, then exit
46381   -V, --version    print version number, then exit
46382   -q, --quiet      do not print progress messages
46383   -d, --debug      don't remove temporary files
46384       --recheck    update $as_me by reconfiguring in the same conditions
46385   --file=FILE[:TEMPLATE]
46386                    instantiate the configuration file FILE
46387   --header=FILE[:TEMPLATE]
46388                    instantiate the configuration header FILE
46389
46390 Configuration files:
46391 $config_files
46392
46393 Configuration headers:
46394 $config_headers
46395
46396 Configuration commands:
46397 $config_commands
46398
46399 Report bugs to <bug-autoconf@gnu.org>."
46400 _ACEOF
46401
46402 cat >>$CONFIG_STATUS <<_ACEOF
46403 ac_cs_version="\\
46404 config.status
46405 configured by $0, generated by GNU Autoconf 2.59,
46406   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
46407
46408 Copyright (C) 2003 Free Software Foundation, Inc.
46409 This config.status script is free software; the Free Software Foundation
46410 gives unlimited permission to copy, distribute and modify it."
46411 srcdir=$srcdir
46412 INSTALL="$INSTALL"
46413 _ACEOF
46414
46415 cat >>$CONFIG_STATUS <<\_ACEOF
46416 # If no file are specified by the user, then we need to provide default
46417 # value.  By we need to know if files were specified by the user.
46418 ac_need_defaults=:
46419 while test $# != 0
46420 do
46421   case $1 in
46422   --*=*)
46423     ac_option=`expr "x$1" : 'x\([^=]*\)='`
46424     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
46425     ac_shift=:
46426     ;;
46427   -*)
46428     ac_option=$1
46429     ac_optarg=$2
46430     ac_shift=shift
46431     ;;
46432   *) # This is not an option, so the user has probably given explicit
46433      # arguments.
46434      ac_option=$1
46435      ac_need_defaults=false;;
46436   esac
46437
46438   case $ac_option in
46439   # Handling of the options.
46440 _ACEOF
46441 cat >>$CONFIG_STATUS <<\_ACEOF
46442   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
46443     ac_cs_recheck=: ;;
46444   --version | --vers* | -V )
46445     echo "$ac_cs_version"; exit 0 ;;
46446   --he | --h)
46447     # Conflict between --help and --header
46448     { { echo "$as_me:$LINENO: error: ambiguous option: $1
46449 Try \`$0 --help' for more information." >&5
46450 echo "$as_me: error: ambiguous option: $1
46451 Try \`$0 --help' for more information." >&2;}
46452    { (exit 1); exit 1; }; };;
46453   --help | --hel | -h )
46454     echo "$ac_cs_usage"; exit 0 ;;
46455   --debug | --d* | -d )
46456     debug=: ;;
46457   --file | --fil | --fi | --f )
46458     $ac_shift
46459     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
46460     ac_need_defaults=false;;
46461   --header | --heade | --head | --hea )
46462     $ac_shift
46463     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
46464     ac_need_defaults=false;;
46465   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
46466   | -silent | --silent | --silen | --sile | --sil | --si | --s)
46467     ac_cs_silent=: ;;
46468
46469   # This is an error.
46470   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
46471 Try \`$0 --help' for more information." >&5
46472 echo "$as_me: error: unrecognized option: $1
46473 Try \`$0 --help' for more information." >&2;}
46474    { (exit 1); exit 1; }; } ;;
46475
46476   *) ac_config_targets="$ac_config_targets $1" ;;
46477
46478   esac
46479   shift
46480 done
46481
46482 ac_configure_extra_args=
46483
46484 if $ac_cs_silent; then
46485   exec 6>/dev/null
46486   ac_configure_extra_args="$ac_configure_extra_args --silent"
46487 fi
46488
46489 _ACEOF
46490 cat >>$CONFIG_STATUS <<_ACEOF
46491 if \$ac_cs_recheck; then
46492   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
46493   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
46494 fi
46495
46496 _ACEOF
46497
46498 cat >>$CONFIG_STATUS <<_ACEOF
46499 #
46500 # INIT-COMMANDS section.
46501 #
46502
46503 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
46504
46505 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
46506 STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS"
46507
46508
46509 _ACEOF
46510
46511
46512
46513 cat >>$CONFIG_STATUS <<\_ACEOF
46514 for ac_config_target in $ac_config_targets
46515 do
46516   case "$ac_config_target" in
46517   # Handling of arguments.
46518   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:build/top.mk:Makefile.in:build/dir.mk" ;;
46519   "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk" ;;
46520   "doc/man/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk" ;;
46521   "doc/man/man1/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk" ;;
46522   "doc/man/man3/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk" ;;
46523   "doc/man/man5/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk" ;;
46524   "doc/man/man8/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk" ;;
46525   "clients/Makefile" ) CONFIG_FILES="$CONFIG_FILES clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk" ;;
46526   "clients/tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk" ;;
46527   "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile:build/top.mk:include/Makefile.in" ;;
46528   "libraries/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk" ;;
46529   "libraries/liblber/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
46530   "libraries/libldap/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
46531   "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" ;;
46532   "libraries/liblunicode/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
46533   "libraries/liblutil/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
46534   "libraries/librewrite/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
46535   "servers/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk" ;;
46536   "servers/slapd/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk" ;;
46537   "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" ;;
46538   "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" ;;
46539   "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" ;;
46540   "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" ;;
46541   "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" ;;
46542   "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" ;;
46543   "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" ;;
46544   "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" ;;
46545   "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" ;;
46546   "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" ;;
46547   "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" ;;
46548   "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" ;;
46549   "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" ;;
46550   "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" ;;
46551   "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" ;;
46552   "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" ;;
46553   "servers/slapd/overlays/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk" ;;
46554   "servers/slurpd/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk" ;;
46555   "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;;
46556   "tests/run" ) CONFIG_FILES="$CONFIG_FILES tests/run" ;;
46557   "tests/progs/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;;
46558   "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
46559   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
46560   "include/portable.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h:include/portable.hin" ;;
46561   "include/ldap_features.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h:include/ldap_features.hin" ;;
46562   "include/lber_types.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h:include/lber_types.hin" ;;
46563   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
46564 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
46565    { (exit 1); exit 1; }; };;
46566   esac
46567 done
46568
46569 # If the user did not use the arguments to specify the items to instantiate,
46570 # then the envvar interface is used.  Set only those that are not.
46571 # We use the long form for the default assignment because of an extremely
46572 # bizarre bug on SunOS 4.1.3.
46573 if $ac_need_defaults; then
46574   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
46575   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
46576   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
46577 fi
46578
46579 # Have a temporary directory for convenience.  Make it in the build tree
46580 # simply because there is no reason to put it here, and in addition,
46581 # creating and moving files from /tmp can sometimes cause problems.
46582 # Create a temporary directory, and hook for its removal unless debugging.
46583 $debug ||
46584 {
46585   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
46586   trap '{ (exit 1); exit 1; }' 1 2 13 15
46587 }
46588
46589 # Create a (secure) tmp directory for tmp files.
46590
46591 {
46592   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
46593   test -n "$tmp" && test -d "$tmp"
46594 }  ||
46595 {
46596   tmp=./confstat$$-$RANDOM
46597   (umask 077 && mkdir $tmp)
46598 } ||
46599 {
46600    echo "$me: cannot create a temporary directory in ." >&2
46601    { (exit 1); exit 1; }
46602 }
46603
46604 _ACEOF
46605
46606 cat >>$CONFIG_STATUS <<_ACEOF
46607
46608 #
46609 # CONFIG_FILES section.
46610 #
46611
46612 # No need to generate the scripts if there are no CONFIG_FILES.
46613 # This happens for instance when ./config.status config.h
46614 if test -n "\$CONFIG_FILES"; then
46615   # Protect against being on the right side of a sed subst in config.status.
46616   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
46617    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
46618 s,@SHELL@,$SHELL,;t t
46619 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
46620 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
46621 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
46622 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
46623 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
46624 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
46625 s,@exec_prefix@,$exec_prefix,;t t
46626 s,@prefix@,$prefix,;t t
46627 s,@program_transform_name@,$program_transform_name,;t t
46628 s,@bindir@,$bindir,;t t
46629 s,@sbindir@,$sbindir,;t t
46630 s,@libexecdir@,$libexecdir,;t t
46631 s,@datadir@,$datadir,;t t
46632 s,@sysconfdir@,$sysconfdir,;t t
46633 s,@sharedstatedir@,$sharedstatedir,;t t
46634 s,@localstatedir@,$localstatedir,;t t
46635 s,@libdir@,$libdir,;t t
46636 s,@includedir@,$includedir,;t t
46637 s,@oldincludedir@,$oldincludedir,;t t
46638 s,@infodir@,$infodir,;t t
46639 s,@mandir@,$mandir,;t t
46640 s,@build_alias@,$build_alias,;t t
46641 s,@host_alias@,$host_alias,;t t
46642 s,@target_alias@,$target_alias,;t t
46643 s,@DEFS@,$DEFS,;t t
46644 s,@ECHO_C@,$ECHO_C,;t t
46645 s,@ECHO_N@,$ECHO_N,;t t
46646 s,@ECHO_T@,$ECHO_T,;t t
46647 s,@LIBS@,$LIBS,;t t
46648 s,@build@,$build,;t t
46649 s,@build_cpu@,$build_cpu,;t t
46650 s,@build_vendor@,$build_vendor,;t t
46651 s,@build_os@,$build_os,;t t
46652 s,@host@,$host,;t t
46653 s,@host_cpu@,$host_cpu,;t t
46654 s,@host_vendor@,$host_vendor,;t t
46655 s,@host_os@,$host_os,;t t
46656 s,@target@,$target,;t t
46657 s,@target_cpu@,$target_cpu,;t t
46658 s,@target_vendor@,$target_vendor,;t t
46659 s,@target_os@,$target_os,;t t
46660 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
46661 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
46662 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
46663 s,@CYGPATH_W@,$CYGPATH_W,;t t
46664 s,@PACKAGE@,$PACKAGE,;t t
46665 s,@VERSION@,$VERSION,;t t
46666 s,@ACLOCAL@,$ACLOCAL,;t t
46667 s,@AUTOCONF@,$AUTOCONF,;t t
46668 s,@AUTOMAKE@,$AUTOMAKE,;t t
46669 s,@AUTOHEADER@,$AUTOHEADER,;t t
46670 s,@MAKEINFO@,$MAKEINFO,;t t
46671 s,@install_sh@,$install_sh,;t t
46672 s,@STRIP@,$STRIP,;t t
46673 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
46674 s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
46675 s,@mkdir_p@,$mkdir_p,;t t
46676 s,@AWK@,$AWK,;t t
46677 s,@SET_MAKE@,$SET_MAKE,;t t
46678 s,@am__leading_dot@,$am__leading_dot,;t t
46679 s,@AMTAR@,$AMTAR,;t t
46680 s,@am__tar@,$am__tar,;t t
46681 s,@am__untar@,$am__untar,;t t
46682 s,@OPENLDAP_LIBRELEASE@,$OPENLDAP_LIBRELEASE,;t t
46683 s,@OPENLDAP_LIBVERSION@,$OPENLDAP_LIBVERSION,;t t
46684 s,@OPENLDAP_RELEASE_DATE@,$OPENLDAP_RELEASE_DATE,;t t
46685 s,@top_builddir@,$top_builddir,;t t
46686 s,@ldap_subdir@,$ldap_subdir,;t t
46687 s,@CC@,$CC,;t t
46688 s,@AR@,$AR,;t t
46689 s,@CFLAGS@,$CFLAGS,;t t
46690 s,@LDFLAGS@,$LDFLAGS,;t t
46691 s,@CPPFLAGS@,$CPPFLAGS,;t t
46692 s,@ac_ct_CC@,$ac_ct_CC,;t t
46693 s,@EXEEXT@,$EXEEXT,;t t
46694 s,@OBJEXT@,$OBJEXT,;t t
46695 s,@DEPDIR@,$DEPDIR,;t t
46696 s,@am__include@,$am__include,;t t
46697 s,@am__quote@,$am__quote,;t t
46698 s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
46699 s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
46700 s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
46701 s,@CCDEPMODE@,$CCDEPMODE,;t t
46702 s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
46703 s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
46704 s,@EGREP@,$EGREP,;t t
46705 s,@LN_S@,$LN_S,;t t
46706 s,@ECHO@,$ECHO,;t t
46707 s,@ac_ct_AR@,$ac_ct_AR,;t t
46708 s,@RANLIB@,$RANLIB,;t t
46709 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
46710 s,@DLLTOOL@,$DLLTOOL,;t t
46711 s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
46712 s,@AS@,$AS,;t t
46713 s,@ac_ct_AS@,$ac_ct_AS,;t t
46714 s,@OBJDUMP@,$OBJDUMP,;t t
46715 s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t
46716 s,@CPP@,$CPP,;t t
46717 s,@LIBTOOL@,$LIBTOOL,;t t
46718 s,@PERLBIN@,$PERLBIN,;t t
46719 s,@OL_MKDEP@,$OL_MKDEP,;t t
46720 s,@OL_MKDEP_FLAGS@,$OL_MKDEP_FLAGS,;t t
46721 s,@LTSTATIC@,$LTSTATIC,;t t
46722 s,@LIBOBJS@,$LIBOBJS,;t t
46723 s,@LIBSRCS@,$LIBSRCS,;t t
46724 s,@PLAT@,$PLAT,;t t
46725 s,@WITH_SASL@,$WITH_SASL,;t t
46726 s,@WITH_TLS@,$WITH_TLS,;t t
46727 s,@WITH_MODULES_ENABLED@,$WITH_MODULES_ENABLED,;t t
46728 s,@WITH_ACI_ENABLED@,$WITH_ACI_ENABLED,;t t
46729 s,@BUILD_THREAD@,$BUILD_THREAD,;t t
46730 s,@BUILD_LIBS_DYNAMIC@,$BUILD_LIBS_DYNAMIC,;t t
46731 s,@BUILD_SLAPD@,$BUILD_SLAPD,;t t
46732 s,@BUILD_SLAPI@,$BUILD_SLAPI,;t t
46733 s,@SLAPD_SLAPI_DEPEND@,$SLAPD_SLAPI_DEPEND,;t t
46734 s,@BUILD_BDB@,$BUILD_BDB,;t t
46735 s,@BUILD_DNSSRV@,$BUILD_DNSSRV,;t t
46736 s,@BUILD_HDB@,$BUILD_HDB,;t t
46737 s,@BUILD_LDAP@,$BUILD_LDAP,;t t
46738 s,@BUILD_LDBM@,$BUILD_LDBM,;t t
46739 s,@BUILD_META@,$BUILD_META,;t t
46740 s,@BUILD_MONITOR@,$BUILD_MONITOR,;t t
46741 s,@BUILD_NULL@,$BUILD_NULL,;t t
46742 s,@BUILD_PASSWD@,$BUILD_PASSWD,;t t
46743 s,@BUILD_RELAY@,$BUILD_RELAY,;t t
46744 s,@BUILD_PERL@,$BUILD_PERL,;t t
46745 s,@BUILD_SHELL@,$BUILD_SHELL,;t t
46746 s,@BUILD_SQL@,$BUILD_SQL,;t t
46747 s,@BUILD_ACCESSLOG@,$BUILD_ACCESSLOG,;t t
46748 s,@BUILD_AUDITLOG@,$BUILD_AUDITLOG,;t t
46749 s,@BUILD_DENYOP@,$BUILD_DENYOP,;t t
46750 s,@BUILD_DYNGROUP@,$BUILD_DYNGROUP,;t t
46751 s,@BUILD_DYNLIST@,$BUILD_DYNLIST,;t t
46752 s,@BUILD_LASTMOD@,$BUILD_LASTMOD,;t t
46753 s,@BUILD_PPOLICY@,$BUILD_PPOLICY,;t t
46754 s,@BUILD_PROXYCACHE@,$BUILD_PROXYCACHE,;t t
46755 s,@BUILD_REFINT@,$BUILD_REFINT,;t t
46756 s,@BUILD_RETCODE@,$BUILD_RETCODE,;t t
46757 s,@BUILD_RWM@,$BUILD_RWM,;t t
46758 s,@BUILD_SYNCPROV@,$BUILD_SYNCPROV,;t t
46759 s,@BUILD_TRANSLUCENT@,$BUILD_TRANSLUCENT,;t t
46760 s,@BUILD_UNIQUE@,$BUILD_UNIQUE,;t t
46761 s,@BUILD_VALSORT@,$BUILD_VALSORT,;t t
46762 s,@BUILD_SLURPD@,$BUILD_SLURPD,;t t
46763 s,@LDAP_LIBS@,$LDAP_LIBS,;t t
46764 s,@SLAPD_LIBS@,$SLAPD_LIBS,;t t
46765 s,@SLURPD_LIBS@,$SLURPD_LIBS,;t t
46766 s,@LDBM_LIBS@,$LDBM_LIBS,;t t
46767 s,@LTHREAD_LIBS@,$LTHREAD_LIBS,;t t
46768 s,@LUTIL_LIBS@,$LUTIL_LIBS,;t t
46769 s,@WRAP_LIBS@,$WRAP_LIBS,;t t
46770 s,@SLAPD_MODULES_CPPFLAGS@,$SLAPD_MODULES_CPPFLAGS,;t t
46771 s,@SLAPD_MODULES_LDFLAGS@,$SLAPD_MODULES_LDFLAGS,;t t
46772 s,@SLAPD_NO_STATIC@,$SLAPD_NO_STATIC,;t t
46773 s,@SLAPD_STATIC_BACKENDS@,$SLAPD_STATIC_BACKENDS,;t t
46774 s,@SLAPD_DYNAMIC_BACKENDS@,$SLAPD_DYNAMIC_BACKENDS,;t t
46775 s,@SLAPD_STATIC_OVERLAYS@,$SLAPD_STATIC_OVERLAYS,;t t
46776 s,@SLAPD_DYNAMIC_OVERLAYS@,$SLAPD_DYNAMIC_OVERLAYS,;t t
46777 s,@PERL_CPPFLAGS@,$PERL_CPPFLAGS,;t t
46778 s,@SLAPD_PERL_LDFLAGS@,$SLAPD_PERL_LDFLAGS,;t t
46779 s,@MOD_PERL_LDFLAGS@,$MOD_PERL_LDFLAGS,;t t
46780 s,@KRB4_LIBS@,$KRB4_LIBS,;t t
46781 s,@KRB5_LIBS@,$KRB5_LIBS,;t t
46782 s,@SASL_LIBS@,$SASL_LIBS,;t t
46783 s,@TLS_LIBS@,$TLS_LIBS,;t t
46784 s,@MODULES_LIBS@,$MODULES_LIBS,;t t
46785 s,@SLAPI_LIBS@,$SLAPI_LIBS,;t t
46786 s,@LIBSLAPI@,$LIBSLAPI,;t t
46787 s,@LIBSLAPITOOLS@,$LIBSLAPITOOLS,;t t
46788 s,@AUTH_LIBS@,$AUTH_LIBS,;t t
46789 s,@SLAPD_SLP_LIBS@,$SLAPD_SLP_LIBS,;t t
46790 s,@SLAPD_GMP_LIBS@,$SLAPD_GMP_LIBS,;t t
46791 s,@SLAPD_SQL_LDFLAGS@,$SLAPD_SQL_LDFLAGS,;t t
46792 s,@SLAPD_SQL_LIBS@,$SLAPD_SQL_LIBS,;t t
46793 s,@SLAPD_SQL_INCLUDES@,$SLAPD_SQL_INCLUDES,;t t
46794 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
46795 CEOF
46796
46797 _ACEOF
46798
46799   cat >>$CONFIG_STATUS <<\_ACEOF
46800   # Split the substitutions into bite-sized pieces for seds with
46801   # small command number limits, like on Digital OSF/1 and HP-UX.
46802   ac_max_sed_lines=48
46803   ac_sed_frag=1 # Number of current file.
46804   ac_beg=1 # First line for current file.
46805   ac_end=$ac_max_sed_lines # Line after last line for current file.
46806   ac_more_lines=:
46807   ac_sed_cmds=
46808   while $ac_more_lines; do
46809     if test $ac_beg -gt 1; then
46810       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
46811     else
46812       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
46813     fi
46814     if test ! -s $tmp/subs.frag; then
46815       ac_more_lines=false
46816     else
46817       # The purpose of the label and of the branching condition is to
46818       # speed up the sed processing (if there are no `@' at all, there
46819       # is no need to browse any of the substitutions).
46820       # These are the two extra sed commands mentioned above.
46821       (echo ':t
46822   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
46823       if test -z "$ac_sed_cmds"; then
46824         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
46825       else
46826         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
46827       fi
46828       ac_sed_frag=`expr $ac_sed_frag + 1`
46829       ac_beg=$ac_end
46830       ac_end=`expr $ac_end + $ac_max_sed_lines`
46831     fi
46832   done
46833   if test -z "$ac_sed_cmds"; then
46834     ac_sed_cmds=cat
46835   fi
46836 fi # test -n "$CONFIG_FILES"
46837
46838 _ACEOF
46839 cat >>$CONFIG_STATUS <<\_ACEOF
46840 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
46841   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
46842   case $ac_file in
46843   - | *:- | *:-:* ) # input from stdin
46844         cat >$tmp/stdin
46845         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
46846         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
46847   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
46848         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
46849   * )   ac_file_in=$ac_file.in ;;
46850   esac
46851
46852   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
46853   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
46854 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46855          X"$ac_file" : 'X\(//\)[^/]' \| \
46856          X"$ac_file" : 'X\(//\)$' \| \
46857          X"$ac_file" : 'X\(/\)' \| \
46858          .     : '\(.\)' 2>/dev/null ||
46859 echo X"$ac_file" |
46860     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46861           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46862           /^X\(\/\/\)$/{ s//\1/; q; }
46863           /^X\(\/\).*/{ s//\1/; q; }
46864           s/.*/./; q'`
46865   { if $as_mkdir_p; then
46866     mkdir -p "$ac_dir"
46867   else
46868     as_dir="$ac_dir"
46869     as_dirs=
46870     while test ! -d "$as_dir"; do
46871       as_dirs="$as_dir $as_dirs"
46872       as_dir=`(dirname "$as_dir") 2>/dev/null ||
46873 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46874          X"$as_dir" : 'X\(//\)[^/]' \| \
46875          X"$as_dir" : 'X\(//\)$' \| \
46876          X"$as_dir" : 'X\(/\)' \| \
46877          .     : '\(.\)' 2>/dev/null ||
46878 echo X"$as_dir" |
46879     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46880           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46881           /^X\(\/\/\)$/{ s//\1/; q; }
46882           /^X\(\/\).*/{ s//\1/; q; }
46883           s/.*/./; q'`
46884     done
46885     test ! -n "$as_dirs" || mkdir $as_dirs
46886   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
46887 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
46888    { (exit 1); exit 1; }; }; }
46889
46890   ac_builddir=.
46891
46892 if test "$ac_dir" != .; then
46893   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
46894   # A "../" for each directory in $ac_dir_suffix.
46895   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
46896 else
46897   ac_dir_suffix= ac_top_builddir=
46898 fi
46899
46900 case $srcdir in
46901   .)  # No --srcdir option.  We are building in place.
46902     ac_srcdir=.
46903     if test -z "$ac_top_builddir"; then
46904        ac_top_srcdir=.
46905     else
46906        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
46907     fi ;;
46908   [\\/]* | ?:[\\/]* )  # Absolute path.
46909     ac_srcdir=$srcdir$ac_dir_suffix;
46910     ac_top_srcdir=$srcdir ;;
46911   *) # Relative path.
46912     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
46913     ac_top_srcdir=$ac_top_builddir$srcdir ;;
46914 esac
46915
46916 # Do not use `cd foo && pwd` to compute absolute paths, because
46917 # the directories may not exist.
46918 case `pwd` in
46919 .) ac_abs_builddir="$ac_dir";;
46920 *)
46921   case "$ac_dir" in
46922   .) ac_abs_builddir=`pwd`;;
46923   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
46924   *) ac_abs_builddir=`pwd`/"$ac_dir";;
46925   esac;;
46926 esac
46927 case $ac_abs_builddir in
46928 .) ac_abs_top_builddir=${ac_top_builddir}.;;
46929 *)
46930   case ${ac_top_builddir}. in
46931   .) ac_abs_top_builddir=$ac_abs_builddir;;
46932   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
46933   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
46934   esac;;
46935 esac
46936 case $ac_abs_builddir in
46937 .) ac_abs_srcdir=$ac_srcdir;;
46938 *)
46939   case $ac_srcdir in
46940   .) ac_abs_srcdir=$ac_abs_builddir;;
46941   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
46942   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
46943   esac;;
46944 esac
46945 case $ac_abs_builddir in
46946 .) ac_abs_top_srcdir=$ac_top_srcdir;;
46947 *)
46948   case $ac_top_srcdir in
46949   .) ac_abs_top_srcdir=$ac_abs_builddir;;
46950   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
46951   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
46952   esac;;
46953 esac
46954
46955
46956   case $INSTALL in
46957   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
46958   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
46959   esac
46960
46961   if test x"$ac_file" != x-; then
46962     { echo "$as_me:$LINENO: creating $ac_file" >&5
46963 echo "$as_me: creating $ac_file" >&6;}
46964     rm -f "$ac_file"
46965   fi
46966   # Let's still pretend it is `configure' which instantiates (i.e., don't
46967   # use $as_me), people would be surprised to read:
46968   #    /* config.h.  Generated by config.status.  */
46969   if test x"$ac_file" = x-; then
46970     configure_input=
46971   else
46972     configure_input="$ac_file.  "
46973   fi
46974   configure_input=$configure_input"Generated from `echo $ac_file_in |
46975                                      sed 's,.*/,,'` by configure."
46976
46977   # First look for the input files in the build tree, otherwise in the
46978   # src tree.
46979   ac_file_inputs=`IFS=:
46980     for f in $ac_file_in; do
46981       case $f in
46982       -) echo $tmp/stdin ;;
46983       [\\/$]*)
46984          # Absolute (can't be DOS-style, as IFS=:)
46985          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
46986 echo "$as_me: error: cannot find input file: $f" >&2;}
46987    { (exit 1); exit 1; }; }
46988          echo "$f";;
46989       *) # Relative
46990          if test -f "$f"; then
46991            # Build tree
46992            echo "$f"
46993          elif test -f "$srcdir/$f"; then
46994            # Source tree
46995            echo "$srcdir/$f"
46996          else
46997            # /dev/null tree
46998            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
46999 echo "$as_me: error: cannot find input file: $f" >&2;}
47000    { (exit 1); exit 1; }; }
47001          fi;;
47002       esac
47003     done` || { (exit 1); exit 1; }
47004 _ACEOF
47005 cat >>$CONFIG_STATUS <<_ACEOF
47006   sed "$ac_vpsub
47007 $extrasub
47008 _ACEOF
47009 cat >>$CONFIG_STATUS <<\_ACEOF
47010 :t
47011 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
47012 s,@configure_input@,$configure_input,;t t
47013 s,@srcdir@,$ac_srcdir,;t t
47014 s,@abs_srcdir@,$ac_abs_srcdir,;t t
47015 s,@top_srcdir@,$ac_top_srcdir,;t t
47016 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
47017 s,@builddir@,$ac_builddir,;t t
47018 s,@abs_builddir@,$ac_abs_builddir,;t t
47019 s,@top_builddir@,$ac_top_builddir,;t t
47020 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
47021 s,@INSTALL@,$ac_INSTALL,;t t
47022 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
47023   rm -f $tmp/stdin
47024   if test x"$ac_file" != x-; then
47025     mv $tmp/out $ac_file
47026   else
47027     cat $tmp/out
47028     rm -f $tmp/out
47029   fi
47030
47031 done
47032 _ACEOF
47033 cat >>$CONFIG_STATUS <<\_ACEOF
47034
47035 #
47036 # CONFIG_HEADER section.
47037 #
47038
47039 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
47040 # NAME is the cpp macro being defined and VALUE is the value it is being given.
47041 #
47042 # ac_d sets the value in "#define NAME VALUE" lines.
47043 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
47044 ac_dB='[         ].*$,\1#\2'
47045 ac_dC=' '
47046 ac_dD=',;t'
47047 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
47048 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
47049 ac_uB='$,\1#\2define\3'
47050 ac_uC=' '
47051 ac_uD=',;t'
47052
47053 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
47054   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
47055   case $ac_file in
47056   - | *:- | *:-:* ) # input from stdin
47057         cat >$tmp/stdin
47058         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
47059         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
47060   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
47061         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
47062   * )   ac_file_in=$ac_file.in ;;
47063   esac
47064
47065   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
47066 echo "$as_me: creating $ac_file" >&6;}
47067
47068   # First look for the input files in the build tree, otherwise in the
47069   # src tree.
47070   ac_file_inputs=`IFS=:
47071     for f in $ac_file_in; do
47072       case $f in
47073       -) echo $tmp/stdin ;;
47074       [\\/$]*)
47075          # Absolute (can't be DOS-style, as IFS=:)
47076          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
47077 echo "$as_me: error: cannot find input file: $f" >&2;}
47078    { (exit 1); exit 1; }; }
47079          # Do quote $f, to prevent DOS paths from being IFS'd.
47080          echo "$f";;
47081       *) # Relative
47082          if test -f "$f"; then
47083            # Build tree
47084            echo "$f"
47085          elif test -f "$srcdir/$f"; then
47086            # Source tree
47087            echo "$srcdir/$f"
47088          else
47089            # /dev/null tree
47090            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
47091 echo "$as_me: error: cannot find input file: $f" >&2;}
47092    { (exit 1); exit 1; }; }
47093          fi;;
47094       esac
47095     done` || { (exit 1); exit 1; }
47096   # Remove the trailing spaces.
47097   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
47098
47099 _ACEOF
47100
47101 # Transform confdefs.h into two sed scripts, `conftest.defines' and
47102 # `conftest.undefs', that substitutes the proper values into
47103 # config.h.in to produce config.h.  The first handles `#define'
47104 # templates, and the second `#undef' templates.
47105 # And first: Protect against being on the right side of a sed subst in
47106 # config.status.  Protect against being in an unquoted here document
47107 # in config.status.
47108 rm -f conftest.defines conftest.undefs
47109 # Using a here document instead of a string reduces the quoting nightmare.
47110 # Putting comments in sed scripts is not portable.
47111 #
47112 # `end' is used to avoid that the second main sed command (meant for
47113 # 0-ary CPP macros) applies to n-ary macro definitions.
47114 # See the Autoconf documentation for `clear'.
47115 cat >confdef2sed.sed <<\_ACEOF
47116 s/[\\&,]/\\&/g
47117 s,[\\$`],\\&,g
47118 t clear
47119 : clear
47120 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
47121 t end
47122 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
47123 : end
47124 _ACEOF
47125 # If some macros were called several times there might be several times
47126 # the same #defines, which is useless.  Nevertheless, we may not want to
47127 # sort them, since we want the *last* AC-DEFINE to be honored.
47128 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
47129 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
47130 rm -f confdef2sed.sed
47131
47132 # This sed command replaces #undef with comments.  This is necessary, for
47133 # example, in the case of _POSIX_SOURCE, which is predefined and required
47134 # on some systems where configure will not decide to define it.
47135 cat >>conftest.undefs <<\_ACEOF
47136 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
47137 _ACEOF
47138
47139 # Break up conftest.defines because some shells have a limit on the size
47140 # of here documents, and old seds have small limits too (100 cmds).
47141 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
47142 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
47143 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
47144 echo '  :' >>$CONFIG_STATUS
47145 rm -f conftest.tail
47146 while grep . conftest.defines >/dev/null
47147 do
47148   # Write a limited-size here document to $tmp/defines.sed.
47149   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
47150   # Speed up: don't consider the non `#define' lines.
47151   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
47152   # Work around the forget-to-reset-the-flag bug.
47153   echo 't clr' >>$CONFIG_STATUS
47154   echo ': clr' >>$CONFIG_STATUS
47155   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
47156   echo 'CEOF
47157   sed -f $tmp/defines.sed $tmp/in >$tmp/out
47158   rm -f $tmp/in
47159   mv $tmp/out $tmp/in
47160 ' >>$CONFIG_STATUS
47161   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
47162   rm -f conftest.defines
47163   mv conftest.tail conftest.defines
47164 done
47165 rm -f conftest.defines
47166 echo '  fi # grep' >>$CONFIG_STATUS
47167 echo >>$CONFIG_STATUS
47168
47169 # Break up conftest.undefs because some shells have a limit on the size
47170 # of here documents, and old seds have small limits too (100 cmds).
47171 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
47172 rm -f conftest.tail
47173 while grep . conftest.undefs >/dev/null
47174 do
47175   # Write a limited-size here document to $tmp/undefs.sed.
47176   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
47177   # Speed up: don't consider the non `#undef'
47178   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
47179   # Work around the forget-to-reset-the-flag bug.
47180   echo 't clr' >>$CONFIG_STATUS
47181   echo ': clr' >>$CONFIG_STATUS
47182   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
47183   echo 'CEOF
47184   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
47185   rm -f $tmp/in
47186   mv $tmp/out $tmp/in
47187 ' >>$CONFIG_STATUS
47188   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
47189   rm -f conftest.undefs
47190   mv conftest.tail conftest.undefs
47191 done
47192 rm -f conftest.undefs
47193
47194 cat >>$CONFIG_STATUS <<\_ACEOF
47195   # Let's still pretend it is `configure' which instantiates (i.e., don't
47196   # use $as_me), people would be surprised to read:
47197   #    /* config.h.  Generated by config.status.  */
47198   if test x"$ac_file" = x-; then
47199     echo "/* Generated by configure.  */" >$tmp/config.h
47200   else
47201     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
47202   fi
47203   cat $tmp/in >>$tmp/config.h
47204   rm -f $tmp/in
47205   if test x"$ac_file" != x-; then
47206     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
47207       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
47208 echo "$as_me: $ac_file is unchanged" >&6;}
47209     else
47210       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
47211 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
47212          X"$ac_file" : 'X\(//\)[^/]' \| \
47213          X"$ac_file" : 'X\(//\)$' \| \
47214          X"$ac_file" : 'X\(/\)' \| \
47215          .     : '\(.\)' 2>/dev/null ||
47216 echo X"$ac_file" |
47217     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
47218           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
47219           /^X\(\/\/\)$/{ s//\1/; q; }
47220           /^X\(\/\).*/{ s//\1/; q; }
47221           s/.*/./; q'`
47222       { if $as_mkdir_p; then
47223     mkdir -p "$ac_dir"
47224   else
47225     as_dir="$ac_dir"
47226     as_dirs=
47227     while test ! -d "$as_dir"; do
47228       as_dirs="$as_dir $as_dirs"
47229       as_dir=`(dirname "$as_dir") 2>/dev/null ||
47230 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
47231          X"$as_dir" : 'X\(//\)[^/]' \| \
47232          X"$as_dir" : 'X\(//\)$' \| \
47233          X"$as_dir" : 'X\(/\)' \| \
47234          .     : '\(.\)' 2>/dev/null ||
47235 echo X"$as_dir" |
47236     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
47237           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
47238           /^X\(\/\/\)$/{ s//\1/; q; }
47239           /^X\(\/\).*/{ s//\1/; q; }
47240           s/.*/./; q'`
47241     done
47242     test ! -n "$as_dirs" || mkdir $as_dirs
47243   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
47244 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
47245    { (exit 1); exit 1; }; }; }
47246
47247       rm -f $ac_file
47248       mv $tmp/config.h $ac_file
47249     fi
47250   else
47251     cat $tmp/config.h
47252     rm -f $tmp/config.h
47253   fi
47254 # Compute $ac_file's index in $config_headers.
47255 _am_stamp_count=1
47256 for _am_header in $config_headers :; do
47257   case $_am_header in
47258     $ac_file | $ac_file:* )
47259       break ;;
47260     * )
47261       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
47262   esac
47263 done
47264 echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
47265 $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
47266          X$ac_file : 'X\(//\)[^/]' \| \
47267          X$ac_file : 'X\(//\)$' \| \
47268          X$ac_file : 'X\(/\)' \| \
47269          .     : '\(.\)' 2>/dev/null ||
47270 echo X$ac_file |
47271     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
47272           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
47273           /^X\(\/\/\)$/{ s//\1/; q; }
47274           /^X\(\/\).*/{ s//\1/; q; }
47275           s/.*/./; q'`/stamp-h$_am_stamp_count
47276 done
47277 _ACEOF
47278 cat >>$CONFIG_STATUS <<\_ACEOF
47279
47280 #
47281 # CONFIG_COMMANDS section.
47282 #
47283 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
47284   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
47285   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
47286   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
47287 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
47288          X"$ac_dest" : 'X\(//\)[^/]' \| \
47289          X"$ac_dest" : 'X\(//\)$' \| \
47290          X"$ac_dest" : 'X\(/\)' \| \
47291          .     : '\(.\)' 2>/dev/null ||
47292 echo X"$ac_dest" |
47293     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
47294           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
47295           /^X\(\/\/\)$/{ s//\1/; q; }
47296           /^X\(\/\).*/{ s//\1/; q; }
47297           s/.*/./; q'`
47298   { if $as_mkdir_p; then
47299     mkdir -p "$ac_dir"
47300   else
47301     as_dir="$ac_dir"
47302     as_dirs=
47303     while test ! -d "$as_dir"; do
47304       as_dirs="$as_dir $as_dirs"
47305       as_dir=`(dirname "$as_dir") 2>/dev/null ||
47306 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
47307          X"$as_dir" : 'X\(//\)[^/]' \| \
47308          X"$as_dir" : 'X\(//\)$' \| \
47309          X"$as_dir" : 'X\(/\)' \| \
47310          .     : '\(.\)' 2>/dev/null ||
47311 echo X"$as_dir" |
47312     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
47313           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
47314           /^X\(\/\/\)$/{ s//\1/; q; }
47315           /^X\(\/\).*/{ s//\1/; q; }
47316           s/.*/./; q'`
47317     done
47318     test ! -n "$as_dirs" || mkdir $as_dirs
47319   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
47320 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
47321    { (exit 1); exit 1; }; }; }
47322
47323   ac_builddir=.
47324
47325 if test "$ac_dir" != .; then
47326   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
47327   # A "../" for each directory in $ac_dir_suffix.
47328   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
47329 else
47330   ac_dir_suffix= ac_top_builddir=
47331 fi
47332
47333 case $srcdir in
47334   .)  # No --srcdir option.  We are building in place.
47335     ac_srcdir=.
47336     if test -z "$ac_top_builddir"; then
47337        ac_top_srcdir=.
47338     else
47339        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
47340     fi ;;
47341   [\\/]* | ?:[\\/]* )  # Absolute path.
47342     ac_srcdir=$srcdir$ac_dir_suffix;
47343     ac_top_srcdir=$srcdir ;;
47344   *) # Relative path.
47345     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
47346     ac_top_srcdir=$ac_top_builddir$srcdir ;;
47347 esac
47348
47349 # Do not use `cd foo && pwd` to compute absolute paths, because
47350 # the directories may not exist.
47351 case `pwd` in
47352 .) ac_abs_builddir="$ac_dir";;
47353 *)
47354   case "$ac_dir" in
47355   .) ac_abs_builddir=`pwd`;;
47356   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
47357   *) ac_abs_builddir=`pwd`/"$ac_dir";;
47358   esac;;
47359 esac
47360 case $ac_abs_builddir in
47361 .) ac_abs_top_builddir=${ac_top_builddir}.;;
47362 *)
47363   case ${ac_top_builddir}. in
47364   .) ac_abs_top_builddir=$ac_abs_builddir;;
47365   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
47366   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
47367   esac;;
47368 esac
47369 case $ac_abs_builddir in
47370 .) ac_abs_srcdir=$ac_srcdir;;
47371 *)
47372   case $ac_srcdir in
47373   .) ac_abs_srcdir=$ac_abs_builddir;;
47374   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
47375   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
47376   esac;;
47377 esac
47378 case $ac_abs_builddir in
47379 .) ac_abs_top_srcdir=$ac_top_srcdir;;
47380 *)
47381   case $ac_top_srcdir in
47382   .) ac_abs_top_srcdir=$ac_abs_builddir;;
47383   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
47384   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
47385   esac;;
47386 esac
47387
47388
47389   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
47390 echo "$as_me: executing $ac_dest commands" >&6;}
47391   case $ac_dest in
47392     depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
47393   # Strip MF so we end up with the name of the file.
47394   mf=`echo "$mf" | sed -e 's/:.*$//'`
47395   # Check whether this is an Automake generated Makefile or not.
47396   # We used to match only the files named `Makefile.in', but
47397   # some people rename them; so instead we look at the file content.
47398   # Grep'ing the first line is not enough: some people post-process
47399   # each Makefile.in and add a new line on top of each file to say so.
47400   # So let's grep whole file.
47401   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
47402     dirpart=`(dirname "$mf") 2>/dev/null ||
47403 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
47404          X"$mf" : 'X\(//\)[^/]' \| \
47405          X"$mf" : 'X\(//\)$' \| \
47406          X"$mf" : 'X\(/\)' \| \
47407          .     : '\(.\)' 2>/dev/null ||
47408 echo X"$mf" |
47409     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
47410           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
47411           /^X\(\/\/\)$/{ s//\1/; q; }
47412           /^X\(\/\).*/{ s//\1/; q; }
47413           s/.*/./; q'`
47414   else
47415     continue
47416   fi
47417   # Extract the definition of DEPDIR, am__include, and am__quote
47418   # from the Makefile without running `make'.
47419   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
47420   test -z "$DEPDIR" && continue
47421   am__include=`sed -n 's/^am__include = //p' < "$mf"`
47422   test -z "am__include" && continue
47423   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
47424   # When using ansi2knr, U may be empty or an underscore; expand it
47425   U=`sed -n 's/^U = //p' < "$mf"`
47426   # Find all dependency output files, they are included files with
47427   # $(DEPDIR) in their names.  We invoke sed twice because it is the
47428   # simplest approach to changing $(DEPDIR) to its actual value in the
47429   # expansion.
47430   for file in `sed -n "
47431     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
47432        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
47433     # Make sure the directory exists.
47434     test -f "$dirpart/$file" && continue
47435     fdir=`(dirname "$file") 2>/dev/null ||
47436 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
47437          X"$file" : 'X\(//\)[^/]' \| \
47438          X"$file" : 'X\(//\)$' \| \
47439          X"$file" : 'X\(/\)' \| \
47440          .     : '\(.\)' 2>/dev/null ||
47441 echo X"$file" |
47442     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
47443           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
47444           /^X\(\/\/\)$/{ s//\1/; q; }
47445           /^X\(\/\).*/{ s//\1/; q; }
47446           s/.*/./; q'`
47447     { if $as_mkdir_p; then
47448     mkdir -p $dirpart/$fdir
47449   else
47450     as_dir=$dirpart/$fdir
47451     as_dirs=
47452     while test ! -d "$as_dir"; do
47453       as_dirs="$as_dir $as_dirs"
47454       as_dir=`(dirname "$as_dir") 2>/dev/null ||
47455 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
47456          X"$as_dir" : 'X\(//\)[^/]' \| \
47457          X"$as_dir" : 'X\(//\)$' \| \
47458          X"$as_dir" : 'X\(/\)' \| \
47459          .     : '\(.\)' 2>/dev/null ||
47460 echo X"$as_dir" |
47461     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
47462           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
47463           /^X\(\/\/\)$/{ s//\1/; q; }
47464           /^X\(\/\).*/{ s//\1/; q; }
47465           s/.*/./; q'`
47466     done
47467     test ! -n "$as_dirs" || mkdir $as_dirs
47468   fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
47469 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
47470    { (exit 1); exit 1; }; }; }
47471
47472     # echo "creating $dirpart/$file"
47473     echo '# dummy' > "$dirpart/$file"
47474   done
47475 done
47476  ;;
47477     default )
47478 chmod +x tests/run
47479 date > stamp-h
47480 BACKENDSC="servers/slapd/backends.c"
47481 echo "Making $BACKENDSC"
47482 rm -f $BACKENDSC
47483 cat > $BACKENDSC << ENDX
47484 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
47485  *
47486  * Copyright 1998-2007 The OpenLDAP Foundation.
47487  * All rights reserved.
47488  *
47489  * Redistribution and use in source and binary forms, with or without
47490  * modification, are permitted only as authorized by the OpenLDAP
47491  * Public License.
47492  *
47493  * A copy of this license is available in the file LICENSE in the
47494  * top-level directory of the distribution or, alternatively, at
47495  * <http://www.OpenLDAP.org/license.html>.
47496  */
47497 /* This file is automatically generated by configure; please do not edit. */
47498
47499 #include "portable.h"
47500 #include "slap.h"
47501
47502 ENDX
47503 if test "${STATIC_BACKENDS}"; then
47504         for b in config ${STATIC_BACKENDS}; do
47505                 bb=`echo "${b}" | sed -e 's/back-//'`
47506                 cat >> $BACKENDSC << ENDX
47507 extern BI_init ${bb}_back_initialize;
47508 ENDX
47509         done
47510
47511         cat >> $BACKENDSC << ENDX
47512
47513 BackendInfo slap_binfo[] = {
47514 ENDX
47515
47516         for b in config ${STATIC_BACKENDS}; do
47517                 bb=`echo "${b}" | sed -e 's/back-//'`
47518                 echo "    Add ${bb} ..."
47519                 cat >> $BACKENDSC << ENDX
47520         { "${bb}", ${bb}_back_initialize },
47521 ENDX
47522         done
47523
47524         cat >> $BACKENDSC << ENDX
47525         { NULL, NULL },
47526 };
47527
47528 /* end of generated file */
47529 ENDX
47530 fi
47531 OVERLAYSC="servers/slapd/overlays/statover.c"
47532 echo "Making $OVERLAYSC"
47533 rm -f $OVERLAYSC
47534 cat > $OVERLAYSC << ENDX
47535 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
47536  *
47537  * Copyright 1998-2007 The OpenLDAP Foundation.
47538  * All rights reserved.
47539  *
47540  * Redistribution and use in source and binary forms, with or without
47541  * modification, are permitted only as authorized by the OpenLDAP
47542  * Public License.
47543  *
47544  * A copy of this license is available in the file LICENSE in the
47545  * top-level directory of the distribution or, alternatively, at
47546  * <http://www.OpenLDAP.org/license.html>.
47547  */
47548 /* This file is automatically generated by configure; please do not edit. */
47549
47550 #include "portable.h"
47551 #include "slap.h"
47552
47553 ENDX
47554 if test "${STATIC_OVERLAYS}"; then
47555         for o in ${STATIC_OVERLAYS}; do
47556                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
47557                 cat >> $OVERLAYSC << ENDX
47558 extern OV_init ${oo}_initialize;
47559 ENDX
47560         done
47561 fi
47562
47563 cat >> $OVERLAYSC << ENDX
47564
47565 OverlayInit slap_oinfo[] = {
47566 ENDX
47567
47568 if test "${STATIC_OVERLAYS}"; then
47569         for o in ${STATIC_OVERLAYS}; do
47570                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
47571                 echo "    Add ${oo} ..."
47572                 cat >> $OVERLAYSC << ENDX
47573         { "${oo}", ${oo}_initialize },
47574 ENDX
47575         done
47576 fi
47577
47578         cat >> $OVERLAYSC << ENDX
47579         { NULL, NULL },
47580 };
47581
47582 /* end of generated file */
47583 ENDX
47584
47585 echo Please run \"make depend\" to build dependencies
47586  ;;
47587   esac
47588 done
47589 _ACEOF
47590
47591 cat >>$CONFIG_STATUS <<\_ACEOF
47592
47593 { (exit 0); exit 0; }
47594 _ACEOF
47595 chmod +x $CONFIG_STATUS
47596 ac_clean_files=$ac_clean_files_save
47597
47598
47599 # configure is writing to config.log, and then calls config.status.
47600 # config.status does its own redirection, appending to config.log.
47601 # Unfortunately, on DOS this fails, as config.log is still kept open
47602 # by configure, so config.status won't be able to write to it; its
47603 # output is simply discarded.  So we exec the FD to /dev/null,
47604 # effectively closing config.log, so it can be properly (re)opened and
47605 # appended to by config.status.  When coming back to configure, we
47606 # need to make the FD available again.
47607 if test "$no_create" != yes; then
47608   ac_cs_success=:
47609   ac_config_status_args=
47610   test "$silent" = yes &&
47611     ac_config_status_args="$ac_config_status_args --quiet"
47612   exec 5>/dev/null
47613   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
47614   exec 5>>config.log
47615   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
47616   # would make configure fail if this is the last instruction.
47617   $ac_cs_success || { (exit 1); exit 1; }
47618 fi
47619