]> git.sur5r.net Git - openldap/blob - configure
tool_bind(): Do not use pointer to out-of-scope variable (ITS#4434, ppolicy)
[openldap] / configure
1 #! /bin/sh
2 # From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.631 2006/02/27 10:20:08 hyc Exp .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by GNU Autoconf 2.59.
5 #
6 # Copyright 1998-2006 The OpenLDAP Foundation. All rights reserved.
7 # Restrictions apply, see COPYRIGHT and LICENSE files.
8 #
9 # Copyright (C) 2003 Free Software Foundation, Inc.
10 # This configure script is free software; the Free Software Foundation
11 # gives unlimited permission to copy, distribute and modify it.
12 ## --------------------- ##
13 ## M4sh Initialization.  ##
14 ## --------------------- ##
15
16 # Be Bourne compatible
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18   emulate sh
19   NULLCMD=:
20   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21   # is contrary to our usage.  Disable this feature.
22   alias -g '${1+"$@"}'='"$@"'
23 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24   set -o posix
25 fi
26 DUALCASE=1; export DUALCASE # for MKS sh
27
28 # Support unset when possible.
29 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
30   as_unset=unset
31 else
32   as_unset=false
33 fi
34
35
36 # Work around bugs in pre-3.0 UWIN ksh.
37 $as_unset ENV MAIL MAILPATH
38 PS1='$ '
39 PS2='> '
40 PS4='+ '
41
42 # NLS nuisances.
43 for as_var in \
44   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
45   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
46   LC_TELEPHONE LC_TIME
47 do
48   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
49     eval $as_var=C; export $as_var
50   else
51     $as_unset $as_var
52   fi
53 done
54
55 # Required to use basename.
56 if expr a : '\(a\)' >/dev/null 2>&1; then
57   as_expr=expr
58 else
59   as_expr=false
60 fi
61
62 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
63   as_basename=basename
64 else
65   as_basename=false
66 fi
67
68
69 # Name of the executable.
70 as_me=`$as_basename "$0" ||
71 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
72          X"$0" : 'X\(//\)$' \| \
73          X"$0" : 'X\(/\)$' \| \
74          .     : '\(.\)' 2>/dev/null ||
75 echo X/"$0" |
76     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
77           /^X\/\(\/\/\)$/{ s//\1/; q; }
78           /^X\/\(\/\).*/{ s//\1/; q; }
79           s/.*/./; q'`
80
81
82 # PATH needs CR, and LINENO needs CR and PATH.
83 # Avoid depending upon Character Ranges.
84 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
85 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
86 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
87 as_cr_digits='0123456789'
88 as_cr_alnum=$as_cr_Letters$as_cr_digits
89
90 # The user is always right.
91 if test "${PATH_SEPARATOR+set}" != set; then
92   echo "#! /bin/sh" >conf$$.sh
93   echo  "exit 0"   >>conf$$.sh
94   chmod +x conf$$.sh
95   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
96     PATH_SEPARATOR=';'
97   else
98     PATH_SEPARATOR=:
99   fi
100   rm -f conf$$.sh
101 fi
102
103
104   as_lineno_1=$LINENO
105   as_lineno_2=$LINENO
106   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
107   test "x$as_lineno_1" != "x$as_lineno_2" &&
108   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
109   # Find who we are.  Look in the path if we contain no path at all
110   # relative or not.
111   case $0 in
112     *[\\/]* ) as_myself=$0 ;;
113     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
114 for as_dir in $PATH
115 do
116   IFS=$as_save_IFS
117   test -z "$as_dir" && as_dir=.
118   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
119 done
120
121        ;;
122   esac
123   # We did not find ourselves, most probably we were run as `sh COMMAND'
124   # in which case we are not to be found in the path.
125   if test "x$as_myself" = x; then
126     as_myself=$0
127   fi
128   if test ! -f "$as_myself"; then
129     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
130    { (exit 1); exit 1; }; }
131   fi
132   case $CONFIG_SHELL in
133   '')
134     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
135 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
136 do
137   IFS=$as_save_IFS
138   test -z "$as_dir" && as_dir=.
139   for as_base in sh bash ksh sh5; do
140          case $as_dir in
141          /*)
142            if ("$as_dir/$as_base" -c '
143   as_lineno_1=$LINENO
144   as_lineno_2=$LINENO
145   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
146   test "x$as_lineno_1" != "x$as_lineno_2" &&
147   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
148              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
149              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
150              CONFIG_SHELL=$as_dir/$as_base
151              export CONFIG_SHELL
152              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
153            fi;;
154          esac
155        done
156 done
157 ;;
158   esac
159
160   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
161   # uniformly replaced by the line number.  The first 'sed' inserts a
162   # line-number line before each line; the second 'sed' does the real
163   # work.  The second script uses 'N' to pair each line-number line
164   # with the numbered line, and appends trailing '-' during
165   # substitution so that $LINENO is not a special case at line end.
166   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
167   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
168   sed '=' <$as_myself |
169     sed '
170       N
171       s,$,-,
172       : loop
173       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
174       t loop
175       s,-$,,
176       s,^['$as_cr_digits']*\n,,
177     ' >$as_me.lineno &&
178   chmod +x $as_me.lineno ||
179     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
180    { (exit 1); exit 1; }; }
181
182   # Don't try to exec as it changes $[0], causing all sort of problems
183   # (the dirname of $[0] is not the place where we might find the
184   # original and so on.  Autoconf is especially sensible to this).
185   . ./$as_me.lineno
186   # Exit status is that of the last command.
187   exit
188 }
189
190
191 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
192   *c*,-n*) ECHO_N= ECHO_C='
193 ' ECHO_T='      ' ;;
194   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
195   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
196 esac
197
198 if expr a : '\(a\)' >/dev/null 2>&1; then
199   as_expr=expr
200 else
201   as_expr=false
202 fi
203
204 rm -f conf$$ conf$$.exe conf$$.file
205 echo >conf$$.file
206 if ln -s conf$$.file conf$$ 2>/dev/null; then
207   # We could just check for DJGPP; but this test a) works b) is more generic
208   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
209   if test -f conf$$.exe; then
210     # Don't use ln at all; we don't have any links
211     as_ln_s='cp -p'
212   else
213     as_ln_s='ln -s'
214   fi
215 elif ln conf$$.file conf$$ 2>/dev/null; then
216   as_ln_s=ln
217 else
218   as_ln_s='cp -p'
219 fi
220 rm -f conf$$ conf$$.exe conf$$.file
221
222 if mkdir -p . 2>/dev/null; then
223   as_mkdir_p=:
224 else
225   test -d ./-p && rmdir ./-p
226   as_mkdir_p=false
227 fi
228
229 as_executable_p="test -f"
230
231 # Sed expression to map a string onto a valid CPP name.
232 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
233
234 # Sed expression to map a string onto a valid variable name.
235 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
236
237
238 # IFS
239 # We need space, tab and new line, in precisely that order.
240 as_nl='
241 '
242 IFS="   $as_nl"
243
244 # CDPATH.
245 $as_unset CDPATH
246
247
248
249 # Check that we are running under the correct shell.
250 SHELL=${CONFIG_SHELL-/bin/sh}
251
252 case X$ECHO in
253 X*--fallback-echo)
254   # Remove one level of quotation (which was required for Make).
255   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
256   ;;
257 esac
258
259 echo=${ECHO-echo}
260 if test "X$1" = X--no-reexec; then
261   # Discard the --no-reexec flag, and continue.
262   shift
263 elif test "X$1" = X--fallback-echo; then
264   # Avoid inline document here, it may be left over
265   :
266 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
267   # Yippee, $echo works!
268   :
269 else
270   # Restart under the correct shell.
271   exec $SHELL "$0" --no-reexec ${1+"$@"}
272 fi
273
274 if test "X$1" = X--fallback-echo; then
275   # used as fallback echo
276   shift
277   cat <<EOF
278 $*
279 EOF
280   exit 0
281 fi
282
283 # The HP-UX ksh and POSIX shell print the target directory to stdout
284 # if CDPATH is set.
285 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
286
287 if test -z "$ECHO"; then
288 if test "X${echo_test_string+set}" != Xset; then
289 # find a string as large as possible, as long as the shell can cope with it
290   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
291     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
292     if (echo_test_string=`eval $cmd`) 2>/dev/null &&
293        echo_test_string=`eval $cmd` &&
294        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
295     then
296       break
297     fi
298   done
299 fi
300
301 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
302    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
303    test "X$echo_testing_string" = "X$echo_test_string"; then
304   :
305 else
306   # The Solaris, AIX, and Digital Unix default echo programs unquote
307   # backslashes.  This makes it impossible to quote backslashes using
308   #   echo "$something" | sed 's/\\/\\\\/g'
309   #
310   # So, first we look for a working echo in the user's PATH.
311
312   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
313   for dir in $PATH /usr/ucb; do
314     IFS="$lt_save_ifs"
315     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
316        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
317        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
318        test "X$echo_testing_string" = "X$echo_test_string"; then
319       echo="$dir/echo"
320       break
321     fi
322   done
323   IFS="$lt_save_ifs"
324
325   if test "X$echo" = Xecho; then
326     # We didn't find a better echo, so look for alternatives.
327     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
328        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
329        test "X$echo_testing_string" = "X$echo_test_string"; then
330       # This shell has a builtin print -r that does the trick.
331       echo='print -r'
332     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
333          test "X$CONFIG_SHELL" != X/bin/ksh; then
334       # If we have ksh, try running configure again with it.
335       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
336       export ORIGINAL_CONFIG_SHELL
337       CONFIG_SHELL=/bin/ksh
338       export CONFIG_SHELL
339       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
340     else
341       # Try using printf.
342       echo='printf %s\n'
343       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
344          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
345          test "X$echo_testing_string" = "X$echo_test_string"; then
346         # Cool, printf works
347         :
348       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
349            test "X$echo_testing_string" = 'X\t' &&
350            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
351            test "X$echo_testing_string" = "X$echo_test_string"; then
352         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
353         export CONFIG_SHELL
354         SHELL="$CONFIG_SHELL"
355         export SHELL
356         echo="$CONFIG_SHELL $0 --fallback-echo"
357       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
358            test "X$echo_testing_string" = 'X\t' &&
359            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
360            test "X$echo_testing_string" = "X$echo_test_string"; then
361         echo="$CONFIG_SHELL $0 --fallback-echo"
362       else
363         # maybe with a smaller string...
364         prev=:
365
366         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
367           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
368           then
369             break
370           fi
371           prev="$cmd"
372         done
373
374         if test "$prev" != 'sed 50q "$0"'; then
375           echo_test_string=`eval $prev`
376           export echo_test_string
377           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
378         else
379           # Oops.  We lost completely, so just stick with echo.
380           echo=echo
381         fi
382       fi
383     fi
384   fi
385 fi
386 fi
387
388 # Copy echo and quote the copy suitably for passing to libtool from
389 # the Makefile, instead of quoting the original, which is used later.
390 ECHO=$echo
391 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
392    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
393 fi
394
395
396
397
398 # Name of the host.
399 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
400 # so uname gets run too.
401 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
402
403 exec 6>&1
404
405 #
406 # Initializations.
407 #
408 ac_default_prefix=/usr/local
409 ac_config_libobj_dir=.
410 cross_compiling=no
411 subdirs=
412 MFLAGS=
413 MAKEFLAGS=
414 SHELL=${CONFIG_SHELL-/bin/sh}
415
416 # Maximum number of lines to put in a shell here document.
417 # This variable seems obsolete.  It should probably be removed, and
418 # only ac_max_sed_lines should be used.
419 : ${ac_max_here_lines=38}
420
421 # Identity of this package.
422 PACKAGE_NAME=
423 PACKAGE_TARNAME=
424 PACKAGE_VERSION=
425 PACKAGE_STRING=
426 PACKAGE_BUGREPORT=
427
428 ac_unique_file="OpenLDAP"
429 ac_unique_file="build/version.sh"
430 ac_default_prefix=/usr/local
431 # Factoring default headers for most tests.
432 ac_includes_default="\
433 #include <stdio.h>
434 #if HAVE_SYS_TYPES_H
435 # include <sys/types.h>
436 #endif
437 #if HAVE_SYS_STAT_H
438 # include <sys/stat.h>
439 #endif
440 #if STDC_HEADERS
441 # include <stdlib.h>
442 # include <stddef.h>
443 #else
444 # if HAVE_STDLIB_H
445 #  include <stdlib.h>
446 # endif
447 #endif
448 #if HAVE_STRING_H
449 # if !STDC_HEADERS && HAVE_MEMORY_H
450 #  include <memory.h>
451 # endif
452 # include <string.h>
453 #endif
454 #if HAVE_STRINGS_H
455 # include <strings.h>
456 #endif
457 #if HAVE_INTTYPES_H
458 # include <inttypes.h>
459 #else
460 # if HAVE_STDINT_H
461 #  include <stdint.h>
462 # endif
463 #endif
464 #if HAVE_UNISTD_H
465 # include <unistd.h>
466 #endif"
467
468 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar OPENLDAP_LIBRELEASE OPENLDAP_LIBVERSION OPENLDAP_RELEASE_DATE top_builddir ldap_subdir CC AR CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO ac_ct_AR RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CPP LIBTOOL PERLBIN OL_MKDEP OL_MKDEP_FLAGS LTSTATIC LIBOBJS LIBSRCS PLAT WITH_SASL WITH_TLS WITH_MODULES_ENABLED WITH_ACI_ENABLED BUILD_THREAD BUILD_LIBS_DYNAMIC BUILD_SLAPD BUILD_SLAPI SLAPD_SLAPI_DEPEND BUILD_BDB BUILD_DNSSRV BUILD_HDB BUILD_LDAP BUILD_LDBM BUILD_META BUILD_MONITOR BUILD_NULL BUILD_PASSWD BUILD_RELAY BUILD_PERL BUILD_SHELL BUILD_SQL BUILD_ACCESSLOG BUILD_AUDITLOG BUILD_DDS BUILD_DENYOP BUILD_DYNGROUP BUILD_DYNLIST BUILD_LASTMOD BUILD_PPOLICY BUILD_PROXYCACHE BUILD_REFINT BUILD_RETCODE BUILD_RWM BUILD_SEQMOD BUILD_SYNCPROV BUILD_TRANSLUCENT BUILD_UNIQUE BUILD_VALSORT BUILD_SLURPD LDAP_LIBS SLAPD_LIBS SLURPD_LIBS LDBM_LIBS LTHREAD_LIBS LUTIL_LIBS WRAP_LIBS SLAPD_MODULES_CPPFLAGS SLAPD_MODULES_LDFLAGS SLAPD_NO_STATIC SLAPD_STATIC_BACKENDS SLAPD_DYNAMIC_BACKENDS SLAPD_STATIC_OVERLAYS SLAPD_DYNAMIC_OVERLAYS PERL_CPPFLAGS SLAPD_PERL_LDFLAGS MOD_PERL_LDFLAGS KRB4_LIBS KRB5_LIBS SASL_LIBS TLS_LIBS MODULES_LIBS SLAPI_LIBS LIBSLAPI LIBSLAPITOOLS AUTH_LIBS ICU_LIBS SLAPD_SLP_LIBS SLAPD_GMP_LIBS SLAPD_SQL_LDFLAGS SLAPD_SQL_LIBS SLAPD_SQL_INCLUDES LTLIBOBJS'
469 ac_subst_files=''
470
471 # Initialize some variables set by options.
472 ac_init_help=
473 ac_init_version=false
474 # The variables have the same names as the options, with
475 # dashes changed to underlines.
476 cache_file=/dev/null
477 exec_prefix=NONE
478 no_create=
479 no_recursion=
480 prefix=NONE
481 program_prefix=NONE
482 program_suffix=NONE
483 program_transform_name=s,x,x,
484 silent=
485 site=
486 srcdir=
487 verbose=
488 x_includes=NONE
489 x_libraries=NONE
490
491 # Installation directory options.
492 # These are left unexpanded so users can "make install exec_prefix=/foo"
493 # and all the variables that are supposed to be based on exec_prefix
494 # by default will actually change.
495 # Use braces instead of parens because sh, perl, etc. also accept them.
496 bindir='${exec_prefix}/bin'
497 sbindir='${exec_prefix}/sbin'
498 libexecdir='${exec_prefix}/libexec'
499 datadir='${prefix}/share'
500 sysconfdir='${prefix}/etc'
501 sharedstatedir='${prefix}/com'
502 localstatedir='${prefix}/var'
503 libdir='${exec_prefix}/lib'
504 includedir='${prefix}/include'
505 oldincludedir='/usr/include'
506 infodir='${prefix}/info'
507 mandir='${prefix}/man'
508
509 ac_prev=
510 for ac_option
511 do
512   # If the previous option needs an argument, assign it.
513   if test -n "$ac_prev"; then
514     eval "$ac_prev=\$ac_option"
515     ac_prev=
516     continue
517   fi
518
519   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
520
521   # Accept the important Cygnus configure options, so we can diagnose typos.
522
523   case $ac_option in
524
525   -bindir | --bindir | --bindi | --bind | --bin | --bi)
526     ac_prev=bindir ;;
527   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
528     bindir=$ac_optarg ;;
529
530   -build | --build | --buil | --bui | --bu)
531     ac_prev=build_alias ;;
532   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
533     build_alias=$ac_optarg ;;
534
535   -cache-file | --cache-file | --cache-fil | --cache-fi \
536   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
537     ac_prev=cache_file ;;
538   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
539   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
540     cache_file=$ac_optarg ;;
541
542   --config-cache | -C)
543     cache_file=config.cache ;;
544
545   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
546     ac_prev=datadir ;;
547   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
548   | --da=*)
549     datadir=$ac_optarg ;;
550
551   -disable-* | --disable-*)
552     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
553     # Reject names that are not valid shell variable names.
554     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
555       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
556    { (exit 1); exit 1; }; }
557     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
558     eval "enable_$ac_feature=no" ;;
559
560   -enable-* | --enable-*)
561     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
562     # Reject names that are not valid shell variable names.
563     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
564       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
565    { (exit 1); exit 1; }; }
566     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
567     case $ac_option in
568       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
569       *) ac_optarg=yes ;;
570     esac
571     eval "enable_$ac_feature='$ac_optarg'" ;;
572
573   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
574   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
575   | --exec | --exe | --ex)
576     ac_prev=exec_prefix ;;
577   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
578   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
579   | --exec=* | --exe=* | --ex=*)
580     exec_prefix=$ac_optarg ;;
581
582   -gas | --gas | --ga | --g)
583     # Obsolete; use --with-gas.
584     with_gas=yes ;;
585
586   -help | --help | --hel | --he | -h)
587     ac_init_help=long ;;
588   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
589     ac_init_help=recursive ;;
590   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
591     ac_init_help=short ;;
592
593   -host | --host | --hos | --ho)
594     ac_prev=host_alias ;;
595   -host=* | --host=* | --hos=* | --ho=*)
596     host_alias=$ac_optarg ;;
597
598   -includedir | --includedir | --includedi | --included | --include \
599   | --includ | --inclu | --incl | --inc)
600     ac_prev=includedir ;;
601   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
602   | --includ=* | --inclu=* | --incl=* | --inc=*)
603     includedir=$ac_optarg ;;
604
605   -infodir | --infodir | --infodi | --infod | --info | --inf)
606     ac_prev=infodir ;;
607   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
608     infodir=$ac_optarg ;;
609
610   -libdir | --libdir | --libdi | --libd)
611     ac_prev=libdir ;;
612   -libdir=* | --libdir=* | --libdi=* | --libd=*)
613     libdir=$ac_optarg ;;
614
615   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
616   | --libexe | --libex | --libe)
617     ac_prev=libexecdir ;;
618   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
619   | --libexe=* | --libex=* | --libe=*)
620     libexecdir=$ac_optarg ;;
621
622   -localstatedir | --localstatedir | --localstatedi | --localstated \
623   | --localstate | --localstat | --localsta | --localst \
624   | --locals | --local | --loca | --loc | --lo)
625     ac_prev=localstatedir ;;
626   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
627   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
628   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
629     localstatedir=$ac_optarg ;;
630
631   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
632     ac_prev=mandir ;;
633   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
634     mandir=$ac_optarg ;;
635
636   -nfp | --nfp | --nf)
637     # Obsolete; use --without-fp.
638     with_fp=no ;;
639
640   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
641   | --no-cr | --no-c | -n)
642     no_create=yes ;;
643
644   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
645   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
646     no_recursion=yes ;;
647
648   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
649   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
650   | --oldin | --oldi | --old | --ol | --o)
651     ac_prev=oldincludedir ;;
652   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
653   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
654   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
655     oldincludedir=$ac_optarg ;;
656
657   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
658     ac_prev=prefix ;;
659   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
660     prefix=$ac_optarg ;;
661
662   -program-prefix | --program-prefix | --program-prefi | --program-pref \
663   | --program-pre | --program-pr | --program-p)
664     ac_prev=program_prefix ;;
665   -program-prefix=* | --program-prefix=* | --program-prefi=* \
666   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
667     program_prefix=$ac_optarg ;;
668
669   -program-suffix | --program-suffix | --program-suffi | --program-suff \
670   | --program-suf | --program-su | --program-s)
671     ac_prev=program_suffix ;;
672   -program-suffix=* | --program-suffix=* | --program-suffi=* \
673   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
674     program_suffix=$ac_optarg ;;
675
676   -program-transform-name | --program-transform-name \
677   | --program-transform-nam | --program-transform-na \
678   | --program-transform-n | --program-transform- \
679   | --program-transform | --program-transfor \
680   | --program-transfo | --program-transf \
681   | --program-trans | --program-tran \
682   | --progr-tra | --program-tr | --program-t)
683     ac_prev=program_transform_name ;;
684   -program-transform-name=* | --program-transform-name=* \
685   | --program-transform-nam=* | --program-transform-na=* \
686   | --program-transform-n=* | --program-transform-=* \
687   | --program-transform=* | --program-transfor=* \
688   | --program-transfo=* | --program-transf=* \
689   | --program-trans=* | --program-tran=* \
690   | --progr-tra=* | --program-tr=* | --program-t=*)
691     program_transform_name=$ac_optarg ;;
692
693   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
694   | -silent | --silent | --silen | --sile | --sil)
695     silent=yes ;;
696
697   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
698     ac_prev=sbindir ;;
699   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
700   | --sbi=* | --sb=*)
701     sbindir=$ac_optarg ;;
702
703   -sharedstatedir | --sharedstatedir | --sharedstatedi \
704   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
705   | --sharedst | --shareds | --shared | --share | --shar \
706   | --sha | --sh)
707     ac_prev=sharedstatedir ;;
708   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
709   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
710   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
711   | --sha=* | --sh=*)
712     sharedstatedir=$ac_optarg ;;
713
714   -site | --site | --sit)
715     ac_prev=site ;;
716   -site=* | --site=* | --sit=*)
717     site=$ac_optarg ;;
718
719   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
720     ac_prev=srcdir ;;
721   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
722     srcdir=$ac_optarg ;;
723
724   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
725   | --syscon | --sysco | --sysc | --sys | --sy)
726     ac_prev=sysconfdir ;;
727   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
728   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
729     sysconfdir=$ac_optarg ;;
730
731   -target | --target | --targe | --targ | --tar | --ta | --t)
732     ac_prev=target_alias ;;
733   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
734     target_alias=$ac_optarg ;;
735
736   -v | -verbose | --verbose | --verbos | --verbo | --verb)
737     verbose=yes ;;
738
739   -version | --version | --versio | --versi | --vers | -V)
740     ac_init_version=: ;;
741
742   -with-* | --with-*)
743     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
744     # Reject names that are not valid shell variable names.
745     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
746       { echo "$as_me: error: invalid package name: $ac_package" >&2
747    { (exit 1); exit 1; }; }
748     ac_package=`echo $ac_package| sed 's/-/_/g'`
749     case $ac_option in
750       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
751       *) ac_optarg=yes ;;
752     esac
753     eval "with_$ac_package='$ac_optarg'" ;;
754
755   -without-* | --without-*)
756     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
757     # Reject names that are not valid shell variable names.
758     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
759       { echo "$as_me: error: invalid package name: $ac_package" >&2
760    { (exit 1); exit 1; }; }
761     ac_package=`echo $ac_package | sed 's/-/_/g'`
762     eval "with_$ac_package=no" ;;
763
764   --x)
765     # Obsolete; use --with-x.
766     with_x=yes ;;
767
768   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
769   | --x-incl | --x-inc | --x-in | --x-i)
770     ac_prev=x_includes ;;
771   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
772   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
773     x_includes=$ac_optarg ;;
774
775   -x-libraries | --x-libraries | --x-librarie | --x-librari \
776   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
777     ac_prev=x_libraries ;;
778   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
779   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
780     x_libraries=$ac_optarg ;;
781
782   -*) { echo "$as_me: error: unrecognized option: $ac_option
783 Try \`$0 --help' for more information." >&2
784    { (exit 1); exit 1; }; }
785     ;;
786
787   *=*)
788     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
789     # Reject names that are not valid shell variable names.
790     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
791       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
792    { (exit 1); exit 1; }; }
793     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
794     eval "$ac_envvar='$ac_optarg'"
795     export $ac_envvar ;;
796
797   *)
798     # FIXME: should be removed in autoconf 3.0.
799     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
800     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
801       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
802     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
803     ;;
804
805   esac
806 done
807
808 if test -n "$ac_prev"; then
809   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
810   { echo "$as_me: error: missing argument to $ac_option" >&2
811    { (exit 1); exit 1; }; }
812 fi
813
814 # Be sure to have absolute paths.
815 for ac_var in exec_prefix prefix
816 do
817   eval ac_val=$`echo $ac_var`
818   case $ac_val in
819     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
820     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
821    { (exit 1); exit 1; }; };;
822   esac
823 done
824
825 # Be sure to have absolute paths.
826 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
827               localstatedir libdir includedir oldincludedir infodir mandir
828 do
829   eval ac_val=$`echo $ac_var`
830   case $ac_val in
831     [\\/$]* | ?:[\\/]* ) ;;
832     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
833    { (exit 1); exit 1; }; };;
834   esac
835 done
836
837 # There might be people who depend on the old broken behavior: `$host'
838 # used to hold the argument of --host etc.
839 # FIXME: To remove some day.
840 build=$build_alias
841 host=$host_alias
842 target=$target_alias
843
844 # FIXME: To remove some day.
845 if test "x$host_alias" != x; then
846   if test "x$build_alias" = x; then
847     cross_compiling=maybe
848     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
849     If a cross compiler is detected then cross compile mode will be used." >&2
850   elif test "x$build_alias" != "x$host_alias"; then
851     cross_compiling=yes
852   fi
853 fi
854
855 ac_tool_prefix=
856 test -n "$host_alias" && ac_tool_prefix=$host_alias-
857
858 test "$silent" = yes && exec 6>/dev/null
859
860
861 # Find the source files, if location was not specified.
862 if test -z "$srcdir"; then
863   ac_srcdir_defaulted=yes
864   # Try the directory containing this script, then its parent.
865   ac_confdir=`(dirname "$0") 2>/dev/null ||
866 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
867          X"$0" : 'X\(//\)[^/]' \| \
868          X"$0" : 'X\(//\)$' \| \
869          X"$0" : 'X\(/\)' \| \
870          .     : '\(.\)' 2>/dev/null ||
871 echo X"$0" |
872     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
873           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
874           /^X\(\/\/\)$/{ s//\1/; q; }
875           /^X\(\/\).*/{ s//\1/; q; }
876           s/.*/./; q'`
877   srcdir=$ac_confdir
878   if test ! -r $srcdir/$ac_unique_file; then
879     srcdir=..
880   fi
881 else
882   ac_srcdir_defaulted=no
883 fi
884 if test ! -r $srcdir/$ac_unique_file; then
885   if test "$ac_srcdir_defaulted" = yes; then
886     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
887    { (exit 1); exit 1; }; }
888   else
889     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
890    { (exit 1); exit 1; }; }
891   fi
892 fi
893 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
894   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
895    { (exit 1); exit 1; }; }
896 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
897 ac_env_build_alias_set=${build_alias+set}
898 ac_env_build_alias_value=$build_alias
899 ac_cv_env_build_alias_set=${build_alias+set}
900 ac_cv_env_build_alias_value=$build_alias
901 ac_env_host_alias_set=${host_alias+set}
902 ac_env_host_alias_value=$host_alias
903 ac_cv_env_host_alias_set=${host_alias+set}
904 ac_cv_env_host_alias_value=$host_alias
905 ac_env_target_alias_set=${target_alias+set}
906 ac_env_target_alias_value=$target_alias
907 ac_cv_env_target_alias_set=${target_alias+set}
908 ac_cv_env_target_alias_value=$target_alias
909 ac_env_CC_set=${CC+set}
910 ac_env_CC_value=$CC
911 ac_cv_env_CC_set=${CC+set}
912 ac_cv_env_CC_value=$CC
913 ac_env_CFLAGS_set=${CFLAGS+set}
914 ac_env_CFLAGS_value=$CFLAGS
915 ac_cv_env_CFLAGS_set=${CFLAGS+set}
916 ac_cv_env_CFLAGS_value=$CFLAGS
917 ac_env_LDFLAGS_set=${LDFLAGS+set}
918 ac_env_LDFLAGS_value=$LDFLAGS
919 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
920 ac_cv_env_LDFLAGS_value=$LDFLAGS
921 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
922 ac_env_CPPFLAGS_value=$CPPFLAGS
923 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
924 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
925 ac_env_CPP_set=${CPP+set}
926 ac_env_CPP_value=$CPP
927 ac_cv_env_CPP_set=${CPP+set}
928 ac_cv_env_CPP_value=$CPP
929
930 #
931 # Report the --help message.
932 #
933 if test "$ac_init_help" = "long"; then
934   # Omit some internal or obsolete options to make the list less imposing.
935   # This message is too long to be a string in the A/UX 3.1 sh.
936   cat <<_ACEOF
937 \`configure' configures this package to adapt to many kinds of systems.
938
939 Usage: $0 [OPTION]... [VAR=VALUE]...
940
941 To assign environment variables (e.g., CC, CFLAGS...), specify them as
942 VAR=VALUE.  See below for descriptions of some of the useful variables.
943
944 Defaults for the options are specified in brackets.
945
946 Configuration:
947   -h, --help              display this help and exit
948       --help=short        display options specific to this package
949       --help=recursive    display the short help of all the included packages
950   -V, --version           display version information and exit
951   -q, --quiet, --silent   do not print \`checking...' messages
952       --cache-file=FILE   cache test results in FILE [disabled]
953   -C, --config-cache      alias for \`--cache-file=config.cache'
954   -n, --no-create         do not create output files
955       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
956
957 _ACEOF
958
959   cat <<_ACEOF
960 Installation directories:
961   --prefix=PREFIX         install architecture-independent files in PREFIX
962                           [$ac_default_prefix]
963   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
964                           [PREFIX]
965
966 By default, \`make install' will install all the files in
967 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
968 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
969 for instance \`--prefix=\$HOME'.
970
971 For better control, use the options below.
972
973 Fine tuning of the installation directories:
974   --bindir=DIR           user executables [EPREFIX/bin]
975   --sbindir=DIR          system admin executables [EPREFIX/sbin]
976   --libexecdir=DIR       program executables [EPREFIX/libexec]
977   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
978   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
979   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
980   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
981   --libdir=DIR           object code libraries [EPREFIX/lib]
982   --includedir=DIR       C header files [PREFIX/include]
983   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
984   --infodir=DIR          info documentation [PREFIX/info]
985   --mandir=DIR           man documentation [PREFIX/man]
986 _ACEOF
987
988   cat <<\_ACEOF
989
990 Program names:
991   --program-prefix=PREFIX            prepend PREFIX to installed program names
992   --program-suffix=SUFFIX            append SUFFIX to installed program names
993   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
994
995 System types:
996   --build=BUILD     configure for building on BUILD [guessed]
997   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
998   --target=TARGET   configure for building compilers for TARGET [HOST]
999 _ACEOF
1000 fi
1001
1002 if test -n "$ac_init_help"; then
1003
1004   cat <<\_ACEOF
1005
1006 Optional Features:
1007   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1008   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1009   --enable-debug          enable debugging no|yes|traditional [yes]
1010   --enable-dynamic        enable linking built binaries with dynamic libs [no]
1011   --enable-syslog         enable syslog support [auto]
1012   --enable-proctitle      enable proctitle support [yes]
1013   --enable-ipv6           enable IPv6 support [auto]
1014   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]
1015
1016 SLAPD (Standalone LDAP Daemon) Options:
1017   --enable-slapd          enable building slapd [yes]
1018     --enable-dynacl       enable run-time loadable ACL support (experimental) [no]
1019     --enable-aci          enable per-object ACIs (experimental) no|yes|mod [no]
1020     --enable-cleartext    enable cleartext passwords [yes]
1021     --enable-crypt        enable crypt(3) passwords [no]
1022     --enable-lmpasswd     enable LAN Manager passwords [no]
1023     --enable-spasswd      enable (Cyrus) SASL password verification [no]
1024     --enable-modules      enable dynamic module support [no]
1025     --enable-rewrite      enable DN rewriting in back-ldap and rwm overlay [auto]
1026     --enable-rlookups     enable reverse lookups of client hostnames [no]
1027     --enable-slapi        enable SLAPI support (experimental) [no]
1028     --enable-slp          enable SLPv2 support [no]
1029     --enable-wrappers     enable tcp wrapper support [no]
1030
1031 SLAPD Backend Options:
1032     --enable-backends     enable all available backends no|yes|mod
1033     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]
1034     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]
1035     --enable-hdb          enable Hierarchical DB backend no|yes|mod [yes]
1036     --enable-ldap         enable ldap backend no|yes|mod [no]
1037     --enable-ldbm         enable ldbm backend no|yes|mod [no]
1038       --enable-ldbm-api   use LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]
1039       --enable-ldbm-type  use LDBM type auto|btree|hash [auto]
1040     --enable-meta         enable metadirectory backend no|yes|mod [no]
1041     --enable-monitor      enable monitor backend no|yes|mod [yes]
1042     --enable-null         enable null backend no|yes|mod [no]
1043     --enable-passwd       enable passwd backend no|yes|mod [no]
1044     --enable-perl         enable perl backend no|yes|mod [no]
1045     --enable-relay        enable relay backend no|yes|mod [yes]
1046     --enable-shell        enable shell backend no|yes|mod [no]
1047     --enable-sql          enable sql backend no|yes|mod [no]
1048
1049 SLAPD Overlay Options:
1050     --enable-overlays     enable all available overlays no|yes|mod
1051     --enable-accesslog    In-Directory Access Logging overlay no|yes|mod [no]
1052     --enable-auditlog     Audit Logging overlay no|yes|mod [no]
1053     --enable-dds          Dynamic Directory Services overlay no|yes|mod [no]
1054     --enable-denyop       Deny Operation overlay no|yes|mod [no]
1055     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]
1056     --enable-dynlist      Dynamic List overlay no|yes|mod [no]
1057     --enable-lastmod      Last Modification overlay no|yes|mod [no]
1058     --enable-ppolicy      Password Policy overlay no|yes|mod [no]
1059     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]
1060     --enable-refint       Referential Integrity overlay no|yes|mod [no]
1061     --enable-retcode      Return Code testing overlay no|yes|mod [no]
1062     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]
1063     --enable-seqmod       Sequential Modify overlay no|yes|mod [yes]
1064     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [yes]
1065     --enable-translucent  Translucent Proxy overlay no|yes|mod [no]
1066     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]
1067     --enable-valsort      Value Sorting overlay no|yes|mod [no]
1068
1069 SLURPD (Replication Daemon) Options:
1070   --enable-slurpd         enable building slurpd [auto]
1071
1072 Library Generation & Linking Options
1073   --enable-static[=PKGS]
1074                           build static libraries [default=yes]
1075   --enable-shared[=PKGS]
1076                           build shared libraries [default=yes]
1077   --enable-fast-install[=PKGS]
1078                           optimize for fast installation [default=yes]
1079   --disable-dependency-tracking  speeds up one-time build
1080   --enable-dependency-tracking   do not reject slow dependency extractors
1081   --disable-libtool-lock  avoid locking (might break parallel builds)
1082
1083 Optional Packages:
1084   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1085   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1086   --with-subdir=DIR       change default subdirectory used for installs
1087   --with-cyrus-sasl       with Cyrus SASL support [auto]
1088   --with-fetch            with fetch(3) URL support [auto]
1089   --with-threads          with threads [auto]
1090   --with-tls              with TLS/SSL support [auto]
1091   --with-yielding-select  with implicitly yielding select [auto]
1092   --with-mp               with multiple precision statistics auto|longlong|long|bignum|gmp [auto]
1093
1094   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1095   --with-pic              try to use only PIC/non-PIC objects [default=use
1096                           both]
1097   --with-tags[=TAGS]
1098                           include additional configurations [automatic]
1099
1100 See INSTALL file for further details.
1101
1102 Some influential environment variables:
1103   CC          C compiler command
1104   CFLAGS      C compiler flags
1105   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1106               nonstandard directory <lib dir>
1107   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
1108               headers in a nonstandard directory <include dir>
1109   CPP         C preprocessor
1110
1111 Use these variables to override the choices made by `configure' or to help
1112 it to find libraries and programs with nonstandard names/locations.
1113
1114 _ACEOF
1115 fi
1116
1117 if test "$ac_init_help" = "recursive"; then
1118   # If there are subdirs, report their specific --help.
1119   ac_popdir=`pwd`
1120   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1121     test -d $ac_dir || continue
1122     ac_builddir=.
1123
1124 if test "$ac_dir" != .; then
1125   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1126   # A "../" for each directory in $ac_dir_suffix.
1127   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
1128 else
1129   ac_dir_suffix= ac_top_builddir=
1130 fi
1131
1132 case $srcdir in
1133   .)  # No --srcdir option.  We are building in place.
1134     ac_srcdir=.
1135     if test -z "$ac_top_builddir"; then
1136        ac_top_srcdir=.
1137     else
1138        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
1139     fi ;;
1140   [\\/]* | ?:[\\/]* )  # Absolute path.
1141     ac_srcdir=$srcdir$ac_dir_suffix;
1142     ac_top_srcdir=$srcdir ;;
1143   *) # Relative path.
1144     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
1145     ac_top_srcdir=$ac_top_builddir$srcdir ;;
1146 esac
1147
1148 # Do not use `cd foo && pwd` to compute absolute paths, because
1149 # the directories may not exist.
1150 case `pwd` in
1151 .) ac_abs_builddir="$ac_dir";;
1152 *)
1153   case "$ac_dir" in
1154   .) ac_abs_builddir=`pwd`;;
1155   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
1156   *) ac_abs_builddir=`pwd`/"$ac_dir";;
1157   esac;;
1158 esac
1159 case $ac_abs_builddir in
1160 .) ac_abs_top_builddir=${ac_top_builddir}.;;
1161 *)
1162   case ${ac_top_builddir}. in
1163   .) ac_abs_top_builddir=$ac_abs_builddir;;
1164   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
1165   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
1166   esac;;
1167 esac
1168 case $ac_abs_builddir in
1169 .) ac_abs_srcdir=$ac_srcdir;;
1170 *)
1171   case $ac_srcdir in
1172   .) ac_abs_srcdir=$ac_abs_builddir;;
1173   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1174   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1175   esac;;
1176 esac
1177 case $ac_abs_builddir in
1178 .) ac_abs_top_srcdir=$ac_top_srcdir;;
1179 *)
1180   case $ac_top_srcdir in
1181   .) ac_abs_top_srcdir=$ac_abs_builddir;;
1182   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1183   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1184   esac;;
1185 esac
1186
1187     cd $ac_dir
1188     # Check for guested configure; otherwise get Cygnus style configure.
1189     if test -f $ac_srcdir/configure.gnu; then
1190       echo
1191       $SHELL $ac_srcdir/configure.gnu  --help=recursive
1192     elif test -f $ac_srcdir/configure; then
1193       echo
1194       $SHELL $ac_srcdir/configure  --help=recursive
1195     elif test -f $ac_srcdir/configure.ac ||
1196            test -f $ac_srcdir/configure.in; then
1197       echo
1198       $ac_configure --help
1199     else
1200       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1201     fi
1202     cd $ac_popdir
1203   done
1204 fi
1205
1206 test -n "$ac_init_help" && exit 0
1207 if $ac_init_version; then
1208   cat <<\_ACEOF
1209
1210 Copyright (C) 2003 Free Software Foundation, Inc.
1211 This configure script is free software; the Free Software Foundation
1212 gives unlimited permission to copy, distribute and modify it.
1213
1214 Copyright 1998-2006 The OpenLDAP Foundation. All rights reserved.
1215 Restrictions apply, see COPYRIGHT and LICENSE files.
1216 _ACEOF
1217   exit 0
1218 fi
1219 exec 5>config.log
1220 cat >&5 <<_ACEOF
1221 This file contains any messages produced by compilers while
1222 running configure, to aid debugging if configure makes a mistake.
1223
1224 It was created by $as_me, which was
1225 generated by GNU Autoconf 2.59.  Invocation command line was
1226
1227   $ $0 $@
1228
1229 _ACEOF
1230 {
1231 cat <<_ASUNAME
1232 ## --------- ##
1233 ## Platform. ##
1234 ## --------- ##
1235
1236 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1237 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1238 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1239 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1240 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1241
1242 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1243 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1244
1245 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1246 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1247 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1248 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1249 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1250 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1251 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1252
1253 _ASUNAME
1254
1255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1256 for as_dir in $PATH
1257 do
1258   IFS=$as_save_IFS
1259   test -z "$as_dir" && as_dir=.
1260   echo "PATH: $as_dir"
1261 done
1262
1263 } >&5
1264
1265 cat >&5 <<_ACEOF
1266
1267
1268 ## ----------- ##
1269 ## Core tests. ##
1270 ## ----------- ##
1271
1272 _ACEOF
1273
1274
1275 # Keep a trace of the command line.
1276 # Strip out --no-create and --no-recursion so they do not pile up.
1277 # Strip out --silent because we don't want to record it for future runs.
1278 # Also quote any args containing shell meta-characters.
1279 # Make two passes to allow for proper duplicate-argument suppression.
1280 ac_configure_args=
1281 ac_configure_args0=
1282 ac_configure_args1=
1283 ac_sep=
1284 ac_must_keep_next=false
1285 for ac_pass in 1 2
1286 do
1287   for ac_arg
1288   do
1289     case $ac_arg in
1290     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1291     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1292     | -silent | --silent | --silen | --sile | --sil)
1293       continue ;;
1294     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1295       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1296     esac
1297     case $ac_pass in
1298     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1299     2)
1300       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1301       if test $ac_must_keep_next = true; then
1302         ac_must_keep_next=false # Got value, back to normal.
1303       else
1304         case $ac_arg in
1305           *=* | --config-cache | -C | -disable-* | --disable-* \
1306           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1307           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1308           | -with-* | --with-* | -without-* | --without-* | --x)
1309             case "$ac_configure_args0 " in
1310               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1311             esac
1312             ;;
1313           -* ) ac_must_keep_next=true ;;
1314         esac
1315       fi
1316       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1317       # Get rid of the leading space.
1318       ac_sep=" "
1319       ;;
1320     esac
1321   done
1322 done
1323 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1324 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1325
1326 # When interrupted or exit'd, cleanup temporary files, and complete
1327 # config.log.  We remove comments because anyway the quotes in there
1328 # would cause problems or look ugly.
1329 # WARNING: Be sure not to use single quotes in there, as some shells,
1330 # such as our DU 5.0 friend, will then `close' the trap.
1331 trap 'exit_status=$?
1332   # Save into config.log some information that might help in debugging.
1333   {
1334     echo
1335
1336     cat <<\_ASBOX
1337 ## ---------------- ##
1338 ## Cache variables. ##
1339 ## ---------------- ##
1340 _ASBOX
1341     echo
1342     # The following way of writing the cache mishandles newlines in values,
1343 {
1344   (set) 2>&1 |
1345     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1346     *ac_space=\ *)
1347       sed -n \
1348         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1349           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1350       ;;
1351     *)
1352       sed -n \
1353         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1354       ;;
1355     esac;
1356 }
1357     echo
1358
1359     cat <<\_ASBOX
1360 ## ----------------- ##
1361 ## Output variables. ##
1362 ## ----------------- ##
1363 _ASBOX
1364     echo
1365     for ac_var in $ac_subst_vars
1366     do
1367       eval ac_val=$`echo $ac_var`
1368       echo "$ac_var='"'"'$ac_val'"'"'"
1369     done | sort
1370     echo
1371
1372     if test -n "$ac_subst_files"; then
1373       cat <<\_ASBOX
1374 ## ------------- ##
1375 ## Output files. ##
1376 ## ------------- ##
1377 _ASBOX
1378       echo
1379       for ac_var in $ac_subst_files
1380       do
1381         eval ac_val=$`echo $ac_var`
1382         echo "$ac_var='"'"'$ac_val'"'"'"
1383       done | sort
1384       echo
1385     fi
1386
1387     if test -s confdefs.h; then
1388       cat <<\_ASBOX
1389 ## ----------- ##
1390 ## confdefs.h. ##
1391 ## ----------- ##
1392 _ASBOX
1393       echo
1394       sed "/^$/d" confdefs.h | sort
1395       echo
1396     fi
1397     test "$ac_signal" != 0 &&
1398       echo "$as_me: caught signal $ac_signal"
1399     echo "$as_me: exit $exit_status"
1400   } >&5
1401   rm -f core *.core &&
1402   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1403     exit $exit_status
1404      ' 0
1405 for ac_signal in 1 2 13 15; do
1406   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1407 done
1408 ac_signal=0
1409
1410 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1411 rm -rf conftest* confdefs.h
1412 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1413 echo >confdefs.h
1414
1415 # Predefined preprocessor variables.
1416
1417 cat >>confdefs.h <<_ACEOF
1418 #define PACKAGE_NAME "$PACKAGE_NAME"
1419 _ACEOF
1420
1421
1422 cat >>confdefs.h <<_ACEOF
1423 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1424 _ACEOF
1425
1426
1427 cat >>confdefs.h <<_ACEOF
1428 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1429 _ACEOF
1430
1431
1432 cat >>confdefs.h <<_ACEOF
1433 #define PACKAGE_STRING "$PACKAGE_STRING"
1434 _ACEOF
1435
1436
1437 cat >>confdefs.h <<_ACEOF
1438 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1439 _ACEOF
1440
1441
1442 # Let the site file select an alternate cache file if it wants to.
1443 # Prefer explicitly selected file to automatically selected ones.
1444 if test -z "$CONFIG_SITE"; then
1445   if test "x$prefix" != xNONE; then
1446     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1447   else
1448     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1449   fi
1450 fi
1451 for ac_site_file in $CONFIG_SITE; do
1452   if test -r "$ac_site_file"; then
1453     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1454 echo "$as_me: loading site script $ac_site_file" >&6;}
1455     sed 's/^/| /' "$ac_site_file" >&5
1456     . "$ac_site_file"
1457   fi
1458 done
1459
1460
1461 # Check that the precious variables saved in the cache have kept the same
1462 # value.
1463 ac_cache_corrupted=false
1464 for ac_var in `(set) 2>&1 |
1465                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1466   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1467   eval ac_new_set=\$ac_env_${ac_var}_set
1468   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1469   eval ac_new_val="\$ac_env_${ac_var}_value"
1470   case $ac_old_set,$ac_new_set in
1471     set,)
1472       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1473 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1474       ac_cache_corrupted=: ;;
1475     ,set)
1476       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1477 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1478       ac_cache_corrupted=: ;;
1479     ,);;
1480     *)
1481       if test "x$ac_old_val" != "x$ac_new_val"; then
1482         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1483 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1484         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1485 echo "$as_me:   former value:  $ac_old_val" >&2;}
1486         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1487 echo "$as_me:   current value: $ac_new_val" >&2;}
1488         ac_cache_corrupted=:
1489       fi;;
1490   esac
1491   # Pass precious variables to config.status.
1492   if test "$ac_new_set" = set; then
1493     case $ac_new_val in
1494     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1495       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1496     *) ac_arg=$ac_var=$ac_new_val ;;
1497     esac
1498     case " $ac_configure_args " in
1499       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1500       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1501     esac
1502   fi
1503 done
1504 if $ac_cache_corrupted; then
1505   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1506 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1507   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1508 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1509    { (exit 1); exit 1; }; }
1510 fi
1511
1512 ac_ext=c
1513 ac_cpp='$CPP $CPPFLAGS'
1514 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1515 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1516 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560 ac_aux_dir=
1561 for ac_dir in build $srcdir/build; do
1562   if test -f $ac_dir/install-sh; then
1563     ac_aux_dir=$ac_dir
1564     ac_install_sh="$ac_aux_dir/install-sh -c"
1565     break
1566   elif test -f $ac_dir/install.sh; then
1567     ac_aux_dir=$ac_dir
1568     ac_install_sh="$ac_aux_dir/install.sh -c"
1569     break
1570   elif test -f $ac_dir/shtool; then
1571     ac_aux_dir=$ac_dir
1572     ac_install_sh="$ac_aux_dir/shtool install -c"
1573     break
1574   fi
1575 done
1576 if test -z "$ac_aux_dir"; then
1577   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build $srcdir/build" >&5
1578 echo "$as_me: error: cannot find install-sh or install.sh in build $srcdir/build" >&2;}
1579    { (exit 1); exit 1; }; }
1580 fi
1581 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1582 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1583 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1584
1585 eval `$ac_aux_dir/version.sh`
1586 if test -z "$OL_STRING"; then
1587         { { echo "$as_me:$LINENO: error: could not determine version" >&5
1588 echo "$as_me: error: could not determine version" >&2;}
1589    { (exit 1); exit 1; }; }
1590 fi
1591
1592 if test -f "$ac_aux_dir/shtool" && test ! -d $ac_aux_dir/shtool; then
1593         ac_cv_shtool="$ac_aux_dir/shtool"
1594 else
1595         { { echo "$as_me:$LINENO: error: no shtool found in $ac_aux_dir" >&5
1596 echo "$as_me: error: no shtool found in $ac_aux_dir" >&2;}
1597    { (exit 1); exit 1; }; }
1598 fi
1599
1600 SHTOOL="$ac_cv_shtool"
1601
1602 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
1603 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
1604
1605 OPENLDAP_CVS=""
1606 if test -d $ac_aux_dir/CVS; then
1607         OPENLDAP_CVS="(from CVS sources) "
1608 fi
1609
1610 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
1611
1612 # Make sure we can run config.sub.
1613 $ac_config_sub sun4 >/dev/null 2>&1 ||
1614   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1615 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1616    { (exit 1); exit 1; }; }
1617
1618 echo "$as_me:$LINENO: checking build system type" >&5
1619 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1620 if test "${ac_cv_build+set}" = set; then
1621   echo $ECHO_N "(cached) $ECHO_C" >&6
1622 else
1623   ac_cv_build_alias=$build_alias
1624 test -z "$ac_cv_build_alias" &&
1625   ac_cv_build_alias=`$ac_config_guess`
1626 test -z "$ac_cv_build_alias" &&
1627   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1628 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1629    { (exit 1); exit 1; }; }
1630 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1631   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1632 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1633    { (exit 1); exit 1; }; }
1634
1635 fi
1636 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1637 echo "${ECHO_T}$ac_cv_build" >&6
1638 build=$ac_cv_build
1639 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1640 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1641 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1642
1643
1644 echo "$as_me:$LINENO: checking host system type" >&5
1645 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1646 if test "${ac_cv_host+set}" = set; then
1647   echo $ECHO_N "(cached) $ECHO_C" >&6
1648 else
1649   ac_cv_host_alias=$host_alias
1650 test -z "$ac_cv_host_alias" &&
1651   ac_cv_host_alias=$ac_cv_build_alias
1652 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1653   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1654 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1655    { (exit 1); exit 1; }; }
1656
1657 fi
1658 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1659 echo "${ECHO_T}$ac_cv_host" >&6
1660 host=$ac_cv_host
1661 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1662 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1663 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1664
1665
1666 echo "$as_me:$LINENO: checking target system type" >&5
1667 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1668 if test "${ac_cv_target+set}" = set; then
1669   echo $ECHO_N "(cached) $ECHO_C" >&6
1670 else
1671   ac_cv_target_alias=$target_alias
1672 test "x$ac_cv_target_alias" = "x" &&
1673   ac_cv_target_alias=$ac_cv_host_alias
1674 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1675   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1676 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1677    { (exit 1); exit 1; }; }
1678
1679 fi
1680 echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1681 echo "${ECHO_T}$ac_cv_target" >&6
1682 target=$ac_cv_target
1683 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1684 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1685 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1686
1687
1688 # The aliases save the names the user supplied, while $host etc.
1689 # will get canonicalized.
1690 test -n "$target_alias" &&
1691   test "$program_prefix$program_suffix$program_transform_name" = \
1692     NONENONEs,x,x, &&
1693   program_prefix=${target_alias}-
1694
1695 am__api_version="1.9"
1696 # Find a good install program.  We prefer a C program (faster),
1697 # so one script is as good as another.  But avoid the broken or
1698 # incompatible versions:
1699 # SysV /etc/install, /usr/sbin/install
1700 # SunOS /usr/etc/install
1701 # IRIX /sbin/install
1702 # AIX /bin/install
1703 # AmigaOS /C/install, which installs bootblocks on floppy discs
1704 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1705 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1706 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1707 # OS/2's system install, which has a completely different semantic
1708 # ./install, which can be erroneously created by make from ./install.sh.
1709 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
1710 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
1711 if test -z "$INSTALL"; then
1712 if test "${ac_cv_path_install+set}" = set; then
1713   echo $ECHO_N "(cached) $ECHO_C" >&6
1714 else
1715   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1716 for as_dir in $PATH
1717 do
1718   IFS=$as_save_IFS
1719   test -z "$as_dir" && as_dir=.
1720   # Account for people who put trailing slashes in PATH elements.
1721 case $as_dir/ in
1722   ./ | .// | /cC/* | \
1723   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
1724   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
1725   /usr/ucb/* ) ;;
1726   *)
1727     # OSF1 and SCO ODT 3.0 have their own names for install.
1728     # Don't use installbsd from OSF since it installs stuff as root
1729     # by default.
1730     for ac_prog in ginstall scoinst install; do
1731       for ac_exec_ext in '' $ac_executable_extensions; do
1732         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
1733           if test $ac_prog = install &&
1734             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
1735             # AIX install.  It has an incompatible calling convention.
1736             :
1737           elif test $ac_prog = install &&
1738             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
1739             # program-specific install script used by HP pwplus--don't use.
1740             :
1741           else
1742             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
1743             break 3
1744           fi
1745         fi
1746       done
1747     done
1748     ;;
1749 esac
1750 done
1751
1752
1753 fi
1754   if test "${ac_cv_path_install+set}" = set; then
1755     INSTALL=$ac_cv_path_install
1756   else
1757     # As a last resort, use the slow shell script.  We don't cache a
1758     # path for INSTALL within a source directory, because that will
1759     # break other packages using the cache if that directory is
1760     # removed, or if the path is relative.
1761     INSTALL=$ac_install_sh
1762   fi
1763 fi
1764 echo "$as_me:$LINENO: result: $INSTALL" >&5
1765 echo "${ECHO_T}$INSTALL" >&6
1766
1767 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1768 # It thinks the first close brace ends the variable substitution.
1769 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1770
1771 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1772
1773 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1774
1775 echo "$as_me:$LINENO: checking whether build environment is sane" >&5
1776 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
1777 # Just in case
1778 sleep 1
1779 echo timestamp > conftest.file
1780 # Do `set' in a subshell so we don't clobber the current shell's
1781 # arguments.  Must try -L first in case configure is actually a
1782 # symlink; some systems play weird games with the mod time of symlinks
1783 # (eg FreeBSD returns the mod time of the symlink's containing
1784 # directory).
1785 if (
1786    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1787    if test "$*" = "X"; then
1788       # -L didn't work.
1789       set X `ls -t $srcdir/configure conftest.file`
1790    fi
1791    rm -f conftest.file
1792    if test "$*" != "X $srcdir/configure conftest.file" \
1793       && test "$*" != "X conftest.file $srcdir/configure"; then
1794
1795       # If neither matched, then we have a broken ls.  This can happen
1796       # if, for instance, CONFIG_SHELL is bash and it inherits a
1797       # broken ls alias from the environment.  This has actually
1798       # happened.  Such a system could not be considered "sane".
1799       { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
1800 alias in your environment" >&5
1801 echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
1802 alias in your environment" >&2;}
1803    { (exit 1); exit 1; }; }
1804    fi
1805
1806    test "$2" = conftest.file
1807    )
1808 then
1809    # Ok.
1810    :
1811 else
1812    { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
1813 Check your system clock" >&5
1814 echo "$as_me: error: newly created file is older than distributed files!
1815 Check your system clock" >&2;}
1816    { (exit 1); exit 1; }; }
1817 fi
1818 echo "$as_me:$LINENO: result: yes" >&5
1819 echo "${ECHO_T}yes" >&6
1820 test "$program_prefix" != NONE &&
1821   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1822 # Use a double $ so make ignores it.
1823 test "$program_suffix" != NONE &&
1824   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1825 # Double any \ or $.  echo might interpret backslashes.
1826 # By default was `s,x,x', remove it if useless.
1827 cat <<\_ACEOF >conftest.sed
1828 s/[\\$]/&&/g;s/;s,x,x,$//
1829 _ACEOF
1830 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1831 rm conftest.sed
1832
1833 # expand $ac_aux_dir to an absolute path
1834 am_aux_dir=`cd $ac_aux_dir && pwd`
1835
1836 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
1837 # Use eval to expand $SHELL
1838 if eval "$MISSING --run true"; then
1839   am_missing_run="$MISSING --run "
1840 else
1841   am_missing_run=
1842   { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
1843 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
1844 fi
1845
1846 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
1847   # We used to keeping the `.' as first argument, in order to
1848   # allow $(mkdir_p) to be used without argument.  As in
1849   #   $(mkdir_p) $(somedir)
1850   # where $(somedir) is conditionally defined.  However this is wrong
1851   # for two reasons:
1852   #  1. if the package is installed by a user who cannot write `.'
1853   #     make install will fail,
1854   #  2. the above comment should most certainly read
1855   #     $(mkdir_p) $(DESTDIR)$(somedir)
1856   #     so it does not work when $(somedir) is undefined and
1857   #     $(DESTDIR) is not.
1858   #  To support the latter case, we have to write
1859   #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
1860   #  so the `.' trick is pointless.
1861   mkdir_p='mkdir -p --'
1862 else
1863   # On NextStep and OpenStep, the `mkdir' command does not
1864   # recognize any option.  It will interpret all options as
1865   # directories to create, and then abort because `.' already
1866   # exists.
1867   for d in ./-p ./--version;
1868   do
1869     test -d $d && rmdir $d
1870   done
1871   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
1872   if test -f "$ac_aux_dir/mkinstalldirs"; then
1873     mkdir_p='$(mkinstalldirs)'
1874   else
1875     mkdir_p='$(install_sh) -d'
1876   fi
1877 fi
1878
1879 for ac_prog in gawk mawk nawk awk
1880 do
1881   # Extract the first word of "$ac_prog", so it can be a program name with args.
1882 set dummy $ac_prog; ac_word=$2
1883 echo "$as_me:$LINENO: checking for $ac_word" >&5
1884 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1885 if test "${ac_cv_prog_AWK+set}" = set; then
1886   echo $ECHO_N "(cached) $ECHO_C" >&6
1887 else
1888   if test -n "$AWK"; then
1889   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1890 else
1891 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1892 for as_dir in $PATH
1893 do
1894   IFS=$as_save_IFS
1895   test -z "$as_dir" && as_dir=.
1896   for ac_exec_ext in '' $ac_executable_extensions; do
1897   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1898     ac_cv_prog_AWK="$ac_prog"
1899     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1900     break 2
1901   fi
1902 done
1903 done
1904
1905 fi
1906 fi
1907 AWK=$ac_cv_prog_AWK
1908 if test -n "$AWK"; then
1909   echo "$as_me:$LINENO: result: $AWK" >&5
1910 echo "${ECHO_T}$AWK" >&6
1911 else
1912   echo "$as_me:$LINENO: result: no" >&5
1913 echo "${ECHO_T}no" >&6
1914 fi
1915
1916   test -n "$AWK" && break
1917 done
1918
1919 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
1920 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
1921 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
1922 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1923   echo $ECHO_N "(cached) $ECHO_C" >&6
1924 else
1925   cat >conftest.make <<\_ACEOF
1926 all:
1927         @echo 'ac_maketemp="$(MAKE)"'
1928 _ACEOF
1929 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1930 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1931 if test -n "$ac_maketemp"; then
1932   eval ac_cv_prog_make_${ac_make}_set=yes
1933 else
1934   eval ac_cv_prog_make_${ac_make}_set=no
1935 fi
1936 rm -f conftest.make
1937 fi
1938 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1939   echo "$as_me:$LINENO: result: yes" >&5
1940 echo "${ECHO_T}yes" >&6
1941   SET_MAKE=
1942 else
1943   echo "$as_me:$LINENO: result: no" >&5
1944 echo "${ECHO_T}no" >&6
1945   SET_MAKE="MAKE=${MAKE-make}"
1946 fi
1947
1948 rm -rf .tst 2>/dev/null
1949 mkdir .tst 2>/dev/null
1950 if test -d .tst; then
1951   am__leading_dot=.
1952 else
1953   am__leading_dot=_
1954 fi
1955 rmdir .tst 2>/dev/null
1956
1957 # test to see if srcdir already configured
1958 if test "`cd $srcdir && pwd`" != "`pwd`" &&
1959    test -f $srcdir/config.status; then
1960   { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
1961 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
1962    { (exit 1); exit 1; }; }
1963 fi
1964
1965 # test whether we have cygpath
1966 if test -z "$CYGPATH_W"; then
1967   if (cygpath --version) >/dev/null 2>/dev/null; then
1968     CYGPATH_W='cygpath -w'
1969   else
1970     CYGPATH_W=echo
1971   fi
1972 fi
1973
1974
1975 # Define the identity of the package.
1976  PACKAGE=$OL_PACKAGE
1977  VERSION=$OL_VERSION
1978
1979
1980 # Some tools Automake needs.
1981
1982 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
1983
1984
1985 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
1986
1987
1988 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
1989
1990
1991 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
1992
1993
1994 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
1995
1996 install_sh=${install_sh-"$am_aux_dir/install-sh"}
1997
1998 # Installed binaries are usually stripped using `strip' when the user
1999 # run `make install-strip'.  However `strip' might not be the right
2000 # tool to use in cross-compilation environments, therefore Automake
2001 # will honor the `STRIP' environment variable to overrule this program.
2002 if test "$cross_compiling" != no; then
2003   if test -n "$ac_tool_prefix"; then
2004   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2005 set dummy ${ac_tool_prefix}strip; ac_word=$2
2006 echo "$as_me:$LINENO: checking for $ac_word" >&5
2007 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2008 if test "${ac_cv_prog_STRIP+set}" = set; then
2009   echo $ECHO_N "(cached) $ECHO_C" >&6
2010 else
2011   if test -n "$STRIP"; then
2012   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2013 else
2014 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2015 for as_dir in $PATH
2016 do
2017   IFS=$as_save_IFS
2018   test -z "$as_dir" && as_dir=.
2019   for ac_exec_ext in '' $ac_executable_extensions; do
2020   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2021     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2022     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2023     break 2
2024   fi
2025 done
2026 done
2027
2028 fi
2029 fi
2030 STRIP=$ac_cv_prog_STRIP
2031 if test -n "$STRIP"; then
2032   echo "$as_me:$LINENO: result: $STRIP" >&5
2033 echo "${ECHO_T}$STRIP" >&6
2034 else
2035   echo "$as_me:$LINENO: result: no" >&5
2036 echo "${ECHO_T}no" >&6
2037 fi
2038
2039 fi
2040 if test -z "$ac_cv_prog_STRIP"; then
2041   ac_ct_STRIP=$STRIP
2042   # Extract the first word of "strip", so it can be a program name with args.
2043 set dummy strip; ac_word=$2
2044 echo "$as_me:$LINENO: checking for $ac_word" >&5
2045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2046 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
2047   echo $ECHO_N "(cached) $ECHO_C" >&6
2048 else
2049   if test -n "$ac_ct_STRIP"; then
2050   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2051 else
2052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2053 for as_dir in $PATH
2054 do
2055   IFS=$as_save_IFS
2056   test -z "$as_dir" && as_dir=.
2057   for ac_exec_ext in '' $ac_executable_extensions; do
2058   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2059     ac_cv_prog_ac_ct_STRIP="strip"
2060     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2061     break 2
2062   fi
2063 done
2064 done
2065
2066   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
2067 fi
2068 fi
2069 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2070 if test -n "$ac_ct_STRIP"; then
2071   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
2072 echo "${ECHO_T}$ac_ct_STRIP" >&6
2073 else
2074   echo "$as_me:$LINENO: result: no" >&5
2075 echo "${ECHO_T}no" >&6
2076 fi
2077
2078   STRIP=$ac_ct_STRIP
2079 else
2080   STRIP="$ac_cv_prog_STRIP"
2081 fi
2082
2083 fi
2084 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
2085
2086 # We need awk for the "check" target.  The system "awk" is bad on
2087 # some platforms.
2088 # Always define AMTAR for backward compatibility.
2089
2090 AMTAR=${AMTAR-"${am_missing_run}tar"}
2091
2092 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
2093
2094
2095
2096
2097
2098 cat >>confdefs.h <<_ACEOF
2099 #define OPENLDAP_PACKAGE "$PACKAGE"
2100 _ACEOF
2101
2102
2103 cat >>confdefs.h <<_ACEOF
2104 #define OPENLDAP_VERSION "$VERSION"
2105 _ACEOF
2106
2107
2108
2109 cat >>confdefs.h <<_ACEOF
2110 #define LDAP_VENDOR_VERSION $OL_API_INC
2111 _ACEOF
2112
2113
2114 cat >>confdefs.h <<_ACEOF
2115 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
2116 _ACEOF
2117
2118
2119 cat >>confdefs.h <<_ACEOF
2120 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
2121 _ACEOF
2122
2123
2124 cat >>confdefs.h <<_ACEOF
2125 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
2126 _ACEOF
2127
2128
2129 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
2130
2131 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
2132
2133 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
2134
2135
2136
2137
2138
2139
2140
2141           ac_config_headers="$ac_config_headers include/portable.h:include/portable.hin"
2142
2143           ac_config_headers="$ac_config_headers include/ldap_features.h:include/ldap_features.hin"
2144
2145           ac_config_headers="$ac_config_headers include/lber_types.h:include/lber_types.hin"
2146
2147
2148 echo "$as_me:$LINENO: checking configure arguments" >&5
2149 echo $ECHO_N "checking configure arguments... $ECHO_C" >&6
2150
2151
2152 top_builddir=`pwd`
2153
2154 ldap_subdir="/openldap"
2155
2156
2157 # Check whether --with-subdir or --without-subdir was given.
2158 if test "${with_subdir+set}" = set; then
2159   withval="$with_subdir"
2160   case "$withval" in
2161         no) ldap_subdir=""
2162                 ;;
2163         yes)
2164                 ;;
2165         /*|\\*)
2166                 ldap_subdir="$withval"
2167                 ;;
2168         *)
2169                 ldap_subdir="/$withval"
2170                 ;;
2171 esac
2172
2173 fi;
2174
2175 # OpenLDAP --enable-debug
2176
2177         # Check whether --enable-debug or --disable-debug was given.
2178 if test "${enable_debug+set}" = set; then
2179   enableval="$enable_debug"
2180
2181         ol_arg=invalid
2182         for ol_val in no yes traditional ; do
2183                 if test "$enableval" = "$ol_val" ; then
2184                         ol_arg="$ol_val"
2185                 fi
2186         done
2187         if test "$ol_arg" = "invalid" ; then
2188                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-debug" >&5
2189 echo "$as_me: error: bad value $enableval for --enable-debug" >&2;}
2190    { (exit 1); exit 1; }; }
2191         fi
2192         ol_enable_debug="$ol_arg"
2193
2194 else
2195         ol_enable_debug=yes
2196 fi;
2197 # end --enable-debug
2198 # OpenLDAP --enable-dynamic
2199
2200         # Check whether --enable-dynamic or --disable-dynamic was given.
2201 if test "${enable_dynamic+set}" = set; then
2202   enableval="$enable_dynamic"
2203
2204         ol_arg=invalid
2205         for ol_val in auto yes no ; do
2206                 if test "$enableval" = "$ol_val" ; then
2207                         ol_arg="$ol_val"
2208                 fi
2209         done
2210         if test "$ol_arg" = "invalid" ; then
2211                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dynamic" >&5
2212 echo "$as_me: error: bad value $enableval for --enable-dynamic" >&2;}
2213    { (exit 1); exit 1; }; }
2214         fi
2215         ol_enable_dynamic="$ol_arg"
2216
2217 else
2218         ol_enable_dynamic=no
2219 fi;
2220 # end --enable-dynamic
2221 # OpenLDAP --enable-syslog
2222
2223         # Check whether --enable-syslog or --disable-syslog was given.
2224 if test "${enable_syslog+set}" = set; then
2225   enableval="$enable_syslog"
2226
2227         ol_arg=invalid
2228         for ol_val in auto yes no ; do
2229                 if test "$enableval" = "$ol_val" ; then
2230                         ol_arg="$ol_val"
2231                 fi
2232         done
2233         if test "$ol_arg" = "invalid" ; then
2234                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-syslog" >&5
2235 echo "$as_me: error: bad value $enableval for --enable-syslog" >&2;}
2236    { (exit 1); exit 1; }; }
2237         fi
2238         ol_enable_syslog="$ol_arg"
2239
2240 else
2241         ol_enable_syslog=auto
2242 fi;
2243 # end --enable-syslog
2244 # OpenLDAP --enable-proctitle
2245
2246         # Check whether --enable-proctitle or --disable-proctitle was given.
2247 if test "${enable_proctitle+set}" = set; then
2248   enableval="$enable_proctitle"
2249
2250         ol_arg=invalid
2251         for ol_val in auto yes no ; do
2252                 if test "$enableval" = "$ol_val" ; then
2253                         ol_arg="$ol_val"
2254                 fi
2255         done
2256         if test "$ol_arg" = "invalid" ; then
2257                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-proctitle" >&5
2258 echo "$as_me: error: bad value $enableval for --enable-proctitle" >&2;}
2259    { (exit 1); exit 1; }; }
2260         fi
2261         ol_enable_proctitle="$ol_arg"
2262
2263 else
2264         ol_enable_proctitle=yes
2265 fi;
2266 # end --enable-proctitle
2267 ol_enable_referrals=${ol_enable_referrals-no}
2268 ol_enable_kbind=${ol_enable_kbind-no}
2269 # OpenLDAP --enable-ipv6
2270
2271         # Check whether --enable-ipv6 or --disable-ipv6 was given.
2272 if test "${enable_ipv6+set}" = set; then
2273   enableval="$enable_ipv6"
2274
2275         ol_arg=invalid
2276         for ol_val in auto yes no ; do
2277                 if test "$enableval" = "$ol_val" ; then
2278                         ol_arg="$ol_val"
2279                 fi
2280         done
2281         if test "$ol_arg" = "invalid" ; then
2282                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ipv6" >&5
2283 echo "$as_me: error: bad value $enableval for --enable-ipv6" >&2;}
2284    { (exit 1); exit 1; }; }
2285         fi
2286         ol_enable_ipv6="$ol_arg"
2287
2288 else
2289         ol_enable_ipv6=auto
2290 fi;
2291 # end --enable-ipv6
2292 # OpenLDAP --enable-local
2293
2294         # Check whether --enable-local or --disable-local was given.
2295 if test "${enable_local+set}" = set; then
2296   enableval="$enable_local"
2297
2298         ol_arg=invalid
2299         for ol_val in auto yes no ; do
2300                 if test "$enableval" = "$ol_val" ; then
2301                         ol_arg="$ol_val"
2302                 fi
2303         done
2304         if test "$ol_arg" = "invalid" ; then
2305                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-local" >&5
2306 echo "$as_me: error: bad value $enableval for --enable-local" >&2;}
2307    { (exit 1); exit 1; }; }
2308         fi
2309         ol_enable_local="$ol_arg"
2310
2311 else
2312         ol_enable_local=auto
2313 fi;
2314 # end --enable-local
2315
2316 # OpenLDAP --with-cyrus_sasl
2317
2318 # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
2319 if test "${with_cyrus_sasl+set}" = set; then
2320   withval="$with_cyrus_sasl"
2321
2322         ol_arg=invalid
2323         for ol_val in auto yes no  ; do
2324                 if test "$withval" = "$ol_val" ; then
2325                         ol_arg="$ol_val"
2326                 fi
2327         done
2328         if test "$ol_arg" = "invalid" ; then
2329                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-cyrus_sasl" >&5
2330 echo "$as_me: error: bad value $withval for --with-cyrus_sasl" >&2;}
2331    { (exit 1); exit 1; }; }
2332         fi
2333         ol_with_cyrus_sasl="$ol_arg"
2334
2335 else
2336         ol_with_cyrus_sasl="auto"
2337 fi; # end --with-cyrus_sasl
2338
2339 # OpenLDAP --with-fetch
2340
2341 # Check whether --with-fetch or --without-fetch was given.
2342 if test "${with_fetch+set}" = set; then
2343   withval="$with_fetch"
2344
2345         ol_arg=invalid
2346         for ol_val in auto yes no  ; do
2347                 if test "$withval" = "$ol_val" ; then
2348                         ol_arg="$ol_val"
2349                 fi
2350         done
2351         if test "$ol_arg" = "invalid" ; then
2352                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-fetch" >&5
2353 echo "$as_me: error: bad value $withval for --with-fetch" >&2;}
2354    { (exit 1); exit 1; }; }
2355         fi
2356         ol_with_fetch="$ol_arg"
2357
2358 else
2359         ol_with_fetch="auto"
2360 fi; # end --with-fetch
2361
2362 ol_with_kerberos=${ol_with_kerberos-auto}
2363 # OpenLDAP --with-threads
2364
2365 # Check whether --with-threads or --without-threads was given.
2366 if test "${with_threads+set}" = set; then
2367   withval="$with_threads"
2368
2369         ol_arg=invalid
2370         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
2371                 if test "$withval" = "$ol_val" ; then
2372                         ol_arg="$ol_val"
2373                 fi
2374         done
2375         if test "$ol_arg" = "invalid" ; then
2376                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-threads" >&5
2377 echo "$as_me: error: bad value $withval for --with-threads" >&2;}
2378    { (exit 1); exit 1; }; }
2379         fi
2380         ol_with_threads="$ol_arg"
2381
2382 else
2383         ol_with_threads="auto"
2384 fi; # end --with-threads
2385
2386 # OpenLDAP --with-tls
2387
2388 # Check whether --with-tls or --without-tls was given.
2389 if test "${with_tls+set}" = set; then
2390   withval="$with_tls"
2391
2392         ol_arg=invalid
2393         for ol_val in auto openssl yes no  ; do
2394                 if test "$withval" = "$ol_val" ; then
2395                         ol_arg="$ol_val"
2396                 fi
2397         done
2398         if test "$ol_arg" = "invalid" ; then
2399                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-tls" >&5
2400 echo "$as_me: error: bad value $withval for --with-tls" >&2;}
2401    { (exit 1); exit 1; }; }
2402         fi
2403         ol_with_tls="$ol_arg"
2404
2405 else
2406         ol_with_tls="auto"
2407 fi; # end --with-tls
2408
2409 # OpenLDAP --with-yielding_select
2410
2411 # Check whether --with-yielding_select or --without-yielding_select was given.
2412 if test "${with_yielding_select+set}" = set; then
2413   withval="$with_yielding_select"
2414
2415         ol_arg=invalid
2416         for ol_val in auto yes no manual  ; do
2417                 if test "$withval" = "$ol_val" ; then
2418                         ol_arg="$ol_val"
2419                 fi
2420         done
2421         if test "$ol_arg" = "invalid" ; then
2422                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-yielding_select" >&5
2423 echo "$as_me: error: bad value $withval for --with-yielding_select" >&2;}
2424    { (exit 1); exit 1; }; }
2425         fi
2426         ol_with_yielding_select="$ol_arg"
2427
2428 else
2429         ol_with_yielding_select="auto"
2430 fi; # end --with-yielding_select
2431
2432 # OpenLDAP --with-mp
2433
2434 # Check whether --with-mp or --without-mp was given.
2435 if test "${with_mp+set}" = set; then
2436   withval="$with_mp"
2437
2438         ol_arg=invalid
2439         for ol_val in auto longlong long bignum gmp yes no ; do
2440                 if test "$withval" = "$ol_val" ; then
2441                         ol_arg="$ol_val"
2442                 fi
2443         done
2444         if test "$ol_arg" = "invalid" ; then
2445                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-mp" >&5
2446 echo "$as_me: error: bad value $withval for --with-mp" >&2;}
2447    { (exit 1); exit 1; }; }
2448         fi
2449         ol_with_mp="$ol_arg"
2450
2451 else
2452         ol_with_mp="auto"
2453 fi; # end --with-mp
2454
2455
2456
2457 # Check whether --enable-xxslapdoptions or --disable-xxslapdoptions was given.
2458 if test "${enable_xxslapdoptions+set}" = set; then
2459   enableval="$enable_xxslapdoptions"
2460
2461 fi;
2462 # OpenLDAP --enable-slapd
2463
2464         # Check whether --enable-slapd or --disable-slapd was given.
2465 if test "${enable_slapd+set}" = set; then
2466   enableval="$enable_slapd"
2467
2468         ol_arg=invalid
2469         for ol_val in auto yes no ; do
2470                 if test "$enableval" = "$ol_val" ; then
2471                         ol_arg="$ol_val"
2472                 fi
2473         done
2474         if test "$ol_arg" = "invalid" ; then
2475                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slapd" >&5
2476 echo "$as_me: error: bad value $enableval for --enable-slapd" >&2;}
2477    { (exit 1); exit 1; }; }
2478         fi
2479         ol_enable_slapd="$ol_arg"
2480
2481 else
2482         ol_enable_slapd=yes
2483 fi;
2484 # end --enable-slapd
2485 # OpenLDAP --enable-dynacl
2486
2487         # Check whether --enable-dynacl or --disable-dynacl was given.
2488 if test "${enable_dynacl+set}" = set; then
2489   enableval="$enable_dynacl"
2490
2491         ol_arg=invalid
2492         for ol_val in auto yes no ; do
2493                 if test "$enableval" = "$ol_val" ; then
2494                         ol_arg="$ol_val"
2495                 fi
2496         done
2497         if test "$ol_arg" = "invalid" ; then
2498                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dynacl" >&5
2499 echo "$as_me: error: bad value $enableval for --enable-dynacl" >&2;}
2500    { (exit 1); exit 1; }; }
2501         fi
2502         ol_enable_dynacl="$ol_arg"
2503
2504 else
2505         ol_enable_dynacl=no
2506 fi;
2507 # end --enable-dynacl
2508 # OpenLDAP --enable-aci
2509
2510         # Check whether --enable-aci or --disable-aci was given.
2511 if test "${enable_aci+set}" = set; then
2512   enableval="$enable_aci"
2513
2514         ol_arg=invalid
2515         for ol_val in no yes mod ; do
2516                 if test "$enableval" = "$ol_val" ; then
2517                         ol_arg="$ol_val"
2518                 fi
2519         done
2520         if test "$ol_arg" = "invalid" ; then
2521                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-aci" >&5
2522 echo "$as_me: error: bad value $enableval for --enable-aci" >&2;}
2523    { (exit 1); exit 1; }; }
2524         fi
2525         ol_enable_aci="$ol_arg"
2526
2527 else
2528         ol_enable_aci=no
2529 fi;
2530 # end --enable-aci
2531 # OpenLDAP --enable-cleartext
2532
2533         # Check whether --enable-cleartext or --disable-cleartext was given.
2534 if test "${enable_cleartext+set}" = set; then
2535   enableval="$enable_cleartext"
2536
2537         ol_arg=invalid
2538         for ol_val in auto yes no ; do
2539                 if test "$enableval" = "$ol_val" ; then
2540                         ol_arg="$ol_val"
2541                 fi
2542         done
2543         if test "$ol_arg" = "invalid" ; then
2544                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-cleartext" >&5
2545 echo "$as_me: error: bad value $enableval for --enable-cleartext" >&2;}
2546    { (exit 1); exit 1; }; }
2547         fi
2548         ol_enable_cleartext="$ol_arg"
2549
2550 else
2551         ol_enable_cleartext=yes
2552 fi;
2553 # end --enable-cleartext
2554 # OpenLDAP --enable-crypt
2555
2556         # Check whether --enable-crypt or --disable-crypt was given.
2557 if test "${enable_crypt+set}" = set; then
2558   enableval="$enable_crypt"
2559
2560         ol_arg=invalid
2561         for ol_val in auto yes no ; do
2562                 if test "$enableval" = "$ol_val" ; then
2563                         ol_arg="$ol_val"
2564                 fi
2565         done
2566         if test "$ol_arg" = "invalid" ; then
2567                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-crypt" >&5
2568 echo "$as_me: error: bad value $enableval for --enable-crypt" >&2;}
2569    { (exit 1); exit 1; }; }
2570         fi
2571         ol_enable_crypt="$ol_arg"
2572
2573 else
2574         ol_enable_crypt=no
2575 fi;
2576 # end --enable-crypt
2577 # OpenLDAP --enable-lmpasswd
2578
2579         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
2580 if test "${enable_lmpasswd+set}" = set; then
2581   enableval="$enable_lmpasswd"
2582
2583         ol_arg=invalid
2584         for ol_val in auto yes no ; do
2585                 if test "$enableval" = "$ol_val" ; then
2586                         ol_arg="$ol_val"
2587                 fi
2588         done
2589         if test "$ol_arg" = "invalid" ; then
2590                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-lmpasswd" >&5
2591 echo "$as_me: error: bad value $enableval for --enable-lmpasswd" >&2;}
2592    { (exit 1); exit 1; }; }
2593         fi
2594         ol_enable_lmpasswd="$ol_arg"
2595
2596 else
2597         ol_enable_lmpasswd=no
2598 fi;
2599 # end --enable-lmpasswd
2600 # OpenLDAP --enable-spasswd
2601
2602         # Check whether --enable-spasswd or --disable-spasswd was given.
2603 if test "${enable_spasswd+set}" = set; then
2604   enableval="$enable_spasswd"
2605
2606         ol_arg=invalid
2607         for ol_val in auto yes no ; do
2608                 if test "$enableval" = "$ol_val" ; then
2609                         ol_arg="$ol_val"
2610                 fi
2611         done
2612         if test "$ol_arg" = "invalid" ; then
2613                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-spasswd" >&5
2614 echo "$as_me: error: bad value $enableval for --enable-spasswd" >&2;}
2615    { (exit 1); exit 1; }; }
2616         fi
2617         ol_enable_spasswd="$ol_arg"
2618
2619 else
2620         ol_enable_spasswd=no
2621 fi;
2622 # end --enable-spasswd
2623 # OpenLDAP --enable-modules
2624
2625         # Check whether --enable-modules or --disable-modules was given.
2626 if test "${enable_modules+set}" = set; then
2627   enableval="$enable_modules"
2628
2629         ol_arg=invalid
2630         for ol_val in auto yes no ; do
2631                 if test "$enableval" = "$ol_val" ; then
2632                         ol_arg="$ol_val"
2633                 fi
2634         done
2635         if test "$ol_arg" = "invalid" ; then
2636                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-modules" >&5
2637 echo "$as_me: error: bad value $enableval for --enable-modules" >&2;}
2638    { (exit 1); exit 1; }; }
2639         fi
2640         ol_enable_modules="$ol_arg"
2641
2642 else
2643         ol_enable_modules=no
2644 fi;
2645 # end --enable-modules
2646 # OpenLDAP --enable-rewrite
2647
2648         # Check whether --enable-rewrite or --disable-rewrite was given.
2649 if test "${enable_rewrite+set}" = set; then
2650   enableval="$enable_rewrite"
2651
2652         ol_arg=invalid
2653         for ol_val in auto yes no ; do
2654                 if test "$enableval" = "$ol_val" ; then
2655                         ol_arg="$ol_val"
2656                 fi
2657         done
2658         if test "$ol_arg" = "invalid" ; then
2659                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rewrite" >&5
2660 echo "$as_me: error: bad value $enableval for --enable-rewrite" >&2;}
2661    { (exit 1); exit 1; }; }
2662         fi
2663         ol_enable_rewrite="$ol_arg"
2664
2665 else
2666         ol_enable_rewrite=auto
2667 fi;
2668 # end --enable-rewrite
2669 # OpenLDAP --enable-rlookups
2670
2671         # Check whether --enable-rlookups or --disable-rlookups was given.
2672 if test "${enable_rlookups+set}" = set; then
2673   enableval="$enable_rlookups"
2674
2675         ol_arg=invalid
2676         for ol_val in auto yes no ; do
2677                 if test "$enableval" = "$ol_val" ; then
2678                         ol_arg="$ol_val"
2679                 fi
2680         done
2681         if test "$ol_arg" = "invalid" ; then
2682                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rlookups" >&5
2683 echo "$as_me: error: bad value $enableval for --enable-rlookups" >&2;}
2684    { (exit 1); exit 1; }; }
2685         fi
2686         ol_enable_rlookups="$ol_arg"
2687
2688 else
2689         ol_enable_rlookups=no
2690 fi;
2691 # end --enable-rlookups
2692 # OpenLDAP --enable-slapi
2693
2694         # Check whether --enable-slapi or --disable-slapi was given.
2695 if test "${enable_slapi+set}" = set; then
2696   enableval="$enable_slapi"
2697
2698         ol_arg=invalid
2699         for ol_val in auto yes no ; do
2700                 if test "$enableval" = "$ol_val" ; then
2701                         ol_arg="$ol_val"
2702                 fi
2703         done
2704         if test "$ol_arg" = "invalid" ; then
2705                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slapi" >&5
2706 echo "$as_me: error: bad value $enableval for --enable-slapi" >&2;}
2707    { (exit 1); exit 1; }; }
2708         fi
2709         ol_enable_slapi="$ol_arg"
2710
2711 else
2712         ol_enable_slapi=no
2713 fi;
2714 # end --enable-slapi
2715 # OpenLDAP --enable-slp
2716
2717         # Check whether --enable-slp or --disable-slp was given.
2718 if test "${enable_slp+set}" = set; then
2719   enableval="$enable_slp"
2720
2721         ol_arg=invalid
2722         for ol_val in auto yes no ; do
2723                 if test "$enableval" = "$ol_val" ; then
2724                         ol_arg="$ol_val"
2725                 fi
2726         done
2727         if test "$ol_arg" = "invalid" ; then
2728                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slp" >&5
2729 echo "$as_me: error: bad value $enableval for --enable-slp" >&2;}
2730    { (exit 1); exit 1; }; }
2731         fi
2732         ol_enable_slp="$ol_arg"
2733
2734 else
2735         ol_enable_slp=no
2736 fi;
2737 # end --enable-slp
2738 # OpenLDAP --enable-wrappers
2739
2740         # Check whether --enable-wrappers or --disable-wrappers was given.
2741 if test "${enable_wrappers+set}" = set; then
2742   enableval="$enable_wrappers"
2743
2744         ol_arg=invalid
2745         for ol_val in auto yes no ; do
2746                 if test "$enableval" = "$ol_val" ; then
2747                         ol_arg="$ol_val"
2748                 fi
2749         done
2750         if test "$ol_arg" = "invalid" ; then
2751                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-wrappers" >&5
2752 echo "$as_me: error: bad value $enableval for --enable-wrappers" >&2;}
2753    { (exit 1); exit 1; }; }
2754         fi
2755         ol_enable_wrappers="$ol_arg"
2756
2757 else
2758         ol_enable_wrappers=no
2759 fi;
2760 # end --enable-wrappers
2761
2762 Backends="bdb \
2763         dnssrv \
2764         hdb \
2765         ldap \
2766         ldbm \
2767         meta \
2768         monitor \
2769         null \
2770         passwd \
2771         perl \
2772         relay \
2773         shell \
2774         sql"
2775
2776 # Check whether --enable-xxslapbackends or --disable-xxslapbackends was given.
2777 if test "${enable_xxslapbackends+set}" = set; then
2778   enableval="$enable_xxslapbackends"
2779
2780 fi;
2781
2782 # OpenLDAP --enable-backends
2783
2784         # Check whether --enable-backends or --disable-backends was given.
2785 if test "${enable_backends+set}" = set; then
2786   enableval="$enable_backends"
2787
2788         ol_arg=invalid
2789         for ol_val in no yes mod ; do
2790                 if test "$enableval" = "$ol_val" ; then
2791                         ol_arg="$ol_val"
2792                 fi
2793         done
2794         if test "$ol_arg" = "invalid" ; then
2795                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-backends" >&5
2796 echo "$as_me: error: bad value $enableval for --enable-backends" >&2;}
2797    { (exit 1); exit 1; }; }
2798         fi
2799         ol_enable_backends="$ol_arg"
2800
2801 fi;
2802 # end --enable-backends
2803 # OpenLDAP --enable-bdb
2804
2805         # Check whether --enable-bdb or --disable-bdb was given.
2806 if test "${enable_bdb+set}" = set; then
2807   enableval="$enable_bdb"
2808
2809         ol_arg=invalid
2810         for ol_val in no yes mod ; do
2811                 if test "$enableval" = "$ol_val" ; then
2812                         ol_arg="$ol_val"
2813                 fi
2814         done
2815         if test "$ol_arg" = "invalid" ; then
2816                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-bdb" >&5
2817 echo "$as_me: error: bad value $enableval for --enable-bdb" >&2;}
2818    { (exit 1); exit 1; }; }
2819         fi
2820         ol_enable_bdb="$ol_arg"
2821
2822 else
2823         ol_enable_bdb=${ol_enable_backends:-yes}
2824 fi;
2825 # end --enable-bdb
2826 # OpenLDAP --enable-dnssrv
2827
2828         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2829 if test "${enable_dnssrv+set}" = set; then
2830   enableval="$enable_dnssrv"
2831
2832         ol_arg=invalid
2833         for ol_val in no yes mod ; do
2834                 if test "$enableval" = "$ol_val" ; then
2835                         ol_arg="$ol_val"
2836                 fi
2837         done
2838         if test "$ol_arg" = "invalid" ; then
2839                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dnssrv" >&5
2840 echo "$as_me: error: bad value $enableval for --enable-dnssrv" >&2;}
2841    { (exit 1); exit 1; }; }
2842         fi
2843         ol_enable_dnssrv="$ol_arg"
2844
2845 else
2846         ol_enable_dnssrv=${ol_enable_backends:-no}
2847 fi;
2848 # end --enable-dnssrv
2849 # OpenLDAP --enable-hdb
2850
2851         # Check whether --enable-hdb or --disable-hdb was given.
2852 if test "${enable_hdb+set}" = set; then
2853   enableval="$enable_hdb"
2854
2855         ol_arg=invalid
2856         for ol_val in no yes mod ; do
2857                 if test "$enableval" = "$ol_val" ; then
2858                         ol_arg="$ol_val"
2859                 fi
2860         done
2861         if test "$ol_arg" = "invalid" ; then
2862                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-hdb" >&5
2863 echo "$as_me: error: bad value $enableval for --enable-hdb" >&2;}
2864    { (exit 1); exit 1; }; }
2865         fi
2866         ol_enable_hdb="$ol_arg"
2867
2868 else
2869         ol_enable_hdb=${ol_enable_backends:-yes}
2870 fi;
2871 # end --enable-hdb
2872 # OpenLDAP --enable-ldap
2873
2874         # Check whether --enable-ldap or --disable-ldap was given.
2875 if test "${enable_ldap+set}" = set; then
2876   enableval="$enable_ldap"
2877
2878         ol_arg=invalid
2879         for ol_val in no yes mod ; do
2880                 if test "$enableval" = "$ol_val" ; then
2881                         ol_arg="$ol_val"
2882                 fi
2883         done
2884         if test "$ol_arg" = "invalid" ; then
2885                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldap" >&5
2886 echo "$as_me: error: bad value $enableval for --enable-ldap" >&2;}
2887    { (exit 1); exit 1; }; }
2888         fi
2889         ol_enable_ldap="$ol_arg"
2890
2891 else
2892         ol_enable_ldap=${ol_enable_backends:-no}
2893 fi;
2894 # end --enable-ldap
2895 # OpenLDAP --enable-ldbm
2896
2897         # Check whether --enable-ldbm or --disable-ldbm was given.
2898 if test "${enable_ldbm+set}" = set; then
2899   enableval="$enable_ldbm"
2900
2901         ol_arg=invalid
2902         for ol_val in no yes mod ; do
2903                 if test "$enableval" = "$ol_val" ; then
2904                         ol_arg="$ol_val"
2905                 fi
2906         done
2907         if test "$ol_arg" = "invalid" ; then
2908                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldbm" >&5
2909 echo "$as_me: error: bad value $enableval for --enable-ldbm" >&2;}
2910    { (exit 1); exit 1; }; }
2911         fi
2912         ol_enable_ldbm="$ol_arg"
2913
2914 else
2915         ol_enable_ldbm=${ol_enable_backends:-no}
2916 fi;
2917 # end --enable-ldbm
2918
2919 # Check whether --with-ldbm_api or --without-ldbm_api was given.
2920 if test "${with_ldbm_api+set}" = set; then
2921   withval="$with_ldbm_api"
2922
2923         { echo "$as_me:$LINENO: WARNING: Please use --enable-ldbm-api instead of --with-ldbm-api" >&5
2924 echo "$as_me: WARNING: Please use --enable-ldbm-api instead of --with-ldbm-api" >&2;}
2925         enable_ldbm_api="$with_ldbm_api"
2926 fi;
2927 # OpenLDAP --enable-ldbm_api
2928
2929         # Check whether --enable-ldbm_api or --disable-ldbm_api was given.
2930 if test "${enable_ldbm_api+set}" = set; then
2931   enableval="$enable_ldbm_api"
2932
2933         ol_arg=invalid
2934         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2935                 if test "$enableval" = "$ol_val" ; then
2936                         ol_arg="$ol_val"
2937                 fi
2938         done
2939         if test "$ol_arg" = "invalid" ; then
2940                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldbm_api" >&5
2941 echo "$as_me: error: bad value $enableval for --enable-ldbm_api" >&2;}
2942    { (exit 1); exit 1; }; }
2943         fi
2944         ol_enable_ldbm_api="$ol_arg"
2945
2946 else
2947         ol_enable_ldbm_api=auto
2948 fi;
2949 # end --enable-ldbm_api
2950
2951
2952 # Check whether --with-ldbm_type or --without-ldbm_type was given.
2953 if test "${with_ldbm_type+set}" = set; then
2954   withval="$with_ldbm_type"
2955
2956         { echo "$as_me:$LINENO: WARNING: Please use --enable-ldbm-type instead of --with-ldbm-type" >&5
2957 echo "$as_me: WARNING: Please use --enable-ldbm-type instead of --with-ldbm-type" >&2;}
2958         enable_ldbm_type="$with_ldbm_type"
2959 fi;
2960 # OpenLDAP --enable-ldbm_type
2961
2962         # Check whether --enable-ldbm_type or --disable-ldbm_type was given.
2963 if test "${enable_ldbm_type+set}" = set; then
2964   enableval="$enable_ldbm_type"
2965
2966         ol_arg=invalid
2967         for ol_val in auto btree hash ; do
2968                 if test "$enableval" = "$ol_val" ; then
2969                         ol_arg="$ol_val"
2970                 fi
2971         done
2972         if test "$ol_arg" = "invalid" ; then
2973                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldbm_type" >&5
2974 echo "$as_me: error: bad value $enableval for --enable-ldbm_type" >&2;}
2975    { (exit 1); exit 1; }; }
2976         fi
2977         ol_enable_ldbm_type="$ol_arg"
2978
2979 else
2980         ol_enable_ldbm_type=auto
2981 fi;
2982 # end --enable-ldbm_type
2983
2984 # OpenLDAP --enable-meta
2985
2986         # Check whether --enable-meta or --disable-meta was given.
2987 if test "${enable_meta+set}" = set; then
2988   enableval="$enable_meta"
2989
2990         ol_arg=invalid
2991         for ol_val in no yes mod ; do
2992                 if test "$enableval" = "$ol_val" ; then
2993                         ol_arg="$ol_val"
2994                 fi
2995         done
2996         if test "$ol_arg" = "invalid" ; then
2997                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-meta" >&5
2998 echo "$as_me: error: bad value $enableval for --enable-meta" >&2;}
2999    { (exit 1); exit 1; }; }
3000         fi
3001         ol_enable_meta="$ol_arg"
3002
3003 else
3004         ol_enable_meta=${ol_enable_backends:-no}
3005 fi;
3006 # end --enable-meta
3007 # OpenLDAP --enable-monitor
3008
3009         # Check whether --enable-monitor or --disable-monitor was given.
3010 if test "${enable_monitor+set}" = set; then
3011   enableval="$enable_monitor"
3012
3013         ol_arg=invalid
3014         for ol_val in no yes mod ; do
3015                 if test "$enableval" = "$ol_val" ; then
3016                         ol_arg="$ol_val"
3017                 fi
3018         done
3019         if test "$ol_arg" = "invalid" ; then
3020                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-monitor" >&5
3021 echo "$as_me: error: bad value $enableval for --enable-monitor" >&2;}
3022    { (exit 1); exit 1; }; }
3023         fi
3024         ol_enable_monitor="$ol_arg"
3025
3026 else
3027         ol_enable_monitor=${ol_enable_backends:-yes}
3028 fi;
3029 # end --enable-monitor
3030 # OpenLDAP --enable-null
3031
3032         # Check whether --enable-null or --disable-null was given.
3033 if test "${enable_null+set}" = set; then
3034   enableval="$enable_null"
3035
3036         ol_arg=invalid
3037         for ol_val in no yes mod ; do
3038                 if test "$enableval" = "$ol_val" ; then
3039                         ol_arg="$ol_val"
3040                 fi
3041         done
3042         if test "$ol_arg" = "invalid" ; then
3043                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-null" >&5
3044 echo "$as_me: error: bad value $enableval for --enable-null" >&2;}
3045    { (exit 1); exit 1; }; }
3046         fi
3047         ol_enable_null="$ol_arg"
3048
3049 else
3050         ol_enable_null=${ol_enable_backends:-no}
3051 fi;
3052 # end --enable-null
3053 # OpenLDAP --enable-passwd
3054
3055         # Check whether --enable-passwd or --disable-passwd was given.
3056 if test "${enable_passwd+set}" = set; then
3057   enableval="$enable_passwd"
3058
3059         ol_arg=invalid
3060         for ol_val in no yes mod ; do
3061                 if test "$enableval" = "$ol_val" ; then
3062                         ol_arg="$ol_val"
3063                 fi
3064         done
3065         if test "$ol_arg" = "invalid" ; then
3066                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-passwd" >&5
3067 echo "$as_me: error: bad value $enableval for --enable-passwd" >&2;}
3068    { (exit 1); exit 1; }; }
3069         fi
3070         ol_enable_passwd="$ol_arg"
3071
3072 else
3073         ol_enable_passwd=${ol_enable_backends:-no}
3074 fi;
3075 # end --enable-passwd
3076 # OpenLDAP --enable-perl
3077
3078         # Check whether --enable-perl or --disable-perl was given.
3079 if test "${enable_perl+set}" = set; then
3080   enableval="$enable_perl"
3081
3082         ol_arg=invalid
3083         for ol_val in no yes mod ; do
3084                 if test "$enableval" = "$ol_val" ; then
3085                         ol_arg="$ol_val"
3086                 fi
3087         done
3088         if test "$ol_arg" = "invalid" ; then
3089                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-perl" >&5
3090 echo "$as_me: error: bad value $enableval for --enable-perl" >&2;}
3091    { (exit 1); exit 1; }; }
3092         fi
3093         ol_enable_perl="$ol_arg"
3094
3095 else
3096         ol_enable_perl=${ol_enable_backends:-no}
3097 fi;
3098 # end --enable-perl
3099 # OpenLDAP --enable-relay
3100
3101         # Check whether --enable-relay or --disable-relay was given.
3102 if test "${enable_relay+set}" = set; then
3103   enableval="$enable_relay"
3104
3105         ol_arg=invalid
3106         for ol_val in no yes mod ; do
3107                 if test "$enableval" = "$ol_val" ; then
3108                         ol_arg="$ol_val"
3109                 fi
3110         done
3111         if test "$ol_arg" = "invalid" ; then
3112                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-relay" >&5
3113 echo "$as_me: error: bad value $enableval for --enable-relay" >&2;}
3114    { (exit 1); exit 1; }; }
3115         fi
3116         ol_enable_relay="$ol_arg"
3117
3118 else
3119         ol_enable_relay=${ol_enable_backends:-yes}
3120 fi;
3121 # end --enable-relay
3122 # OpenLDAP --enable-shell
3123
3124         # Check whether --enable-shell or --disable-shell was given.
3125 if test "${enable_shell+set}" = set; then
3126   enableval="$enable_shell"
3127
3128         ol_arg=invalid
3129         for ol_val in no yes mod ; do
3130                 if test "$enableval" = "$ol_val" ; then
3131                         ol_arg="$ol_val"
3132                 fi
3133         done
3134         if test "$ol_arg" = "invalid" ; then
3135                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-shell" >&5
3136 echo "$as_me: error: bad value $enableval for --enable-shell" >&2;}
3137    { (exit 1); exit 1; }; }
3138         fi
3139         ol_enable_shell="$ol_arg"
3140
3141 else
3142         ol_enable_shell=${ol_enable_backends:-no}
3143 fi;
3144 # end --enable-shell
3145 # OpenLDAP --enable-sql
3146
3147         # Check whether --enable-sql or --disable-sql was given.
3148 if test "${enable_sql+set}" = set; then
3149   enableval="$enable_sql"
3150
3151         ol_arg=invalid
3152         for ol_val in no yes mod ; do
3153                 if test "$enableval" = "$ol_val" ; then
3154                         ol_arg="$ol_val"
3155                 fi
3156         done
3157         if test "$ol_arg" = "invalid" ; then
3158                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-sql" >&5
3159 echo "$as_me: error: bad value $enableval for --enable-sql" >&2;}
3160    { (exit 1); exit 1; }; }
3161         fi
3162         ol_enable_sql="$ol_arg"
3163
3164 else
3165         ol_enable_sql=${ol_enable_backends:-no}
3166 fi;
3167 # end --enable-sql
3168
3169 Overlays="accesslog \
3170         auditlog \
3171         dds \
3172         denyop \
3173         dyngroup \
3174         dynlist \
3175         lastmod \
3176         ppolicy \
3177         proxycache \
3178         refint \
3179         retcode \
3180         rwm \
3181         seqmod \
3182         syncprov \
3183         translucent \
3184         unique \
3185         valsort"
3186
3187 # Check whether --enable-xxslapoverlays or --disable-xxslapoverlays was given.
3188 if test "${enable_xxslapoverlays+set}" = set; then
3189   enableval="$enable_xxslapoverlays"
3190
3191 fi;
3192
3193 # OpenLDAP --enable-overlays
3194
3195         # Check whether --enable-overlays or --disable-overlays was given.
3196 if test "${enable_overlays+set}" = set; then
3197   enableval="$enable_overlays"
3198
3199         ol_arg=invalid
3200         for ol_val in no yes mod ; do
3201                 if test "$enableval" = "$ol_val" ; then
3202                         ol_arg="$ol_val"
3203                 fi
3204         done
3205         if test "$ol_arg" = "invalid" ; then
3206                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-overlays" >&5
3207 echo "$as_me: error: bad value $enableval for --enable-overlays" >&2;}
3208    { (exit 1); exit 1; }; }
3209         fi
3210         ol_enable_overlays="$ol_arg"
3211
3212 fi;
3213 # end --enable-overlays
3214 # OpenLDAP --enable-accesslog
3215
3216         # Check whether --enable-accesslog or --disable-accesslog was given.
3217 if test "${enable_accesslog+set}" = set; then
3218   enableval="$enable_accesslog"
3219
3220         ol_arg=invalid
3221         for ol_val in no yes mod ; do
3222                 if test "$enableval" = "$ol_val" ; then
3223                         ol_arg="$ol_val"
3224                 fi
3225         done
3226         if test "$ol_arg" = "invalid" ; then
3227                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-accesslog" >&5
3228 echo "$as_me: error: bad value $enableval for --enable-accesslog" >&2;}
3229    { (exit 1); exit 1; }; }
3230         fi
3231         ol_enable_accesslog="$ol_arg"
3232
3233 else
3234         ol_enable_accesslog=${ol_enable_overlays:-no}
3235 fi;
3236 # end --enable-accesslog
3237
3238 # OpenLDAP --enable-auditlog
3239
3240         # Check whether --enable-auditlog or --disable-auditlog was given.
3241 if test "${enable_auditlog+set}" = set; then
3242   enableval="$enable_auditlog"
3243
3244         ol_arg=invalid
3245         for ol_val in no yes mod ; do
3246                 if test "$enableval" = "$ol_val" ; then
3247                         ol_arg="$ol_val"
3248                 fi
3249         done
3250         if test "$ol_arg" = "invalid" ; then
3251                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-auditlog" >&5
3252 echo "$as_me: error: bad value $enableval for --enable-auditlog" >&2;}
3253    { (exit 1); exit 1; }; }
3254         fi
3255         ol_enable_auditlog="$ol_arg"
3256
3257 else
3258         ol_enable_auditlog=${ol_enable_overlays:-no}
3259 fi;
3260 # end --enable-auditlog
3261
3262 # OpenLDAP --enable-dds
3263
3264         # Check whether --enable-dds or --disable-dds was given.
3265 if test "${enable_dds+set}" = set; then
3266   enableval="$enable_dds"
3267
3268         ol_arg=invalid
3269         for ol_val in no yes mod ; do
3270                 if test "$enableval" = "$ol_val" ; then
3271                         ol_arg="$ol_val"
3272                 fi
3273         done
3274         if test "$ol_arg" = "invalid" ; then
3275                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dds" >&5
3276 echo "$as_me: error: bad value $enableval for --enable-dds" >&2;}
3277    { (exit 1); exit 1; }; }
3278         fi
3279         ol_enable_dds="$ol_arg"
3280
3281 else
3282         ol_enable_dds=${ol_enable_overlays:-no}
3283 fi;
3284 # end --enable-dds
3285
3286 # OpenLDAP --enable-denyop
3287
3288         # Check whether --enable-denyop or --disable-denyop was given.
3289 if test "${enable_denyop+set}" = set; then
3290   enableval="$enable_denyop"
3291
3292         ol_arg=invalid
3293         for ol_val in no yes mod ; do
3294                 if test "$enableval" = "$ol_val" ; then
3295                         ol_arg="$ol_val"
3296                 fi
3297         done
3298         if test "$ol_arg" = "invalid" ; then
3299                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-denyop" >&5
3300 echo "$as_me: error: bad value $enableval for --enable-denyop" >&2;}
3301    { (exit 1); exit 1; }; }
3302         fi
3303         ol_enable_denyop="$ol_arg"
3304
3305 else
3306         ol_enable_denyop=${ol_enable_overlays:-no}
3307 fi;
3308 # end --enable-denyop
3309
3310 # OpenLDAP --enable-dyngroup
3311
3312         # Check whether --enable-dyngroup or --disable-dyngroup was given.
3313 if test "${enable_dyngroup+set}" = set; then
3314   enableval="$enable_dyngroup"
3315
3316         ol_arg=invalid
3317         for ol_val in no yes mod ; do
3318                 if test "$enableval" = "$ol_val" ; then
3319                         ol_arg="$ol_val"
3320                 fi
3321         done
3322         if test "$ol_arg" = "invalid" ; then
3323                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dyngroup" >&5
3324 echo "$as_me: error: bad value $enableval for --enable-dyngroup" >&2;}
3325    { (exit 1); exit 1; }; }
3326         fi
3327         ol_enable_dyngroup="$ol_arg"
3328
3329 else
3330         ol_enable_dyngroup=${ol_enable_overlays:-no}
3331 fi;
3332 # end --enable-dyngroup
3333
3334 # OpenLDAP --enable-dynlist
3335
3336         # Check whether --enable-dynlist or --disable-dynlist was given.
3337 if test "${enable_dynlist+set}" = set; then
3338   enableval="$enable_dynlist"
3339
3340         ol_arg=invalid
3341         for ol_val in no yes mod ; do
3342                 if test "$enableval" = "$ol_val" ; then
3343                         ol_arg="$ol_val"
3344                 fi
3345         done
3346         if test "$ol_arg" = "invalid" ; then
3347                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dynlist" >&5
3348 echo "$as_me: error: bad value $enableval for --enable-dynlist" >&2;}
3349    { (exit 1); exit 1; }; }
3350         fi
3351         ol_enable_dynlist="$ol_arg"
3352
3353 else
3354         ol_enable_dynlist=${ol_enable_overlays:-no}
3355 fi;
3356 # end --enable-dynlist
3357
3358 # OpenLDAP --enable-lastmod
3359
3360         # Check whether --enable-lastmod or --disable-lastmod was given.
3361 if test "${enable_lastmod+set}" = set; then
3362   enableval="$enable_lastmod"
3363
3364         ol_arg=invalid
3365         for ol_val in no yes mod ; do
3366                 if test "$enableval" = "$ol_val" ; then
3367                         ol_arg="$ol_val"
3368                 fi
3369         done
3370         if test "$ol_arg" = "invalid" ; then
3371                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-lastmod" >&5
3372 echo "$as_me: error: bad value $enableval for --enable-lastmod" >&2;}
3373    { (exit 1); exit 1; }; }
3374         fi
3375         ol_enable_lastmod="$ol_arg"
3376
3377 else
3378         ol_enable_lastmod=${ol_enable_overlays:-no}
3379 fi;
3380 # end --enable-lastmod
3381
3382 # OpenLDAP --enable-ppolicy
3383
3384         # Check whether --enable-ppolicy or --disable-ppolicy was given.
3385 if test "${enable_ppolicy+set}" = set; then
3386   enableval="$enable_ppolicy"
3387
3388         ol_arg=invalid
3389         for ol_val in no yes mod ; do
3390                 if test "$enableval" = "$ol_val" ; then
3391                         ol_arg="$ol_val"
3392                 fi
3393         done
3394         if test "$ol_arg" = "invalid" ; then
3395                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ppolicy" >&5
3396 echo "$as_me: error: bad value $enableval for --enable-ppolicy" >&2;}
3397    { (exit 1); exit 1; }; }
3398         fi
3399         ol_enable_ppolicy="$ol_arg"
3400
3401 else
3402         ol_enable_ppolicy=${ol_enable_overlays:-no}
3403 fi;
3404 # end --enable-ppolicy
3405
3406 # OpenLDAP --enable-proxycache
3407
3408         # Check whether --enable-proxycache or --disable-proxycache was given.
3409 if test "${enable_proxycache+set}" = set; then
3410   enableval="$enable_proxycache"
3411
3412         ol_arg=invalid
3413         for ol_val in no yes mod ; do
3414                 if test "$enableval" = "$ol_val" ; then
3415                         ol_arg="$ol_val"
3416                 fi
3417         done
3418         if test "$ol_arg" = "invalid" ; then
3419                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-proxycache" >&5
3420 echo "$as_me: error: bad value $enableval for --enable-proxycache" >&2;}
3421    { (exit 1); exit 1; }; }
3422         fi
3423         ol_enable_proxycache="$ol_arg"
3424
3425 else
3426         ol_enable_proxycache=${ol_enable_overlays:-no}
3427 fi;
3428 # end --enable-proxycache
3429
3430 # OpenLDAP --enable-refint
3431
3432         # Check whether --enable-refint or --disable-refint was given.
3433 if test "${enable_refint+set}" = set; then
3434   enableval="$enable_refint"
3435
3436         ol_arg=invalid
3437         for ol_val in no yes mod ; do
3438                 if test "$enableval" = "$ol_val" ; then
3439                         ol_arg="$ol_val"
3440                 fi
3441         done
3442         if test "$ol_arg" = "invalid" ; then
3443                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-refint" >&5
3444 echo "$as_me: error: bad value $enableval for --enable-refint" >&2;}
3445    { (exit 1); exit 1; }; }
3446         fi
3447         ol_enable_refint="$ol_arg"
3448
3449 else
3450         ol_enable_refint=${ol_enable_overlays:-no}
3451 fi;
3452 # end --enable-refint
3453
3454 # OpenLDAP --enable-retcode
3455
3456         # Check whether --enable-retcode or --disable-retcode was given.
3457 if test "${enable_retcode+set}" = set; then
3458   enableval="$enable_retcode"
3459
3460         ol_arg=invalid
3461         for ol_val in no yes mod ; do
3462                 if test "$enableval" = "$ol_val" ; then
3463                         ol_arg="$ol_val"
3464                 fi
3465         done
3466         if test "$ol_arg" = "invalid" ; then
3467                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-retcode" >&5
3468 echo "$as_me: error: bad value $enableval for --enable-retcode" >&2;}
3469    { (exit 1); exit 1; }; }
3470         fi
3471         ol_enable_retcode="$ol_arg"
3472
3473 else
3474         ol_enable_retcode=${ol_enable_overlays:-no}
3475 fi;
3476 # end --enable-retcode
3477
3478 # OpenLDAP --enable-rwm
3479
3480         # Check whether --enable-rwm or --disable-rwm was given.
3481 if test "${enable_rwm+set}" = set; then
3482   enableval="$enable_rwm"
3483
3484         ol_arg=invalid
3485         for ol_val in no yes mod ; do
3486                 if test "$enableval" = "$ol_val" ; then
3487                         ol_arg="$ol_val"
3488                 fi
3489         done
3490         if test "$ol_arg" = "invalid" ; then
3491                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rwm" >&5
3492 echo "$as_me: error: bad value $enableval for --enable-rwm" >&2;}
3493    { (exit 1); exit 1; }; }
3494         fi
3495         ol_enable_rwm="$ol_arg"
3496
3497 else
3498         ol_enable_rwm=${ol_enable_overlays:-no}
3499 fi;
3500 # end --enable-rwm
3501
3502 # OpenLDAP --enable-seqmod
3503
3504         # Check whether --enable-seqmod or --disable-seqmod was given.
3505 if test "${enable_seqmod+set}" = set; then
3506   enableval="$enable_seqmod"
3507
3508         ol_arg=invalid
3509         for ol_val in no yes mod ; do
3510                 if test "$enableval" = "$ol_val" ; then
3511                         ol_arg="$ol_val"
3512                 fi
3513         done
3514         if test "$ol_arg" = "invalid" ; then
3515                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-seqmod" >&5
3516 echo "$as_me: error: bad value $enableval for --enable-seqmod" >&2;}
3517    { (exit 1); exit 1; }; }
3518         fi
3519         ol_enable_seqmod="$ol_arg"
3520
3521 else
3522         ol_enable_seqmod=${ol_enable_overlays:-yes}
3523 fi;
3524 # end --enable-seqmod
3525
3526 # OpenLDAP --enable-syncprov
3527
3528         # Check whether --enable-syncprov or --disable-syncprov was given.
3529 if test "${enable_syncprov+set}" = set; then
3530   enableval="$enable_syncprov"
3531
3532         ol_arg=invalid
3533         for ol_val in no yes mod ; do
3534                 if test "$enableval" = "$ol_val" ; then
3535                         ol_arg="$ol_val"
3536                 fi
3537         done
3538         if test "$ol_arg" = "invalid" ; then
3539                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-syncprov" >&5
3540 echo "$as_me: error: bad value $enableval for --enable-syncprov" >&2;}
3541    { (exit 1); exit 1; }; }
3542         fi
3543         ol_enable_syncprov="$ol_arg"
3544
3545 else
3546         ol_enable_syncprov=${ol_enable_overlays:-yes}
3547 fi;
3548 # end --enable-syncprov
3549
3550 # OpenLDAP --enable-translucent
3551
3552         # Check whether --enable-translucent or --disable-translucent was given.
3553 if test "${enable_translucent+set}" = set; then
3554   enableval="$enable_translucent"
3555
3556         ol_arg=invalid
3557         for ol_val in no yes mod ; do
3558                 if test "$enableval" = "$ol_val" ; then
3559                         ol_arg="$ol_val"
3560                 fi
3561         done
3562         if test "$ol_arg" = "invalid" ; then
3563                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-translucent" >&5
3564 echo "$as_me: error: bad value $enableval for --enable-translucent" >&2;}
3565    { (exit 1); exit 1; }; }
3566         fi
3567         ol_enable_translucent="$ol_arg"
3568
3569 else
3570         ol_enable_translucent=${ol_enable_overlays:-no}
3571 fi;
3572 # end --enable-translucent
3573
3574 # OpenLDAP --enable-unique
3575
3576         # Check whether --enable-unique or --disable-unique was given.
3577 if test "${enable_unique+set}" = set; then
3578   enableval="$enable_unique"
3579
3580         ol_arg=invalid
3581         for ol_val in no yes mod ; do
3582                 if test "$enableval" = "$ol_val" ; then
3583                         ol_arg="$ol_val"
3584                 fi
3585         done
3586         if test "$ol_arg" = "invalid" ; then
3587                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-unique" >&5
3588 echo "$as_me: error: bad value $enableval for --enable-unique" >&2;}
3589    { (exit 1); exit 1; }; }
3590         fi
3591         ol_enable_unique="$ol_arg"
3592
3593 else
3594         ol_enable_unique=${ol_enable_overlays:-no}
3595 fi;
3596 # end --enable-unique
3597
3598 # OpenLDAP --enable-valsort
3599
3600         # Check whether --enable-valsort or --disable-valsort was given.
3601 if test "${enable_valsort+set}" = set; then
3602   enableval="$enable_valsort"
3603
3604         ol_arg=invalid
3605         for ol_val in no yes mod ; do
3606                 if test "$enableval" = "$ol_val" ; then
3607                         ol_arg="$ol_val"
3608                 fi
3609         done
3610         if test "$ol_arg" = "invalid" ; then
3611                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-valsort" >&5
3612 echo "$as_me: error: bad value $enableval for --enable-valsort" >&2;}
3613    { (exit 1); exit 1; }; }
3614         fi
3615         ol_enable_valsort="$ol_arg"
3616
3617 else
3618         ol_enable_valsort=${ol_enable_overlays:-no}
3619 fi;
3620 # end --enable-valsort
3621
3622
3623 # Check whether --enable-xxslurpdoptions or --disable-xxslurpdoptions was given.
3624 if test "${enable_xxslurpdoptions+set}" = set; then
3625   enableval="$enable_xxslurpdoptions"
3626
3627 fi;
3628 # OpenLDAP --enable-slurpd
3629
3630         # Check whether --enable-slurpd or --disable-slurpd was given.
3631 if test "${enable_slurpd+set}" = set; then
3632   enableval="$enable_slurpd"
3633
3634         ol_arg=invalid
3635         for ol_val in auto yes no ; do
3636                 if test "$enableval" = "$ol_val" ; then
3637                         ol_arg="$ol_val"
3638                 fi
3639         done
3640         if test "$ol_arg" = "invalid" ; then
3641                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slurpd" >&5
3642 echo "$as_me: error: bad value $enableval for --enable-slurpd" >&2;}
3643    { (exit 1); exit 1; }; }
3644         fi
3645         ol_enable_slurpd="$ol_arg"
3646
3647 else
3648         ol_enable_slurpd=auto
3649 fi;
3650 # end --enable-slurpd
3651
3652 # Check whether --enable-xxliboptions or --disable-xxliboptions was given.
3653 if test "${enable_xxliboptions+set}" = set; then
3654   enableval="$enable_xxliboptions"
3655
3656 fi;
3657 # Check whether --enable-static or --disable-static was given.
3658 if test "${enable_static+set}" = set; then
3659   enableval="$enable_static"
3660   p=${PACKAGE-default}
3661     case $enableval in
3662     yes) enable_static=yes ;;
3663     no) enable_static=no ;;
3664     *)
3665      enable_static=no
3666       # Look at the argument we got.  We use all the common list separators.
3667       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3668       for pkg in $enableval; do
3669         IFS="$lt_save_ifs"
3670         if test "X$pkg" = "X$p"; then
3671           enable_static=yes
3672         fi
3673       done
3674       IFS="$lt_save_ifs"
3675       ;;
3676     esac
3677 else
3678   enable_static=yes
3679 fi;
3680
3681 # Check whether --enable-shared or --disable-shared was given.
3682 if test "${enable_shared+set}" = set; then
3683   enableval="$enable_shared"
3684   p=${PACKAGE-default}
3685     case $enableval in
3686     yes) enable_shared=yes ;;
3687     no) enable_shared=no ;;
3688     *)
3689       enable_shared=no
3690       # Look at the argument we got.  We use all the common list separators.
3691       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3692       for pkg in $enableval; do
3693         IFS="$lt_save_ifs"
3694         if test "X$pkg" = "X$p"; then
3695           enable_shared=yes
3696         fi
3697       done
3698       IFS="$lt_save_ifs"
3699       ;;
3700     esac
3701 else
3702   enable_shared=yes
3703 fi;
3704
3705
3706
3707 # validate options
3708 if test $ol_enable_slapd = no ; then
3709                 if test $ol_enable_slapi = yes ; then
3710                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-slapi argument" >&5
3711 echo "$as_me: WARNING: slapd disabled, ignoring --enable-slapi argument" >&2;}
3712         fi
3713         case "$ol_enable_backends" in yes | mod)
3714                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-backends argument" >&5
3715 echo "$as_me: WARNING: slapd disabled, ignoring --enable-backends argument" >&2;}
3716         esac
3717         for i in $Backends; do
3718                 eval "ol_tmp=\$ol_enable_$i"
3719                 if test $ol_tmp != no ; then
3720                         { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
3721 echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
3722                         eval "ol_enable_$i=no"
3723                 fi
3724         done
3725         if test $ol_enable_modules = yes ; then
3726                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-modules argument" >&5
3727 echo "$as_me: WARNING: slapd disabled, ignoring --enable-modules argument" >&2;}
3728         fi
3729         if test $ol_enable_wrappers = yes ; then
3730                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&5
3731 echo "$as_me: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&2;}
3732         fi
3733         if test $ol_enable_rlookups = yes ; then
3734                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&5
3735 echo "$as_me: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&2;}
3736         fi
3737         if test $ol_enable_dynacl = yes ; then
3738                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&5
3739 echo "$as_me: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&2;}
3740         fi
3741         if test $ol_enable_aci != no ; then
3742                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-aci argument" >&5
3743 echo "$as_me: WARNING: slapd disabled, ignoring --enable-aci argument" >&2;}
3744         fi
3745         if test $ol_enable_ldbm_api != auto ; then
3746                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-ldbm-api argument" >&5
3747 echo "$as_me: WARNING: slapd disabled, ignoring --enable-ldbm-api argument" >&2;}
3748         fi
3749         if test $ol_enable_ldbm_type != auto ; then
3750                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-ldbm-type argument" >&5
3751 echo "$as_me: WARNING: slapd disabled, ignoring --enable-ldbm-type argument" >&2;}
3752         fi
3753         if test $ol_enable_slurpd = yes ; then
3754                 { { echo "$as_me:$LINENO: error: slurpd requires slapd" >&5
3755 echo "$as_me: error: slurpd requires slapd" >&2;}
3756    { (exit 1); exit 1; }; }
3757         fi
3758         if test $ol_enable_rewrite = yes ; then
3759                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&5
3760 echo "$as_me: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&2;}
3761         fi
3762                 case "$ol_enable_overlays" in yes | mod)
3763                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-overlays argument" >&5
3764 echo "$as_me: WARNING: slapd disabled, ignoring --enable-overlays argument" >&2;}
3765         esac
3766         for i in $Overlays; do
3767                 eval "ol_tmp=\$ol_enable_$i"
3768                 if test $ol_tmp != no ; then
3769                         { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
3770 echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
3771                         eval "ol_enable_$i=no"
3772                 fi
3773         done
3774
3775         # force settings to no
3776         ol_enable_slapi=no
3777
3778         ol_enable_backends=
3779         ol_enable_overlays=
3780         ol_enable_modules=no
3781         ol_enable_rlookups=no
3782         ol_enable_dynacl=no
3783         ol_enable_aci=no
3784         ol_enable_wrappers=no
3785
3786         ol_enable_ldbm_api=no
3787         ol_enable_ldbm_type=no
3788
3789         ol_enable_slurpd=no
3790
3791         ol_enable_rewrite=no
3792
3793 elif test $ol_enable_ldbm = no ; then
3794
3795         if test $ol_enable_ldbm_api != auto ; then
3796                 { echo "$as_me:$LINENO: WARNING: LDBM disabled, ignoring --enable-ldbm-api argument" >&5
3797 echo "$as_me: WARNING: LDBM disabled, ignoring --enable-ldbm-api argument" >&2;}
3798         fi
3799
3800         if test $ol_enable_ldbm_type != auto ; then
3801                 { echo "$as_me:$LINENO: WARNING: LDBM disabled, ignoring --enable-ldbm-type argument" >&5
3802 echo "$as_me: WARNING: LDBM disabled, ignoring --enable-ldbm-type argument" >&2;}
3803         fi
3804
3805         if test $ol_enable_modules != yes &&
3806            test $ol_enable_bdb = no &&
3807            test $ol_enable_dnssrv = no &&
3808            test $ol_enable_hdb = no &&
3809            test $ol_enable_ldap = no &&
3810            test $ol_enable_meta = no &&
3811            test $ol_enable_monitor = no &&
3812            test $ol_enable_null = no &&
3813            test $ol_enable_passwd = no &&
3814            test $ol_enable_perl = no &&
3815            test $ol_enable_relay = no &&
3816            test $ol_enable_shell = no &&
3817            test $ol_enable_sql = no ; then
3818
3819                 if test $ol_enable_slapd = yes ; then
3820                         { { echo "$as_me:$LINENO: error: slapd requires a backend" >&5
3821 echo "$as_me: error: slapd requires a backend" >&2;}
3822    { (exit 1); exit 1; }; }
3823                 else
3824                         { echo "$as_me:$LINENO: WARNING: skipping slapd, no backend specified" >&5
3825 echo "$as_me: WARNING: skipping slapd, no backend specified" >&2;}
3826                         ol_enable_slapd=no
3827                 fi
3828         fi
3829
3830         ol_enable_ldbm_api=no
3831         ol_enable_ldbm_type=no
3832
3833         if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
3834                 ol_enable_ldbm_api=berkeley
3835         fi
3836
3837 else
3838                 if test $ol_enable_ldbm_api = gdbm &&
3839            test $ol_enable_ldbm_type = btree ; then
3840                 { { echo "$as_me:$LINENO: error: GDBM only supports LDBM type hash" >&5
3841 echo "$as_me: error: GDBM only supports LDBM type hash" >&2;}
3842    { (exit 1); exit 1; }; }
3843         fi
3844         if test $ol_enable_ldbm_api = mdbm &&
3845            test $ol_enable_ldbm_type = btree ; then
3846                 { { echo "$as_me:$LINENO: error: MDBM only supports LDBM type hash" >&5
3847 echo "$as_me: error: MDBM only supports LDBM type hash" >&2;}
3848    { (exit 1); exit 1; }; }
3849         fi
3850         if test $ol_enable_ldbm_api = ndbm &&
3851            test $ol_enable_ldbm_type = btree ; then
3852                 { { echo "$as_me:$LINENO: error: NDBM only supports LDBM type hash" >&5
3853 echo "$as_me: error: NDBM only supports LDBM type hash" >&2;}
3854    { (exit 1); exit 1; }; }
3855         fi
3856
3857         if test $ol_enable_bdb/$ol_enable_hdb != no/no ; then
3858                 if test $ol_enable_ldbm_api = auto ; then
3859                         ol_enable_ldbm_api=berkeley
3860                 elif test $ol_enable_ldbm_api != berkeley ; then
3861                         { { echo "$as_me:$LINENO: error: LDBM API not compatible with BDB/HDB" >&5
3862 echo "$as_me: error: LDBM API not compatible with BDB/HDB" >&2;}
3863    { (exit 1); exit 1; }; }
3864                 fi
3865         fi
3866 fi
3867
3868 if test $ol_enable_meta/$ol_enable_ldap = yes/no ; then
3869         { { echo "$as_me:$LINENO: error: --enable-meta requires --enable-ldap" >&5
3870 echo "$as_me: error: --enable-meta requires --enable-ldap" >&2;}
3871    { (exit 1); exit 1; }; }
3872 fi
3873
3874 if test $ol_enable_slurpd = yes ; then
3875                 if test $ol_with_threads = no ; then
3876                 { { echo "$as_me:$LINENO: error: slurpd requires threads" >&5
3877 echo "$as_me: error: slurpd requires threads" >&2;}
3878    { (exit 1); exit 1; }; }
3879         fi
3880 fi
3881
3882 if test $ol_enable_lmpasswd = yes ; then
3883         if test $ol_with_tls = no ; then
3884                 { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5
3885 echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;}
3886    { (exit 1); exit 1; }; }
3887         fi
3888 fi
3889
3890 if test $ol_enable_kbind = yes ; then
3891         if test $ol_with_kerberos = no ; then
3892                 { { echo "$as_me:$LINENO: error: options require --with-kerberos" >&5
3893 echo "$as_me: error: options require --with-kerberos" >&2;}
3894    { (exit 1); exit 1; }; }
3895         elif test $ol_with_kerberos = auto ; then
3896                 ol_with_kerberos=yes
3897         fi
3898
3899 elif test $ol_enable_kbind = no ; then
3900         if test $ol_with_kerberos = auto ; then
3901                 ol_with_kerberos=no
3902         elif test $ol_with_kerberos != no ; then
3903                 { echo "$as_me:$LINENO: WARNING: Kerberos detection enabled unnecessarily" >&5
3904 echo "$as_me: WARNING: Kerberos detection enabled unnecessarily" >&2;};
3905                 ol_with_kerberos=no
3906         fi
3907 fi
3908
3909 if test $ol_enable_spasswd = yes ; then
3910         if test $ol_with_cyrus_sasl = no ; then
3911                 { { echo "$as_me:$LINENO: error: options require --with-cyrus-sasl" >&5
3912 echo "$as_me: error: options require --with-cyrus-sasl" >&2;}
3913    { (exit 1); exit 1; }; }
3914         fi
3915         ol_with_cyrus_sasl=yes
3916 fi
3917
3918 echo "$as_me:$LINENO: result: done" >&5
3919 echo "${ECHO_T}done" >&6
3920
3921 LDAP_LIBS=
3922 LDBM_LIBS=
3923 LTHREAD_LIBS=
3924 LUTIL_LIBS=
3925
3926 SLAPD_LIBS=
3927 SLURPD_LIBS=
3928
3929 BUILD_SLAPD=no
3930 BUILD_SLURPD=no
3931
3932 BUILD_THREAD=no
3933
3934 BUILD_SLAPI=no
3935 SLAPD_SLAPI_DEPEND=
3936
3937 BUILD_BDB=no
3938 BUILD_DNSSRV=no
3939 BUILD_HDB=no
3940 BUILD_LDAP=no
3941 BUILD_LDBM=no
3942 BUILD_META=no
3943 BUILD_MONITOR=no
3944 BUILD_NULL=no
3945 BUILD_PASSWD=no
3946 BUILD_PERL=no
3947 BUILD_RELAY=no
3948 BUILD_SHELL=no
3949 BUILD_SQL=no
3950
3951 BUILD_ACCESSLOG=no
3952 BUILD_AUDITLOG=no
3953 BUILD_DDS=no
3954 BUILD_DENYOP=no
3955 BUILD_DYNGROUP=no
3956 BUILD_DYNLIST=no
3957 BUILD_LASTMOD=no
3958 BUILD_PPOLICY=no
3959 BUILD_PROXYCACHE=no
3960 BUILD_REFINT=no
3961 BUILD_RETCODE=no
3962 BUILD_RWM=no
3963 BUILD_SEQMOD=no
3964 BUILD_SYNCPROV=no
3965 BUILD_TRANSLUCENT=no
3966 BUILD_UNIQUE=no
3967 BUILD_VALSORT=no
3968
3969 SLAPD_STATIC_OVERLAYS=
3970 SLAPD_DYNAMIC_OVERLAYS=
3971
3972 SLAPD_MODULES_LDFLAGS=
3973 SLAPD_MODULES_CPPFLAGS=
3974
3975 SLAPD_STATIC_BACKENDS=back-ldif
3976 SLAPD_DYNAMIC_BACKENDS=
3977
3978 SLAPD_PERL_LDFLAGS=
3979 MOD_PERL_LDFLAGS=
3980 PERL_CPPFLAGS=
3981
3982 SLAPD_SQL_LDFLAGS=
3983 SLAPD_SQL_LIBS=
3984 SLAPD_SQL_INCLUDES=
3985
3986 KRB4_LIBS=
3987 KRB5_LIBS=
3988 SASL_LIBS=
3989 TLS_LIBS=
3990 MODULES_LIBS=
3991 SLAPI_LIBS=
3992 LIBSLAPI=
3993 LIBSLAPITOOLS=
3994 AUTH_LIBS=
3995 ICU_LIBS=
3996
3997 SLAPD_SLP_LIBS=
3998 SLAPD_GMP_LIBS=
3999
4000
4001
4002 cat >>confdefs.h <<\_ACEOF
4003 #define HAVE_MKVERSION 1
4004 _ACEOF
4005
4006
4007
4008
4009 ol_aix_threads=no
4010 case "$target" in
4011 *-*-aix*)       if test -z "$CC" ; then
4012                 case "$ol_with_threads" in
4013                 auto | yes |  posix) ol_aix_threads=yes ;;
4014                 esac
4015         fi
4016 ;;
4017 esac
4018
4019 if test $ol_aix_threads = yes ; then
4020         if test -z "${CC}" ; then
4021                 for ac_prog in cc_r xlc_r cc
4022 do
4023   # Extract the first word of "$ac_prog", so it can be a program name with args.
4024 set dummy $ac_prog; ac_word=$2
4025 echo "$as_me:$LINENO: checking for $ac_word" >&5
4026 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4027 if test "${ac_cv_prog_CC+set}" = set; then
4028   echo $ECHO_N "(cached) $ECHO_C" >&6
4029 else
4030   if test -n "$CC"; then
4031   ac_cv_prog_CC="$CC" # Let the user override the test.
4032 else
4033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4034 for as_dir in $PATH
4035 do
4036   IFS=$as_save_IFS
4037   test -z "$as_dir" && as_dir=.
4038   for ac_exec_ext in '' $ac_executable_extensions; do
4039   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4040     ac_cv_prog_CC="$ac_prog"
4041     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4042     break 2
4043   fi
4044 done
4045 done
4046
4047 fi
4048 fi
4049 CC=$ac_cv_prog_CC
4050 if test -n "$CC"; then
4051   echo "$as_me:$LINENO: result: $CC" >&5
4052 echo "${ECHO_T}$CC" >&6
4053 else
4054   echo "$as_me:$LINENO: result: no" >&5
4055 echo "${ECHO_T}no" >&6
4056 fi
4057
4058   test -n "$CC" && break
4059 done
4060
4061
4062                 if test "$CC" = cc ; then
4063                                                 if test $ol_with_threads != auto ; then
4064                                 { { echo "$as_me:$LINENO: error: --with-threads requires cc_r (or other suitable compiler) on AIX" >&5
4065 echo "$as_me: error: --with-threads requires cc_r (or other suitable compiler) on AIX" >&2;}
4066    { (exit 1); exit 1; }; }
4067                         else
4068                                 { echo "$as_me:$LINENO: WARNING: disabling threads, no cc_r on AIX" >&5
4069 echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
4070                         fi
4071                         ol_with_threads=no
4072                 fi
4073         fi
4074
4075         case ${CC} in cc_r | xlc_r)
4076                 ol_with_threads=posix
4077                 ol_cv_pthread_create=yes
4078                 ;;
4079         esac
4080 fi
4081
4082 if test -z "${CC}"; then
4083         for ac_prog in cc gcc
4084 do
4085   # Extract the first word of "$ac_prog", so it can be a program name with args.
4086 set dummy $ac_prog; ac_word=$2
4087 echo "$as_me:$LINENO: checking for $ac_word" >&5
4088 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4089 if test "${ac_cv_prog_CC+set}" = set; then
4090   echo $ECHO_N "(cached) $ECHO_C" >&6
4091 else
4092   if test -n "$CC"; then
4093   ac_cv_prog_CC="$CC" # Let the user override the test.
4094 else
4095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4096 for as_dir in $PATH
4097 do
4098   IFS=$as_save_IFS
4099   test -z "$as_dir" && as_dir=.
4100   for ac_exec_ext in '' $ac_executable_extensions; do
4101   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4102     ac_cv_prog_CC="$ac_prog"
4103     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4104     break 2
4105   fi
4106 done
4107 done
4108
4109 fi
4110 fi
4111 CC=$ac_cv_prog_CC
4112 if test -n "$CC"; then
4113   echo "$as_me:$LINENO: result: $CC" >&5
4114 echo "${ECHO_T}$CC" >&6
4115 else
4116   echo "$as_me:$LINENO: result: no" >&5
4117 echo "${ECHO_T}no" >&6
4118 fi
4119
4120   test -n "$CC" && break
4121 done
4122 test -n "$CC" || CC="missing"
4123
4124
4125         if test "${CC}" = "missing" ; then
4126                 { { echo "$as_me:$LINENO: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." >&5
4127 echo "$as_me: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." >&2;}
4128    { (exit 1); exit 1; }; }
4129         fi
4130 fi
4131
4132 if test -z "${AR}"; then
4133         for ac_prog in ar gar
4134 do
4135   # Extract the first word of "$ac_prog", so it can be a program name with args.
4136 set dummy $ac_prog; ac_word=$2
4137 echo "$as_me:$LINENO: checking for $ac_word" >&5
4138 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4139 if test "${ac_cv_prog_AR+set}" = set; then
4140   echo $ECHO_N "(cached) $ECHO_C" >&6
4141 else
4142   if test -n "$AR"; then
4143   ac_cv_prog_AR="$AR" # Let the user override the test.
4144 else
4145 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4146 for as_dir in $PATH
4147 do
4148   IFS=$as_save_IFS
4149   test -z "$as_dir" && as_dir=.
4150   for ac_exec_ext in '' $ac_executable_extensions; do
4151   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4152     ac_cv_prog_AR="$ac_prog"
4153     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4154     break 2
4155   fi
4156 done
4157 done
4158
4159 fi
4160 fi
4161 AR=$ac_cv_prog_AR
4162 if test -n "$AR"; then
4163   echo "$as_me:$LINENO: result: $AR" >&5
4164 echo "${ECHO_T}$AR" >&6
4165 else
4166   echo "$as_me:$LINENO: result: no" >&5
4167 echo "${ECHO_T}no" >&6
4168 fi
4169
4170   test -n "$AR" && break
4171 done
4172 test -n "$AR" || AR="missing"
4173
4174
4175         if test "${AR}" = "missing" ; then
4176                 { { echo "$as_me:$LINENO: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." >&5
4177 echo "$as_me: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." >&2;}
4178    { (exit 1); exit 1; }; }
4179         fi
4180 fi
4181
4182
4183
4184
4185
4186 # Check whether --enable-fast-install or --disable-fast-install was given.
4187 if test "${enable_fast_install+set}" = set; then
4188   enableval="$enable_fast_install"
4189   p=${PACKAGE-default}
4190     case $enableval in
4191     yes) enable_fast_install=yes ;;
4192     no) enable_fast_install=no ;;
4193     *)
4194       enable_fast_install=no
4195       # Look at the argument we got.  We use all the common list separators.
4196       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4197       for pkg in $enableval; do
4198         IFS="$lt_save_ifs"
4199         if test "X$pkg" = "X$p"; then
4200           enable_fast_install=yes
4201         fi
4202       done
4203       IFS="$lt_save_ifs"
4204       ;;
4205     esac
4206 else
4207   enable_fast_install=yes
4208 fi;
4209
4210 DEPDIR="${am__leading_dot}deps"
4211
4212           ac_config_commands="$ac_config_commands depfiles"
4213
4214
4215 am_make=${MAKE-make}
4216 cat > confinc << 'END'
4217 am__doit:
4218         @echo done
4219 .PHONY: am__doit
4220 END
4221 # If we don't find an include directive, just comment out the code.
4222 echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
4223 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
4224 am__include="#"
4225 am__quote=
4226 _am_result=none
4227 # First try GNU make style include.
4228 echo "include confinc" > confmf
4229 # We grep out `Entering directory' and `Leaving directory'
4230 # messages which can occur if `w' ends up in MAKEFLAGS.
4231 # In particular we don't look at `^make:' because GNU make might
4232 # be invoked under some other name (usually "gmake"), in which
4233 # case it prints its new name instead of `make'.
4234 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
4235    am__include=include
4236    am__quote=
4237    _am_result=GNU
4238 fi
4239 # Now try BSD make style include.
4240 if test "$am__include" = "#"; then
4241    echo '.include "confinc"' > confmf
4242    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
4243       am__include=.include
4244       am__quote="\""
4245       _am_result=BSD
4246    fi
4247 fi
4248
4249
4250 echo "$as_me:$LINENO: result: $_am_result" >&5
4251 echo "${ECHO_T}$_am_result" >&6
4252 rm -f confinc confmf
4253
4254 # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
4255 if test "${enable_dependency_tracking+set}" = set; then
4256   enableval="$enable_dependency_tracking"
4257
4258 fi;
4259 if test "x$enable_dependency_tracking" != xno; then
4260   am_depcomp="$ac_aux_dir/depcomp"
4261   AMDEPBACKSLASH='\'
4262 fi
4263
4264
4265 if test "x$enable_dependency_tracking" != xno; then
4266   AMDEP_TRUE=
4267   AMDEP_FALSE='#'
4268 else
4269   AMDEP_TRUE='#'
4270   AMDEP_FALSE=
4271 fi
4272
4273
4274
4275 ac_ext=c
4276 ac_cpp='$CPP $CPPFLAGS'
4277 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4278 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4279 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4280 if test -n "$ac_tool_prefix"; then
4281   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4282 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4283 echo "$as_me:$LINENO: checking for $ac_word" >&5
4284 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4285 if test "${ac_cv_prog_CC+set}" = set; then
4286   echo $ECHO_N "(cached) $ECHO_C" >&6
4287 else
4288   if test -n "$CC"; then
4289   ac_cv_prog_CC="$CC" # Let the user override the test.
4290 else
4291 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4292 for as_dir in $PATH
4293 do
4294   IFS=$as_save_IFS
4295   test -z "$as_dir" && as_dir=.
4296   for ac_exec_ext in '' $ac_executable_extensions; do
4297   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4298     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4299     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4300     break 2
4301   fi
4302 done
4303 done
4304
4305 fi
4306 fi
4307 CC=$ac_cv_prog_CC
4308 if test -n "$CC"; then
4309   echo "$as_me:$LINENO: result: $CC" >&5
4310 echo "${ECHO_T}$CC" >&6
4311 else
4312   echo "$as_me:$LINENO: result: no" >&5
4313 echo "${ECHO_T}no" >&6
4314 fi
4315
4316 fi
4317 if test -z "$ac_cv_prog_CC"; then
4318   ac_ct_CC=$CC
4319   # Extract the first word of "gcc", so it can be a program name with args.
4320 set dummy gcc; ac_word=$2
4321 echo "$as_me:$LINENO: checking for $ac_word" >&5
4322 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4323 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4324   echo $ECHO_N "(cached) $ECHO_C" >&6
4325 else
4326   if test -n "$ac_ct_CC"; then
4327   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4328 else
4329 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4330 for as_dir in $PATH
4331 do
4332   IFS=$as_save_IFS
4333   test -z "$as_dir" && as_dir=.
4334   for ac_exec_ext in '' $ac_executable_extensions; do
4335   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4336     ac_cv_prog_ac_ct_CC="gcc"
4337     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4338     break 2
4339   fi
4340 done
4341 done
4342
4343 fi
4344 fi
4345 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4346 if test -n "$ac_ct_CC"; then
4347   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4348 echo "${ECHO_T}$ac_ct_CC" >&6
4349 else
4350   echo "$as_me:$LINENO: result: no" >&5
4351 echo "${ECHO_T}no" >&6
4352 fi
4353
4354   CC=$ac_ct_CC
4355 else
4356   CC="$ac_cv_prog_CC"
4357 fi
4358
4359 if test -z "$CC"; then
4360   if test -n "$ac_tool_prefix"; then
4361   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4362 set dummy ${ac_tool_prefix}cc; ac_word=$2
4363 echo "$as_me:$LINENO: checking for $ac_word" >&5
4364 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4365 if test "${ac_cv_prog_CC+set}" = set; then
4366   echo $ECHO_N "(cached) $ECHO_C" >&6
4367 else
4368   if test -n "$CC"; then
4369   ac_cv_prog_CC="$CC" # Let the user override the test.
4370 else
4371 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4372 for as_dir in $PATH
4373 do
4374   IFS=$as_save_IFS
4375   test -z "$as_dir" && as_dir=.
4376   for ac_exec_ext in '' $ac_executable_extensions; do
4377   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4378     ac_cv_prog_CC="${ac_tool_prefix}cc"
4379     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4380     break 2
4381   fi
4382 done
4383 done
4384
4385 fi
4386 fi
4387 CC=$ac_cv_prog_CC
4388 if test -n "$CC"; then
4389   echo "$as_me:$LINENO: result: $CC" >&5
4390 echo "${ECHO_T}$CC" >&6
4391 else
4392   echo "$as_me:$LINENO: result: no" >&5
4393 echo "${ECHO_T}no" >&6
4394 fi
4395
4396 fi
4397 if test -z "$ac_cv_prog_CC"; then
4398   ac_ct_CC=$CC
4399   # Extract the first word of "cc", so it can be a program name with args.
4400 set dummy cc; ac_word=$2
4401 echo "$as_me:$LINENO: checking for $ac_word" >&5
4402 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4403 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4404   echo $ECHO_N "(cached) $ECHO_C" >&6
4405 else
4406   if test -n "$ac_ct_CC"; then
4407   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4408 else
4409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4410 for as_dir in $PATH
4411 do
4412   IFS=$as_save_IFS
4413   test -z "$as_dir" && as_dir=.
4414   for ac_exec_ext in '' $ac_executable_extensions; do
4415   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4416     ac_cv_prog_ac_ct_CC="cc"
4417     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4418     break 2
4419   fi
4420 done
4421 done
4422
4423 fi
4424 fi
4425 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4426 if test -n "$ac_ct_CC"; then
4427   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4428 echo "${ECHO_T}$ac_ct_CC" >&6
4429 else
4430   echo "$as_me:$LINENO: result: no" >&5
4431 echo "${ECHO_T}no" >&6
4432 fi
4433
4434   CC=$ac_ct_CC
4435 else
4436   CC="$ac_cv_prog_CC"
4437 fi
4438
4439 fi
4440 if test -z "$CC"; then
4441   # Extract the first word of "cc", so it can be a program name with args.
4442 set dummy cc; ac_word=$2
4443 echo "$as_me:$LINENO: checking for $ac_word" >&5
4444 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4445 if test "${ac_cv_prog_CC+set}" = set; then
4446   echo $ECHO_N "(cached) $ECHO_C" >&6
4447 else
4448   if test -n "$CC"; then
4449   ac_cv_prog_CC="$CC" # Let the user override the test.
4450 else
4451   ac_prog_rejected=no
4452 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4453 for as_dir in $PATH
4454 do
4455   IFS=$as_save_IFS
4456   test -z "$as_dir" && as_dir=.
4457   for ac_exec_ext in '' $ac_executable_extensions; do
4458   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4459     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4460        ac_prog_rejected=yes
4461        continue
4462      fi
4463     ac_cv_prog_CC="cc"
4464     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4465     break 2
4466   fi
4467 done
4468 done
4469
4470 if test $ac_prog_rejected = yes; then
4471   # We found a bogon in the path, so make sure we never use it.
4472   set dummy $ac_cv_prog_CC
4473   shift
4474   if test $# != 0; then
4475     # We chose a different compiler from the bogus one.
4476     # However, it has the same basename, so the bogon will be chosen
4477     # first if we set CC to just the basename; use the full file name.
4478     shift
4479     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4480   fi
4481 fi
4482 fi
4483 fi
4484 CC=$ac_cv_prog_CC
4485 if test -n "$CC"; then
4486   echo "$as_me:$LINENO: result: $CC" >&5
4487 echo "${ECHO_T}$CC" >&6
4488 else
4489   echo "$as_me:$LINENO: result: no" >&5
4490 echo "${ECHO_T}no" >&6
4491 fi
4492
4493 fi
4494 if test -z "$CC"; then
4495   if test -n "$ac_tool_prefix"; then
4496   for ac_prog in cl
4497   do
4498     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4499 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4500 echo "$as_me:$LINENO: checking for $ac_word" >&5
4501 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4502 if test "${ac_cv_prog_CC+set}" = set; then
4503   echo $ECHO_N "(cached) $ECHO_C" >&6
4504 else
4505   if test -n "$CC"; then
4506   ac_cv_prog_CC="$CC" # Let the user override the test.
4507 else
4508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4509 for as_dir in $PATH
4510 do
4511   IFS=$as_save_IFS
4512   test -z "$as_dir" && as_dir=.
4513   for ac_exec_ext in '' $ac_executable_extensions; do
4514   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4515     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4516     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4517     break 2
4518   fi
4519 done
4520 done
4521
4522 fi
4523 fi
4524 CC=$ac_cv_prog_CC
4525 if test -n "$CC"; then
4526   echo "$as_me:$LINENO: result: $CC" >&5
4527 echo "${ECHO_T}$CC" >&6
4528 else
4529   echo "$as_me:$LINENO: result: no" >&5
4530 echo "${ECHO_T}no" >&6
4531 fi
4532
4533     test -n "$CC" && break
4534   done
4535 fi
4536 if test -z "$CC"; then
4537   ac_ct_CC=$CC
4538   for ac_prog in cl
4539 do
4540   # Extract the first word of "$ac_prog", so it can be a program name with args.
4541 set dummy $ac_prog; ac_word=$2
4542 echo "$as_me:$LINENO: checking for $ac_word" >&5
4543 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4544 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4545   echo $ECHO_N "(cached) $ECHO_C" >&6
4546 else
4547   if test -n "$ac_ct_CC"; then
4548   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4549 else
4550 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4551 for as_dir in $PATH
4552 do
4553   IFS=$as_save_IFS
4554   test -z "$as_dir" && as_dir=.
4555   for ac_exec_ext in '' $ac_executable_extensions; do
4556   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4557     ac_cv_prog_ac_ct_CC="$ac_prog"
4558     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4559     break 2
4560   fi
4561 done
4562 done
4563
4564 fi
4565 fi
4566 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4567 if test -n "$ac_ct_CC"; then
4568   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4569 echo "${ECHO_T}$ac_ct_CC" >&6
4570 else
4571   echo "$as_me:$LINENO: result: no" >&5
4572 echo "${ECHO_T}no" >&6
4573 fi
4574
4575   test -n "$ac_ct_CC" && break
4576 done
4577
4578   CC=$ac_ct_CC
4579 fi
4580
4581 fi
4582
4583
4584 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
4585 See \`config.log' for more details." >&5
4586 echo "$as_me: error: no acceptable C compiler found in \$PATH
4587 See \`config.log' for more details." >&2;}
4588    { (exit 1); exit 1; }; }
4589
4590 # Provide some information about the compiler.
4591 echo "$as_me:$LINENO:" \
4592      "checking for C compiler version" >&5
4593 ac_compiler=`set X $ac_compile; echo $2`
4594 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
4595   (eval $ac_compiler --version </dev/null >&5) 2>&5
4596   ac_status=$?
4597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4598   (exit $ac_status); }
4599 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
4600   (eval $ac_compiler -v </dev/null >&5) 2>&5
4601   ac_status=$?
4602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4603   (exit $ac_status); }
4604 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
4605   (eval $ac_compiler -V </dev/null >&5) 2>&5
4606   ac_status=$?
4607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4608   (exit $ac_status); }
4609
4610 cat >conftest.$ac_ext <<_ACEOF
4611 /* confdefs.h.  */
4612 _ACEOF
4613 cat confdefs.h >>conftest.$ac_ext
4614 cat >>conftest.$ac_ext <<_ACEOF
4615 /* end confdefs.h.  */
4616
4617 int
4618 main ()
4619 {
4620
4621   ;
4622   return 0;
4623 }
4624 _ACEOF
4625 ac_clean_files_save=$ac_clean_files
4626 ac_clean_files="$ac_clean_files a.out a.exe b.out"
4627 # Try to create an executable without -o first, disregard a.out.
4628 # It will help us diagnose broken compilers, and finding out an intuition
4629 # of exeext.
4630 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
4631 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
4632 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4633 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
4634   (eval $ac_link_default) 2>&5
4635   ac_status=$?
4636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4637   (exit $ac_status); }; then
4638   # Find the output, starting from the most likely.  This scheme is
4639 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
4640 # resort.
4641
4642 # Be careful to initialize this variable, since it used to be cached.
4643 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
4644 ac_cv_exeext=
4645 # b.out is created by i960 compilers.
4646 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
4647 do
4648   test -f "$ac_file" || continue
4649   case $ac_file in
4650     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
4651         ;;
4652     conftest.$ac_ext )
4653         # This is the source file.
4654         ;;
4655     [ab].out )
4656         # We found the default executable, but exeext='' is most
4657         # certainly right.
4658         break;;
4659     *.* )
4660         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4661         # FIXME: I believe we export ac_cv_exeext for Libtool,
4662         # but it would be cool to find out if it's true.  Does anybody
4663         # maintain Libtool? --akim.
4664         export ac_cv_exeext
4665         break;;
4666     * )
4667         break;;
4668   esac
4669 done
4670 else
4671   echo "$as_me: failed program was:" >&5
4672 sed 's/^/| /' conftest.$ac_ext >&5
4673
4674 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
4675 See \`config.log' for more details." >&5
4676 echo "$as_me: error: C compiler cannot create executables
4677 See \`config.log' for more details." >&2;}
4678    { (exit 77); exit 77; }; }
4679 fi
4680
4681 ac_exeext=$ac_cv_exeext
4682 echo "$as_me:$LINENO: result: $ac_file" >&5
4683 echo "${ECHO_T}$ac_file" >&6
4684
4685 # Check the compiler produces executables we can run.  If not, either
4686 # the compiler is broken, or we cross compile.
4687 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
4688 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
4689 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
4690 # If not cross compiling, check that we can run a simple program.
4691 if test "$cross_compiling" != yes; then
4692   if { ac_try='./$ac_file'
4693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4694   (eval $ac_try) 2>&5
4695   ac_status=$?
4696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4697   (exit $ac_status); }; }; then
4698     cross_compiling=no
4699   else
4700     if test "$cross_compiling" = maybe; then
4701         cross_compiling=yes
4702     else
4703         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
4704 If you meant to cross compile, use \`--host'.
4705 See \`config.log' for more details." >&5
4706 echo "$as_me: error: cannot run C compiled programs.
4707 If you meant to cross compile, use \`--host'.
4708 See \`config.log' for more details." >&2;}
4709    { (exit 1); exit 1; }; }
4710     fi
4711   fi
4712 fi
4713 echo "$as_me:$LINENO: result: yes" >&5
4714 echo "${ECHO_T}yes" >&6
4715
4716 rm -f a.out a.exe conftest$ac_cv_exeext b.out
4717 ac_clean_files=$ac_clean_files_save
4718 # Check the compiler produces executables we can run.  If not, either
4719 # the compiler is broken, or we cross compile.
4720 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
4721 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
4722 echo "$as_me:$LINENO: result: $cross_compiling" >&5
4723 echo "${ECHO_T}$cross_compiling" >&6
4724
4725 echo "$as_me:$LINENO: checking for suffix of executables" >&5
4726 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
4727 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4728   (eval $ac_link) 2>&5
4729   ac_status=$?
4730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4731   (exit $ac_status); }; then
4732   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4733 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4734 # work properly (i.e., refer to `conftest.exe'), while it won't with
4735 # `rm'.
4736 for ac_file in conftest.exe conftest conftest.*; do
4737   test -f "$ac_file" || continue
4738   case $ac_file in
4739     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
4740     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4741           export ac_cv_exeext
4742           break;;
4743     * ) break;;
4744   esac
4745 done
4746 else
4747   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
4748 See \`config.log' for more details." >&5
4749 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
4750 See \`config.log' for more details." >&2;}
4751    { (exit 1); exit 1; }; }
4752 fi
4753
4754 rm -f conftest$ac_cv_exeext
4755 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
4756 echo "${ECHO_T}$ac_cv_exeext" >&6
4757
4758 rm -f conftest.$ac_ext
4759 EXEEXT=$ac_cv_exeext
4760 ac_exeext=$EXEEXT
4761 echo "$as_me:$LINENO: checking for suffix of object files" >&5
4762 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
4763 if test "${ac_cv_objext+set}" = set; then
4764   echo $ECHO_N "(cached) $ECHO_C" >&6
4765 else
4766   cat >conftest.$ac_ext <<_ACEOF
4767 /* confdefs.h.  */
4768 _ACEOF
4769 cat confdefs.h >>conftest.$ac_ext
4770 cat >>conftest.$ac_ext <<_ACEOF
4771 /* end confdefs.h.  */
4772
4773 int
4774 main ()
4775 {
4776
4777   ;
4778   return 0;
4779 }
4780 _ACEOF
4781 rm -f conftest.o conftest.obj
4782 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4783   (eval $ac_compile) 2>&5
4784   ac_status=$?
4785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4786   (exit $ac_status); }; then
4787   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
4788   case $ac_file in
4789     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
4790     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4791        break;;
4792   esac
4793 done
4794 else
4795   echo "$as_me: failed program was:" >&5
4796 sed 's/^/| /' conftest.$ac_ext >&5
4797
4798 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
4799 See \`config.log' for more details." >&5
4800 echo "$as_me: error: cannot compute suffix of object files: cannot compile
4801 See \`config.log' for more details." >&2;}
4802    { (exit 1); exit 1; }; }
4803 fi
4804
4805 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4806 fi
4807 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
4808 echo "${ECHO_T}$ac_cv_objext" >&6
4809 OBJEXT=$ac_cv_objext
4810 ac_objext=$OBJEXT
4811 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
4812 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
4813 if test "${ac_cv_c_compiler_gnu+set}" = set; then
4814   echo $ECHO_N "(cached) $ECHO_C" >&6
4815 else
4816   cat >conftest.$ac_ext <<_ACEOF
4817 /* confdefs.h.  */
4818 _ACEOF
4819 cat confdefs.h >>conftest.$ac_ext
4820 cat >>conftest.$ac_ext <<_ACEOF
4821 /* end confdefs.h.  */
4822
4823 int
4824 main ()
4825 {
4826 #ifndef __GNUC__
4827        choke me
4828 #endif
4829
4830   ;
4831   return 0;
4832 }
4833 _ACEOF
4834 rm -f conftest.$ac_objext
4835 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4836   (eval $ac_compile) 2>conftest.er1
4837   ac_status=$?
4838   grep -v '^ *+' conftest.er1 >conftest.err
4839   rm -f conftest.er1
4840   cat conftest.err >&5
4841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4842   (exit $ac_status); } &&
4843          { ac_try='test -z "$ac_c_werror_flag"
4844                          || test ! -s conftest.err'
4845   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4846   (eval $ac_try) 2>&5
4847   ac_status=$?
4848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4849   (exit $ac_status); }; } &&
4850          { ac_try='test -s conftest.$ac_objext'
4851   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4852   (eval $ac_try) 2>&5
4853   ac_status=$?
4854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4855   (exit $ac_status); }; }; then
4856   ac_compiler_gnu=yes
4857 else
4858   echo "$as_me: failed program was:" >&5
4859 sed 's/^/| /' conftest.$ac_ext >&5
4860
4861 ac_compiler_gnu=no
4862 fi
4863 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4864 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4865
4866 fi
4867 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
4868 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
4869 GCC=`test $ac_compiler_gnu = yes && echo yes`
4870 ac_test_CFLAGS=${CFLAGS+set}
4871 ac_save_CFLAGS=$CFLAGS
4872 CFLAGS="-g"
4873 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
4874 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
4875 if test "${ac_cv_prog_cc_g+set}" = set; then
4876   echo $ECHO_N "(cached) $ECHO_C" >&6
4877 else
4878   cat >conftest.$ac_ext <<_ACEOF
4879 /* confdefs.h.  */
4880 _ACEOF
4881 cat confdefs.h >>conftest.$ac_ext
4882 cat >>conftest.$ac_ext <<_ACEOF
4883 /* end confdefs.h.  */
4884
4885 int
4886 main ()
4887 {
4888
4889   ;
4890   return 0;
4891 }
4892 _ACEOF
4893 rm -f conftest.$ac_objext
4894 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4895   (eval $ac_compile) 2>conftest.er1
4896   ac_status=$?
4897   grep -v '^ *+' conftest.er1 >conftest.err
4898   rm -f conftest.er1
4899   cat conftest.err >&5
4900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4901   (exit $ac_status); } &&
4902          { ac_try='test -z "$ac_c_werror_flag"
4903                          || test ! -s conftest.err'
4904   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4905   (eval $ac_try) 2>&5
4906   ac_status=$?
4907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4908   (exit $ac_status); }; } &&
4909          { ac_try='test -s conftest.$ac_objext'
4910   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4911   (eval $ac_try) 2>&5
4912   ac_status=$?
4913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4914   (exit $ac_status); }; }; then
4915   ac_cv_prog_cc_g=yes
4916 else
4917   echo "$as_me: failed program was:" >&5
4918 sed 's/^/| /' conftest.$ac_ext >&5
4919
4920 ac_cv_prog_cc_g=no
4921 fi
4922 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4923 fi
4924 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
4925 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
4926 if test "$ac_test_CFLAGS" = set; then
4927   CFLAGS=$ac_save_CFLAGS
4928 elif test $ac_cv_prog_cc_g = yes; then
4929   if test "$GCC" = yes; then
4930     CFLAGS="-g -O2"
4931   else
4932     CFLAGS="-g"
4933   fi
4934 else
4935   if test "$GCC" = yes; then
4936     CFLAGS="-O2"
4937   else
4938     CFLAGS=
4939   fi
4940 fi
4941 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
4942 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
4943 if test "${ac_cv_prog_cc_stdc+set}" = set; then
4944   echo $ECHO_N "(cached) $ECHO_C" >&6
4945 else
4946   ac_cv_prog_cc_stdc=no
4947 ac_save_CC=$CC
4948 cat >conftest.$ac_ext <<_ACEOF
4949 /* confdefs.h.  */
4950 _ACEOF
4951 cat confdefs.h >>conftest.$ac_ext
4952 cat >>conftest.$ac_ext <<_ACEOF
4953 /* end confdefs.h.  */
4954 #include <stdarg.h>
4955 #include <stdio.h>
4956 #include <sys/types.h>
4957 #include <sys/stat.h>
4958 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4959 struct buf { int x; };
4960 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4961 static char *e (p, i)
4962      char **p;
4963      int i;
4964 {
4965   return p[i];
4966 }
4967 static char *f (char * (*g) (char **, int), char **p, ...)
4968 {
4969   char *s;
4970   va_list v;
4971   va_start (v,p);
4972   s = g (p, va_arg (v,int));
4973   va_end (v);
4974   return s;
4975 }
4976
4977 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4978    function prototypes and stuff, but not '\xHH' hex character constants.
4979    These don't provoke an error unfortunately, instead are silently treated
4980    as 'x'.  The following induces an error, until -std1 is added to get
4981    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4982    array size at least.  It's necessary to write '\x00'==0 to get something
4983    that's true only with -std1.  */
4984 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4985
4986 int test (int i, double x);
4987 struct s1 {int (*f) (int a);};
4988 struct s2 {int (*f) (double a);};
4989 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4990 int argc;
4991 char **argv;
4992 int
4993 main ()
4994 {
4995 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4996   ;
4997   return 0;
4998 }
4999 _ACEOF
5000 # Don't try gcc -ansi; that turns off useful extensions and
5001 # breaks some systems' header files.
5002 # AIX                   -qlanglvl=ansi
5003 # Ultrix and OSF/1      -std1
5004 # HP-UX 10.20 and later -Ae
5005 # HP-UX older versions  -Aa -D_HPUX_SOURCE
5006 # SVR4                  -Xc -D__EXTENSIONS__
5007 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5008 do
5009   CC="$ac_save_CC $ac_arg"
5010   rm -f conftest.$ac_objext
5011 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5012   (eval $ac_compile) 2>conftest.er1
5013   ac_status=$?
5014   grep -v '^ *+' conftest.er1 >conftest.err
5015   rm -f conftest.er1
5016   cat conftest.err >&5
5017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5018   (exit $ac_status); } &&
5019          { ac_try='test -z "$ac_c_werror_flag"
5020                          || test ! -s conftest.err'
5021   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5022   (eval $ac_try) 2>&5
5023   ac_status=$?
5024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5025   (exit $ac_status); }; } &&
5026          { ac_try='test -s conftest.$ac_objext'
5027   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5028   (eval $ac_try) 2>&5
5029   ac_status=$?
5030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5031   (exit $ac_status); }; }; then
5032   ac_cv_prog_cc_stdc=$ac_arg
5033 break
5034 else
5035   echo "$as_me: failed program was:" >&5
5036 sed 's/^/| /' conftest.$ac_ext >&5
5037
5038 fi
5039 rm -f conftest.err conftest.$ac_objext
5040 done
5041 rm -f conftest.$ac_ext conftest.$ac_objext
5042 CC=$ac_save_CC
5043
5044 fi
5045
5046 case "x$ac_cv_prog_cc_stdc" in
5047   x|xno)
5048     echo "$as_me:$LINENO: result: none needed" >&5
5049 echo "${ECHO_T}none needed" >&6 ;;
5050   *)
5051     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
5052 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
5053     CC="$CC $ac_cv_prog_cc_stdc" ;;
5054 esac
5055
5056 # Some people use a C++ compiler to compile C.  Since we use `exit',
5057 # in C++ we need to declare it.  In case someone uses the same compiler
5058 # for both compiling C and C++ we need to have the C++ compiler decide
5059 # the declaration of exit, since it's the most demanding environment.
5060 cat >conftest.$ac_ext <<_ACEOF
5061 #ifndef __cplusplus
5062   choke me
5063 #endif
5064 _ACEOF
5065 rm -f conftest.$ac_objext
5066 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5067   (eval $ac_compile) 2>conftest.er1
5068   ac_status=$?
5069   grep -v '^ *+' conftest.er1 >conftest.err
5070   rm -f conftest.er1
5071   cat conftest.err >&5
5072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5073   (exit $ac_status); } &&
5074          { ac_try='test -z "$ac_c_werror_flag"
5075                          || test ! -s conftest.err'
5076   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5077   (eval $ac_try) 2>&5
5078   ac_status=$?
5079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5080   (exit $ac_status); }; } &&
5081          { ac_try='test -s conftest.$ac_objext'
5082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5083   (eval $ac_try) 2>&5
5084   ac_status=$?
5085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5086   (exit $ac_status); }; }; then
5087   for ac_declaration in \
5088    '' \
5089    'extern "C" void std::exit (int) throw (); using std::exit;' \
5090    'extern "C" void std::exit (int); using std::exit;' \
5091    'extern "C" void exit (int) throw ();' \
5092    'extern "C" void exit (int);' \
5093    'void exit (int);'
5094 do
5095   cat >conftest.$ac_ext <<_ACEOF
5096 /* confdefs.h.  */
5097 _ACEOF
5098 cat confdefs.h >>conftest.$ac_ext
5099 cat >>conftest.$ac_ext <<_ACEOF
5100 /* end confdefs.h.  */
5101 $ac_declaration
5102 #include <stdlib.h>
5103 int
5104 main ()
5105 {
5106 exit (42);
5107   ;
5108   return 0;
5109 }
5110 _ACEOF
5111 rm -f conftest.$ac_objext
5112 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5113   (eval $ac_compile) 2>conftest.er1
5114   ac_status=$?
5115   grep -v '^ *+' conftest.er1 >conftest.err
5116   rm -f conftest.er1
5117   cat conftest.err >&5
5118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5119   (exit $ac_status); } &&
5120          { ac_try='test -z "$ac_c_werror_flag"
5121                          || test ! -s conftest.err'
5122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5123   (eval $ac_try) 2>&5
5124   ac_status=$?
5125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5126   (exit $ac_status); }; } &&
5127          { ac_try='test -s conftest.$ac_objext'
5128   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5129   (eval $ac_try) 2>&5
5130   ac_status=$?
5131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5132   (exit $ac_status); }; }; then
5133   :
5134 else
5135   echo "$as_me: failed program was:" >&5
5136 sed 's/^/| /' conftest.$ac_ext >&5
5137
5138 continue
5139 fi
5140 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5141   cat >conftest.$ac_ext <<_ACEOF
5142 /* confdefs.h.  */
5143 _ACEOF
5144 cat confdefs.h >>conftest.$ac_ext
5145 cat >>conftest.$ac_ext <<_ACEOF
5146 /* end confdefs.h.  */
5147 $ac_declaration
5148 int
5149 main ()
5150 {
5151 exit (42);
5152   ;
5153   return 0;
5154 }
5155 _ACEOF
5156 rm -f conftest.$ac_objext
5157 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5158   (eval $ac_compile) 2>conftest.er1
5159   ac_status=$?
5160   grep -v '^ *+' conftest.er1 >conftest.err
5161   rm -f conftest.er1
5162   cat conftest.err >&5
5163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5164   (exit $ac_status); } &&
5165          { ac_try='test -z "$ac_c_werror_flag"
5166                          || test ! -s conftest.err'
5167   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5168   (eval $ac_try) 2>&5
5169   ac_status=$?
5170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5171   (exit $ac_status); }; } &&
5172          { ac_try='test -s conftest.$ac_objext'
5173   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5174   (eval $ac_try) 2>&5
5175   ac_status=$?
5176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5177   (exit $ac_status); }; }; then
5178   break
5179 else
5180   echo "$as_me: failed program was:" >&5
5181 sed 's/^/| /' conftest.$ac_ext >&5
5182
5183 fi
5184 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5185 done
5186 rm -f conftest*
5187 if test -n "$ac_declaration"; then
5188   echo '#ifdef __cplusplus' >>confdefs.h
5189   echo $ac_declaration      >>confdefs.h
5190   echo '#endif'             >>confdefs.h
5191 fi
5192
5193 else
5194   echo "$as_me: failed program was:" >&5
5195 sed 's/^/| /' conftest.$ac_ext >&5
5196
5197 fi
5198 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5199 ac_ext=c
5200 ac_cpp='$CPP $CPPFLAGS'
5201 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5202 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5203 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5204
5205 depcc="$CC"   am_compiler_list=
5206
5207 echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
5208 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
5209 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
5210   echo $ECHO_N "(cached) $ECHO_C" >&6
5211 else
5212   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5213   # We make a subdir and do the tests there.  Otherwise we can end up
5214   # making bogus files that we don't know about and never remove.  For
5215   # instance it was reported that on HP-UX the gcc test will end up
5216   # making a dummy file named `D' -- because `-MD' means `put the output
5217   # in D'.
5218   mkdir conftest.dir
5219   # Copy depcomp to subdir because otherwise we won't find it if we're
5220   # using a relative directory.
5221   cp "$am_depcomp" conftest.dir
5222   cd conftest.dir
5223   # We will build objects and dependencies in a subdirectory because
5224   # it helps to detect inapplicable dependency modes.  For instance
5225   # both Tru64's cc and ICC support -MD to output dependencies as a
5226   # side effect of compilation, but ICC will put the dependencies in
5227   # the current directory while Tru64 will put them in the object
5228   # directory.
5229   mkdir sub
5230
5231   am_cv_CC_dependencies_compiler_type=none
5232   if test "$am_compiler_list" = ""; then
5233      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5234   fi
5235   for depmode in $am_compiler_list; do
5236     # Setup a source with many dependencies, because some compilers
5237     # like to wrap large dependency lists on column 80 (with \), and
5238     # we should not choose a depcomp mode which is confused by this.
5239     #
5240     # We need to recreate these files for each test, as the compiler may
5241     # overwrite some of them when testing with obscure command lines.
5242     # This happens at least with the AIX C compiler.
5243     : > sub/conftest.c
5244     for i in 1 2 3 4 5 6; do
5245       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5246       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5247       # Solaris 8's {/usr,}/bin/sh.
5248       touch sub/conftst$i.h
5249     done
5250     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5251
5252     case $depmode in
5253     nosideeffect)
5254       # after this tag, mechanisms are not by side-effect, so they'll
5255       # only be used when explicitly requested
5256       if test "x$enable_dependency_tracking" = xyes; then
5257         continue
5258       else
5259         break
5260       fi
5261       ;;
5262     none) break ;;
5263     esac
5264     # We check with `-c' and `-o' for the sake of the "dashmstdout"
5265     # mode.  It turns out that the SunPro C++ compiler does not properly
5266     # handle `-M -o', and we need to detect this.
5267     if depmode=$depmode \
5268        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5269        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5270        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
5271          >/dev/null 2>conftest.err &&
5272        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5273        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
5274        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5275       # icc doesn't choke on unknown options, it will just issue warnings
5276       # or remarks (even with -Werror).  So we grep stderr for any message
5277       # that says an option was ignored or not supported.
5278       # When given -MP, icc 7.0 and 7.1 complain thusly:
5279       #   icc: Command line warning: ignoring option '-M'; no argument required
5280       # The diagnosis changed in icc 8.0:
5281       #   icc: Command line remark: option '-MP' not supported
5282       if (grep 'ignoring option' conftest.err ||
5283           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5284         am_cv_CC_dependencies_compiler_type=$depmode
5285         break
5286       fi
5287     fi
5288   done
5289
5290   cd ..
5291   rm -rf conftest.dir
5292 else
5293   am_cv_CC_dependencies_compiler_type=none
5294 fi
5295
5296 fi
5297 echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
5298 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
5299 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5300
5301
5302
5303 if
5304   test "x$enable_dependency_tracking" != xno \
5305   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5306   am__fastdepCC_TRUE=
5307   am__fastdepCC_FALSE='#'
5308 else
5309   am__fastdepCC_TRUE='#'
5310   am__fastdepCC_FALSE=
5311 fi
5312
5313
5314 echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
5315 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
5316 if test "${lt_cv_path_SED+set}" = set; then
5317   echo $ECHO_N "(cached) $ECHO_C" >&6
5318 else
5319   # Loop through the user's path and test for sed and gsed.
5320 # Then use that list of sed's as ones to test for truncation.
5321 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5322 for as_dir in $PATH
5323 do
5324   IFS=$as_save_IFS
5325   test -z "$as_dir" && as_dir=.
5326   for lt_ac_prog in sed gsed; do
5327     for ac_exec_ext in '' $ac_executable_extensions; do
5328       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
5329         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
5330       fi
5331     done
5332   done
5333 done
5334 lt_ac_max=0
5335 lt_ac_count=0
5336 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
5337 # along with /bin/sed that truncates output.
5338 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
5339   test ! -f $lt_ac_sed && continue
5340   cat /dev/null > conftest.in
5341   lt_ac_count=0
5342   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
5343   # Check for GNU sed and select it if it is found.
5344   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
5345     lt_cv_path_SED=$lt_ac_sed
5346     break
5347   fi
5348   while true; do
5349     cat conftest.in conftest.in >conftest.tmp
5350     mv conftest.tmp conftest.in
5351     cp conftest.in conftest.nl
5352     echo >>conftest.nl
5353     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
5354     cmp -s conftest.out conftest.nl || break
5355     # 10000 chars as input seems more than enough
5356     test $lt_ac_count -gt 10 && break
5357     lt_ac_count=`expr $lt_ac_count + 1`
5358     if test $lt_ac_count -gt $lt_ac_max; then
5359       lt_ac_max=$lt_ac_count
5360       lt_cv_path_SED=$lt_ac_sed
5361     fi
5362   done
5363 done
5364
5365 fi
5366
5367 SED=$lt_cv_path_SED
5368 echo "$as_me:$LINENO: result: $SED" >&5
5369 echo "${ECHO_T}$SED" >&6
5370
5371 echo "$as_me:$LINENO: checking for egrep" >&5
5372 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
5373 if test "${ac_cv_prog_egrep+set}" = set; then
5374   echo $ECHO_N "(cached) $ECHO_C" >&6
5375 else
5376   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
5377     then ac_cv_prog_egrep='grep -E'
5378     else ac_cv_prog_egrep='egrep'
5379     fi
5380 fi
5381 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
5382 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
5383  EGREP=$ac_cv_prog_egrep
5384
5385
5386
5387 # Check whether --with-gnu-ld or --without-gnu-ld was given.
5388 if test "${with_gnu_ld+set}" = set; then
5389   withval="$with_gnu_ld"
5390   test "$withval" = no || with_gnu_ld=yes
5391 else
5392   with_gnu_ld=no
5393 fi;
5394 ac_prog=ld
5395 if test "$GCC" = yes; then
5396   # Check if gcc -print-prog-name=ld gives a path.
5397   echo "$as_me:$LINENO: checking for ld used by $CC" >&5
5398 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
5399   case $host in
5400   *-*-mingw*)
5401     # gcc leaves a trailing carriage return which upsets mingw
5402     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5403   *)
5404     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5405   esac
5406   case $ac_prog in
5407     # Accept absolute paths.
5408     [\\/]* | ?:[\\/]*)
5409       re_direlt='/[^/][^/]*/\.\./'
5410       # Canonicalize the pathname of ld
5411       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
5412       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5413         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
5414       done
5415       test -z "$LD" && LD="$ac_prog"
5416       ;;
5417   "")
5418     # If it fails, then pretend we aren't using GCC.
5419     ac_prog=ld
5420     ;;
5421   *)
5422     # If it is relative, then search for the first ld in PATH.
5423     with_gnu_ld=unknown
5424     ;;
5425   esac
5426 elif test "$with_gnu_ld" = yes; then
5427   echo "$as_me:$LINENO: checking for GNU ld" >&5
5428 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
5429 else
5430   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
5431 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
5432 fi
5433 if test "${lt_cv_path_LD+set}" = set; then
5434   echo $ECHO_N "(cached) $ECHO_C" >&6
5435 else
5436   if test -z "$LD"; then
5437   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5438   for ac_dir in $PATH; do
5439     IFS="$lt_save_ifs"
5440     test -z "$ac_dir" && ac_dir=.
5441     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5442       lt_cv_path_LD="$ac_dir/$ac_prog"
5443       # Check to see if the program is GNU ld.  I'd rather use --version,
5444       # but apparently some variants of GNU ld only accept -v.
5445       # Break only if it was the GNU/non-GNU ld that we prefer.
5446       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5447       *GNU* | *'with BFD'*)
5448         test "$with_gnu_ld" != no && break
5449         ;;
5450       *)
5451         test "$with_gnu_ld" != yes && break
5452         ;;
5453       esac
5454     fi
5455   done
5456   IFS="$lt_save_ifs"
5457 else
5458   lt_cv_path_LD="$LD" # Let the user override the test with a path.
5459 fi
5460 fi
5461
5462 LD="$lt_cv_path_LD"
5463 if test -n "$LD"; then
5464   echo "$as_me:$LINENO: result: $LD" >&5
5465 echo "${ECHO_T}$LD" >&6
5466 else
5467   echo "$as_me:$LINENO: result: no" >&5
5468 echo "${ECHO_T}no" >&6
5469 fi
5470 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
5471 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
5472    { (exit 1); exit 1; }; }
5473 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
5474 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
5475 if test "${lt_cv_prog_gnu_ld+set}" = set; then
5476   echo $ECHO_N "(cached) $ECHO_C" >&6
5477 else
5478   # I'd rather use --version here, but apparently some GNU lds only accept -v.
5479 case `$LD -v 2>&1 </dev/null` in
5480 *GNU* | *'with BFD'*)
5481   lt_cv_prog_gnu_ld=yes
5482   ;;
5483 *)
5484   lt_cv_prog_gnu_ld=no
5485   ;;
5486 esac
5487 fi
5488 echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
5489 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
5490 with_gnu_ld=$lt_cv_prog_gnu_ld
5491
5492
5493 echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
5494 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
5495 if test "${lt_cv_ld_reload_flag+set}" = set; then
5496   echo $ECHO_N "(cached) $ECHO_C" >&6
5497 else
5498   lt_cv_ld_reload_flag='-r'
5499 fi
5500 echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
5501 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
5502 reload_flag=$lt_cv_ld_reload_flag
5503 case $reload_flag in
5504 "" | " "*) ;;
5505 *) reload_flag=" $reload_flag" ;;
5506 esac
5507 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5508 case $host_os in
5509   darwin*)
5510     if test "$GCC" = yes; then
5511       reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
5512     else
5513       reload_cmds='$LD$reload_flag -o $output$reload_objs'
5514     fi
5515     ;;
5516 esac
5517
5518 echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
5519 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
5520 if test "${lt_cv_path_NM+set}" = set; then
5521   echo $ECHO_N "(cached) $ECHO_C" >&6
5522 else
5523   if test -n "$NM"; then
5524   # Let the user override the test.
5525   lt_cv_path_NM="$NM"
5526 else
5527   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5528   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
5529     IFS="$lt_save_ifs"
5530     test -z "$ac_dir" && ac_dir=.
5531     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
5532     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5533       # Check to see if the nm accepts a BSD-compat flag.
5534       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5535       #   nm: unknown option "B" ignored
5536       # Tru64's nm complains that /dev/null is an invalid object file
5537       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5538       */dev/null* | *'Invalid file or object type'*)
5539         lt_cv_path_NM="$tmp_nm -B"
5540         break
5541         ;;
5542       *)
5543         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5544         */dev/null*)
5545           lt_cv_path_NM="$tmp_nm -p"
5546           break
5547           ;;
5548         *)
5549           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5550           continue # so that we can try to find one that supports BSD flags
5551           ;;
5552         esac
5553       esac
5554     fi
5555   done
5556   IFS="$lt_save_ifs"
5557   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
5558 fi
5559 fi
5560 echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
5561 echo "${ECHO_T}$lt_cv_path_NM" >&6
5562 NM="$lt_cv_path_NM"
5563
5564 echo "$as_me:$LINENO: checking whether ln -s works" >&5
5565 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
5566 LN_S=$as_ln_s
5567 if test "$LN_S" = "ln -s"; then
5568   echo "$as_me:$LINENO: result: yes" >&5
5569 echo "${ECHO_T}yes" >&6
5570 else
5571   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
5572 echo "${ECHO_T}no, using $LN_S" >&6
5573 fi
5574
5575 echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
5576 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
5577 if test "${lt_cv_deplibs_check_method+set}" = set; then
5578   echo $ECHO_N "(cached) $ECHO_C" >&6
5579 else
5580   lt_cv_file_magic_cmd='$MAGIC_CMD'
5581 lt_cv_file_magic_test_file=
5582 lt_cv_deplibs_check_method='unknown'
5583 # Need to set the preceding variable on all platforms that support
5584 # interlibrary dependencies.
5585 # 'none' -- dependencies not supported.
5586 # `unknown' -- same as none, but documents that we really don't know.
5587 # 'pass_all' -- all dependencies passed with no checks.
5588 # 'test_compile' -- check by making test program.
5589 # 'file_magic [[regex]]' -- check by looking for files in library path
5590 # which responds to the $file_magic_cmd with a given extended regex.
5591 # If you have `file' or equivalent on your system and you're not sure
5592 # whether `pass_all' will *always* work, you probably want this one.
5593
5594 case $host_os in
5595 aix4* | aix5*)
5596   lt_cv_deplibs_check_method=pass_all
5597   ;;
5598
5599 beos*)
5600   lt_cv_deplibs_check_method=pass_all
5601   ;;
5602
5603 bsdi[45]*)
5604   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
5605   lt_cv_file_magic_cmd='/usr/bin/file -L'
5606   lt_cv_file_magic_test_file=/shlib/libc.so
5607   ;;
5608
5609 cygwin*)
5610   # func_win32_libid is a shell function defined in ltmain.sh
5611   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5612   lt_cv_file_magic_cmd='func_win32_libid'
5613   ;;
5614
5615 mingw* | pw32*)
5616   # Base MSYS/MinGW do not provide the 'file' command needed by
5617   # func_win32_libid shell function, so use a weaker test based on 'objdump'.
5618   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
5619   lt_cv_file_magic_cmd='$OBJDUMP -f'
5620   ;;
5621
5622 darwin* | rhapsody*)
5623   lt_cv_deplibs_check_method=pass_all
5624   ;;
5625
5626 freebsd* | kfreebsd*-gnu | dragonfly*)
5627   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5628     case $host_cpu in
5629     i*86 )
5630       # Not sure whether the presence of OpenBSD here was a mistake.
5631       # Let's accept both of them until this is cleared up.
5632       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
5633       lt_cv_file_magic_cmd=/usr/bin/file
5634       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5635       ;;
5636     esac
5637   else
5638     lt_cv_deplibs_check_method=pass_all
5639   fi
5640   ;;
5641
5642 gnu*)
5643   lt_cv_deplibs_check_method=pass_all
5644   ;;
5645
5646 hpux10.20* | hpux11*)
5647   lt_cv_file_magic_cmd=/usr/bin/file
5648   case $host_cpu in
5649   ia64*)
5650     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
5651     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5652     ;;
5653   hppa*64*)
5654     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]'
5655     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5656     ;;
5657   *)
5658     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
5659     lt_cv_file_magic_test_file=/usr/lib/libc.sl
5660     ;;
5661   esac
5662   ;;
5663
5664 irix5* | irix6* | nonstopux*)
5665   case $LD in
5666   *-32|*"-32 ") libmagic=32-bit;;
5667   *-n32|*"-n32 ") libmagic=N32;;
5668   *-64|*"-64 ") libmagic=64-bit;;
5669   *) libmagic=never-match;;
5670   esac
5671   lt_cv_deplibs_check_method=pass_all
5672   ;;
5673
5674 # This must be Linux ELF.
5675 linux*)
5676   lt_cv_deplibs_check_method=pass_all
5677   ;;
5678
5679 netbsd*)
5680   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5681     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5682   else
5683     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
5684   fi
5685   ;;
5686
5687 newos6*)
5688   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
5689   lt_cv_file_magic_cmd=/usr/bin/file
5690   lt_cv_file_magic_test_file=/usr/lib/libnls.so
5691   ;;
5692
5693 nto-qnx*)
5694   lt_cv_deplibs_check_method=unknown
5695   ;;
5696
5697 openbsd*)
5698   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5699     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
5700   else
5701     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5702   fi
5703   ;;
5704
5705 osf3* | osf4* | osf5*)
5706   lt_cv_deplibs_check_method=pass_all
5707   ;;
5708
5709 sco3.2v5*)
5710   lt_cv_deplibs_check_method=pass_all
5711   ;;
5712
5713 solaris*)
5714   lt_cv_deplibs_check_method=pass_all
5715   ;;
5716
5717 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5718   case $host_vendor in
5719   motorola)
5720     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]'
5721     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5722     ;;
5723   ncr)
5724     lt_cv_deplibs_check_method=pass_all
5725     ;;
5726   sequent)
5727     lt_cv_file_magic_cmd='/bin/file'
5728     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
5729     ;;
5730   sni)
5731     lt_cv_file_magic_cmd='/bin/file'
5732     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
5733     lt_cv_file_magic_test_file=/lib/libc.so
5734     ;;
5735   siemens)
5736     lt_cv_deplibs_check_method=pass_all
5737     ;;
5738   esac
5739   ;;
5740
5741 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
5742   lt_cv_deplibs_check_method=pass_all
5743   ;;
5744 esac
5745
5746 fi
5747 echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
5748 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
5749 file_magic_cmd=$lt_cv_file_magic_cmd
5750 deplibs_check_method=$lt_cv_deplibs_check_method
5751 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5752
5753
5754
5755
5756 # If no C compiler was specified, use CC.
5757 LTCC=${LTCC-"$CC"}
5758
5759 # Allow CC to be a program name with arguments.
5760 compiler=$CC
5761
5762
5763 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
5764 if test "${enable_libtool_lock+set}" = set; then
5765   enableval="$enable_libtool_lock"
5766
5767 fi;
5768 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5769
5770 # Some flags need to be propagated to the compiler or linker for good
5771 # libtool support.
5772 case $host in
5773 ia64-*-hpux*)
5774   # Find out which ABI we are using.
5775   echo 'int i;' > conftest.$ac_ext
5776   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5777   (eval $ac_compile) 2>&5
5778   ac_status=$?
5779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5780   (exit $ac_status); }; then
5781     case `/usr/bin/file conftest.$ac_objext` in
5782     *ELF-32*)
5783       HPUX_IA64_MODE="32"
5784       ;;
5785     *ELF-64*)
5786       HPUX_IA64_MODE="64"
5787       ;;
5788     esac
5789   fi
5790   rm -rf conftest*
5791   ;;
5792 *-*-irix6*)
5793   # Find out which ABI we are using.
5794   echo '#line 5794 "configure"' > conftest.$ac_ext
5795   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5796   (eval $ac_compile) 2>&5
5797   ac_status=$?
5798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5799   (exit $ac_status); }; then
5800    if test "$lt_cv_prog_gnu_ld" = yes; then
5801     case `/usr/bin/file conftest.$ac_objext` in
5802     *32-bit*)
5803       LD="${LD-ld} -melf32bsmip"
5804       ;;
5805     *N32*)
5806       LD="${LD-ld} -melf32bmipn32"
5807       ;;
5808     *64-bit*)
5809       LD="${LD-ld} -melf64bmip"
5810       ;;
5811     esac
5812    else
5813     case `/usr/bin/file conftest.$ac_objext` in
5814     *32-bit*)
5815       LD="${LD-ld} -32"
5816       ;;
5817     *N32*)
5818       LD="${LD-ld} -n32"
5819       ;;
5820     *64-bit*)
5821       LD="${LD-ld} -64"
5822       ;;
5823     esac
5824    fi
5825   fi
5826   rm -rf conftest*
5827   ;;
5828
5829 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
5830   # Find out which ABI we are using.
5831   echo 'int i;' > conftest.$ac_ext
5832   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5833   (eval $ac_compile) 2>&5
5834   ac_status=$?
5835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5836   (exit $ac_status); }; then
5837     case `/usr/bin/file conftest.o` in
5838     *32-bit*)
5839       case $host in
5840         x86_64-*linux*)
5841           LD="${LD-ld} -m elf_i386"
5842           ;;
5843         ppc64-*linux*|powerpc64-*linux*)
5844           LD="${LD-ld} -m elf32ppclinux"
5845           ;;
5846         s390x-*linux*)
5847           LD="${LD-ld} -m elf_s390"
5848           ;;
5849         sparc64-*linux*)
5850           LD="${LD-ld} -m elf32_sparc"
5851           ;;
5852       esac
5853       ;;
5854     *64-bit*)
5855       case $host in
5856         x86_64-*linux*)
5857           LD="${LD-ld} -m elf_x86_64"
5858           ;;
5859         ppc*-*linux*|powerpc*-*linux*)
5860           LD="${LD-ld} -m elf64ppc"
5861           ;;
5862         s390*-*linux*)
5863           LD="${LD-ld} -m elf64_s390"
5864           ;;
5865         sparc*-*linux*)
5866           LD="${LD-ld} -m elf64_sparc"
5867           ;;
5868       esac
5869       ;;
5870     esac
5871   fi
5872   rm -rf conftest*
5873   ;;
5874
5875 *-*-sco3.2v5*)
5876   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
5877   SAVE_CFLAGS="$CFLAGS"
5878   CFLAGS="$CFLAGS -belf"
5879   echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
5880 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
5881 if test "${lt_cv_cc_needs_belf+set}" = set; then
5882   echo $ECHO_N "(cached) $ECHO_C" >&6
5883 else
5884   ac_ext=c
5885 ac_cpp='$CPP $CPPFLAGS'
5886 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5887 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5888 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5889
5890      cat >conftest.$ac_ext <<_ACEOF
5891 /* confdefs.h.  */
5892 _ACEOF
5893 cat confdefs.h >>conftest.$ac_ext
5894 cat >>conftest.$ac_ext <<_ACEOF
5895 /* end confdefs.h.  */
5896
5897 int
5898 main ()
5899 {
5900
5901   ;
5902   return 0;
5903 }
5904 _ACEOF
5905 rm -f conftest.$ac_objext conftest$ac_exeext
5906 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5907   (eval $ac_link) 2>conftest.er1
5908   ac_status=$?
5909   grep -v '^ *+' conftest.er1 >conftest.err
5910   rm -f conftest.er1
5911   cat conftest.err >&5
5912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5913   (exit $ac_status); } &&
5914          { ac_try='test -z "$ac_c_werror_flag"
5915                          || test ! -s conftest.err'
5916   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5917   (eval $ac_try) 2>&5
5918   ac_status=$?
5919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5920   (exit $ac_status); }; } &&
5921          { ac_try='test -s conftest$ac_exeext'
5922   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5923   (eval $ac_try) 2>&5
5924   ac_status=$?
5925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5926   (exit $ac_status); }; }; then
5927   lt_cv_cc_needs_belf=yes
5928 else
5929   echo "$as_me: failed program was:" >&5
5930 sed 's/^/| /' conftest.$ac_ext >&5
5931
5932 lt_cv_cc_needs_belf=no
5933 fi
5934 rm -f conftest.err conftest.$ac_objext \
5935       conftest$ac_exeext conftest.$ac_ext
5936      ac_ext=c
5937 ac_cpp='$CPP $CPPFLAGS'
5938 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5939 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5940 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5941
5942 fi
5943 echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
5944 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
5945   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5946     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5947     CFLAGS="$SAVE_CFLAGS"
5948   fi
5949   ;;
5950 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
5951   if test -n "$ac_tool_prefix"; then
5952   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5953 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
5954 echo "$as_me:$LINENO: checking for $ac_word" >&5
5955 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5956 if test "${ac_cv_prog_DLLTOOL+set}" = set; then
5957   echo $ECHO_N "(cached) $ECHO_C" >&6
5958 else
5959   if test -n "$DLLTOOL"; then
5960   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
5961 else
5962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5963 for as_dir in $PATH
5964 do
5965   IFS=$as_save_IFS
5966   test -z "$as_dir" && as_dir=.
5967   for ac_exec_ext in '' $ac_executable_extensions; do
5968   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5969     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
5970     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5971     break 2
5972   fi
5973 done
5974 done
5975
5976 fi
5977 fi
5978 DLLTOOL=$ac_cv_prog_DLLTOOL
5979 if test -n "$DLLTOOL"; then
5980   echo "$as_me:$LINENO: result: $DLLTOOL" >&5
5981 echo "${ECHO_T}$DLLTOOL" >&6
5982 else
5983   echo "$as_me:$LINENO: result: no" >&5
5984 echo "${ECHO_T}no" >&6
5985 fi
5986
5987 fi
5988 if test -z "$ac_cv_prog_DLLTOOL"; then
5989   ac_ct_DLLTOOL=$DLLTOOL
5990   # Extract the first word of "dlltool", so it can be a program name with args.
5991 set dummy dlltool; ac_word=$2
5992 echo "$as_me:$LINENO: checking for $ac_word" >&5
5993 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5994 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
5995   echo $ECHO_N "(cached) $ECHO_C" >&6
5996 else
5997   if test -n "$ac_ct_DLLTOOL"; then
5998   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
5999 else
6000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6001 for as_dir in $PATH
6002 do
6003   IFS=$as_save_IFS
6004   test -z "$as_dir" && as_dir=.
6005   for ac_exec_ext in '' $ac_executable_extensions; do
6006   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6007     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6008     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6009     break 2
6010   fi
6011 done
6012 done
6013
6014   test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="false"
6015 fi
6016 fi
6017 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6018 if test -n "$ac_ct_DLLTOOL"; then
6019   echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
6020 echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
6021 else
6022   echo "$as_me:$LINENO: result: no" >&5
6023 echo "${ECHO_T}no" >&6
6024 fi
6025
6026   DLLTOOL=$ac_ct_DLLTOOL
6027 else
6028   DLLTOOL="$ac_cv_prog_DLLTOOL"
6029 fi
6030
6031   if test -n "$ac_tool_prefix"; then
6032   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
6033 set dummy ${ac_tool_prefix}as; ac_word=$2
6034 echo "$as_me:$LINENO: checking for $ac_word" >&5
6035 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6036 if test "${ac_cv_prog_AS+set}" = set; then
6037   echo $ECHO_N "(cached) $ECHO_C" >&6
6038 else
6039   if test -n "$AS"; then
6040   ac_cv_prog_AS="$AS" # Let the user override the test.
6041 else
6042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6043 for as_dir in $PATH
6044 do
6045   IFS=$as_save_IFS
6046   test -z "$as_dir" && as_dir=.
6047   for ac_exec_ext in '' $ac_executable_extensions; do
6048   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6049     ac_cv_prog_AS="${ac_tool_prefix}as"
6050     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6051     break 2
6052   fi
6053 done
6054 done
6055
6056 fi
6057 fi
6058 AS=$ac_cv_prog_AS
6059 if test -n "$AS"; then
6060   echo "$as_me:$LINENO: result: $AS" >&5
6061 echo "${ECHO_T}$AS" >&6
6062 else
6063   echo "$as_me:$LINENO: result: no" >&5
6064 echo "${ECHO_T}no" >&6
6065 fi
6066
6067 fi
6068 if test -z "$ac_cv_prog_AS"; then
6069   ac_ct_AS=$AS
6070   # Extract the first word of "as", so it can be a program name with args.
6071 set dummy as; ac_word=$2
6072 echo "$as_me:$LINENO: checking for $ac_word" >&5
6073 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6074 if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
6075   echo $ECHO_N "(cached) $ECHO_C" >&6
6076 else
6077   if test -n "$ac_ct_AS"; then
6078   ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
6079 else
6080 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6081 for as_dir in $PATH
6082 do
6083   IFS=$as_save_IFS
6084   test -z "$as_dir" && as_dir=.
6085   for ac_exec_ext in '' $ac_executable_extensions; do
6086   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6087     ac_cv_prog_ac_ct_AS="as"
6088     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6089     break 2
6090   fi
6091 done
6092 done
6093
6094   test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="false"
6095 fi
6096 fi
6097 ac_ct_AS=$ac_cv_prog_ac_ct_AS
6098 if test -n "$ac_ct_AS"; then
6099   echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
6100 echo "${ECHO_T}$ac_ct_AS" >&6
6101 else
6102   echo "$as_me:$LINENO: result: no" >&5
6103 echo "${ECHO_T}no" >&6
6104 fi
6105
6106   AS=$ac_ct_AS
6107 else
6108   AS="$ac_cv_prog_AS"
6109 fi
6110
6111   if test -n "$ac_tool_prefix"; then
6112   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
6113 set dummy ${ac_tool_prefix}objdump; ac_word=$2
6114 echo "$as_me:$LINENO: checking for $ac_word" >&5
6115 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6116 if test "${ac_cv_prog_OBJDUMP+set}" = set; then
6117   echo $ECHO_N "(cached) $ECHO_C" >&6
6118 else
6119   if test -n "$OBJDUMP"; then
6120   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
6121 else
6122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6123 for as_dir in $PATH
6124 do
6125   IFS=$as_save_IFS
6126   test -z "$as_dir" && as_dir=.
6127   for ac_exec_ext in '' $ac_executable_extensions; do
6128   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6129     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
6130     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6131     break 2
6132   fi
6133 done
6134 done
6135
6136 fi
6137 fi
6138 OBJDUMP=$ac_cv_prog_OBJDUMP
6139 if test -n "$OBJDUMP"; then
6140   echo "$as_me:$LINENO: result: $OBJDUMP" >&5
6141 echo "${ECHO_T}$OBJDUMP" >&6
6142 else
6143   echo "$as_me:$LINENO: result: no" >&5
6144 echo "${ECHO_T}no" >&6
6145 fi
6146
6147 fi
6148 if test -z "$ac_cv_prog_OBJDUMP"; then
6149   ac_ct_OBJDUMP=$OBJDUMP
6150   # Extract the first word of "objdump", so it can be a program name with args.
6151 set dummy objdump; ac_word=$2
6152 echo "$as_me:$LINENO: checking for $ac_word" >&5
6153 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6154 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
6155   echo $ECHO_N "(cached) $ECHO_C" >&6
6156 else
6157   if test -n "$ac_ct_OBJDUMP"; then
6158   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
6159 else
6160 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6161 for as_dir in $PATH
6162 do
6163   IFS=$as_save_IFS
6164   test -z "$as_dir" && as_dir=.
6165   for ac_exec_ext in '' $ac_executable_extensions; do
6166   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6167     ac_cv_prog_ac_ct_OBJDUMP="objdump"
6168     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6169     break 2
6170   fi
6171 done
6172 done
6173
6174   test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false"
6175 fi
6176 fi
6177 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
6178 if test -n "$ac_ct_OBJDUMP"; then
6179   echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
6180 echo "${ECHO_T}$ac_ct_OBJDUMP" >&6
6181 else
6182   echo "$as_me:$LINENO: result: no" >&5
6183 echo "${ECHO_T}no" >&6
6184 fi
6185
6186   OBJDUMP=$ac_ct_OBJDUMP
6187 else
6188   OBJDUMP="$ac_cv_prog_OBJDUMP"
6189 fi
6190
6191   ;;
6192
6193 esac
6194
6195 need_locks="$enable_libtool_lock"
6196
6197
6198 ac_ext=c
6199 ac_cpp='$CPP $CPPFLAGS'
6200 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6201 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6202 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6203 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
6204 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
6205 # On Suns, sometimes $CPP names a directory.
6206 if test -n "$CPP" && test -d "$CPP"; then
6207   CPP=
6208 fi
6209 if test -z "$CPP"; then
6210   if test "${ac_cv_prog_CPP+set}" = set; then
6211   echo $ECHO_N "(cached) $ECHO_C" >&6
6212 else
6213       # Double quotes because CPP needs to be expanded
6214     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6215     do
6216       ac_preproc_ok=false
6217 for ac_c_preproc_warn_flag in '' yes
6218 do
6219   # Use a header file that comes with gcc, so configuring glibc
6220   # with a fresh cross-compiler works.
6221   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6222   # <limits.h> exists even on freestanding compilers.
6223   # On the NeXT, cc -E runs the code through the compiler's parser,
6224   # not just through cpp. "Syntax error" is here to catch this case.
6225   cat >conftest.$ac_ext <<_ACEOF
6226 /* confdefs.h.  */
6227 _ACEOF
6228 cat confdefs.h >>conftest.$ac_ext
6229 cat >>conftest.$ac_ext <<_ACEOF
6230 /* end confdefs.h.  */
6231 #ifdef __STDC__
6232 # include <limits.h>
6233 #else
6234 # include <assert.h>
6235 #endif
6236                      Syntax error
6237 _ACEOF
6238 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6239   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6240   ac_status=$?
6241   grep -v '^ *+' conftest.er1 >conftest.err
6242   rm -f conftest.er1
6243   cat conftest.err >&5
6244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6245   (exit $ac_status); } >/dev/null; then
6246   if test -s conftest.err; then
6247     ac_cpp_err=$ac_c_preproc_warn_flag
6248     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6249   else
6250     ac_cpp_err=
6251   fi
6252 else
6253   ac_cpp_err=yes
6254 fi
6255 if test -z "$ac_cpp_err"; then
6256   :
6257 else
6258   echo "$as_me: failed program was:" >&5
6259 sed 's/^/| /' conftest.$ac_ext >&5
6260
6261   # Broken: fails on valid input.
6262 continue
6263 fi
6264 rm -f conftest.err conftest.$ac_ext
6265
6266   # OK, works on sane cases.  Now check whether non-existent headers
6267   # can be detected and how.
6268   cat >conftest.$ac_ext <<_ACEOF
6269 /* confdefs.h.  */
6270 _ACEOF
6271 cat confdefs.h >>conftest.$ac_ext
6272 cat >>conftest.$ac_ext <<_ACEOF
6273 /* end confdefs.h.  */
6274 #include <ac_nonexistent.h>
6275 _ACEOF
6276 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6277   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6278   ac_status=$?
6279   grep -v '^ *+' conftest.er1 >conftest.err
6280   rm -f conftest.er1
6281   cat conftest.err >&5
6282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6283   (exit $ac_status); } >/dev/null; then
6284   if test -s conftest.err; then
6285     ac_cpp_err=$ac_c_preproc_warn_flag
6286     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6287   else
6288     ac_cpp_err=
6289   fi
6290 else
6291   ac_cpp_err=yes
6292 fi
6293 if test -z "$ac_cpp_err"; then
6294   # Broken: success on invalid input.
6295 continue
6296 else
6297   echo "$as_me: failed program was:" >&5
6298 sed 's/^/| /' conftest.$ac_ext >&5
6299
6300   # Passes both tests.
6301 ac_preproc_ok=:
6302 break
6303 fi
6304 rm -f conftest.err conftest.$ac_ext
6305
6306 done
6307 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6308 rm -f conftest.err conftest.$ac_ext
6309 if $ac_preproc_ok; then
6310   break
6311 fi
6312
6313     done
6314     ac_cv_prog_CPP=$CPP
6315
6316 fi
6317   CPP=$ac_cv_prog_CPP
6318 else
6319   ac_cv_prog_CPP=$CPP
6320 fi
6321 echo "$as_me:$LINENO: result: $CPP" >&5
6322 echo "${ECHO_T}$CPP" >&6
6323 ac_preproc_ok=false
6324 for ac_c_preproc_warn_flag in '' yes
6325 do
6326   # Use a header file that comes with gcc, so configuring glibc
6327   # with a fresh cross-compiler works.
6328   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6329   # <limits.h> exists even on freestanding compilers.
6330   # On the NeXT, cc -E runs the code through the compiler's parser,
6331   # not just through cpp. "Syntax error" is here to catch this case.
6332   cat >conftest.$ac_ext <<_ACEOF
6333 /* confdefs.h.  */
6334 _ACEOF
6335 cat confdefs.h >>conftest.$ac_ext
6336 cat >>conftest.$ac_ext <<_ACEOF
6337 /* end confdefs.h.  */
6338 #ifdef __STDC__
6339 # include <limits.h>
6340 #else
6341 # include <assert.h>
6342 #endif
6343                      Syntax error
6344 _ACEOF
6345 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6346   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6347   ac_status=$?
6348   grep -v '^ *+' conftest.er1 >conftest.err
6349   rm -f conftest.er1
6350   cat conftest.err >&5
6351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6352   (exit $ac_status); } >/dev/null; then
6353   if test -s conftest.err; then
6354     ac_cpp_err=$ac_c_preproc_warn_flag
6355     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6356   else
6357     ac_cpp_err=
6358   fi
6359 else
6360   ac_cpp_err=yes
6361 fi
6362 if test -z "$ac_cpp_err"; then
6363   :
6364 else
6365   echo "$as_me: failed program was:" >&5
6366 sed 's/^/| /' conftest.$ac_ext >&5
6367
6368   # Broken: fails on valid input.
6369 continue
6370 fi
6371 rm -f conftest.err conftest.$ac_ext
6372
6373   # OK, works on sane cases.  Now check whether non-existent headers
6374   # can be detected and how.
6375   cat >conftest.$ac_ext <<_ACEOF
6376 /* confdefs.h.  */
6377 _ACEOF
6378 cat confdefs.h >>conftest.$ac_ext
6379 cat >>conftest.$ac_ext <<_ACEOF
6380 /* end confdefs.h.  */
6381 #include <ac_nonexistent.h>
6382 _ACEOF
6383 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6384   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6385   ac_status=$?
6386   grep -v '^ *+' conftest.er1 >conftest.err
6387   rm -f conftest.er1
6388   cat conftest.err >&5
6389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6390   (exit $ac_status); } >/dev/null; then
6391   if test -s conftest.err; then
6392     ac_cpp_err=$ac_c_preproc_warn_flag
6393     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6394   else
6395     ac_cpp_err=
6396   fi
6397 else
6398   ac_cpp_err=yes
6399 fi
6400 if test -z "$ac_cpp_err"; then
6401   # Broken: success on invalid input.
6402 continue
6403 else
6404   echo "$as_me: failed program was:" >&5
6405 sed 's/^/| /' conftest.$ac_ext >&5
6406
6407   # Passes both tests.
6408 ac_preproc_ok=:
6409 break
6410 fi
6411 rm -f conftest.err conftest.$ac_ext
6412
6413 done
6414 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6415 rm -f conftest.err conftest.$ac_ext
6416 if $ac_preproc_ok; then
6417   :
6418 else
6419   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
6420 See \`config.log' for more details." >&5
6421 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
6422 See \`config.log' for more details." >&2;}
6423    { (exit 1); exit 1; }; }
6424 fi
6425
6426 ac_ext=c
6427 ac_cpp='$CPP $CPPFLAGS'
6428 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6429 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6430 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6431
6432
6433 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6434 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6435 if test "${ac_cv_header_stdc+set}" = set; then
6436   echo $ECHO_N "(cached) $ECHO_C" >&6
6437 else
6438   cat >conftest.$ac_ext <<_ACEOF
6439 /* confdefs.h.  */
6440 _ACEOF
6441 cat confdefs.h >>conftest.$ac_ext
6442 cat >>conftest.$ac_ext <<_ACEOF
6443 /* end confdefs.h.  */
6444 #include <stdlib.h>
6445 #include <stdarg.h>
6446 #include <string.h>
6447 #include <float.h>
6448
6449 int
6450 main ()
6451 {
6452
6453   ;
6454   return 0;
6455 }
6456 _ACEOF
6457 rm -f conftest.$ac_objext
6458 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6459   (eval $ac_compile) 2>conftest.er1
6460   ac_status=$?
6461   grep -v '^ *+' conftest.er1 >conftest.err
6462   rm -f conftest.er1
6463   cat conftest.err >&5
6464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6465   (exit $ac_status); } &&
6466          { ac_try='test -z "$ac_c_werror_flag"
6467                          || test ! -s conftest.err'
6468   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6469   (eval $ac_try) 2>&5
6470   ac_status=$?
6471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6472   (exit $ac_status); }; } &&
6473          { ac_try='test -s conftest.$ac_objext'
6474   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6475   (eval $ac_try) 2>&5
6476   ac_status=$?
6477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6478   (exit $ac_status); }; }; then
6479   ac_cv_header_stdc=yes
6480 else
6481   echo "$as_me: failed program was:" >&5
6482 sed 's/^/| /' conftest.$ac_ext >&5
6483
6484 ac_cv_header_stdc=no
6485 fi
6486 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6487
6488 if test $ac_cv_header_stdc = yes; then
6489   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6490   cat >conftest.$ac_ext <<_ACEOF
6491 /* confdefs.h.  */
6492 _ACEOF
6493 cat confdefs.h >>conftest.$ac_ext
6494 cat >>conftest.$ac_ext <<_ACEOF
6495 /* end confdefs.h.  */
6496 #include <string.h>
6497
6498 _ACEOF
6499 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6500   $EGREP "memchr" >/dev/null 2>&1; then
6501   :
6502 else
6503   ac_cv_header_stdc=no
6504 fi
6505 rm -f conftest*
6506
6507 fi
6508
6509 if test $ac_cv_header_stdc = yes; then
6510   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6511   cat >conftest.$ac_ext <<_ACEOF
6512 /* confdefs.h.  */
6513 _ACEOF
6514 cat confdefs.h >>conftest.$ac_ext
6515 cat >>conftest.$ac_ext <<_ACEOF
6516 /* end confdefs.h.  */
6517 #include <stdlib.h>
6518
6519 _ACEOF
6520 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6521   $EGREP "free" >/dev/null 2>&1; then
6522   :
6523 else
6524   ac_cv_header_stdc=no
6525 fi
6526 rm -f conftest*
6527
6528 fi
6529
6530 if test $ac_cv_header_stdc = yes; then
6531   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6532   if test "$cross_compiling" = yes; then
6533   :
6534 else
6535   cat >conftest.$ac_ext <<_ACEOF
6536 /* confdefs.h.  */
6537 _ACEOF
6538 cat confdefs.h >>conftest.$ac_ext
6539 cat >>conftest.$ac_ext <<_ACEOF
6540 /* end confdefs.h.  */
6541 #include <ctype.h>
6542 #if ((' ' & 0x0FF) == 0x020)
6543 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6544 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6545 #else
6546 # define ISLOWER(c) \
6547                    (('a' <= (c) && (c) <= 'i') \
6548                      || ('j' <= (c) && (c) <= 'r') \
6549                      || ('s' <= (c) && (c) <= 'z'))
6550 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6551 #endif
6552
6553 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6554 int
6555 main ()
6556 {
6557   int i;
6558   for (i = 0; i < 256; i++)
6559     if (XOR (islower (i), ISLOWER (i))
6560         || toupper (i) != TOUPPER (i))
6561       exit(2);
6562   exit (0);
6563 }
6564 _ACEOF
6565 rm -f conftest$ac_exeext
6566 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6567   (eval $ac_link) 2>&5
6568   ac_status=$?
6569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6570   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6572   (eval $ac_try) 2>&5
6573   ac_status=$?
6574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6575   (exit $ac_status); }; }; then
6576   :
6577 else
6578   echo "$as_me: program exited with status $ac_status" >&5
6579 echo "$as_me: failed program was:" >&5
6580 sed 's/^/| /' conftest.$ac_ext >&5
6581
6582 ( exit $ac_status )
6583 ac_cv_header_stdc=no
6584 fi
6585 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6586 fi
6587 fi
6588 fi
6589 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6590 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6591 if test $ac_cv_header_stdc = yes; then
6592
6593 cat >>confdefs.h <<\_ACEOF
6594 #define STDC_HEADERS 1
6595 _ACEOF
6596
6597 fi
6598
6599 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6610                   inttypes.h stdint.h unistd.h
6611 do
6612 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6613 echo "$as_me:$LINENO: checking for $ac_header" >&5
6614 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6615 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6616   echo $ECHO_N "(cached) $ECHO_C" >&6
6617 else
6618   cat >conftest.$ac_ext <<_ACEOF
6619 /* confdefs.h.  */
6620 _ACEOF
6621 cat confdefs.h >>conftest.$ac_ext
6622 cat >>conftest.$ac_ext <<_ACEOF
6623 /* end confdefs.h.  */
6624 $ac_includes_default
6625
6626 #include <$ac_header>
6627 _ACEOF
6628 rm -f conftest.$ac_objext
6629 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6630   (eval $ac_compile) 2>conftest.er1
6631   ac_status=$?
6632   grep -v '^ *+' conftest.er1 >conftest.err
6633   rm -f conftest.er1
6634   cat conftest.err >&5
6635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6636   (exit $ac_status); } &&
6637          { ac_try='test -z "$ac_c_werror_flag"
6638                          || test ! -s conftest.err'
6639   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6640   (eval $ac_try) 2>&5
6641   ac_status=$?
6642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6643   (exit $ac_status); }; } &&
6644          { ac_try='test -s conftest.$ac_objext'
6645   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6646   (eval $ac_try) 2>&5
6647   ac_status=$?
6648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6649   (exit $ac_status); }; }; then
6650   eval "$as_ac_Header=yes"
6651 else
6652   echo "$as_me: failed program was:" >&5
6653 sed 's/^/| /' conftest.$ac_ext >&5
6654
6655 eval "$as_ac_Header=no"
6656 fi
6657 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6658 fi
6659 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6660 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6661 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6662   cat >>confdefs.h <<_ACEOF
6663 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6664 _ACEOF
6665
6666 fi
6667
6668 done
6669
6670
6671
6672 for ac_header in dlfcn.h
6673 do
6674 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6675 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6676   echo "$as_me:$LINENO: checking for $ac_header" >&5
6677 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6678 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6679   echo $ECHO_N "(cached) $ECHO_C" >&6
6680 fi
6681 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6682 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6683 else
6684   # Is the header compilable?
6685 echo "$as_me:$LINENO: checking $ac_header usability" >&5
6686 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6687 cat >conftest.$ac_ext <<_ACEOF
6688 /* confdefs.h.  */
6689 _ACEOF
6690 cat confdefs.h >>conftest.$ac_ext
6691 cat >>conftest.$ac_ext <<_ACEOF
6692 /* end confdefs.h.  */
6693 $ac_includes_default
6694 #include <$ac_header>
6695 _ACEOF
6696 rm -f conftest.$ac_objext
6697 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6698   (eval $ac_compile) 2>conftest.er1
6699   ac_status=$?
6700   grep -v '^ *+' conftest.er1 >conftest.err
6701   rm -f conftest.er1
6702   cat conftest.err >&5
6703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6704   (exit $ac_status); } &&
6705          { ac_try='test -z "$ac_c_werror_flag"
6706                          || test ! -s conftest.err'
6707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6708   (eval $ac_try) 2>&5
6709   ac_status=$?
6710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6711   (exit $ac_status); }; } &&
6712          { ac_try='test -s conftest.$ac_objext'
6713   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6714   (eval $ac_try) 2>&5
6715   ac_status=$?
6716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6717   (exit $ac_status); }; }; then
6718   ac_header_compiler=yes
6719 else
6720   echo "$as_me: failed program was:" >&5
6721 sed 's/^/| /' conftest.$ac_ext >&5
6722
6723 ac_header_compiler=no
6724 fi
6725 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6726 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6727 echo "${ECHO_T}$ac_header_compiler" >&6
6728
6729 # Is the header present?
6730 echo "$as_me:$LINENO: checking $ac_header presence" >&5
6731 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6732 cat >conftest.$ac_ext <<_ACEOF
6733 /* confdefs.h.  */
6734 _ACEOF
6735 cat confdefs.h >>conftest.$ac_ext
6736 cat >>conftest.$ac_ext <<_ACEOF
6737 /* end confdefs.h.  */
6738 #include <$ac_header>
6739 _ACEOF
6740 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6741   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6742   ac_status=$?
6743   grep -v '^ *+' conftest.er1 >conftest.err
6744   rm -f conftest.er1
6745   cat conftest.err >&5
6746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6747   (exit $ac_status); } >/dev/null; then
6748   if test -s conftest.err; then
6749     ac_cpp_err=$ac_c_preproc_warn_flag
6750     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6751   else
6752     ac_cpp_err=
6753   fi
6754 else
6755   ac_cpp_err=yes
6756 fi
6757 if test -z "$ac_cpp_err"; then
6758   ac_header_preproc=yes
6759 else
6760   echo "$as_me: failed program was:" >&5
6761 sed 's/^/| /' conftest.$ac_ext >&5
6762
6763   ac_header_preproc=no
6764 fi
6765 rm -f conftest.err conftest.$ac_ext
6766 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6767 echo "${ECHO_T}$ac_header_preproc" >&6
6768
6769 # So?  What about this header?
6770 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6771   yes:no: )
6772     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6773 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6774     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6775 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6776     ac_header_preproc=yes
6777     ;;
6778   no:yes:* )
6779     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6780 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6781     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6782 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6783     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6784 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6785     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6786 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6787     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6788 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6789     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6790 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6791     (
6792       cat <<\_ASBOX
6793 ## --------------------------------------------- ##
6794 ## Report this to <http://www.openldap.org/its/> ##
6795 ## --------------------------------------------- ##
6796 _ASBOX
6797     ) |
6798       sed "s/^/$as_me: WARNING:     /" >&2
6799     ;;
6800 esac
6801 echo "$as_me:$LINENO: checking for $ac_header" >&5
6802 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6803 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6804   echo $ECHO_N "(cached) $ECHO_C" >&6
6805 else
6806   eval "$as_ac_Header=\$ac_header_preproc"
6807 fi
6808 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6809 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6810
6811 fi
6812 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6813   cat >>confdefs.h <<_ACEOF
6814 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6815 _ACEOF
6816
6817 fi
6818
6819 done
6820
6821
6822 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
6823
6824 # find the maximum length of command line arguments
6825 echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
6826 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
6827 if test "${lt_cv_sys_max_cmd_len+set}" = set; then
6828   echo $ECHO_N "(cached) $ECHO_C" >&6
6829 else
6830     i=0
6831   teststring="ABCD"
6832
6833   case $build_os in
6834   msdosdjgpp*)
6835     # On DJGPP, this test can blow up pretty badly due to problems in libc
6836     # (any single argument exceeding 2000 bytes causes a buffer overrun
6837     # during glob expansion).  Even if it were fixed, the result of this
6838     # check would be larger than it should be.
6839     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
6840     ;;
6841
6842   gnu*)
6843     # Under GNU Hurd, this test is not required because there is
6844     # no limit to the length of command line arguments.
6845     # Libtool will interpret -1 as no limit whatsoever
6846     lt_cv_sys_max_cmd_len=-1;
6847     ;;
6848
6849   cygwin* | mingw*)
6850     # On Win9x/ME, this test blows up -- it succeeds, but takes
6851     # about 5 minutes as the teststring grows exponentially.
6852     # Worse, since 9x/ME are not pre-emptively multitasking,
6853     # you end up with a "frozen" computer, even though with patience
6854     # the test eventually succeeds (with a max line length of 256k).
6855     # Instead, let's just punt: use the minimum linelength reported by
6856     # all of the supported platforms: 8192 (on NT/2K/XP).
6857     lt_cv_sys_max_cmd_len=8192;
6858     ;;
6859
6860   amigaos*)
6861     # On AmigaOS with pdksh, this test takes hours, literally.
6862     # So we just punt and use a minimum line length of 8192.
6863     lt_cv_sys_max_cmd_len=8192;
6864     ;;
6865
6866   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
6867     # This has been around since 386BSD, at least.  Likely further.
6868     if test -x /sbin/sysctl; then
6869       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
6870     elif test -x /usr/sbin/sysctl; then
6871       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
6872     else
6873       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
6874     fi
6875     # And add a safety zone
6876     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6877     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6878     ;;
6879   osf*)
6880     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
6881     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
6882     # nice to cause kernel panics so lets avoid the loop below.
6883     # First set a reasonable default.
6884     lt_cv_sys_max_cmd_len=16384
6885     #
6886     if test -x /sbin/sysconfig; then
6887       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
6888         *1*) lt_cv_sys_max_cmd_len=-1 ;;
6889       esac
6890     fi
6891     ;;
6892   *)
6893     # If test is not a shell built-in, we'll probably end up computing a
6894     # maximum length that is only half of the actual maximum length, but
6895     # we can't tell.
6896     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
6897     while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
6898                = "XX$teststring") >/dev/null 2>&1 &&
6899             new_result=`expr "X$teststring" : ".*" 2>&1` &&
6900             lt_cv_sys_max_cmd_len=$new_result &&
6901             test $i != 17 # 1/2 MB should be enough
6902     do
6903       i=`expr $i + 1`
6904       teststring=$teststring$teststring
6905     done
6906     teststring=
6907     # Add a significant safety factor because C++ compilers can tack on massive
6908     # amounts of additional arguments before passing them to the linker.
6909     # It appears as though 1/2 is a usable value.
6910     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6911     ;;
6912   esac
6913
6914 fi
6915
6916 if test -n $lt_cv_sys_max_cmd_len ; then
6917   echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
6918 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
6919 else
6920   echo "$as_me:$LINENO: result: none" >&5
6921 echo "${ECHO_T}none" >&6
6922 fi
6923
6924
6925
6926
6927 # Check for command to grab the raw symbol name followed by C symbol from nm.
6928 echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
6929 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
6930 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
6931   echo $ECHO_N "(cached) $ECHO_C" >&6
6932 else
6933
6934 # These are sane defaults that work on at least a few old systems.
6935 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
6936
6937 # Character class describing NM global symbol codes.
6938 symcode='[BCDEGRST]'
6939
6940 # Regexp to match symbols that can be accessed directly from C.
6941 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
6942
6943 # Transform an extracted symbol line into a proper C declaration
6944 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6945
6946 # Transform an extracted symbol line into symbol name and symbol address
6947 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'"
6948
6949 # Define system-specific variables.
6950 case $host_os in
6951 aix*)
6952   symcode='[BCDT]'
6953   ;;
6954 cygwin* | mingw* | pw32*)
6955   symcode='[ABCDGISTW]'
6956   ;;
6957 hpux*) # Its linker distinguishes data from code symbols
6958   if test "$host_cpu" = ia64; then
6959     symcode='[ABCDEGRST]'
6960   fi
6961   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6962   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'"
6963   ;;
6964 linux*)
6965   if test "$host_cpu" = ia64; then
6966     symcode='[ABCDGIRSTW]'
6967     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6968     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'"
6969   fi
6970   ;;
6971 irix* | nonstopux*)
6972   symcode='[BCDEGRST]'
6973   ;;
6974 osf*)
6975   symcode='[BCDEGQRST]'
6976   ;;
6977 solaris* | sysv5*)
6978   symcode='[BDRT]'
6979   ;;
6980 sysv4)
6981   symcode='[DFNSTU]'
6982   ;;
6983 esac
6984
6985 # Handle CRLF in mingw tool chain
6986 opt_cr=
6987 case $build_os in
6988 mingw*)
6989   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6990   ;;
6991 esac
6992
6993 # If we're using GNU nm, then use its standard symbol codes.
6994 case `$NM -V 2>&1` in
6995 *GNU* | *'with BFD'*)
6996   symcode='[ABCDGIRSTW]' ;;
6997 esac
6998
6999 # Try without a prefix undercore, then with it.
7000 for ac_symprfx in "" "_"; do
7001
7002   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7003   symxfrm="\\1 $ac_symprfx\\2 \\2"
7004
7005   # Write the raw and C identifiers.
7006   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[       ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7007
7008   # Check to see that the pipe works correctly.
7009   pipe_works=no
7010
7011   rm -f conftest*
7012   cat > conftest.$ac_ext <<EOF
7013 #ifdef __cplusplus
7014 extern "C" {
7015 #endif
7016 char nm_test_var;
7017 void nm_test_func(){}
7018 #ifdef __cplusplus
7019 }
7020 #endif
7021 int main(){nm_test_var='a';nm_test_func();return(0);}
7022 EOF
7023
7024   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7025   (eval $ac_compile) 2>&5
7026   ac_status=$?
7027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7028   (exit $ac_status); }; then
7029     # Now try to grab the symbols.
7030     nlist=conftest.nm
7031     if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
7032   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
7033   ac_status=$?
7034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7035   (exit $ac_status); } && test -s "$nlist"; then
7036       # Try sorting and uniquifying the output.
7037       if sort "$nlist" | uniq > "$nlist"T; then
7038         mv -f "$nlist"T "$nlist"
7039       else
7040         rm -f "$nlist"T
7041       fi
7042
7043       # Make sure that we snagged all the symbols we need.
7044       if grep ' nm_test_var$' "$nlist" >/dev/null; then
7045         if grep ' nm_test_func$' "$nlist" >/dev/null; then
7046           cat <<EOF > conftest.$ac_ext
7047 #ifdef __cplusplus
7048 extern "C" {
7049 #endif
7050
7051 EOF
7052           # Now generate the symbol file.
7053           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
7054
7055           cat <<EOF >> conftest.$ac_ext
7056 #if defined (__STDC__) && __STDC__
7057 # define lt_ptr_t void *
7058 #else
7059 # define lt_ptr_t char *
7060 # define const
7061 #endif
7062
7063 /* The mapping between symbol names and symbols. */
7064 const struct {
7065   const char *name;
7066   lt_ptr_t address;
7067 }
7068 lt_preloaded_symbols[] =
7069 {
7070 EOF
7071           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
7072           cat <<\EOF >> conftest.$ac_ext
7073   {0, (lt_ptr_t) 0}
7074 };
7075
7076 #ifdef __cplusplus
7077 }
7078 #endif
7079 EOF
7080           # Now try linking the two files.
7081           mv conftest.$ac_objext conftstm.$ac_objext
7082           lt_save_LIBS="$LIBS"
7083           lt_save_CFLAGS="$CFLAGS"
7084           LIBS="conftstm.$ac_objext"
7085           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7086           if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7087   (eval $ac_link) 2>&5
7088   ac_status=$?
7089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7090   (exit $ac_status); } && test -s conftest${ac_exeext}; then
7091             pipe_works=yes
7092           fi
7093           LIBS="$lt_save_LIBS"
7094           CFLAGS="$lt_save_CFLAGS"
7095         else
7096           echo "cannot find nm_test_func in $nlist" >&5
7097         fi
7098       else
7099         echo "cannot find nm_test_var in $nlist" >&5
7100       fi
7101     else
7102       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7103     fi
7104   else
7105     echo "$progname: failed program was:" >&5
7106     cat conftest.$ac_ext >&5
7107   fi
7108   rm -f conftest* conftst*
7109
7110   # Do not use the global_symbol_pipe unless it works.
7111   if test "$pipe_works" = yes; then
7112     break
7113   else
7114     lt_cv_sys_global_symbol_pipe=
7115   fi
7116 done
7117
7118 fi
7119
7120 if test -z "$lt_cv_sys_global_symbol_pipe"; then
7121   lt_cv_sys_global_symbol_to_cdecl=
7122 fi
7123 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7124   echo "$as_me:$LINENO: result: failed" >&5
7125 echo "${ECHO_T}failed" >&6
7126 else
7127   echo "$as_me:$LINENO: result: ok" >&5
7128 echo "${ECHO_T}ok" >&6
7129 fi
7130
7131 echo "$as_me:$LINENO: checking for objdir" >&5
7132 echo $ECHO_N "checking for objdir... $ECHO_C" >&6
7133 if test "${lt_cv_objdir+set}" = set; then
7134   echo $ECHO_N "(cached) $ECHO_C" >&6
7135 else
7136   rm -f .libs 2>/dev/null
7137 mkdir .libs 2>/dev/null
7138 if test -d .libs; then
7139   lt_cv_objdir=.libs
7140 else
7141   # MS-DOS does not allow filenames that begin with a dot.
7142   lt_cv_objdir=_libs
7143 fi
7144 rmdir .libs 2>/dev/null
7145 fi
7146 echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
7147 echo "${ECHO_T}$lt_cv_objdir" >&6
7148 objdir=$lt_cv_objdir
7149
7150
7151
7152
7153
7154 case $host_os in
7155 aix3*)
7156   # AIX sometimes has problems with the GCC collect2 program.  For some
7157   # reason, if we set the COLLECT_NAMES environment variable, the problems
7158   # vanish in a puff of smoke.
7159   if test "X${COLLECT_NAMES+set}" != Xset; then
7160     COLLECT_NAMES=
7161     export COLLECT_NAMES
7162   fi
7163   ;;
7164 esac
7165
7166 # Sed substitution that helps us do robust quoting.  It backslashifies
7167 # metacharacters that are still active within double-quoted strings.
7168 Xsed='sed -e 1s/^X//'
7169 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
7170
7171 # Same as above, but do not quote variable references.
7172 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
7173
7174 # Sed substitution to delay expansion of an escaped shell variable in a
7175 # double_quote_subst'ed string.
7176 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7177
7178 # Sed substitution to avoid accidental globbing in evaled expressions
7179 no_glob_subst='s/\*/\\\*/g'
7180
7181 # Constants:
7182 rm="rm -f"
7183
7184 # Global variables:
7185 default_ofile=libtool
7186 can_build_shared=yes
7187
7188 # All known linkers require a `.a' archive for static linking (except MSVC,
7189 # which needs '.lib').
7190 libext=a
7191 ltmain="$ac_aux_dir/ltmain.sh"
7192 ofile="$default_ofile"
7193 with_gnu_ld="$lt_cv_prog_gnu_ld"
7194
7195 if test -n "$ac_tool_prefix"; then
7196   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7197 set dummy ${ac_tool_prefix}ar; ac_word=$2
7198 echo "$as_me:$LINENO: checking for $ac_word" >&5
7199 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7200 if test "${ac_cv_prog_AR+set}" = set; then
7201   echo $ECHO_N "(cached) $ECHO_C" >&6
7202 else
7203   if test -n "$AR"; then
7204   ac_cv_prog_AR="$AR" # Let the user override the test.
7205 else
7206 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7207 for as_dir in $PATH
7208 do
7209   IFS=$as_save_IFS
7210   test -z "$as_dir" && as_dir=.
7211   for ac_exec_ext in '' $ac_executable_extensions; do
7212   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7213     ac_cv_prog_AR="${ac_tool_prefix}ar"
7214     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7215     break 2
7216   fi
7217 done
7218 done
7219
7220 fi
7221 fi
7222 AR=$ac_cv_prog_AR
7223 if test -n "$AR"; then
7224   echo "$as_me:$LINENO: result: $AR" >&5
7225 echo "${ECHO_T}$AR" >&6
7226 else
7227   echo "$as_me:$LINENO: result: no" >&5
7228 echo "${ECHO_T}no" >&6
7229 fi
7230
7231 fi
7232 if test -z "$ac_cv_prog_AR"; then
7233   ac_ct_AR=$AR
7234   # Extract the first word of "ar", so it can be a program name with args.
7235 set dummy ar; ac_word=$2
7236 echo "$as_me:$LINENO: checking for $ac_word" >&5
7237 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7238 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
7239   echo $ECHO_N "(cached) $ECHO_C" >&6
7240 else
7241   if test -n "$ac_ct_AR"; then
7242   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7243 else
7244 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7245 for as_dir in $PATH
7246 do
7247   IFS=$as_save_IFS
7248   test -z "$as_dir" && as_dir=.
7249   for ac_exec_ext in '' $ac_executable_extensions; do
7250   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7251     ac_cv_prog_ac_ct_AR="ar"
7252     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7253     break 2
7254   fi
7255 done
7256 done
7257
7258   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
7259 fi
7260 fi
7261 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7262 if test -n "$ac_ct_AR"; then
7263   echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
7264 echo "${ECHO_T}$ac_ct_AR" >&6
7265 else
7266   echo "$as_me:$LINENO: result: no" >&5
7267 echo "${ECHO_T}no" >&6
7268 fi
7269
7270   AR=$ac_ct_AR
7271 else
7272   AR="$ac_cv_prog_AR"
7273 fi
7274
7275 if test -n "$ac_tool_prefix"; then
7276   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7277 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7278 echo "$as_me:$LINENO: checking for $ac_word" >&5
7279 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7280 if test "${ac_cv_prog_RANLIB+set}" = set; then
7281   echo $ECHO_N "(cached) $ECHO_C" >&6
7282 else
7283   if test -n "$RANLIB"; then
7284   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7285 else
7286 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7287 for as_dir in $PATH
7288 do
7289   IFS=$as_save_IFS
7290   test -z "$as_dir" && as_dir=.
7291   for ac_exec_ext in '' $ac_executable_extensions; do
7292   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7293     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7294     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7295     break 2
7296   fi
7297 done
7298 done
7299
7300 fi
7301 fi
7302 RANLIB=$ac_cv_prog_RANLIB
7303 if test -n "$RANLIB"; then
7304   echo "$as_me:$LINENO: result: $RANLIB" >&5
7305 echo "${ECHO_T}$RANLIB" >&6
7306 else
7307   echo "$as_me:$LINENO: result: no" >&5
7308 echo "${ECHO_T}no" >&6
7309 fi
7310
7311 fi
7312 if test -z "$ac_cv_prog_RANLIB"; then
7313   ac_ct_RANLIB=$RANLIB
7314   # Extract the first word of "ranlib", so it can be a program name with args.
7315 set dummy ranlib; ac_word=$2
7316 echo "$as_me:$LINENO: checking for $ac_word" >&5
7317 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7318 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7319   echo $ECHO_N "(cached) $ECHO_C" >&6
7320 else
7321   if test -n "$ac_ct_RANLIB"; then
7322   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7323 else
7324 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7325 for as_dir in $PATH
7326 do
7327   IFS=$as_save_IFS
7328   test -z "$as_dir" && as_dir=.
7329   for ac_exec_ext in '' $ac_executable_extensions; do
7330   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7331     ac_cv_prog_ac_ct_RANLIB="ranlib"
7332     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7333     break 2
7334   fi
7335 done
7336 done
7337
7338   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7339 fi
7340 fi
7341 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7342 if test -n "$ac_ct_RANLIB"; then
7343   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7344 echo "${ECHO_T}$ac_ct_RANLIB" >&6
7345 else
7346   echo "$as_me:$LINENO: result: no" >&5
7347 echo "${ECHO_T}no" >&6
7348 fi
7349
7350   RANLIB=$ac_ct_RANLIB
7351 else
7352   RANLIB="$ac_cv_prog_RANLIB"
7353 fi
7354
7355 if test -n "$ac_tool_prefix"; then
7356   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7357 set dummy ${ac_tool_prefix}strip; ac_word=$2
7358 echo "$as_me:$LINENO: checking for $ac_word" >&5
7359 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7360 if test "${ac_cv_prog_STRIP+set}" = set; then
7361   echo $ECHO_N "(cached) $ECHO_C" >&6
7362 else
7363   if test -n "$STRIP"; then
7364   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7365 else
7366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7367 for as_dir in $PATH
7368 do
7369   IFS=$as_save_IFS
7370   test -z "$as_dir" && as_dir=.
7371   for ac_exec_ext in '' $ac_executable_extensions; do
7372   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7373     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7374     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7375     break 2
7376   fi
7377 done
7378 done
7379
7380 fi
7381 fi
7382 STRIP=$ac_cv_prog_STRIP
7383 if test -n "$STRIP"; then
7384   echo "$as_me:$LINENO: result: $STRIP" >&5
7385 echo "${ECHO_T}$STRIP" >&6
7386 else
7387   echo "$as_me:$LINENO: result: no" >&5
7388 echo "${ECHO_T}no" >&6
7389 fi
7390
7391 fi
7392 if test -z "$ac_cv_prog_STRIP"; then
7393   ac_ct_STRIP=$STRIP
7394   # Extract the first word of "strip", so it can be a program name with args.
7395 set dummy strip; ac_word=$2
7396 echo "$as_me:$LINENO: checking for $ac_word" >&5
7397 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7398 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
7399   echo $ECHO_N "(cached) $ECHO_C" >&6
7400 else
7401   if test -n "$ac_ct_STRIP"; then
7402   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7403 else
7404 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7405 for as_dir in $PATH
7406 do
7407   IFS=$as_save_IFS
7408   test -z "$as_dir" && as_dir=.
7409   for ac_exec_ext in '' $ac_executable_extensions; do
7410   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7411     ac_cv_prog_ac_ct_STRIP="strip"
7412     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7413     break 2
7414   fi
7415 done
7416 done
7417
7418   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
7419 fi
7420 fi
7421 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7422 if test -n "$ac_ct_STRIP"; then
7423   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
7424 echo "${ECHO_T}$ac_ct_STRIP" >&6
7425 else
7426   echo "$as_me:$LINENO: result: no" >&5
7427 echo "${ECHO_T}no" >&6
7428 fi
7429
7430   STRIP=$ac_ct_STRIP
7431 else
7432   STRIP="$ac_cv_prog_STRIP"
7433 fi
7434
7435
7436 old_CC="$CC"
7437 old_CFLAGS="$CFLAGS"
7438
7439 # Set sane defaults for various variables
7440 test -z "$AR" && AR=ar
7441 test -z "$AR_FLAGS" && AR_FLAGS=cru
7442 test -z "$AS" && AS=as
7443 test -z "$CC" && CC=cc
7444 test -z "$LTCC" && LTCC=$CC
7445 test -z "$DLLTOOL" && DLLTOOL=dlltool
7446 test -z "$LD" && LD=ld
7447 test -z "$LN_S" && LN_S="ln -s"
7448 test -z "$MAGIC_CMD" && MAGIC_CMD=file
7449 test -z "$NM" && NM=nm
7450 test -z "$SED" && SED=sed
7451 test -z "$OBJDUMP" && OBJDUMP=objdump
7452 test -z "$RANLIB" && RANLIB=:
7453 test -z "$STRIP" && STRIP=:
7454 test -z "$ac_objext" && ac_objext=o
7455
7456 # Determine commands to create old-style static archives.
7457 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
7458 old_postinstall_cmds='chmod 644 $oldlib'
7459 old_postuninstall_cmds=
7460
7461 if test -n "$RANLIB"; then
7462   case $host_os in
7463   openbsd*)
7464     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
7465     ;;
7466   *)
7467     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
7468     ;;
7469   esac
7470   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
7471 fi
7472
7473 for cc_temp in $compiler""; do
7474   case $cc_temp in
7475     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
7476     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
7477     \-*) ;;
7478     *) break;;
7479   esac
7480 done
7481 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
7482
7483
7484 # Only perform the check for file, if the check method requires it
7485 case $deplibs_check_method in
7486 file_magic*)
7487   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
7488     echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
7489 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
7490 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
7491   echo $ECHO_N "(cached) $ECHO_C" >&6
7492 else
7493   case $MAGIC_CMD in
7494 [\\/*] |  ?:[\\/]*)
7495   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7496   ;;
7497 *)
7498   lt_save_MAGIC_CMD="$MAGIC_CMD"
7499   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7500   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7501   for ac_dir in $ac_dummy; do
7502     IFS="$lt_save_ifs"
7503     test -z "$ac_dir" && ac_dir=.
7504     if test -f $ac_dir/${ac_tool_prefix}file; then
7505       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
7506       if test -n "$file_magic_test_file"; then
7507         case $deplibs_check_method in
7508         "file_magic "*)
7509           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7510           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7511           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7512             $EGREP "$file_magic_regex" > /dev/null; then
7513             :
7514           else
7515             cat <<EOF 1>&2
7516
7517 *** Warning: the command libtool uses to detect shared libraries,
7518 *** $file_magic_cmd, produces output that libtool cannot recognize.
7519 *** The result is that libtool may fail to recognize shared libraries
7520 *** as such.  This will affect the creation of libtool libraries that
7521 *** depend on shared libraries, but programs linked with such libtool
7522 *** libraries will work regardless of this problem.  Nevertheless, you
7523 *** may want to report the problem to your system manager and/or to
7524 *** bug-libtool@gnu.org
7525
7526 EOF
7527           fi ;;
7528         esac
7529       fi
7530       break
7531     fi
7532   done
7533   IFS="$lt_save_ifs"
7534   MAGIC_CMD="$lt_save_MAGIC_CMD"
7535   ;;
7536 esac
7537 fi
7538
7539 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7540 if test -n "$MAGIC_CMD"; then
7541   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
7542 echo "${ECHO_T}$MAGIC_CMD" >&6
7543 else
7544   echo "$as_me:$LINENO: result: no" >&5
7545 echo "${ECHO_T}no" >&6
7546 fi
7547
7548 if test -z "$lt_cv_path_MAGIC_CMD"; then
7549   if test -n "$ac_tool_prefix"; then
7550     echo "$as_me:$LINENO: checking for file" >&5
7551 echo $ECHO_N "checking for file... $ECHO_C" >&6
7552 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
7553   echo $ECHO_N "(cached) $ECHO_C" >&6
7554 else
7555   case $MAGIC_CMD in
7556 [\\/*] |  ?:[\\/]*)
7557   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7558   ;;
7559 *)
7560   lt_save_MAGIC_CMD="$MAGIC_CMD"
7561   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7562   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7563   for ac_dir in $ac_dummy; do
7564     IFS="$lt_save_ifs"
7565     test -z "$ac_dir" && ac_dir=.
7566     if test -f $ac_dir/file; then
7567       lt_cv_path_MAGIC_CMD="$ac_dir/file"
7568       if test -n "$file_magic_test_file"; then
7569         case $deplibs_check_method in
7570         "file_magic "*)
7571           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7572           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7573           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7574             $EGREP "$file_magic_regex" > /dev/null; then
7575             :
7576           else
7577             cat <<EOF 1>&2
7578
7579 *** Warning: the command libtool uses to detect shared libraries,
7580 *** $file_magic_cmd, produces output that libtool cannot recognize.
7581 *** The result is that libtool may fail to recognize shared libraries
7582 *** as such.  This will affect the creation of libtool libraries that
7583 *** depend on shared libraries, but programs linked with such libtool
7584 *** libraries will work regardless of this problem.  Nevertheless, you
7585 *** may want to report the problem to your system manager and/or to
7586 *** bug-libtool@gnu.org
7587
7588 EOF
7589           fi ;;
7590         esac
7591       fi
7592       break
7593     fi
7594   done
7595   IFS="$lt_save_ifs"
7596   MAGIC_CMD="$lt_save_MAGIC_CMD"
7597   ;;
7598 esac
7599 fi
7600
7601 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7602 if test -n "$MAGIC_CMD"; then
7603   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
7604 echo "${ECHO_T}$MAGIC_CMD" >&6
7605 else
7606   echo "$as_me:$LINENO: result: no" >&5
7607 echo "${ECHO_T}no" >&6
7608 fi
7609
7610   else
7611     MAGIC_CMD=:
7612   fi
7613 fi
7614
7615   fi
7616   ;;
7617 esac
7618
7619 enable_dlopen=yes
7620 enable_win32_dll=yes
7621
7622 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
7623 if test "${enable_libtool_lock+set}" = set; then
7624   enableval="$enable_libtool_lock"
7625
7626 fi;
7627 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
7628
7629
7630 # Check whether --with-pic or --without-pic was given.
7631 if test "${with_pic+set}" = set; then
7632   withval="$with_pic"
7633   pic_mode="$withval"
7634 else
7635   pic_mode=default
7636 fi;
7637 test -z "$pic_mode" && pic_mode=default
7638
7639 # Use C for the default configuration in the libtool script
7640 tagname=
7641 lt_save_CC="$CC"
7642 ac_ext=c
7643 ac_cpp='$CPP $CPPFLAGS'
7644 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7645 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7646 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7647
7648
7649 # Source file extension for C test sources.
7650 ac_ext=c
7651
7652 # Object file extension for compiled C test sources.
7653 objext=o
7654 objext=$objext
7655
7656 # Code to be used in simple compile tests
7657 lt_simple_compile_test_code="int some_variable = 0;\n"
7658
7659 # Code to be used in simple link tests
7660 lt_simple_link_test_code='int main(){return(0);}\n'
7661
7662
7663 # If no C compiler was specified, use CC.
7664 LTCC=${LTCC-"$CC"}
7665
7666 # Allow CC to be a program name with arguments.
7667 compiler=$CC
7668
7669
7670 # save warnings/boilerplate of simple test code
7671 ac_outfile=conftest.$ac_objext
7672 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
7673 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
7674 _lt_compiler_boilerplate=`cat conftest.err`
7675 $rm conftest*
7676
7677 ac_outfile=conftest.$ac_objext
7678 printf "$lt_simple_link_test_code" >conftest.$ac_ext
7679 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
7680 _lt_linker_boilerplate=`cat conftest.err`
7681 $rm conftest*
7682
7683
7684 #
7685 # Check for any special shared library compilation flags.
7686 #
7687 lt_prog_cc_shlib=
7688 if test "$GCC" = no; then
7689   case $host_os in
7690   sco3.2v5*)
7691     lt_prog_cc_shlib='-belf'
7692     ;;
7693   esac
7694 fi
7695 if test -n "$lt_prog_cc_shlib"; then
7696   { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
7697 echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
7698   if echo "$old_CC $old_CFLAGS " | grep "[      ]$lt_prog_cc_shlib[     ]" >/dev/null; then :
7699   else
7700     { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
7701 echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
7702     lt_cv_prog_cc_can_build_shared=no
7703   fi
7704 fi
7705
7706
7707 #
7708 # Check to make sure the static flag actually works.
7709 #
7710 echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5
7711 echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6
7712 if test "${lt_prog_compiler_static_works+set}" = set; then
7713   echo $ECHO_N "(cached) $ECHO_C" >&6
7714 else
7715   lt_prog_compiler_static_works=no
7716    save_LDFLAGS="$LDFLAGS"
7717    LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
7718    printf "$lt_simple_link_test_code" > conftest.$ac_ext
7719    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
7720      # The linker can only warn and ignore the option if not recognized
7721      # So say no if there are warnings
7722      if test -s conftest.err; then
7723        # Append any errors to the config.log.
7724        cat conftest.err 1>&5
7725        $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
7726        $SED '/^$/d' conftest.err >conftest.er2
7727        if diff conftest.exp conftest.er2 >/dev/null; then
7728          lt_prog_compiler_static_works=yes
7729        fi
7730      else
7731        lt_prog_compiler_static_works=yes
7732      fi
7733    fi
7734    $rm conftest*
7735    LDFLAGS="$save_LDFLAGS"
7736
7737 fi
7738 echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
7739 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
7740
7741 if test x"$lt_prog_compiler_static_works" = xyes; then
7742     :
7743 else
7744     lt_prog_compiler_static=
7745 fi
7746
7747
7748
7749
7750 lt_prog_compiler_no_builtin_flag=
7751
7752 if test "$GCC" = yes; then
7753   lt_prog_compiler_no_builtin_flag=' -fno-builtin'
7754
7755
7756 echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
7757 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
7758 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
7759   echo $ECHO_N "(cached) $ECHO_C" >&6
7760 else
7761   lt_cv_prog_compiler_rtti_exceptions=no
7762   ac_outfile=conftest.$ac_objext
7763    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7764    lt_compiler_flag="-fno-rtti -fno-exceptions"
7765    # Insert the option either (1) after the last *FLAGS variable, or
7766    # (2) before a word containing "conftest.", or (3) at the end.
7767    # Note that $ac_compile itself does not contain backslashes and begins
7768    # with a dollar sign (not a hyphen), so the echo should work correctly.
7769    # The option is referenced via a variable to avoid confusing sed.
7770    lt_compile=`echo "$ac_compile" | $SED \
7771    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7772    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7773    -e 's:$: $lt_compiler_flag:'`
7774    (eval echo "\"\$as_me:7774: $lt_compile\"" >&5)
7775    (eval "$lt_compile" 2>conftest.err)
7776    ac_status=$?
7777    cat conftest.err >&5
7778    echo "$as_me:7778: \$? = $ac_status" >&5
7779    if (exit $ac_status) && test -s "$ac_outfile"; then
7780      # The compiler can only warn and ignore the option if not recognized
7781      # So say no if there are warnings other than the usual output.
7782      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
7783      $SED '/^$/d' conftest.err >conftest.er2
7784      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
7785        lt_cv_prog_compiler_rtti_exceptions=yes
7786      fi
7787    fi
7788    $rm conftest*
7789
7790 fi
7791 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
7792 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
7793
7794 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
7795     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
7796 else
7797     :
7798 fi
7799
7800 fi
7801
7802 lt_prog_compiler_wl=
7803 lt_prog_compiler_pic=
7804 lt_prog_compiler_static=
7805
7806 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
7807 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
7808
7809   if test "$GCC" = yes; then
7810     lt_prog_compiler_wl='-Wl,'
7811     lt_prog_compiler_static='-static'
7812
7813     case $host_os in
7814       aix*)
7815       # All AIX code is PIC.
7816       if test "$host_cpu" = ia64; then
7817         # AIX 5 now supports IA64 processor
7818         lt_prog_compiler_static='-Bstatic'
7819       fi
7820       ;;
7821
7822     amigaos*)
7823       # FIXME: we need at least 68020 code to build shared libraries, but
7824       # adding the `-m68020' flag to GCC prevents building anything better,
7825       # like `-m68040'.
7826       lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
7827       ;;
7828
7829     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7830       # PIC is the default for these OSes.
7831       ;;
7832
7833     mingw* | pw32* | os2*)
7834       # This hack is so that the source file can tell whether it is being
7835       # built for inclusion in a dll (and should export symbols for example).
7836       lt_prog_compiler_pic='-DDLL_EXPORT'
7837       ;;
7838
7839     darwin* | rhapsody*)
7840       # PIC is the default on this platform
7841       # Common symbols not allowed in MH_DYLIB files
7842       lt_prog_compiler_pic='-fno-common'
7843       ;;
7844
7845     msdosdjgpp*)
7846       # Just because we use GCC doesn't mean we suddenly get shared libraries
7847       # on systems that don't support them.
7848       lt_prog_compiler_can_build_shared=no
7849       enable_shared=no
7850       ;;
7851
7852     sysv4*MP*)
7853       if test -d /usr/nec; then
7854         lt_prog_compiler_pic=-Kconform_pic
7855       fi
7856       ;;
7857
7858     hpux*)
7859       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7860       # not for PA HP-UX.
7861       case $host_cpu in
7862       hppa*64*|ia64*)
7863         # +Z the default
7864         ;;
7865       *)
7866         lt_prog_compiler_pic='-fPIC'
7867         ;;
7868       esac
7869       ;;
7870
7871     *)
7872       lt_prog_compiler_pic='-fPIC'
7873       ;;
7874     esac
7875   else
7876     # PORTME Check for flag to pass linker flags through the system compiler.
7877     case $host_os in
7878     aix*)
7879       lt_prog_compiler_wl='-Wl,'
7880       if test "$host_cpu" = ia64; then
7881         # AIX 5 now supports IA64 processor
7882         lt_prog_compiler_static='-Bstatic'
7883       else
7884         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
7885       fi
7886       ;;
7887       darwin*)
7888         # PIC is the default on this platform
7889         # Common symbols not allowed in MH_DYLIB files
7890        case $cc_basename in
7891          xlc*)
7892          lt_prog_compiler_pic='-qnocommon'
7893          lt_prog_compiler_wl='-Wl,'
7894          ;;
7895        esac
7896        ;;
7897
7898     mingw* | pw32* | os2*)
7899       # This hack is so that the source file can tell whether it is being
7900       # built for inclusion in a dll (and should export symbols for example).
7901       lt_prog_compiler_pic='-DDLL_EXPORT'
7902       ;;
7903
7904     hpux9* | hpux10* | hpux11*)
7905       lt_prog_compiler_wl='-Wl,'
7906       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7907       # not for PA HP-UX.
7908       case $host_cpu in
7909       hppa*64*|ia64*)
7910         # +Z the default
7911         ;;
7912       *)
7913         lt_prog_compiler_pic='+Z'
7914         ;;
7915       esac
7916       # Is there a better lt_prog_compiler_static that works with the bundled CC?
7917       lt_prog_compiler_static='${wl}-a ${wl}archive'
7918       ;;
7919
7920     irix5* | irix6* | nonstopux*)
7921       lt_prog_compiler_wl='-Wl,'
7922       # PIC (with -KPIC) is the default.
7923       lt_prog_compiler_static='-non_shared'
7924       ;;
7925
7926     newsos6)
7927       lt_prog_compiler_pic='-KPIC'
7928       lt_prog_compiler_static='-Bstatic'
7929       ;;
7930
7931     linux*)
7932       case $cc_basename in
7933       icc* | ecc*)
7934         lt_prog_compiler_wl='-Wl,'
7935         lt_prog_compiler_pic='-KPIC'
7936         lt_prog_compiler_static='-static'
7937         ;;
7938       pgcc* | pgf77* | pgf90* | pgf95*)
7939         # Portland Group compilers (*not* the Pentium gcc compiler,
7940         # which looks to be a dead project)
7941         lt_prog_compiler_wl='-Wl,'
7942         lt_prog_compiler_pic='-fpic'
7943         lt_prog_compiler_static='-Bstatic'
7944         ;;
7945       ccc*)
7946         lt_prog_compiler_wl='-Wl,'
7947         # All Alpha code is PIC.
7948         lt_prog_compiler_static='-non_shared'
7949         ;;
7950       esac
7951       ;;
7952
7953     osf3* | osf4* | osf5*)
7954       lt_prog_compiler_wl='-Wl,'
7955       # All OSF/1 code is PIC.
7956       lt_prog_compiler_static='-non_shared'
7957       ;;
7958
7959     sco3.2v5*)
7960       lt_prog_compiler_pic='-Kpic'
7961       lt_prog_compiler_static='-dn'
7962       ;;
7963
7964     solaris*)
7965       lt_prog_compiler_pic='-KPIC'
7966       lt_prog_compiler_static='-Bstatic'
7967       case $cc_basename in
7968       f77* | f90* | f95*)
7969         lt_prog_compiler_wl='-Qoption ld ';;
7970       *)
7971         lt_prog_compiler_wl='-Wl,';;
7972       esac
7973       ;;
7974
7975     sunos4*)
7976       lt_prog_compiler_wl='-Qoption ld '
7977       lt_prog_compiler_pic='-PIC'
7978       lt_prog_compiler_static='-Bstatic'
7979       ;;
7980
7981     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7982       lt_prog_compiler_wl='-Wl,'
7983       lt_prog_compiler_pic='-KPIC'
7984       lt_prog_compiler_static='-Bstatic'
7985       ;;
7986
7987     sysv4*MP*)
7988       if test -d /usr/nec ;then
7989         lt_prog_compiler_pic='-Kconform_pic'
7990         lt_prog_compiler_static='-Bstatic'
7991       fi
7992       ;;
7993
7994     unicos*)
7995       lt_prog_compiler_wl='-Wl,'
7996       lt_prog_compiler_can_build_shared=no
7997       ;;
7998
7999     uts4*)
8000       lt_prog_compiler_pic='-pic'
8001       lt_prog_compiler_static='-Bstatic'
8002       ;;
8003
8004     *)
8005       lt_prog_compiler_can_build_shared=no
8006       ;;
8007     esac
8008   fi
8009
8010 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
8011 echo "${ECHO_T}$lt_prog_compiler_pic" >&6
8012
8013 #
8014 # Check to make sure the PIC flag actually works.
8015 #
8016 if test -n "$lt_prog_compiler_pic"; then
8017
8018 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
8019 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
8020 if test "${lt_prog_compiler_pic_works+set}" = set; then
8021   echo $ECHO_N "(cached) $ECHO_C" >&6
8022 else
8023   lt_prog_compiler_pic_works=no
8024   ac_outfile=conftest.$ac_objext
8025    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8026    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
8027    # Insert the option either (1) after the last *FLAGS variable, or
8028    # (2) before a word containing "conftest.", or (3) at the end.
8029    # Note that $ac_compile itself does not contain backslashes and begins
8030    # with a dollar sign (not a hyphen), so the echo should work correctly.
8031    # The option is referenced via a variable to avoid confusing sed.
8032    lt_compile=`echo "$ac_compile" | $SED \
8033    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8034    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8035    -e 's:$: $lt_compiler_flag:'`
8036    (eval echo "\"\$as_me:8036: $lt_compile\"" >&5)
8037    (eval "$lt_compile" 2>conftest.err)
8038    ac_status=$?
8039    cat conftest.err >&5
8040    echo "$as_me:8040: \$? = $ac_status" >&5
8041    if (exit $ac_status) && test -s "$ac_outfile"; then
8042      # The compiler can only warn and ignore the option if not recognized
8043      # So say no if there are warnings other than the usual output.
8044      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
8045      $SED '/^$/d' conftest.err >conftest.er2
8046      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
8047        lt_prog_compiler_pic_works=yes
8048      fi
8049    fi
8050    $rm conftest*
8051
8052 fi
8053 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
8054 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
8055
8056 if test x"$lt_prog_compiler_pic_works" = xyes; then
8057     case $lt_prog_compiler_pic in
8058      "" | " "*) ;;
8059      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
8060      esac
8061 else
8062     lt_prog_compiler_pic=
8063      lt_prog_compiler_can_build_shared=no
8064 fi
8065
8066 fi
8067 case $host_os in
8068   # For platforms which do not support PIC, -DPIC is meaningless:
8069   *djgpp*)
8070     lt_prog_compiler_pic=
8071     ;;
8072   *)
8073     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
8074     ;;
8075 esac
8076
8077 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
8078 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
8079 if test "${lt_cv_prog_compiler_c_o+set}" = set; then
8080   echo $ECHO_N "(cached) $ECHO_C" >&6
8081 else
8082   lt_cv_prog_compiler_c_o=no
8083    $rm -r conftest 2>/dev/null
8084    mkdir conftest
8085    cd conftest
8086    mkdir out
8087    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8088
8089    lt_compiler_flag="-o out/conftest2.$ac_objext"
8090    # Insert the option either (1) after the last *FLAGS variable, or
8091    # (2) before a word containing "conftest.", or (3) at the end.
8092    # Note that $ac_compile itself does not contain backslashes and begins
8093    # with a dollar sign (not a hyphen), so the echo should work correctly.
8094    lt_compile=`echo "$ac_compile" | $SED \
8095    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8096    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8097    -e 's:$: $lt_compiler_flag:'`
8098    (eval echo "\"\$as_me:8098: $lt_compile\"" >&5)
8099    (eval "$lt_compile" 2>out/conftest.err)
8100    ac_status=$?
8101    cat out/conftest.err >&5
8102    echo "$as_me:8102: \$? = $ac_status" >&5
8103    if (exit $ac_status) && test -s out/conftest2.$ac_objext
8104    then
8105      # The compiler can only warn and ignore the option if not recognized
8106      # So say no if there are warnings
8107      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
8108      $SED '/^$/d' out/conftest.err >out/conftest.er2
8109      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8110        lt_cv_prog_compiler_c_o=yes
8111      fi
8112    fi
8113    chmod u+w . 2>&5
8114    $rm conftest*
8115    # SGI C++ compiler will create directory out/ii_files/ for
8116    # template instantiation
8117    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
8118    $rm out/* && rmdir out
8119    cd ..
8120    rmdir conftest
8121    $rm conftest*
8122
8123 fi
8124 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
8125 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
8126
8127
8128 hard_links="nottested"
8129 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
8130   # do not overwrite the value of need_locks provided by the user
8131   echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
8132 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
8133   hard_links=yes
8134   $rm conftest*
8135   ln conftest.a conftest.b 2>/dev/null && hard_links=no
8136   touch conftest.a
8137   ln conftest.a conftest.b 2>&5 || hard_links=no
8138   ln conftest.a conftest.b 2>/dev/null && hard_links=no
8139   echo "$as_me:$LINENO: result: $hard_links" >&5
8140 echo "${ECHO_T}$hard_links" >&6
8141   if test "$hard_links" = no; then
8142     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
8143 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
8144     need_locks=warn
8145   fi
8146 else
8147   need_locks=no
8148 fi
8149
8150 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
8151 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
8152
8153   runpath_var=
8154   allow_undefined_flag=
8155   enable_shared_with_static_runtimes=no
8156   archive_cmds=
8157   archive_expsym_cmds=
8158   old_archive_From_new_cmds=
8159   old_archive_from_expsyms_cmds=
8160   export_dynamic_flag_spec=
8161   whole_archive_flag_spec=
8162   thread_safe_flag_spec=
8163   hardcode_libdir_flag_spec=
8164   hardcode_libdir_flag_spec_ld=
8165   hardcode_libdir_separator=
8166   hardcode_direct=no
8167   hardcode_minus_L=no
8168   hardcode_shlibpath_var=unsupported
8169   link_all_deplibs=unknown
8170   hardcode_automatic=no
8171   module_cmds=
8172   module_expsym_cmds=
8173   always_export_symbols=no
8174   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8175   # include_expsyms should be a list of space-separated symbols to be *always*
8176   # included in the symbol list
8177   include_expsyms=
8178   # exclude_expsyms can be an extended regexp of symbols to exclude
8179   # it will be wrapped by ` (' and `)$', so one must not match beginning or
8180   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
8181   # as well as any symbol that contains `d'.
8182   exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
8183   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8184   # platforms (ab)use it in PIC code, but their linkers get confused if
8185   # the symbol is explicitly referenced.  Since portable code cannot
8186   # rely on this symbol name, it's probably fine to never include it in
8187   # preloaded symbol tables.
8188   extract_expsyms_cmds=
8189   # Just being paranoid about ensuring that cc_basename is set.
8190   for cc_temp in $compiler""; do
8191   case $cc_temp in
8192     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8193     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8194     \-*) ;;
8195     *) break;;
8196   esac
8197 done
8198 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8199
8200   case $host_os in
8201   cygwin* | mingw* | pw32*)
8202     # FIXME: the MSVC++ port hasn't been tested in a loooong time
8203     # When not using gcc, we currently assume that we are using
8204     # Microsoft Visual C++.
8205     if test "$GCC" != yes; then
8206       with_gnu_ld=no
8207     fi
8208     ;;
8209   openbsd*)
8210     with_gnu_ld=no
8211     ;;
8212   esac
8213
8214   ld_shlibs=yes
8215   if test "$with_gnu_ld" = yes; then
8216     # If archive_cmds runs LD, not CC, wlarc should be empty
8217     wlarc='${wl}'
8218
8219     # Set some defaults for GNU ld with shared library support. These
8220     # are reset later if shared libraries are not supported. Putting them
8221     # here allows them to be overridden if necessary.
8222     runpath_var=LD_RUN_PATH
8223     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
8224     export_dynamic_flag_spec='${wl}--export-dynamic'
8225     # ancient GNU ld didn't support --whole-archive et. al.
8226     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
8227         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8228       else
8229         whole_archive_flag_spec=
8230     fi
8231     supports_anon_versioning=no
8232     case `$LD -v 2>/dev/null` in
8233       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
8234       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8235       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8236       *\ 2.11.*) ;; # other 2.11 versions
8237       *) supports_anon_versioning=yes ;;
8238     esac
8239
8240     # See if GNU ld supports shared libraries.
8241     case $host_os in
8242     aix3* | aix4* | aix5*)
8243       # On AIX/PPC, the GNU linker is very broken
8244       if test "$host_cpu" != ia64; then
8245         ld_shlibs=no
8246         cat <<EOF 1>&2
8247
8248 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
8249 *** to be unable to reliably create shared libraries on AIX.
8250 *** Therefore, libtool is disabling shared libraries support.  If you
8251 *** really care for shared libraries, you may want to modify your PATH
8252 *** so that a non-GNU linker is found, and then restart.
8253
8254 EOF
8255       fi
8256       ;;
8257
8258     amigaos*)
8259       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)'
8260       hardcode_libdir_flag_spec='-L$libdir'
8261       hardcode_minus_L=yes
8262
8263       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
8264       # that the semantics of dynamic libraries on AmigaOS, at least up
8265       # to version 4, is to share data among multiple programs linked
8266       # with the same dynamic library.  Since this doesn't match the
8267       # behavior of shared libraries on other platforms, we can't use
8268       # them.
8269       ld_shlibs=no
8270       ;;
8271
8272     beos*)
8273       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8274         allow_undefined_flag=unsupported
8275         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8276         # support --undefined.  This deserves some investigation.  FIXME
8277         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8278       else
8279         ld_shlibs=no
8280       fi
8281       ;;
8282
8283     cygwin* | mingw* | pw32*)
8284       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
8285       # as there is no search path for DLLs.
8286       hardcode_libdir_flag_spec='-L$libdir'
8287       allow_undefined_flag=unsupported
8288       always_export_symbols=no
8289       enable_shared_with_static_runtimes=yes
8290       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
8291
8292       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8293         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8294         # If the export-symbols file already is a .def file (1st line
8295         # is EXPORTS), use it as is; otherwise, prepend...
8296         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8297           cp $export_symbols $output_objdir/$soname.def;
8298         else
8299           echo EXPORTS > $output_objdir/$soname.def;
8300           cat $export_symbols >> $output_objdir/$soname.def;
8301         fi~
8302         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
8303       else
8304         ld_shlibs=no
8305       fi
8306       ;;
8307
8308     linux*)
8309       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8310         tmp_addflag=
8311         case $cc_basename,$host_cpu in
8312         pgcc*)                          # Portland Group C compiler
8313           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'
8314           tmp_addflag=' $pic_flag'
8315           ;;
8316         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
8317           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'
8318           tmp_addflag=' $pic_flag -Mnomain' ;;
8319         ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
8320           tmp_addflag=' -i_dynamic' ;;
8321         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
8322           tmp_addflag=' -i_dynamic -nofor_main' ;;
8323         ifc* | ifort*)                  # Intel Fortran compiler
8324           tmp_addflag=' -nofor_main' ;;
8325         esac
8326         archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8327
8328         if test $supports_anon_versioning = yes; then
8329           archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
8330   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8331   $echo "local: *; };" >> $output_objdir/$libname.ver~
8332           $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8333         fi
8334       else
8335         ld_shlibs=no
8336       fi
8337       ;;
8338
8339     netbsd*)
8340       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8341         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
8342         wlarc=
8343       else
8344         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8345         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8346       fi
8347       ;;
8348
8349     solaris* | sysv5*)
8350       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
8351         ld_shlibs=no
8352         cat <<EOF 1>&2
8353
8354 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
8355 *** create shared libraries on Solaris systems.  Therefore, libtool
8356 *** is disabling shared libraries support.  We urge you to upgrade GNU
8357 *** binutils to release 2.9.1 or newer.  Another option is to modify
8358 *** your PATH or compiler configuration so that the native linker is
8359 *** used, and then restart.
8360
8361 EOF
8362       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8363         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8364         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8365       else
8366         ld_shlibs=no
8367       fi
8368       ;;
8369
8370     sunos4*)
8371       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8372       wlarc=
8373       hardcode_direct=yes
8374       hardcode_shlibpath_var=no
8375       ;;
8376
8377     *)
8378       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8379         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8380         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8381       else
8382         ld_shlibs=no
8383       fi
8384       ;;
8385     esac
8386
8387     if test "$ld_shlibs" = no; then
8388       runpath_var=
8389       hardcode_libdir_flag_spec=
8390       export_dynamic_flag_spec=
8391       whole_archive_flag_spec=
8392     fi
8393   else
8394     # PORTME fill in a description of your system's linker (not GNU ld)
8395     case $host_os in
8396     aix3*)
8397       allow_undefined_flag=unsupported
8398       always_export_symbols=yes
8399       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'
8400       # Note: this linker hardcodes the directories in LIBPATH if there
8401       # are no directories specified by -L.
8402       hardcode_minus_L=yes
8403       if test "$GCC" = yes && test -z "$link_static_flag"; then
8404         # Neither direct hardcoding nor static linking is supported with a
8405         # broken collect2.
8406         hardcode_direct=unsupported
8407       fi
8408       ;;
8409
8410     aix4* | aix5*)
8411       if test "$host_cpu" = ia64; then
8412         # On IA64, the linker does run time linking by default, so we don't
8413         # have to do anything special.
8414         aix_use_runtimelinking=no
8415         exp_sym_flag='-Bexport'
8416         no_entry_flag=""
8417       else
8418         # If we're using GNU nm, then we don't want the "-C" option.
8419         # -C means demangle to AIX nm, but means don't demangle with GNU nm
8420         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
8421           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'
8422         else
8423           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'
8424         fi
8425         aix_use_runtimelinking=no
8426
8427         # Test if we are trying to use run time linking or normal
8428         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8429         # need to do runtime linking.
8430         case $host_os in aix4.[23]|aix4.[23].*|aix5*)
8431           for ld_flag in $LDFLAGS; do
8432           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
8433             aix_use_runtimelinking=yes
8434             break
8435           fi
8436           done
8437         esac
8438
8439         exp_sym_flag='-bexport'
8440         no_entry_flag='-bnoentry'
8441       fi
8442
8443       # When large executables or shared objects are built, AIX ld can
8444       # have problems creating the table of contents.  If linking a library
8445       # or program results in "error TOC overflow" add -mminimal-toc to
8446       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
8447       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8448
8449       archive_cmds=''
8450       hardcode_direct=yes
8451       hardcode_libdir_separator=':'
8452       link_all_deplibs=yes
8453
8454       if test "$GCC" = yes; then
8455         case $host_os in aix4.[012]|aix4.[012].*)
8456         # We only want to do this on AIX 4.2 and lower, the check
8457         # below for broken collect2 doesn't work under 4.3+
8458           collect2name=`${CC} -print-prog-name=collect2`
8459           if test -f "$collect2name" && \
8460            strings "$collect2name" | grep resolve_lib_name >/dev/null
8461           then
8462           # We have reworked collect2
8463           hardcode_direct=yes
8464           else
8465           # We have old collect2
8466           hardcode_direct=unsupported
8467           # It fails to find uninstalled libraries when the uninstalled
8468           # path is not listed in the libpath.  Setting hardcode_minus_L
8469           # to unsupported forces relinking
8470           hardcode_minus_L=yes
8471           hardcode_libdir_flag_spec='-L$libdir'
8472           hardcode_libdir_separator=
8473           fi
8474         esac
8475         shared_flag='-shared'
8476         if test "$aix_use_runtimelinking" = yes; then
8477           shared_flag="$shared_flag "'${wl}-G'
8478         fi
8479       else
8480         # not using gcc
8481         if test "$host_cpu" = ia64; then
8482         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8483         # chokes on -Wl,-G. The following line is correct:
8484           shared_flag='-G'
8485         else
8486         if test "$aix_use_runtimelinking" = yes; then
8487             shared_flag='${wl}-G'
8488           else
8489             shared_flag='${wl}-bM:SRE'
8490         fi
8491         fi
8492       fi
8493
8494       # It seems that -bexpall does not export symbols beginning with
8495       # underscore (_), so it is better to generate a list of symbols to export.
8496       always_export_symbols=yes
8497       if test "$aix_use_runtimelinking" = yes; then
8498         # Warning - without using the other runtime loading flags (-brtl),
8499         # -berok will link without error, but may produce a broken library.
8500         allow_undefined_flag='-berok'
8501        # Determine the default libpath from the value encoded in an empty executable.
8502        cat >conftest.$ac_ext <<_ACEOF
8503 /* confdefs.h.  */
8504 _ACEOF
8505 cat confdefs.h >>conftest.$ac_ext
8506 cat >>conftest.$ac_ext <<_ACEOF
8507 /* end confdefs.h.  */
8508
8509 int
8510 main ()
8511 {
8512
8513   ;
8514   return 0;
8515 }
8516 _ACEOF
8517 rm -f conftest.$ac_objext conftest$ac_exeext
8518 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8519   (eval $ac_link) 2>conftest.er1
8520   ac_status=$?
8521   grep -v '^ *+' conftest.er1 >conftest.err
8522   rm -f conftest.er1
8523   cat conftest.err >&5
8524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8525   (exit $ac_status); } &&
8526          { ac_try='test -z "$ac_c_werror_flag"
8527                          || test ! -s conftest.err'
8528   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8529   (eval $ac_try) 2>&5
8530   ac_status=$?
8531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8532   (exit $ac_status); }; } &&
8533          { ac_try='test -s conftest$ac_exeext'
8534   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8535   (eval $ac_try) 2>&5
8536   ac_status=$?
8537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8538   (exit $ac_status); }; }; then
8539
8540 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
8541 }'`
8542 # Check for a 64-bit object if we didn't find anything.
8543 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; }
8544 }'`; fi
8545 else
8546   echo "$as_me: failed program was:" >&5
8547 sed 's/^/| /' conftest.$ac_ext >&5
8548
8549 fi
8550 rm -f conftest.err conftest.$ac_objext \
8551       conftest$ac_exeext conftest.$ac_ext
8552 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8553
8554        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8555         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"
8556        else
8557         if test "$host_cpu" = ia64; then
8558           hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
8559           allow_undefined_flag="-z nodefs"
8560           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"
8561         else
8562          # Determine the default libpath from the value encoded in an empty executable.
8563          cat >conftest.$ac_ext <<_ACEOF
8564 /* confdefs.h.  */
8565 _ACEOF
8566 cat confdefs.h >>conftest.$ac_ext
8567 cat >>conftest.$ac_ext <<_ACEOF
8568 /* end confdefs.h.  */
8569
8570 int
8571 main ()
8572 {
8573
8574   ;
8575   return 0;
8576 }
8577 _ACEOF
8578 rm -f conftest.$ac_objext conftest$ac_exeext
8579 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8580   (eval $ac_link) 2>conftest.er1
8581   ac_status=$?
8582   grep -v '^ *+' conftest.er1 >conftest.err
8583   rm -f conftest.er1
8584   cat conftest.err >&5
8585   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8586   (exit $ac_status); } &&
8587          { ac_try='test -z "$ac_c_werror_flag"
8588                          || test ! -s conftest.err'
8589   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8590   (eval $ac_try) 2>&5
8591   ac_status=$?
8592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8593   (exit $ac_status); }; } &&
8594          { ac_try='test -s conftest$ac_exeext'
8595   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8596   (eval $ac_try) 2>&5
8597   ac_status=$?
8598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8599   (exit $ac_status); }; }; then
8600
8601 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
8602 }'`
8603 # Check for a 64-bit object if we didn't find anything.
8604 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; }
8605 }'`; fi
8606 else
8607   echo "$as_me: failed program was:" >&5
8608 sed 's/^/| /' conftest.$ac_ext >&5
8609
8610 fi
8611 rm -f conftest.err conftest.$ac_objext \
8612       conftest$ac_exeext conftest.$ac_ext
8613 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8614
8615          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8616           # Warning - without using the other run time loading flags,
8617           # -berok will link without error, but may produce a broken library.
8618           no_undefined_flag=' ${wl}-bernotok'
8619           allow_undefined_flag=' ${wl}-berok'
8620           # -bexpall does not export symbols beginning with underscore (_)
8621           always_export_symbols=yes
8622           # Exported symbols can be pulled into shared objects from archives
8623           whole_archive_flag_spec=' '
8624           archive_cmds_need_lc=yes
8625           # This is similar to how AIX traditionally builds its shared libraries.
8626           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'
8627         fi
8628       fi
8629       ;;
8630
8631     amigaos*)
8632       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)'
8633       hardcode_libdir_flag_spec='-L$libdir'
8634       hardcode_minus_L=yes
8635       # see comment about different semantics on the GNU ld section
8636       ld_shlibs=no
8637       ;;
8638
8639     bsdi[45]*)
8640       export_dynamic_flag_spec=-rdynamic
8641       ;;
8642
8643     cygwin* | mingw* | pw32*)
8644       # When not using gcc, we currently assume that we are using
8645       # Microsoft Visual C++.
8646       # hardcode_libdir_flag_spec is actually meaningless, as there is
8647       # no search path for DLLs.
8648       hardcode_libdir_flag_spec=' '
8649       allow_undefined_flag=unsupported
8650       # Tell ltmain to make .lib files, not .a files.
8651       libext=lib
8652       # Tell ltmain to make .dll files, not .so files.
8653       shrext_cmds=".dll"
8654       # FIXME: Setting linknames here is a bad hack.
8655       archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
8656       # The linker will automatically build a .lib file if we build a DLL.
8657       old_archive_From_new_cmds='true'
8658       # FIXME: Should let the user specify the lib program.
8659       old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
8660       fix_srcfile_path='`cygpath -w "$srcfile"`'
8661       enable_shared_with_static_runtimes=yes
8662       ;;
8663
8664     darwin* | rhapsody*)
8665       case $host_os in
8666         rhapsody* | darwin1.[012])
8667          allow_undefined_flag='${wl}-undefined ${wl}suppress'
8668          ;;
8669        *) # Darwin 1.3 on
8670          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8671            allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8672          else
8673            case ${MACOSX_DEPLOYMENT_TARGET} in
8674              10.[012])
8675                allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8676                ;;
8677              10.*)
8678                allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
8679                ;;
8680            esac
8681          fi
8682          ;;
8683       esac
8684       archive_cmds_need_lc=no
8685       hardcode_direct=no
8686       hardcode_automatic=yes
8687       hardcode_shlibpath_var=unsupported
8688       whole_archive_flag_spec=''
8689       link_all_deplibs=yes
8690     if test "$GCC" = yes ; then
8691         output_verbose_link_cmd='echo'
8692         archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
8693       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8694       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8695       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}'
8696       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}'
8697     else
8698       case $cc_basename in
8699         xlc*)
8700          output_verbose_link_cmd='echo'
8701          archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
8702          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8703           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8704          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}'
8705           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}'
8706           ;;
8707        *)
8708          ld_shlibs=no
8709           ;;
8710       esac
8711     fi
8712       ;;
8713
8714     dgux*)
8715       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8716       hardcode_libdir_flag_spec='-L$libdir'
8717       hardcode_shlibpath_var=no
8718       ;;
8719
8720     freebsd1*)
8721       ld_shlibs=no
8722       ;;
8723
8724     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8725     # support.  Future versions do this automatically, but an explicit c++rt0.o
8726     # does not break anything, and helps significantly (at the cost of a little
8727     # extra space).
8728     freebsd2.2*)
8729       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
8730       hardcode_libdir_flag_spec='-R$libdir'
8731       hardcode_direct=yes
8732       hardcode_shlibpath_var=no
8733       ;;
8734
8735     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8736     freebsd2*)
8737       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8738       hardcode_direct=yes
8739       hardcode_minus_L=yes
8740       hardcode_shlibpath_var=no
8741       ;;
8742
8743     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
8744     freebsd* | kfreebsd*-gnu | dragonfly*)
8745       archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
8746       hardcode_libdir_flag_spec='-R$libdir'
8747       hardcode_direct=yes
8748       hardcode_shlibpath_var=no
8749       ;;
8750
8751     hpux9*)
8752       if test "$GCC" = yes; then
8753         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'
8754       else
8755         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'
8756       fi
8757       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8758       hardcode_libdir_separator=:
8759       hardcode_direct=yes
8760
8761       # hardcode_minus_L: Not really in the search PATH,
8762       # but as the default location of the library.
8763       hardcode_minus_L=yes
8764       export_dynamic_flag_spec='${wl}-E'
8765       ;;
8766
8767     hpux10* | hpux11*)
8768       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8769         case $host_cpu in
8770         hppa*64*|ia64*)
8771           archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8772           ;;
8773         *)
8774           archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8775           ;;
8776         esac
8777       else
8778         case $host_cpu in
8779         hppa*64*|ia64*)
8780           archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
8781           ;;
8782         *)
8783           archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
8784           ;;
8785         esac
8786       fi
8787       if test "$with_gnu_ld" = no; then
8788         case $host_cpu in
8789         hppa*64*)
8790           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8791           hardcode_libdir_flag_spec_ld='+b $libdir'
8792           hardcode_libdir_separator=:
8793           hardcode_direct=no
8794           hardcode_shlibpath_var=no
8795           ;;
8796         ia64*)
8797           hardcode_libdir_flag_spec='-L$libdir'
8798           hardcode_direct=no
8799           hardcode_shlibpath_var=no
8800
8801           # hardcode_minus_L: Not really in the search PATH,
8802           # but as the default location of the library.
8803           hardcode_minus_L=yes
8804           ;;
8805         *)
8806           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8807           hardcode_libdir_separator=:
8808           hardcode_direct=yes
8809           export_dynamic_flag_spec='${wl}-E'
8810
8811           # hardcode_minus_L: Not really in the search PATH,
8812           # but as the default location of the library.
8813           hardcode_minus_L=yes
8814           ;;
8815         esac
8816       fi
8817       ;;
8818
8819     irix5* | irix6* | nonstopux*)
8820       if test "$GCC" = yes; then
8821         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'
8822       else
8823         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'
8824         hardcode_libdir_flag_spec_ld='-rpath $libdir'
8825       fi
8826       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8827       hardcode_libdir_separator=:
8828       link_all_deplibs=yes
8829       ;;
8830
8831     netbsd*)
8832       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8833         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
8834       else
8835         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
8836       fi
8837       hardcode_libdir_flag_spec='-R$libdir'
8838       hardcode_direct=yes
8839       hardcode_shlibpath_var=no
8840       ;;
8841
8842     newsos6)
8843       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8844       hardcode_direct=yes
8845       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8846       hardcode_libdir_separator=:
8847       hardcode_shlibpath_var=no
8848       ;;
8849
8850     openbsd*)
8851       hardcode_direct=yes
8852       hardcode_shlibpath_var=no
8853       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8854         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8855         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
8856         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8857         export_dynamic_flag_spec='${wl}-E'
8858       else
8859        case $host_os in
8860          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
8861            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8862            hardcode_libdir_flag_spec='-R$libdir'
8863            ;;
8864          *)
8865            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8866            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8867            ;;
8868        esac
8869       fi
8870       ;;
8871
8872     os2*)
8873       hardcode_libdir_flag_spec='-L$libdir'
8874       hardcode_minus_L=yes
8875       allow_undefined_flag=unsupported
8876       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'
8877       old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
8878       ;;
8879
8880     osf3*)
8881       if test "$GCC" = yes; then
8882         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8883         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'
8884       else
8885         allow_undefined_flag=' -expect_unresolved \*'
8886         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'
8887       fi
8888       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8889       hardcode_libdir_separator=:
8890       ;;
8891
8892     osf4* | osf5*)      # as osf3* with the addition of -msym flag
8893       if test "$GCC" = yes; then
8894         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8895         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'
8896         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8897       else
8898         allow_undefined_flag=' -expect_unresolved \*'
8899         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'
8900         archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
8901         $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'
8902
8903         # Both c and cxx compiler support -rpath directly
8904         hardcode_libdir_flag_spec='-rpath $libdir'
8905       fi
8906       hardcode_libdir_separator=:
8907       ;;
8908
8909     sco3.2v5*)
8910       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8911       hardcode_shlibpath_var=no
8912       export_dynamic_flag_spec='${wl}-Bexport'
8913       runpath_var=LD_RUN_PATH
8914       hardcode_runpath_var=yes
8915       ;;
8916
8917     solaris*)
8918       no_undefined_flag=' -z text'
8919       if test "$GCC" = yes; then
8920         wlarc='${wl}'
8921         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8922         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8923           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
8924       else
8925         wlarc=''
8926         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8927         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8928         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8929       fi
8930       hardcode_libdir_flag_spec='-R$libdir'
8931       hardcode_shlibpath_var=no
8932       case $host_os in
8933       solaris2.[0-5] | solaris2.[0-5].*) ;;
8934       *)
8935         # The compiler driver will combine linker options so we
8936         # cannot just pass the convience library names through
8937         # without $wl, iff we do not link with $LD.
8938         # Luckily, gcc supports the same syntax we need for Sun Studio.
8939         # Supported since Solaris 2.6 (maybe 2.5.1?)
8940         case $wlarc in
8941         '')
8942           whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
8943         *)
8944           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' ;;
8945         esac ;;
8946       esac
8947       link_all_deplibs=yes
8948       ;;
8949
8950     sunos4*)
8951       if test "x$host_vendor" = xsequent; then
8952         # Use $CC to link under sequent, because it throws in some extra .o
8953         # files that make .init and .fini sections work.
8954         archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
8955       else
8956         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
8957       fi
8958       hardcode_libdir_flag_spec='-L$libdir'
8959       hardcode_direct=yes
8960       hardcode_minus_L=yes
8961       hardcode_shlibpath_var=no
8962       ;;
8963
8964     sysv4)
8965       case $host_vendor in
8966         sni)
8967           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8968           hardcode_direct=yes # is this really true???
8969         ;;
8970         siemens)
8971           ## LD is ld it makes a PLAMLIB
8972           ## CC just makes a GrossModule.
8973           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8974           reload_cmds='$CC -r -o $output$reload_objs'
8975           hardcode_direct=no
8976         ;;
8977         motorola)
8978           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8979           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
8980         ;;
8981       esac
8982       runpath_var='LD_RUN_PATH'
8983       hardcode_shlibpath_var=no
8984       ;;
8985
8986     sysv4.3*)
8987       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8988       hardcode_shlibpath_var=no
8989       export_dynamic_flag_spec='-Bexport'
8990       ;;
8991
8992     sysv4*MP*)
8993       if test -d /usr/nec; then
8994         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8995         hardcode_shlibpath_var=no
8996         runpath_var=LD_RUN_PATH
8997         hardcode_runpath_var=yes
8998         ld_shlibs=yes
8999       fi
9000       ;;
9001
9002     sysv4.2uw2*)
9003       archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9004       hardcode_direct=yes
9005       hardcode_minus_L=no
9006       hardcode_shlibpath_var=no
9007       hardcode_runpath_var=yes
9008       runpath_var=LD_RUN_PATH
9009       ;;
9010
9011    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
9012       no_undefined_flag='${wl}-z ${wl}text'
9013       if test "$GCC" = yes; then
9014         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9015       else
9016         archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9017       fi
9018       runpath_var='LD_RUN_PATH'
9019       hardcode_shlibpath_var=no
9020       ;;
9021
9022     sysv5*)
9023       no_undefined_flag=' -z text'
9024       # $CC -shared without GNU ld will not create a library from C++
9025       # object files and a static libstdc++, better avoid it by now
9026       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9027       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9028                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
9029       hardcode_libdir_flag_spec=
9030       hardcode_shlibpath_var=no
9031       runpath_var='LD_RUN_PATH'
9032       ;;
9033
9034     uts4*)
9035       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9036       hardcode_libdir_flag_spec='-L$libdir'
9037       hardcode_shlibpath_var=no
9038       ;;
9039
9040     *)
9041       ld_shlibs=no
9042       ;;
9043     esac
9044   fi
9045
9046 echo "$as_me:$LINENO: result: $ld_shlibs" >&5
9047 echo "${ECHO_T}$ld_shlibs" >&6
9048 test "$ld_shlibs" = no && can_build_shared=no
9049
9050 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
9051 if test "$GCC" = yes; then
9052   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
9053 fi
9054
9055 #
9056 # Do we need to explicitly link libc?
9057 #
9058 case "x$archive_cmds_need_lc" in
9059 x|xyes)
9060   # Assume -lc should be added
9061   archive_cmds_need_lc=yes
9062
9063   if test "$enable_shared" = yes && test "$GCC" = yes; then
9064     case $archive_cmds in
9065     *'~'*)
9066       # FIXME: we may have to deal with multi-command sequences.
9067       ;;
9068     '$CC '*)
9069       # Test whether the compiler implicitly links with -lc since on some
9070       # systems, -lgcc has to come before -lc. If gcc already passes -lc
9071       # to ld, don't add -lc before -lgcc.
9072       echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
9073 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
9074       $rm conftest*
9075       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
9076
9077       if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9078   (eval $ac_compile) 2>&5
9079   ac_status=$?
9080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9081   (exit $ac_status); } 2>conftest.err; then
9082         soname=conftest
9083         lib=conftest
9084         libobjs=conftest.$ac_objext
9085         deplibs=
9086         wl=$lt_prog_compiler_wl
9087         compiler_flags=-v
9088         linker_flags=-v
9089         verstring=
9090         output_objdir=.
9091         libname=conftest
9092         lt_save_allow_undefined_flag=$allow_undefined_flag
9093         allow_undefined_flag=
9094         if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
9095   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
9096   ac_status=$?
9097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9098   (exit $ac_status); }
9099         then
9100           archive_cmds_need_lc=no
9101         else
9102           archive_cmds_need_lc=yes
9103         fi
9104         allow_undefined_flag=$lt_save_allow_undefined_flag
9105       else
9106         cat conftest.err 1>&5
9107       fi
9108       $rm conftest*
9109       echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
9110 echo "${ECHO_T}$archive_cmds_need_lc" >&6
9111       ;;
9112     esac
9113   fi
9114   ;;
9115 esac
9116
9117 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
9118 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
9119 library_names_spec=
9120 libname_spec='lib$name'
9121 soname_spec=
9122 shrext_cmds=".so"
9123 postinstall_cmds=
9124 postuninstall_cmds=
9125 finish_cmds=
9126 finish_eval=
9127 shlibpath_var=
9128 shlibpath_overrides_runpath=unknown
9129 version_type=none
9130 dynamic_linker="$host_os ld.so"
9131 sys_lib_dlsearch_path_spec="/lib /usr/lib"
9132 if test "$GCC" = yes; then
9133   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9134   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
9135     # if the path contains ";" then we assume it to be the separator
9136     # otherwise default to the standard path separator (i.e. ":") - it is
9137     # assumed that no part of a normal pathname contains ";" but that should
9138     # okay in the real world where ";" in dirpaths is itself problematic.
9139     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9140   else
9141     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
9142   fi
9143 else
9144   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
9145 fi
9146 need_lib_prefix=unknown
9147 hardcode_into_libs=no
9148
9149 # when you set need_version to no, make sure it does not cause -set_version
9150 # flags to be left without arguments
9151 need_version=unknown
9152
9153 case $host_os in
9154 aix3*)
9155   version_type=linux
9156   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
9157   shlibpath_var=LIBPATH
9158
9159   # AIX 3 has no versioning support, so we append a major version to the name.
9160   soname_spec='${libname}${release}${shared_ext}$major'
9161   ;;
9162
9163 aix4* | aix5*)
9164   version_type=linux
9165   need_lib_prefix=no
9166   need_version=no
9167   hardcode_into_libs=yes
9168   if test "$host_cpu" = ia64; then
9169     # AIX 5 supports IA64
9170     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
9171     shlibpath_var=LD_LIBRARY_PATH
9172   else
9173     # With GCC up to 2.95.x, collect2 would create an import file
9174     # for dependence libraries.  The import file would start with
9175     # the line `#! .'.  This would cause the generated library to
9176     # depend on `.', always an invalid library.  This was fixed in
9177     # development snapshots of GCC prior to 3.0.
9178     case $host_os in
9179       aix4 | aix4.[01] | aix4.[01].*)
9180       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
9181            echo ' yes '
9182            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
9183         :
9184       else
9185         can_build_shared=no
9186       fi
9187       ;;
9188     esac
9189     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
9190     # soname into executable. Probably we can add versioning support to
9191     # collect2, so additional links can be useful in future.
9192     if test "$aix_use_runtimelinking" = yes; then
9193       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
9194       # instead of lib<name>.a to let people know that these are not
9195       # typical AIX shared libraries.
9196       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9197     else
9198       # We preserve .a as extension for shared libraries through AIX4.2
9199       # and later when we are not doing run time linking.
9200       library_names_spec='${libname}${release}.a $libname.a'
9201       soname_spec='${libname}${release}${shared_ext}$major'
9202     fi
9203     shlibpath_var=LIBPATH
9204   fi
9205   ;;
9206
9207 amigaos*)
9208   library_names_spec='$libname.ixlibrary $libname.a'
9209   # Create ${libname}_ixlibrary.a entries in /sys/libs.
9210   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'
9211   ;;
9212
9213 beos*)
9214   library_names_spec='${libname}${shared_ext}'
9215   dynamic_linker="$host_os ld.so"
9216   shlibpath_var=LIBRARY_PATH
9217   ;;
9218
9219 bsdi[45]*)
9220   version_type=linux
9221   need_version=no
9222   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9223   soname_spec='${libname}${release}${shared_ext}$major'
9224   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
9225   shlibpath_var=LD_LIBRARY_PATH
9226   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
9227   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
9228   # the default ld.so.conf also contains /usr/contrib/lib and
9229   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
9230   # libtool to hard-code these into programs
9231   ;;
9232
9233 cygwin* | mingw* | pw32*)
9234   version_type=windows
9235   shrext_cmds=".dll"
9236   need_version=no
9237   need_lib_prefix=no
9238
9239   case $GCC,$host_os in
9240   yes,cygwin* | yes,mingw* | yes,pw32*)
9241     library_names_spec='$libname.dll.a'
9242     # DLL is installed to $(libdir)/../bin by postinstall_cmds
9243     postinstall_cmds='base_file=`basename \${file}`~
9244       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
9245       dldir=$destdir/`dirname \$dlpath`~
9246       test -d \$dldir || mkdir -p \$dldir~
9247       $install_prog $dir/$dlname \$dldir/$dlname~
9248       chmod a+x \$dldir/$dlname'
9249     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
9250       dlpath=$dir/\$dldll~
9251        $rm \$dlpath'
9252     shlibpath_overrides_runpath=yes
9253
9254     case $host_os in
9255     cygwin*)
9256       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
9257       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9258       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
9259       ;;
9260     mingw*)
9261       # MinGW DLLs use traditional 'lib' prefix
9262       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9263       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9264       if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
9265         # It is most probably a Windows format PATH printed by
9266         # mingw gcc, but we are running on Cygwin. Gcc prints its search
9267         # path with ; separators, and with drive letters. We can handle the
9268         # drive letters (cygwin fileutils understands them), so leave them,
9269         # especially as we might pass files found there to a mingw objdump,
9270         # which wouldn't understand a cygwinified path. Ahh.
9271         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9272       else
9273         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
9274       fi
9275       ;;
9276     pw32*)
9277       # pw32 DLLs use 'pw' prefix rather than 'lib'
9278       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9279       ;;
9280     esac
9281     ;;
9282
9283   *)
9284     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
9285     ;;
9286   esac
9287   dynamic_linker='Win32 ld.exe'
9288   # FIXME: first we should search . and the directory the executable is in
9289   shlibpath_var=PATH
9290   ;;
9291
9292 darwin* | rhapsody*)
9293   dynamic_linker="$host_os dyld"
9294   version_type=darwin
9295   need_lib_prefix=no
9296   need_version=no
9297   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
9298   soname_spec='${libname}${release}${major}$shared_ext'
9299   shlibpath_overrides_runpath=yes
9300   shlibpath_var=DYLD_LIBRARY_PATH
9301   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
9302   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
9303   if test "$GCC" = yes; then
9304     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"`
9305   else
9306     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
9307   fi
9308   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
9309   ;;
9310
9311 dgux*)
9312   version_type=linux
9313   need_lib_prefix=no
9314   need_version=no
9315   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
9316   soname_spec='${libname}${release}${shared_ext}$major'
9317   shlibpath_var=LD_LIBRARY_PATH
9318   ;;
9319
9320 freebsd1*)
9321   dynamic_linker=no
9322   ;;
9323
9324 kfreebsd*-gnu)
9325   version_type=linux
9326   need_lib_prefix=no
9327   need_version=no
9328   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9329   soname_spec='${libname}${release}${shared_ext}$major'
9330   shlibpath_var=LD_LIBRARY_PATH
9331   shlibpath_overrides_runpath=no
9332   hardcode_into_libs=yes
9333   dynamic_linker='GNU ld.so'
9334   ;;
9335
9336 freebsd* | dragonfly*)
9337   # DragonFly does not have aout.  When/if they implement a new
9338   # versioning mechanism, adjust this.
9339   if test -x /usr/bin/objformat; then
9340     objformat=`/usr/bin/objformat`
9341   else
9342     case $host_os in
9343     freebsd[123]*) objformat=aout ;;
9344     *) objformat=elf ;;
9345     esac
9346   fi
9347   version_type=freebsd-$objformat
9348   case $version_type in
9349     freebsd-elf*)
9350       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
9351       need_version=no
9352       need_lib_prefix=no
9353       ;;
9354     freebsd-*)
9355       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
9356       need_version=yes
9357       ;;
9358   esac
9359   shlibpath_var=LD_LIBRARY_PATH
9360   case $host_os in
9361   freebsd2*)
9362     shlibpath_overrides_runpath=yes
9363     ;;
9364   freebsd3.[01]* | freebsdelf3.[01]*)
9365     shlibpath_overrides_runpath=yes
9366     hardcode_into_libs=yes
9367     ;;
9368   *) # from 3.2 on
9369     shlibpath_overrides_runpath=no
9370     hardcode_into_libs=yes
9371     ;;
9372   esac
9373   ;;
9374
9375 gnu*)
9376   version_type=linux
9377   need_lib_prefix=no
9378   need_version=no
9379   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
9380   soname_spec='${libname}${release}${shared_ext}$major'
9381   shlibpath_var=LD_LIBRARY_PATH
9382   hardcode_into_libs=yes
9383   ;;
9384
9385 hpux9* | hpux10* | hpux11*)
9386   # Give a soname corresponding to the major version so that dld.sl refuses to
9387   # link against other versions.
9388   version_type=sunos
9389   need_lib_prefix=no
9390   need_version=no
9391   case $host_cpu in
9392   ia64*)
9393     shrext_cmds='.so'
9394     hardcode_into_libs=yes
9395     dynamic_linker="$host_os dld.so"
9396     shlibpath_var=LD_LIBRARY_PATH
9397     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9398     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9399     soname_spec='${libname}${release}${shared_ext}$major'
9400     if test "X$HPUX_IA64_MODE" = X32; then
9401       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
9402     else
9403       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
9404     fi
9405     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9406     ;;
9407    hppa*64*)
9408      shrext_cmds='.sl'
9409      hardcode_into_libs=yes
9410      dynamic_linker="$host_os dld.sl"
9411      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
9412      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9413      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9414      soname_spec='${libname}${release}${shared_ext}$major'
9415      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
9416      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9417      ;;
9418    *)
9419     shrext_cmds='.sl'
9420     dynamic_linker="$host_os dld.sl"
9421     shlibpath_var=SHLIB_PATH
9422     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
9423     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9424     soname_spec='${libname}${release}${shared_ext}$major'
9425     ;;
9426   esac
9427   # HP-UX runs *really* slowly unless shared libraries are mode 555.
9428   postinstall_cmds='chmod 555 $lib'
9429   ;;
9430
9431 irix5* | irix6* | nonstopux*)
9432   case $host_os in
9433     nonstopux*) version_type=nonstopux ;;
9434     *)
9435         if test "$lt_cv_prog_gnu_ld" = yes; then
9436                 version_type=linux
9437         else
9438                 version_type=irix
9439         fi ;;
9440   esac
9441   need_lib_prefix=no
9442   need_version=no
9443   soname_spec='${libname}${release}${shared_ext}$major'
9444   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
9445   case $host_os in
9446   irix5* | nonstopux*)
9447     libsuff= shlibsuff=
9448     ;;
9449   *)
9450     case $LD in # libtool.m4 will add one of these switches to LD
9451     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
9452       libsuff= shlibsuff= libmagic=32-bit;;
9453     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
9454       libsuff=32 shlibsuff=N32 libmagic=N32;;
9455     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
9456       libsuff=64 shlibsuff=64 libmagic=64-bit;;
9457     *) libsuff= shlibsuff= libmagic=never-match;;
9458     esac
9459     ;;
9460   esac
9461   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
9462   shlibpath_overrides_runpath=no
9463   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
9464   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
9465   hardcode_into_libs=yes
9466   ;;
9467
9468 # No shared lib support for Linux oldld, aout, or coff.
9469 linux*oldld* | linux*aout* | linux*coff*)
9470   dynamic_linker=no
9471   ;;
9472
9473 # This must be Linux ELF.
9474 linux*)
9475   version_type=linux
9476   need_lib_prefix=no
9477   need_version=no
9478   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9479   soname_spec='${libname}${release}${shared_ext}$major'
9480   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
9481   shlibpath_var=LD_LIBRARY_PATH
9482   shlibpath_overrides_runpath=no
9483   # This implies no fast_install, which is unacceptable.
9484   # Some rework will be needed to allow for fast_install
9485   # before this can be enabled.
9486   hardcode_into_libs=yes
9487
9488   # Append ld.so.conf contents to the search path
9489   if test -f /etc/ld.so.conf; then
9490     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' ' '`
9491     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
9492   fi
9493
9494   # We used to test for /lib/ld.so.1 and disable shared libraries on
9495   # powerpc, because MkLinux only supported shared libraries with the
9496   # GNU dynamic linker.  Since this was broken with cross compilers,
9497   # most powerpc-linux boxes support dynamic linking these days and
9498   # people can always --disable-shared, the test was removed, and we
9499   # assume the GNU/Linux dynamic linker is in use.
9500   dynamic_linker='GNU/Linux ld.so'
9501   ;;
9502
9503 knetbsd*-gnu)
9504   version_type=linux
9505   need_lib_prefix=no
9506   need_version=no
9507   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9508   soname_spec='${libname}${release}${shared_ext}$major'
9509   shlibpath_var=LD_LIBRARY_PATH
9510   shlibpath_overrides_runpath=no
9511   hardcode_into_libs=yes
9512   dynamic_linker='GNU ld.so'
9513   ;;
9514
9515 netbsd*)
9516   version_type=sunos
9517   need_lib_prefix=no
9518   need_version=no
9519   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9520     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9521     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9522     dynamic_linker='NetBSD (a.out) ld.so'
9523   else
9524     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9525     soname_spec='${libname}${release}${shared_ext}$major'
9526     dynamic_linker='NetBSD ld.elf_so'
9527   fi
9528   shlibpath_var=LD_LIBRARY_PATH
9529   shlibpath_overrides_runpath=yes
9530   hardcode_into_libs=yes
9531   ;;
9532
9533 newsos6)
9534   version_type=linux
9535   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9536   shlibpath_var=LD_LIBRARY_PATH
9537   shlibpath_overrides_runpath=yes
9538   ;;
9539
9540 nto-qnx*)
9541   version_type=linux
9542   need_lib_prefix=no
9543   need_version=no
9544   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9545   soname_spec='${libname}${release}${shared_ext}$major'
9546   shlibpath_var=LD_LIBRARY_PATH
9547   shlibpath_overrides_runpath=yes
9548   ;;
9549
9550 openbsd*)
9551   version_type=sunos
9552   need_lib_prefix=no
9553   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
9554   case $host_os in
9555     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
9556     *)                         need_version=no  ;;
9557   esac
9558   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9559   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9560   shlibpath_var=LD_LIBRARY_PATH
9561   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9562     case $host_os in
9563       openbsd2.[89] | openbsd2.[89].*)
9564         shlibpath_overrides_runpath=no
9565         ;;
9566       *)
9567         shlibpath_overrides_runpath=yes
9568         ;;
9569       esac
9570   else
9571     shlibpath_overrides_runpath=yes
9572   fi
9573   ;;
9574
9575 os2*)
9576   libname_spec='$name'
9577   shrext_cmds=".dll"
9578   need_lib_prefix=no
9579   library_names_spec='$libname${shared_ext} $libname.a'
9580   dynamic_linker='OS/2 ld.exe'
9581   shlibpath_var=LIBPATH
9582   ;;
9583
9584 osf3* | osf4* | osf5*)
9585   version_type=osf
9586   need_lib_prefix=no
9587   need_version=no
9588   soname_spec='${libname}${release}${shared_ext}$major'
9589   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9590   shlibpath_var=LD_LIBRARY_PATH
9591   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
9592   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
9593   ;;
9594
9595 sco3.2v5*)
9596   version_type=osf
9597   soname_spec='${libname}${release}${shared_ext}$major'
9598   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9599   shlibpath_var=LD_LIBRARY_PATH
9600   ;;
9601
9602 solaris*)
9603   version_type=linux
9604   need_lib_prefix=no
9605   need_version=no
9606   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9607   soname_spec='${libname}${release}${shared_ext}$major'
9608   shlibpath_var=LD_LIBRARY_PATH
9609   shlibpath_overrides_runpath=yes
9610   hardcode_into_libs=yes
9611   # ldd complains unless libraries are executable
9612   postinstall_cmds='chmod +x $lib'
9613   ;;
9614
9615 sunos4*)
9616   version_type=sunos
9617   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9618   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
9619   shlibpath_var=LD_LIBRARY_PATH
9620   shlibpath_overrides_runpath=yes
9621   if test "$with_gnu_ld" = yes; then
9622     need_lib_prefix=no
9623   fi
9624   need_version=yes
9625   ;;
9626
9627 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9628   version_type=linux
9629   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9630   soname_spec='${libname}${release}${shared_ext}$major'
9631   shlibpath_var=LD_LIBRARY_PATH
9632   case $host_vendor in
9633     sni)
9634       shlibpath_overrides_runpath=no
9635       need_lib_prefix=no
9636       export_dynamic_flag_spec='${wl}-Blargedynsym'
9637       runpath_var=LD_RUN_PATH
9638       ;;
9639     siemens)
9640       need_lib_prefix=no
9641       ;;
9642     motorola)
9643       need_lib_prefix=no
9644       need_version=no
9645       shlibpath_overrides_runpath=no
9646       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
9647       ;;
9648   esac
9649   ;;
9650
9651 sysv4*MP*)
9652   if test -d /usr/nec ;then
9653     version_type=linux
9654     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
9655     soname_spec='$libname${shared_ext}.$major'
9656     shlibpath_var=LD_LIBRARY_PATH
9657   fi
9658   ;;
9659
9660 uts4*)
9661   version_type=linux
9662   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9663   soname_spec='${libname}${release}${shared_ext}$major'
9664   shlibpath_var=LD_LIBRARY_PATH
9665   ;;
9666
9667 *)
9668   dynamic_linker=no
9669   ;;
9670 esac
9671 echo "$as_me:$LINENO: result: $dynamic_linker" >&5
9672 echo "${ECHO_T}$dynamic_linker" >&6
9673 test "$dynamic_linker" = no && can_build_shared=no
9674
9675 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
9676 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
9677 hardcode_action=
9678 if test -n "$hardcode_libdir_flag_spec" || \
9679    test -n "$runpath_var" || \
9680    test "X$hardcode_automatic" = "Xyes" ; then
9681
9682   # We can hardcode non-existant directories.
9683   if test "$hardcode_direct" != no &&
9684      # If the only mechanism to avoid hardcoding is shlibpath_var, we
9685      # have to relink, otherwise we might link with an installed library
9686      # when we should be linking with a yet-to-be-installed one
9687      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
9688      test "$hardcode_minus_L" != no; then
9689     # Linking always hardcodes the temporary library directory.
9690     hardcode_action=relink
9691   else
9692     # We can link without hardcoding, and we can hardcode nonexisting dirs.
9693     hardcode_action=immediate
9694   fi
9695 else
9696   # We cannot hardcode anything, or else we can only hardcode existing
9697   # directories.
9698   hardcode_action=unsupported
9699 fi
9700 echo "$as_me:$LINENO: result: $hardcode_action" >&5
9701 echo "${ECHO_T}$hardcode_action" >&6
9702
9703 if test "$hardcode_action" = relink; then
9704   # Fast installation is not supported
9705   enable_fast_install=no
9706 elif test "$shlibpath_overrides_runpath" = yes ||
9707      test "$enable_shared" = no; then
9708   # Fast installation is not necessary
9709   enable_fast_install=needless
9710 fi
9711
9712 striplib=
9713 old_striplib=
9714 echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
9715 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
9716 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
9717   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
9718   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
9719   echo "$as_me:$LINENO: result: yes" >&5
9720 echo "${ECHO_T}yes" >&6
9721 else
9722 # FIXME - insert some real tests, host_os isn't really good enough
9723   case $host_os in
9724    darwin*)
9725        if test -n "$STRIP" ; then
9726          striplib="$STRIP -x"
9727          echo "$as_me:$LINENO: result: yes" >&5
9728 echo "${ECHO_T}yes" >&6
9729        else
9730   echo "$as_me:$LINENO: result: no" >&5
9731 echo "${ECHO_T}no" >&6
9732 fi
9733        ;;
9734    *)
9735   echo "$as_me:$LINENO: result: no" >&5
9736 echo "${ECHO_T}no" >&6
9737     ;;
9738   esac
9739 fi
9740
9741 if test "x$enable_dlopen" != xyes; then
9742   enable_dlopen=unknown
9743   enable_dlopen_self=unknown
9744   enable_dlopen_self_static=unknown
9745 else
9746   lt_cv_dlopen=no
9747   lt_cv_dlopen_libs=
9748
9749   case $host_os in
9750   beos*)
9751     lt_cv_dlopen="load_add_on"
9752     lt_cv_dlopen_libs=
9753     lt_cv_dlopen_self=yes
9754     ;;
9755
9756   mingw* | pw32*)
9757     lt_cv_dlopen="LoadLibrary"
9758     lt_cv_dlopen_libs=
9759    ;;
9760
9761   cygwin*)
9762     lt_cv_dlopen="dlopen"
9763     lt_cv_dlopen_libs=
9764    ;;
9765
9766   darwin*)
9767   # if libdl is installed we need to link against it
9768     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9769 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9770 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9771   echo $ECHO_N "(cached) $ECHO_C" >&6
9772 else
9773   ac_check_lib_save_LIBS=$LIBS
9774 LIBS="-ldl  $LIBS"
9775 cat >conftest.$ac_ext <<_ACEOF
9776 /* confdefs.h.  */
9777 _ACEOF
9778 cat confdefs.h >>conftest.$ac_ext
9779 cat >>conftest.$ac_ext <<_ACEOF
9780 /* end confdefs.h.  */
9781
9782 /* Override any gcc2 internal prototype to avoid an error.  */
9783 #ifdef __cplusplus
9784 extern "C"
9785 #endif
9786 /* We use char because int might match the return type of a gcc2
9787    builtin and then its argument prototype would still apply.  */
9788 char dlopen ();
9789 int
9790 main ()
9791 {
9792 dlopen ();
9793   ;
9794   return 0;
9795 }
9796 _ACEOF
9797 rm -f conftest.$ac_objext conftest$ac_exeext
9798 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9799   (eval $ac_link) 2>conftest.er1
9800   ac_status=$?
9801   grep -v '^ *+' conftest.er1 >conftest.err
9802   rm -f conftest.er1
9803   cat conftest.err >&5
9804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9805   (exit $ac_status); } &&
9806          { ac_try='test -z "$ac_c_werror_flag"
9807                          || test ! -s conftest.err'
9808   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9809   (eval $ac_try) 2>&5
9810   ac_status=$?
9811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9812   (exit $ac_status); }; } &&
9813          { ac_try='test -s conftest$ac_exeext'
9814   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9815   (eval $ac_try) 2>&5
9816   ac_status=$?
9817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9818   (exit $ac_status); }; }; then
9819   ac_cv_lib_dl_dlopen=yes
9820 else
9821   echo "$as_me: failed program was:" >&5
9822 sed 's/^/| /' conftest.$ac_ext >&5
9823
9824 ac_cv_lib_dl_dlopen=no
9825 fi
9826 rm -f conftest.err conftest.$ac_objext \
9827       conftest$ac_exeext conftest.$ac_ext
9828 LIBS=$ac_check_lib_save_LIBS
9829 fi
9830 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9831 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9832 if test $ac_cv_lib_dl_dlopen = yes; then
9833   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
9834 else
9835
9836     lt_cv_dlopen="dyld"
9837     lt_cv_dlopen_libs=
9838     lt_cv_dlopen_self=yes
9839
9840 fi
9841
9842    ;;
9843
9844   *)
9845     echo "$as_me:$LINENO: checking for shl_load" >&5
9846 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
9847 if test "${ac_cv_func_shl_load+set}" = set; then
9848   echo $ECHO_N "(cached) $ECHO_C" >&6
9849 else
9850   cat >conftest.$ac_ext <<_ACEOF
9851 /* confdefs.h.  */
9852 _ACEOF
9853 cat confdefs.h >>conftest.$ac_ext
9854 cat >>conftest.$ac_ext <<_ACEOF
9855 /* end confdefs.h.  */
9856 /* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
9857    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9858 #define shl_load innocuous_shl_load
9859
9860 /* System header to define __stub macros and hopefully few prototypes,
9861     which can conflict with char shl_load (); below.
9862     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9863     <limits.h> exists even on freestanding compilers.  */
9864
9865 #ifdef __STDC__
9866 # include <limits.h>
9867 #else
9868 # include <assert.h>
9869 #endif
9870
9871 #undef shl_load
9872
9873 /* Override any gcc2 internal prototype to avoid an error.  */
9874 #ifdef __cplusplus
9875 extern "C"
9876 {
9877 #endif
9878 /* We use char because int might match the return type of a gcc2
9879    builtin and then its argument prototype would still apply.  */
9880 char shl_load ();
9881 /* The GNU C library defines this for functions which it implements
9882     to always fail with ENOSYS.  Some functions are actually named
9883     something starting with __ and the normal name is an alias.  */
9884 #if defined (__stub_shl_load) || defined (__stub___shl_load)
9885 choke me
9886 #else
9887 char (*f) () = shl_load;
9888 #endif
9889 #ifdef __cplusplus
9890 }
9891 #endif
9892
9893 int
9894 main ()
9895 {
9896 return f != shl_load;
9897   ;
9898   return 0;
9899 }
9900 _ACEOF
9901 rm -f conftest.$ac_objext conftest$ac_exeext
9902 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9903   (eval $ac_link) 2>conftest.er1
9904   ac_status=$?
9905   grep -v '^ *+' conftest.er1 >conftest.err
9906   rm -f conftest.er1
9907   cat conftest.err >&5
9908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9909   (exit $ac_status); } &&
9910          { ac_try='test -z "$ac_c_werror_flag"
9911                          || test ! -s conftest.err'
9912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9913   (eval $ac_try) 2>&5
9914   ac_status=$?
9915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9916   (exit $ac_status); }; } &&
9917          { ac_try='test -s conftest$ac_exeext'
9918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9919   (eval $ac_try) 2>&5
9920   ac_status=$?
9921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9922   (exit $ac_status); }; }; then
9923   ac_cv_func_shl_load=yes
9924 else
9925   echo "$as_me: failed program was:" >&5
9926 sed 's/^/| /' conftest.$ac_ext >&5
9927
9928 ac_cv_func_shl_load=no
9929 fi
9930 rm -f conftest.err conftest.$ac_objext \
9931       conftest$ac_exeext conftest.$ac_ext
9932 fi
9933 echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
9934 echo "${ECHO_T}$ac_cv_func_shl_load" >&6
9935 if test $ac_cv_func_shl_load = yes; then
9936   lt_cv_dlopen="shl_load"
9937 else
9938   echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9939 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9940 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9941   echo $ECHO_N "(cached) $ECHO_C" >&6
9942 else
9943   ac_check_lib_save_LIBS=$LIBS
9944 LIBS="-ldld  $LIBS"
9945 cat >conftest.$ac_ext <<_ACEOF
9946 /* confdefs.h.  */
9947 _ACEOF
9948 cat confdefs.h >>conftest.$ac_ext
9949 cat >>conftest.$ac_ext <<_ACEOF
9950 /* end confdefs.h.  */
9951
9952 /* Override any gcc2 internal prototype to avoid an error.  */
9953 #ifdef __cplusplus
9954 extern "C"
9955 #endif
9956 /* We use char because int might match the return type of a gcc2
9957    builtin and then its argument prototype would still apply.  */
9958 char shl_load ();
9959 int
9960 main ()
9961 {
9962 shl_load ();
9963   ;
9964   return 0;
9965 }
9966 _ACEOF
9967 rm -f conftest.$ac_objext conftest$ac_exeext
9968 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9969   (eval $ac_link) 2>conftest.er1
9970   ac_status=$?
9971   grep -v '^ *+' conftest.er1 >conftest.err
9972   rm -f conftest.er1
9973   cat conftest.err >&5
9974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9975   (exit $ac_status); } &&
9976          { ac_try='test -z "$ac_c_werror_flag"
9977                          || test ! -s conftest.err'
9978   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9979   (eval $ac_try) 2>&5
9980   ac_status=$?
9981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9982   (exit $ac_status); }; } &&
9983          { ac_try='test -s conftest$ac_exeext'
9984   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9985   (eval $ac_try) 2>&5
9986   ac_status=$?
9987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9988   (exit $ac_status); }; }; then
9989   ac_cv_lib_dld_shl_load=yes
9990 else
9991   echo "$as_me: failed program was:" >&5
9992 sed 's/^/| /' conftest.$ac_ext >&5
9993
9994 ac_cv_lib_dld_shl_load=no
9995 fi
9996 rm -f conftest.err conftest.$ac_objext \
9997       conftest$ac_exeext conftest.$ac_ext
9998 LIBS=$ac_check_lib_save_LIBS
9999 fi
10000 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
10001 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
10002 if test $ac_cv_lib_dld_shl_load = yes; then
10003   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
10004 else
10005   echo "$as_me:$LINENO: checking for dlopen" >&5
10006 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
10007 if test "${ac_cv_func_dlopen+set}" = set; then
10008   echo $ECHO_N "(cached) $ECHO_C" >&6
10009 else
10010   cat >conftest.$ac_ext <<_ACEOF
10011 /* confdefs.h.  */
10012 _ACEOF
10013 cat confdefs.h >>conftest.$ac_ext
10014 cat >>conftest.$ac_ext <<_ACEOF
10015 /* end confdefs.h.  */
10016 /* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
10017    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10018 #define dlopen innocuous_dlopen
10019
10020 /* System header to define __stub macros and hopefully few prototypes,
10021     which can conflict with char dlopen (); below.
10022     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10023     <limits.h> exists even on freestanding compilers.  */
10024
10025 #ifdef __STDC__
10026 # include <limits.h>
10027 #else
10028 # include <assert.h>
10029 #endif
10030
10031 #undef dlopen
10032
10033 /* Override any gcc2 internal prototype to avoid an error.  */
10034 #ifdef __cplusplus
10035 extern "C"
10036 {
10037 #endif
10038 /* We use char because int might match the return type of a gcc2
10039    builtin and then its argument prototype would still apply.  */
10040 char dlopen ();
10041 /* The GNU C library defines this for functions which it implements
10042     to always fail with ENOSYS.  Some functions are actually named
10043     something starting with __ and the normal name is an alias.  */
10044 #if defined (__stub_dlopen) || defined (__stub___dlopen)
10045 choke me
10046 #else
10047 char (*f) () = dlopen;
10048 #endif
10049 #ifdef __cplusplus
10050 }
10051 #endif
10052
10053 int
10054 main ()
10055 {
10056 return f != dlopen;
10057   ;
10058   return 0;
10059 }
10060 _ACEOF
10061 rm -f conftest.$ac_objext conftest$ac_exeext
10062 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10063   (eval $ac_link) 2>conftest.er1
10064   ac_status=$?
10065   grep -v '^ *+' conftest.er1 >conftest.err
10066   rm -f conftest.er1
10067   cat conftest.err >&5
10068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10069   (exit $ac_status); } &&
10070          { ac_try='test -z "$ac_c_werror_flag"
10071                          || test ! -s conftest.err'
10072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10073   (eval $ac_try) 2>&5
10074   ac_status=$?
10075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10076   (exit $ac_status); }; } &&
10077          { ac_try='test -s conftest$ac_exeext'
10078   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10079   (eval $ac_try) 2>&5
10080   ac_status=$?
10081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10082   (exit $ac_status); }; }; then
10083   ac_cv_func_dlopen=yes
10084 else
10085   echo "$as_me: failed program was:" >&5
10086 sed 's/^/| /' conftest.$ac_ext >&5
10087
10088 ac_cv_func_dlopen=no
10089 fi
10090 rm -f conftest.err conftest.$ac_objext \
10091       conftest$ac_exeext conftest.$ac_ext
10092 fi
10093 echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
10094 echo "${ECHO_T}$ac_cv_func_dlopen" >&6
10095 if test $ac_cv_func_dlopen = yes; then
10096   lt_cv_dlopen="dlopen"
10097 else
10098   echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10099 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10100 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10101   echo $ECHO_N "(cached) $ECHO_C" >&6
10102 else
10103   ac_check_lib_save_LIBS=$LIBS
10104 LIBS="-ldl  $LIBS"
10105 cat >conftest.$ac_ext <<_ACEOF
10106 /* confdefs.h.  */
10107 _ACEOF
10108 cat confdefs.h >>conftest.$ac_ext
10109 cat >>conftest.$ac_ext <<_ACEOF
10110 /* end confdefs.h.  */
10111
10112 /* Override any gcc2 internal prototype to avoid an error.  */
10113 #ifdef __cplusplus
10114 extern "C"
10115 #endif
10116 /* We use char because int might match the return type of a gcc2
10117    builtin and then its argument prototype would still apply.  */
10118 char dlopen ();
10119 int
10120 main ()
10121 {
10122 dlopen ();
10123   ;
10124   return 0;
10125 }
10126 _ACEOF
10127 rm -f conftest.$ac_objext conftest$ac_exeext
10128 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10129   (eval $ac_link) 2>conftest.er1
10130   ac_status=$?
10131   grep -v '^ *+' conftest.er1 >conftest.err
10132   rm -f conftest.er1
10133   cat conftest.err >&5
10134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10135   (exit $ac_status); } &&
10136          { ac_try='test -z "$ac_c_werror_flag"
10137                          || test ! -s conftest.err'
10138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10139   (eval $ac_try) 2>&5
10140   ac_status=$?
10141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10142   (exit $ac_status); }; } &&
10143          { ac_try='test -s conftest$ac_exeext'
10144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10145   (eval $ac_try) 2>&5
10146   ac_status=$?
10147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10148   (exit $ac_status); }; }; then
10149   ac_cv_lib_dl_dlopen=yes
10150 else
10151   echo "$as_me: failed program was:" >&5
10152 sed 's/^/| /' conftest.$ac_ext >&5
10153
10154 ac_cv_lib_dl_dlopen=no
10155 fi
10156 rm -f conftest.err conftest.$ac_objext \
10157       conftest$ac_exeext conftest.$ac_ext
10158 LIBS=$ac_check_lib_save_LIBS
10159 fi
10160 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10161 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10162 if test $ac_cv_lib_dl_dlopen = yes; then
10163   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10164 else
10165   echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
10166 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
10167 if test "${ac_cv_lib_svld_dlopen+set}" = set; then
10168   echo $ECHO_N "(cached) $ECHO_C" >&6
10169 else
10170   ac_check_lib_save_LIBS=$LIBS
10171 LIBS="-lsvld  $LIBS"
10172 cat >conftest.$ac_ext <<_ACEOF
10173 /* confdefs.h.  */
10174 _ACEOF
10175 cat confdefs.h >>conftest.$ac_ext
10176 cat >>conftest.$ac_ext <<_ACEOF
10177 /* end confdefs.h.  */
10178
10179 /* Override any gcc2 internal prototype to avoid an error.  */
10180 #ifdef __cplusplus
10181 extern "C"
10182 #endif
10183 /* We use char because int might match the return type of a gcc2
10184    builtin and then its argument prototype would still apply.  */
10185 char dlopen ();
10186 int
10187 main ()
10188 {
10189 dlopen ();
10190   ;
10191   return 0;
10192 }
10193 _ACEOF
10194 rm -f conftest.$ac_objext conftest$ac_exeext
10195 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10196   (eval $ac_link) 2>conftest.er1
10197   ac_status=$?
10198   grep -v '^ *+' conftest.er1 >conftest.err
10199   rm -f conftest.er1
10200   cat conftest.err >&5
10201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10202   (exit $ac_status); } &&
10203          { ac_try='test -z "$ac_c_werror_flag"
10204                          || test ! -s conftest.err'
10205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10206   (eval $ac_try) 2>&5
10207   ac_status=$?
10208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10209   (exit $ac_status); }; } &&
10210          { ac_try='test -s conftest$ac_exeext'
10211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10212   (eval $ac_try) 2>&5
10213   ac_status=$?
10214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10215   (exit $ac_status); }; }; then
10216   ac_cv_lib_svld_dlopen=yes
10217 else
10218   echo "$as_me: failed program was:" >&5
10219 sed 's/^/| /' conftest.$ac_ext >&5
10220
10221 ac_cv_lib_svld_dlopen=no
10222 fi
10223 rm -f conftest.err conftest.$ac_objext \
10224       conftest$ac_exeext conftest.$ac_ext
10225 LIBS=$ac_check_lib_save_LIBS
10226 fi
10227 echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
10228 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
10229 if test $ac_cv_lib_svld_dlopen = yes; then
10230   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
10231 else
10232   echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
10233 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
10234 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
10235   echo $ECHO_N "(cached) $ECHO_C" >&6
10236 else
10237   ac_check_lib_save_LIBS=$LIBS
10238 LIBS="-ldld  $LIBS"
10239 cat >conftest.$ac_ext <<_ACEOF
10240 /* confdefs.h.  */
10241 _ACEOF
10242 cat confdefs.h >>conftest.$ac_ext
10243 cat >>conftest.$ac_ext <<_ACEOF
10244 /* end confdefs.h.  */
10245
10246 /* Override any gcc2 internal prototype to avoid an error.  */
10247 #ifdef __cplusplus
10248 extern "C"
10249 #endif
10250 /* We use char because int might match the return type of a gcc2
10251    builtin and then its argument prototype would still apply.  */
10252 char dld_link ();
10253 int
10254 main ()
10255 {
10256 dld_link ();
10257   ;
10258   return 0;
10259 }
10260 _ACEOF
10261 rm -f conftest.$ac_objext conftest$ac_exeext
10262 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10263   (eval $ac_link) 2>conftest.er1
10264   ac_status=$?
10265   grep -v '^ *+' conftest.er1 >conftest.err
10266   rm -f conftest.er1
10267   cat conftest.err >&5
10268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10269   (exit $ac_status); } &&
10270          { ac_try='test -z "$ac_c_werror_flag"
10271                          || test ! -s conftest.err'
10272   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10273   (eval $ac_try) 2>&5
10274   ac_status=$?
10275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10276   (exit $ac_status); }; } &&
10277          { ac_try='test -s conftest$ac_exeext'
10278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10279   (eval $ac_try) 2>&5
10280   ac_status=$?
10281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10282   (exit $ac_status); }; }; then
10283   ac_cv_lib_dld_dld_link=yes
10284 else
10285   echo "$as_me: failed program was:" >&5
10286 sed 's/^/| /' conftest.$ac_ext >&5
10287
10288 ac_cv_lib_dld_dld_link=no
10289 fi
10290 rm -f conftest.err conftest.$ac_objext \
10291       conftest$ac_exeext conftest.$ac_ext
10292 LIBS=$ac_check_lib_save_LIBS
10293 fi
10294 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
10295 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
10296 if test $ac_cv_lib_dld_dld_link = yes; then
10297   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
10298 fi
10299
10300
10301 fi
10302
10303
10304 fi
10305
10306
10307 fi
10308
10309
10310 fi
10311
10312
10313 fi
10314
10315     ;;
10316   esac
10317
10318   if test "x$lt_cv_dlopen" != xno; then
10319     enable_dlopen=yes
10320   else
10321     enable_dlopen=no
10322   fi
10323
10324   case $lt_cv_dlopen in
10325   dlopen)
10326     save_CPPFLAGS="$CPPFLAGS"
10327     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
10328
10329     save_LDFLAGS="$LDFLAGS"
10330     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
10331
10332     save_LIBS="$LIBS"
10333     LIBS="$lt_cv_dlopen_libs $LIBS"
10334
10335     echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
10336 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
10337 if test "${lt_cv_dlopen_self+set}" = set; then
10338   echo $ECHO_N "(cached) $ECHO_C" >&6
10339 else
10340           if test "$cross_compiling" = yes; then :
10341   lt_cv_dlopen_self=cross
10342 else
10343   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10344   lt_status=$lt_dlunknown
10345   cat > conftest.$ac_ext <<EOF
10346 #line 10346 "configure"
10347 #include "confdefs.h"
10348
10349 #if HAVE_DLFCN_H
10350 #include <dlfcn.h>
10351 #endif
10352
10353 #include <stdio.h>
10354
10355 #ifdef RTLD_GLOBAL
10356 #  define LT_DLGLOBAL           RTLD_GLOBAL
10357 #else
10358 #  ifdef DL_GLOBAL
10359 #    define LT_DLGLOBAL         DL_GLOBAL
10360 #  else
10361 #    define LT_DLGLOBAL         0
10362 #  endif
10363 #endif
10364
10365 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10366    find out it does not work in some platform. */
10367 #ifndef LT_DLLAZY_OR_NOW
10368 #  ifdef RTLD_LAZY
10369 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10370 #  else
10371 #    ifdef DL_LAZY
10372 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10373 #    else
10374 #      ifdef RTLD_NOW
10375 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10376 #      else
10377 #        ifdef DL_NOW
10378 #          define LT_DLLAZY_OR_NOW      DL_NOW
10379 #        else
10380 #          define LT_DLLAZY_OR_NOW      0
10381 #        endif
10382 #      endif
10383 #    endif
10384 #  endif
10385 #endif
10386
10387 #ifdef __cplusplus
10388 extern "C" void exit (int);
10389 #endif
10390
10391 void fnord() { int i=42;}
10392 int main ()
10393 {
10394   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10395   int status = $lt_dlunknown;
10396
10397   if (self)
10398     {
10399       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10400       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10401       /* dlclose (self); */
10402     }
10403
10404     exit (status);
10405 }
10406 EOF
10407   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10408   (eval $ac_link) 2>&5
10409   ac_status=$?
10410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10411   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
10412     (./conftest; exit; ) >&5 2>/dev/null
10413     lt_status=$?
10414     case x$lt_status in
10415       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
10416       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
10417       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
10418     esac
10419   else :
10420     # compilation failed
10421     lt_cv_dlopen_self=no
10422   fi
10423 fi
10424 rm -fr conftest*
10425
10426
10427 fi
10428 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
10429 echo "${ECHO_T}$lt_cv_dlopen_self" >&6
10430
10431     if test "x$lt_cv_dlopen_self" = xyes; then
10432       LDFLAGS="$LDFLAGS $link_static_flag"
10433       echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
10434 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
10435 if test "${lt_cv_dlopen_self_static+set}" = set; then
10436   echo $ECHO_N "(cached) $ECHO_C" >&6
10437 else
10438           if test "$cross_compiling" = yes; then :
10439   lt_cv_dlopen_self_static=cross
10440 else
10441   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10442   lt_status=$lt_dlunknown
10443   cat > conftest.$ac_ext <<EOF
10444 #line 10444 "configure"
10445 #include "confdefs.h"
10446
10447 #if HAVE_DLFCN_H
10448 #include <dlfcn.h>
10449 #endif
10450
10451 #include <stdio.h>
10452
10453 #ifdef RTLD_GLOBAL
10454 #  define LT_DLGLOBAL           RTLD_GLOBAL
10455 #else
10456 #  ifdef DL_GLOBAL
10457 #    define LT_DLGLOBAL         DL_GLOBAL
10458 #  else
10459 #    define LT_DLGLOBAL         0
10460 #  endif
10461 #endif
10462
10463 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10464    find out it does not work in some platform. */
10465 #ifndef LT_DLLAZY_OR_NOW
10466 #  ifdef RTLD_LAZY
10467 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10468 #  else
10469 #    ifdef DL_LAZY
10470 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10471 #    else
10472 #      ifdef RTLD_NOW
10473 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10474 #      else
10475 #        ifdef DL_NOW
10476 #          define LT_DLLAZY_OR_NOW      DL_NOW
10477 #        else
10478 #          define LT_DLLAZY_OR_NOW      0
10479 #        endif
10480 #      endif
10481 #    endif
10482 #  endif
10483 #endif
10484
10485 #ifdef __cplusplus
10486 extern "C" void exit (int);
10487 #endif
10488
10489 void fnord() { int i=42;}
10490 int main ()
10491 {
10492   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10493   int status = $lt_dlunknown;
10494
10495   if (self)
10496     {
10497       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10498       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10499       /* dlclose (self); */
10500     }
10501
10502     exit (status);
10503 }
10504 EOF
10505   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10506   (eval $ac_link) 2>&5
10507   ac_status=$?
10508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10509   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
10510     (./conftest; exit; ) >&5 2>/dev/null
10511     lt_status=$?
10512     case x$lt_status in
10513       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
10514       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
10515       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
10516     esac
10517   else :
10518     # compilation failed
10519     lt_cv_dlopen_self_static=no
10520   fi
10521 fi
10522 rm -fr conftest*
10523
10524
10525 fi
10526 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
10527 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
10528     fi
10529
10530     CPPFLAGS="$save_CPPFLAGS"
10531     LDFLAGS="$save_LDFLAGS"
10532     LIBS="$save_LIBS"
10533     ;;
10534   esac
10535
10536   case $lt_cv_dlopen_self in
10537   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
10538   *) enable_dlopen_self=unknown ;;
10539   esac
10540
10541   case $lt_cv_dlopen_self_static in
10542   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
10543   *) enable_dlopen_self_static=unknown ;;
10544   esac
10545 fi
10546
10547
10548 # Report which librarie types wil actually be built
10549 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
10550 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
10551 echo "$as_me:$LINENO: result: $can_build_shared" >&5
10552 echo "${ECHO_T}$can_build_shared" >&6
10553
10554 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
10555 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
10556 test "$can_build_shared" = "no" && enable_shared=no
10557
10558 # On AIX, shared libraries and static libraries use the same namespace, and
10559 # are all built from PIC.
10560 case $host_os in
10561 aix3*)
10562   test "$enable_shared" = yes && enable_static=no
10563   if test -n "$RANLIB"; then
10564     archive_cmds="$archive_cmds~\$RANLIB \$lib"
10565     postinstall_cmds='$RANLIB $lib'
10566   fi
10567   ;;
10568
10569 aix4* | aix5*)
10570   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
10571     test "$enable_shared" = yes && enable_static=no
10572   fi
10573     ;;
10574 esac
10575 echo "$as_me:$LINENO: result: $enable_shared" >&5
10576 echo "${ECHO_T}$enable_shared" >&6
10577
10578 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
10579 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
10580 # Make sure either enable_shared or enable_static is yes.
10581 test "$enable_shared" = yes || enable_static=yes
10582 echo "$as_me:$LINENO: result: $enable_static" >&5
10583 echo "${ECHO_T}$enable_static" >&6
10584
10585 # The else clause should only fire when bootstrapping the
10586 # libtool distribution, otherwise you forgot to ship ltmain.sh
10587 # with your package, and you will get complaints that there are
10588 # no rules to generate ltmain.sh.
10589 if test -f "$ltmain"; then
10590   # See if we are running on zsh, and set the options which allow our commands through
10591   # without removal of \ escapes.
10592   if test -n "${ZSH_VERSION+set}" ; then
10593     setopt NO_GLOB_SUBST
10594   fi
10595   # Now quote all the things that may contain metacharacters while being
10596   # careful not to overquote the AC_SUBSTed values.  We take copies of the
10597   # variables and quote the copies for generation of the libtool script.
10598   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
10599     SED SHELL STRIP \
10600     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
10601     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
10602     deplibs_check_method reload_flag reload_cmds need_locks \
10603     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
10604     lt_cv_sys_global_symbol_to_c_name_address \
10605     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
10606     old_postinstall_cmds old_postuninstall_cmds \
10607     compiler \
10608     CC \
10609     LD \
10610     lt_prog_compiler_wl \
10611     lt_prog_compiler_pic \
10612     lt_prog_compiler_static \
10613     lt_prog_compiler_no_builtin_flag \
10614     export_dynamic_flag_spec \
10615     thread_safe_flag_spec \
10616     whole_archive_flag_spec \
10617     enable_shared_with_static_runtimes \
10618     old_archive_cmds \
10619     old_archive_from_new_cmds \
10620     predep_objects \
10621     postdep_objects \
10622     predeps \
10623     postdeps \
10624     compiler_lib_search_path \
10625     archive_cmds \
10626     archive_expsym_cmds \
10627     postinstall_cmds \
10628     postuninstall_cmds \
10629     old_archive_from_expsyms_cmds \
10630     allow_undefined_flag \
10631     no_undefined_flag \
10632     export_symbols_cmds \
10633     hardcode_libdir_flag_spec \
10634     hardcode_libdir_flag_spec_ld \
10635     hardcode_libdir_separator \
10636     hardcode_automatic \
10637     module_cmds \
10638     module_expsym_cmds \
10639     lt_cv_prog_compiler_c_o \
10640     exclude_expsyms \
10641     include_expsyms; do
10642
10643     case $var in
10644     old_archive_cmds | \
10645     old_archive_from_new_cmds | \
10646     archive_cmds | \
10647     archive_expsym_cmds | \
10648     module_cmds | \
10649     module_expsym_cmds | \
10650     old_archive_from_expsyms_cmds | \
10651     export_symbols_cmds | \
10652     extract_expsyms_cmds | reload_cmds | finish_cmds | \
10653     postinstall_cmds | postuninstall_cmds | \
10654     old_postinstall_cmds | old_postuninstall_cmds | \
10655     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
10656       # Double-quote double-evaled strings.
10657       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
10658       ;;
10659     *)
10660       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
10661       ;;
10662     esac
10663   done
10664
10665   case $lt_echo in
10666   *'\$0 --fallback-echo"')
10667     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
10668     ;;
10669   esac
10670
10671 cfgfile="${ofile}T"
10672   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
10673   $rm -f "$cfgfile"
10674   { echo "$as_me:$LINENO: creating $ofile" >&5
10675 echo "$as_me: creating $ofile" >&6;}
10676
10677   cat <<__EOF__ >> "$cfgfile"
10678 #! $SHELL
10679
10680 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
10681 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
10682 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
10683 #
10684 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
10685 # Free Software Foundation, Inc.
10686 #
10687 # This file is part of GNU Libtool:
10688 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
10689 #
10690 # This program is free software; you can redistribute it and/or modify
10691 # it under the terms of the GNU General Public License as published by
10692 # the Free Software Foundation; either version 2 of the License, or
10693 # (at your option) any later version.
10694 #
10695 # This program is distributed in the hope that it will be useful, but
10696 # WITHOUT ANY WARRANTY; without even the implied warranty of
10697 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10698 # General Public License for more details.
10699 #
10700 # You should have received a copy of the GNU General Public License
10701 # along with this program; if not, write to the Free Software
10702 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
10703 #
10704 # As a special exception to the GNU General Public License, if you
10705 # distribute this file as part of a program that contains a
10706 # configuration script generated by Autoconf, you may include it under
10707 # the same distribution terms that you use for the rest of that program.
10708
10709 # A sed program that does not truncate output.
10710 SED=$lt_SED
10711
10712 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
10713 Xsed="$SED -e 1s/^X//"
10714
10715 # The HP-UX ksh and POSIX shell print the target directory to stdout
10716 # if CDPATH is set.
10717 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
10718
10719 # The names of the tagged configurations supported by this script.
10720 available_tags=
10721
10722 # ### BEGIN LIBTOOL CONFIG
10723
10724 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10725
10726 # Shell to use when invoking shell scripts.
10727 SHELL=$lt_SHELL
10728
10729 # Whether or not to build shared libraries.
10730 build_libtool_libs=$enable_shared
10731
10732 # Whether or not to build static libraries.
10733 build_old_libs=$enable_static
10734
10735 # Whether or not to add -lc for building shared libraries.
10736 build_libtool_need_lc=$archive_cmds_need_lc
10737
10738 # Whether or not to disallow shared libs when runtime libs are static
10739 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
10740
10741 # Whether or not to optimize for fast installation.
10742 fast_install=$enable_fast_install
10743
10744 # The host system.
10745 host_alias=$host_alias
10746 host=$host
10747 host_os=$host_os
10748
10749 # The build system.
10750 build_alias=$build_alias
10751 build=$build
10752 build_os=$build_os
10753
10754 # An echo program that does not interpret backslashes.
10755 echo=$lt_echo
10756
10757 # The archiver.
10758 AR=$lt_AR
10759 AR_FLAGS=$lt_AR_FLAGS
10760
10761 # A C compiler.
10762 LTCC=$lt_LTCC
10763
10764 # A language-specific compiler.
10765 CC=$lt_compiler
10766
10767 # Is the compiler the GNU C compiler?
10768 with_gcc=$GCC
10769
10770 # An ERE matcher.
10771 EGREP=$lt_EGREP
10772
10773 # The linker used to build libraries.
10774 LD=$lt_LD
10775
10776 # Whether we need hard or soft links.
10777 LN_S=$lt_LN_S
10778
10779 # A BSD-compatible nm program.
10780 NM=$lt_NM
10781
10782 # A symbol stripping program
10783 STRIP=$lt_STRIP
10784
10785 # Used to examine libraries when file_magic_cmd begins "file"
10786 MAGIC_CMD=$MAGIC_CMD
10787
10788 # Used on cygwin: DLL creation program.
10789 DLLTOOL="$DLLTOOL"
10790
10791 # Used on cygwin: object dumper.
10792 OBJDUMP="$OBJDUMP"
10793
10794 # Used on cygwin: assembler.
10795 AS="$AS"
10796
10797 # The name of the directory that contains temporary libtool files.
10798 objdir=$objdir
10799
10800 # How to create reloadable object files.
10801 reload_flag=$lt_reload_flag
10802 reload_cmds=$lt_reload_cmds
10803
10804 # How to pass a linker flag through the compiler.
10805 wl=$lt_lt_prog_compiler_wl
10806
10807 # Object file suffix (normally "o").
10808 objext="$ac_objext"
10809
10810 # Old archive suffix (normally "a").
10811 libext="$libext"
10812
10813 # Shared library suffix (normally ".so").
10814 shrext_cmds='$shrext_cmds'
10815
10816 # Executable file suffix (normally "").
10817 exeext="$exeext"
10818
10819 # Additional compiler flags for building library objects.
10820 pic_flag=$lt_lt_prog_compiler_pic
10821 pic_mode=$pic_mode
10822
10823 # What is the maximum length of a command?
10824 max_cmd_len=$lt_cv_sys_max_cmd_len
10825
10826 # Does compiler simultaneously support -c and -o options?
10827 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
10828
10829 # Must we lock files when doing compilation?
10830 need_locks=$lt_need_locks
10831
10832 # Do we need the lib prefix for modules?
10833 need_lib_prefix=$need_lib_prefix
10834
10835 # Do we need a version for libraries?
10836 need_version=$need_version
10837
10838 # Whether dlopen is supported.
10839 dlopen_support=$enable_dlopen
10840
10841 # Whether dlopen of programs is supported.
10842 dlopen_self=$enable_dlopen_self
10843
10844 # Whether dlopen of statically linked programs is supported.
10845 dlopen_self_static=$enable_dlopen_self_static
10846
10847 # Compiler flag to prevent dynamic linking.
10848 link_static_flag=$lt_lt_prog_compiler_static
10849
10850 # Compiler flag to turn off builtin functions.
10851 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
10852
10853 # Compiler flag to allow reflexive dlopens.
10854 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
10855
10856 # Compiler flag to generate shared objects directly from archives.
10857 whole_archive_flag_spec=$lt_whole_archive_flag_spec
10858
10859 # Compiler flag to generate thread-safe objects.
10860 thread_safe_flag_spec=$lt_thread_safe_flag_spec
10861
10862 # Library versioning type.
10863 version_type=$version_type
10864
10865 # Format of library name prefix.
10866 libname_spec=$lt_libname_spec
10867
10868 # List of archive names.  First name is the real one, the rest are links.
10869 # The last name is the one that the linker finds with -lNAME.
10870 library_names_spec=$lt_library_names_spec
10871
10872 # The coded name of the library, if different from the real name.
10873 soname_spec=$lt_soname_spec
10874
10875 # Commands used to build and install an old-style archive.
10876 RANLIB=$lt_RANLIB
10877 old_archive_cmds=$lt_old_archive_cmds
10878 old_postinstall_cmds=$lt_old_postinstall_cmds
10879 old_postuninstall_cmds=$lt_old_postuninstall_cmds
10880
10881 # Create an old-style archive from a shared archive.
10882 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
10883
10884 # Create a temporary old-style archive to link instead of a shared archive.
10885 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
10886
10887 # Commands used to build and install a shared archive.
10888 archive_cmds=$lt_archive_cmds
10889 archive_expsym_cmds=$lt_archive_expsym_cmds
10890 postinstall_cmds=$lt_postinstall_cmds
10891 postuninstall_cmds=$lt_postuninstall_cmds
10892
10893 # Commands used to build a loadable module (assumed same as above if empty)
10894 module_cmds=$lt_module_cmds
10895 module_expsym_cmds=$lt_module_expsym_cmds
10896
10897 # Commands to strip libraries.
10898 old_striplib=$lt_old_striplib
10899 striplib=$lt_striplib
10900
10901 # Dependencies to place before the objects being linked to create a
10902 # shared library.
10903 predep_objects=$lt_predep_objects
10904
10905 # Dependencies to place after the objects being linked to create a
10906 # shared library.
10907 postdep_objects=$lt_postdep_objects
10908
10909 # Dependencies to place before the objects being linked to create a
10910 # shared library.
10911 predeps=$lt_predeps
10912
10913 # Dependencies to place after the objects being linked to create a
10914 # shared library.
10915 postdeps=$lt_postdeps
10916
10917 # The library search path used internally by the compiler when linking
10918 # a shared library.
10919 compiler_lib_search_path=$lt_compiler_lib_search_path
10920
10921 # Method to check whether dependent libraries are shared objects.
10922 deplibs_check_method=$lt_deplibs_check_method
10923
10924 # Command to use when deplibs_check_method == file_magic.
10925 file_magic_cmd=$lt_file_magic_cmd
10926
10927 # Flag that allows shared libraries with undefined symbols to be built.
10928 allow_undefined_flag=$lt_allow_undefined_flag
10929
10930 # Flag that forces no undefined symbols.
10931 no_undefined_flag=$lt_no_undefined_flag
10932
10933 # Commands used to finish a libtool library installation in a directory.
10934 finish_cmds=$lt_finish_cmds
10935
10936 # Same as above, but a single script fragment to be evaled but not shown.
10937 finish_eval=$lt_finish_eval
10938
10939 # Take the output of nm and produce a listing of raw symbols and C names.
10940 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
10941
10942 # Transform the output of nm in a proper C declaration
10943 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
10944
10945 # Transform the output of nm in a C name address pair
10946 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
10947
10948 # This is the shared library runtime path variable.
10949 runpath_var=$runpath_var
10950
10951 # This is the shared library path variable.
10952 shlibpath_var=$shlibpath_var
10953
10954 # Is shlibpath searched before the hard-coded library search path?
10955 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
10956
10957 # How to hardcode a shared library path into an executable.
10958 hardcode_action=$hardcode_action
10959
10960 # Whether we should hardcode library paths into libraries.
10961 hardcode_into_libs=$hardcode_into_libs
10962
10963 # Flag to hardcode \$libdir into a binary during linking.
10964 # This must work even if \$libdir does not exist.
10965 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
10966
10967 # If ld is used when linking, flag to hardcode \$libdir into
10968 # a binary during linking. This must work even if \$libdir does
10969 # not exist.
10970 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
10971
10972 # Whether we need a single -rpath flag with a separated argument.
10973 hardcode_libdir_separator=$lt_hardcode_libdir_separator
10974
10975 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
10976 # resulting binary.
10977 hardcode_direct=$hardcode_direct
10978
10979 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
10980 # resulting binary.
10981 hardcode_minus_L=$hardcode_minus_L
10982
10983 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
10984 # the resulting binary.
10985 hardcode_shlibpath_var=$hardcode_shlibpath_var
10986
10987 # Set to yes if building a shared library automatically hardcodes DIR into the library
10988 # and all subsequent libraries and executables linked against it.
10989 hardcode_automatic=$hardcode_automatic
10990
10991 # Variables whose values should be saved in libtool wrapper scripts and
10992 # restored at relink time.
10993 variables_saved_for_relink="$variables_saved_for_relink"
10994
10995 # Whether libtool must link a program against all its dependency libraries.
10996 link_all_deplibs=$link_all_deplibs
10997
10998 # Compile-time system search path for libraries
10999 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
11000
11001 # Run-time system search path for libraries
11002 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
11003
11004 # Fix the shell variable \$srcfile for the compiler.
11005 fix_srcfile_path="$fix_srcfile_path"
11006
11007 # Set to yes if exported symbols are required.
11008 always_export_symbols=$always_export_symbols
11009
11010 # The commands to list exported symbols.
11011 export_symbols_cmds=$lt_export_symbols_cmds
11012
11013 # The commands to extract the exported symbol list from a shared archive.
11014 extract_expsyms_cmds=$lt_extract_expsyms_cmds
11015
11016 # Symbols that should not be listed in the preloaded symbols.
11017 exclude_expsyms=$lt_exclude_expsyms
11018
11019 # Symbols that must always be exported.
11020 include_expsyms=$lt_include_expsyms
11021
11022 # ### END LIBTOOL CONFIG
11023
11024 __EOF__
11025
11026
11027   case $host_os in
11028   aix3*)
11029     cat <<\EOF >> "$cfgfile"
11030
11031 # AIX sometimes has problems with the GCC collect2 program.  For some
11032 # reason, if we set the COLLECT_NAMES environment variable, the problems
11033 # vanish in a puff of smoke.
11034 if test "X${COLLECT_NAMES+set}" != Xset; then
11035   COLLECT_NAMES=
11036   export COLLECT_NAMES
11037 fi
11038 EOF
11039     ;;
11040   esac
11041
11042   # We use sed instead of cat because bash on DJGPP gets confused if
11043   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
11044   # text mode, it properly converts lines to CR/LF.  This bash problem
11045   # is reportedly fixed, but why not run on old versions too?
11046   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
11047
11048   mv -f "$cfgfile" "$ofile" || \
11049     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
11050   chmod +x "$ofile"
11051
11052 else
11053   # If there is no Makefile yet, we rely on a make rule to execute
11054   # `config.status --recheck' to rerun these tests and create the
11055   # libtool script then.
11056   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
11057   if test -f "$ltmain_in"; then
11058     test -f Makefile && make "$ltmain"
11059   fi
11060 fi
11061
11062
11063 ac_ext=c
11064 ac_cpp='$CPP $CPPFLAGS'
11065 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11066 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11067 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11068
11069 CC="$lt_save_CC"
11070
11071
11072 # Check whether --with-tags or --without-tags was given.
11073 if test "${with_tags+set}" = set; then
11074   withval="$with_tags"
11075   tagnames="$withval"
11076 fi;
11077
11078 if test -f "$ltmain" && test -n "$tagnames"; then
11079   if test ! -f "${ofile}"; then
11080     { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
11081 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
11082   fi
11083
11084   if test -z "$LTCC"; then
11085     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
11086     if test -z "$LTCC"; then
11087       { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
11088 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
11089     else
11090       { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
11091 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
11092     fi
11093   fi
11094
11095   # Extract list of available tagged configurations in $ofile.
11096   # Note that this assumes the entire list is on one line.
11097   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
11098
11099   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
11100   for tagname in $tagnames; do
11101     IFS="$lt_save_ifs"
11102     # Check whether tagname contains only valid characters
11103     case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
11104     "") ;;
11105     *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
11106 echo "$as_me: error: invalid tag name: $tagname" >&2;}
11107    { (exit 1); exit 1; }; }
11108         ;;
11109     esac
11110
11111     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
11112     then
11113       { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
11114 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
11115    { (exit 1); exit 1; }; }
11116     fi
11117
11118     # Update the list of available tags.
11119     if test -n "$tagname"; then
11120       echo appending configuration tag \"$tagname\" to $ofile
11121
11122       case $tagname in
11123       CXX)
11124         if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
11125             ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
11126             (test "X$CXX" != "Xg++"))) ; then
11127           :
11128         else
11129           tagname=""
11130         fi
11131         ;;
11132
11133       F77)
11134         if test -n "$F77" && test "X$F77" != "Xno"; then
11135           :
11136         else
11137           tagname=""
11138         fi
11139         ;;
11140
11141       GCJ)
11142         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
11143           :
11144         else
11145           tagname=""
11146         fi
11147         ;;
11148
11149       RC)
11150
11151
11152
11153 # Source file extension for RC test sources.
11154 ac_ext=rc
11155
11156 # Object file extension for compiled RC test sources.
11157 objext=o
11158 objext_RC=$objext
11159
11160 # Code to be used in simple compile tests
11161 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
11162
11163 # Code to be used in simple link tests
11164 lt_simple_link_test_code="$lt_simple_compile_test_code"
11165
11166 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11167
11168 # If no C compiler was specified, use CC.
11169 LTCC=${LTCC-"$CC"}
11170
11171 # Allow CC to be a program name with arguments.
11172 compiler=$CC
11173
11174
11175 # save warnings/boilerplate of simple test code
11176 ac_outfile=conftest.$ac_objext
11177 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
11178 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11179 _lt_compiler_boilerplate=`cat conftest.err`
11180 $rm conftest*
11181
11182 ac_outfile=conftest.$ac_objext
11183 printf "$lt_simple_link_test_code" >conftest.$ac_ext
11184 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11185 _lt_linker_boilerplate=`cat conftest.err`
11186 $rm conftest*
11187
11188
11189 # Allow CC to be a program name with arguments.
11190 lt_save_CC="$CC"
11191 CC=${RC-"windres"}
11192 compiler=$CC
11193 compiler_RC=$CC
11194 for cc_temp in $compiler""; do
11195   case $cc_temp in
11196     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
11197     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
11198     \-*) ;;
11199     *) break;;
11200   esac
11201 done
11202 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
11203
11204 lt_cv_prog_compiler_c_o_RC=yes
11205
11206 # The else clause should only fire when bootstrapping the
11207 # libtool distribution, otherwise you forgot to ship ltmain.sh
11208 # with your package, and you will get complaints that there are
11209 # no rules to generate ltmain.sh.
11210 if test -f "$ltmain"; then
11211   # See if we are running on zsh, and set the options which allow our commands through
11212   # without removal of \ escapes.
11213   if test -n "${ZSH_VERSION+set}" ; then
11214     setopt NO_GLOB_SUBST
11215   fi
11216   # Now quote all the things that may contain metacharacters while being
11217   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11218   # variables and quote the copies for generation of the libtool script.
11219   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11220     SED SHELL STRIP \
11221     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11222     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11223     deplibs_check_method reload_flag reload_cmds need_locks \
11224     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11225     lt_cv_sys_global_symbol_to_c_name_address \
11226     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11227     old_postinstall_cmds old_postuninstall_cmds \
11228     compiler_RC \
11229     CC_RC \
11230     LD_RC \
11231     lt_prog_compiler_wl_RC \
11232     lt_prog_compiler_pic_RC \
11233     lt_prog_compiler_static_RC \
11234     lt_prog_compiler_no_builtin_flag_RC \
11235     export_dynamic_flag_spec_RC \
11236     thread_safe_flag_spec_RC \
11237     whole_archive_flag_spec_RC \
11238     enable_shared_with_static_runtimes_RC \
11239     old_archive_cmds_RC \
11240     old_archive_from_new_cmds_RC \
11241     predep_objects_RC \
11242     postdep_objects_RC \
11243     predeps_RC \
11244     postdeps_RC \
11245     compiler_lib_search_path_RC \
11246     archive_cmds_RC \
11247     archive_expsym_cmds_RC \
11248     postinstall_cmds_RC \
11249     postuninstall_cmds_RC \
11250     old_archive_from_expsyms_cmds_RC \
11251     allow_undefined_flag_RC \
11252     no_undefined_flag_RC \
11253     export_symbols_cmds_RC \
11254     hardcode_libdir_flag_spec_RC \
11255     hardcode_libdir_flag_spec_ld_RC \
11256     hardcode_libdir_separator_RC \
11257     hardcode_automatic_RC \
11258     module_cmds_RC \
11259     module_expsym_cmds_RC \
11260     lt_cv_prog_compiler_c_o_RC \
11261     exclude_expsyms_RC \
11262     include_expsyms_RC; do
11263
11264     case $var in
11265     old_archive_cmds_RC | \
11266     old_archive_from_new_cmds_RC | \
11267     archive_cmds_RC | \
11268     archive_expsym_cmds_RC | \
11269     module_cmds_RC | \
11270     module_expsym_cmds_RC | \
11271     old_archive_from_expsyms_cmds_RC | \
11272     export_symbols_cmds_RC | \
11273     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11274     postinstall_cmds | postuninstall_cmds | \
11275     old_postinstall_cmds | old_postuninstall_cmds | \
11276     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11277       # Double-quote double-evaled strings.
11278       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11279       ;;
11280     *)
11281       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11282       ;;
11283     esac
11284   done
11285
11286   case $lt_echo in
11287   *'\$0 --fallback-echo"')
11288     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11289     ;;
11290   esac
11291
11292 cfgfile="$ofile"
11293
11294   cat <<__EOF__ >> "$cfgfile"
11295 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
11296
11297 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11298
11299 # Shell to use when invoking shell scripts.
11300 SHELL=$lt_SHELL
11301
11302 # Whether or not to build shared libraries.
11303 build_libtool_libs=$enable_shared
11304
11305 # Whether or not to build static libraries.
11306 build_old_libs=$enable_static
11307
11308 # Whether or not to add -lc for building shared libraries.
11309 build_libtool_need_lc=$archive_cmds_need_lc_RC
11310
11311 # Whether or not to disallow shared libs when runtime libs are static
11312 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
11313
11314 # Whether or not to optimize for fast installation.
11315 fast_install=$enable_fast_install
11316
11317 # The host system.
11318 host_alias=$host_alias
11319 host=$host
11320 host_os=$host_os
11321
11322 # The build system.
11323 build_alias=$build_alias
11324 build=$build
11325 build_os=$build_os
11326
11327 # An echo program that does not interpret backslashes.
11328 echo=$lt_echo
11329
11330 # The archiver.
11331 AR=$lt_AR
11332 AR_FLAGS=$lt_AR_FLAGS
11333
11334 # A C compiler.
11335 LTCC=$lt_LTCC
11336
11337 # A language-specific compiler.
11338 CC=$lt_compiler_RC
11339
11340 # Is the compiler the GNU C compiler?
11341 with_gcc=$GCC_RC
11342
11343 # An ERE matcher.
11344 EGREP=$lt_EGREP
11345
11346 # The linker used to build libraries.
11347 LD=$lt_LD_RC
11348
11349 # Whether we need hard or soft links.
11350 LN_S=$lt_LN_S
11351
11352 # A BSD-compatible nm program.
11353 NM=$lt_NM
11354
11355 # A symbol stripping program
11356 STRIP=$lt_STRIP
11357
11358 # Used to examine libraries when file_magic_cmd begins "file"
11359 MAGIC_CMD=$MAGIC_CMD
11360
11361 # Used on cygwin: DLL creation program.
11362 DLLTOOL="$DLLTOOL"
11363
11364 # Used on cygwin: object dumper.
11365 OBJDUMP="$OBJDUMP"
11366
11367 # Used on cygwin: assembler.
11368 AS="$AS"
11369
11370 # The name of the directory that contains temporary libtool files.
11371 objdir=$objdir
11372
11373 # How to create reloadable object files.
11374 reload_flag=$lt_reload_flag
11375 reload_cmds=$lt_reload_cmds
11376
11377 # How to pass a linker flag through the compiler.
11378 wl=$lt_lt_prog_compiler_wl_RC
11379
11380 # Object file suffix (normally "o").
11381 objext="$ac_objext"
11382
11383 # Old archive suffix (normally "a").
11384 libext="$libext"
11385
11386 # Shared library suffix (normally ".so").
11387 shrext_cmds='$shrext_cmds'
11388
11389 # Executable file suffix (normally "").
11390 exeext="$exeext"
11391
11392 # Additional compiler flags for building library objects.
11393 pic_flag=$lt_lt_prog_compiler_pic_RC
11394 pic_mode=$pic_mode
11395
11396 # What is the maximum length of a command?
11397 max_cmd_len=$lt_cv_sys_max_cmd_len
11398
11399 # Does compiler simultaneously support -c and -o options?
11400 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
11401
11402 # Must we lock files when doing compilation?
11403 need_locks=$lt_need_locks
11404
11405 # Do we need the lib prefix for modules?
11406 need_lib_prefix=$need_lib_prefix
11407
11408 # Do we need a version for libraries?
11409 need_version=$need_version
11410
11411 # Whether dlopen is supported.
11412 dlopen_support=$enable_dlopen
11413
11414 # Whether dlopen of programs is supported.
11415 dlopen_self=$enable_dlopen_self
11416
11417 # Whether dlopen of statically linked programs is supported.
11418 dlopen_self_static=$enable_dlopen_self_static
11419
11420 # Compiler flag to prevent dynamic linking.
11421 link_static_flag=$lt_lt_prog_compiler_static_RC
11422
11423 # Compiler flag to turn off builtin functions.
11424 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
11425
11426 # Compiler flag to allow reflexive dlopens.
11427 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
11428
11429 # Compiler flag to generate shared objects directly from archives.
11430 whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
11431
11432 # Compiler flag to generate thread-safe objects.
11433 thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
11434
11435 # Library versioning type.
11436 version_type=$version_type
11437
11438 # Format of library name prefix.
11439 libname_spec=$lt_libname_spec
11440
11441 # List of archive names.  First name is the real one, the rest are links.
11442 # The last name is the one that the linker finds with -lNAME.
11443 library_names_spec=$lt_library_names_spec
11444
11445 # The coded name of the library, if different from the real name.
11446 soname_spec=$lt_soname_spec
11447
11448 # Commands used to build and install an old-style archive.
11449 RANLIB=$lt_RANLIB
11450 old_archive_cmds=$lt_old_archive_cmds_RC
11451 old_postinstall_cmds=$lt_old_postinstall_cmds
11452 old_postuninstall_cmds=$lt_old_postuninstall_cmds
11453
11454 # Create an old-style archive from a shared archive.
11455 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
11456
11457 # Create a temporary old-style archive to link instead of a shared archive.
11458 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
11459
11460 # Commands used to build and install a shared archive.
11461 archive_cmds=$lt_archive_cmds_RC
11462 archive_expsym_cmds=$lt_archive_expsym_cmds_RC
11463 postinstall_cmds=$lt_postinstall_cmds
11464 postuninstall_cmds=$lt_postuninstall_cmds
11465
11466 # Commands used to build a loadable module (assumed same as above if empty)
11467 module_cmds=$lt_module_cmds_RC
11468 module_expsym_cmds=$lt_module_expsym_cmds_RC
11469
11470 # Commands to strip libraries.
11471 old_striplib=$lt_old_striplib
11472 striplib=$lt_striplib
11473
11474 # Dependencies to place before the objects being linked to create a
11475 # shared library.
11476 predep_objects=$lt_predep_objects_RC
11477
11478 # Dependencies to place after the objects being linked to create a
11479 # shared library.
11480 postdep_objects=$lt_postdep_objects_RC
11481
11482 # Dependencies to place before the objects being linked to create a
11483 # shared library.
11484 predeps=$lt_predeps_RC
11485
11486 # Dependencies to place after the objects being linked to create a
11487 # shared library.
11488 postdeps=$lt_postdeps_RC
11489
11490 # The library search path used internally by the compiler when linking
11491 # a shared library.
11492 compiler_lib_search_path=$lt_compiler_lib_search_path_RC
11493
11494 # Method to check whether dependent libraries are shared objects.
11495 deplibs_check_method=$lt_deplibs_check_method
11496
11497 # Command to use when deplibs_check_method == file_magic.
11498 file_magic_cmd=$lt_file_magic_cmd
11499
11500 # Flag that allows shared libraries with undefined symbols to be built.
11501 allow_undefined_flag=$lt_allow_undefined_flag_RC
11502
11503 # Flag that forces no undefined symbols.
11504 no_undefined_flag=$lt_no_undefined_flag_RC
11505
11506 # Commands used to finish a libtool library installation in a directory.
11507 finish_cmds=$lt_finish_cmds
11508
11509 # Same as above, but a single script fragment to be evaled but not shown.
11510 finish_eval=$lt_finish_eval
11511
11512 # Take the output of nm and produce a listing of raw symbols and C names.
11513 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
11514
11515 # Transform the output of nm in a proper C declaration
11516 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
11517
11518 # Transform the output of nm in a C name address pair
11519 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
11520
11521 # This is the shared library runtime path variable.
11522 runpath_var=$runpath_var
11523
11524 # This is the shared library path variable.
11525 shlibpath_var=$shlibpath_var
11526
11527 # Is shlibpath searched before the hard-coded library search path?
11528 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
11529
11530 # How to hardcode a shared library path into an executable.
11531 hardcode_action=$hardcode_action_RC
11532
11533 # Whether we should hardcode library paths into libraries.
11534 hardcode_into_libs=$hardcode_into_libs
11535
11536 # Flag to hardcode \$libdir into a binary during linking.
11537 # This must work even if \$libdir does not exist.
11538 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
11539
11540 # If ld is used when linking, flag to hardcode \$libdir into
11541 # a binary during linking. This must work even if \$libdir does
11542 # not exist.
11543 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
11544
11545 # Whether we need a single -rpath flag with a separated argument.
11546 hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
11547
11548 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
11549 # resulting binary.
11550 hardcode_direct=$hardcode_direct_RC
11551
11552 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
11553 # resulting binary.
11554 hardcode_minus_L=$hardcode_minus_L_RC
11555
11556 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
11557 # the resulting binary.
11558 hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
11559
11560 # Set to yes if building a shared library automatically hardcodes DIR into the library
11561 # and all subsequent libraries and executables linked against it.
11562 hardcode_automatic=$hardcode_automatic_RC
11563
11564 # Variables whose values should be saved in libtool wrapper scripts and
11565 # restored at relink time.
11566 variables_saved_for_relink="$variables_saved_for_relink"
11567
11568 # Whether libtool must link a program against all its dependency libraries.
11569 link_all_deplibs=$link_all_deplibs_RC
11570
11571 # Compile-time system search path for libraries
11572 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
11573
11574 # Run-time system search path for libraries
11575 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
11576
11577 # Fix the shell variable \$srcfile for the compiler.
11578 fix_srcfile_path="$fix_srcfile_path_RC"
11579
11580 # Set to yes if exported symbols are required.
11581 always_export_symbols=$always_export_symbols_RC
11582
11583 # The commands to list exported symbols.
11584 export_symbols_cmds=$lt_export_symbols_cmds_RC
11585
11586 # The commands to extract the exported symbol list from a shared archive.
11587 extract_expsyms_cmds=$lt_extract_expsyms_cmds
11588
11589 # Symbols that should not be listed in the preloaded symbols.
11590 exclude_expsyms=$lt_exclude_expsyms_RC
11591
11592 # Symbols that must always be exported.
11593 include_expsyms=$lt_include_expsyms_RC
11594
11595 # ### END LIBTOOL TAG CONFIG: $tagname
11596
11597 __EOF__
11598
11599
11600 else
11601   # If there is no Makefile yet, we rely on a make rule to execute
11602   # `config.status --recheck' to rerun these tests and create the
11603   # libtool script then.
11604   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
11605   if test -f "$ltmain_in"; then
11606     test -f Makefile && make "$ltmain"
11607   fi
11608 fi
11609
11610
11611 ac_ext=c
11612 ac_cpp='$CPP $CPPFLAGS'
11613 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11614 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11615 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11616
11617 CC="$lt_save_CC"
11618
11619         ;;
11620
11621       *)
11622         { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
11623 echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
11624    { (exit 1); exit 1; }; }
11625         ;;
11626       esac
11627
11628       # Append the new tag name to the list of available tags.
11629       if test -n "$tagname" ; then
11630       available_tags="$available_tags $tagname"
11631     fi
11632     fi
11633   done
11634   IFS="$lt_save_ifs"
11635
11636   # Now substitute the updated list of available tags.
11637   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
11638     mv "${ofile}T" "$ofile"
11639     chmod +x "$ofile"
11640   else
11641     rm -f "${ofile}T"
11642     { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
11643 echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
11644    { (exit 1); exit 1; }; }
11645   fi
11646 fi
11647
11648
11649
11650 # This can be used to rebuild libtool when needed
11651 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
11652
11653 # Always use our own libtool.
11654 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
11655
11656 # Prevent multiple expansion
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667 ol_link_perl=no
11668 if test $ol_enable_perl != no ; then
11669         # Extract the first word of "perl", so it can be a program name with args.
11670 set dummy perl; ac_word=$2
11671 echo "$as_me:$LINENO: checking for $ac_word" >&5
11672 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11673 if test "${ac_cv_path_PERLBIN+set}" = set; then
11674   echo $ECHO_N "(cached) $ECHO_C" >&6
11675 else
11676   case $PERLBIN in
11677   [\\/]* | ?:[\\/]*)
11678   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
11679   ;;
11680   *)
11681   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11682 for as_dir in $PATH
11683 do
11684   IFS=$as_save_IFS
11685   test -z "$as_dir" && as_dir=.
11686   for ac_exec_ext in '' $ac_executable_extensions; do
11687   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11688     ac_cv_path_PERLBIN="$as_dir/$ac_word$ac_exec_ext"
11689     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11690     break 2
11691   fi
11692 done
11693 done
11694
11695   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
11696   ;;
11697 esac
11698 fi
11699 PERLBIN=$ac_cv_path_PERLBIN
11700
11701 if test -n "$PERLBIN"; then
11702   echo "$as_me:$LINENO: result: $PERLBIN" >&5
11703 echo "${ECHO_T}$PERLBIN" >&6
11704 else
11705   echo "$as_me:$LINENO: result: no" >&5
11706 echo "${ECHO_T}no" >&6
11707 fi
11708
11709
11710         if test "no$PERLBIN" = "no" ; then
11711                 if test $ol_enable_perl = yes ; then
11712                         { { echo "$as_me:$LINENO: error: could not locate perl" >&5
11713 echo "$as_me: error: could not locate perl" >&2;}
11714    { (exit 1); exit 1; }; }
11715                 fi
11716
11717         else
11718                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
11719                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
11720
11721                 if test x"$ol_enable_perl" = "xyes" ; then
11722                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
11723                 else
11724                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
11725                 fi
11726                                 ol_link_perl=yes
11727         fi
11728 fi
11729
11730 ac_ext=c
11731 ac_cpp='$CPP $CPPFLAGS'
11732 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11733 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11734 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11735 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
11736 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
11737 # On Suns, sometimes $CPP names a directory.
11738 if test -n "$CPP" && test -d "$CPP"; then
11739   CPP=
11740 fi
11741 if test -z "$CPP"; then
11742   if test "${ac_cv_prog_CPP+set}" = set; then
11743   echo $ECHO_N "(cached) $ECHO_C" >&6
11744 else
11745       # Double quotes because CPP needs to be expanded
11746     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
11747     do
11748       ac_preproc_ok=false
11749 for ac_c_preproc_warn_flag in '' yes
11750 do
11751   # Use a header file that comes with gcc, so configuring glibc
11752   # with a fresh cross-compiler works.
11753   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11754   # <limits.h> exists even on freestanding compilers.
11755   # On the NeXT, cc -E runs the code through the compiler's parser,
11756   # not just through cpp. "Syntax error" is here to catch this case.
11757   cat >conftest.$ac_ext <<_ACEOF
11758 /* confdefs.h.  */
11759 _ACEOF
11760 cat confdefs.h >>conftest.$ac_ext
11761 cat >>conftest.$ac_ext <<_ACEOF
11762 /* end confdefs.h.  */
11763 #ifdef __STDC__
11764 # include <limits.h>
11765 #else
11766 # include <assert.h>
11767 #endif
11768                      Syntax error
11769 _ACEOF
11770 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11771   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11772   ac_status=$?
11773   grep -v '^ *+' conftest.er1 >conftest.err
11774   rm -f conftest.er1
11775   cat conftest.err >&5
11776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11777   (exit $ac_status); } >/dev/null; then
11778   if test -s conftest.err; then
11779     ac_cpp_err=$ac_c_preproc_warn_flag
11780     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11781   else
11782     ac_cpp_err=
11783   fi
11784 else
11785   ac_cpp_err=yes
11786 fi
11787 if test -z "$ac_cpp_err"; then
11788   :
11789 else
11790   echo "$as_me: failed program was:" >&5
11791 sed 's/^/| /' conftest.$ac_ext >&5
11792
11793   # Broken: fails on valid input.
11794 continue
11795 fi
11796 rm -f conftest.err conftest.$ac_ext
11797
11798   # OK, works on sane cases.  Now check whether non-existent headers
11799   # can be detected and how.
11800   cat >conftest.$ac_ext <<_ACEOF
11801 /* confdefs.h.  */
11802 _ACEOF
11803 cat confdefs.h >>conftest.$ac_ext
11804 cat >>conftest.$ac_ext <<_ACEOF
11805 /* end confdefs.h.  */
11806 #include <ac_nonexistent.h>
11807 _ACEOF
11808 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11809   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11810   ac_status=$?
11811   grep -v '^ *+' conftest.er1 >conftest.err
11812   rm -f conftest.er1
11813   cat conftest.err >&5
11814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11815   (exit $ac_status); } >/dev/null; then
11816   if test -s conftest.err; then
11817     ac_cpp_err=$ac_c_preproc_warn_flag
11818     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11819   else
11820     ac_cpp_err=
11821   fi
11822 else
11823   ac_cpp_err=yes
11824 fi
11825 if test -z "$ac_cpp_err"; then
11826   # Broken: success on invalid input.
11827 continue
11828 else
11829   echo "$as_me: failed program was:" >&5
11830 sed 's/^/| /' conftest.$ac_ext >&5
11831
11832   # Passes both tests.
11833 ac_preproc_ok=:
11834 break
11835 fi
11836 rm -f conftest.err conftest.$ac_ext
11837
11838 done
11839 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
11840 rm -f conftest.err conftest.$ac_ext
11841 if $ac_preproc_ok; then
11842   break
11843 fi
11844
11845     done
11846     ac_cv_prog_CPP=$CPP
11847
11848 fi
11849   CPP=$ac_cv_prog_CPP
11850 else
11851   ac_cv_prog_CPP=$CPP
11852 fi
11853 echo "$as_me:$LINENO: result: $CPP" >&5
11854 echo "${ECHO_T}$CPP" >&6
11855 ac_preproc_ok=false
11856 for ac_c_preproc_warn_flag in '' yes
11857 do
11858   # Use a header file that comes with gcc, so configuring glibc
11859   # with a fresh cross-compiler works.
11860   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11861   # <limits.h> exists even on freestanding compilers.
11862   # On the NeXT, cc -E runs the code through the compiler's parser,
11863   # not just through cpp. "Syntax error" is here to catch this case.
11864   cat >conftest.$ac_ext <<_ACEOF
11865 /* confdefs.h.  */
11866 _ACEOF
11867 cat confdefs.h >>conftest.$ac_ext
11868 cat >>conftest.$ac_ext <<_ACEOF
11869 /* end confdefs.h.  */
11870 #ifdef __STDC__
11871 # include <limits.h>
11872 #else
11873 # include <assert.h>
11874 #endif
11875                      Syntax error
11876 _ACEOF
11877 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11878   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11879   ac_status=$?
11880   grep -v '^ *+' conftest.er1 >conftest.err
11881   rm -f conftest.er1
11882   cat conftest.err >&5
11883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11884   (exit $ac_status); } >/dev/null; then
11885   if test -s conftest.err; then
11886     ac_cpp_err=$ac_c_preproc_warn_flag
11887     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11888   else
11889     ac_cpp_err=
11890   fi
11891 else
11892   ac_cpp_err=yes
11893 fi
11894 if test -z "$ac_cpp_err"; then
11895   :
11896 else
11897   echo "$as_me: failed program was:" >&5
11898 sed 's/^/| /' conftest.$ac_ext >&5
11899
11900   # Broken: fails on valid input.
11901 continue
11902 fi
11903 rm -f conftest.err conftest.$ac_ext
11904
11905   # OK, works on sane cases.  Now check whether non-existent headers
11906   # can be detected and how.
11907   cat >conftest.$ac_ext <<_ACEOF
11908 /* confdefs.h.  */
11909 _ACEOF
11910 cat confdefs.h >>conftest.$ac_ext
11911 cat >>conftest.$ac_ext <<_ACEOF
11912 /* end confdefs.h.  */
11913 #include <ac_nonexistent.h>
11914 _ACEOF
11915 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11916   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11917   ac_status=$?
11918   grep -v '^ *+' conftest.er1 >conftest.err
11919   rm -f conftest.er1
11920   cat conftest.err >&5
11921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11922   (exit $ac_status); } >/dev/null; then
11923   if test -s conftest.err; then
11924     ac_cpp_err=$ac_c_preproc_warn_flag
11925     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11926   else
11927     ac_cpp_err=
11928   fi
11929 else
11930   ac_cpp_err=yes
11931 fi
11932 if test -z "$ac_cpp_err"; then
11933   # Broken: success on invalid input.
11934 continue
11935 else
11936   echo "$as_me: failed program was:" >&5
11937 sed 's/^/| /' conftest.$ac_ext >&5
11938
11939   # Passes both tests.
11940 ac_preproc_ok=:
11941 break
11942 fi
11943 rm -f conftest.err conftest.$ac_ext
11944
11945 done
11946 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
11947 rm -f conftest.err conftest.$ac_ext
11948 if $ac_preproc_ok; then
11949   :
11950 else
11951   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
11952 See \`config.log' for more details." >&5
11953 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
11954 See \`config.log' for more details." >&2;}
11955    { (exit 1); exit 1; }; }
11956 fi
11957
11958 ac_ext=c
11959 ac_cpp='$CPP $CPPFLAGS'
11960 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11961 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11962 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11963
11964
11965 case $host_os in
11966   *mingw32* ) ac_cv_mingw32=yes ;;
11967   *cygwin* ) ac_cv_cygwin=yes ;;
11968 esac
11969
11970
11971
11972
11973 cat >>confdefs.h <<_ACEOF
11974 #define EXEEXT "${EXEEXT}"
11975 _ACEOF
11976
11977
11978 echo "$as_me:$LINENO: checking for be_app in -lbe" >&5
11979 echo $ECHO_N "checking for be_app in -lbe... $ECHO_C" >&6
11980 if test "${ac_cv_lib_be_be_app+set}" = set; then
11981   echo $ECHO_N "(cached) $ECHO_C" >&6
11982 else
11983   ac_check_lib_save_LIBS=$LIBS
11984 LIBS="-lbe -lroot -lnet $LIBS"
11985 cat >conftest.$ac_ext <<_ACEOF
11986 /* confdefs.h.  */
11987 _ACEOF
11988 cat confdefs.h >>conftest.$ac_ext
11989 cat >>conftest.$ac_ext <<_ACEOF
11990 /* end confdefs.h.  */
11991
11992 /* Override any gcc2 internal prototype to avoid an error.  */
11993 #ifdef __cplusplus
11994 extern "C"
11995 #endif
11996 /* We use char because int might match the return type of a gcc2
11997    builtin and then its argument prototype would still apply.  */
11998 char be_app ();
11999 int
12000 main ()
12001 {
12002 be_app ();
12003   ;
12004   return 0;
12005 }
12006 _ACEOF
12007 rm -f conftest.$ac_objext conftest$ac_exeext
12008 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12009   (eval $ac_link) 2>conftest.er1
12010   ac_status=$?
12011   grep -v '^ *+' conftest.er1 >conftest.err
12012   rm -f conftest.er1
12013   cat conftest.err >&5
12014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12015   (exit $ac_status); } &&
12016          { ac_try='test -z "$ac_c_werror_flag"
12017                          || test ! -s conftest.err'
12018   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12019   (eval $ac_try) 2>&5
12020   ac_status=$?
12021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12022   (exit $ac_status); }; } &&
12023          { ac_try='test -s conftest$ac_exeext'
12024   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12025   (eval $ac_try) 2>&5
12026   ac_status=$?
12027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12028   (exit $ac_status); }; }; then
12029   ac_cv_lib_be_be_app=yes
12030 else
12031   echo "$as_me: failed program was:" >&5
12032 sed 's/^/| /' conftest.$ac_ext >&5
12033
12034 ac_cv_lib_be_be_app=no
12035 fi
12036 rm -f conftest.err conftest.$ac_objext \
12037       conftest$ac_exeext conftest.$ac_ext
12038 LIBS=$ac_check_lib_save_LIBS
12039 fi
12040 echo "$as_me:$LINENO: result: $ac_cv_lib_be_be_app" >&5
12041 echo "${ECHO_T}$ac_cv_lib_be_be_app" >&6
12042 if test $ac_cv_lib_be_be_app = yes; then
12043   LIBS="$LIBS -lbe -lroot -lnet"
12044 else
12045   :
12046 fi
12047
12048
12049 ac_ext=c
12050 ac_cpp='$CPP $CPPFLAGS'
12051 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12052 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12053 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12054 if test -n "$ac_tool_prefix"; then
12055   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
12056 set dummy ${ac_tool_prefix}gcc; ac_word=$2
12057 echo "$as_me:$LINENO: checking for $ac_word" >&5
12058 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12059 if test "${ac_cv_prog_CC+set}" = set; then
12060   echo $ECHO_N "(cached) $ECHO_C" >&6
12061 else
12062   if test -n "$CC"; then
12063   ac_cv_prog_CC="$CC" # Let the user override the test.
12064 else
12065 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12066 for as_dir in $PATH
12067 do
12068   IFS=$as_save_IFS
12069   test -z "$as_dir" && as_dir=.
12070   for ac_exec_ext in '' $ac_executable_extensions; do
12071   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12072     ac_cv_prog_CC="${ac_tool_prefix}gcc"
12073     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12074     break 2
12075   fi
12076 done
12077 done
12078
12079 fi
12080 fi
12081 CC=$ac_cv_prog_CC
12082 if test -n "$CC"; then
12083   echo "$as_me:$LINENO: result: $CC" >&5
12084 echo "${ECHO_T}$CC" >&6
12085 else
12086   echo "$as_me:$LINENO: result: no" >&5
12087 echo "${ECHO_T}no" >&6
12088 fi
12089
12090 fi
12091 if test -z "$ac_cv_prog_CC"; then
12092   ac_ct_CC=$CC
12093   # Extract the first word of "gcc", so it can be a program name with args.
12094 set dummy gcc; ac_word=$2
12095 echo "$as_me:$LINENO: checking for $ac_word" >&5
12096 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12097 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
12098   echo $ECHO_N "(cached) $ECHO_C" >&6
12099 else
12100   if test -n "$ac_ct_CC"; then
12101   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12102 else
12103 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12104 for as_dir in $PATH
12105 do
12106   IFS=$as_save_IFS
12107   test -z "$as_dir" && as_dir=.
12108   for ac_exec_ext in '' $ac_executable_extensions; do
12109   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12110     ac_cv_prog_ac_ct_CC="gcc"
12111     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12112     break 2
12113   fi
12114 done
12115 done
12116
12117 fi
12118 fi
12119 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12120 if test -n "$ac_ct_CC"; then
12121   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
12122 echo "${ECHO_T}$ac_ct_CC" >&6
12123 else
12124   echo "$as_me:$LINENO: result: no" >&5
12125 echo "${ECHO_T}no" >&6
12126 fi
12127
12128   CC=$ac_ct_CC
12129 else
12130   CC="$ac_cv_prog_CC"
12131 fi
12132
12133 if test -z "$CC"; then
12134   if test -n "$ac_tool_prefix"; then
12135   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
12136 set dummy ${ac_tool_prefix}cc; ac_word=$2
12137 echo "$as_me:$LINENO: checking for $ac_word" >&5
12138 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12139 if test "${ac_cv_prog_CC+set}" = set; then
12140   echo $ECHO_N "(cached) $ECHO_C" >&6
12141 else
12142   if test -n "$CC"; then
12143   ac_cv_prog_CC="$CC" # Let the user override the test.
12144 else
12145 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12146 for as_dir in $PATH
12147 do
12148   IFS=$as_save_IFS
12149   test -z "$as_dir" && as_dir=.
12150   for ac_exec_ext in '' $ac_executable_extensions; do
12151   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12152     ac_cv_prog_CC="${ac_tool_prefix}cc"
12153     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12154     break 2
12155   fi
12156 done
12157 done
12158
12159 fi
12160 fi
12161 CC=$ac_cv_prog_CC
12162 if test -n "$CC"; then
12163   echo "$as_me:$LINENO: result: $CC" >&5
12164 echo "${ECHO_T}$CC" >&6
12165 else
12166   echo "$as_me:$LINENO: result: no" >&5
12167 echo "${ECHO_T}no" >&6
12168 fi
12169
12170 fi
12171 if test -z "$ac_cv_prog_CC"; then
12172   ac_ct_CC=$CC
12173   # Extract the first word of "cc", so it can be a program name with args.
12174 set dummy cc; ac_word=$2
12175 echo "$as_me:$LINENO: checking for $ac_word" >&5
12176 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12177 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
12178   echo $ECHO_N "(cached) $ECHO_C" >&6
12179 else
12180   if test -n "$ac_ct_CC"; then
12181   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12182 else
12183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12184 for as_dir in $PATH
12185 do
12186   IFS=$as_save_IFS
12187   test -z "$as_dir" && as_dir=.
12188   for ac_exec_ext in '' $ac_executable_extensions; do
12189   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12190     ac_cv_prog_ac_ct_CC="cc"
12191     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12192     break 2
12193   fi
12194 done
12195 done
12196
12197 fi
12198 fi
12199 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12200 if test -n "$ac_ct_CC"; then
12201   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
12202 echo "${ECHO_T}$ac_ct_CC" >&6
12203 else
12204   echo "$as_me:$LINENO: result: no" >&5
12205 echo "${ECHO_T}no" >&6
12206 fi
12207
12208   CC=$ac_ct_CC
12209 else
12210   CC="$ac_cv_prog_CC"
12211 fi
12212
12213 fi
12214 if test -z "$CC"; then
12215   # Extract the first word of "cc", so it can be a program name with args.
12216 set dummy cc; ac_word=$2
12217 echo "$as_me:$LINENO: checking for $ac_word" >&5
12218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12219 if test "${ac_cv_prog_CC+set}" = set; then
12220   echo $ECHO_N "(cached) $ECHO_C" >&6
12221 else
12222   if test -n "$CC"; then
12223   ac_cv_prog_CC="$CC" # Let the user override the test.
12224 else
12225   ac_prog_rejected=no
12226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12227 for as_dir in $PATH
12228 do
12229   IFS=$as_save_IFS
12230   test -z "$as_dir" && as_dir=.
12231   for ac_exec_ext in '' $ac_executable_extensions; do
12232   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12233     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
12234        ac_prog_rejected=yes
12235        continue
12236      fi
12237     ac_cv_prog_CC="cc"
12238     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12239     break 2
12240   fi
12241 done
12242 done
12243
12244 if test $ac_prog_rejected = yes; then
12245   # We found a bogon in the path, so make sure we never use it.
12246   set dummy $ac_cv_prog_CC
12247   shift
12248   if test $# != 0; then
12249     # We chose a different compiler from the bogus one.
12250     # However, it has the same basename, so the bogon will be chosen
12251     # first if we set CC to just the basename; use the full file name.
12252     shift
12253     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
12254   fi
12255 fi
12256 fi
12257 fi
12258 CC=$ac_cv_prog_CC
12259 if test -n "$CC"; then
12260   echo "$as_me:$LINENO: result: $CC" >&5
12261 echo "${ECHO_T}$CC" >&6
12262 else
12263   echo "$as_me:$LINENO: result: no" >&5
12264 echo "${ECHO_T}no" >&6
12265 fi
12266
12267 fi
12268 if test -z "$CC"; then
12269   if test -n "$ac_tool_prefix"; then
12270   for ac_prog in cl
12271   do
12272     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12273 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12274 echo "$as_me:$LINENO: checking for $ac_word" >&5
12275 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12276 if test "${ac_cv_prog_CC+set}" = set; then
12277   echo $ECHO_N "(cached) $ECHO_C" >&6
12278 else
12279   if test -n "$CC"; then
12280   ac_cv_prog_CC="$CC" # Let the user override the test.
12281 else
12282 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12283 for as_dir in $PATH
12284 do
12285   IFS=$as_save_IFS
12286   test -z "$as_dir" && as_dir=.
12287   for ac_exec_ext in '' $ac_executable_extensions; do
12288   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12289     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
12290     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12291     break 2
12292   fi
12293 done
12294 done
12295
12296 fi
12297 fi
12298 CC=$ac_cv_prog_CC
12299 if test -n "$CC"; then
12300   echo "$as_me:$LINENO: result: $CC" >&5
12301 echo "${ECHO_T}$CC" >&6
12302 else
12303   echo "$as_me:$LINENO: result: no" >&5
12304 echo "${ECHO_T}no" >&6
12305 fi
12306
12307     test -n "$CC" && break
12308   done
12309 fi
12310 if test -z "$CC"; then
12311   ac_ct_CC=$CC
12312   for ac_prog in cl
12313 do
12314   # Extract the first word of "$ac_prog", so it can be a program name with args.
12315 set dummy $ac_prog; ac_word=$2
12316 echo "$as_me:$LINENO: checking for $ac_word" >&5
12317 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12318 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
12319   echo $ECHO_N "(cached) $ECHO_C" >&6
12320 else
12321   if test -n "$ac_ct_CC"; then
12322   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12323 else
12324 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12325 for as_dir in $PATH
12326 do
12327   IFS=$as_save_IFS
12328   test -z "$as_dir" && as_dir=.
12329   for ac_exec_ext in '' $ac_executable_extensions; do
12330   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12331     ac_cv_prog_ac_ct_CC="$ac_prog"
12332     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12333     break 2
12334   fi
12335 done
12336 done
12337
12338 fi
12339 fi
12340 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12341 if test -n "$ac_ct_CC"; then
12342   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
12343 echo "${ECHO_T}$ac_ct_CC" >&6
12344 else
12345   echo "$as_me:$LINENO: result: no" >&5
12346 echo "${ECHO_T}no" >&6
12347 fi
12348
12349   test -n "$ac_ct_CC" && break
12350 done
12351
12352   CC=$ac_ct_CC
12353 fi
12354
12355 fi
12356
12357
12358 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
12359 See \`config.log' for more details." >&5
12360 echo "$as_me: error: no acceptable C compiler found in \$PATH
12361 See \`config.log' for more details." >&2;}
12362    { (exit 1); exit 1; }; }
12363
12364 # Provide some information about the compiler.
12365 echo "$as_me:$LINENO:" \
12366      "checking for C compiler version" >&5
12367 ac_compiler=`set X $ac_compile; echo $2`
12368 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
12369   (eval $ac_compiler --version </dev/null >&5) 2>&5
12370   ac_status=$?
12371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12372   (exit $ac_status); }
12373 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
12374   (eval $ac_compiler -v </dev/null >&5) 2>&5
12375   ac_status=$?
12376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12377   (exit $ac_status); }
12378 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
12379   (eval $ac_compiler -V </dev/null >&5) 2>&5
12380   ac_status=$?
12381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12382   (exit $ac_status); }
12383
12384 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
12385 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
12386 if test "${ac_cv_c_compiler_gnu+set}" = set; then
12387   echo $ECHO_N "(cached) $ECHO_C" >&6
12388 else
12389   cat >conftest.$ac_ext <<_ACEOF
12390 /* confdefs.h.  */
12391 _ACEOF
12392 cat confdefs.h >>conftest.$ac_ext
12393 cat >>conftest.$ac_ext <<_ACEOF
12394 /* end confdefs.h.  */
12395
12396 int
12397 main ()
12398 {
12399 #ifndef __GNUC__
12400        choke me
12401 #endif
12402
12403   ;
12404   return 0;
12405 }
12406 _ACEOF
12407 rm -f conftest.$ac_objext
12408 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12409   (eval $ac_compile) 2>conftest.er1
12410   ac_status=$?
12411   grep -v '^ *+' conftest.er1 >conftest.err
12412   rm -f conftest.er1
12413   cat conftest.err >&5
12414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12415   (exit $ac_status); } &&
12416          { ac_try='test -z "$ac_c_werror_flag"
12417                          || test ! -s conftest.err'
12418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12419   (eval $ac_try) 2>&5
12420   ac_status=$?
12421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12422   (exit $ac_status); }; } &&
12423          { ac_try='test -s conftest.$ac_objext'
12424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12425   (eval $ac_try) 2>&5
12426   ac_status=$?
12427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12428   (exit $ac_status); }; }; then
12429   ac_compiler_gnu=yes
12430 else
12431   echo "$as_me: failed program was:" >&5
12432 sed 's/^/| /' conftest.$ac_ext >&5
12433
12434 ac_compiler_gnu=no
12435 fi
12436 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12437 ac_cv_c_compiler_gnu=$ac_compiler_gnu
12438
12439 fi
12440 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
12441 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
12442 GCC=`test $ac_compiler_gnu = yes && echo yes`
12443 ac_test_CFLAGS=${CFLAGS+set}
12444 ac_save_CFLAGS=$CFLAGS
12445 CFLAGS="-g"
12446 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
12447 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
12448 if test "${ac_cv_prog_cc_g+set}" = set; then
12449   echo $ECHO_N "(cached) $ECHO_C" >&6
12450 else
12451   cat >conftest.$ac_ext <<_ACEOF
12452 /* confdefs.h.  */
12453 _ACEOF
12454 cat confdefs.h >>conftest.$ac_ext
12455 cat >>conftest.$ac_ext <<_ACEOF
12456 /* end confdefs.h.  */
12457
12458 int
12459 main ()
12460 {
12461
12462   ;
12463   return 0;
12464 }
12465 _ACEOF
12466 rm -f conftest.$ac_objext
12467 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12468   (eval $ac_compile) 2>conftest.er1
12469   ac_status=$?
12470   grep -v '^ *+' conftest.er1 >conftest.err
12471   rm -f conftest.er1
12472   cat conftest.err >&5
12473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12474   (exit $ac_status); } &&
12475          { ac_try='test -z "$ac_c_werror_flag"
12476                          || test ! -s conftest.err'
12477   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12478   (eval $ac_try) 2>&5
12479   ac_status=$?
12480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12481   (exit $ac_status); }; } &&
12482          { ac_try='test -s conftest.$ac_objext'
12483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12484   (eval $ac_try) 2>&5
12485   ac_status=$?
12486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12487   (exit $ac_status); }; }; then
12488   ac_cv_prog_cc_g=yes
12489 else
12490   echo "$as_me: failed program was:" >&5
12491 sed 's/^/| /' conftest.$ac_ext >&5
12492
12493 ac_cv_prog_cc_g=no
12494 fi
12495 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12496 fi
12497 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
12498 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
12499 if test "$ac_test_CFLAGS" = set; then
12500   CFLAGS=$ac_save_CFLAGS
12501 elif test $ac_cv_prog_cc_g = yes; then
12502   if test "$GCC" = yes; then
12503     CFLAGS="-g -O2"
12504   else
12505     CFLAGS="-g"
12506   fi
12507 else
12508   if test "$GCC" = yes; then
12509     CFLAGS="-O2"
12510   else
12511     CFLAGS=
12512   fi
12513 fi
12514 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
12515 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
12516 if test "${ac_cv_prog_cc_stdc+set}" = set; then
12517   echo $ECHO_N "(cached) $ECHO_C" >&6
12518 else
12519   ac_cv_prog_cc_stdc=no
12520 ac_save_CC=$CC
12521 cat >conftest.$ac_ext <<_ACEOF
12522 /* confdefs.h.  */
12523 _ACEOF
12524 cat confdefs.h >>conftest.$ac_ext
12525 cat >>conftest.$ac_ext <<_ACEOF
12526 /* end confdefs.h.  */
12527 #include <stdarg.h>
12528 #include <stdio.h>
12529 #include <sys/types.h>
12530 #include <sys/stat.h>
12531 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12532 struct buf { int x; };
12533 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12534 static char *e (p, i)
12535      char **p;
12536      int i;
12537 {
12538   return p[i];
12539 }
12540 static char *f (char * (*g) (char **, int), char **p, ...)
12541 {
12542   char *s;
12543   va_list v;
12544   va_start (v,p);
12545   s = g (p, va_arg (v,int));
12546   va_end (v);
12547   return s;
12548 }
12549
12550 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
12551    function prototypes and stuff, but not '\xHH' hex character constants.
12552    These don't provoke an error unfortunately, instead are silently treated
12553    as 'x'.  The following induces an error, until -std1 is added to get
12554    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
12555    array size at least.  It's necessary to write '\x00'==0 to get something
12556    that's true only with -std1.  */
12557 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
12558
12559 int test (int i, double x);
12560 struct s1 {int (*f) (int a);};
12561 struct s2 {int (*f) (double a);};
12562 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12563 int argc;
12564 char **argv;
12565 int
12566 main ()
12567 {
12568 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12569   ;
12570   return 0;
12571 }
12572 _ACEOF
12573 # Don't try gcc -ansi; that turns off useful extensions and
12574 # breaks some systems' header files.
12575 # AIX                   -qlanglvl=ansi
12576 # Ultrix and OSF/1      -std1
12577 # HP-UX 10.20 and later -Ae
12578 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12579 # SVR4                  -Xc -D__EXTENSIONS__
12580 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12581 do
12582   CC="$ac_save_CC $ac_arg"
12583   rm -f conftest.$ac_objext
12584 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12585   (eval $ac_compile) 2>conftest.er1
12586   ac_status=$?
12587   grep -v '^ *+' conftest.er1 >conftest.err
12588   rm -f conftest.er1
12589   cat conftest.err >&5
12590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12591   (exit $ac_status); } &&
12592          { ac_try='test -z "$ac_c_werror_flag"
12593                          || test ! -s conftest.err'
12594   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12595   (eval $ac_try) 2>&5
12596   ac_status=$?
12597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12598   (exit $ac_status); }; } &&
12599          { ac_try='test -s conftest.$ac_objext'
12600   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12601   (eval $ac_try) 2>&5
12602   ac_status=$?
12603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12604   (exit $ac_status); }; }; then
12605   ac_cv_prog_cc_stdc=$ac_arg
12606 break
12607 else
12608   echo "$as_me: failed program was:" >&5
12609 sed 's/^/| /' conftest.$ac_ext >&5
12610
12611 fi
12612 rm -f conftest.err conftest.$ac_objext
12613 done
12614 rm -f conftest.$ac_ext conftest.$ac_objext
12615 CC=$ac_save_CC
12616
12617 fi
12618
12619 case "x$ac_cv_prog_cc_stdc" in
12620   x|xno)
12621     echo "$as_me:$LINENO: result: none needed" >&5
12622 echo "${ECHO_T}none needed" >&6 ;;
12623   *)
12624     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
12625 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12626     CC="$CC $ac_cv_prog_cc_stdc" ;;
12627 esac
12628
12629 # Some people use a C++ compiler to compile C.  Since we use `exit',
12630 # in C++ we need to declare it.  In case someone uses the same compiler
12631 # for both compiling C and C++ we need to have the C++ compiler decide
12632 # the declaration of exit, since it's the most demanding environment.
12633 cat >conftest.$ac_ext <<_ACEOF
12634 #ifndef __cplusplus
12635   choke me
12636 #endif
12637 _ACEOF
12638 rm -f conftest.$ac_objext
12639 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12640   (eval $ac_compile) 2>conftest.er1
12641   ac_status=$?
12642   grep -v '^ *+' conftest.er1 >conftest.err
12643   rm -f conftest.er1
12644   cat conftest.err >&5
12645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12646   (exit $ac_status); } &&
12647          { ac_try='test -z "$ac_c_werror_flag"
12648                          || test ! -s conftest.err'
12649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12650   (eval $ac_try) 2>&5
12651   ac_status=$?
12652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12653   (exit $ac_status); }; } &&
12654          { ac_try='test -s conftest.$ac_objext'
12655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12656   (eval $ac_try) 2>&5
12657   ac_status=$?
12658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12659   (exit $ac_status); }; }; then
12660   for ac_declaration in \
12661    '' \
12662    'extern "C" void std::exit (int) throw (); using std::exit;' \
12663    'extern "C" void std::exit (int); using std::exit;' \
12664    'extern "C" void exit (int) throw ();' \
12665    'extern "C" void exit (int);' \
12666    'void exit (int);'
12667 do
12668   cat >conftest.$ac_ext <<_ACEOF
12669 /* confdefs.h.  */
12670 _ACEOF
12671 cat confdefs.h >>conftest.$ac_ext
12672 cat >>conftest.$ac_ext <<_ACEOF
12673 /* end confdefs.h.  */
12674 $ac_declaration
12675 #include <stdlib.h>
12676 int
12677 main ()
12678 {
12679 exit (42);
12680   ;
12681   return 0;
12682 }
12683 _ACEOF
12684 rm -f conftest.$ac_objext
12685 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12686   (eval $ac_compile) 2>conftest.er1
12687   ac_status=$?
12688   grep -v '^ *+' conftest.er1 >conftest.err
12689   rm -f conftest.er1
12690   cat conftest.err >&5
12691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12692   (exit $ac_status); } &&
12693          { ac_try='test -z "$ac_c_werror_flag"
12694                          || test ! -s conftest.err'
12695   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12696   (eval $ac_try) 2>&5
12697   ac_status=$?
12698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12699   (exit $ac_status); }; } &&
12700          { ac_try='test -s conftest.$ac_objext'
12701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12702   (eval $ac_try) 2>&5
12703   ac_status=$?
12704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12705   (exit $ac_status); }; }; then
12706   :
12707 else
12708   echo "$as_me: failed program was:" >&5
12709 sed 's/^/| /' conftest.$ac_ext >&5
12710
12711 continue
12712 fi
12713 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12714   cat >conftest.$ac_ext <<_ACEOF
12715 /* confdefs.h.  */
12716 _ACEOF
12717 cat confdefs.h >>conftest.$ac_ext
12718 cat >>conftest.$ac_ext <<_ACEOF
12719 /* end confdefs.h.  */
12720 $ac_declaration
12721 int
12722 main ()
12723 {
12724 exit (42);
12725   ;
12726   return 0;
12727 }
12728 _ACEOF
12729 rm -f conftest.$ac_objext
12730 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12731   (eval $ac_compile) 2>conftest.er1
12732   ac_status=$?
12733   grep -v '^ *+' conftest.er1 >conftest.err
12734   rm -f conftest.er1
12735   cat conftest.err >&5
12736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12737   (exit $ac_status); } &&
12738          { ac_try='test -z "$ac_c_werror_flag"
12739                          || test ! -s conftest.err'
12740   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12741   (eval $ac_try) 2>&5
12742   ac_status=$?
12743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12744   (exit $ac_status); }; } &&
12745          { ac_try='test -s conftest.$ac_objext'
12746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12747   (eval $ac_try) 2>&5
12748   ac_status=$?
12749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12750   (exit $ac_status); }; }; then
12751   break
12752 else
12753   echo "$as_me: failed program was:" >&5
12754 sed 's/^/| /' conftest.$ac_ext >&5
12755
12756 fi
12757 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12758 done
12759 rm -f conftest*
12760 if test -n "$ac_declaration"; then
12761   echo '#ifdef __cplusplus' >>confdefs.h
12762   echo $ac_declaration      >>confdefs.h
12763   echo '#endif'             >>confdefs.h
12764 fi
12765
12766 else
12767   echo "$as_me: failed program was:" >&5
12768 sed 's/^/| /' conftest.$ac_ext >&5
12769
12770 fi
12771 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12772 ac_ext=c
12773 ac_cpp='$CPP $CPPFLAGS'
12774 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12775 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12776 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12777
12778 depcc="$CC"   am_compiler_list=
12779
12780 echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
12781 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
12782 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
12783   echo $ECHO_N "(cached) $ECHO_C" >&6
12784 else
12785   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
12786   # We make a subdir and do the tests there.  Otherwise we can end up
12787   # making bogus files that we don't know about and never remove.  For
12788   # instance it was reported that on HP-UX the gcc test will end up
12789   # making a dummy file named `D' -- because `-MD' means `put the output
12790   # in D'.
12791   mkdir conftest.dir
12792   # Copy depcomp to subdir because otherwise we won't find it if we're
12793   # using a relative directory.
12794   cp "$am_depcomp" conftest.dir
12795   cd conftest.dir
12796   # We will build objects and dependencies in a subdirectory because
12797   # it helps to detect inapplicable dependency modes.  For instance
12798   # both Tru64's cc and ICC support -MD to output dependencies as a
12799   # side effect of compilation, but ICC will put the dependencies in
12800   # the current directory while Tru64 will put them in the object
12801   # directory.
12802   mkdir sub
12803
12804   am_cv_CC_dependencies_compiler_type=none
12805   if test "$am_compiler_list" = ""; then
12806      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
12807   fi
12808   for depmode in $am_compiler_list; do
12809     # Setup a source with many dependencies, because some compilers
12810     # like to wrap large dependency lists on column 80 (with \), and
12811     # we should not choose a depcomp mode which is confused by this.
12812     #
12813     # We need to recreate these files for each test, as the compiler may
12814     # overwrite some of them when testing with obscure command lines.
12815     # This happens at least with the AIX C compiler.
12816     : > sub/conftest.c
12817     for i in 1 2 3 4 5 6; do
12818       echo '#include "conftst'$i'.h"' >> sub/conftest.c
12819       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
12820       # Solaris 8's {/usr,}/bin/sh.
12821       touch sub/conftst$i.h
12822     done
12823     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
12824
12825     case $depmode in
12826     nosideeffect)
12827       # after this tag, mechanisms are not by side-effect, so they'll
12828       # only be used when explicitly requested
12829       if test "x$enable_dependency_tracking" = xyes; then
12830         continue
12831       else
12832         break
12833       fi
12834       ;;
12835     none) break ;;
12836     esac
12837     # We check with `-c' and `-o' for the sake of the "dashmstdout"
12838     # mode.  It turns out that the SunPro C++ compiler does not properly
12839     # handle `-M -o', and we need to detect this.
12840     if depmode=$depmode \
12841        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
12842        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
12843        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
12844          >/dev/null 2>conftest.err &&
12845        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
12846        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
12847        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
12848       # icc doesn't choke on unknown options, it will just issue warnings
12849       # or remarks (even with -Werror).  So we grep stderr for any message
12850       # that says an option was ignored or not supported.
12851       # When given -MP, icc 7.0 and 7.1 complain thusly:
12852       #   icc: Command line warning: ignoring option '-M'; no argument required
12853       # The diagnosis changed in icc 8.0:
12854       #   icc: Command line remark: option '-MP' not supported
12855       if (grep 'ignoring option' conftest.err ||
12856           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
12857         am_cv_CC_dependencies_compiler_type=$depmode
12858         break
12859       fi
12860     fi
12861   done
12862
12863   cd ..
12864   rm -rf conftest.dir
12865 else
12866   am_cv_CC_dependencies_compiler_type=none
12867 fi
12868
12869 fi
12870 echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
12871 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
12872 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
12873
12874
12875
12876 if
12877   test "x$enable_dependency_tracking" != xno \
12878   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
12879   am__fastdepCC_TRUE=
12880   am__fastdepCC_FALSE='#'
12881 else
12882   am__fastdepCC_TRUE='#'
12883   am__fastdepCC_FALSE=
12884 fi
12885
12886
12887 if test "X${ac_cv_prog_cc_stdc}" = "Xno" ; then
12888         { { echo "$as_me:$LINENO: error: OpenLDAP requires compiler to support STDC constructs." >&5
12889 echo "$as_me: error: OpenLDAP requires compiler to support STDC constructs." >&2;}
12890    { (exit 1); exit 1; }; }
12891 fi
12892
12893 # test for make depend flag
12894 OL_MKDEP=
12895 OL_MKDEP_FLAGS=
12896 if test -z "${MKDEP}"; then
12897         OL_MKDEP="${CC-cc}"
12898         if test -z "${MKDEP_FLAGS}"; then
12899                 echo "$as_me:$LINENO: checking for ${OL_MKDEP} depend flag" >&5
12900 echo $ECHO_N "checking for ${OL_MKDEP} depend flag... $ECHO_C" >&6
12901 if test "${ol_cv_mkdep+set}" = set; then
12902   echo $ECHO_N "(cached) $ECHO_C" >&6
12903 else
12904
12905                         ol_cv_mkdep=no
12906                         for flag in "-M" "-xM"; do
12907                                 cat > conftest.c <<EOF
12908  noCode;
12909 EOF
12910                                 if { ac_try='$OL_MKDEP $flag conftest.c'
12911   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12912   (eval $ac_try) 2>&5
12913   ac_status=$?
12914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12915   (exit $ac_status); }; } \
12916                                         | grep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
12917                                 then
12918                                         if test ! -f conftest."${ac_object}" ; then
12919                                                 ol_cv_mkdep=$flag
12920                                                 OL_MKDEP_FLAGS="$flag"
12921                                                 break
12922                                         fi
12923                                 fi
12924                         done
12925                         rm -f conftest*
12926
12927 fi
12928 echo "$as_me:$LINENO: result: $ol_cv_mkdep" >&5
12929 echo "${ECHO_T}$ol_cv_mkdep" >&6
12930         else
12931                 cc_cv_mkdep=yes
12932                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
12933         fi
12934 else
12935         cc_cv_mkdep=yes
12936         OL_MKDEP="${MKDEP}"
12937         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
12938 fi
12939
12940
12941
12942 if test "${ol_cv_mkdep}" = no ; then
12943         # this will soon become an error
12944         { echo "$as_me:$LINENO: WARNING: do not know how to generate dependencies" >&5
12945 echo "$as_me: WARNING: do not know how to generate dependencies" >&2;}
12946 fi
12947
12948 echo "$as_me:$LINENO: checking for afopen in -ls" >&5
12949 echo $ECHO_N "checking for afopen in -ls... $ECHO_C" >&6
12950 if test "${ac_cv_lib_s_afopen+set}" = set; then
12951   echo $ECHO_N "(cached) $ECHO_C" >&6
12952 else
12953   ac_check_lib_save_LIBS=$LIBS
12954 LIBS="-ls  $LIBS"
12955 cat >conftest.$ac_ext <<_ACEOF
12956 /* confdefs.h.  */
12957 _ACEOF
12958 cat confdefs.h >>conftest.$ac_ext
12959 cat >>conftest.$ac_ext <<_ACEOF
12960 /* end confdefs.h.  */
12961
12962 /* Override any gcc2 internal prototype to avoid an error.  */
12963 #ifdef __cplusplus
12964 extern "C"
12965 #endif
12966 /* We use char because int might match the return type of a gcc2
12967    builtin and then its argument prototype would still apply.  */
12968 char afopen ();
12969 int
12970 main ()
12971 {
12972 afopen ();
12973   ;
12974   return 0;
12975 }
12976 _ACEOF
12977 rm -f conftest.$ac_objext conftest$ac_exeext
12978 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12979   (eval $ac_link) 2>conftest.er1
12980   ac_status=$?
12981   grep -v '^ *+' conftest.er1 >conftest.err
12982   rm -f conftest.er1
12983   cat conftest.err >&5
12984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12985   (exit $ac_status); } &&
12986          { ac_try='test -z "$ac_c_werror_flag"
12987                          || test ! -s conftest.err'
12988   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12989   (eval $ac_try) 2>&5
12990   ac_status=$?
12991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12992   (exit $ac_status); }; } &&
12993          { ac_try='test -s conftest$ac_exeext'
12994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12995   (eval $ac_try) 2>&5
12996   ac_status=$?
12997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12998   (exit $ac_status); }; }; then
12999   ac_cv_lib_s_afopen=yes
13000 else
13001   echo "$as_me: failed program was:" >&5
13002 sed 's/^/| /' conftest.$ac_ext >&5
13003
13004 ac_cv_lib_s_afopen=no
13005 fi
13006 rm -f conftest.err conftest.$ac_objext \
13007       conftest$ac_exeext conftest.$ac_ext
13008 LIBS=$ac_check_lib_save_LIBS
13009 fi
13010 echo "$as_me:$LINENO: result: $ac_cv_lib_s_afopen" >&5
13011 echo "${ECHO_T}$ac_cv_lib_s_afopen" >&6
13012 if test $ac_cv_lib_s_afopen = yes; then
13013
13014         AUTH_LIBS=-ls
13015
13016 cat >>confdefs.h <<\_ACEOF
13017 #define HAVE_AIX_SECURITY 1
13018 _ACEOF
13019
13020
13021 fi
13022
13023
13024 case "$target" in
13025 *-ibm-openedition)
13026         ac_cv_func_getopt=no
13027
13028 cat >>confdefs.h <<\_ACEOF
13029 #define BOTH_STRINGS_H 1
13030 _ACEOF
13031
13032         ;;
13033 esac
13034
13035 ol_link_modules=no
13036 WITH_MODULES_ENABLED=no
13037 if test $ol_enable_modules != no ; then
13038
13039 for ac_header in ltdl.h
13040 do
13041 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13042 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13043   echo "$as_me:$LINENO: checking for $ac_header" >&5
13044 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13045 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13046   echo $ECHO_N "(cached) $ECHO_C" >&6
13047 fi
13048 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13049 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13050 else
13051   # Is the header compilable?
13052 echo "$as_me:$LINENO: checking $ac_header usability" >&5
13053 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13054 cat >conftest.$ac_ext <<_ACEOF
13055 /* confdefs.h.  */
13056 _ACEOF
13057 cat confdefs.h >>conftest.$ac_ext
13058 cat >>conftest.$ac_ext <<_ACEOF
13059 /* end confdefs.h.  */
13060 $ac_includes_default
13061 #include <$ac_header>
13062 _ACEOF
13063 rm -f conftest.$ac_objext
13064 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13065   (eval $ac_compile) 2>conftest.er1
13066   ac_status=$?
13067   grep -v '^ *+' conftest.er1 >conftest.err
13068   rm -f conftest.er1
13069   cat conftest.err >&5
13070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13071   (exit $ac_status); } &&
13072          { ac_try='test -z "$ac_c_werror_flag"
13073                          || test ! -s conftest.err'
13074   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13075   (eval $ac_try) 2>&5
13076   ac_status=$?
13077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13078   (exit $ac_status); }; } &&
13079          { ac_try='test -s conftest.$ac_objext'
13080   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13081   (eval $ac_try) 2>&5
13082   ac_status=$?
13083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13084   (exit $ac_status); }; }; then
13085   ac_header_compiler=yes
13086 else
13087   echo "$as_me: failed program was:" >&5
13088 sed 's/^/| /' conftest.$ac_ext >&5
13089
13090 ac_header_compiler=no
13091 fi
13092 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13093 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13094 echo "${ECHO_T}$ac_header_compiler" >&6
13095
13096 # Is the header present?
13097 echo "$as_me:$LINENO: checking $ac_header presence" >&5
13098 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13099 cat >conftest.$ac_ext <<_ACEOF
13100 /* confdefs.h.  */
13101 _ACEOF
13102 cat confdefs.h >>conftest.$ac_ext
13103 cat >>conftest.$ac_ext <<_ACEOF
13104 /* end confdefs.h.  */
13105 #include <$ac_header>
13106 _ACEOF
13107 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13108   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13109   ac_status=$?
13110   grep -v '^ *+' conftest.er1 >conftest.err
13111   rm -f conftest.er1
13112   cat conftest.err >&5
13113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13114   (exit $ac_status); } >/dev/null; then
13115   if test -s conftest.err; then
13116     ac_cpp_err=$ac_c_preproc_warn_flag
13117     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13118   else
13119     ac_cpp_err=
13120   fi
13121 else
13122   ac_cpp_err=yes
13123 fi
13124 if test -z "$ac_cpp_err"; then
13125   ac_header_preproc=yes
13126 else
13127   echo "$as_me: failed program was:" >&5
13128 sed 's/^/| /' conftest.$ac_ext >&5
13129
13130   ac_header_preproc=no
13131 fi
13132 rm -f conftest.err conftest.$ac_ext
13133 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13134 echo "${ECHO_T}$ac_header_preproc" >&6
13135
13136 # So?  What about this header?
13137 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13138   yes:no: )
13139     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13140 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13141     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13142 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13143     ac_header_preproc=yes
13144     ;;
13145   no:yes:* )
13146     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13147 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13148     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13149 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13150     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13151 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13152     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13153 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13154     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13155 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13156     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13157 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13158     (
13159       cat <<\_ASBOX
13160 ## --------------------------------------------- ##
13161 ## Report this to <http://www.openldap.org/its/> ##
13162 ## --------------------------------------------- ##
13163 _ASBOX
13164     ) |
13165       sed "s/^/$as_me: WARNING:     /" >&2
13166     ;;
13167 esac
13168 echo "$as_me:$LINENO: checking for $ac_header" >&5
13169 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13170 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13171   echo $ECHO_N "(cached) $ECHO_C" >&6
13172 else
13173   eval "$as_ac_Header=\$ac_header_preproc"
13174 fi
13175 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13176 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13177
13178 fi
13179 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13180   cat >>confdefs.h <<_ACEOF
13181 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13182 _ACEOF
13183
13184 fi
13185
13186 done
13187
13188
13189         if test $ac_cv_header_ltdl_h = no ; then
13190                 { { echo "$as_me:$LINENO: error: could not locate libtool ltdl.h" >&5
13191 echo "$as_me: error: could not locate libtool ltdl.h" >&2;}
13192    { (exit 1); exit 1; }; }
13193         fi
13194
13195         echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
13196 echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6
13197 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
13198   echo $ECHO_N "(cached) $ECHO_C" >&6
13199 else
13200   ac_check_lib_save_LIBS=$LIBS
13201 LIBS="-lltdl  $LIBS"
13202 cat >conftest.$ac_ext <<_ACEOF
13203 /* confdefs.h.  */
13204 _ACEOF
13205 cat confdefs.h >>conftest.$ac_ext
13206 cat >>conftest.$ac_ext <<_ACEOF
13207 /* end confdefs.h.  */
13208
13209 /* Override any gcc2 internal prototype to avoid an error.  */
13210 #ifdef __cplusplus
13211 extern "C"
13212 #endif
13213 /* We use char because int might match the return type of a gcc2
13214    builtin and then its argument prototype would still apply.  */
13215 char lt_dlinit ();
13216 int
13217 main ()
13218 {
13219 lt_dlinit ();
13220   ;
13221   return 0;
13222 }
13223 _ACEOF
13224 rm -f conftest.$ac_objext conftest$ac_exeext
13225 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13226   (eval $ac_link) 2>conftest.er1
13227   ac_status=$?
13228   grep -v '^ *+' conftest.er1 >conftest.err
13229   rm -f conftest.er1
13230   cat conftest.err >&5
13231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13232   (exit $ac_status); } &&
13233          { ac_try='test -z "$ac_c_werror_flag"
13234                          || test ! -s conftest.err'
13235   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13236   (eval $ac_try) 2>&5
13237   ac_status=$?
13238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13239   (exit $ac_status); }; } &&
13240          { ac_try='test -s conftest$ac_exeext'
13241   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13242   (eval $ac_try) 2>&5
13243   ac_status=$?
13244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13245   (exit $ac_status); }; }; then
13246   ac_cv_lib_ltdl_lt_dlinit=yes
13247 else
13248   echo "$as_me: failed program was:" >&5
13249 sed 's/^/| /' conftest.$ac_ext >&5
13250
13251 ac_cv_lib_ltdl_lt_dlinit=no
13252 fi
13253 rm -f conftest.err conftest.$ac_objext \
13254       conftest$ac_exeext conftest.$ac_ext
13255 LIBS=$ac_check_lib_save_LIBS
13256 fi
13257 echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
13258 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6
13259 if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
13260
13261                 MODULES_LIBS=-lltdl
13262
13263 cat >>confdefs.h <<\_ACEOF
13264 #define HAVE_LIBLTDL 1
13265 _ACEOF
13266
13267
13268 fi
13269
13270
13271         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
13272                 { { echo "$as_me:$LINENO: error: could not locate libtool -lltdl" >&5
13273 echo "$as_me: error: could not locate libtool -lltdl" >&2;}
13274    { (exit 1); exit 1; }; }
13275         fi
13276         ol_link_modules=yes
13277         WITH_MODULES_ENABLED=yes
13278
13279 else
13280         for i in $Backends; do
13281                 eval "ol_tmp=\$ol_enable_$i"
13282                 if test $ol_tmp = mod ; then
13283                         { echo "$as_me:$LINENO: WARNING: building static $i backend" >&5
13284 echo "$as_me: WARNING: building static $i backend" >&2;}
13285                         eval "ol_enable_$i=yes"
13286                 fi
13287         done
13288         for i in $Overlays; do
13289                 eval "ol_tmp=\$ol_enable_$i"
13290                 if test $ol_tmp = mod ; then
13291                         { echo "$as_me:$LINENO: WARNING: building static $i overlay" >&5
13292 echo "$as_me: WARNING: building static $i overlay" >&2;}
13293                         eval "ol_enable_$i=yes"
13294                 fi
13295         done
13296 fi
13297
13298 # test for EBCDIC
13299 echo "$as_me:$LINENO: checking for EBCDIC" >&5
13300 echo $ECHO_N "checking for EBCDIC... $ECHO_C" >&6
13301 if test "${ol_cv_cpp_ebcdic+set}" = set; then
13302   echo $ECHO_N "(cached) $ECHO_C" >&6
13303 else
13304
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
13312 #if !('M' == 0xd4)
13313 #include <__ASCII__/generate_error.h>
13314 #endif
13315
13316 _ACEOF
13317 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13318   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13319   ac_status=$?
13320   grep -v '^ *+' conftest.er1 >conftest.err
13321   rm -f conftest.er1
13322   cat conftest.err >&5
13323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13324   (exit $ac_status); } >/dev/null; then
13325   if test -s conftest.err; then
13326     ac_cpp_err=$ac_c_preproc_warn_flag
13327     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13328   else
13329     ac_cpp_err=
13330   fi
13331 else
13332   ac_cpp_err=yes
13333 fi
13334 if test -z "$ac_cpp_err"; then
13335   ol_cv_cpp_ebcdic=yes
13336 else
13337   echo "$as_me: failed program was:" >&5
13338 sed 's/^/| /' conftest.$ac_ext >&5
13339
13340   ol_cv_cpp_ebcdic=no
13341 fi
13342 rm -f conftest.err conftest.$ac_ext
13343 fi
13344 echo "$as_me:$LINENO: result: $ol_cv_cpp_ebcdic" >&5
13345 echo "${ECHO_T}$ol_cv_cpp_ebcdic" >&6
13346 if test $ol_cv_cpp_ebcdic = yes ; then
13347
13348 cat >>confdefs.h <<\_ACEOF
13349 #define HAVE_EBCDIC 1
13350 _ACEOF
13351
13352 fi
13353
13354 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
13355 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13356 if test "${ol_cv_header_stdc+set}" = set; then
13357   echo $ECHO_N "(cached) $ECHO_C" >&6
13358 else
13359   cat >conftest.$ac_ext <<_ACEOF
13360 /* confdefs.h.  */
13361 _ACEOF
13362 cat confdefs.h >>conftest.$ac_ext
13363 cat >>conftest.$ac_ext <<_ACEOF
13364 /* end confdefs.h.  */
13365 #include <stdlib.h>
13366 #include <stdarg.h>
13367 #include <string.h>
13368 #include <float.h>
13369 _ACEOF
13370 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13371   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13372   ac_status=$?
13373   grep -v '^ *+' conftest.er1 >conftest.err
13374   rm -f conftest.er1
13375   cat conftest.err >&5
13376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13377   (exit $ac_status); } >/dev/null; then
13378   if test -s conftest.err; then
13379     ac_cpp_err=$ac_c_preproc_warn_flag
13380     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13381   else
13382     ac_cpp_err=
13383   fi
13384 else
13385   ac_cpp_err=yes
13386 fi
13387 if test -z "$ac_cpp_err"; then
13388   ol_cv_header_stdc=yes
13389 else
13390   echo "$as_me: failed program was:" >&5
13391 sed 's/^/| /' conftest.$ac_ext >&5
13392
13393   ol_cv_header_stdc=no
13394 fi
13395 rm -f conftest.err conftest.$ac_ext
13396
13397 if test $ol_cv_header_stdc = yes; then
13398   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13399 cat >conftest.$ac_ext <<_ACEOF
13400 /* confdefs.h.  */
13401 _ACEOF
13402 cat confdefs.h >>conftest.$ac_ext
13403 cat >>conftest.$ac_ext <<_ACEOF
13404 /* end confdefs.h.  */
13405 #include <string.h>
13406
13407 _ACEOF
13408 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13409   $EGREP "memchr" >/dev/null 2>&1; then
13410   :
13411 else
13412   ol_cv_header_stdc=no
13413 fi
13414 rm -f conftest*
13415
13416 fi
13417
13418 if test $ol_cv_header_stdc = yes; then
13419   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13420 cat >conftest.$ac_ext <<_ACEOF
13421 /* confdefs.h.  */
13422 _ACEOF
13423 cat confdefs.h >>conftest.$ac_ext
13424 cat >>conftest.$ac_ext <<_ACEOF
13425 /* end confdefs.h.  */
13426 #include <stdlib.h>
13427
13428 _ACEOF
13429 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13430   $EGREP "free" >/dev/null 2>&1; then
13431   :
13432 else
13433   ol_cv_header_stdc=no
13434 fi
13435 rm -f conftest*
13436
13437 fi
13438
13439 if test $ol_cv_header_stdc = yes; then
13440   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13441 if test "$cross_compiling" = yes; then
13442   :
13443 else
13444   cat >conftest.$ac_ext <<_ACEOF
13445 /* confdefs.h.  */
13446 _ACEOF
13447 cat confdefs.h >>conftest.$ac_ext
13448 cat >>conftest.$ac_ext <<_ACEOF
13449 /* end confdefs.h.  */
13450 #include <ctype.h>
13451 #ifndef HAVE_EBCDIC
13452 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13453 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13454 #else
13455 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13456                 || ('j' <= (c) && (c) <= 'r') \
13457                 || ('s' <= (c) && (c) <= 'z'))
13458 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
13459 #endif
13460 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13461 int main () { int i; for (i = 0; i < 256; i++)
13462 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13463 exit (0); }
13464
13465 _ACEOF
13466 rm -f conftest$ac_exeext
13467 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13468   (eval $ac_link) 2>&5
13469   ac_status=$?
13470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13471   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13473   (eval $ac_try) 2>&5
13474   ac_status=$?
13475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13476   (exit $ac_status); }; }; then
13477   :
13478 else
13479   echo "$as_me: program exited with status $ac_status" >&5
13480 echo "$as_me: failed program was:" >&5
13481 sed 's/^/| /' conftest.$ac_ext >&5
13482
13483 ( exit $ac_status )
13484 ol_cv_header_stdc=no
13485 fi
13486 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13487 fi
13488 fi
13489 fi
13490 echo "$as_me:$LINENO: result: $ol_cv_header_stdc" >&5
13491 echo "${ECHO_T}$ol_cv_header_stdc" >&6
13492 if test $ol_cv_header_stdc = yes; then
13493   cat >>confdefs.h <<\_ACEOF
13494 #define STDC_HEADERS 1
13495 _ACEOF
13496
13497 fi
13498 ac_cv_header_stdc=disable
13499
13500
13501 if test $ol_cv_header_stdc != yes; then
13502         { echo "$as_me:$LINENO: WARNING: could not locate Standard C compliant headers" >&5
13503 echo "$as_me: WARNING: could not locate Standard C compliant headers" >&2;}
13504 fi
13505
13506
13507
13508
13509
13510
13511 ac_header_dirent=no
13512 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13513   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13514 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
13515 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13516 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13517   echo $ECHO_N "(cached) $ECHO_C" >&6
13518 else
13519   cat >conftest.$ac_ext <<_ACEOF
13520 /* confdefs.h.  */
13521 _ACEOF
13522 cat confdefs.h >>conftest.$ac_ext
13523 cat >>conftest.$ac_ext <<_ACEOF
13524 /* end confdefs.h.  */
13525 #include <sys/types.h>
13526 #include <$ac_hdr>
13527
13528 int
13529 main ()
13530 {
13531 if ((DIR *) 0)
13532 return 0;
13533   ;
13534   return 0;
13535 }
13536 _ACEOF
13537 rm -f conftest.$ac_objext
13538 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13539   (eval $ac_compile) 2>conftest.er1
13540   ac_status=$?
13541   grep -v '^ *+' conftest.er1 >conftest.err
13542   rm -f conftest.er1
13543   cat conftest.err >&5
13544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13545   (exit $ac_status); } &&
13546          { ac_try='test -z "$ac_c_werror_flag"
13547                          || test ! -s conftest.err'
13548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13549   (eval $ac_try) 2>&5
13550   ac_status=$?
13551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13552   (exit $ac_status); }; } &&
13553          { ac_try='test -s conftest.$ac_objext'
13554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13555   (eval $ac_try) 2>&5
13556   ac_status=$?
13557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13558   (exit $ac_status); }; }; then
13559   eval "$as_ac_Header=yes"
13560 else
13561   echo "$as_me: failed program was:" >&5
13562 sed 's/^/| /' conftest.$ac_ext >&5
13563
13564 eval "$as_ac_Header=no"
13565 fi
13566 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13567 fi
13568 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13569 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13570 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13571   cat >>confdefs.h <<_ACEOF
13572 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13573 _ACEOF
13574
13575 ac_header_dirent=$ac_hdr; break
13576 fi
13577
13578 done
13579 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13580 if test $ac_header_dirent = dirent.h; then
13581   echo "$as_me:$LINENO: checking for library containing opendir" >&5
13582 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
13583 if test "${ac_cv_search_opendir+set}" = set; then
13584   echo $ECHO_N "(cached) $ECHO_C" >&6
13585 else
13586   ac_func_search_save_LIBS=$LIBS
13587 ac_cv_search_opendir=no
13588 cat >conftest.$ac_ext <<_ACEOF
13589 /* confdefs.h.  */
13590 _ACEOF
13591 cat confdefs.h >>conftest.$ac_ext
13592 cat >>conftest.$ac_ext <<_ACEOF
13593 /* end confdefs.h.  */
13594
13595 /* Override any gcc2 internal prototype to avoid an error.  */
13596 #ifdef __cplusplus
13597 extern "C"
13598 #endif
13599 /* We use char because int might match the return type of a gcc2
13600    builtin and then its argument prototype would still apply.  */
13601 char opendir ();
13602 int
13603 main ()
13604 {
13605 opendir ();
13606   ;
13607   return 0;
13608 }
13609 _ACEOF
13610 rm -f conftest.$ac_objext conftest$ac_exeext
13611 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13612   (eval $ac_link) 2>conftest.er1
13613   ac_status=$?
13614   grep -v '^ *+' conftest.er1 >conftest.err
13615   rm -f conftest.er1
13616   cat conftest.err >&5
13617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13618   (exit $ac_status); } &&
13619          { ac_try='test -z "$ac_c_werror_flag"
13620                          || test ! -s conftest.err'
13621   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13622   (eval $ac_try) 2>&5
13623   ac_status=$?
13624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13625   (exit $ac_status); }; } &&
13626          { ac_try='test -s conftest$ac_exeext'
13627   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13628   (eval $ac_try) 2>&5
13629   ac_status=$?
13630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13631   (exit $ac_status); }; }; then
13632   ac_cv_search_opendir="none required"
13633 else
13634   echo "$as_me: failed program was:" >&5
13635 sed 's/^/| /' conftest.$ac_ext >&5
13636
13637 fi
13638 rm -f conftest.err conftest.$ac_objext \
13639       conftest$ac_exeext conftest.$ac_ext
13640 if test "$ac_cv_search_opendir" = no; then
13641   for ac_lib in dir; do
13642     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13643     cat >conftest.$ac_ext <<_ACEOF
13644 /* confdefs.h.  */
13645 _ACEOF
13646 cat confdefs.h >>conftest.$ac_ext
13647 cat >>conftest.$ac_ext <<_ACEOF
13648 /* end confdefs.h.  */
13649
13650 /* Override any gcc2 internal prototype to avoid an error.  */
13651 #ifdef __cplusplus
13652 extern "C"
13653 #endif
13654 /* We use char because int might match the return type of a gcc2
13655    builtin and then its argument prototype would still apply.  */
13656 char opendir ();
13657 int
13658 main ()
13659 {
13660 opendir ();
13661   ;
13662   return 0;
13663 }
13664 _ACEOF
13665 rm -f conftest.$ac_objext conftest$ac_exeext
13666 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13667   (eval $ac_link) 2>conftest.er1
13668   ac_status=$?
13669   grep -v '^ *+' conftest.er1 >conftest.err
13670   rm -f conftest.er1
13671   cat conftest.err >&5
13672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13673   (exit $ac_status); } &&
13674          { ac_try='test -z "$ac_c_werror_flag"
13675                          || test ! -s conftest.err'
13676   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13677   (eval $ac_try) 2>&5
13678   ac_status=$?
13679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13680   (exit $ac_status); }; } &&
13681          { ac_try='test -s conftest$ac_exeext'
13682   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13683   (eval $ac_try) 2>&5
13684   ac_status=$?
13685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13686   (exit $ac_status); }; }; then
13687   ac_cv_search_opendir="-l$ac_lib"
13688 break
13689 else
13690   echo "$as_me: failed program was:" >&5
13691 sed 's/^/| /' conftest.$ac_ext >&5
13692
13693 fi
13694 rm -f conftest.err conftest.$ac_objext \
13695       conftest$ac_exeext conftest.$ac_ext
13696   done
13697 fi
13698 LIBS=$ac_func_search_save_LIBS
13699 fi
13700 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
13701 echo "${ECHO_T}$ac_cv_search_opendir" >&6
13702 if test "$ac_cv_search_opendir" != no; then
13703   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
13704
13705 fi
13706
13707 else
13708   echo "$as_me:$LINENO: checking for library containing opendir" >&5
13709 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
13710 if test "${ac_cv_search_opendir+set}" = set; then
13711   echo $ECHO_N "(cached) $ECHO_C" >&6
13712 else
13713   ac_func_search_save_LIBS=$LIBS
13714 ac_cv_search_opendir=no
13715 cat >conftest.$ac_ext <<_ACEOF
13716 /* confdefs.h.  */
13717 _ACEOF
13718 cat confdefs.h >>conftest.$ac_ext
13719 cat >>conftest.$ac_ext <<_ACEOF
13720 /* end confdefs.h.  */
13721
13722 /* Override any gcc2 internal prototype to avoid an error.  */
13723 #ifdef __cplusplus
13724 extern "C"
13725 #endif
13726 /* We use char because int might match the return type of a gcc2
13727    builtin and then its argument prototype would still apply.  */
13728 char opendir ();
13729 int
13730 main ()
13731 {
13732 opendir ();
13733   ;
13734   return 0;
13735 }
13736 _ACEOF
13737 rm -f conftest.$ac_objext conftest$ac_exeext
13738 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13739   (eval $ac_link) 2>conftest.er1
13740   ac_status=$?
13741   grep -v '^ *+' conftest.er1 >conftest.err
13742   rm -f conftest.er1
13743   cat conftest.err >&5
13744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13745   (exit $ac_status); } &&
13746          { ac_try='test -z "$ac_c_werror_flag"
13747                          || test ! -s conftest.err'
13748   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13749   (eval $ac_try) 2>&5
13750   ac_status=$?
13751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13752   (exit $ac_status); }; } &&
13753          { ac_try='test -s conftest$ac_exeext'
13754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13755   (eval $ac_try) 2>&5
13756   ac_status=$?
13757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13758   (exit $ac_status); }; }; then
13759   ac_cv_search_opendir="none required"
13760 else
13761   echo "$as_me: failed program was:" >&5
13762 sed 's/^/| /' conftest.$ac_ext >&5
13763
13764 fi
13765 rm -f conftest.err conftest.$ac_objext \
13766       conftest$ac_exeext conftest.$ac_ext
13767 if test "$ac_cv_search_opendir" = no; then
13768   for ac_lib in x; do
13769     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13770     cat >conftest.$ac_ext <<_ACEOF
13771 /* confdefs.h.  */
13772 _ACEOF
13773 cat confdefs.h >>conftest.$ac_ext
13774 cat >>conftest.$ac_ext <<_ACEOF
13775 /* end confdefs.h.  */
13776
13777 /* Override any gcc2 internal prototype to avoid an error.  */
13778 #ifdef __cplusplus
13779 extern "C"
13780 #endif
13781 /* We use char because int might match the return type of a gcc2
13782    builtin and then its argument prototype would still apply.  */
13783 char opendir ();
13784 int
13785 main ()
13786 {
13787 opendir ();
13788   ;
13789   return 0;
13790 }
13791 _ACEOF
13792 rm -f conftest.$ac_objext conftest$ac_exeext
13793 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13794   (eval $ac_link) 2>conftest.er1
13795   ac_status=$?
13796   grep -v '^ *+' conftest.er1 >conftest.err
13797   rm -f conftest.er1
13798   cat conftest.err >&5
13799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13800   (exit $ac_status); } &&
13801          { ac_try='test -z "$ac_c_werror_flag"
13802                          || test ! -s conftest.err'
13803   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13804   (eval $ac_try) 2>&5
13805   ac_status=$?
13806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13807   (exit $ac_status); }; } &&
13808          { ac_try='test -s conftest$ac_exeext'
13809   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13810   (eval $ac_try) 2>&5
13811   ac_status=$?
13812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13813   (exit $ac_status); }; }; then
13814   ac_cv_search_opendir="-l$ac_lib"
13815 break
13816 else
13817   echo "$as_me: failed program was:" >&5
13818 sed 's/^/| /' conftest.$ac_ext >&5
13819
13820 fi
13821 rm -f conftest.err conftest.$ac_objext \
13822       conftest$ac_exeext conftest.$ac_ext
13823   done
13824 fi
13825 LIBS=$ac_func_search_save_LIBS
13826 fi
13827 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
13828 echo "${ECHO_T}$ac_cv_search_opendir" >&6
13829 if test "$ac_cv_search_opendir" != no; then
13830   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
13831
13832 fi
13833
13834 fi
13835
13836 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
13837 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
13838 if test "${ac_cv_header_sys_wait_h+set}" = set; then
13839   echo $ECHO_N "(cached) $ECHO_C" >&6
13840 else
13841   cat >conftest.$ac_ext <<_ACEOF
13842 /* confdefs.h.  */
13843 _ACEOF
13844 cat confdefs.h >>conftest.$ac_ext
13845 cat >>conftest.$ac_ext <<_ACEOF
13846 /* end confdefs.h.  */
13847 #include <sys/types.h>
13848 #include <sys/wait.h>
13849 #ifndef WEXITSTATUS
13850 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
13851 #endif
13852 #ifndef WIFEXITED
13853 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
13854 #endif
13855
13856 int
13857 main ()
13858 {
13859   int s;
13860   wait (&s);
13861   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
13862   ;
13863   return 0;
13864 }
13865 _ACEOF
13866 rm -f conftest.$ac_objext
13867 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13868   (eval $ac_compile) 2>conftest.er1
13869   ac_status=$?
13870   grep -v '^ *+' conftest.er1 >conftest.err
13871   rm -f conftest.er1
13872   cat conftest.err >&5
13873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13874   (exit $ac_status); } &&
13875          { ac_try='test -z "$ac_c_werror_flag"
13876                          || test ! -s conftest.err'
13877   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13878   (eval $ac_try) 2>&5
13879   ac_status=$?
13880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13881   (exit $ac_status); }; } &&
13882          { ac_try='test -s conftest.$ac_objext'
13883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13884   (eval $ac_try) 2>&5
13885   ac_status=$?
13886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13887   (exit $ac_status); }; }; then
13888   ac_cv_header_sys_wait_h=yes
13889 else
13890   echo "$as_me: failed program was:" >&5
13891 sed 's/^/| /' conftest.$ac_ext >&5
13892
13893 ac_cv_header_sys_wait_h=no
13894 fi
13895 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13896 fi
13897 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
13898 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
13899 if test $ac_cv_header_sys_wait_h = yes; then
13900
13901 cat >>confdefs.h <<\_ACEOF
13902 #define HAVE_SYS_WAIT_H 1
13903 _ACEOF
13904
13905 fi
13906
13907 echo "$as_me:$LINENO: checking whether termios.h defines TIOCGWINSZ" >&5
13908 echo $ECHO_N "checking whether termios.h defines TIOCGWINSZ... $ECHO_C" >&6
13909 if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then
13910   echo $ECHO_N "(cached) $ECHO_C" >&6
13911 else
13912   cat >conftest.$ac_ext <<_ACEOF
13913 /* confdefs.h.  */
13914 _ACEOF
13915 cat confdefs.h >>conftest.$ac_ext
13916 cat >>conftest.$ac_ext <<_ACEOF
13917 /* end confdefs.h.  */
13918 #include <sys/types.h>
13919 #include <termios.h>
13920 #ifdef TIOCGWINSZ
13921   yes
13922 #endif
13923
13924 _ACEOF
13925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13926   $EGREP "yes" >/dev/null 2>&1; then
13927   ac_cv_sys_tiocgwinsz_in_termios_h=yes
13928 else
13929   ac_cv_sys_tiocgwinsz_in_termios_h=no
13930 fi
13931 rm -f conftest*
13932
13933 fi
13934 echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
13935 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_termios_h" >&6
13936
13937 if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
13938   echo "$as_me:$LINENO: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
13939 echo $ECHO_N "checking whether sys/ioctl.h defines TIOCGWINSZ... $ECHO_C" >&6
13940 if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then
13941   echo $ECHO_N "(cached) $ECHO_C" >&6
13942 else
13943   cat >conftest.$ac_ext <<_ACEOF
13944 /* confdefs.h.  */
13945 _ACEOF
13946 cat confdefs.h >>conftest.$ac_ext
13947 cat >>conftest.$ac_ext <<_ACEOF
13948 /* end confdefs.h.  */
13949 #include <sys/types.h>
13950 #include <sys/ioctl.h>
13951 #ifdef TIOCGWINSZ
13952   yes
13953 #endif
13954
13955 _ACEOF
13956 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13957   $EGREP "yes" >/dev/null 2>&1; then
13958   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
13959 else
13960   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
13961 fi
13962 rm -f conftest*
13963
13964 fi
13965 echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
13966 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6
13967
13968   if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
13969
13970 cat >>confdefs.h <<\_ACEOF
13971 #define GWINSZ_IN_SYS_IOCTL 1
13972 _ACEOF
13973
13974   fi
13975 fi
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024 for ac_header in \
14025         arpa/inet.h             \
14026         arpa/nameser.h  \
14027         assert.h                \
14028         bits/types.h    \
14029         conio.h                 \
14030         crypt.h                 \
14031         direct.h                \
14032         errno.h                 \
14033         fcntl.h                 \
14034         filio.h                 \
14035         getopt.h                \
14036         grp.h                   \
14037         io.h                    \
14038         libutil.h               \
14039         limits.h                \
14040         locale.h                \
14041         malloc.h                \
14042         memory.h                \
14043         psap.h                  \
14044         pwd.h                   \
14045         process.h               \
14046         sgtty.h                 \
14047         shadow.h                \
14048         stddef.h                \
14049         string.h                \
14050         strings.h               \
14051         sysexits.h              \
14052         sys/file.h              \
14053         sys/filio.h             \
14054         sys/errno.h             \
14055         sys/ioctl.h             \
14056         sys/param.h             \
14057         sys/resource.h  \
14058         sys/select.h    \
14059         sys/socket.h    \
14060         sys/stat.h              \
14061         sys/syslog.h    \
14062         sys/time.h              \
14063         sys/types.h             \
14064         sys/uio.h               \
14065         syslog.h                \
14066         termios.h               \
14067         unistd.h                \
14068         utime.h                 \
14069         winsock.h               \
14070         winsock2.h              \
14071
14072 do
14073 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14074 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14075   echo "$as_me:$LINENO: checking for $ac_header" >&5
14076 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14077 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14078   echo $ECHO_N "(cached) $ECHO_C" >&6
14079 fi
14080 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14081 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14082 else
14083   # Is the header compilable?
14084 echo "$as_me:$LINENO: checking $ac_header usability" >&5
14085 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14086 cat >conftest.$ac_ext <<_ACEOF
14087 /* confdefs.h.  */
14088 _ACEOF
14089 cat confdefs.h >>conftest.$ac_ext
14090 cat >>conftest.$ac_ext <<_ACEOF
14091 /* end confdefs.h.  */
14092 $ac_includes_default
14093 #include <$ac_header>
14094 _ACEOF
14095 rm -f conftest.$ac_objext
14096 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14097   (eval $ac_compile) 2>conftest.er1
14098   ac_status=$?
14099   grep -v '^ *+' conftest.er1 >conftest.err
14100   rm -f conftest.er1
14101   cat conftest.err >&5
14102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14103   (exit $ac_status); } &&
14104          { ac_try='test -z "$ac_c_werror_flag"
14105                          || test ! -s conftest.err'
14106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14107   (eval $ac_try) 2>&5
14108   ac_status=$?
14109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14110   (exit $ac_status); }; } &&
14111          { ac_try='test -s conftest.$ac_objext'
14112   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14113   (eval $ac_try) 2>&5
14114   ac_status=$?
14115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14116   (exit $ac_status); }; }; then
14117   ac_header_compiler=yes
14118 else
14119   echo "$as_me: failed program was:" >&5
14120 sed 's/^/| /' conftest.$ac_ext >&5
14121
14122 ac_header_compiler=no
14123 fi
14124 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14125 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14126 echo "${ECHO_T}$ac_header_compiler" >&6
14127
14128 # Is the header present?
14129 echo "$as_me:$LINENO: checking $ac_header presence" >&5
14130 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14131 cat >conftest.$ac_ext <<_ACEOF
14132 /* confdefs.h.  */
14133 _ACEOF
14134 cat confdefs.h >>conftest.$ac_ext
14135 cat >>conftest.$ac_ext <<_ACEOF
14136 /* end confdefs.h.  */
14137 #include <$ac_header>
14138 _ACEOF
14139 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14140   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14141   ac_status=$?
14142   grep -v '^ *+' conftest.er1 >conftest.err
14143   rm -f conftest.er1
14144   cat conftest.err >&5
14145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14146   (exit $ac_status); } >/dev/null; then
14147   if test -s conftest.err; then
14148     ac_cpp_err=$ac_c_preproc_warn_flag
14149     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
14150   else
14151     ac_cpp_err=
14152   fi
14153 else
14154   ac_cpp_err=yes
14155 fi
14156 if test -z "$ac_cpp_err"; then
14157   ac_header_preproc=yes
14158 else
14159   echo "$as_me: failed program was:" >&5
14160 sed 's/^/| /' conftest.$ac_ext >&5
14161
14162   ac_header_preproc=no
14163 fi
14164 rm -f conftest.err conftest.$ac_ext
14165 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14166 echo "${ECHO_T}$ac_header_preproc" >&6
14167
14168 # So?  What about this header?
14169 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14170   yes:no: )
14171     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14172 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14173     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14174 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14175     ac_header_preproc=yes
14176     ;;
14177   no:yes:* )
14178     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14179 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14180     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
14181 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
14182     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14183 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14184     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
14185 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
14186     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14187 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14188     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14189 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14190     (
14191       cat <<\_ASBOX
14192 ## --------------------------------------------- ##
14193 ## Report this to <http://www.openldap.org/its/> ##
14194 ## --------------------------------------------- ##
14195 _ASBOX
14196     ) |
14197       sed "s/^/$as_me: WARNING:     /" >&2
14198     ;;
14199 esac
14200 echo "$as_me:$LINENO: checking for $ac_header" >&5
14201 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14202 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14203   echo $ECHO_N "(cached) $ECHO_C" >&6
14204 else
14205   eval "$as_ac_Header=\$ac_header_preproc"
14206 fi
14207 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14208 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14209
14210 fi
14211 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14212   cat >>confdefs.h <<_ACEOF
14213 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14214 _ACEOF
14215
14216 fi
14217
14218 done
14219
14220
14221
14222 for ac_header in resolv.h
14223 do
14224 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14225 echo "$as_me:$LINENO: checking for $ac_header" >&5
14226 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14227 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14228   echo $ECHO_N "(cached) $ECHO_C" >&6
14229 else
14230   cat >conftest.$ac_ext <<_ACEOF
14231 /* confdefs.h.  */
14232 _ACEOF
14233 cat confdefs.h >>conftest.$ac_ext
14234 cat >>conftest.$ac_ext <<_ACEOF
14235 /* end confdefs.h.  */
14236 $ac_includes_default
14237 #include <netinet/in.h>
14238
14239
14240 #include <$ac_header>
14241 _ACEOF
14242 rm -f conftest.$ac_objext
14243 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14244   (eval $ac_compile) 2>conftest.er1
14245   ac_status=$?
14246   grep -v '^ *+' conftest.er1 >conftest.err
14247   rm -f conftest.er1
14248   cat conftest.err >&5
14249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14250   (exit $ac_status); } &&
14251          { ac_try='test -z "$ac_c_werror_flag"
14252                          || test ! -s conftest.err'
14253   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14254   (eval $ac_try) 2>&5
14255   ac_status=$?
14256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14257   (exit $ac_status); }; } &&
14258          { ac_try='test -s conftest.$ac_objext'
14259   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14260   (eval $ac_try) 2>&5
14261   ac_status=$?
14262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14263   (exit $ac_status); }; }; then
14264   eval "$as_ac_Header=yes"
14265 else
14266   echo "$as_me: failed program was:" >&5
14267 sed 's/^/| /' conftest.$ac_ext >&5
14268
14269 eval "$as_ac_Header=no"
14270 fi
14271 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14272 fi
14273 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14274 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14275 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14276   cat >>confdefs.h <<_ACEOF
14277 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14278 _ACEOF
14279
14280 fi
14281
14282 done
14283
14284
14285
14286 for ac_header in netinet/tcp.h
14287 do
14288 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14289 echo "$as_me:$LINENO: checking for $ac_header" >&5
14290 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14291 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14292   echo $ECHO_N "(cached) $ECHO_C" >&6
14293 else
14294   cat >conftest.$ac_ext <<_ACEOF
14295 /* confdefs.h.  */
14296 _ACEOF
14297 cat confdefs.h >>conftest.$ac_ext
14298 cat >>conftest.$ac_ext <<_ACEOF
14299 /* end confdefs.h.  */
14300 $ac_includes_default
14301 #include <netinet/in.h>
14302
14303
14304 #include <$ac_header>
14305 _ACEOF
14306 rm -f conftest.$ac_objext
14307 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14308   (eval $ac_compile) 2>conftest.er1
14309   ac_status=$?
14310   grep -v '^ *+' conftest.er1 >conftest.err
14311   rm -f conftest.er1
14312   cat conftest.err >&5
14313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14314   (exit $ac_status); } &&
14315          { ac_try='test -z "$ac_c_werror_flag"
14316                          || test ! -s conftest.err'
14317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14318   (eval $ac_try) 2>&5
14319   ac_status=$?
14320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14321   (exit $ac_status); }; } &&
14322          { ac_try='test -s conftest.$ac_objext'
14323   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14324   (eval $ac_try) 2>&5
14325   ac_status=$?
14326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14327   (exit $ac_status); }; }; then
14328   eval "$as_ac_Header=yes"
14329 else
14330   echo "$as_me: failed program was:" >&5
14331 sed 's/^/| /' conftest.$ac_ext >&5
14332
14333 eval "$as_ac_Header=no"
14334 fi
14335 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14336 fi
14337 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14338 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14339 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14340   cat >>confdefs.h <<_ACEOF
14341 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14342 _ACEOF
14343
14344 fi
14345
14346 done
14347
14348
14349
14350 for ac_header in sys/ucred.h
14351 do
14352 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14353 echo "$as_me:$LINENO: checking for $ac_header" >&5
14354 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14355 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14356   echo $ECHO_N "(cached) $ECHO_C" >&6
14357 else
14358   cat >conftest.$ac_ext <<_ACEOF
14359 /* confdefs.h.  */
14360 _ACEOF
14361 cat confdefs.h >>conftest.$ac_ext
14362 cat >>conftest.$ac_ext <<_ACEOF
14363 /* end confdefs.h.  */
14364 $ac_includes_default
14365 #ifdef HAVE_SYS_PARAM_H
14366 #include <sys/param.h>
14367 #endif
14368
14369
14370 #include <$ac_header>
14371 _ACEOF
14372 rm -f conftest.$ac_objext
14373 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14374   (eval $ac_compile) 2>conftest.er1
14375   ac_status=$?
14376   grep -v '^ *+' conftest.er1 >conftest.err
14377   rm -f conftest.er1
14378   cat conftest.err >&5
14379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14380   (exit $ac_status); } &&
14381          { ac_try='test -z "$ac_c_werror_flag"
14382                          || test ! -s conftest.err'
14383   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14384   (eval $ac_try) 2>&5
14385   ac_status=$?
14386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14387   (exit $ac_status); }; } &&
14388          { ac_try='test -s conftest.$ac_objext'
14389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14390   (eval $ac_try) 2>&5
14391   ac_status=$?
14392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14393   (exit $ac_status); }; }; then
14394   eval "$as_ac_Header=yes"
14395 else
14396   echo "$as_me: failed program was:" >&5
14397 sed 's/^/| /' conftest.$ac_ext >&5
14398
14399 eval "$as_ac_Header=no"
14400 fi
14401 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14402 fi
14403 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14404 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14405 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14406   cat >>confdefs.h <<_ACEOF
14407 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14408 _ACEOF
14409
14410 fi
14411
14412 done
14413
14414
14415
14416
14417
14418 for ac_func in sigaction sigset
14419 do
14420 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14421 echo "$as_me:$LINENO: checking for $ac_func" >&5
14422 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14423 if eval "test \"\${$as_ac_var+set}\" = set"; then
14424   echo $ECHO_N "(cached) $ECHO_C" >&6
14425 else
14426   cat >conftest.$ac_ext <<_ACEOF
14427 /* confdefs.h.  */
14428 _ACEOF
14429 cat confdefs.h >>conftest.$ac_ext
14430 cat >>conftest.$ac_ext <<_ACEOF
14431 /* end confdefs.h.  */
14432 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14433    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14434 #define $ac_func innocuous_$ac_func
14435
14436 /* System header to define __stub macros and hopefully few prototypes,
14437     which can conflict with char $ac_func (); below.
14438     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14439     <limits.h> exists even on freestanding compilers.  */
14440
14441 #ifdef __STDC__
14442 # include <limits.h>
14443 #else
14444 # include <assert.h>
14445 #endif
14446
14447 #undef $ac_func
14448
14449 /* Override any gcc2 internal prototype to avoid an error.  */
14450 #ifdef __cplusplus
14451 extern "C"
14452 {
14453 #endif
14454 /* We use char because int might match the return type of a gcc2
14455    builtin and then its argument prototype would still apply.  */
14456 char $ac_func ();
14457 /* The GNU C library defines this for functions which it implements
14458     to always fail with ENOSYS.  Some functions are actually named
14459     something starting with __ and the normal name is an alias.  */
14460 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14461 choke me
14462 #else
14463 char (*f) () = $ac_func;
14464 #endif
14465 #ifdef __cplusplus
14466 }
14467 #endif
14468
14469 int
14470 main ()
14471 {
14472 return f != $ac_func;
14473   ;
14474   return 0;
14475 }
14476 _ACEOF
14477 rm -f conftest.$ac_objext conftest$ac_exeext
14478 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14479   (eval $ac_link) 2>conftest.er1
14480   ac_status=$?
14481   grep -v '^ *+' conftest.er1 >conftest.err
14482   rm -f conftest.er1
14483   cat conftest.err >&5
14484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14485   (exit $ac_status); } &&
14486          { ac_try='test -z "$ac_c_werror_flag"
14487                          || test ! -s conftest.err'
14488   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14489   (eval $ac_try) 2>&5
14490   ac_status=$?
14491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14492   (exit $ac_status); }; } &&
14493          { ac_try='test -s conftest$ac_exeext'
14494   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14495   (eval $ac_try) 2>&5
14496   ac_status=$?
14497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14498   (exit $ac_status); }; }; then
14499   eval "$as_ac_var=yes"
14500 else
14501   echo "$as_me: failed program was:" >&5
14502 sed 's/^/| /' conftest.$ac_ext >&5
14503
14504 eval "$as_ac_var=no"
14505 fi
14506 rm -f conftest.err conftest.$ac_objext \
14507       conftest$ac_exeext conftest.$ac_ext
14508 fi
14509 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14510 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14511 if test `eval echo '${'$as_ac_var'}'` = yes; then
14512   cat >>confdefs.h <<_ACEOF
14513 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14514 _ACEOF
14515
14516 fi
14517 done
14518
14519
14520 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
14521
14522 echo "$as_me:$LINENO: checking for sigset in -lV3" >&5
14523 echo $ECHO_N "checking for sigset in -lV3... $ECHO_C" >&6
14524 if test "${ac_cv_lib_V3_sigset+set}" = set; then
14525   echo $ECHO_N "(cached) $ECHO_C" >&6
14526 else
14527   ac_check_lib_save_LIBS=$LIBS
14528 LIBS="-lV3  $LIBS"
14529 cat >conftest.$ac_ext <<_ACEOF
14530 /* confdefs.h.  */
14531 _ACEOF
14532 cat confdefs.h >>conftest.$ac_ext
14533 cat >>conftest.$ac_ext <<_ACEOF
14534 /* end confdefs.h.  */
14535
14536 /* Override any gcc2 internal prototype to avoid an error.  */
14537 #ifdef __cplusplus
14538 extern "C"
14539 #endif
14540 /* We use char because int might match the return type of a gcc2
14541    builtin and then its argument prototype would still apply.  */
14542 char sigset ();
14543 int
14544 main ()
14545 {
14546 sigset ();
14547   ;
14548   return 0;
14549 }
14550 _ACEOF
14551 rm -f conftest.$ac_objext conftest$ac_exeext
14552 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14553   (eval $ac_link) 2>conftest.er1
14554   ac_status=$?
14555   grep -v '^ *+' conftest.er1 >conftest.err
14556   rm -f conftest.er1
14557   cat conftest.err >&5
14558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14559   (exit $ac_status); } &&
14560          { ac_try='test -z "$ac_c_werror_flag"
14561                          || test ! -s conftest.err'
14562   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14563   (eval $ac_try) 2>&5
14564   ac_status=$?
14565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14566   (exit $ac_status); }; } &&
14567          { ac_try='test -s conftest$ac_exeext'
14568   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14569   (eval $ac_try) 2>&5
14570   ac_status=$?
14571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14572   (exit $ac_status); }; }; then
14573   ac_cv_lib_V3_sigset=yes
14574 else
14575   echo "$as_me: failed program was:" >&5
14576 sed 's/^/| /' conftest.$ac_ext >&5
14577
14578 ac_cv_lib_V3_sigset=no
14579 fi
14580 rm -f conftest.err conftest.$ac_objext \
14581       conftest$ac_exeext conftest.$ac_ext
14582 LIBS=$ac_check_lib_save_LIBS
14583 fi
14584 echo "$as_me:$LINENO: result: $ac_cv_lib_V3_sigset" >&5
14585 echo "${ECHO_T}$ac_cv_lib_V3_sigset" >&6
14586 if test $ac_cv_lib_V3_sigset = yes; then
14587   cat >>confdefs.h <<_ACEOF
14588 #define HAVE_LIBV3 1
14589 _ACEOF
14590
14591   LIBS="-lV3 $LIBS"
14592
14593 fi
14594
14595 fi
14596
14597 if test "$ac_cv_cygwin" != yes && test "$ac_cv_header_winsock_h" = yes; then
14598 echo "$as_me:$LINENO: checking for winsock" >&5
14599 echo $ECHO_N "checking for winsock... $ECHO_C" >&6
14600 if test "${ol_cv_winsock+set}" = set; then
14601   echo $ECHO_N "(cached) $ECHO_C" >&6
14602 else
14603   save_LIBS="$LIBS"
14604 for curlib in ws2_32 wsock32; do
14605         LIBS="$LIBS -l$curlib"
14606         cat >conftest.$ac_ext <<_ACEOF
14607 /* confdefs.h.  */
14608 _ACEOF
14609 cat confdefs.h >>conftest.$ac_ext
14610 cat >>conftest.$ac_ext <<_ACEOF
14611 /* end confdefs.h.  */
14612 #include <winsock.h>
14613
14614 int
14615 main ()
14616 {
14617
14618                         socket(0,0,0);
14619                         select(0,NULL,NULL,NULL,NULL);
14620                         closesocket(0);
14621                         gethostname(NULL,0);
14622
14623   ;
14624   return 0;
14625 }
14626 _ACEOF
14627 rm -f conftest.$ac_objext conftest$ac_exeext
14628 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14629   (eval $ac_link) 2>conftest.er1
14630   ac_status=$?
14631   grep -v '^ *+' conftest.er1 >conftest.err
14632   rm -f conftest.er1
14633   cat conftest.err >&5
14634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14635   (exit $ac_status); } &&
14636          { ac_try='test -z "$ac_c_werror_flag"
14637                          || test ! -s conftest.err'
14638   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14639   (eval $ac_try) 2>&5
14640   ac_status=$?
14641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14642   (exit $ac_status); }; } &&
14643          { ac_try='test -s conftest$ac_exeext'
14644   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14645   (eval $ac_try) 2>&5
14646   ac_status=$?
14647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14648   (exit $ac_status); }; }; then
14649   ol_cv_winsock=yes
14650 else
14651   echo "$as_me: failed program was:" >&5
14652 sed 's/^/| /' conftest.$ac_ext >&5
14653
14654 ol_cv_winsock=no
14655 fi
14656 rm -f conftest.err conftest.$ac_objext \
14657       conftest$ac_exeext conftest.$ac_ext
14658
14659         if test $ol_cv_winsock = yes; then
14660
14661 cat >>confdefs.h <<\_ACEOF
14662 #define HAVE_WINSOCK 1
14663 _ACEOF
14664
14665                 ac_cv_func_socket=yes
14666                 ac_cv_func_select=yes
14667                 ac_cv_func_closesocket=yes
14668                 ac_cv_func_gethostname=yes
14669                 if test $curlib = ws2_32; then
14670                         ol_cv_winsock=winsock2
14671
14672 cat >>confdefs.h <<\_ACEOF
14673 #define HAVE_WINSOCK2 1
14674 _ACEOF
14675
14676                 fi
14677                 break
14678         fi
14679         LIBS="$save_LIBS"
14680 done
14681 fi
14682 echo "$as_me:$LINENO: result: $ol_cv_winsock" >&5
14683 echo "${ECHO_T}$ol_cv_winsock" >&6
14684 fi
14685
14686
14687 echo "$as_me:$LINENO: checking for socket" >&5
14688 echo $ECHO_N "checking for socket... $ECHO_C" >&6
14689 if test "${ac_cv_func_socket+set}" = set; then
14690   echo $ECHO_N "(cached) $ECHO_C" >&6
14691 else
14692   cat >conftest.$ac_ext <<_ACEOF
14693 /* confdefs.h.  */
14694 _ACEOF
14695 cat confdefs.h >>conftest.$ac_ext
14696 cat >>conftest.$ac_ext <<_ACEOF
14697 /* end confdefs.h.  */
14698 /* Define socket to an innocuous variant, in case <limits.h> declares socket.
14699    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14700 #define socket innocuous_socket
14701
14702 /* System header to define __stub macros and hopefully few prototypes,
14703     which can conflict with char socket (); below.
14704     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14705     <limits.h> exists even on freestanding compilers.  */
14706
14707 #ifdef __STDC__
14708 # include <limits.h>
14709 #else
14710 # include <assert.h>
14711 #endif
14712
14713 #undef socket
14714
14715 /* Override any gcc2 internal prototype to avoid an error.  */
14716 #ifdef __cplusplus
14717 extern "C"
14718 {
14719 #endif
14720 /* We use char because int might match the return type of a gcc2
14721    builtin and then its argument prototype would still apply.  */
14722 char socket ();
14723 /* The GNU C library defines this for functions which it implements
14724     to always fail with ENOSYS.  Some functions are actually named
14725     something starting with __ and the normal name is an alias.  */
14726 #if defined (__stub_socket) || defined (__stub___socket)
14727 choke me
14728 #else
14729 char (*f) () = socket;
14730 #endif
14731 #ifdef __cplusplus
14732 }
14733 #endif
14734
14735 int
14736 main ()
14737 {
14738 return f != socket;
14739   ;
14740   return 0;
14741 }
14742 _ACEOF
14743 rm -f conftest.$ac_objext conftest$ac_exeext
14744 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14745   (eval $ac_link) 2>conftest.er1
14746   ac_status=$?
14747   grep -v '^ *+' conftest.er1 >conftest.err
14748   rm -f conftest.er1
14749   cat conftest.err >&5
14750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14751   (exit $ac_status); } &&
14752          { ac_try='test -z "$ac_c_werror_flag"
14753                          || test ! -s conftest.err'
14754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14755   (eval $ac_try) 2>&5
14756   ac_status=$?
14757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14758   (exit $ac_status); }; } &&
14759          { ac_try='test -s conftest$ac_exeext'
14760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14761   (eval $ac_try) 2>&5
14762   ac_status=$?
14763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14764   (exit $ac_status); }; }; then
14765   ac_cv_func_socket=yes
14766 else
14767   echo "$as_me: failed program was:" >&5
14768 sed 's/^/| /' conftest.$ac_ext >&5
14769
14770 ac_cv_func_socket=no
14771 fi
14772 rm -f conftest.err conftest.$ac_objext \
14773       conftest$ac_exeext conftest.$ac_ext
14774 fi
14775 echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
14776 echo "${ECHO_T}$ac_cv_func_socket" >&6
14777 if test $ac_cv_func_socket = yes; then
14778   :
14779 else
14780
14781
14782 echo "$as_me:$LINENO: checking for main in -lsocket" >&5
14783 echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
14784 if test "${ac_cv_lib_socket_main+set}" = set; then
14785   echo $ECHO_N "(cached) $ECHO_C" >&6
14786 else
14787   ac_check_lib_save_LIBS=$LIBS
14788 LIBS="-lsocket  $LIBS"
14789 cat >conftest.$ac_ext <<_ACEOF
14790 /* confdefs.h.  */
14791 _ACEOF
14792 cat confdefs.h >>conftest.$ac_ext
14793 cat >>conftest.$ac_ext <<_ACEOF
14794 /* end confdefs.h.  */
14795
14796
14797 int
14798 main ()
14799 {
14800 main ();
14801   ;
14802   return 0;
14803 }
14804 _ACEOF
14805 rm -f conftest.$ac_objext conftest$ac_exeext
14806 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14807   (eval $ac_link) 2>conftest.er1
14808   ac_status=$?
14809   grep -v '^ *+' conftest.er1 >conftest.err
14810   rm -f conftest.er1
14811   cat conftest.err >&5
14812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14813   (exit $ac_status); } &&
14814          { ac_try='test -z "$ac_c_werror_flag"
14815                          || test ! -s conftest.err'
14816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14817   (eval $ac_try) 2>&5
14818   ac_status=$?
14819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14820   (exit $ac_status); }; } &&
14821          { ac_try='test -s conftest$ac_exeext'
14822   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14823   (eval $ac_try) 2>&5
14824   ac_status=$?
14825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14826   (exit $ac_status); }; }; then
14827   ac_cv_lib_socket_main=yes
14828 else
14829   echo "$as_me: failed program was:" >&5
14830 sed 's/^/| /' conftest.$ac_ext >&5
14831
14832 ac_cv_lib_socket_main=no
14833 fi
14834 rm -f conftest.err conftest.$ac_objext \
14835       conftest$ac_exeext conftest.$ac_ext
14836 LIBS=$ac_check_lib_save_LIBS
14837 fi
14838 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
14839 echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
14840 if test $ac_cv_lib_socket_main = yes; then
14841   cat >>confdefs.h <<_ACEOF
14842 #define HAVE_LIBSOCKET 1
14843 _ACEOF
14844
14845   LIBS="-lsocket $LIBS"
14846
14847 fi
14848
14849
14850 echo "$as_me:$LINENO: checking for main in -lnet" >&5
14851 echo $ECHO_N "checking for main in -lnet... $ECHO_C" >&6
14852 if test "${ac_cv_lib_net_main+set}" = set; then
14853   echo $ECHO_N "(cached) $ECHO_C" >&6
14854 else
14855   ac_check_lib_save_LIBS=$LIBS
14856 LIBS="-lnet  $LIBS"
14857 cat >conftest.$ac_ext <<_ACEOF
14858 /* confdefs.h.  */
14859 _ACEOF
14860 cat confdefs.h >>conftest.$ac_ext
14861 cat >>conftest.$ac_ext <<_ACEOF
14862 /* end confdefs.h.  */
14863
14864
14865 int
14866 main ()
14867 {
14868 main ();
14869   ;
14870   return 0;
14871 }
14872 _ACEOF
14873 rm -f conftest.$ac_objext conftest$ac_exeext
14874 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14875   (eval $ac_link) 2>conftest.er1
14876   ac_status=$?
14877   grep -v '^ *+' conftest.er1 >conftest.err
14878   rm -f conftest.er1
14879   cat conftest.err >&5
14880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14881   (exit $ac_status); } &&
14882          { ac_try='test -z "$ac_c_werror_flag"
14883                          || test ! -s conftest.err'
14884   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14885   (eval $ac_try) 2>&5
14886   ac_status=$?
14887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14888   (exit $ac_status); }; } &&
14889          { ac_try='test -s conftest$ac_exeext'
14890   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14891   (eval $ac_try) 2>&5
14892   ac_status=$?
14893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14894   (exit $ac_status); }; }; then
14895   ac_cv_lib_net_main=yes
14896 else
14897   echo "$as_me: failed program was:" >&5
14898 sed 's/^/| /' conftest.$ac_ext >&5
14899
14900 ac_cv_lib_net_main=no
14901 fi
14902 rm -f conftest.err conftest.$ac_objext \
14903       conftest$ac_exeext conftest.$ac_ext
14904 LIBS=$ac_check_lib_save_LIBS
14905 fi
14906 echo "$as_me:$LINENO: result: $ac_cv_lib_net_main" >&5
14907 echo "${ECHO_T}$ac_cv_lib_net_main" >&6
14908 if test $ac_cv_lib_net_main = yes; then
14909   cat >>confdefs.h <<_ACEOF
14910 #define HAVE_LIBNET 1
14911 _ACEOF
14912
14913   LIBS="-lnet $LIBS"
14914
14915 fi
14916
14917
14918 echo "$as_me:$LINENO: checking for main in -lnsl_s" >&5
14919 echo $ECHO_N "checking for main in -lnsl_s... $ECHO_C" >&6
14920 if test "${ac_cv_lib_nsl_s_main+set}" = set; then
14921   echo $ECHO_N "(cached) $ECHO_C" >&6
14922 else
14923   ac_check_lib_save_LIBS=$LIBS
14924 LIBS="-lnsl_s  $LIBS"
14925 cat >conftest.$ac_ext <<_ACEOF
14926 /* confdefs.h.  */
14927 _ACEOF
14928 cat confdefs.h >>conftest.$ac_ext
14929 cat >>conftest.$ac_ext <<_ACEOF
14930 /* end confdefs.h.  */
14931
14932
14933 int
14934 main ()
14935 {
14936 main ();
14937   ;
14938   return 0;
14939 }
14940 _ACEOF
14941 rm -f conftest.$ac_objext conftest$ac_exeext
14942 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14943   (eval $ac_link) 2>conftest.er1
14944   ac_status=$?
14945   grep -v '^ *+' conftest.er1 >conftest.err
14946   rm -f conftest.er1
14947   cat conftest.err >&5
14948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14949   (exit $ac_status); } &&
14950          { ac_try='test -z "$ac_c_werror_flag"
14951                          || test ! -s conftest.err'
14952   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14953   (eval $ac_try) 2>&5
14954   ac_status=$?
14955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14956   (exit $ac_status); }; } &&
14957          { ac_try='test -s conftest$ac_exeext'
14958   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14959   (eval $ac_try) 2>&5
14960   ac_status=$?
14961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14962   (exit $ac_status); }; }; then
14963   ac_cv_lib_nsl_s_main=yes
14964 else
14965   echo "$as_me: failed program was:" >&5
14966 sed 's/^/| /' conftest.$ac_ext >&5
14967
14968 ac_cv_lib_nsl_s_main=no
14969 fi
14970 rm -f conftest.err conftest.$ac_objext \
14971       conftest$ac_exeext conftest.$ac_ext
14972 LIBS=$ac_check_lib_save_LIBS
14973 fi
14974 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_s_main" >&5
14975 echo "${ECHO_T}$ac_cv_lib_nsl_s_main" >&6
14976 if test $ac_cv_lib_nsl_s_main = yes; then
14977   cat >>confdefs.h <<_ACEOF
14978 #define HAVE_LIBNSL_S 1
14979 _ACEOF
14980
14981   LIBS="-lnsl_s $LIBS"
14982
14983 fi
14984
14985
14986 echo "$as_me:$LINENO: checking for main in -lnsl" >&5
14987 echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
14988 if test "${ac_cv_lib_nsl_main+set}" = set; then
14989   echo $ECHO_N "(cached) $ECHO_C" >&6
14990 else
14991   ac_check_lib_save_LIBS=$LIBS
14992 LIBS="-lnsl  $LIBS"
14993 cat >conftest.$ac_ext <<_ACEOF
14994 /* confdefs.h.  */
14995 _ACEOF
14996 cat confdefs.h >>conftest.$ac_ext
14997 cat >>conftest.$ac_ext <<_ACEOF
14998 /* end confdefs.h.  */
14999
15000
15001 int
15002 main ()
15003 {
15004 main ();
15005   ;
15006   return 0;
15007 }
15008 _ACEOF
15009 rm -f conftest.$ac_objext conftest$ac_exeext
15010 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15011   (eval $ac_link) 2>conftest.er1
15012   ac_status=$?
15013   grep -v '^ *+' conftest.er1 >conftest.err
15014   rm -f conftest.er1
15015   cat conftest.err >&5
15016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15017   (exit $ac_status); } &&
15018          { ac_try='test -z "$ac_c_werror_flag"
15019                          || test ! -s conftest.err'
15020   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15021   (eval $ac_try) 2>&5
15022   ac_status=$?
15023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15024   (exit $ac_status); }; } &&
15025          { ac_try='test -s conftest$ac_exeext'
15026   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15027   (eval $ac_try) 2>&5
15028   ac_status=$?
15029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15030   (exit $ac_status); }; }; then
15031   ac_cv_lib_nsl_main=yes
15032 else
15033   echo "$as_me: failed program was:" >&5
15034 sed 's/^/| /' conftest.$ac_ext >&5
15035
15036 ac_cv_lib_nsl_main=no
15037 fi
15038 rm -f conftest.err conftest.$ac_objext \
15039       conftest$ac_exeext conftest.$ac_ext
15040 LIBS=$ac_check_lib_save_LIBS
15041 fi
15042 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
15043 echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
15044 if test $ac_cv_lib_nsl_main = yes; then
15045   cat >>confdefs.h <<_ACEOF
15046 #define HAVE_LIBNSL 1
15047 _ACEOF
15048
15049   LIBS="-lnsl $LIBS"
15050
15051 fi
15052
15053
15054 echo "$as_me:$LINENO: checking for socket in -linet" >&5
15055 echo $ECHO_N "checking for socket in -linet... $ECHO_C" >&6
15056 if test "${ac_cv_lib_inet_socket+set}" = set; then
15057   echo $ECHO_N "(cached) $ECHO_C" >&6
15058 else
15059   ac_check_lib_save_LIBS=$LIBS
15060 LIBS="-linet  $LIBS"
15061 cat >conftest.$ac_ext <<_ACEOF
15062 /* confdefs.h.  */
15063 _ACEOF
15064 cat confdefs.h >>conftest.$ac_ext
15065 cat >>conftest.$ac_ext <<_ACEOF
15066 /* end confdefs.h.  */
15067
15068 /* Override any gcc2 internal prototype to avoid an error.  */
15069 #ifdef __cplusplus
15070 extern "C"
15071 #endif
15072 /* We use char because int might match the return type of a gcc2
15073    builtin and then its argument prototype would still apply.  */
15074 char socket ();
15075 int
15076 main ()
15077 {
15078 socket ();
15079   ;
15080   return 0;
15081 }
15082 _ACEOF
15083 rm -f conftest.$ac_objext conftest$ac_exeext
15084 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15085   (eval $ac_link) 2>conftest.er1
15086   ac_status=$?
15087   grep -v '^ *+' conftest.er1 >conftest.err
15088   rm -f conftest.er1
15089   cat conftest.err >&5
15090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15091   (exit $ac_status); } &&
15092          { ac_try='test -z "$ac_c_werror_flag"
15093                          || test ! -s conftest.err'
15094   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15095   (eval $ac_try) 2>&5
15096   ac_status=$?
15097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15098   (exit $ac_status); }; } &&
15099          { ac_try='test -s conftest$ac_exeext'
15100   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15101   (eval $ac_try) 2>&5
15102   ac_status=$?
15103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15104   (exit $ac_status); }; }; then
15105   ac_cv_lib_inet_socket=yes
15106 else
15107   echo "$as_me: failed program was:" >&5
15108 sed 's/^/| /' conftest.$ac_ext >&5
15109
15110 ac_cv_lib_inet_socket=no
15111 fi
15112 rm -f conftest.err conftest.$ac_objext \
15113       conftest$ac_exeext conftest.$ac_ext
15114 LIBS=$ac_check_lib_save_LIBS
15115 fi
15116 echo "$as_me:$LINENO: result: $ac_cv_lib_inet_socket" >&5
15117 echo "${ECHO_T}$ac_cv_lib_inet_socket" >&6
15118 if test $ac_cv_lib_inet_socket = yes; then
15119   cat >>confdefs.h <<_ACEOF
15120 #define HAVE_LIBINET 1
15121 _ACEOF
15122
15123   LIBS="-linet $LIBS"
15124
15125 fi
15126
15127
15128 echo "$as_me:$LINENO: checking for main in -lgen" >&5
15129 echo $ECHO_N "checking for main in -lgen... $ECHO_C" >&6
15130 if test "${ac_cv_lib_gen_main+set}" = set; then
15131   echo $ECHO_N "(cached) $ECHO_C" >&6
15132 else
15133   ac_check_lib_save_LIBS=$LIBS
15134 LIBS="-lgen  $LIBS"
15135 cat >conftest.$ac_ext <<_ACEOF
15136 /* confdefs.h.  */
15137 _ACEOF
15138 cat confdefs.h >>conftest.$ac_ext
15139 cat >>conftest.$ac_ext <<_ACEOF
15140 /* end confdefs.h.  */
15141
15142
15143 int
15144 main ()
15145 {
15146 main ();
15147   ;
15148   return 0;
15149 }
15150 _ACEOF
15151 rm -f conftest.$ac_objext conftest$ac_exeext
15152 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15153   (eval $ac_link) 2>conftest.er1
15154   ac_status=$?
15155   grep -v '^ *+' conftest.er1 >conftest.err
15156   rm -f conftest.er1
15157   cat conftest.err >&5
15158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15159   (exit $ac_status); } &&
15160          { ac_try='test -z "$ac_c_werror_flag"
15161                          || test ! -s conftest.err'
15162   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15163   (eval $ac_try) 2>&5
15164   ac_status=$?
15165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15166   (exit $ac_status); }; } &&
15167          { ac_try='test -s conftest$ac_exeext'
15168   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15169   (eval $ac_try) 2>&5
15170   ac_status=$?
15171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15172   (exit $ac_status); }; }; then
15173   ac_cv_lib_gen_main=yes
15174 else
15175   echo "$as_me: failed program was:" >&5
15176 sed 's/^/| /' conftest.$ac_ext >&5
15177
15178 ac_cv_lib_gen_main=no
15179 fi
15180 rm -f conftest.err conftest.$ac_objext \
15181       conftest$ac_exeext conftest.$ac_ext
15182 LIBS=$ac_check_lib_save_LIBS
15183 fi
15184 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_main" >&5
15185 echo "${ECHO_T}$ac_cv_lib_gen_main" >&6
15186 if test $ac_cv_lib_gen_main = yes; then
15187   cat >>confdefs.h <<_ACEOF
15188 #define HAVE_LIBGEN 1
15189 _ACEOF
15190
15191   LIBS="-lgen $LIBS"
15192
15193 fi
15194
15195
15196 fi
15197
15198
15199 echo "$as_me:$LINENO: checking for select" >&5
15200 echo $ECHO_N "checking for select... $ECHO_C" >&6
15201 if test "${ac_cv_func_select+set}" = set; then
15202   echo $ECHO_N "(cached) $ECHO_C" >&6
15203 else
15204   cat >conftest.$ac_ext <<_ACEOF
15205 /* confdefs.h.  */
15206 _ACEOF
15207 cat confdefs.h >>conftest.$ac_ext
15208 cat >>conftest.$ac_ext <<_ACEOF
15209 /* end confdefs.h.  */
15210 /* Define select to an innocuous variant, in case <limits.h> declares select.
15211    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15212 #define select innocuous_select
15213
15214 /* System header to define __stub macros and hopefully few prototypes,
15215     which can conflict with char select (); below.
15216     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15217     <limits.h> exists even on freestanding compilers.  */
15218
15219 #ifdef __STDC__
15220 # include <limits.h>
15221 #else
15222 # include <assert.h>
15223 #endif
15224
15225 #undef select
15226
15227 /* Override any gcc2 internal prototype to avoid an error.  */
15228 #ifdef __cplusplus
15229 extern "C"
15230 {
15231 #endif
15232 /* We use char because int might match the return type of a gcc2
15233    builtin and then its argument prototype would still apply.  */
15234 char select ();
15235 /* The GNU C library defines this for functions which it implements
15236     to always fail with ENOSYS.  Some functions are actually named
15237     something starting with __ and the normal name is an alias.  */
15238 #if defined (__stub_select) || defined (__stub___select)
15239 choke me
15240 #else
15241 char (*f) () = select;
15242 #endif
15243 #ifdef __cplusplus
15244 }
15245 #endif
15246
15247 int
15248 main ()
15249 {
15250 return f != select;
15251   ;
15252   return 0;
15253 }
15254 _ACEOF
15255 rm -f conftest.$ac_objext conftest$ac_exeext
15256 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15257   (eval $ac_link) 2>conftest.er1
15258   ac_status=$?
15259   grep -v '^ *+' conftest.er1 >conftest.err
15260   rm -f conftest.er1
15261   cat conftest.err >&5
15262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15263   (exit $ac_status); } &&
15264          { ac_try='test -z "$ac_c_werror_flag"
15265                          || test ! -s conftest.err'
15266   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15267   (eval $ac_try) 2>&5
15268   ac_status=$?
15269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15270   (exit $ac_status); }; } &&
15271          { ac_try='test -s conftest$ac_exeext'
15272   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15273   (eval $ac_try) 2>&5
15274   ac_status=$?
15275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15276   (exit $ac_status); }; }; then
15277   ac_cv_func_select=yes
15278 else
15279   echo "$as_me: failed program was:" >&5
15280 sed 's/^/| /' conftest.$ac_ext >&5
15281
15282 ac_cv_func_select=no
15283 fi
15284 rm -f conftest.err conftest.$ac_objext \
15285       conftest$ac_exeext conftest.$ac_ext
15286 fi
15287 echo "$as_me:$LINENO: result: $ac_cv_func_select" >&5
15288 echo "${ECHO_T}$ac_cv_func_select" >&6
15289 if test $ac_cv_func_select = yes; then
15290   :
15291 else
15292   { { echo "$as_me:$LINENO: error: select() required." >&5
15293 echo "$as_me: error: select() required." >&2;}
15294    { (exit 1); exit 1; }; }
15295 fi
15296
15297
15298 if test "${ac_cv_header_winsock_h}" != yes; then
15299
15300
15301 for ac_header in sys/select.h sys/socket.h
15302 do
15303 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15304 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15305   echo "$as_me:$LINENO: checking for $ac_header" >&5
15306 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15307 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15308   echo $ECHO_N "(cached) $ECHO_C" >&6
15309 fi
15310 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15311 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15312 else
15313   # Is the header compilable?
15314 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15315 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15316 cat >conftest.$ac_ext <<_ACEOF
15317 /* confdefs.h.  */
15318 _ACEOF
15319 cat confdefs.h >>conftest.$ac_ext
15320 cat >>conftest.$ac_ext <<_ACEOF
15321 /* end confdefs.h.  */
15322 $ac_includes_default
15323 #include <$ac_header>
15324 _ACEOF
15325 rm -f conftest.$ac_objext
15326 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15327   (eval $ac_compile) 2>conftest.er1
15328   ac_status=$?
15329   grep -v '^ *+' conftest.er1 >conftest.err
15330   rm -f conftest.er1
15331   cat conftest.err >&5
15332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15333   (exit $ac_status); } &&
15334          { ac_try='test -z "$ac_c_werror_flag"
15335                          || test ! -s conftest.err'
15336   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15337   (eval $ac_try) 2>&5
15338   ac_status=$?
15339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15340   (exit $ac_status); }; } &&
15341          { ac_try='test -s conftest.$ac_objext'
15342   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15343   (eval $ac_try) 2>&5
15344   ac_status=$?
15345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15346   (exit $ac_status); }; }; then
15347   ac_header_compiler=yes
15348 else
15349   echo "$as_me: failed program was:" >&5
15350 sed 's/^/| /' conftest.$ac_ext >&5
15351
15352 ac_header_compiler=no
15353 fi
15354 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15355 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15356 echo "${ECHO_T}$ac_header_compiler" >&6
15357
15358 # Is the header present?
15359 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15360 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15361 cat >conftest.$ac_ext <<_ACEOF
15362 /* confdefs.h.  */
15363 _ACEOF
15364 cat confdefs.h >>conftest.$ac_ext
15365 cat >>conftest.$ac_ext <<_ACEOF
15366 /* end confdefs.h.  */
15367 #include <$ac_header>
15368 _ACEOF
15369 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15370   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15371   ac_status=$?
15372   grep -v '^ *+' conftest.er1 >conftest.err
15373   rm -f conftest.er1
15374   cat conftest.err >&5
15375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15376   (exit $ac_status); } >/dev/null; then
15377   if test -s conftest.err; then
15378     ac_cpp_err=$ac_c_preproc_warn_flag
15379     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15380   else
15381     ac_cpp_err=
15382   fi
15383 else
15384   ac_cpp_err=yes
15385 fi
15386 if test -z "$ac_cpp_err"; then
15387   ac_header_preproc=yes
15388 else
15389   echo "$as_me: failed program was:" >&5
15390 sed 's/^/| /' conftest.$ac_ext >&5
15391
15392   ac_header_preproc=no
15393 fi
15394 rm -f conftest.err conftest.$ac_ext
15395 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15396 echo "${ECHO_T}$ac_header_preproc" >&6
15397
15398 # So?  What about this header?
15399 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15400   yes:no: )
15401     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15402 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15403     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15404 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15405     ac_header_preproc=yes
15406     ;;
15407   no:yes:* )
15408     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15409 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15410     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15411 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15412     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15413 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15414     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15415 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15416     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15417 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15418     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15419 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15420     (
15421       cat <<\_ASBOX
15422 ## --------------------------------------------- ##
15423 ## Report this to <http://www.openldap.org/its/> ##
15424 ## --------------------------------------------- ##
15425 _ASBOX
15426     ) |
15427       sed "s/^/$as_me: WARNING:     /" >&2
15428     ;;
15429 esac
15430 echo "$as_me:$LINENO: checking for $ac_header" >&5
15431 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15432 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15433   echo $ECHO_N "(cached) $ECHO_C" >&6
15434 else
15435   eval "$as_ac_Header=\$ac_header_preproc"
15436 fi
15437 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15438 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15439
15440 fi
15441 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15442   cat >>confdefs.h <<_ACEOF
15443 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15444 _ACEOF
15445
15446 fi
15447
15448 done
15449
15450 echo "$as_me:$LINENO: checking types of arguments for select" >&5
15451 echo $ECHO_N "checking types of arguments for select... $ECHO_C" >&6
15452 if test "${ac_cv_func_select_args+set}" = set; then
15453   echo $ECHO_N "(cached) $ECHO_C" >&6
15454 else
15455   for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
15456  for ac_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
15457   for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
15458    cat >conftest.$ac_ext <<_ACEOF
15459 /* confdefs.h.  */
15460 _ACEOF
15461 cat confdefs.h >>conftest.$ac_ext
15462 cat >>conftest.$ac_ext <<_ACEOF
15463 /* end confdefs.h.  */
15464 $ac_includes_default
15465 #if HAVE_SYS_SELECT_H
15466 # include <sys/select.h>
15467 #endif
15468 #if HAVE_SYS_SOCKET_H
15469 # include <sys/socket.h>
15470 #endif
15471
15472 int
15473 main ()
15474 {
15475 extern int select ($ac_arg1,
15476                                             $ac_arg234, $ac_arg234, $ac_arg234,
15477                                             $ac_arg5);
15478   ;
15479   return 0;
15480 }
15481 _ACEOF
15482 rm -f conftest.$ac_objext
15483 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15484   (eval $ac_compile) 2>conftest.er1
15485   ac_status=$?
15486   grep -v '^ *+' conftest.er1 >conftest.err
15487   rm -f conftest.er1
15488   cat conftest.err >&5
15489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15490   (exit $ac_status); } &&
15491          { ac_try='test -z "$ac_c_werror_flag"
15492                          || test ! -s conftest.err'
15493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15494   (eval $ac_try) 2>&5
15495   ac_status=$?
15496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15497   (exit $ac_status); }; } &&
15498          { ac_try='test -s conftest.$ac_objext'
15499   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15500   (eval $ac_try) 2>&5
15501   ac_status=$?
15502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15503   (exit $ac_status); }; }; then
15504   ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
15505 else
15506   echo "$as_me: failed program was:" >&5
15507 sed 's/^/| /' conftest.$ac_ext >&5
15508
15509 fi
15510 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15511   done
15512  done
15513 done
15514 # Provide a safe default value.
15515 : ${ac_cv_func_select_args='int,int *,struct timeval *'}
15516
15517 fi
15518 echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5
15519 echo "${ECHO_T}$ac_cv_func_select_args" >&6
15520 ac_save_IFS=$IFS; IFS=','
15521 set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
15522 IFS=$ac_save_IFS
15523 shift
15524
15525 cat >>confdefs.h <<_ACEOF
15526 #define SELECT_TYPE_ARG1 $1
15527 _ACEOF
15528
15529
15530 cat >>confdefs.h <<_ACEOF
15531 #define SELECT_TYPE_ARG234 ($2)
15532 _ACEOF
15533
15534
15535 cat >>confdefs.h <<_ACEOF
15536 #define SELECT_TYPE_ARG5 ($3)
15537 _ACEOF
15538
15539 rm -f conftest*
15540
15541 fi
15542
15543
15544
15545 for ac_func in poll
15546 do
15547 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15548 echo "$as_me:$LINENO: checking for $ac_func" >&5
15549 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15550 if eval "test \"\${$as_ac_var+set}\" = set"; then
15551   echo $ECHO_N "(cached) $ECHO_C" >&6
15552 else
15553   cat >conftest.$ac_ext <<_ACEOF
15554 /* confdefs.h.  */
15555 _ACEOF
15556 cat confdefs.h >>conftest.$ac_ext
15557 cat >>conftest.$ac_ext <<_ACEOF
15558 /* end confdefs.h.  */
15559 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15560    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15561 #define $ac_func innocuous_$ac_func
15562
15563 /* System header to define __stub macros and hopefully few prototypes,
15564     which can conflict with char $ac_func (); below.
15565     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15566     <limits.h> exists even on freestanding compilers.  */
15567
15568 #ifdef __STDC__
15569 # include <limits.h>
15570 #else
15571 # include <assert.h>
15572 #endif
15573
15574 #undef $ac_func
15575
15576 /* Override any gcc2 internal prototype to avoid an error.  */
15577 #ifdef __cplusplus
15578 extern "C"
15579 {
15580 #endif
15581 /* We use char because int might match the return type of a gcc2
15582    builtin and then its argument prototype would still apply.  */
15583 char $ac_func ();
15584 /* The GNU C library defines this for functions which it implements
15585     to always fail with ENOSYS.  Some functions are actually named
15586     something starting with __ and the normal name is an alias.  */
15587 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15588 choke me
15589 #else
15590 char (*f) () = $ac_func;
15591 #endif
15592 #ifdef __cplusplus
15593 }
15594 #endif
15595
15596 int
15597 main ()
15598 {
15599 return f != $ac_func;
15600   ;
15601   return 0;
15602 }
15603 _ACEOF
15604 rm -f conftest.$ac_objext conftest$ac_exeext
15605 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15606   (eval $ac_link) 2>conftest.er1
15607   ac_status=$?
15608   grep -v '^ *+' conftest.er1 >conftest.err
15609   rm -f conftest.er1
15610   cat conftest.err >&5
15611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15612   (exit $ac_status); } &&
15613          { ac_try='test -z "$ac_c_werror_flag"
15614                          || test ! -s conftest.err'
15615   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15616   (eval $ac_try) 2>&5
15617   ac_status=$?
15618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15619   (exit $ac_status); }; } &&
15620          { ac_try='test -s conftest$ac_exeext'
15621   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15622   (eval $ac_try) 2>&5
15623   ac_status=$?
15624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15625   (exit $ac_status); }; }; then
15626   eval "$as_ac_var=yes"
15627 else
15628   echo "$as_me: failed program was:" >&5
15629 sed 's/^/| /' conftest.$ac_ext >&5
15630
15631 eval "$as_ac_var=no"
15632 fi
15633 rm -f conftest.err conftest.$ac_objext \
15634       conftest$ac_exeext conftest.$ac_ext
15635 fi
15636 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15637 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15638 if test `eval echo '${'$as_ac_var'}'` = yes; then
15639   cat >>confdefs.h <<_ACEOF
15640 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15641 _ACEOF
15642
15643 fi
15644 done
15645
15646
15647 for ac_header in poll.h
15648 do
15649 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15650 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15651   echo "$as_me:$LINENO: checking for $ac_header" >&5
15652 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15653 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15654   echo $ECHO_N "(cached) $ECHO_C" >&6
15655 fi
15656 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15657 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15658 else
15659   # Is the header compilable?
15660 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15661 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15662 cat >conftest.$ac_ext <<_ACEOF
15663 /* confdefs.h.  */
15664 _ACEOF
15665 cat confdefs.h >>conftest.$ac_ext
15666 cat >>conftest.$ac_ext <<_ACEOF
15667 /* end confdefs.h.  */
15668 $ac_includes_default
15669 #include <$ac_header>
15670 _ACEOF
15671 rm -f conftest.$ac_objext
15672 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15673   (eval $ac_compile) 2>conftest.er1
15674   ac_status=$?
15675   grep -v '^ *+' conftest.er1 >conftest.err
15676   rm -f conftest.er1
15677   cat conftest.err >&5
15678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15679   (exit $ac_status); } &&
15680          { ac_try='test -z "$ac_c_werror_flag"
15681                          || test ! -s conftest.err'
15682   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15683   (eval $ac_try) 2>&5
15684   ac_status=$?
15685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15686   (exit $ac_status); }; } &&
15687          { ac_try='test -s conftest.$ac_objext'
15688   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15689   (eval $ac_try) 2>&5
15690   ac_status=$?
15691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15692   (exit $ac_status); }; }; then
15693   ac_header_compiler=yes
15694 else
15695   echo "$as_me: failed program was:" >&5
15696 sed 's/^/| /' conftest.$ac_ext >&5
15697
15698 ac_header_compiler=no
15699 fi
15700 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15701 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15702 echo "${ECHO_T}$ac_header_compiler" >&6
15703
15704 # Is the header present?
15705 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15706 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15707 cat >conftest.$ac_ext <<_ACEOF
15708 /* confdefs.h.  */
15709 _ACEOF
15710 cat confdefs.h >>conftest.$ac_ext
15711 cat >>conftest.$ac_ext <<_ACEOF
15712 /* end confdefs.h.  */
15713 #include <$ac_header>
15714 _ACEOF
15715 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15716   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15717   ac_status=$?
15718   grep -v '^ *+' conftest.er1 >conftest.err
15719   rm -f conftest.er1
15720   cat conftest.err >&5
15721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15722   (exit $ac_status); } >/dev/null; then
15723   if test -s conftest.err; then
15724     ac_cpp_err=$ac_c_preproc_warn_flag
15725     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15726   else
15727     ac_cpp_err=
15728   fi
15729 else
15730   ac_cpp_err=yes
15731 fi
15732 if test -z "$ac_cpp_err"; then
15733   ac_header_preproc=yes
15734 else
15735   echo "$as_me: failed program was:" >&5
15736 sed 's/^/| /' conftest.$ac_ext >&5
15737
15738   ac_header_preproc=no
15739 fi
15740 rm -f conftest.err conftest.$ac_ext
15741 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15742 echo "${ECHO_T}$ac_header_preproc" >&6
15743
15744 # So?  What about this header?
15745 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15746   yes:no: )
15747     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15748 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15749     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15750 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15751     ac_header_preproc=yes
15752     ;;
15753   no:yes:* )
15754     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15755 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15756     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15757 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15758     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15759 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15760     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15761 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15762     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15763 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15764     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15765 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15766     (
15767       cat <<\_ASBOX
15768 ## --------------------------------------------- ##
15769 ## Report this to <http://www.openldap.org/its/> ##
15770 ## --------------------------------------------- ##
15771 _ASBOX
15772     ) |
15773       sed "s/^/$as_me: WARNING:     /" >&2
15774     ;;
15775 esac
15776 echo "$as_me:$LINENO: checking for $ac_header" >&5
15777 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15778 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15779   echo $ECHO_N "(cached) $ECHO_C" >&6
15780 else
15781   eval "$as_ac_Header=\$ac_header_preproc"
15782 fi
15783 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15784 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15785
15786 fi
15787 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15788   cat >>confdefs.h <<_ACEOF
15789 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15790 _ACEOF
15791
15792 fi
15793
15794 done
15795
15796
15797
15798 for ac_header in sys/epoll.h
15799 do
15800 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15801 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15802   echo "$as_me:$LINENO: checking for $ac_header" >&5
15803 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15804 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15805   echo $ECHO_N "(cached) $ECHO_C" >&6
15806 fi
15807 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15808 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15809 else
15810   # Is the header compilable?
15811 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15812 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15813 cat >conftest.$ac_ext <<_ACEOF
15814 /* confdefs.h.  */
15815 _ACEOF
15816 cat confdefs.h >>conftest.$ac_ext
15817 cat >>conftest.$ac_ext <<_ACEOF
15818 /* end confdefs.h.  */
15819 $ac_includes_default
15820 #include <$ac_header>
15821 _ACEOF
15822 rm -f conftest.$ac_objext
15823 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15824   (eval $ac_compile) 2>conftest.er1
15825   ac_status=$?
15826   grep -v '^ *+' conftest.er1 >conftest.err
15827   rm -f conftest.er1
15828   cat conftest.err >&5
15829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15830   (exit $ac_status); } &&
15831          { ac_try='test -z "$ac_c_werror_flag"
15832                          || test ! -s conftest.err'
15833   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15834   (eval $ac_try) 2>&5
15835   ac_status=$?
15836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15837   (exit $ac_status); }; } &&
15838          { ac_try='test -s conftest.$ac_objext'
15839   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15840   (eval $ac_try) 2>&5
15841   ac_status=$?
15842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15843   (exit $ac_status); }; }; then
15844   ac_header_compiler=yes
15845 else
15846   echo "$as_me: failed program was:" >&5
15847 sed 's/^/| /' conftest.$ac_ext >&5
15848
15849 ac_header_compiler=no
15850 fi
15851 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15852 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15853 echo "${ECHO_T}$ac_header_compiler" >&6
15854
15855 # Is the header present?
15856 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15857 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15858 cat >conftest.$ac_ext <<_ACEOF
15859 /* confdefs.h.  */
15860 _ACEOF
15861 cat confdefs.h >>conftest.$ac_ext
15862 cat >>conftest.$ac_ext <<_ACEOF
15863 /* end confdefs.h.  */
15864 #include <$ac_header>
15865 _ACEOF
15866 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15867   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15868   ac_status=$?
15869   grep -v '^ *+' conftest.er1 >conftest.err
15870   rm -f conftest.er1
15871   cat conftest.err >&5
15872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15873   (exit $ac_status); } >/dev/null; then
15874   if test -s conftest.err; then
15875     ac_cpp_err=$ac_c_preproc_warn_flag
15876     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15877   else
15878     ac_cpp_err=
15879   fi
15880 else
15881   ac_cpp_err=yes
15882 fi
15883 if test -z "$ac_cpp_err"; then
15884   ac_header_preproc=yes
15885 else
15886   echo "$as_me: failed program was:" >&5
15887 sed 's/^/| /' conftest.$ac_ext >&5
15888
15889   ac_header_preproc=no
15890 fi
15891 rm -f conftest.err conftest.$ac_ext
15892 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15893 echo "${ECHO_T}$ac_header_preproc" >&6
15894
15895 # So?  What about this header?
15896 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15897   yes:no: )
15898     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15899 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15900     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15901 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15902     ac_header_preproc=yes
15903     ;;
15904   no:yes:* )
15905     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15906 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15907     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15908 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15909     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15910 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15911     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15912 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15913     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15914 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15915     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15916 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15917     (
15918       cat <<\_ASBOX
15919 ## --------------------------------------------- ##
15920 ## Report this to <http://www.openldap.org/its/> ##
15921 ## --------------------------------------------- ##
15922 _ASBOX
15923     ) |
15924       sed "s/^/$as_me: WARNING:     /" >&2
15925     ;;
15926 esac
15927 echo "$as_me:$LINENO: checking for $ac_header" >&5
15928 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15929 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15930   echo $ECHO_N "(cached) $ECHO_C" >&6
15931 else
15932   eval "$as_ac_Header=\$ac_header_preproc"
15933 fi
15934 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15935 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15936
15937 fi
15938 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15939   cat >>confdefs.h <<_ACEOF
15940 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15941 _ACEOF
15942
15943 fi
15944
15945 done
15946
15947 if test "${ac_cv_header_sys_epoll_h}" = yes; then
15948 echo "$as_me:$LINENO: checking for epoll system call" >&5
15949 echo $ECHO_N "checking for epoll system call... $ECHO_C" >&6
15950 if test "$cross_compiling" = yes; then
15951   echo "$as_me:$LINENO: result: no" >&5
15952 echo "${ECHO_T}no" >&6
15953 else
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 int main(int argc, char *argv)
15961 {
15962         int epfd = epoll_create(256);
15963         exit (epfd == -1 ? 1 : 0);
15964 }
15965 _ACEOF
15966 rm -f conftest$ac_exeext
15967 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15968   (eval $ac_link) 2>&5
15969   ac_status=$?
15970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15971   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15972   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15973   (eval $ac_try) 2>&5
15974   ac_status=$?
15975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15976   (exit $ac_status); }; }; then
15977   echo "$as_me:$LINENO: result: yes" >&5
15978 echo "${ECHO_T}yes" >&6
15979
15980 cat >>confdefs.h <<\_ACEOF
15981 #define HAVE_EPOLL 1
15982 _ACEOF
15983
15984 else
15985   echo "$as_me: program exited with status $ac_status" >&5
15986 echo "$as_me: failed program was:" >&5
15987 sed 's/^/| /' conftest.$ac_ext >&5
15988
15989 ( exit $ac_status )
15990 echo "$as_me:$LINENO: result: no" >&5
15991 echo "${ECHO_T}no" >&6
15992 fi
15993 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15994 fi
15995 fi
15996
15997 # strerror checks
15998 echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5
15999 echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6
16000 if test "${ol_cv_dcl_sys_errlist+set}" = set; then
16001   echo $ECHO_N "(cached) $ECHO_C" >&6
16002 else
16003
16004         cat >conftest.$ac_ext <<_ACEOF
16005 /* confdefs.h.  */
16006 _ACEOF
16007 cat confdefs.h >>conftest.$ac_ext
16008 cat >>conftest.$ac_ext <<_ACEOF
16009 /* end confdefs.h.  */
16010
16011 #include <stdio.h>
16012 #include <sys/types.h>
16013 #include <errno.h>
16014 #ifdef WINNT
16015 #include <stdlib.h>
16016 #endif
16017 int
16018 main ()
16019 {
16020 char *c = (char *) *sys_errlist
16021   ;
16022   return 0;
16023 }
16024 _ACEOF
16025 rm -f conftest.$ac_objext
16026 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16027   (eval $ac_compile) 2>conftest.er1
16028   ac_status=$?
16029   grep -v '^ *+' conftest.er1 >conftest.err
16030   rm -f conftest.er1
16031   cat conftest.err >&5
16032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16033   (exit $ac_status); } &&
16034          { ac_try='test -z "$ac_c_werror_flag"
16035                          || test ! -s conftest.err'
16036   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16037   (eval $ac_try) 2>&5
16038   ac_status=$?
16039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16040   (exit $ac_status); }; } &&
16041          { ac_try='test -s conftest.$ac_objext'
16042   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16043   (eval $ac_try) 2>&5
16044   ac_status=$?
16045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16046   (exit $ac_status); }; }; then
16047   ol_cv_dcl_sys_errlist=yes
16048         ol_cv_have_sys_errlist=yes
16049 else
16050   echo "$as_me: failed program was:" >&5
16051 sed 's/^/| /' conftest.$ac_ext >&5
16052
16053 ol_cv_dcl_sys_errlist=no
16054 fi
16055 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16056 fi
16057 echo "$as_me:$LINENO: result: $ol_cv_dcl_sys_errlist" >&5
16058 echo "${ECHO_T}$ol_cv_dcl_sys_errlist" >&6
16059 #
16060 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16061 if test $ol_cv_dcl_sys_errlist = no ; then
16062
16063 cat >>confdefs.h <<\_ACEOF
16064 #define DECL_SYS_ERRLIST 1
16065 _ACEOF
16066
16067
16068         echo "$as_me:$LINENO: checking existence of sys_errlist" >&5
16069 echo $ECHO_N "checking existence of sys_errlist... $ECHO_C" >&6
16070 if test "${ol_cv_have_sys_errlist+set}" = set; then
16071   echo $ECHO_N "(cached) $ECHO_C" >&6
16072 else
16073
16074                 cat >conftest.$ac_ext <<_ACEOF
16075 /* confdefs.h.  */
16076 _ACEOF
16077 cat confdefs.h >>conftest.$ac_ext
16078 cat >>conftest.$ac_ext <<_ACEOF
16079 /* end confdefs.h.  */
16080 #include <errno.h>
16081 int
16082 main ()
16083 {
16084 char *c = (char *) *sys_errlist
16085   ;
16086   return 0;
16087 }
16088 _ACEOF
16089 rm -f conftest.$ac_objext conftest$ac_exeext
16090 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16091   (eval $ac_link) 2>conftest.er1
16092   ac_status=$?
16093   grep -v '^ *+' conftest.er1 >conftest.err
16094   rm -f conftest.er1
16095   cat conftest.err >&5
16096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16097   (exit $ac_status); } &&
16098          { ac_try='test -z "$ac_c_werror_flag"
16099                          || test ! -s conftest.err'
16100   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16101   (eval $ac_try) 2>&5
16102   ac_status=$?
16103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16104   (exit $ac_status); }; } &&
16105          { ac_try='test -s conftest$ac_exeext'
16106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16107   (eval $ac_try) 2>&5
16108   ac_status=$?
16109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16110   (exit $ac_status); }; }; then
16111   ol_cv_have_sys_errlist=yes
16112 else
16113   echo "$as_me: failed program was:" >&5
16114 sed 's/^/| /' conftest.$ac_ext >&5
16115
16116 ol_cv_have_sys_errlist=no
16117 fi
16118 rm -f conftest.err conftest.$ac_objext \
16119       conftest$ac_exeext conftest.$ac_ext
16120 fi
16121 echo "$as_me:$LINENO: result: $ol_cv_have_sys_errlist" >&5
16122 echo "${ECHO_T}$ol_cv_have_sys_errlist" >&6
16123 fi
16124 if test $ol_cv_have_sys_errlist = yes ; then
16125
16126 cat >>confdefs.h <<\_ACEOF
16127 #define HAVE_SYS_ERRLIST 1
16128 _ACEOF
16129
16130 fi
16131
16132
16133 for ac_func in strerror strerror_r
16134 do
16135 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16136 echo "$as_me:$LINENO: checking for $ac_func" >&5
16137 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16138 if eval "test \"\${$as_ac_var+set}\" = set"; then
16139   echo $ECHO_N "(cached) $ECHO_C" >&6
16140 else
16141   cat >conftest.$ac_ext <<_ACEOF
16142 /* confdefs.h.  */
16143 _ACEOF
16144 cat confdefs.h >>conftest.$ac_ext
16145 cat >>conftest.$ac_ext <<_ACEOF
16146 /* end confdefs.h.  */
16147 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16148    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16149 #define $ac_func innocuous_$ac_func
16150
16151 /* System header to define __stub macros and hopefully few prototypes,
16152     which can conflict with char $ac_func (); below.
16153     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16154     <limits.h> exists even on freestanding compilers.  */
16155
16156 #ifdef __STDC__
16157 # include <limits.h>
16158 #else
16159 # include <assert.h>
16160 #endif
16161
16162 #undef $ac_func
16163
16164 /* Override any gcc2 internal prototype to avoid an error.  */
16165 #ifdef __cplusplus
16166 extern "C"
16167 {
16168 #endif
16169 /* We use char because int might match the return type of a gcc2
16170    builtin and then its argument prototype would still apply.  */
16171 char $ac_func ();
16172 /* The GNU C library defines this for functions which it implements
16173     to always fail with ENOSYS.  Some functions are actually named
16174     something starting with __ and the normal name is an alias.  */
16175 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16176 choke me
16177 #else
16178 char (*f) () = $ac_func;
16179 #endif
16180 #ifdef __cplusplus
16181 }
16182 #endif
16183
16184 int
16185 main ()
16186 {
16187 return f != $ac_func;
16188   ;
16189   return 0;
16190 }
16191 _ACEOF
16192 rm -f conftest.$ac_objext conftest$ac_exeext
16193 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16194   (eval $ac_link) 2>conftest.er1
16195   ac_status=$?
16196   grep -v '^ *+' conftest.er1 >conftest.err
16197   rm -f conftest.er1
16198   cat conftest.err >&5
16199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16200   (exit $ac_status); } &&
16201          { ac_try='test -z "$ac_c_werror_flag"
16202                          || test ! -s conftest.err'
16203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16204   (eval $ac_try) 2>&5
16205   ac_status=$?
16206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16207   (exit $ac_status); }; } &&
16208          { ac_try='test -s conftest$ac_exeext'
16209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16210   (eval $ac_try) 2>&5
16211   ac_status=$?
16212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16213   (exit $ac_status); }; }; then
16214   eval "$as_ac_var=yes"
16215 else
16216   echo "$as_me: failed program was:" >&5
16217 sed 's/^/| /' conftest.$ac_ext >&5
16218
16219 eval "$as_ac_var=no"
16220 fi
16221 rm -f conftest.err conftest.$ac_objext \
16222       conftest$ac_exeext conftest.$ac_ext
16223 fi
16224 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16225 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16226 if test `eval echo '${'$as_ac_var'}'` = yes; then
16227   cat >>confdefs.h <<_ACEOF
16228 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16229 _ACEOF
16230
16231 fi
16232 done
16233
16234 ol_cv_func_strerror_r=no
16235 if test "${ac_cv_func_strerror_r}" = yes ; then
16236         echo "$as_me:$LINENO: checking non-posix strerror_r" >&5
16237 echo $ECHO_N "checking non-posix strerror_r... $ECHO_C" >&6
16238 if test "${ol_cv_nonposix_strerror_r+set}" = set; then
16239   echo $ECHO_N "(cached) $ECHO_C" >&6
16240 else
16241
16242         cat >conftest.$ac_ext <<_ACEOF
16243 /* confdefs.h.  */
16244 _ACEOF
16245 cat confdefs.h >>conftest.$ac_ext
16246 cat >>conftest.$ac_ext <<_ACEOF
16247 /* end confdefs.h.  */
16248 #include <string.h>
16249 _ACEOF
16250 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16251   $EGREP "strerror_r" >/dev/null 2>&1; then
16252   ol_decl_strerror_r=yes
16253 else
16254   ol_decl_strerror_r=no
16255 fi
16256 rm -f conftest*
16257
16258         if test $ol_decl_strerror_r = yes ; then
16259                 cat >conftest.$ac_ext <<_ACEOF
16260 /* confdefs.h.  */
16261 _ACEOF
16262 cat confdefs.h >>conftest.$ac_ext
16263 cat >>conftest.$ac_ext <<_ACEOF
16264 /* end confdefs.h.  */
16265 #include <string.h>
16266 int
16267 main ()
16268 {
16269    /* from autoconf 2.59 */
16270                                 char buf[100];
16271                                 char x = *strerror_r (0, buf, sizeof buf);
16272                                 char *p = strerror_r (0, buf, sizeof buf);
16273
16274   ;
16275   return 0;
16276 }
16277 _ACEOF
16278 rm -f conftest.$ac_objext
16279 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16280   (eval $ac_compile) 2>conftest.er1
16281   ac_status=$?
16282   grep -v '^ *+' conftest.er1 >conftest.err
16283   rm -f conftest.er1
16284   cat conftest.err >&5
16285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16286   (exit $ac_status); } &&
16287          { ac_try='test -z "$ac_c_werror_flag"
16288                          || test ! -s conftest.err'
16289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16290   (eval $ac_try) 2>&5
16291   ac_status=$?
16292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16293   (exit $ac_status); }; } &&
16294          { ac_try='test -s conftest.$ac_objext'
16295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16296   (eval $ac_try) 2>&5
16297   ac_status=$?
16298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16299   (exit $ac_status); }; }; then
16300   ol_cv_nonposix_strerror_r=yes
16301 else
16302   echo "$as_me: failed program was:" >&5
16303 sed 's/^/| /' conftest.$ac_ext >&5
16304
16305 ol_cv_nonposix_strerror_r=no
16306 fi
16307 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16308         else
16309                 if test "$cross_compiling" = yes; then
16310   ol_cv_nonposix_strerror=no
16311 else
16312   cat >conftest.$ac_ext <<_ACEOF
16313 /* confdefs.h.  */
16314 _ACEOF
16315 cat confdefs.h >>conftest.$ac_ext
16316 cat >>conftest.$ac_ext <<_ACEOF
16317 /* end confdefs.h.  */
16318
16319                         main() {
16320                                 char buf[100];
16321                                 buf[0] = 0;
16322                                 strerror_r( 1, buf, sizeof buf );
16323                                 exit( buf[0] == 0 );
16324                         }
16325
16326 _ACEOF
16327 rm -f conftest$ac_exeext
16328 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16329   (eval $ac_link) 2>&5
16330   ac_status=$?
16331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16332   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16333   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16334   (eval $ac_try) 2>&5
16335   ac_status=$?
16336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16337   (exit $ac_status); }; }; then
16338   ol_cv_nonposix_strerror_r=yes
16339 else
16340   echo "$as_me: program exited with status $ac_status" >&5
16341 echo "$as_me: failed program was:" >&5
16342 sed 's/^/| /' conftest.$ac_ext >&5
16343
16344 ( exit $ac_status )
16345 ol_cv_nonposix_strerror=no
16346 fi
16347 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16348 fi
16349         fi
16350
16351 fi
16352 echo "$as_me:$LINENO: result: $ol_cv_nonposix_strerror_r" >&5
16353 echo "${ECHO_T}$ol_cv_nonposix_strerror_r" >&6
16354 if test $ol_cv_nonposix_strerror_r = yes ; then
16355
16356 cat >>confdefs.h <<\_ACEOF
16357 #define HAVE_NONPOSIX_STRERROR_R 1
16358 _ACEOF
16359
16360 fi
16361
16362 elif test "${ac_cv_func_strerror}" = no ; then
16363         echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5
16364 echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6
16365 if test "${ol_cv_dcl_sys_errlist+set}" = set; then
16366   echo $ECHO_N "(cached) $ECHO_C" >&6
16367 else
16368
16369         cat >conftest.$ac_ext <<_ACEOF
16370 /* confdefs.h.  */
16371 _ACEOF
16372 cat confdefs.h >>conftest.$ac_ext
16373 cat >>conftest.$ac_ext <<_ACEOF
16374 /* end confdefs.h.  */
16375
16376 #include <stdio.h>
16377 #include <sys/types.h>
16378 #include <errno.h>
16379 #ifdef WINNT
16380 #include <stdlib.h>
16381 #endif
16382 int
16383 main ()
16384 {
16385 char *c = (char *) *sys_errlist
16386   ;
16387   return 0;
16388 }
16389 _ACEOF
16390 rm -f conftest.$ac_objext
16391 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16392   (eval $ac_compile) 2>conftest.er1
16393   ac_status=$?
16394   grep -v '^ *+' conftest.er1 >conftest.err
16395   rm -f conftest.er1
16396   cat conftest.err >&5
16397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16398   (exit $ac_status); } &&
16399          { ac_try='test -z "$ac_c_werror_flag"
16400                          || test ! -s conftest.err'
16401   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16402   (eval $ac_try) 2>&5
16403   ac_status=$?
16404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16405   (exit $ac_status); }; } &&
16406          { ac_try='test -s conftest.$ac_objext'
16407   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16408   (eval $ac_try) 2>&5
16409   ac_status=$?
16410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16411   (exit $ac_status); }; }; then
16412   ol_cv_dcl_sys_errlist=yes
16413         ol_cv_have_sys_errlist=yes
16414 else
16415   echo "$as_me: failed program was:" >&5
16416 sed 's/^/| /' conftest.$ac_ext >&5
16417
16418 ol_cv_dcl_sys_errlist=no
16419 fi
16420 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16421 fi
16422 echo "$as_me:$LINENO: result: $ol_cv_dcl_sys_errlist" >&5
16423 echo "${ECHO_T}$ol_cv_dcl_sys_errlist" >&6
16424 #
16425 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16426 if test $ol_cv_dcl_sys_errlist = no ; then
16427
16428 cat >>confdefs.h <<\_ACEOF
16429 #define DECL_SYS_ERRLIST 1
16430 _ACEOF
16431
16432
16433         echo "$as_me:$LINENO: checking existence of sys_errlist" >&5
16434 echo $ECHO_N "checking existence of sys_errlist... $ECHO_C" >&6
16435 if test "${ol_cv_have_sys_errlist+set}" = set; then
16436   echo $ECHO_N "(cached) $ECHO_C" >&6
16437 else
16438
16439                 cat >conftest.$ac_ext <<_ACEOF
16440 /* confdefs.h.  */
16441 _ACEOF
16442 cat confdefs.h >>conftest.$ac_ext
16443 cat >>conftest.$ac_ext <<_ACEOF
16444 /* end confdefs.h.  */
16445 #include <errno.h>
16446 int
16447 main ()
16448 {
16449 char *c = (char *) *sys_errlist
16450   ;
16451   return 0;
16452 }
16453 _ACEOF
16454 rm -f conftest.$ac_objext conftest$ac_exeext
16455 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16456   (eval $ac_link) 2>conftest.er1
16457   ac_status=$?
16458   grep -v '^ *+' conftest.er1 >conftest.err
16459   rm -f conftest.er1
16460   cat conftest.err >&5
16461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16462   (exit $ac_status); } &&
16463          { ac_try='test -z "$ac_c_werror_flag"
16464                          || test ! -s conftest.err'
16465   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16466   (eval $ac_try) 2>&5
16467   ac_status=$?
16468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16469   (exit $ac_status); }; } &&
16470          { ac_try='test -s conftest$ac_exeext'
16471   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16472   (eval $ac_try) 2>&5
16473   ac_status=$?
16474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16475   (exit $ac_status); }; }; then
16476   ol_cv_have_sys_errlist=yes
16477 else
16478   echo "$as_me: failed program was:" >&5
16479 sed 's/^/| /' conftest.$ac_ext >&5
16480
16481 ol_cv_have_sys_errlist=no
16482 fi
16483 rm -f conftest.err conftest.$ac_objext \
16484       conftest$ac_exeext conftest.$ac_ext
16485 fi
16486 echo "$as_me:$LINENO: result: $ol_cv_have_sys_errlist" >&5
16487 echo "${ECHO_T}$ol_cv_have_sys_errlist" >&6
16488 fi
16489 if test $ol_cv_have_sys_errlist = yes ; then
16490
16491 cat >>confdefs.h <<\_ACEOF
16492 #define HAVE_SYS_ERRLIST 1
16493 _ACEOF
16494
16495 fi
16496
16497 fi
16498
16499
16500
16501 for ac_header in regex.h
16502 do
16503 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16504 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16505   echo "$as_me:$LINENO: checking for $ac_header" >&5
16506 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16507 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16508   echo $ECHO_N "(cached) $ECHO_C" >&6
16509 fi
16510 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16511 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16512 else
16513   # Is the header compilable?
16514 echo "$as_me:$LINENO: checking $ac_header usability" >&5
16515 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16516 cat >conftest.$ac_ext <<_ACEOF
16517 /* confdefs.h.  */
16518 _ACEOF
16519 cat confdefs.h >>conftest.$ac_ext
16520 cat >>conftest.$ac_ext <<_ACEOF
16521 /* end confdefs.h.  */
16522 $ac_includes_default
16523 #include <$ac_header>
16524 _ACEOF
16525 rm -f conftest.$ac_objext
16526 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16527   (eval $ac_compile) 2>conftest.er1
16528   ac_status=$?
16529   grep -v '^ *+' conftest.er1 >conftest.err
16530   rm -f conftest.er1
16531   cat conftest.err >&5
16532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16533   (exit $ac_status); } &&
16534          { ac_try='test -z "$ac_c_werror_flag"
16535                          || test ! -s conftest.err'
16536   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16537   (eval $ac_try) 2>&5
16538   ac_status=$?
16539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16540   (exit $ac_status); }; } &&
16541          { ac_try='test -s conftest.$ac_objext'
16542   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16543   (eval $ac_try) 2>&5
16544   ac_status=$?
16545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16546   (exit $ac_status); }; }; then
16547   ac_header_compiler=yes
16548 else
16549   echo "$as_me: failed program was:" >&5
16550 sed 's/^/| /' conftest.$ac_ext >&5
16551
16552 ac_header_compiler=no
16553 fi
16554 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16555 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16556 echo "${ECHO_T}$ac_header_compiler" >&6
16557
16558 # Is the header present?
16559 echo "$as_me:$LINENO: checking $ac_header presence" >&5
16560 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16561 cat >conftest.$ac_ext <<_ACEOF
16562 /* confdefs.h.  */
16563 _ACEOF
16564 cat confdefs.h >>conftest.$ac_ext
16565 cat >>conftest.$ac_ext <<_ACEOF
16566 /* end confdefs.h.  */
16567 #include <$ac_header>
16568 _ACEOF
16569 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16570   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16571   ac_status=$?
16572   grep -v '^ *+' conftest.er1 >conftest.err
16573   rm -f conftest.er1
16574   cat conftest.err >&5
16575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16576   (exit $ac_status); } >/dev/null; then
16577   if test -s conftest.err; then
16578     ac_cpp_err=$ac_c_preproc_warn_flag
16579     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16580   else
16581     ac_cpp_err=
16582   fi
16583 else
16584   ac_cpp_err=yes
16585 fi
16586 if test -z "$ac_cpp_err"; then
16587   ac_header_preproc=yes
16588 else
16589   echo "$as_me: failed program was:" >&5
16590 sed 's/^/| /' conftest.$ac_ext >&5
16591
16592   ac_header_preproc=no
16593 fi
16594 rm -f conftest.err conftest.$ac_ext
16595 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16596 echo "${ECHO_T}$ac_header_preproc" >&6
16597
16598 # So?  What about this header?
16599 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16600   yes:no: )
16601     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16602 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16603     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16604 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16605     ac_header_preproc=yes
16606     ;;
16607   no:yes:* )
16608     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16609 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16610     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
16611 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
16612     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16613 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16614     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
16615 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
16616     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16617 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16618     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16619 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
16620     (
16621       cat <<\_ASBOX
16622 ## --------------------------------------------- ##
16623 ## Report this to <http://www.openldap.org/its/> ##
16624 ## --------------------------------------------- ##
16625 _ASBOX
16626     ) |
16627       sed "s/^/$as_me: WARNING:     /" >&2
16628     ;;
16629 esac
16630 echo "$as_me:$LINENO: checking for $ac_header" >&5
16631 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16632 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16633   echo $ECHO_N "(cached) $ECHO_C" >&6
16634 else
16635   eval "$as_ac_Header=\$ac_header_preproc"
16636 fi
16637 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16638 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16639
16640 fi
16641 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16642   cat >>confdefs.h <<_ACEOF
16643 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16644 _ACEOF
16645
16646 fi
16647
16648 done
16649
16650 if test "$ac_cv_header_regex_h" != yes ; then
16651         { { echo "$as_me:$LINENO: error: POSIX regex.h required." >&5
16652 echo "$as_me: error: POSIX regex.h required." >&2;}
16653    { (exit 1); exit 1; }; }
16654 fi
16655 echo "$as_me:$LINENO: checking for library containing regfree" >&5
16656 echo $ECHO_N "checking for library containing regfree... $ECHO_C" >&6
16657 if test "${ac_cv_search_regfree+set}" = set; then
16658   echo $ECHO_N "(cached) $ECHO_C" >&6
16659 else
16660   ac_func_search_save_LIBS=$LIBS
16661 ac_cv_search_regfree=no
16662 cat >conftest.$ac_ext <<_ACEOF
16663 /* confdefs.h.  */
16664 _ACEOF
16665 cat confdefs.h >>conftest.$ac_ext
16666 cat >>conftest.$ac_ext <<_ACEOF
16667 /* end confdefs.h.  */
16668
16669 /* Override any gcc2 internal prototype to avoid an error.  */
16670 #ifdef __cplusplus
16671 extern "C"
16672 #endif
16673 /* We use char because int might match the return type of a gcc2
16674    builtin and then its argument prototype would still apply.  */
16675 char regfree ();
16676 int
16677 main ()
16678 {
16679 regfree ();
16680   ;
16681   return 0;
16682 }
16683 _ACEOF
16684 rm -f conftest.$ac_objext conftest$ac_exeext
16685 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16686   (eval $ac_link) 2>conftest.er1
16687   ac_status=$?
16688   grep -v '^ *+' conftest.er1 >conftest.err
16689   rm -f conftest.er1
16690   cat conftest.err >&5
16691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16692   (exit $ac_status); } &&
16693          { ac_try='test -z "$ac_c_werror_flag"
16694                          || test ! -s conftest.err'
16695   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16696   (eval $ac_try) 2>&5
16697   ac_status=$?
16698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16699   (exit $ac_status); }; } &&
16700          { ac_try='test -s conftest$ac_exeext'
16701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16702   (eval $ac_try) 2>&5
16703   ac_status=$?
16704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16705   (exit $ac_status); }; }; then
16706   ac_cv_search_regfree="none required"
16707 else
16708   echo "$as_me: failed program was:" >&5
16709 sed 's/^/| /' conftest.$ac_ext >&5
16710
16711 fi
16712 rm -f conftest.err conftest.$ac_objext \
16713       conftest$ac_exeext conftest.$ac_ext
16714 if test "$ac_cv_search_regfree" = no; then
16715   for ac_lib in regex gnuregex; do
16716     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16717     cat >conftest.$ac_ext <<_ACEOF
16718 /* confdefs.h.  */
16719 _ACEOF
16720 cat confdefs.h >>conftest.$ac_ext
16721 cat >>conftest.$ac_ext <<_ACEOF
16722 /* end confdefs.h.  */
16723
16724 /* Override any gcc2 internal prototype to avoid an error.  */
16725 #ifdef __cplusplus
16726 extern "C"
16727 #endif
16728 /* We use char because int might match the return type of a gcc2
16729    builtin and then its argument prototype would still apply.  */
16730 char regfree ();
16731 int
16732 main ()
16733 {
16734 regfree ();
16735   ;
16736   return 0;
16737 }
16738 _ACEOF
16739 rm -f conftest.$ac_objext conftest$ac_exeext
16740 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16741   (eval $ac_link) 2>conftest.er1
16742   ac_status=$?
16743   grep -v '^ *+' conftest.er1 >conftest.err
16744   rm -f conftest.er1
16745   cat conftest.err >&5
16746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16747   (exit $ac_status); } &&
16748          { ac_try='test -z "$ac_c_werror_flag"
16749                          || test ! -s conftest.err'
16750   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16751   (eval $ac_try) 2>&5
16752   ac_status=$?
16753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16754   (exit $ac_status); }; } &&
16755          { ac_try='test -s conftest$ac_exeext'
16756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16757   (eval $ac_try) 2>&5
16758   ac_status=$?
16759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16760   (exit $ac_status); }; }; then
16761   ac_cv_search_regfree="-l$ac_lib"
16762 break
16763 else
16764   echo "$as_me: failed program was:" >&5
16765 sed 's/^/| /' conftest.$ac_ext >&5
16766
16767 fi
16768 rm -f conftest.err conftest.$ac_objext \
16769       conftest$ac_exeext conftest.$ac_ext
16770   done
16771 fi
16772 LIBS=$ac_func_search_save_LIBS
16773 fi
16774 echo "$as_me:$LINENO: result: $ac_cv_search_regfree" >&5
16775 echo "${ECHO_T}$ac_cv_search_regfree" >&6
16776 if test "$ac_cv_search_regfree" != no; then
16777   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
16778   :
16779 else
16780   { { echo "$as_me:$LINENO: error: POSIX regex required." >&5
16781 echo "$as_me: error: POSIX regex required." >&2;}
16782    { (exit 1); exit 1; }; }
16783 fi
16784
16785
16786
16787 echo "$as_me:$LINENO: checking for compatible POSIX regex" >&5
16788 echo $ECHO_N "checking for compatible POSIX regex... $ECHO_C" >&6
16789 if test "${ol_cv_c_posix_regex+set}" = set; then
16790   echo $ECHO_N "(cached) $ECHO_C" >&6
16791 else
16792
16793         if test "$cross_compiling" = yes; then
16794   ol_cv_c_posix_regex=cross
16795 else
16796   cat >conftest.$ac_ext <<_ACEOF
16797 /* confdefs.h.  */
16798 _ACEOF
16799 cat confdefs.h >>conftest.$ac_ext
16800 cat >>conftest.$ac_ext <<_ACEOF
16801 /* end confdefs.h.  */
16802
16803 #include <sys/types.h>
16804 #include <regex.h>
16805 static char *pattern, *string;
16806 main()
16807 {
16808         int rc;
16809         regex_t re;
16810
16811         pattern = "^A";
16812
16813         if(regcomp(&re, pattern, 0)) {
16814                 return -1;
16815         }
16816
16817         string = "ALL MATCH";
16818
16819         rc = regexec(&re, string, 0, (void*)0, 0);
16820
16821         regfree(&re);
16822
16823         return rc;
16824 }
16825 _ACEOF
16826 rm -f conftest$ac_exeext
16827 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16828   (eval $ac_link) 2>&5
16829   ac_status=$?
16830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16831   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16833   (eval $ac_try) 2>&5
16834   ac_status=$?
16835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16836   (exit $ac_status); }; }; then
16837   ol_cv_c_posix_regex=yes
16838 else
16839   echo "$as_me: program exited with status $ac_status" >&5
16840 echo "$as_me: failed program was:" >&5
16841 sed 's/^/| /' conftest.$ac_ext >&5
16842
16843 ( exit $ac_status )
16844 ol_cv_c_posix_regex=no
16845 fi
16846 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16847 fi
16848 fi
16849 echo "$as_me:$LINENO: result: $ol_cv_c_posix_regex" >&5
16850 echo "${ECHO_T}$ol_cv_c_posix_regex" >&6
16851
16852 if test "$ol_cv_c_posix_regex" = no ; then
16853         { { echo "$as_me:$LINENO: error: broken POSIX regex!" >&5
16854 echo "$as_me: error: broken POSIX regex!" >&2;}
16855    { (exit 1); exit 1; }; }
16856 fi
16857
16858
16859 have_uuid=no
16860
16861 for ac_header in sys/uuid.h
16862 do
16863 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16864 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16865   echo "$as_me:$LINENO: checking for $ac_header" >&5
16866 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16867 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16868   echo $ECHO_N "(cached) $ECHO_C" >&6
16869 fi
16870 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16871 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16872 else
16873   # Is the header compilable?
16874 echo "$as_me:$LINENO: checking $ac_header usability" >&5
16875 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16876 cat >conftest.$ac_ext <<_ACEOF
16877 /* confdefs.h.  */
16878 _ACEOF
16879 cat confdefs.h >>conftest.$ac_ext
16880 cat >>conftest.$ac_ext <<_ACEOF
16881 /* end confdefs.h.  */
16882 $ac_includes_default
16883 #include <$ac_header>
16884 _ACEOF
16885 rm -f conftest.$ac_objext
16886 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16887   (eval $ac_compile) 2>conftest.er1
16888   ac_status=$?
16889   grep -v '^ *+' conftest.er1 >conftest.err
16890   rm -f conftest.er1
16891   cat conftest.err >&5
16892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16893   (exit $ac_status); } &&
16894          { ac_try='test -z "$ac_c_werror_flag"
16895                          || test ! -s conftest.err'
16896   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16897   (eval $ac_try) 2>&5
16898   ac_status=$?
16899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16900   (exit $ac_status); }; } &&
16901          { ac_try='test -s conftest.$ac_objext'
16902   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16903   (eval $ac_try) 2>&5
16904   ac_status=$?
16905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16906   (exit $ac_status); }; }; then
16907   ac_header_compiler=yes
16908 else
16909   echo "$as_me: failed program was:" >&5
16910 sed 's/^/| /' conftest.$ac_ext >&5
16911
16912 ac_header_compiler=no
16913 fi
16914 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16915 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16916 echo "${ECHO_T}$ac_header_compiler" >&6
16917
16918 # Is the header present?
16919 echo "$as_me:$LINENO: checking $ac_header presence" >&5
16920 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16921 cat >conftest.$ac_ext <<_ACEOF
16922 /* confdefs.h.  */
16923 _ACEOF
16924 cat confdefs.h >>conftest.$ac_ext
16925 cat >>conftest.$ac_ext <<_ACEOF
16926 /* end confdefs.h.  */
16927 #include <$ac_header>
16928 _ACEOF
16929 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16930   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16931   ac_status=$?
16932   grep -v '^ *+' conftest.er1 >conftest.err
16933   rm -f conftest.er1
16934   cat conftest.err >&5
16935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16936   (exit $ac_status); } >/dev/null; then
16937   if test -s conftest.err; then
16938     ac_cpp_err=$ac_c_preproc_warn_flag
16939     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16940   else
16941     ac_cpp_err=
16942   fi
16943 else
16944   ac_cpp_err=yes
16945 fi
16946 if test -z "$ac_cpp_err"; then
16947   ac_header_preproc=yes
16948 else
16949   echo "$as_me: failed program was:" >&5
16950 sed 's/^/| /' conftest.$ac_ext >&5
16951
16952   ac_header_preproc=no
16953 fi
16954 rm -f conftest.err conftest.$ac_ext
16955 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16956 echo "${ECHO_T}$ac_header_preproc" >&6
16957
16958 # So?  What about this header?
16959 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16960   yes:no: )
16961     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16962 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16963     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16964 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16965     ac_header_preproc=yes
16966     ;;
16967   no:yes:* )
16968     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16969 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16970     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
16971 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
16972     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16973 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16974     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
16975 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
16976     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16977 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16978     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16979 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
16980     (
16981       cat <<\_ASBOX
16982 ## --------------------------------------------- ##
16983 ## Report this to <http://www.openldap.org/its/> ##
16984 ## --------------------------------------------- ##
16985 _ASBOX
16986     ) |
16987       sed "s/^/$as_me: WARNING:     /" >&2
16988     ;;
16989 esac
16990 echo "$as_me:$LINENO: checking for $ac_header" >&5
16991 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16992 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16993   echo $ECHO_N "(cached) $ECHO_C" >&6
16994 else
16995   eval "$as_ac_Header=\$ac_header_preproc"
16996 fi
16997 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16998 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16999
17000 fi
17001 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17002   cat >>confdefs.h <<_ACEOF
17003 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17004 _ACEOF
17005
17006 fi
17007
17008 done
17009
17010 if test $ac_cv_header_sys_uuid_h = yes ; then
17011         save_LIBS="$LIBS"
17012         echo "$as_me:$LINENO: checking for library containing uuid_to_str" >&5
17013 echo $ECHO_N "checking for library containing uuid_to_str... $ECHO_C" >&6
17014 if test "${ac_cv_search_uuid_to_str+set}" = set; then
17015   echo $ECHO_N "(cached) $ECHO_C" >&6
17016 else
17017   ac_func_search_save_LIBS=$LIBS
17018 ac_cv_search_uuid_to_str=no
17019 cat >conftest.$ac_ext <<_ACEOF
17020 /* confdefs.h.  */
17021 _ACEOF
17022 cat confdefs.h >>conftest.$ac_ext
17023 cat >>conftest.$ac_ext <<_ACEOF
17024 /* end confdefs.h.  */
17025
17026 /* Override any gcc2 internal prototype to avoid an error.  */
17027 #ifdef __cplusplus
17028 extern "C"
17029 #endif
17030 /* We use char because int might match the return type of a gcc2
17031    builtin and then its argument prototype would still apply.  */
17032 char uuid_to_str ();
17033 int
17034 main ()
17035 {
17036 uuid_to_str ();
17037   ;
17038   return 0;
17039 }
17040 _ACEOF
17041 rm -f conftest.$ac_objext conftest$ac_exeext
17042 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17043   (eval $ac_link) 2>conftest.er1
17044   ac_status=$?
17045   grep -v '^ *+' conftest.er1 >conftest.err
17046   rm -f conftest.er1
17047   cat conftest.err >&5
17048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17049   (exit $ac_status); } &&
17050          { ac_try='test -z "$ac_c_werror_flag"
17051                          || test ! -s conftest.err'
17052   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17053   (eval $ac_try) 2>&5
17054   ac_status=$?
17055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17056   (exit $ac_status); }; } &&
17057          { ac_try='test -s conftest$ac_exeext'
17058   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17059   (eval $ac_try) 2>&5
17060   ac_status=$?
17061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17062   (exit $ac_status); }; }; then
17063   ac_cv_search_uuid_to_str="none required"
17064 else
17065   echo "$as_me: failed program was:" >&5
17066 sed 's/^/| /' conftest.$ac_ext >&5
17067
17068 fi
17069 rm -f conftest.err conftest.$ac_objext \
17070       conftest$ac_exeext conftest.$ac_ext
17071 if test "$ac_cv_search_uuid_to_str" = no; then
17072   for ac_lib in uuid; do
17073     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17074     cat >conftest.$ac_ext <<_ACEOF
17075 /* confdefs.h.  */
17076 _ACEOF
17077 cat confdefs.h >>conftest.$ac_ext
17078 cat >>conftest.$ac_ext <<_ACEOF
17079 /* end confdefs.h.  */
17080
17081 /* Override any gcc2 internal prototype to avoid an error.  */
17082 #ifdef __cplusplus
17083 extern "C"
17084 #endif
17085 /* We use char because int might match the return type of a gcc2
17086    builtin and then its argument prototype would still apply.  */
17087 char uuid_to_str ();
17088 int
17089 main ()
17090 {
17091 uuid_to_str ();
17092   ;
17093   return 0;
17094 }
17095 _ACEOF
17096 rm -f conftest.$ac_objext conftest$ac_exeext
17097 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17098   (eval $ac_link) 2>conftest.er1
17099   ac_status=$?
17100   grep -v '^ *+' conftest.er1 >conftest.err
17101   rm -f conftest.er1
17102   cat conftest.err >&5
17103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17104   (exit $ac_status); } &&
17105          { ac_try='test -z "$ac_c_werror_flag"
17106                          || test ! -s conftest.err'
17107   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17108   (eval $ac_try) 2>&5
17109   ac_status=$?
17110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17111   (exit $ac_status); }; } &&
17112          { ac_try='test -s conftest$ac_exeext'
17113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17114   (eval $ac_try) 2>&5
17115   ac_status=$?
17116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17117   (exit $ac_status); }; }; then
17118   ac_cv_search_uuid_to_str="-l$ac_lib"
17119 break
17120 else
17121   echo "$as_me: failed program was:" >&5
17122 sed 's/^/| /' conftest.$ac_ext >&5
17123
17124 fi
17125 rm -f conftest.err conftest.$ac_objext \
17126       conftest$ac_exeext conftest.$ac_ext
17127   done
17128 fi
17129 LIBS=$ac_func_search_save_LIBS
17130 fi
17131 echo "$as_me:$LINENO: result: $ac_cv_search_uuid_to_str" >&5
17132 echo "${ECHO_T}$ac_cv_search_uuid_to_str" >&6
17133 if test "$ac_cv_search_uuid_to_str" != no; then
17134   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
17135   have_uuid=yes
17136 else
17137   :
17138 fi
17139
17140         LIBS="$save_LIBS"
17141
17142         if test have_uuid = yes ; then
17143
17144 cat >>confdefs.h <<\_ACEOF
17145 #define HAVE_UUID_TO_STR 1
17146 _ACEOF
17147
17148
17149                 test "$ac_cv_search_uuid_to_str" = "none required" || \
17150                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
17151         fi
17152 fi
17153
17154 if test $have_uuid = no ; then
17155         echo "$as_me:$LINENO: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
17156 echo $ECHO_N "checking to see if -lrpcrt4 is needed for win32 UUID support... $ECHO_C" >&6
17157         save_LIBS="$LIBS"
17158         LIBS="$LIBS -lrpcrt4"
17159         cat >conftest.$ac_ext <<_ACEOF
17160 /* confdefs.h.  */
17161 _ACEOF
17162 cat confdefs.h >>conftest.$ac_ext
17163 cat >>conftest.$ac_ext <<_ACEOF
17164 /* end confdefs.h.  */
17165
17166                 int __stdcall UuidCreate(void *);
17167                 int __stdcall UuidToStringA(void *,void **);
17168
17169 int
17170 main ()
17171 {
17172
17173                 UuidCreate(0);
17174                 UuidToStringA(0,0);
17175
17176   ;
17177   return 0;
17178 }
17179 _ACEOF
17180 rm -f conftest.$ac_objext conftest$ac_exeext
17181 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17182   (eval $ac_link) 2>conftest.er1
17183   ac_status=$?
17184   grep -v '^ *+' conftest.er1 >conftest.err
17185   rm -f conftest.er1
17186   cat conftest.err >&5
17187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17188   (exit $ac_status); } &&
17189          { ac_try='test -z "$ac_c_werror_flag"
17190                          || test ! -s conftest.err'
17191   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17192   (eval $ac_try) 2>&5
17193   ac_status=$?
17194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17195   (exit $ac_status); }; } &&
17196          { ac_try='test -s conftest$ac_exeext'
17197   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17198   (eval $ac_try) 2>&5
17199   ac_status=$?
17200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17201   (exit $ac_status); }; }; then
17202   need_rpcrt=yes
17203 else
17204   echo "$as_me: failed program was:" >&5
17205 sed 's/^/| /' conftest.$ac_ext >&5
17206
17207 need_rpcrt=no
17208 fi
17209 rm -f conftest.err conftest.$ac_objext \
17210       conftest$ac_exeext conftest.$ac_ext
17211         if test $need_rpcrt = yes; then
17212                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
17213         fi
17214         LIBS="$save_LIBS"
17215         echo "$as_me:$LINENO: result: $need_rpcrt" >&5
17216 echo "${ECHO_T}$need_rpcrt" >&6
17217 fi
17218
17219 ol_cv_lib_resolver=no
17220 if test $ol_cv_lib_resolver = no ; then
17221         echo "$as_me:$LINENO: checking for resolver link (default)" >&5
17222 echo $ECHO_N "checking for resolver link (default)... $ECHO_C" >&6
17223 if test "${ol_cv_resolver_none+set}" = set; then
17224   echo $ECHO_N "(cached) $ECHO_C" >&6
17225 else
17226
17227         ol_RESOLVER_LIB=
17228         ol_LIBS=$LIBS
17229         LIBS="$ol_RESOLVER_LIB $LIBS"
17230
17231         cat >conftest.$ac_ext <<_ACEOF
17232 /* confdefs.h.  */
17233 _ACEOF
17234 cat confdefs.h >>conftest.$ac_ext
17235 cat >>conftest.$ac_ext <<_ACEOF
17236 /* end confdefs.h.  */
17237
17238 #ifdef HAVE_SYS_TYPES_H
17239 #       include <sys/types.h>
17240 #endif
17241 #include <netinet/in.h>
17242 #ifdef HAVE_ARPA_NAMESER_H
17243 #       include <arpa/nameser.h>
17244 #endif
17245 #ifdef HAVE_RESOLV_H
17246 #       include <resolv.h>
17247 #endif
17248
17249 int
17250 main ()
17251 {
17252 {
17253         int len, status;
17254         char *request = NULL;
17255         unsigned char reply[64*1024];
17256         unsigned char host[64*1024];
17257         unsigned char *p;
17258
17259 #ifdef NS_HFIXEDSZ
17260         /* Bind 8/9 interface */
17261         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17262 #else
17263         /* Bind 4 interface */
17264 # ifndef T_SRV
17265 #  define T_SRV 33
17266 # endif
17267         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17268 #endif
17269         p = reply;
17270 #ifdef NS_HFIXEDSZ
17271         /* Bind 8/9 interface */
17272         p += NS_HFIXEDSZ;
17273 #elif defined(HFIXEDSZ)
17274         /* Bind 4 interface w/ HFIXEDSZ */
17275         p += HFIXEDSZ;
17276 #else
17277         /* Bind 4 interface w/o HFIXEDSZ */
17278         p += sizeof(HEADER);
17279 #endif
17280         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17281 }
17282   ;
17283   return 0;
17284 }
17285 _ACEOF
17286 rm -f conftest.$ac_objext conftest$ac_exeext
17287 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17288   (eval $ac_link) 2>conftest.er1
17289   ac_status=$?
17290   grep -v '^ *+' conftest.er1 >conftest.err
17291   rm -f conftest.er1
17292   cat conftest.err >&5
17293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17294   (exit $ac_status); } &&
17295          { ac_try='test -z "$ac_c_werror_flag"
17296                          || test ! -s conftest.err'
17297   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17298   (eval $ac_try) 2>&5
17299   ac_status=$?
17300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17301   (exit $ac_status); }; } &&
17302          { ac_try='test -s conftest$ac_exeext'
17303   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17304   (eval $ac_try) 2>&5
17305   ac_status=$?
17306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17307   (exit $ac_status); }; }; then
17308   ol_cv_resolver_none=yes
17309 else
17310   echo "$as_me: failed program was:" >&5
17311 sed 's/^/| /' conftest.$ac_ext >&5
17312
17313 ol_cv_resolver_none=no
17314 fi
17315 rm -f conftest.err conftest.$ac_objext \
17316       conftest$ac_exeext conftest.$ac_ext
17317
17318         LIBS="$ol_LIBS"
17319
17320 fi
17321 echo "$as_me:$LINENO: result: $ol_cv_resolver_none" >&5
17322 echo "${ECHO_T}$ol_cv_resolver_none" >&6
17323
17324         if test $ol_cv_resolver_none = yes ; then
17325                 ol_cv_lib_resolver=yes
17326         fi
17327 fi
17328
17329 if test $ol_cv_lib_resolver = no ; then
17330         echo "$as_me:$LINENO: checking for resolver link (-lresolv)" >&5
17331 echo $ECHO_N "checking for resolver link (-lresolv)... $ECHO_C" >&6
17332 if test "${ol_cv_resolver_resolv+set}" = set; then
17333   echo $ECHO_N "(cached) $ECHO_C" >&6
17334 else
17335
17336         ol_RESOLVER_LIB=-lresolv
17337         ol_LIBS=$LIBS
17338         LIBS="$ol_RESOLVER_LIB $LIBS"
17339
17340         cat >conftest.$ac_ext <<_ACEOF
17341 /* confdefs.h.  */
17342 _ACEOF
17343 cat confdefs.h >>conftest.$ac_ext
17344 cat >>conftest.$ac_ext <<_ACEOF
17345 /* end confdefs.h.  */
17346
17347 #ifdef HAVE_SYS_TYPES_H
17348 #       include <sys/types.h>
17349 #endif
17350 #include <netinet/in.h>
17351 #ifdef HAVE_ARPA_NAMESER_H
17352 #       include <arpa/nameser.h>
17353 #endif
17354 #ifdef HAVE_RESOLV_H
17355 #       include <resolv.h>
17356 #endif
17357
17358 int
17359 main ()
17360 {
17361 {
17362         int len, status;
17363         char *request = NULL;
17364         unsigned char reply[64*1024];
17365         unsigned char host[64*1024];
17366         unsigned char *p;
17367
17368 #ifdef NS_HFIXEDSZ
17369         /* Bind 8/9 interface */
17370         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17371 #else
17372         /* Bind 4 interface */
17373 # ifndef T_SRV
17374 #  define T_SRV 33
17375 # endif
17376         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17377 #endif
17378         p = reply;
17379 #ifdef NS_HFIXEDSZ
17380         /* Bind 8/9 interface */
17381         p += NS_HFIXEDSZ;
17382 #elif defined(HFIXEDSZ)
17383         /* Bind 4 interface w/ HFIXEDSZ */
17384         p += HFIXEDSZ;
17385 #else
17386         /* Bind 4 interface w/o HFIXEDSZ */
17387         p += sizeof(HEADER);
17388 #endif
17389         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17390 }
17391   ;
17392   return 0;
17393 }
17394 _ACEOF
17395 rm -f conftest.$ac_objext conftest$ac_exeext
17396 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17397   (eval $ac_link) 2>conftest.er1
17398   ac_status=$?
17399   grep -v '^ *+' conftest.er1 >conftest.err
17400   rm -f conftest.er1
17401   cat conftest.err >&5
17402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17403   (exit $ac_status); } &&
17404          { ac_try='test -z "$ac_c_werror_flag"
17405                          || test ! -s conftest.err'
17406   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17407   (eval $ac_try) 2>&5
17408   ac_status=$?
17409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17410   (exit $ac_status); }; } &&
17411          { ac_try='test -s conftest$ac_exeext'
17412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17413   (eval $ac_try) 2>&5
17414   ac_status=$?
17415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17416   (exit $ac_status); }; }; then
17417   ol_cv_resolver_resolv=yes
17418 else
17419   echo "$as_me: failed program was:" >&5
17420 sed 's/^/| /' conftest.$ac_ext >&5
17421
17422 ol_cv_resolver_resolv=no
17423 fi
17424 rm -f conftest.err conftest.$ac_objext \
17425       conftest$ac_exeext conftest.$ac_ext
17426
17427         LIBS="$ol_LIBS"
17428
17429 fi
17430 echo "$as_me:$LINENO: result: $ol_cv_resolver_resolv" >&5
17431 echo "${ECHO_T}$ol_cv_resolver_resolv" >&6
17432
17433         if test $ol_cv_resolver_resolv = yes ; then
17434                 ol_cv_lib_resolver=-lresolv
17435         fi
17436 fi
17437
17438 if test $ol_cv_lib_resolver = no ; then
17439         echo "$as_me:$LINENO: checking for resolver link (-lbind)" >&5
17440 echo $ECHO_N "checking for resolver link (-lbind)... $ECHO_C" >&6
17441 if test "${ol_cv_resolver_bind+set}" = set; then
17442   echo $ECHO_N "(cached) $ECHO_C" >&6
17443 else
17444
17445         ol_RESOLVER_LIB=-lbind
17446         ol_LIBS=$LIBS
17447         LIBS="$ol_RESOLVER_LIB $LIBS"
17448
17449         cat >conftest.$ac_ext <<_ACEOF
17450 /* confdefs.h.  */
17451 _ACEOF
17452 cat confdefs.h >>conftest.$ac_ext
17453 cat >>conftest.$ac_ext <<_ACEOF
17454 /* end confdefs.h.  */
17455
17456 #ifdef HAVE_SYS_TYPES_H
17457 #       include <sys/types.h>
17458 #endif
17459 #include <netinet/in.h>
17460 #ifdef HAVE_ARPA_NAMESER_H
17461 #       include <arpa/nameser.h>
17462 #endif
17463 #ifdef HAVE_RESOLV_H
17464 #       include <resolv.h>
17465 #endif
17466
17467 int
17468 main ()
17469 {
17470 {
17471         int len, status;
17472         char *request = NULL;
17473         unsigned char reply[64*1024];
17474         unsigned char host[64*1024];
17475         unsigned char *p;
17476
17477 #ifdef NS_HFIXEDSZ
17478         /* Bind 8/9 interface */
17479         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17480 #else
17481         /* Bind 4 interface */
17482 # ifndef T_SRV
17483 #  define T_SRV 33
17484 # endif
17485         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17486 #endif
17487         p = reply;
17488 #ifdef NS_HFIXEDSZ
17489         /* Bind 8/9 interface */
17490         p += NS_HFIXEDSZ;
17491 #elif defined(HFIXEDSZ)
17492         /* Bind 4 interface w/ HFIXEDSZ */
17493         p += HFIXEDSZ;
17494 #else
17495         /* Bind 4 interface w/o HFIXEDSZ */
17496         p += sizeof(HEADER);
17497 #endif
17498         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17499 }
17500   ;
17501   return 0;
17502 }
17503 _ACEOF
17504 rm -f conftest.$ac_objext conftest$ac_exeext
17505 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17506   (eval $ac_link) 2>conftest.er1
17507   ac_status=$?
17508   grep -v '^ *+' conftest.er1 >conftest.err
17509   rm -f conftest.er1
17510   cat conftest.err >&5
17511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17512   (exit $ac_status); } &&
17513          { ac_try='test -z "$ac_c_werror_flag"
17514                          || test ! -s conftest.err'
17515   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17516   (eval $ac_try) 2>&5
17517   ac_status=$?
17518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17519   (exit $ac_status); }; } &&
17520          { ac_try='test -s conftest$ac_exeext'
17521   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17522   (eval $ac_try) 2>&5
17523   ac_status=$?
17524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17525   (exit $ac_status); }; }; then
17526   ol_cv_resolver_bind=yes
17527 else
17528   echo "$as_me: failed program was:" >&5
17529 sed 's/^/| /' conftest.$ac_ext >&5
17530
17531 ol_cv_resolver_bind=no
17532 fi
17533 rm -f conftest.err conftest.$ac_objext \
17534       conftest$ac_exeext conftest.$ac_ext
17535
17536         LIBS="$ol_LIBS"
17537
17538 fi
17539 echo "$as_me:$LINENO: result: $ol_cv_resolver_bind" >&5
17540 echo "${ECHO_T}$ol_cv_resolver_bind" >&6
17541
17542         if test $ol_cv_resolver_bind = yes ; then
17543                 ol_cv_lib_resolver=-lbind
17544         fi
17545 fi
17546
17547
17548
17549 ol_link_dnssrv=no
17550 if test "$ol_cv_lib_resolver" != no ; then
17551
17552 cat >>confdefs.h <<\_ACEOF
17553 #define HAVE_RES_QUERY 1
17554 _ACEOF
17555
17556
17557         if test "$ol_enable_dnssrv" != no ; then
17558                 ol_link_dnssrv=yes
17559         fi
17560
17561         if test "$ol_cv_lib_resolver" != yes ; then
17562                 LIBS="$ol_cv_lib_resolver $LIBS"
17563         fi
17564 fi
17565
17566 if test "$ol_enable_dnssrv" = yes || test "$ol_enable_dnssrv" = mod ; then
17567         if test "$ol_link_dnssrv" = no ; then
17568                 { { echo "$as_me:$LINENO: error: DNSSRV requires res_query()" >&5
17569 echo "$as_me: error: DNSSRV requires res_query()" >&2;}
17570    { (exit 1); exit 1; }; }
17571         fi
17572 else
17573         ol_enable_dnssrv=no
17574 fi
17575
17576
17577 for ac_func in hstrerror
17578 do
17579 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17580 echo "$as_me:$LINENO: checking for $ac_func" >&5
17581 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17582 if eval "test \"\${$as_ac_var+set}\" = set"; then
17583   echo $ECHO_N "(cached) $ECHO_C" >&6
17584 else
17585   cat >conftest.$ac_ext <<_ACEOF
17586 /* confdefs.h.  */
17587 _ACEOF
17588 cat confdefs.h >>conftest.$ac_ext
17589 cat >>conftest.$ac_ext <<_ACEOF
17590 /* end confdefs.h.  */
17591 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17592    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17593 #define $ac_func innocuous_$ac_func
17594
17595 /* System header to define __stub macros and hopefully few prototypes,
17596     which can conflict with char $ac_func (); below.
17597     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17598     <limits.h> exists even on freestanding compilers.  */
17599
17600 #ifdef __STDC__
17601 # include <limits.h>
17602 #else
17603 # include <assert.h>
17604 #endif
17605
17606 #undef $ac_func
17607
17608 /* Override any gcc2 internal prototype to avoid an error.  */
17609 #ifdef __cplusplus
17610 extern "C"
17611 {
17612 #endif
17613 /* We use char because int might match the return type of a gcc2
17614    builtin and then its argument prototype would still apply.  */
17615 char $ac_func ();
17616 /* The GNU C library defines this for functions which it implements
17617     to always fail with ENOSYS.  Some functions are actually named
17618     something starting with __ and the normal name is an alias.  */
17619 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17620 choke me
17621 #else
17622 char (*f) () = $ac_func;
17623 #endif
17624 #ifdef __cplusplus
17625 }
17626 #endif
17627
17628 int
17629 main ()
17630 {
17631 return f != $ac_func;
17632   ;
17633   return 0;
17634 }
17635 _ACEOF
17636 rm -f conftest.$ac_objext conftest$ac_exeext
17637 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17638   (eval $ac_link) 2>conftest.er1
17639   ac_status=$?
17640   grep -v '^ *+' conftest.er1 >conftest.err
17641   rm -f conftest.er1
17642   cat conftest.err >&5
17643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17644   (exit $ac_status); } &&
17645          { ac_try='test -z "$ac_c_werror_flag"
17646                          || test ! -s conftest.err'
17647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17648   (eval $ac_try) 2>&5
17649   ac_status=$?
17650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17651   (exit $ac_status); }; } &&
17652          { ac_try='test -s conftest$ac_exeext'
17653   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17654   (eval $ac_try) 2>&5
17655   ac_status=$?
17656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17657   (exit $ac_status); }; }; then
17658   eval "$as_ac_var=yes"
17659 else
17660   echo "$as_me: failed program was:" >&5
17661 sed 's/^/| /' conftest.$ac_ext >&5
17662
17663 eval "$as_ac_var=no"
17664 fi
17665 rm -f conftest.err conftest.$ac_objext \
17666       conftest$ac_exeext conftest.$ac_ext
17667 fi
17668 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17669 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17670 if test `eval echo '${'$as_ac_var'}'` = yes; then
17671   cat >>confdefs.h <<_ACEOF
17672 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17673 _ACEOF
17674
17675 fi
17676 done
17677
17678
17679
17680
17681
17682
17683 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop
17684 do
17685 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17686 echo "$as_me:$LINENO: checking for $ac_func" >&5
17687 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17688 if eval "test \"\${$as_ac_var+set}\" = set"; then
17689   echo $ECHO_N "(cached) $ECHO_C" >&6
17690 else
17691   cat >conftest.$ac_ext <<_ACEOF
17692 /* confdefs.h.  */
17693 _ACEOF
17694 cat confdefs.h >>conftest.$ac_ext
17695 cat >>conftest.$ac_ext <<_ACEOF
17696 /* end confdefs.h.  */
17697 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17698    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17699 #define $ac_func innocuous_$ac_func
17700
17701 /* System header to define __stub macros and hopefully few prototypes,
17702     which can conflict with char $ac_func (); below.
17703     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17704     <limits.h> exists even on freestanding compilers.  */
17705
17706 #ifdef __STDC__
17707 # include <limits.h>
17708 #else
17709 # include <assert.h>
17710 #endif
17711
17712 #undef $ac_func
17713
17714 /* Override any gcc2 internal prototype to avoid an error.  */
17715 #ifdef __cplusplus
17716 extern "C"
17717 {
17718 #endif
17719 /* We use char because int might match the return type of a gcc2
17720    builtin and then its argument prototype would still apply.  */
17721 char $ac_func ();
17722 /* The GNU C library defines this for functions which it implements
17723     to always fail with ENOSYS.  Some functions are actually named
17724     something starting with __ and the normal name is an alias.  */
17725 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17726 choke me
17727 #else
17728 char (*f) () = $ac_func;
17729 #endif
17730 #ifdef __cplusplus
17731 }
17732 #endif
17733
17734 int
17735 main ()
17736 {
17737 return f != $ac_func;
17738   ;
17739   return 0;
17740 }
17741 _ACEOF
17742 rm -f conftest.$ac_objext conftest$ac_exeext
17743 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17744   (eval $ac_link) 2>conftest.er1
17745   ac_status=$?
17746   grep -v '^ *+' conftest.er1 >conftest.err
17747   rm -f conftest.er1
17748   cat conftest.err >&5
17749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17750   (exit $ac_status); } &&
17751          { ac_try='test -z "$ac_c_werror_flag"
17752                          || test ! -s conftest.err'
17753   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17754   (eval $ac_try) 2>&5
17755   ac_status=$?
17756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17757   (exit $ac_status); }; } &&
17758          { ac_try='test -s conftest$ac_exeext'
17759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17760   (eval $ac_try) 2>&5
17761   ac_status=$?
17762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17763   (exit $ac_status); }; }; then
17764   eval "$as_ac_var=yes"
17765 else
17766   echo "$as_me: failed program was:" >&5
17767 sed 's/^/| /' conftest.$ac_ext >&5
17768
17769 eval "$as_ac_var=no"
17770 fi
17771 rm -f conftest.err conftest.$ac_objext \
17772       conftest$ac_exeext conftest.$ac_ext
17773 fi
17774 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17775 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17776 if test `eval echo '${'$as_ac_var'}'` = yes; then
17777   cat >>confdefs.h <<_ACEOF
17778 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17779 _ACEOF
17780
17781 fi
17782 done
17783
17784
17785 ol_link_ipv6=no
17786 if test $ac_cv_func_getaddrinfo = no || test $ac_cv_func_inet_ntop = no ; then
17787         if test $ol_enable_ipv6 = yes ; then
17788                 { { echo "$as_me:$LINENO: error: IPv6 support requires getaddrinfo() and inet_ntop()" >&5
17789 echo "$as_me: error: IPv6 support requires getaddrinfo() and inet_ntop()" >&2;}
17790    { (exit 1); exit 1; }; }
17791         fi
17792 elif test $ol_enable_ipv6 != no ; then
17793         echo "$as_me:$LINENO: checking INET6_ADDRSTRLEN" >&5
17794 echo $ECHO_N "checking INET6_ADDRSTRLEN... $ECHO_C" >&6
17795 if test "${ol_cv_inet6_addrstrlen+set}" = set; then
17796   echo $ECHO_N "(cached) $ECHO_C" >&6
17797 else
17798
17799                 cat >conftest.$ac_ext <<_ACEOF
17800 /* confdefs.h.  */
17801 _ACEOF
17802 cat confdefs.h >>conftest.$ac_ext
17803 cat >>conftest.$ac_ext <<_ACEOF
17804 /* end confdefs.h.  */
17805
17806 #                       include <netinet/in.h>
17807 #                       ifdef INET6_ADDRSTRLEN
17808                                 __has_inet6_addrstrlen__;
17809 #                       endif
17810
17811 _ACEOF
17812 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17813   $EGREP "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
17814   ol_cv_inet6_addrstrlen=yes
17815 else
17816   ol_cv_inet6_addrstrlen=no
17817 fi
17818 rm -f conftest*
17819
17820 fi
17821 echo "$as_me:$LINENO: result: $ol_cv_inet6_addrstrlen" >&5
17822 echo "${ECHO_T}$ol_cv_inet6_addrstrlen" >&6
17823
17824
17825         echo "$as_me:$LINENO: checking struct sockaddr_storage" >&5
17826 echo $ECHO_N "checking struct sockaddr_storage... $ECHO_C" >&6
17827 if test "${ol_cv_struct_sockaddr_storage+set}" = set; then
17828   echo $ECHO_N "(cached) $ECHO_C" >&6
17829 else
17830
17831                 cat >conftest.$ac_ext <<_ACEOF
17832 /* confdefs.h.  */
17833 _ACEOF
17834 cat confdefs.h >>conftest.$ac_ext
17835 cat >>conftest.$ac_ext <<_ACEOF
17836 /* end confdefs.h.  */
17837
17838 #include <sys/types.h>
17839 #include <sys/socket.h>
17840
17841 int
17842 main ()
17843 {
17844
17845                         struct sockaddr_storage ss;
17846
17847   ;
17848   return 0;
17849 }
17850 _ACEOF
17851 rm -f conftest.$ac_objext
17852 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17853   (eval $ac_compile) 2>conftest.er1
17854   ac_status=$?
17855   grep -v '^ *+' conftest.er1 >conftest.err
17856   rm -f conftest.er1
17857   cat conftest.err >&5
17858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17859   (exit $ac_status); } &&
17860          { ac_try='test -z "$ac_c_werror_flag"
17861                          || test ! -s conftest.err'
17862   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17863   (eval $ac_try) 2>&5
17864   ac_status=$?
17865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17866   (exit $ac_status); }; } &&
17867          { ac_try='test -s conftest.$ac_objext'
17868   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17869   (eval $ac_try) 2>&5
17870   ac_status=$?
17871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17872   (exit $ac_status); }; }; then
17873   ol_cv_struct_sockaddr_storage=yes
17874 else
17875   echo "$as_me: failed program was:" >&5
17876 sed 's/^/| /' conftest.$ac_ext >&5
17877
17878 ol_cv_struct_sockaddr_storage=no
17879 fi
17880 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17881 fi
17882 echo "$as_me:$LINENO: result: $ol_cv_struct_sockaddr_storage" >&5
17883 echo "${ECHO_T}$ol_cv_struct_sockaddr_storage" >&6
17884
17885         if test $ol_cv_inet6_addrstrlen = yes &&
17886            test $ol_cv_struct_sockaddr_storage = yes ; then
17887                 ol_link_ipv6=yes
17888         elif test $ol_enable_ipv6 = yes &&
17889              test $ol_cv_inet6_addrstrlen = no ; then
17890                 { { echo "$as_me:$LINENO: error: IPv6 support requires INET6_ADDRSTRLEN" >&5
17891 echo "$as_me: error: IPv6 support requires INET6_ADDRSTRLEN" >&2;}
17892    { (exit 1); exit 1; }; }
17893         elif test $ol_enable_ipv6 = yes &&
17894              test $ol_cv_struct_sockaddr_storage = no ; then
17895                 { { echo "$as_me:$LINENO: error: IPv6 support requires struct sockaddr_storage" >&5
17896 echo "$as_me: error: IPv6 support requires struct sockaddr_storage" >&2;}
17897    { (exit 1); exit 1; }; }
17898         fi
17899 fi
17900
17901 if test $ol_enable_local != no ; then
17902
17903 for ac_header in sys/un.h
17904 do
17905 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17906 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17907   echo "$as_me:$LINENO: checking for $ac_header" >&5
17908 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17909 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17910   echo $ECHO_N "(cached) $ECHO_C" >&6
17911 fi
17912 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17913 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17914 else
17915   # Is the header compilable?
17916 echo "$as_me:$LINENO: checking $ac_header usability" >&5
17917 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17918 cat >conftest.$ac_ext <<_ACEOF
17919 /* confdefs.h.  */
17920 _ACEOF
17921 cat confdefs.h >>conftest.$ac_ext
17922 cat >>conftest.$ac_ext <<_ACEOF
17923 /* end confdefs.h.  */
17924 $ac_includes_default
17925 #include <$ac_header>
17926 _ACEOF
17927 rm -f conftest.$ac_objext
17928 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17929   (eval $ac_compile) 2>conftest.er1
17930   ac_status=$?
17931   grep -v '^ *+' conftest.er1 >conftest.err
17932   rm -f conftest.er1
17933   cat conftest.err >&5
17934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17935   (exit $ac_status); } &&
17936          { ac_try='test -z "$ac_c_werror_flag"
17937                          || test ! -s conftest.err'
17938   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17939   (eval $ac_try) 2>&5
17940   ac_status=$?
17941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17942   (exit $ac_status); }; } &&
17943          { ac_try='test -s conftest.$ac_objext'
17944   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17945   (eval $ac_try) 2>&5
17946   ac_status=$?
17947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17948   (exit $ac_status); }; }; then
17949   ac_header_compiler=yes
17950 else
17951   echo "$as_me: failed program was:" >&5
17952 sed 's/^/| /' conftest.$ac_ext >&5
17953
17954 ac_header_compiler=no
17955 fi
17956 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17957 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17958 echo "${ECHO_T}$ac_header_compiler" >&6
17959
17960 # Is the header present?
17961 echo "$as_me:$LINENO: checking $ac_header presence" >&5
17962 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17963 cat >conftest.$ac_ext <<_ACEOF
17964 /* confdefs.h.  */
17965 _ACEOF
17966 cat confdefs.h >>conftest.$ac_ext
17967 cat >>conftest.$ac_ext <<_ACEOF
17968 /* end confdefs.h.  */
17969 #include <$ac_header>
17970 _ACEOF
17971 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17972   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17973   ac_status=$?
17974   grep -v '^ *+' conftest.er1 >conftest.err
17975   rm -f conftest.er1
17976   cat conftest.err >&5
17977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17978   (exit $ac_status); } >/dev/null; then
17979   if test -s conftest.err; then
17980     ac_cpp_err=$ac_c_preproc_warn_flag
17981     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17982   else
17983     ac_cpp_err=
17984   fi
17985 else
17986   ac_cpp_err=yes
17987 fi
17988 if test -z "$ac_cpp_err"; then
17989   ac_header_preproc=yes
17990 else
17991   echo "$as_me: failed program was:" >&5
17992 sed 's/^/| /' conftest.$ac_ext >&5
17993
17994   ac_header_preproc=no
17995 fi
17996 rm -f conftest.err conftest.$ac_ext
17997 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17998 echo "${ECHO_T}$ac_header_preproc" >&6
17999
18000 # So?  What about this header?
18001 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18002   yes:no: )
18003     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18004 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18005     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18006 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18007     ac_header_preproc=yes
18008     ;;
18009   no:yes:* )
18010     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18011 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18012     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18013 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18014     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18015 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18016     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18017 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18018     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18019 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18020     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18021 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18022     (
18023       cat <<\_ASBOX
18024 ## --------------------------------------------- ##
18025 ## Report this to <http://www.openldap.org/its/> ##
18026 ## --------------------------------------------- ##
18027 _ASBOX
18028     ) |
18029       sed "s/^/$as_me: WARNING:     /" >&2
18030     ;;
18031 esac
18032 echo "$as_me:$LINENO: checking for $ac_header" >&5
18033 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18034 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18035   echo $ECHO_N "(cached) $ECHO_C" >&6
18036 else
18037   eval "$as_ac_Header=\$ac_header_preproc"
18038 fi
18039 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18040 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18041
18042 fi
18043 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18044   cat >>confdefs.h <<_ACEOF
18045 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18046 _ACEOF
18047
18048 fi
18049
18050 done
18051
18052
18053         if test $ol_enable_local = auto ; then
18054                 ol_enable_local=$ac_cv_header_sys_un_h
18055         elif test $ac_cv_header_sys_un_h = no ; then
18056                 { { echo "$as_me:$LINENO: error: AF_LOCAL domain support requires sys/un.h" >&5
18057 echo "$as_me: error: AF_LOCAL domain support requires sys/un.h" >&2;}
18058    { (exit 1); exit 1; }; }
18059         fi
18060 fi
18061
18062 ol_link_kbind=no
18063 ol_link_krb5=no
18064 ol_link_krb4=no
18065
18066 case $ol_with_kerberos in yes | auto | k5 | k5only | k425)
18067
18068
18069 for ac_header in krb5.h
18070 do
18071 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18072 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18073   echo "$as_me:$LINENO: checking for $ac_header" >&5
18074 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18075 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18076   echo $ECHO_N "(cached) $ECHO_C" >&6
18077 fi
18078 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18079 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18080 else
18081   # Is the header compilable?
18082 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18083 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18084 cat >conftest.$ac_ext <<_ACEOF
18085 /* confdefs.h.  */
18086 _ACEOF
18087 cat confdefs.h >>conftest.$ac_ext
18088 cat >>conftest.$ac_ext <<_ACEOF
18089 /* end confdefs.h.  */
18090 $ac_includes_default
18091 #include <$ac_header>
18092 _ACEOF
18093 rm -f conftest.$ac_objext
18094 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18095   (eval $ac_compile) 2>conftest.er1
18096   ac_status=$?
18097   grep -v '^ *+' conftest.er1 >conftest.err
18098   rm -f conftest.er1
18099   cat conftest.err >&5
18100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18101   (exit $ac_status); } &&
18102          { ac_try='test -z "$ac_c_werror_flag"
18103                          || test ! -s conftest.err'
18104   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18105   (eval $ac_try) 2>&5
18106   ac_status=$?
18107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18108   (exit $ac_status); }; } &&
18109          { ac_try='test -s conftest.$ac_objext'
18110   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18111   (eval $ac_try) 2>&5
18112   ac_status=$?
18113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18114   (exit $ac_status); }; }; then
18115   ac_header_compiler=yes
18116 else
18117   echo "$as_me: failed program was:" >&5
18118 sed 's/^/| /' conftest.$ac_ext >&5
18119
18120 ac_header_compiler=no
18121 fi
18122 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18123 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18124 echo "${ECHO_T}$ac_header_compiler" >&6
18125
18126 # Is the header present?
18127 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18128 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18129 cat >conftest.$ac_ext <<_ACEOF
18130 /* confdefs.h.  */
18131 _ACEOF
18132 cat confdefs.h >>conftest.$ac_ext
18133 cat >>conftest.$ac_ext <<_ACEOF
18134 /* end confdefs.h.  */
18135 #include <$ac_header>
18136 _ACEOF
18137 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18138   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18139   ac_status=$?
18140   grep -v '^ *+' conftest.er1 >conftest.err
18141   rm -f conftest.er1
18142   cat conftest.err >&5
18143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18144   (exit $ac_status); } >/dev/null; then
18145   if test -s conftest.err; then
18146     ac_cpp_err=$ac_c_preproc_warn_flag
18147     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18148   else
18149     ac_cpp_err=
18150   fi
18151 else
18152   ac_cpp_err=yes
18153 fi
18154 if test -z "$ac_cpp_err"; then
18155   ac_header_preproc=yes
18156 else
18157   echo "$as_me: failed program was:" >&5
18158 sed 's/^/| /' conftest.$ac_ext >&5
18159
18160   ac_header_preproc=no
18161 fi
18162 rm -f conftest.err conftest.$ac_ext
18163 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18164 echo "${ECHO_T}$ac_header_preproc" >&6
18165
18166 # So?  What about this header?
18167 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18168   yes:no: )
18169     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18170 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18171     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18172 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18173     ac_header_preproc=yes
18174     ;;
18175   no:yes:* )
18176     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18177 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18178     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18179 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18180     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18181 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18182     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18183 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18184     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18185 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18186     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18187 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18188     (
18189       cat <<\_ASBOX
18190 ## --------------------------------------------- ##
18191 ## Report this to <http://www.openldap.org/its/> ##
18192 ## --------------------------------------------- ##
18193 _ASBOX
18194     ) |
18195       sed "s/^/$as_me: WARNING:     /" >&2
18196     ;;
18197 esac
18198 echo "$as_me:$LINENO: checking for $ac_header" >&5
18199 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18200 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18201   echo $ECHO_N "(cached) $ECHO_C" >&6
18202 else
18203   eval "$as_ac_Header=\$ac_header_preproc"
18204 fi
18205 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18206 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18207
18208 fi
18209 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18210   cat >>confdefs.h <<_ACEOF
18211 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18212 _ACEOF
18213
18214 fi
18215
18216 done
18217
18218
18219         if test $ac_cv_header_krb5_h = yes ; then
18220
18221 for ac_header in heim_err.h
18222 do
18223 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18224 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18225   echo "$as_me:$LINENO: checking for $ac_header" >&5
18226 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18227 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18228   echo $ECHO_N "(cached) $ECHO_C" >&6
18229 fi
18230 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18231 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18232 else
18233   # Is the header compilable?
18234 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18235 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18236 cat >conftest.$ac_ext <<_ACEOF
18237 /* confdefs.h.  */
18238 _ACEOF
18239 cat confdefs.h >>conftest.$ac_ext
18240 cat >>conftest.$ac_ext <<_ACEOF
18241 /* end confdefs.h.  */
18242 $ac_includes_default
18243 #include <$ac_header>
18244 _ACEOF
18245 rm -f conftest.$ac_objext
18246 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18247   (eval $ac_compile) 2>conftest.er1
18248   ac_status=$?
18249   grep -v '^ *+' conftest.er1 >conftest.err
18250   rm -f conftest.er1
18251   cat conftest.err >&5
18252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18253   (exit $ac_status); } &&
18254          { ac_try='test -z "$ac_c_werror_flag"
18255                          || test ! -s conftest.err'
18256   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18257   (eval $ac_try) 2>&5
18258   ac_status=$?
18259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18260   (exit $ac_status); }; } &&
18261          { ac_try='test -s conftest.$ac_objext'
18262   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18263   (eval $ac_try) 2>&5
18264   ac_status=$?
18265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18266   (exit $ac_status); }; }; then
18267   ac_header_compiler=yes
18268 else
18269   echo "$as_me: failed program was:" >&5
18270 sed 's/^/| /' conftest.$ac_ext >&5
18271
18272 ac_header_compiler=no
18273 fi
18274 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18275 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18276 echo "${ECHO_T}$ac_header_compiler" >&6
18277
18278 # Is the header present?
18279 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18280 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18281 cat >conftest.$ac_ext <<_ACEOF
18282 /* confdefs.h.  */
18283 _ACEOF
18284 cat confdefs.h >>conftest.$ac_ext
18285 cat >>conftest.$ac_ext <<_ACEOF
18286 /* end confdefs.h.  */
18287 #include <$ac_header>
18288 _ACEOF
18289 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18290   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18291   ac_status=$?
18292   grep -v '^ *+' conftest.er1 >conftest.err
18293   rm -f conftest.er1
18294   cat conftest.err >&5
18295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18296   (exit $ac_status); } >/dev/null; then
18297   if test -s conftest.err; then
18298     ac_cpp_err=$ac_c_preproc_warn_flag
18299     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18300   else
18301     ac_cpp_err=
18302   fi
18303 else
18304   ac_cpp_err=yes
18305 fi
18306 if test -z "$ac_cpp_err"; then
18307   ac_header_preproc=yes
18308 else
18309   echo "$as_me: failed program was:" >&5
18310 sed 's/^/| /' conftest.$ac_ext >&5
18311
18312   ac_header_preproc=no
18313 fi
18314 rm -f conftest.err conftest.$ac_ext
18315 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18316 echo "${ECHO_T}$ac_header_preproc" >&6
18317
18318 # So?  What about this header?
18319 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18320   yes:no: )
18321     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18322 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18323     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18324 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18325     ac_header_preproc=yes
18326     ;;
18327   no:yes:* )
18328     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18329 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18330     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18331 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18332     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18333 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18334     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18335 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18336     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18337 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18338     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18339 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18340     (
18341       cat <<\_ASBOX
18342 ## --------------------------------------------- ##
18343 ## Report this to <http://www.openldap.org/its/> ##
18344 ## --------------------------------------------- ##
18345 _ASBOX
18346     ) |
18347       sed "s/^/$as_me: WARNING:     /" >&2
18348     ;;
18349 esac
18350 echo "$as_me:$LINENO: checking for $ac_header" >&5
18351 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18352 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18353   echo $ECHO_N "(cached) $ECHO_C" >&6
18354 else
18355   eval "$as_ac_Header=\$ac_header_preproc"
18356 fi
18357 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18358 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18359
18360 fi
18361 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18362   cat >>confdefs.h <<_ACEOF
18363 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18364 _ACEOF
18365
18366 fi
18367
18368 done
18369
18370                 if test $ac_cv_header_heim_err_h = yes ; then
18371                         krb5_impl=heimdal
18372                 else
18373                         krb5_impl=mit
18374                 fi
18375
18376                 if test $krb5_impl = mit; then
18377                         echo "$as_me:$LINENO: checking for main in -lk5crypto" >&5
18378 echo $ECHO_N "checking for main in -lk5crypto... $ECHO_C" >&6
18379 if test "${ac_cv_lib_k5crypto_main+set}" = set; then
18380   echo $ECHO_N "(cached) $ECHO_C" >&6
18381 else
18382   ac_check_lib_save_LIBS=$LIBS
18383 LIBS="-lk5crypto  $LIBS"
18384 cat >conftest.$ac_ext <<_ACEOF
18385 /* confdefs.h.  */
18386 _ACEOF
18387 cat confdefs.h >>conftest.$ac_ext
18388 cat >>conftest.$ac_ext <<_ACEOF
18389 /* end confdefs.h.  */
18390
18391
18392 int
18393 main ()
18394 {
18395 main ();
18396   ;
18397   return 0;
18398 }
18399 _ACEOF
18400 rm -f conftest.$ac_objext conftest$ac_exeext
18401 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18402   (eval $ac_link) 2>conftest.er1
18403   ac_status=$?
18404   grep -v '^ *+' conftest.er1 >conftest.err
18405   rm -f conftest.er1
18406   cat conftest.err >&5
18407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18408   (exit $ac_status); } &&
18409          { ac_try='test -z "$ac_c_werror_flag"
18410                          || test ! -s conftest.err'
18411   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18412   (eval $ac_try) 2>&5
18413   ac_status=$?
18414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18415   (exit $ac_status); }; } &&
18416          { ac_try='test -s conftest$ac_exeext'
18417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18418   (eval $ac_try) 2>&5
18419   ac_status=$?
18420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18421   (exit $ac_status); }; }; then
18422   ac_cv_lib_k5crypto_main=yes
18423 else
18424   echo "$as_me: failed program was:" >&5
18425 sed 's/^/| /' conftest.$ac_ext >&5
18426
18427 ac_cv_lib_k5crypto_main=no
18428 fi
18429 rm -f conftest.err conftest.$ac_objext \
18430       conftest$ac_exeext conftest.$ac_ext
18431 LIBS=$ac_check_lib_save_LIBS
18432 fi
18433 echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_main" >&5
18434 echo "${ECHO_T}$ac_cv_lib_k5crypto_main" >&6
18435 if test $ac_cv_lib_k5crypto_main = yes; then
18436   krb5crypto=k5crypto
18437 else
18438   krb5crypto=crypto
18439 fi
18440
18441
18442                         echo "$as_me:$LINENO: checking for main in -lkrb5" >&5
18443 echo $ECHO_N "checking for main in -lkrb5... $ECHO_C" >&6
18444 if test "${ac_cv_lib_krb5_main+set}" = set; then
18445   echo $ECHO_N "(cached) $ECHO_C" >&6
18446 else
18447   ac_check_lib_save_LIBS=$LIBS
18448 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
18449 cat >conftest.$ac_ext <<_ACEOF
18450 /* confdefs.h.  */
18451 _ACEOF
18452 cat confdefs.h >>conftest.$ac_ext
18453 cat >>conftest.$ac_ext <<_ACEOF
18454 /* end confdefs.h.  */
18455
18456
18457 int
18458 main ()
18459 {
18460 main ();
18461   ;
18462   return 0;
18463 }
18464 _ACEOF
18465 rm -f conftest.$ac_objext conftest$ac_exeext
18466 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18467   (eval $ac_link) 2>conftest.er1
18468   ac_status=$?
18469   grep -v '^ *+' conftest.er1 >conftest.err
18470   rm -f conftest.er1
18471   cat conftest.err >&5
18472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18473   (exit $ac_status); } &&
18474          { ac_try='test -z "$ac_c_werror_flag"
18475                          || test ! -s conftest.err'
18476   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18477   (eval $ac_try) 2>&5
18478   ac_status=$?
18479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18480   (exit $ac_status); }; } &&
18481          { ac_try='test -s conftest$ac_exeext'
18482   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18483   (eval $ac_try) 2>&5
18484   ac_status=$?
18485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18486   (exit $ac_status); }; }; then
18487   ac_cv_lib_krb5_main=yes
18488 else
18489   echo "$as_me: failed program was:" >&5
18490 sed 's/^/| /' conftest.$ac_ext >&5
18491
18492 ac_cv_lib_krb5_main=no
18493 fi
18494 rm -f conftest.err conftest.$ac_objext \
18495       conftest$ac_exeext conftest.$ac_ext
18496 LIBS=$ac_check_lib_save_LIBS
18497 fi
18498 echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_main" >&5
18499 echo "${ECHO_T}$ac_cv_lib_krb5_main" >&6
18500 if test $ac_cv_lib_krb5_main = yes; then
18501   have_krb5=yes
18502                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
18503 else
18504   have_krb5=no
18505 fi
18506
18507
18508                 elif test $krb5_impl = heimdal; then
18509                         echo "$as_me:$LINENO: checking for main in -ldes" >&5
18510 echo $ECHO_N "checking for main in -ldes... $ECHO_C" >&6
18511 if test "${ac_cv_lib_des_main+set}" = set; then
18512   echo $ECHO_N "(cached) $ECHO_C" >&6
18513 else
18514   ac_check_lib_save_LIBS=$LIBS
18515 LIBS="-ldes  $LIBS"
18516 cat >conftest.$ac_ext <<_ACEOF
18517 /* confdefs.h.  */
18518 _ACEOF
18519 cat confdefs.h >>conftest.$ac_ext
18520 cat >>conftest.$ac_ext <<_ACEOF
18521 /* end confdefs.h.  */
18522
18523
18524 int
18525 main ()
18526 {
18527 main ();
18528   ;
18529   return 0;
18530 }
18531 _ACEOF
18532 rm -f conftest.$ac_objext conftest$ac_exeext
18533 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18534   (eval $ac_link) 2>conftest.er1
18535   ac_status=$?
18536   grep -v '^ *+' conftest.er1 >conftest.err
18537   rm -f conftest.er1
18538   cat conftest.err >&5
18539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18540   (exit $ac_status); } &&
18541          { ac_try='test -z "$ac_c_werror_flag"
18542                          || test ! -s conftest.err'
18543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18544   (eval $ac_try) 2>&5
18545   ac_status=$?
18546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18547   (exit $ac_status); }; } &&
18548          { ac_try='test -s conftest$ac_exeext'
18549   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18550   (eval $ac_try) 2>&5
18551   ac_status=$?
18552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18553   (exit $ac_status); }; }; then
18554   ac_cv_lib_des_main=yes
18555 else
18556   echo "$as_me: failed program was:" >&5
18557 sed 's/^/| /' conftest.$ac_ext >&5
18558
18559 ac_cv_lib_des_main=no
18560 fi
18561 rm -f conftest.err conftest.$ac_objext \
18562       conftest$ac_exeext conftest.$ac_ext
18563 LIBS=$ac_check_lib_save_LIBS
18564 fi
18565 echo "$as_me:$LINENO: result: $ac_cv_lib_des_main" >&5
18566 echo "${ECHO_T}$ac_cv_lib_des_main" >&6
18567 if test $ac_cv_lib_des_main = yes; then
18568   krb5crypto=des
18569 else
18570   krb5crypto=crypto
18571 fi
18572
18573
18574                         echo "$as_me:$LINENO: checking for main in -lkrb5" >&5
18575 echo $ECHO_N "checking for main in -lkrb5... $ECHO_C" >&6
18576 if test "${ac_cv_lib_krb5_main+set}" = set; then
18577   echo $ECHO_N "(cached) $ECHO_C" >&6
18578 else
18579   ac_check_lib_save_LIBS=$LIBS
18580 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
18581 cat >conftest.$ac_ext <<_ACEOF
18582 /* confdefs.h.  */
18583 _ACEOF
18584 cat confdefs.h >>conftest.$ac_ext
18585 cat >>conftest.$ac_ext <<_ACEOF
18586 /* end confdefs.h.  */
18587
18588
18589 int
18590 main ()
18591 {
18592 main ();
18593   ;
18594   return 0;
18595 }
18596 _ACEOF
18597 rm -f conftest.$ac_objext conftest$ac_exeext
18598 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18599   (eval $ac_link) 2>conftest.er1
18600   ac_status=$?
18601   grep -v '^ *+' conftest.er1 >conftest.err
18602   rm -f conftest.er1
18603   cat conftest.err >&5
18604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18605   (exit $ac_status); } &&
18606          { ac_try='test -z "$ac_c_werror_flag"
18607                          || test ! -s conftest.err'
18608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18609   (eval $ac_try) 2>&5
18610   ac_status=$?
18611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18612   (exit $ac_status); }; } &&
18613          { ac_try='test -s conftest$ac_exeext'
18614   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18615   (eval $ac_try) 2>&5
18616   ac_status=$?
18617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18618   (exit $ac_status); }; }; then
18619   ac_cv_lib_krb5_main=yes
18620 else
18621   echo "$as_me: failed program was:" >&5
18622 sed 's/^/| /' conftest.$ac_ext >&5
18623
18624 ac_cv_lib_krb5_main=no
18625 fi
18626 rm -f conftest.err conftest.$ac_objext \
18627       conftest$ac_exeext conftest.$ac_ext
18628 LIBS=$ac_check_lib_save_LIBS
18629 fi
18630 echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_main" >&5
18631 echo "${ECHO_T}$ac_cv_lib_krb5_main" >&6
18632 if test $ac_cv_lib_krb5_main = yes; then
18633   have_krb5=yes
18634                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
18635 else
18636   have_krb5=no
18637 fi
18638
18639
18640
18641 cat >>confdefs.h <<\_ACEOF
18642 #define HAVE_HEIMDAL_KERBEROS 1
18643 _ACEOF
18644
18645
18646                 else
18647                         have_krb5=no
18648                         { echo "$as_me:$LINENO: WARNING: Unrecognized Kerberos5 Implementation" >&5
18649 echo "$as_me: WARNING: Unrecognized Kerberos5 Implementation" >&2;}
18650                 fi
18651
18652                 if test $have_krb5 = yes ; then
18653                         ol_link_krb5=yes
18654
18655
18656 cat >>confdefs.h <<\_ACEOF
18657 #define HAVE_KRB5 1
18658 _ACEOF
18659
18660
18661                         if test $ol_with_kerberos = k5only ; then
18662                                 ol_with_kerberos=found
18663                         fi
18664
18665                 elif test $ol_with_kerberos != auto ; then
18666                         { { echo "$as_me:$LINENO: error: Required Kerberos 5 support not available" >&5
18667 echo "$as_me: error: Required Kerberos 5 support not available" >&2;}
18668    { (exit 1); exit 1; }; }
18669                 fi
18670
18671         fi
18672         ;;
18673 esac
18674
18675 if test $ol_link_krb5 = yes &&
18676    { test $ol_with_kerberos = yes ||
18677      test $ol_with_kerberos = auto ||
18678      test $ol_with_kerberos = k425; }; then
18679
18680
18681
18682 for ac_header in kerberosIV/krb.h kerberosIV/des.h
18683 do
18684 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18685 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18686   echo "$as_me:$LINENO: checking for $ac_header" >&5
18687 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18688 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18689   echo $ECHO_N "(cached) $ECHO_C" >&6
18690 fi
18691 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18692 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18693 else
18694   # Is the header compilable?
18695 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18696 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18697 cat >conftest.$ac_ext <<_ACEOF
18698 /* confdefs.h.  */
18699 _ACEOF
18700 cat confdefs.h >>conftest.$ac_ext
18701 cat >>conftest.$ac_ext <<_ACEOF
18702 /* end confdefs.h.  */
18703 $ac_includes_default
18704 #include <$ac_header>
18705 _ACEOF
18706 rm -f conftest.$ac_objext
18707 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18708   (eval $ac_compile) 2>conftest.er1
18709   ac_status=$?
18710   grep -v '^ *+' conftest.er1 >conftest.err
18711   rm -f conftest.er1
18712   cat conftest.err >&5
18713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18714   (exit $ac_status); } &&
18715          { ac_try='test -z "$ac_c_werror_flag"
18716                          || test ! -s conftest.err'
18717   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18718   (eval $ac_try) 2>&5
18719   ac_status=$?
18720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18721   (exit $ac_status); }; } &&
18722          { ac_try='test -s conftest.$ac_objext'
18723   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18724   (eval $ac_try) 2>&5
18725   ac_status=$?
18726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18727   (exit $ac_status); }; }; then
18728   ac_header_compiler=yes
18729 else
18730   echo "$as_me: failed program was:" >&5
18731 sed 's/^/| /' conftest.$ac_ext >&5
18732
18733 ac_header_compiler=no
18734 fi
18735 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18736 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18737 echo "${ECHO_T}$ac_header_compiler" >&6
18738
18739 # Is the header present?
18740 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18741 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18742 cat >conftest.$ac_ext <<_ACEOF
18743 /* confdefs.h.  */
18744 _ACEOF
18745 cat confdefs.h >>conftest.$ac_ext
18746 cat >>conftest.$ac_ext <<_ACEOF
18747 /* end confdefs.h.  */
18748 #include <$ac_header>
18749 _ACEOF
18750 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18751   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18752   ac_status=$?
18753   grep -v '^ *+' conftest.er1 >conftest.err
18754   rm -f conftest.er1
18755   cat conftest.err >&5
18756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18757   (exit $ac_status); } >/dev/null; then
18758   if test -s conftest.err; then
18759     ac_cpp_err=$ac_c_preproc_warn_flag
18760     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18761   else
18762     ac_cpp_err=
18763   fi
18764 else
18765   ac_cpp_err=yes
18766 fi
18767 if test -z "$ac_cpp_err"; then
18768   ac_header_preproc=yes
18769 else
18770   echo "$as_me: failed program was:" >&5
18771 sed 's/^/| /' conftest.$ac_ext >&5
18772
18773   ac_header_preproc=no
18774 fi
18775 rm -f conftest.err conftest.$ac_ext
18776 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18777 echo "${ECHO_T}$ac_header_preproc" >&6
18778
18779 # So?  What about this header?
18780 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18781   yes:no: )
18782     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18783 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18784     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18785 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18786     ac_header_preproc=yes
18787     ;;
18788   no:yes:* )
18789     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18790 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18791     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18792 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18793     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18794 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18795     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18796 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18797     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18798 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18799     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18800 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18801     (
18802       cat <<\_ASBOX
18803 ## --------------------------------------------- ##
18804 ## Report this to <http://www.openldap.org/its/> ##
18805 ## --------------------------------------------- ##
18806 _ASBOX
18807     ) |
18808       sed "s/^/$as_me: WARNING:     /" >&2
18809     ;;
18810 esac
18811 echo "$as_me:$LINENO: checking for $ac_header" >&5
18812 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18813 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18814   echo $ECHO_N "(cached) $ECHO_C" >&6
18815 else
18816   eval "$as_ac_Header=\$ac_header_preproc"
18817 fi
18818 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18819 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18820
18821 fi
18822 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18823   cat >>confdefs.h <<_ACEOF
18824 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18825 _ACEOF
18826
18827 fi
18828
18829 done
18830
18831
18832         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
18833                 if test $krb5_impl = mit; then
18834                         echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
18835 echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6
18836 if test "${ac_cv_lib_krb4_main+set}" = set; then
18837   echo $ECHO_N "(cached) $ECHO_C" >&6
18838 else
18839   ac_check_lib_save_LIBS=$LIBS
18840 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
18841 cat >conftest.$ac_ext <<_ACEOF
18842 /* confdefs.h.  */
18843 _ACEOF
18844 cat confdefs.h >>conftest.$ac_ext
18845 cat >>conftest.$ac_ext <<_ACEOF
18846 /* end confdefs.h.  */
18847
18848
18849 int
18850 main ()
18851 {
18852 main ();
18853   ;
18854   return 0;
18855 }
18856 _ACEOF
18857 rm -f conftest.$ac_objext conftest$ac_exeext
18858 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18859   (eval $ac_link) 2>conftest.er1
18860   ac_status=$?
18861   grep -v '^ *+' conftest.er1 >conftest.err
18862   rm -f conftest.er1
18863   cat conftest.err >&5
18864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18865   (exit $ac_status); } &&
18866          { ac_try='test -z "$ac_c_werror_flag"
18867                          || test ! -s conftest.err'
18868   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18869   (eval $ac_try) 2>&5
18870   ac_status=$?
18871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18872   (exit $ac_status); }; } &&
18873          { ac_try='test -s conftest$ac_exeext'
18874   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18875   (eval $ac_try) 2>&5
18876   ac_status=$?
18877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18878   (exit $ac_status); }; }; then
18879   ac_cv_lib_krb4_main=yes
18880 else
18881   echo "$as_me: failed program was:" >&5
18882 sed 's/^/| /' conftest.$ac_ext >&5
18883
18884 ac_cv_lib_krb4_main=no
18885 fi
18886 rm -f conftest.err conftest.$ac_objext \
18887       conftest$ac_exeext conftest.$ac_ext
18888 LIBS=$ac_check_lib_save_LIBS
18889 fi
18890 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5
18891 echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6
18892 if test $ac_cv_lib_krb4_main = yes; then
18893   have_k425=yes
18894                                 KRB4_LIBS="-lkrb4 -ldes425"
18895 else
18896   have_k425=no
18897 fi
18898
18899
18900                 elif test $krb5_impl = heimdal; then
18901                         echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
18902 echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6
18903 if test "${ac_cv_lib_krb4_main+set}" = set; then
18904   echo $ECHO_N "(cached) $ECHO_C" >&6
18905 else
18906   ac_check_lib_save_LIBS=$LIBS
18907 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
18908 cat >conftest.$ac_ext <<_ACEOF
18909 /* confdefs.h.  */
18910 _ACEOF
18911 cat confdefs.h >>conftest.$ac_ext
18912 cat >>conftest.$ac_ext <<_ACEOF
18913 /* end confdefs.h.  */
18914
18915
18916 int
18917 main ()
18918 {
18919 main ();
18920   ;
18921   return 0;
18922 }
18923 _ACEOF
18924 rm -f conftest.$ac_objext conftest$ac_exeext
18925 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18926   (eval $ac_link) 2>conftest.er1
18927   ac_status=$?
18928   grep -v '^ *+' conftest.er1 >conftest.err
18929   rm -f conftest.er1
18930   cat conftest.err >&5
18931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18932   (exit $ac_status); } &&
18933          { ac_try='test -z "$ac_c_werror_flag"
18934                          || test ! -s conftest.err'
18935   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18936   (eval $ac_try) 2>&5
18937   ac_status=$?
18938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18939   (exit $ac_status); }; } &&
18940          { ac_try='test -s conftest$ac_exeext'
18941   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18942   (eval $ac_try) 2>&5
18943   ac_status=$?
18944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18945   (exit $ac_status); }; }; then
18946   ac_cv_lib_krb4_main=yes
18947 else
18948   echo "$as_me: failed program was:" >&5
18949 sed 's/^/| /' conftest.$ac_ext >&5
18950
18951 ac_cv_lib_krb4_main=no
18952 fi
18953 rm -f conftest.err conftest.$ac_objext \
18954       conftest$ac_exeext conftest.$ac_ext
18955 LIBS=$ac_check_lib_save_LIBS
18956 fi
18957 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5
18958 echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6
18959 if test $ac_cv_lib_krb4_main = yes; then
18960   have_k425=yes
18961                                 KRB4_LIBS="-lkrb4"
18962 else
18963   have_k425=no
18964 fi
18965
18966
18967                 else
18968                         have_425=no
18969                         { echo "$as_me:$LINENO: WARNING: Unrecongized Kerberos V Implementation" >&5
18970 echo "$as_me: WARNING: Unrecongized Kerberos V Implementation" >&2;}
18971                 fi
18972
18973                 if test $have_k425 = yes ; then
18974                         ol_with_kerberos=found
18975                         ol_link_krb4=yes
18976
18977
18978 cat >>confdefs.h <<\_ACEOF
18979 #define HAVE_KRB425 1
18980 _ACEOF
18981
18982
18983 cat >>confdefs.h <<\_ACEOF
18984 #define HAVE_KRB4 1
18985 _ACEOF
18986
18987
18988                         echo "$as_me:$LINENO: checking for des_debug in Kerberos libraries" >&5
18989 echo $ECHO_N "checking for des_debug in Kerberos libraries... $ECHO_C" >&6
18990 if test "${ol_cv_var_des_debug+set}" = set; then
18991   echo $ECHO_N "(cached) $ECHO_C" >&6
18992 else
18993
18994                                                                 save_LIBS="$LIBS"
18995                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
18996                                 cat >conftest.$ac_ext <<_ACEOF
18997 /* confdefs.h.  */
18998 _ACEOF
18999 cat confdefs.h >>conftest.$ac_ext
19000 cat >>conftest.$ac_ext <<_ACEOF
19001 /* end confdefs.h.  */
19002
19003 #include <kerberosIV/krb.h>
19004 #include <kerberosIV/des.h>
19005 extern int des_debug;
19006
19007 int
19008 main ()
19009 {
19010
19011 des_debug = 1;
19012
19013   ;
19014   return 0;
19015 }
19016 _ACEOF
19017 rm -f conftest.$ac_objext conftest$ac_exeext
19018 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19019   (eval $ac_link) 2>conftest.er1
19020   ac_status=$?
19021   grep -v '^ *+' conftest.er1 >conftest.err
19022   rm -f conftest.er1
19023   cat conftest.err >&5
19024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19025   (exit $ac_status); } &&
19026          { ac_try='test -z "$ac_c_werror_flag"
19027                          || test ! -s conftest.err'
19028   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19029   (eval $ac_try) 2>&5
19030   ac_status=$?
19031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19032   (exit $ac_status); }; } &&
19033          { ac_try='test -s conftest$ac_exeext'
19034   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19035   (eval $ac_try) 2>&5
19036   ac_status=$?
19037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19038   (exit $ac_status); }; }; then
19039   ol_cv_var_des_debug=yes
19040 else
19041   echo "$as_me: failed program was:" >&5
19042 sed 's/^/| /' conftest.$ac_ext >&5
19043
19044 ol_cv_var_des_debug=no
19045 fi
19046 rm -f conftest.err conftest.$ac_objext \
19047       conftest$ac_exeext conftest.$ac_ext
19048                                                                 LIBS="$save_LIBS"
19049
19050 fi
19051 echo "$as_me:$LINENO: result: $ol_cv_var_des_debug" >&5
19052 echo "${ECHO_T}$ol_cv_var_des_debug" >&6
19053
19054                         if test $ol_cv_var_des_debug = yes ; then
19055
19056 cat >>confdefs.h <<\_ACEOF
19057 #define HAVE_DES_DEBUG 1
19058 _ACEOF
19059
19060                         fi
19061
19062                         LIBS="$save_LIBS"
19063                 fi
19064         fi
19065 fi
19066
19067 if test $ol_link_krb5 = yes ; then
19068         ol_with_kerberos=found
19069 fi
19070
19071 case $ol_with_kerberos in yes | auto | k4 | kth)
19072
19073
19074
19075
19076 for ac_header in krb.h des.h krb-archaeology.h
19077 do
19078 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19079 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19080   echo "$as_me:$LINENO: checking for $ac_header" >&5
19081 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19082 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19083   echo $ECHO_N "(cached) $ECHO_C" >&6
19084 fi
19085 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19086 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19087 else
19088   # Is the header compilable?
19089 echo "$as_me:$LINENO: checking $ac_header usability" >&5
19090 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19091 cat >conftest.$ac_ext <<_ACEOF
19092 /* confdefs.h.  */
19093 _ACEOF
19094 cat confdefs.h >>conftest.$ac_ext
19095 cat >>conftest.$ac_ext <<_ACEOF
19096 /* end confdefs.h.  */
19097 $ac_includes_default
19098 #include <$ac_header>
19099 _ACEOF
19100 rm -f conftest.$ac_objext
19101 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19102   (eval $ac_compile) 2>conftest.er1
19103   ac_status=$?
19104   grep -v '^ *+' conftest.er1 >conftest.err
19105   rm -f conftest.er1
19106   cat conftest.err >&5
19107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19108   (exit $ac_status); } &&
19109          { ac_try='test -z "$ac_c_werror_flag"
19110                          || test ! -s conftest.err'
19111   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19112   (eval $ac_try) 2>&5
19113   ac_status=$?
19114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19115   (exit $ac_status); }; } &&
19116          { ac_try='test -s conftest.$ac_objext'
19117   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19118   (eval $ac_try) 2>&5
19119   ac_status=$?
19120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19121   (exit $ac_status); }; }; then
19122   ac_header_compiler=yes
19123 else
19124   echo "$as_me: failed program was:" >&5
19125 sed 's/^/| /' conftest.$ac_ext >&5
19126
19127 ac_header_compiler=no
19128 fi
19129 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19130 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19131 echo "${ECHO_T}$ac_header_compiler" >&6
19132
19133 # Is the header present?
19134 echo "$as_me:$LINENO: checking $ac_header presence" >&5
19135 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19136 cat >conftest.$ac_ext <<_ACEOF
19137 /* confdefs.h.  */
19138 _ACEOF
19139 cat confdefs.h >>conftest.$ac_ext
19140 cat >>conftest.$ac_ext <<_ACEOF
19141 /* end confdefs.h.  */
19142 #include <$ac_header>
19143 _ACEOF
19144 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19145   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19146   ac_status=$?
19147   grep -v '^ *+' conftest.er1 >conftest.err
19148   rm -f conftest.er1
19149   cat conftest.err >&5
19150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19151   (exit $ac_status); } >/dev/null; then
19152   if test -s conftest.err; then
19153     ac_cpp_err=$ac_c_preproc_warn_flag
19154     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19155   else
19156     ac_cpp_err=
19157   fi
19158 else
19159   ac_cpp_err=yes
19160 fi
19161 if test -z "$ac_cpp_err"; then
19162   ac_header_preproc=yes
19163 else
19164   echo "$as_me: failed program was:" >&5
19165 sed 's/^/| /' conftest.$ac_ext >&5
19166
19167   ac_header_preproc=no
19168 fi
19169 rm -f conftest.err conftest.$ac_ext
19170 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19171 echo "${ECHO_T}$ac_header_preproc" >&6
19172
19173 # So?  What about this header?
19174 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19175   yes:no: )
19176     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19177 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19178     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19179 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19180     ac_header_preproc=yes
19181     ;;
19182   no:yes:* )
19183     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19184 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19185     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19186 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19187     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19188 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19189     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19190 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19191     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19192 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19193     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19194 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19195     (
19196       cat <<\_ASBOX
19197 ## --------------------------------------------- ##
19198 ## Report this to <http://www.openldap.org/its/> ##
19199 ## --------------------------------------------- ##
19200 _ASBOX
19201     ) |
19202       sed "s/^/$as_me: WARNING:     /" >&2
19203     ;;
19204 esac
19205 echo "$as_me:$LINENO: checking for $ac_header" >&5
19206 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19207 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19208   echo $ECHO_N "(cached) $ECHO_C" >&6
19209 else
19210   eval "$as_ac_Header=\$ac_header_preproc"
19211 fi
19212 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19213 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19214
19215 fi
19216 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19217   cat >>confdefs.h <<_ACEOF
19218 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19219 _ACEOF
19220
19221 fi
19222
19223 done
19224
19225
19226         if test $ac_cv_header_krb_h = yes ; then
19227                 echo "$as_me:$LINENO: checking for main in -lkrb" >&5
19228 echo $ECHO_N "checking for main in -lkrb... $ECHO_C" >&6
19229 if test "${ac_cv_lib_krb_main+set}" = set; then
19230   echo $ECHO_N "(cached) $ECHO_C" >&6
19231 else
19232   ac_check_lib_save_LIBS=$LIBS
19233 LIBS="-lkrb -ldes $LIBS"
19234 cat >conftest.$ac_ext <<_ACEOF
19235 /* confdefs.h.  */
19236 _ACEOF
19237 cat confdefs.h >>conftest.$ac_ext
19238 cat >>conftest.$ac_ext <<_ACEOF
19239 /* end confdefs.h.  */
19240
19241
19242 int
19243 main ()
19244 {
19245 main ();
19246   ;
19247   return 0;
19248 }
19249 _ACEOF
19250 rm -f conftest.$ac_objext conftest$ac_exeext
19251 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19252   (eval $ac_link) 2>conftest.er1
19253   ac_status=$?
19254   grep -v '^ *+' conftest.er1 >conftest.err
19255   rm -f conftest.er1
19256   cat conftest.err >&5
19257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19258   (exit $ac_status); } &&
19259          { ac_try='test -z "$ac_c_werror_flag"
19260                          || test ! -s conftest.err'
19261   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19262   (eval $ac_try) 2>&5
19263   ac_status=$?
19264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19265   (exit $ac_status); }; } &&
19266          { ac_try='test -s conftest$ac_exeext'
19267   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19268   (eval $ac_try) 2>&5
19269   ac_status=$?
19270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19271   (exit $ac_status); }; }; then
19272   ac_cv_lib_krb_main=yes
19273 else
19274   echo "$as_me: failed program was:" >&5
19275 sed 's/^/| /' conftest.$ac_ext >&5
19276
19277 ac_cv_lib_krb_main=no
19278 fi
19279 rm -f conftest.err conftest.$ac_objext \
19280       conftest$ac_exeext conftest.$ac_ext
19281 LIBS=$ac_check_lib_save_LIBS
19282 fi
19283 echo "$as_me:$LINENO: result: $ac_cv_lib_krb_main" >&5
19284 echo "${ECHO_T}$ac_cv_lib_krb_main" >&6
19285 if test $ac_cv_lib_krb_main = yes; then
19286   have_k4=yes
19287 else
19288   have_k4=no
19289 fi
19290
19291
19292                 if test $have_k4 = yes ; then
19293                         ol_with_kerberos=found
19294                         ol_link_krb4=yes
19295
19296
19297 cat >>confdefs.h <<\_ACEOF
19298 #define HAVE_KRB4 1
19299 _ACEOF
19300
19301
19302                         KRB4_LIBS="-lkrb -ldes"
19303
19304                         if test $ac_cv_header_krb_archaeology_h = yes ; then
19305
19306 cat >>confdefs.h <<\_ACEOF
19307 #define HAVE_KTH_KERBEROS 1
19308 _ACEOF
19309
19310                         fi
19311                 fi
19312         fi
19313         ;;
19314 esac
19315
19316 if test $ol_link_krb4 = yes && test $ol_enable_kbind != no ; then
19317         ol_link_kbind=yes
19318
19319 elif test $ol_enable_kbind = yes ; then
19320         { { echo "$as_me:$LINENO: error: Kerberos IV detection failed" >&5
19321 echo "$as_me: error: Kerberos IV detection failed" >&2;}
19322    { (exit 1); exit 1; }; }
19323 fi
19324
19325 if test $ol_link_krb4 = yes || test $ol_link_krb5 = yes ; then
19326
19327 cat >>confdefs.h <<\_ACEOF
19328 #define HAVE_KERBEROS 1
19329 _ACEOF
19330
19331
19332 elif test $ol_with_kerberos != auto && test $ol_with_kerberos != no ; then
19333         { { echo "$as_me:$LINENO: error: Kerberos detection failed" >&5
19334 echo "$as_me: error: Kerberos detection failed" >&2;}
19335    { (exit 1); exit 1; }; }
19336 fi
19337
19338
19339 if test $ol_with_tls = yes ; then
19340         ol_with_tls=auto
19341 fi
19342
19343 ol_link_tls=no
19344 if test $ol_with_tls = openssl || test $ol_with_tls = auto ; then
19345
19346 for ac_header in openssl/ssl.h
19347 do
19348 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19349 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19350   echo "$as_me:$LINENO: checking for $ac_header" >&5
19351 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19352 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19353   echo $ECHO_N "(cached) $ECHO_C" >&6
19354 fi
19355 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19356 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19357 else
19358   # Is the header compilable?
19359 echo "$as_me:$LINENO: checking $ac_header usability" >&5
19360 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19361 cat >conftest.$ac_ext <<_ACEOF
19362 /* confdefs.h.  */
19363 _ACEOF
19364 cat confdefs.h >>conftest.$ac_ext
19365 cat >>conftest.$ac_ext <<_ACEOF
19366 /* end confdefs.h.  */
19367 $ac_includes_default
19368 #include <$ac_header>
19369 _ACEOF
19370 rm -f conftest.$ac_objext
19371 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19372   (eval $ac_compile) 2>conftest.er1
19373   ac_status=$?
19374   grep -v '^ *+' conftest.er1 >conftest.err
19375   rm -f conftest.er1
19376   cat conftest.err >&5
19377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19378   (exit $ac_status); } &&
19379          { ac_try='test -z "$ac_c_werror_flag"
19380                          || test ! -s conftest.err'
19381   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19382   (eval $ac_try) 2>&5
19383   ac_status=$?
19384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19385   (exit $ac_status); }; } &&
19386          { ac_try='test -s conftest.$ac_objext'
19387   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19388   (eval $ac_try) 2>&5
19389   ac_status=$?
19390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19391   (exit $ac_status); }; }; then
19392   ac_header_compiler=yes
19393 else
19394   echo "$as_me: failed program was:" >&5
19395 sed 's/^/| /' conftest.$ac_ext >&5
19396
19397 ac_header_compiler=no
19398 fi
19399 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19400 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19401 echo "${ECHO_T}$ac_header_compiler" >&6
19402
19403 # Is the header present?
19404 echo "$as_me:$LINENO: checking $ac_header presence" >&5
19405 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19406 cat >conftest.$ac_ext <<_ACEOF
19407 /* confdefs.h.  */
19408 _ACEOF
19409 cat confdefs.h >>conftest.$ac_ext
19410 cat >>conftest.$ac_ext <<_ACEOF
19411 /* end confdefs.h.  */
19412 #include <$ac_header>
19413 _ACEOF
19414 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19415   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19416   ac_status=$?
19417   grep -v '^ *+' conftest.er1 >conftest.err
19418   rm -f conftest.er1
19419   cat conftest.err >&5
19420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19421   (exit $ac_status); } >/dev/null; then
19422   if test -s conftest.err; then
19423     ac_cpp_err=$ac_c_preproc_warn_flag
19424     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19425   else
19426     ac_cpp_err=
19427   fi
19428 else
19429   ac_cpp_err=yes
19430 fi
19431 if test -z "$ac_cpp_err"; then
19432   ac_header_preproc=yes
19433 else
19434   echo "$as_me: failed program was:" >&5
19435 sed 's/^/| /' conftest.$ac_ext >&5
19436
19437   ac_header_preproc=no
19438 fi
19439 rm -f conftest.err conftest.$ac_ext
19440 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19441 echo "${ECHO_T}$ac_header_preproc" >&6
19442
19443 # So?  What about this header?
19444 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19445   yes:no: )
19446     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19447 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19448     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19449 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19450     ac_header_preproc=yes
19451     ;;
19452   no:yes:* )
19453     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19454 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19455     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19456 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19457     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19458 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19459     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19460 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19461     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19462 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19463     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19464 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19465     (
19466       cat <<\_ASBOX
19467 ## --------------------------------------------- ##
19468 ## Report this to <http://www.openldap.org/its/> ##
19469 ## --------------------------------------------- ##
19470 _ASBOX
19471     ) |
19472       sed "s/^/$as_me: WARNING:     /" >&2
19473     ;;
19474 esac
19475 echo "$as_me:$LINENO: checking for $ac_header" >&5
19476 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19477 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19478   echo $ECHO_N "(cached) $ECHO_C" >&6
19479 else
19480   eval "$as_ac_Header=\$ac_header_preproc"
19481 fi
19482 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19483 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19484
19485 fi
19486 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19487   cat >>confdefs.h <<_ACEOF
19488 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19489 _ACEOF
19490
19491 fi
19492
19493 done
19494
19495
19496         if test $ac_cv_header_openssl_ssl_h = yes ; then
19497                 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
19498 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
19499 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
19500   echo $ECHO_N "(cached) $ECHO_C" >&6
19501 else
19502   ac_check_lib_save_LIBS=$LIBS
19503 LIBS="-lssl -lcrypto $LIBS"
19504 cat >conftest.$ac_ext <<_ACEOF
19505 /* confdefs.h.  */
19506 _ACEOF
19507 cat confdefs.h >>conftest.$ac_ext
19508 cat >>conftest.$ac_ext <<_ACEOF
19509 /* end confdefs.h.  */
19510
19511 /* Override any gcc2 internal prototype to avoid an error.  */
19512 #ifdef __cplusplus
19513 extern "C"
19514 #endif
19515 /* We use char because int might match the return type of a gcc2
19516    builtin and then its argument prototype would still apply.  */
19517 char SSL_library_init ();
19518 int
19519 main ()
19520 {
19521 SSL_library_init ();
19522   ;
19523   return 0;
19524 }
19525 _ACEOF
19526 rm -f conftest.$ac_objext conftest$ac_exeext
19527 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19528   (eval $ac_link) 2>conftest.er1
19529   ac_status=$?
19530   grep -v '^ *+' conftest.er1 >conftest.err
19531   rm -f conftest.er1
19532   cat conftest.err >&5
19533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19534   (exit $ac_status); } &&
19535          { ac_try='test -z "$ac_c_werror_flag"
19536                          || test ! -s conftest.err'
19537   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19538   (eval $ac_try) 2>&5
19539   ac_status=$?
19540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19541   (exit $ac_status); }; } &&
19542          { ac_try='test -s conftest$ac_exeext'
19543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19544   (eval $ac_try) 2>&5
19545   ac_status=$?
19546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19547   (exit $ac_status); }; }; then
19548   ac_cv_lib_ssl_SSL_library_init=yes
19549 else
19550   echo "$as_me: failed program was:" >&5
19551 sed 's/^/| /' conftest.$ac_ext >&5
19552
19553 ac_cv_lib_ssl_SSL_library_init=no
19554 fi
19555 rm -f conftest.err conftest.$ac_objext \
19556       conftest$ac_exeext conftest.$ac_ext
19557 LIBS=$ac_check_lib_save_LIBS
19558 fi
19559 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
19560 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
19561 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
19562   have_openssl=yes
19563                         need_rsaref=no
19564 else
19565   have_openssl=no
19566 fi
19567
19568
19569                 if test $have_openssl = no ; then
19570                         echo "$as_me:$LINENO: checking for ssl3_accept in -lssl" >&5
19571 echo $ECHO_N "checking for ssl3_accept in -lssl... $ECHO_C" >&6
19572 if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then
19573   echo $ECHO_N "(cached) $ECHO_C" >&6
19574 else
19575   ac_check_lib_save_LIBS=$LIBS
19576 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
19577 cat >conftest.$ac_ext <<_ACEOF
19578 /* confdefs.h.  */
19579 _ACEOF
19580 cat confdefs.h >>conftest.$ac_ext
19581 cat >>conftest.$ac_ext <<_ACEOF
19582 /* end confdefs.h.  */
19583
19584 /* Override any gcc2 internal prototype to avoid an error.  */
19585 #ifdef __cplusplus
19586 extern "C"
19587 #endif
19588 /* We use char because int might match the return type of a gcc2
19589    builtin and then its argument prototype would still apply.  */
19590 char ssl3_accept ();
19591 int
19592 main ()
19593 {
19594 ssl3_accept ();
19595   ;
19596   return 0;
19597 }
19598 _ACEOF
19599 rm -f conftest.$ac_objext conftest$ac_exeext
19600 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19601   (eval $ac_link) 2>conftest.er1
19602   ac_status=$?
19603   grep -v '^ *+' conftest.er1 >conftest.err
19604   rm -f conftest.er1
19605   cat conftest.err >&5
19606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19607   (exit $ac_status); } &&
19608          { ac_try='test -z "$ac_c_werror_flag"
19609                          || test ! -s conftest.err'
19610   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19611   (eval $ac_try) 2>&5
19612   ac_status=$?
19613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19614   (exit $ac_status); }; } &&
19615          { ac_try='test -s conftest$ac_exeext'
19616   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19617   (eval $ac_try) 2>&5
19618   ac_status=$?
19619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19620   (exit $ac_status); }; }; then
19621   ac_cv_lib_ssl_ssl3_accept=yes
19622 else
19623   echo "$as_me: failed program was:" >&5
19624 sed 's/^/| /' conftest.$ac_ext >&5
19625
19626 ac_cv_lib_ssl_ssl3_accept=no
19627 fi
19628 rm -f conftest.err conftest.$ac_objext \
19629       conftest$ac_exeext conftest.$ac_ext
19630 LIBS=$ac_check_lib_save_LIBS
19631 fi
19632 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_ssl3_accept" >&5
19633 echo "${ECHO_T}$ac_cv_lib_ssl_ssl3_accept" >&6
19634 if test $ac_cv_lib_ssl_ssl3_accept = yes; then
19635   have_openssl=yes
19636                                 need_rsaref=yes
19637 else
19638   have_openssl=no
19639 fi
19640
19641                 fi
19642
19643                 if test $have_openssl = yes ; then
19644                         ol_with_tls=openssl
19645                         ol_link_tls=yes
19646
19647
19648 cat >>confdefs.h <<\_ACEOF
19649 #define HAVE_OPENSSL 1
19650 _ACEOF
19651
19652
19653                         if test $need_rsaref = yes; then
19654
19655 cat >>confdefs.h <<\_ACEOF
19656 #define HAVE_RSAREF 1
19657 _ACEOF
19658
19659
19660                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
19661                         else
19662                                 TLS_LIBS="-lssl -lcrypto"
19663                         fi
19664
19665                         echo "$as_me:$LINENO: checking OpenSSL library version (CRL checking capability)" >&5
19666 echo $ECHO_N "checking OpenSSL library version (CRL checking capability)... $ECHO_C" >&6
19667 if test "${ol_cv_ssl_crl_compat+set}" = set; then
19668   echo $ECHO_N "(cached) $ECHO_C" >&6
19669 else
19670
19671         cat >conftest.$ac_ext <<_ACEOF
19672 /* confdefs.h.  */
19673 _ACEOF
19674 cat confdefs.h >>conftest.$ac_ext
19675 cat >>conftest.$ac_ext <<_ACEOF
19676 /* end confdefs.h.  */
19677
19678 #ifdef HAVE_OPENSSL_SSL_H
19679 #include <openssl/ssl.h>
19680 #else
19681 #include <ssl.h>
19682 #endif
19683
19684 /* Require 0.9.7d+ */
19685 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
19686         char *__ssl_compat = "0.9.7d";
19687 #endif
19688
19689 _ACEOF
19690 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19691   $EGREP "__ssl_compat" >/dev/null 2>&1; then
19692   ol_cv_ssl_crl_compat=yes
19693 else
19694   ol_cv_ssl_crl_compat=no
19695 fi
19696 rm -f conftest*
19697
19698 fi
19699 echo "$as_me:$LINENO: result: $ol_cv_ssl_crl_compat" >&5
19700 echo "${ECHO_T}$ol_cv_ssl_crl_compat" >&6
19701
19702                         if test $ol_cv_ssl_crl_compat = yes ; then
19703
19704 cat >>confdefs.h <<\_ACEOF
19705 #define HAVE_OPENSSL_CRL 1
19706 _ACEOF
19707
19708                         fi
19709                 fi
19710         fi
19711 fi
19712
19713 WITH_TLS=no
19714 if test $ol_link_tls = yes ; then
19715
19716 cat >>confdefs.h <<\_ACEOF
19717 #define HAVE_TLS 1
19718 _ACEOF
19719
19720         WITH_TLS=yes
19721 elif test $ol_with_tls = auto ; then
19722         { echo "$as_me:$LINENO: WARNING: Could not locate TLS/SSL package" >&5
19723 echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;}
19724         { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5
19725 echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
19726 elif test $ol_with_tls != no ; then
19727         { { echo "$as_me:$LINENO: error: Could not locate TLS/SSL package" >&5
19728 echo "$as_me: error: Could not locate TLS/SSL package" >&2;}
19729    { (exit 1); exit 1; }; }
19730 else
19731         { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5
19732 echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
19733 fi
19734
19735 if test $ol_enable_lmpasswd != no; then
19736         if test $ol_link_tls != yes ; then
19737                 { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5
19738 echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;}
19739    { (exit 1); exit 1; }; }
19740         fi
19741
19742
19743 cat >>confdefs.h <<\_ACEOF
19744 #define SLAPD_LMHASH 1
19745 _ACEOF
19746
19747 fi
19748
19749 ol_link_threads=no
19750
19751 case $ol_with_threads in auto | yes | nt)
19752
19753
19754         echo "$as_me:$LINENO: checking for _beginthread" >&5
19755 echo $ECHO_N "checking for _beginthread... $ECHO_C" >&6
19756 if test "${ac_cv_func__beginthread+set}" = set; then
19757   echo $ECHO_N "(cached) $ECHO_C" >&6
19758 else
19759   cat >conftest.$ac_ext <<_ACEOF
19760 /* confdefs.h.  */
19761 _ACEOF
19762 cat confdefs.h >>conftest.$ac_ext
19763 cat >>conftest.$ac_ext <<_ACEOF
19764 /* end confdefs.h.  */
19765 /* Define _beginthread to an innocuous variant, in case <limits.h> declares _beginthread.
19766    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19767 #define _beginthread innocuous__beginthread
19768
19769 /* System header to define __stub macros and hopefully few prototypes,
19770     which can conflict with char _beginthread (); below.
19771     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19772     <limits.h> exists even on freestanding compilers.  */
19773
19774 #ifdef __STDC__
19775 # include <limits.h>
19776 #else
19777 # include <assert.h>
19778 #endif
19779
19780 #undef _beginthread
19781
19782 /* Override any gcc2 internal prototype to avoid an error.  */
19783 #ifdef __cplusplus
19784 extern "C"
19785 {
19786 #endif
19787 /* We use char because int might match the return type of a gcc2
19788    builtin and then its argument prototype would still apply.  */
19789 char _beginthread ();
19790 /* The GNU C library defines this for functions which it implements
19791     to always fail with ENOSYS.  Some functions are actually named
19792     something starting with __ and the normal name is an alias.  */
19793 #if defined (__stub__beginthread) || defined (__stub____beginthread)
19794 choke me
19795 #else
19796 char (*f) () = _beginthread;
19797 #endif
19798 #ifdef __cplusplus
19799 }
19800 #endif
19801
19802 int
19803 main ()
19804 {
19805 return f != _beginthread;
19806   ;
19807   return 0;
19808 }
19809 _ACEOF
19810 rm -f conftest.$ac_objext conftest$ac_exeext
19811 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19812   (eval $ac_link) 2>conftest.er1
19813   ac_status=$?
19814   grep -v '^ *+' conftest.er1 >conftest.err
19815   rm -f conftest.er1
19816   cat conftest.err >&5
19817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19818   (exit $ac_status); } &&
19819          { ac_try='test -z "$ac_c_werror_flag"
19820                          || test ! -s conftest.err'
19821   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19822   (eval $ac_try) 2>&5
19823   ac_status=$?
19824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19825   (exit $ac_status); }; } &&
19826          { ac_try='test -s conftest$ac_exeext'
19827   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19828   (eval $ac_try) 2>&5
19829   ac_status=$?
19830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19831   (exit $ac_status); }; }; then
19832   ac_cv_func__beginthread=yes
19833 else
19834   echo "$as_me: failed program was:" >&5
19835 sed 's/^/| /' conftest.$ac_ext >&5
19836
19837 ac_cv_func__beginthread=no
19838 fi
19839 rm -f conftest.err conftest.$ac_objext \
19840       conftest$ac_exeext conftest.$ac_ext
19841 fi
19842 echo "$as_me:$LINENO: result: $ac_cv_func__beginthread" >&5
19843 echo "${ECHO_T}$ac_cv_func__beginthread" >&6
19844
19845
19846         if test $ac_cv_func__beginthread = yes ; then
19847
19848 cat >>confdefs.h <<\_ACEOF
19849 #define HAVE_NT_THREADS 1
19850 _ACEOF
19851
19852                 ol_cv_nt_threads=yes
19853         fi
19854
19855
19856         if test "$ol_cv_nt_threads" = yes ; then
19857                 ol_link_threads=nt
19858                 ol_with_threads=found
19859                 ol_with_yielding_select=yes
19860
19861
19862 cat >>confdefs.h <<\_ACEOF
19863 #define HAVE_NT_SERVICE_MANAGER 1
19864 _ACEOF
19865
19866
19867 cat >>confdefs.h <<\_ACEOF
19868 #define HAVE_NT_EVENT_LOG 1
19869 _ACEOF
19870
19871         fi
19872
19873         if test $ol_with_threads = nt ; then
19874                 { { echo "$as_me:$LINENO: error: could not locate NT Threads" >&5
19875 echo "$as_me: error: could not locate NT Threads" >&2;}
19876    { (exit 1); exit 1; }; }
19877         fi
19878         ;;
19879 esac
19880
19881 case $ol_with_threads in auto | yes | posix)
19882
19883
19884 for ac_header in pthread.h
19885 do
19886 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19887 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19888   echo "$as_me:$LINENO: checking for $ac_header" >&5
19889 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19890 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19891   echo $ECHO_N "(cached) $ECHO_C" >&6
19892 fi
19893 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19894 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19895 else
19896   # Is the header compilable?
19897 echo "$as_me:$LINENO: checking $ac_header usability" >&5
19898 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19899 cat >conftest.$ac_ext <<_ACEOF
19900 /* confdefs.h.  */
19901 _ACEOF
19902 cat confdefs.h >>conftest.$ac_ext
19903 cat >>conftest.$ac_ext <<_ACEOF
19904 /* end confdefs.h.  */
19905 $ac_includes_default
19906 #include <$ac_header>
19907 _ACEOF
19908 rm -f conftest.$ac_objext
19909 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19910   (eval $ac_compile) 2>conftest.er1
19911   ac_status=$?
19912   grep -v '^ *+' conftest.er1 >conftest.err
19913   rm -f conftest.er1
19914   cat conftest.err >&5
19915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19916   (exit $ac_status); } &&
19917          { ac_try='test -z "$ac_c_werror_flag"
19918                          || test ! -s conftest.err'
19919   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19920   (eval $ac_try) 2>&5
19921   ac_status=$?
19922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19923   (exit $ac_status); }; } &&
19924          { ac_try='test -s conftest.$ac_objext'
19925   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19926   (eval $ac_try) 2>&5
19927   ac_status=$?
19928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19929   (exit $ac_status); }; }; then
19930   ac_header_compiler=yes
19931 else
19932   echo "$as_me: failed program was:" >&5
19933 sed 's/^/| /' conftest.$ac_ext >&5
19934
19935 ac_header_compiler=no
19936 fi
19937 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19938 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19939 echo "${ECHO_T}$ac_header_compiler" >&6
19940
19941 # Is the header present?
19942 echo "$as_me:$LINENO: checking $ac_header presence" >&5
19943 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19944 cat >conftest.$ac_ext <<_ACEOF
19945 /* confdefs.h.  */
19946 _ACEOF
19947 cat confdefs.h >>conftest.$ac_ext
19948 cat >>conftest.$ac_ext <<_ACEOF
19949 /* end confdefs.h.  */
19950 #include <$ac_header>
19951 _ACEOF
19952 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19953   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19954   ac_status=$?
19955   grep -v '^ *+' conftest.er1 >conftest.err
19956   rm -f conftest.er1
19957   cat conftest.err >&5
19958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19959   (exit $ac_status); } >/dev/null; then
19960   if test -s conftest.err; then
19961     ac_cpp_err=$ac_c_preproc_warn_flag
19962     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19963   else
19964     ac_cpp_err=
19965   fi
19966 else
19967   ac_cpp_err=yes
19968 fi
19969 if test -z "$ac_cpp_err"; then
19970   ac_header_preproc=yes
19971 else
19972   echo "$as_me: failed program was:" >&5
19973 sed 's/^/| /' conftest.$ac_ext >&5
19974
19975   ac_header_preproc=no
19976 fi
19977 rm -f conftest.err conftest.$ac_ext
19978 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19979 echo "${ECHO_T}$ac_header_preproc" >&6
19980
19981 # So?  What about this header?
19982 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19983   yes:no: )
19984     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19985 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19986     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19987 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19988     ac_header_preproc=yes
19989     ;;
19990   no:yes:* )
19991     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19992 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19993     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19994 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19995     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19996 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19997     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19998 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19999     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20000 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
20001     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20002 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
20003     (
20004       cat <<\_ASBOX
20005 ## --------------------------------------------- ##
20006 ## Report this to <http://www.openldap.org/its/> ##
20007 ## --------------------------------------------- ##
20008 _ASBOX
20009     ) |
20010       sed "s/^/$as_me: WARNING:     /" >&2
20011     ;;
20012 esac
20013 echo "$as_me:$LINENO: checking for $ac_header" >&5
20014 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20015 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20016   echo $ECHO_N "(cached) $ECHO_C" >&6
20017 else
20018   eval "$as_ac_Header=\$ac_header_preproc"
20019 fi
20020 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20021 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20022
20023 fi
20024 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20025   cat >>confdefs.h <<_ACEOF
20026 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20027 _ACEOF
20028
20029 fi
20030
20031 done
20032
20033
20034         if test $ac_cv_header_pthread_h = yes ; then
20035                 echo "$as_me:$LINENO: checking POSIX thread version" >&5
20036 echo $ECHO_N "checking POSIX thread version... $ECHO_C" >&6
20037 if test "${ol_cv_pthread_version+set}" = set; then
20038   echo $ECHO_N "(cached) $ECHO_C" >&6
20039 else
20040
20041         cat >conftest.$ac_ext <<_ACEOF
20042 /* confdefs.h.  */
20043 _ACEOF
20044 cat confdefs.h >>conftest.$ac_ext
20045 cat >>conftest.$ac_ext <<_ACEOF
20046 /* end confdefs.h.  */
20047
20048 #               include <pthread.h>
20049
20050 int
20051 main ()
20052 {
20053
20054                 int i = PTHREAD_CREATE_JOINABLE;
20055
20056   ;
20057   return 0;
20058 }
20059 _ACEOF
20060 rm -f conftest.$ac_objext
20061 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20062   (eval $ac_compile) 2>conftest.er1
20063   ac_status=$?
20064   grep -v '^ *+' conftest.er1 >conftest.err
20065   rm -f conftest.er1
20066   cat conftest.err >&5
20067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20068   (exit $ac_status); } &&
20069          { ac_try='test -z "$ac_c_werror_flag"
20070                          || test ! -s conftest.err'
20071   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20072   (eval $ac_try) 2>&5
20073   ac_status=$?
20074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20075   (exit $ac_status); }; } &&
20076          { ac_try='test -s conftest.$ac_objext'
20077   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20078   (eval $ac_try) 2>&5
20079   ac_status=$?
20080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20081   (exit $ac_status); }; }; then
20082
20083         cat >conftest.$ac_ext <<_ACEOF
20084 /* confdefs.h.  */
20085 _ACEOF
20086 cat confdefs.h >>conftest.$ac_ext
20087 cat >>conftest.$ac_ext <<_ACEOF
20088 /* end confdefs.h.  */
20089 #include <pthread.h>
20090
20091 _ACEOF
20092 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20093   $EGREP "pthread_detach" >/dev/null 2>&1; then
20094   ol_cv_pthread_version=10
20095 else
20096   ol_cv_pthread_version=8
20097 fi
20098 rm -f conftest*
20099
20100 else
20101   echo "$as_me: failed program was:" >&5
20102 sed 's/^/| /' conftest.$ac_ext >&5
20103
20104
20105         cat >conftest.$ac_ext <<_ACEOF
20106 /* confdefs.h.  */
20107 _ACEOF
20108 cat confdefs.h >>conftest.$ac_ext
20109 cat >>conftest.$ac_ext <<_ACEOF
20110 /* end confdefs.h.  */
20111
20112 #               include <pthread.h>
20113 #               ifdef PTHREAD_CREATE_UNDETACHED
20114                 draft7
20115 #               endif
20116
20117 _ACEOF
20118 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20119   $EGREP "draft7" >/dev/null 2>&1; then
20120   ol_cv_pthread_version=7
20121 else
20122
20123         cat >conftest.$ac_ext <<_ACEOF
20124 /* confdefs.h.  */
20125 _ACEOF
20126 cat confdefs.h >>conftest.$ac_ext
20127 cat >>conftest.$ac_ext <<_ACEOF
20128 /* end confdefs.h.  */
20129 #include <pthread.h>
20130
20131 _ACEOF
20132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20133   $EGREP "pthread_attr_init" >/dev/null 2>&1; then
20134   ol_cv_pthread_version=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 #ifdef          PTHREAD_MUTEX_INITIALIZER
20146                 draft5
20147 #endif
20148
20149 _ACEOF
20150 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20151   $EGREP "draft5" >/dev/null 2>&1; then
20152   ol_cv_pthread_version=5
20153 else
20154   ol_cv_pthread_version=4
20155 fi
20156 rm -f conftest*
20157
20158 fi
20159 rm -f conftest*
20160
20161 fi
20162 rm -f conftest*
20163
20164 fi
20165 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20166
20167 fi
20168 echo "$as_me:$LINENO: result: $ol_cv_pthread_version" >&5
20169 echo "${ECHO_T}$ol_cv_pthread_version" >&6
20170
20171
20172                 if test $ol_cv_pthread_version != 0 ; then
20173
20174 cat >>confdefs.h <<_ACEOF
20175 #define HAVE_PTHREADS $ol_cv_pthread_version
20176 _ACEOF
20177
20178                 else
20179                         { { echo "$as_me:$LINENO: error: unknown pthread version" >&5
20180 echo "$as_me: error: unknown pthread version" >&2;}
20181    { (exit 1); exit 1; }; }
20182                 fi
20183
20184                 # consider threads found
20185                 ol_with_threads=found
20186
20187
20188         echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5
20189 echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6
20190 if test "${ol_cv_header_linux_threads+set}" = set; then
20191   echo $ECHO_N "(cached) $ECHO_C" >&6
20192 else
20193   cat >conftest.$ac_ext <<_ACEOF
20194 /* confdefs.h.  */
20195 _ACEOF
20196 cat confdefs.h >>conftest.$ac_ext
20197 cat >>conftest.$ac_ext <<_ACEOF
20198 /* end confdefs.h.  */
20199 #include <pthread.h>
20200 _ACEOF
20201 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20202   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then
20203   ol_cv_header_linux_threads=yes
20204 else
20205   ol_cv_header_linux_threads=no
20206 fi
20207 rm -f conftest*
20208
20209
20210 fi
20211 echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5
20212 echo "${ECHO_T}$ol_cv_header_linux_threads" >&6
20213         if test $ol_cv_header_linux_threads = yes; then
20214
20215 cat >>confdefs.h <<\_ACEOF
20216 #define HAVE_LINUX_THREADS 1
20217 _ACEOF
20218
20219         fi
20220
20221
20222         echo "$as_me:$LINENO: checking for GNU Pth pthread.h" >&5
20223 echo $ECHO_N "checking for GNU Pth pthread.h... $ECHO_C" >&6
20224 if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then
20225   echo $ECHO_N "(cached) $ECHO_C" >&6
20226 else
20227   cat >conftest.$ac_ext <<_ACEOF
20228 /* confdefs.h.  */
20229 _ACEOF
20230 cat confdefs.h >>conftest.$ac_ext
20231 cat >>conftest.$ac_ext <<_ACEOF
20232 /* end confdefs.h.  */
20233 #include <pthread.h>
20234 #ifdef _POSIX_THREAD_IS_GNU_PTH
20235         __gnu_pth__;
20236 #endif
20237
20238 _ACEOF
20239 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20240   $EGREP "__gnu_pth__" >/dev/null 2>&1; then
20241   ol_cv_header_gnu_pth_pthread_h=yes
20242 else
20243   ol_cv_header_gnu_pth_pthread_h=no
20244 fi
20245 rm -f conftest*
20246
20247
20248 fi
20249 echo "$as_me:$LINENO: result: $ol_cv_header_gnu_pth_pthread_h" >&5
20250 echo "${ECHO_T}$ol_cv_header_gnu_pth_pthread_h" >&6
20251
20252
20253                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
20254
20255 for ac_header in sched.h
20256 do
20257 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20258 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20259   echo "$as_me:$LINENO: checking for $ac_header" >&5
20260 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20261 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20262   echo $ECHO_N "(cached) $ECHO_C" >&6
20263 fi
20264 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20265 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20266 else
20267   # Is the header compilable?
20268 echo "$as_me:$LINENO: checking $ac_header usability" >&5
20269 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20270 cat >conftest.$ac_ext <<_ACEOF
20271 /* confdefs.h.  */
20272 _ACEOF
20273 cat confdefs.h >>conftest.$ac_ext
20274 cat >>conftest.$ac_ext <<_ACEOF
20275 /* end confdefs.h.  */
20276 $ac_includes_default
20277 #include <$ac_header>
20278 _ACEOF
20279 rm -f conftest.$ac_objext
20280 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20281   (eval $ac_compile) 2>conftest.er1
20282   ac_status=$?
20283   grep -v '^ *+' conftest.er1 >conftest.err
20284   rm -f conftest.er1
20285   cat conftest.err >&5
20286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20287   (exit $ac_status); } &&
20288          { ac_try='test -z "$ac_c_werror_flag"
20289                          || test ! -s conftest.err'
20290   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20291   (eval $ac_try) 2>&5
20292   ac_status=$?
20293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20294   (exit $ac_status); }; } &&
20295          { ac_try='test -s conftest.$ac_objext'
20296   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20297   (eval $ac_try) 2>&5
20298   ac_status=$?
20299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20300   (exit $ac_status); }; }; then
20301   ac_header_compiler=yes
20302 else
20303   echo "$as_me: failed program was:" >&5
20304 sed 's/^/| /' conftest.$ac_ext >&5
20305
20306 ac_header_compiler=no
20307 fi
20308 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20309 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20310 echo "${ECHO_T}$ac_header_compiler" >&6
20311
20312 # Is the header present?
20313 echo "$as_me:$LINENO: checking $ac_header presence" >&5
20314 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20315 cat >conftest.$ac_ext <<_ACEOF
20316 /* confdefs.h.  */
20317 _ACEOF
20318 cat confdefs.h >>conftest.$ac_ext
20319 cat >>conftest.$ac_ext <<_ACEOF
20320 /* end confdefs.h.  */
20321 #include <$ac_header>
20322 _ACEOF
20323 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20324   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20325   ac_status=$?
20326   grep -v '^ *+' conftest.er1 >conftest.err
20327   rm -f conftest.er1
20328   cat conftest.err >&5
20329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20330   (exit $ac_status); } >/dev/null; then
20331   if test -s conftest.err; then
20332     ac_cpp_err=$ac_c_preproc_warn_flag
20333     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20334   else
20335     ac_cpp_err=
20336   fi
20337 else
20338   ac_cpp_err=yes
20339 fi
20340 if test -z "$ac_cpp_err"; then
20341   ac_header_preproc=yes
20342 else
20343   echo "$as_me: failed program was:" >&5
20344 sed 's/^/| /' conftest.$ac_ext >&5
20345
20346   ac_header_preproc=no
20347 fi
20348 rm -f conftest.err conftest.$ac_ext
20349 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20350 echo "${ECHO_T}$ac_header_preproc" >&6
20351
20352 # So?  What about this header?
20353 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20354   yes:no: )
20355     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20356 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
20357     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20358 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20359     ac_header_preproc=yes
20360     ;;
20361   no:yes:* )
20362     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20363 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
20364     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
20365 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
20366     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20367 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20368     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
20369 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
20370     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20371 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
20372     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20373 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
20374     (
20375       cat <<\_ASBOX
20376 ## --------------------------------------------- ##
20377 ## Report this to <http://www.openldap.org/its/> ##
20378 ## --------------------------------------------- ##
20379 _ASBOX
20380     ) |
20381       sed "s/^/$as_me: WARNING:     /" >&2
20382     ;;
20383 esac
20384 echo "$as_me:$LINENO: checking for $ac_header" >&5
20385 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20386 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20387   echo $ECHO_N "(cached) $ECHO_C" >&6
20388 else
20389   eval "$as_ac_Header=\$ac_header_preproc"
20390 fi
20391 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20392 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20393
20394 fi
20395 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20396   cat >>confdefs.h <<_ACEOF
20397 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20398 _ACEOF
20399
20400 fi
20401
20402 done
20403
20404                 fi
20405
20406
20407                                 echo "$as_me:$LINENO: checking for pthread_create in default libraries" >&5
20408 echo $ECHO_N "checking for pthread_create in default libraries... $ECHO_C" >&6
20409 if test "${ol_cv_pthread_create+set}" = set; then
20410   echo $ECHO_N "(cached) $ECHO_C" >&6
20411 else
20412
20413                         if test "$cross_compiling" = yes; then
20414   cat >conftest.$ac_ext <<_ACEOF
20415 /* confdefs.h.  */
20416 _ACEOF
20417 cat confdefs.h >>conftest.$ac_ext
20418 cat >>conftest.$ac_ext <<_ACEOF
20419 /* end confdefs.h.  */
20420
20421 /* pthread test headers */
20422 #include <pthread.h>
20423 #if HAVE_PTHREADS < 7
20424 #include <errno.h>
20425 #endif
20426 #ifndef NULL
20427 #define NULL (void*)0
20428 #endif
20429
20430 static void *task(p)
20431         void *p;
20432 {
20433         return (void *) (p == NULL);
20434 }
20435
20436 int
20437 main ()
20438 {
20439
20440         /* pthread test function */
20441 #ifndef PTHREAD_CREATE_DETACHED
20442 #define PTHREAD_CREATE_DETACHED 1
20443 #endif
20444         pthread_t t;
20445         int status;
20446         int detach = PTHREAD_CREATE_DETACHED;
20447
20448 #if HAVE_PTHREADS > 4
20449         /* Final pthreads */
20450         pthread_attr_t attr;
20451
20452         status = pthread_attr_init(&attr);
20453         if( status ) return status;
20454
20455 #if HAVE_PTHREADS < 7
20456         status = pthread_attr_setdetachstate(&attr, &detach);
20457         if( status < 0 ) status = errno;
20458 #else
20459         status = pthread_attr_setdetachstate(&attr, detach);
20460 #endif
20461         if( status ) return status;
20462         status = pthread_create( &t, &attr, task, NULL );
20463 #if HAVE_PTHREADS < 7
20464         if( status < 0 ) status = errno;
20465 #endif
20466         if( status ) return status;
20467 #else
20468         /* Draft 4 pthreads */
20469         status = pthread_create( &t, pthread_attr_default, task, NULL );
20470         if( status ) return errno;
20471
20472         /* give thread a chance to complete */
20473         /* it should remain joinable and hence detachable */
20474         sleep( 1 );
20475
20476         status = pthread_detach( &t );
20477         if( status ) return errno;
20478 #endif
20479
20480 #ifdef HAVE_LINUX_THREADS
20481         pthread_kill_other_threads_np();
20482 #endif
20483
20484         return 0;
20485
20486   ;
20487   return 0;
20488 }
20489 _ACEOF
20490 rm -f conftest.$ac_objext conftest$ac_exeext
20491 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20492   (eval $ac_link) 2>conftest.er1
20493   ac_status=$?
20494   grep -v '^ *+' conftest.er1 >conftest.err
20495   rm -f conftest.er1
20496   cat conftest.err >&5
20497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20498   (exit $ac_status); } &&
20499          { ac_try='test -z "$ac_c_werror_flag"
20500                          || test ! -s conftest.err'
20501   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20502   (eval $ac_try) 2>&5
20503   ac_status=$?
20504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20505   (exit $ac_status); }; } &&
20506          { ac_try='test -s conftest$ac_exeext'
20507   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20508   (eval $ac_try) 2>&5
20509   ac_status=$?
20510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20511   (exit $ac_status); }; }; then
20512   ol_cv_pthread_create=yes
20513 else
20514   echo "$as_me: failed program was:" >&5
20515 sed 's/^/| /' conftest.$ac_ext >&5
20516
20517 ol_cv_pthread_create=no
20518 fi
20519 rm -f conftest.err conftest.$ac_objext \
20520       conftest$ac_exeext conftest.$ac_ext
20521 else
20522   cat >conftest.$ac_ext <<_ACEOF
20523 /* confdefs.h.  */
20524 _ACEOF
20525 cat confdefs.h >>conftest.$ac_ext
20526 cat >>conftest.$ac_ext <<_ACEOF
20527 /* end confdefs.h.  */
20528
20529 /* pthread test headers */
20530 #include <pthread.h>
20531 #if HAVE_PTHREADS < 7
20532 #include <errno.h>
20533 #endif
20534 #ifndef NULL
20535 #define NULL (void*)0
20536 #endif
20537
20538 static void *task(p)
20539         void *p;
20540 {
20541         return (void *) (p == NULL);
20542 }
20543
20544
20545 int main(argc, argv)
20546         int argc;
20547         char **argv;
20548 {
20549
20550         /* pthread test function */
20551 #ifndef PTHREAD_CREATE_DETACHED
20552 #define PTHREAD_CREATE_DETACHED 1
20553 #endif
20554         pthread_t t;
20555         int status;
20556         int detach = PTHREAD_CREATE_DETACHED;
20557
20558 #if HAVE_PTHREADS > 4
20559         /* Final pthreads */
20560         pthread_attr_t attr;
20561
20562         status = pthread_attr_init(&attr);
20563         if( status ) return status;
20564
20565 #if HAVE_PTHREADS < 7
20566         status = pthread_attr_setdetachstate(&attr, &detach);
20567         if( status < 0 ) status = errno;
20568 #else
20569         status = pthread_attr_setdetachstate(&attr, detach);
20570 #endif
20571         if( status ) return status;
20572         status = pthread_create( &t, &attr, task, NULL );
20573 #if HAVE_PTHREADS < 7
20574         if( status < 0 ) status = errno;
20575 #endif
20576         if( status ) return status;
20577 #else
20578         /* Draft 4 pthreads */
20579         status = pthread_create( &t, pthread_attr_default, task, NULL );
20580         if( status ) return errno;
20581
20582         /* give thread a chance to complete */
20583         /* it should remain joinable and hence detachable */
20584         sleep( 1 );
20585
20586         status = pthread_detach( &t );
20587         if( status ) return errno;
20588 #endif
20589
20590 #ifdef HAVE_LINUX_THREADS
20591         pthread_kill_other_threads_np();
20592 #endif
20593
20594         return 0;
20595
20596 }
20597
20598 _ACEOF
20599 rm -f conftest$ac_exeext
20600 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20601   (eval $ac_link) 2>&5
20602   ac_status=$?
20603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20604   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20605   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20606   (eval $ac_try) 2>&5
20607   ac_status=$?
20608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20609   (exit $ac_status); }; }; then
20610   ol_cv_pthread_create=yes
20611 else
20612   echo "$as_me: program exited with status $ac_status" >&5
20613 echo "$as_me: failed program was:" >&5
20614 sed 's/^/| /' conftest.$ac_ext >&5
20615
20616 ( exit $ac_status )
20617 ol_cv_pthread_create=no
20618 fi
20619 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20620 fi
20621 fi
20622 echo "$as_me:$LINENO: result: $ol_cv_pthread_create" >&5
20623 echo "${ECHO_T}$ol_cv_pthread_create" >&6
20624
20625                 if test $ol_cv_pthread_create != no ; then
20626                         ol_link_threads=posix
20627                         ol_link_pthreads=""
20628                 fi
20629
20630                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
20631 if test "$ol_link_threads" = no ; then
20632         # try -kthread
20633         echo "$as_me:$LINENO: checking for pthread link with -kthread" >&5
20634 echo $ECHO_N "checking for pthread link with -kthread... $ECHO_C" >&6
20635 if test "${ol_cv_pthread_kthread+set}" = set; then
20636   echo $ECHO_N "(cached) $ECHO_C" >&6
20637 else
20638
20639                 # save the flags
20640                 ol_LIBS="$LIBS"
20641                 LIBS="-kthread $LIBS"
20642
20643                 if test "$cross_compiling" = yes; then
20644   cat >conftest.$ac_ext <<_ACEOF
20645 /* confdefs.h.  */
20646 _ACEOF
20647 cat confdefs.h >>conftest.$ac_ext
20648 cat >>conftest.$ac_ext <<_ACEOF
20649 /* end confdefs.h.  */
20650
20651 /* pthread test headers */
20652 #include <pthread.h>
20653 #if HAVE_PTHREADS < 7
20654 #include <errno.h>
20655 #endif
20656 #ifndef NULL
20657 #define NULL (void*)0
20658 #endif
20659
20660 static void *task(p)
20661         void *p;
20662 {
20663         return (void *) (p == NULL);
20664 }
20665
20666 int
20667 main ()
20668 {
20669
20670         /* pthread test function */
20671 #ifndef PTHREAD_CREATE_DETACHED
20672 #define PTHREAD_CREATE_DETACHED 1
20673 #endif
20674         pthread_t t;
20675         int status;
20676         int detach = PTHREAD_CREATE_DETACHED;
20677
20678 #if HAVE_PTHREADS > 4
20679         /* Final pthreads */
20680         pthread_attr_t attr;
20681
20682         status = pthread_attr_init(&attr);
20683         if( status ) return status;
20684
20685 #if HAVE_PTHREADS < 7
20686         status = pthread_attr_setdetachstate(&attr, &detach);
20687         if( status < 0 ) status = errno;
20688 #else
20689         status = pthread_attr_setdetachstate(&attr, detach);
20690 #endif
20691         if( status ) return status;
20692         status = pthread_create( &t, &attr, task, NULL );
20693 #if HAVE_PTHREADS < 7
20694         if( status < 0 ) status = errno;
20695 #endif
20696         if( status ) return status;
20697 #else
20698         /* Draft 4 pthreads */
20699         status = pthread_create( &t, pthread_attr_default, task, NULL );
20700         if( status ) return errno;
20701
20702         /* give thread a chance to complete */
20703         /* it should remain joinable and hence detachable */
20704         sleep( 1 );
20705
20706         status = pthread_detach( &t );
20707         if( status ) return errno;
20708 #endif
20709
20710 #ifdef HAVE_LINUX_THREADS
20711         pthread_kill_other_threads_np();
20712 #endif
20713
20714         return 0;
20715
20716   ;
20717   return 0;
20718 }
20719 _ACEOF
20720 rm -f conftest.$ac_objext conftest$ac_exeext
20721 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20722   (eval $ac_link) 2>conftest.er1
20723   ac_status=$?
20724   grep -v '^ *+' conftest.er1 >conftest.err
20725   rm -f conftest.er1
20726   cat conftest.err >&5
20727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20728   (exit $ac_status); } &&
20729          { ac_try='test -z "$ac_c_werror_flag"
20730                          || test ! -s conftest.err'
20731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20732   (eval $ac_try) 2>&5
20733   ac_status=$?
20734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20735   (exit $ac_status); }; } &&
20736          { ac_try='test -s conftest$ac_exeext'
20737   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20738   (eval $ac_try) 2>&5
20739   ac_status=$?
20740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20741   (exit $ac_status); }; }; then
20742   ol_cv_pthread_kthread=yes
20743 else
20744   echo "$as_me: failed program was:" >&5
20745 sed 's/^/| /' conftest.$ac_ext >&5
20746
20747 ol_cv_pthread_kthread=no
20748 fi
20749 rm -f conftest.err conftest.$ac_objext \
20750       conftest$ac_exeext conftest.$ac_ext
20751 else
20752   cat >conftest.$ac_ext <<_ACEOF
20753 /* confdefs.h.  */
20754 _ACEOF
20755 cat confdefs.h >>conftest.$ac_ext
20756 cat >>conftest.$ac_ext <<_ACEOF
20757 /* end confdefs.h.  */
20758
20759 /* pthread test headers */
20760 #include <pthread.h>
20761 #if HAVE_PTHREADS < 7
20762 #include <errno.h>
20763 #endif
20764 #ifndef NULL
20765 #define NULL (void*)0
20766 #endif
20767
20768 static void *task(p)
20769         void *p;
20770 {
20771         return (void *) (p == NULL);
20772 }
20773
20774
20775 int main(argc, argv)
20776         int argc;
20777         char **argv;
20778 {
20779
20780         /* pthread test function */
20781 #ifndef PTHREAD_CREATE_DETACHED
20782 #define PTHREAD_CREATE_DETACHED 1
20783 #endif
20784         pthread_t t;
20785         int status;
20786         int detach = PTHREAD_CREATE_DETACHED;
20787
20788 #if HAVE_PTHREADS > 4
20789         /* Final pthreads */
20790         pthread_attr_t attr;
20791
20792         status = pthread_attr_init(&attr);
20793         if( status ) return status;
20794
20795 #if HAVE_PTHREADS < 7
20796         status = pthread_attr_setdetachstate(&attr, &detach);
20797         if( status < 0 ) status = errno;
20798 #else
20799         status = pthread_attr_setdetachstate(&attr, detach);
20800 #endif
20801         if( status ) return status;
20802         status = pthread_create( &t, &attr, task, NULL );
20803 #if HAVE_PTHREADS < 7
20804         if( status < 0 ) status = errno;
20805 #endif
20806         if( status ) return status;
20807 #else
20808         /* Draft 4 pthreads */
20809         status = pthread_create( &t, pthread_attr_default, task, NULL );
20810         if( status ) return errno;
20811
20812         /* give thread a chance to complete */
20813         /* it should remain joinable and hence detachable */
20814         sleep( 1 );
20815
20816         status = pthread_detach( &t );
20817         if( status ) return errno;
20818 #endif
20819
20820 #ifdef HAVE_LINUX_THREADS
20821         pthread_kill_other_threads_np();
20822 #endif
20823
20824         return 0;
20825
20826 }
20827
20828 _ACEOF
20829 rm -f conftest$ac_exeext
20830 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20831   (eval $ac_link) 2>&5
20832   ac_status=$?
20833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20834   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20835   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20836   (eval $ac_try) 2>&5
20837   ac_status=$?
20838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20839   (exit $ac_status); }; }; then
20840   ol_cv_pthread_kthread=yes
20841 else
20842   echo "$as_me: program exited with status $ac_status" >&5
20843 echo "$as_me: failed program was:" >&5
20844 sed 's/^/| /' conftest.$ac_ext >&5
20845
20846 ( exit $ac_status )
20847 ol_cv_pthread_kthread=no
20848 fi
20849 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20850 fi
20851
20852                 # restore the LIBS
20853                 LIBS="$ol_LIBS"
20854
20855 fi
20856 echo "$as_me:$LINENO: result: $ol_cv_pthread_kthread" >&5
20857 echo "${ECHO_T}$ol_cv_pthread_kthread" >&6
20858
20859         if test $ol_cv_pthread_kthread = yes ; then
20860                 ol_link_pthreads="-kthread"
20861                 ol_link_threads=posix
20862         fi
20863 fi
20864
20865                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
20866 if test "$ol_link_threads" = no ; then
20867         # try -pthread
20868         echo "$as_me:$LINENO: checking for pthread link with -pthread" >&5
20869 echo $ECHO_N "checking for pthread link with -pthread... $ECHO_C" >&6
20870 if test "${ol_cv_pthread_pthread+set}" = set; then
20871   echo $ECHO_N "(cached) $ECHO_C" >&6
20872 else
20873
20874                 # save the flags
20875                 ol_LIBS="$LIBS"
20876                 LIBS="-pthread $LIBS"
20877
20878                 if test "$cross_compiling" = yes; then
20879   cat >conftest.$ac_ext <<_ACEOF
20880 /* confdefs.h.  */
20881 _ACEOF
20882 cat confdefs.h >>conftest.$ac_ext
20883 cat >>conftest.$ac_ext <<_ACEOF
20884 /* end confdefs.h.  */
20885
20886 /* pthread test headers */
20887 #include <pthread.h>
20888 #if HAVE_PTHREADS < 7
20889 #include <errno.h>
20890 #endif
20891 #ifndef NULL
20892 #define NULL (void*)0
20893 #endif
20894
20895 static void *task(p)
20896         void *p;
20897 {
20898         return (void *) (p == NULL);
20899 }
20900
20901 int
20902 main ()
20903 {
20904
20905         /* pthread test function */
20906 #ifndef PTHREAD_CREATE_DETACHED
20907 #define PTHREAD_CREATE_DETACHED 1
20908 #endif
20909         pthread_t t;
20910         int status;
20911         int detach = PTHREAD_CREATE_DETACHED;
20912
20913 #if HAVE_PTHREADS > 4
20914         /* Final pthreads */
20915         pthread_attr_t attr;
20916
20917         status = pthread_attr_init(&attr);
20918         if( status ) return status;
20919
20920 #if HAVE_PTHREADS < 7
20921         status = pthread_attr_setdetachstate(&attr, &detach);
20922         if( status < 0 ) status = errno;
20923 #else
20924         status = pthread_attr_setdetachstate(&attr, detach);
20925 #endif
20926         if( status ) return status;
20927         status = pthread_create( &t, &attr, task, NULL );
20928 #if HAVE_PTHREADS < 7
20929         if( status < 0 ) status = errno;
20930 #endif
20931         if( status ) return status;
20932 #else
20933         /* Draft 4 pthreads */
20934         status = pthread_create( &t, pthread_attr_default, task, NULL );
20935         if( status ) return errno;
20936
20937         /* give thread a chance to complete */
20938         /* it should remain joinable and hence detachable */
20939         sleep( 1 );
20940
20941         status = pthread_detach( &t );
20942         if( status ) return errno;
20943 #endif
20944
20945 #ifdef HAVE_LINUX_THREADS
20946         pthread_kill_other_threads_np();
20947 #endif
20948
20949         return 0;
20950
20951   ;
20952   return 0;
20953 }
20954 _ACEOF
20955 rm -f conftest.$ac_objext conftest$ac_exeext
20956 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20957   (eval $ac_link) 2>conftest.er1
20958   ac_status=$?
20959   grep -v '^ *+' conftest.er1 >conftest.err
20960   rm -f conftest.er1
20961   cat conftest.err >&5
20962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20963   (exit $ac_status); } &&
20964          { ac_try='test -z "$ac_c_werror_flag"
20965                          || test ! -s conftest.err'
20966   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20967   (eval $ac_try) 2>&5
20968   ac_status=$?
20969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20970   (exit $ac_status); }; } &&
20971          { ac_try='test -s conftest$ac_exeext'
20972   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20973   (eval $ac_try) 2>&5
20974   ac_status=$?
20975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20976   (exit $ac_status); }; }; then
20977   ol_cv_pthread_pthread=yes
20978 else
20979   echo "$as_me: failed program was:" >&5
20980 sed 's/^/| /' conftest.$ac_ext >&5
20981
20982 ol_cv_pthread_pthread=no
20983 fi
20984 rm -f conftest.err conftest.$ac_objext \
20985       conftest$ac_exeext conftest.$ac_ext
20986 else
20987   cat >conftest.$ac_ext <<_ACEOF
20988 /* confdefs.h.  */
20989 _ACEOF
20990 cat confdefs.h >>conftest.$ac_ext
20991 cat >>conftest.$ac_ext <<_ACEOF
20992 /* end confdefs.h.  */
20993
20994 /* pthread test headers */
20995 #include <pthread.h>
20996 #if HAVE_PTHREADS < 7
20997 #include <errno.h>
20998 #endif
20999 #ifndef NULL
21000 #define NULL (void*)0
21001 #endif
21002
21003 static void *task(p)
21004         void *p;
21005 {
21006         return (void *) (p == NULL);
21007 }
21008
21009
21010 int main(argc, argv)
21011         int argc;
21012         char **argv;
21013 {
21014
21015         /* pthread test function */
21016 #ifndef PTHREAD_CREATE_DETACHED
21017 #define PTHREAD_CREATE_DETACHED 1
21018 #endif
21019         pthread_t t;
21020         int status;
21021         int detach = PTHREAD_CREATE_DETACHED;
21022
21023 #if HAVE_PTHREADS > 4
21024         /* Final pthreads */
21025         pthread_attr_t attr;
21026
21027         status = pthread_attr_init(&attr);
21028         if( status ) return status;
21029
21030 #if HAVE_PTHREADS < 7
21031         status = pthread_attr_setdetachstate(&attr, &detach);
21032         if( status < 0 ) status = errno;
21033 #else
21034         status = pthread_attr_setdetachstate(&attr, detach);
21035 #endif
21036         if( status ) return status;
21037         status = pthread_create( &t, &attr, task, NULL );
21038 #if HAVE_PTHREADS < 7
21039         if( status < 0 ) status = errno;
21040 #endif
21041         if( status ) return status;
21042 #else
21043         /* Draft 4 pthreads */
21044         status = pthread_create( &t, pthread_attr_default, task, NULL );
21045         if( status ) return errno;
21046
21047         /* give thread a chance to complete */
21048         /* it should remain joinable and hence detachable */
21049         sleep( 1 );
21050
21051         status = pthread_detach( &t );
21052         if( status ) return errno;
21053 #endif
21054
21055 #ifdef HAVE_LINUX_THREADS
21056         pthread_kill_other_threads_np();
21057 #endif
21058
21059         return 0;
21060
21061 }
21062
21063 _ACEOF
21064 rm -f conftest$ac_exeext
21065 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21066   (eval $ac_link) 2>&5
21067   ac_status=$?
21068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21069   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21070   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21071   (eval $ac_try) 2>&5
21072   ac_status=$?
21073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21074   (exit $ac_status); }; }; then
21075   ol_cv_pthread_pthread=yes
21076 else
21077   echo "$as_me: program exited with status $ac_status" >&5
21078 echo "$as_me: failed program was:" >&5
21079 sed 's/^/| /' conftest.$ac_ext >&5
21080
21081 ( exit $ac_status )
21082 ol_cv_pthread_pthread=no
21083 fi
21084 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21085 fi
21086
21087                 # restore the LIBS
21088                 LIBS="$ol_LIBS"
21089
21090 fi
21091 echo "$as_me:$LINENO: result: $ol_cv_pthread_pthread" >&5
21092 echo "${ECHO_T}$ol_cv_pthread_pthread" >&6
21093
21094         if test $ol_cv_pthread_pthread = yes ; then
21095                 ol_link_pthreads="-pthread"
21096                 ol_link_threads=posix
21097         fi
21098 fi
21099
21100                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
21101 if test "$ol_link_threads" = no ; then
21102         # try -pthreads
21103         echo "$as_me:$LINENO: checking for pthread link with -pthreads" >&5
21104 echo $ECHO_N "checking for pthread link with -pthreads... $ECHO_C" >&6
21105 if test "${ol_cv_pthread_pthreads+set}" = set; then
21106   echo $ECHO_N "(cached) $ECHO_C" >&6
21107 else
21108
21109                 # save the flags
21110                 ol_LIBS="$LIBS"
21111                 LIBS="-pthreads $LIBS"
21112
21113                 if test "$cross_compiling" = yes; then
21114   cat >conftest.$ac_ext <<_ACEOF
21115 /* confdefs.h.  */
21116 _ACEOF
21117 cat confdefs.h >>conftest.$ac_ext
21118 cat >>conftest.$ac_ext <<_ACEOF
21119 /* end confdefs.h.  */
21120
21121 /* pthread test headers */
21122 #include <pthread.h>
21123 #if HAVE_PTHREADS < 7
21124 #include <errno.h>
21125 #endif
21126 #ifndef NULL
21127 #define NULL (void*)0
21128 #endif
21129
21130 static void *task(p)
21131         void *p;
21132 {
21133         return (void *) (p == NULL);
21134 }
21135
21136 int
21137 main ()
21138 {
21139
21140         /* pthread test function */
21141 #ifndef PTHREAD_CREATE_DETACHED
21142 #define PTHREAD_CREATE_DETACHED 1
21143 #endif
21144         pthread_t t;
21145         int status;
21146         int detach = PTHREAD_CREATE_DETACHED;
21147
21148 #if HAVE_PTHREADS > 4
21149         /* Final pthreads */
21150         pthread_attr_t attr;
21151
21152         status = pthread_attr_init(&attr);
21153         if( status ) return status;
21154
21155 #if HAVE_PTHREADS < 7
21156         status = pthread_attr_setdetachstate(&attr, &detach);
21157         if( status < 0 ) status = errno;
21158 #else
21159         status = pthread_attr_setdetachstate(&attr, detach);
21160 #endif
21161         if( status ) return status;
21162         status = pthread_create( &t, &attr, task, NULL );
21163 #if HAVE_PTHREADS < 7
21164         if( status < 0 ) status = errno;
21165 #endif
21166         if( status ) return status;
21167 #else
21168         /* Draft 4 pthreads */
21169         status = pthread_create( &t, pthread_attr_default, task, NULL );
21170         if( status ) return errno;
21171
21172         /* give thread a chance to complete */
21173         /* it should remain joinable and hence detachable */
21174         sleep( 1 );
21175
21176         status = pthread_detach( &t );
21177         if( status ) return errno;
21178 #endif
21179
21180 #ifdef HAVE_LINUX_THREADS
21181         pthread_kill_other_threads_np();
21182 #endif
21183
21184         return 0;
21185
21186   ;
21187   return 0;
21188 }
21189 _ACEOF
21190 rm -f conftest.$ac_objext conftest$ac_exeext
21191 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21192   (eval $ac_link) 2>conftest.er1
21193   ac_status=$?
21194   grep -v '^ *+' conftest.er1 >conftest.err
21195   rm -f conftest.er1
21196   cat conftest.err >&5
21197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21198   (exit $ac_status); } &&
21199          { ac_try='test -z "$ac_c_werror_flag"
21200                          || test ! -s conftest.err'
21201   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21202   (eval $ac_try) 2>&5
21203   ac_status=$?
21204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21205   (exit $ac_status); }; } &&
21206          { ac_try='test -s conftest$ac_exeext'
21207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21208   (eval $ac_try) 2>&5
21209   ac_status=$?
21210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21211   (exit $ac_status); }; }; then
21212   ol_cv_pthread_pthreads=yes
21213 else
21214   echo "$as_me: failed program was:" >&5
21215 sed 's/^/| /' conftest.$ac_ext >&5
21216
21217 ol_cv_pthread_pthreads=no
21218 fi
21219 rm -f conftest.err conftest.$ac_objext \
21220       conftest$ac_exeext conftest.$ac_ext
21221 else
21222   cat >conftest.$ac_ext <<_ACEOF
21223 /* confdefs.h.  */
21224 _ACEOF
21225 cat confdefs.h >>conftest.$ac_ext
21226 cat >>conftest.$ac_ext <<_ACEOF
21227 /* end confdefs.h.  */
21228
21229 /* pthread test headers */
21230 #include <pthread.h>
21231 #if HAVE_PTHREADS < 7
21232 #include <errno.h>
21233 #endif
21234 #ifndef NULL
21235 #define NULL (void*)0
21236 #endif
21237
21238 static void *task(p)
21239         void *p;
21240 {
21241         return (void *) (p == NULL);
21242 }
21243
21244
21245 int main(argc, argv)
21246         int argc;
21247         char **argv;
21248 {
21249
21250         /* pthread test function */
21251 #ifndef PTHREAD_CREATE_DETACHED
21252 #define PTHREAD_CREATE_DETACHED 1
21253 #endif
21254         pthread_t t;
21255         int status;
21256         int detach = PTHREAD_CREATE_DETACHED;
21257
21258 #if HAVE_PTHREADS > 4
21259         /* Final pthreads */
21260         pthread_attr_t attr;
21261
21262         status = pthread_attr_init(&attr);
21263         if( status ) return status;
21264
21265 #if HAVE_PTHREADS < 7
21266         status = pthread_attr_setdetachstate(&attr, &detach);
21267         if( status < 0 ) status = errno;
21268 #else
21269         status = pthread_attr_setdetachstate(&attr, detach);
21270 #endif
21271         if( status ) return status;
21272         status = pthread_create( &t, &attr, task, NULL );
21273 #if HAVE_PTHREADS < 7
21274         if( status < 0 ) status = errno;
21275 #endif
21276         if( status ) return status;
21277 #else
21278         /* Draft 4 pthreads */
21279         status = pthread_create( &t, pthread_attr_default, task, NULL );
21280         if( status ) return errno;
21281
21282         /* give thread a chance to complete */
21283         /* it should remain joinable and hence detachable */
21284         sleep( 1 );
21285
21286         status = pthread_detach( &t );
21287         if( status ) return errno;
21288 #endif
21289
21290 #ifdef HAVE_LINUX_THREADS
21291         pthread_kill_other_threads_np();
21292 #endif
21293
21294         return 0;
21295
21296 }
21297
21298 _ACEOF
21299 rm -f conftest$ac_exeext
21300 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21301   (eval $ac_link) 2>&5
21302   ac_status=$?
21303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21304   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21305   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21306   (eval $ac_try) 2>&5
21307   ac_status=$?
21308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21309   (exit $ac_status); }; }; then
21310   ol_cv_pthread_pthreads=yes
21311 else
21312   echo "$as_me: program exited with status $ac_status" >&5
21313 echo "$as_me: failed program was:" >&5
21314 sed 's/^/| /' conftest.$ac_ext >&5
21315
21316 ( exit $ac_status )
21317 ol_cv_pthread_pthreads=no
21318 fi
21319 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21320 fi
21321
21322                 # restore the LIBS
21323                 LIBS="$ol_LIBS"
21324
21325 fi
21326 echo "$as_me:$LINENO: result: $ol_cv_pthread_pthreads" >&5
21327 echo "${ECHO_T}$ol_cv_pthread_pthreads" >&6
21328
21329         if test $ol_cv_pthread_pthreads = yes ; then
21330                 ol_link_pthreads="-pthreads"
21331                 ol_link_threads=posix
21332         fi
21333 fi
21334
21335                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
21336 if test "$ol_link_threads" = no ; then
21337         # try -mthreads
21338         echo "$as_me:$LINENO: checking for pthread link with -mthreads" >&5
21339 echo $ECHO_N "checking for pthread link with -mthreads... $ECHO_C" >&6
21340 if test "${ol_cv_pthread_mthreads+set}" = set; then
21341   echo $ECHO_N "(cached) $ECHO_C" >&6
21342 else
21343
21344                 # save the flags
21345                 ol_LIBS="$LIBS"
21346                 LIBS="-mthreads $LIBS"
21347
21348                 if test "$cross_compiling" = yes; then
21349   cat >conftest.$ac_ext <<_ACEOF
21350 /* confdefs.h.  */
21351 _ACEOF
21352 cat confdefs.h >>conftest.$ac_ext
21353 cat >>conftest.$ac_ext <<_ACEOF
21354 /* end confdefs.h.  */
21355
21356 /* pthread test headers */
21357 #include <pthread.h>
21358 #if HAVE_PTHREADS < 7
21359 #include <errno.h>
21360 #endif
21361 #ifndef NULL
21362 #define NULL (void*)0
21363 #endif
21364
21365 static void *task(p)
21366         void *p;
21367 {
21368         return (void *) (p == NULL);
21369 }
21370
21371 int
21372 main ()
21373 {
21374
21375         /* pthread test function */
21376 #ifndef PTHREAD_CREATE_DETACHED
21377 #define PTHREAD_CREATE_DETACHED 1
21378 #endif
21379         pthread_t t;
21380         int status;
21381         int detach = PTHREAD_CREATE_DETACHED;
21382
21383 #if HAVE_PTHREADS > 4
21384         /* Final pthreads */
21385         pthread_attr_t attr;
21386
21387         status = pthread_attr_init(&attr);
21388         if( status ) return status;
21389
21390 #if HAVE_PTHREADS < 7
21391         status = pthread_attr_setdetachstate(&attr, &detach);
21392         if( status < 0 ) status = errno;
21393 #else
21394         status = pthread_attr_setdetachstate(&attr, detach);
21395 #endif
21396         if( status ) return status;
21397         status = pthread_create( &t, &attr, task, NULL );
21398 #if HAVE_PTHREADS < 7
21399         if( status < 0 ) status = errno;
21400 #endif
21401         if( status ) return status;
21402 #else
21403         /* Draft 4 pthreads */
21404         status = pthread_create( &t, pthread_attr_default, task, NULL );
21405         if( status ) return errno;
21406
21407         /* give thread a chance to complete */
21408         /* it should remain joinable and hence detachable */
21409         sleep( 1 );
21410
21411         status = pthread_detach( &t );
21412         if( status ) return errno;
21413 #endif
21414
21415 #ifdef HAVE_LINUX_THREADS
21416         pthread_kill_other_threads_np();
21417 #endif
21418
21419         return 0;
21420
21421   ;
21422   return 0;
21423 }
21424 _ACEOF
21425 rm -f conftest.$ac_objext conftest$ac_exeext
21426 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21427   (eval $ac_link) 2>conftest.er1
21428   ac_status=$?
21429   grep -v '^ *+' conftest.er1 >conftest.err
21430   rm -f conftest.er1
21431   cat conftest.err >&5
21432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21433   (exit $ac_status); } &&
21434          { ac_try='test -z "$ac_c_werror_flag"
21435                          || test ! -s conftest.err'
21436   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21437   (eval $ac_try) 2>&5
21438   ac_status=$?
21439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21440   (exit $ac_status); }; } &&
21441          { ac_try='test -s conftest$ac_exeext'
21442   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21443   (eval $ac_try) 2>&5
21444   ac_status=$?
21445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21446   (exit $ac_status); }; }; then
21447   ol_cv_pthread_mthreads=yes
21448 else
21449   echo "$as_me: failed program was:" >&5
21450 sed 's/^/| /' conftest.$ac_ext >&5
21451
21452 ol_cv_pthread_mthreads=no
21453 fi
21454 rm -f conftest.err conftest.$ac_objext \
21455       conftest$ac_exeext conftest.$ac_ext
21456 else
21457   cat >conftest.$ac_ext <<_ACEOF
21458 /* confdefs.h.  */
21459 _ACEOF
21460 cat confdefs.h >>conftest.$ac_ext
21461 cat >>conftest.$ac_ext <<_ACEOF
21462 /* end confdefs.h.  */
21463
21464 /* pthread test headers */
21465 #include <pthread.h>
21466 #if HAVE_PTHREADS < 7
21467 #include <errno.h>
21468 #endif
21469 #ifndef NULL
21470 #define NULL (void*)0
21471 #endif
21472
21473 static void *task(p)
21474         void *p;
21475 {
21476         return (void *) (p == NULL);
21477 }
21478
21479
21480 int main(argc, argv)
21481         int argc;
21482         char **argv;
21483 {
21484
21485         /* pthread test function */
21486 #ifndef PTHREAD_CREATE_DETACHED
21487 #define PTHREAD_CREATE_DETACHED 1
21488 #endif
21489         pthread_t t;
21490         int status;
21491         int detach = PTHREAD_CREATE_DETACHED;
21492
21493 #if HAVE_PTHREADS > 4
21494         /* Final pthreads */
21495         pthread_attr_t attr;
21496
21497         status = pthread_attr_init(&attr);
21498         if( status ) return status;
21499
21500 #if HAVE_PTHREADS < 7
21501         status = pthread_attr_setdetachstate(&attr, &detach);
21502         if( status < 0 ) status = errno;
21503 #else
21504         status = pthread_attr_setdetachstate(&attr, detach);
21505 #endif
21506         if( status ) return status;
21507         status = pthread_create( &t, &attr, task, NULL );
21508 #if HAVE_PTHREADS < 7
21509         if( status < 0 ) status = errno;
21510 #endif
21511         if( status ) return status;
21512 #else
21513         /* Draft 4 pthreads */
21514         status = pthread_create( &t, pthread_attr_default, task, NULL );
21515         if( status ) return errno;
21516
21517         /* give thread a chance to complete */
21518         /* it should remain joinable and hence detachable */
21519         sleep( 1 );
21520
21521         status = pthread_detach( &t );
21522         if( status ) return errno;
21523 #endif
21524
21525 #ifdef HAVE_LINUX_THREADS
21526         pthread_kill_other_threads_np();
21527 #endif
21528
21529         return 0;
21530
21531 }
21532
21533 _ACEOF
21534 rm -f conftest$ac_exeext
21535 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21536   (eval $ac_link) 2>&5
21537   ac_status=$?
21538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21539   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21540   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21541   (eval $ac_try) 2>&5
21542   ac_status=$?
21543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21544   (exit $ac_status); }; }; then
21545   ol_cv_pthread_mthreads=yes
21546 else
21547   echo "$as_me: program exited with status $ac_status" >&5
21548 echo "$as_me: failed program was:" >&5
21549 sed 's/^/| /' conftest.$ac_ext >&5
21550
21551 ( exit $ac_status )
21552 ol_cv_pthread_mthreads=no
21553 fi
21554 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21555 fi
21556
21557                 # restore the LIBS
21558                 LIBS="$ol_LIBS"
21559
21560 fi
21561 echo "$as_me:$LINENO: result: $ol_cv_pthread_mthreads" >&5
21562 echo "${ECHO_T}$ol_cv_pthread_mthreads" >&6
21563
21564         if test $ol_cv_pthread_mthreads = yes ; then
21565                 ol_link_pthreads="-mthreads"
21566                 ol_link_threads=posix
21567         fi
21568 fi
21569
21570                 # Pthread try link: -thread (ol_cv_pthread_thread)
21571 if test "$ol_link_threads" = no ; then
21572         # try -thread
21573         echo "$as_me:$LINENO: checking for pthread link with -thread" >&5
21574 echo $ECHO_N "checking for pthread link with -thread... $ECHO_C" >&6
21575 if test "${ol_cv_pthread_thread+set}" = set; then
21576   echo $ECHO_N "(cached) $ECHO_C" >&6
21577 else
21578
21579                 # save the flags
21580                 ol_LIBS="$LIBS"
21581                 LIBS="-thread $LIBS"
21582
21583                 if test "$cross_compiling" = yes; then
21584   cat >conftest.$ac_ext <<_ACEOF
21585 /* confdefs.h.  */
21586 _ACEOF
21587 cat confdefs.h >>conftest.$ac_ext
21588 cat >>conftest.$ac_ext <<_ACEOF
21589 /* end confdefs.h.  */
21590
21591 /* pthread test headers */
21592 #include <pthread.h>
21593 #if HAVE_PTHREADS < 7
21594 #include <errno.h>
21595 #endif
21596 #ifndef NULL
21597 #define NULL (void*)0
21598 #endif
21599
21600 static void *task(p)
21601         void *p;
21602 {
21603         return (void *) (p == NULL);
21604 }
21605
21606 int
21607 main ()
21608 {
21609
21610         /* pthread test function */
21611 #ifndef PTHREAD_CREATE_DETACHED
21612 #define PTHREAD_CREATE_DETACHED 1
21613 #endif
21614         pthread_t t;
21615         int status;
21616         int detach = PTHREAD_CREATE_DETACHED;
21617
21618 #if HAVE_PTHREADS > 4
21619         /* Final pthreads */
21620         pthread_attr_t attr;
21621
21622         status = pthread_attr_init(&attr);
21623         if( status ) return status;
21624
21625 #if HAVE_PTHREADS < 7
21626         status = pthread_attr_setdetachstate(&attr, &detach);
21627         if( status < 0 ) status = errno;
21628 #else
21629         status = pthread_attr_setdetachstate(&attr, detach);
21630 #endif
21631         if( status ) return status;
21632         status = pthread_create( &t, &attr, task, NULL );
21633 #if HAVE_PTHREADS < 7
21634         if( status < 0 ) status = errno;
21635 #endif
21636         if( status ) return status;
21637 #else
21638         /* Draft 4 pthreads */
21639         status = pthread_create( &t, pthread_attr_default, task, NULL );
21640         if( status ) return errno;
21641
21642         /* give thread a chance to complete */
21643         /* it should remain joinable and hence detachable */
21644         sleep( 1 );
21645
21646         status = pthread_detach( &t );
21647         if( status ) return errno;
21648 #endif
21649
21650 #ifdef HAVE_LINUX_THREADS
21651         pthread_kill_other_threads_np();
21652 #endif
21653
21654         return 0;
21655
21656   ;
21657   return 0;
21658 }
21659 _ACEOF
21660 rm -f conftest.$ac_objext conftest$ac_exeext
21661 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21662   (eval $ac_link) 2>conftest.er1
21663   ac_status=$?
21664   grep -v '^ *+' conftest.er1 >conftest.err
21665   rm -f conftest.er1
21666   cat conftest.err >&5
21667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21668   (exit $ac_status); } &&
21669          { ac_try='test -z "$ac_c_werror_flag"
21670                          || test ! -s conftest.err'
21671   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21672   (eval $ac_try) 2>&5
21673   ac_status=$?
21674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21675   (exit $ac_status); }; } &&
21676          { ac_try='test -s conftest$ac_exeext'
21677   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21678   (eval $ac_try) 2>&5
21679   ac_status=$?
21680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21681   (exit $ac_status); }; }; then
21682   ol_cv_pthread_thread=yes
21683 else
21684   echo "$as_me: failed program was:" >&5
21685 sed 's/^/| /' conftest.$ac_ext >&5
21686
21687 ol_cv_pthread_thread=no
21688 fi
21689 rm -f conftest.err conftest.$ac_objext \
21690       conftest$ac_exeext conftest.$ac_ext
21691 else
21692   cat >conftest.$ac_ext <<_ACEOF
21693 /* confdefs.h.  */
21694 _ACEOF
21695 cat confdefs.h >>conftest.$ac_ext
21696 cat >>conftest.$ac_ext <<_ACEOF
21697 /* end confdefs.h.  */
21698
21699 /* pthread test headers */
21700 #include <pthread.h>
21701 #if HAVE_PTHREADS < 7
21702 #include <errno.h>
21703 #endif
21704 #ifndef NULL
21705 #define NULL (void*)0
21706 #endif
21707
21708 static void *task(p)
21709         void *p;
21710 {
21711         return (void *) (p == NULL);
21712 }
21713
21714
21715 int main(argc, argv)
21716         int argc;
21717         char **argv;
21718 {
21719
21720         /* pthread test function */
21721 #ifndef PTHREAD_CREATE_DETACHED
21722 #define PTHREAD_CREATE_DETACHED 1
21723 #endif
21724         pthread_t t;
21725         int status;
21726         int detach = PTHREAD_CREATE_DETACHED;
21727
21728 #if HAVE_PTHREADS > 4
21729         /* Final pthreads */
21730         pthread_attr_t attr;
21731
21732         status = pthread_attr_init(&attr);
21733         if( status ) return status;
21734
21735 #if HAVE_PTHREADS < 7
21736         status = pthread_attr_setdetachstate(&attr, &detach);
21737         if( status < 0 ) status = errno;
21738 #else
21739         status = pthread_attr_setdetachstate(&attr, detach);
21740 #endif
21741         if( status ) return status;
21742         status = pthread_create( &t, &attr, task, NULL );
21743 #if HAVE_PTHREADS < 7
21744         if( status < 0 ) status = errno;
21745 #endif
21746         if( status ) return status;
21747 #else
21748         /* Draft 4 pthreads */
21749         status = pthread_create( &t, pthread_attr_default, task, NULL );
21750         if( status ) return errno;
21751
21752         /* give thread a chance to complete */
21753         /* it should remain joinable and hence detachable */
21754         sleep( 1 );
21755
21756         status = pthread_detach( &t );
21757         if( status ) return errno;
21758 #endif
21759
21760 #ifdef HAVE_LINUX_THREADS
21761         pthread_kill_other_threads_np();
21762 #endif
21763
21764         return 0;
21765
21766 }
21767
21768 _ACEOF
21769 rm -f conftest$ac_exeext
21770 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21771   (eval $ac_link) 2>&5
21772   ac_status=$?
21773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21774   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21776   (eval $ac_try) 2>&5
21777   ac_status=$?
21778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21779   (exit $ac_status); }; }; then
21780   ol_cv_pthread_thread=yes
21781 else
21782   echo "$as_me: program exited with status $ac_status" >&5
21783 echo "$as_me: failed program was:" >&5
21784 sed 's/^/| /' conftest.$ac_ext >&5
21785
21786 ( exit $ac_status )
21787 ol_cv_pthread_thread=no
21788 fi
21789 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21790 fi
21791
21792                 # restore the LIBS
21793                 LIBS="$ol_LIBS"
21794
21795 fi
21796 echo "$as_me:$LINENO: result: $ol_cv_pthread_thread" >&5
21797 echo "${ECHO_T}$ol_cv_pthread_thread" >&6
21798
21799         if test $ol_cv_pthread_thread = yes ; then
21800                 ol_link_pthreads="-thread"
21801                 ol_link_threads=posix
21802         fi
21803 fi
21804
21805
21806                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
21807 if test "$ol_link_threads" = no ; then
21808         # try -lpthread -lmach -lexc -lc_r
21809         echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
21810 echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc -lc_r... $ECHO_C" >&6
21811 if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then
21812   echo $ECHO_N "(cached) $ECHO_C" >&6
21813 else
21814
21815                 # save the flags
21816                 ol_LIBS="$LIBS"
21817                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
21818
21819                 if test "$cross_compiling" = yes; then
21820   cat >conftest.$ac_ext <<_ACEOF
21821 /* confdefs.h.  */
21822 _ACEOF
21823 cat confdefs.h >>conftest.$ac_ext
21824 cat >>conftest.$ac_ext <<_ACEOF
21825 /* end confdefs.h.  */
21826
21827 /* pthread test headers */
21828 #include <pthread.h>
21829 #if HAVE_PTHREADS < 7
21830 #include <errno.h>
21831 #endif
21832 #ifndef NULL
21833 #define NULL (void*)0
21834 #endif
21835
21836 static void *task(p)
21837         void *p;
21838 {
21839         return (void *) (p == NULL);
21840 }
21841
21842 int
21843 main ()
21844 {
21845
21846         /* pthread test function */
21847 #ifndef PTHREAD_CREATE_DETACHED
21848 #define PTHREAD_CREATE_DETACHED 1
21849 #endif
21850         pthread_t t;
21851         int status;
21852         int detach = PTHREAD_CREATE_DETACHED;
21853
21854 #if HAVE_PTHREADS > 4
21855         /* Final pthreads */
21856         pthread_attr_t attr;
21857
21858         status = pthread_attr_init(&attr);
21859         if( status ) return status;
21860
21861 #if HAVE_PTHREADS < 7
21862         status = pthread_attr_setdetachstate(&attr, &detach);
21863         if( status < 0 ) status = errno;
21864 #else
21865         status = pthread_attr_setdetachstate(&attr, detach);
21866 #endif
21867         if( status ) return status;
21868         status = pthread_create( &t, &attr, task, NULL );
21869 #if HAVE_PTHREADS < 7
21870         if( status < 0 ) status = errno;
21871 #endif
21872         if( status ) return status;
21873 #else
21874         /* Draft 4 pthreads */
21875         status = pthread_create( &t, pthread_attr_default, task, NULL );
21876         if( status ) return errno;
21877
21878         /* give thread a chance to complete */
21879         /* it should remain joinable and hence detachable */
21880         sleep( 1 );
21881
21882         status = pthread_detach( &t );
21883         if( status ) return errno;
21884 #endif
21885
21886 #ifdef HAVE_LINUX_THREADS
21887         pthread_kill_other_threads_np();
21888 #endif
21889
21890         return 0;
21891
21892   ;
21893   return 0;
21894 }
21895 _ACEOF
21896 rm -f conftest.$ac_objext conftest$ac_exeext
21897 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21898   (eval $ac_link) 2>conftest.er1
21899   ac_status=$?
21900   grep -v '^ *+' conftest.er1 >conftest.err
21901   rm -f conftest.er1
21902   cat conftest.err >&5
21903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21904   (exit $ac_status); } &&
21905          { ac_try='test -z "$ac_c_werror_flag"
21906                          || test ! -s conftest.err'
21907   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21908   (eval $ac_try) 2>&5
21909   ac_status=$?
21910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21911   (exit $ac_status); }; } &&
21912          { ac_try='test -s conftest$ac_exeext'
21913   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21914   (eval $ac_try) 2>&5
21915   ac_status=$?
21916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21917   (exit $ac_status); }; }; then
21918   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
21919 else
21920   echo "$as_me: failed program was:" >&5
21921 sed 's/^/| /' conftest.$ac_ext >&5
21922
21923 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
21924 fi
21925 rm -f conftest.err conftest.$ac_objext \
21926       conftest$ac_exeext conftest.$ac_ext
21927 else
21928   cat >conftest.$ac_ext <<_ACEOF
21929 /* confdefs.h.  */
21930 _ACEOF
21931 cat confdefs.h >>conftest.$ac_ext
21932 cat >>conftest.$ac_ext <<_ACEOF
21933 /* end confdefs.h.  */
21934
21935 /* pthread test headers */
21936 #include <pthread.h>
21937 #if HAVE_PTHREADS < 7
21938 #include <errno.h>
21939 #endif
21940 #ifndef NULL
21941 #define NULL (void*)0
21942 #endif
21943
21944 static void *task(p)
21945         void *p;
21946 {
21947         return (void *) (p == NULL);
21948 }
21949
21950
21951 int main(argc, argv)
21952         int argc;
21953         char **argv;
21954 {
21955
21956         /* pthread test function */
21957 #ifndef PTHREAD_CREATE_DETACHED
21958 #define PTHREAD_CREATE_DETACHED 1
21959 #endif
21960         pthread_t t;
21961         int status;
21962         int detach = PTHREAD_CREATE_DETACHED;
21963
21964 #if HAVE_PTHREADS > 4
21965         /* Final pthreads */
21966         pthread_attr_t attr;
21967
21968         status = pthread_attr_init(&attr);
21969         if( status ) return status;
21970
21971 #if HAVE_PTHREADS < 7
21972         status = pthread_attr_setdetachstate(&attr, &detach);
21973         if( status < 0 ) status = errno;
21974 #else
21975         status = pthread_attr_setdetachstate(&attr, detach);
21976 #endif
21977         if( status ) return status;
21978         status = pthread_create( &t, &attr, task, NULL );
21979 #if HAVE_PTHREADS < 7
21980         if( status < 0 ) status = errno;
21981 #endif
21982         if( status ) return status;
21983 #else
21984         /* Draft 4 pthreads */
21985         status = pthread_create( &t, pthread_attr_default, task, NULL );
21986         if( status ) return errno;
21987
21988         /* give thread a chance to complete */
21989         /* it should remain joinable and hence detachable */
21990         sleep( 1 );
21991
21992         status = pthread_detach( &t );
21993         if( status ) return errno;
21994 #endif
21995
21996 #ifdef HAVE_LINUX_THREADS
21997         pthread_kill_other_threads_np();
21998 #endif
21999
22000         return 0;
22001
22002 }
22003
22004 _ACEOF
22005 rm -f conftest$ac_exeext
22006 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22007   (eval $ac_link) 2>&5
22008   ac_status=$?
22009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22010   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22012   (eval $ac_try) 2>&5
22013   ac_status=$?
22014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22015   (exit $ac_status); }; }; then
22016   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
22017 else
22018   echo "$as_me: program exited with status $ac_status" >&5
22019 echo "$as_me: failed program was:" >&5
22020 sed 's/^/| /' conftest.$ac_ext >&5
22021
22022 ( exit $ac_status )
22023 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
22024 fi
22025 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22026 fi
22027
22028                 # restore the LIBS
22029                 LIBS="$ol_LIBS"
22030
22031 fi
22032 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
22033 echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6
22034
22035         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
22036                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
22037                 ol_link_threads=posix
22038         fi
22039 fi
22040
22041                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
22042 if test "$ol_link_threads" = no ; then
22043         # try -lpthread -lmach -lexc
22044         echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc" >&5
22045 echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc... $ECHO_C" >&6
22046 if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then
22047   echo $ECHO_N "(cached) $ECHO_C" >&6
22048 else
22049
22050                 # save the flags
22051                 ol_LIBS="$LIBS"
22052                 LIBS="-lpthread -lmach -lexc $LIBS"
22053
22054                 if test "$cross_compiling" = yes; then
22055   cat >conftest.$ac_ext <<_ACEOF
22056 /* confdefs.h.  */
22057 _ACEOF
22058 cat confdefs.h >>conftest.$ac_ext
22059 cat >>conftest.$ac_ext <<_ACEOF
22060 /* end confdefs.h.  */
22061
22062 /* pthread test headers */
22063 #include <pthread.h>
22064 #if HAVE_PTHREADS < 7
22065 #include <errno.h>
22066 #endif
22067 #ifndef NULL
22068 #define NULL (void*)0
22069 #endif
22070
22071 static void *task(p)
22072         void *p;
22073 {
22074         return (void *) (p == NULL);
22075 }
22076
22077 int
22078 main ()
22079 {
22080
22081         /* pthread test function */
22082 #ifndef PTHREAD_CREATE_DETACHED
22083 #define PTHREAD_CREATE_DETACHED 1
22084 #endif
22085         pthread_t t;
22086         int status;
22087         int detach = PTHREAD_CREATE_DETACHED;
22088
22089 #if HAVE_PTHREADS > 4
22090         /* Final pthreads */
22091         pthread_attr_t attr;
22092
22093         status = pthread_attr_init(&attr);
22094         if( status ) return status;
22095
22096 #if HAVE_PTHREADS < 7
22097         status = pthread_attr_setdetachstate(&attr, &detach);
22098         if( status < 0 ) status = errno;
22099 #else
22100         status = pthread_attr_setdetachstate(&attr, detach);
22101 #endif
22102         if( status ) return status;
22103         status = pthread_create( &t, &attr, task, NULL );
22104 #if HAVE_PTHREADS < 7
22105         if( status < 0 ) status = errno;
22106 #endif
22107         if( status ) return status;
22108 #else
22109         /* Draft 4 pthreads */
22110         status = pthread_create( &t, pthread_attr_default, task, NULL );
22111         if( status ) return errno;
22112
22113         /* give thread a chance to complete */
22114         /* it should remain joinable and hence detachable */
22115         sleep( 1 );
22116
22117         status = pthread_detach( &t );
22118         if( status ) return errno;
22119 #endif
22120
22121 #ifdef HAVE_LINUX_THREADS
22122         pthread_kill_other_threads_np();
22123 #endif
22124
22125         return 0;
22126
22127   ;
22128   return 0;
22129 }
22130 _ACEOF
22131 rm -f conftest.$ac_objext conftest$ac_exeext
22132 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22133   (eval $ac_link) 2>conftest.er1
22134   ac_status=$?
22135   grep -v '^ *+' conftest.er1 >conftest.err
22136   rm -f conftest.er1
22137   cat conftest.err >&5
22138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22139   (exit $ac_status); } &&
22140          { ac_try='test -z "$ac_c_werror_flag"
22141                          || test ! -s conftest.err'
22142   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22143   (eval $ac_try) 2>&5
22144   ac_status=$?
22145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22146   (exit $ac_status); }; } &&
22147          { ac_try='test -s conftest$ac_exeext'
22148   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22149   (eval $ac_try) 2>&5
22150   ac_status=$?
22151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22152   (exit $ac_status); }; }; then
22153   ol_cv_pthread_lpthread_lmach_lexc=yes
22154 else
22155   echo "$as_me: failed program was:" >&5
22156 sed 's/^/| /' conftest.$ac_ext >&5
22157
22158 ol_cv_pthread_lpthread_lmach_lexc=no
22159 fi
22160 rm -f conftest.err conftest.$ac_objext \
22161       conftest$ac_exeext conftest.$ac_ext
22162 else
22163   cat >conftest.$ac_ext <<_ACEOF
22164 /* confdefs.h.  */
22165 _ACEOF
22166 cat confdefs.h >>conftest.$ac_ext
22167 cat >>conftest.$ac_ext <<_ACEOF
22168 /* end confdefs.h.  */
22169
22170 /* pthread test headers */
22171 #include <pthread.h>
22172 #if HAVE_PTHREADS < 7
22173 #include <errno.h>
22174 #endif
22175 #ifndef NULL
22176 #define NULL (void*)0
22177 #endif
22178
22179 static void *task(p)
22180         void *p;
22181 {
22182         return (void *) (p == NULL);
22183 }
22184
22185
22186 int main(argc, argv)
22187         int argc;
22188         char **argv;
22189 {
22190
22191         /* pthread test function */
22192 #ifndef PTHREAD_CREATE_DETACHED
22193 #define PTHREAD_CREATE_DETACHED 1
22194 #endif
22195         pthread_t t;
22196         int status;
22197         int detach = PTHREAD_CREATE_DETACHED;
22198
22199 #if HAVE_PTHREADS > 4
22200         /* Final pthreads */
22201         pthread_attr_t attr;
22202
22203         status = pthread_attr_init(&attr);
22204         if( status ) return status;
22205
22206 #if HAVE_PTHREADS < 7
22207         status = pthread_attr_setdetachstate(&attr, &detach);
22208         if( status < 0 ) status = errno;
22209 #else
22210         status = pthread_attr_setdetachstate(&attr, detach);
22211 #endif
22212         if( status ) return status;
22213         status = pthread_create( &t, &attr, task, NULL );
22214 #if HAVE_PTHREADS < 7
22215         if( status < 0 ) status = errno;
22216 #endif
22217         if( status ) return status;
22218 #else
22219         /* Draft 4 pthreads */
22220         status = pthread_create( &t, pthread_attr_default, task, NULL );
22221         if( status ) return errno;
22222
22223         /* give thread a chance to complete */
22224         /* it should remain joinable and hence detachable */
22225         sleep( 1 );
22226
22227         status = pthread_detach( &t );
22228         if( status ) return errno;
22229 #endif
22230
22231 #ifdef HAVE_LINUX_THREADS
22232         pthread_kill_other_threads_np();
22233 #endif
22234
22235         return 0;
22236
22237 }
22238
22239 _ACEOF
22240 rm -f conftest$ac_exeext
22241 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22242   (eval $ac_link) 2>&5
22243   ac_status=$?
22244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22245   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22246   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22247   (eval $ac_try) 2>&5
22248   ac_status=$?
22249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22250   (exit $ac_status); }; }; then
22251   ol_cv_pthread_lpthread_lmach_lexc=yes
22252 else
22253   echo "$as_me: program exited with status $ac_status" >&5
22254 echo "$as_me: failed program was:" >&5
22255 sed 's/^/| /' conftest.$ac_ext >&5
22256
22257 ( exit $ac_status )
22258 ol_cv_pthread_lpthread_lmach_lexc=no
22259 fi
22260 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22261 fi
22262
22263                 # restore the LIBS
22264                 LIBS="$ol_LIBS"
22265
22266 fi
22267 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
22268 echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc" >&6
22269
22270         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
22271                 ol_link_pthreads="-lpthread -lmach -lexc"
22272                 ol_link_threads=posix
22273         fi
22274 fi
22275
22276
22277                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
22278 if test "$ol_link_threads" = no ; then
22279         # try -lpthread -Wl,-woff,85
22280         echo "$as_me:$LINENO: checking for pthread link with -lpthread -Wl,-woff,85" >&5
22281 echo $ECHO_N "checking for pthread link with -lpthread -Wl,-woff,85... $ECHO_C" >&6
22282 if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then
22283   echo $ECHO_N "(cached) $ECHO_C" >&6
22284 else
22285
22286                 # save the flags
22287                 ol_LIBS="$LIBS"
22288                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
22289
22290                 if test "$cross_compiling" = yes; then
22291   cat >conftest.$ac_ext <<_ACEOF
22292 /* confdefs.h.  */
22293 _ACEOF
22294 cat confdefs.h >>conftest.$ac_ext
22295 cat >>conftest.$ac_ext <<_ACEOF
22296 /* end confdefs.h.  */
22297
22298 /* pthread test headers */
22299 #include <pthread.h>
22300 #if HAVE_PTHREADS < 7
22301 #include <errno.h>
22302 #endif
22303 #ifndef NULL
22304 #define NULL (void*)0
22305 #endif
22306
22307 static void *task(p)
22308         void *p;
22309 {
22310         return (void *) (p == NULL);
22311 }
22312
22313 int
22314 main ()
22315 {
22316
22317         /* pthread test function */
22318 #ifndef PTHREAD_CREATE_DETACHED
22319 #define PTHREAD_CREATE_DETACHED 1
22320 #endif
22321         pthread_t t;
22322         int status;
22323         int detach = PTHREAD_CREATE_DETACHED;
22324
22325 #if HAVE_PTHREADS > 4
22326         /* Final pthreads */
22327         pthread_attr_t attr;
22328
22329         status = pthread_attr_init(&attr);
22330         if( status ) return status;
22331
22332 #if HAVE_PTHREADS < 7
22333         status = pthread_attr_setdetachstate(&attr, &detach);
22334         if( status < 0 ) status = errno;
22335 #else
22336         status = pthread_attr_setdetachstate(&attr, detach);
22337 #endif
22338         if( status ) return status;
22339         status = pthread_create( &t, &attr, task, NULL );
22340 #if HAVE_PTHREADS < 7
22341         if( status < 0 ) status = errno;
22342 #endif
22343         if( status ) return status;
22344 #else
22345         /* Draft 4 pthreads */
22346         status = pthread_create( &t, pthread_attr_default, task, NULL );
22347         if( status ) return errno;
22348
22349         /* give thread a chance to complete */
22350         /* it should remain joinable and hence detachable */
22351         sleep( 1 );
22352
22353         status = pthread_detach( &t );
22354         if( status ) return errno;
22355 #endif
22356
22357 #ifdef HAVE_LINUX_THREADS
22358         pthread_kill_other_threads_np();
22359 #endif
22360
22361         return 0;
22362
22363   ;
22364   return 0;
22365 }
22366 _ACEOF
22367 rm -f conftest.$ac_objext conftest$ac_exeext
22368 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22369   (eval $ac_link) 2>conftest.er1
22370   ac_status=$?
22371   grep -v '^ *+' conftest.er1 >conftest.err
22372   rm -f conftest.er1
22373   cat conftest.err >&5
22374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22375   (exit $ac_status); } &&
22376          { ac_try='test -z "$ac_c_werror_flag"
22377                          || test ! -s conftest.err'
22378   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22379   (eval $ac_try) 2>&5
22380   ac_status=$?
22381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22382   (exit $ac_status); }; } &&
22383          { ac_try='test -s conftest$ac_exeext'
22384   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22385   (eval $ac_try) 2>&5
22386   ac_status=$?
22387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22388   (exit $ac_status); }; }; then
22389   ol_cv_pthread_lib_lpthread_woff=yes
22390 else
22391   echo "$as_me: failed program was:" >&5
22392 sed 's/^/| /' conftest.$ac_ext >&5
22393
22394 ol_cv_pthread_lib_lpthread_woff=no
22395 fi
22396 rm -f conftest.err conftest.$ac_objext \
22397       conftest$ac_exeext conftest.$ac_ext
22398 else
22399   cat >conftest.$ac_ext <<_ACEOF
22400 /* confdefs.h.  */
22401 _ACEOF
22402 cat confdefs.h >>conftest.$ac_ext
22403 cat >>conftest.$ac_ext <<_ACEOF
22404 /* end confdefs.h.  */
22405
22406 /* pthread test headers */
22407 #include <pthread.h>
22408 #if HAVE_PTHREADS < 7
22409 #include <errno.h>
22410 #endif
22411 #ifndef NULL
22412 #define NULL (void*)0
22413 #endif
22414
22415 static void *task(p)
22416         void *p;
22417 {
22418         return (void *) (p == NULL);
22419 }
22420
22421
22422 int main(argc, argv)
22423         int argc;
22424         char **argv;
22425 {
22426
22427         /* pthread test function */
22428 #ifndef PTHREAD_CREATE_DETACHED
22429 #define PTHREAD_CREATE_DETACHED 1
22430 #endif
22431         pthread_t t;
22432         int status;
22433         int detach = PTHREAD_CREATE_DETACHED;
22434
22435 #if HAVE_PTHREADS > 4
22436         /* Final pthreads */
22437         pthread_attr_t attr;
22438
22439         status = pthread_attr_init(&attr);
22440         if( status ) return status;
22441
22442 #if HAVE_PTHREADS < 7
22443         status = pthread_attr_setdetachstate(&attr, &detach);
22444         if( status < 0 ) status = errno;
22445 #else
22446         status = pthread_attr_setdetachstate(&attr, detach);
22447 #endif
22448         if( status ) return status;
22449         status = pthread_create( &t, &attr, task, NULL );
22450 #if HAVE_PTHREADS < 7
22451         if( status < 0 ) status = errno;
22452 #endif
22453         if( status ) return status;
22454 #else
22455         /* Draft 4 pthreads */
22456         status = pthread_create( &t, pthread_attr_default, task, NULL );
22457         if( status ) return errno;
22458
22459         /* give thread a chance to complete */
22460         /* it should remain joinable and hence detachable */
22461         sleep( 1 );
22462
22463         status = pthread_detach( &t );
22464         if( status ) return errno;
22465 #endif
22466
22467 #ifdef HAVE_LINUX_THREADS
22468         pthread_kill_other_threads_np();
22469 #endif
22470
22471         return 0;
22472
22473 }
22474
22475 _ACEOF
22476 rm -f conftest$ac_exeext
22477 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22478   (eval $ac_link) 2>&5
22479   ac_status=$?
22480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22481   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22482   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22483   (eval $ac_try) 2>&5
22484   ac_status=$?
22485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22486   (exit $ac_status); }; }; then
22487   ol_cv_pthread_lib_lpthread_woff=yes
22488 else
22489   echo "$as_me: program exited with status $ac_status" >&5
22490 echo "$as_me: failed program was:" >&5
22491 sed 's/^/| /' conftest.$ac_ext >&5
22492
22493 ( exit $ac_status )
22494 ol_cv_pthread_lib_lpthread_woff=no
22495 fi
22496 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22497 fi
22498
22499                 # restore the LIBS
22500                 LIBS="$ol_LIBS"
22501
22502 fi
22503 echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthread_woff" >&5
22504 echo "${ECHO_T}$ol_cv_pthread_lib_lpthread_woff" >&6
22505
22506         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
22507                 ol_link_pthreads="-lpthread -Wl,-woff,85"
22508                 ol_link_threads=posix
22509         fi
22510 fi
22511
22512
22513                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
22514 if test "$ol_link_threads" = no ; then
22515         # try -lpthread
22516         echo "$as_me:$LINENO: checking for pthread link with -lpthread" >&5
22517 echo $ECHO_N "checking for pthread link with -lpthread... $ECHO_C" >&6
22518 if test "${ol_cv_pthread_lpthread+set}" = set; then
22519   echo $ECHO_N "(cached) $ECHO_C" >&6
22520 else
22521
22522                 # save the flags
22523                 ol_LIBS="$LIBS"
22524                 LIBS="-lpthread $LIBS"
22525
22526                 if test "$cross_compiling" = yes; then
22527   cat >conftest.$ac_ext <<_ACEOF
22528 /* confdefs.h.  */
22529 _ACEOF
22530 cat confdefs.h >>conftest.$ac_ext
22531 cat >>conftest.$ac_ext <<_ACEOF
22532 /* end confdefs.h.  */
22533
22534 /* pthread test headers */
22535 #include <pthread.h>
22536 #if HAVE_PTHREADS < 7
22537 #include <errno.h>
22538 #endif
22539 #ifndef NULL
22540 #define NULL (void*)0
22541 #endif
22542
22543 static void *task(p)
22544         void *p;
22545 {
22546         return (void *) (p == NULL);
22547 }
22548
22549 int
22550 main ()
22551 {
22552
22553         /* pthread test function */
22554 #ifndef PTHREAD_CREATE_DETACHED
22555 #define PTHREAD_CREATE_DETACHED 1
22556 #endif
22557         pthread_t t;
22558         int status;
22559         int detach = PTHREAD_CREATE_DETACHED;
22560
22561 #if HAVE_PTHREADS > 4
22562         /* Final pthreads */
22563         pthread_attr_t attr;
22564
22565         status = pthread_attr_init(&attr);
22566         if( status ) return status;
22567
22568 #if HAVE_PTHREADS < 7
22569         status = pthread_attr_setdetachstate(&attr, &detach);
22570         if( status < 0 ) status = errno;
22571 #else
22572         status = pthread_attr_setdetachstate(&attr, detach);
22573 #endif
22574         if( status ) return status;
22575         status = pthread_create( &t, &attr, task, NULL );
22576 #if HAVE_PTHREADS < 7
22577         if( status < 0 ) status = errno;
22578 #endif
22579         if( status ) return status;
22580 #else
22581         /* Draft 4 pthreads */
22582         status = pthread_create( &t, pthread_attr_default, task, NULL );
22583         if( status ) return errno;
22584
22585         /* give thread a chance to complete */
22586         /* it should remain joinable and hence detachable */
22587         sleep( 1 );
22588
22589         status = pthread_detach( &t );
22590         if( status ) return errno;
22591 #endif
22592
22593 #ifdef HAVE_LINUX_THREADS
22594         pthread_kill_other_threads_np();
22595 #endif
22596
22597         return 0;
22598
22599   ;
22600   return 0;
22601 }
22602 _ACEOF
22603 rm -f conftest.$ac_objext conftest$ac_exeext
22604 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22605   (eval $ac_link) 2>conftest.er1
22606   ac_status=$?
22607   grep -v '^ *+' conftest.er1 >conftest.err
22608   rm -f conftest.er1
22609   cat conftest.err >&5
22610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22611   (exit $ac_status); } &&
22612          { ac_try='test -z "$ac_c_werror_flag"
22613                          || test ! -s conftest.err'
22614   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22615   (eval $ac_try) 2>&5
22616   ac_status=$?
22617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22618   (exit $ac_status); }; } &&
22619          { ac_try='test -s conftest$ac_exeext'
22620   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22621   (eval $ac_try) 2>&5
22622   ac_status=$?
22623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22624   (exit $ac_status); }; }; then
22625   ol_cv_pthread_lpthread=yes
22626 else
22627   echo "$as_me: failed program was:" >&5
22628 sed 's/^/| /' conftest.$ac_ext >&5
22629
22630 ol_cv_pthread_lpthread=no
22631 fi
22632 rm -f conftest.err conftest.$ac_objext \
22633       conftest$ac_exeext conftest.$ac_ext
22634 else
22635   cat >conftest.$ac_ext <<_ACEOF
22636 /* confdefs.h.  */
22637 _ACEOF
22638 cat confdefs.h >>conftest.$ac_ext
22639 cat >>conftest.$ac_ext <<_ACEOF
22640 /* end confdefs.h.  */
22641
22642 /* pthread test headers */
22643 #include <pthread.h>
22644 #if HAVE_PTHREADS < 7
22645 #include <errno.h>
22646 #endif
22647 #ifndef NULL
22648 #define NULL (void*)0
22649 #endif
22650
22651 static void *task(p)
22652         void *p;
22653 {
22654         return (void *) (p == NULL);
22655 }
22656
22657
22658 int main(argc, argv)
22659         int argc;
22660         char **argv;
22661 {
22662
22663         /* pthread test function */
22664 #ifndef PTHREAD_CREATE_DETACHED
22665 #define PTHREAD_CREATE_DETACHED 1
22666 #endif
22667         pthread_t t;
22668         int status;
22669         int detach = PTHREAD_CREATE_DETACHED;
22670
22671 #if HAVE_PTHREADS > 4
22672         /* Final pthreads */
22673         pthread_attr_t attr;
22674
22675         status = pthread_attr_init(&attr);
22676         if( status ) return status;
22677
22678 #if HAVE_PTHREADS < 7
22679         status = pthread_attr_setdetachstate(&attr, &detach);
22680         if( status < 0 ) status = errno;
22681 #else
22682         status = pthread_attr_setdetachstate(&attr, detach);
22683 #endif
22684         if( status ) return status;
22685         status = pthread_create( &t, &attr, task, NULL );
22686 #if HAVE_PTHREADS < 7
22687         if( status < 0 ) status = errno;
22688 #endif
22689         if( status ) return status;
22690 #else
22691         /* Draft 4 pthreads */
22692         status = pthread_create( &t, pthread_attr_default, task, NULL );
22693         if( status ) return errno;
22694
22695         /* give thread a chance to complete */
22696         /* it should remain joinable and hence detachable */
22697         sleep( 1 );
22698
22699         status = pthread_detach( &t );
22700         if( status ) return errno;
22701 #endif
22702
22703 #ifdef HAVE_LINUX_THREADS
22704         pthread_kill_other_threads_np();
22705 #endif
22706
22707         return 0;
22708
22709 }
22710
22711 _ACEOF
22712 rm -f conftest$ac_exeext
22713 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22714   (eval $ac_link) 2>&5
22715   ac_status=$?
22716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22717   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22718   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22719   (eval $ac_try) 2>&5
22720   ac_status=$?
22721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22722   (exit $ac_status); }; }; then
22723   ol_cv_pthread_lpthread=yes
22724 else
22725   echo "$as_me: program exited with status $ac_status" >&5
22726 echo "$as_me: failed program was:" >&5
22727 sed 's/^/| /' conftest.$ac_ext >&5
22728
22729 ( exit $ac_status )
22730 ol_cv_pthread_lpthread=no
22731 fi
22732 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22733 fi
22734
22735                 # restore the LIBS
22736                 LIBS="$ol_LIBS"
22737
22738 fi
22739 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread" >&5
22740 echo "${ECHO_T}$ol_cv_pthread_lpthread" >&6
22741
22742         if test $ol_cv_pthread_lpthread = yes ; then
22743                 ol_link_pthreads="-lpthread"
22744                 ol_link_threads=posix
22745         fi
22746 fi
22747
22748                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
22749 if test "$ol_link_threads" = no ; then
22750         # try -lc_r
22751         echo "$as_me:$LINENO: checking for pthread link with -lc_r" >&5
22752 echo $ECHO_N "checking for pthread link with -lc_r... $ECHO_C" >&6
22753 if test "${ol_cv_pthread_lc_r+set}" = set; then
22754   echo $ECHO_N "(cached) $ECHO_C" >&6
22755 else
22756
22757                 # save the flags
22758                 ol_LIBS="$LIBS"
22759                 LIBS="-lc_r $LIBS"
22760
22761                 if test "$cross_compiling" = yes; then
22762   cat >conftest.$ac_ext <<_ACEOF
22763 /* confdefs.h.  */
22764 _ACEOF
22765 cat confdefs.h >>conftest.$ac_ext
22766 cat >>conftest.$ac_ext <<_ACEOF
22767 /* end confdefs.h.  */
22768
22769 /* pthread test headers */
22770 #include <pthread.h>
22771 #if HAVE_PTHREADS < 7
22772 #include <errno.h>
22773 #endif
22774 #ifndef NULL
22775 #define NULL (void*)0
22776 #endif
22777
22778 static void *task(p)
22779         void *p;
22780 {
22781         return (void *) (p == NULL);
22782 }
22783
22784 int
22785 main ()
22786 {
22787
22788         /* pthread test function */
22789 #ifndef PTHREAD_CREATE_DETACHED
22790 #define PTHREAD_CREATE_DETACHED 1
22791 #endif
22792         pthread_t t;
22793         int status;
22794         int detach = PTHREAD_CREATE_DETACHED;
22795
22796 #if HAVE_PTHREADS > 4
22797         /* Final pthreads */
22798         pthread_attr_t attr;
22799
22800         status = pthread_attr_init(&attr);
22801         if( status ) return status;
22802
22803 #if HAVE_PTHREADS < 7
22804         status = pthread_attr_setdetachstate(&attr, &detach);
22805         if( status < 0 ) status = errno;
22806 #else
22807         status = pthread_attr_setdetachstate(&attr, detach);
22808 #endif
22809         if( status ) return status;
22810         status = pthread_create( &t, &attr, task, NULL );
22811 #if HAVE_PTHREADS < 7
22812         if( status < 0 ) status = errno;
22813 #endif
22814         if( status ) return status;
22815 #else
22816         /* Draft 4 pthreads */
22817         status = pthread_create( &t, pthread_attr_default, task, NULL );
22818         if( status ) return errno;
22819
22820         /* give thread a chance to complete */
22821         /* it should remain joinable and hence detachable */
22822         sleep( 1 );
22823
22824         status = pthread_detach( &t );
22825         if( status ) return errno;
22826 #endif
22827
22828 #ifdef HAVE_LINUX_THREADS
22829         pthread_kill_other_threads_np();
22830 #endif
22831
22832         return 0;
22833
22834   ;
22835   return 0;
22836 }
22837 _ACEOF
22838 rm -f conftest.$ac_objext conftest$ac_exeext
22839 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22840   (eval $ac_link) 2>conftest.er1
22841   ac_status=$?
22842   grep -v '^ *+' conftest.er1 >conftest.err
22843   rm -f conftest.er1
22844   cat conftest.err >&5
22845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22846   (exit $ac_status); } &&
22847          { ac_try='test -z "$ac_c_werror_flag"
22848                          || test ! -s conftest.err'
22849   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22850   (eval $ac_try) 2>&5
22851   ac_status=$?
22852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22853   (exit $ac_status); }; } &&
22854          { ac_try='test -s conftest$ac_exeext'
22855   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22856   (eval $ac_try) 2>&5
22857   ac_status=$?
22858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22859   (exit $ac_status); }; }; then
22860   ol_cv_pthread_lc_r=yes
22861 else
22862   echo "$as_me: failed program was:" >&5
22863 sed 's/^/| /' conftest.$ac_ext >&5
22864
22865 ol_cv_pthread_lc_r=no
22866 fi
22867 rm -f conftest.err conftest.$ac_objext \
22868       conftest$ac_exeext conftest.$ac_ext
22869 else
22870   cat >conftest.$ac_ext <<_ACEOF
22871 /* confdefs.h.  */
22872 _ACEOF
22873 cat confdefs.h >>conftest.$ac_ext
22874 cat >>conftest.$ac_ext <<_ACEOF
22875 /* end confdefs.h.  */
22876
22877 /* pthread test headers */
22878 #include <pthread.h>
22879 #if HAVE_PTHREADS < 7
22880 #include <errno.h>
22881 #endif
22882 #ifndef NULL
22883 #define NULL (void*)0
22884 #endif
22885
22886 static void *task(p)
22887         void *p;
22888 {
22889         return (void *) (p == NULL);
22890 }
22891
22892
22893 int main(argc, argv)
22894         int argc;
22895         char **argv;
22896 {
22897
22898         /* pthread test function */
22899 #ifndef PTHREAD_CREATE_DETACHED
22900 #define PTHREAD_CREATE_DETACHED 1
22901 #endif
22902         pthread_t t;
22903         int status;
22904         int detach = PTHREAD_CREATE_DETACHED;
22905
22906 #if HAVE_PTHREADS > 4
22907         /* Final pthreads */
22908         pthread_attr_t attr;
22909
22910         status = pthread_attr_init(&attr);
22911         if( status ) return status;
22912
22913 #if HAVE_PTHREADS < 7
22914         status = pthread_attr_setdetachstate(&attr, &detach);
22915         if( status < 0 ) status = errno;
22916 #else
22917         status = pthread_attr_setdetachstate(&attr, detach);
22918 #endif
22919         if( status ) return status;
22920         status = pthread_create( &t, &attr, task, NULL );
22921 #if HAVE_PTHREADS < 7
22922         if( status < 0 ) status = errno;
22923 #endif
22924         if( status ) return status;
22925 #else
22926         /* Draft 4 pthreads */
22927         status = pthread_create( &t, pthread_attr_default, task, NULL );
22928         if( status ) return errno;
22929
22930         /* give thread a chance to complete */
22931         /* it should remain joinable and hence detachable */
22932         sleep( 1 );
22933
22934         status = pthread_detach( &t );
22935         if( status ) return errno;
22936 #endif
22937
22938 #ifdef HAVE_LINUX_THREADS
22939         pthread_kill_other_threads_np();
22940 #endif
22941
22942         return 0;
22943
22944 }
22945
22946 _ACEOF
22947 rm -f conftest$ac_exeext
22948 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22949   (eval $ac_link) 2>&5
22950   ac_status=$?
22951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22952   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22954   (eval $ac_try) 2>&5
22955   ac_status=$?
22956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22957   (exit $ac_status); }; }; then
22958   ol_cv_pthread_lc_r=yes
22959 else
22960   echo "$as_me: program exited with status $ac_status" >&5
22961 echo "$as_me: failed program was:" >&5
22962 sed 's/^/| /' conftest.$ac_ext >&5
22963
22964 ( exit $ac_status )
22965 ol_cv_pthread_lc_r=no
22966 fi
22967 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22968 fi
22969
22970                 # restore the LIBS
22971                 LIBS="$ol_LIBS"
22972
22973 fi
22974 echo "$as_me:$LINENO: result: $ol_cv_pthread_lc_r" >&5
22975 echo "${ECHO_T}$ol_cv_pthread_lc_r" >&6
22976
22977         if test $ol_cv_pthread_lc_r = yes ; then
22978                 ol_link_pthreads="-lc_r"
22979                 ol_link_threads=posix
22980         fi
22981 fi
22982
22983
22984                 # Pthread try link: -threads (ol_cv_pthread_threads)
22985 if test "$ol_link_threads" = no ; then
22986         # try -threads
22987         echo "$as_me:$LINENO: checking for pthread link with -threads" >&5
22988 echo $ECHO_N "checking for pthread link with -threads... $ECHO_C" >&6
22989 if test "${ol_cv_pthread_threads+set}" = set; then
22990   echo $ECHO_N "(cached) $ECHO_C" >&6
22991 else
22992
22993                 # save the flags
22994                 ol_LIBS="$LIBS"
22995                 LIBS="-threads $LIBS"
22996
22997                 if test "$cross_compiling" = yes; then
22998   cat >conftest.$ac_ext <<_ACEOF
22999 /* confdefs.h.  */
23000 _ACEOF
23001 cat confdefs.h >>conftest.$ac_ext
23002 cat >>conftest.$ac_ext <<_ACEOF
23003 /* end confdefs.h.  */
23004
23005 /* pthread test headers */
23006 #include <pthread.h>
23007 #if HAVE_PTHREADS < 7
23008 #include <errno.h>
23009 #endif
23010 #ifndef NULL
23011 #define NULL (void*)0
23012 #endif
23013
23014 static void *task(p)
23015         void *p;
23016 {
23017         return (void *) (p == NULL);
23018 }
23019
23020 int
23021 main ()
23022 {
23023
23024         /* pthread test function */
23025 #ifndef PTHREAD_CREATE_DETACHED
23026 #define PTHREAD_CREATE_DETACHED 1
23027 #endif
23028         pthread_t t;
23029         int status;
23030         int detach = PTHREAD_CREATE_DETACHED;
23031
23032 #if HAVE_PTHREADS > 4
23033         /* Final pthreads */
23034         pthread_attr_t attr;
23035
23036         status = pthread_attr_init(&attr);
23037         if( status ) return status;
23038
23039 #if HAVE_PTHREADS < 7
23040         status = pthread_attr_setdetachstate(&attr, &detach);
23041         if( status < 0 ) status = errno;
23042 #else
23043         status = pthread_attr_setdetachstate(&attr, detach);
23044 #endif
23045         if( status ) return status;
23046         status = pthread_create( &t, &attr, task, NULL );
23047 #if HAVE_PTHREADS < 7
23048         if( status < 0 ) status = errno;
23049 #endif
23050         if( status ) return status;
23051 #else
23052         /* Draft 4 pthreads */
23053         status = pthread_create( &t, pthread_attr_default, task, NULL );
23054         if( status ) return errno;
23055
23056         /* give thread a chance to complete */
23057         /* it should remain joinable and hence detachable */
23058         sleep( 1 );
23059
23060         status = pthread_detach( &t );
23061         if( status ) return errno;
23062 #endif
23063
23064 #ifdef HAVE_LINUX_THREADS
23065         pthread_kill_other_threads_np();
23066 #endif
23067
23068         return 0;
23069
23070   ;
23071   return 0;
23072 }
23073 _ACEOF
23074 rm -f conftest.$ac_objext conftest$ac_exeext
23075 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23076   (eval $ac_link) 2>conftest.er1
23077   ac_status=$?
23078   grep -v '^ *+' conftest.er1 >conftest.err
23079   rm -f conftest.er1
23080   cat conftest.err >&5
23081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23082   (exit $ac_status); } &&
23083          { ac_try='test -z "$ac_c_werror_flag"
23084                          || test ! -s conftest.err'
23085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23086   (eval $ac_try) 2>&5
23087   ac_status=$?
23088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23089   (exit $ac_status); }; } &&
23090          { ac_try='test -s conftest$ac_exeext'
23091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23092   (eval $ac_try) 2>&5
23093   ac_status=$?
23094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23095   (exit $ac_status); }; }; then
23096   ol_cv_pthread_threads=yes
23097 else
23098   echo "$as_me: failed program was:" >&5
23099 sed 's/^/| /' conftest.$ac_ext >&5
23100
23101 ol_cv_pthread_threads=no
23102 fi
23103 rm -f conftest.err conftest.$ac_objext \
23104       conftest$ac_exeext conftest.$ac_ext
23105 else
23106   cat >conftest.$ac_ext <<_ACEOF
23107 /* confdefs.h.  */
23108 _ACEOF
23109 cat confdefs.h >>conftest.$ac_ext
23110 cat >>conftest.$ac_ext <<_ACEOF
23111 /* end confdefs.h.  */
23112
23113 /* pthread test headers */
23114 #include <pthread.h>
23115 #if HAVE_PTHREADS < 7
23116 #include <errno.h>
23117 #endif
23118 #ifndef NULL
23119 #define NULL (void*)0
23120 #endif
23121
23122 static void *task(p)
23123         void *p;
23124 {
23125         return (void *) (p == NULL);
23126 }
23127
23128
23129 int main(argc, argv)
23130         int argc;
23131         char **argv;
23132 {
23133
23134         /* pthread test function */
23135 #ifndef PTHREAD_CREATE_DETACHED
23136 #define PTHREAD_CREATE_DETACHED 1
23137 #endif
23138         pthread_t t;
23139         int status;
23140         int detach = PTHREAD_CREATE_DETACHED;
23141
23142 #if HAVE_PTHREADS > 4
23143         /* Final pthreads */
23144         pthread_attr_t attr;
23145
23146         status = pthread_attr_init(&attr);
23147         if( status ) return status;
23148
23149 #if HAVE_PTHREADS < 7
23150         status = pthread_attr_setdetachstate(&attr, &detach);
23151         if( status < 0 ) status = errno;
23152 #else
23153         status = pthread_attr_setdetachstate(&attr, detach);
23154 #endif
23155         if( status ) return status;
23156         status = pthread_create( &t, &attr, task, NULL );
23157 #if HAVE_PTHREADS < 7
23158         if( status < 0 ) status = errno;
23159 #endif
23160         if( status ) return status;
23161 #else
23162         /* Draft 4 pthreads */
23163         status = pthread_create( &t, pthread_attr_default, task, NULL );
23164         if( status ) return errno;
23165
23166         /* give thread a chance to complete */
23167         /* it should remain joinable and hence detachable */
23168         sleep( 1 );
23169
23170         status = pthread_detach( &t );
23171         if( status ) return errno;
23172 #endif
23173
23174 #ifdef HAVE_LINUX_THREADS
23175         pthread_kill_other_threads_np();
23176 #endif
23177
23178         return 0;
23179
23180 }
23181
23182 _ACEOF
23183 rm -f conftest$ac_exeext
23184 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23185   (eval $ac_link) 2>&5
23186   ac_status=$?
23187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23188   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23189   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23190   (eval $ac_try) 2>&5
23191   ac_status=$?
23192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23193   (exit $ac_status); }; }; then
23194   ol_cv_pthread_threads=yes
23195 else
23196   echo "$as_me: program exited with status $ac_status" >&5
23197 echo "$as_me: failed program was:" >&5
23198 sed 's/^/| /' conftest.$ac_ext >&5
23199
23200 ( exit $ac_status )
23201 ol_cv_pthread_threads=no
23202 fi
23203 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23204 fi
23205
23206                 # restore the LIBS
23207                 LIBS="$ol_LIBS"
23208
23209 fi
23210 echo "$as_me:$LINENO: result: $ol_cv_pthread_threads" >&5
23211 echo "${ECHO_T}$ol_cv_pthread_threads" >&6
23212
23213         if test $ol_cv_pthread_threads = yes ; then
23214                 ol_link_pthreads="-threads"
23215                 ol_link_threads=posix
23216         fi
23217 fi
23218
23219
23220                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
23221 if test "$ol_link_threads" = no ; then
23222         # try -lpthreads -lmach -lexc -lc_r
23223         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
23224 echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc -lc_r... $ECHO_C" >&6
23225 if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then
23226   echo $ECHO_N "(cached) $ECHO_C" >&6
23227 else
23228
23229                 # save the flags
23230                 ol_LIBS="$LIBS"
23231                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
23232
23233                 if test "$cross_compiling" = yes; then
23234   cat >conftest.$ac_ext <<_ACEOF
23235 /* confdefs.h.  */
23236 _ACEOF
23237 cat confdefs.h >>conftest.$ac_ext
23238 cat >>conftest.$ac_ext <<_ACEOF
23239 /* end confdefs.h.  */
23240
23241 /* pthread test headers */
23242 #include <pthread.h>
23243 #if HAVE_PTHREADS < 7
23244 #include <errno.h>
23245 #endif
23246 #ifndef NULL
23247 #define NULL (void*)0
23248 #endif
23249
23250 static void *task(p)
23251         void *p;
23252 {
23253         return (void *) (p == NULL);
23254 }
23255
23256 int
23257 main ()
23258 {
23259
23260         /* pthread test function */
23261 #ifndef PTHREAD_CREATE_DETACHED
23262 #define PTHREAD_CREATE_DETACHED 1
23263 #endif
23264         pthread_t t;
23265         int status;
23266         int detach = PTHREAD_CREATE_DETACHED;
23267
23268 #if HAVE_PTHREADS > 4
23269         /* Final pthreads */
23270         pthread_attr_t attr;
23271
23272         status = pthread_attr_init(&attr);
23273         if( status ) return status;
23274
23275 #if HAVE_PTHREADS < 7
23276         status = pthread_attr_setdetachstate(&attr, &detach);
23277         if( status < 0 ) status = errno;
23278 #else
23279         status = pthread_attr_setdetachstate(&attr, detach);
23280 #endif
23281         if( status ) return status;
23282         status = pthread_create( &t, &attr, task, NULL );
23283 #if HAVE_PTHREADS < 7
23284         if( status < 0 ) status = errno;
23285 #endif
23286         if( status ) return status;
23287 #else
23288         /* Draft 4 pthreads */
23289         status = pthread_create( &t, pthread_attr_default, task, NULL );
23290         if( status ) return errno;
23291
23292         /* give thread a chance to complete */
23293         /* it should remain joinable and hence detachable */
23294         sleep( 1 );
23295
23296         status = pthread_detach( &t );
23297         if( status ) return errno;
23298 #endif
23299
23300 #ifdef HAVE_LINUX_THREADS
23301         pthread_kill_other_threads_np();
23302 #endif
23303
23304         return 0;
23305
23306   ;
23307   return 0;
23308 }
23309 _ACEOF
23310 rm -f conftest.$ac_objext conftest$ac_exeext
23311 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23312   (eval $ac_link) 2>conftest.er1
23313   ac_status=$?
23314   grep -v '^ *+' conftest.er1 >conftest.err
23315   rm -f conftest.er1
23316   cat conftest.err >&5
23317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23318   (exit $ac_status); } &&
23319          { ac_try='test -z "$ac_c_werror_flag"
23320                          || test ! -s conftest.err'
23321   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23322   (eval $ac_try) 2>&5
23323   ac_status=$?
23324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23325   (exit $ac_status); }; } &&
23326          { ac_try='test -s conftest$ac_exeext'
23327   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23328   (eval $ac_try) 2>&5
23329   ac_status=$?
23330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23331   (exit $ac_status); }; }; then
23332   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
23333 else
23334   echo "$as_me: failed program was:" >&5
23335 sed 's/^/| /' conftest.$ac_ext >&5
23336
23337 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
23338 fi
23339 rm -f conftest.err conftest.$ac_objext \
23340       conftest$ac_exeext conftest.$ac_ext
23341 else
23342   cat >conftest.$ac_ext <<_ACEOF
23343 /* confdefs.h.  */
23344 _ACEOF
23345 cat confdefs.h >>conftest.$ac_ext
23346 cat >>conftest.$ac_ext <<_ACEOF
23347 /* end confdefs.h.  */
23348
23349 /* pthread test headers */
23350 #include <pthread.h>
23351 #if HAVE_PTHREADS < 7
23352 #include <errno.h>
23353 #endif
23354 #ifndef NULL
23355 #define NULL (void*)0
23356 #endif
23357
23358 static void *task(p)
23359         void *p;
23360 {
23361         return (void *) (p == NULL);
23362 }
23363
23364
23365 int main(argc, argv)
23366         int argc;
23367         char **argv;
23368 {
23369
23370         /* pthread test function */
23371 #ifndef PTHREAD_CREATE_DETACHED
23372 #define PTHREAD_CREATE_DETACHED 1
23373 #endif
23374         pthread_t t;
23375         int status;
23376         int detach = PTHREAD_CREATE_DETACHED;
23377
23378 #if HAVE_PTHREADS > 4
23379         /* Final pthreads */
23380         pthread_attr_t attr;
23381
23382         status = pthread_attr_init(&attr);
23383         if( status ) return status;
23384
23385 #if HAVE_PTHREADS < 7
23386         status = pthread_attr_setdetachstate(&attr, &detach);
23387         if( status < 0 ) status = errno;
23388 #else
23389         status = pthread_attr_setdetachstate(&attr, detach);
23390 #endif
23391         if( status ) return status;
23392         status = pthread_create( &t, &attr, task, NULL );
23393 #if HAVE_PTHREADS < 7
23394         if( status < 0 ) status = errno;
23395 #endif
23396         if( status ) return status;
23397 #else
23398         /* Draft 4 pthreads */
23399         status = pthread_create( &t, pthread_attr_default, task, NULL );
23400         if( status ) return errno;
23401
23402         /* give thread a chance to complete */
23403         /* it should remain joinable and hence detachable */
23404         sleep( 1 );
23405
23406         status = pthread_detach( &t );
23407         if( status ) return errno;
23408 #endif
23409
23410 #ifdef HAVE_LINUX_THREADS
23411         pthread_kill_other_threads_np();
23412 #endif
23413
23414         return 0;
23415
23416 }
23417
23418 _ACEOF
23419 rm -f conftest$ac_exeext
23420 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23421   (eval $ac_link) 2>&5
23422   ac_status=$?
23423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23424   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23425   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23426   (eval $ac_try) 2>&5
23427   ac_status=$?
23428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23429   (exit $ac_status); }; }; then
23430   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
23431 else
23432   echo "$as_me: program exited with status $ac_status" >&5
23433 echo "$as_me: failed program was:" >&5
23434 sed 's/^/| /' conftest.$ac_ext >&5
23435
23436 ( exit $ac_status )
23437 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
23438 fi
23439 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23440 fi
23441
23442                 # restore the LIBS
23443                 LIBS="$ol_LIBS"
23444
23445 fi
23446 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
23447 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6
23448
23449         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
23450                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
23451                 ol_link_threads=posix
23452         fi
23453 fi
23454
23455                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
23456 if test "$ol_link_threads" = no ; then
23457         # try -lpthreads -lmach -lexc
23458         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc" >&5
23459 echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc... $ECHO_C" >&6
23460 if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then
23461   echo $ECHO_N "(cached) $ECHO_C" >&6
23462 else
23463
23464                 # save the flags
23465                 ol_LIBS="$LIBS"
23466                 LIBS="-lpthreads -lmach -lexc $LIBS"
23467
23468                 if test "$cross_compiling" = yes; then
23469   cat >conftest.$ac_ext <<_ACEOF
23470 /* confdefs.h.  */
23471 _ACEOF
23472 cat confdefs.h >>conftest.$ac_ext
23473 cat >>conftest.$ac_ext <<_ACEOF
23474 /* end confdefs.h.  */
23475
23476 /* pthread test headers */
23477 #include <pthread.h>
23478 #if HAVE_PTHREADS < 7
23479 #include <errno.h>
23480 #endif
23481 #ifndef NULL
23482 #define NULL (void*)0
23483 #endif
23484
23485 static void *task(p)
23486         void *p;
23487 {
23488         return (void *) (p == NULL);
23489 }
23490
23491 int
23492 main ()
23493 {
23494
23495         /* pthread test function */
23496 #ifndef PTHREAD_CREATE_DETACHED
23497 #define PTHREAD_CREATE_DETACHED 1
23498 #endif
23499         pthread_t t;
23500         int status;
23501         int detach = PTHREAD_CREATE_DETACHED;
23502
23503 #if HAVE_PTHREADS > 4
23504         /* Final pthreads */
23505         pthread_attr_t attr;
23506
23507         status = pthread_attr_init(&attr);
23508         if( status ) return status;
23509
23510 #if HAVE_PTHREADS < 7
23511         status = pthread_attr_setdetachstate(&attr, &detach);
23512         if( status < 0 ) status = errno;
23513 #else
23514         status = pthread_attr_setdetachstate(&attr, detach);
23515 #endif
23516         if( status ) return status;
23517         status = pthread_create( &t, &attr, task, NULL );
23518 #if HAVE_PTHREADS < 7
23519         if( status < 0 ) status = errno;
23520 #endif
23521         if( status ) return status;
23522 #else
23523         /* Draft 4 pthreads */
23524         status = pthread_create( &t, pthread_attr_default, task, NULL );
23525         if( status ) return errno;
23526
23527         /* give thread a chance to complete */
23528         /* it should remain joinable and hence detachable */
23529         sleep( 1 );
23530
23531         status = pthread_detach( &t );
23532         if( status ) return errno;
23533 #endif
23534
23535 #ifdef HAVE_LINUX_THREADS
23536         pthread_kill_other_threads_np();
23537 #endif
23538
23539         return 0;
23540
23541   ;
23542   return 0;
23543 }
23544 _ACEOF
23545 rm -f conftest.$ac_objext conftest$ac_exeext
23546 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23547   (eval $ac_link) 2>conftest.er1
23548   ac_status=$?
23549   grep -v '^ *+' conftest.er1 >conftest.err
23550   rm -f conftest.er1
23551   cat conftest.err >&5
23552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23553   (exit $ac_status); } &&
23554          { ac_try='test -z "$ac_c_werror_flag"
23555                          || test ! -s conftest.err'
23556   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23557   (eval $ac_try) 2>&5
23558   ac_status=$?
23559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23560   (exit $ac_status); }; } &&
23561          { ac_try='test -s conftest$ac_exeext'
23562   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23563   (eval $ac_try) 2>&5
23564   ac_status=$?
23565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23566   (exit $ac_status); }; }; then
23567   ol_cv_pthread_lpthreads_lmach_lexc=yes
23568 else
23569   echo "$as_me: failed program was:" >&5
23570 sed 's/^/| /' conftest.$ac_ext >&5
23571
23572 ol_cv_pthread_lpthreads_lmach_lexc=no
23573 fi
23574 rm -f conftest.err conftest.$ac_objext \
23575       conftest$ac_exeext conftest.$ac_ext
23576 else
23577   cat >conftest.$ac_ext <<_ACEOF
23578 /* confdefs.h.  */
23579 _ACEOF
23580 cat confdefs.h >>conftest.$ac_ext
23581 cat >>conftest.$ac_ext <<_ACEOF
23582 /* end confdefs.h.  */
23583
23584 /* pthread test headers */
23585 #include <pthread.h>
23586 #if HAVE_PTHREADS < 7
23587 #include <errno.h>
23588 #endif
23589 #ifndef NULL
23590 #define NULL (void*)0
23591 #endif
23592
23593 static void *task(p)
23594         void *p;
23595 {
23596         return (void *) (p == NULL);
23597 }
23598
23599
23600 int main(argc, argv)
23601         int argc;
23602         char **argv;
23603 {
23604
23605         /* pthread test function */
23606 #ifndef PTHREAD_CREATE_DETACHED
23607 #define PTHREAD_CREATE_DETACHED 1
23608 #endif
23609         pthread_t t;
23610         int status;
23611         int detach = PTHREAD_CREATE_DETACHED;
23612
23613 #if HAVE_PTHREADS > 4
23614         /* Final pthreads */
23615         pthread_attr_t attr;
23616
23617         status = pthread_attr_init(&attr);
23618         if( status ) return status;
23619
23620 #if HAVE_PTHREADS < 7
23621         status = pthread_attr_setdetachstate(&attr, &detach);
23622         if( status < 0 ) status = errno;
23623 #else
23624         status = pthread_attr_setdetachstate(&attr, detach);
23625 #endif
23626         if( status ) return status;
23627         status = pthread_create( &t, &attr, task, NULL );
23628 #if HAVE_PTHREADS < 7
23629         if( status < 0 ) status = errno;
23630 #endif
23631         if( status ) return status;
23632 #else
23633         /* Draft 4 pthreads */
23634         status = pthread_create( &t, pthread_attr_default, task, NULL );
23635         if( status ) return errno;
23636
23637         /* give thread a chance to complete */
23638         /* it should remain joinable and hence detachable */
23639         sleep( 1 );
23640
23641         status = pthread_detach( &t );
23642         if( status ) return errno;
23643 #endif
23644
23645 #ifdef HAVE_LINUX_THREADS
23646         pthread_kill_other_threads_np();
23647 #endif
23648
23649         return 0;
23650
23651 }
23652
23653 _ACEOF
23654 rm -f conftest$ac_exeext
23655 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23656   (eval $ac_link) 2>&5
23657   ac_status=$?
23658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23659   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23660   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23661   (eval $ac_try) 2>&5
23662   ac_status=$?
23663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23664   (exit $ac_status); }; }; then
23665   ol_cv_pthread_lpthreads_lmach_lexc=yes
23666 else
23667   echo "$as_me: program exited with status $ac_status" >&5
23668 echo "$as_me: failed program was:" >&5
23669 sed 's/^/| /' conftest.$ac_ext >&5
23670
23671 ( exit $ac_status )
23672 ol_cv_pthread_lpthreads_lmach_lexc=no
23673 fi
23674 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23675 fi
23676
23677                 # restore the LIBS
23678                 LIBS="$ol_LIBS"
23679
23680 fi
23681 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
23682 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc" >&6
23683
23684         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
23685                 ol_link_pthreads="-lpthreads -lmach -lexc"
23686                 ol_link_threads=posix
23687         fi
23688 fi
23689
23690                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
23691 if test "$ol_link_threads" = no ; then
23692         # try -lpthreads -lexc
23693         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lexc" >&5
23694 echo $ECHO_N "checking for pthread link with -lpthreads -lexc... $ECHO_C" >&6
23695 if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then
23696   echo $ECHO_N "(cached) $ECHO_C" >&6
23697 else
23698
23699                 # save the flags
23700                 ol_LIBS="$LIBS"
23701                 LIBS="-lpthreads -lexc $LIBS"
23702
23703                 if test "$cross_compiling" = yes; then
23704   cat >conftest.$ac_ext <<_ACEOF
23705 /* confdefs.h.  */
23706 _ACEOF
23707 cat confdefs.h >>conftest.$ac_ext
23708 cat >>conftest.$ac_ext <<_ACEOF
23709 /* end confdefs.h.  */
23710
23711 /* pthread test headers */
23712 #include <pthread.h>
23713 #if HAVE_PTHREADS < 7
23714 #include <errno.h>
23715 #endif
23716 #ifndef NULL
23717 #define NULL (void*)0
23718 #endif
23719
23720 static void *task(p)
23721         void *p;
23722 {
23723         return (void *) (p == NULL);
23724 }
23725
23726 int
23727 main ()
23728 {
23729
23730         /* pthread test function */
23731 #ifndef PTHREAD_CREATE_DETACHED
23732 #define PTHREAD_CREATE_DETACHED 1
23733 #endif
23734         pthread_t t;
23735         int status;
23736         int detach = PTHREAD_CREATE_DETACHED;
23737
23738 #if HAVE_PTHREADS > 4
23739         /* Final pthreads */
23740         pthread_attr_t attr;
23741
23742         status = pthread_attr_init(&attr);
23743         if( status ) return status;
23744
23745 #if HAVE_PTHREADS < 7
23746         status = pthread_attr_setdetachstate(&attr, &detach);
23747         if( status < 0 ) status = errno;
23748 #else
23749         status = pthread_attr_setdetachstate(&attr, detach);
23750 #endif
23751         if( status ) return status;
23752         status = pthread_create( &t, &attr, task, NULL );
23753 #if HAVE_PTHREADS < 7
23754         if( status < 0 ) status = errno;
23755 #endif
23756         if( status ) return status;
23757 #else
23758         /* Draft 4 pthreads */
23759         status = pthread_create( &t, pthread_attr_default, task, NULL );
23760         if( status ) return errno;
23761
23762         /* give thread a chance to complete */
23763         /* it should remain joinable and hence detachable */
23764         sleep( 1 );
23765
23766         status = pthread_detach( &t );
23767         if( status ) return errno;
23768 #endif
23769
23770 #ifdef HAVE_LINUX_THREADS
23771         pthread_kill_other_threads_np();
23772 #endif
23773
23774         return 0;
23775
23776   ;
23777   return 0;
23778 }
23779 _ACEOF
23780 rm -f conftest.$ac_objext conftest$ac_exeext
23781 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23782   (eval $ac_link) 2>conftest.er1
23783   ac_status=$?
23784   grep -v '^ *+' conftest.er1 >conftest.err
23785   rm -f conftest.er1
23786   cat conftest.err >&5
23787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23788   (exit $ac_status); } &&
23789          { ac_try='test -z "$ac_c_werror_flag"
23790                          || test ! -s conftest.err'
23791   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23792   (eval $ac_try) 2>&5
23793   ac_status=$?
23794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23795   (exit $ac_status); }; } &&
23796          { ac_try='test -s conftest$ac_exeext'
23797   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23798   (eval $ac_try) 2>&5
23799   ac_status=$?
23800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23801   (exit $ac_status); }; }; then
23802   ol_cv_pthread_lpthreads_lexc=yes
23803 else
23804   echo "$as_me: failed program was:" >&5
23805 sed 's/^/| /' conftest.$ac_ext >&5
23806
23807 ol_cv_pthread_lpthreads_lexc=no
23808 fi
23809 rm -f conftest.err conftest.$ac_objext \
23810       conftest$ac_exeext conftest.$ac_ext
23811 else
23812   cat >conftest.$ac_ext <<_ACEOF
23813 /* confdefs.h.  */
23814 _ACEOF
23815 cat confdefs.h >>conftest.$ac_ext
23816 cat >>conftest.$ac_ext <<_ACEOF
23817 /* end confdefs.h.  */
23818
23819 /* pthread test headers */
23820 #include <pthread.h>
23821 #if HAVE_PTHREADS < 7
23822 #include <errno.h>
23823 #endif
23824 #ifndef NULL
23825 #define NULL (void*)0
23826 #endif
23827
23828 static void *task(p)
23829         void *p;
23830 {
23831         return (void *) (p == NULL);
23832 }
23833
23834
23835 int main(argc, argv)
23836         int argc;
23837         char **argv;
23838 {
23839
23840         /* pthread test function */
23841 #ifndef PTHREAD_CREATE_DETACHED
23842 #define PTHREAD_CREATE_DETACHED 1
23843 #endif
23844         pthread_t t;
23845         int status;
23846         int detach = PTHREAD_CREATE_DETACHED;
23847
23848 #if HAVE_PTHREADS > 4
23849         /* Final pthreads */
23850         pthread_attr_t attr;
23851
23852         status = pthread_attr_init(&attr);
23853         if( status ) return status;
23854
23855 #if HAVE_PTHREADS < 7
23856         status = pthread_attr_setdetachstate(&attr, &detach);
23857         if( status < 0 ) status = errno;
23858 #else
23859         status = pthread_attr_setdetachstate(&attr, detach);
23860 #endif
23861         if( status ) return status;
23862         status = pthread_create( &t, &attr, task, NULL );
23863 #if HAVE_PTHREADS < 7
23864         if( status < 0 ) status = errno;
23865 #endif
23866         if( status ) return status;
23867 #else
23868         /* Draft 4 pthreads */
23869         status = pthread_create( &t, pthread_attr_default, task, NULL );
23870         if( status ) return errno;
23871
23872         /* give thread a chance to complete */
23873         /* it should remain joinable and hence detachable */
23874         sleep( 1 );
23875
23876         status = pthread_detach( &t );
23877         if( status ) return errno;
23878 #endif
23879
23880 #ifdef HAVE_LINUX_THREADS
23881         pthread_kill_other_threads_np();
23882 #endif
23883
23884         return 0;
23885
23886 }
23887
23888 _ACEOF
23889 rm -f conftest$ac_exeext
23890 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23891   (eval $ac_link) 2>&5
23892   ac_status=$?
23893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23894   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23895   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23896   (eval $ac_try) 2>&5
23897   ac_status=$?
23898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23899   (exit $ac_status); }; }; then
23900   ol_cv_pthread_lpthreads_lexc=yes
23901 else
23902   echo "$as_me: program exited with status $ac_status" >&5
23903 echo "$as_me: failed program was:" >&5
23904 sed 's/^/| /' conftest.$ac_ext >&5
23905
23906 ( exit $ac_status )
23907 ol_cv_pthread_lpthreads_lexc=no
23908 fi
23909 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23910 fi
23911
23912                 # restore the LIBS
23913                 LIBS="$ol_LIBS"
23914
23915 fi
23916 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lexc" >&5
23917 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lexc" >&6
23918
23919         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
23920                 ol_link_pthreads="-lpthreads -lexc"
23921                 ol_link_threads=posix
23922         fi
23923 fi
23924
23925
23926                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
23927 if test "$ol_link_threads" = no ; then
23928         # try -lpthreads
23929         echo "$as_me:$LINENO: checking for pthread link with -lpthreads" >&5
23930 echo $ECHO_N "checking for pthread link with -lpthreads... $ECHO_C" >&6
23931 if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then
23932   echo $ECHO_N "(cached) $ECHO_C" >&6
23933 else
23934
23935                 # save the flags
23936                 ol_LIBS="$LIBS"
23937                 LIBS="-lpthreads $LIBS"
23938
23939                 if test "$cross_compiling" = yes; then
23940   cat >conftest.$ac_ext <<_ACEOF
23941 /* confdefs.h.  */
23942 _ACEOF
23943 cat confdefs.h >>conftest.$ac_ext
23944 cat >>conftest.$ac_ext <<_ACEOF
23945 /* end confdefs.h.  */
23946
23947 /* pthread test headers */
23948 #include <pthread.h>
23949 #if HAVE_PTHREADS < 7
23950 #include <errno.h>
23951 #endif
23952 #ifndef NULL
23953 #define NULL (void*)0
23954 #endif
23955
23956 static void *task(p)
23957         void *p;
23958 {
23959         return (void *) (p == NULL);
23960 }
23961
23962 int
23963 main ()
23964 {
23965
23966         /* pthread test function */
23967 #ifndef PTHREAD_CREATE_DETACHED
23968 #define PTHREAD_CREATE_DETACHED 1
23969 #endif
23970         pthread_t t;
23971         int status;
23972         int detach = PTHREAD_CREATE_DETACHED;
23973
23974 #if HAVE_PTHREADS > 4
23975         /* Final pthreads */
23976         pthread_attr_t attr;
23977
23978         status = pthread_attr_init(&attr);
23979         if( status ) return status;
23980
23981 #if HAVE_PTHREADS < 7
23982         status = pthread_attr_setdetachstate(&attr, &detach);
23983         if( status < 0 ) status = errno;
23984 #else
23985         status = pthread_attr_setdetachstate(&attr, detach);
23986 #endif
23987         if( status ) return status;
23988         status = pthread_create( &t, &attr, task, NULL );
23989 #if HAVE_PTHREADS < 7
23990         if( status < 0 ) status = errno;
23991 #endif
23992         if( status ) return status;
23993 #else
23994         /* Draft 4 pthreads */
23995         status = pthread_create( &t, pthread_attr_default, task, NULL );
23996         if( status ) return errno;
23997
23998         /* give thread a chance to complete */
23999         /* it should remain joinable and hence detachable */
24000         sleep( 1 );
24001
24002         status = pthread_detach( &t );
24003         if( status ) return errno;
24004 #endif
24005
24006 #ifdef HAVE_LINUX_THREADS
24007         pthread_kill_other_threads_np();
24008 #endif
24009
24010         return 0;
24011
24012   ;
24013   return 0;
24014 }
24015 _ACEOF
24016 rm -f conftest.$ac_objext conftest$ac_exeext
24017 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24018   (eval $ac_link) 2>conftest.er1
24019   ac_status=$?
24020   grep -v '^ *+' conftest.er1 >conftest.err
24021   rm -f conftest.er1
24022   cat conftest.err >&5
24023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24024   (exit $ac_status); } &&
24025          { ac_try='test -z "$ac_c_werror_flag"
24026                          || test ! -s conftest.err'
24027   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24028   (eval $ac_try) 2>&5
24029   ac_status=$?
24030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24031   (exit $ac_status); }; } &&
24032          { ac_try='test -s conftest$ac_exeext'
24033   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24034   (eval $ac_try) 2>&5
24035   ac_status=$?
24036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24037   (exit $ac_status); }; }; then
24038   ol_cv_pthread_lib_lpthreads=yes
24039 else
24040   echo "$as_me: failed program was:" >&5
24041 sed 's/^/| /' conftest.$ac_ext >&5
24042
24043 ol_cv_pthread_lib_lpthreads=no
24044 fi
24045 rm -f conftest.err conftest.$ac_objext \
24046       conftest$ac_exeext conftest.$ac_ext
24047 else
24048   cat >conftest.$ac_ext <<_ACEOF
24049 /* confdefs.h.  */
24050 _ACEOF
24051 cat confdefs.h >>conftest.$ac_ext
24052 cat >>conftest.$ac_ext <<_ACEOF
24053 /* end confdefs.h.  */
24054
24055 /* pthread test headers */
24056 #include <pthread.h>
24057 #if HAVE_PTHREADS < 7
24058 #include <errno.h>
24059 #endif
24060 #ifndef NULL
24061 #define NULL (void*)0
24062 #endif
24063
24064 static void *task(p)
24065         void *p;
24066 {
24067         return (void *) (p == NULL);
24068 }
24069
24070
24071 int main(argc, argv)
24072         int argc;
24073         char **argv;
24074 {
24075
24076         /* pthread test function */
24077 #ifndef PTHREAD_CREATE_DETACHED
24078 #define PTHREAD_CREATE_DETACHED 1
24079 #endif
24080         pthread_t t;
24081         int status;
24082         int detach = PTHREAD_CREATE_DETACHED;
24083
24084 #if HAVE_PTHREADS > 4
24085         /* Final pthreads */
24086         pthread_attr_t attr;
24087
24088         status = pthread_attr_init(&attr);
24089         if( status ) return status;
24090
24091 #if HAVE_PTHREADS < 7
24092         status = pthread_attr_setdetachstate(&attr, &detach);
24093         if( status < 0 ) status = errno;
24094 #else
24095         status = pthread_attr_setdetachstate(&attr, detach);
24096 #endif
24097         if( status ) return status;
24098         status = pthread_create( &t, &attr, task, NULL );
24099 #if HAVE_PTHREADS < 7
24100         if( status < 0 ) status = errno;
24101 #endif
24102         if( status ) return status;
24103 #else
24104         /* Draft 4 pthreads */
24105         status = pthread_create( &t, pthread_attr_default, task, NULL );
24106         if( status ) return errno;
24107
24108         /* give thread a chance to complete */
24109         /* it should remain joinable and hence detachable */
24110         sleep( 1 );
24111
24112         status = pthread_detach( &t );
24113         if( status ) return errno;
24114 #endif
24115
24116 #ifdef HAVE_LINUX_THREADS
24117         pthread_kill_other_threads_np();
24118 #endif
24119
24120         return 0;
24121
24122 }
24123
24124 _ACEOF
24125 rm -f conftest$ac_exeext
24126 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24127   (eval $ac_link) 2>&5
24128   ac_status=$?
24129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24130   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24131   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24132   (eval $ac_try) 2>&5
24133   ac_status=$?
24134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24135   (exit $ac_status); }; }; then
24136   ol_cv_pthread_lib_lpthreads=yes
24137 else
24138   echo "$as_me: program exited with status $ac_status" >&5
24139 echo "$as_me: failed program was:" >&5
24140 sed 's/^/| /' conftest.$ac_ext >&5
24141
24142 ( exit $ac_status )
24143 ol_cv_pthread_lib_lpthreads=no
24144 fi
24145 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24146 fi
24147
24148                 # restore the LIBS
24149                 LIBS="$ol_LIBS"
24150
24151 fi
24152 echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthreads" >&5
24153 echo "${ECHO_T}$ol_cv_pthread_lib_lpthreads" >&6
24154
24155         if test $ol_cv_pthread_lib_lpthreads = yes ; then
24156                 ol_link_pthreads="-lpthreads"
24157                 ol_link_threads=posix
24158         fi
24159 fi
24160
24161
24162                 if test $ol_link_threads != no ; then
24163                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
24164
24165                                                 save_CPPFLAGS="$CPPFLAGS"
24166                         save_LIBS="$LIBS"
24167                         LIBS="$LTHREAD_LIBS $LIBS"
24168
24169
24170
24171
24172 for ac_func in sched_yield pthread_yield thr_yield
24173 do
24174 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24175 echo "$as_me:$LINENO: checking for $ac_func" >&5
24176 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24177 if eval "test \"\${$as_ac_var+set}\" = set"; then
24178   echo $ECHO_N "(cached) $ECHO_C" >&6
24179 else
24180   cat >conftest.$ac_ext <<_ACEOF
24181 /* confdefs.h.  */
24182 _ACEOF
24183 cat confdefs.h >>conftest.$ac_ext
24184 cat >>conftest.$ac_ext <<_ACEOF
24185 /* end confdefs.h.  */
24186 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24187    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24188 #define $ac_func innocuous_$ac_func
24189
24190 /* System header to define __stub macros and hopefully few prototypes,
24191     which can conflict with char $ac_func (); below.
24192     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24193     <limits.h> exists even on freestanding compilers.  */
24194
24195 #ifdef __STDC__
24196 # include <limits.h>
24197 #else
24198 # include <assert.h>
24199 #endif
24200
24201 #undef $ac_func
24202
24203 /* Override any gcc2 internal prototype to avoid an error.  */
24204 #ifdef __cplusplus
24205 extern "C"
24206 {
24207 #endif
24208 /* We use char because int might match the return type of a gcc2
24209    builtin and then its argument prototype would still apply.  */
24210 char $ac_func ();
24211 /* The GNU C library defines this for functions which it implements
24212     to always fail with ENOSYS.  Some functions are actually named
24213     something starting with __ and the normal name is an alias.  */
24214 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24215 choke me
24216 #else
24217 char (*f) () = $ac_func;
24218 #endif
24219 #ifdef __cplusplus
24220 }
24221 #endif
24222
24223 int
24224 main ()
24225 {
24226 return f != $ac_func;
24227   ;
24228   return 0;
24229 }
24230 _ACEOF
24231 rm -f conftest.$ac_objext conftest$ac_exeext
24232 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24233   (eval $ac_link) 2>conftest.er1
24234   ac_status=$?
24235   grep -v '^ *+' conftest.er1 >conftest.err
24236   rm -f conftest.er1
24237   cat conftest.err >&5
24238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24239   (exit $ac_status); } &&
24240          { ac_try='test -z "$ac_c_werror_flag"
24241                          || test ! -s conftest.err'
24242   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24243   (eval $ac_try) 2>&5
24244   ac_status=$?
24245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24246   (exit $ac_status); }; } &&
24247          { ac_try='test -s conftest$ac_exeext'
24248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24249   (eval $ac_try) 2>&5
24250   ac_status=$?
24251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24252   (exit $ac_status); }; }; then
24253   eval "$as_ac_var=yes"
24254 else
24255   echo "$as_me: failed program was:" >&5
24256 sed 's/^/| /' conftest.$ac_ext >&5
24257
24258 eval "$as_ac_var=no"
24259 fi
24260 rm -f conftest.err conftest.$ac_objext \
24261       conftest$ac_exeext conftest.$ac_ext
24262 fi
24263 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24264 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24265 if test `eval echo '${'$as_ac_var'}'` = yes; then
24266   cat >>confdefs.h <<_ACEOF
24267 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24268 _ACEOF
24269
24270 fi
24271 done
24272
24273
24274                         if test $ac_cv_func_sched_yield = no &&
24275                            test $ac_cv_func_pthread_yield = no &&
24276                            test $ac_cv_func_thr_yield = no ; then
24277                                                                 echo "$as_me:$LINENO: checking for sched_yield in -lrt" >&5
24278 echo $ECHO_N "checking for sched_yield in -lrt... $ECHO_C" >&6
24279 if test "${ac_cv_lib_rt_sched_yield+set}" = set; then
24280   echo $ECHO_N "(cached) $ECHO_C" >&6
24281 else
24282   ac_check_lib_save_LIBS=$LIBS
24283 LIBS="-lrt  $LIBS"
24284 cat >conftest.$ac_ext <<_ACEOF
24285 /* confdefs.h.  */
24286 _ACEOF
24287 cat confdefs.h >>conftest.$ac_ext
24288 cat >>conftest.$ac_ext <<_ACEOF
24289 /* end confdefs.h.  */
24290
24291 /* Override any gcc2 internal prototype to avoid an error.  */
24292 #ifdef __cplusplus
24293 extern "C"
24294 #endif
24295 /* We use char because int might match the return type of a gcc2
24296    builtin and then its argument prototype would still apply.  */
24297 char sched_yield ();
24298 int
24299 main ()
24300 {
24301 sched_yield ();
24302   ;
24303   return 0;
24304 }
24305 _ACEOF
24306 rm -f conftest.$ac_objext conftest$ac_exeext
24307 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24308   (eval $ac_link) 2>conftest.er1
24309   ac_status=$?
24310   grep -v '^ *+' conftest.er1 >conftest.err
24311   rm -f conftest.er1
24312   cat conftest.err >&5
24313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24314   (exit $ac_status); } &&
24315          { ac_try='test -z "$ac_c_werror_flag"
24316                          || test ! -s conftest.err'
24317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24318   (eval $ac_try) 2>&5
24319   ac_status=$?
24320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24321   (exit $ac_status); }; } &&
24322          { ac_try='test -s conftest$ac_exeext'
24323   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24324   (eval $ac_try) 2>&5
24325   ac_status=$?
24326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24327   (exit $ac_status); }; }; then
24328   ac_cv_lib_rt_sched_yield=yes
24329 else
24330   echo "$as_me: failed program was:" >&5
24331 sed 's/^/| /' conftest.$ac_ext >&5
24332
24333 ac_cv_lib_rt_sched_yield=no
24334 fi
24335 rm -f conftest.err conftest.$ac_objext \
24336       conftest$ac_exeext conftest.$ac_ext
24337 LIBS=$ac_check_lib_save_LIBS
24338 fi
24339 echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_yield" >&5
24340 echo "${ECHO_T}$ac_cv_lib_rt_sched_yield" >&6
24341 if test $ac_cv_lib_rt_sched_yield = yes; then
24342   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
24343
24344 cat >>confdefs.h <<\_ACEOF
24345 #define HAVE_SCHED_YIELD 1
24346 _ACEOF
24347
24348                                         ac_cv_func_sched_yield=yes
24349 else
24350   ac_cv_func_sched_yield=no
24351 fi
24352
24353                         fi
24354                         if test $ac_cv_func_sched_yield = no &&
24355                            test $ac_cv_func_pthread_yield = no &&
24356                            test "$ac_cv_func_thr_yield" = no ; then
24357                                 { echo "$as_me:$LINENO: WARNING: could not locate sched_yield() or pthread_yield()" >&5
24358 echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
24359                         fi
24360
24361
24362
24363 for ac_func in pthread_kill pthread_rwlock_destroy
24364 do
24365 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24366 echo "$as_me:$LINENO: checking for $ac_func" >&5
24367 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24368 if eval "test \"\${$as_ac_var+set}\" = set"; then
24369   echo $ECHO_N "(cached) $ECHO_C" >&6
24370 else
24371   cat >conftest.$ac_ext <<_ACEOF
24372 /* confdefs.h.  */
24373 _ACEOF
24374 cat confdefs.h >>conftest.$ac_ext
24375 cat >>conftest.$ac_ext <<_ACEOF
24376 /* end confdefs.h.  */
24377 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24378    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24379 #define $ac_func innocuous_$ac_func
24380
24381 /* System header to define __stub macros and hopefully few prototypes,
24382     which can conflict with char $ac_func (); below.
24383     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24384     <limits.h> exists even on freestanding compilers.  */
24385
24386 #ifdef __STDC__
24387 # include <limits.h>
24388 #else
24389 # include <assert.h>
24390 #endif
24391
24392 #undef $ac_func
24393
24394 /* Override any gcc2 internal prototype to avoid an error.  */
24395 #ifdef __cplusplus
24396 extern "C"
24397 {
24398 #endif
24399 /* We use char because int might match the return type of a gcc2
24400    builtin and then its argument prototype would still apply.  */
24401 char $ac_func ();
24402 /* The GNU C library defines this for functions which it implements
24403     to always fail with ENOSYS.  Some functions are actually named
24404     something starting with __ and the normal name is an alias.  */
24405 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24406 choke me
24407 #else
24408 char (*f) () = $ac_func;
24409 #endif
24410 #ifdef __cplusplus
24411 }
24412 #endif
24413
24414 int
24415 main ()
24416 {
24417 return f != $ac_func;
24418   ;
24419   return 0;
24420 }
24421 _ACEOF
24422 rm -f conftest.$ac_objext conftest$ac_exeext
24423 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24424   (eval $ac_link) 2>conftest.er1
24425   ac_status=$?
24426   grep -v '^ *+' conftest.er1 >conftest.err
24427   rm -f conftest.er1
24428   cat conftest.err >&5
24429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24430   (exit $ac_status); } &&
24431          { ac_try='test -z "$ac_c_werror_flag"
24432                          || test ! -s conftest.err'
24433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24434   (eval $ac_try) 2>&5
24435   ac_status=$?
24436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24437   (exit $ac_status); }; } &&
24438          { ac_try='test -s conftest$ac_exeext'
24439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24440   (eval $ac_try) 2>&5
24441   ac_status=$?
24442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24443   (exit $ac_status); }; }; then
24444   eval "$as_ac_var=yes"
24445 else
24446   echo "$as_me: failed program was:" >&5
24447 sed 's/^/| /' conftest.$ac_ext >&5
24448
24449 eval "$as_ac_var=no"
24450 fi
24451 rm -f conftest.err conftest.$ac_objext \
24452       conftest$ac_exeext conftest.$ac_ext
24453 fi
24454 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24455 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24456 if test `eval echo '${'$as_ac_var'}'` = yes; then
24457   cat >>confdefs.h <<_ACEOF
24458 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24459 _ACEOF
24460
24461 fi
24462 done
24463
24464
24465                                                                         echo "$as_me:$LINENO: checking for pthread_detach with <pthread.h>" >&5
24466 echo $ECHO_N "checking for pthread_detach with <pthread.h>... $ECHO_C" >&6
24467 if test "${ol_cv_func_pthread_detach+set}" = set; then
24468   echo $ECHO_N "(cached) $ECHO_C" >&6
24469 else
24470
24471                                                                 cat >conftest.$ac_ext <<_ACEOF
24472 /* confdefs.h.  */
24473 _ACEOF
24474 cat confdefs.h >>conftest.$ac_ext
24475 cat >>conftest.$ac_ext <<_ACEOF
24476 /* end confdefs.h.  */
24477
24478 #include <pthread.h>
24479 #ifndef NULL
24480 #define NULL (void*)0
24481 #endif
24482
24483 int
24484 main ()
24485 {
24486 pthread_detach(NULL);
24487   ;
24488   return 0;
24489 }
24490 _ACEOF
24491 rm -f conftest.$ac_objext conftest$ac_exeext
24492 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24493   (eval $ac_link) 2>conftest.er1
24494   ac_status=$?
24495   grep -v '^ *+' conftest.er1 >conftest.err
24496   rm -f conftest.er1
24497   cat conftest.err >&5
24498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24499   (exit $ac_status); } &&
24500          { ac_try='test -z "$ac_c_werror_flag"
24501                          || test ! -s conftest.err'
24502   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24503   (eval $ac_try) 2>&5
24504   ac_status=$?
24505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24506   (exit $ac_status); }; } &&
24507          { ac_try='test -s conftest$ac_exeext'
24508   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24509   (eval $ac_try) 2>&5
24510   ac_status=$?
24511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24512   (exit $ac_status); }; }; then
24513   ol_cv_func_pthread_detach=yes
24514 else
24515   echo "$as_me: failed program was:" >&5
24516 sed 's/^/| /' conftest.$ac_ext >&5
24517
24518 ol_cv_func_pthread_detach=no
24519 fi
24520 rm -f conftest.err conftest.$ac_objext \
24521       conftest$ac_exeext conftest.$ac_ext
24522
24523 fi
24524 echo "$as_me:$LINENO: result: $ol_cv_func_pthread_detach" >&5
24525 echo "${ECHO_T}$ol_cv_func_pthread_detach" >&6
24526
24527                         if test $ol_cv_func_pthread_detach = no ; then
24528                                 { { echo "$as_me:$LINENO: error: could not locate pthread_detach()" >&5
24529 echo "$as_me: error: could not locate pthread_detach()" >&2;}
24530    { (exit 1); exit 1; }; }
24531                         fi
24532
24533
24534 cat >>confdefs.h <<\_ACEOF
24535 #define HAVE_PTHREAD_DETACH 1
24536 _ACEOF
24537
24538
24539
24540
24541
24542
24543 for ac_func in \
24544                                 pthread_setconcurrency \
24545                                 pthread_getconcurrency \
24546                                 thr_setconcurrency \
24547                                 thr_getconcurrency \
24548
24549 do
24550 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24551 echo "$as_me:$LINENO: checking for $ac_func" >&5
24552 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24553 if eval "test \"\${$as_ac_var+set}\" = set"; then
24554   echo $ECHO_N "(cached) $ECHO_C" >&6
24555 else
24556   cat >conftest.$ac_ext <<_ACEOF
24557 /* confdefs.h.  */
24558 _ACEOF
24559 cat confdefs.h >>conftest.$ac_ext
24560 cat >>conftest.$ac_ext <<_ACEOF
24561 /* end confdefs.h.  */
24562 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24563    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24564 #define $ac_func innocuous_$ac_func
24565
24566 /* System header to define __stub macros and hopefully few prototypes,
24567     which can conflict with char $ac_func (); below.
24568     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24569     <limits.h> exists even on freestanding compilers.  */
24570
24571 #ifdef __STDC__
24572 # include <limits.h>
24573 #else
24574 # include <assert.h>
24575 #endif
24576
24577 #undef $ac_func
24578
24579 /* Override any gcc2 internal prototype to avoid an error.  */
24580 #ifdef __cplusplus
24581 extern "C"
24582 {
24583 #endif
24584 /* We use char because int might match the return type of a gcc2
24585    builtin and then its argument prototype would still apply.  */
24586 char $ac_func ();
24587 /* The GNU C library defines this for functions which it implements
24588     to always fail with ENOSYS.  Some functions are actually named
24589     something starting with __ and the normal name is an alias.  */
24590 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24591 choke me
24592 #else
24593 char (*f) () = $ac_func;
24594 #endif
24595 #ifdef __cplusplus
24596 }
24597 #endif
24598
24599 int
24600 main ()
24601 {
24602 return f != $ac_func;
24603   ;
24604   return 0;
24605 }
24606 _ACEOF
24607 rm -f conftest.$ac_objext conftest$ac_exeext
24608 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24609   (eval $ac_link) 2>conftest.er1
24610   ac_status=$?
24611   grep -v '^ *+' conftest.er1 >conftest.err
24612   rm -f conftest.er1
24613   cat conftest.err >&5
24614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24615   (exit $ac_status); } &&
24616          { ac_try='test -z "$ac_c_werror_flag"
24617                          || test ! -s conftest.err'
24618   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24619   (eval $ac_try) 2>&5
24620   ac_status=$?
24621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24622   (exit $ac_status); }; } &&
24623          { ac_try='test -s conftest$ac_exeext'
24624   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24625   (eval $ac_try) 2>&5
24626   ac_status=$?
24627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24628   (exit $ac_status); }; }; then
24629   eval "$as_ac_var=yes"
24630 else
24631   echo "$as_me: failed program was:" >&5
24632 sed 's/^/| /' conftest.$ac_ext >&5
24633
24634 eval "$as_ac_var=no"
24635 fi
24636 rm -f conftest.err conftest.$ac_objext \
24637       conftest$ac_exeext conftest.$ac_ext
24638 fi
24639 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24640 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24641 if test `eval echo '${'$as_ac_var'}'` = yes; then
24642   cat >>confdefs.h <<_ACEOF
24643 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24644 _ACEOF
24645
24646 fi
24647 done
24648
24649
24650
24651
24652 for ac_func in pthread_kill_other_threads_np
24653 do
24654 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24655 echo "$as_me:$LINENO: checking for $ac_func" >&5
24656 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24657 if eval "test \"\${$as_ac_var+set}\" = set"; then
24658   echo $ECHO_N "(cached) $ECHO_C" >&6
24659 else
24660   cat >conftest.$ac_ext <<_ACEOF
24661 /* confdefs.h.  */
24662 _ACEOF
24663 cat confdefs.h >>conftest.$ac_ext
24664 cat >>conftest.$ac_ext <<_ACEOF
24665 /* end confdefs.h.  */
24666 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24667    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24668 #define $ac_func innocuous_$ac_func
24669
24670 /* System header to define __stub macros and hopefully few prototypes,
24671     which can conflict with char $ac_func (); below.
24672     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24673     <limits.h> exists even on freestanding compilers.  */
24674
24675 #ifdef __STDC__
24676 # include <limits.h>
24677 #else
24678 # include <assert.h>
24679 #endif
24680
24681 #undef $ac_func
24682
24683 /* Override any gcc2 internal prototype to avoid an error.  */
24684 #ifdef __cplusplus
24685 extern "C"
24686 {
24687 #endif
24688 /* We use char because int might match the return type of a gcc2
24689    builtin and then its argument prototype would still apply.  */
24690 char $ac_func ();
24691 /* The GNU C library defines this for functions which it implements
24692     to always fail with ENOSYS.  Some functions are actually named
24693     something starting with __ and the normal name is an alias.  */
24694 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24695 choke me
24696 #else
24697 char (*f) () = $ac_func;
24698 #endif
24699 #ifdef __cplusplus
24700 }
24701 #endif
24702
24703 int
24704 main ()
24705 {
24706 return f != $ac_func;
24707   ;
24708   return 0;
24709 }
24710 _ACEOF
24711 rm -f conftest.$ac_objext conftest$ac_exeext
24712 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24713   (eval $ac_link) 2>conftest.er1
24714   ac_status=$?
24715   grep -v '^ *+' conftest.er1 >conftest.err
24716   rm -f conftest.er1
24717   cat conftest.err >&5
24718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24719   (exit $ac_status); } &&
24720          { ac_try='test -z "$ac_c_werror_flag"
24721                          || test ! -s conftest.err'
24722   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24723   (eval $ac_try) 2>&5
24724   ac_status=$?
24725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24726   (exit $ac_status); }; } &&
24727          { ac_try='test -s conftest$ac_exeext'
24728   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24729   (eval $ac_try) 2>&5
24730   ac_status=$?
24731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24732   (exit $ac_status); }; }; then
24733   eval "$as_ac_var=yes"
24734 else
24735   echo "$as_me: failed program was:" >&5
24736 sed 's/^/| /' conftest.$ac_ext >&5
24737
24738 eval "$as_ac_var=no"
24739 fi
24740 rm -f conftest.err conftest.$ac_objext \
24741       conftest$ac_exeext conftest.$ac_ext
24742 fi
24743 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24744 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24745 if test `eval echo '${'$as_ac_var'}'` = yes; then
24746   cat >>confdefs.h <<_ACEOF
24747 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24748 _ACEOF
24749
24750 fi
24751 done
24752
24753         echo "$as_me:$LINENO: checking for LinuxThreads implementation" >&5
24754 echo $ECHO_N "checking for LinuxThreads implementation... $ECHO_C" >&6
24755 if test "${ol_cv_sys_linux_threads+set}" = set; then
24756   echo $ECHO_N "(cached) $ECHO_C" >&6
24757 else
24758   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
24759 fi
24760 echo "$as_me:$LINENO: result: $ol_cv_sys_linux_threads" >&5
24761 echo "${ECHO_T}$ol_cv_sys_linux_threads" >&6
24762
24763
24764
24765
24766         echo "$as_me:$LINENO: checking for LinuxThreads consistency" >&5
24767 echo $ECHO_N "checking for LinuxThreads consistency... $ECHO_C" >&6
24768 if test "${ol_cv_linux_threads+set}" = set; then
24769   echo $ECHO_N "(cached) $ECHO_C" >&6
24770 else
24771
24772                 if test $ol_cv_header_linux_threads = yes &&
24773                    test $ol_cv_sys_linux_threads = yes; then
24774                         ol_cv_linux_threads=yes
24775                 elif test $ol_cv_header_linux_threads = no &&
24776                      test $ol_cv_sys_linux_threads = no; then
24777                         ol_cv_linux_threads=no
24778                 else
24779                         ol_cv_linux_threads=error
24780                 fi
24781
24782 fi
24783 echo "$as_me:$LINENO: result: $ol_cv_linux_threads" >&5
24784 echo "${ECHO_T}$ol_cv_linux_threads" >&6
24785
24786
24787                         if test $ol_cv_linux_threads = error; then
24788                                 { { echo "$as_me:$LINENO: error: LinuxThreads header/library mismatch" >&5
24789 echo "$as_me: error: LinuxThreads header/library mismatch" >&2;}
24790    { (exit 1); exit 1; }; };
24791                         fi
24792
24793                         echo "$as_me:$LINENO: checking if pthread_create() works" >&5
24794 echo $ECHO_N "checking if pthread_create() works... $ECHO_C" >&6
24795 if test "${ol_cv_pthread_create_works+set}" = set; then
24796   echo $ECHO_N "(cached) $ECHO_C" >&6
24797 else
24798
24799                         if test "$cross_compiling" = yes; then
24800                                 ol_cv_pthread_create_works=yes
24801 else
24802   cat >conftest.$ac_ext <<_ACEOF
24803 /* confdefs.h.  */
24804 _ACEOF
24805 cat confdefs.h >>conftest.$ac_ext
24806 cat >>conftest.$ac_ext <<_ACEOF
24807 /* end confdefs.h.  */
24808
24809 /* pthread test headers */
24810 #include <pthread.h>
24811 #if HAVE_PTHREADS < 7
24812 #include <errno.h>
24813 #endif
24814 #ifndef NULL
24815 #define NULL (void*)0
24816 #endif
24817
24818 static void *task(p)
24819         void *p;
24820 {
24821         return (void *) (p == NULL);
24822 }
24823
24824
24825 int main(argc, argv)
24826         int argc;
24827         char **argv;
24828 {
24829
24830         /* pthread test function */
24831 #ifndef PTHREAD_CREATE_DETACHED
24832 #define PTHREAD_CREATE_DETACHED 1
24833 #endif
24834         pthread_t t;
24835         int status;
24836         int detach = PTHREAD_CREATE_DETACHED;
24837
24838 #if HAVE_PTHREADS > 4
24839         /* Final pthreads */
24840         pthread_attr_t attr;
24841
24842         status = pthread_attr_init(&attr);
24843         if( status ) return status;
24844
24845 #if HAVE_PTHREADS < 7
24846         status = pthread_attr_setdetachstate(&attr, &detach);
24847         if( status < 0 ) status = errno;
24848 #else
24849         status = pthread_attr_setdetachstate(&attr, detach);
24850 #endif
24851         if( status ) return status;
24852         status = pthread_create( &t, &attr, task, NULL );
24853 #if HAVE_PTHREADS < 7
24854         if( status < 0 ) status = errno;
24855 #endif
24856         if( status ) return status;
24857 #else
24858         /* Draft 4 pthreads */
24859         status = pthread_create( &t, pthread_attr_default, task, NULL );
24860         if( status ) return errno;
24861
24862         /* give thread a chance to complete */
24863         /* it should remain joinable and hence detachable */
24864         sleep( 1 );
24865
24866         status = pthread_detach( &t );
24867         if( status ) return errno;
24868 #endif
24869
24870 #ifdef HAVE_LINUX_THREADS
24871         pthread_kill_other_threads_np();
24872 #endif
24873
24874         return 0;
24875
24876 }
24877
24878 _ACEOF
24879 rm -f conftest$ac_exeext
24880 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24881   (eval $ac_link) 2>&5
24882   ac_status=$?
24883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24884   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24886   (eval $ac_try) 2>&5
24887   ac_status=$?
24888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24889   (exit $ac_status); }; }; then
24890   ol_cv_pthread_create_works=yes
24891 else
24892   echo "$as_me: program exited with status $ac_status" >&5
24893 echo "$as_me: failed program was:" >&5
24894 sed 's/^/| /' conftest.$ac_ext >&5
24895
24896 ( exit $ac_status )
24897 ol_cv_pthread_create_works=no
24898 fi
24899 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24900 fi
24901 fi
24902 echo "$as_me:$LINENO: result: $ol_cv_pthread_create_works" >&5
24903 echo "${ECHO_T}$ol_cv_pthread_create_works" >&6
24904
24905                         if test $ol_cv_pthread_create_works = no ; then
24906                                 { { echo "$as_me:$LINENO: error: pthread_create is not usable, check environment settings" >&5
24907 echo "$as_me: error: pthread_create is not usable, check environment settings" >&2;}
24908    { (exit 1); exit 1; }; }
24909                         fi
24910
24911                         ol_replace_broken_yield=no
24912
24913                         if test $ol_replace_broken_yield = yes ; then
24914
24915 cat >>confdefs.h <<\_ACEOF
24916 #define REPLACE_BROKEN_YIELD 1
24917 _ACEOF
24918
24919                         fi
24920
24921                                                 if test $ol_with_yielding_select = auto ; then
24922                                 echo "$as_me:$LINENO: checking if select yields when using pthreads" >&5
24923 echo $ECHO_N "checking if select yields when using pthreads... $ECHO_C" >&6
24924 if test "${ol_cv_pthread_select_yields+set}" = set; then
24925   echo $ECHO_N "(cached) $ECHO_C" >&6
24926 else
24927
24928                                 if test "$cross_compiling" = yes; then
24929   ol_cv_pthread_select_yields=cross
24930 else
24931   cat >conftest.$ac_ext <<_ACEOF
24932 /* confdefs.h.  */
24933 _ACEOF
24934 cat confdefs.h >>conftest.$ac_ext
24935 cat >>conftest.$ac_ext <<_ACEOF
24936 /* end confdefs.h.  */
24937
24938 #include <sys/types.h>
24939 #include <sys/time.h>
24940 #include <unistd.h>
24941 #include <pthread.h>
24942 #ifndef NULL
24943 #define NULL (void*) 0
24944 #endif
24945
24946 static int fildes[2];
24947
24948 static void *task(p)
24949         void *p;
24950 {
24951         int i;
24952         struct timeval tv;
24953
24954         fd_set rfds;
24955
24956         tv.tv_sec=10;
24957         tv.tv_usec=0;
24958
24959         FD_ZERO(&rfds);
24960         FD_SET(fildes[0], &rfds);
24961
24962         /* we're not interested in any fds */
24963         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
24964
24965         if(i < 0) {
24966                 perror("select");
24967                 exit(10);
24968         }
24969
24970         exit(0); /* if we exit here, the select blocked the whole process */
24971 }
24972
24973 int main(argc, argv)
24974         int argc;
24975         char **argv;
24976 {
24977         pthread_t t;
24978
24979         /* create a pipe to select */
24980         if(pipe(&fildes[0])) {
24981                 perror("select");
24982                 exit(1);
24983         }
24984
24985 #ifdef HAVE_PTHREAD_SETCONCURRENCY
24986         (void) pthread_setconcurrency(2);
24987 #else
24988 #ifdef HAVE_THR_SETCONCURRENCY
24989         /* Set Solaris LWP concurrency to 2 */
24990         thr_setconcurrency(2);
24991 #endif
24992 #endif
24993
24994 #if HAVE_PTHREADS < 6
24995         pthread_create(&t, pthread_attr_default, task, NULL);
24996 #else
24997         pthread_create(&t, NULL, task, NULL);
24998 #endif
24999
25000         /* make sure task runs first */
25001 #if HAVE_THR_YIELD
25002         thr_yield();
25003 #elif defined( HAVE_SCHED_YIELD )
25004         sched_yield();
25005 #elif defined( HAVE_PTHREAD_YIELD )
25006         pthread_yield();
25007 #endif
25008
25009         exit(2);
25010 }
25011 _ACEOF
25012 rm -f conftest$ac_exeext
25013 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25014   (eval $ac_link) 2>&5
25015   ac_status=$?
25016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25017   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25018   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25019   (eval $ac_try) 2>&5
25020   ac_status=$?
25021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25022   (exit $ac_status); }; }; then
25023   ol_cv_pthread_select_yields=no
25024 else
25025   echo "$as_me: program exited with status $ac_status" >&5
25026 echo "$as_me: failed program was:" >&5
25027 sed 's/^/| /' conftest.$ac_ext >&5
25028
25029 ( exit $ac_status )
25030 ol_cv_pthread_select_yields=yes
25031 fi
25032 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25033 fi
25034 fi
25035 echo "$as_me:$LINENO: result: $ol_cv_pthread_select_yields" >&5
25036 echo "${ECHO_T}$ol_cv_pthread_select_yields" >&6
25037
25038                                 if test $ol_cv_pthread_select_yields = cross ; then
25039                                         { { echo "$as_me:$LINENO: error: crossing compiling: use --with-yielding_select=yes|no|manual" >&5
25040 echo "$as_me: error: crossing compiling: use --with-yielding_select=yes|no|manual" >&2;}
25041    { (exit 1); exit 1; }; }
25042                                 fi
25043
25044                                 if test $ol_cv_pthread_select_yields = yes ; then
25045                                         ol_with_yielding_select=yes
25046                                 fi
25047                         fi
25048
25049                                                 CPPFLAGS="$save_CPPFLAGS"
25050                         LIBS="$save_LIBS"
25051                 else
25052                         { { echo "$as_me:$LINENO: error: could not locate usable POSIX Threads" >&5
25053 echo "$as_me: error: could not locate usable POSIX Threads" >&2;}
25054    { (exit 1); exit 1; }; }
25055                 fi
25056         fi
25057
25058         if test $ol_with_threads = posix ; then
25059                 { { echo "$as_me:$LINENO: error: could not locate POSIX Threads" >&5
25060 echo "$as_me: error: could not locate POSIX Threads" >&2;}
25061    { (exit 1); exit 1; }; }
25062         fi
25063         ;;
25064 esac
25065
25066 case $ol_with_threads in auto | yes | mach)
25067
25068
25069
25070 for ac_header in mach/cthreads.h cthreads.h
25071 do
25072 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25073 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25074   echo "$as_me:$LINENO: checking for $ac_header" >&5
25075 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25076 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25077   echo $ECHO_N "(cached) $ECHO_C" >&6
25078 fi
25079 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25080 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25081 else
25082   # Is the header compilable?
25083 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25084 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25085 cat >conftest.$ac_ext <<_ACEOF
25086 /* confdefs.h.  */
25087 _ACEOF
25088 cat confdefs.h >>conftest.$ac_ext
25089 cat >>conftest.$ac_ext <<_ACEOF
25090 /* end confdefs.h.  */
25091 $ac_includes_default
25092 #include <$ac_header>
25093 _ACEOF
25094 rm -f conftest.$ac_objext
25095 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25096   (eval $ac_compile) 2>conftest.er1
25097   ac_status=$?
25098   grep -v '^ *+' conftest.er1 >conftest.err
25099   rm -f conftest.er1
25100   cat conftest.err >&5
25101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25102   (exit $ac_status); } &&
25103          { ac_try='test -z "$ac_c_werror_flag"
25104                          || test ! -s conftest.err'
25105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25106   (eval $ac_try) 2>&5
25107   ac_status=$?
25108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25109   (exit $ac_status); }; } &&
25110          { ac_try='test -s conftest.$ac_objext'
25111   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25112   (eval $ac_try) 2>&5
25113   ac_status=$?
25114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25115   (exit $ac_status); }; }; then
25116   ac_header_compiler=yes
25117 else
25118   echo "$as_me: failed program was:" >&5
25119 sed 's/^/| /' conftest.$ac_ext >&5
25120
25121 ac_header_compiler=no
25122 fi
25123 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25124 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25125 echo "${ECHO_T}$ac_header_compiler" >&6
25126
25127 # Is the header present?
25128 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25129 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
25130 cat >conftest.$ac_ext <<_ACEOF
25131 /* confdefs.h.  */
25132 _ACEOF
25133 cat confdefs.h >>conftest.$ac_ext
25134 cat >>conftest.$ac_ext <<_ACEOF
25135 /* end confdefs.h.  */
25136 #include <$ac_header>
25137 _ACEOF
25138 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25139   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25140   ac_status=$?
25141   grep -v '^ *+' conftest.er1 >conftest.err
25142   rm -f conftest.er1
25143   cat conftest.err >&5
25144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25145   (exit $ac_status); } >/dev/null; then
25146   if test -s conftest.err; then
25147     ac_cpp_err=$ac_c_preproc_warn_flag
25148     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25149   else
25150     ac_cpp_err=
25151   fi
25152 else
25153   ac_cpp_err=yes
25154 fi
25155 if test -z "$ac_cpp_err"; then
25156   ac_header_preproc=yes
25157 else
25158   echo "$as_me: failed program was:" >&5
25159 sed 's/^/| /' conftest.$ac_ext >&5
25160
25161   ac_header_preproc=no
25162 fi
25163 rm -f conftest.err conftest.$ac_ext
25164 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25165 echo "${ECHO_T}$ac_header_preproc" >&6
25166
25167 # So?  What about this header?
25168 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25169   yes:no: )
25170     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25171 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25172     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25173 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25174     ac_header_preproc=yes
25175     ;;
25176   no:yes:* )
25177     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25178 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25179     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25180 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25181     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25182 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25183     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25184 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25185     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25186 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25187     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25188 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25189     (
25190       cat <<\_ASBOX
25191 ## --------------------------------------------- ##
25192 ## Report this to <http://www.openldap.org/its/> ##
25193 ## --------------------------------------------- ##
25194 _ASBOX
25195     ) |
25196       sed "s/^/$as_me: WARNING:     /" >&2
25197     ;;
25198 esac
25199 echo "$as_me:$LINENO: checking for $ac_header" >&5
25200 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25201 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25202   echo $ECHO_N "(cached) $ECHO_C" >&6
25203 else
25204   eval "$as_ac_Header=\$ac_header_preproc"
25205 fi
25206 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25207 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25208
25209 fi
25210 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25211   cat >>confdefs.h <<_ACEOF
25212 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25213 _ACEOF
25214
25215 fi
25216
25217 done
25218
25219         if test $ac_cv_header_mach_cthreads_h = yes ; then
25220                 ol_with_threads=found
25221
25222                                 echo "$as_me:$LINENO: checking for cthread_fork" >&5
25223 echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6
25224 if test "${ac_cv_func_cthread_fork+set}" = set; then
25225   echo $ECHO_N "(cached) $ECHO_C" >&6
25226 else
25227   cat >conftest.$ac_ext <<_ACEOF
25228 /* confdefs.h.  */
25229 _ACEOF
25230 cat confdefs.h >>conftest.$ac_ext
25231 cat >>conftest.$ac_ext <<_ACEOF
25232 /* end confdefs.h.  */
25233 /* Define cthread_fork to an innocuous variant, in case <limits.h> declares cthread_fork.
25234    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
25235 #define cthread_fork innocuous_cthread_fork
25236
25237 /* System header to define __stub macros and hopefully few prototypes,
25238     which can conflict with char cthread_fork (); below.
25239     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25240     <limits.h> exists even on freestanding compilers.  */
25241
25242 #ifdef __STDC__
25243 # include <limits.h>
25244 #else
25245 # include <assert.h>
25246 #endif
25247
25248 #undef cthread_fork
25249
25250 /* Override any gcc2 internal prototype to avoid an error.  */
25251 #ifdef __cplusplus
25252 extern "C"
25253 {
25254 #endif
25255 /* We use char because int might match the return type of a gcc2
25256    builtin and then its argument prototype would still apply.  */
25257 char cthread_fork ();
25258 /* The GNU C library defines this for functions which it implements
25259     to always fail with ENOSYS.  Some functions are actually named
25260     something starting with __ and the normal name is an alias.  */
25261 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
25262 choke me
25263 #else
25264 char (*f) () = cthread_fork;
25265 #endif
25266 #ifdef __cplusplus
25267 }
25268 #endif
25269
25270 int
25271 main ()
25272 {
25273 return f != cthread_fork;
25274   ;
25275   return 0;
25276 }
25277 _ACEOF
25278 rm -f conftest.$ac_objext conftest$ac_exeext
25279 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25280   (eval $ac_link) 2>conftest.er1
25281   ac_status=$?
25282   grep -v '^ *+' conftest.er1 >conftest.err
25283   rm -f conftest.er1
25284   cat conftest.err >&5
25285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25286   (exit $ac_status); } &&
25287          { ac_try='test -z "$ac_c_werror_flag"
25288                          || test ! -s conftest.err'
25289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25290   (eval $ac_try) 2>&5
25291   ac_status=$?
25292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25293   (exit $ac_status); }; } &&
25294          { ac_try='test -s conftest$ac_exeext'
25295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25296   (eval $ac_try) 2>&5
25297   ac_status=$?
25298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25299   (exit $ac_status); }; }; then
25300   ac_cv_func_cthread_fork=yes
25301 else
25302   echo "$as_me: failed program was:" >&5
25303 sed 's/^/| /' conftest.$ac_ext >&5
25304
25305 ac_cv_func_cthread_fork=no
25306 fi
25307 rm -f conftest.err conftest.$ac_objext \
25308       conftest$ac_exeext conftest.$ac_ext
25309 fi
25310 echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5
25311 echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6
25312 if test $ac_cv_func_cthread_fork = yes; then
25313   ol_link_threads=yes
25314 fi
25315
25316
25317                 if test $ol_link_threads = no ; then
25318                                                                         echo "$as_me:$LINENO: checking for cthread_fork with -all_load" >&5
25319 echo $ECHO_N "checking for cthread_fork with -all_load... $ECHO_C" >&6
25320 if test "${ol_cv_cthread_all_load+set}" = set; then
25321   echo $ECHO_N "(cached) $ECHO_C" >&6
25322 else
25323
25324                                                                 save_LIBS="$LIBS"
25325                                 LIBS="-all_load $LIBS"
25326                                 cat >conftest.$ac_ext <<_ACEOF
25327 /* confdefs.h.  */
25328 _ACEOF
25329 cat confdefs.h >>conftest.$ac_ext
25330 cat >>conftest.$ac_ext <<_ACEOF
25331 /* end confdefs.h.  */
25332 #include <mach/cthreads.h>
25333 int
25334 main ()
25335 {
25336
25337                                         cthread_fork((void *)0, (void *)0);
25338
25339   ;
25340   return 0;
25341 }
25342 _ACEOF
25343 rm -f conftest.$ac_objext conftest$ac_exeext
25344 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25345   (eval $ac_link) 2>conftest.er1
25346   ac_status=$?
25347   grep -v '^ *+' conftest.er1 >conftest.err
25348   rm -f conftest.er1
25349   cat conftest.err >&5
25350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25351   (exit $ac_status); } &&
25352          { ac_try='test -z "$ac_c_werror_flag"
25353                          || test ! -s conftest.err'
25354   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25355   (eval $ac_try) 2>&5
25356   ac_status=$?
25357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25358   (exit $ac_status); }; } &&
25359          { ac_try='test -s conftest$ac_exeext'
25360   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25361   (eval $ac_try) 2>&5
25362   ac_status=$?
25363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25364   (exit $ac_status); }; }; then
25365   ol_cv_cthread_all_load=yes
25366 else
25367   echo "$as_me: failed program was:" >&5
25368 sed 's/^/| /' conftest.$ac_ext >&5
25369
25370 ol_cv_cthread_all_load=no
25371 fi
25372 rm -f conftest.err conftest.$ac_objext \
25373       conftest$ac_exeext conftest.$ac_ext
25374                                                                 LIBS="$save_LIBS"
25375
25376 fi
25377 echo "$as_me:$LINENO: result: $ol_cv_cthread_all_load" >&5
25378 echo "${ECHO_T}$ol_cv_cthread_all_load" >&6
25379
25380                         if test $ol_cv_cthread_all_load = yes ; then
25381                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
25382                                 ol_link_threads=mach
25383                                 ol_with_threads=found
25384                         fi
25385                 fi
25386
25387         elif test $ac_cv_header_cthreads_h = yes ; then
25388
25389                 ol_with_threads=found
25390
25391                                 save_LIBS="$LIBS"
25392                 LIBS="$LIBS -lthreads"
25393                 echo "$as_me:$LINENO: checking for cthread_fork" >&5
25394 echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6
25395 if test "${ac_cv_func_cthread_fork+set}" = set; then
25396   echo $ECHO_N "(cached) $ECHO_C" >&6
25397 else
25398   cat >conftest.$ac_ext <<_ACEOF
25399 /* confdefs.h.  */
25400 _ACEOF
25401 cat confdefs.h >>conftest.$ac_ext
25402 cat >>conftest.$ac_ext <<_ACEOF
25403 /* end confdefs.h.  */
25404 /* Define cthread_fork to an innocuous variant, in case <limits.h> declares cthread_fork.
25405    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
25406 #define cthread_fork innocuous_cthread_fork
25407
25408 /* System header to define __stub macros and hopefully few prototypes,
25409     which can conflict with char cthread_fork (); below.
25410     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25411     <limits.h> exists even on freestanding compilers.  */
25412
25413 #ifdef __STDC__
25414 # include <limits.h>
25415 #else
25416 # include <assert.h>
25417 #endif
25418
25419 #undef cthread_fork
25420
25421 /* Override any gcc2 internal prototype to avoid an error.  */
25422 #ifdef __cplusplus
25423 extern "C"
25424 {
25425 #endif
25426 /* We use char because int might match the return type of a gcc2
25427    builtin and then its argument prototype would still apply.  */
25428 char cthread_fork ();
25429 /* The GNU C library defines this for functions which it implements
25430     to always fail with ENOSYS.  Some functions are actually named
25431     something starting with __ and the normal name is an alias.  */
25432 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
25433 choke me
25434 #else
25435 char (*f) () = cthread_fork;
25436 #endif
25437 #ifdef __cplusplus
25438 }
25439 #endif
25440
25441 int
25442 main ()
25443 {
25444 return f != cthread_fork;
25445   ;
25446   return 0;
25447 }
25448 _ACEOF
25449 rm -f conftest.$ac_objext conftest$ac_exeext
25450 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25451   (eval $ac_link) 2>conftest.er1
25452   ac_status=$?
25453   grep -v '^ *+' conftest.er1 >conftest.err
25454   rm -f conftest.er1
25455   cat conftest.err >&5
25456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25457   (exit $ac_status); } &&
25458          { ac_try='test -z "$ac_c_werror_flag"
25459                          || test ! -s conftest.err'
25460   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25461   (eval $ac_try) 2>&5
25462   ac_status=$?
25463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25464   (exit $ac_status); }; } &&
25465          { ac_try='test -s conftest$ac_exeext'
25466   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25467   (eval $ac_try) 2>&5
25468   ac_status=$?
25469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25470   (exit $ac_status); }; }; then
25471   ac_cv_func_cthread_fork=yes
25472 else
25473   echo "$as_me: failed program was:" >&5
25474 sed 's/^/| /' conftest.$ac_ext >&5
25475
25476 ac_cv_func_cthread_fork=no
25477 fi
25478 rm -f conftest.err conftest.$ac_objext \
25479       conftest$ac_exeext conftest.$ac_ext
25480 fi
25481 echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5
25482 echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6
25483 if test $ac_cv_func_cthread_fork = yes; then
25484   ol_link_threads=yes
25485 fi
25486
25487                 LIBS="$save_LIBS"
25488
25489                 if test $ol_link_threads = yes ; then
25490                         LTHREAD_LIBS="-lthreads"
25491                         ol_link_threads=mach
25492                         ol_with_threads=found
25493                 else
25494                         { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5
25495 echo "$as_me: error: could not link with Mach CThreads" >&2;}
25496    { (exit 1); exit 1; }; }
25497                 fi
25498
25499         elif test $ol_with_threads = mach ; then
25500                 { { echo "$as_me:$LINENO: error: could not locate Mach CThreads" >&5
25501 echo "$as_me: error: could not locate Mach CThreads" >&2;}
25502    { (exit 1); exit 1; }; }
25503         fi
25504
25505         if test $ol_link_threads = mach ; then
25506
25507 cat >>confdefs.h <<\_ACEOF
25508 #define HAVE_MACH_CTHREADS 1
25509 _ACEOF
25510
25511         elif test $ol_with_threads = found ; then
25512                 { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5
25513 echo "$as_me: error: could not link with Mach CThreads" >&2;}
25514    { (exit 1); exit 1; }; }
25515         fi
25516         ;;
25517 esac
25518
25519 case $ol_with_threads in auto | yes | pth)
25520
25521
25522 for ac_header in pth.h
25523 do
25524 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25525 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25526   echo "$as_me:$LINENO: checking for $ac_header" >&5
25527 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25528 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25529   echo $ECHO_N "(cached) $ECHO_C" >&6
25530 fi
25531 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25532 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25533 else
25534   # Is the header compilable?
25535 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25536 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25537 cat >conftest.$ac_ext <<_ACEOF
25538 /* confdefs.h.  */
25539 _ACEOF
25540 cat confdefs.h >>conftest.$ac_ext
25541 cat >>conftest.$ac_ext <<_ACEOF
25542 /* end confdefs.h.  */
25543 $ac_includes_default
25544 #include <$ac_header>
25545 _ACEOF
25546 rm -f conftest.$ac_objext
25547 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25548   (eval $ac_compile) 2>conftest.er1
25549   ac_status=$?
25550   grep -v '^ *+' conftest.er1 >conftest.err
25551   rm -f conftest.er1
25552   cat conftest.err >&5
25553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25554   (exit $ac_status); } &&
25555          { ac_try='test -z "$ac_c_werror_flag"
25556                          || test ! -s conftest.err'
25557   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25558   (eval $ac_try) 2>&5
25559   ac_status=$?
25560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25561   (exit $ac_status); }; } &&
25562          { ac_try='test -s conftest.$ac_objext'
25563   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25564   (eval $ac_try) 2>&5
25565   ac_status=$?
25566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25567   (exit $ac_status); }; }; then
25568   ac_header_compiler=yes
25569 else
25570   echo "$as_me: failed program was:" >&5
25571 sed 's/^/| /' conftest.$ac_ext >&5
25572
25573 ac_header_compiler=no
25574 fi
25575 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25576 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25577 echo "${ECHO_T}$ac_header_compiler" >&6
25578
25579 # Is the header present?
25580 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25581 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
25582 cat >conftest.$ac_ext <<_ACEOF
25583 /* confdefs.h.  */
25584 _ACEOF
25585 cat confdefs.h >>conftest.$ac_ext
25586 cat >>conftest.$ac_ext <<_ACEOF
25587 /* end confdefs.h.  */
25588 #include <$ac_header>
25589 _ACEOF
25590 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25591   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25592   ac_status=$?
25593   grep -v '^ *+' conftest.er1 >conftest.err
25594   rm -f conftest.er1
25595   cat conftest.err >&5
25596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25597   (exit $ac_status); } >/dev/null; then
25598   if test -s conftest.err; then
25599     ac_cpp_err=$ac_c_preproc_warn_flag
25600     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25601   else
25602     ac_cpp_err=
25603   fi
25604 else
25605   ac_cpp_err=yes
25606 fi
25607 if test -z "$ac_cpp_err"; then
25608   ac_header_preproc=yes
25609 else
25610   echo "$as_me: failed program was:" >&5
25611 sed 's/^/| /' conftest.$ac_ext >&5
25612
25613   ac_header_preproc=no
25614 fi
25615 rm -f conftest.err conftest.$ac_ext
25616 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25617 echo "${ECHO_T}$ac_header_preproc" >&6
25618
25619 # So?  What about this header?
25620 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25621   yes:no: )
25622     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25623 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25624     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25625 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25626     ac_header_preproc=yes
25627     ;;
25628   no:yes:* )
25629     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25630 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25631     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25632 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25633     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25634 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25635     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25636 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25637     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25638 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25639     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25640 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25641     (
25642       cat <<\_ASBOX
25643 ## --------------------------------------------- ##
25644 ## Report this to <http://www.openldap.org/its/> ##
25645 ## --------------------------------------------- ##
25646 _ASBOX
25647     ) |
25648       sed "s/^/$as_me: WARNING:     /" >&2
25649     ;;
25650 esac
25651 echo "$as_me:$LINENO: checking for $ac_header" >&5
25652 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25653 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25654   echo $ECHO_N "(cached) $ECHO_C" >&6
25655 else
25656   eval "$as_ac_Header=\$ac_header_preproc"
25657 fi
25658 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25659 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25660
25661 fi
25662 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25663   cat >>confdefs.h <<_ACEOF
25664 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25665 _ACEOF
25666
25667 fi
25668
25669 done
25670
25671
25672         if test $ac_cv_header_pth_h = yes ; then
25673                 echo "$as_me:$LINENO: checking for pth_version in -lpth" >&5
25674 echo $ECHO_N "checking for pth_version in -lpth... $ECHO_C" >&6
25675 if test "${ac_cv_lib_pth_pth_version+set}" = set; then
25676   echo $ECHO_N "(cached) $ECHO_C" >&6
25677 else
25678   ac_check_lib_save_LIBS=$LIBS
25679 LIBS="-lpth  $LIBS"
25680 cat >conftest.$ac_ext <<_ACEOF
25681 /* confdefs.h.  */
25682 _ACEOF
25683 cat confdefs.h >>conftest.$ac_ext
25684 cat >>conftest.$ac_ext <<_ACEOF
25685 /* end confdefs.h.  */
25686
25687 /* Override any gcc2 internal prototype to avoid an error.  */
25688 #ifdef __cplusplus
25689 extern "C"
25690 #endif
25691 /* We use char because int might match the return type of a gcc2
25692    builtin and then its argument prototype would still apply.  */
25693 char pth_version ();
25694 int
25695 main ()
25696 {
25697 pth_version ();
25698   ;
25699   return 0;
25700 }
25701 _ACEOF
25702 rm -f conftest.$ac_objext conftest$ac_exeext
25703 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25704   (eval $ac_link) 2>conftest.er1
25705   ac_status=$?
25706   grep -v '^ *+' conftest.er1 >conftest.err
25707   rm -f conftest.er1
25708   cat conftest.err >&5
25709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25710   (exit $ac_status); } &&
25711          { ac_try='test -z "$ac_c_werror_flag"
25712                          || test ! -s conftest.err'
25713   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25714   (eval $ac_try) 2>&5
25715   ac_status=$?
25716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25717   (exit $ac_status); }; } &&
25718          { ac_try='test -s conftest$ac_exeext'
25719   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25720   (eval $ac_try) 2>&5
25721   ac_status=$?
25722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25723   (exit $ac_status); }; }; then
25724   ac_cv_lib_pth_pth_version=yes
25725 else
25726   echo "$as_me: failed program was:" >&5
25727 sed 's/^/| /' conftest.$ac_ext >&5
25728
25729 ac_cv_lib_pth_pth_version=no
25730 fi
25731 rm -f conftest.err conftest.$ac_objext \
25732       conftest$ac_exeext conftest.$ac_ext
25733 LIBS=$ac_check_lib_save_LIBS
25734 fi
25735 echo "$as_me:$LINENO: result: $ac_cv_lib_pth_pth_version" >&5
25736 echo "${ECHO_T}$ac_cv_lib_pth_pth_version" >&6
25737 if test $ac_cv_lib_pth_pth_version = yes; then
25738   have_pth=yes
25739 else
25740   have_pth=no
25741 fi
25742
25743
25744                 if test $have_pth = yes ; then
25745
25746 cat >>confdefs.h <<\_ACEOF
25747 #define HAVE_GNU_PTH 1
25748 _ACEOF
25749
25750                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
25751                         ol_link_threads=pth
25752                         ol_with_threads=found
25753
25754                         if test $ol_with_yielding_select = auto ; then
25755                                 ol_with_yielding_select=yes
25756                         fi
25757                 fi
25758         fi
25759         ;;
25760 esac
25761
25762 case $ol_with_threads in auto | yes | lwp)
25763
25764
25765
25766 for ac_header in thread.h synch.h
25767 do
25768 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25769 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25770   echo "$as_me:$LINENO: checking for $ac_header" >&5
25771 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25772 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25773   echo $ECHO_N "(cached) $ECHO_C" >&6
25774 fi
25775 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25776 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25777 else
25778   # Is the header compilable?
25779 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25780 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25781 cat >conftest.$ac_ext <<_ACEOF
25782 /* confdefs.h.  */
25783 _ACEOF
25784 cat confdefs.h >>conftest.$ac_ext
25785 cat >>conftest.$ac_ext <<_ACEOF
25786 /* end confdefs.h.  */
25787 $ac_includes_default
25788 #include <$ac_header>
25789 _ACEOF
25790 rm -f conftest.$ac_objext
25791 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25792   (eval $ac_compile) 2>conftest.er1
25793   ac_status=$?
25794   grep -v '^ *+' conftest.er1 >conftest.err
25795   rm -f conftest.er1
25796   cat conftest.err >&5
25797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25798   (exit $ac_status); } &&
25799          { ac_try='test -z "$ac_c_werror_flag"
25800                          || test ! -s conftest.err'
25801   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25802   (eval $ac_try) 2>&5
25803   ac_status=$?
25804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25805   (exit $ac_status); }; } &&
25806          { ac_try='test -s conftest.$ac_objext'
25807   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25808   (eval $ac_try) 2>&5
25809   ac_status=$?
25810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25811   (exit $ac_status); }; }; then
25812   ac_header_compiler=yes
25813 else
25814   echo "$as_me: failed program was:" >&5
25815 sed 's/^/| /' conftest.$ac_ext >&5
25816
25817 ac_header_compiler=no
25818 fi
25819 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25820 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25821 echo "${ECHO_T}$ac_header_compiler" >&6
25822
25823 # Is the header present?
25824 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25825 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
25826 cat >conftest.$ac_ext <<_ACEOF
25827 /* confdefs.h.  */
25828 _ACEOF
25829 cat confdefs.h >>conftest.$ac_ext
25830 cat >>conftest.$ac_ext <<_ACEOF
25831 /* end confdefs.h.  */
25832 #include <$ac_header>
25833 _ACEOF
25834 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25835   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25836   ac_status=$?
25837   grep -v '^ *+' conftest.er1 >conftest.err
25838   rm -f conftest.er1
25839   cat conftest.err >&5
25840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25841   (exit $ac_status); } >/dev/null; then
25842   if test -s conftest.err; then
25843     ac_cpp_err=$ac_c_preproc_warn_flag
25844     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25845   else
25846     ac_cpp_err=
25847   fi
25848 else
25849   ac_cpp_err=yes
25850 fi
25851 if test -z "$ac_cpp_err"; then
25852   ac_header_preproc=yes
25853 else
25854   echo "$as_me: failed program was:" >&5
25855 sed 's/^/| /' conftest.$ac_ext >&5
25856
25857   ac_header_preproc=no
25858 fi
25859 rm -f conftest.err conftest.$ac_ext
25860 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25861 echo "${ECHO_T}$ac_header_preproc" >&6
25862
25863 # So?  What about this header?
25864 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25865   yes:no: )
25866     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25867 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25868     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25869 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25870     ac_header_preproc=yes
25871     ;;
25872   no:yes:* )
25873     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25874 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25875     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25876 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25877     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25878 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25879     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25880 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25881     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25882 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25883     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25884 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25885     (
25886       cat <<\_ASBOX
25887 ## --------------------------------------------- ##
25888 ## Report this to <http://www.openldap.org/its/> ##
25889 ## --------------------------------------------- ##
25890 _ASBOX
25891     ) |
25892       sed "s/^/$as_me: WARNING:     /" >&2
25893     ;;
25894 esac
25895 echo "$as_me:$LINENO: checking for $ac_header" >&5
25896 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25897 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25898   echo $ECHO_N "(cached) $ECHO_C" >&6
25899 else
25900   eval "$as_ac_Header=\$ac_header_preproc"
25901 fi
25902 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25903 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25904
25905 fi
25906 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25907   cat >>confdefs.h <<_ACEOF
25908 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25909 _ACEOF
25910
25911 fi
25912
25913 done
25914
25915         if test $ac_cv_header_thread_h = yes &&
25916            test $ac_cv_header_synch_h = yes ; then
25917                 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
25918 echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
25919 if test "${ac_cv_lib_thread_thr_create+set}" = set; then
25920   echo $ECHO_N "(cached) $ECHO_C" >&6
25921 else
25922   ac_check_lib_save_LIBS=$LIBS
25923 LIBS="-lthread  $LIBS"
25924 cat >conftest.$ac_ext <<_ACEOF
25925 /* confdefs.h.  */
25926 _ACEOF
25927 cat confdefs.h >>conftest.$ac_ext
25928 cat >>conftest.$ac_ext <<_ACEOF
25929 /* end confdefs.h.  */
25930
25931 /* Override any gcc2 internal prototype to avoid an error.  */
25932 #ifdef __cplusplus
25933 extern "C"
25934 #endif
25935 /* We use char because int might match the return type of a gcc2
25936    builtin and then its argument prototype would still apply.  */
25937 char thr_create ();
25938 int
25939 main ()
25940 {
25941 thr_create ();
25942   ;
25943   return 0;
25944 }
25945 _ACEOF
25946 rm -f conftest.$ac_objext conftest$ac_exeext
25947 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25948   (eval $ac_link) 2>conftest.er1
25949   ac_status=$?
25950   grep -v '^ *+' conftest.er1 >conftest.err
25951   rm -f conftest.er1
25952   cat conftest.err >&5
25953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25954   (exit $ac_status); } &&
25955          { ac_try='test -z "$ac_c_werror_flag"
25956                          || test ! -s conftest.err'
25957   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25958   (eval $ac_try) 2>&5
25959   ac_status=$?
25960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25961   (exit $ac_status); }; } &&
25962          { ac_try='test -s conftest$ac_exeext'
25963   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25964   (eval $ac_try) 2>&5
25965   ac_status=$?
25966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25967   (exit $ac_status); }; }; then
25968   ac_cv_lib_thread_thr_create=yes
25969 else
25970   echo "$as_me: failed program was:" >&5
25971 sed 's/^/| /' conftest.$ac_ext >&5
25972
25973 ac_cv_lib_thread_thr_create=no
25974 fi
25975 rm -f conftest.err conftest.$ac_objext \
25976       conftest$ac_exeext conftest.$ac_ext
25977 LIBS=$ac_check_lib_save_LIBS
25978 fi
25979 echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
25980 echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
25981 if test $ac_cv_lib_thread_thr_create = yes; then
25982   have_thr=yes
25983 else
25984   have_thr=no
25985 fi
25986
25987
25988                 if test $have_thr = yes ; then
25989
25990 cat >>confdefs.h <<\_ACEOF
25991 #define HAVE_THR 1
25992 _ACEOF
25993
25994                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
25995                         ol_link_threads=thr
25996
25997                         if test $ol_with_yielding_select = auto ; then
25998                                 ol_with_yielding_select=yes
25999                         fi
26000
26001
26002
26003 for ac_func in \
26004                                 thr_setconcurrency \
26005                                 thr_getconcurrency \
26006
26007 do
26008 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
26009 echo "$as_me:$LINENO: checking for $ac_func" >&5
26010 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
26011 if eval "test \"\${$as_ac_var+set}\" = set"; then
26012   echo $ECHO_N "(cached) $ECHO_C" >&6
26013 else
26014   cat >conftest.$ac_ext <<_ACEOF
26015 /* confdefs.h.  */
26016 _ACEOF
26017 cat confdefs.h >>conftest.$ac_ext
26018 cat >>conftest.$ac_ext <<_ACEOF
26019 /* end confdefs.h.  */
26020 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
26021    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
26022 #define $ac_func innocuous_$ac_func
26023
26024 /* System header to define __stub macros and hopefully few prototypes,
26025     which can conflict with char $ac_func (); below.
26026     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
26027     <limits.h> exists even on freestanding compilers.  */
26028
26029 #ifdef __STDC__
26030 # include <limits.h>
26031 #else
26032 # include <assert.h>
26033 #endif
26034
26035 #undef $ac_func
26036
26037 /* Override any gcc2 internal prototype to avoid an error.  */
26038 #ifdef __cplusplus
26039 extern "C"
26040 {
26041 #endif
26042 /* We use char because int might match the return type of a gcc2
26043    builtin and then its argument prototype would still apply.  */
26044 char $ac_func ();
26045 /* The GNU C library defines this for functions which it implements
26046     to always fail with ENOSYS.  Some functions are actually named
26047     something starting with __ and the normal name is an alias.  */
26048 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
26049 choke me
26050 #else
26051 char (*f) () = $ac_func;
26052 #endif
26053 #ifdef __cplusplus
26054 }
26055 #endif
26056
26057 int
26058 main ()
26059 {
26060 return f != $ac_func;
26061   ;
26062   return 0;
26063 }
26064 _ACEOF
26065 rm -f conftest.$ac_objext conftest$ac_exeext
26066 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26067   (eval $ac_link) 2>conftest.er1
26068   ac_status=$?
26069   grep -v '^ *+' conftest.er1 >conftest.err
26070   rm -f conftest.er1
26071   cat conftest.err >&5
26072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26073   (exit $ac_status); } &&
26074          { ac_try='test -z "$ac_c_werror_flag"
26075                          || test ! -s conftest.err'
26076   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26077   (eval $ac_try) 2>&5
26078   ac_status=$?
26079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26080   (exit $ac_status); }; } &&
26081          { ac_try='test -s conftest$ac_exeext'
26082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26083   (eval $ac_try) 2>&5
26084   ac_status=$?
26085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26086   (exit $ac_status); }; }; then
26087   eval "$as_ac_var=yes"
26088 else
26089   echo "$as_me: failed program was:" >&5
26090 sed 's/^/| /' conftest.$ac_ext >&5
26091
26092 eval "$as_ac_var=no"
26093 fi
26094 rm -f conftest.err conftest.$ac_objext \
26095       conftest$ac_exeext conftest.$ac_ext
26096 fi
26097 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
26098 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
26099 if test `eval echo '${'$as_ac_var'}'` = yes; then
26100   cat >>confdefs.h <<_ACEOF
26101 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
26102 _ACEOF
26103
26104 fi
26105 done
26106
26107                 fi
26108         fi
26109
26110
26111 for ac_header in lwp/lwp.h
26112 do
26113 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26114 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26115   echo "$as_me:$LINENO: checking for $ac_header" >&5
26116 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26117 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26118   echo $ECHO_N "(cached) $ECHO_C" >&6
26119 fi
26120 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26121 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26122 else
26123   # Is the header compilable?
26124 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26125 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26126 cat >conftest.$ac_ext <<_ACEOF
26127 /* confdefs.h.  */
26128 _ACEOF
26129 cat confdefs.h >>conftest.$ac_ext
26130 cat >>conftest.$ac_ext <<_ACEOF
26131 /* end confdefs.h.  */
26132 $ac_includes_default
26133 #include <$ac_header>
26134 _ACEOF
26135 rm -f conftest.$ac_objext
26136 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26137   (eval $ac_compile) 2>conftest.er1
26138   ac_status=$?
26139   grep -v '^ *+' conftest.er1 >conftest.err
26140   rm -f conftest.er1
26141   cat conftest.err >&5
26142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26143   (exit $ac_status); } &&
26144          { ac_try='test -z "$ac_c_werror_flag"
26145                          || test ! -s conftest.err'
26146   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26147   (eval $ac_try) 2>&5
26148   ac_status=$?
26149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26150   (exit $ac_status); }; } &&
26151          { ac_try='test -s conftest.$ac_objext'
26152   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26153   (eval $ac_try) 2>&5
26154   ac_status=$?
26155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26156   (exit $ac_status); }; }; then
26157   ac_header_compiler=yes
26158 else
26159   echo "$as_me: failed program was:" >&5
26160 sed 's/^/| /' conftest.$ac_ext >&5
26161
26162 ac_header_compiler=no
26163 fi
26164 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26165 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26166 echo "${ECHO_T}$ac_header_compiler" >&6
26167
26168 # Is the header present?
26169 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26170 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26171 cat >conftest.$ac_ext <<_ACEOF
26172 /* confdefs.h.  */
26173 _ACEOF
26174 cat confdefs.h >>conftest.$ac_ext
26175 cat >>conftest.$ac_ext <<_ACEOF
26176 /* end confdefs.h.  */
26177 #include <$ac_header>
26178 _ACEOF
26179 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26180   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26181   ac_status=$?
26182   grep -v '^ *+' conftest.er1 >conftest.err
26183   rm -f conftest.er1
26184   cat conftest.err >&5
26185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26186   (exit $ac_status); } >/dev/null; then
26187   if test -s conftest.err; then
26188     ac_cpp_err=$ac_c_preproc_warn_flag
26189     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26190   else
26191     ac_cpp_err=
26192   fi
26193 else
26194   ac_cpp_err=yes
26195 fi
26196 if test -z "$ac_cpp_err"; then
26197   ac_header_preproc=yes
26198 else
26199   echo "$as_me: failed program was:" >&5
26200 sed 's/^/| /' conftest.$ac_ext >&5
26201
26202   ac_header_preproc=no
26203 fi
26204 rm -f conftest.err conftest.$ac_ext
26205 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26206 echo "${ECHO_T}$ac_header_preproc" >&6
26207
26208 # So?  What about this header?
26209 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26210   yes:no: )
26211     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26212 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26213     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26214 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26215     ac_header_preproc=yes
26216     ;;
26217   no:yes:* )
26218     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26219 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26220     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26221 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26222     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26223 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26224     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26225 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26226     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26227 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26228     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26229 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26230     (
26231       cat <<\_ASBOX
26232 ## --------------------------------------------- ##
26233 ## Report this to <http://www.openldap.org/its/> ##
26234 ## --------------------------------------------- ##
26235 _ASBOX
26236     ) |
26237       sed "s/^/$as_me: WARNING:     /" >&2
26238     ;;
26239 esac
26240 echo "$as_me:$LINENO: checking for $ac_header" >&5
26241 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26242 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26243   echo $ECHO_N "(cached) $ECHO_C" >&6
26244 else
26245   eval "$as_ac_Header=\$ac_header_preproc"
26246 fi
26247 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26248 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26249
26250 fi
26251 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26252   cat >>confdefs.h <<_ACEOF
26253 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26254 _ACEOF
26255
26256 fi
26257
26258 done
26259
26260         if test $ac_cv_header_lwp_lwp_h = yes ; then
26261                 echo "$as_me:$LINENO: checking for lwp_create in -llwp" >&5
26262 echo $ECHO_N "checking for lwp_create in -llwp... $ECHO_C" >&6
26263 if test "${ac_cv_lib_lwp_lwp_create+set}" = set; then
26264   echo $ECHO_N "(cached) $ECHO_C" >&6
26265 else
26266   ac_check_lib_save_LIBS=$LIBS
26267 LIBS="-llwp  $LIBS"
26268 cat >conftest.$ac_ext <<_ACEOF
26269 /* confdefs.h.  */
26270 _ACEOF
26271 cat confdefs.h >>conftest.$ac_ext
26272 cat >>conftest.$ac_ext <<_ACEOF
26273 /* end confdefs.h.  */
26274
26275 /* Override any gcc2 internal prototype to avoid an error.  */
26276 #ifdef __cplusplus
26277 extern "C"
26278 #endif
26279 /* We use char because int might match the return type of a gcc2
26280    builtin and then its argument prototype would still apply.  */
26281 char lwp_create ();
26282 int
26283 main ()
26284 {
26285 lwp_create ();
26286   ;
26287   return 0;
26288 }
26289 _ACEOF
26290 rm -f conftest.$ac_objext conftest$ac_exeext
26291 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26292   (eval $ac_link) 2>conftest.er1
26293   ac_status=$?
26294   grep -v '^ *+' conftest.er1 >conftest.err
26295   rm -f conftest.er1
26296   cat conftest.err >&5
26297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26298   (exit $ac_status); } &&
26299          { ac_try='test -z "$ac_c_werror_flag"
26300                          || test ! -s conftest.err'
26301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26302   (eval $ac_try) 2>&5
26303   ac_status=$?
26304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26305   (exit $ac_status); }; } &&
26306          { ac_try='test -s conftest$ac_exeext'
26307   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26308   (eval $ac_try) 2>&5
26309   ac_status=$?
26310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26311   (exit $ac_status); }; }; then
26312   ac_cv_lib_lwp_lwp_create=yes
26313 else
26314   echo "$as_me: failed program was:" >&5
26315 sed 's/^/| /' conftest.$ac_ext >&5
26316
26317 ac_cv_lib_lwp_lwp_create=no
26318 fi
26319 rm -f conftest.err conftest.$ac_objext \
26320       conftest$ac_exeext conftest.$ac_ext
26321 LIBS=$ac_check_lib_save_LIBS
26322 fi
26323 echo "$as_me:$LINENO: result: $ac_cv_lib_lwp_lwp_create" >&5
26324 echo "${ECHO_T}$ac_cv_lib_lwp_lwp_create" >&6
26325 if test $ac_cv_lib_lwp_lwp_create = yes; then
26326   have_lwp=yes
26327 else
26328   have_lwp=no
26329 fi
26330
26331
26332                 if test $have_lwp = yes ; then
26333
26334 cat >>confdefs.h <<\_ACEOF
26335 #define HAVE_LWP 1
26336 _ACEOF
26337
26338                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
26339                         ol_link_threads=lwp
26340
26341                         if test $ol_with_yielding_select = auto ; then
26342                                 ol_with_yielding_select=no
26343                         fi
26344                 fi
26345         fi
26346         ;;
26347 esac
26348
26349 if test $ol_with_yielding_select = yes ; then
26350
26351 cat >>confdefs.h <<\_ACEOF
26352 #define HAVE_YIELDING_SELECT 1
26353 _ACEOF
26354
26355 fi
26356
26357 if test $ol_with_threads = manual ; then
26358                 ol_link_threads=yes
26359
26360         { echo "$as_me:$LINENO: WARNING: thread defines and link options must be set manually" >&5
26361 echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
26362
26363
26364
26365 for ac_header in pthread.h sched.h
26366 do
26367 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26368 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26369   echo "$as_me:$LINENO: checking for $ac_header" >&5
26370 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26371 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26372   echo $ECHO_N "(cached) $ECHO_C" >&6
26373 fi
26374 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26375 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26376 else
26377   # Is the header compilable?
26378 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26379 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26380 cat >conftest.$ac_ext <<_ACEOF
26381 /* confdefs.h.  */
26382 _ACEOF
26383 cat confdefs.h >>conftest.$ac_ext
26384 cat >>conftest.$ac_ext <<_ACEOF
26385 /* end confdefs.h.  */
26386 $ac_includes_default
26387 #include <$ac_header>
26388 _ACEOF
26389 rm -f conftest.$ac_objext
26390 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26391   (eval $ac_compile) 2>conftest.er1
26392   ac_status=$?
26393   grep -v '^ *+' conftest.er1 >conftest.err
26394   rm -f conftest.er1
26395   cat conftest.err >&5
26396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26397   (exit $ac_status); } &&
26398          { ac_try='test -z "$ac_c_werror_flag"
26399                          || test ! -s conftest.err'
26400   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26401   (eval $ac_try) 2>&5
26402   ac_status=$?
26403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26404   (exit $ac_status); }; } &&
26405          { ac_try='test -s conftest.$ac_objext'
26406   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26407   (eval $ac_try) 2>&5
26408   ac_status=$?
26409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26410   (exit $ac_status); }; }; then
26411   ac_header_compiler=yes
26412 else
26413   echo "$as_me: failed program was:" >&5
26414 sed 's/^/| /' conftest.$ac_ext >&5
26415
26416 ac_header_compiler=no
26417 fi
26418 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26419 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26420 echo "${ECHO_T}$ac_header_compiler" >&6
26421
26422 # Is the header present?
26423 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26424 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26425 cat >conftest.$ac_ext <<_ACEOF
26426 /* confdefs.h.  */
26427 _ACEOF
26428 cat confdefs.h >>conftest.$ac_ext
26429 cat >>conftest.$ac_ext <<_ACEOF
26430 /* end confdefs.h.  */
26431 #include <$ac_header>
26432 _ACEOF
26433 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26434   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26435   ac_status=$?
26436   grep -v '^ *+' conftest.er1 >conftest.err
26437   rm -f conftest.er1
26438   cat conftest.err >&5
26439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26440   (exit $ac_status); } >/dev/null; then
26441   if test -s conftest.err; then
26442     ac_cpp_err=$ac_c_preproc_warn_flag
26443     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26444   else
26445     ac_cpp_err=
26446   fi
26447 else
26448   ac_cpp_err=yes
26449 fi
26450 if test -z "$ac_cpp_err"; then
26451   ac_header_preproc=yes
26452 else
26453   echo "$as_me: failed program was:" >&5
26454 sed 's/^/| /' conftest.$ac_ext >&5
26455
26456   ac_header_preproc=no
26457 fi
26458 rm -f conftest.err conftest.$ac_ext
26459 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26460 echo "${ECHO_T}$ac_header_preproc" >&6
26461
26462 # So?  What about this header?
26463 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26464   yes:no: )
26465     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26466 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26467     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26468 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26469     ac_header_preproc=yes
26470     ;;
26471   no:yes:* )
26472     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26473 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26474     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26475 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26476     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26477 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26478     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26479 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26480     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26481 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26482     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26483 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26484     (
26485       cat <<\_ASBOX
26486 ## --------------------------------------------- ##
26487 ## Report this to <http://www.openldap.org/its/> ##
26488 ## --------------------------------------------- ##
26489 _ASBOX
26490     ) |
26491       sed "s/^/$as_me: WARNING:     /" >&2
26492     ;;
26493 esac
26494 echo "$as_me:$LINENO: checking for $ac_header" >&5
26495 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26496 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26497   echo $ECHO_N "(cached) $ECHO_C" >&6
26498 else
26499   eval "$as_ac_Header=\$ac_header_preproc"
26500 fi
26501 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26502 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26503
26504 fi
26505 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26506   cat >>confdefs.h <<_ACEOF
26507 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26508 _ACEOF
26509
26510 fi
26511
26512 done
26513
26514
26515
26516 for ac_func in sched_yield pthread_yield
26517 do
26518 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
26519 echo "$as_me:$LINENO: checking for $ac_func" >&5
26520 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
26521 if eval "test \"\${$as_ac_var+set}\" = set"; then
26522   echo $ECHO_N "(cached) $ECHO_C" >&6
26523 else
26524   cat >conftest.$ac_ext <<_ACEOF
26525 /* confdefs.h.  */
26526 _ACEOF
26527 cat confdefs.h >>conftest.$ac_ext
26528 cat >>conftest.$ac_ext <<_ACEOF
26529 /* end confdefs.h.  */
26530 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
26531    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
26532 #define $ac_func innocuous_$ac_func
26533
26534 /* System header to define __stub macros and hopefully few prototypes,
26535     which can conflict with char $ac_func (); below.
26536     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
26537     <limits.h> exists even on freestanding compilers.  */
26538
26539 #ifdef __STDC__
26540 # include <limits.h>
26541 #else
26542 # include <assert.h>
26543 #endif
26544
26545 #undef $ac_func
26546
26547 /* Override any gcc2 internal prototype to avoid an error.  */
26548 #ifdef __cplusplus
26549 extern "C"
26550 {
26551 #endif
26552 /* We use char because int might match the return type of a gcc2
26553    builtin and then its argument prototype would still apply.  */
26554 char $ac_func ();
26555 /* The GNU C library defines this for functions which it implements
26556     to always fail with ENOSYS.  Some functions are actually named
26557     something starting with __ and the normal name is an alias.  */
26558 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
26559 choke me
26560 #else
26561 char (*f) () = $ac_func;
26562 #endif
26563 #ifdef __cplusplus
26564 }
26565 #endif
26566
26567 int
26568 main ()
26569 {
26570 return f != $ac_func;
26571   ;
26572   return 0;
26573 }
26574 _ACEOF
26575 rm -f conftest.$ac_objext conftest$ac_exeext
26576 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26577   (eval $ac_link) 2>conftest.er1
26578   ac_status=$?
26579   grep -v '^ *+' conftest.er1 >conftest.err
26580   rm -f conftest.er1
26581   cat conftest.err >&5
26582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26583   (exit $ac_status); } &&
26584          { ac_try='test -z "$ac_c_werror_flag"
26585                          || test ! -s conftest.err'
26586   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26587   (eval $ac_try) 2>&5
26588   ac_status=$?
26589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26590   (exit $ac_status); }; } &&
26591          { ac_try='test -s conftest$ac_exeext'
26592   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26593   (eval $ac_try) 2>&5
26594   ac_status=$?
26595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26596   (exit $ac_status); }; }; then
26597   eval "$as_ac_var=yes"
26598 else
26599   echo "$as_me: failed program was:" >&5
26600 sed 's/^/| /' conftest.$ac_ext >&5
26601
26602 eval "$as_ac_var=no"
26603 fi
26604 rm -f conftest.err conftest.$ac_objext \
26605       conftest$ac_exeext conftest.$ac_ext
26606 fi
26607 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
26608 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
26609 if test `eval echo '${'$as_ac_var'}'` = yes; then
26610   cat >>confdefs.h <<_ACEOF
26611 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
26612 _ACEOF
26613
26614 fi
26615 done
26616
26617
26618         echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5
26619 echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6
26620 if test "${ol_cv_header_linux_threads+set}" = set; then
26621   echo $ECHO_N "(cached) $ECHO_C" >&6
26622 else
26623   cat >conftest.$ac_ext <<_ACEOF
26624 /* confdefs.h.  */
26625 _ACEOF
26626 cat confdefs.h >>conftest.$ac_ext
26627 cat >>conftest.$ac_ext <<_ACEOF
26628 /* end confdefs.h.  */
26629 #include <pthread.h>
26630 _ACEOF
26631 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26632   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then
26633   ol_cv_header_linux_threads=yes
26634 else
26635   ol_cv_header_linux_threads=no
26636 fi
26637 rm -f conftest*
26638
26639
26640 fi
26641 echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5
26642 echo "${ECHO_T}$ol_cv_header_linux_threads" >&6
26643         if test $ol_cv_header_linux_threads = yes; then
26644
26645 cat >>confdefs.h <<\_ACEOF
26646 #define HAVE_LINUX_THREADS 1
26647 _ACEOF
26648
26649         fi
26650
26651
26652
26653 for ac_header in mach/cthreads.h
26654 do
26655 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26656 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26657   echo "$as_me:$LINENO: checking for $ac_header" >&5
26658 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26659 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26660   echo $ECHO_N "(cached) $ECHO_C" >&6
26661 fi
26662 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26663 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26664 else
26665   # Is the header compilable?
26666 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26667 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26668 cat >conftest.$ac_ext <<_ACEOF
26669 /* confdefs.h.  */
26670 _ACEOF
26671 cat confdefs.h >>conftest.$ac_ext
26672 cat >>conftest.$ac_ext <<_ACEOF
26673 /* end confdefs.h.  */
26674 $ac_includes_default
26675 #include <$ac_header>
26676 _ACEOF
26677 rm -f conftest.$ac_objext
26678 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26679   (eval $ac_compile) 2>conftest.er1
26680   ac_status=$?
26681   grep -v '^ *+' conftest.er1 >conftest.err
26682   rm -f conftest.er1
26683   cat conftest.err >&5
26684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26685   (exit $ac_status); } &&
26686          { ac_try='test -z "$ac_c_werror_flag"
26687                          || test ! -s conftest.err'
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); }; } &&
26693          { ac_try='test -s conftest.$ac_objext'
26694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26695   (eval $ac_try) 2>&5
26696   ac_status=$?
26697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26698   (exit $ac_status); }; }; then
26699   ac_header_compiler=yes
26700 else
26701   echo "$as_me: failed program was:" >&5
26702 sed 's/^/| /' conftest.$ac_ext >&5
26703
26704 ac_header_compiler=no
26705 fi
26706 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26707 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26708 echo "${ECHO_T}$ac_header_compiler" >&6
26709
26710 # Is the header present?
26711 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26712 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26713 cat >conftest.$ac_ext <<_ACEOF
26714 /* confdefs.h.  */
26715 _ACEOF
26716 cat confdefs.h >>conftest.$ac_ext
26717 cat >>conftest.$ac_ext <<_ACEOF
26718 /* end confdefs.h.  */
26719 #include <$ac_header>
26720 _ACEOF
26721 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26722   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26723   ac_status=$?
26724   grep -v '^ *+' conftest.er1 >conftest.err
26725   rm -f conftest.er1
26726   cat conftest.err >&5
26727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26728   (exit $ac_status); } >/dev/null; then
26729   if test -s conftest.err; then
26730     ac_cpp_err=$ac_c_preproc_warn_flag
26731     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26732   else
26733     ac_cpp_err=
26734   fi
26735 else
26736   ac_cpp_err=yes
26737 fi
26738 if test -z "$ac_cpp_err"; then
26739   ac_header_preproc=yes
26740 else
26741   echo "$as_me: failed program was:" >&5
26742 sed 's/^/| /' conftest.$ac_ext >&5
26743
26744   ac_header_preproc=no
26745 fi
26746 rm -f conftest.err conftest.$ac_ext
26747 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26748 echo "${ECHO_T}$ac_header_preproc" >&6
26749
26750 # So?  What about this header?
26751 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26752   yes:no: )
26753     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26754 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26755     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26756 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26757     ac_header_preproc=yes
26758     ;;
26759   no:yes:* )
26760     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26761 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26762     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26763 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26764     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26765 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26766     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26767 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26768     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26769 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26770     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26771 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26772     (
26773       cat <<\_ASBOX
26774 ## --------------------------------------------- ##
26775 ## Report this to <http://www.openldap.org/its/> ##
26776 ## --------------------------------------------- ##
26777 _ASBOX
26778     ) |
26779       sed "s/^/$as_me: WARNING:     /" >&2
26780     ;;
26781 esac
26782 echo "$as_me:$LINENO: checking for $ac_header" >&5
26783 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26784 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26785   echo $ECHO_N "(cached) $ECHO_C" >&6
26786 else
26787   eval "$as_ac_Header=\$ac_header_preproc"
26788 fi
26789 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26790 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26791
26792 fi
26793 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26794   cat >>confdefs.h <<_ACEOF
26795 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26796 _ACEOF
26797
26798 fi
26799
26800 done
26801
26802
26803 for ac_header in lwp/lwp.h
26804 do
26805 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26806 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26807   echo "$as_me:$LINENO: checking for $ac_header" >&5
26808 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26809 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26810   echo $ECHO_N "(cached) $ECHO_C" >&6
26811 fi
26812 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26813 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26814 else
26815   # Is the header compilable?
26816 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26817 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26818 cat >conftest.$ac_ext <<_ACEOF
26819 /* confdefs.h.  */
26820 _ACEOF
26821 cat confdefs.h >>conftest.$ac_ext
26822 cat >>conftest.$ac_ext <<_ACEOF
26823 /* end confdefs.h.  */
26824 $ac_includes_default
26825 #include <$ac_header>
26826 _ACEOF
26827 rm -f conftest.$ac_objext
26828 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26829   (eval $ac_compile) 2>conftest.er1
26830   ac_status=$?
26831   grep -v '^ *+' conftest.er1 >conftest.err
26832   rm -f conftest.er1
26833   cat conftest.err >&5
26834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26835   (exit $ac_status); } &&
26836          { ac_try='test -z "$ac_c_werror_flag"
26837                          || test ! -s conftest.err'
26838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26839   (eval $ac_try) 2>&5
26840   ac_status=$?
26841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26842   (exit $ac_status); }; } &&
26843          { ac_try='test -s conftest.$ac_objext'
26844   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26845   (eval $ac_try) 2>&5
26846   ac_status=$?
26847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26848   (exit $ac_status); }; }; then
26849   ac_header_compiler=yes
26850 else
26851   echo "$as_me: failed program was:" >&5
26852 sed 's/^/| /' conftest.$ac_ext >&5
26853
26854 ac_header_compiler=no
26855 fi
26856 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26857 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26858 echo "${ECHO_T}$ac_header_compiler" >&6
26859
26860 # Is the header present?
26861 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26862 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26863 cat >conftest.$ac_ext <<_ACEOF
26864 /* confdefs.h.  */
26865 _ACEOF
26866 cat confdefs.h >>conftest.$ac_ext
26867 cat >>conftest.$ac_ext <<_ACEOF
26868 /* end confdefs.h.  */
26869 #include <$ac_header>
26870 _ACEOF
26871 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26872   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26873   ac_status=$?
26874   grep -v '^ *+' conftest.er1 >conftest.err
26875   rm -f conftest.er1
26876   cat conftest.err >&5
26877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26878   (exit $ac_status); } >/dev/null; then
26879   if test -s conftest.err; then
26880     ac_cpp_err=$ac_c_preproc_warn_flag
26881     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26882   else
26883     ac_cpp_err=
26884   fi
26885 else
26886   ac_cpp_err=yes
26887 fi
26888 if test -z "$ac_cpp_err"; then
26889   ac_header_preproc=yes
26890 else
26891   echo "$as_me: failed program was:" >&5
26892 sed 's/^/| /' conftest.$ac_ext >&5
26893
26894   ac_header_preproc=no
26895 fi
26896 rm -f conftest.err conftest.$ac_ext
26897 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26898 echo "${ECHO_T}$ac_header_preproc" >&6
26899
26900 # So?  What about this header?
26901 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26902   yes:no: )
26903     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26904 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26905     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26906 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26907     ac_header_preproc=yes
26908     ;;
26909   no:yes:* )
26910     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26911 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26912     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26913 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26914     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26915 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26916     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26917 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26918     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26919 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26920     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26921 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26922     (
26923       cat <<\_ASBOX
26924 ## --------------------------------------------- ##
26925 ## Report this to <http://www.openldap.org/its/> ##
26926 ## --------------------------------------------- ##
26927 _ASBOX
26928     ) |
26929       sed "s/^/$as_me: WARNING:     /" >&2
26930     ;;
26931 esac
26932 echo "$as_me:$LINENO: checking for $ac_header" >&5
26933 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26934 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26935   echo $ECHO_N "(cached) $ECHO_C" >&6
26936 else
26937   eval "$as_ac_Header=\$ac_header_preproc"
26938 fi
26939 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26940 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26941
26942 fi
26943 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26944   cat >>confdefs.h <<_ACEOF
26945 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26946 _ACEOF
26947
26948 fi
26949
26950 done
26951
26952
26953
26954 for ac_header in thread.h synch.h
26955 do
26956 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26957 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26958   echo "$as_me:$LINENO: checking for $ac_header" >&5
26959 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26960 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26961   echo $ECHO_N "(cached) $ECHO_C" >&6
26962 fi
26963 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26964 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26965 else
26966   # Is the header compilable?
26967 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26968 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26969 cat >conftest.$ac_ext <<_ACEOF
26970 /* confdefs.h.  */
26971 _ACEOF
26972 cat confdefs.h >>conftest.$ac_ext
26973 cat >>conftest.$ac_ext <<_ACEOF
26974 /* end confdefs.h.  */
26975 $ac_includes_default
26976 #include <$ac_header>
26977 _ACEOF
26978 rm -f conftest.$ac_objext
26979 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26980   (eval $ac_compile) 2>conftest.er1
26981   ac_status=$?
26982   grep -v '^ *+' conftest.er1 >conftest.err
26983   rm -f conftest.er1
26984   cat conftest.err >&5
26985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26986   (exit $ac_status); } &&
26987          { ac_try='test -z "$ac_c_werror_flag"
26988                          || test ! -s conftest.err'
26989   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26990   (eval $ac_try) 2>&5
26991   ac_status=$?
26992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26993   (exit $ac_status); }; } &&
26994          { ac_try='test -s conftest.$ac_objext'
26995   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26996   (eval $ac_try) 2>&5
26997   ac_status=$?
26998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26999   (exit $ac_status); }; }; then
27000   ac_header_compiler=yes
27001 else
27002   echo "$as_me: failed program was:" >&5
27003 sed 's/^/| /' conftest.$ac_ext >&5
27004
27005 ac_header_compiler=no
27006 fi
27007 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27008 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27009 echo "${ECHO_T}$ac_header_compiler" >&6
27010
27011 # Is the header present?
27012 echo "$as_me:$LINENO: checking $ac_header presence" >&5
27013 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
27014 cat >conftest.$ac_ext <<_ACEOF
27015 /* confdefs.h.  */
27016 _ACEOF
27017 cat confdefs.h >>conftest.$ac_ext
27018 cat >>conftest.$ac_ext <<_ACEOF
27019 /* end confdefs.h.  */
27020 #include <$ac_header>
27021 _ACEOF
27022 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
27023   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
27024   ac_status=$?
27025   grep -v '^ *+' conftest.er1 >conftest.err
27026   rm -f conftest.er1
27027   cat conftest.err >&5
27028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27029   (exit $ac_status); } >/dev/null; then
27030   if test -s conftest.err; then
27031     ac_cpp_err=$ac_c_preproc_warn_flag
27032     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
27033   else
27034     ac_cpp_err=
27035   fi
27036 else
27037   ac_cpp_err=yes
27038 fi
27039 if test -z "$ac_cpp_err"; then
27040   ac_header_preproc=yes
27041 else
27042   echo "$as_me: failed program was:" >&5
27043 sed 's/^/| /' conftest.$ac_ext >&5
27044
27045   ac_header_preproc=no
27046 fi
27047 rm -f conftest.err conftest.$ac_ext
27048 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27049 echo "${ECHO_T}$ac_header_preproc" >&6
27050
27051 # So?  What about this header?
27052 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
27053   yes:no: )
27054     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27055 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27056     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
27057 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
27058     ac_header_preproc=yes
27059     ;;
27060   no:yes:* )
27061     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27062 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27063     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
27064 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
27065     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
27066 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
27067     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
27068 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
27069     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27070 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27071     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
27072 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
27073     (
27074       cat <<\_ASBOX
27075 ## --------------------------------------------- ##
27076 ## Report this to <http://www.openldap.org/its/> ##
27077 ## --------------------------------------------- ##
27078 _ASBOX
27079     ) |
27080       sed "s/^/$as_me: WARNING:     /" >&2
27081     ;;
27082 esac
27083 echo "$as_me:$LINENO: checking for $ac_header" >&5
27084 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27085 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27086   echo $ECHO_N "(cached) $ECHO_C" >&6
27087 else
27088   eval "$as_ac_Header=\$ac_header_preproc"
27089 fi
27090 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27091 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27092
27093 fi
27094 if test `eval echo '${'$as_ac_Header'}'` = yes; then
27095   cat >>confdefs.h <<_ACEOF
27096 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
27097 _ACEOF
27098
27099 fi
27100
27101 done
27102
27103 fi
27104
27105 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
27106                         cat >>confdefs.h <<\_ACEOF
27107 #define REENTRANT 1
27108 _ACEOF
27109
27110         cat >>confdefs.h <<\_ACEOF
27111 #define _REENTRANT 1
27112 _ACEOF
27113
27114         cat >>confdefs.h <<\_ACEOF
27115 #define THREAD_SAFE 1
27116 _ACEOF
27117
27118         cat >>confdefs.h <<\_ACEOF
27119 #define _THREAD_SAFE 1
27120 _ACEOF
27121
27122         cat >>confdefs.h <<\_ACEOF
27123 #define THREADSAFE 1
27124 _ACEOF
27125
27126         cat >>confdefs.h <<\_ACEOF
27127 #define _THREADSAFE 1
27128 _ACEOF
27129
27130         cat >>confdefs.h <<\_ACEOF
27131 #define _SGI_MP_SOURCE 1
27132 _ACEOF
27133
27134
27135                         echo "$as_me:$LINENO: checking for thread specific errno" >&5
27136 echo $ECHO_N "checking for thread specific errno... $ECHO_C" >&6
27137 if test "${ol_cv_errno_thread_specific+set}" = set; then
27138   echo $ECHO_N "(cached) $ECHO_C" >&6
27139 else
27140
27141                 cat >conftest.$ac_ext <<_ACEOF
27142 /* confdefs.h.  */
27143 _ACEOF
27144 cat confdefs.h >>conftest.$ac_ext
27145 cat >>conftest.$ac_ext <<_ACEOF
27146 /* end confdefs.h.  */
27147 #include <errno.h>
27148 int
27149 main ()
27150 {
27151 errno = 0;
27152   ;
27153   return 0;
27154 }
27155 _ACEOF
27156 rm -f conftest.$ac_objext conftest$ac_exeext
27157 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27158   (eval $ac_link) 2>conftest.er1
27159   ac_status=$?
27160   grep -v '^ *+' conftest.er1 >conftest.err
27161   rm -f conftest.er1
27162   cat conftest.err >&5
27163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27164   (exit $ac_status); } &&
27165          { ac_try='test -z "$ac_c_werror_flag"
27166                          || test ! -s conftest.err'
27167   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27168   (eval $ac_try) 2>&5
27169   ac_status=$?
27170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27171   (exit $ac_status); }; } &&
27172          { ac_try='test -s conftest$ac_exeext'
27173   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27174   (eval $ac_try) 2>&5
27175   ac_status=$?
27176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27177   (exit $ac_status); }; }; then
27178   ol_cv_errno_thread_specific=yes
27179 else
27180   echo "$as_me: failed program was:" >&5
27181 sed 's/^/| /' conftest.$ac_ext >&5
27182
27183 ol_cv_errno_thread_specific=no
27184 fi
27185 rm -f conftest.err conftest.$ac_objext \
27186       conftest$ac_exeext conftest.$ac_ext
27187
27188 fi
27189 echo "$as_me:$LINENO: result: $ol_cv_errno_thread_specific" >&5
27190 echo "${ECHO_T}$ol_cv_errno_thread_specific" >&6
27191
27192                         echo "$as_me:$LINENO: checking for thread specific h_errno" >&5
27193 echo $ECHO_N "checking for thread specific h_errno... $ECHO_C" >&6
27194 if test "${ol_cv_h_errno_thread_specific+set}" = set; then
27195   echo $ECHO_N "(cached) $ECHO_C" >&6
27196 else
27197
27198                 cat >conftest.$ac_ext <<_ACEOF
27199 /* confdefs.h.  */
27200 _ACEOF
27201 cat confdefs.h >>conftest.$ac_ext
27202 cat >>conftest.$ac_ext <<_ACEOF
27203 /* end confdefs.h.  */
27204 #include <netdb.h>
27205 int
27206 main ()
27207 {
27208 h_errno = 0;
27209   ;
27210   return 0;
27211 }
27212 _ACEOF
27213 rm -f conftest.$ac_objext conftest$ac_exeext
27214 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27215   (eval $ac_link) 2>conftest.er1
27216   ac_status=$?
27217   grep -v '^ *+' conftest.er1 >conftest.err
27218   rm -f conftest.er1
27219   cat conftest.err >&5
27220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27221   (exit $ac_status); } &&
27222          { ac_try='test -z "$ac_c_werror_flag"
27223                          || test ! -s conftest.err'
27224   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27225   (eval $ac_try) 2>&5
27226   ac_status=$?
27227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27228   (exit $ac_status); }; } &&
27229          { ac_try='test -s conftest$ac_exeext'
27230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27231   (eval $ac_try) 2>&5
27232   ac_status=$?
27233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27234   (exit $ac_status); }; }; then
27235   ol_cv_h_errno_thread_specific=yes
27236 else
27237   echo "$as_me: failed program was:" >&5
27238 sed 's/^/| /' conftest.$ac_ext >&5
27239
27240 ol_cv_h_errno_thread_specific=no
27241 fi
27242 rm -f conftest.err conftest.$ac_objext \
27243       conftest$ac_exeext conftest.$ac_ext
27244
27245 fi
27246 echo "$as_me:$LINENO: result: $ol_cv_h_errno_thread_specific" >&5
27247 echo "${ECHO_T}$ol_cv_h_errno_thread_specific" >&6
27248
27249         if test $ol_cv_errno_thread_specific != yes ||
27250            test $ol_cv_h_errno_thread_specific != yes ; then
27251                 LIBS="$LTHREAD_LIBS $LIBS"
27252                 LTHREAD_LIBS=""
27253         fi
27254
27255 fi
27256
27257 if test $ol_link_threads = no ; then
27258         if test $ol_with_threads = yes ; then
27259                 { { echo "$as_me:$LINENO: error: no suitable thread support" >&5
27260 echo "$as_me: error: no suitable thread support" >&2;}
27261    { (exit 1); exit 1; }; }
27262         fi
27263
27264         if test $ol_with_threads = auto ; then
27265                 { echo "$as_me:$LINENO: WARNING: no suitable thread support, disabling threads" >&5
27266 echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
27267                 ol_with_threads=no
27268         fi
27269
27270
27271 cat >>confdefs.h <<\_ACEOF
27272 #define NO_THREADS 1
27273 _ACEOF
27274
27275         LTHREAD_LIBS=""
27276         BUILD_THREAD=no
27277 else
27278         BUILD_THREAD=yes
27279 fi
27280
27281 if test $ol_link_threads != no ; then
27282
27283 cat >>confdefs.h <<\_ACEOF
27284 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
27285 _ACEOF
27286
27287 fi
27288
27289
27290
27291
27292 for ac_func in \
27293         ctime_r                 \
27294         gethostbyname_r gethostbyaddr_r \
27295
27296 do
27297 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
27298 echo "$as_me:$LINENO: checking for $ac_func" >&5
27299 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
27300 if eval "test \"\${$as_ac_var+set}\" = set"; then
27301   echo $ECHO_N "(cached) $ECHO_C" >&6
27302 else
27303   cat >conftest.$ac_ext <<_ACEOF
27304 /* confdefs.h.  */
27305 _ACEOF
27306 cat confdefs.h >>conftest.$ac_ext
27307 cat >>conftest.$ac_ext <<_ACEOF
27308 /* end confdefs.h.  */
27309 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
27310    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
27311 #define $ac_func innocuous_$ac_func
27312
27313 /* System header to define __stub macros and hopefully few prototypes,
27314     which can conflict with char $ac_func (); below.
27315     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
27316     <limits.h> exists even on freestanding compilers.  */
27317
27318 #ifdef __STDC__
27319 # include <limits.h>
27320 #else
27321 # include <assert.h>
27322 #endif
27323
27324 #undef $ac_func
27325
27326 /* Override any gcc2 internal prototype to avoid an error.  */
27327 #ifdef __cplusplus
27328 extern "C"
27329 {
27330 #endif
27331 /* We use char because int might match the return type of a gcc2
27332    builtin and then its argument prototype would still apply.  */
27333 char $ac_func ();
27334 /* The GNU C library defines this for functions which it implements
27335     to always fail with ENOSYS.  Some functions are actually named
27336     something starting with __ and the normal name is an alias.  */
27337 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
27338 choke me
27339 #else
27340 char (*f) () = $ac_func;
27341 #endif
27342 #ifdef __cplusplus
27343 }
27344 #endif
27345
27346 int
27347 main ()
27348 {
27349 return f != $ac_func;
27350   ;
27351   return 0;
27352 }
27353 _ACEOF
27354 rm -f conftest.$ac_objext conftest$ac_exeext
27355 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27356   (eval $ac_link) 2>conftest.er1
27357   ac_status=$?
27358   grep -v '^ *+' conftest.er1 >conftest.err
27359   rm -f conftest.er1
27360   cat conftest.err >&5
27361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27362   (exit $ac_status); } &&
27363          { ac_try='test -z "$ac_c_werror_flag"
27364                          || test ! -s conftest.err'
27365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27366   (eval $ac_try) 2>&5
27367   ac_status=$?
27368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27369   (exit $ac_status); }; } &&
27370          { ac_try='test -s conftest$ac_exeext'
27371   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27372   (eval $ac_try) 2>&5
27373   ac_status=$?
27374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27375   (exit $ac_status); }; }; then
27376   eval "$as_ac_var=yes"
27377 else
27378   echo "$as_me: failed program was:" >&5
27379 sed 's/^/| /' conftest.$ac_ext >&5
27380
27381 eval "$as_ac_var=no"
27382 fi
27383 rm -f conftest.err conftest.$ac_objext \
27384       conftest$ac_exeext conftest.$ac_ext
27385 fi
27386 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
27387 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
27388 if test `eval echo '${'$as_ac_var'}'` = yes; then
27389   cat >>confdefs.h <<_ACEOF
27390 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
27391 _ACEOF
27392
27393 fi
27394 done
27395
27396
27397 if test "$ac_cv_func_ctime_r" = no ; then
27398         ol_cv_func_ctime_r_nargs=0
27399 else
27400         echo "$as_me:$LINENO: checking number of arguments of ctime_r" >&5
27401 echo $ECHO_N "checking number of arguments of ctime_r... $ECHO_C" >&6
27402 if test "${ol_cv_func_ctime_r_nargs+set}" = set; then
27403   echo $ECHO_N "(cached) $ECHO_C" >&6
27404 else
27405   cat >conftest.$ac_ext <<_ACEOF
27406 /* confdefs.h.  */
27407 _ACEOF
27408 cat confdefs.h >>conftest.$ac_ext
27409 cat >>conftest.$ac_ext <<_ACEOF
27410 /* end confdefs.h.  */
27411 #include <time.h>
27412 int
27413 main ()
27414 {
27415 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
27416   ;
27417   return 0;
27418 }
27419 _ACEOF
27420 rm -f conftest.$ac_objext
27421 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27422   (eval $ac_compile) 2>conftest.er1
27423   ac_status=$?
27424   grep -v '^ *+' conftest.er1 >conftest.err
27425   rm -f conftest.er1
27426   cat conftest.err >&5
27427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27428   (exit $ac_status); } &&
27429          { ac_try='test -z "$ac_c_werror_flag"
27430                          || test ! -s conftest.err'
27431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27432   (eval $ac_try) 2>&5
27433   ac_status=$?
27434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27435   (exit $ac_status); }; } &&
27436          { ac_try='test -s conftest.$ac_objext'
27437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27438   (eval $ac_try) 2>&5
27439   ac_status=$?
27440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27441   (exit $ac_status); }; }; then
27442   ol_cv_func_ctime_r_nargs3=yes
27443 else
27444   echo "$as_me: failed program was:" >&5
27445 sed 's/^/| /' conftest.$ac_ext >&5
27446
27447 ol_cv_func_ctime_r_nargs3=no
27448 fi
27449 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27450
27451         cat >conftest.$ac_ext <<_ACEOF
27452 /* confdefs.h.  */
27453 _ACEOF
27454 cat confdefs.h >>conftest.$ac_ext
27455 cat >>conftest.$ac_ext <<_ACEOF
27456 /* end confdefs.h.  */
27457 #include <time.h>
27458 int
27459 main ()
27460 {
27461 time_t ti; char *buffer; ctime_r(&ti,buffer);
27462   ;
27463   return 0;
27464 }
27465 _ACEOF
27466 rm -f conftest.$ac_objext
27467 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27468   (eval $ac_compile) 2>conftest.er1
27469   ac_status=$?
27470   grep -v '^ *+' conftest.er1 >conftest.err
27471   rm -f conftest.er1
27472   cat conftest.err >&5
27473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27474   (exit $ac_status); } &&
27475          { ac_try='test -z "$ac_c_werror_flag"
27476                          || test ! -s conftest.err'
27477   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27478   (eval $ac_try) 2>&5
27479   ac_status=$?
27480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27481   (exit $ac_status); }; } &&
27482          { ac_try='test -s conftest.$ac_objext'
27483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27484   (eval $ac_try) 2>&5
27485   ac_status=$?
27486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27487   (exit $ac_status); }; }; then
27488   ol_cv_func_ctime_r_nargs2=yes
27489 else
27490   echo "$as_me: failed program was:" >&5
27491 sed 's/^/| /' conftest.$ac_ext >&5
27492
27493 ol_cv_func_ctime_r_nargs2=no
27494 fi
27495 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27496
27497         if test $ol_cv_func_ctime_r_nargs3 = yes &&
27498            test $ol_cv_func_ctime_r_nargs2 = no ; then
27499
27500                 ol_cv_func_ctime_r_nargs=3
27501
27502         elif test $ol_cv_func_ctime_r_nargs3 = no &&
27503              test $ol_cv_func_ctime_r_nargs2 = yes ; then
27504
27505                 ol_cv_func_ctime_r_nargs=2
27506
27507         else
27508                 ol_cv_func_ctime_r_nargs=0
27509         fi
27510
27511 fi
27512 echo "$as_me:$LINENO: result: $ol_cv_func_ctime_r_nargs" >&5
27513 echo "${ECHO_T}$ol_cv_func_ctime_r_nargs" >&6
27514
27515   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
27516
27517 cat >>confdefs.h <<_ACEOF
27518 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
27519 _ACEOF
27520
27521   fi
27522
27523 fi
27524
27525 if test "$ac_cv_func_gethostbyname_r" = yes ; then
27526         echo "$as_me:$LINENO: checking number of arguments of gethostbyname_r" >&5
27527 echo $ECHO_N "checking number of arguments of gethostbyname_r... $ECHO_C" >&6
27528 if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then
27529   echo $ECHO_N "(cached) $ECHO_C" >&6
27530 else
27531   cat >conftest.$ac_ext <<_ACEOF
27532 /* confdefs.h.  */
27533 _ACEOF
27534 cat confdefs.h >>conftest.$ac_ext
27535 cat >>conftest.$ac_ext <<_ACEOF
27536 /* end confdefs.h.  */
27537 #include <sys/types.h>
27538 #include <sys/socket.h>
27539 #include <netinet/in.h>
27540 #include <netdb.h>
27541 #define BUFSIZE (sizeof(struct hostent)+10)
27542 int
27543 main ()
27544 {
27545 struct hostent hent; char buffer[BUFSIZE];
27546                 int bufsize=BUFSIZE;int h_errno;
27547                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
27548                         buffer, bufsize, &h_errno);
27549   ;
27550   return 0;
27551 }
27552 _ACEOF
27553 rm -f conftest.$ac_objext
27554 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27555   (eval $ac_compile) 2>conftest.er1
27556   ac_status=$?
27557   grep -v '^ *+' conftest.er1 >conftest.err
27558   rm -f conftest.er1
27559   cat conftest.err >&5
27560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27561   (exit $ac_status); } &&
27562          { ac_try='test -z "$ac_c_werror_flag"
27563                          || test ! -s conftest.err'
27564   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27565   (eval $ac_try) 2>&5
27566   ac_status=$?
27567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27568   (exit $ac_status); }; } &&
27569          { ac_try='test -s conftest.$ac_objext'
27570   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27571   (eval $ac_try) 2>&5
27572   ac_status=$?
27573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27574   (exit $ac_status); }; }; then
27575   ol_cv_func_gethostbyname_r_nargs5=yes
27576 else
27577   echo "$as_me: failed program was:" >&5
27578 sed 's/^/| /' conftest.$ac_ext >&5
27579
27580 ol_cv_func_gethostbyname_r_nargs5=no
27581 fi
27582 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27583
27584         cat >conftest.$ac_ext <<_ACEOF
27585 /* confdefs.h.  */
27586 _ACEOF
27587 cat confdefs.h >>conftest.$ac_ext
27588 cat >>conftest.$ac_ext <<_ACEOF
27589 /* end confdefs.h.  */
27590 #include <sys/types.h>
27591 #include <sys/socket.h>
27592 #include <netinet/in.h>
27593 #include <netdb.h>
27594 #define BUFSIZE (sizeof(struct hostent)+10)
27595 int
27596 main ()
27597 {
27598 struct hostent hent;struct hostent *rhent;
27599                 char buffer[BUFSIZE];
27600                 int bufsize=BUFSIZE;int h_errno;
27601                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
27602                         &rhent, &h_errno);
27603   ;
27604   return 0;
27605 }
27606 _ACEOF
27607 rm -f conftest.$ac_objext
27608 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27609   (eval $ac_compile) 2>conftest.er1
27610   ac_status=$?
27611   grep -v '^ *+' conftest.er1 >conftest.err
27612   rm -f conftest.er1
27613   cat conftest.err >&5
27614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27615   (exit $ac_status); } &&
27616          { ac_try='test -z "$ac_c_werror_flag"
27617                          || test ! -s conftest.err'
27618   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27619   (eval $ac_try) 2>&5
27620   ac_status=$?
27621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27622   (exit $ac_status); }; } &&
27623          { ac_try='test -s conftest.$ac_objext'
27624   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27625   (eval $ac_try) 2>&5
27626   ac_status=$?
27627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27628   (exit $ac_status); }; }; then
27629   ol_cv_func_gethostbyname_r_nargs6=yes
27630 else
27631   echo "$as_me: failed program was:" >&5
27632 sed 's/^/| /' conftest.$ac_ext >&5
27633
27634 ol_cv_func_gethostbyname_r_nargs6=no
27635 fi
27636 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27637
27638         if test $ol_cv_func_gethostbyname_r_nargs5 = yes &&
27639            test $ol_cv_func_gethostbyname_r_nargs6 = no ; then
27640
27641                 ol_cv_func_gethostbyname_r_nargs=5
27642
27643         elif test $ol_cv_func_gethostbyname_r_nargs5 = no &&
27644              test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
27645
27646                 ol_cv_func_gethostbyname_r_nargs=6
27647
27648         else
27649                 ol_cv_func_gethostbyname_r_nargs=0
27650         fi
27651
27652 fi
27653 echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyname_r_nargs" >&5
27654 echo "${ECHO_T}$ol_cv_func_gethostbyname_r_nargs" >&6
27655   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
27656
27657 cat >>confdefs.h <<_ACEOF
27658 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
27659 _ACEOF
27660
27661   fi
27662
27663 else
27664         ol_cv_func_gethostbyname_r_nargs=0
27665 fi
27666
27667 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
27668         echo "$as_me:$LINENO: checking number of arguments of gethostbyaddr_r" >&5
27669 echo $ECHO_N "checking number of arguments of gethostbyaddr_r... $ECHO_C" >&6
27670 if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then
27671   echo $ECHO_N "(cached) $ECHO_C" >&6
27672 else
27673   cat >conftest.$ac_ext <<_ACEOF
27674 /* confdefs.h.  */
27675 _ACEOF
27676 cat confdefs.h >>conftest.$ac_ext
27677 cat >>conftest.$ac_ext <<_ACEOF
27678 /* end confdefs.h.  */
27679 #include <sys/types.h>
27680 #include <sys/socket.h>
27681 #include <netinet/in.h>
27682 #include <netdb.h>
27683 #define BUFSIZE (sizeof(struct hostent)+10)
27684 int
27685 main ()
27686 {
27687 struct hostent hent; char buffer[BUFSIZE];
27688             struct in_addr add;
27689             size_t alen=sizeof(struct in_addr);
27690             int bufsize=BUFSIZE;int h_errno;
27691                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
27692                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
27693   ;
27694   return 0;
27695 }
27696 _ACEOF
27697 rm -f conftest.$ac_objext
27698 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27699   (eval $ac_compile) 2>conftest.er1
27700   ac_status=$?
27701   grep -v '^ *+' conftest.er1 >conftest.err
27702   rm -f conftest.er1
27703   cat conftest.err >&5
27704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27705   (exit $ac_status); } &&
27706          { ac_try='test -z "$ac_c_werror_flag"
27707                          || test ! -s conftest.err'
27708   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27709   (eval $ac_try) 2>&5
27710   ac_status=$?
27711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27712   (exit $ac_status); }; } &&
27713          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
27719   ol_cv_func_gethostbyaddr_r_nargs7=yes
27720 else
27721   echo "$as_me: failed program was:" >&5
27722 sed 's/^/| /' conftest.$ac_ext >&5
27723
27724 ol_cv_func_gethostbyaddr_r_nargs7=no
27725 fi
27726 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27727
27728         cat >conftest.$ac_ext <<_ACEOF
27729 /* confdefs.h.  */
27730 _ACEOF
27731 cat confdefs.h >>conftest.$ac_ext
27732 cat >>conftest.$ac_ext <<_ACEOF
27733 /* end confdefs.h.  */
27734 #include <sys/types.h>
27735 #include <sys/socket.h>
27736 #include <netinet/in.h>
27737 #include <netdb.h>
27738 #define BUFSIZE (sizeof(struct hostent)+10)
27739 int
27740 main ()
27741 {
27742 struct hostent hent;
27743                 struct hostent *rhent; char buffer[BUFSIZE];
27744                 struct in_addr add;
27745                 size_t alen=sizeof(struct in_addr);
27746                 int bufsize=BUFSIZE;int h_errno;
27747                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
27748                         alen, AF_INET, &hent, buffer, bufsize,
27749                         &rhent, &h_errno);
27750   ;
27751   return 0;
27752 }
27753 _ACEOF
27754 rm -f conftest.$ac_objext
27755 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27756   (eval $ac_compile) 2>conftest.er1
27757   ac_status=$?
27758   grep -v '^ *+' conftest.er1 >conftest.err
27759   rm -f conftest.er1
27760   cat conftest.err >&5
27761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27762   (exit $ac_status); } &&
27763          { ac_try='test -z "$ac_c_werror_flag"
27764                          || test ! -s conftest.err'
27765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27766   (eval $ac_try) 2>&5
27767   ac_status=$?
27768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27769   (exit $ac_status); }; } &&
27770          { ac_try='test -s conftest.$ac_objext'
27771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27772   (eval $ac_try) 2>&5
27773   ac_status=$?
27774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27775   (exit $ac_status); }; }; then
27776   ol_cv_func_gethostbyaddr_r_nargs8=yes
27777 else
27778   echo "$as_me: failed program was:" >&5
27779 sed 's/^/| /' conftest.$ac_ext >&5
27780
27781 ol_cv_func_gethostbyaddr_r_nargs8=no
27782 fi
27783 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27784
27785         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes &&
27786            test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
27787
27788                 ol_cv_func_gethostbyaddr_r_nargs=7
27789
27790         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no &&
27791              test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
27792
27793                 ol_cv_func_gethostbyaddr_r_nargs=8
27794
27795         else
27796                 ol_cv_func_gethostbyaddr_r_nargs=0
27797         fi
27798
27799 fi
27800 echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5
27801 echo "${ECHO_T}$ol_cv_func_gethostbyaddr_r_nargs" >&6
27802   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
27803
27804 cat >>confdefs.h <<_ACEOF
27805 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
27806 _ACEOF
27807
27808   fi
27809
27810 else
27811         ol_cv_func_gethostbyaddr_r_nargs=0
27812 fi
27813
27814 ol_link_ldbm=no
27815
27816 case $ol_enable_ldbm_api in auto | berkeley | bcompat)
27817
27818         if test $ol_enable_ldbm_api = bcompat; then \
27819
27820
27821 for ac_header in db_185.h db.h
27822 do
27823 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
27824 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27825   echo "$as_me:$LINENO: checking for $ac_header" >&5
27826 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27827 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27828   echo $ECHO_N "(cached) $ECHO_C" >&6
27829 fi
27830 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27831 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27832 else
27833   # Is the header compilable?
27834 echo "$as_me:$LINENO: checking $ac_header usability" >&5
27835 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
27836 cat >conftest.$ac_ext <<_ACEOF
27837 /* confdefs.h.  */
27838 _ACEOF
27839 cat confdefs.h >>conftest.$ac_ext
27840 cat >>conftest.$ac_ext <<_ACEOF
27841 /* end confdefs.h.  */
27842 $ac_includes_default
27843 #include <$ac_header>
27844 _ACEOF
27845 rm -f conftest.$ac_objext
27846 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27847   (eval $ac_compile) 2>conftest.er1
27848   ac_status=$?
27849   grep -v '^ *+' conftest.er1 >conftest.err
27850   rm -f conftest.er1
27851   cat conftest.err >&5
27852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27853   (exit $ac_status); } &&
27854          { ac_try='test -z "$ac_c_werror_flag"
27855                          || test ! -s conftest.err'
27856   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27857   (eval $ac_try) 2>&5
27858   ac_status=$?
27859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27860   (exit $ac_status); }; } &&
27861          { ac_try='test -s conftest.$ac_objext'
27862   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27863   (eval $ac_try) 2>&5
27864   ac_status=$?
27865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27866   (exit $ac_status); }; }; then
27867   ac_header_compiler=yes
27868 else
27869   echo "$as_me: failed program was:" >&5
27870 sed 's/^/| /' conftest.$ac_ext >&5
27871
27872 ac_header_compiler=no
27873 fi
27874 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27875 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27876 echo "${ECHO_T}$ac_header_compiler" >&6
27877
27878 # Is the header present?
27879 echo "$as_me:$LINENO: checking $ac_header presence" >&5
27880 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
27881 cat >conftest.$ac_ext <<_ACEOF
27882 /* confdefs.h.  */
27883 _ACEOF
27884 cat confdefs.h >>conftest.$ac_ext
27885 cat >>conftest.$ac_ext <<_ACEOF
27886 /* end confdefs.h.  */
27887 #include <$ac_header>
27888 _ACEOF
27889 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
27890   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
27891   ac_status=$?
27892   grep -v '^ *+' conftest.er1 >conftest.err
27893   rm -f conftest.er1
27894   cat conftest.err >&5
27895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27896   (exit $ac_status); } >/dev/null; then
27897   if test -s conftest.err; then
27898     ac_cpp_err=$ac_c_preproc_warn_flag
27899     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
27900   else
27901     ac_cpp_err=
27902   fi
27903 else
27904   ac_cpp_err=yes
27905 fi
27906 if test -z "$ac_cpp_err"; then
27907   ac_header_preproc=yes
27908 else
27909   echo "$as_me: failed program was:" >&5
27910 sed 's/^/| /' conftest.$ac_ext >&5
27911
27912   ac_header_preproc=no
27913 fi
27914 rm -f conftest.err conftest.$ac_ext
27915 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27916 echo "${ECHO_T}$ac_header_preproc" >&6
27917
27918 # So?  What about this header?
27919 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
27920   yes:no: )
27921     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27922 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27923     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
27924 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
27925     ac_header_preproc=yes
27926     ;;
27927   no:yes:* )
27928     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27929 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27930     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
27931 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
27932     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
27933 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
27934     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
27935 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
27936     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27937 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27938     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
27939 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
27940     (
27941       cat <<\_ASBOX
27942 ## --------------------------------------------- ##
27943 ## Report this to <http://www.openldap.org/its/> ##
27944 ## --------------------------------------------- ##
27945 _ASBOX
27946     ) |
27947       sed "s/^/$as_me: WARNING:     /" >&2
27948     ;;
27949 esac
27950 echo "$as_me:$LINENO: checking for $ac_header" >&5
27951 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27952 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27953   echo $ECHO_N "(cached) $ECHO_C" >&6
27954 else
27955   eval "$as_ac_Header=\$ac_header_preproc"
27956 fi
27957 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27958 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27959
27960 fi
27961 if test `eval echo '${'$as_ac_Header'}'` = yes; then
27962   cat >>confdefs.h <<_ACEOF
27963 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
27964 _ACEOF
27965
27966 fi
27967
27968 done
27969
27970 if test $ac_cv_header_db_185_h = yes || test $ac_cv_header_db_h = yes; then
27971         echo "$as_me:$LINENO: checking if Berkeley DB header compatibility" >&5
27972 echo $ECHO_N "checking if Berkeley DB header compatibility... $ECHO_C" >&6
27973 if test "${ol_cv_header_db1+set}" = set; then
27974   echo $ECHO_N "(cached) $ECHO_C" >&6
27975 else
27976
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
27984 #if HAVE_DB_185_H
27985 #       include <db_185.h>
27986 #else
27987 #       include <db.h>
27988 #endif
27989
27990  /* this check could be improved */
27991 #ifndef DB_VERSION_MAJOR
27992 #       define DB_VERSION_MAJOR 1
27993 #endif
27994
27995 #if DB_VERSION_MAJOR == 1
27996         __db_version_1
27997 #endif
27998
27999 _ACEOF
28000 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28001   $EGREP "__db_version_1" >/dev/null 2>&1; then
28002   ol_cv_header_db1=yes
28003 else
28004   ol_cv_header_db1=no
28005 fi
28006 rm -f conftest*
28007
28008 fi
28009 echo "$as_me:$LINENO: result: $ol_cv_header_db1" >&5
28010 echo "${ECHO_T}$ol_cv_header_db1" >&6
28011
28012         if test $ol_cv_header_db1 = yes ; then
28013                 ol_cv_lib_db=no
28014
28015 echo "$as_me:$LINENO: checking for Berkeley DB major version" >&5
28016 echo $ECHO_N "checking for Berkeley DB major version... $ECHO_C" >&6
28017 if test "${ol_cv_bdb_major+set}" = set; then
28018   echo $ECHO_N "(cached) $ECHO_C" >&6
28019 else
28020
28021         ol_cv_bdb_major=0
28022         if test $ol_cv_bdb_major = 0 ; then
28023                 cat >conftest.$ac_ext <<_ACEOF
28024 /* confdefs.h.  */
28025 _ACEOF
28026 cat confdefs.h >>conftest.$ac_ext
28027 cat >>conftest.$ac_ext <<_ACEOF
28028 /* end confdefs.h.  */
28029
28030 #include <db.h>
28031 #ifndef DB_VERSION_MAJOR
28032 #       define DB_VERSION_MAJOR 1
28033 #endif
28034 #if DB_VERSION_MAJOR == 4
28035 __db_version
28036 #endif
28037
28038 _ACEOF
28039 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28040   $EGREP "__db_version" >/dev/null 2>&1; then
28041   ol_cv_bdb_major=4
28042 else
28043   :
28044 fi
28045 rm -f conftest*
28046
28047         fi
28048         if test $ol_cv_bdb_major = 0 ; then
28049                 cat >conftest.$ac_ext <<_ACEOF
28050 /* confdefs.h.  */
28051 _ACEOF
28052 cat confdefs.h >>conftest.$ac_ext
28053 cat >>conftest.$ac_ext <<_ACEOF
28054 /* end confdefs.h.  */
28055
28056 #include <db.h>
28057 #ifndef DB_VERSION_MAJOR
28058 #       define DB_VERSION_MAJOR 1
28059 #endif
28060 #if DB_VERSION_MAJOR == 3
28061 __db_version
28062 #endif
28063
28064 _ACEOF
28065 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28066   $EGREP "__db_version" >/dev/null 2>&1; then
28067   ol_cv_bdb_major=3
28068 else
28069   :
28070 fi
28071 rm -f conftest*
28072
28073         fi
28074         if test $ol_cv_bdb_major = 0 ; then
28075                 cat >conftest.$ac_ext <<_ACEOF
28076 /* confdefs.h.  */
28077 _ACEOF
28078 cat confdefs.h >>conftest.$ac_ext
28079 cat >>conftest.$ac_ext <<_ACEOF
28080 /* end confdefs.h.  */
28081
28082 #include <db.h>
28083 #ifndef DB_VERSION_MAJOR
28084 #       define DB_VERSION_MAJOR 1
28085 #endif
28086 #if DB_VERSION_MAJOR == 2
28087 __db_version
28088 #endif
28089
28090 _ACEOF
28091 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28092   $EGREP "__db_version" >/dev/null 2>&1; then
28093   ol_cv_bdb_major=2
28094 else
28095   :
28096 fi
28097 rm -f conftest*
28098
28099         fi
28100         if test $ol_cv_bdb_major = 0 ; then
28101                 cat >conftest.$ac_ext <<_ACEOF
28102 /* confdefs.h.  */
28103 _ACEOF
28104 cat confdefs.h >>conftest.$ac_ext
28105 cat >>conftest.$ac_ext <<_ACEOF
28106 /* end confdefs.h.  */
28107
28108 #include <db.h>
28109 #ifndef DB_VERSION_MAJOR
28110 #       define DB_VERSION_MAJOR 1
28111 #endif
28112 #if DB_VERSION_MAJOR == 1
28113 __db_version
28114 #endif
28115
28116 _ACEOF
28117 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28118   $EGREP "__db_version" >/dev/null 2>&1; then
28119   ol_cv_bdb_major=1
28120 else
28121   :
28122 fi
28123 rm -f conftest*
28124
28125         fi
28126
28127         if test $ol_cv_bdb_major = 0 ; then
28128                 { { echo "$as_me:$LINENO: error: Unknown Berkeley DB major version" >&5
28129 echo "$as_me: error: Unknown Berkeley DB major version" >&2;}
28130    { (exit 1); exit 1; }; }
28131         fi
28132
28133 fi
28134 echo "$as_me:$LINENO: result: $ol_cv_bdb_major" >&5
28135 echo "${ECHO_T}$ol_cv_bdb_major" >&6
28136
28137 echo "$as_me:$LINENO: checking for Berkeley DB minor version" >&5
28138 echo $ECHO_N "checking for Berkeley DB minor version... $ECHO_C" >&6
28139 if test "${ol_cv_bdb_minor+set}" = set; then
28140   echo $ECHO_N "(cached) $ECHO_C" >&6
28141 else
28142
28143         ol_cv_bdb_minor=0
28144         if test $ol_cv_bdb_minor = 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_MINOR
28154 #       define DB_VERSION_MINOR 0
28155 #endif
28156 #if DB_VERSION_MINOR == 9
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_minor=9
28164 else
28165   :
28166 fi
28167 rm -f conftest*
28168
28169         fi
28170         if test $ol_cv_bdb_minor = 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_MINOR
28180 #       define DB_VERSION_MINOR 0
28181 #endif
28182 #if DB_VERSION_MINOR == 8
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_minor=8
28190 else
28191   :
28192 fi
28193 rm -f conftest*
28194
28195         fi
28196         if test $ol_cv_bdb_minor = 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_MINOR
28206 #       define DB_VERSION_MINOR 0
28207 #endif
28208 #if DB_VERSION_MINOR == 7
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_minor=7
28216 else
28217   :
28218 fi
28219 rm -f conftest*
28220
28221         fi
28222         if test $ol_cv_bdb_minor = 0 ; then
28223                 cat >conftest.$ac_ext <<_ACEOF
28224 /* confdefs.h.  */
28225 _ACEOF
28226 cat confdefs.h >>conftest.$ac_ext
28227 cat >>conftest.$ac_ext <<_ACEOF
28228 /* end confdefs.h.  */
28229
28230 #include <db.h>
28231 #ifndef DB_VERSION_MINOR
28232 #       define DB_VERSION_MINOR 0
28233 #endif
28234 #if DB_VERSION_MINOR == 6
28235 __db_version
28236 #endif
28237
28238 _ACEOF
28239 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28240   $EGREP "__db_version" >/dev/null 2>&1; then
28241   ol_cv_bdb_minor=6
28242 else
28243   :
28244 fi
28245 rm -f conftest*
28246
28247         fi
28248         if test $ol_cv_bdb_minor = 0 ; then
28249                 cat >conftest.$ac_ext <<_ACEOF
28250 /* confdefs.h.  */
28251 _ACEOF
28252 cat confdefs.h >>conftest.$ac_ext
28253 cat >>conftest.$ac_ext <<_ACEOF
28254 /* end confdefs.h.  */
28255
28256 #include <db.h>
28257 #ifndef DB_VERSION_MINOR
28258 #       define DB_VERSION_MINOR 0
28259 #endif
28260 #if DB_VERSION_MINOR == 5
28261 __db_version
28262 #endif
28263
28264 _ACEOF
28265 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28266   $EGREP "__db_version" >/dev/null 2>&1; then
28267   ol_cv_bdb_minor=5
28268 else
28269   :
28270 fi
28271 rm -f conftest*
28272
28273         fi
28274         if test $ol_cv_bdb_minor = 0 ; then
28275                 cat >conftest.$ac_ext <<_ACEOF
28276 /* confdefs.h.  */
28277 _ACEOF
28278 cat confdefs.h >>conftest.$ac_ext
28279 cat >>conftest.$ac_ext <<_ACEOF
28280 /* end confdefs.h.  */
28281
28282 #include <db.h>
28283 #ifndef DB_VERSION_MINOR
28284 #       define DB_VERSION_MINOR 0
28285 #endif
28286 #if DB_VERSION_MINOR == 4
28287 __db_version
28288 #endif
28289
28290 _ACEOF
28291 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28292   $EGREP "__db_version" >/dev/null 2>&1; then
28293   ol_cv_bdb_minor=4
28294 else
28295   :
28296 fi
28297 rm -f conftest*
28298
28299         fi
28300         if test $ol_cv_bdb_minor = 0 ; then
28301                 cat >conftest.$ac_ext <<_ACEOF
28302 /* confdefs.h.  */
28303 _ACEOF
28304 cat confdefs.h >>conftest.$ac_ext
28305 cat >>conftest.$ac_ext <<_ACEOF
28306 /* end confdefs.h.  */
28307
28308 #include <db.h>
28309 #ifndef DB_VERSION_MINOR
28310 #       define DB_VERSION_MINOR 0
28311 #endif
28312 #if DB_VERSION_MINOR == 3
28313 __db_version
28314 #endif
28315
28316 _ACEOF
28317 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28318   $EGREP "__db_version" >/dev/null 2>&1; then
28319   ol_cv_bdb_minor=3
28320 else
28321   :
28322 fi
28323 rm -f conftest*
28324
28325         fi
28326         if test $ol_cv_bdb_minor = 0 ; then
28327                 cat >conftest.$ac_ext <<_ACEOF
28328 /* confdefs.h.  */
28329 _ACEOF
28330 cat confdefs.h >>conftest.$ac_ext
28331 cat >>conftest.$ac_ext <<_ACEOF
28332 /* end confdefs.h.  */
28333
28334 #include <db.h>
28335 #ifndef DB_VERSION_MINOR
28336 #       define DB_VERSION_MINOR 0
28337 #endif
28338 #if DB_VERSION_MINOR == 2
28339 __db_version
28340 #endif
28341
28342 _ACEOF
28343 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28344   $EGREP "__db_version" >/dev/null 2>&1; then
28345   ol_cv_bdb_minor=2
28346 else
28347   :
28348 fi
28349 rm -f conftest*
28350
28351         fi
28352         if test $ol_cv_bdb_minor = 0 ; then
28353                 cat >conftest.$ac_ext <<_ACEOF
28354 /* confdefs.h.  */
28355 _ACEOF
28356 cat confdefs.h >>conftest.$ac_ext
28357 cat >>conftest.$ac_ext <<_ACEOF
28358 /* end confdefs.h.  */
28359
28360 #include <db.h>
28361 #ifndef DB_VERSION_MINOR
28362 #       define DB_VERSION_MINOR 0
28363 #endif
28364 #if DB_VERSION_MINOR == 1
28365 __db_version
28366 #endif
28367
28368 _ACEOF
28369 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28370   $EGREP "__db_version" >/dev/null 2>&1; then
28371   ol_cv_bdb_minor=1
28372 else
28373   :
28374 fi
28375 rm -f conftest*
28376
28377         fi
28378
28379 fi
28380 echo "$as_me:$LINENO: result: $ol_cv_bdb_minor" >&5
28381 echo "${ECHO_T}$ol_cv_bdb_minor" >&6
28382
28383 if test $ol_cv_bdb_major = 4 ; then
28384         if test $ol_cv_bdb_minor = 4 ; then
28385                 if test $ol_cv_lib_db = no ; then
28386         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb44)" >&5
28387 echo $ECHO_N "checking for Berkeley DB link (-ldb44)... $ECHO_C" >&6
28388 if test "${ol_cv_db_db44+set}" = set; then
28389   echo $ECHO_N "(cached) $ECHO_C" >&6
28390 else
28391
28392         ol_DB_LIB=-ldb44
28393         ol_LIBS=$LIBS
28394         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28395
28396         cat >conftest.$ac_ext <<_ACEOF
28397 /* confdefs.h.  */
28398 _ACEOF
28399 cat confdefs.h >>conftest.$ac_ext
28400 cat >>conftest.$ac_ext <<_ACEOF
28401 /* end confdefs.h.  */
28402
28403 #ifdef HAVE_DB_185_H
28404 # include <db_185.h>
28405 #else
28406 # include <db.h>
28407 #endif
28408
28409 #ifndef DB_VERSION_MAJOR
28410 # define DB_VERSION_MAJOR 1
28411 #endif
28412
28413 #ifndef NULL
28414 #define NULL ((void*)0)
28415 #endif
28416
28417 int
28418 main ()
28419 {
28420
28421 #if DB_VERSION_MAJOR > 1
28422         {
28423                 char *version;
28424                 int major, minor, patch;
28425
28426                 version = db_version( &major, &minor, &patch );
28427
28428                 if( major != DB_VERSION_MAJOR ||
28429                         minor < DB_VERSION_MINOR )
28430                 {
28431                         printf("Berkeley DB version mismatch\n"
28432                                 "\theader: %s\n\tlibrary: %s\n",
28433                                 DB_VERSION_STRING, version);
28434                         return 1;
28435                 }
28436         }
28437 #endif
28438
28439 #if DB_VERSION_MAJOR > 2
28440         db_env_create( NULL, 0 );
28441 #elif DB_VERSION_MAJOR > 1
28442         db_appexit( NULL );
28443 #else
28444         (void) dbopen( NULL, 0, 0, 0, NULL);
28445 #endif
28446
28447   ;
28448   return 0;
28449 }
28450 _ACEOF
28451 rm -f conftest.$ac_objext conftest$ac_exeext
28452 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28453   (eval $ac_link) 2>conftest.er1
28454   ac_status=$?
28455   grep -v '^ *+' conftest.er1 >conftest.err
28456   rm -f conftest.er1
28457   cat conftest.err >&5
28458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28459   (exit $ac_status); } &&
28460          { ac_try='test -z "$ac_c_werror_flag"
28461                          || test ! -s conftest.err'
28462   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28463   (eval $ac_try) 2>&5
28464   ac_status=$?
28465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28466   (exit $ac_status); }; } &&
28467          { ac_try='test -s conftest$ac_exeext'
28468   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28469   (eval $ac_try) 2>&5
28470   ac_status=$?
28471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28472   (exit $ac_status); }; }; then
28473   ol_cv_db_db44=yes
28474 else
28475   echo "$as_me: failed program was:" >&5
28476 sed 's/^/| /' conftest.$ac_ext >&5
28477
28478 ol_cv_db_db44=no
28479 fi
28480 rm -f conftest.err conftest.$ac_objext \
28481       conftest$ac_exeext conftest.$ac_ext
28482
28483         LIBS="$ol_LIBS"
28484
28485 fi
28486 echo "$as_me:$LINENO: result: $ol_cv_db_db44" >&5
28487 echo "${ECHO_T}$ol_cv_db_db44" >&6
28488
28489         if test $ol_cv_db_db44 = yes ; then
28490                 ol_cv_lib_db=-ldb44
28491         fi
28492 fi
28493
28494                 if test $ol_cv_lib_db = no ; then
28495         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-44)" >&5
28496 echo $ECHO_N "checking for Berkeley DB link (-ldb-44)... $ECHO_C" >&6
28497 if test "${ol_cv_db_db_44+set}" = set; then
28498   echo $ECHO_N "(cached) $ECHO_C" >&6
28499 else
28500
28501         ol_DB_LIB=-ldb-44
28502         ol_LIBS=$LIBS
28503         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28504
28505         cat >conftest.$ac_ext <<_ACEOF
28506 /* confdefs.h.  */
28507 _ACEOF
28508 cat confdefs.h >>conftest.$ac_ext
28509 cat >>conftest.$ac_ext <<_ACEOF
28510 /* end confdefs.h.  */
28511
28512 #ifdef HAVE_DB_185_H
28513 # include <db_185.h>
28514 #else
28515 # include <db.h>
28516 #endif
28517
28518 #ifndef DB_VERSION_MAJOR
28519 # define DB_VERSION_MAJOR 1
28520 #endif
28521
28522 #ifndef NULL
28523 #define NULL ((void*)0)
28524 #endif
28525
28526 int
28527 main ()
28528 {
28529
28530 #if DB_VERSION_MAJOR > 1
28531         {
28532                 char *version;
28533                 int major, minor, patch;
28534
28535                 version = db_version( &major, &minor, &patch );
28536
28537                 if( major != DB_VERSION_MAJOR ||
28538                         minor < DB_VERSION_MINOR )
28539                 {
28540                         printf("Berkeley DB version mismatch\n"
28541                                 "\theader: %s\n\tlibrary: %s\n",
28542                                 DB_VERSION_STRING, version);
28543                         return 1;
28544                 }
28545         }
28546 #endif
28547
28548 #if DB_VERSION_MAJOR > 2
28549         db_env_create( NULL, 0 );
28550 #elif DB_VERSION_MAJOR > 1
28551         db_appexit( NULL );
28552 #else
28553         (void) dbopen( NULL, 0, 0, 0, NULL);
28554 #endif
28555
28556   ;
28557   return 0;
28558 }
28559 _ACEOF
28560 rm -f conftest.$ac_objext conftest$ac_exeext
28561 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28562   (eval $ac_link) 2>conftest.er1
28563   ac_status=$?
28564   grep -v '^ *+' conftest.er1 >conftest.err
28565   rm -f conftest.er1
28566   cat conftest.err >&5
28567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28568   (exit $ac_status); } &&
28569          { ac_try='test -z "$ac_c_werror_flag"
28570                          || test ! -s conftest.err'
28571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28572   (eval $ac_try) 2>&5
28573   ac_status=$?
28574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28575   (exit $ac_status); }; } &&
28576          { ac_try='test -s conftest$ac_exeext'
28577   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28578   (eval $ac_try) 2>&5
28579   ac_status=$?
28580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28581   (exit $ac_status); }; }; then
28582   ol_cv_db_db_44=yes
28583 else
28584   echo "$as_me: failed program was:" >&5
28585 sed 's/^/| /' conftest.$ac_ext >&5
28586
28587 ol_cv_db_db_44=no
28588 fi
28589 rm -f conftest.err conftest.$ac_objext \
28590       conftest$ac_exeext conftest.$ac_ext
28591
28592         LIBS="$ol_LIBS"
28593
28594 fi
28595 echo "$as_me:$LINENO: result: $ol_cv_db_db_44" >&5
28596 echo "${ECHO_T}$ol_cv_db_db_44" >&6
28597
28598         if test $ol_cv_db_db_44 = yes ; then
28599                 ol_cv_lib_db=-ldb-44
28600         fi
28601 fi
28602
28603                 if test $ol_cv_lib_db = no ; then
28604         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.4)" >&5
28605 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.4)... $ECHO_C" >&6
28606 if test "${ol_cv_db_db_4_dot_4+set}" = set; then
28607   echo $ECHO_N "(cached) $ECHO_C" >&6
28608 else
28609
28610         ol_DB_LIB=-ldb-4.4
28611         ol_LIBS=$LIBS
28612         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28613
28614         cat >conftest.$ac_ext <<_ACEOF
28615 /* confdefs.h.  */
28616 _ACEOF
28617 cat confdefs.h >>conftest.$ac_ext
28618 cat >>conftest.$ac_ext <<_ACEOF
28619 /* end confdefs.h.  */
28620
28621 #ifdef HAVE_DB_185_H
28622 # include <db_185.h>
28623 #else
28624 # include <db.h>
28625 #endif
28626
28627 #ifndef DB_VERSION_MAJOR
28628 # define DB_VERSION_MAJOR 1
28629 #endif
28630
28631 #ifndef NULL
28632 #define NULL ((void*)0)
28633 #endif
28634
28635 int
28636 main ()
28637 {
28638
28639 #if DB_VERSION_MAJOR > 1
28640         {
28641                 char *version;
28642                 int major, minor, patch;
28643
28644                 version = db_version( &major, &minor, &patch );
28645
28646                 if( major != DB_VERSION_MAJOR ||
28647                         minor < DB_VERSION_MINOR )
28648                 {
28649                         printf("Berkeley DB version mismatch\n"
28650                                 "\theader: %s\n\tlibrary: %s\n",
28651                                 DB_VERSION_STRING, version);
28652                         return 1;
28653                 }
28654         }
28655 #endif
28656
28657 #if DB_VERSION_MAJOR > 2
28658         db_env_create( NULL, 0 );
28659 #elif DB_VERSION_MAJOR > 1
28660         db_appexit( NULL );
28661 #else
28662         (void) dbopen( NULL, 0, 0, 0, NULL);
28663 #endif
28664
28665   ;
28666   return 0;
28667 }
28668 _ACEOF
28669 rm -f conftest.$ac_objext conftest$ac_exeext
28670 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28671   (eval $ac_link) 2>conftest.er1
28672   ac_status=$?
28673   grep -v '^ *+' conftest.er1 >conftest.err
28674   rm -f conftest.er1
28675   cat conftest.err >&5
28676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28677   (exit $ac_status); } &&
28678          { ac_try='test -z "$ac_c_werror_flag"
28679                          || test ! -s conftest.err'
28680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28681   (eval $ac_try) 2>&5
28682   ac_status=$?
28683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28684   (exit $ac_status); }; } &&
28685          { ac_try='test -s conftest$ac_exeext'
28686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28687   (eval $ac_try) 2>&5
28688   ac_status=$?
28689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28690   (exit $ac_status); }; }; then
28691   ol_cv_db_db_4_dot_4=yes
28692 else
28693   echo "$as_me: failed program was:" >&5
28694 sed 's/^/| /' conftest.$ac_ext >&5
28695
28696 ol_cv_db_db_4_dot_4=no
28697 fi
28698 rm -f conftest.err conftest.$ac_objext \
28699       conftest$ac_exeext conftest.$ac_ext
28700
28701         LIBS="$ol_LIBS"
28702
28703 fi
28704 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_4" >&5
28705 echo "${ECHO_T}$ol_cv_db_db_4_dot_4" >&6
28706
28707         if test $ol_cv_db_db_4_dot_4 = yes ; then
28708                 ol_cv_lib_db=-ldb-4.4
28709         fi
28710 fi
28711
28712                 if test $ol_cv_lib_db = no ; then
28713         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-4)" >&5
28714 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-4)... $ECHO_C" >&6
28715 if test "${ol_cv_db_db_4_4+set}" = set; then
28716   echo $ECHO_N "(cached) $ECHO_C" >&6
28717 else
28718
28719         ol_DB_LIB=-ldb-4-4
28720         ol_LIBS=$LIBS
28721         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28722
28723         cat >conftest.$ac_ext <<_ACEOF
28724 /* confdefs.h.  */
28725 _ACEOF
28726 cat confdefs.h >>conftest.$ac_ext
28727 cat >>conftest.$ac_ext <<_ACEOF
28728 /* end confdefs.h.  */
28729
28730 #ifdef HAVE_DB_185_H
28731 # include <db_185.h>
28732 #else
28733 # include <db.h>
28734 #endif
28735
28736 #ifndef DB_VERSION_MAJOR
28737 # define DB_VERSION_MAJOR 1
28738 #endif
28739
28740 #ifndef NULL
28741 #define NULL ((void*)0)
28742 #endif
28743
28744 int
28745 main ()
28746 {
28747
28748 #if DB_VERSION_MAJOR > 1
28749         {
28750                 char *version;
28751                 int major, minor, patch;
28752
28753                 version = db_version( &major, &minor, &patch );
28754
28755                 if( major != DB_VERSION_MAJOR ||
28756                         minor < DB_VERSION_MINOR )
28757                 {
28758                         printf("Berkeley DB version mismatch\n"
28759                                 "\theader: %s\n\tlibrary: %s\n",
28760                                 DB_VERSION_STRING, version);
28761                         return 1;
28762                 }
28763         }
28764 #endif
28765
28766 #if DB_VERSION_MAJOR > 2
28767         db_env_create( NULL, 0 );
28768 #elif DB_VERSION_MAJOR > 1
28769         db_appexit( NULL );
28770 #else
28771         (void) dbopen( NULL, 0, 0, 0, NULL);
28772 #endif
28773
28774   ;
28775   return 0;
28776 }
28777 _ACEOF
28778 rm -f conftest.$ac_objext conftest$ac_exeext
28779 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28780   (eval $ac_link) 2>conftest.er1
28781   ac_status=$?
28782   grep -v '^ *+' conftest.er1 >conftest.err
28783   rm -f conftest.er1
28784   cat conftest.err >&5
28785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28786   (exit $ac_status); } &&
28787          { ac_try='test -z "$ac_c_werror_flag"
28788                          || test ! -s conftest.err'
28789   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28790   (eval $ac_try) 2>&5
28791   ac_status=$?
28792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28793   (exit $ac_status); }; } &&
28794          { ac_try='test -s conftest$ac_exeext'
28795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28796   (eval $ac_try) 2>&5
28797   ac_status=$?
28798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28799   (exit $ac_status); }; }; then
28800   ol_cv_db_db_4_4=yes
28801 else
28802   echo "$as_me: failed program was:" >&5
28803 sed 's/^/| /' conftest.$ac_ext >&5
28804
28805 ol_cv_db_db_4_4=no
28806 fi
28807 rm -f conftest.err conftest.$ac_objext \
28808       conftest$ac_exeext conftest.$ac_ext
28809
28810         LIBS="$ol_LIBS"
28811
28812 fi
28813 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_4" >&5
28814 echo "${ECHO_T}$ol_cv_db_db_4_4" >&6
28815
28816         if test $ol_cv_db_db_4_4 = yes ; then
28817                 ol_cv_lib_db=-ldb-4-4
28818         fi
28819 fi
28820
28821         elif test $ol_cv_bdb_minor = 3 ; then
28822                 if test $ol_cv_lib_db = no ; then
28823         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb43)" >&5
28824 echo $ECHO_N "checking for Berkeley DB link (-ldb43)... $ECHO_C" >&6
28825 if test "${ol_cv_db_db43+set}" = set; then
28826   echo $ECHO_N "(cached) $ECHO_C" >&6
28827 else
28828
28829         ol_DB_LIB=-ldb43
28830         ol_LIBS=$LIBS
28831         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28832
28833         cat >conftest.$ac_ext <<_ACEOF
28834 /* confdefs.h.  */
28835 _ACEOF
28836 cat confdefs.h >>conftest.$ac_ext
28837 cat >>conftest.$ac_ext <<_ACEOF
28838 /* end confdefs.h.  */
28839
28840 #ifdef HAVE_DB_185_H
28841 # include <db_185.h>
28842 #else
28843 # include <db.h>
28844 #endif
28845
28846 #ifndef DB_VERSION_MAJOR
28847 # define DB_VERSION_MAJOR 1
28848 #endif
28849
28850 #ifndef NULL
28851 #define NULL ((void*)0)
28852 #endif
28853
28854 int
28855 main ()
28856 {
28857
28858 #if DB_VERSION_MAJOR > 1
28859         {
28860                 char *version;
28861                 int major, minor, patch;
28862
28863                 version = db_version( &major, &minor, &patch );
28864
28865                 if( major != DB_VERSION_MAJOR ||
28866                         minor < DB_VERSION_MINOR )
28867                 {
28868                         printf("Berkeley DB version mismatch\n"
28869                                 "\theader: %s\n\tlibrary: %s\n",
28870                                 DB_VERSION_STRING, version);
28871                         return 1;
28872                 }
28873         }
28874 #endif
28875
28876 #if DB_VERSION_MAJOR > 2
28877         db_env_create( NULL, 0 );
28878 #elif DB_VERSION_MAJOR > 1
28879         db_appexit( NULL );
28880 #else
28881         (void) dbopen( NULL, 0, 0, 0, NULL);
28882 #endif
28883
28884   ;
28885   return 0;
28886 }
28887 _ACEOF
28888 rm -f conftest.$ac_objext conftest$ac_exeext
28889 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28890   (eval $ac_link) 2>conftest.er1
28891   ac_status=$?
28892   grep -v '^ *+' conftest.er1 >conftest.err
28893   rm -f conftest.er1
28894   cat conftest.err >&5
28895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28896   (exit $ac_status); } &&
28897          { ac_try='test -z "$ac_c_werror_flag"
28898                          || test ! -s conftest.err'
28899   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28900   (eval $ac_try) 2>&5
28901   ac_status=$?
28902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28903   (exit $ac_status); }; } &&
28904          { ac_try='test -s conftest$ac_exeext'
28905   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28906   (eval $ac_try) 2>&5
28907   ac_status=$?
28908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28909   (exit $ac_status); }; }; then
28910   ol_cv_db_db43=yes
28911 else
28912   echo "$as_me: failed program was:" >&5
28913 sed 's/^/| /' conftest.$ac_ext >&5
28914
28915 ol_cv_db_db43=no
28916 fi
28917 rm -f conftest.err conftest.$ac_objext \
28918       conftest$ac_exeext conftest.$ac_ext
28919
28920         LIBS="$ol_LIBS"
28921
28922 fi
28923 echo "$as_me:$LINENO: result: $ol_cv_db_db43" >&5
28924 echo "${ECHO_T}$ol_cv_db_db43" >&6
28925
28926         if test $ol_cv_db_db43 = yes ; then
28927                 ol_cv_lib_db=-ldb43
28928         fi
28929 fi
28930
28931                 if test $ol_cv_lib_db = no ; then
28932         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-43)" >&5
28933 echo $ECHO_N "checking for Berkeley DB link (-ldb-43)... $ECHO_C" >&6
28934 if test "${ol_cv_db_db_43+set}" = set; then
28935   echo $ECHO_N "(cached) $ECHO_C" >&6
28936 else
28937
28938         ol_DB_LIB=-ldb-43
28939         ol_LIBS=$LIBS
28940         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28941
28942         cat >conftest.$ac_ext <<_ACEOF
28943 /* confdefs.h.  */
28944 _ACEOF
28945 cat confdefs.h >>conftest.$ac_ext
28946 cat >>conftest.$ac_ext <<_ACEOF
28947 /* end confdefs.h.  */
28948
28949 #ifdef HAVE_DB_185_H
28950 # include <db_185.h>
28951 #else
28952 # include <db.h>
28953 #endif
28954
28955 #ifndef DB_VERSION_MAJOR
28956 # define DB_VERSION_MAJOR 1
28957 #endif
28958
28959 #ifndef NULL
28960 #define NULL ((void*)0)
28961 #endif
28962
28963 int
28964 main ()
28965 {
28966
28967 #if DB_VERSION_MAJOR > 1
28968         {
28969                 char *version;
28970                 int major, minor, patch;
28971
28972                 version = db_version( &major, &minor, &patch );
28973
28974                 if( major != DB_VERSION_MAJOR ||
28975                         minor < DB_VERSION_MINOR )
28976                 {
28977                         printf("Berkeley DB version mismatch\n"
28978                                 "\theader: %s\n\tlibrary: %s\n",
28979                                 DB_VERSION_STRING, version);
28980                         return 1;
28981                 }
28982         }
28983 #endif
28984
28985 #if DB_VERSION_MAJOR > 2
28986         db_env_create( NULL, 0 );
28987 #elif DB_VERSION_MAJOR > 1
28988         db_appexit( NULL );
28989 #else
28990         (void) dbopen( NULL, 0, 0, 0, NULL);
28991 #endif
28992
28993   ;
28994   return 0;
28995 }
28996 _ACEOF
28997 rm -f conftest.$ac_objext conftest$ac_exeext
28998 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28999   (eval $ac_link) 2>conftest.er1
29000   ac_status=$?
29001   grep -v '^ *+' conftest.er1 >conftest.err
29002   rm -f conftest.er1
29003   cat conftest.err >&5
29004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29005   (exit $ac_status); } &&
29006          { ac_try='test -z "$ac_c_werror_flag"
29007                          || test ! -s conftest.err'
29008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29009   (eval $ac_try) 2>&5
29010   ac_status=$?
29011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29012   (exit $ac_status); }; } &&
29013          { ac_try='test -s conftest$ac_exeext'
29014   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29015   (eval $ac_try) 2>&5
29016   ac_status=$?
29017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29018   (exit $ac_status); }; }; then
29019   ol_cv_db_db_43=yes
29020 else
29021   echo "$as_me: failed program was:" >&5
29022 sed 's/^/| /' conftest.$ac_ext >&5
29023
29024 ol_cv_db_db_43=no
29025 fi
29026 rm -f conftest.err conftest.$ac_objext \
29027       conftest$ac_exeext conftest.$ac_ext
29028
29029         LIBS="$ol_LIBS"
29030
29031 fi
29032 echo "$as_me:$LINENO: result: $ol_cv_db_db_43" >&5
29033 echo "${ECHO_T}$ol_cv_db_db_43" >&6
29034
29035         if test $ol_cv_db_db_43 = yes ; then
29036                 ol_cv_lib_db=-ldb-43
29037         fi
29038 fi
29039
29040                 if test $ol_cv_lib_db = no ; then
29041         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.3)" >&5
29042 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.3)... $ECHO_C" >&6
29043 if test "${ol_cv_db_db_4_dot_3+set}" = set; then
29044   echo $ECHO_N "(cached) $ECHO_C" >&6
29045 else
29046
29047         ol_DB_LIB=-ldb-4.3
29048         ol_LIBS=$LIBS
29049         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29050
29051         cat >conftest.$ac_ext <<_ACEOF
29052 /* confdefs.h.  */
29053 _ACEOF
29054 cat confdefs.h >>conftest.$ac_ext
29055 cat >>conftest.$ac_ext <<_ACEOF
29056 /* end confdefs.h.  */
29057
29058 #ifdef HAVE_DB_185_H
29059 # include <db_185.h>
29060 #else
29061 # include <db.h>
29062 #endif
29063
29064 #ifndef DB_VERSION_MAJOR
29065 # define DB_VERSION_MAJOR 1
29066 #endif
29067
29068 #ifndef NULL
29069 #define NULL ((void*)0)
29070 #endif
29071
29072 int
29073 main ()
29074 {
29075
29076 #if DB_VERSION_MAJOR > 1
29077         {
29078                 char *version;
29079                 int major, minor, patch;
29080
29081                 version = db_version( &major, &minor, &patch );
29082
29083                 if( major != DB_VERSION_MAJOR ||
29084                         minor < DB_VERSION_MINOR )
29085                 {
29086                         printf("Berkeley DB version mismatch\n"
29087                                 "\theader: %s\n\tlibrary: %s\n",
29088                                 DB_VERSION_STRING, version);
29089                         return 1;
29090                 }
29091         }
29092 #endif
29093
29094 #if DB_VERSION_MAJOR > 2
29095         db_env_create( NULL, 0 );
29096 #elif DB_VERSION_MAJOR > 1
29097         db_appexit( NULL );
29098 #else
29099         (void) dbopen( NULL, 0, 0, 0, NULL);
29100 #endif
29101
29102   ;
29103   return 0;
29104 }
29105 _ACEOF
29106 rm -f conftest.$ac_objext conftest$ac_exeext
29107 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29108   (eval $ac_link) 2>conftest.er1
29109   ac_status=$?
29110   grep -v '^ *+' conftest.er1 >conftest.err
29111   rm -f conftest.er1
29112   cat conftest.err >&5
29113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29114   (exit $ac_status); } &&
29115          { ac_try='test -z "$ac_c_werror_flag"
29116                          || test ! -s conftest.err'
29117   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29118   (eval $ac_try) 2>&5
29119   ac_status=$?
29120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29121   (exit $ac_status); }; } &&
29122          { ac_try='test -s conftest$ac_exeext'
29123   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29124   (eval $ac_try) 2>&5
29125   ac_status=$?
29126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29127   (exit $ac_status); }; }; then
29128   ol_cv_db_db_4_dot_3=yes
29129 else
29130   echo "$as_me: failed program was:" >&5
29131 sed 's/^/| /' conftest.$ac_ext >&5
29132
29133 ol_cv_db_db_4_dot_3=no
29134 fi
29135 rm -f conftest.err conftest.$ac_objext \
29136       conftest$ac_exeext conftest.$ac_ext
29137
29138         LIBS="$ol_LIBS"
29139
29140 fi
29141 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_3" >&5
29142 echo "${ECHO_T}$ol_cv_db_db_4_dot_3" >&6
29143
29144         if test $ol_cv_db_db_4_dot_3 = yes ; then
29145                 ol_cv_lib_db=-ldb-4.3
29146         fi
29147 fi
29148
29149                 if test $ol_cv_lib_db = no ; then
29150         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-3)" >&5
29151 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-3)... $ECHO_C" >&6
29152 if test "${ol_cv_db_db_4_3+set}" = set; then
29153   echo $ECHO_N "(cached) $ECHO_C" >&6
29154 else
29155
29156         ol_DB_LIB=-ldb-4-3
29157         ol_LIBS=$LIBS
29158         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29159
29160         cat >conftest.$ac_ext <<_ACEOF
29161 /* confdefs.h.  */
29162 _ACEOF
29163 cat confdefs.h >>conftest.$ac_ext
29164 cat >>conftest.$ac_ext <<_ACEOF
29165 /* end confdefs.h.  */
29166
29167 #ifdef HAVE_DB_185_H
29168 # include <db_185.h>
29169 #else
29170 # include <db.h>
29171 #endif
29172
29173 #ifndef DB_VERSION_MAJOR
29174 # define DB_VERSION_MAJOR 1
29175 #endif
29176
29177 #ifndef NULL
29178 #define NULL ((void*)0)
29179 #endif
29180
29181 int
29182 main ()
29183 {
29184
29185 #if DB_VERSION_MAJOR > 1
29186         {
29187                 char *version;
29188                 int major, minor, patch;
29189
29190                 version = db_version( &major, &minor, &patch );
29191
29192                 if( major != DB_VERSION_MAJOR ||
29193                         minor < DB_VERSION_MINOR )
29194                 {
29195                         printf("Berkeley DB version mismatch\n"
29196                                 "\theader: %s\n\tlibrary: %s\n",
29197                                 DB_VERSION_STRING, version);
29198                         return 1;
29199                 }
29200         }
29201 #endif
29202
29203 #if DB_VERSION_MAJOR > 2
29204         db_env_create( NULL, 0 );
29205 #elif DB_VERSION_MAJOR > 1
29206         db_appexit( NULL );
29207 #else
29208         (void) dbopen( NULL, 0, 0, 0, NULL);
29209 #endif
29210
29211   ;
29212   return 0;
29213 }
29214 _ACEOF
29215 rm -f conftest.$ac_objext conftest$ac_exeext
29216 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29217   (eval $ac_link) 2>conftest.er1
29218   ac_status=$?
29219   grep -v '^ *+' conftest.er1 >conftest.err
29220   rm -f conftest.er1
29221   cat conftest.err >&5
29222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29223   (exit $ac_status); } &&
29224          { ac_try='test -z "$ac_c_werror_flag"
29225                          || test ! -s conftest.err'
29226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29227   (eval $ac_try) 2>&5
29228   ac_status=$?
29229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29230   (exit $ac_status); }; } &&
29231          { ac_try='test -s conftest$ac_exeext'
29232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29233   (eval $ac_try) 2>&5
29234   ac_status=$?
29235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29236   (exit $ac_status); }; }; then
29237   ol_cv_db_db_4_3=yes
29238 else
29239   echo "$as_me: failed program was:" >&5
29240 sed 's/^/| /' conftest.$ac_ext >&5
29241
29242 ol_cv_db_db_4_3=no
29243 fi
29244 rm -f conftest.err conftest.$ac_objext \
29245       conftest$ac_exeext conftest.$ac_ext
29246
29247         LIBS="$ol_LIBS"
29248
29249 fi
29250 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_3" >&5
29251 echo "${ECHO_T}$ol_cv_db_db_4_3" >&6
29252
29253         if test $ol_cv_db_db_4_3 = yes ; then
29254                 ol_cv_lib_db=-ldb-4-3
29255         fi
29256 fi
29257
29258         elif test $ol_cv_bdb_minor = 2 ; then
29259                 if test $ol_cv_lib_db = no ; then
29260         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb42)" >&5
29261 echo $ECHO_N "checking for Berkeley DB link (-ldb42)... $ECHO_C" >&6
29262 if test "${ol_cv_db_db42+set}" = set; then
29263   echo $ECHO_N "(cached) $ECHO_C" >&6
29264 else
29265
29266         ol_DB_LIB=-ldb42
29267         ol_LIBS=$LIBS
29268         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29269
29270         cat >conftest.$ac_ext <<_ACEOF
29271 /* confdefs.h.  */
29272 _ACEOF
29273 cat confdefs.h >>conftest.$ac_ext
29274 cat >>conftest.$ac_ext <<_ACEOF
29275 /* end confdefs.h.  */
29276
29277 #ifdef HAVE_DB_185_H
29278 # include <db_185.h>
29279 #else
29280 # include <db.h>
29281 #endif
29282
29283 #ifndef DB_VERSION_MAJOR
29284 # define DB_VERSION_MAJOR 1
29285 #endif
29286
29287 #ifndef NULL
29288 #define NULL ((void*)0)
29289 #endif
29290
29291 int
29292 main ()
29293 {
29294
29295 #if DB_VERSION_MAJOR > 1
29296         {
29297                 char *version;
29298                 int major, minor, patch;
29299
29300                 version = db_version( &major, &minor, &patch );
29301
29302                 if( major != DB_VERSION_MAJOR ||
29303                         minor < DB_VERSION_MINOR )
29304                 {
29305                         printf("Berkeley DB version mismatch\n"
29306                                 "\theader: %s\n\tlibrary: %s\n",
29307                                 DB_VERSION_STRING, version);
29308                         return 1;
29309                 }
29310         }
29311 #endif
29312
29313 #if DB_VERSION_MAJOR > 2
29314         db_env_create( NULL, 0 );
29315 #elif DB_VERSION_MAJOR > 1
29316         db_appexit( NULL );
29317 #else
29318         (void) dbopen( NULL, 0, 0, 0, NULL);
29319 #endif
29320
29321   ;
29322   return 0;
29323 }
29324 _ACEOF
29325 rm -f conftest.$ac_objext conftest$ac_exeext
29326 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29327   (eval $ac_link) 2>conftest.er1
29328   ac_status=$?
29329   grep -v '^ *+' conftest.er1 >conftest.err
29330   rm -f conftest.er1
29331   cat conftest.err >&5
29332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29333   (exit $ac_status); } &&
29334          { ac_try='test -z "$ac_c_werror_flag"
29335                          || test ! -s conftest.err'
29336   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29337   (eval $ac_try) 2>&5
29338   ac_status=$?
29339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29340   (exit $ac_status); }; } &&
29341          { ac_try='test -s conftest$ac_exeext'
29342   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29343   (eval $ac_try) 2>&5
29344   ac_status=$?
29345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29346   (exit $ac_status); }; }; then
29347   ol_cv_db_db42=yes
29348 else
29349   echo "$as_me: failed program was:" >&5
29350 sed 's/^/| /' conftest.$ac_ext >&5
29351
29352 ol_cv_db_db42=no
29353 fi
29354 rm -f conftest.err conftest.$ac_objext \
29355       conftest$ac_exeext conftest.$ac_ext
29356
29357         LIBS="$ol_LIBS"
29358
29359 fi
29360 echo "$as_me:$LINENO: result: $ol_cv_db_db42" >&5
29361 echo "${ECHO_T}$ol_cv_db_db42" >&6
29362
29363         if test $ol_cv_db_db42 = yes ; then
29364                 ol_cv_lib_db=-ldb42
29365         fi
29366 fi
29367
29368                 if test $ol_cv_lib_db = no ; then
29369         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-42)" >&5
29370 echo $ECHO_N "checking for Berkeley DB link (-ldb-42)... $ECHO_C" >&6
29371 if test "${ol_cv_db_db_42+set}" = set; then
29372   echo $ECHO_N "(cached) $ECHO_C" >&6
29373 else
29374
29375         ol_DB_LIB=-ldb-42
29376         ol_LIBS=$LIBS
29377         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29378
29379         cat >conftest.$ac_ext <<_ACEOF
29380 /* confdefs.h.  */
29381 _ACEOF
29382 cat confdefs.h >>conftest.$ac_ext
29383 cat >>conftest.$ac_ext <<_ACEOF
29384 /* end confdefs.h.  */
29385
29386 #ifdef HAVE_DB_185_H
29387 # include <db_185.h>
29388 #else
29389 # include <db.h>
29390 #endif
29391
29392 #ifndef DB_VERSION_MAJOR
29393 # define DB_VERSION_MAJOR 1
29394 #endif
29395
29396 #ifndef NULL
29397 #define NULL ((void*)0)
29398 #endif
29399
29400 int
29401 main ()
29402 {
29403
29404 #if DB_VERSION_MAJOR > 1
29405         {
29406                 char *version;
29407                 int major, minor, patch;
29408
29409                 version = db_version( &major, &minor, &patch );
29410
29411                 if( major != DB_VERSION_MAJOR ||
29412                         minor < DB_VERSION_MINOR )
29413                 {
29414                         printf("Berkeley DB version mismatch\n"
29415                                 "\theader: %s\n\tlibrary: %s\n",
29416                                 DB_VERSION_STRING, version);
29417                         return 1;
29418                 }
29419         }
29420 #endif
29421
29422 #if DB_VERSION_MAJOR > 2
29423         db_env_create( NULL, 0 );
29424 #elif DB_VERSION_MAJOR > 1
29425         db_appexit( NULL );
29426 #else
29427         (void) dbopen( NULL, 0, 0, 0, NULL);
29428 #endif
29429
29430   ;
29431   return 0;
29432 }
29433 _ACEOF
29434 rm -f conftest.$ac_objext conftest$ac_exeext
29435 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29436   (eval $ac_link) 2>conftest.er1
29437   ac_status=$?
29438   grep -v '^ *+' conftest.er1 >conftest.err
29439   rm -f conftest.er1
29440   cat conftest.err >&5
29441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29442   (exit $ac_status); } &&
29443          { ac_try='test -z "$ac_c_werror_flag"
29444                          || test ! -s conftest.err'
29445   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29446   (eval $ac_try) 2>&5
29447   ac_status=$?
29448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29449   (exit $ac_status); }; } &&
29450          { ac_try='test -s conftest$ac_exeext'
29451   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29452   (eval $ac_try) 2>&5
29453   ac_status=$?
29454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29455   (exit $ac_status); }; }; then
29456   ol_cv_db_db_42=yes
29457 else
29458   echo "$as_me: failed program was:" >&5
29459 sed 's/^/| /' conftest.$ac_ext >&5
29460
29461 ol_cv_db_db_42=no
29462 fi
29463 rm -f conftest.err conftest.$ac_objext \
29464       conftest$ac_exeext conftest.$ac_ext
29465
29466         LIBS="$ol_LIBS"
29467
29468 fi
29469 echo "$as_me:$LINENO: result: $ol_cv_db_db_42" >&5
29470 echo "${ECHO_T}$ol_cv_db_db_42" >&6
29471
29472         if test $ol_cv_db_db_42 = yes ; then
29473                 ol_cv_lib_db=-ldb-42
29474         fi
29475 fi
29476
29477                 if test $ol_cv_lib_db = no ; then
29478         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.2)" >&5
29479 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.2)... $ECHO_C" >&6
29480 if test "${ol_cv_db_db_4_dot_2+set}" = set; then
29481   echo $ECHO_N "(cached) $ECHO_C" >&6
29482 else
29483
29484         ol_DB_LIB=-ldb-4.2
29485         ol_LIBS=$LIBS
29486         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29487
29488         cat >conftest.$ac_ext <<_ACEOF
29489 /* confdefs.h.  */
29490 _ACEOF
29491 cat confdefs.h >>conftest.$ac_ext
29492 cat >>conftest.$ac_ext <<_ACEOF
29493 /* end confdefs.h.  */
29494
29495 #ifdef HAVE_DB_185_H
29496 # include <db_185.h>
29497 #else
29498 # include <db.h>
29499 #endif
29500
29501 #ifndef DB_VERSION_MAJOR
29502 # define DB_VERSION_MAJOR 1
29503 #endif
29504
29505 #ifndef NULL
29506 #define NULL ((void*)0)
29507 #endif
29508
29509 int
29510 main ()
29511 {
29512
29513 #if DB_VERSION_MAJOR > 1
29514         {
29515                 char *version;
29516                 int major, minor, patch;
29517
29518                 version = db_version( &major, &minor, &patch );
29519
29520                 if( major != DB_VERSION_MAJOR ||
29521                         minor < DB_VERSION_MINOR )
29522                 {
29523                         printf("Berkeley DB version mismatch\n"
29524                                 "\theader: %s\n\tlibrary: %s\n",
29525                                 DB_VERSION_STRING, version);
29526                         return 1;
29527                 }
29528         }
29529 #endif
29530
29531 #if DB_VERSION_MAJOR > 2
29532         db_env_create( NULL, 0 );
29533 #elif DB_VERSION_MAJOR > 1
29534         db_appexit( NULL );
29535 #else
29536         (void) dbopen( NULL, 0, 0, 0, NULL);
29537 #endif
29538
29539   ;
29540   return 0;
29541 }
29542 _ACEOF
29543 rm -f conftest.$ac_objext conftest$ac_exeext
29544 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29545   (eval $ac_link) 2>conftest.er1
29546   ac_status=$?
29547   grep -v '^ *+' conftest.er1 >conftest.err
29548   rm -f conftest.er1
29549   cat conftest.err >&5
29550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29551   (exit $ac_status); } &&
29552          { ac_try='test -z "$ac_c_werror_flag"
29553                          || test ! -s conftest.err'
29554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29555   (eval $ac_try) 2>&5
29556   ac_status=$?
29557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29558   (exit $ac_status); }; } &&
29559          { ac_try='test -s conftest$ac_exeext'
29560   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29561   (eval $ac_try) 2>&5
29562   ac_status=$?
29563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29564   (exit $ac_status); }; }; then
29565   ol_cv_db_db_4_dot_2=yes
29566 else
29567   echo "$as_me: failed program was:" >&5
29568 sed 's/^/| /' conftest.$ac_ext >&5
29569
29570 ol_cv_db_db_4_dot_2=no
29571 fi
29572 rm -f conftest.err conftest.$ac_objext \
29573       conftest$ac_exeext conftest.$ac_ext
29574
29575         LIBS="$ol_LIBS"
29576
29577 fi
29578 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_2" >&5
29579 echo "${ECHO_T}$ol_cv_db_db_4_dot_2" >&6
29580
29581         if test $ol_cv_db_db_4_dot_2 = yes ; then
29582                 ol_cv_lib_db=-ldb-4.2
29583         fi
29584 fi
29585
29586                 if test $ol_cv_lib_db = no ; then
29587         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-2)" >&5
29588 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-2)... $ECHO_C" >&6
29589 if test "${ol_cv_db_db_4_2+set}" = set; then
29590   echo $ECHO_N "(cached) $ECHO_C" >&6
29591 else
29592
29593         ol_DB_LIB=-ldb-4-2
29594         ol_LIBS=$LIBS
29595         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29596
29597         cat >conftest.$ac_ext <<_ACEOF
29598 /* confdefs.h.  */
29599 _ACEOF
29600 cat confdefs.h >>conftest.$ac_ext
29601 cat >>conftest.$ac_ext <<_ACEOF
29602 /* end confdefs.h.  */
29603
29604 #ifdef HAVE_DB_185_H
29605 # include <db_185.h>
29606 #else
29607 # include <db.h>
29608 #endif
29609
29610 #ifndef DB_VERSION_MAJOR
29611 # define DB_VERSION_MAJOR 1
29612 #endif
29613
29614 #ifndef NULL
29615 #define NULL ((void*)0)
29616 #endif
29617
29618 int
29619 main ()
29620 {
29621
29622 #if DB_VERSION_MAJOR > 1
29623         {
29624                 char *version;
29625                 int major, minor, patch;
29626
29627                 version = db_version( &major, &minor, &patch );
29628
29629                 if( major != DB_VERSION_MAJOR ||
29630                         minor < DB_VERSION_MINOR )
29631                 {
29632                         printf("Berkeley DB version mismatch\n"
29633                                 "\theader: %s\n\tlibrary: %s\n",
29634                                 DB_VERSION_STRING, version);
29635                         return 1;
29636                 }
29637         }
29638 #endif
29639
29640 #if DB_VERSION_MAJOR > 2
29641         db_env_create( NULL, 0 );
29642 #elif DB_VERSION_MAJOR > 1
29643         db_appexit( NULL );
29644 #else
29645         (void) dbopen( NULL, 0, 0, 0, NULL);
29646 #endif
29647
29648   ;
29649   return 0;
29650 }
29651 _ACEOF
29652 rm -f conftest.$ac_objext conftest$ac_exeext
29653 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29654   (eval $ac_link) 2>conftest.er1
29655   ac_status=$?
29656   grep -v '^ *+' conftest.er1 >conftest.err
29657   rm -f conftest.er1
29658   cat conftest.err >&5
29659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29660   (exit $ac_status); } &&
29661          { ac_try='test -z "$ac_c_werror_flag"
29662                          || test ! -s conftest.err'
29663   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29664   (eval $ac_try) 2>&5
29665   ac_status=$?
29666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29667   (exit $ac_status); }; } &&
29668          { ac_try='test -s conftest$ac_exeext'
29669   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29670   (eval $ac_try) 2>&5
29671   ac_status=$?
29672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29673   (exit $ac_status); }; }; then
29674   ol_cv_db_db_4_2=yes
29675 else
29676   echo "$as_me: failed program was:" >&5
29677 sed 's/^/| /' conftest.$ac_ext >&5
29678
29679 ol_cv_db_db_4_2=no
29680 fi
29681 rm -f conftest.err conftest.$ac_objext \
29682       conftest$ac_exeext conftest.$ac_ext
29683
29684         LIBS="$ol_LIBS"
29685
29686 fi
29687 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_2" >&5
29688 echo "${ECHO_T}$ol_cv_db_db_4_2" >&6
29689
29690         if test $ol_cv_db_db_4_2 = yes ; then
29691                 ol_cv_lib_db=-ldb-4-2
29692         fi
29693 fi
29694
29695         elif test $ol_cv_bdb_minor = 1 ; then
29696                 if test $ol_cv_lib_db = no ; then
29697         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb41)" >&5
29698 echo $ECHO_N "checking for Berkeley DB link (-ldb41)... $ECHO_C" >&6
29699 if test "${ol_cv_db_db41+set}" = set; then
29700   echo $ECHO_N "(cached) $ECHO_C" >&6
29701 else
29702
29703         ol_DB_LIB=-ldb41
29704         ol_LIBS=$LIBS
29705         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29706
29707         cat >conftest.$ac_ext <<_ACEOF
29708 /* confdefs.h.  */
29709 _ACEOF
29710 cat confdefs.h >>conftest.$ac_ext
29711 cat >>conftest.$ac_ext <<_ACEOF
29712 /* end confdefs.h.  */
29713
29714 #ifdef HAVE_DB_185_H
29715 # include <db_185.h>
29716 #else
29717 # include <db.h>
29718 #endif
29719
29720 #ifndef DB_VERSION_MAJOR
29721 # define DB_VERSION_MAJOR 1
29722 #endif
29723
29724 #ifndef NULL
29725 #define NULL ((void*)0)
29726 #endif
29727
29728 int
29729 main ()
29730 {
29731
29732 #if DB_VERSION_MAJOR > 1
29733         {
29734                 char *version;
29735                 int major, minor, patch;
29736
29737                 version = db_version( &major, &minor, &patch );
29738
29739                 if( major != DB_VERSION_MAJOR ||
29740                         minor < DB_VERSION_MINOR )
29741                 {
29742                         printf("Berkeley DB version mismatch\n"
29743                                 "\theader: %s\n\tlibrary: %s\n",
29744                                 DB_VERSION_STRING, version);
29745                         return 1;
29746                 }
29747         }
29748 #endif
29749
29750 #if DB_VERSION_MAJOR > 2
29751         db_env_create( NULL, 0 );
29752 #elif DB_VERSION_MAJOR > 1
29753         db_appexit( NULL );
29754 #else
29755         (void) dbopen( NULL, 0, 0, 0, NULL);
29756 #endif
29757
29758   ;
29759   return 0;
29760 }
29761 _ACEOF
29762 rm -f conftest.$ac_objext conftest$ac_exeext
29763 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29764   (eval $ac_link) 2>conftest.er1
29765   ac_status=$?
29766   grep -v '^ *+' conftest.er1 >conftest.err
29767   rm -f conftest.er1
29768   cat conftest.err >&5
29769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29770   (exit $ac_status); } &&
29771          { ac_try='test -z "$ac_c_werror_flag"
29772                          || test ! -s conftest.err'
29773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29774   (eval $ac_try) 2>&5
29775   ac_status=$?
29776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29777   (exit $ac_status); }; } &&
29778          { ac_try='test -s conftest$ac_exeext'
29779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29780   (eval $ac_try) 2>&5
29781   ac_status=$?
29782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29783   (exit $ac_status); }; }; then
29784   ol_cv_db_db41=yes
29785 else
29786   echo "$as_me: failed program was:" >&5
29787 sed 's/^/| /' conftest.$ac_ext >&5
29788
29789 ol_cv_db_db41=no
29790 fi
29791 rm -f conftest.err conftest.$ac_objext \
29792       conftest$ac_exeext conftest.$ac_ext
29793
29794         LIBS="$ol_LIBS"
29795
29796 fi
29797 echo "$as_me:$LINENO: result: $ol_cv_db_db41" >&5
29798 echo "${ECHO_T}$ol_cv_db_db41" >&6
29799
29800         if test $ol_cv_db_db41 = yes ; then
29801                 ol_cv_lib_db=-ldb41
29802         fi
29803 fi
29804
29805                 if test $ol_cv_lib_db = no ; then
29806         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-41)" >&5
29807 echo $ECHO_N "checking for Berkeley DB link (-ldb-41)... $ECHO_C" >&6
29808 if test "${ol_cv_db_db_41+set}" = set; then
29809   echo $ECHO_N "(cached) $ECHO_C" >&6
29810 else
29811
29812         ol_DB_LIB=-ldb-41
29813         ol_LIBS=$LIBS
29814         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29815
29816         cat >conftest.$ac_ext <<_ACEOF
29817 /* confdefs.h.  */
29818 _ACEOF
29819 cat confdefs.h >>conftest.$ac_ext
29820 cat >>conftest.$ac_ext <<_ACEOF
29821 /* end confdefs.h.  */
29822
29823 #ifdef HAVE_DB_185_H
29824 # include <db_185.h>
29825 #else
29826 # include <db.h>
29827 #endif
29828
29829 #ifndef DB_VERSION_MAJOR
29830 # define DB_VERSION_MAJOR 1
29831 #endif
29832
29833 #ifndef NULL
29834 #define NULL ((void*)0)
29835 #endif
29836
29837 int
29838 main ()
29839 {
29840
29841 #if DB_VERSION_MAJOR > 1
29842         {
29843                 char *version;
29844                 int major, minor, patch;
29845
29846                 version = db_version( &major, &minor, &patch );
29847
29848                 if( major != DB_VERSION_MAJOR ||
29849                         minor < DB_VERSION_MINOR )
29850                 {
29851                         printf("Berkeley DB version mismatch\n"
29852                                 "\theader: %s\n\tlibrary: %s\n",
29853                                 DB_VERSION_STRING, version);
29854                         return 1;
29855                 }
29856         }
29857 #endif
29858
29859 #if DB_VERSION_MAJOR > 2
29860         db_env_create( NULL, 0 );
29861 #elif DB_VERSION_MAJOR > 1
29862         db_appexit( NULL );
29863 #else
29864         (void) dbopen( NULL, 0, 0, 0, NULL);
29865 #endif
29866
29867   ;
29868   return 0;
29869 }
29870 _ACEOF
29871 rm -f conftest.$ac_objext conftest$ac_exeext
29872 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29873   (eval $ac_link) 2>conftest.er1
29874   ac_status=$?
29875   grep -v '^ *+' conftest.er1 >conftest.err
29876   rm -f conftest.er1
29877   cat conftest.err >&5
29878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29879   (exit $ac_status); } &&
29880          { ac_try='test -z "$ac_c_werror_flag"
29881                          || test ! -s conftest.err'
29882   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29883   (eval $ac_try) 2>&5
29884   ac_status=$?
29885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29886   (exit $ac_status); }; } &&
29887          { ac_try='test -s conftest$ac_exeext'
29888   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29889   (eval $ac_try) 2>&5
29890   ac_status=$?
29891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29892   (exit $ac_status); }; }; then
29893   ol_cv_db_db_41=yes
29894 else
29895   echo "$as_me: failed program was:" >&5
29896 sed 's/^/| /' conftest.$ac_ext >&5
29897
29898 ol_cv_db_db_41=no
29899 fi
29900 rm -f conftest.err conftest.$ac_objext \
29901       conftest$ac_exeext conftest.$ac_ext
29902
29903         LIBS="$ol_LIBS"
29904
29905 fi
29906 echo "$as_me:$LINENO: result: $ol_cv_db_db_41" >&5
29907 echo "${ECHO_T}$ol_cv_db_db_41" >&6
29908
29909         if test $ol_cv_db_db_41 = yes ; then
29910                 ol_cv_lib_db=-ldb-41
29911         fi
29912 fi
29913
29914                 if test $ol_cv_lib_db = no ; then
29915         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.1)" >&5
29916 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.1)... $ECHO_C" >&6
29917 if test "${ol_cv_db_db_4_dot_1+set}" = set; then
29918   echo $ECHO_N "(cached) $ECHO_C" >&6
29919 else
29920
29921         ol_DB_LIB=-ldb-4.1
29922         ol_LIBS=$LIBS
29923         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29924
29925         cat >conftest.$ac_ext <<_ACEOF
29926 /* confdefs.h.  */
29927 _ACEOF
29928 cat confdefs.h >>conftest.$ac_ext
29929 cat >>conftest.$ac_ext <<_ACEOF
29930 /* end confdefs.h.  */
29931
29932 #ifdef HAVE_DB_185_H
29933 # include <db_185.h>
29934 #else
29935 # include <db.h>
29936 #endif
29937
29938 #ifndef DB_VERSION_MAJOR
29939 # define DB_VERSION_MAJOR 1
29940 #endif
29941
29942 #ifndef NULL
29943 #define NULL ((void*)0)
29944 #endif
29945
29946 int
29947 main ()
29948 {
29949
29950 #if DB_VERSION_MAJOR > 1
29951         {
29952                 char *version;
29953                 int major, minor, patch;
29954
29955                 version = db_version( &major, &minor, &patch );
29956
29957                 if( major != DB_VERSION_MAJOR ||
29958                         minor < DB_VERSION_MINOR )
29959                 {
29960                         printf("Berkeley DB version mismatch\n"
29961                                 "\theader: %s\n\tlibrary: %s\n",
29962                                 DB_VERSION_STRING, version);
29963                         return 1;
29964                 }
29965         }
29966 #endif
29967
29968 #if DB_VERSION_MAJOR > 2
29969         db_env_create( NULL, 0 );
29970 #elif DB_VERSION_MAJOR > 1
29971         db_appexit( NULL );
29972 #else
29973         (void) dbopen( NULL, 0, 0, 0, NULL);
29974 #endif
29975
29976   ;
29977   return 0;
29978 }
29979 _ACEOF
29980 rm -f conftest.$ac_objext conftest$ac_exeext
29981 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29982   (eval $ac_link) 2>conftest.er1
29983   ac_status=$?
29984   grep -v '^ *+' conftest.er1 >conftest.err
29985   rm -f conftest.er1
29986   cat conftest.err >&5
29987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29988   (exit $ac_status); } &&
29989          { ac_try='test -z "$ac_c_werror_flag"
29990                          || test ! -s conftest.err'
29991   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29992   (eval $ac_try) 2>&5
29993   ac_status=$?
29994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29995   (exit $ac_status); }; } &&
29996          { ac_try='test -s conftest$ac_exeext'
29997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29998   (eval $ac_try) 2>&5
29999   ac_status=$?
30000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30001   (exit $ac_status); }; }; then
30002   ol_cv_db_db_4_dot_1=yes
30003 else
30004   echo "$as_me: failed program was:" >&5
30005 sed 's/^/| /' conftest.$ac_ext >&5
30006
30007 ol_cv_db_db_4_dot_1=no
30008 fi
30009 rm -f conftest.err conftest.$ac_objext \
30010       conftest$ac_exeext conftest.$ac_ext
30011
30012         LIBS="$ol_LIBS"
30013
30014 fi
30015 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_1" >&5
30016 echo "${ECHO_T}$ol_cv_db_db_4_dot_1" >&6
30017
30018         if test $ol_cv_db_db_4_dot_1 = yes ; then
30019                 ol_cv_lib_db=-ldb-4.1
30020         fi
30021 fi
30022
30023                 if test $ol_cv_lib_db = no ; then
30024         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-1)" >&5
30025 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-1)... $ECHO_C" >&6
30026 if test "${ol_cv_db_db_4_1+set}" = set; then
30027   echo $ECHO_N "(cached) $ECHO_C" >&6
30028 else
30029
30030         ol_DB_LIB=-ldb-4-1
30031         ol_LIBS=$LIBS
30032         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30033
30034         cat >conftest.$ac_ext <<_ACEOF
30035 /* confdefs.h.  */
30036 _ACEOF
30037 cat confdefs.h >>conftest.$ac_ext
30038 cat >>conftest.$ac_ext <<_ACEOF
30039 /* end confdefs.h.  */
30040
30041 #ifdef HAVE_DB_185_H
30042 # include <db_185.h>
30043 #else
30044 # include <db.h>
30045 #endif
30046
30047 #ifndef DB_VERSION_MAJOR
30048 # define DB_VERSION_MAJOR 1
30049 #endif
30050
30051 #ifndef NULL
30052 #define NULL ((void*)0)
30053 #endif
30054
30055 int
30056 main ()
30057 {
30058
30059 #if DB_VERSION_MAJOR > 1
30060         {
30061                 char *version;
30062                 int major, minor, patch;
30063
30064                 version = db_version( &major, &minor, &patch );
30065
30066                 if( major != DB_VERSION_MAJOR ||
30067                         minor < DB_VERSION_MINOR )
30068                 {
30069                         printf("Berkeley DB version mismatch\n"
30070                                 "\theader: %s\n\tlibrary: %s\n",
30071                                 DB_VERSION_STRING, version);
30072                         return 1;
30073                 }
30074         }
30075 #endif
30076
30077 #if DB_VERSION_MAJOR > 2
30078         db_env_create( NULL, 0 );
30079 #elif DB_VERSION_MAJOR > 1
30080         db_appexit( NULL );
30081 #else
30082         (void) dbopen( NULL, 0, 0, 0, NULL);
30083 #endif
30084
30085   ;
30086   return 0;
30087 }
30088 _ACEOF
30089 rm -f conftest.$ac_objext conftest$ac_exeext
30090 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30091   (eval $ac_link) 2>conftest.er1
30092   ac_status=$?
30093   grep -v '^ *+' conftest.er1 >conftest.err
30094   rm -f conftest.er1
30095   cat conftest.err >&5
30096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30097   (exit $ac_status); } &&
30098          { ac_try='test -z "$ac_c_werror_flag"
30099                          || test ! -s conftest.err'
30100   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30101   (eval $ac_try) 2>&5
30102   ac_status=$?
30103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30104   (exit $ac_status); }; } &&
30105          { ac_try='test -s conftest$ac_exeext'
30106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30107   (eval $ac_try) 2>&5
30108   ac_status=$?
30109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30110   (exit $ac_status); }; }; then
30111   ol_cv_db_db_4_1=yes
30112 else
30113   echo "$as_me: failed program was:" >&5
30114 sed 's/^/| /' conftest.$ac_ext >&5
30115
30116 ol_cv_db_db_4_1=no
30117 fi
30118 rm -f conftest.err conftest.$ac_objext \
30119       conftest$ac_exeext conftest.$ac_ext
30120
30121         LIBS="$ol_LIBS"
30122
30123 fi
30124 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_1" >&5
30125 echo "${ECHO_T}$ol_cv_db_db_4_1" >&6
30126
30127         if test $ol_cv_db_db_4_1 = yes ; then
30128                 ol_cv_lib_db=-ldb-4-1
30129         fi
30130 fi
30131
30132         fi
30133         if test $ol_cv_lib_db = no ; then
30134         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4)" >&5
30135 echo $ECHO_N "checking for Berkeley DB link (-ldb-4)... $ECHO_C" >&6
30136 if test "${ol_cv_db_db_4+set}" = set; then
30137   echo $ECHO_N "(cached) $ECHO_C" >&6
30138 else
30139
30140         ol_DB_LIB=-ldb-4
30141         ol_LIBS=$LIBS
30142         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30143
30144         cat >conftest.$ac_ext <<_ACEOF
30145 /* confdefs.h.  */
30146 _ACEOF
30147 cat confdefs.h >>conftest.$ac_ext
30148 cat >>conftest.$ac_ext <<_ACEOF
30149 /* end confdefs.h.  */
30150
30151 #ifdef HAVE_DB_185_H
30152 # include <db_185.h>
30153 #else
30154 # include <db.h>
30155 #endif
30156
30157 #ifndef DB_VERSION_MAJOR
30158 # define DB_VERSION_MAJOR 1
30159 #endif
30160
30161 #ifndef NULL
30162 #define NULL ((void*)0)
30163 #endif
30164
30165 int
30166 main ()
30167 {
30168
30169 #if DB_VERSION_MAJOR > 1
30170         {
30171                 char *version;
30172                 int major, minor, patch;
30173
30174                 version = db_version( &major, &minor, &patch );
30175
30176                 if( major != DB_VERSION_MAJOR ||
30177                         minor < DB_VERSION_MINOR )
30178                 {
30179                         printf("Berkeley DB version mismatch\n"
30180                                 "\theader: %s\n\tlibrary: %s\n",
30181                                 DB_VERSION_STRING, version);
30182                         return 1;
30183                 }
30184         }
30185 #endif
30186
30187 #if DB_VERSION_MAJOR > 2
30188         db_env_create( NULL, 0 );
30189 #elif DB_VERSION_MAJOR > 1
30190         db_appexit( NULL );
30191 #else
30192         (void) dbopen( NULL, 0, 0, 0, NULL);
30193 #endif
30194
30195   ;
30196   return 0;
30197 }
30198 _ACEOF
30199 rm -f conftest.$ac_objext conftest$ac_exeext
30200 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30201   (eval $ac_link) 2>conftest.er1
30202   ac_status=$?
30203   grep -v '^ *+' conftest.er1 >conftest.err
30204   rm -f conftest.er1
30205   cat conftest.err >&5
30206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30207   (exit $ac_status); } &&
30208          { ac_try='test -z "$ac_c_werror_flag"
30209                          || test ! -s conftest.err'
30210   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30211   (eval $ac_try) 2>&5
30212   ac_status=$?
30213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30214   (exit $ac_status); }; } &&
30215          { ac_try='test -s conftest$ac_exeext'
30216   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30217   (eval $ac_try) 2>&5
30218   ac_status=$?
30219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30220   (exit $ac_status); }; }; then
30221   ol_cv_db_db_4=yes
30222 else
30223   echo "$as_me: failed program was:" >&5
30224 sed 's/^/| /' conftest.$ac_ext >&5
30225
30226 ol_cv_db_db_4=no
30227 fi
30228 rm -f conftest.err conftest.$ac_objext \
30229       conftest$ac_exeext conftest.$ac_ext
30230
30231         LIBS="$ol_LIBS"
30232
30233 fi
30234 echo "$as_me:$LINENO: result: $ol_cv_db_db_4" >&5
30235 echo "${ECHO_T}$ol_cv_db_db_4" >&6
30236
30237         if test $ol_cv_db_db_4 = yes ; then
30238                 ol_cv_lib_db=-ldb-4
30239         fi
30240 fi
30241
30242         if test $ol_cv_lib_db = no ; then
30243         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb4)" >&5
30244 echo $ECHO_N "checking for Berkeley DB link (-ldb4)... $ECHO_C" >&6
30245 if test "${ol_cv_db_db4+set}" = set; then
30246   echo $ECHO_N "(cached) $ECHO_C" >&6
30247 else
30248
30249         ol_DB_LIB=-ldb4
30250         ol_LIBS=$LIBS
30251         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30252
30253         cat >conftest.$ac_ext <<_ACEOF
30254 /* confdefs.h.  */
30255 _ACEOF
30256 cat confdefs.h >>conftest.$ac_ext
30257 cat >>conftest.$ac_ext <<_ACEOF
30258 /* end confdefs.h.  */
30259
30260 #ifdef HAVE_DB_185_H
30261 # include <db_185.h>
30262 #else
30263 # include <db.h>
30264 #endif
30265
30266 #ifndef DB_VERSION_MAJOR
30267 # define DB_VERSION_MAJOR 1
30268 #endif
30269
30270 #ifndef NULL
30271 #define NULL ((void*)0)
30272 #endif
30273
30274 int
30275 main ()
30276 {
30277
30278 #if DB_VERSION_MAJOR > 1
30279         {
30280                 char *version;
30281                 int major, minor, patch;
30282
30283                 version = db_version( &major, &minor, &patch );
30284
30285                 if( major != DB_VERSION_MAJOR ||
30286                         minor < DB_VERSION_MINOR )
30287                 {
30288                         printf("Berkeley DB version mismatch\n"
30289                                 "\theader: %s\n\tlibrary: %s\n",
30290                                 DB_VERSION_STRING, version);
30291                         return 1;
30292                 }
30293         }
30294 #endif
30295
30296 #if DB_VERSION_MAJOR > 2
30297         db_env_create( NULL, 0 );
30298 #elif DB_VERSION_MAJOR > 1
30299         db_appexit( NULL );
30300 #else
30301         (void) dbopen( NULL, 0, 0, 0, NULL);
30302 #endif
30303
30304   ;
30305   return 0;
30306 }
30307 _ACEOF
30308 rm -f conftest.$ac_objext conftest$ac_exeext
30309 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30310   (eval $ac_link) 2>conftest.er1
30311   ac_status=$?
30312   grep -v '^ *+' conftest.er1 >conftest.err
30313   rm -f conftest.er1
30314   cat conftest.err >&5
30315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30316   (exit $ac_status); } &&
30317          { ac_try='test -z "$ac_c_werror_flag"
30318                          || test ! -s conftest.err'
30319   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30320   (eval $ac_try) 2>&5
30321   ac_status=$?
30322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30323   (exit $ac_status); }; } &&
30324          { ac_try='test -s conftest$ac_exeext'
30325   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30326   (eval $ac_try) 2>&5
30327   ac_status=$?
30328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30329   (exit $ac_status); }; }; then
30330   ol_cv_db_db4=yes
30331 else
30332   echo "$as_me: failed program was:" >&5
30333 sed 's/^/| /' conftest.$ac_ext >&5
30334
30335 ol_cv_db_db4=no
30336 fi
30337 rm -f conftest.err conftest.$ac_objext \
30338       conftest$ac_exeext conftest.$ac_ext
30339
30340         LIBS="$ol_LIBS"
30341
30342 fi
30343 echo "$as_me:$LINENO: result: $ol_cv_db_db4" >&5
30344 echo "${ECHO_T}$ol_cv_db_db4" >&6
30345
30346         if test $ol_cv_db_db4 = yes ; then
30347                 ol_cv_lib_db=-ldb4
30348         fi
30349 fi
30350
30351         if test $ol_cv_lib_db = no ; then
30352         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb)" >&5
30353 echo $ECHO_N "checking for Berkeley DB link (-ldb)... $ECHO_C" >&6
30354 if test "${ol_cv_db_db+set}" = set; then
30355   echo $ECHO_N "(cached) $ECHO_C" >&6
30356 else
30357
30358         ol_DB_LIB=-ldb
30359         ol_LIBS=$LIBS
30360         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30361
30362         cat >conftest.$ac_ext <<_ACEOF
30363 /* confdefs.h.  */
30364 _ACEOF
30365 cat confdefs.h >>conftest.$ac_ext
30366 cat >>conftest.$ac_ext <<_ACEOF
30367 /* end confdefs.h.  */
30368
30369 #ifdef HAVE_DB_185_H
30370 # include <db_185.h>
30371 #else
30372 # include <db.h>
30373 #endif
30374
30375 #ifndef DB_VERSION_MAJOR
30376 # define DB_VERSION_MAJOR 1
30377 #endif
30378
30379 #ifndef NULL
30380 #define NULL ((void*)0)
30381 #endif
30382
30383 int
30384 main ()
30385 {
30386
30387 #if DB_VERSION_MAJOR > 1
30388         {
30389                 char *version;
30390                 int major, minor, patch;
30391
30392                 version = db_version( &major, &minor, &patch );
30393
30394                 if( major != DB_VERSION_MAJOR ||
30395                         minor < DB_VERSION_MINOR )
30396                 {
30397                         printf("Berkeley DB version mismatch\n"
30398                                 "\theader: %s\n\tlibrary: %s\n",
30399                                 DB_VERSION_STRING, version);
30400                         return 1;
30401                 }
30402         }
30403 #endif
30404
30405 #if DB_VERSION_MAJOR > 2
30406         db_env_create( NULL, 0 );
30407 #elif DB_VERSION_MAJOR > 1
30408         db_appexit( NULL );
30409 #else
30410         (void) dbopen( NULL, 0, 0, 0, NULL);
30411 #endif
30412
30413   ;
30414   return 0;
30415 }
30416 _ACEOF
30417 rm -f conftest.$ac_objext conftest$ac_exeext
30418 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30419   (eval $ac_link) 2>conftest.er1
30420   ac_status=$?
30421   grep -v '^ *+' conftest.er1 >conftest.err
30422   rm -f conftest.er1
30423   cat conftest.err >&5
30424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30425   (exit $ac_status); } &&
30426          { ac_try='test -z "$ac_c_werror_flag"
30427                          || test ! -s conftest.err'
30428   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30429   (eval $ac_try) 2>&5
30430   ac_status=$?
30431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30432   (exit $ac_status); }; } &&
30433          { ac_try='test -s conftest$ac_exeext'
30434   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30435   (eval $ac_try) 2>&5
30436   ac_status=$?
30437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30438   (exit $ac_status); }; }; then
30439   ol_cv_db_db=yes
30440 else
30441   echo "$as_me: failed program was:" >&5
30442 sed 's/^/| /' conftest.$ac_ext >&5
30443
30444 ol_cv_db_db=no
30445 fi
30446 rm -f conftest.err conftest.$ac_objext \
30447       conftest$ac_exeext conftest.$ac_ext
30448
30449         LIBS="$ol_LIBS"
30450
30451 fi
30452 echo "$as_me:$LINENO: result: $ol_cv_db_db" >&5
30453 echo "${ECHO_T}$ol_cv_db_db" >&6
30454
30455         if test $ol_cv_db_db = yes ; then
30456                 ol_cv_lib_db=-ldb
30457         fi
30458 fi
30459
30460
30461 elif test $ol_cv_bdb_major = 3 ; then
30462         if test $ol_cv_lib_db = no ; then
30463         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb3)" >&5
30464 echo $ECHO_N "checking for Berkeley DB link (-ldb3)... $ECHO_C" >&6
30465 if test "${ol_cv_db_db3+set}" = set; then
30466   echo $ECHO_N "(cached) $ECHO_C" >&6
30467 else
30468
30469         ol_DB_LIB=-ldb3
30470         ol_LIBS=$LIBS
30471         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30472
30473         cat >conftest.$ac_ext <<_ACEOF
30474 /* confdefs.h.  */
30475 _ACEOF
30476 cat confdefs.h >>conftest.$ac_ext
30477 cat >>conftest.$ac_ext <<_ACEOF
30478 /* end confdefs.h.  */
30479
30480 #ifdef HAVE_DB_185_H
30481 # include <db_185.h>
30482 #else
30483 # include <db.h>
30484 #endif
30485
30486 #ifndef DB_VERSION_MAJOR
30487 # define DB_VERSION_MAJOR 1
30488 #endif
30489
30490 #ifndef NULL
30491 #define NULL ((void*)0)
30492 #endif
30493
30494 int
30495 main ()
30496 {
30497
30498 #if DB_VERSION_MAJOR > 1
30499         {
30500                 char *version;
30501                 int major, minor, patch;
30502
30503                 version = db_version( &major, &minor, &patch );
30504
30505                 if( major != DB_VERSION_MAJOR ||
30506                         minor < DB_VERSION_MINOR )
30507                 {
30508                         printf("Berkeley DB version mismatch\n"
30509                                 "\theader: %s\n\tlibrary: %s\n",
30510                                 DB_VERSION_STRING, version);
30511                         return 1;
30512                 }
30513         }
30514 #endif
30515
30516 #if DB_VERSION_MAJOR > 2
30517         db_env_create( NULL, 0 );
30518 #elif DB_VERSION_MAJOR > 1
30519         db_appexit( NULL );
30520 #else
30521         (void) dbopen( NULL, 0, 0, 0, NULL);
30522 #endif
30523
30524   ;
30525   return 0;
30526 }
30527 _ACEOF
30528 rm -f conftest.$ac_objext conftest$ac_exeext
30529 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30530   (eval $ac_link) 2>conftest.er1
30531   ac_status=$?
30532   grep -v '^ *+' conftest.er1 >conftest.err
30533   rm -f conftest.er1
30534   cat conftest.err >&5
30535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30536   (exit $ac_status); } &&
30537          { ac_try='test -z "$ac_c_werror_flag"
30538                          || test ! -s conftest.err'
30539   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30540   (eval $ac_try) 2>&5
30541   ac_status=$?
30542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30543   (exit $ac_status); }; } &&
30544          { ac_try='test -s conftest$ac_exeext'
30545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30546   (eval $ac_try) 2>&5
30547   ac_status=$?
30548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30549   (exit $ac_status); }; }; then
30550   ol_cv_db_db3=yes
30551 else
30552   echo "$as_me: failed program was:" >&5
30553 sed 's/^/| /' conftest.$ac_ext >&5
30554
30555 ol_cv_db_db3=no
30556 fi
30557 rm -f conftest.err conftest.$ac_objext \
30558       conftest$ac_exeext conftest.$ac_ext
30559
30560         LIBS="$ol_LIBS"
30561
30562 fi
30563 echo "$as_me:$LINENO: result: $ol_cv_db_db3" >&5
30564 echo "${ECHO_T}$ol_cv_db_db3" >&6
30565
30566         if test $ol_cv_db_db3 = yes ; then
30567                 ol_cv_lib_db=-ldb3
30568         fi
30569 fi
30570
30571         if test $ol_cv_lib_db = no ; then
30572         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-3)" >&5
30573 echo $ECHO_N "checking for Berkeley DB link (-ldb-3)... $ECHO_C" >&6
30574 if test "${ol_cv_db_db_3+set}" = set; then
30575   echo $ECHO_N "(cached) $ECHO_C" >&6
30576 else
30577
30578         ol_DB_LIB=-ldb-3
30579         ol_LIBS=$LIBS
30580         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30581
30582         cat >conftest.$ac_ext <<_ACEOF
30583 /* confdefs.h.  */
30584 _ACEOF
30585 cat confdefs.h >>conftest.$ac_ext
30586 cat >>conftest.$ac_ext <<_ACEOF
30587 /* end confdefs.h.  */
30588
30589 #ifdef HAVE_DB_185_H
30590 # include <db_185.h>
30591 #else
30592 # include <db.h>
30593 #endif
30594
30595 #ifndef DB_VERSION_MAJOR
30596 # define DB_VERSION_MAJOR 1
30597 #endif
30598
30599 #ifndef NULL
30600 #define NULL ((void*)0)
30601 #endif
30602
30603 int
30604 main ()
30605 {
30606
30607 #if DB_VERSION_MAJOR > 1
30608         {
30609                 char *version;
30610                 int major, minor, patch;
30611
30612                 version = db_version( &major, &minor, &patch );
30613
30614                 if( major != DB_VERSION_MAJOR ||
30615                         minor < DB_VERSION_MINOR )
30616                 {
30617                         printf("Berkeley DB version mismatch\n"
30618                                 "\theader: %s\n\tlibrary: %s\n",
30619                                 DB_VERSION_STRING, version);
30620                         return 1;
30621                 }
30622         }
30623 #endif
30624
30625 #if DB_VERSION_MAJOR > 2
30626         db_env_create( NULL, 0 );
30627 #elif DB_VERSION_MAJOR > 1
30628         db_appexit( NULL );
30629 #else
30630         (void) dbopen( NULL, 0, 0, 0, NULL);
30631 #endif
30632
30633   ;
30634   return 0;
30635 }
30636 _ACEOF
30637 rm -f conftest.$ac_objext conftest$ac_exeext
30638 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30639   (eval $ac_link) 2>conftest.er1
30640   ac_status=$?
30641   grep -v '^ *+' conftest.er1 >conftest.err
30642   rm -f conftest.er1
30643   cat conftest.err >&5
30644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30645   (exit $ac_status); } &&
30646          { ac_try='test -z "$ac_c_werror_flag"
30647                          || test ! -s conftest.err'
30648   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30649   (eval $ac_try) 2>&5
30650   ac_status=$?
30651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30652   (exit $ac_status); }; } &&
30653          { ac_try='test -s conftest$ac_exeext'
30654   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30655   (eval $ac_try) 2>&5
30656   ac_status=$?
30657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30658   (exit $ac_status); }; }; then
30659   ol_cv_db_db_3=yes
30660 else
30661   echo "$as_me: failed program was:" >&5
30662 sed 's/^/| /' conftest.$ac_ext >&5
30663
30664 ol_cv_db_db_3=no
30665 fi
30666 rm -f conftest.err conftest.$ac_objext \
30667       conftest$ac_exeext conftest.$ac_ext
30668
30669         LIBS="$ol_LIBS"
30670
30671 fi
30672 echo "$as_me:$LINENO: result: $ol_cv_db_db_3" >&5
30673 echo "${ECHO_T}$ol_cv_db_db_3" >&6
30674
30675         if test $ol_cv_db_db_3 = yes ; then
30676                 ol_cv_lib_db=-ldb-3
30677         fi
30678 fi
30679
30680
30681 elif test $ol_cv_bdb_major = 2 ; then
30682         if test $ol_cv_lib_db = no ; then
30683         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb2)" >&5
30684 echo $ECHO_N "checking for Berkeley DB link (-ldb2)... $ECHO_C" >&6
30685 if test "${ol_cv_db_db2+set}" = set; then
30686   echo $ECHO_N "(cached) $ECHO_C" >&6
30687 else
30688
30689         ol_DB_LIB=-ldb2
30690         ol_LIBS=$LIBS
30691         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30692
30693         cat >conftest.$ac_ext <<_ACEOF
30694 /* confdefs.h.  */
30695 _ACEOF
30696 cat confdefs.h >>conftest.$ac_ext
30697 cat >>conftest.$ac_ext <<_ACEOF
30698 /* end confdefs.h.  */
30699
30700 #ifdef HAVE_DB_185_H
30701 # include <db_185.h>
30702 #else
30703 # include <db.h>
30704 #endif
30705
30706 #ifndef DB_VERSION_MAJOR
30707 # define DB_VERSION_MAJOR 1
30708 #endif
30709
30710 #ifndef NULL
30711 #define NULL ((void*)0)
30712 #endif
30713
30714 int
30715 main ()
30716 {
30717
30718 #if DB_VERSION_MAJOR > 1
30719         {
30720                 char *version;
30721                 int major, minor, patch;
30722
30723                 version = db_version( &major, &minor, &patch );
30724
30725                 if( major != DB_VERSION_MAJOR ||
30726                         minor < DB_VERSION_MINOR )
30727                 {
30728                         printf("Berkeley DB version mismatch\n"
30729                                 "\theader: %s\n\tlibrary: %s\n",
30730                                 DB_VERSION_STRING, version);
30731                         return 1;
30732                 }
30733         }
30734 #endif
30735
30736 #if DB_VERSION_MAJOR > 2
30737         db_env_create( NULL, 0 );
30738 #elif DB_VERSION_MAJOR > 1
30739         db_appexit( NULL );
30740 #else
30741         (void) dbopen( NULL, 0, 0, 0, NULL);
30742 #endif
30743
30744   ;
30745   return 0;
30746 }
30747 _ACEOF
30748 rm -f conftest.$ac_objext conftest$ac_exeext
30749 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30750   (eval $ac_link) 2>conftest.er1
30751   ac_status=$?
30752   grep -v '^ *+' conftest.er1 >conftest.err
30753   rm -f conftest.er1
30754   cat conftest.err >&5
30755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30756   (exit $ac_status); } &&
30757          { ac_try='test -z "$ac_c_werror_flag"
30758                          || test ! -s conftest.err'
30759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30760   (eval $ac_try) 2>&5
30761   ac_status=$?
30762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30763   (exit $ac_status); }; } &&
30764          { ac_try='test -s conftest$ac_exeext'
30765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30766   (eval $ac_try) 2>&5
30767   ac_status=$?
30768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30769   (exit $ac_status); }; }; then
30770   ol_cv_db_db2=yes
30771 else
30772   echo "$as_me: failed program was:" >&5
30773 sed 's/^/| /' conftest.$ac_ext >&5
30774
30775 ol_cv_db_db2=no
30776 fi
30777 rm -f conftest.err conftest.$ac_objext \
30778       conftest$ac_exeext conftest.$ac_ext
30779
30780         LIBS="$ol_LIBS"
30781
30782 fi
30783 echo "$as_me:$LINENO: result: $ol_cv_db_db2" >&5
30784 echo "${ECHO_T}$ol_cv_db_db2" >&6
30785
30786         if test $ol_cv_db_db2 = yes ; then
30787                 ol_cv_lib_db=-ldb2
30788         fi
30789 fi
30790
30791         if test $ol_cv_lib_db = no ; then
30792         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-2)" >&5
30793 echo $ECHO_N "checking for Berkeley DB link (-ldb-2)... $ECHO_C" >&6
30794 if test "${ol_cv_db_db_2+set}" = set; then
30795   echo $ECHO_N "(cached) $ECHO_C" >&6
30796 else
30797
30798         ol_DB_LIB=-ldb-2
30799         ol_LIBS=$LIBS
30800         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30801
30802         cat >conftest.$ac_ext <<_ACEOF
30803 /* confdefs.h.  */
30804 _ACEOF
30805 cat confdefs.h >>conftest.$ac_ext
30806 cat >>conftest.$ac_ext <<_ACEOF
30807 /* end confdefs.h.  */
30808
30809 #ifdef HAVE_DB_185_H
30810 # include <db_185.h>
30811 #else
30812 # include <db.h>
30813 #endif
30814
30815 #ifndef DB_VERSION_MAJOR
30816 # define DB_VERSION_MAJOR 1
30817 #endif
30818
30819 #ifndef NULL
30820 #define NULL ((void*)0)
30821 #endif
30822
30823 int
30824 main ()
30825 {
30826
30827 #if DB_VERSION_MAJOR > 1
30828         {
30829                 char *version;
30830                 int major, minor, patch;
30831
30832                 version = db_version( &major, &minor, &patch );
30833
30834                 if( major != DB_VERSION_MAJOR ||
30835                         minor < DB_VERSION_MINOR )
30836                 {
30837                         printf("Berkeley DB version mismatch\n"
30838                                 "\theader: %s\n\tlibrary: %s\n",
30839                                 DB_VERSION_STRING, version);
30840                         return 1;
30841                 }
30842         }
30843 #endif
30844
30845 #if DB_VERSION_MAJOR > 2
30846         db_env_create( NULL, 0 );
30847 #elif DB_VERSION_MAJOR > 1
30848         db_appexit( NULL );
30849 #else
30850         (void) dbopen( NULL, 0, 0, 0, NULL);
30851 #endif
30852
30853   ;
30854   return 0;
30855 }
30856 _ACEOF
30857 rm -f conftest.$ac_objext conftest$ac_exeext
30858 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30859   (eval $ac_link) 2>conftest.er1
30860   ac_status=$?
30861   grep -v '^ *+' conftest.er1 >conftest.err
30862   rm -f conftest.er1
30863   cat conftest.err >&5
30864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30865   (exit $ac_status); } &&
30866          { ac_try='test -z "$ac_c_werror_flag"
30867                          || test ! -s conftest.err'
30868   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30869   (eval $ac_try) 2>&5
30870   ac_status=$?
30871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30872   (exit $ac_status); }; } &&
30873          { ac_try='test -s conftest$ac_exeext'
30874   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30875   (eval $ac_try) 2>&5
30876   ac_status=$?
30877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30878   (exit $ac_status); }; }; then
30879   ol_cv_db_db_2=yes
30880 else
30881   echo "$as_me: failed program was:" >&5
30882 sed 's/^/| /' conftest.$ac_ext >&5
30883
30884 ol_cv_db_db_2=no
30885 fi
30886 rm -f conftest.err conftest.$ac_objext \
30887       conftest$ac_exeext conftest.$ac_ext
30888
30889         LIBS="$ol_LIBS"
30890
30891 fi
30892 echo "$as_me:$LINENO: result: $ol_cv_db_db_2" >&5
30893 echo "${ECHO_T}$ol_cv_db_db_2" >&6
30894
30895         if test $ol_cv_db_db_2 = yes ; then
30896                 ol_cv_lib_db=-ldb-2
30897         fi
30898 fi
30899
30900
30901 elif test $ol_cv_bdb_major = 1 ; then
30902         if test $ol_cv_lib_db = no ; then
30903         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb1)" >&5
30904 echo $ECHO_N "checking for Berkeley DB link (-ldb1)... $ECHO_C" >&6
30905 if test "${ol_cv_db_db1+set}" = set; then
30906   echo $ECHO_N "(cached) $ECHO_C" >&6
30907 else
30908
30909         ol_DB_LIB=-ldb1
30910         ol_LIBS=$LIBS
30911         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30912
30913         cat >conftest.$ac_ext <<_ACEOF
30914 /* confdefs.h.  */
30915 _ACEOF
30916 cat confdefs.h >>conftest.$ac_ext
30917 cat >>conftest.$ac_ext <<_ACEOF
30918 /* end confdefs.h.  */
30919
30920 #ifdef HAVE_DB_185_H
30921 # include <db_185.h>
30922 #else
30923 # include <db.h>
30924 #endif
30925
30926 #ifndef DB_VERSION_MAJOR
30927 # define DB_VERSION_MAJOR 1
30928 #endif
30929
30930 #ifndef NULL
30931 #define NULL ((void*)0)
30932 #endif
30933
30934 int
30935 main ()
30936 {
30937
30938 #if DB_VERSION_MAJOR > 1
30939         {
30940                 char *version;
30941                 int major, minor, patch;
30942
30943                 version = db_version( &major, &minor, &patch );
30944
30945                 if( major != DB_VERSION_MAJOR ||
30946                         minor < DB_VERSION_MINOR )
30947                 {
30948                         printf("Berkeley DB version mismatch\n"
30949                                 "\theader: %s\n\tlibrary: %s\n",
30950                                 DB_VERSION_STRING, version);
30951                         return 1;
30952                 }
30953         }
30954 #endif
30955
30956 #if DB_VERSION_MAJOR > 2
30957         db_env_create( NULL, 0 );
30958 #elif DB_VERSION_MAJOR > 1
30959         db_appexit( NULL );
30960 #else
30961         (void) dbopen( NULL, 0, 0, 0, NULL);
30962 #endif
30963
30964   ;
30965   return 0;
30966 }
30967 _ACEOF
30968 rm -f conftest.$ac_objext conftest$ac_exeext
30969 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30970   (eval $ac_link) 2>conftest.er1
30971   ac_status=$?
30972   grep -v '^ *+' conftest.er1 >conftest.err
30973   rm -f conftest.er1
30974   cat conftest.err >&5
30975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30976   (exit $ac_status); } &&
30977          { ac_try='test -z "$ac_c_werror_flag"
30978                          || test ! -s conftest.err'
30979   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30980   (eval $ac_try) 2>&5
30981   ac_status=$?
30982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30983   (exit $ac_status); }; } &&
30984          { ac_try='test -s conftest$ac_exeext'
30985   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30986   (eval $ac_try) 2>&5
30987   ac_status=$?
30988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30989   (exit $ac_status); }; }; then
30990   ol_cv_db_db1=yes
30991 else
30992   echo "$as_me: failed program was:" >&5
30993 sed 's/^/| /' conftest.$ac_ext >&5
30994
30995 ol_cv_db_db1=no
30996 fi
30997 rm -f conftest.err conftest.$ac_objext \
30998       conftest$ac_exeext conftest.$ac_ext
30999
31000         LIBS="$ol_LIBS"
31001
31002 fi
31003 echo "$as_me:$LINENO: result: $ol_cv_db_db1" >&5
31004 echo "${ECHO_T}$ol_cv_db_db1" >&6
31005
31006         if test $ol_cv_db_db1 = yes ; then
31007                 ol_cv_lib_db=-ldb1
31008         fi
31009 fi
31010
31011         if test $ol_cv_lib_db = no ; then
31012         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-1)" >&5
31013 echo $ECHO_N "checking for Berkeley DB link (-ldb-1)... $ECHO_C" >&6
31014 if test "${ol_cv_db_db_1+set}" = set; then
31015   echo $ECHO_N "(cached) $ECHO_C" >&6
31016 else
31017
31018         ol_DB_LIB=-ldb-1
31019         ol_LIBS=$LIBS
31020         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31021
31022         cat >conftest.$ac_ext <<_ACEOF
31023 /* confdefs.h.  */
31024 _ACEOF
31025 cat confdefs.h >>conftest.$ac_ext
31026 cat >>conftest.$ac_ext <<_ACEOF
31027 /* end confdefs.h.  */
31028
31029 #ifdef HAVE_DB_185_H
31030 # include <db_185.h>
31031 #else
31032 # include <db.h>
31033 #endif
31034
31035 #ifndef DB_VERSION_MAJOR
31036 # define DB_VERSION_MAJOR 1
31037 #endif
31038
31039 #ifndef NULL
31040 #define NULL ((void*)0)
31041 #endif
31042
31043 int
31044 main ()
31045 {
31046
31047 #if DB_VERSION_MAJOR > 1
31048         {
31049                 char *version;
31050                 int major, minor, patch;
31051
31052                 version = db_version( &major, &minor, &patch );
31053
31054                 if( major != DB_VERSION_MAJOR ||
31055                         minor < DB_VERSION_MINOR )
31056                 {
31057                         printf("Berkeley DB version mismatch\n"
31058                                 "\theader: %s\n\tlibrary: %s\n",
31059                                 DB_VERSION_STRING, version);
31060                         return 1;
31061                 }
31062         }
31063 #endif
31064
31065 #if DB_VERSION_MAJOR > 2
31066         db_env_create( NULL, 0 );
31067 #elif DB_VERSION_MAJOR > 1
31068         db_appexit( NULL );
31069 #else
31070         (void) dbopen( NULL, 0, 0, 0, NULL);
31071 #endif
31072
31073   ;
31074   return 0;
31075 }
31076 _ACEOF
31077 rm -f conftest.$ac_objext conftest$ac_exeext
31078 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31079   (eval $ac_link) 2>conftest.er1
31080   ac_status=$?
31081   grep -v '^ *+' conftest.er1 >conftest.err
31082   rm -f conftest.er1
31083   cat conftest.err >&5
31084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31085   (exit $ac_status); } &&
31086          { ac_try='test -z "$ac_c_werror_flag"
31087                          || test ! -s conftest.err'
31088   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31089   (eval $ac_try) 2>&5
31090   ac_status=$?
31091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31092   (exit $ac_status); }; } &&
31093          { ac_try='test -s conftest$ac_exeext'
31094   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31095   (eval $ac_try) 2>&5
31096   ac_status=$?
31097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31098   (exit $ac_status); }; }; then
31099   ol_cv_db_db_1=yes
31100 else
31101   echo "$as_me: failed program was:" >&5
31102 sed 's/^/| /' conftest.$ac_ext >&5
31103
31104 ol_cv_db_db_1=no
31105 fi
31106 rm -f conftest.err conftest.$ac_objext \
31107       conftest$ac_exeext conftest.$ac_ext
31108
31109         LIBS="$ol_LIBS"
31110
31111 fi
31112 echo "$as_me:$LINENO: result: $ol_cv_db_db_1" >&5
31113 echo "${ECHO_T}$ol_cv_db_db_1" >&6
31114
31115         if test $ol_cv_db_db_1 = yes ; then
31116                 ol_cv_lib_db=-ldb-1
31117         fi
31118 fi
31119
31120 fi
31121 if test $ol_cv_lib_db = no ; then
31122         echo "$as_me:$LINENO: checking for Berkeley DB link (default)" >&5
31123 echo $ECHO_N "checking for Berkeley DB link (default)... $ECHO_C" >&6
31124 if test "${ol_cv_db_none+set}" = set; then
31125   echo $ECHO_N "(cached) $ECHO_C" >&6
31126 else
31127
31128         ol_DB_LIB=
31129         ol_LIBS=$LIBS
31130         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31131
31132         cat >conftest.$ac_ext <<_ACEOF
31133 /* confdefs.h.  */
31134 _ACEOF
31135 cat confdefs.h >>conftest.$ac_ext
31136 cat >>conftest.$ac_ext <<_ACEOF
31137 /* end confdefs.h.  */
31138
31139 #ifdef HAVE_DB_185_H
31140 # include <db_185.h>
31141 #else
31142 # include <db.h>
31143 #endif
31144
31145 #ifndef DB_VERSION_MAJOR
31146 # define DB_VERSION_MAJOR 1
31147 #endif
31148
31149 #ifndef NULL
31150 #define NULL ((void*)0)
31151 #endif
31152
31153 int
31154 main ()
31155 {
31156
31157 #if DB_VERSION_MAJOR > 1
31158         {
31159                 char *version;
31160                 int major, minor, patch;
31161
31162                 version = db_version( &major, &minor, &patch );
31163
31164                 if( major != DB_VERSION_MAJOR ||
31165                         minor < DB_VERSION_MINOR )
31166                 {
31167                         printf("Berkeley DB version mismatch\n"
31168                                 "\theader: %s\n\tlibrary: %s\n",
31169                                 DB_VERSION_STRING, version);
31170                         return 1;
31171                 }
31172         }
31173 #endif
31174
31175 #if DB_VERSION_MAJOR > 2
31176         db_env_create( NULL, 0 );
31177 #elif DB_VERSION_MAJOR > 1
31178         db_appexit( NULL );
31179 #else
31180         (void) dbopen( NULL, 0, 0, 0, NULL);
31181 #endif
31182
31183   ;
31184   return 0;
31185 }
31186 _ACEOF
31187 rm -f conftest.$ac_objext conftest$ac_exeext
31188 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31189   (eval $ac_link) 2>conftest.er1
31190   ac_status=$?
31191   grep -v '^ *+' conftest.er1 >conftest.err
31192   rm -f conftest.er1
31193   cat conftest.err >&5
31194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31195   (exit $ac_status); } &&
31196          { ac_try='test -z "$ac_c_werror_flag"
31197                          || test ! -s conftest.err'
31198   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31199   (eval $ac_try) 2>&5
31200   ac_status=$?
31201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31202   (exit $ac_status); }; } &&
31203          { ac_try='test -s conftest$ac_exeext'
31204   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31205   (eval $ac_try) 2>&5
31206   ac_status=$?
31207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31208   (exit $ac_status); }; }; then
31209   ol_cv_db_none=yes
31210 else
31211   echo "$as_me: failed program was:" >&5
31212 sed 's/^/| /' conftest.$ac_ext >&5
31213
31214 ol_cv_db_none=no
31215 fi
31216 rm -f conftest.err conftest.$ac_objext \
31217       conftest$ac_exeext conftest.$ac_ext
31218
31219         LIBS="$ol_LIBS"
31220
31221 fi
31222 echo "$as_me:$LINENO: result: $ol_cv_db_none" >&5
31223 echo "${ECHO_T}$ol_cv_db_none" >&6
31224
31225         if test $ol_cv_db_none = yes ; then
31226                 ol_cv_lib_db=yes
31227         fi
31228 fi
31229
31230
31231                 if test "$ol_cv_lib_db" != no ; then
31232                         ol_cv_berkeley_db=yes
31233                 fi
31234         fi
31235 fi
31236
31237         else
31238                 ol_cv_berkeley_db=no
31239
31240 for ac_header in db.h
31241 do
31242 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
31243 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31244   echo "$as_me:$LINENO: checking for $ac_header" >&5
31245 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31246 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31247   echo $ECHO_N "(cached) $ECHO_C" >&6
31248 fi
31249 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
31250 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
31251 else
31252   # Is the header compilable?
31253 echo "$as_me:$LINENO: checking $ac_header usability" >&5
31254 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
31255 cat >conftest.$ac_ext <<_ACEOF
31256 /* confdefs.h.  */
31257 _ACEOF
31258 cat confdefs.h >>conftest.$ac_ext
31259 cat >>conftest.$ac_ext <<_ACEOF
31260 /* end confdefs.h.  */
31261 $ac_includes_default
31262 #include <$ac_header>
31263 _ACEOF
31264 rm -f conftest.$ac_objext
31265 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
31266   (eval $ac_compile) 2>conftest.er1
31267   ac_status=$?
31268   grep -v '^ *+' conftest.er1 >conftest.err
31269   rm -f conftest.er1
31270   cat conftest.err >&5
31271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31272   (exit $ac_status); } &&
31273          { ac_try='test -z "$ac_c_werror_flag"
31274                          || test ! -s conftest.err'
31275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31276   (eval $ac_try) 2>&5
31277   ac_status=$?
31278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31279   (exit $ac_status); }; } &&
31280          { ac_try='test -s conftest.$ac_objext'
31281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31282   (eval $ac_try) 2>&5
31283   ac_status=$?
31284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31285   (exit $ac_status); }; }; then
31286   ac_header_compiler=yes
31287 else
31288   echo "$as_me: failed program was:" >&5
31289 sed 's/^/| /' conftest.$ac_ext >&5
31290
31291 ac_header_compiler=no
31292 fi
31293 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
31294 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
31295 echo "${ECHO_T}$ac_header_compiler" >&6
31296
31297 # Is the header present?
31298 echo "$as_me:$LINENO: checking $ac_header presence" >&5
31299 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
31300 cat >conftest.$ac_ext <<_ACEOF
31301 /* confdefs.h.  */
31302 _ACEOF
31303 cat confdefs.h >>conftest.$ac_ext
31304 cat >>conftest.$ac_ext <<_ACEOF
31305 /* end confdefs.h.  */
31306 #include <$ac_header>
31307 _ACEOF
31308 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
31309   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
31310   ac_status=$?
31311   grep -v '^ *+' conftest.er1 >conftest.err
31312   rm -f conftest.er1
31313   cat conftest.err >&5
31314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31315   (exit $ac_status); } >/dev/null; then
31316   if test -s conftest.err; then
31317     ac_cpp_err=$ac_c_preproc_warn_flag
31318     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
31319   else
31320     ac_cpp_err=
31321   fi
31322 else
31323   ac_cpp_err=yes
31324 fi
31325 if test -z "$ac_cpp_err"; then
31326   ac_header_preproc=yes
31327 else
31328   echo "$as_me: failed program was:" >&5
31329 sed 's/^/| /' conftest.$ac_ext >&5
31330
31331   ac_header_preproc=no
31332 fi
31333 rm -f conftest.err conftest.$ac_ext
31334 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
31335 echo "${ECHO_T}$ac_header_preproc" >&6
31336
31337 # So?  What about this header?
31338 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
31339   yes:no: )
31340     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
31341 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
31342     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
31343 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
31344     ac_header_preproc=yes
31345     ;;
31346   no:yes:* )
31347     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
31348 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
31349     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
31350 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
31351     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
31352 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
31353     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
31354 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
31355     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
31356 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
31357     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
31358 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
31359     (
31360       cat <<\_ASBOX
31361 ## --------------------------------------------- ##
31362 ## Report this to <http://www.openldap.org/its/> ##
31363 ## --------------------------------------------- ##
31364 _ASBOX
31365     ) |
31366       sed "s/^/$as_me: WARNING:     /" >&2
31367     ;;
31368 esac
31369 echo "$as_me:$LINENO: checking for $ac_header" >&5
31370 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31371 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31372   echo $ECHO_N "(cached) $ECHO_C" >&6
31373 else
31374   eval "$as_ac_Header=\$ac_header_preproc"
31375 fi
31376 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
31377 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
31378
31379 fi
31380 if test `eval echo '${'$as_ac_Header'}'` = yes; then
31381   cat >>confdefs.h <<_ACEOF
31382 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
31383 _ACEOF
31384
31385 fi
31386
31387 done
31388
31389 if test $ac_cv_header_db_h = yes; then
31390         ol_cv_lib_db=no
31391
31392 echo "$as_me:$LINENO: checking for Berkeley DB major version" >&5
31393 echo $ECHO_N "checking for Berkeley DB major version... $ECHO_C" >&6
31394 if test "${ol_cv_bdb_major+set}" = set; then
31395   echo $ECHO_N "(cached) $ECHO_C" >&6
31396 else
31397
31398         ol_cv_bdb_major=0
31399         if test $ol_cv_bdb_major = 0 ; then
31400                 cat >conftest.$ac_ext <<_ACEOF
31401 /* confdefs.h.  */
31402 _ACEOF
31403 cat confdefs.h >>conftest.$ac_ext
31404 cat >>conftest.$ac_ext <<_ACEOF
31405 /* end confdefs.h.  */
31406
31407 #include <db.h>
31408 #ifndef DB_VERSION_MAJOR
31409 #       define DB_VERSION_MAJOR 1
31410 #endif
31411 #if DB_VERSION_MAJOR == 4
31412 __db_version
31413 #endif
31414
31415 _ACEOF
31416 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31417   $EGREP "__db_version" >/dev/null 2>&1; then
31418   ol_cv_bdb_major=4
31419 else
31420   :
31421 fi
31422 rm -f conftest*
31423
31424         fi
31425         if test $ol_cv_bdb_major = 0 ; then
31426                 cat >conftest.$ac_ext <<_ACEOF
31427 /* confdefs.h.  */
31428 _ACEOF
31429 cat confdefs.h >>conftest.$ac_ext
31430 cat >>conftest.$ac_ext <<_ACEOF
31431 /* end confdefs.h.  */
31432
31433 #include <db.h>
31434 #ifndef DB_VERSION_MAJOR
31435 #       define DB_VERSION_MAJOR 1
31436 #endif
31437 #if DB_VERSION_MAJOR == 3
31438 __db_version
31439 #endif
31440
31441 _ACEOF
31442 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31443   $EGREP "__db_version" >/dev/null 2>&1; then
31444   ol_cv_bdb_major=3
31445 else
31446   :
31447 fi
31448 rm -f conftest*
31449
31450         fi
31451         if test $ol_cv_bdb_major = 0 ; then
31452                 cat >conftest.$ac_ext <<_ACEOF
31453 /* confdefs.h.  */
31454 _ACEOF
31455 cat confdefs.h >>conftest.$ac_ext
31456 cat >>conftest.$ac_ext <<_ACEOF
31457 /* end confdefs.h.  */
31458
31459 #include <db.h>
31460 #ifndef DB_VERSION_MAJOR
31461 #       define DB_VERSION_MAJOR 1
31462 #endif
31463 #if DB_VERSION_MAJOR == 2
31464 __db_version
31465 #endif
31466
31467 _ACEOF
31468 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31469   $EGREP "__db_version" >/dev/null 2>&1; then
31470   ol_cv_bdb_major=2
31471 else
31472   :
31473 fi
31474 rm -f conftest*
31475
31476         fi
31477         if test $ol_cv_bdb_major = 0 ; then
31478                 cat >conftest.$ac_ext <<_ACEOF
31479 /* confdefs.h.  */
31480 _ACEOF
31481 cat confdefs.h >>conftest.$ac_ext
31482 cat >>conftest.$ac_ext <<_ACEOF
31483 /* end confdefs.h.  */
31484
31485 #include <db.h>
31486 #ifndef DB_VERSION_MAJOR
31487 #       define DB_VERSION_MAJOR 1
31488 #endif
31489 #if DB_VERSION_MAJOR == 1
31490 __db_version
31491 #endif
31492
31493 _ACEOF
31494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31495   $EGREP "__db_version" >/dev/null 2>&1; then
31496   ol_cv_bdb_major=1
31497 else
31498   :
31499 fi
31500 rm -f conftest*
31501
31502         fi
31503
31504         if test $ol_cv_bdb_major = 0 ; then
31505                 { { echo "$as_me:$LINENO: error: Unknown Berkeley DB major version" >&5
31506 echo "$as_me: error: Unknown Berkeley DB major version" >&2;}
31507    { (exit 1); exit 1; }; }
31508         fi
31509
31510 fi
31511 echo "$as_me:$LINENO: result: $ol_cv_bdb_major" >&5
31512 echo "${ECHO_T}$ol_cv_bdb_major" >&6
31513
31514 echo "$as_me:$LINENO: checking for Berkeley DB minor version" >&5
31515 echo $ECHO_N "checking for Berkeley DB minor version... $ECHO_C" >&6
31516 if test "${ol_cv_bdb_minor+set}" = set; then
31517   echo $ECHO_N "(cached) $ECHO_C" >&6
31518 else
31519
31520         ol_cv_bdb_minor=0
31521         if test $ol_cv_bdb_minor = 0 ; then
31522                 cat >conftest.$ac_ext <<_ACEOF
31523 /* confdefs.h.  */
31524 _ACEOF
31525 cat confdefs.h >>conftest.$ac_ext
31526 cat >>conftest.$ac_ext <<_ACEOF
31527 /* end confdefs.h.  */
31528
31529 #include <db.h>
31530 #ifndef DB_VERSION_MINOR
31531 #       define DB_VERSION_MINOR 0
31532 #endif
31533 #if DB_VERSION_MINOR == 9
31534 __db_version
31535 #endif
31536
31537 _ACEOF
31538 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31539   $EGREP "__db_version" >/dev/null 2>&1; then
31540   ol_cv_bdb_minor=9
31541 else
31542   :
31543 fi
31544 rm -f conftest*
31545
31546         fi
31547         if test $ol_cv_bdb_minor = 0 ; then
31548                 cat >conftest.$ac_ext <<_ACEOF
31549 /* confdefs.h.  */
31550 _ACEOF
31551 cat confdefs.h >>conftest.$ac_ext
31552 cat >>conftest.$ac_ext <<_ACEOF
31553 /* end confdefs.h.  */
31554
31555 #include <db.h>
31556 #ifndef DB_VERSION_MINOR
31557 #       define DB_VERSION_MINOR 0
31558 #endif
31559 #if DB_VERSION_MINOR == 8
31560 __db_version
31561 #endif
31562
31563 _ACEOF
31564 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31565   $EGREP "__db_version" >/dev/null 2>&1; then
31566   ol_cv_bdb_minor=8
31567 else
31568   :
31569 fi
31570 rm -f conftest*
31571
31572         fi
31573         if test $ol_cv_bdb_minor = 0 ; then
31574                 cat >conftest.$ac_ext <<_ACEOF
31575 /* confdefs.h.  */
31576 _ACEOF
31577 cat confdefs.h >>conftest.$ac_ext
31578 cat >>conftest.$ac_ext <<_ACEOF
31579 /* end confdefs.h.  */
31580
31581 #include <db.h>
31582 #ifndef DB_VERSION_MINOR
31583 #       define DB_VERSION_MINOR 0
31584 #endif
31585 #if DB_VERSION_MINOR == 7
31586 __db_version
31587 #endif
31588
31589 _ACEOF
31590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31591   $EGREP "__db_version" >/dev/null 2>&1; then
31592   ol_cv_bdb_minor=7
31593 else
31594   :
31595 fi
31596 rm -f conftest*
31597
31598         fi
31599         if test $ol_cv_bdb_minor = 0 ; then
31600                 cat >conftest.$ac_ext <<_ACEOF
31601 /* confdefs.h.  */
31602 _ACEOF
31603 cat confdefs.h >>conftest.$ac_ext
31604 cat >>conftest.$ac_ext <<_ACEOF
31605 /* end confdefs.h.  */
31606
31607 #include <db.h>
31608 #ifndef DB_VERSION_MINOR
31609 #       define DB_VERSION_MINOR 0
31610 #endif
31611 #if DB_VERSION_MINOR == 6
31612 __db_version
31613 #endif
31614
31615 _ACEOF
31616 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31617   $EGREP "__db_version" >/dev/null 2>&1; then
31618   ol_cv_bdb_minor=6
31619 else
31620   :
31621 fi
31622 rm -f conftest*
31623
31624         fi
31625         if test $ol_cv_bdb_minor = 0 ; then
31626                 cat >conftest.$ac_ext <<_ACEOF
31627 /* confdefs.h.  */
31628 _ACEOF
31629 cat confdefs.h >>conftest.$ac_ext
31630 cat >>conftest.$ac_ext <<_ACEOF
31631 /* end confdefs.h.  */
31632
31633 #include <db.h>
31634 #ifndef DB_VERSION_MINOR
31635 #       define DB_VERSION_MINOR 0
31636 #endif
31637 #if DB_VERSION_MINOR == 5
31638 __db_version
31639 #endif
31640
31641 _ACEOF
31642 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31643   $EGREP "__db_version" >/dev/null 2>&1; then
31644   ol_cv_bdb_minor=5
31645 else
31646   :
31647 fi
31648 rm -f conftest*
31649
31650         fi
31651         if test $ol_cv_bdb_minor = 0 ; then
31652                 cat >conftest.$ac_ext <<_ACEOF
31653 /* confdefs.h.  */
31654 _ACEOF
31655 cat confdefs.h >>conftest.$ac_ext
31656 cat >>conftest.$ac_ext <<_ACEOF
31657 /* end confdefs.h.  */
31658
31659 #include <db.h>
31660 #ifndef DB_VERSION_MINOR
31661 #       define DB_VERSION_MINOR 0
31662 #endif
31663 #if DB_VERSION_MINOR == 4
31664 __db_version
31665 #endif
31666
31667 _ACEOF
31668 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31669   $EGREP "__db_version" >/dev/null 2>&1; then
31670   ol_cv_bdb_minor=4
31671 else
31672   :
31673 fi
31674 rm -f conftest*
31675
31676         fi
31677         if test $ol_cv_bdb_minor = 0 ; then
31678                 cat >conftest.$ac_ext <<_ACEOF
31679 /* confdefs.h.  */
31680 _ACEOF
31681 cat confdefs.h >>conftest.$ac_ext
31682 cat >>conftest.$ac_ext <<_ACEOF
31683 /* end confdefs.h.  */
31684
31685 #include <db.h>
31686 #ifndef DB_VERSION_MINOR
31687 #       define DB_VERSION_MINOR 0
31688 #endif
31689 #if DB_VERSION_MINOR == 3
31690 __db_version
31691 #endif
31692
31693 _ACEOF
31694 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31695   $EGREP "__db_version" >/dev/null 2>&1; then
31696   ol_cv_bdb_minor=3
31697 else
31698   :
31699 fi
31700 rm -f conftest*
31701
31702         fi
31703         if test $ol_cv_bdb_minor = 0 ; then
31704                 cat >conftest.$ac_ext <<_ACEOF
31705 /* confdefs.h.  */
31706 _ACEOF
31707 cat confdefs.h >>conftest.$ac_ext
31708 cat >>conftest.$ac_ext <<_ACEOF
31709 /* end confdefs.h.  */
31710
31711 #include <db.h>
31712 #ifndef DB_VERSION_MINOR
31713 #       define DB_VERSION_MINOR 0
31714 #endif
31715 #if DB_VERSION_MINOR == 2
31716 __db_version
31717 #endif
31718
31719 _ACEOF
31720 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31721   $EGREP "__db_version" >/dev/null 2>&1; then
31722   ol_cv_bdb_minor=2
31723 else
31724   :
31725 fi
31726 rm -f conftest*
31727
31728         fi
31729         if test $ol_cv_bdb_minor = 0 ; then
31730                 cat >conftest.$ac_ext <<_ACEOF
31731 /* confdefs.h.  */
31732 _ACEOF
31733 cat confdefs.h >>conftest.$ac_ext
31734 cat >>conftest.$ac_ext <<_ACEOF
31735 /* end confdefs.h.  */
31736
31737 #include <db.h>
31738 #ifndef DB_VERSION_MINOR
31739 #       define DB_VERSION_MINOR 0
31740 #endif
31741 #if DB_VERSION_MINOR == 1
31742 __db_version
31743 #endif
31744
31745 _ACEOF
31746 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31747   $EGREP "__db_version" >/dev/null 2>&1; then
31748   ol_cv_bdb_minor=1
31749 else
31750   :
31751 fi
31752 rm -f conftest*
31753
31754         fi
31755
31756 fi
31757 echo "$as_me:$LINENO: result: $ol_cv_bdb_minor" >&5
31758 echo "${ECHO_T}$ol_cv_bdb_minor" >&6
31759
31760 if test $ol_cv_bdb_major = 4 ; then
31761         if test $ol_cv_bdb_minor = 4 ; then
31762                 if test $ol_cv_lib_db = no ; then
31763         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb44)" >&5
31764 echo $ECHO_N "checking for Berkeley DB link (-ldb44)... $ECHO_C" >&6
31765 if test "${ol_cv_db_db44+set}" = set; then
31766   echo $ECHO_N "(cached) $ECHO_C" >&6
31767 else
31768
31769         ol_DB_LIB=-ldb44
31770         ol_LIBS=$LIBS
31771         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31772
31773         cat >conftest.$ac_ext <<_ACEOF
31774 /* confdefs.h.  */
31775 _ACEOF
31776 cat confdefs.h >>conftest.$ac_ext
31777 cat >>conftest.$ac_ext <<_ACEOF
31778 /* end confdefs.h.  */
31779
31780 #ifdef HAVE_DB_185_H
31781 # include <db_185.h>
31782 #else
31783 # include <db.h>
31784 #endif
31785
31786 #ifndef DB_VERSION_MAJOR
31787 # define DB_VERSION_MAJOR 1
31788 #endif
31789
31790 #ifndef NULL
31791 #define NULL ((void*)0)
31792 #endif
31793
31794 int
31795 main ()
31796 {
31797
31798 #if DB_VERSION_MAJOR > 1
31799         {
31800                 char *version;
31801                 int major, minor, patch;
31802
31803                 version = db_version( &major, &minor, &patch );
31804
31805                 if( major != DB_VERSION_MAJOR ||
31806                         minor < DB_VERSION_MINOR )
31807                 {
31808                         printf("Berkeley DB version mismatch\n"
31809                                 "\theader: %s\n\tlibrary: %s\n",
31810                                 DB_VERSION_STRING, version);
31811                         return 1;
31812                 }
31813         }
31814 #endif
31815
31816 #if DB_VERSION_MAJOR > 2
31817         db_env_create( NULL, 0 );
31818 #elif DB_VERSION_MAJOR > 1
31819         db_appexit( NULL );
31820 #else
31821         (void) dbopen( NULL, 0, 0, 0, NULL);
31822 #endif
31823
31824   ;
31825   return 0;
31826 }
31827 _ACEOF
31828 rm -f conftest.$ac_objext conftest$ac_exeext
31829 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31830   (eval $ac_link) 2>conftest.er1
31831   ac_status=$?
31832   grep -v '^ *+' conftest.er1 >conftest.err
31833   rm -f conftest.er1
31834   cat conftest.err >&5
31835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31836   (exit $ac_status); } &&
31837          { ac_try='test -z "$ac_c_werror_flag"
31838                          || test ! -s conftest.err'
31839   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31840   (eval $ac_try) 2>&5
31841   ac_status=$?
31842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31843   (exit $ac_status); }; } &&
31844          { ac_try='test -s conftest$ac_exeext'
31845   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31846   (eval $ac_try) 2>&5
31847   ac_status=$?
31848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31849   (exit $ac_status); }; }; then
31850   ol_cv_db_db44=yes
31851 else
31852   echo "$as_me: failed program was:" >&5
31853 sed 's/^/| /' conftest.$ac_ext >&5
31854
31855 ol_cv_db_db44=no
31856 fi
31857 rm -f conftest.err conftest.$ac_objext \
31858       conftest$ac_exeext conftest.$ac_ext
31859
31860         LIBS="$ol_LIBS"
31861
31862 fi
31863 echo "$as_me:$LINENO: result: $ol_cv_db_db44" >&5
31864 echo "${ECHO_T}$ol_cv_db_db44" >&6
31865
31866         if test $ol_cv_db_db44 = yes ; then
31867                 ol_cv_lib_db=-ldb44
31868         fi
31869 fi
31870
31871                 if test $ol_cv_lib_db = no ; then
31872         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-44)" >&5
31873 echo $ECHO_N "checking for Berkeley DB link (-ldb-44)... $ECHO_C" >&6
31874 if test "${ol_cv_db_db_44+set}" = set; then
31875   echo $ECHO_N "(cached) $ECHO_C" >&6
31876 else
31877
31878         ol_DB_LIB=-ldb-44
31879         ol_LIBS=$LIBS
31880         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31881
31882         cat >conftest.$ac_ext <<_ACEOF
31883 /* confdefs.h.  */
31884 _ACEOF
31885 cat confdefs.h >>conftest.$ac_ext
31886 cat >>conftest.$ac_ext <<_ACEOF
31887 /* end confdefs.h.  */
31888
31889 #ifdef HAVE_DB_185_H
31890 # include <db_185.h>
31891 #else
31892 # include <db.h>
31893 #endif
31894
31895 #ifndef DB_VERSION_MAJOR
31896 # define DB_VERSION_MAJOR 1
31897 #endif
31898
31899 #ifndef NULL
31900 #define NULL ((void*)0)
31901 #endif
31902
31903 int
31904 main ()
31905 {
31906
31907 #if DB_VERSION_MAJOR > 1
31908         {
31909                 char *version;
31910                 int major, minor, patch;
31911
31912                 version = db_version( &major, &minor, &patch );
31913
31914                 if( major != DB_VERSION_MAJOR ||
31915                         minor < DB_VERSION_MINOR )
31916                 {
31917                         printf("Berkeley DB version mismatch\n"
31918                                 "\theader: %s\n\tlibrary: %s\n",
31919                                 DB_VERSION_STRING, version);
31920                         return 1;
31921                 }
31922         }
31923 #endif
31924
31925 #if DB_VERSION_MAJOR > 2
31926         db_env_create( NULL, 0 );
31927 #elif DB_VERSION_MAJOR > 1
31928         db_appexit( NULL );
31929 #else
31930         (void) dbopen( NULL, 0, 0, 0, NULL);
31931 #endif
31932
31933   ;
31934   return 0;
31935 }
31936 _ACEOF
31937 rm -f conftest.$ac_objext conftest$ac_exeext
31938 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31939   (eval $ac_link) 2>conftest.er1
31940   ac_status=$?
31941   grep -v '^ *+' conftest.er1 >conftest.err
31942   rm -f conftest.er1
31943   cat conftest.err >&5
31944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31945   (exit $ac_status); } &&
31946          { ac_try='test -z "$ac_c_werror_flag"
31947                          || test ! -s conftest.err'
31948   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31949   (eval $ac_try) 2>&5
31950   ac_status=$?
31951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31952   (exit $ac_status); }; } &&
31953          { ac_try='test -s conftest$ac_exeext'
31954   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31955   (eval $ac_try) 2>&5
31956   ac_status=$?
31957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31958   (exit $ac_status); }; }; then
31959   ol_cv_db_db_44=yes
31960 else
31961   echo "$as_me: failed program was:" >&5
31962 sed 's/^/| /' conftest.$ac_ext >&5
31963
31964 ol_cv_db_db_44=no
31965 fi
31966 rm -f conftest.err conftest.$ac_objext \
31967       conftest$ac_exeext conftest.$ac_ext
31968
31969         LIBS="$ol_LIBS"
31970
31971 fi
31972 echo "$as_me:$LINENO: result: $ol_cv_db_db_44" >&5
31973 echo "${ECHO_T}$ol_cv_db_db_44" >&6
31974
31975         if test $ol_cv_db_db_44 = yes ; then
31976                 ol_cv_lib_db=-ldb-44
31977         fi
31978 fi
31979
31980                 if test $ol_cv_lib_db = no ; then
31981         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.4)" >&5
31982 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.4)... $ECHO_C" >&6
31983 if test "${ol_cv_db_db_4_dot_4+set}" = set; then
31984   echo $ECHO_N "(cached) $ECHO_C" >&6
31985 else
31986
31987         ol_DB_LIB=-ldb-4.4
31988         ol_LIBS=$LIBS
31989         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
31990
31991         cat >conftest.$ac_ext <<_ACEOF
31992 /* confdefs.h.  */
31993 _ACEOF
31994 cat confdefs.h >>conftest.$ac_ext
31995 cat >>conftest.$ac_ext <<_ACEOF
31996 /* end confdefs.h.  */
31997
31998 #ifdef HAVE_DB_185_H
31999 # include <db_185.h>
32000 #else
32001 # include <db.h>
32002 #endif
32003
32004 #ifndef DB_VERSION_MAJOR
32005 # define DB_VERSION_MAJOR 1
32006 #endif
32007
32008 #ifndef NULL
32009 #define NULL ((void*)0)
32010 #endif
32011
32012 int
32013 main ()
32014 {
32015
32016 #if DB_VERSION_MAJOR > 1
32017         {
32018                 char *version;
32019                 int major, minor, patch;
32020
32021                 version = db_version( &major, &minor, &patch );
32022
32023                 if( major != DB_VERSION_MAJOR ||
32024                         minor < DB_VERSION_MINOR )
32025                 {
32026                         printf("Berkeley DB version mismatch\n"
32027                                 "\theader: %s\n\tlibrary: %s\n",
32028                                 DB_VERSION_STRING, version);
32029                         return 1;
32030                 }
32031         }
32032 #endif
32033
32034 #if DB_VERSION_MAJOR > 2
32035         db_env_create( NULL, 0 );
32036 #elif DB_VERSION_MAJOR > 1
32037         db_appexit( NULL );
32038 #else
32039         (void) dbopen( NULL, 0, 0, 0, NULL);
32040 #endif
32041
32042   ;
32043   return 0;
32044 }
32045 _ACEOF
32046 rm -f conftest.$ac_objext conftest$ac_exeext
32047 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32048   (eval $ac_link) 2>conftest.er1
32049   ac_status=$?
32050   grep -v '^ *+' conftest.er1 >conftest.err
32051   rm -f conftest.er1
32052   cat conftest.err >&5
32053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32054   (exit $ac_status); } &&
32055          { ac_try='test -z "$ac_c_werror_flag"
32056                          || test ! -s conftest.err'
32057   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32058   (eval $ac_try) 2>&5
32059   ac_status=$?
32060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32061   (exit $ac_status); }; } &&
32062          { ac_try='test -s conftest$ac_exeext'
32063   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32064   (eval $ac_try) 2>&5
32065   ac_status=$?
32066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32067   (exit $ac_status); }; }; then
32068   ol_cv_db_db_4_dot_4=yes
32069 else
32070   echo "$as_me: failed program was:" >&5
32071 sed 's/^/| /' conftest.$ac_ext >&5
32072
32073 ol_cv_db_db_4_dot_4=no
32074 fi
32075 rm -f conftest.err conftest.$ac_objext \
32076       conftest$ac_exeext conftest.$ac_ext
32077
32078         LIBS="$ol_LIBS"
32079
32080 fi
32081 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_4" >&5
32082 echo "${ECHO_T}$ol_cv_db_db_4_dot_4" >&6
32083
32084         if test $ol_cv_db_db_4_dot_4 = yes ; then
32085                 ol_cv_lib_db=-ldb-4.4
32086         fi
32087 fi
32088
32089                 if test $ol_cv_lib_db = no ; then
32090         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-4)" >&5
32091 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-4)... $ECHO_C" >&6
32092 if test "${ol_cv_db_db_4_4+set}" = set; then
32093   echo $ECHO_N "(cached) $ECHO_C" >&6
32094 else
32095
32096         ol_DB_LIB=-ldb-4-4
32097         ol_LIBS=$LIBS
32098         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32099
32100         cat >conftest.$ac_ext <<_ACEOF
32101 /* confdefs.h.  */
32102 _ACEOF
32103 cat confdefs.h >>conftest.$ac_ext
32104 cat >>conftest.$ac_ext <<_ACEOF
32105 /* end confdefs.h.  */
32106
32107 #ifdef HAVE_DB_185_H
32108 # include <db_185.h>
32109 #else
32110 # include <db.h>
32111 #endif
32112
32113 #ifndef DB_VERSION_MAJOR
32114 # define DB_VERSION_MAJOR 1
32115 #endif
32116
32117 #ifndef NULL
32118 #define NULL ((void*)0)
32119 #endif
32120
32121 int
32122 main ()
32123 {
32124
32125 #if DB_VERSION_MAJOR > 1
32126         {
32127                 char *version;
32128                 int major, minor, patch;
32129
32130                 version = db_version( &major, &minor, &patch );
32131
32132                 if( major != DB_VERSION_MAJOR ||
32133                         minor < DB_VERSION_MINOR )
32134                 {
32135                         printf("Berkeley DB version mismatch\n"
32136                                 "\theader: %s\n\tlibrary: %s\n",
32137                                 DB_VERSION_STRING, version);
32138                         return 1;
32139                 }
32140         }
32141 #endif
32142
32143 #if DB_VERSION_MAJOR > 2
32144         db_env_create( NULL, 0 );
32145 #elif DB_VERSION_MAJOR > 1
32146         db_appexit( NULL );
32147 #else
32148         (void) dbopen( NULL, 0, 0, 0, NULL);
32149 #endif
32150
32151   ;
32152   return 0;
32153 }
32154 _ACEOF
32155 rm -f conftest.$ac_objext conftest$ac_exeext
32156 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32157   (eval $ac_link) 2>conftest.er1
32158   ac_status=$?
32159   grep -v '^ *+' conftest.er1 >conftest.err
32160   rm -f conftest.er1
32161   cat conftest.err >&5
32162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32163   (exit $ac_status); } &&
32164          { ac_try='test -z "$ac_c_werror_flag"
32165                          || test ! -s conftest.err'
32166   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32167   (eval $ac_try) 2>&5
32168   ac_status=$?
32169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32170   (exit $ac_status); }; } &&
32171          { ac_try='test -s conftest$ac_exeext'
32172   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32173   (eval $ac_try) 2>&5
32174   ac_status=$?
32175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32176   (exit $ac_status); }; }; then
32177   ol_cv_db_db_4_4=yes
32178 else
32179   echo "$as_me: failed program was:" >&5
32180 sed 's/^/| /' conftest.$ac_ext >&5
32181
32182 ol_cv_db_db_4_4=no
32183 fi
32184 rm -f conftest.err conftest.$ac_objext \
32185       conftest$ac_exeext conftest.$ac_ext
32186
32187         LIBS="$ol_LIBS"
32188
32189 fi
32190 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_4" >&5
32191 echo "${ECHO_T}$ol_cv_db_db_4_4" >&6
32192
32193         if test $ol_cv_db_db_4_4 = yes ; then
32194                 ol_cv_lib_db=-ldb-4-4
32195         fi
32196 fi
32197
32198         elif test $ol_cv_bdb_minor = 3 ; then
32199                 if test $ol_cv_lib_db = no ; then
32200         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb43)" >&5
32201 echo $ECHO_N "checking for Berkeley DB link (-ldb43)... $ECHO_C" >&6
32202 if test "${ol_cv_db_db43+set}" = set; then
32203   echo $ECHO_N "(cached) $ECHO_C" >&6
32204 else
32205
32206         ol_DB_LIB=-ldb43
32207         ol_LIBS=$LIBS
32208         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32209
32210         cat >conftest.$ac_ext <<_ACEOF
32211 /* confdefs.h.  */
32212 _ACEOF
32213 cat confdefs.h >>conftest.$ac_ext
32214 cat >>conftest.$ac_ext <<_ACEOF
32215 /* end confdefs.h.  */
32216
32217 #ifdef HAVE_DB_185_H
32218 # include <db_185.h>
32219 #else
32220 # include <db.h>
32221 #endif
32222
32223 #ifndef DB_VERSION_MAJOR
32224 # define DB_VERSION_MAJOR 1
32225 #endif
32226
32227 #ifndef NULL
32228 #define NULL ((void*)0)
32229 #endif
32230
32231 int
32232 main ()
32233 {
32234
32235 #if DB_VERSION_MAJOR > 1
32236         {
32237                 char *version;
32238                 int major, minor, patch;
32239
32240                 version = db_version( &major, &minor, &patch );
32241
32242                 if( major != DB_VERSION_MAJOR ||
32243                         minor < DB_VERSION_MINOR )
32244                 {
32245                         printf("Berkeley DB version mismatch\n"
32246                                 "\theader: %s\n\tlibrary: %s\n",
32247                                 DB_VERSION_STRING, version);
32248                         return 1;
32249                 }
32250         }
32251 #endif
32252
32253 #if DB_VERSION_MAJOR > 2
32254         db_env_create( NULL, 0 );
32255 #elif DB_VERSION_MAJOR > 1
32256         db_appexit( NULL );
32257 #else
32258         (void) dbopen( NULL, 0, 0, 0, NULL);
32259 #endif
32260
32261   ;
32262   return 0;
32263 }
32264 _ACEOF
32265 rm -f conftest.$ac_objext conftest$ac_exeext
32266 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32267   (eval $ac_link) 2>conftest.er1
32268   ac_status=$?
32269   grep -v '^ *+' conftest.er1 >conftest.err
32270   rm -f conftest.er1
32271   cat conftest.err >&5
32272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32273   (exit $ac_status); } &&
32274          { ac_try='test -z "$ac_c_werror_flag"
32275                          || test ! -s conftest.err'
32276   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32277   (eval $ac_try) 2>&5
32278   ac_status=$?
32279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32280   (exit $ac_status); }; } &&
32281          { ac_try='test -s conftest$ac_exeext'
32282   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32283   (eval $ac_try) 2>&5
32284   ac_status=$?
32285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32286   (exit $ac_status); }; }; then
32287   ol_cv_db_db43=yes
32288 else
32289   echo "$as_me: failed program was:" >&5
32290 sed 's/^/| /' conftest.$ac_ext >&5
32291
32292 ol_cv_db_db43=no
32293 fi
32294 rm -f conftest.err conftest.$ac_objext \
32295       conftest$ac_exeext conftest.$ac_ext
32296
32297         LIBS="$ol_LIBS"
32298
32299 fi
32300 echo "$as_me:$LINENO: result: $ol_cv_db_db43" >&5
32301 echo "${ECHO_T}$ol_cv_db_db43" >&6
32302
32303         if test $ol_cv_db_db43 = yes ; then
32304                 ol_cv_lib_db=-ldb43
32305         fi
32306 fi
32307
32308                 if test $ol_cv_lib_db = no ; then
32309         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-43)" >&5
32310 echo $ECHO_N "checking for Berkeley DB link (-ldb-43)... $ECHO_C" >&6
32311 if test "${ol_cv_db_db_43+set}" = set; then
32312   echo $ECHO_N "(cached) $ECHO_C" >&6
32313 else
32314
32315         ol_DB_LIB=-ldb-43
32316         ol_LIBS=$LIBS
32317         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32318
32319         cat >conftest.$ac_ext <<_ACEOF
32320 /* confdefs.h.  */
32321 _ACEOF
32322 cat confdefs.h >>conftest.$ac_ext
32323 cat >>conftest.$ac_ext <<_ACEOF
32324 /* end confdefs.h.  */
32325
32326 #ifdef HAVE_DB_185_H
32327 # include <db_185.h>
32328 #else
32329 # include <db.h>
32330 #endif
32331
32332 #ifndef DB_VERSION_MAJOR
32333 # define DB_VERSION_MAJOR 1
32334 #endif
32335
32336 #ifndef NULL
32337 #define NULL ((void*)0)
32338 #endif
32339
32340 int
32341 main ()
32342 {
32343
32344 #if DB_VERSION_MAJOR > 1
32345         {
32346                 char *version;
32347                 int major, minor, patch;
32348
32349                 version = db_version( &major, &minor, &patch );
32350
32351                 if( major != DB_VERSION_MAJOR ||
32352                         minor < DB_VERSION_MINOR )
32353                 {
32354                         printf("Berkeley DB version mismatch\n"
32355                                 "\theader: %s\n\tlibrary: %s\n",
32356                                 DB_VERSION_STRING, version);
32357                         return 1;
32358                 }
32359         }
32360 #endif
32361
32362 #if DB_VERSION_MAJOR > 2
32363         db_env_create( NULL, 0 );
32364 #elif DB_VERSION_MAJOR > 1
32365         db_appexit( NULL );
32366 #else
32367         (void) dbopen( NULL, 0, 0, 0, NULL);
32368 #endif
32369
32370   ;
32371   return 0;
32372 }
32373 _ACEOF
32374 rm -f conftest.$ac_objext conftest$ac_exeext
32375 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32376   (eval $ac_link) 2>conftest.er1
32377   ac_status=$?
32378   grep -v '^ *+' conftest.er1 >conftest.err
32379   rm -f conftest.er1
32380   cat conftest.err >&5
32381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32382   (exit $ac_status); } &&
32383          { ac_try='test -z "$ac_c_werror_flag"
32384                          || test ! -s conftest.err'
32385   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32386   (eval $ac_try) 2>&5
32387   ac_status=$?
32388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32389   (exit $ac_status); }; } &&
32390          { ac_try='test -s conftest$ac_exeext'
32391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32392   (eval $ac_try) 2>&5
32393   ac_status=$?
32394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32395   (exit $ac_status); }; }; then
32396   ol_cv_db_db_43=yes
32397 else
32398   echo "$as_me: failed program was:" >&5
32399 sed 's/^/| /' conftest.$ac_ext >&5
32400
32401 ol_cv_db_db_43=no
32402 fi
32403 rm -f conftest.err conftest.$ac_objext \
32404       conftest$ac_exeext conftest.$ac_ext
32405
32406         LIBS="$ol_LIBS"
32407
32408 fi
32409 echo "$as_me:$LINENO: result: $ol_cv_db_db_43" >&5
32410 echo "${ECHO_T}$ol_cv_db_db_43" >&6
32411
32412         if test $ol_cv_db_db_43 = yes ; then
32413                 ol_cv_lib_db=-ldb-43
32414         fi
32415 fi
32416
32417                 if test $ol_cv_lib_db = no ; then
32418         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.3)" >&5
32419 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.3)... $ECHO_C" >&6
32420 if test "${ol_cv_db_db_4_dot_3+set}" = set; then
32421   echo $ECHO_N "(cached) $ECHO_C" >&6
32422 else
32423
32424         ol_DB_LIB=-ldb-4.3
32425         ol_LIBS=$LIBS
32426         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32427
32428         cat >conftest.$ac_ext <<_ACEOF
32429 /* confdefs.h.  */
32430 _ACEOF
32431 cat confdefs.h >>conftest.$ac_ext
32432 cat >>conftest.$ac_ext <<_ACEOF
32433 /* end confdefs.h.  */
32434
32435 #ifdef HAVE_DB_185_H
32436 # include <db_185.h>
32437 #else
32438 # include <db.h>
32439 #endif
32440
32441 #ifndef DB_VERSION_MAJOR
32442 # define DB_VERSION_MAJOR 1
32443 #endif
32444
32445 #ifndef NULL
32446 #define NULL ((void*)0)
32447 #endif
32448
32449 int
32450 main ()
32451 {
32452
32453 #if DB_VERSION_MAJOR > 1
32454         {
32455                 char *version;
32456                 int major, minor, patch;
32457
32458                 version = db_version( &major, &minor, &patch );
32459
32460                 if( major != DB_VERSION_MAJOR ||
32461                         minor < DB_VERSION_MINOR )
32462                 {
32463                         printf("Berkeley DB version mismatch\n"
32464                                 "\theader: %s\n\tlibrary: %s\n",
32465                                 DB_VERSION_STRING, version);
32466                         return 1;
32467                 }
32468         }
32469 #endif
32470
32471 #if DB_VERSION_MAJOR > 2
32472         db_env_create( NULL, 0 );
32473 #elif DB_VERSION_MAJOR > 1
32474         db_appexit( NULL );
32475 #else
32476         (void) dbopen( NULL, 0, 0, 0, NULL);
32477 #endif
32478
32479   ;
32480   return 0;
32481 }
32482 _ACEOF
32483 rm -f conftest.$ac_objext conftest$ac_exeext
32484 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32485   (eval $ac_link) 2>conftest.er1
32486   ac_status=$?
32487   grep -v '^ *+' conftest.er1 >conftest.err
32488   rm -f conftest.er1
32489   cat conftest.err >&5
32490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32491   (exit $ac_status); } &&
32492          { ac_try='test -z "$ac_c_werror_flag"
32493                          || test ! -s conftest.err'
32494   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32495   (eval $ac_try) 2>&5
32496   ac_status=$?
32497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32498   (exit $ac_status); }; } &&
32499          { ac_try='test -s conftest$ac_exeext'
32500   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32501   (eval $ac_try) 2>&5
32502   ac_status=$?
32503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32504   (exit $ac_status); }; }; then
32505   ol_cv_db_db_4_dot_3=yes
32506 else
32507   echo "$as_me: failed program was:" >&5
32508 sed 's/^/| /' conftest.$ac_ext >&5
32509
32510 ol_cv_db_db_4_dot_3=no
32511 fi
32512 rm -f conftest.err conftest.$ac_objext \
32513       conftest$ac_exeext conftest.$ac_ext
32514
32515         LIBS="$ol_LIBS"
32516
32517 fi
32518 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_3" >&5
32519 echo "${ECHO_T}$ol_cv_db_db_4_dot_3" >&6
32520
32521         if test $ol_cv_db_db_4_dot_3 = yes ; then
32522                 ol_cv_lib_db=-ldb-4.3
32523         fi
32524 fi
32525
32526                 if test $ol_cv_lib_db = no ; then
32527         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-3)" >&5
32528 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-3)... $ECHO_C" >&6
32529 if test "${ol_cv_db_db_4_3+set}" = set; then
32530   echo $ECHO_N "(cached) $ECHO_C" >&6
32531 else
32532
32533         ol_DB_LIB=-ldb-4-3
32534         ol_LIBS=$LIBS
32535         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32536
32537         cat >conftest.$ac_ext <<_ACEOF
32538 /* confdefs.h.  */
32539 _ACEOF
32540 cat confdefs.h >>conftest.$ac_ext
32541 cat >>conftest.$ac_ext <<_ACEOF
32542 /* end confdefs.h.  */
32543
32544 #ifdef HAVE_DB_185_H
32545 # include <db_185.h>
32546 #else
32547 # include <db.h>
32548 #endif
32549
32550 #ifndef DB_VERSION_MAJOR
32551 # define DB_VERSION_MAJOR 1
32552 #endif
32553
32554 #ifndef NULL
32555 #define NULL ((void*)0)
32556 #endif
32557
32558 int
32559 main ()
32560 {
32561
32562 #if DB_VERSION_MAJOR > 1
32563         {
32564                 char *version;
32565                 int major, minor, patch;
32566
32567                 version = db_version( &major, &minor, &patch );
32568
32569                 if( major != DB_VERSION_MAJOR ||
32570                         minor < DB_VERSION_MINOR )
32571                 {
32572                         printf("Berkeley DB version mismatch\n"
32573                                 "\theader: %s\n\tlibrary: %s\n",
32574                                 DB_VERSION_STRING, version);
32575                         return 1;
32576                 }
32577         }
32578 #endif
32579
32580 #if DB_VERSION_MAJOR > 2
32581         db_env_create( NULL, 0 );
32582 #elif DB_VERSION_MAJOR > 1
32583         db_appexit( NULL );
32584 #else
32585         (void) dbopen( NULL, 0, 0, 0, NULL);
32586 #endif
32587
32588   ;
32589   return 0;
32590 }
32591 _ACEOF
32592 rm -f conftest.$ac_objext conftest$ac_exeext
32593 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32594   (eval $ac_link) 2>conftest.er1
32595   ac_status=$?
32596   grep -v '^ *+' conftest.er1 >conftest.err
32597   rm -f conftest.er1
32598   cat conftest.err >&5
32599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32600   (exit $ac_status); } &&
32601          { ac_try='test -z "$ac_c_werror_flag"
32602                          || test ! -s conftest.err'
32603   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32604   (eval $ac_try) 2>&5
32605   ac_status=$?
32606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32607   (exit $ac_status); }; } &&
32608          { ac_try='test -s conftest$ac_exeext'
32609   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32610   (eval $ac_try) 2>&5
32611   ac_status=$?
32612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32613   (exit $ac_status); }; }; then
32614   ol_cv_db_db_4_3=yes
32615 else
32616   echo "$as_me: failed program was:" >&5
32617 sed 's/^/| /' conftest.$ac_ext >&5
32618
32619 ol_cv_db_db_4_3=no
32620 fi
32621 rm -f conftest.err conftest.$ac_objext \
32622       conftest$ac_exeext conftest.$ac_ext
32623
32624         LIBS="$ol_LIBS"
32625
32626 fi
32627 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_3" >&5
32628 echo "${ECHO_T}$ol_cv_db_db_4_3" >&6
32629
32630         if test $ol_cv_db_db_4_3 = yes ; then
32631                 ol_cv_lib_db=-ldb-4-3
32632         fi
32633 fi
32634
32635         elif test $ol_cv_bdb_minor = 2 ; then
32636                 if test $ol_cv_lib_db = no ; then
32637         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb42)" >&5
32638 echo $ECHO_N "checking for Berkeley DB link (-ldb42)... $ECHO_C" >&6
32639 if test "${ol_cv_db_db42+set}" = set; then
32640   echo $ECHO_N "(cached) $ECHO_C" >&6
32641 else
32642
32643         ol_DB_LIB=-ldb42
32644         ol_LIBS=$LIBS
32645         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32646
32647         cat >conftest.$ac_ext <<_ACEOF
32648 /* confdefs.h.  */
32649 _ACEOF
32650 cat confdefs.h >>conftest.$ac_ext
32651 cat >>conftest.$ac_ext <<_ACEOF
32652 /* end confdefs.h.  */
32653
32654 #ifdef HAVE_DB_185_H
32655 # include <db_185.h>
32656 #else
32657 # include <db.h>
32658 #endif
32659
32660 #ifndef DB_VERSION_MAJOR
32661 # define DB_VERSION_MAJOR 1
32662 #endif
32663
32664 #ifndef NULL
32665 #define NULL ((void*)0)
32666 #endif
32667
32668 int
32669 main ()
32670 {
32671
32672 #if DB_VERSION_MAJOR > 1
32673         {
32674                 char *version;
32675                 int major, minor, patch;
32676
32677                 version = db_version( &major, &minor, &patch );
32678
32679                 if( major != DB_VERSION_MAJOR ||
32680                         minor < DB_VERSION_MINOR )
32681                 {
32682                         printf("Berkeley DB version mismatch\n"
32683                                 "\theader: %s\n\tlibrary: %s\n",
32684                                 DB_VERSION_STRING, version);
32685                         return 1;
32686                 }
32687         }
32688 #endif
32689
32690 #if DB_VERSION_MAJOR > 2
32691         db_env_create( NULL, 0 );
32692 #elif DB_VERSION_MAJOR > 1
32693         db_appexit( NULL );
32694 #else
32695         (void) dbopen( NULL, 0, 0, 0, NULL);
32696 #endif
32697
32698   ;
32699   return 0;
32700 }
32701 _ACEOF
32702 rm -f conftest.$ac_objext conftest$ac_exeext
32703 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32704   (eval $ac_link) 2>conftest.er1
32705   ac_status=$?
32706   grep -v '^ *+' conftest.er1 >conftest.err
32707   rm -f conftest.er1
32708   cat conftest.err >&5
32709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32710   (exit $ac_status); } &&
32711          { ac_try='test -z "$ac_c_werror_flag"
32712                          || test ! -s conftest.err'
32713   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32714   (eval $ac_try) 2>&5
32715   ac_status=$?
32716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32717   (exit $ac_status); }; } &&
32718          { ac_try='test -s conftest$ac_exeext'
32719   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32720   (eval $ac_try) 2>&5
32721   ac_status=$?
32722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32723   (exit $ac_status); }; }; then
32724   ol_cv_db_db42=yes
32725 else
32726   echo "$as_me: failed program was:" >&5
32727 sed 's/^/| /' conftest.$ac_ext >&5
32728
32729 ol_cv_db_db42=no
32730 fi
32731 rm -f conftest.err conftest.$ac_objext \
32732       conftest$ac_exeext conftest.$ac_ext
32733
32734         LIBS="$ol_LIBS"
32735
32736 fi
32737 echo "$as_me:$LINENO: result: $ol_cv_db_db42" >&5
32738 echo "${ECHO_T}$ol_cv_db_db42" >&6
32739
32740         if test $ol_cv_db_db42 = yes ; then
32741                 ol_cv_lib_db=-ldb42
32742         fi
32743 fi
32744
32745                 if test $ol_cv_lib_db = no ; then
32746         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-42)" >&5
32747 echo $ECHO_N "checking for Berkeley DB link (-ldb-42)... $ECHO_C" >&6
32748 if test "${ol_cv_db_db_42+set}" = set; then
32749   echo $ECHO_N "(cached) $ECHO_C" >&6
32750 else
32751
32752         ol_DB_LIB=-ldb-42
32753         ol_LIBS=$LIBS
32754         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32755
32756         cat >conftest.$ac_ext <<_ACEOF
32757 /* confdefs.h.  */
32758 _ACEOF
32759 cat confdefs.h >>conftest.$ac_ext
32760 cat >>conftest.$ac_ext <<_ACEOF
32761 /* end confdefs.h.  */
32762
32763 #ifdef HAVE_DB_185_H
32764 # include <db_185.h>
32765 #else
32766 # include <db.h>
32767 #endif
32768
32769 #ifndef DB_VERSION_MAJOR
32770 # define DB_VERSION_MAJOR 1
32771 #endif
32772
32773 #ifndef NULL
32774 #define NULL ((void*)0)
32775 #endif
32776
32777 int
32778 main ()
32779 {
32780
32781 #if DB_VERSION_MAJOR > 1
32782         {
32783                 char *version;
32784                 int major, minor, patch;
32785
32786                 version = db_version( &major, &minor, &patch );
32787
32788                 if( major != DB_VERSION_MAJOR ||
32789                         minor < DB_VERSION_MINOR )
32790                 {
32791                         printf("Berkeley DB version mismatch\n"
32792                                 "\theader: %s\n\tlibrary: %s\n",
32793                                 DB_VERSION_STRING, version);
32794                         return 1;
32795                 }
32796         }
32797 #endif
32798
32799 #if DB_VERSION_MAJOR > 2
32800         db_env_create( NULL, 0 );
32801 #elif DB_VERSION_MAJOR > 1
32802         db_appexit( NULL );
32803 #else
32804         (void) dbopen( NULL, 0, 0, 0, NULL);
32805 #endif
32806
32807   ;
32808   return 0;
32809 }
32810 _ACEOF
32811 rm -f conftest.$ac_objext conftest$ac_exeext
32812 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32813   (eval $ac_link) 2>conftest.er1
32814   ac_status=$?
32815   grep -v '^ *+' conftest.er1 >conftest.err
32816   rm -f conftest.er1
32817   cat conftest.err >&5
32818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32819   (exit $ac_status); } &&
32820          { ac_try='test -z "$ac_c_werror_flag"
32821                          || test ! -s conftest.err'
32822   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32823   (eval $ac_try) 2>&5
32824   ac_status=$?
32825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32826   (exit $ac_status); }; } &&
32827          { ac_try='test -s conftest$ac_exeext'
32828   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32829   (eval $ac_try) 2>&5
32830   ac_status=$?
32831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32832   (exit $ac_status); }; }; then
32833   ol_cv_db_db_42=yes
32834 else
32835   echo "$as_me: failed program was:" >&5
32836 sed 's/^/| /' conftest.$ac_ext >&5
32837
32838 ol_cv_db_db_42=no
32839 fi
32840 rm -f conftest.err conftest.$ac_objext \
32841       conftest$ac_exeext conftest.$ac_ext
32842
32843         LIBS="$ol_LIBS"
32844
32845 fi
32846 echo "$as_me:$LINENO: result: $ol_cv_db_db_42" >&5
32847 echo "${ECHO_T}$ol_cv_db_db_42" >&6
32848
32849         if test $ol_cv_db_db_42 = yes ; then
32850                 ol_cv_lib_db=-ldb-42
32851         fi
32852 fi
32853
32854                 if test $ol_cv_lib_db = no ; then
32855         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.2)" >&5
32856 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.2)... $ECHO_C" >&6
32857 if test "${ol_cv_db_db_4_dot_2+set}" = set; then
32858   echo $ECHO_N "(cached) $ECHO_C" >&6
32859 else
32860
32861         ol_DB_LIB=-ldb-4.2
32862         ol_LIBS=$LIBS
32863         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32864
32865         cat >conftest.$ac_ext <<_ACEOF
32866 /* confdefs.h.  */
32867 _ACEOF
32868 cat confdefs.h >>conftest.$ac_ext
32869 cat >>conftest.$ac_ext <<_ACEOF
32870 /* end confdefs.h.  */
32871
32872 #ifdef HAVE_DB_185_H
32873 # include <db_185.h>
32874 #else
32875 # include <db.h>
32876 #endif
32877
32878 #ifndef DB_VERSION_MAJOR
32879 # define DB_VERSION_MAJOR 1
32880 #endif
32881
32882 #ifndef NULL
32883 #define NULL ((void*)0)
32884 #endif
32885
32886 int
32887 main ()
32888 {
32889
32890 #if DB_VERSION_MAJOR > 1
32891         {
32892                 char *version;
32893                 int major, minor, patch;
32894
32895                 version = db_version( &major, &minor, &patch );
32896
32897                 if( major != DB_VERSION_MAJOR ||
32898                         minor < DB_VERSION_MINOR )
32899                 {
32900                         printf("Berkeley DB version mismatch\n"
32901                                 "\theader: %s\n\tlibrary: %s\n",
32902                                 DB_VERSION_STRING, version);
32903                         return 1;
32904                 }
32905         }
32906 #endif
32907
32908 #if DB_VERSION_MAJOR > 2
32909         db_env_create( NULL, 0 );
32910 #elif DB_VERSION_MAJOR > 1
32911         db_appexit( NULL );
32912 #else
32913         (void) dbopen( NULL, 0, 0, 0, NULL);
32914 #endif
32915
32916   ;
32917   return 0;
32918 }
32919 _ACEOF
32920 rm -f conftest.$ac_objext conftest$ac_exeext
32921 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32922   (eval $ac_link) 2>conftest.er1
32923   ac_status=$?
32924   grep -v '^ *+' conftest.er1 >conftest.err
32925   rm -f conftest.er1
32926   cat conftest.err >&5
32927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32928   (exit $ac_status); } &&
32929          { ac_try='test -z "$ac_c_werror_flag"
32930                          || test ! -s conftest.err'
32931   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32932   (eval $ac_try) 2>&5
32933   ac_status=$?
32934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32935   (exit $ac_status); }; } &&
32936          { ac_try='test -s conftest$ac_exeext'
32937   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32938   (eval $ac_try) 2>&5
32939   ac_status=$?
32940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32941   (exit $ac_status); }; }; then
32942   ol_cv_db_db_4_dot_2=yes
32943 else
32944   echo "$as_me: failed program was:" >&5
32945 sed 's/^/| /' conftest.$ac_ext >&5
32946
32947 ol_cv_db_db_4_dot_2=no
32948 fi
32949 rm -f conftest.err conftest.$ac_objext \
32950       conftest$ac_exeext conftest.$ac_ext
32951
32952         LIBS="$ol_LIBS"
32953
32954 fi
32955 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_2" >&5
32956 echo "${ECHO_T}$ol_cv_db_db_4_dot_2" >&6
32957
32958         if test $ol_cv_db_db_4_dot_2 = yes ; then
32959                 ol_cv_lib_db=-ldb-4.2
32960         fi
32961 fi
32962
32963                 if test $ol_cv_lib_db = no ; then
32964         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-2)" >&5
32965 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-2)... $ECHO_C" >&6
32966 if test "${ol_cv_db_db_4_2+set}" = set; then
32967   echo $ECHO_N "(cached) $ECHO_C" >&6
32968 else
32969
32970         ol_DB_LIB=-ldb-4-2
32971         ol_LIBS=$LIBS
32972         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
32973
32974         cat >conftest.$ac_ext <<_ACEOF
32975 /* confdefs.h.  */
32976 _ACEOF
32977 cat confdefs.h >>conftest.$ac_ext
32978 cat >>conftest.$ac_ext <<_ACEOF
32979 /* end confdefs.h.  */
32980
32981 #ifdef HAVE_DB_185_H
32982 # include <db_185.h>
32983 #else
32984 # include <db.h>
32985 #endif
32986
32987 #ifndef DB_VERSION_MAJOR
32988 # define DB_VERSION_MAJOR 1
32989 #endif
32990
32991 #ifndef NULL
32992 #define NULL ((void*)0)
32993 #endif
32994
32995 int
32996 main ()
32997 {
32998
32999 #if DB_VERSION_MAJOR > 1
33000         {
33001                 char *version;
33002                 int major, minor, patch;
33003
33004                 version = db_version( &major, &minor, &patch );
33005
33006                 if( major != DB_VERSION_MAJOR ||
33007                         minor < DB_VERSION_MINOR )
33008                 {
33009                         printf("Berkeley DB version mismatch\n"
33010                                 "\theader: %s\n\tlibrary: %s\n",
33011                                 DB_VERSION_STRING, version);
33012                         return 1;
33013                 }
33014         }
33015 #endif
33016
33017 #if DB_VERSION_MAJOR > 2
33018         db_env_create( NULL, 0 );
33019 #elif DB_VERSION_MAJOR > 1
33020         db_appexit( NULL );
33021 #else
33022         (void) dbopen( NULL, 0, 0, 0, NULL);
33023 #endif
33024
33025   ;
33026   return 0;
33027 }
33028 _ACEOF
33029 rm -f conftest.$ac_objext conftest$ac_exeext
33030 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33031   (eval $ac_link) 2>conftest.er1
33032   ac_status=$?
33033   grep -v '^ *+' conftest.er1 >conftest.err
33034   rm -f conftest.er1
33035   cat conftest.err >&5
33036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33037   (exit $ac_status); } &&
33038          { ac_try='test -z "$ac_c_werror_flag"
33039                          || test ! -s conftest.err'
33040   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33041   (eval $ac_try) 2>&5
33042   ac_status=$?
33043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33044   (exit $ac_status); }; } &&
33045          { ac_try='test -s conftest$ac_exeext'
33046   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33047   (eval $ac_try) 2>&5
33048   ac_status=$?
33049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33050   (exit $ac_status); }; }; then
33051   ol_cv_db_db_4_2=yes
33052 else
33053   echo "$as_me: failed program was:" >&5
33054 sed 's/^/| /' conftest.$ac_ext >&5
33055
33056 ol_cv_db_db_4_2=no
33057 fi
33058 rm -f conftest.err conftest.$ac_objext \
33059       conftest$ac_exeext conftest.$ac_ext
33060
33061         LIBS="$ol_LIBS"
33062
33063 fi
33064 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_2" >&5
33065 echo "${ECHO_T}$ol_cv_db_db_4_2" >&6
33066
33067         if test $ol_cv_db_db_4_2 = yes ; then
33068                 ol_cv_lib_db=-ldb-4-2
33069         fi
33070 fi
33071
33072         elif test $ol_cv_bdb_minor = 1 ; then
33073                 if test $ol_cv_lib_db = no ; then
33074         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb41)" >&5
33075 echo $ECHO_N "checking for Berkeley DB link (-ldb41)... $ECHO_C" >&6
33076 if test "${ol_cv_db_db41+set}" = set; then
33077   echo $ECHO_N "(cached) $ECHO_C" >&6
33078 else
33079
33080         ol_DB_LIB=-ldb41
33081         ol_LIBS=$LIBS
33082         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33083
33084         cat >conftest.$ac_ext <<_ACEOF
33085 /* confdefs.h.  */
33086 _ACEOF
33087 cat confdefs.h >>conftest.$ac_ext
33088 cat >>conftest.$ac_ext <<_ACEOF
33089 /* end confdefs.h.  */
33090
33091 #ifdef HAVE_DB_185_H
33092 # include <db_185.h>
33093 #else
33094 # include <db.h>
33095 #endif
33096
33097 #ifndef DB_VERSION_MAJOR
33098 # define DB_VERSION_MAJOR 1
33099 #endif
33100
33101 #ifndef NULL
33102 #define NULL ((void*)0)
33103 #endif
33104
33105 int
33106 main ()
33107 {
33108
33109 #if DB_VERSION_MAJOR > 1
33110         {
33111                 char *version;
33112                 int major, minor, patch;
33113
33114                 version = db_version( &major, &minor, &patch );
33115
33116                 if( major != DB_VERSION_MAJOR ||
33117                         minor < DB_VERSION_MINOR )
33118                 {
33119                         printf("Berkeley DB version mismatch\n"
33120                                 "\theader: %s\n\tlibrary: %s\n",
33121                                 DB_VERSION_STRING, version);
33122                         return 1;
33123                 }
33124         }
33125 #endif
33126
33127 #if DB_VERSION_MAJOR > 2
33128         db_env_create( NULL, 0 );
33129 #elif DB_VERSION_MAJOR > 1
33130         db_appexit( NULL );
33131 #else
33132         (void) dbopen( NULL, 0, 0, 0, NULL);
33133 #endif
33134
33135   ;
33136   return 0;
33137 }
33138 _ACEOF
33139 rm -f conftest.$ac_objext conftest$ac_exeext
33140 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33141   (eval $ac_link) 2>conftest.er1
33142   ac_status=$?
33143   grep -v '^ *+' conftest.er1 >conftest.err
33144   rm -f conftest.er1
33145   cat conftest.err >&5
33146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33147   (exit $ac_status); } &&
33148          { ac_try='test -z "$ac_c_werror_flag"
33149                          || test ! -s conftest.err'
33150   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33151   (eval $ac_try) 2>&5
33152   ac_status=$?
33153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33154   (exit $ac_status); }; } &&
33155          { ac_try='test -s conftest$ac_exeext'
33156   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33157   (eval $ac_try) 2>&5
33158   ac_status=$?
33159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33160   (exit $ac_status); }; }; then
33161   ol_cv_db_db41=yes
33162 else
33163   echo "$as_me: failed program was:" >&5
33164 sed 's/^/| /' conftest.$ac_ext >&5
33165
33166 ol_cv_db_db41=no
33167 fi
33168 rm -f conftest.err conftest.$ac_objext \
33169       conftest$ac_exeext conftest.$ac_ext
33170
33171         LIBS="$ol_LIBS"
33172
33173 fi
33174 echo "$as_me:$LINENO: result: $ol_cv_db_db41" >&5
33175 echo "${ECHO_T}$ol_cv_db_db41" >&6
33176
33177         if test $ol_cv_db_db41 = yes ; then
33178                 ol_cv_lib_db=-ldb41
33179         fi
33180 fi
33181
33182                 if test $ol_cv_lib_db = no ; then
33183         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-41)" >&5
33184 echo $ECHO_N "checking for Berkeley DB link (-ldb-41)... $ECHO_C" >&6
33185 if test "${ol_cv_db_db_41+set}" = set; then
33186   echo $ECHO_N "(cached) $ECHO_C" >&6
33187 else
33188
33189         ol_DB_LIB=-ldb-41
33190         ol_LIBS=$LIBS
33191         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33192
33193         cat >conftest.$ac_ext <<_ACEOF
33194 /* confdefs.h.  */
33195 _ACEOF
33196 cat confdefs.h >>conftest.$ac_ext
33197 cat >>conftest.$ac_ext <<_ACEOF
33198 /* end confdefs.h.  */
33199
33200 #ifdef HAVE_DB_185_H
33201 # include <db_185.h>
33202 #else
33203 # include <db.h>
33204 #endif
33205
33206 #ifndef DB_VERSION_MAJOR
33207 # define DB_VERSION_MAJOR 1
33208 #endif
33209
33210 #ifndef NULL
33211 #define NULL ((void*)0)
33212 #endif
33213
33214 int
33215 main ()
33216 {
33217
33218 #if DB_VERSION_MAJOR > 1
33219         {
33220                 char *version;
33221                 int major, minor, patch;
33222
33223                 version = db_version( &major, &minor, &patch );
33224
33225                 if( major != DB_VERSION_MAJOR ||
33226                         minor < DB_VERSION_MINOR )
33227                 {
33228                         printf("Berkeley DB version mismatch\n"
33229                                 "\theader: %s\n\tlibrary: %s\n",
33230                                 DB_VERSION_STRING, version);
33231                         return 1;
33232                 }
33233         }
33234 #endif
33235
33236 #if DB_VERSION_MAJOR > 2
33237         db_env_create( NULL, 0 );
33238 #elif DB_VERSION_MAJOR > 1
33239         db_appexit( NULL );
33240 #else
33241         (void) dbopen( NULL, 0, 0, 0, NULL);
33242 #endif
33243
33244   ;
33245   return 0;
33246 }
33247 _ACEOF
33248 rm -f conftest.$ac_objext conftest$ac_exeext
33249 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33250   (eval $ac_link) 2>conftest.er1
33251   ac_status=$?
33252   grep -v '^ *+' conftest.er1 >conftest.err
33253   rm -f conftest.er1
33254   cat conftest.err >&5
33255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33256   (exit $ac_status); } &&
33257          { ac_try='test -z "$ac_c_werror_flag"
33258                          || test ! -s conftest.err'
33259   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33260   (eval $ac_try) 2>&5
33261   ac_status=$?
33262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33263   (exit $ac_status); }; } &&
33264          { ac_try='test -s conftest$ac_exeext'
33265   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33266   (eval $ac_try) 2>&5
33267   ac_status=$?
33268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33269   (exit $ac_status); }; }; then
33270   ol_cv_db_db_41=yes
33271 else
33272   echo "$as_me: failed program was:" >&5
33273 sed 's/^/| /' conftest.$ac_ext >&5
33274
33275 ol_cv_db_db_41=no
33276 fi
33277 rm -f conftest.err conftest.$ac_objext \
33278       conftest$ac_exeext conftest.$ac_ext
33279
33280         LIBS="$ol_LIBS"
33281
33282 fi
33283 echo "$as_me:$LINENO: result: $ol_cv_db_db_41" >&5
33284 echo "${ECHO_T}$ol_cv_db_db_41" >&6
33285
33286         if test $ol_cv_db_db_41 = yes ; then
33287                 ol_cv_lib_db=-ldb-41
33288         fi
33289 fi
33290
33291                 if test $ol_cv_lib_db = no ; then
33292         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.1)" >&5
33293 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.1)... $ECHO_C" >&6
33294 if test "${ol_cv_db_db_4_dot_1+set}" = set; then
33295   echo $ECHO_N "(cached) $ECHO_C" >&6
33296 else
33297
33298         ol_DB_LIB=-ldb-4.1
33299         ol_LIBS=$LIBS
33300         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33301
33302         cat >conftest.$ac_ext <<_ACEOF
33303 /* confdefs.h.  */
33304 _ACEOF
33305 cat confdefs.h >>conftest.$ac_ext
33306 cat >>conftest.$ac_ext <<_ACEOF
33307 /* end confdefs.h.  */
33308
33309 #ifdef HAVE_DB_185_H
33310 # include <db_185.h>
33311 #else
33312 # include <db.h>
33313 #endif
33314
33315 #ifndef DB_VERSION_MAJOR
33316 # define DB_VERSION_MAJOR 1
33317 #endif
33318
33319 #ifndef NULL
33320 #define NULL ((void*)0)
33321 #endif
33322
33323 int
33324 main ()
33325 {
33326
33327 #if DB_VERSION_MAJOR > 1
33328         {
33329                 char *version;
33330                 int major, minor, patch;
33331
33332                 version = db_version( &major, &minor, &patch );
33333
33334                 if( major != DB_VERSION_MAJOR ||
33335                         minor < DB_VERSION_MINOR )
33336                 {
33337                         printf("Berkeley DB version mismatch\n"
33338                                 "\theader: %s\n\tlibrary: %s\n",
33339                                 DB_VERSION_STRING, version);
33340                         return 1;
33341                 }
33342         }
33343 #endif
33344
33345 #if DB_VERSION_MAJOR > 2
33346         db_env_create( NULL, 0 );
33347 #elif DB_VERSION_MAJOR > 1
33348         db_appexit( NULL );
33349 #else
33350         (void) dbopen( NULL, 0, 0, 0, NULL);
33351 #endif
33352
33353   ;
33354   return 0;
33355 }
33356 _ACEOF
33357 rm -f conftest.$ac_objext conftest$ac_exeext
33358 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33359   (eval $ac_link) 2>conftest.er1
33360   ac_status=$?
33361   grep -v '^ *+' conftest.er1 >conftest.err
33362   rm -f conftest.er1
33363   cat conftest.err >&5
33364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33365   (exit $ac_status); } &&
33366          { ac_try='test -z "$ac_c_werror_flag"
33367                          || test ! -s conftest.err'
33368   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33369   (eval $ac_try) 2>&5
33370   ac_status=$?
33371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33372   (exit $ac_status); }; } &&
33373          { ac_try='test -s conftest$ac_exeext'
33374   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33375   (eval $ac_try) 2>&5
33376   ac_status=$?
33377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33378   (exit $ac_status); }; }; then
33379   ol_cv_db_db_4_dot_1=yes
33380 else
33381   echo "$as_me: failed program was:" >&5
33382 sed 's/^/| /' conftest.$ac_ext >&5
33383
33384 ol_cv_db_db_4_dot_1=no
33385 fi
33386 rm -f conftest.err conftest.$ac_objext \
33387       conftest$ac_exeext conftest.$ac_ext
33388
33389         LIBS="$ol_LIBS"
33390
33391 fi
33392 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_1" >&5
33393 echo "${ECHO_T}$ol_cv_db_db_4_dot_1" >&6
33394
33395         if test $ol_cv_db_db_4_dot_1 = yes ; then
33396                 ol_cv_lib_db=-ldb-4.1
33397         fi
33398 fi
33399
33400                 if test $ol_cv_lib_db = no ; then
33401         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-1)" >&5
33402 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-1)... $ECHO_C" >&6
33403 if test "${ol_cv_db_db_4_1+set}" = set; then
33404   echo $ECHO_N "(cached) $ECHO_C" >&6
33405 else
33406
33407         ol_DB_LIB=-ldb-4-1
33408         ol_LIBS=$LIBS
33409         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33410
33411         cat >conftest.$ac_ext <<_ACEOF
33412 /* confdefs.h.  */
33413 _ACEOF
33414 cat confdefs.h >>conftest.$ac_ext
33415 cat >>conftest.$ac_ext <<_ACEOF
33416 /* end confdefs.h.  */
33417
33418 #ifdef HAVE_DB_185_H
33419 # include <db_185.h>
33420 #else
33421 # include <db.h>
33422 #endif
33423
33424 #ifndef DB_VERSION_MAJOR
33425 # define DB_VERSION_MAJOR 1
33426 #endif
33427
33428 #ifndef NULL
33429 #define NULL ((void*)0)
33430 #endif
33431
33432 int
33433 main ()
33434 {
33435
33436 #if DB_VERSION_MAJOR > 1
33437         {
33438                 char *version;
33439                 int major, minor, patch;
33440
33441                 version = db_version( &major, &minor, &patch );
33442
33443                 if( major != DB_VERSION_MAJOR ||
33444                         minor < DB_VERSION_MINOR )
33445                 {
33446                         printf("Berkeley DB version mismatch\n"
33447                                 "\theader: %s\n\tlibrary: %s\n",
33448                                 DB_VERSION_STRING, version);
33449                         return 1;
33450                 }
33451         }
33452 #endif
33453
33454 #if DB_VERSION_MAJOR > 2
33455         db_env_create( NULL, 0 );
33456 #elif DB_VERSION_MAJOR > 1
33457         db_appexit( NULL );
33458 #else
33459         (void) dbopen( NULL, 0, 0, 0, NULL);
33460 #endif
33461
33462   ;
33463   return 0;
33464 }
33465 _ACEOF
33466 rm -f conftest.$ac_objext conftest$ac_exeext
33467 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33468   (eval $ac_link) 2>conftest.er1
33469   ac_status=$?
33470   grep -v '^ *+' conftest.er1 >conftest.err
33471   rm -f conftest.er1
33472   cat conftest.err >&5
33473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33474   (exit $ac_status); } &&
33475          { ac_try='test -z "$ac_c_werror_flag"
33476                          || test ! -s conftest.err'
33477   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33478   (eval $ac_try) 2>&5
33479   ac_status=$?
33480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33481   (exit $ac_status); }; } &&
33482          { ac_try='test -s conftest$ac_exeext'
33483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33484   (eval $ac_try) 2>&5
33485   ac_status=$?
33486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33487   (exit $ac_status); }; }; then
33488   ol_cv_db_db_4_1=yes
33489 else
33490   echo "$as_me: failed program was:" >&5
33491 sed 's/^/| /' conftest.$ac_ext >&5
33492
33493 ol_cv_db_db_4_1=no
33494 fi
33495 rm -f conftest.err conftest.$ac_objext \
33496       conftest$ac_exeext conftest.$ac_ext
33497
33498         LIBS="$ol_LIBS"
33499
33500 fi
33501 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_1" >&5
33502 echo "${ECHO_T}$ol_cv_db_db_4_1" >&6
33503
33504         if test $ol_cv_db_db_4_1 = yes ; then
33505                 ol_cv_lib_db=-ldb-4-1
33506         fi
33507 fi
33508
33509         fi
33510         if test $ol_cv_lib_db = no ; then
33511         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4)" >&5
33512 echo $ECHO_N "checking for Berkeley DB link (-ldb-4)... $ECHO_C" >&6
33513 if test "${ol_cv_db_db_4+set}" = set; then
33514   echo $ECHO_N "(cached) $ECHO_C" >&6
33515 else
33516
33517         ol_DB_LIB=-ldb-4
33518         ol_LIBS=$LIBS
33519         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33520
33521         cat >conftest.$ac_ext <<_ACEOF
33522 /* confdefs.h.  */
33523 _ACEOF
33524 cat confdefs.h >>conftest.$ac_ext
33525 cat >>conftest.$ac_ext <<_ACEOF
33526 /* end confdefs.h.  */
33527
33528 #ifdef HAVE_DB_185_H
33529 # include <db_185.h>
33530 #else
33531 # include <db.h>
33532 #endif
33533
33534 #ifndef DB_VERSION_MAJOR
33535 # define DB_VERSION_MAJOR 1
33536 #endif
33537
33538 #ifndef NULL
33539 #define NULL ((void*)0)
33540 #endif
33541
33542 int
33543 main ()
33544 {
33545
33546 #if DB_VERSION_MAJOR > 1
33547         {
33548                 char *version;
33549                 int major, minor, patch;
33550
33551                 version = db_version( &major, &minor, &patch );
33552
33553                 if( major != DB_VERSION_MAJOR ||
33554                         minor < DB_VERSION_MINOR )
33555                 {
33556                         printf("Berkeley DB version mismatch\n"
33557                                 "\theader: %s\n\tlibrary: %s\n",
33558                                 DB_VERSION_STRING, version);
33559                         return 1;
33560                 }
33561         }
33562 #endif
33563
33564 #if DB_VERSION_MAJOR > 2
33565         db_env_create( NULL, 0 );
33566 #elif DB_VERSION_MAJOR > 1
33567         db_appexit( NULL );
33568 #else
33569         (void) dbopen( NULL, 0, 0, 0, NULL);
33570 #endif
33571
33572   ;
33573   return 0;
33574 }
33575 _ACEOF
33576 rm -f conftest.$ac_objext conftest$ac_exeext
33577 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33578   (eval $ac_link) 2>conftest.er1
33579   ac_status=$?
33580   grep -v '^ *+' conftest.er1 >conftest.err
33581   rm -f conftest.er1
33582   cat conftest.err >&5
33583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33584   (exit $ac_status); } &&
33585          { ac_try='test -z "$ac_c_werror_flag"
33586                          || test ! -s conftest.err'
33587   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33588   (eval $ac_try) 2>&5
33589   ac_status=$?
33590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33591   (exit $ac_status); }; } &&
33592          { ac_try='test -s conftest$ac_exeext'
33593   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33594   (eval $ac_try) 2>&5
33595   ac_status=$?
33596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33597   (exit $ac_status); }; }; then
33598   ol_cv_db_db_4=yes
33599 else
33600   echo "$as_me: failed program was:" >&5
33601 sed 's/^/| /' conftest.$ac_ext >&5
33602
33603 ol_cv_db_db_4=no
33604 fi
33605 rm -f conftest.err conftest.$ac_objext \
33606       conftest$ac_exeext conftest.$ac_ext
33607
33608         LIBS="$ol_LIBS"
33609
33610 fi
33611 echo "$as_me:$LINENO: result: $ol_cv_db_db_4" >&5
33612 echo "${ECHO_T}$ol_cv_db_db_4" >&6
33613
33614         if test $ol_cv_db_db_4 = yes ; then
33615                 ol_cv_lib_db=-ldb-4
33616         fi
33617 fi
33618
33619         if test $ol_cv_lib_db = no ; then
33620         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb4)" >&5
33621 echo $ECHO_N "checking for Berkeley DB link (-ldb4)... $ECHO_C" >&6
33622 if test "${ol_cv_db_db4+set}" = set; then
33623   echo $ECHO_N "(cached) $ECHO_C" >&6
33624 else
33625
33626         ol_DB_LIB=-ldb4
33627         ol_LIBS=$LIBS
33628         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33629
33630         cat >conftest.$ac_ext <<_ACEOF
33631 /* confdefs.h.  */
33632 _ACEOF
33633 cat confdefs.h >>conftest.$ac_ext
33634 cat >>conftest.$ac_ext <<_ACEOF
33635 /* end confdefs.h.  */
33636
33637 #ifdef HAVE_DB_185_H
33638 # include <db_185.h>
33639 #else
33640 # include <db.h>
33641 #endif
33642
33643 #ifndef DB_VERSION_MAJOR
33644 # define DB_VERSION_MAJOR 1
33645 #endif
33646
33647 #ifndef NULL
33648 #define NULL ((void*)0)
33649 #endif
33650
33651 int
33652 main ()
33653 {
33654
33655 #if DB_VERSION_MAJOR > 1
33656         {
33657                 char *version;
33658                 int major, minor, patch;
33659
33660                 version = db_version( &major, &minor, &patch );
33661
33662                 if( major != DB_VERSION_MAJOR ||
33663                         minor < DB_VERSION_MINOR )
33664                 {
33665                         printf("Berkeley DB version mismatch\n"
33666                                 "\theader: %s\n\tlibrary: %s\n",
33667                                 DB_VERSION_STRING, version);
33668                         return 1;
33669                 }
33670         }
33671 #endif
33672
33673 #if DB_VERSION_MAJOR > 2
33674         db_env_create( NULL, 0 );
33675 #elif DB_VERSION_MAJOR > 1
33676         db_appexit( NULL );
33677 #else
33678         (void) dbopen( NULL, 0, 0, 0, NULL);
33679 #endif
33680
33681   ;
33682   return 0;
33683 }
33684 _ACEOF
33685 rm -f conftest.$ac_objext conftest$ac_exeext
33686 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33687   (eval $ac_link) 2>conftest.er1
33688   ac_status=$?
33689   grep -v '^ *+' conftest.er1 >conftest.err
33690   rm -f conftest.er1
33691   cat conftest.err >&5
33692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33693   (exit $ac_status); } &&
33694          { ac_try='test -z "$ac_c_werror_flag"
33695                          || test ! -s conftest.err'
33696   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33697   (eval $ac_try) 2>&5
33698   ac_status=$?
33699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33700   (exit $ac_status); }; } &&
33701          { ac_try='test -s conftest$ac_exeext'
33702   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33703   (eval $ac_try) 2>&5
33704   ac_status=$?
33705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33706   (exit $ac_status); }; }; then
33707   ol_cv_db_db4=yes
33708 else
33709   echo "$as_me: failed program was:" >&5
33710 sed 's/^/| /' conftest.$ac_ext >&5
33711
33712 ol_cv_db_db4=no
33713 fi
33714 rm -f conftest.err conftest.$ac_objext \
33715       conftest$ac_exeext conftest.$ac_ext
33716
33717         LIBS="$ol_LIBS"
33718
33719 fi
33720 echo "$as_me:$LINENO: result: $ol_cv_db_db4" >&5
33721 echo "${ECHO_T}$ol_cv_db_db4" >&6
33722
33723         if test $ol_cv_db_db4 = yes ; then
33724                 ol_cv_lib_db=-ldb4
33725         fi
33726 fi
33727
33728         if test $ol_cv_lib_db = no ; then
33729         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb)" >&5
33730 echo $ECHO_N "checking for Berkeley DB link (-ldb)... $ECHO_C" >&6
33731 if test "${ol_cv_db_db+set}" = set; then
33732   echo $ECHO_N "(cached) $ECHO_C" >&6
33733 else
33734
33735         ol_DB_LIB=-ldb
33736         ol_LIBS=$LIBS
33737         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33738
33739         cat >conftest.$ac_ext <<_ACEOF
33740 /* confdefs.h.  */
33741 _ACEOF
33742 cat confdefs.h >>conftest.$ac_ext
33743 cat >>conftest.$ac_ext <<_ACEOF
33744 /* end confdefs.h.  */
33745
33746 #ifdef HAVE_DB_185_H
33747 # include <db_185.h>
33748 #else
33749 # include <db.h>
33750 #endif
33751
33752 #ifndef DB_VERSION_MAJOR
33753 # define DB_VERSION_MAJOR 1
33754 #endif
33755
33756 #ifndef NULL
33757 #define NULL ((void*)0)
33758 #endif
33759
33760 int
33761 main ()
33762 {
33763
33764 #if DB_VERSION_MAJOR > 1
33765         {
33766                 char *version;
33767                 int major, minor, patch;
33768
33769                 version = db_version( &major, &minor, &patch );
33770
33771                 if( major != DB_VERSION_MAJOR ||
33772                         minor < DB_VERSION_MINOR )
33773                 {
33774                         printf("Berkeley DB version mismatch\n"
33775                                 "\theader: %s\n\tlibrary: %s\n",
33776                                 DB_VERSION_STRING, version);
33777                         return 1;
33778                 }
33779         }
33780 #endif
33781
33782 #if DB_VERSION_MAJOR > 2
33783         db_env_create( NULL, 0 );
33784 #elif DB_VERSION_MAJOR > 1
33785         db_appexit( NULL );
33786 #else
33787         (void) dbopen( NULL, 0, 0, 0, NULL);
33788 #endif
33789
33790   ;
33791   return 0;
33792 }
33793 _ACEOF
33794 rm -f conftest.$ac_objext conftest$ac_exeext
33795 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33796   (eval $ac_link) 2>conftest.er1
33797   ac_status=$?
33798   grep -v '^ *+' conftest.er1 >conftest.err
33799   rm -f conftest.er1
33800   cat conftest.err >&5
33801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33802   (exit $ac_status); } &&
33803          { ac_try='test -z "$ac_c_werror_flag"
33804                          || test ! -s conftest.err'
33805   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33806   (eval $ac_try) 2>&5
33807   ac_status=$?
33808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33809   (exit $ac_status); }; } &&
33810          { ac_try='test -s conftest$ac_exeext'
33811   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33812   (eval $ac_try) 2>&5
33813   ac_status=$?
33814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33815   (exit $ac_status); }; }; then
33816   ol_cv_db_db=yes
33817 else
33818   echo "$as_me: failed program was:" >&5
33819 sed 's/^/| /' conftest.$ac_ext >&5
33820
33821 ol_cv_db_db=no
33822 fi
33823 rm -f conftest.err conftest.$ac_objext \
33824       conftest$ac_exeext conftest.$ac_ext
33825
33826         LIBS="$ol_LIBS"
33827
33828 fi
33829 echo "$as_me:$LINENO: result: $ol_cv_db_db" >&5
33830 echo "${ECHO_T}$ol_cv_db_db" >&6
33831
33832         if test $ol_cv_db_db = yes ; then
33833                 ol_cv_lib_db=-ldb
33834         fi
33835 fi
33836
33837
33838 elif test $ol_cv_bdb_major = 3 ; then
33839         if test $ol_cv_lib_db = no ; then
33840         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb3)" >&5
33841 echo $ECHO_N "checking for Berkeley DB link (-ldb3)... $ECHO_C" >&6
33842 if test "${ol_cv_db_db3+set}" = set; then
33843   echo $ECHO_N "(cached) $ECHO_C" >&6
33844 else
33845
33846         ol_DB_LIB=-ldb3
33847         ol_LIBS=$LIBS
33848         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33849
33850         cat >conftest.$ac_ext <<_ACEOF
33851 /* confdefs.h.  */
33852 _ACEOF
33853 cat confdefs.h >>conftest.$ac_ext
33854 cat >>conftest.$ac_ext <<_ACEOF
33855 /* end confdefs.h.  */
33856
33857 #ifdef HAVE_DB_185_H
33858 # include <db_185.h>
33859 #else
33860 # include <db.h>
33861 #endif
33862
33863 #ifndef DB_VERSION_MAJOR
33864 # define DB_VERSION_MAJOR 1
33865 #endif
33866
33867 #ifndef NULL
33868 #define NULL ((void*)0)
33869 #endif
33870
33871 int
33872 main ()
33873 {
33874
33875 #if DB_VERSION_MAJOR > 1
33876         {
33877                 char *version;
33878                 int major, minor, patch;
33879
33880                 version = db_version( &major, &minor, &patch );
33881
33882                 if( major != DB_VERSION_MAJOR ||
33883                         minor < DB_VERSION_MINOR )
33884                 {
33885                         printf("Berkeley DB version mismatch\n"
33886                                 "\theader: %s\n\tlibrary: %s\n",
33887                                 DB_VERSION_STRING, version);
33888                         return 1;
33889                 }
33890         }
33891 #endif
33892
33893 #if DB_VERSION_MAJOR > 2
33894         db_env_create( NULL, 0 );
33895 #elif DB_VERSION_MAJOR > 1
33896         db_appexit( NULL );
33897 #else
33898         (void) dbopen( NULL, 0, 0, 0, NULL);
33899 #endif
33900
33901   ;
33902   return 0;
33903 }
33904 _ACEOF
33905 rm -f conftest.$ac_objext conftest$ac_exeext
33906 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33907   (eval $ac_link) 2>conftest.er1
33908   ac_status=$?
33909   grep -v '^ *+' conftest.er1 >conftest.err
33910   rm -f conftest.er1
33911   cat conftest.err >&5
33912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33913   (exit $ac_status); } &&
33914          { ac_try='test -z "$ac_c_werror_flag"
33915                          || test ! -s conftest.err'
33916   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33917   (eval $ac_try) 2>&5
33918   ac_status=$?
33919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33920   (exit $ac_status); }; } &&
33921          { ac_try='test -s conftest$ac_exeext'
33922   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33923   (eval $ac_try) 2>&5
33924   ac_status=$?
33925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33926   (exit $ac_status); }; }; then
33927   ol_cv_db_db3=yes
33928 else
33929   echo "$as_me: failed program was:" >&5
33930 sed 's/^/| /' conftest.$ac_ext >&5
33931
33932 ol_cv_db_db3=no
33933 fi
33934 rm -f conftest.err conftest.$ac_objext \
33935       conftest$ac_exeext conftest.$ac_ext
33936
33937         LIBS="$ol_LIBS"
33938
33939 fi
33940 echo "$as_me:$LINENO: result: $ol_cv_db_db3" >&5
33941 echo "${ECHO_T}$ol_cv_db_db3" >&6
33942
33943         if test $ol_cv_db_db3 = yes ; then
33944                 ol_cv_lib_db=-ldb3
33945         fi
33946 fi
33947
33948         if test $ol_cv_lib_db = no ; then
33949         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-3)" >&5
33950 echo $ECHO_N "checking for Berkeley DB link (-ldb-3)... $ECHO_C" >&6
33951 if test "${ol_cv_db_db_3+set}" = set; then
33952   echo $ECHO_N "(cached) $ECHO_C" >&6
33953 else
33954
33955         ol_DB_LIB=-ldb-3
33956         ol_LIBS=$LIBS
33957         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
33958
33959         cat >conftest.$ac_ext <<_ACEOF
33960 /* confdefs.h.  */
33961 _ACEOF
33962 cat confdefs.h >>conftest.$ac_ext
33963 cat >>conftest.$ac_ext <<_ACEOF
33964 /* end confdefs.h.  */
33965
33966 #ifdef HAVE_DB_185_H
33967 # include <db_185.h>
33968 #else
33969 # include <db.h>
33970 #endif
33971
33972 #ifndef DB_VERSION_MAJOR
33973 # define DB_VERSION_MAJOR 1
33974 #endif
33975
33976 #ifndef NULL
33977 #define NULL ((void*)0)
33978 #endif
33979
33980 int
33981 main ()
33982 {
33983
33984 #if DB_VERSION_MAJOR > 1
33985         {
33986                 char *version;
33987                 int major, minor, patch;
33988
33989                 version = db_version( &major, &minor, &patch );
33990
33991                 if( major != DB_VERSION_MAJOR ||
33992                         minor < DB_VERSION_MINOR )
33993                 {
33994                         printf("Berkeley DB version mismatch\n"
33995                                 "\theader: %s\n\tlibrary: %s\n",
33996                                 DB_VERSION_STRING, version);
33997                         return 1;
33998                 }
33999         }
34000 #endif
34001
34002 #if DB_VERSION_MAJOR > 2
34003         db_env_create( NULL, 0 );
34004 #elif DB_VERSION_MAJOR > 1
34005         db_appexit( NULL );
34006 #else
34007         (void) dbopen( NULL, 0, 0, 0, NULL);
34008 #endif
34009
34010   ;
34011   return 0;
34012 }
34013 _ACEOF
34014 rm -f conftest.$ac_objext conftest$ac_exeext
34015 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34016   (eval $ac_link) 2>conftest.er1
34017   ac_status=$?
34018   grep -v '^ *+' conftest.er1 >conftest.err
34019   rm -f conftest.er1
34020   cat conftest.err >&5
34021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34022   (exit $ac_status); } &&
34023          { ac_try='test -z "$ac_c_werror_flag"
34024                          || test ! -s conftest.err'
34025   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34026   (eval $ac_try) 2>&5
34027   ac_status=$?
34028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34029   (exit $ac_status); }; } &&
34030          { ac_try='test -s conftest$ac_exeext'
34031   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34032   (eval $ac_try) 2>&5
34033   ac_status=$?
34034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34035   (exit $ac_status); }; }; then
34036   ol_cv_db_db_3=yes
34037 else
34038   echo "$as_me: failed program was:" >&5
34039 sed 's/^/| /' conftest.$ac_ext >&5
34040
34041 ol_cv_db_db_3=no
34042 fi
34043 rm -f conftest.err conftest.$ac_objext \
34044       conftest$ac_exeext conftest.$ac_ext
34045
34046         LIBS="$ol_LIBS"
34047
34048 fi
34049 echo "$as_me:$LINENO: result: $ol_cv_db_db_3" >&5
34050 echo "${ECHO_T}$ol_cv_db_db_3" >&6
34051
34052         if test $ol_cv_db_db_3 = yes ; then
34053                 ol_cv_lib_db=-ldb-3
34054         fi
34055 fi
34056
34057
34058 elif test $ol_cv_bdb_major = 2 ; then
34059         if test $ol_cv_lib_db = no ; then
34060         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb2)" >&5
34061 echo $ECHO_N "checking for Berkeley DB link (-ldb2)... $ECHO_C" >&6
34062 if test "${ol_cv_db_db2+set}" = set; then
34063   echo $ECHO_N "(cached) $ECHO_C" >&6
34064 else
34065
34066         ol_DB_LIB=-ldb2
34067         ol_LIBS=$LIBS
34068         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34069
34070         cat >conftest.$ac_ext <<_ACEOF
34071 /* confdefs.h.  */
34072 _ACEOF
34073 cat confdefs.h >>conftest.$ac_ext
34074 cat >>conftest.$ac_ext <<_ACEOF
34075 /* end confdefs.h.  */
34076
34077 #ifdef HAVE_DB_185_H
34078 # include <db_185.h>
34079 #else
34080 # include <db.h>
34081 #endif
34082
34083 #ifndef DB_VERSION_MAJOR
34084 # define DB_VERSION_MAJOR 1
34085 #endif
34086
34087 #ifndef NULL
34088 #define NULL ((void*)0)
34089 #endif
34090
34091 int
34092 main ()
34093 {
34094
34095 #if DB_VERSION_MAJOR > 1
34096         {
34097                 char *version;
34098                 int major, minor, patch;
34099
34100                 version = db_version( &major, &minor, &patch );
34101
34102                 if( major != DB_VERSION_MAJOR ||
34103                         minor < DB_VERSION_MINOR )
34104                 {
34105                         printf("Berkeley DB version mismatch\n"
34106                                 "\theader: %s\n\tlibrary: %s\n",
34107                                 DB_VERSION_STRING, version);
34108                         return 1;
34109                 }
34110         }
34111 #endif
34112
34113 #if DB_VERSION_MAJOR > 2
34114         db_env_create( NULL, 0 );
34115 #elif DB_VERSION_MAJOR > 1
34116         db_appexit( NULL );
34117 #else
34118         (void) dbopen( NULL, 0, 0, 0, NULL);
34119 #endif
34120
34121   ;
34122   return 0;
34123 }
34124 _ACEOF
34125 rm -f conftest.$ac_objext conftest$ac_exeext
34126 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34127   (eval $ac_link) 2>conftest.er1
34128   ac_status=$?
34129   grep -v '^ *+' conftest.er1 >conftest.err
34130   rm -f conftest.er1
34131   cat conftest.err >&5
34132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34133   (exit $ac_status); } &&
34134          { ac_try='test -z "$ac_c_werror_flag"
34135                          || test ! -s conftest.err'
34136   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34137   (eval $ac_try) 2>&5
34138   ac_status=$?
34139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34140   (exit $ac_status); }; } &&
34141          { ac_try='test -s conftest$ac_exeext'
34142   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34143   (eval $ac_try) 2>&5
34144   ac_status=$?
34145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34146   (exit $ac_status); }; }; then
34147   ol_cv_db_db2=yes
34148 else
34149   echo "$as_me: failed program was:" >&5
34150 sed 's/^/| /' conftest.$ac_ext >&5
34151
34152 ol_cv_db_db2=no
34153 fi
34154 rm -f conftest.err conftest.$ac_objext \
34155       conftest$ac_exeext conftest.$ac_ext
34156
34157         LIBS="$ol_LIBS"
34158
34159 fi
34160 echo "$as_me:$LINENO: result: $ol_cv_db_db2" >&5
34161 echo "${ECHO_T}$ol_cv_db_db2" >&6
34162
34163         if test $ol_cv_db_db2 = yes ; then
34164                 ol_cv_lib_db=-ldb2
34165         fi
34166 fi
34167
34168         if test $ol_cv_lib_db = no ; then
34169         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-2)" >&5
34170 echo $ECHO_N "checking for Berkeley DB link (-ldb-2)... $ECHO_C" >&6
34171 if test "${ol_cv_db_db_2+set}" = set; then
34172   echo $ECHO_N "(cached) $ECHO_C" >&6
34173 else
34174
34175         ol_DB_LIB=-ldb-2
34176         ol_LIBS=$LIBS
34177         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34178
34179         cat >conftest.$ac_ext <<_ACEOF
34180 /* confdefs.h.  */
34181 _ACEOF
34182 cat confdefs.h >>conftest.$ac_ext
34183 cat >>conftest.$ac_ext <<_ACEOF
34184 /* end confdefs.h.  */
34185
34186 #ifdef HAVE_DB_185_H
34187 # include <db_185.h>
34188 #else
34189 # include <db.h>
34190 #endif
34191
34192 #ifndef DB_VERSION_MAJOR
34193 # define DB_VERSION_MAJOR 1
34194 #endif
34195
34196 #ifndef NULL
34197 #define NULL ((void*)0)
34198 #endif
34199
34200 int
34201 main ()
34202 {
34203
34204 #if DB_VERSION_MAJOR > 1
34205         {
34206                 char *version;
34207                 int major, minor, patch;
34208
34209                 version = db_version( &major, &minor, &patch );
34210
34211                 if( major != DB_VERSION_MAJOR ||
34212                         minor < DB_VERSION_MINOR )
34213                 {
34214                         printf("Berkeley DB version mismatch\n"
34215                                 "\theader: %s\n\tlibrary: %s\n",
34216                                 DB_VERSION_STRING, version);
34217                         return 1;
34218                 }
34219         }
34220 #endif
34221
34222 #if DB_VERSION_MAJOR > 2
34223         db_env_create( NULL, 0 );
34224 #elif DB_VERSION_MAJOR > 1
34225         db_appexit( NULL );
34226 #else
34227         (void) dbopen( NULL, 0, 0, 0, NULL);
34228 #endif
34229
34230   ;
34231   return 0;
34232 }
34233 _ACEOF
34234 rm -f conftest.$ac_objext conftest$ac_exeext
34235 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34236   (eval $ac_link) 2>conftest.er1
34237   ac_status=$?
34238   grep -v '^ *+' conftest.er1 >conftest.err
34239   rm -f conftest.er1
34240   cat conftest.err >&5
34241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34242   (exit $ac_status); } &&
34243          { ac_try='test -z "$ac_c_werror_flag"
34244                          || test ! -s conftest.err'
34245   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34246   (eval $ac_try) 2>&5
34247   ac_status=$?
34248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34249   (exit $ac_status); }; } &&
34250          { ac_try='test -s conftest$ac_exeext'
34251   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34252   (eval $ac_try) 2>&5
34253   ac_status=$?
34254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34255   (exit $ac_status); }; }; then
34256   ol_cv_db_db_2=yes
34257 else
34258   echo "$as_me: failed program was:" >&5
34259 sed 's/^/| /' conftest.$ac_ext >&5
34260
34261 ol_cv_db_db_2=no
34262 fi
34263 rm -f conftest.err conftest.$ac_objext \
34264       conftest$ac_exeext conftest.$ac_ext
34265
34266         LIBS="$ol_LIBS"
34267
34268 fi
34269 echo "$as_me:$LINENO: result: $ol_cv_db_db_2" >&5
34270 echo "${ECHO_T}$ol_cv_db_db_2" >&6
34271
34272         if test $ol_cv_db_db_2 = yes ; then
34273                 ol_cv_lib_db=-ldb-2
34274         fi
34275 fi
34276
34277
34278 elif test $ol_cv_bdb_major = 1 ; then
34279         if test $ol_cv_lib_db = no ; then
34280         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb1)" >&5
34281 echo $ECHO_N "checking for Berkeley DB link (-ldb1)... $ECHO_C" >&6
34282 if test "${ol_cv_db_db1+set}" = set; then
34283   echo $ECHO_N "(cached) $ECHO_C" >&6
34284 else
34285
34286         ol_DB_LIB=-ldb1
34287         ol_LIBS=$LIBS
34288         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34289
34290         cat >conftest.$ac_ext <<_ACEOF
34291 /* confdefs.h.  */
34292 _ACEOF
34293 cat confdefs.h >>conftest.$ac_ext
34294 cat >>conftest.$ac_ext <<_ACEOF
34295 /* end confdefs.h.  */
34296
34297 #ifdef HAVE_DB_185_H
34298 # include <db_185.h>
34299 #else
34300 # include <db.h>
34301 #endif
34302
34303 #ifndef DB_VERSION_MAJOR
34304 # define DB_VERSION_MAJOR 1
34305 #endif
34306
34307 #ifndef NULL
34308 #define NULL ((void*)0)
34309 #endif
34310
34311 int
34312 main ()
34313 {
34314
34315 #if DB_VERSION_MAJOR > 1
34316         {
34317                 char *version;
34318                 int major, minor, patch;
34319
34320                 version = db_version( &major, &minor, &patch );
34321
34322                 if( major != DB_VERSION_MAJOR ||
34323                         minor < DB_VERSION_MINOR )
34324                 {
34325                         printf("Berkeley DB version mismatch\n"
34326                                 "\theader: %s\n\tlibrary: %s\n",
34327                                 DB_VERSION_STRING, version);
34328                         return 1;
34329                 }
34330         }
34331 #endif
34332
34333 #if DB_VERSION_MAJOR > 2
34334         db_env_create( NULL, 0 );
34335 #elif DB_VERSION_MAJOR > 1
34336         db_appexit( NULL );
34337 #else
34338         (void) dbopen( NULL, 0, 0, 0, NULL);
34339 #endif
34340
34341   ;
34342   return 0;
34343 }
34344 _ACEOF
34345 rm -f conftest.$ac_objext conftest$ac_exeext
34346 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34347   (eval $ac_link) 2>conftest.er1
34348   ac_status=$?
34349   grep -v '^ *+' conftest.er1 >conftest.err
34350   rm -f conftest.er1
34351   cat conftest.err >&5
34352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34353   (exit $ac_status); } &&
34354          { ac_try='test -z "$ac_c_werror_flag"
34355                          || test ! -s conftest.err'
34356   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34357   (eval $ac_try) 2>&5
34358   ac_status=$?
34359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34360   (exit $ac_status); }; } &&
34361          { ac_try='test -s conftest$ac_exeext'
34362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34363   (eval $ac_try) 2>&5
34364   ac_status=$?
34365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34366   (exit $ac_status); }; }; then
34367   ol_cv_db_db1=yes
34368 else
34369   echo "$as_me: failed program was:" >&5
34370 sed 's/^/| /' conftest.$ac_ext >&5
34371
34372 ol_cv_db_db1=no
34373 fi
34374 rm -f conftest.err conftest.$ac_objext \
34375       conftest$ac_exeext conftest.$ac_ext
34376
34377         LIBS="$ol_LIBS"
34378
34379 fi
34380 echo "$as_me:$LINENO: result: $ol_cv_db_db1" >&5
34381 echo "${ECHO_T}$ol_cv_db_db1" >&6
34382
34383         if test $ol_cv_db_db1 = yes ; then
34384                 ol_cv_lib_db=-ldb1
34385         fi
34386 fi
34387
34388         if test $ol_cv_lib_db = no ; then
34389         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-1)" >&5
34390 echo $ECHO_N "checking for Berkeley DB link (-ldb-1)... $ECHO_C" >&6
34391 if test "${ol_cv_db_db_1+set}" = set; then
34392   echo $ECHO_N "(cached) $ECHO_C" >&6
34393 else
34394
34395         ol_DB_LIB=-ldb-1
34396         ol_LIBS=$LIBS
34397         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34398
34399         cat >conftest.$ac_ext <<_ACEOF
34400 /* confdefs.h.  */
34401 _ACEOF
34402 cat confdefs.h >>conftest.$ac_ext
34403 cat >>conftest.$ac_ext <<_ACEOF
34404 /* end confdefs.h.  */
34405
34406 #ifdef HAVE_DB_185_H
34407 # include <db_185.h>
34408 #else
34409 # include <db.h>
34410 #endif
34411
34412 #ifndef DB_VERSION_MAJOR
34413 # define DB_VERSION_MAJOR 1
34414 #endif
34415
34416 #ifndef NULL
34417 #define NULL ((void*)0)
34418 #endif
34419
34420 int
34421 main ()
34422 {
34423
34424 #if DB_VERSION_MAJOR > 1
34425         {
34426                 char *version;
34427                 int major, minor, patch;
34428
34429                 version = db_version( &major, &minor, &patch );
34430
34431                 if( major != DB_VERSION_MAJOR ||
34432                         minor < DB_VERSION_MINOR )
34433                 {
34434                         printf("Berkeley DB version mismatch\n"
34435                                 "\theader: %s\n\tlibrary: %s\n",
34436                                 DB_VERSION_STRING, version);
34437                         return 1;
34438                 }
34439         }
34440 #endif
34441
34442 #if DB_VERSION_MAJOR > 2
34443         db_env_create( NULL, 0 );
34444 #elif DB_VERSION_MAJOR > 1
34445         db_appexit( NULL );
34446 #else
34447         (void) dbopen( NULL, 0, 0, 0, NULL);
34448 #endif
34449
34450   ;
34451   return 0;
34452 }
34453 _ACEOF
34454 rm -f conftest.$ac_objext conftest$ac_exeext
34455 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34456   (eval $ac_link) 2>conftest.er1
34457   ac_status=$?
34458   grep -v '^ *+' conftest.er1 >conftest.err
34459   rm -f conftest.er1
34460   cat conftest.err >&5
34461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34462   (exit $ac_status); } &&
34463          { ac_try='test -z "$ac_c_werror_flag"
34464                          || test ! -s conftest.err'
34465   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34466   (eval $ac_try) 2>&5
34467   ac_status=$?
34468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34469   (exit $ac_status); }; } &&
34470          { ac_try='test -s conftest$ac_exeext'
34471   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34472   (eval $ac_try) 2>&5
34473   ac_status=$?
34474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34475   (exit $ac_status); }; }; then
34476   ol_cv_db_db_1=yes
34477 else
34478   echo "$as_me: failed program was:" >&5
34479 sed 's/^/| /' conftest.$ac_ext >&5
34480
34481 ol_cv_db_db_1=no
34482 fi
34483 rm -f conftest.err conftest.$ac_objext \
34484       conftest$ac_exeext conftest.$ac_ext
34485
34486         LIBS="$ol_LIBS"
34487
34488 fi
34489 echo "$as_me:$LINENO: result: $ol_cv_db_db_1" >&5
34490 echo "${ECHO_T}$ol_cv_db_db_1" >&6
34491
34492         if test $ol_cv_db_db_1 = yes ; then
34493                 ol_cv_lib_db=-ldb-1
34494         fi
34495 fi
34496
34497 fi
34498 if test $ol_cv_lib_db = no ; then
34499         echo "$as_me:$LINENO: checking for Berkeley DB link (default)" >&5
34500 echo $ECHO_N "checking for Berkeley DB link (default)... $ECHO_C" >&6
34501 if test "${ol_cv_db_none+set}" = set; then
34502   echo $ECHO_N "(cached) $ECHO_C" >&6
34503 else
34504
34505         ol_DB_LIB=
34506         ol_LIBS=$LIBS
34507         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
34508
34509         cat >conftest.$ac_ext <<_ACEOF
34510 /* confdefs.h.  */
34511 _ACEOF
34512 cat confdefs.h >>conftest.$ac_ext
34513 cat >>conftest.$ac_ext <<_ACEOF
34514 /* end confdefs.h.  */
34515
34516 #ifdef HAVE_DB_185_H
34517 # include <db_185.h>
34518 #else
34519 # include <db.h>
34520 #endif
34521
34522 #ifndef DB_VERSION_MAJOR
34523 # define DB_VERSION_MAJOR 1
34524 #endif
34525
34526 #ifndef NULL
34527 #define NULL ((void*)0)
34528 #endif
34529
34530 int
34531 main ()
34532 {
34533
34534 #if DB_VERSION_MAJOR > 1
34535         {
34536                 char *version;
34537                 int major, minor, patch;
34538
34539                 version = db_version( &major, &minor, &patch );
34540
34541                 if( major != DB_VERSION_MAJOR ||
34542                         minor < DB_VERSION_MINOR )
34543                 {
34544                         printf("Berkeley DB version mismatch\n"
34545                                 "\theader: %s\n\tlibrary: %s\n",
34546                                 DB_VERSION_STRING, version);
34547                         return 1;
34548                 }
34549         }
34550 #endif
34551
34552 #if DB_VERSION_MAJOR > 2
34553         db_env_create( NULL, 0 );
34554 #elif DB_VERSION_MAJOR > 1
34555         db_appexit( NULL );
34556 #else
34557         (void) dbopen( NULL, 0, 0, 0, NULL);
34558 #endif
34559
34560   ;
34561   return 0;
34562 }
34563 _ACEOF
34564 rm -f conftest.$ac_objext conftest$ac_exeext
34565 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34566   (eval $ac_link) 2>conftest.er1
34567   ac_status=$?
34568   grep -v '^ *+' conftest.er1 >conftest.err
34569   rm -f conftest.er1
34570   cat conftest.err >&5
34571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34572   (exit $ac_status); } &&
34573          { ac_try='test -z "$ac_c_werror_flag"
34574                          || test ! -s conftest.err'
34575   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34576   (eval $ac_try) 2>&5
34577   ac_status=$?
34578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34579   (exit $ac_status); }; } &&
34580          { ac_try='test -s conftest$ac_exeext'
34581   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34582   (eval $ac_try) 2>&5
34583   ac_status=$?
34584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34585   (exit $ac_status); }; }; then
34586   ol_cv_db_none=yes
34587 else
34588   echo "$as_me: failed program was:" >&5
34589 sed 's/^/| /' conftest.$ac_ext >&5
34590
34591 ol_cv_db_none=no
34592 fi
34593 rm -f conftest.err conftest.$ac_objext \
34594       conftest$ac_exeext conftest.$ac_ext
34595
34596         LIBS="$ol_LIBS"
34597
34598 fi
34599 echo "$as_me:$LINENO: result: $ol_cv_db_none" >&5
34600 echo "${ECHO_T}$ol_cv_db_none" >&6
34601
34602         if test $ol_cv_db_none = yes ; then
34603                 ol_cv_lib_db=yes
34604         fi
34605 fi
34606
34607
34608         if test "$ol_cv_lib_db" != no ; then
34609                 ol_cv_berkeley_db=yes
34610                 echo "$as_me:$LINENO: checking for Berkeley DB version match" >&5
34611 echo $ECHO_N "checking for Berkeley DB version match... $ECHO_C" >&6
34612 if test "${ol_cv_berkeley_db_version+set}" = set; then
34613   echo $ECHO_N "(cached) $ECHO_C" >&6
34614 else
34615
34616         ol_LIBS="$LIBS"
34617         LIBS="$LTHREAD_LIBS $LIBS"
34618         if test $ol_cv_lib_db != yes ; then
34619                 LIBS="$ol_cv_lib_db $LIBS"
34620         fi
34621
34622         if test "$cross_compiling" = yes; then
34623   ol_cv_berkeley_db_version=cross
34624 else
34625   cat >conftest.$ac_ext <<_ACEOF
34626 /* confdefs.h.  */
34627 _ACEOF
34628 cat confdefs.h >>conftest.$ac_ext
34629 cat >>conftest.$ac_ext <<_ACEOF
34630 /* end confdefs.h.  */
34631
34632 #ifdef HAVE_DB_185_H
34633         choke me;
34634 #else
34635 #include <db.h>
34636 #endif
34637 #ifndef DB_VERSION_MAJOR
34638 # define DB_VERSION_MAJOR 1
34639 #endif
34640 #ifndef NULL
34641 #define NULL ((void *)0)
34642 #endif
34643 main()
34644 {
34645 #if DB_VERSION_MAJOR > 1
34646         char *version;
34647         int major, minor, patch;
34648
34649         version = db_version( &major, &minor, &patch );
34650
34651         if( major != DB_VERSION_MAJOR ||
34652                 minor != DB_VERSION_MINOR ||
34653                 patch != DB_VERSION_PATCH )
34654         {
34655                 printf("Berkeley DB version mismatch\n"
34656                         "\theader: %s\n\tlibrary: %s\n",
34657                         DB_VERSION_STRING, version);
34658                 return 1;
34659         }
34660 #endif
34661
34662         return 0;
34663 }
34664 _ACEOF
34665 rm -f conftest$ac_exeext
34666 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34667   (eval $ac_link) 2>&5
34668   ac_status=$?
34669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34670   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
34671   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34672   (eval $ac_try) 2>&5
34673   ac_status=$?
34674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34675   (exit $ac_status); }; }; then
34676   ol_cv_berkeley_db_version=yes
34677 else
34678   echo "$as_me: program exited with status $ac_status" >&5
34679 echo "$as_me: failed program was:" >&5
34680 sed 's/^/| /' conftest.$ac_ext >&5
34681
34682 ( exit $ac_status )
34683 ol_cv_berkeley_db_version=no
34684 fi
34685 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
34686 fi
34687
34688         LIBS="$ol_LIBS"
34689
34690 fi
34691 echo "$as_me:$LINENO: result: $ol_cv_berkeley_db_version" >&5
34692 echo "${ECHO_T}$ol_cv_berkeley_db_version" >&6
34693
34694         if test $ol_cv_berkeley_db_version = no ; then
34695                 { { echo "$as_me:$LINENO: error: Berkeley DB version mismatch" >&5
34696 echo "$as_me: error: Berkeley DB version mismatch" >&2;}
34697    { (exit 1); exit 1; }; }
34698         fi
34699
34700                 echo "$as_me:$LINENO: checking for Berkeley DB thread support" >&5
34701 echo $ECHO_N "checking for Berkeley DB thread support... $ECHO_C" >&6
34702 if test "${ol_cv_berkeley_db_thread+set}" = set; then
34703   echo $ECHO_N "(cached) $ECHO_C" >&6
34704 else
34705
34706         ol_LIBS="$LIBS"
34707         LIBS="$LTHREAD_LIBS $LIBS"
34708         if test $ol_cv_lib_db != yes ; then
34709                 LIBS="$ol_cv_lib_db $LIBS"
34710         fi
34711
34712         if test "$cross_compiling" = yes; then
34713   ol_cv_berkeley_db_thread=cross
34714 else
34715   cat >conftest.$ac_ext <<_ACEOF
34716 /* confdefs.h.  */
34717 _ACEOF
34718 cat confdefs.h >>conftest.$ac_ext
34719 cat >>conftest.$ac_ext <<_ACEOF
34720 /* end confdefs.h.  */
34721
34722 #ifdef HAVE_DB_185_H
34723         choke me;
34724 #else
34725 #include <db.h>
34726 #endif
34727 #ifndef NULL
34728 #define NULL ((void *)0)
34729 #endif
34730 main()
34731 {
34732         int rc;
34733         u_int32_t flags = DB_CREATE |
34734 #ifdef DB_PRIVATE
34735                 DB_PRIVATE |
34736 #endif
34737                 DB_THREAD;
34738
34739 #if DB_VERSION_MAJOR > 2
34740         DB_ENV *env = NULL;
34741
34742         rc = db_env_create( &env, 0 );
34743
34744         flags |= DB_INIT_MPOOL;
34745 #ifdef DB_MPOOL_PRIVATE
34746         flags |= DB_MPOOL_PRIVATE;
34747 #endif
34748
34749         if( rc ) {
34750                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
34751                 return rc;
34752         }
34753
34754 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
34755         rc = env->open( env, NULL, flags, 0 );
34756 #else
34757         rc = env->open( env, NULL, NULL, flags, 0 );
34758 #endif
34759
34760         if ( rc == 0 ) {
34761                 rc = env->close( env, 0 );
34762         }
34763
34764         if( rc ) {
34765                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
34766                 return rc;
34767         }
34768
34769 #else
34770         DB_ENV env;
34771         memset( &env, '\0', sizeof(env) );
34772
34773         rc = db_appinit( NULL, NULL, &env, flags );
34774
34775         if( rc == 0 ) {
34776                 db_appexit( &env );
34777         }
34778
34779         unlink("__db_mpool.share");
34780         unlink("__db_lock.share");
34781 #endif
34782
34783         return rc;
34784 }
34785 _ACEOF
34786 rm -f conftest$ac_exeext
34787 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34788   (eval $ac_link) 2>&5
34789   ac_status=$?
34790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34791   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
34792   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34793   (eval $ac_try) 2>&5
34794   ac_status=$?
34795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34796   (exit $ac_status); }; }; then
34797   ol_cv_berkeley_db_thread=yes
34798 else
34799   echo "$as_me: program exited with status $ac_status" >&5
34800 echo "$as_me: failed program was:" >&5
34801 sed 's/^/| /' conftest.$ac_ext >&5
34802
34803 ( exit $ac_status )
34804 ol_cv_berkeley_db_thread=no
34805 fi
34806 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
34807 fi
34808
34809         LIBS="$ol_LIBS"
34810
34811 fi
34812 echo "$as_me:$LINENO: result: $ol_cv_berkeley_db_thread" >&5
34813 echo "${ECHO_T}$ol_cv_berkeley_db_thread" >&6
34814
34815         if test $ol_cv_berkeley_db_thread != no ; then
34816
34817 cat >>confdefs.h <<\_ACEOF
34818 #define HAVE_BERKELEY_DB_THREAD 1
34819 _ACEOF
34820
34821         fi
34822
34823         fi
34824 fi
34825
34826         fi
34827
34828         if test $ol_cv_berkeley_db != no ; then
34829
34830 cat >>confdefs.h <<\_ACEOF
34831 #define HAVE_BERKELEY_DB 1
34832 _ACEOF
34833
34834
34835                 ol_link_ldbm=berkeley
34836                 ol_enable_ldbm_api=berkeley
34837
34838                 if test $ol_enable_ldbm_type = hash ; then
34839
34840 cat >>confdefs.h <<\_ACEOF
34841 #define LDBM_USE_DBHASH 1
34842 _ACEOF
34843
34844                 else
34845
34846 cat >>confdefs.h <<\_ACEOF
34847 #define LDBM_USE_DBBTREE 1
34848 _ACEOF
34849
34850                 fi
34851
34852                                                 if test $ol_cv_lib_db != yes ; then
34853                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
34854                 fi
34855         fi
34856         ;;
34857 esac
34858
34859 if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
34860         if test $ol_link_ldbm != berkeley ; then
34861                 { { echo "$as_me:$LINENO: error: BDB/HDB: BerkeleyDB not available" >&5
34862 echo "$as_me: error: BDB/HDB: BerkeleyDB not available" >&2;}
34863    { (exit 1); exit 1; }; }
34864         else
34865                 echo "$as_me:$LINENO: checking Berkeley DB version for BDB/HDB backends" >&5
34866 echo $ECHO_N "checking Berkeley DB version for BDB/HDB backends... $ECHO_C" >&6
34867 if test "${ol_cv_bdb_compat+set}" = set; then
34868   echo $ECHO_N "(cached) $ECHO_C" >&6
34869 else
34870
34871         cat >conftest.$ac_ext <<_ACEOF
34872 /* confdefs.h.  */
34873 _ACEOF
34874 cat confdefs.h >>conftest.$ac_ext
34875 cat >>conftest.$ac_ext <<_ACEOF
34876 /* end confdefs.h.  */
34877
34878 #include <db.h>
34879
34880  /* this check could be improved */
34881 #ifndef DB_VERSION_MAJOR
34882 #       define DB_VERSION_MAJOR 1
34883 #endif
34884 #ifndef DB_VERSION_MINOR
34885 #       define DB_VERSION_MINOR 0
34886 #endif
34887
34888 /* require 4.2 or later */
34889 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
34890         __db_version_compat
34891 #endif
34892
34893 _ACEOF
34894 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34895   $EGREP "__db_version_compat" >/dev/null 2>&1; then
34896   ol_cv_bdb_compat=yes
34897 else
34898   ol_cv_bdb_compat=no
34899 fi
34900 rm -f conftest*
34901
34902 fi
34903 echo "$as_me:$LINENO: result: $ol_cv_bdb_compat" >&5
34904 echo "${ECHO_T}$ol_cv_bdb_compat" >&6
34905
34906
34907                 if test $ol_cv_bdb_compat != yes ; then
34908                         { { echo "$as_me:$LINENO: error: BDB/HDB: BerkeleyDB version incompatible" >&5
34909 echo "$as_me: error: BDB/HDB: BerkeleyDB version incompatible" >&2;}
34910    { (exit 1); exit 1; }; }
34911                 fi
34912         fi
34913 fi
34914
34915 if test $ol_link_ldbm = no && test $ol_enable_ldbm_type = btree ; then
34916         { echo "$as_me:$LINENO: WARNING: Could not find LDBM with BTREE support" >&5
34917 echo "$as_me: WARNING: Could not find LDBM with BTREE support" >&2;}
34918         ol_enable_ldbm_api=none
34919 fi
34920
34921 if test $ol_enable_ldbm_api = auto || test $ol_enable_ldbm_api = mdbm ; then
34922         echo "$as_me:$LINENO: checking for MDBM library" >&5
34923 echo $ECHO_N "checking for MDBM library... $ECHO_C" >&6
34924 if test "${ol_cv_lib_mdbm+set}" = set; then
34925   echo $ECHO_N "(cached) $ECHO_C" >&6
34926 else
34927         ol_LIBS="$LIBS"
34928         echo "$as_me:$LINENO: checking for mdbm_set_chain" >&5
34929 echo $ECHO_N "checking for mdbm_set_chain... $ECHO_C" >&6
34930 if test "${ac_cv_func_mdbm_set_chain+set}" = set; then
34931   echo $ECHO_N "(cached) $ECHO_C" >&6
34932 else
34933   cat >conftest.$ac_ext <<_ACEOF
34934 /* confdefs.h.  */
34935 _ACEOF
34936 cat confdefs.h >>conftest.$ac_ext
34937 cat >>conftest.$ac_ext <<_ACEOF
34938 /* end confdefs.h.  */
34939 /* Define mdbm_set_chain to an innocuous variant, in case <limits.h> declares mdbm_set_chain.
34940    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
34941 #define mdbm_set_chain innocuous_mdbm_set_chain
34942
34943 /* System header to define __stub macros and hopefully few prototypes,
34944     which can conflict with char mdbm_set_chain (); below.
34945     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34946     <limits.h> exists even on freestanding compilers.  */
34947
34948 #ifdef __STDC__
34949 # include <limits.h>
34950 #else
34951 # include <assert.h>
34952 #endif
34953
34954 #undef mdbm_set_chain
34955
34956 /* Override any gcc2 internal prototype to avoid an error.  */
34957 #ifdef __cplusplus
34958 extern "C"
34959 {
34960 #endif
34961 /* We use char because int might match the return type of a gcc2
34962    builtin and then its argument prototype would still apply.  */
34963 char mdbm_set_chain ();
34964 /* The GNU C library defines this for functions which it implements
34965     to always fail with ENOSYS.  Some functions are actually named
34966     something starting with __ and the normal name is an alias.  */
34967 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
34968 choke me
34969 #else
34970 char (*f) () = mdbm_set_chain;
34971 #endif
34972 #ifdef __cplusplus
34973 }
34974 #endif
34975
34976 int
34977 main ()
34978 {
34979 return f != mdbm_set_chain;
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   ac_cv_func_mdbm_set_chain=yes
35007 else
35008   echo "$as_me: failed program was:" >&5
35009 sed 's/^/| /' conftest.$ac_ext >&5
35010
35011 ac_cv_func_mdbm_set_chain=no
35012 fi
35013 rm -f conftest.err conftest.$ac_objext \
35014       conftest$ac_exeext conftest.$ac_ext
35015 fi
35016 echo "$as_me:$LINENO: result: $ac_cv_func_mdbm_set_chain" >&5
35017 echo "${ECHO_T}$ac_cv_func_mdbm_set_chain" >&6
35018 if test $ac_cv_func_mdbm_set_chain = yes; then
35019   ol_cv_lib_mdbm=yes
35020 else
35021
35022                 echo "$as_me:$LINENO: checking for mdbm_set_chain in -lmdbm" >&5
35023 echo $ECHO_N "checking for mdbm_set_chain in -lmdbm... $ECHO_C" >&6
35024 if test "${ac_cv_lib_mdbm_mdbm_set_chain+set}" = set; then
35025   echo $ECHO_N "(cached) $ECHO_C" >&6
35026 else
35027   ac_check_lib_save_LIBS=$LIBS
35028 LIBS="-lmdbm  $LIBS"
35029 cat >conftest.$ac_ext <<_ACEOF
35030 /* confdefs.h.  */
35031 _ACEOF
35032 cat confdefs.h >>conftest.$ac_ext
35033 cat >>conftest.$ac_ext <<_ACEOF
35034 /* end confdefs.h.  */
35035
35036 /* Override any gcc2 internal prototype to avoid an error.  */
35037 #ifdef __cplusplus
35038 extern "C"
35039 #endif
35040 /* We use char because int might match the return type of a gcc2
35041    builtin and then its argument prototype would still apply.  */
35042 char mdbm_set_chain ();
35043 int
35044 main ()
35045 {
35046 mdbm_set_chain ();
35047   ;
35048   return 0;
35049 }
35050 _ACEOF
35051 rm -f conftest.$ac_objext conftest$ac_exeext
35052 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35053   (eval $ac_link) 2>conftest.er1
35054   ac_status=$?
35055   grep -v '^ *+' conftest.er1 >conftest.err
35056   rm -f conftest.er1
35057   cat conftest.err >&5
35058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35059   (exit $ac_status); } &&
35060          { ac_try='test -z "$ac_c_werror_flag"
35061                          || test ! -s conftest.err'
35062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35063   (eval $ac_try) 2>&5
35064   ac_status=$?
35065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35066   (exit $ac_status); }; } &&
35067          { ac_try='test -s conftest$ac_exeext'
35068   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35069   (eval $ac_try) 2>&5
35070   ac_status=$?
35071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35072   (exit $ac_status); }; }; then
35073   ac_cv_lib_mdbm_mdbm_set_chain=yes
35074 else
35075   echo "$as_me: failed program was:" >&5
35076 sed 's/^/| /' conftest.$ac_ext >&5
35077
35078 ac_cv_lib_mdbm_mdbm_set_chain=no
35079 fi
35080 rm -f conftest.err conftest.$ac_objext \
35081       conftest$ac_exeext conftest.$ac_ext
35082 LIBS=$ac_check_lib_save_LIBS
35083 fi
35084 echo "$as_me:$LINENO: result: $ac_cv_lib_mdbm_mdbm_set_chain" >&5
35085 echo "${ECHO_T}$ac_cv_lib_mdbm_mdbm_set_chain" >&6
35086 if test $ac_cv_lib_mdbm_mdbm_set_chain = yes; then
35087   ol_cv_lib_mdbm=-lmdbm
35088 else
35089   ol_cv_lib_mdbm=no
35090 fi
35091
35092
35093 fi
35094
35095         LIBS="$ol_LIBS"
35096
35097 fi
35098 echo "$as_me:$LINENO: result: $ol_cv_lib_mdbm" >&5
35099 echo "${ECHO_T}$ol_cv_lib_mdbm" >&6
35100
35101
35102
35103 for ac_header in mdbm.h
35104 do
35105 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
35106 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35107   echo "$as_me:$LINENO: checking for $ac_header" >&5
35108 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35109 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35110   echo $ECHO_N "(cached) $ECHO_C" >&6
35111 fi
35112 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35113 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35114 else
35115   # Is the header compilable?
35116 echo "$as_me:$LINENO: checking $ac_header usability" >&5
35117 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
35118 cat >conftest.$ac_ext <<_ACEOF
35119 /* confdefs.h.  */
35120 _ACEOF
35121 cat confdefs.h >>conftest.$ac_ext
35122 cat >>conftest.$ac_ext <<_ACEOF
35123 /* end confdefs.h.  */
35124 $ac_includes_default
35125 #include <$ac_header>
35126 _ACEOF
35127 rm -f conftest.$ac_objext
35128 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35129   (eval $ac_compile) 2>conftest.er1
35130   ac_status=$?
35131   grep -v '^ *+' conftest.er1 >conftest.err
35132   rm -f conftest.er1
35133   cat conftest.err >&5
35134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35135   (exit $ac_status); } &&
35136          { ac_try='test -z "$ac_c_werror_flag"
35137                          || test ! -s conftest.err'
35138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35139   (eval $ac_try) 2>&5
35140   ac_status=$?
35141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35142   (exit $ac_status); }; } &&
35143          { ac_try='test -s conftest.$ac_objext'
35144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35145   (eval $ac_try) 2>&5
35146   ac_status=$?
35147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35148   (exit $ac_status); }; }; then
35149   ac_header_compiler=yes
35150 else
35151   echo "$as_me: failed program was:" >&5
35152 sed 's/^/| /' conftest.$ac_ext >&5
35153
35154 ac_header_compiler=no
35155 fi
35156 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35157 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
35158 echo "${ECHO_T}$ac_header_compiler" >&6
35159
35160 # Is the header present?
35161 echo "$as_me:$LINENO: checking $ac_header presence" >&5
35162 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
35163 cat >conftest.$ac_ext <<_ACEOF
35164 /* confdefs.h.  */
35165 _ACEOF
35166 cat confdefs.h >>conftest.$ac_ext
35167 cat >>conftest.$ac_ext <<_ACEOF
35168 /* end confdefs.h.  */
35169 #include <$ac_header>
35170 _ACEOF
35171 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
35172   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
35173   ac_status=$?
35174   grep -v '^ *+' conftest.er1 >conftest.err
35175   rm -f conftest.er1
35176   cat conftest.err >&5
35177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35178   (exit $ac_status); } >/dev/null; then
35179   if test -s conftest.err; then
35180     ac_cpp_err=$ac_c_preproc_warn_flag
35181     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
35182   else
35183     ac_cpp_err=
35184   fi
35185 else
35186   ac_cpp_err=yes
35187 fi
35188 if test -z "$ac_cpp_err"; then
35189   ac_header_preproc=yes
35190 else
35191   echo "$as_me: failed program was:" >&5
35192 sed 's/^/| /' conftest.$ac_ext >&5
35193
35194   ac_header_preproc=no
35195 fi
35196 rm -f conftest.err conftest.$ac_ext
35197 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
35198 echo "${ECHO_T}$ac_header_preproc" >&6
35199
35200 # So?  What about this header?
35201 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
35202   yes:no: )
35203     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
35204 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35205     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
35206 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
35207     ac_header_preproc=yes
35208     ;;
35209   no:yes:* )
35210     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
35211 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35212     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
35213 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
35214     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
35215 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
35216     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
35217 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
35218     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
35219 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35220     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
35221 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
35222     (
35223       cat <<\_ASBOX
35224 ## --------------------------------------------- ##
35225 ## Report this to <http://www.openldap.org/its/> ##
35226 ## --------------------------------------------- ##
35227 _ASBOX
35228     ) |
35229       sed "s/^/$as_me: WARNING:     /" >&2
35230     ;;
35231 esac
35232 echo "$as_me:$LINENO: checking for $ac_header" >&5
35233 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35234 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35235   echo $ECHO_N "(cached) $ECHO_C" >&6
35236 else
35237   eval "$as_ac_Header=\$ac_header_preproc"
35238 fi
35239 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35240 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35241
35242 fi
35243 if test `eval echo '${'$as_ac_Header'}'` = yes; then
35244   cat >>confdefs.h <<_ACEOF
35245 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
35246 _ACEOF
35247
35248 fi
35249
35250 done
35251
35252  echo "$as_me:$LINENO: checking for db" >&5
35253 echo $ECHO_N "checking for db... $ECHO_C" >&6
35254 if test "${ol_cv_mdbm+set}" = set; then
35255   echo $ECHO_N "(cached) $ECHO_C" >&6
35256 else
35257
35258         if test $ol_cv_lib_mdbm = no || test $ac_cv_header_mdbm_h = no ; then
35259                 ol_cv_mdbm=no
35260         else
35261                 ol_cv_mdbm=yes
35262         fi
35263
35264 fi
35265 echo "$as_me:$LINENO: result: $ol_cv_mdbm" >&5
35266 echo "${ECHO_T}$ol_cv_mdbm" >&6
35267  if test $ol_cv_mdbm = yes ; then
35268
35269 cat >>confdefs.h <<\_ACEOF
35270 #define HAVE_MDBM 1
35271 _ACEOF
35272
35273  fi
35274
35275
35276         if test $ol_cv_mdbm = yes ; then
35277                 ol_link_ldbm=mdbm
35278                 ol_enable_ldbm_api=mdbm
35279                 if test $ol_cv_lib_mdbm != yes ; then
35280                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
35281                 fi
35282         fi
35283 fi
35284
35285 if test $ol_enable_ldbm_api = auto || test $ol_enable_ldbm_api = gdbm ; then
35286         echo "$as_me:$LINENO: checking for GDBM library" >&5
35287 echo $ECHO_N "checking for GDBM library... $ECHO_C" >&6
35288 if test "${ol_cv_lib_gdbm+set}" = set; then
35289   echo $ECHO_N "(cached) $ECHO_C" >&6
35290 else
35291         ol_LIBS="$LIBS"
35292         echo "$as_me:$LINENO: checking for gdbm_open" >&5
35293 echo $ECHO_N "checking for gdbm_open... $ECHO_C" >&6
35294 if test "${ac_cv_func_gdbm_open+set}" = set; then
35295   echo $ECHO_N "(cached) $ECHO_C" >&6
35296 else
35297   cat >conftest.$ac_ext <<_ACEOF
35298 /* confdefs.h.  */
35299 _ACEOF
35300 cat confdefs.h >>conftest.$ac_ext
35301 cat >>conftest.$ac_ext <<_ACEOF
35302 /* end confdefs.h.  */
35303 /* Define gdbm_open to an innocuous variant, in case <limits.h> declares gdbm_open.
35304    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
35305 #define gdbm_open innocuous_gdbm_open
35306
35307 /* System header to define __stub macros and hopefully few prototypes,
35308     which can conflict with char gdbm_open (); below.
35309     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35310     <limits.h> exists even on freestanding compilers.  */
35311
35312 #ifdef __STDC__
35313 # include <limits.h>
35314 #else
35315 # include <assert.h>
35316 #endif
35317
35318 #undef gdbm_open
35319
35320 /* Override any gcc2 internal prototype to avoid an error.  */
35321 #ifdef __cplusplus
35322 extern "C"
35323 {
35324 #endif
35325 /* We use char because int might match the return type of a gcc2
35326    builtin and then its argument prototype would still apply.  */
35327 char gdbm_open ();
35328 /* The GNU C library defines this for functions which it implements
35329     to always fail with ENOSYS.  Some functions are actually named
35330     something starting with __ and the normal name is an alias.  */
35331 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
35332 choke me
35333 #else
35334 char (*f) () = gdbm_open;
35335 #endif
35336 #ifdef __cplusplus
35337 }
35338 #endif
35339
35340 int
35341 main ()
35342 {
35343 return f != gdbm_open;
35344   ;
35345   return 0;
35346 }
35347 _ACEOF
35348 rm -f conftest.$ac_objext conftest$ac_exeext
35349 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35350   (eval $ac_link) 2>conftest.er1
35351   ac_status=$?
35352   grep -v '^ *+' conftest.er1 >conftest.err
35353   rm -f conftest.er1
35354   cat conftest.err >&5
35355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35356   (exit $ac_status); } &&
35357          { ac_try='test -z "$ac_c_werror_flag"
35358                          || test ! -s conftest.err'
35359   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35360   (eval $ac_try) 2>&5
35361   ac_status=$?
35362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35363   (exit $ac_status); }; } &&
35364          { ac_try='test -s conftest$ac_exeext'
35365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35366   (eval $ac_try) 2>&5
35367   ac_status=$?
35368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35369   (exit $ac_status); }; }; then
35370   ac_cv_func_gdbm_open=yes
35371 else
35372   echo "$as_me: failed program was:" >&5
35373 sed 's/^/| /' conftest.$ac_ext >&5
35374
35375 ac_cv_func_gdbm_open=no
35376 fi
35377 rm -f conftest.err conftest.$ac_objext \
35378       conftest$ac_exeext conftest.$ac_ext
35379 fi
35380 echo "$as_me:$LINENO: result: $ac_cv_func_gdbm_open" >&5
35381 echo "${ECHO_T}$ac_cv_func_gdbm_open" >&6
35382 if test $ac_cv_func_gdbm_open = yes; then
35383   ol_cv_lib_gdbm=yes
35384 else
35385
35386                 echo "$as_me:$LINENO: checking for gdbm_open in -lgdbm" >&5
35387 echo $ECHO_N "checking for gdbm_open in -lgdbm... $ECHO_C" >&6
35388 if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then
35389   echo $ECHO_N "(cached) $ECHO_C" >&6
35390 else
35391   ac_check_lib_save_LIBS=$LIBS
35392 LIBS="-lgdbm  $LIBS"
35393 cat >conftest.$ac_ext <<_ACEOF
35394 /* confdefs.h.  */
35395 _ACEOF
35396 cat confdefs.h >>conftest.$ac_ext
35397 cat >>conftest.$ac_ext <<_ACEOF
35398 /* end confdefs.h.  */
35399
35400 /* Override any gcc2 internal prototype to avoid an error.  */
35401 #ifdef __cplusplus
35402 extern "C"
35403 #endif
35404 /* We use char because int might match the return type of a gcc2
35405    builtin and then its argument prototype would still apply.  */
35406 char gdbm_open ();
35407 int
35408 main ()
35409 {
35410 gdbm_open ();
35411   ;
35412   return 0;
35413 }
35414 _ACEOF
35415 rm -f conftest.$ac_objext conftest$ac_exeext
35416 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35417   (eval $ac_link) 2>conftest.er1
35418   ac_status=$?
35419   grep -v '^ *+' conftest.er1 >conftest.err
35420   rm -f conftest.er1
35421   cat conftest.err >&5
35422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35423   (exit $ac_status); } &&
35424          { ac_try='test -z "$ac_c_werror_flag"
35425                          || test ! -s conftest.err'
35426   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35427   (eval $ac_try) 2>&5
35428   ac_status=$?
35429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35430   (exit $ac_status); }; } &&
35431          { ac_try='test -s conftest$ac_exeext'
35432   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35433   (eval $ac_try) 2>&5
35434   ac_status=$?
35435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35436   (exit $ac_status); }; }; then
35437   ac_cv_lib_gdbm_gdbm_open=yes
35438 else
35439   echo "$as_me: failed program was:" >&5
35440 sed 's/^/| /' conftest.$ac_ext >&5
35441
35442 ac_cv_lib_gdbm_gdbm_open=no
35443 fi
35444 rm -f conftest.err conftest.$ac_objext \
35445       conftest$ac_exeext conftest.$ac_ext
35446 LIBS=$ac_check_lib_save_LIBS
35447 fi
35448 echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_gdbm_open" >&5
35449 echo "${ECHO_T}$ac_cv_lib_gdbm_gdbm_open" >&6
35450 if test $ac_cv_lib_gdbm_gdbm_open = yes; then
35451   ol_cv_lib_gdbm=-lgdbm
35452 else
35453   ol_cv_lib_gdbm=no
35454 fi
35455
35456
35457 fi
35458
35459         LIBS="$ol_LIBS"
35460
35461 fi
35462 echo "$as_me:$LINENO: result: $ol_cv_lib_gdbm" >&5
35463 echo "${ECHO_T}$ol_cv_lib_gdbm" >&6
35464
35465
35466
35467 for ac_header in gdbm.h
35468 do
35469 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
35470 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35471   echo "$as_me:$LINENO: checking for $ac_header" >&5
35472 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35473 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35474   echo $ECHO_N "(cached) $ECHO_C" >&6
35475 fi
35476 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35477 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35478 else
35479   # Is the header compilable?
35480 echo "$as_me:$LINENO: checking $ac_header usability" >&5
35481 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
35482 cat >conftest.$ac_ext <<_ACEOF
35483 /* confdefs.h.  */
35484 _ACEOF
35485 cat confdefs.h >>conftest.$ac_ext
35486 cat >>conftest.$ac_ext <<_ACEOF
35487 /* end confdefs.h.  */
35488 $ac_includes_default
35489 #include <$ac_header>
35490 _ACEOF
35491 rm -f conftest.$ac_objext
35492 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35493   (eval $ac_compile) 2>conftest.er1
35494   ac_status=$?
35495   grep -v '^ *+' conftest.er1 >conftest.err
35496   rm -f conftest.er1
35497   cat conftest.err >&5
35498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35499   (exit $ac_status); } &&
35500          { ac_try='test -z "$ac_c_werror_flag"
35501                          || test ! -s conftest.err'
35502   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35503   (eval $ac_try) 2>&5
35504   ac_status=$?
35505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35506   (exit $ac_status); }; } &&
35507          { ac_try='test -s conftest.$ac_objext'
35508   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35509   (eval $ac_try) 2>&5
35510   ac_status=$?
35511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35512   (exit $ac_status); }; }; then
35513   ac_header_compiler=yes
35514 else
35515   echo "$as_me: failed program was:" >&5
35516 sed 's/^/| /' conftest.$ac_ext >&5
35517
35518 ac_header_compiler=no
35519 fi
35520 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35521 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
35522 echo "${ECHO_T}$ac_header_compiler" >&6
35523
35524 # Is the header present?
35525 echo "$as_me:$LINENO: checking $ac_header presence" >&5
35526 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
35527 cat >conftest.$ac_ext <<_ACEOF
35528 /* confdefs.h.  */
35529 _ACEOF
35530 cat confdefs.h >>conftest.$ac_ext
35531 cat >>conftest.$ac_ext <<_ACEOF
35532 /* end confdefs.h.  */
35533 #include <$ac_header>
35534 _ACEOF
35535 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
35536   (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
35543   if test -s conftest.err; then
35544     ac_cpp_err=$ac_c_preproc_warn_flag
35545     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
35546   else
35547     ac_cpp_err=
35548   fi
35549 else
35550   ac_cpp_err=yes
35551 fi
35552 if test -z "$ac_cpp_err"; then
35553   ac_header_preproc=yes
35554 else
35555   echo "$as_me: failed program was:" >&5
35556 sed 's/^/| /' conftest.$ac_ext >&5
35557
35558   ac_header_preproc=no
35559 fi
35560 rm -f conftest.err conftest.$ac_ext
35561 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
35562 echo "${ECHO_T}$ac_header_preproc" >&6
35563
35564 # So?  What about this header?
35565 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
35566   yes:no: )
35567     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
35568 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35569     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
35570 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
35571     ac_header_preproc=yes
35572     ;;
35573   no:yes:* )
35574     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
35575 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35576     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
35577 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
35578     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
35579 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
35580     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
35581 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
35582     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
35583 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35584     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
35585 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
35586     (
35587       cat <<\_ASBOX
35588 ## --------------------------------------------- ##
35589 ## Report this to <http://www.openldap.org/its/> ##
35590 ## --------------------------------------------- ##
35591 _ASBOX
35592     ) |
35593       sed "s/^/$as_me: WARNING:     /" >&2
35594     ;;
35595 esac
35596 echo "$as_me:$LINENO: checking for $ac_header" >&5
35597 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35598 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35599   echo $ECHO_N "(cached) $ECHO_C" >&6
35600 else
35601   eval "$as_ac_Header=\$ac_header_preproc"
35602 fi
35603 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35604 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35605
35606 fi
35607 if test `eval echo '${'$as_ac_Header'}'` = yes; then
35608   cat >>confdefs.h <<_ACEOF
35609 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
35610 _ACEOF
35611
35612 fi
35613
35614 done
35615
35616  echo "$as_me:$LINENO: checking for db" >&5
35617 echo $ECHO_N "checking for db... $ECHO_C" >&6
35618 if test "${ol_cv_gdbm+set}" = set; then
35619   echo $ECHO_N "(cached) $ECHO_C" >&6
35620 else
35621
35622         if test $ol_cv_lib_gdbm = no || test $ac_cv_header_gdbm_h = no ; then
35623                 ol_cv_gdbm=no
35624         else
35625                 ol_cv_gdbm=yes
35626         fi
35627
35628 fi
35629 echo "$as_me:$LINENO: result: $ol_cv_gdbm" >&5
35630 echo "${ECHO_T}$ol_cv_gdbm" >&6
35631  if test $ol_cv_gdbm = yes ; then
35632
35633 cat >>confdefs.h <<\_ACEOF
35634 #define HAVE_GDBM 1
35635 _ACEOF
35636
35637  fi
35638
35639
35640         if test $ol_cv_gdbm = yes ; then
35641                 ol_link_ldbm=gdbm
35642                 ol_enable_ldbm_api=gdbm
35643
35644                 if test $ol_cv_lib_gdbm != yes ; then
35645                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
35646                 fi
35647         fi
35648 fi
35649
35650 if test $ol_enable_ldbm_api = ndbm ; then
35651         echo "$as_me:$LINENO: checking for NDBM library" >&5
35652 echo $ECHO_N "checking for NDBM library... $ECHO_C" >&6
35653 if test "${ol_cv_lib_ndbm+set}" = set; then
35654   echo $ECHO_N "(cached) $ECHO_C" >&6
35655 else
35656         ol_LIBS="$LIBS"
35657         echo "$as_me:$LINENO: checking for dbm_open" >&5
35658 echo $ECHO_N "checking for dbm_open... $ECHO_C" >&6
35659 if test "${ac_cv_func_dbm_open+set}" = set; then
35660   echo $ECHO_N "(cached) $ECHO_C" >&6
35661 else
35662   cat >conftest.$ac_ext <<_ACEOF
35663 /* confdefs.h.  */
35664 _ACEOF
35665 cat confdefs.h >>conftest.$ac_ext
35666 cat >>conftest.$ac_ext <<_ACEOF
35667 /* end confdefs.h.  */
35668 /* Define dbm_open to an innocuous variant, in case <limits.h> declares dbm_open.
35669    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
35670 #define dbm_open innocuous_dbm_open
35671
35672 /* System header to define __stub macros and hopefully few prototypes,
35673     which can conflict with char dbm_open (); below.
35674     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35675     <limits.h> exists even on freestanding compilers.  */
35676
35677 #ifdef __STDC__
35678 # include <limits.h>
35679 #else
35680 # include <assert.h>
35681 #endif
35682
35683 #undef dbm_open
35684
35685 /* Override any gcc2 internal prototype to avoid an error.  */
35686 #ifdef __cplusplus
35687 extern "C"
35688 {
35689 #endif
35690 /* We use char because int might match the return type of a gcc2
35691    builtin and then its argument prototype would still apply.  */
35692 char dbm_open ();
35693 /* The GNU C library defines this for functions which it implements
35694     to always fail with ENOSYS.  Some functions are actually named
35695     something starting with __ and the normal name is an alias.  */
35696 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
35697 choke me
35698 #else
35699 char (*f) () = dbm_open;
35700 #endif
35701 #ifdef __cplusplus
35702 }
35703 #endif
35704
35705 int
35706 main ()
35707 {
35708 return f != dbm_open;
35709   ;
35710   return 0;
35711 }
35712 _ACEOF
35713 rm -f conftest.$ac_objext conftest$ac_exeext
35714 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35715   (eval $ac_link) 2>conftest.er1
35716   ac_status=$?
35717   grep -v '^ *+' conftest.er1 >conftest.err
35718   rm -f conftest.er1
35719   cat conftest.err >&5
35720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35721   (exit $ac_status); } &&
35722          { ac_try='test -z "$ac_c_werror_flag"
35723                          || test ! -s conftest.err'
35724   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35725   (eval $ac_try) 2>&5
35726   ac_status=$?
35727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35728   (exit $ac_status); }; } &&
35729          { ac_try='test -s conftest$ac_exeext'
35730   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35731   (eval $ac_try) 2>&5
35732   ac_status=$?
35733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35734   (exit $ac_status); }; }; then
35735   ac_cv_func_dbm_open=yes
35736 else
35737   echo "$as_me: failed program was:" >&5
35738 sed 's/^/| /' conftest.$ac_ext >&5
35739
35740 ac_cv_func_dbm_open=no
35741 fi
35742 rm -f conftest.err conftest.$ac_objext \
35743       conftest$ac_exeext conftest.$ac_ext
35744 fi
35745 echo "$as_me:$LINENO: result: $ac_cv_func_dbm_open" >&5
35746 echo "${ECHO_T}$ac_cv_func_dbm_open" >&6
35747 if test $ac_cv_func_dbm_open = yes; then
35748   ol_cv_lib_ndbm=yes
35749 else
35750
35751                 echo "$as_me:$LINENO: checking for dbm_open in -lndbm" >&5
35752 echo $ECHO_N "checking for dbm_open in -lndbm... $ECHO_C" >&6
35753 if test "${ac_cv_lib_ndbm_dbm_open+set}" = set; then
35754   echo $ECHO_N "(cached) $ECHO_C" >&6
35755 else
35756   ac_check_lib_save_LIBS=$LIBS
35757 LIBS="-lndbm  $LIBS"
35758 cat >conftest.$ac_ext <<_ACEOF
35759 /* confdefs.h.  */
35760 _ACEOF
35761 cat confdefs.h >>conftest.$ac_ext
35762 cat >>conftest.$ac_ext <<_ACEOF
35763 /* end confdefs.h.  */
35764
35765 /* Override any gcc2 internal prototype to avoid an error.  */
35766 #ifdef __cplusplus
35767 extern "C"
35768 #endif
35769 /* We use char because int might match the return type of a gcc2
35770    builtin and then its argument prototype would still apply.  */
35771 char dbm_open ();
35772 int
35773 main ()
35774 {
35775 dbm_open ();
35776   ;
35777   return 0;
35778 }
35779 _ACEOF
35780 rm -f conftest.$ac_objext conftest$ac_exeext
35781 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35782   (eval $ac_link) 2>conftest.er1
35783   ac_status=$?
35784   grep -v '^ *+' conftest.er1 >conftest.err
35785   rm -f conftest.er1
35786   cat conftest.err >&5
35787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35788   (exit $ac_status); } &&
35789          { ac_try='test -z "$ac_c_werror_flag"
35790                          || test ! -s conftest.err'
35791   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35792   (eval $ac_try) 2>&5
35793   ac_status=$?
35794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35795   (exit $ac_status); }; } &&
35796          { ac_try='test -s conftest$ac_exeext'
35797   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35798   (eval $ac_try) 2>&5
35799   ac_status=$?
35800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35801   (exit $ac_status); }; }; then
35802   ac_cv_lib_ndbm_dbm_open=yes
35803 else
35804   echo "$as_me: failed program was:" >&5
35805 sed 's/^/| /' conftest.$ac_ext >&5
35806
35807 ac_cv_lib_ndbm_dbm_open=no
35808 fi
35809 rm -f conftest.err conftest.$ac_objext \
35810       conftest$ac_exeext conftest.$ac_ext
35811 LIBS=$ac_check_lib_save_LIBS
35812 fi
35813 echo "$as_me:$LINENO: result: $ac_cv_lib_ndbm_dbm_open" >&5
35814 echo "${ECHO_T}$ac_cv_lib_ndbm_dbm_open" >&6
35815 if test $ac_cv_lib_ndbm_dbm_open = yes; then
35816   ol_cv_lib_ndbm=-lndbm
35817 else
35818
35819                         echo "$as_me:$LINENO: checking for dbm_open in -ldbm" >&5
35820 echo $ECHO_N "checking for dbm_open in -ldbm... $ECHO_C" >&6
35821 if test "${ac_cv_lib_dbm_dbm_open+set}" = set; then
35822   echo $ECHO_N "(cached) $ECHO_C" >&6
35823 else
35824   ac_check_lib_save_LIBS=$LIBS
35825 LIBS="-ldbm  $LIBS"
35826 cat >conftest.$ac_ext <<_ACEOF
35827 /* confdefs.h.  */
35828 _ACEOF
35829 cat confdefs.h >>conftest.$ac_ext
35830 cat >>conftest.$ac_ext <<_ACEOF
35831 /* end confdefs.h.  */
35832
35833 /* Override any gcc2 internal prototype to avoid an error.  */
35834 #ifdef __cplusplus
35835 extern "C"
35836 #endif
35837 /* We use char because int might match the return type of a gcc2
35838    builtin and then its argument prototype would still apply.  */
35839 char dbm_open ();
35840 int
35841 main ()
35842 {
35843 dbm_open ();
35844   ;
35845   return 0;
35846 }
35847 _ACEOF
35848 rm -f conftest.$ac_objext conftest$ac_exeext
35849 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35850   (eval $ac_link) 2>conftest.er1
35851   ac_status=$?
35852   grep -v '^ *+' conftest.er1 >conftest.err
35853   rm -f conftest.er1
35854   cat conftest.err >&5
35855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35856   (exit $ac_status); } &&
35857          { ac_try='test -z "$ac_c_werror_flag"
35858                          || test ! -s conftest.err'
35859   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35860   (eval $ac_try) 2>&5
35861   ac_status=$?
35862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35863   (exit $ac_status); }; } &&
35864          { ac_try='test -s conftest$ac_exeext'
35865   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35866   (eval $ac_try) 2>&5
35867   ac_status=$?
35868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35869   (exit $ac_status); }; }; then
35870   ac_cv_lib_dbm_dbm_open=yes
35871 else
35872   echo "$as_me: failed program was:" >&5
35873 sed 's/^/| /' conftest.$ac_ext >&5
35874
35875 ac_cv_lib_dbm_dbm_open=no
35876 fi
35877 rm -f conftest.err conftest.$ac_objext \
35878       conftest$ac_exeext conftest.$ac_ext
35879 LIBS=$ac_check_lib_save_LIBS
35880 fi
35881 echo "$as_me:$LINENO: result: $ac_cv_lib_dbm_dbm_open" >&5
35882 echo "${ECHO_T}$ac_cv_lib_dbm_dbm_open" >&6
35883 if test $ac_cv_lib_dbm_dbm_open = yes; then
35884   ol_cv_lib_ndbm=-ldbm
35885 else
35886   ol_cv_lib_ndbm=no
35887 fi
35888
35889 fi
35890
35891
35892 fi
35893
35894         LIBS="$ol_LIBS"
35895
35896 fi
35897 echo "$as_me:$LINENO: result: $ol_cv_lib_ndbm" >&5
35898 echo "${ECHO_T}$ol_cv_lib_ndbm" >&6
35899
35900
35901
35902 for ac_header in ndbm.h
35903 do
35904 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
35905 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35906   echo "$as_me:$LINENO: checking for $ac_header" >&5
35907 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
35908 if eval "test \"\${$as_ac_Header+set}\" = set"; then
35909   echo $ECHO_N "(cached) $ECHO_C" >&6
35910 fi
35911 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
35912 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
35913 else
35914   # Is the header compilable?
35915 echo "$as_me:$LINENO: checking $ac_header usability" >&5
35916 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
35917 cat >conftest.$ac_ext <<_ACEOF
35918 /* confdefs.h.  */
35919 _ACEOF
35920 cat confdefs.h >>conftest.$ac_ext
35921 cat >>conftest.$ac_ext <<_ACEOF
35922 /* end confdefs.h.  */
35923 $ac_includes_default
35924 #include <$ac_header>
35925 _ACEOF
35926 rm -f conftest.$ac_objext
35927 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35928   (eval $ac_compile) 2>conftest.er1
35929   ac_status=$?
35930   grep -v '^ *+' conftest.er1 >conftest.err
35931   rm -f conftest.er1
35932   cat conftest.err >&5
35933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35934   (exit $ac_status); } &&
35935          { ac_try='test -z "$ac_c_werror_flag"
35936                          || test ! -s conftest.err'
35937   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35938   (eval $ac_try) 2>&5
35939   ac_status=$?
35940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35941   (exit $ac_status); }; } &&
35942          { ac_try='test -s conftest.$ac_objext'
35943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35944   (eval $ac_try) 2>&5
35945   ac_status=$?
35946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35947   (exit $ac_status); }; }; then
35948   ac_header_compiler=yes
35949 else
35950   echo "$as_me: failed program was:" >&5
35951 sed 's/^/| /' conftest.$ac_ext >&5
35952
35953 ac_header_compiler=no
35954 fi
35955 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35956 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
35957 echo "${ECHO_T}$ac_header_compiler" >&6
35958
35959 # Is the header present?
35960 echo "$as_me:$LINENO: checking $ac_header presence" >&5
35961 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
35962 cat >conftest.$ac_ext <<_ACEOF
35963 /* confdefs.h.  */
35964 _ACEOF
35965 cat confdefs.h >>conftest.$ac_ext
35966 cat >>conftest.$ac_ext <<_ACEOF
35967 /* end confdefs.h.  */
35968 #include <$ac_header>
35969 _ACEOF
35970 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
35971   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
35972   ac_status=$?
35973   grep -v '^ *+' conftest.er1 >conftest.err
35974   rm -f conftest.er1
35975   cat conftest.err >&5
35976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35977   (exit $ac_status); } >/dev/null; then
35978   if test -s conftest.err; then
35979     ac_cpp_err=$ac_c_preproc_warn_flag
35980     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
35981   else
35982     ac_cpp_err=
35983   fi
35984 else
35985   ac_cpp_err=yes
35986 fi
35987 if test -z "$ac_cpp_err"; then
35988   ac_header_preproc=yes
35989 else
35990   echo "$as_me: failed program was:" >&5
35991 sed 's/^/| /' conftest.$ac_ext >&5
35992
35993   ac_header_preproc=no
35994 fi
35995 rm -f conftest.err conftest.$ac_ext
35996 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
35997 echo "${ECHO_T}$ac_header_preproc" >&6
35998
35999 # So?  What about this header?
36000 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
36001   yes:no: )
36002     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
36003 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
36004     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
36005 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
36006     ac_header_preproc=yes
36007     ;;
36008   no:yes:* )
36009     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
36010 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
36011     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
36012 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
36013     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
36014 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
36015     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
36016 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
36017     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
36018 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
36019     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
36020 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
36021     (
36022       cat <<\_ASBOX
36023 ## --------------------------------------------- ##
36024 ## Report this to <http://www.openldap.org/its/> ##
36025 ## --------------------------------------------- ##
36026 _ASBOX
36027     ) |
36028       sed "s/^/$as_me: WARNING:     /" >&2
36029     ;;
36030 esac
36031 echo "$as_me:$LINENO: checking for $ac_header" >&5
36032 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36033 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36034   echo $ECHO_N "(cached) $ECHO_C" >&6
36035 else
36036   eval "$as_ac_Header=\$ac_header_preproc"
36037 fi
36038 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36039 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36040
36041 fi
36042 if test `eval echo '${'$as_ac_Header'}'` = yes; then
36043   cat >>confdefs.h <<_ACEOF
36044 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
36045 _ACEOF
36046
36047 fi
36048
36049 done
36050
36051  echo "$as_me:$LINENO: checking for db" >&5
36052 echo $ECHO_N "checking for db... $ECHO_C" >&6
36053 if test "${ol_cv_ndbm+set}" = set; then
36054   echo $ECHO_N "(cached) $ECHO_C" >&6
36055 else
36056
36057         if test $ol_cv_lib_ndbm = no || test $ac_cv_header_ndbm_h = no ; then
36058                 ol_cv_ndbm=no
36059         else
36060                 ol_cv_ndbm=yes
36061         fi
36062
36063 fi
36064 echo "$as_me:$LINENO: result: $ol_cv_ndbm" >&5
36065 echo "${ECHO_T}$ol_cv_ndbm" >&6
36066  if test $ol_cv_ndbm = yes ; then
36067
36068 cat >>confdefs.h <<\_ACEOF
36069 #define HAVE_NDBM 1
36070 _ACEOF
36071
36072  fi
36073
36074
36075         if test $ol_cv_ndbm = yes ; then
36076                 ol_link_ldbm=ndbm
36077                 ol_enable_ldbm_api=ndbm
36078
36079                 if test $ol_cv_lib_ndbm != yes ; then
36080                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
36081                 fi
36082         fi
36083 fi
36084
36085 if test $ol_link_ldbm = no && test $ol_enable_ldbm != no ; then
36086         { { echo "$as_me:$LINENO: error: could not find suitable LDBM backend" >&5
36087 echo "$as_me: error: could not find suitable LDBM backend" >&2;}
36088    { (exit 1); exit 1; }; }
36089 fi
36090
36091 if test $ol_enable_bdb = yes ||
36092    test $ol_enable_hdb = yes ||
36093    test $ol_enable_ldbm = yes ; then
36094         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
36095 fi
36096
36097
36098 if test $ol_enable_dynamic = yes && test $enable_shared = yes ; then
36099         BUILD_LIBS_DYNAMIC=shared
36100
36101 cat >>confdefs.h <<\_ACEOF
36102 #define LDAP_LIBS_DYNAMIC 1
36103 _ACEOF
36104
36105         LTSTATIC=""
36106 else
36107         BUILD_LIBS_DYNAMIC=static
36108         LTSTATIC="-static"
36109 fi
36110
36111 if test $ol_enable_wrappers != no ; then
36112
36113 for ac_header in tcpd.h
36114 do
36115 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
36116 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36117   echo "$as_me:$LINENO: checking for $ac_header" >&5
36118 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36119 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36120   echo $ECHO_N "(cached) $ECHO_C" >&6
36121 fi
36122 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36123 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36124 else
36125   # Is the header compilable?
36126 echo "$as_me:$LINENO: checking $ac_header usability" >&5
36127 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
36128 cat >conftest.$ac_ext <<_ACEOF
36129 /* confdefs.h.  */
36130 _ACEOF
36131 cat confdefs.h >>conftest.$ac_ext
36132 cat >>conftest.$ac_ext <<_ACEOF
36133 /* end confdefs.h.  */
36134 $ac_includes_default
36135 #include <$ac_header>
36136 _ACEOF
36137 rm -f conftest.$ac_objext
36138 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36139   (eval $ac_compile) 2>conftest.er1
36140   ac_status=$?
36141   grep -v '^ *+' conftest.er1 >conftest.err
36142   rm -f conftest.er1
36143   cat conftest.err >&5
36144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36145   (exit $ac_status); } &&
36146          { ac_try='test -z "$ac_c_werror_flag"
36147                          || test ! -s conftest.err'
36148   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36149   (eval $ac_try) 2>&5
36150   ac_status=$?
36151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36152   (exit $ac_status); }; } &&
36153          { ac_try='test -s conftest.$ac_objext'
36154   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36155   (eval $ac_try) 2>&5
36156   ac_status=$?
36157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36158   (exit $ac_status); }; }; then
36159   ac_header_compiler=yes
36160 else
36161   echo "$as_me: failed program was:" >&5
36162 sed 's/^/| /' conftest.$ac_ext >&5
36163
36164 ac_header_compiler=no
36165 fi
36166 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36167 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
36168 echo "${ECHO_T}$ac_header_compiler" >&6
36169
36170 # Is the header present?
36171 echo "$as_me:$LINENO: checking $ac_header presence" >&5
36172 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
36173 cat >conftest.$ac_ext <<_ACEOF
36174 /* confdefs.h.  */
36175 _ACEOF
36176 cat confdefs.h >>conftest.$ac_ext
36177 cat >>conftest.$ac_ext <<_ACEOF
36178 /* end confdefs.h.  */
36179 #include <$ac_header>
36180 _ACEOF
36181 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
36182   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
36183   ac_status=$?
36184   grep -v '^ *+' conftest.er1 >conftest.err
36185   rm -f conftest.er1
36186   cat conftest.err >&5
36187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36188   (exit $ac_status); } >/dev/null; then
36189   if test -s conftest.err; then
36190     ac_cpp_err=$ac_c_preproc_warn_flag
36191     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
36192   else
36193     ac_cpp_err=
36194   fi
36195 else
36196   ac_cpp_err=yes
36197 fi
36198 if test -z "$ac_cpp_err"; then
36199   ac_header_preproc=yes
36200 else
36201   echo "$as_me: failed program was:" >&5
36202 sed 's/^/| /' conftest.$ac_ext >&5
36203
36204   ac_header_preproc=no
36205 fi
36206 rm -f conftest.err conftest.$ac_ext
36207 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
36208 echo "${ECHO_T}$ac_header_preproc" >&6
36209
36210 # So?  What about this header?
36211 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
36212   yes:no: )
36213     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
36214 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
36215     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
36216 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
36217     ac_header_preproc=yes
36218     ;;
36219   no:yes:* )
36220     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
36221 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
36222     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
36223 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
36224     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
36225 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
36226     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
36227 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
36228     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
36229 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
36230     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
36231 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
36232     (
36233       cat <<\_ASBOX
36234 ## --------------------------------------------- ##
36235 ## Report this to <http://www.openldap.org/its/> ##
36236 ## --------------------------------------------- ##
36237 _ASBOX
36238     ) |
36239       sed "s/^/$as_me: WARNING:     /" >&2
36240     ;;
36241 esac
36242 echo "$as_me:$LINENO: checking for $ac_header" >&5
36243 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36244 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36245   echo $ECHO_N "(cached) $ECHO_C" >&6
36246 else
36247   eval "$as_ac_Header=\$ac_header_preproc"
36248 fi
36249 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36250 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36251
36252 fi
36253 if test `eval echo '${'$as_ac_Header'}'` = yes; then
36254   cat >>confdefs.h <<_ACEOF
36255 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
36256 _ACEOF
36257
36258                 echo "$as_me:$LINENO: checking for TCP wrappers library" >&5
36259 echo $ECHO_N "checking for TCP wrappers library... $ECHO_C" >&6
36260                 save_LIBS="$LIBS"
36261                 LIBS="$LIBS -lwrap"
36262                 cat >conftest.$ac_ext <<_ACEOF
36263 /* confdefs.h.  */
36264 _ACEOF
36265 cat confdefs.h >>conftest.$ac_ext
36266 cat >>conftest.$ac_ext <<_ACEOF
36267 /* end confdefs.h.  */
36268
36269 #include <tcpd.h>
36270 int allow_severity = 0;
36271 int deny_severity  = 0;
36272
36273 struct request_info *req;
36274
36275 int
36276 main ()
36277 {
36278
36279 hosts_access(req)
36280
36281   ;
36282   return 0;
36283 }
36284 _ACEOF
36285 rm -f conftest.$ac_objext conftest$ac_exeext
36286 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36287   (eval $ac_link) 2>conftest.er1
36288   ac_status=$?
36289   grep -v '^ *+' conftest.er1 >conftest.err
36290   rm -f conftest.er1
36291   cat conftest.err >&5
36292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36293   (exit $ac_status); } &&
36294          { ac_try='test -z "$ac_c_werror_flag"
36295                          || test ! -s conftest.err'
36296   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36297   (eval $ac_try) 2>&5
36298   ac_status=$?
36299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36300   (exit $ac_status); }; } &&
36301          { ac_try='test -s conftest$ac_exeext'
36302   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36303   (eval $ac_try) 2>&5
36304   ac_status=$?
36305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36306   (exit $ac_status); }; }; then
36307   echo "$as_me:$LINENO: result: -lwrap" >&5
36308 echo "${ECHO_T}-lwrap" >&6
36309                 have_wrappers=yes
36310                 LIBS="$save_LIBS"
36311 else
36312   echo "$as_me: failed program was:" >&5
36313 sed 's/^/| /' conftest.$ac_ext >&5
36314
36315
36316                                 LIBS="$LIBS -lnsl"
36317                 cat >conftest.$ac_ext <<_ACEOF
36318 /* confdefs.h.  */
36319 _ACEOF
36320 cat confdefs.h >>conftest.$ac_ext
36321 cat >>conftest.$ac_ext <<_ACEOF
36322 /* end confdefs.h.  */
36323
36324 #include <tcpd.h>
36325 int allow_severity = 0;
36326 int deny_severity  = 0;
36327
36328 struct request_info *req;
36329
36330 int
36331 main ()
36332 {
36333
36334 hosts_access(req)
36335
36336   ;
36337   return 0;
36338 }
36339 _ACEOF
36340 rm -f conftest.$ac_objext conftest$ac_exeext
36341 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36342   (eval $ac_link) 2>conftest.er1
36343   ac_status=$?
36344   grep -v '^ *+' conftest.er1 >conftest.err
36345   rm -f conftest.er1
36346   cat conftest.err >&5
36347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36348   (exit $ac_status); } &&
36349          { ac_try='test -z "$ac_c_werror_flag"
36350                          || test ! -s conftest.err'
36351   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36352   (eval $ac_try) 2>&5
36353   ac_status=$?
36354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36355   (exit $ac_status); }; } &&
36356          { ac_try='test -s conftest$ac_exeext'
36357   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36358   (eval $ac_try) 2>&5
36359   ac_status=$?
36360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36361   (exit $ac_status); }; }; then
36362   echo "$as_me:$LINENO: result: -lwrap -lnsl" >&5
36363 echo "${ECHO_T}-lwrap -lnsl" >&6
36364                 have_wrappers=yes
36365                 LIBS="$save_LIBS -lnsl"
36366 else
36367   echo "$as_me: failed program was:" >&5
36368 sed 's/^/| /' conftest.$ac_ext >&5
36369
36370
36371                 echo "$as_me:$LINENO: result: no" >&5
36372 echo "${ECHO_T}no" >&6
36373                 have_wrappers=no
36374                 LIBS=$save_LIBS
36375 fi
36376 rm -f conftest.err conftest.$ac_objext \
36377       conftest$ac_exeext conftest.$ac_ext
36378 fi
36379 rm -f conftest.err conftest.$ac_objext \
36380       conftest$ac_exeext conftest.$ac_ext
36381 else
36382   have_wrappers=no
36383 fi
36384
36385 done
36386
36387
36388         if test $have_wrappers = yes ; then
36389
36390 cat >>confdefs.h <<\_ACEOF
36391 #define HAVE_TCPD 1
36392 _ACEOF
36393
36394                 WRAP_LIBS="-lwrap"
36395         elif test $ol_enable_wrappers = yes ; then
36396                 { { echo "$as_me:$LINENO: error: could not find TCP wrappers, select apppropriate options or disable" >&5
36397 echo "$as_me: error: could not find TCP wrappers, select apppropriate options or disable" >&2;}
36398    { (exit 1); exit 1; }; }
36399         else
36400                 { echo "$as_me:$LINENO: WARNING: could not find TCP wrappers, support disabled" >&5
36401 echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
36402                 WRAP_LIBS=""
36403         fi
36404 fi
36405
36406 if test $ol_enable_syslog != no ; then
36407         echo "$as_me:$LINENO: checking for openlog" >&5
36408 echo $ECHO_N "checking for openlog... $ECHO_C" >&6
36409 if test "${ac_cv_func_openlog+set}" = set; then
36410   echo $ECHO_N "(cached) $ECHO_C" >&6
36411 else
36412   cat >conftest.$ac_ext <<_ACEOF
36413 /* confdefs.h.  */
36414 _ACEOF
36415 cat confdefs.h >>conftest.$ac_ext
36416 cat >>conftest.$ac_ext <<_ACEOF
36417 /* end confdefs.h.  */
36418 /* Define openlog to an innocuous variant, in case <limits.h> declares openlog.
36419    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
36420 #define openlog innocuous_openlog
36421
36422 /* System header to define __stub macros and hopefully few prototypes,
36423     which can conflict with char openlog (); below.
36424     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36425     <limits.h> exists even on freestanding compilers.  */
36426
36427 #ifdef __STDC__
36428 # include <limits.h>
36429 #else
36430 # include <assert.h>
36431 #endif
36432
36433 #undef openlog
36434
36435 /* Override any gcc2 internal prototype to avoid an error.  */
36436 #ifdef __cplusplus
36437 extern "C"
36438 {
36439 #endif
36440 /* We use char because int might match the return type of a gcc2
36441    builtin and then its argument prototype would still apply.  */
36442 char openlog ();
36443 /* The GNU C library defines this for functions which it implements
36444     to always fail with ENOSYS.  Some functions are actually named
36445     something starting with __ and the normal name is an alias.  */
36446 #if defined (__stub_openlog) || defined (__stub___openlog)
36447 choke me
36448 #else
36449 char (*f) () = openlog;
36450 #endif
36451 #ifdef __cplusplus
36452 }
36453 #endif
36454
36455 int
36456 main ()
36457 {
36458 return f != openlog;
36459   ;
36460   return 0;
36461 }
36462 _ACEOF
36463 rm -f conftest.$ac_objext conftest$ac_exeext
36464 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36465   (eval $ac_link) 2>conftest.er1
36466   ac_status=$?
36467   grep -v '^ *+' conftest.er1 >conftest.err
36468   rm -f conftest.er1
36469   cat conftest.err >&5
36470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36471   (exit $ac_status); } &&
36472          { ac_try='test -z "$ac_c_werror_flag"
36473                          || test ! -s conftest.err'
36474   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36475   (eval $ac_try) 2>&5
36476   ac_status=$?
36477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36478   (exit $ac_status); }; } &&
36479          { ac_try='test -s conftest$ac_exeext'
36480   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36481   (eval $ac_try) 2>&5
36482   ac_status=$?
36483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36484   (exit $ac_status); }; }; then
36485   ac_cv_func_openlog=yes
36486 else
36487   echo "$as_me: failed program was:" >&5
36488 sed 's/^/| /' conftest.$ac_ext >&5
36489
36490 ac_cv_func_openlog=no
36491 fi
36492 rm -f conftest.err conftest.$ac_objext \
36493       conftest$ac_exeext conftest.$ac_ext
36494 fi
36495 echo "$as_me:$LINENO: result: $ac_cv_func_openlog" >&5
36496 echo "${ECHO_T}$ac_cv_func_openlog" >&6
36497
36498         if test $ac_cv_func_openlog = no && test $ol_enable_syslog = yes; then
36499                 { { echo "$as_me:$LINENO: error: could not find syslog" >&5
36500 echo "$as_me: error: could not find syslog" >&2;}
36501    { (exit select appropriate options or disable); exit select appropriate options or disable; }; }
36502         fi
36503         ol_enable_syslog=$ac_cv_func_openlog
36504 fi
36505
36506 ol_link_sql=no
36507 if test $ol_enable_sql != no ; then
36508
36509
36510 for ac_header in sql.h sqlext.h
36511 do
36512 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
36513 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36514   echo "$as_me:$LINENO: checking for $ac_header" >&5
36515 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36516 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36517   echo $ECHO_N "(cached) $ECHO_C" >&6
36518 fi
36519 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36520 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36521 else
36522   # Is the header compilable?
36523 echo "$as_me:$LINENO: checking $ac_header usability" >&5
36524 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
36525 cat >conftest.$ac_ext <<_ACEOF
36526 /* confdefs.h.  */
36527 _ACEOF
36528 cat confdefs.h >>conftest.$ac_ext
36529 cat >>conftest.$ac_ext <<_ACEOF
36530 /* end confdefs.h.  */
36531 $ac_includes_default
36532 #include <$ac_header>
36533 _ACEOF
36534 rm -f conftest.$ac_objext
36535 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36536   (eval $ac_compile) 2>conftest.er1
36537   ac_status=$?
36538   grep -v '^ *+' conftest.er1 >conftest.err
36539   rm -f conftest.er1
36540   cat conftest.err >&5
36541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36542   (exit $ac_status); } &&
36543          { ac_try='test -z "$ac_c_werror_flag"
36544                          || test ! -s conftest.err'
36545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36546   (eval $ac_try) 2>&5
36547   ac_status=$?
36548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36549   (exit $ac_status); }; } &&
36550          { ac_try='test -s conftest.$ac_objext'
36551   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36552   (eval $ac_try) 2>&5
36553   ac_status=$?
36554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36555   (exit $ac_status); }; }; then
36556   ac_header_compiler=yes
36557 else
36558   echo "$as_me: failed program was:" >&5
36559 sed 's/^/| /' conftest.$ac_ext >&5
36560
36561 ac_header_compiler=no
36562 fi
36563 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36564 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
36565 echo "${ECHO_T}$ac_header_compiler" >&6
36566
36567 # Is the header present?
36568 echo "$as_me:$LINENO: checking $ac_header presence" >&5
36569 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
36570 cat >conftest.$ac_ext <<_ACEOF
36571 /* confdefs.h.  */
36572 _ACEOF
36573 cat confdefs.h >>conftest.$ac_ext
36574 cat >>conftest.$ac_ext <<_ACEOF
36575 /* end confdefs.h.  */
36576 #include <$ac_header>
36577 _ACEOF
36578 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
36579   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
36580   ac_status=$?
36581   grep -v '^ *+' conftest.er1 >conftest.err
36582   rm -f conftest.er1
36583   cat conftest.err >&5
36584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36585   (exit $ac_status); } >/dev/null; then
36586   if test -s conftest.err; then
36587     ac_cpp_err=$ac_c_preproc_warn_flag
36588     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
36589   else
36590     ac_cpp_err=
36591   fi
36592 else
36593   ac_cpp_err=yes
36594 fi
36595 if test -z "$ac_cpp_err"; then
36596   ac_header_preproc=yes
36597 else
36598   echo "$as_me: failed program was:" >&5
36599 sed 's/^/| /' conftest.$ac_ext >&5
36600
36601   ac_header_preproc=no
36602 fi
36603 rm -f conftest.err conftest.$ac_ext
36604 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
36605 echo "${ECHO_T}$ac_header_preproc" >&6
36606
36607 # So?  What about this header?
36608 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
36609   yes:no: )
36610     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
36611 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
36612     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
36613 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
36614     ac_header_preproc=yes
36615     ;;
36616   no:yes:* )
36617     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
36618 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
36619     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
36620 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
36621     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
36622 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
36623     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
36624 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
36625     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
36626 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
36627     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
36628 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
36629     (
36630       cat <<\_ASBOX
36631 ## --------------------------------------------- ##
36632 ## Report this to <http://www.openldap.org/its/> ##
36633 ## --------------------------------------------- ##
36634 _ASBOX
36635     ) |
36636       sed "s/^/$as_me: WARNING:     /" >&2
36637     ;;
36638 esac
36639 echo "$as_me:$LINENO: checking for $ac_header" >&5
36640 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36641 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36642   echo $ECHO_N "(cached) $ECHO_C" >&6
36643 else
36644   eval "$as_ac_Header=\$ac_header_preproc"
36645 fi
36646 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36647 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36648
36649 fi
36650 if test `eval echo '${'$as_ac_Header'}'` = yes; then
36651   cat >>confdefs.h <<_ACEOF
36652 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
36653 _ACEOF
36654
36655 else
36656
36657                 { { echo "$as_me:$LINENO: error: could not locate SQL headers" >&5
36658 echo "$as_me: error: could not locate SQL headers" >&2;}
36659    { (exit 1); exit 1; }; }
36660
36661 fi
36662
36663 done
36664
36665
36666         sql_LIBS="$LIBS"
36667         LIBS="$LTHREAD_LIBS"
36668
36669         echo "$as_me:$LINENO: checking for SQLDriverConnect in -liodbc" >&5
36670 echo $ECHO_N "checking for SQLDriverConnect in -liodbc... $ECHO_C" >&6
36671 if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then
36672   echo $ECHO_N "(cached) $ECHO_C" >&6
36673 else
36674   ac_check_lib_save_LIBS=$LIBS
36675 LIBS="-liodbc  $LIBS"
36676 cat >conftest.$ac_ext <<_ACEOF
36677 /* confdefs.h.  */
36678 _ACEOF
36679 cat confdefs.h >>conftest.$ac_ext
36680 cat >>conftest.$ac_ext <<_ACEOF
36681 /* end confdefs.h.  */
36682
36683 /* Override any gcc2 internal prototype to avoid an error.  */
36684 #ifdef __cplusplus
36685 extern "C"
36686 #endif
36687 /* We use char because int might match the return type of a gcc2
36688    builtin and then its argument prototype would still apply.  */
36689 char SQLDriverConnect ();
36690 int
36691 main ()
36692 {
36693 SQLDriverConnect ();
36694   ;
36695   return 0;
36696 }
36697 _ACEOF
36698 rm -f conftest.$ac_objext conftest$ac_exeext
36699 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36700   (eval $ac_link) 2>conftest.er1
36701   ac_status=$?
36702   grep -v '^ *+' conftest.er1 >conftest.err
36703   rm -f conftest.er1
36704   cat conftest.err >&5
36705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36706   (exit $ac_status); } &&
36707          { ac_try='test -z "$ac_c_werror_flag"
36708                          || test ! -s conftest.err'
36709   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36710   (eval $ac_try) 2>&5
36711   ac_status=$?
36712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36713   (exit $ac_status); }; } &&
36714          { ac_try='test -s conftest$ac_exeext'
36715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36716   (eval $ac_try) 2>&5
36717   ac_status=$?
36718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36719   (exit $ac_status); }; }; then
36720   ac_cv_lib_iodbc_SQLDriverConnect=yes
36721 else
36722   echo "$as_me: failed program was:" >&5
36723 sed 's/^/| /' conftest.$ac_ext >&5
36724
36725 ac_cv_lib_iodbc_SQLDriverConnect=no
36726 fi
36727 rm -f conftest.err conftest.$ac_objext \
36728       conftest$ac_exeext conftest.$ac_ext
36729 LIBS=$ac_check_lib_save_LIBS
36730 fi
36731 echo "$as_me:$LINENO: result: $ac_cv_lib_iodbc_SQLDriverConnect" >&5
36732 echo "${ECHO_T}$ac_cv_lib_iodbc_SQLDriverConnect" >&6
36733 if test $ac_cv_lib_iodbc_SQLDriverConnect = yes; then
36734   have_iodbc=yes
36735 else
36736   have_iodbc=no
36737 fi
36738
36739         if test $have_iodbc = yes ; then
36740                 ol_link_sql="-liodbc"
36741         else
36742                 echo "$as_me:$LINENO: checking for SQLDriverConnect in -lodbc" >&5
36743 echo $ECHO_N "checking for SQLDriverConnect in -lodbc... $ECHO_C" >&6
36744 if test "${ac_cv_lib_odbc_SQLDriverConnect+set}" = set; then
36745   echo $ECHO_N "(cached) $ECHO_C" >&6
36746 else
36747   ac_check_lib_save_LIBS=$LIBS
36748 LIBS="-lodbc  $LIBS"
36749 cat >conftest.$ac_ext <<_ACEOF
36750 /* confdefs.h.  */
36751 _ACEOF
36752 cat confdefs.h >>conftest.$ac_ext
36753 cat >>conftest.$ac_ext <<_ACEOF
36754 /* end confdefs.h.  */
36755
36756 /* Override any gcc2 internal prototype to avoid an error.  */
36757 #ifdef __cplusplus
36758 extern "C"
36759 #endif
36760 /* We use char because int might match the return type of a gcc2
36761    builtin and then its argument prototype would still apply.  */
36762 char SQLDriverConnect ();
36763 int
36764 main ()
36765 {
36766 SQLDriverConnect ();
36767   ;
36768   return 0;
36769 }
36770 _ACEOF
36771 rm -f conftest.$ac_objext conftest$ac_exeext
36772 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36773   (eval $ac_link) 2>conftest.er1
36774   ac_status=$?
36775   grep -v '^ *+' conftest.er1 >conftest.err
36776   rm -f conftest.er1
36777   cat conftest.err >&5
36778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36779   (exit $ac_status); } &&
36780          { ac_try='test -z "$ac_c_werror_flag"
36781                          || test ! -s conftest.err'
36782   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36783   (eval $ac_try) 2>&5
36784   ac_status=$?
36785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36786   (exit $ac_status); }; } &&
36787          { ac_try='test -s conftest$ac_exeext'
36788   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36789   (eval $ac_try) 2>&5
36790   ac_status=$?
36791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36792   (exit $ac_status); }; }; then
36793   ac_cv_lib_odbc_SQLDriverConnect=yes
36794 else
36795   echo "$as_me: failed program was:" >&5
36796 sed 's/^/| /' conftest.$ac_ext >&5
36797
36798 ac_cv_lib_odbc_SQLDriverConnect=no
36799 fi
36800 rm -f conftest.err conftest.$ac_objext \
36801       conftest$ac_exeext conftest.$ac_ext
36802 LIBS=$ac_check_lib_save_LIBS
36803 fi
36804 echo "$as_me:$LINENO: result: $ac_cv_lib_odbc_SQLDriverConnect" >&5
36805 echo "${ECHO_T}$ac_cv_lib_odbc_SQLDriverConnect" >&6
36806 if test $ac_cv_lib_odbc_SQLDriverConnect = yes; then
36807   have_odbc=yes
36808 else
36809   have_odbc=no
36810 fi
36811
36812                 if test $have_odbc = yes ; then
36813                         ol_link_sql="-lodbc"
36814                 fi
36815         fi
36816
36817         LIBS="$sql_LIBS"
36818
36819         if test $ol_link_sql != no ; then
36820                 SLAPD_SQL_LIBS="$ol_link_sql"
36821
36822         elif test $ol_enable_sql != auto ; then
36823                 { { echo "$as_me:$LINENO: error: could not locate suitable ODBC library" >&5
36824 echo "$as_me: error: could not locate suitable ODBC library" >&2;}
36825    { (exit 1); exit 1; }; }
36826         fi
36827 fi
36828
36829 ol_icu=no
36830
36831 for ac_header in unicode/utypes.h
36832 do
36833 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
36834 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36835   echo "$as_me:$LINENO: checking for $ac_header" >&5
36836 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36837 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36838   echo $ECHO_N "(cached) $ECHO_C" >&6
36839 fi
36840 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36841 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36842 else
36843   # Is the header compilable?
36844 echo "$as_me:$LINENO: checking $ac_header usability" >&5
36845 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
36846 cat >conftest.$ac_ext <<_ACEOF
36847 /* confdefs.h.  */
36848 _ACEOF
36849 cat confdefs.h >>conftest.$ac_ext
36850 cat >>conftest.$ac_ext <<_ACEOF
36851 /* end confdefs.h.  */
36852 $ac_includes_default
36853 #include <$ac_header>
36854 _ACEOF
36855 rm -f conftest.$ac_objext
36856 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36857   (eval $ac_compile) 2>conftest.er1
36858   ac_status=$?
36859   grep -v '^ *+' conftest.er1 >conftest.err
36860   rm -f conftest.er1
36861   cat conftest.err >&5
36862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36863   (exit $ac_status); } &&
36864          { ac_try='test -z "$ac_c_werror_flag"
36865                          || test ! -s conftest.err'
36866   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36867   (eval $ac_try) 2>&5
36868   ac_status=$?
36869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36870   (exit $ac_status); }; } &&
36871          { ac_try='test -s conftest.$ac_objext'
36872   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36873   (eval $ac_try) 2>&5
36874   ac_status=$?
36875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36876   (exit $ac_status); }; }; then
36877   ac_header_compiler=yes
36878 else
36879   echo "$as_me: failed program was:" >&5
36880 sed 's/^/| /' conftest.$ac_ext >&5
36881
36882 ac_header_compiler=no
36883 fi
36884 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36885 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
36886 echo "${ECHO_T}$ac_header_compiler" >&6
36887
36888 # Is the header present?
36889 echo "$as_me:$LINENO: checking $ac_header presence" >&5
36890 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
36891 cat >conftest.$ac_ext <<_ACEOF
36892 /* confdefs.h.  */
36893 _ACEOF
36894 cat confdefs.h >>conftest.$ac_ext
36895 cat >>conftest.$ac_ext <<_ACEOF
36896 /* end confdefs.h.  */
36897 #include <$ac_header>
36898 _ACEOF
36899 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
36900   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
36901   ac_status=$?
36902   grep -v '^ *+' conftest.er1 >conftest.err
36903   rm -f conftest.er1
36904   cat conftest.err >&5
36905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36906   (exit $ac_status); } >/dev/null; then
36907   if test -s conftest.err; then
36908     ac_cpp_err=$ac_c_preproc_warn_flag
36909     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
36910   else
36911     ac_cpp_err=
36912   fi
36913 else
36914   ac_cpp_err=yes
36915 fi
36916 if test -z "$ac_cpp_err"; then
36917   ac_header_preproc=yes
36918 else
36919   echo "$as_me: failed program was:" >&5
36920 sed 's/^/| /' conftest.$ac_ext >&5
36921
36922   ac_header_preproc=no
36923 fi
36924 rm -f conftest.err conftest.$ac_ext
36925 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
36926 echo "${ECHO_T}$ac_header_preproc" >&6
36927
36928 # So?  What about this header?
36929 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
36930   yes:no: )
36931     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
36932 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
36933     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
36934 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
36935     ac_header_preproc=yes
36936     ;;
36937   no:yes:* )
36938     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
36939 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
36940     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
36941 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
36942     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
36943 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
36944     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
36945 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
36946     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
36947 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
36948     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
36949 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
36950     (
36951       cat <<\_ASBOX
36952 ## --------------------------------------------- ##
36953 ## Report this to <http://www.openldap.org/its/> ##
36954 ## --------------------------------------------- ##
36955 _ASBOX
36956     ) |
36957       sed "s/^/$as_me: WARNING:     /" >&2
36958     ;;
36959 esac
36960 echo "$as_me:$LINENO: checking for $ac_header" >&5
36961 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36962 if eval "test \"\${$as_ac_Header+set}\" = set"; then
36963   echo $ECHO_N "(cached) $ECHO_C" >&6
36964 else
36965   eval "$as_ac_Header=\$ac_header_preproc"
36966 fi
36967 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
36968 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
36969
36970 fi
36971 if test `eval echo '${'$as_ac_Header'}'` = yes; then
36972   cat >>confdefs.h <<_ACEOF
36973 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
36974 _ACEOF
36975
36976 fi
36977
36978 done
36979
36980 if test $ac_cv_header_unicode_utypes_h = yes ; then
36981                 OL_ICULIBS="-licuuc -licudata"
36982
36983         echo "$as_me:$LINENO: checking for ICU libraries" >&5
36984 echo $ECHO_N "checking for ICU libraries... $ECHO_C" >&6
36985 if test "${ol_cv_lib_icu+set}" = set; then
36986   echo $ECHO_N "(cached) $ECHO_C" >&6
36987 else
36988
36989                 ol_LIBS="$LIBS"
36990                 LIBS="$OL_ICULIBS $LIBS"
36991                 cat >conftest.$ac_ext <<_ACEOF
36992 /* confdefs.h.  */
36993 _ACEOF
36994 cat confdefs.h >>conftest.$ac_ext
36995 cat >>conftest.$ac_ext <<_ACEOF
36996 /* end confdefs.h.  */
36997
36998 #include <unicode/utypes.h>
36999
37000 int
37001 main ()
37002 {
37003
37004 (void) u_errorName(0);
37005
37006   ;
37007   return 0;
37008 }
37009 _ACEOF
37010 rm -f conftest.$ac_objext conftest$ac_exeext
37011 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37012   (eval $ac_link) 2>conftest.er1
37013   ac_status=$?
37014   grep -v '^ *+' conftest.er1 >conftest.err
37015   rm -f conftest.er1
37016   cat conftest.err >&5
37017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37018   (exit $ac_status); } &&
37019          { ac_try='test -z "$ac_c_werror_flag"
37020                          || test ! -s conftest.err'
37021   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37022   (eval $ac_try) 2>&5
37023   ac_status=$?
37024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37025   (exit $ac_status); }; } &&
37026          { ac_try='test -s conftest$ac_exeext'
37027   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37028   (eval $ac_try) 2>&5
37029   ac_status=$?
37030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37031   (exit $ac_status); }; }; then
37032   ol_cv_lib_icu=yes
37033 else
37034   echo "$as_me: failed program was:" >&5
37035 sed 's/^/| /' conftest.$ac_ext >&5
37036
37037 ol_cv_lib_icu=no
37038 fi
37039 rm -f conftest.err conftest.$ac_objext \
37040       conftest$ac_exeext conftest.$ac_ext
37041                 LIBS="$ol_LIBS"
37042
37043 fi
37044 echo "$as_me:$LINENO: result: $ol_cv_lib_icu" >&5
37045 echo "${ECHO_T}$ol_cv_lib_icu" >&6
37046
37047         if test $ol_cv_lib_icu != no ; then
37048                 ol_icu="$OL_ICULIBS"
37049
37050 cat >>confdefs.h <<\_ACEOF
37051 #define HAVE_ICU 1
37052 _ACEOF
37053
37054         fi
37055 fi
37056
37057 if test "$ol_icu" = no ; then
37058         { echo "$as_me:$LINENO: WARNING: ICU not available" >&5
37059 echo "$as_me: WARNING: ICU not available" >&2;}
37060 else
37061         ICU_LIBS="$ol_icu"
37062 fi
37063 WITH_SASL=no
37064 ol_link_sasl=no
37065 ol_link_spasswd=no
37066 if test $ol_with_cyrus_sasl != no ; then
37067
37068
37069 for ac_header in sasl/sasl.h sasl.h
37070 do
37071 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
37072 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37073   echo "$as_me:$LINENO: checking for $ac_header" >&5
37074 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37075 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37076   echo $ECHO_N "(cached) $ECHO_C" >&6
37077 fi
37078 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37079 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37080 else
37081   # Is the header compilable?
37082 echo "$as_me:$LINENO: checking $ac_header usability" >&5
37083 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
37084 cat >conftest.$ac_ext <<_ACEOF
37085 /* confdefs.h.  */
37086 _ACEOF
37087 cat confdefs.h >>conftest.$ac_ext
37088 cat >>conftest.$ac_ext <<_ACEOF
37089 /* end confdefs.h.  */
37090 $ac_includes_default
37091 #include <$ac_header>
37092 _ACEOF
37093 rm -f conftest.$ac_objext
37094 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37095   (eval $ac_compile) 2>conftest.er1
37096   ac_status=$?
37097   grep -v '^ *+' conftest.er1 >conftest.err
37098   rm -f conftest.er1
37099   cat conftest.err >&5
37100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37101   (exit $ac_status); } &&
37102          { ac_try='test -z "$ac_c_werror_flag"
37103                          || test ! -s conftest.err'
37104   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37105   (eval $ac_try) 2>&5
37106   ac_status=$?
37107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37108   (exit $ac_status); }; } &&
37109          { ac_try='test -s conftest.$ac_objext'
37110   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37111   (eval $ac_try) 2>&5
37112   ac_status=$?
37113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37114   (exit $ac_status); }; }; then
37115   ac_header_compiler=yes
37116 else
37117   echo "$as_me: failed program was:" >&5
37118 sed 's/^/| /' conftest.$ac_ext >&5
37119
37120 ac_header_compiler=no
37121 fi
37122 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37123 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
37124 echo "${ECHO_T}$ac_header_compiler" >&6
37125
37126 # Is the header present?
37127 echo "$as_me:$LINENO: checking $ac_header presence" >&5
37128 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
37129 cat >conftest.$ac_ext <<_ACEOF
37130 /* confdefs.h.  */
37131 _ACEOF
37132 cat confdefs.h >>conftest.$ac_ext
37133 cat >>conftest.$ac_ext <<_ACEOF
37134 /* end confdefs.h.  */
37135 #include <$ac_header>
37136 _ACEOF
37137 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
37138   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
37139   ac_status=$?
37140   grep -v '^ *+' conftest.er1 >conftest.err
37141   rm -f conftest.er1
37142   cat conftest.err >&5
37143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37144   (exit $ac_status); } >/dev/null; then
37145   if test -s conftest.err; then
37146     ac_cpp_err=$ac_c_preproc_warn_flag
37147     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
37148   else
37149     ac_cpp_err=
37150   fi
37151 else
37152   ac_cpp_err=yes
37153 fi
37154 if test -z "$ac_cpp_err"; then
37155   ac_header_preproc=yes
37156 else
37157   echo "$as_me: failed program was:" >&5
37158 sed 's/^/| /' conftest.$ac_ext >&5
37159
37160   ac_header_preproc=no
37161 fi
37162 rm -f conftest.err conftest.$ac_ext
37163 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
37164 echo "${ECHO_T}$ac_header_preproc" >&6
37165
37166 # So?  What about this header?
37167 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
37168   yes:no: )
37169     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
37170 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
37171     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
37172 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
37173     ac_header_preproc=yes
37174     ;;
37175   no:yes:* )
37176     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
37177 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
37178     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
37179 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
37180     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
37181 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
37182     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
37183 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
37184     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
37185 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
37186     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
37187 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
37188     (
37189       cat <<\_ASBOX
37190 ## --------------------------------------------- ##
37191 ## Report this to <http://www.openldap.org/its/> ##
37192 ## --------------------------------------------- ##
37193 _ASBOX
37194     ) |
37195       sed "s/^/$as_me: WARNING:     /" >&2
37196     ;;
37197 esac
37198 echo "$as_me:$LINENO: checking for $ac_header" >&5
37199 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37200 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37201   echo $ECHO_N "(cached) $ECHO_C" >&6
37202 else
37203   eval "$as_ac_Header=\$ac_header_preproc"
37204 fi
37205 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37206 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37207
37208 fi
37209 if test `eval echo '${'$as_ac_Header'}'` = yes; then
37210   cat >>confdefs.h <<_ACEOF
37211 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
37212 _ACEOF
37213
37214 fi
37215
37216 done
37217
37218
37219         if test $ac_cv_header_sasl_sasl_h = yes ||
37220            test $ac_cv_header_sasl_h = yes; then
37221                 echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl2" >&5
37222 echo $ECHO_N "checking for sasl_client_init in -lsasl2... $ECHO_C" >&6
37223 if test "${ac_cv_lib_sasl2_sasl_client_init+set}" = set; then
37224   echo $ECHO_N "(cached) $ECHO_C" >&6
37225 else
37226   ac_check_lib_save_LIBS=$LIBS
37227 LIBS="-lsasl2  $LIBS"
37228 cat >conftest.$ac_ext <<_ACEOF
37229 /* confdefs.h.  */
37230 _ACEOF
37231 cat confdefs.h >>conftest.$ac_ext
37232 cat >>conftest.$ac_ext <<_ACEOF
37233 /* end confdefs.h.  */
37234
37235 /* Override any gcc2 internal prototype to avoid an error.  */
37236 #ifdef __cplusplus
37237 extern "C"
37238 #endif
37239 /* We use char because int might match the return type of a gcc2
37240    builtin and then its argument prototype would still apply.  */
37241 char sasl_client_init ();
37242 int
37243 main ()
37244 {
37245 sasl_client_init ();
37246   ;
37247   return 0;
37248 }
37249 _ACEOF
37250 rm -f conftest.$ac_objext conftest$ac_exeext
37251 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37252   (eval $ac_link) 2>conftest.er1
37253   ac_status=$?
37254   grep -v '^ *+' conftest.er1 >conftest.err
37255   rm -f conftest.er1
37256   cat conftest.err >&5
37257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37258   (exit $ac_status); } &&
37259          { ac_try='test -z "$ac_c_werror_flag"
37260                          || test ! -s conftest.err'
37261   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37262   (eval $ac_try) 2>&5
37263   ac_status=$?
37264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37265   (exit $ac_status); }; } &&
37266          { ac_try='test -s conftest$ac_exeext'
37267   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37268   (eval $ac_try) 2>&5
37269   ac_status=$?
37270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37271   (exit $ac_status); }; }; then
37272   ac_cv_lib_sasl2_sasl_client_init=yes
37273 else
37274   echo "$as_me: failed program was:" >&5
37275 sed 's/^/| /' conftest.$ac_ext >&5
37276
37277 ac_cv_lib_sasl2_sasl_client_init=no
37278 fi
37279 rm -f conftest.err conftest.$ac_objext \
37280       conftest$ac_exeext conftest.$ac_ext
37281 LIBS=$ac_check_lib_save_LIBS
37282 fi
37283 echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_sasl_client_init" >&5
37284 echo "${ECHO_T}$ac_cv_lib_sasl2_sasl_client_init" >&6
37285 if test $ac_cv_lib_sasl2_sasl_client_init = yes; then
37286   ol_link_sasl="-lsasl2"
37287 else
37288   echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl" >&5
37289 echo $ECHO_N "checking for sasl_client_init in -lsasl... $ECHO_C" >&6
37290 if test "${ac_cv_lib_sasl_sasl_client_init+set}" = set; then
37291   echo $ECHO_N "(cached) $ECHO_C" >&6
37292 else
37293   ac_check_lib_save_LIBS=$LIBS
37294 LIBS="-lsasl  $LIBS"
37295 cat >conftest.$ac_ext <<_ACEOF
37296 /* confdefs.h.  */
37297 _ACEOF
37298 cat confdefs.h >>conftest.$ac_ext
37299 cat >>conftest.$ac_ext <<_ACEOF
37300 /* end confdefs.h.  */
37301
37302 /* Override any gcc2 internal prototype to avoid an error.  */
37303 #ifdef __cplusplus
37304 extern "C"
37305 #endif
37306 /* We use char because int might match the return type of a gcc2
37307    builtin and then its argument prototype would still apply.  */
37308 char sasl_client_init ();
37309 int
37310 main ()
37311 {
37312 sasl_client_init ();
37313   ;
37314   return 0;
37315 }
37316 _ACEOF
37317 rm -f conftest.$ac_objext conftest$ac_exeext
37318 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37319   (eval $ac_link) 2>conftest.er1
37320   ac_status=$?
37321   grep -v '^ *+' conftest.er1 >conftest.err
37322   rm -f conftest.er1
37323   cat conftest.err >&5
37324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37325   (exit $ac_status); } &&
37326          { ac_try='test -z "$ac_c_werror_flag"
37327                          || test ! -s conftest.err'
37328   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37329   (eval $ac_try) 2>&5
37330   ac_status=$?
37331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37332   (exit $ac_status); }; } &&
37333          { ac_try='test -s conftest$ac_exeext'
37334   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37335   (eval $ac_try) 2>&5
37336   ac_status=$?
37337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37338   (exit $ac_status); }; }; then
37339   ac_cv_lib_sasl_sasl_client_init=yes
37340 else
37341   echo "$as_me: failed program was:" >&5
37342 sed 's/^/| /' conftest.$ac_ext >&5
37343
37344 ac_cv_lib_sasl_sasl_client_init=no
37345 fi
37346 rm -f conftest.err conftest.$ac_objext \
37347       conftest$ac_exeext conftest.$ac_ext
37348 LIBS=$ac_check_lib_save_LIBS
37349 fi
37350 echo "$as_me:$LINENO: result: $ac_cv_lib_sasl_sasl_client_init" >&5
37351 echo "${ECHO_T}$ac_cv_lib_sasl_sasl_client_init" >&6
37352 if test $ac_cv_lib_sasl_sasl_client_init = yes; then
37353   ol_link_sasl="-lsasl"
37354 fi
37355
37356 fi
37357
37358         fi
37359
37360         if test $ol_link_sasl = no ; then
37361                 if test $ol_with_cyrus_sasl != auto ; then
37362                         { { echo "$as_me:$LINENO: error: Could not locate Cyrus SASL" >&5
37363 echo "$as_me: error: Could not locate Cyrus SASL" >&2;}
37364    { (exit 1); exit 1; }; }
37365                 else
37366                         { echo "$as_me:$LINENO: WARNING: Could not locate Cyrus SASL" >&5
37367 echo "$as_me: WARNING: Could not locate Cyrus SASL" >&2;}
37368                         { echo "$as_me:$LINENO: WARNING: SASL authentication not supported!" >&5
37369 echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
37370                         if test $ol_link_tls = no ; then
37371                                 { echo "$as_me:$LINENO: WARNING: Strong authentication not supported!" >&5
37372 echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
37373                         fi
37374                 fi
37375         else
37376                 echo "$as_me:$LINENO: checking Cyrus SASL library version" >&5
37377 echo $ECHO_N "checking Cyrus SASL library version... $ECHO_C" >&6
37378 if test "${ol_cv_sasl_compat+set}" = set; then
37379   echo $ECHO_N "(cached) $ECHO_C" >&6
37380 else
37381
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
37389 #ifdef HAVE_SASL_SASL_H
37390 #include <sasl/sasl.h>
37391 #else
37392 #include <sasl.h>
37393 #endif
37394
37395 /* Require 2.1.15+ */
37396 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
37397         char *__sasl_compat = "2.2+ or better okay (we guess)";
37398 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
37399         && SASL_VERSION_STEP >=15
37400         char *__sasl_compat = "2.1.15+ or better okay";
37401 #endif
37402
37403 _ACEOF
37404 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37405   $EGREP "__sasl_compat" >/dev/null 2>&1; then
37406   ol_cv_sasl_compat=yes
37407 else
37408   ol_cv_sasl_compat=no
37409 fi
37410 rm -f conftest*
37411
37412 fi
37413 echo "$as_me:$LINENO: result: $ol_cv_sasl_compat" >&5
37414 echo "${ECHO_T}$ol_cv_sasl_compat" >&6
37415
37416                 if test $ol_cv_sasl_compat = no ; then
37417                         ol_link_sasl=no
37418                         { { echo "$as_me:$LINENO: error: Cyrus SASL library located but is incompatible" >&5
37419 echo "$as_me: error: Cyrus SASL library located but is incompatible" >&2;}
37420    { (exit 1); exit 1; }; }
37421                 fi
37422
37423
37424 cat >>confdefs.h <<\_ACEOF
37425 #define HAVE_CYRUS_SASL 1
37426 _ACEOF
37427
37428                 SASL_LIBS="$ol_link_sasl"
37429                 if test $ol_enable_spasswd != no ; then
37430                         ol_link_spasswd=yes
37431                 fi
37432
37433                 ac_save_LIBS="$LIBS"
37434                 LIBS="$LIBS $ol_link_sasl"
37435                 echo "$as_me:$LINENO: checking for sasl_version" >&5
37436 echo $ECHO_N "checking for sasl_version... $ECHO_C" >&6
37437 if test "${ac_cv_func_sasl_version+set}" = set; then
37438   echo $ECHO_N "(cached) $ECHO_C" >&6
37439 else
37440   cat >conftest.$ac_ext <<_ACEOF
37441 /* confdefs.h.  */
37442 _ACEOF
37443 cat confdefs.h >>conftest.$ac_ext
37444 cat >>conftest.$ac_ext <<_ACEOF
37445 /* end confdefs.h.  */
37446 /* Define sasl_version to an innocuous variant, in case <limits.h> declares sasl_version.
37447    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
37448 #define sasl_version innocuous_sasl_version
37449
37450 /* System header to define __stub macros and hopefully few prototypes,
37451     which can conflict with char sasl_version (); below.
37452     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
37453     <limits.h> exists even on freestanding compilers.  */
37454
37455 #ifdef __STDC__
37456 # include <limits.h>
37457 #else
37458 # include <assert.h>
37459 #endif
37460
37461 #undef sasl_version
37462
37463 /* Override any gcc2 internal prototype to avoid an error.  */
37464 #ifdef __cplusplus
37465 extern "C"
37466 {
37467 #endif
37468 /* We use char because int might match the return type of a gcc2
37469    builtin and then its argument prototype would still apply.  */
37470 char sasl_version ();
37471 /* The GNU C library defines this for functions which it implements
37472     to always fail with ENOSYS.  Some functions are actually named
37473     something starting with __ and the normal name is an alias.  */
37474 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
37475 choke me
37476 #else
37477 char (*f) () = sasl_version;
37478 #endif
37479 #ifdef __cplusplus
37480 }
37481 #endif
37482
37483 int
37484 main ()
37485 {
37486 return f != sasl_version;
37487   ;
37488   return 0;
37489 }
37490 _ACEOF
37491 rm -f conftest.$ac_objext conftest$ac_exeext
37492 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37493   (eval $ac_link) 2>conftest.er1
37494   ac_status=$?
37495   grep -v '^ *+' conftest.er1 >conftest.err
37496   rm -f conftest.er1
37497   cat conftest.err >&5
37498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37499   (exit $ac_status); } &&
37500          { ac_try='test -z "$ac_c_werror_flag"
37501                          || test ! -s conftest.err'
37502   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37503   (eval $ac_try) 2>&5
37504   ac_status=$?
37505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37506   (exit $ac_status); }; } &&
37507          { ac_try='test -s conftest$ac_exeext'
37508   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37509   (eval $ac_try) 2>&5
37510   ac_status=$?
37511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37512   (exit $ac_status); }; }; then
37513   ac_cv_func_sasl_version=yes
37514 else
37515   echo "$as_me: failed program was:" >&5
37516 sed 's/^/| /' conftest.$ac_ext >&5
37517
37518 ac_cv_func_sasl_version=no
37519 fi
37520 rm -f conftest.err conftest.$ac_objext \
37521       conftest$ac_exeext conftest.$ac_ext
37522 fi
37523 echo "$as_me:$LINENO: result: $ac_cv_func_sasl_version" >&5
37524 echo "${ECHO_T}$ac_cv_func_sasl_version" >&6
37525 if test $ac_cv_func_sasl_version = yes; then
37526
37527 cat >>confdefs.h <<\_ACEOF
37528 #define HAVE_SASL_VERSION 1
37529 _ACEOF
37530
37531 fi
37532
37533                 LIBS="$ac_save_LIBS"
37534
37535                 WITH_SASL=yes
37536         fi
37537
37538 else
37539         { echo "$as_me:$LINENO: WARNING: SASL authentication not supported!" >&5
37540 echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
37541         if test $ol_link_tls = no ; then
37542                 { echo "$as_me:$LINENO: WARNING: Strong authentication not supported!" >&5
37543 echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
37544         fi
37545 fi
37546
37547 if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
37548         dev=no
37549         if test -r /dev/urandom ; then
37550                 dev="/dev/urandom";
37551         elif test -r /idev/urandom ; then
37552                 dev="/idev/urandom";
37553         elif test -r /dev/srandom ; then
37554                 dev="/dev/srandom";
37555         elif test -r /dev/random ; then
37556                 dev="/dev/random";
37557         elif test -r /idev/random ; then
37558                 dev="/idev/random";
37559         fi
37560
37561         if test $dev != no ; then
37562
37563 cat >>confdefs.h <<_ACEOF
37564 #define URANDOM_DEVICE "$dev"
37565 _ACEOF
37566
37567         fi
37568 fi
37569
37570 ol_link_fetch=no
37571 if test $ol_with_fetch != no ; then
37572         ol_LIBS=$LIBS
37573 LIBS="-lfetch -lcom_err $LIBS"
37574 echo "$as_me:$LINENO: checking fetch(3) library" >&5
37575 echo $ECHO_N "checking fetch(3) library... $ECHO_C" >&6
37576 if test "${ol_cv_lib_fetch+set}" = set; then
37577   echo $ECHO_N "(cached) $ECHO_C" >&6
37578 else
37579
37580         cat >conftest.$ac_ext <<_ACEOF
37581 /* confdefs.h.  */
37582 _ACEOF
37583 cat confdefs.h >>conftest.$ac_ext
37584 cat >>conftest.$ac_ext <<_ACEOF
37585 /* end confdefs.h.  */
37586
37587 #include <sys/param.h>
37588 #include <stdio.h>
37589 #include <fetch.h>
37590 int
37591 main ()
37592 {
37593 struct url *u = fetchParseURL("file:///");
37594   ;
37595   return 0;
37596 }
37597 _ACEOF
37598 rm -f conftest.$ac_objext conftest$ac_exeext
37599 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37600   (eval $ac_link) 2>conftest.er1
37601   ac_status=$?
37602   grep -v '^ *+' conftest.er1 >conftest.err
37603   rm -f conftest.er1
37604   cat conftest.err >&5
37605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37606   (exit $ac_status); } &&
37607          { ac_try='test -z "$ac_c_werror_flag"
37608                          || test ! -s conftest.err'
37609   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37610   (eval $ac_try) 2>&5
37611   ac_status=$?
37612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37613   (exit $ac_status); }; } &&
37614          { ac_try='test -s conftest$ac_exeext'
37615   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37616   (eval $ac_try) 2>&5
37617   ac_status=$?
37618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37619   (exit $ac_status); }; }; then
37620   ol_cv_lib_fetch=yes
37621 else
37622   echo "$as_me: failed program was:" >&5
37623 sed 's/^/| /' conftest.$ac_ext >&5
37624
37625 ol_cv_lib_fetch=no
37626 fi
37627 rm -f conftest.err conftest.$ac_objext \
37628       conftest$ac_exeext conftest.$ac_ext
37629 fi
37630 echo "$as_me:$LINENO: result: $ol_cv_lib_fetch" >&5
37631 echo "${ECHO_T}$ol_cv_lib_fetch" >&6
37632 LIBS=$ol_LIBS
37633 if test $ol_cv_lib_fetch != no ; then
37634         ol_link_fetch="-lfetch -lcom_err"
37635
37636 cat >>confdefs.h <<\_ACEOF
37637 #define HAVE_FETCH 1
37638 _ACEOF
37639
37640 fi
37641
37642
37643         if test $ol_cv_lib_fetch != no ; then
37644                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
37645                 ol_link_fetch=freebsd
37646
37647         elif test $ol_with_fetch != auto ; then
37648                 { { echo "$as_me:$LINENO: error: no suitable API for --with-fetch=$ol_with_fetch" >&5
37649 echo "$as_me: error: no suitable API for --with-fetch=$ol_with_fetch" >&2;}
37650    { (exit 1); exit 1; }; }
37651         fi
37652 fi
37653
37654 if test $ol_enable_crypt != no ; then
37655         save_LIBS="$LIBS"
37656         LIBS="$TLS_LIBS $LIBS"
37657
37658         echo "$as_me:$LINENO: checking for crypt" >&5
37659 echo $ECHO_N "checking for crypt... $ECHO_C" >&6
37660 if test "${ac_cv_func_crypt+set}" = set; then
37661   echo $ECHO_N "(cached) $ECHO_C" >&6
37662 else
37663   cat >conftest.$ac_ext <<_ACEOF
37664 /* confdefs.h.  */
37665 _ACEOF
37666 cat confdefs.h >>conftest.$ac_ext
37667 cat >>conftest.$ac_ext <<_ACEOF
37668 /* end confdefs.h.  */
37669 /* Define crypt to an innocuous variant, in case <limits.h> declares crypt.
37670    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
37671 #define crypt innocuous_crypt
37672
37673 /* System header to define __stub macros and hopefully few prototypes,
37674     which can conflict with char crypt (); below.
37675     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
37676     <limits.h> exists even on freestanding compilers.  */
37677
37678 #ifdef __STDC__
37679 # include <limits.h>
37680 #else
37681 # include <assert.h>
37682 #endif
37683
37684 #undef crypt
37685
37686 /* Override any gcc2 internal prototype to avoid an error.  */
37687 #ifdef __cplusplus
37688 extern "C"
37689 {
37690 #endif
37691 /* We use char because int might match the return type of a gcc2
37692    builtin and then its argument prototype would still apply.  */
37693 char crypt ();
37694 /* The GNU C library defines this for functions which it implements
37695     to always fail with ENOSYS.  Some functions are actually named
37696     something starting with __ and the normal name is an alias.  */
37697 #if defined (__stub_crypt) || defined (__stub___crypt)
37698 choke me
37699 #else
37700 char (*f) () = crypt;
37701 #endif
37702 #ifdef __cplusplus
37703 }
37704 #endif
37705
37706 int
37707 main ()
37708 {
37709 return f != crypt;
37710   ;
37711   return 0;
37712 }
37713 _ACEOF
37714 rm -f conftest.$ac_objext conftest$ac_exeext
37715 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37716   (eval $ac_link) 2>conftest.er1
37717   ac_status=$?
37718   grep -v '^ *+' conftest.er1 >conftest.err
37719   rm -f conftest.er1
37720   cat conftest.err >&5
37721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37722   (exit $ac_status); } &&
37723          { ac_try='test -z "$ac_c_werror_flag"
37724                          || test ! -s conftest.err'
37725   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37726   (eval $ac_try) 2>&5
37727   ac_status=$?
37728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37729   (exit $ac_status); }; } &&
37730          { ac_try='test -s conftest$ac_exeext'
37731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37732   (eval $ac_try) 2>&5
37733   ac_status=$?
37734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37735   (exit $ac_status); }; }; then
37736   ac_cv_func_crypt=yes
37737 else
37738   echo "$as_me: failed program was:" >&5
37739 sed 's/^/| /' conftest.$ac_ext >&5
37740
37741 ac_cv_func_crypt=no
37742 fi
37743 rm -f conftest.err conftest.$ac_objext \
37744       conftest$ac_exeext conftest.$ac_ext
37745 fi
37746 echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
37747 echo "${ECHO_T}$ac_cv_func_crypt" >&6
37748 if test $ac_cv_func_crypt = yes; then
37749   have_crypt=yes
37750 else
37751
37752                 LIBS="$save_LIBS"
37753                 echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
37754 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
37755 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
37756   echo $ECHO_N "(cached) $ECHO_C" >&6
37757 else
37758   ac_check_lib_save_LIBS=$LIBS
37759 LIBS="-lcrypt  $LIBS"
37760 cat >conftest.$ac_ext <<_ACEOF
37761 /* confdefs.h.  */
37762 _ACEOF
37763 cat confdefs.h >>conftest.$ac_ext
37764 cat >>conftest.$ac_ext <<_ACEOF
37765 /* end confdefs.h.  */
37766
37767 /* Override any gcc2 internal prototype to avoid an error.  */
37768 #ifdef __cplusplus
37769 extern "C"
37770 #endif
37771 /* We use char because int might match the return type of a gcc2
37772    builtin and then its argument prototype would still apply.  */
37773 char crypt ();
37774 int
37775 main ()
37776 {
37777 crypt ();
37778   ;
37779   return 0;
37780 }
37781 _ACEOF
37782 rm -f conftest.$ac_objext conftest$ac_exeext
37783 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37784   (eval $ac_link) 2>conftest.er1
37785   ac_status=$?
37786   grep -v '^ *+' conftest.er1 >conftest.err
37787   rm -f conftest.er1
37788   cat conftest.err >&5
37789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37790   (exit $ac_status); } &&
37791          { ac_try='test -z "$ac_c_werror_flag"
37792                          || test ! -s conftest.err'
37793   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37794   (eval $ac_try) 2>&5
37795   ac_status=$?
37796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37797   (exit $ac_status); }; } &&
37798          { ac_try='test -s conftest$ac_exeext'
37799   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37800   (eval $ac_try) 2>&5
37801   ac_status=$?
37802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37803   (exit $ac_status); }; }; then
37804   ac_cv_lib_crypt_crypt=yes
37805 else
37806   echo "$as_me: failed program was:" >&5
37807 sed 's/^/| /' conftest.$ac_ext >&5
37808
37809 ac_cv_lib_crypt_crypt=no
37810 fi
37811 rm -f conftest.err conftest.$ac_objext \
37812       conftest$ac_exeext conftest.$ac_ext
37813 LIBS=$ac_check_lib_save_LIBS
37814 fi
37815 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
37816 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
37817 if test $ac_cv_lib_crypt_crypt = yes; then
37818   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
37819                         have_crypt=yes
37820 else
37821   have_crypt=no
37822 fi
37823
37824 fi
37825
37826
37827         LIBS="$save_LIBS"
37828
37829         if test $have_crypt = yes ; then
37830
37831 cat >>confdefs.h <<\_ACEOF
37832 #define HAVE_CRYPT 1
37833 _ACEOF
37834
37835         else
37836                 { echo "$as_me:$LINENO: WARNING: could not find crypt" >&5
37837 echo "$as_me: WARNING: could not find crypt" >&2;}
37838                 if test $ol_enable_crypt = yes ; then
37839                         { { echo "$as_me:$LINENO: error: could not find crypt, select appropriate options or disable" >&5
37840 echo "$as_me: error: could not find crypt, select appropriate options or disable" >&2;}
37841    { (exit 1); exit 1; }; }
37842                 fi
37843
37844                 { echo "$as_me:$LINENO: WARNING: disabling crypt support" >&5
37845 echo "$as_me: WARNING: disabling crypt support" >&2;}
37846                 ol_enable_crypt=no
37847         fi
37848 fi
37849
37850 if test $ol_enable_proctitle != no ; then
37851         echo "$as_me:$LINENO: checking for setproctitle" >&5
37852 echo $ECHO_N "checking for setproctitle... $ECHO_C" >&6
37853 if test "${ac_cv_func_setproctitle+set}" = set; then
37854   echo $ECHO_N "(cached) $ECHO_C" >&6
37855 else
37856   cat >conftest.$ac_ext <<_ACEOF
37857 /* confdefs.h.  */
37858 _ACEOF
37859 cat confdefs.h >>conftest.$ac_ext
37860 cat >>conftest.$ac_ext <<_ACEOF
37861 /* end confdefs.h.  */
37862 /* Define setproctitle to an innocuous variant, in case <limits.h> declares setproctitle.
37863    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
37864 #define setproctitle innocuous_setproctitle
37865
37866 /* System header to define __stub macros and hopefully few prototypes,
37867     which can conflict with char setproctitle (); below.
37868     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
37869     <limits.h> exists even on freestanding compilers.  */
37870
37871 #ifdef __STDC__
37872 # include <limits.h>
37873 #else
37874 # include <assert.h>
37875 #endif
37876
37877 #undef setproctitle
37878
37879 /* Override any gcc2 internal prototype to avoid an error.  */
37880 #ifdef __cplusplus
37881 extern "C"
37882 {
37883 #endif
37884 /* We use char because int might match the return type of a gcc2
37885    builtin and then its argument prototype would still apply.  */
37886 char setproctitle ();
37887 /* The GNU C library defines this for functions which it implements
37888     to always fail with ENOSYS.  Some functions are actually named
37889     something starting with __ and the normal name is an alias.  */
37890 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
37891 choke me
37892 #else
37893 char (*f) () = setproctitle;
37894 #endif
37895 #ifdef __cplusplus
37896 }
37897 #endif
37898
37899 int
37900 main ()
37901 {
37902 return f != setproctitle;
37903   ;
37904   return 0;
37905 }
37906 _ACEOF
37907 rm -f conftest.$ac_objext conftest$ac_exeext
37908 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37909   (eval $ac_link) 2>conftest.er1
37910   ac_status=$?
37911   grep -v '^ *+' conftest.er1 >conftest.err
37912   rm -f conftest.er1
37913   cat conftest.err >&5
37914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37915   (exit $ac_status); } &&
37916          { ac_try='test -z "$ac_c_werror_flag"
37917                          || test ! -s conftest.err'
37918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37919   (eval $ac_try) 2>&5
37920   ac_status=$?
37921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37922   (exit $ac_status); }; } &&
37923          { ac_try='test -s conftest$ac_exeext'
37924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37925   (eval $ac_try) 2>&5
37926   ac_status=$?
37927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37928   (exit $ac_status); }; }; then
37929   ac_cv_func_setproctitle=yes
37930 else
37931   echo "$as_me: failed program was:" >&5
37932 sed 's/^/| /' conftest.$ac_ext >&5
37933
37934 ac_cv_func_setproctitle=no
37935 fi
37936 rm -f conftest.err conftest.$ac_objext \
37937       conftest$ac_exeext conftest.$ac_ext
37938 fi
37939 echo "$as_me:$LINENO: result: $ac_cv_func_setproctitle" >&5
37940 echo "${ECHO_T}$ac_cv_func_setproctitle" >&6
37941 if test $ac_cv_func_setproctitle = yes; then
37942   have_setproctitle=yes
37943 else
37944
37945                 echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
37946 echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
37947 if test "${ac_cv_lib_util_setproctitle+set}" = set; then
37948   echo $ECHO_N "(cached) $ECHO_C" >&6
37949 else
37950   ac_check_lib_save_LIBS=$LIBS
37951 LIBS="-lutil  $LIBS"
37952 cat >conftest.$ac_ext <<_ACEOF
37953 /* confdefs.h.  */
37954 _ACEOF
37955 cat confdefs.h >>conftest.$ac_ext
37956 cat >>conftest.$ac_ext <<_ACEOF
37957 /* end confdefs.h.  */
37958
37959 /* Override any gcc2 internal prototype to avoid an error.  */
37960 #ifdef __cplusplus
37961 extern "C"
37962 #endif
37963 /* We use char because int might match the return type of a gcc2
37964    builtin and then its argument prototype would still apply.  */
37965 char setproctitle ();
37966 int
37967 main ()
37968 {
37969 setproctitle ();
37970   ;
37971   return 0;
37972 }
37973 _ACEOF
37974 rm -f conftest.$ac_objext conftest$ac_exeext
37975 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37976   (eval $ac_link) 2>conftest.er1
37977   ac_status=$?
37978   grep -v '^ *+' conftest.er1 >conftest.err
37979   rm -f conftest.er1
37980   cat conftest.err >&5
37981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37982   (exit $ac_status); } &&
37983          { ac_try='test -z "$ac_c_werror_flag"
37984                          || test ! -s conftest.err'
37985   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37986   (eval $ac_try) 2>&5
37987   ac_status=$?
37988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37989   (exit $ac_status); }; } &&
37990          { ac_try='test -s conftest$ac_exeext'
37991   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37992   (eval $ac_try) 2>&5
37993   ac_status=$?
37994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37995   (exit $ac_status); }; }; then
37996   ac_cv_lib_util_setproctitle=yes
37997 else
37998   echo "$as_me: failed program was:" >&5
37999 sed 's/^/| /' conftest.$ac_ext >&5
38000
38001 ac_cv_lib_util_setproctitle=no
38002 fi
38003 rm -f conftest.err conftest.$ac_objext \
38004       conftest$ac_exeext conftest.$ac_ext
38005 LIBS=$ac_check_lib_save_LIBS
38006 fi
38007 echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
38008 echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
38009 if test $ac_cv_lib_util_setproctitle = yes; then
38010   have_setproctitle=yes
38011                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
38012 else
38013   have_setproctitle=no
38014                         case $LIBOBJS in
38015     "setproctitle.$ac_objext"   | \
38016   *" setproctitle.$ac_objext"   | \
38017     "setproctitle.$ac_objext "* | \
38018   *" setproctitle.$ac_objext "* ) ;;
38019   *) LIBOBJS="$LIBOBJS setproctitle.$ac_objext" ;;
38020 esac
38021
38022                         LIBSRCS="$LIBSRCS setproctitle.c"
38023 fi
38024
38025 fi
38026
38027
38028         if test $have_setproctitle = yes ; then
38029
38030 cat >>confdefs.h <<\_ACEOF
38031 #define HAVE_SETPROCTITLE 1
38032 _ACEOF
38033
38034         fi
38035 fi
38036
38037 if test $ol_enable_slp != no ; then
38038
38039 for ac_header in slp.h
38040 do
38041 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
38042 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38043   echo "$as_me:$LINENO: checking for $ac_header" >&5
38044 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
38045 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38046   echo $ECHO_N "(cached) $ECHO_C" >&6
38047 fi
38048 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
38049 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
38050 else
38051   # Is the header compilable?
38052 echo "$as_me:$LINENO: checking $ac_header usability" >&5
38053 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
38054 cat >conftest.$ac_ext <<_ACEOF
38055 /* confdefs.h.  */
38056 _ACEOF
38057 cat confdefs.h >>conftest.$ac_ext
38058 cat >>conftest.$ac_ext <<_ACEOF
38059 /* end confdefs.h.  */
38060 $ac_includes_default
38061 #include <$ac_header>
38062 _ACEOF
38063 rm -f conftest.$ac_objext
38064 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38065   (eval $ac_compile) 2>conftest.er1
38066   ac_status=$?
38067   grep -v '^ *+' conftest.er1 >conftest.err
38068   rm -f conftest.er1
38069   cat conftest.err >&5
38070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38071   (exit $ac_status); } &&
38072          { ac_try='test -z "$ac_c_werror_flag"
38073                          || test ! -s conftest.err'
38074   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38075   (eval $ac_try) 2>&5
38076   ac_status=$?
38077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38078   (exit $ac_status); }; } &&
38079          { ac_try='test -s conftest.$ac_objext'
38080   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38081   (eval $ac_try) 2>&5
38082   ac_status=$?
38083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38084   (exit $ac_status); }; }; then
38085   ac_header_compiler=yes
38086 else
38087   echo "$as_me: failed program was:" >&5
38088 sed 's/^/| /' conftest.$ac_ext >&5
38089
38090 ac_header_compiler=no
38091 fi
38092 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38093 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
38094 echo "${ECHO_T}$ac_header_compiler" >&6
38095
38096 # Is the header present?
38097 echo "$as_me:$LINENO: checking $ac_header presence" >&5
38098 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
38099 cat >conftest.$ac_ext <<_ACEOF
38100 /* confdefs.h.  */
38101 _ACEOF
38102 cat confdefs.h >>conftest.$ac_ext
38103 cat >>conftest.$ac_ext <<_ACEOF
38104 /* end confdefs.h.  */
38105 #include <$ac_header>
38106 _ACEOF
38107 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
38108   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
38109   ac_status=$?
38110   grep -v '^ *+' conftest.er1 >conftest.err
38111   rm -f conftest.er1
38112   cat conftest.err >&5
38113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38114   (exit $ac_status); } >/dev/null; then
38115   if test -s conftest.err; then
38116     ac_cpp_err=$ac_c_preproc_warn_flag
38117     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
38118   else
38119     ac_cpp_err=
38120   fi
38121 else
38122   ac_cpp_err=yes
38123 fi
38124 if test -z "$ac_cpp_err"; then
38125   ac_header_preproc=yes
38126 else
38127   echo "$as_me: failed program was:" >&5
38128 sed 's/^/| /' conftest.$ac_ext >&5
38129
38130   ac_header_preproc=no
38131 fi
38132 rm -f conftest.err conftest.$ac_ext
38133 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
38134 echo "${ECHO_T}$ac_header_preproc" >&6
38135
38136 # So?  What about this header?
38137 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
38138   yes:no: )
38139     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
38140 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
38141     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
38142 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
38143     ac_header_preproc=yes
38144     ;;
38145   no:yes:* )
38146     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
38147 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
38148     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
38149 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
38150     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
38151 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
38152     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
38153 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
38154     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
38155 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
38156     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
38157 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
38158     (
38159       cat <<\_ASBOX
38160 ## --------------------------------------------- ##
38161 ## Report this to <http://www.openldap.org/its/> ##
38162 ## --------------------------------------------- ##
38163 _ASBOX
38164     ) |
38165       sed "s/^/$as_me: WARNING:     /" >&2
38166     ;;
38167 esac
38168 echo "$as_me:$LINENO: checking for $ac_header" >&5
38169 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
38170 if eval "test \"\${$as_ac_Header+set}\" = set"; then
38171   echo $ECHO_N "(cached) $ECHO_C" >&6
38172 else
38173   eval "$as_ac_Header=\$ac_header_preproc"
38174 fi
38175 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
38176 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
38177
38178 fi
38179 if test `eval echo '${'$as_ac_Header'}'` = yes; then
38180   cat >>confdefs.h <<_ACEOF
38181 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
38182 _ACEOF
38183
38184 fi
38185
38186 done
38187
38188
38189         if test $ac_cv_header_slp_h = yes ; then
38190                 echo "$as_me:$LINENO: checking for SLPOpen in -lslp" >&5
38191 echo $ECHO_N "checking for SLPOpen in -lslp... $ECHO_C" >&6
38192 if test "${ac_cv_lib_slp_SLPOpen+set}" = set; then
38193   echo $ECHO_N "(cached) $ECHO_C" >&6
38194 else
38195   ac_check_lib_save_LIBS=$LIBS
38196 LIBS="-lslp  $LIBS"
38197 cat >conftest.$ac_ext <<_ACEOF
38198 /* confdefs.h.  */
38199 _ACEOF
38200 cat confdefs.h >>conftest.$ac_ext
38201 cat >>conftest.$ac_ext <<_ACEOF
38202 /* end confdefs.h.  */
38203
38204 /* Override any gcc2 internal prototype to avoid an error.  */
38205 #ifdef __cplusplus
38206 extern "C"
38207 #endif
38208 /* We use char because int might match the return type of a gcc2
38209    builtin and then its argument prototype would still apply.  */
38210 char SLPOpen ();
38211 int
38212 main ()
38213 {
38214 SLPOpen ();
38215   ;
38216   return 0;
38217 }
38218 _ACEOF
38219 rm -f conftest.$ac_objext conftest$ac_exeext
38220 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38221   (eval $ac_link) 2>conftest.er1
38222   ac_status=$?
38223   grep -v '^ *+' conftest.er1 >conftest.err
38224   rm -f conftest.er1
38225   cat conftest.err >&5
38226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38227   (exit $ac_status); } &&
38228          { ac_try='test -z "$ac_c_werror_flag"
38229                          || test ! -s conftest.err'
38230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38231   (eval $ac_try) 2>&5
38232   ac_status=$?
38233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38234   (exit $ac_status); }; } &&
38235          { ac_try='test -s conftest$ac_exeext'
38236   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38237   (eval $ac_try) 2>&5
38238   ac_status=$?
38239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38240   (exit $ac_status); }; }; then
38241   ac_cv_lib_slp_SLPOpen=yes
38242 else
38243   echo "$as_me: failed program was:" >&5
38244 sed 's/^/| /' conftest.$ac_ext >&5
38245
38246 ac_cv_lib_slp_SLPOpen=no
38247 fi
38248 rm -f conftest.err conftest.$ac_objext \
38249       conftest$ac_exeext conftest.$ac_ext
38250 LIBS=$ac_check_lib_save_LIBS
38251 fi
38252 echo "$as_me:$LINENO: result: $ac_cv_lib_slp_SLPOpen" >&5
38253 echo "${ECHO_T}$ac_cv_lib_slp_SLPOpen" >&6
38254 if test $ac_cv_lib_slp_SLPOpen = yes; then
38255   have_slp=yes
38256 else
38257   have_slp=no
38258 fi
38259
38260                 if test $have_slp = yes ; then
38261
38262 cat >>confdefs.h <<\_ACEOF
38263 #define HAVE_SLP 1
38264 _ACEOF
38265
38266                         SLAPD_SLP_LIBS=-lslp
38267                 fi
38268
38269         elif test $ol_enable_slp = yes ; then
38270                 { { echo "$as_me:$LINENO: error: SLP not found" >&5
38271 echo "$as_me: error: SLP not found" >&2;}
38272    { (exit 1); exit 1; }; }
38273         fi
38274 fi
38275
38276
38277 echo "$as_me:$LINENO: checking for mode_t" >&5
38278 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
38279 if test "${ac_cv_type_mode_t+set}" = set; then
38280   echo $ECHO_N "(cached) $ECHO_C" >&6
38281 else
38282   cat >conftest.$ac_ext <<_ACEOF
38283 /* confdefs.h.  */
38284 _ACEOF
38285 cat confdefs.h >>conftest.$ac_ext
38286 cat >>conftest.$ac_ext <<_ACEOF
38287 /* end confdefs.h.  */
38288 $ac_includes_default
38289 int
38290 main ()
38291 {
38292 if ((mode_t *) 0)
38293   return 0;
38294 if (sizeof (mode_t))
38295   return 0;
38296   ;
38297   return 0;
38298 }
38299 _ACEOF
38300 rm -f conftest.$ac_objext
38301 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38302   (eval $ac_compile) 2>conftest.er1
38303   ac_status=$?
38304   grep -v '^ *+' conftest.er1 >conftest.err
38305   rm -f conftest.er1
38306   cat conftest.err >&5
38307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38308   (exit $ac_status); } &&
38309          { ac_try='test -z "$ac_c_werror_flag"
38310                          || test ! -s conftest.err'
38311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38312   (eval $ac_try) 2>&5
38313   ac_status=$?
38314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38315   (exit $ac_status); }; } &&
38316          { ac_try='test -s conftest.$ac_objext'
38317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38318   (eval $ac_try) 2>&5
38319   ac_status=$?
38320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38321   (exit $ac_status); }; }; then
38322   ac_cv_type_mode_t=yes
38323 else
38324   echo "$as_me: failed program was:" >&5
38325 sed 's/^/| /' conftest.$ac_ext >&5
38326
38327 ac_cv_type_mode_t=no
38328 fi
38329 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38330 fi
38331 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
38332 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
38333 if test $ac_cv_type_mode_t = yes; then
38334   :
38335 else
38336
38337 cat >>confdefs.h <<_ACEOF
38338 #define mode_t int
38339 _ACEOF
38340
38341 fi
38342
38343 echo "$as_me:$LINENO: checking for off_t" >&5
38344 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
38345 if test "${ac_cv_type_off_t+set}" = set; then
38346   echo $ECHO_N "(cached) $ECHO_C" >&6
38347 else
38348   cat >conftest.$ac_ext <<_ACEOF
38349 /* confdefs.h.  */
38350 _ACEOF
38351 cat confdefs.h >>conftest.$ac_ext
38352 cat >>conftest.$ac_ext <<_ACEOF
38353 /* end confdefs.h.  */
38354 $ac_includes_default
38355 int
38356 main ()
38357 {
38358 if ((off_t *) 0)
38359   return 0;
38360 if (sizeof (off_t))
38361   return 0;
38362   ;
38363   return 0;
38364 }
38365 _ACEOF
38366 rm -f conftest.$ac_objext
38367 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38368   (eval $ac_compile) 2>conftest.er1
38369   ac_status=$?
38370   grep -v '^ *+' conftest.er1 >conftest.err
38371   rm -f conftest.er1
38372   cat conftest.err >&5
38373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38374   (exit $ac_status); } &&
38375          { ac_try='test -z "$ac_c_werror_flag"
38376                          || test ! -s conftest.err'
38377   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38378   (eval $ac_try) 2>&5
38379   ac_status=$?
38380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38381   (exit $ac_status); }; } &&
38382          { ac_try='test -s conftest.$ac_objext'
38383   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38384   (eval $ac_try) 2>&5
38385   ac_status=$?
38386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38387   (exit $ac_status); }; }; then
38388   ac_cv_type_off_t=yes
38389 else
38390   echo "$as_me: failed program was:" >&5
38391 sed 's/^/| /' conftest.$ac_ext >&5
38392
38393 ac_cv_type_off_t=no
38394 fi
38395 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38396 fi
38397 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
38398 echo "${ECHO_T}$ac_cv_type_off_t" >&6
38399 if test $ac_cv_type_off_t = yes; then
38400   :
38401 else
38402
38403 cat >>confdefs.h <<_ACEOF
38404 #define off_t long
38405 _ACEOF
38406
38407 fi
38408
38409 echo "$as_me:$LINENO: checking for pid_t" >&5
38410 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
38411 if test "${ac_cv_type_pid_t+set}" = set; then
38412   echo $ECHO_N "(cached) $ECHO_C" >&6
38413 else
38414   cat >conftest.$ac_ext <<_ACEOF
38415 /* confdefs.h.  */
38416 _ACEOF
38417 cat confdefs.h >>conftest.$ac_ext
38418 cat >>conftest.$ac_ext <<_ACEOF
38419 /* end confdefs.h.  */
38420 $ac_includes_default
38421 int
38422 main ()
38423 {
38424 if ((pid_t *) 0)
38425   return 0;
38426 if (sizeof (pid_t))
38427   return 0;
38428   ;
38429   return 0;
38430 }
38431 _ACEOF
38432 rm -f conftest.$ac_objext
38433 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38434   (eval $ac_compile) 2>conftest.er1
38435   ac_status=$?
38436   grep -v '^ *+' conftest.er1 >conftest.err
38437   rm -f conftest.er1
38438   cat conftest.err >&5
38439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38440   (exit $ac_status); } &&
38441          { ac_try='test -z "$ac_c_werror_flag"
38442                          || test ! -s conftest.err'
38443   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38444   (eval $ac_try) 2>&5
38445   ac_status=$?
38446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38447   (exit $ac_status); }; } &&
38448          { ac_try='test -s conftest.$ac_objext'
38449   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38450   (eval $ac_try) 2>&5
38451   ac_status=$?
38452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38453   (exit $ac_status); }; }; then
38454   ac_cv_type_pid_t=yes
38455 else
38456   echo "$as_me: failed program was:" >&5
38457 sed 's/^/| /' conftest.$ac_ext >&5
38458
38459 ac_cv_type_pid_t=no
38460 fi
38461 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38462 fi
38463 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
38464 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
38465 if test $ac_cv_type_pid_t = yes; then
38466   :
38467 else
38468
38469 cat >>confdefs.h <<_ACEOF
38470 #define pid_t int
38471 _ACEOF
38472
38473 fi
38474
38475 echo "$as_me:$LINENO: checking for ssize_t" >&5
38476 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
38477 if test "${ac_cv_type_ssize_t+set}" = set; then
38478   echo $ECHO_N "(cached) $ECHO_C" >&6
38479 else
38480   cat >conftest.$ac_ext <<_ACEOF
38481 /* confdefs.h.  */
38482 _ACEOF
38483 cat confdefs.h >>conftest.$ac_ext
38484 cat >>conftest.$ac_ext <<_ACEOF
38485 /* end confdefs.h.  */
38486 $ac_includes_default
38487 int
38488 main ()
38489 {
38490 if ((ssize_t *) 0)
38491   return 0;
38492 if (sizeof (ssize_t))
38493   return 0;
38494   ;
38495   return 0;
38496 }
38497 _ACEOF
38498 rm -f conftest.$ac_objext
38499 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38500   (eval $ac_compile) 2>conftest.er1
38501   ac_status=$?
38502   grep -v '^ *+' conftest.er1 >conftest.err
38503   rm -f conftest.er1
38504   cat conftest.err >&5
38505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38506   (exit $ac_status); } &&
38507          { ac_try='test -z "$ac_c_werror_flag"
38508                          || test ! -s conftest.err'
38509   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38510   (eval $ac_try) 2>&5
38511   ac_status=$?
38512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38513   (exit $ac_status); }; } &&
38514          { ac_try='test -s conftest.$ac_objext'
38515   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38516   (eval $ac_try) 2>&5
38517   ac_status=$?
38518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38519   (exit $ac_status); }; }; then
38520   ac_cv_type_ssize_t=yes
38521 else
38522   echo "$as_me: failed program was:" >&5
38523 sed 's/^/| /' conftest.$ac_ext >&5
38524
38525 ac_cv_type_ssize_t=no
38526 fi
38527 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38528 fi
38529 echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
38530 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
38531 if test $ac_cv_type_ssize_t = yes; then
38532   :
38533 else
38534
38535 cat >>confdefs.h <<_ACEOF
38536 #define ssize_t signed int
38537 _ACEOF
38538
38539 fi
38540
38541 echo "$as_me:$LINENO: checking for caddr_t" >&5
38542 echo $ECHO_N "checking for caddr_t... $ECHO_C" >&6
38543 if test "${ac_cv_type_caddr_t+set}" = set; then
38544   echo $ECHO_N "(cached) $ECHO_C" >&6
38545 else
38546   cat >conftest.$ac_ext <<_ACEOF
38547 /* confdefs.h.  */
38548 _ACEOF
38549 cat confdefs.h >>conftest.$ac_ext
38550 cat >>conftest.$ac_ext <<_ACEOF
38551 /* end confdefs.h.  */
38552 $ac_includes_default
38553 int
38554 main ()
38555 {
38556 if ((caddr_t *) 0)
38557   return 0;
38558 if (sizeof (caddr_t))
38559   return 0;
38560   ;
38561   return 0;
38562 }
38563 _ACEOF
38564 rm -f conftest.$ac_objext
38565 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38566   (eval $ac_compile) 2>conftest.er1
38567   ac_status=$?
38568   grep -v '^ *+' conftest.er1 >conftest.err
38569   rm -f conftest.er1
38570   cat conftest.err >&5
38571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38572   (exit $ac_status); } &&
38573          { ac_try='test -z "$ac_c_werror_flag"
38574                          || test ! -s conftest.err'
38575   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38576   (eval $ac_try) 2>&5
38577   ac_status=$?
38578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38579   (exit $ac_status); }; } &&
38580          { ac_try='test -s conftest.$ac_objext'
38581   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38582   (eval $ac_try) 2>&5
38583   ac_status=$?
38584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38585   (exit $ac_status); }; }; then
38586   ac_cv_type_caddr_t=yes
38587 else
38588   echo "$as_me: failed program was:" >&5
38589 sed 's/^/| /' conftest.$ac_ext >&5
38590
38591 ac_cv_type_caddr_t=no
38592 fi
38593 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38594 fi
38595 echo "$as_me:$LINENO: result: $ac_cv_type_caddr_t" >&5
38596 echo "${ECHO_T}$ac_cv_type_caddr_t" >&6
38597 if test $ac_cv_type_caddr_t = yes; then
38598   :
38599 else
38600
38601 cat >>confdefs.h <<_ACEOF
38602 #define caddr_t char *
38603 _ACEOF
38604
38605 fi
38606
38607 echo "$as_me:$LINENO: checking for size_t" >&5
38608 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
38609 if test "${ac_cv_type_size_t+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 $ac_includes_default
38619 int
38620 main ()
38621 {
38622 if ((size_t *) 0)
38623   return 0;
38624 if (sizeof (size_t))
38625   return 0;
38626   ;
38627   return 0;
38628 }
38629 _ACEOF
38630 rm -f conftest.$ac_objext
38631 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38632   (eval $ac_compile) 2>conftest.er1
38633   ac_status=$?
38634   grep -v '^ *+' conftest.er1 >conftest.err
38635   rm -f conftest.er1
38636   cat conftest.err >&5
38637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38638   (exit $ac_status); } &&
38639          { ac_try='test -z "$ac_c_werror_flag"
38640                          || test ! -s conftest.err'
38641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38642   (eval $ac_try) 2>&5
38643   ac_status=$?
38644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38645   (exit $ac_status); }; } &&
38646          { ac_try='test -s conftest.$ac_objext'
38647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38648   (eval $ac_try) 2>&5
38649   ac_status=$?
38650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38651   (exit $ac_status); }; }; then
38652   ac_cv_type_size_t=yes
38653 else
38654   echo "$as_me: failed program was:" >&5
38655 sed 's/^/| /' conftest.$ac_ext >&5
38656
38657 ac_cv_type_size_t=no
38658 fi
38659 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38660 fi
38661 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
38662 echo "${ECHO_T}$ac_cv_type_size_t" >&6
38663 if test $ac_cv_type_size_t = yes; then
38664   :
38665 else
38666
38667 cat >>confdefs.h <<_ACEOF
38668 #define size_t unsigned
38669 _ACEOF
38670
38671 fi
38672
38673
38674 echo "$as_me:$LINENO: checking for long long" >&5
38675 echo $ECHO_N "checking for long long... $ECHO_C" >&6
38676 if test "${ac_cv_type_long_long+set}" = set; then
38677   echo $ECHO_N "(cached) $ECHO_C" >&6
38678 else
38679   cat >conftest.$ac_ext <<_ACEOF
38680 /* confdefs.h.  */
38681 _ACEOF
38682 cat confdefs.h >>conftest.$ac_ext
38683 cat >>conftest.$ac_ext <<_ACEOF
38684 /* end confdefs.h.  */
38685 $ac_includes_default
38686 int
38687 main ()
38688 {
38689 if ((long long *) 0)
38690   return 0;
38691 if (sizeof (long long))
38692   return 0;
38693   ;
38694   return 0;
38695 }
38696 _ACEOF
38697 rm -f conftest.$ac_objext
38698 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38699   (eval $ac_compile) 2>conftest.er1
38700   ac_status=$?
38701   grep -v '^ *+' conftest.er1 >conftest.err
38702   rm -f conftest.er1
38703   cat conftest.err >&5
38704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38705   (exit $ac_status); } &&
38706          { ac_try='test -z "$ac_c_werror_flag"
38707                          || test ! -s conftest.err'
38708   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38709   (eval $ac_try) 2>&5
38710   ac_status=$?
38711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38712   (exit $ac_status); }; } &&
38713          { ac_try='test -s conftest.$ac_objext'
38714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38715   (eval $ac_try) 2>&5
38716   ac_status=$?
38717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38718   (exit $ac_status); }; }; then
38719   ac_cv_type_long_long=yes
38720 else
38721   echo "$as_me: failed program was:" >&5
38722 sed 's/^/| /' conftest.$ac_ext >&5
38723
38724 ac_cv_type_long_long=no
38725 fi
38726 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38727 fi
38728 echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
38729 echo "${ECHO_T}$ac_cv_type_long_long" >&6
38730 if test $ac_cv_type_long_long = yes; then
38731
38732 cat >>confdefs.h <<_ACEOF
38733 #define HAVE_LONG_LONG 1
38734 _ACEOF
38735
38736
38737 fi
38738
38739 echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
38740 echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
38741 if test "${ac_cv_type_ptrdiff_t+set}" = set; then
38742   echo $ECHO_N "(cached) $ECHO_C" >&6
38743 else
38744   cat >conftest.$ac_ext <<_ACEOF
38745 /* confdefs.h.  */
38746 _ACEOF
38747 cat confdefs.h >>conftest.$ac_ext
38748 cat >>conftest.$ac_ext <<_ACEOF
38749 /* end confdefs.h.  */
38750 $ac_includes_default
38751 int
38752 main ()
38753 {
38754 if ((ptrdiff_t *) 0)
38755   return 0;
38756 if (sizeof (ptrdiff_t))
38757   return 0;
38758   ;
38759   return 0;
38760 }
38761 _ACEOF
38762 rm -f conftest.$ac_objext
38763 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38764   (eval $ac_compile) 2>conftest.er1
38765   ac_status=$?
38766   grep -v '^ *+' conftest.er1 >conftest.err
38767   rm -f conftest.er1
38768   cat conftest.err >&5
38769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38770   (exit $ac_status); } &&
38771          { ac_try='test -z "$ac_c_werror_flag"
38772                          || test ! -s conftest.err'
38773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38774   (eval $ac_try) 2>&5
38775   ac_status=$?
38776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38777   (exit $ac_status); }; } &&
38778          { ac_try='test -s conftest.$ac_objext'
38779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38780   (eval $ac_try) 2>&5
38781   ac_status=$?
38782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38783   (exit $ac_status); }; }; then
38784   ac_cv_type_ptrdiff_t=yes
38785 else
38786   echo "$as_me: failed program was:" >&5
38787 sed 's/^/| /' conftest.$ac_ext >&5
38788
38789 ac_cv_type_ptrdiff_t=no
38790 fi
38791 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38792 fi
38793 echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
38794 echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6
38795 if test $ac_cv_type_ptrdiff_t = yes; then
38796
38797 cat >>confdefs.h <<_ACEOF
38798 #define HAVE_PTRDIFF_T 1
38799 _ACEOF
38800
38801
38802 fi
38803
38804
38805 echo "$as_me:$LINENO: checking for socklen_t" >&5
38806 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
38807 if test "${ac_cv_type_socklen_t+set}" = set; then
38808   echo $ECHO_N "(cached) $ECHO_C" >&6
38809 else
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 #ifdef HAVE_SYS_SOCKET_H
38818 #include <sys/socket.h>
38819 #endif
38820
38821
38822 int
38823 main ()
38824 {
38825 if ((socklen_t *) 0)
38826   return 0;
38827 if (sizeof (socklen_t))
38828   return 0;
38829   ;
38830   return 0;
38831 }
38832 _ACEOF
38833 rm -f conftest.$ac_objext
38834 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38835   (eval $ac_compile) 2>conftest.er1
38836   ac_status=$?
38837   grep -v '^ *+' conftest.er1 >conftest.err
38838   rm -f conftest.er1
38839   cat conftest.err >&5
38840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38841   (exit $ac_status); } &&
38842          { ac_try='test -z "$ac_c_werror_flag"
38843                          || test ! -s conftest.err'
38844   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38845   (eval $ac_try) 2>&5
38846   ac_status=$?
38847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38848   (exit $ac_status); }; } &&
38849          { ac_try='test -s conftest.$ac_objext'
38850   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38851   (eval $ac_try) 2>&5
38852   ac_status=$?
38853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38854   (exit $ac_status); }; }; then
38855   ac_cv_type_socklen_t=yes
38856 else
38857   echo "$as_me: failed program was:" >&5
38858 sed 's/^/| /' conftest.$ac_ext >&5
38859
38860 ac_cv_type_socklen_t=no
38861 fi
38862 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38863 fi
38864 echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
38865 echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
38866 if test $ac_cv_type_socklen_t = yes; then
38867   :
38868 else
38869
38870 cat >>confdefs.h <<_ACEOF
38871 #define socklen_t int
38872 _ACEOF
38873
38874 fi
38875
38876
38877 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
38878 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
38879 if test "${ac_cv_type_signal+set}" = set; then
38880   echo $ECHO_N "(cached) $ECHO_C" >&6
38881 else
38882   cat >conftest.$ac_ext <<_ACEOF
38883 /* confdefs.h.  */
38884 _ACEOF
38885 cat confdefs.h >>conftest.$ac_ext
38886 cat >>conftest.$ac_ext <<_ACEOF
38887 /* end confdefs.h.  */
38888 #include <sys/types.h>
38889 #include <signal.h>
38890 #ifdef signal
38891 # undef signal
38892 #endif
38893 #ifdef __cplusplus
38894 extern "C" void (*signal (int, void (*)(int)))(int);
38895 #else
38896 void (*signal ()) ();
38897 #endif
38898
38899 int
38900 main ()
38901 {
38902 int i;
38903   ;
38904   return 0;
38905 }
38906 _ACEOF
38907 rm -f conftest.$ac_objext
38908 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38909   (eval $ac_compile) 2>conftest.er1
38910   ac_status=$?
38911   grep -v '^ *+' conftest.er1 >conftest.err
38912   rm -f conftest.er1
38913   cat conftest.err >&5
38914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38915   (exit $ac_status); } &&
38916          { ac_try='test -z "$ac_c_werror_flag"
38917                          || test ! -s conftest.err'
38918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38919   (eval $ac_try) 2>&5
38920   ac_status=$?
38921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38922   (exit $ac_status); }; } &&
38923          { ac_try='test -s conftest.$ac_objext'
38924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38925   (eval $ac_try) 2>&5
38926   ac_status=$?
38927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38928   (exit $ac_status); }; }; then
38929   ac_cv_type_signal=void
38930 else
38931   echo "$as_me: failed program was:" >&5
38932 sed 's/^/| /' conftest.$ac_ext >&5
38933
38934 ac_cv_type_signal=int
38935 fi
38936 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
38937 fi
38938 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
38939 echo "${ECHO_T}$ac_cv_type_signal" >&6
38940
38941 cat >>confdefs.h <<_ACEOF
38942 #define RETSIGTYPE $ac_cv_type_signal
38943 _ACEOF
38944
38945
38946
38947 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
38948 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
38949 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
38950   echo $ECHO_N "(cached) $ECHO_C" >&6
38951 else
38952   cat >conftest.$ac_ext <<_ACEOF
38953 /* confdefs.h.  */
38954 _ACEOF
38955 cat confdefs.h >>conftest.$ac_ext
38956 cat >>conftest.$ac_ext <<_ACEOF
38957 /* end confdefs.h.  */
38958 $ac_includes_default
38959 #include <signal.h>
38960
38961
38962 int
38963 main ()
38964 {
38965 if ((sig_atomic_t *) 0)
38966   return 0;
38967 if (sizeof (sig_atomic_t))
38968   return 0;
38969   ;
38970   return 0;
38971 }
38972 _ACEOF
38973 rm -f conftest.$ac_objext
38974 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38975   (eval $ac_compile) 2>conftest.er1
38976   ac_status=$?
38977   grep -v '^ *+' conftest.er1 >conftest.err
38978   rm -f conftest.er1
38979   cat conftest.err >&5
38980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38981   (exit $ac_status); } &&
38982          { ac_try='test -z "$ac_c_werror_flag"
38983                          || test ! -s conftest.err'
38984   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38985   (eval $ac_try) 2>&5
38986   ac_status=$?
38987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38988   (exit $ac_status); }; } &&
38989          { ac_try='test -s conftest.$ac_objext'
38990   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38991   (eval $ac_try) 2>&5
38992   ac_status=$?
38993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38994   (exit $ac_status); }; }; then
38995   ac_cv_type_sig_atomic_t=yes
38996 else
38997   echo "$as_me: failed program was:" >&5
38998 sed 's/^/| /' conftest.$ac_ext >&5
38999
39000 ac_cv_type_sig_atomic_t=no
39001 fi
39002 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39003 fi
39004 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
39005 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
39006 if test $ac_cv_type_sig_atomic_t = yes; then
39007   :
39008 else
39009
39010 cat >>confdefs.h <<_ACEOF
39011 #define sig_atomic_t int
39012 _ACEOF
39013
39014 fi
39015
39016
39017 echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
39018 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
39019 if test "${ac_cv_type_uid_t+set}" = set; then
39020   echo $ECHO_N "(cached) $ECHO_C" >&6
39021 else
39022   cat >conftest.$ac_ext <<_ACEOF
39023 /* confdefs.h.  */
39024 _ACEOF
39025 cat confdefs.h >>conftest.$ac_ext
39026 cat >>conftest.$ac_ext <<_ACEOF
39027 /* end confdefs.h.  */
39028 #include <sys/types.h>
39029
39030 _ACEOF
39031 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
39032   $EGREP "uid_t" >/dev/null 2>&1; then
39033   ac_cv_type_uid_t=yes
39034 else
39035   ac_cv_type_uid_t=no
39036 fi
39037 rm -f conftest*
39038
39039 fi
39040 echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
39041 echo "${ECHO_T}$ac_cv_type_uid_t" >&6
39042 if test $ac_cv_type_uid_t = no; then
39043
39044 cat >>confdefs.h <<\_ACEOF
39045 #define uid_t int
39046 _ACEOF
39047
39048
39049 cat >>confdefs.h <<\_ACEOF
39050 #define gid_t int
39051 _ACEOF
39052
39053 fi
39054
39055
39056 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
39057 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
39058 if test "${ac_cv_header_time+set}" = set; then
39059   echo $ECHO_N "(cached) $ECHO_C" >&6
39060 else
39061   cat >conftest.$ac_ext <<_ACEOF
39062 /* confdefs.h.  */
39063 _ACEOF
39064 cat confdefs.h >>conftest.$ac_ext
39065 cat >>conftest.$ac_ext <<_ACEOF
39066 /* end confdefs.h.  */
39067 #include <sys/types.h>
39068 #include <sys/time.h>
39069 #include <time.h>
39070
39071 int
39072 main ()
39073 {
39074 if ((struct tm *) 0)
39075 return 0;
39076   ;
39077   return 0;
39078 }
39079 _ACEOF
39080 rm -f conftest.$ac_objext
39081 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39082   (eval $ac_compile) 2>conftest.er1
39083   ac_status=$?
39084   grep -v '^ *+' conftest.er1 >conftest.err
39085   rm -f conftest.er1
39086   cat conftest.err >&5
39087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39088   (exit $ac_status); } &&
39089          { ac_try='test -z "$ac_c_werror_flag"
39090                          || test ! -s conftest.err'
39091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39092   (eval $ac_try) 2>&5
39093   ac_status=$?
39094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39095   (exit $ac_status); }; } &&
39096          { ac_try='test -s conftest.$ac_objext'
39097   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39098   (eval $ac_try) 2>&5
39099   ac_status=$?
39100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39101   (exit $ac_status); }; }; then
39102   ac_cv_header_time=yes
39103 else
39104   echo "$as_me: failed program was:" >&5
39105 sed 's/^/| /' conftest.$ac_ext >&5
39106
39107 ac_cv_header_time=no
39108 fi
39109 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39110 fi
39111 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
39112 echo "${ECHO_T}$ac_cv_header_time" >&6
39113 if test $ac_cv_header_time = yes; then
39114
39115 cat >>confdefs.h <<\_ACEOF
39116 #define TIME_WITH_SYS_TIME 1
39117 _ACEOF
39118
39119 fi
39120
39121 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
39122 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
39123 if test "${ac_cv_struct_tm+set}" = set; then
39124   echo $ECHO_N "(cached) $ECHO_C" >&6
39125 else
39126   cat >conftest.$ac_ext <<_ACEOF
39127 /* confdefs.h.  */
39128 _ACEOF
39129 cat confdefs.h >>conftest.$ac_ext
39130 cat >>conftest.$ac_ext <<_ACEOF
39131 /* end confdefs.h.  */
39132 #include <sys/types.h>
39133 #include <time.h>
39134
39135 int
39136 main ()
39137 {
39138 struct tm *tp; tp->tm_sec;
39139   ;
39140   return 0;
39141 }
39142 _ACEOF
39143 rm -f conftest.$ac_objext
39144 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39145   (eval $ac_compile) 2>conftest.er1
39146   ac_status=$?
39147   grep -v '^ *+' conftest.er1 >conftest.err
39148   rm -f conftest.er1
39149   cat conftest.err >&5
39150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39151   (exit $ac_status); } &&
39152          { ac_try='test -z "$ac_c_werror_flag"
39153                          || test ! -s conftest.err'
39154   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39155   (eval $ac_try) 2>&5
39156   ac_status=$?
39157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39158   (exit $ac_status); }; } &&
39159          { ac_try='test -s conftest.$ac_objext'
39160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39161   (eval $ac_try) 2>&5
39162   ac_status=$?
39163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39164   (exit $ac_status); }; }; then
39165   ac_cv_struct_tm=time.h
39166 else
39167   echo "$as_me: failed program was:" >&5
39168 sed 's/^/| /' conftest.$ac_ext >&5
39169
39170 ac_cv_struct_tm=sys/time.h
39171 fi
39172 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39173 fi
39174 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
39175 echo "${ECHO_T}$ac_cv_struct_tm" >&6
39176 if test $ac_cv_struct_tm = sys/time.h; then
39177
39178 cat >>confdefs.h <<\_ACEOF
39179 #define TM_IN_SYS_TIME 1
39180 _ACEOF
39181
39182 fi
39183
39184 echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
39185 echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
39186 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
39187   echo $ECHO_N "(cached) $ECHO_C" >&6
39188 else
39189   cat >conftest.$ac_ext <<_ACEOF
39190 /* confdefs.h.  */
39191 _ACEOF
39192 cat confdefs.h >>conftest.$ac_ext
39193 cat >>conftest.$ac_ext <<_ACEOF
39194 /* end confdefs.h.  */
39195 $ac_includes_default
39196 int
39197 main ()
39198 {
39199 static struct stat ac_aggr;
39200 if (ac_aggr.st_blksize)
39201 return 0;
39202   ;
39203   return 0;
39204 }
39205 _ACEOF
39206 rm -f conftest.$ac_objext
39207 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39208   (eval $ac_compile) 2>conftest.er1
39209   ac_status=$?
39210   grep -v '^ *+' conftest.er1 >conftest.err
39211   rm -f conftest.er1
39212   cat conftest.err >&5
39213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39214   (exit $ac_status); } &&
39215          { ac_try='test -z "$ac_c_werror_flag"
39216                          || test ! -s conftest.err'
39217   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39218   (eval $ac_try) 2>&5
39219   ac_status=$?
39220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39221   (exit $ac_status); }; } &&
39222          { ac_try='test -s conftest.$ac_objext'
39223   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39224   (eval $ac_try) 2>&5
39225   ac_status=$?
39226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39227   (exit $ac_status); }; }; then
39228   ac_cv_member_struct_stat_st_blksize=yes
39229 else
39230   echo "$as_me: failed program was:" >&5
39231 sed 's/^/| /' conftest.$ac_ext >&5
39232
39233 cat >conftest.$ac_ext <<_ACEOF
39234 /* confdefs.h.  */
39235 _ACEOF
39236 cat confdefs.h >>conftest.$ac_ext
39237 cat >>conftest.$ac_ext <<_ACEOF
39238 /* end confdefs.h.  */
39239 $ac_includes_default
39240 int
39241 main ()
39242 {
39243 static struct stat ac_aggr;
39244 if (sizeof ac_aggr.st_blksize)
39245 return 0;
39246   ;
39247   return 0;
39248 }
39249 _ACEOF
39250 rm -f conftest.$ac_objext
39251 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39252   (eval $ac_compile) 2>conftest.er1
39253   ac_status=$?
39254   grep -v '^ *+' conftest.er1 >conftest.err
39255   rm -f conftest.er1
39256   cat conftest.err >&5
39257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39258   (exit $ac_status); } &&
39259          { ac_try='test -z "$ac_c_werror_flag"
39260                          || test ! -s conftest.err'
39261   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39262   (eval $ac_try) 2>&5
39263   ac_status=$?
39264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39265   (exit $ac_status); }; } &&
39266          { ac_try='test -s conftest.$ac_objext'
39267   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39268   (eval $ac_try) 2>&5
39269   ac_status=$?
39270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39271   (exit $ac_status); }; }; then
39272   ac_cv_member_struct_stat_st_blksize=yes
39273 else
39274   echo "$as_me: failed program was:" >&5
39275 sed 's/^/| /' conftest.$ac_ext >&5
39276
39277 ac_cv_member_struct_stat_st_blksize=no
39278 fi
39279 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39280 fi
39281 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39282 fi
39283 echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
39284 echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
39285 if test $ac_cv_member_struct_stat_st_blksize = yes; then
39286
39287 cat >>confdefs.h <<_ACEOF
39288 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
39289 _ACEOF
39290
39291
39292 fi
39293
39294 echo "$as_me:$LINENO: checking for struct passwd.pw_gecos" >&5
39295 echo $ECHO_N "checking for struct passwd.pw_gecos... $ECHO_C" >&6
39296 if test "${ac_cv_member_struct_passwd_pw_gecos+set}" = set; then
39297   echo $ECHO_N "(cached) $ECHO_C" >&6
39298 else
39299   cat >conftest.$ac_ext <<_ACEOF
39300 /* confdefs.h.  */
39301 _ACEOF
39302 cat confdefs.h >>conftest.$ac_ext
39303 cat >>conftest.$ac_ext <<_ACEOF
39304 /* end confdefs.h.  */
39305 $ac_includes_default
39306 #include <pwd.h>
39307
39308 int
39309 main ()
39310 {
39311 static struct passwd ac_aggr;
39312 if (ac_aggr.pw_gecos)
39313 return 0;
39314   ;
39315   return 0;
39316 }
39317 _ACEOF
39318 rm -f conftest.$ac_objext
39319 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39320   (eval $ac_compile) 2>conftest.er1
39321   ac_status=$?
39322   grep -v '^ *+' conftest.er1 >conftest.err
39323   rm -f conftest.er1
39324   cat conftest.err >&5
39325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39326   (exit $ac_status); } &&
39327          { ac_try='test -z "$ac_c_werror_flag"
39328                          || test ! -s conftest.err'
39329   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39330   (eval $ac_try) 2>&5
39331   ac_status=$?
39332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39333   (exit $ac_status); }; } &&
39334          { ac_try='test -s conftest.$ac_objext'
39335   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39336   (eval $ac_try) 2>&5
39337   ac_status=$?
39338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39339   (exit $ac_status); }; }; then
39340   ac_cv_member_struct_passwd_pw_gecos=yes
39341 else
39342   echo "$as_me: failed program was:" >&5
39343 sed 's/^/| /' conftest.$ac_ext >&5
39344
39345 cat >conftest.$ac_ext <<_ACEOF
39346 /* confdefs.h.  */
39347 _ACEOF
39348 cat confdefs.h >>conftest.$ac_ext
39349 cat >>conftest.$ac_ext <<_ACEOF
39350 /* end confdefs.h.  */
39351 $ac_includes_default
39352 #include <pwd.h>
39353
39354 int
39355 main ()
39356 {
39357 static struct passwd ac_aggr;
39358 if (sizeof ac_aggr.pw_gecos)
39359 return 0;
39360   ;
39361   return 0;
39362 }
39363 _ACEOF
39364 rm -f conftest.$ac_objext
39365 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39366   (eval $ac_compile) 2>conftest.er1
39367   ac_status=$?
39368   grep -v '^ *+' conftest.er1 >conftest.err
39369   rm -f conftest.er1
39370   cat conftest.err >&5
39371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39372   (exit $ac_status); } &&
39373          { ac_try='test -z "$ac_c_werror_flag"
39374                          || test ! -s conftest.err'
39375   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39376   (eval $ac_try) 2>&5
39377   ac_status=$?
39378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39379   (exit $ac_status); }; } &&
39380          { ac_try='test -s conftest.$ac_objext'
39381   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39382   (eval $ac_try) 2>&5
39383   ac_status=$?
39384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39385   (exit $ac_status); }; }; then
39386   ac_cv_member_struct_passwd_pw_gecos=yes
39387 else
39388   echo "$as_me: failed program was:" >&5
39389 sed 's/^/| /' conftest.$ac_ext >&5
39390
39391 ac_cv_member_struct_passwd_pw_gecos=no
39392 fi
39393 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39394 fi
39395 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39396 fi
39397 echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_gecos" >&5
39398 echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_gecos" >&6
39399 if test $ac_cv_member_struct_passwd_pw_gecos = yes; then
39400
39401 cat >>confdefs.h <<_ACEOF
39402 #define HAVE_STRUCT_PASSWD_PW_GECOS 1
39403 _ACEOF
39404
39405
39406 fi
39407
39408 echo "$as_me:$LINENO: checking for struct passwd.pw_passwd" >&5
39409 echo $ECHO_N "checking for struct passwd.pw_passwd... $ECHO_C" >&6
39410 if test "${ac_cv_member_struct_passwd_pw_passwd+set}" = set; then
39411   echo $ECHO_N "(cached) $ECHO_C" >&6
39412 else
39413   cat >conftest.$ac_ext <<_ACEOF
39414 /* confdefs.h.  */
39415 _ACEOF
39416 cat confdefs.h >>conftest.$ac_ext
39417 cat >>conftest.$ac_ext <<_ACEOF
39418 /* end confdefs.h.  */
39419 $ac_includes_default
39420 #include <pwd.h>
39421
39422 int
39423 main ()
39424 {
39425 static struct passwd ac_aggr;
39426 if (ac_aggr.pw_passwd)
39427 return 0;
39428   ;
39429   return 0;
39430 }
39431 _ACEOF
39432 rm -f conftest.$ac_objext
39433 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39434   (eval $ac_compile) 2>conftest.er1
39435   ac_status=$?
39436   grep -v '^ *+' conftest.er1 >conftest.err
39437   rm -f conftest.er1
39438   cat conftest.err >&5
39439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39440   (exit $ac_status); } &&
39441          { ac_try='test -z "$ac_c_werror_flag"
39442                          || test ! -s conftest.err'
39443   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39444   (eval $ac_try) 2>&5
39445   ac_status=$?
39446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39447   (exit $ac_status); }; } &&
39448          { ac_try='test -s conftest.$ac_objext'
39449   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39450   (eval $ac_try) 2>&5
39451   ac_status=$?
39452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39453   (exit $ac_status); }; }; then
39454   ac_cv_member_struct_passwd_pw_passwd=yes
39455 else
39456   echo "$as_me: failed program was:" >&5
39457 sed 's/^/| /' conftest.$ac_ext >&5
39458
39459 cat >conftest.$ac_ext <<_ACEOF
39460 /* confdefs.h.  */
39461 _ACEOF
39462 cat confdefs.h >>conftest.$ac_ext
39463 cat >>conftest.$ac_ext <<_ACEOF
39464 /* end confdefs.h.  */
39465 $ac_includes_default
39466 #include <pwd.h>
39467
39468 int
39469 main ()
39470 {
39471 static struct passwd ac_aggr;
39472 if (sizeof ac_aggr.pw_passwd)
39473 return 0;
39474   ;
39475   return 0;
39476 }
39477 _ACEOF
39478 rm -f conftest.$ac_objext
39479 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39480   (eval $ac_compile) 2>conftest.er1
39481   ac_status=$?
39482   grep -v '^ *+' conftest.er1 >conftest.err
39483   rm -f conftest.er1
39484   cat conftest.err >&5
39485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39486   (exit $ac_status); } &&
39487          { ac_try='test -z "$ac_c_werror_flag"
39488                          || test ! -s conftest.err'
39489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39490   (eval $ac_try) 2>&5
39491   ac_status=$?
39492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39493   (exit $ac_status); }; } &&
39494          { ac_try='test -s conftest.$ac_objext'
39495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39496   (eval $ac_try) 2>&5
39497   ac_status=$?
39498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39499   (exit $ac_status); }; }; then
39500   ac_cv_member_struct_passwd_pw_passwd=yes
39501 else
39502   echo "$as_me: failed program was:" >&5
39503 sed 's/^/| /' conftest.$ac_ext >&5
39504
39505 ac_cv_member_struct_passwd_pw_passwd=no
39506 fi
39507 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39508 fi
39509 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39510 fi
39511 echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_passwd" >&5
39512 echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_passwd" >&6
39513 if test $ac_cv_member_struct_passwd_pw_passwd = yes; then
39514
39515 cat >>confdefs.h <<_ACEOF
39516 #define HAVE_STRUCT_PASSWD_PW_PASSWD 1
39517 _ACEOF
39518
39519
39520 fi
39521
39522
39523 echo "$as_me:$LINENO: checking if toupper() requires islower()" >&5
39524 echo $ECHO_N "checking if toupper() requires islower()... $ECHO_C" >&6
39525 if test "${ol_cv_c_upper_lower+set}" = set; then
39526   echo $ECHO_N "(cached) $ECHO_C" >&6
39527 else
39528
39529         if test "$cross_compiling" = yes; then
39530   ol_cv_c_upper_lower=safe
39531 else
39532   cat >conftest.$ac_ext <<_ACEOF
39533 /* confdefs.h.  */
39534 _ACEOF
39535 cat confdefs.h >>conftest.$ac_ext
39536 cat >>conftest.$ac_ext <<_ACEOF
39537 /* end confdefs.h.  */
39538
39539 #include <ctype.h>
39540 main()
39541 {
39542         if ('C' == toupper('C'))
39543                 exit(0);
39544         else
39545                 exit(1);
39546 }
39547 _ACEOF
39548 rm -f conftest$ac_exeext
39549 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
39550   (eval $ac_link) 2>&5
39551   ac_status=$?
39552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39553   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
39554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39555   (eval $ac_try) 2>&5
39556   ac_status=$?
39557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39558   (exit $ac_status); }; }; then
39559   ol_cv_c_upper_lower=no
39560 else
39561   echo "$as_me: program exited with status $ac_status" >&5
39562 echo "$as_me: failed program was:" >&5
39563 sed 's/^/| /' conftest.$ac_ext >&5
39564
39565 ( exit $ac_status )
39566 ol_cv_c_upper_lower=yes
39567 fi
39568 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39569 fi
39570 fi
39571 echo "$as_me:$LINENO: result: $ol_cv_c_upper_lower" >&5
39572 echo "${ECHO_T}$ol_cv_c_upper_lower" >&6
39573 if test $ol_cv_c_upper_lower != no ; then
39574
39575 cat >>confdefs.h <<\_ACEOF
39576 #define C_UPPER_LOWER 1
39577 _ACEOF
39578
39579 fi
39580
39581 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
39582 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
39583 if test "${ac_cv_c_const+set}" = set; then
39584   echo $ECHO_N "(cached) $ECHO_C" >&6
39585 else
39586   cat >conftest.$ac_ext <<_ACEOF
39587 /* confdefs.h.  */
39588 _ACEOF
39589 cat confdefs.h >>conftest.$ac_ext
39590 cat >>conftest.$ac_ext <<_ACEOF
39591 /* end confdefs.h.  */
39592
39593 int
39594 main ()
39595 {
39596 /* FIXME: Include the comments suggested by Paul. */
39597 #ifndef __cplusplus
39598   /* Ultrix mips cc rejects this.  */
39599   typedef int charset[2];
39600   const charset x;
39601   /* SunOS 4.1.1 cc rejects this.  */
39602   char const *const *ccp;
39603   char **p;
39604   /* NEC SVR4.0.2 mips cc rejects this.  */
39605   struct point {int x, y;};
39606   static struct point const zero = {0,0};
39607   /* AIX XL C 1.02.0.0 rejects this.
39608      It does not let you subtract one const X* pointer from another in
39609      an arm of an if-expression whose if-part is not a constant
39610      expression */
39611   const char *g = "string";
39612   ccp = &g + (g ? g-g : 0);
39613   /* HPUX 7.0 cc rejects these. */
39614   ++ccp;
39615   p = (char**) ccp;
39616   ccp = (char const *const *) p;
39617   { /* SCO 3.2v4 cc rejects this.  */
39618     char *t;
39619     char const *s = 0 ? (char *) 0 : (char const *) 0;
39620
39621     *t++ = 0;
39622   }
39623   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
39624     int x[] = {25, 17};
39625     const int *foo = &x[0];
39626     ++foo;
39627   }
39628   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
39629     typedef const int *iptr;
39630     iptr p = 0;
39631     ++p;
39632   }
39633   { /* AIX XL C 1.02.0.0 rejects this saying
39634        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
39635     struct s { int j; const int *ap[3]; };
39636     struct s *b; b->j = 5;
39637   }
39638   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
39639     const int foo = 10;
39640   }
39641 #endif
39642
39643   ;
39644   return 0;
39645 }
39646 _ACEOF
39647 rm -f conftest.$ac_objext
39648 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39649   (eval $ac_compile) 2>conftest.er1
39650   ac_status=$?
39651   grep -v '^ *+' conftest.er1 >conftest.err
39652   rm -f conftest.er1
39653   cat conftest.err >&5
39654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39655   (exit $ac_status); } &&
39656          { ac_try='test -z "$ac_c_werror_flag"
39657                          || test ! -s conftest.err'
39658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39659   (eval $ac_try) 2>&5
39660   ac_status=$?
39661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39662   (exit $ac_status); }; } &&
39663          { ac_try='test -s conftest.$ac_objext'
39664   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39665   (eval $ac_try) 2>&5
39666   ac_status=$?
39667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39668   (exit $ac_status); }; }; then
39669   ac_cv_c_const=yes
39670 else
39671   echo "$as_me: failed program was:" >&5
39672 sed 's/^/| /' conftest.$ac_ext >&5
39673
39674 ac_cv_c_const=no
39675 fi
39676 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39677 fi
39678 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
39679 echo "${ECHO_T}$ac_cv_c_const" >&6
39680 if test $ac_cv_c_const = no; then
39681
39682 cat >>confdefs.h <<\_ACEOF
39683 #define const
39684 _ACEOF
39685
39686 fi
39687
39688 echo "$as_me:$LINENO: checking if compiler understands volatile" >&5
39689 echo $ECHO_N "checking if compiler understands volatile... $ECHO_C" >&6
39690 if test "${ol_cv_c_volatile+set}" = set; then
39691   echo $ECHO_N "(cached) $ECHO_C" >&6
39692 else
39693   cat >conftest.$ac_ext <<_ACEOF
39694 /* confdefs.h.  */
39695 _ACEOF
39696 cat confdefs.h >>conftest.$ac_ext
39697 cat >>conftest.$ac_ext <<_ACEOF
39698 /* end confdefs.h.  */
39699 int x, y, z;
39700 int
39701 main ()
39702 {
39703 volatile int a; int * volatile b = x ? &y : &z;
39704       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
39705       *b = 0;
39706   ;
39707   return 0;
39708 }
39709 _ACEOF
39710 rm -f conftest.$ac_objext
39711 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39712   (eval $ac_compile) 2>conftest.er1
39713   ac_status=$?
39714   grep -v '^ *+' conftest.er1 >conftest.err
39715   rm -f conftest.er1
39716   cat conftest.err >&5
39717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39718   (exit $ac_status); } &&
39719          { ac_try='test -z "$ac_c_werror_flag"
39720                          || test ! -s conftest.err'
39721   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39722   (eval $ac_try) 2>&5
39723   ac_status=$?
39724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39725   (exit $ac_status); }; } &&
39726          { ac_try='test -s conftest.$ac_objext'
39727   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39728   (eval $ac_try) 2>&5
39729   ac_status=$?
39730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39731   (exit $ac_status); }; }; then
39732   ol_cv_c_volatile=yes
39733 else
39734   echo "$as_me: failed program was:" >&5
39735 sed 's/^/| /' conftest.$ac_ext >&5
39736
39737 ol_cv_c_volatile=no
39738 fi
39739 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39740 fi
39741 echo "$as_me:$LINENO: result: $ol_cv_c_volatile" >&5
39742 echo "${ECHO_T}$ol_cv_c_volatile" >&6
39743   if test $ol_cv_c_volatile = yes; then
39744     :
39745   else
39746
39747 cat >>confdefs.h <<\_ACEOF
39748 #define volatile
39749 _ACEOF
39750
39751   fi
39752
39753
39754 if test $cross_compiling = yes ; then
39755         { echo "$as_me:$LINENO: WARNING: Crossing compiling... all bets are off!" >&5
39756 echo "$as_me: WARNING: Crossing compiling... all bets are off!" >&2;}
39757
39758 cat >>confdefs.h <<\_ACEOF
39759 #define CROSS_COMPILING 1
39760 _ACEOF
39761
39762 else
39763         echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
39764 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
39765 if test "${ac_cv_c_bigendian+set}" = set; then
39766   echo $ECHO_N "(cached) $ECHO_C" >&6
39767 else
39768   # See if sys/param.h defines the BYTE_ORDER macro.
39769 cat >conftest.$ac_ext <<_ACEOF
39770 /* confdefs.h.  */
39771 _ACEOF
39772 cat confdefs.h >>conftest.$ac_ext
39773 cat >>conftest.$ac_ext <<_ACEOF
39774 /* end confdefs.h.  */
39775 #include <sys/types.h>
39776 #include <sys/param.h>
39777
39778 int
39779 main ()
39780 {
39781 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
39782  bogus endian macros
39783 #endif
39784
39785   ;
39786   return 0;
39787 }
39788 _ACEOF
39789 rm -f conftest.$ac_objext
39790 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39791   (eval $ac_compile) 2>conftest.er1
39792   ac_status=$?
39793   grep -v '^ *+' conftest.er1 >conftest.err
39794   rm -f conftest.er1
39795   cat conftest.err >&5
39796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39797   (exit $ac_status); } &&
39798          { ac_try='test -z "$ac_c_werror_flag"
39799                          || test ! -s conftest.err'
39800   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39801   (eval $ac_try) 2>&5
39802   ac_status=$?
39803   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39804   (exit $ac_status); }; } &&
39805          { ac_try='test -s conftest.$ac_objext'
39806   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39807   (eval $ac_try) 2>&5
39808   ac_status=$?
39809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39810   (exit $ac_status); }; }; then
39811   # It does; now see whether it defined to BIG_ENDIAN or not.
39812 cat >conftest.$ac_ext <<_ACEOF
39813 /* confdefs.h.  */
39814 _ACEOF
39815 cat confdefs.h >>conftest.$ac_ext
39816 cat >>conftest.$ac_ext <<_ACEOF
39817 /* end confdefs.h.  */
39818 #include <sys/types.h>
39819 #include <sys/param.h>
39820
39821 int
39822 main ()
39823 {
39824 #if BYTE_ORDER != BIG_ENDIAN
39825  not big endian
39826 #endif
39827
39828   ;
39829   return 0;
39830 }
39831 _ACEOF
39832 rm -f conftest.$ac_objext
39833 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39834   (eval $ac_compile) 2>conftest.er1
39835   ac_status=$?
39836   grep -v '^ *+' conftest.er1 >conftest.err
39837   rm -f conftest.er1
39838   cat conftest.err >&5
39839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39840   (exit $ac_status); } &&
39841          { ac_try='test -z "$ac_c_werror_flag"
39842                          || test ! -s conftest.err'
39843   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39844   (eval $ac_try) 2>&5
39845   ac_status=$?
39846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39847   (exit $ac_status); }; } &&
39848          { ac_try='test -s conftest.$ac_objext'
39849   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39850   (eval $ac_try) 2>&5
39851   ac_status=$?
39852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39853   (exit $ac_status); }; }; then
39854   ac_cv_c_bigendian=yes
39855 else
39856   echo "$as_me: failed program was:" >&5
39857 sed 's/^/| /' conftest.$ac_ext >&5
39858
39859 ac_cv_c_bigendian=no
39860 fi
39861 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39862 else
39863   echo "$as_me: failed program was:" >&5
39864 sed 's/^/| /' conftest.$ac_ext >&5
39865
39866 # It does not; compile a test program.
39867 if test "$cross_compiling" = yes; then
39868   # try to guess the endianness by grepping values into an object file
39869   ac_cv_c_bigendian=unknown
39870   cat >conftest.$ac_ext <<_ACEOF
39871 /* confdefs.h.  */
39872 _ACEOF
39873 cat confdefs.h >>conftest.$ac_ext
39874 cat >>conftest.$ac_ext <<_ACEOF
39875 /* end confdefs.h.  */
39876 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
39877 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
39878 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
39879 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
39880 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
39881 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
39882 int
39883 main ()
39884 {
39885  _ascii (); _ebcdic ();
39886   ;
39887   return 0;
39888 }
39889 _ACEOF
39890 rm -f conftest.$ac_objext
39891 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39892   (eval $ac_compile) 2>conftest.er1
39893   ac_status=$?
39894   grep -v '^ *+' conftest.er1 >conftest.err
39895   rm -f conftest.er1
39896   cat conftest.err >&5
39897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39898   (exit $ac_status); } &&
39899          { ac_try='test -z "$ac_c_werror_flag"
39900                          || test ! -s conftest.err'
39901   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39902   (eval $ac_try) 2>&5
39903   ac_status=$?
39904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39905   (exit $ac_status); }; } &&
39906          { ac_try='test -s conftest.$ac_objext'
39907   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39908   (eval $ac_try) 2>&5
39909   ac_status=$?
39910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39911   (exit $ac_status); }; }; then
39912   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
39913   ac_cv_c_bigendian=yes
39914 fi
39915 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
39916   if test "$ac_cv_c_bigendian" = unknown; then
39917     ac_cv_c_bigendian=no
39918   else
39919     # finding both strings is unlikely to happen, but who knows?
39920     ac_cv_c_bigendian=unknown
39921   fi
39922 fi
39923 else
39924   echo "$as_me: failed program was:" >&5
39925 sed 's/^/| /' conftest.$ac_ext >&5
39926
39927 fi
39928 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39929 else
39930   cat >conftest.$ac_ext <<_ACEOF
39931 /* confdefs.h.  */
39932 _ACEOF
39933 cat confdefs.h >>conftest.$ac_ext
39934 cat >>conftest.$ac_ext <<_ACEOF
39935 /* end confdefs.h.  */
39936 int
39937 main ()
39938 {
39939   /* Are we little or big endian?  From Harbison&Steele.  */
39940   union
39941   {
39942     long l;
39943     char c[sizeof (long)];
39944   } u;
39945   u.l = 1;
39946   exit (u.c[sizeof (long) - 1] == 1);
39947 }
39948 _ACEOF
39949 rm -f conftest$ac_exeext
39950 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
39951   (eval $ac_link) 2>&5
39952   ac_status=$?
39953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39954   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
39955   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39956   (eval $ac_try) 2>&5
39957   ac_status=$?
39958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39959   (exit $ac_status); }; }; then
39960   ac_cv_c_bigendian=no
39961 else
39962   echo "$as_me: program exited with status $ac_status" >&5
39963 echo "$as_me: failed program was:" >&5
39964 sed 's/^/| /' conftest.$ac_ext >&5
39965
39966 ( exit $ac_status )
39967 ac_cv_c_bigendian=yes
39968 fi
39969 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39970 fi
39971 fi
39972 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39973 fi
39974 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
39975 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
39976 case $ac_cv_c_bigendian in
39977   yes)
39978
39979 cat >>confdefs.h <<\_ACEOF
39980 #define WORDS_BIGENDIAN 1
39981 _ACEOF
39982  ;;
39983   no)
39984      ;;
39985   *)
39986     { { echo "$as_me:$LINENO: error: unknown endianness
39987 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
39988 echo "$as_me: error: unknown endianness
39989 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
39990    { (exit 1); exit 1; }; } ;;
39991 esac
39992
39993 fi
39994
39995 echo "$as_me:$LINENO: checking for short" >&5
39996 echo $ECHO_N "checking for short... $ECHO_C" >&6
39997 if test "${ac_cv_type_short+set}" = set; then
39998   echo $ECHO_N "(cached) $ECHO_C" >&6
39999 else
40000   cat >conftest.$ac_ext <<_ACEOF
40001 /* confdefs.h.  */
40002 _ACEOF
40003 cat confdefs.h >>conftest.$ac_ext
40004 cat >>conftest.$ac_ext <<_ACEOF
40005 /* end confdefs.h.  */
40006 $ac_includes_default
40007 int
40008 main ()
40009 {
40010 if ((short *) 0)
40011   return 0;
40012 if (sizeof (short))
40013   return 0;
40014   ;
40015   return 0;
40016 }
40017 _ACEOF
40018 rm -f conftest.$ac_objext
40019 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40020   (eval $ac_compile) 2>conftest.er1
40021   ac_status=$?
40022   grep -v '^ *+' conftest.er1 >conftest.err
40023   rm -f conftest.er1
40024   cat conftest.err >&5
40025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40026   (exit $ac_status); } &&
40027          { ac_try='test -z "$ac_c_werror_flag"
40028                          || test ! -s conftest.err'
40029   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40030   (eval $ac_try) 2>&5
40031   ac_status=$?
40032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40033   (exit $ac_status); }; } &&
40034          { ac_try='test -s conftest.$ac_objext'
40035   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40036   (eval $ac_try) 2>&5
40037   ac_status=$?
40038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40039   (exit $ac_status); }; }; then
40040   ac_cv_type_short=yes
40041 else
40042   echo "$as_me: failed program was:" >&5
40043 sed 's/^/| /' conftest.$ac_ext >&5
40044
40045 ac_cv_type_short=no
40046 fi
40047 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40048 fi
40049 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
40050 echo "${ECHO_T}$ac_cv_type_short" >&6
40051
40052 echo "$as_me:$LINENO: checking size of short" >&5
40053 echo $ECHO_N "checking size of short... $ECHO_C" >&6
40054 if test "${ac_cv_sizeof_short+set}" = set; then
40055   echo $ECHO_N "(cached) $ECHO_C" >&6
40056 else
40057   if test "$ac_cv_type_short" = yes; then
40058   # The cast to unsigned long works around a bug in the HP C Compiler
40059   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40060   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40061   # This bug is HP SR number 8606223364.
40062   if test "$cross_compiling" = yes; then
40063   # Depending upon the size, compute the lo and hi bounds.
40064 cat >conftest.$ac_ext <<_ACEOF
40065 /* confdefs.h.  */
40066 _ACEOF
40067 cat confdefs.h >>conftest.$ac_ext
40068 cat >>conftest.$ac_ext <<_ACEOF
40069 /* end confdefs.h.  */
40070 $ac_includes_default
40071 int
40072 main ()
40073 {
40074 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
40075 test_array [0] = 0
40076
40077   ;
40078   return 0;
40079 }
40080 _ACEOF
40081 rm -f conftest.$ac_objext
40082 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40083   (eval $ac_compile) 2>conftest.er1
40084   ac_status=$?
40085   grep -v '^ *+' conftest.er1 >conftest.err
40086   rm -f conftest.er1
40087   cat conftest.err >&5
40088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40089   (exit $ac_status); } &&
40090          { ac_try='test -z "$ac_c_werror_flag"
40091                          || test ! -s conftest.err'
40092   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40093   (eval $ac_try) 2>&5
40094   ac_status=$?
40095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40096   (exit $ac_status); }; } &&
40097          { ac_try='test -s conftest.$ac_objext'
40098   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40099   (eval $ac_try) 2>&5
40100   ac_status=$?
40101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40102   (exit $ac_status); }; }; then
40103   ac_lo=0 ac_mid=0
40104   while :; do
40105     cat >conftest.$ac_ext <<_ACEOF
40106 /* confdefs.h.  */
40107 _ACEOF
40108 cat confdefs.h >>conftest.$ac_ext
40109 cat >>conftest.$ac_ext <<_ACEOF
40110 /* end confdefs.h.  */
40111 $ac_includes_default
40112 int
40113 main ()
40114 {
40115 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
40116 test_array [0] = 0
40117
40118   ;
40119   return 0;
40120 }
40121 _ACEOF
40122 rm -f conftest.$ac_objext
40123 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40124   (eval $ac_compile) 2>conftest.er1
40125   ac_status=$?
40126   grep -v '^ *+' conftest.er1 >conftest.err
40127   rm -f conftest.er1
40128   cat conftest.err >&5
40129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40130   (exit $ac_status); } &&
40131          { ac_try='test -z "$ac_c_werror_flag"
40132                          || test ! -s conftest.err'
40133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40134   (eval $ac_try) 2>&5
40135   ac_status=$?
40136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40137   (exit $ac_status); }; } &&
40138          { ac_try='test -s conftest.$ac_objext'
40139   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40140   (eval $ac_try) 2>&5
40141   ac_status=$?
40142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40143   (exit $ac_status); }; }; then
40144   ac_hi=$ac_mid; break
40145 else
40146   echo "$as_me: failed program was:" >&5
40147 sed 's/^/| /' conftest.$ac_ext >&5
40148
40149 ac_lo=`expr $ac_mid + 1`
40150                     if test $ac_lo -le $ac_mid; then
40151                       ac_lo= ac_hi=
40152                       break
40153                     fi
40154                     ac_mid=`expr 2 '*' $ac_mid + 1`
40155 fi
40156 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40157   done
40158 else
40159   echo "$as_me: failed program was:" >&5
40160 sed 's/^/| /' conftest.$ac_ext >&5
40161
40162 cat >conftest.$ac_ext <<_ACEOF
40163 /* confdefs.h.  */
40164 _ACEOF
40165 cat confdefs.h >>conftest.$ac_ext
40166 cat >>conftest.$ac_ext <<_ACEOF
40167 /* end confdefs.h.  */
40168 $ac_includes_default
40169 int
40170 main ()
40171 {
40172 static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
40173 test_array [0] = 0
40174
40175   ;
40176   return 0;
40177 }
40178 _ACEOF
40179 rm -f conftest.$ac_objext
40180 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40181   (eval $ac_compile) 2>conftest.er1
40182   ac_status=$?
40183   grep -v '^ *+' conftest.er1 >conftest.err
40184   rm -f conftest.er1
40185   cat conftest.err >&5
40186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40187   (exit $ac_status); } &&
40188          { ac_try='test -z "$ac_c_werror_flag"
40189                          || test ! -s conftest.err'
40190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40191   (eval $ac_try) 2>&5
40192   ac_status=$?
40193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40194   (exit $ac_status); }; } &&
40195          { ac_try='test -s conftest.$ac_objext'
40196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40197   (eval $ac_try) 2>&5
40198   ac_status=$?
40199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40200   (exit $ac_status); }; }; then
40201   ac_hi=-1 ac_mid=-1
40202   while :; do
40203     cat >conftest.$ac_ext <<_ACEOF
40204 /* confdefs.h.  */
40205 _ACEOF
40206 cat confdefs.h >>conftest.$ac_ext
40207 cat >>conftest.$ac_ext <<_ACEOF
40208 /* end confdefs.h.  */
40209 $ac_includes_default
40210 int
40211 main ()
40212 {
40213 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
40214 test_array [0] = 0
40215
40216   ;
40217   return 0;
40218 }
40219 _ACEOF
40220 rm -f conftest.$ac_objext
40221 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40222   (eval $ac_compile) 2>conftest.er1
40223   ac_status=$?
40224   grep -v '^ *+' conftest.er1 >conftest.err
40225   rm -f conftest.er1
40226   cat conftest.err >&5
40227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40228   (exit $ac_status); } &&
40229          { ac_try='test -z "$ac_c_werror_flag"
40230                          || test ! -s conftest.err'
40231   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40232   (eval $ac_try) 2>&5
40233   ac_status=$?
40234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40235   (exit $ac_status); }; } &&
40236          { ac_try='test -s conftest.$ac_objext'
40237   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40238   (eval $ac_try) 2>&5
40239   ac_status=$?
40240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40241   (exit $ac_status); }; }; then
40242   ac_lo=$ac_mid; break
40243 else
40244   echo "$as_me: failed program was:" >&5
40245 sed 's/^/| /' conftest.$ac_ext >&5
40246
40247 ac_hi=`expr '(' $ac_mid ')' - 1`
40248                        if test $ac_mid -le $ac_hi; then
40249                          ac_lo= ac_hi=
40250                          break
40251                        fi
40252                        ac_mid=`expr 2 '*' $ac_mid`
40253 fi
40254 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40255   done
40256 else
40257   echo "$as_me: failed program was:" >&5
40258 sed 's/^/| /' conftest.$ac_ext >&5
40259
40260 ac_lo= ac_hi=
40261 fi
40262 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40263 fi
40264 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40265 # Binary search between lo and hi bounds.
40266 while test "x$ac_lo" != "x$ac_hi"; do
40267   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
40268   cat >conftest.$ac_ext <<_ACEOF
40269 /* confdefs.h.  */
40270 _ACEOF
40271 cat confdefs.h >>conftest.$ac_ext
40272 cat >>conftest.$ac_ext <<_ACEOF
40273 /* end confdefs.h.  */
40274 $ac_includes_default
40275 int
40276 main ()
40277 {
40278 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
40279 test_array [0] = 0
40280
40281   ;
40282   return 0;
40283 }
40284 _ACEOF
40285 rm -f conftest.$ac_objext
40286 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40287   (eval $ac_compile) 2>conftest.er1
40288   ac_status=$?
40289   grep -v '^ *+' conftest.er1 >conftest.err
40290   rm -f conftest.er1
40291   cat conftest.err >&5
40292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40293   (exit $ac_status); } &&
40294          { ac_try='test -z "$ac_c_werror_flag"
40295                          || test ! -s conftest.err'
40296   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40297   (eval $ac_try) 2>&5
40298   ac_status=$?
40299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40300   (exit $ac_status); }; } &&
40301          { ac_try='test -s conftest.$ac_objext'
40302   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40303   (eval $ac_try) 2>&5
40304   ac_status=$?
40305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40306   (exit $ac_status); }; }; then
40307   ac_hi=$ac_mid
40308 else
40309   echo "$as_me: failed program was:" >&5
40310 sed 's/^/| /' conftest.$ac_ext >&5
40311
40312 ac_lo=`expr '(' $ac_mid ')' + 1`
40313 fi
40314 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40315 done
40316 case $ac_lo in
40317 ?*) ac_cv_sizeof_short=$ac_lo;;
40318 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
40319 See \`config.log' for more details." >&5
40320 echo "$as_me: error: cannot compute sizeof (short), 77
40321 See \`config.log' for more details." >&2;}
40322    { (exit 1); exit 1; }; } ;;
40323 esac
40324 else
40325   if test "$cross_compiling" = yes; then
40326   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
40327 See \`config.log' for more details." >&5
40328 echo "$as_me: error: cannot run test program while cross compiling
40329 See \`config.log' for more details." >&2;}
40330    { (exit 1); exit 1; }; }
40331 else
40332   cat >conftest.$ac_ext <<_ACEOF
40333 /* confdefs.h.  */
40334 _ACEOF
40335 cat confdefs.h >>conftest.$ac_ext
40336 cat >>conftest.$ac_ext <<_ACEOF
40337 /* end confdefs.h.  */
40338 $ac_includes_default
40339 long longval () { return (long) (sizeof (short)); }
40340 unsigned long ulongval () { return (long) (sizeof (short)); }
40341 #include <stdio.h>
40342 #include <stdlib.h>
40343 int
40344 main ()
40345 {
40346
40347   FILE *f = fopen ("conftest.val", "w");
40348   if (! f)
40349     exit (1);
40350   if (((long) (sizeof (short))) < 0)
40351     {
40352       long i = longval ();
40353       if (i != ((long) (sizeof (short))))
40354         exit (1);
40355       fprintf (f, "%ld\n", i);
40356     }
40357   else
40358     {
40359       unsigned long i = ulongval ();
40360       if (i != ((long) (sizeof (short))))
40361         exit (1);
40362       fprintf (f, "%lu\n", i);
40363     }
40364   exit (ferror (f) || fclose (f) != 0);
40365
40366   ;
40367   return 0;
40368 }
40369 _ACEOF
40370 rm -f conftest$ac_exeext
40371 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
40372   (eval $ac_link) 2>&5
40373   ac_status=$?
40374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40375   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
40376   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40377   (eval $ac_try) 2>&5
40378   ac_status=$?
40379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40380   (exit $ac_status); }; }; then
40381   ac_cv_sizeof_short=`cat conftest.val`
40382 else
40383   echo "$as_me: program exited with status $ac_status" >&5
40384 echo "$as_me: failed program was:" >&5
40385 sed 's/^/| /' conftest.$ac_ext >&5
40386
40387 ( exit $ac_status )
40388 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
40389 See \`config.log' for more details." >&5
40390 echo "$as_me: error: cannot compute sizeof (short), 77
40391 See \`config.log' for more details." >&2;}
40392    { (exit 1); exit 1; }; }
40393 fi
40394 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
40395 fi
40396 fi
40397 rm -f conftest.val
40398 else
40399   ac_cv_sizeof_short=0
40400 fi
40401 fi
40402 echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
40403 echo "${ECHO_T}$ac_cv_sizeof_short" >&6
40404 cat >>confdefs.h <<_ACEOF
40405 #define SIZEOF_SHORT $ac_cv_sizeof_short
40406 _ACEOF
40407
40408
40409 echo "$as_me:$LINENO: checking for int" >&5
40410 echo $ECHO_N "checking for int... $ECHO_C" >&6
40411 if test "${ac_cv_type_int+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 $ac_includes_default
40421 int
40422 main ()
40423 {
40424 if ((int *) 0)
40425   return 0;
40426 if (sizeof (int))
40427   return 0;
40428   ;
40429   return 0;
40430 }
40431 _ACEOF
40432 rm -f conftest.$ac_objext
40433 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40434   (eval $ac_compile) 2>conftest.er1
40435   ac_status=$?
40436   grep -v '^ *+' conftest.er1 >conftest.err
40437   rm -f conftest.er1
40438   cat conftest.err >&5
40439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40440   (exit $ac_status); } &&
40441          { ac_try='test -z "$ac_c_werror_flag"
40442                          || test ! -s conftest.err'
40443   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40444   (eval $ac_try) 2>&5
40445   ac_status=$?
40446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40447   (exit $ac_status); }; } &&
40448          { ac_try='test -s conftest.$ac_objext'
40449   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40450   (eval $ac_try) 2>&5
40451   ac_status=$?
40452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40453   (exit $ac_status); }; }; then
40454   ac_cv_type_int=yes
40455 else
40456   echo "$as_me: failed program was:" >&5
40457 sed 's/^/| /' conftest.$ac_ext >&5
40458
40459 ac_cv_type_int=no
40460 fi
40461 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40462 fi
40463 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
40464 echo "${ECHO_T}$ac_cv_type_int" >&6
40465
40466 echo "$as_me:$LINENO: checking size of int" >&5
40467 echo $ECHO_N "checking size of int... $ECHO_C" >&6
40468 if test "${ac_cv_sizeof_int+set}" = set; then
40469   echo $ECHO_N "(cached) $ECHO_C" >&6
40470 else
40471   if test "$ac_cv_type_int" = yes; then
40472   # The cast to unsigned long works around a bug in the HP C Compiler
40473   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40474   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40475   # This bug is HP SR number 8606223364.
40476   if test "$cross_compiling" = yes; then
40477   # Depending upon the size, compute the lo and hi bounds.
40478 cat >conftest.$ac_ext <<_ACEOF
40479 /* confdefs.h.  */
40480 _ACEOF
40481 cat confdefs.h >>conftest.$ac_ext
40482 cat >>conftest.$ac_ext <<_ACEOF
40483 /* end confdefs.h.  */
40484 $ac_includes_default
40485 int
40486 main ()
40487 {
40488 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
40489 test_array [0] = 0
40490
40491   ;
40492   return 0;
40493 }
40494 _ACEOF
40495 rm -f conftest.$ac_objext
40496 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40497   (eval $ac_compile) 2>conftest.er1
40498   ac_status=$?
40499   grep -v '^ *+' conftest.er1 >conftest.err
40500   rm -f conftest.er1
40501   cat conftest.err >&5
40502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40503   (exit $ac_status); } &&
40504          { ac_try='test -z "$ac_c_werror_flag"
40505                          || test ! -s conftest.err'
40506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40507   (eval $ac_try) 2>&5
40508   ac_status=$?
40509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40510   (exit $ac_status); }; } &&
40511          { ac_try='test -s conftest.$ac_objext'
40512   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40513   (eval $ac_try) 2>&5
40514   ac_status=$?
40515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40516   (exit $ac_status); }; }; then
40517   ac_lo=0 ac_mid=0
40518   while :; do
40519     cat >conftest.$ac_ext <<_ACEOF
40520 /* confdefs.h.  */
40521 _ACEOF
40522 cat confdefs.h >>conftest.$ac_ext
40523 cat >>conftest.$ac_ext <<_ACEOF
40524 /* end confdefs.h.  */
40525 $ac_includes_default
40526 int
40527 main ()
40528 {
40529 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
40530 test_array [0] = 0
40531
40532   ;
40533   return 0;
40534 }
40535 _ACEOF
40536 rm -f conftest.$ac_objext
40537 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40538   (eval $ac_compile) 2>conftest.er1
40539   ac_status=$?
40540   grep -v '^ *+' conftest.er1 >conftest.err
40541   rm -f conftest.er1
40542   cat conftest.err >&5
40543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40544   (exit $ac_status); } &&
40545          { ac_try='test -z "$ac_c_werror_flag"
40546                          || test ! -s conftest.err'
40547   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40548   (eval $ac_try) 2>&5
40549   ac_status=$?
40550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40551   (exit $ac_status); }; } &&
40552          { ac_try='test -s conftest.$ac_objext'
40553   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40554   (eval $ac_try) 2>&5
40555   ac_status=$?
40556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40557   (exit $ac_status); }; }; then
40558   ac_hi=$ac_mid; break
40559 else
40560   echo "$as_me: failed program was:" >&5
40561 sed 's/^/| /' conftest.$ac_ext >&5
40562
40563 ac_lo=`expr $ac_mid + 1`
40564                     if test $ac_lo -le $ac_mid; then
40565                       ac_lo= ac_hi=
40566                       break
40567                     fi
40568                     ac_mid=`expr 2 '*' $ac_mid + 1`
40569 fi
40570 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40571   done
40572 else
40573   echo "$as_me: failed program was:" >&5
40574 sed 's/^/| /' conftest.$ac_ext >&5
40575
40576 cat >conftest.$ac_ext <<_ACEOF
40577 /* confdefs.h.  */
40578 _ACEOF
40579 cat confdefs.h >>conftest.$ac_ext
40580 cat >>conftest.$ac_ext <<_ACEOF
40581 /* end confdefs.h.  */
40582 $ac_includes_default
40583 int
40584 main ()
40585 {
40586 static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
40587 test_array [0] = 0
40588
40589   ;
40590   return 0;
40591 }
40592 _ACEOF
40593 rm -f conftest.$ac_objext
40594 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40595   (eval $ac_compile) 2>conftest.er1
40596   ac_status=$?
40597   grep -v '^ *+' conftest.er1 >conftest.err
40598   rm -f conftest.er1
40599   cat conftest.err >&5
40600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40601   (exit $ac_status); } &&
40602          { ac_try='test -z "$ac_c_werror_flag"
40603                          || test ! -s conftest.err'
40604   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40605   (eval $ac_try) 2>&5
40606   ac_status=$?
40607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40608   (exit $ac_status); }; } &&
40609          { ac_try='test -s conftest.$ac_objext'
40610   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40611   (eval $ac_try) 2>&5
40612   ac_status=$?
40613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40614   (exit $ac_status); }; }; then
40615   ac_hi=-1 ac_mid=-1
40616   while :; do
40617     cat >conftest.$ac_ext <<_ACEOF
40618 /* confdefs.h.  */
40619 _ACEOF
40620 cat confdefs.h >>conftest.$ac_ext
40621 cat >>conftest.$ac_ext <<_ACEOF
40622 /* end confdefs.h.  */
40623 $ac_includes_default
40624 int
40625 main ()
40626 {
40627 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
40628 test_array [0] = 0
40629
40630   ;
40631   return 0;
40632 }
40633 _ACEOF
40634 rm -f conftest.$ac_objext
40635 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40636   (eval $ac_compile) 2>conftest.er1
40637   ac_status=$?
40638   grep -v '^ *+' conftest.er1 >conftest.err
40639   rm -f conftest.er1
40640   cat conftest.err >&5
40641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40642   (exit $ac_status); } &&
40643          { ac_try='test -z "$ac_c_werror_flag"
40644                          || test ! -s conftest.err'
40645   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40646   (eval $ac_try) 2>&5
40647   ac_status=$?
40648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40649   (exit $ac_status); }; } &&
40650          { ac_try='test -s conftest.$ac_objext'
40651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40652   (eval $ac_try) 2>&5
40653   ac_status=$?
40654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40655   (exit $ac_status); }; }; then
40656   ac_lo=$ac_mid; break
40657 else
40658   echo "$as_me: failed program was:" >&5
40659 sed 's/^/| /' conftest.$ac_ext >&5
40660
40661 ac_hi=`expr '(' $ac_mid ')' - 1`
40662                        if test $ac_mid -le $ac_hi; then
40663                          ac_lo= ac_hi=
40664                          break
40665                        fi
40666                        ac_mid=`expr 2 '*' $ac_mid`
40667 fi
40668 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40669   done
40670 else
40671   echo "$as_me: failed program was:" >&5
40672 sed 's/^/| /' conftest.$ac_ext >&5
40673
40674 ac_lo= ac_hi=
40675 fi
40676 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40677 fi
40678 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40679 # Binary search between lo and hi bounds.
40680 while test "x$ac_lo" != "x$ac_hi"; do
40681   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
40682   cat >conftest.$ac_ext <<_ACEOF
40683 /* confdefs.h.  */
40684 _ACEOF
40685 cat confdefs.h >>conftest.$ac_ext
40686 cat >>conftest.$ac_ext <<_ACEOF
40687 /* end confdefs.h.  */
40688 $ac_includes_default
40689 int
40690 main ()
40691 {
40692 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
40693 test_array [0] = 0
40694
40695   ;
40696   return 0;
40697 }
40698 _ACEOF
40699 rm -f conftest.$ac_objext
40700 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
40701   (eval $ac_compile) 2>conftest.er1
40702   ac_status=$?
40703   grep -v '^ *+' conftest.er1 >conftest.err
40704   rm -f conftest.er1
40705   cat conftest.err >&5
40706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40707   (exit $ac_status); } &&
40708          { ac_try='test -z "$ac_c_werror_flag"
40709                          || test ! -s conftest.err'
40710   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40711   (eval $ac_try) 2>&5
40712   ac_status=$?
40713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40714   (exit $ac_status); }; } &&
40715          { ac_try='test -s conftest.$ac_objext'
40716   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40717   (eval $ac_try) 2>&5
40718   ac_status=$?
40719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40720   (exit $ac_status); }; }; then
40721   ac_hi=$ac_mid
40722 else
40723   echo "$as_me: failed program was:" >&5
40724 sed 's/^/| /' conftest.$ac_ext >&5
40725
40726 ac_lo=`expr '(' $ac_mid ')' + 1`
40727 fi
40728 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40729 done
40730 case $ac_lo in
40731 ?*) ac_cv_sizeof_int=$ac_lo;;
40732 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
40733 See \`config.log' for more details." >&5
40734 echo "$as_me: error: cannot compute sizeof (int), 77
40735 See \`config.log' for more details." >&2;}
40736    { (exit 1); exit 1; }; } ;;
40737 esac
40738 else
40739   if test "$cross_compiling" = yes; then
40740   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
40741 See \`config.log' for more details." >&5
40742 echo "$as_me: error: cannot run test program while cross compiling
40743 See \`config.log' for more details." >&2;}
40744    { (exit 1); exit 1; }; }
40745 else
40746   cat >conftest.$ac_ext <<_ACEOF
40747 /* confdefs.h.  */
40748 _ACEOF
40749 cat confdefs.h >>conftest.$ac_ext
40750 cat >>conftest.$ac_ext <<_ACEOF
40751 /* end confdefs.h.  */
40752 $ac_includes_default
40753 long longval () { return (long) (sizeof (int)); }
40754 unsigned long ulongval () { return (long) (sizeof (int)); }
40755 #include <stdio.h>
40756 #include <stdlib.h>
40757 int
40758 main ()
40759 {
40760
40761   FILE *f = fopen ("conftest.val", "w");
40762   if (! f)
40763     exit (1);
40764   if (((long) (sizeof (int))) < 0)
40765     {
40766       long i = longval ();
40767       if (i != ((long) (sizeof (int))))
40768         exit (1);
40769       fprintf (f, "%ld\n", i);
40770     }
40771   else
40772     {
40773       unsigned long i = ulongval ();
40774       if (i != ((long) (sizeof (int))))
40775         exit (1);
40776       fprintf (f, "%lu\n", i);
40777     }
40778   exit (ferror (f) || fclose (f) != 0);
40779
40780   ;
40781   return 0;
40782 }
40783 _ACEOF
40784 rm -f conftest$ac_exeext
40785 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
40786   (eval $ac_link) 2>&5
40787   ac_status=$?
40788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40789   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
40790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40791   (eval $ac_try) 2>&5
40792   ac_status=$?
40793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40794   (exit $ac_status); }; }; then
40795   ac_cv_sizeof_int=`cat conftest.val`
40796 else
40797   echo "$as_me: program exited with status $ac_status" >&5
40798 echo "$as_me: failed program was:" >&5
40799 sed 's/^/| /' conftest.$ac_ext >&5
40800
40801 ( exit $ac_status )
40802 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
40803 See \`config.log' for more details." >&5
40804 echo "$as_me: error: cannot compute sizeof (int), 77
40805 See \`config.log' for more details." >&2;}
40806    { (exit 1); exit 1; }; }
40807 fi
40808 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
40809 fi
40810 fi
40811 rm -f conftest.val
40812 else
40813   ac_cv_sizeof_int=0
40814 fi
40815 fi
40816 echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
40817 echo "${ECHO_T}$ac_cv_sizeof_int" >&6
40818 cat >>confdefs.h <<_ACEOF
40819 #define SIZEOF_INT $ac_cv_sizeof_int
40820 _ACEOF
40821
40822
40823 echo "$as_me:$LINENO: checking for long" >&5
40824 echo $ECHO_N "checking for long... $ECHO_C" >&6
40825 if test "${ac_cv_type_long+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 ((long *) 0)
40839   return 0;
40840 if (sizeof (long))
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_long=yes
40869 else
40870   echo "$as_me: failed program was:" >&5
40871 sed 's/^/| /' conftest.$ac_ext >&5
40872
40873 ac_cv_type_long=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_long" >&5
40878 echo "${ECHO_T}$ac_cv_type_long" >&6
40879
40880 echo "$as_me:$LINENO: checking size of long" >&5
40881 echo $ECHO_N "checking size of long... $ECHO_C" >&6
40882 if test "${ac_cv_sizeof_long+set}" = set; then
40883   echo $ECHO_N "(cached) $ECHO_C" >&6
40884 else
40885   if test "$ac_cv_type_long" = 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 (long))) >= 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 (long))) <= $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 (long))) < 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 (long))) >= $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 (long))) <= $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_long=$ac_lo;;
41146 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
41147 See \`config.log' for more details." >&5
41148 echo "$as_me: error: cannot compute sizeof (long), 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 (long)); }
41168 unsigned long ulongval () { return (long) (sizeof (long)); }
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 (long))) < 0)
41179     {
41180       long i = longval ();
41181       if (i != ((long) (sizeof (long))))
41182         exit (1);
41183       fprintf (f, "%ld\n", i);
41184     }
41185   else
41186     {
41187       unsigned long i = ulongval ();
41188       if (i != ((long) (sizeof (long))))
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_long=`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 (long), 77
41217 See \`config.log' for more details." >&5
41218 echo "$as_me: error: cannot compute sizeof (long), 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_long=0
41228 fi
41229 fi
41230 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
41231 echo "${ECHO_T}$ac_cv_sizeof_long" >&6
41232 cat >>confdefs.h <<_ACEOF
41233 #define SIZEOF_LONG $ac_cv_sizeof_long
41234 _ACEOF
41235
41236
41237 echo "$as_me:$LINENO: checking for long long" >&5
41238 echo $ECHO_N "checking for long long... $ECHO_C" >&6
41239 if test "${ac_cv_type_long_long+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 ((long long *) 0)
41253   return 0;
41254 if (sizeof (long long))
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_long_long=yes
41283 else
41284   echo "$as_me: failed program was:" >&5
41285 sed 's/^/| /' conftest.$ac_ext >&5
41286
41287 ac_cv_type_long_long=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_long_long" >&5
41292 echo "${ECHO_T}$ac_cv_type_long_long" >&6
41293
41294 echo "$as_me:$LINENO: checking size of long long" >&5
41295 echo $ECHO_N "checking size of long long... $ECHO_C" >&6
41296 if test "${ac_cv_sizeof_long_long+set}" = set; then
41297   echo $ECHO_N "(cached) $ECHO_C" >&6
41298 else
41299   if test "$ac_cv_type_long_long" = 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 (long long))) >= 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 (long long))) <= $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 (long long))) < 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 (long long))) >= $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 (long long))) <= $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_long_long=$ac_lo;;
41560 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
41561 See \`config.log' for more details." >&5
41562 echo "$as_me: error: cannot compute sizeof (long long), 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 (long long)); }
41582 unsigned long ulongval () { return (long) (sizeof (long long)); }
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 (long long))) < 0)
41593     {
41594       long i = longval ();
41595       if (i != ((long) (sizeof (long long))))
41596         exit (1);
41597       fprintf (f, "%ld\n", i);
41598     }
41599   else
41600     {
41601       unsigned long i = ulongval ();
41602       if (i != ((long) (sizeof (long long))))
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_long_long=`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 (long long), 77
41631 See \`config.log' for more details." >&5
41632 echo "$as_me: error: cannot compute sizeof (long long), 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_long_long=0
41642 fi
41643 fi
41644 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
41645 echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
41646 cat >>confdefs.h <<_ACEOF
41647 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
41648 _ACEOF
41649
41650
41651 echo "$as_me:$LINENO: checking for wchar_t" >&5
41652 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
41653 if test "${ac_cv_type_wchar_t+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 ((wchar_t *) 0)
41667   return 0;
41668 if (sizeof (wchar_t))
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_wchar_t=yes
41697 else
41698   echo "$as_me: failed program was:" >&5
41699 sed 's/^/| /' conftest.$ac_ext >&5
41700
41701 ac_cv_type_wchar_t=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_wchar_t" >&5
41706 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
41707
41708 echo "$as_me:$LINENO: checking size of wchar_t" >&5
41709 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
41710 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
41711   echo $ECHO_N "(cached) $ECHO_C" >&6
41712 else
41713   if test "$ac_cv_type_wchar_t" = 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 (wchar_t))) >= 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 (wchar_t))) <= $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 (wchar_t))) < 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 (wchar_t))) >= $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 (wchar_t))) <= $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_wchar_t=$ac_lo;;
41974 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
41975 See \`config.log' for more details." >&5
41976 echo "$as_me: error: cannot compute sizeof (wchar_t), 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 (wchar_t)); }
41996 unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
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 (wchar_t))) < 0)
42007     {
42008       long i = longval ();
42009       if (i != ((long) (sizeof (wchar_t))))
42010         exit (1);
42011       fprintf (f, "%ld\n", i);
42012     }
42013   else
42014     {
42015       unsigned long i = ulongval ();
42016       if (i != ((long) (sizeof (wchar_t))))
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_wchar_t=`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 (wchar_t), 77
42045 See \`config.log' for more details." >&5
42046 echo "$as_me: error: cannot compute sizeof (wchar_t), 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_wchar_t=0
42056 fi
42057 fi
42058 echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
42059 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
42060 cat >>confdefs.h <<_ACEOF
42061 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
42062 _ACEOF
42063
42064
42065
42066 if test "$ac_cv_sizeof_int" -lt 4 ; then
42067         { echo "$as_me:$LINENO: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&5
42068 echo "$as_me: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&2;}
42069
42070
42071 cat >>confdefs.h <<\_ACEOF
42072 #define LBER_INT_T long
42073 _ACEOF
42074
42075 else
42076
42077 cat >>confdefs.h <<\_ACEOF
42078 #define LBER_INT_T int
42079 _ACEOF
42080
42081 fi
42082
42083
42084 cat >>confdefs.h <<\_ACEOF
42085 #define LBER_LEN_T long
42086 _ACEOF
42087
42088
42089 cat >>confdefs.h <<\_ACEOF
42090 #define LBER_SOCKET_T int
42091 _ACEOF
42092
42093
42094 cat >>confdefs.h <<\_ACEOF
42095 #define LBER_TAG_T long
42096 _ACEOF
42097
42098
42099 if test $ol_with_mp = longlong || test $ol_with_mp = auto ; then
42100         if test $ac_cv_sizeof_long_long -gt 4 ; then
42101                 ol_with_mp=longlong
42102
42103 cat >>confdefs.h <<\_ACEOF
42104 #define USE_MP_LONG_LONG 1
42105 _ACEOF
42106
42107         elif test $ol_with_mp = longlong ; then
42108                 { { echo "$as_me:$LINENO: error: long long unusable for multiple precision" >&5
42109 echo "$as_me: error: long long unusable for multiple precision" >&2;}
42110    { (exit 1); exit 1; }; }
42111         fi
42112 fi
42113 if test $ol_with_mp = long || test $ol_with_mp = auto ; then
42114         if test $ac_cv_sizeof_long -gt 4 ; then
42115                 ol_with_mp=long
42116
42117 cat >>confdefs.h <<\_ACEOF
42118 #define USE_MP_LONG 1
42119 _ACEOF
42120
42121         elif test $ol_with_mp = long ; then
42122                 { { echo "$as_me:$LINENO: error: long unusable for multiple precision" >&5
42123 echo "$as_me: error: long unusable for multiple precision" >&2;}
42124    { (exit 1); exit 1; }; }
42125         fi
42126 fi
42127 if test $ol_with_mp = bignum || test $ol_with_mp = auto ; then
42128
42129 for ac_header in openssl/bn.h
42130 do
42131 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
42132 if eval "test \"\${$as_ac_Header+set}\" = set"; then
42133   echo "$as_me:$LINENO: checking for $ac_header" >&5
42134 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
42135 if eval "test \"\${$as_ac_Header+set}\" = set"; then
42136   echo $ECHO_N "(cached) $ECHO_C" >&6
42137 fi
42138 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
42139 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
42140 else
42141   # Is the header compilable?
42142 echo "$as_me:$LINENO: checking $ac_header usability" >&5
42143 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
42144 cat >conftest.$ac_ext <<_ACEOF
42145 /* confdefs.h.  */
42146 _ACEOF
42147 cat confdefs.h >>conftest.$ac_ext
42148 cat >>conftest.$ac_ext <<_ACEOF
42149 /* end confdefs.h.  */
42150 $ac_includes_default
42151 #include <$ac_header>
42152 _ACEOF
42153 rm -f conftest.$ac_objext
42154 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42155   (eval $ac_compile) 2>conftest.er1
42156   ac_status=$?
42157   grep -v '^ *+' conftest.er1 >conftest.err
42158   rm -f conftest.er1
42159   cat conftest.err >&5
42160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42161   (exit $ac_status); } &&
42162          { ac_try='test -z "$ac_c_werror_flag"
42163                          || test ! -s conftest.err'
42164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42165   (eval $ac_try) 2>&5
42166   ac_status=$?
42167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42168   (exit $ac_status); }; } &&
42169          { ac_try='test -s conftest.$ac_objext'
42170   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42171   (eval $ac_try) 2>&5
42172   ac_status=$?
42173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42174   (exit $ac_status); }; }; then
42175   ac_header_compiler=yes
42176 else
42177   echo "$as_me: failed program was:" >&5
42178 sed 's/^/| /' conftest.$ac_ext >&5
42179
42180 ac_header_compiler=no
42181 fi
42182 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42183 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
42184 echo "${ECHO_T}$ac_header_compiler" >&6
42185
42186 # Is the header present?
42187 echo "$as_me:$LINENO: checking $ac_header presence" >&5
42188 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
42189 cat >conftest.$ac_ext <<_ACEOF
42190 /* confdefs.h.  */
42191 _ACEOF
42192 cat confdefs.h >>conftest.$ac_ext
42193 cat >>conftest.$ac_ext <<_ACEOF
42194 /* end confdefs.h.  */
42195 #include <$ac_header>
42196 _ACEOF
42197 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
42198   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
42199   ac_status=$?
42200   grep -v '^ *+' conftest.er1 >conftest.err
42201   rm -f conftest.er1
42202   cat conftest.err >&5
42203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42204   (exit $ac_status); } >/dev/null; then
42205   if test -s conftest.err; then
42206     ac_cpp_err=$ac_c_preproc_warn_flag
42207     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
42208   else
42209     ac_cpp_err=
42210   fi
42211 else
42212   ac_cpp_err=yes
42213 fi
42214 if test -z "$ac_cpp_err"; then
42215   ac_header_preproc=yes
42216 else
42217   echo "$as_me: failed program was:" >&5
42218 sed 's/^/| /' conftest.$ac_ext >&5
42219
42220   ac_header_preproc=no
42221 fi
42222 rm -f conftest.err conftest.$ac_ext
42223 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
42224 echo "${ECHO_T}$ac_header_preproc" >&6
42225
42226 # So?  What about this header?
42227 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
42228   yes:no: )
42229     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
42230 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
42231     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
42232 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
42233     ac_header_preproc=yes
42234     ;;
42235   no:yes:* )
42236     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
42237 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
42238     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
42239 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
42240     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
42241 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
42242     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
42243 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
42244     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
42245 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
42246     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
42247 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
42248     (
42249       cat <<\_ASBOX
42250 ## --------------------------------------------- ##
42251 ## Report this to <http://www.openldap.org/its/> ##
42252 ## --------------------------------------------- ##
42253 _ASBOX
42254     ) |
42255       sed "s/^/$as_me: WARNING:     /" >&2
42256     ;;
42257 esac
42258 echo "$as_me:$LINENO: checking for $ac_header" >&5
42259 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
42260 if eval "test \"\${$as_ac_Header+set}\" = set"; then
42261   echo $ECHO_N "(cached) $ECHO_C" >&6
42262 else
42263   eval "$as_ac_Header=\$ac_header_preproc"
42264 fi
42265 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
42266 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
42267
42268 fi
42269 if test `eval echo '${'$as_ac_Header'}'` = yes; then
42270   cat >>confdefs.h <<_ACEOF
42271 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
42272 _ACEOF
42273
42274 fi
42275
42276 done
42277
42278
42279 for ac_header in openssl/crypto.h
42280 do
42281 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
42282 if eval "test \"\${$as_ac_Header+set}\" = set"; then
42283   echo "$as_me:$LINENO: checking for $ac_header" >&5
42284 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
42285 if eval "test \"\${$as_ac_Header+set}\" = set"; then
42286   echo $ECHO_N "(cached) $ECHO_C" >&6
42287 fi
42288 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
42289 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
42290 else
42291   # Is the header compilable?
42292 echo "$as_me:$LINENO: checking $ac_header usability" >&5
42293 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
42294 cat >conftest.$ac_ext <<_ACEOF
42295 /* confdefs.h.  */
42296 _ACEOF
42297 cat confdefs.h >>conftest.$ac_ext
42298 cat >>conftest.$ac_ext <<_ACEOF
42299 /* end confdefs.h.  */
42300 $ac_includes_default
42301 #include <$ac_header>
42302 _ACEOF
42303 rm -f conftest.$ac_objext
42304 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42305   (eval $ac_compile) 2>conftest.er1
42306   ac_status=$?
42307   grep -v '^ *+' conftest.er1 >conftest.err
42308   rm -f conftest.er1
42309   cat conftest.err >&5
42310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42311   (exit $ac_status); } &&
42312          { ac_try='test -z "$ac_c_werror_flag"
42313                          || test ! -s conftest.err'
42314   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42315   (eval $ac_try) 2>&5
42316   ac_status=$?
42317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42318   (exit $ac_status); }; } &&
42319          { ac_try='test -s conftest.$ac_objext'
42320   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42321   (eval $ac_try) 2>&5
42322   ac_status=$?
42323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42324   (exit $ac_status); }; }; then
42325   ac_header_compiler=yes
42326 else
42327   echo "$as_me: failed program was:" >&5
42328 sed 's/^/| /' conftest.$ac_ext >&5
42329
42330 ac_header_compiler=no
42331 fi
42332 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42333 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
42334 echo "${ECHO_T}$ac_header_compiler" >&6
42335
42336 # Is the header present?
42337 echo "$as_me:$LINENO: checking $ac_header presence" >&5
42338 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
42339 cat >conftest.$ac_ext <<_ACEOF
42340 /* confdefs.h.  */
42341 _ACEOF
42342 cat confdefs.h >>conftest.$ac_ext
42343 cat >>conftest.$ac_ext <<_ACEOF
42344 /* end confdefs.h.  */
42345 #include <$ac_header>
42346 _ACEOF
42347 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
42348   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
42349   ac_status=$?
42350   grep -v '^ *+' conftest.er1 >conftest.err
42351   rm -f conftest.er1
42352   cat conftest.err >&5
42353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42354   (exit $ac_status); } >/dev/null; then
42355   if test -s conftest.err; then
42356     ac_cpp_err=$ac_c_preproc_warn_flag
42357     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
42358   else
42359     ac_cpp_err=
42360   fi
42361 else
42362   ac_cpp_err=yes
42363 fi
42364 if test -z "$ac_cpp_err"; then
42365   ac_header_preproc=yes
42366 else
42367   echo "$as_me: failed program was:" >&5
42368 sed 's/^/| /' conftest.$ac_ext >&5
42369
42370   ac_header_preproc=no
42371 fi
42372 rm -f conftest.err conftest.$ac_ext
42373 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
42374 echo "${ECHO_T}$ac_header_preproc" >&6
42375
42376 # So?  What about this header?
42377 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
42378   yes:no: )
42379     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
42380 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
42381     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
42382 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
42383     ac_header_preproc=yes
42384     ;;
42385   no:yes:* )
42386     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
42387 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
42388     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
42389 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
42390     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
42391 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
42392     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
42393 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
42394     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
42395 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
42396     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
42397 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
42398     (
42399       cat <<\_ASBOX
42400 ## --------------------------------------------- ##
42401 ## Report this to <http://www.openldap.org/its/> ##
42402 ## --------------------------------------------- ##
42403 _ASBOX
42404     ) |
42405       sed "s/^/$as_me: WARNING:     /" >&2
42406     ;;
42407 esac
42408 echo "$as_me:$LINENO: checking for $ac_header" >&5
42409 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
42410 if eval "test \"\${$as_ac_Header+set}\" = set"; then
42411   echo $ECHO_N "(cached) $ECHO_C" >&6
42412 else
42413   eval "$as_ac_Header=\$ac_header_preproc"
42414 fi
42415 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
42416 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
42417
42418 fi
42419 if test `eval echo '${'$as_ac_Header'}'` = yes; then
42420   cat >>confdefs.h <<_ACEOF
42421 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
42422 _ACEOF
42423
42424 fi
42425
42426 done
42427
42428         if test "$ac_cv_header_openssl_bn_h" = "yes" &&
42429                 test "$ac_cv_header_openssl_crypto_h" = "yes" &&
42430                 test "$ol_with_tls" = "found" ; then
42431                 ol_with_mp=bignum
42432
42433 cat >>confdefs.h <<\_ACEOF
42434 #define USE_MP_BIGNUM 1
42435 _ACEOF
42436
42437         elif test $ol_with_mp = bignum ; then
42438                 { { echo "$as_me:$LINENO: error: bignum not available" >&5
42439 echo "$as_me: error: bignum not available" >&2;}
42440    { (exit 1); exit 1; }; }
42441         fi
42442 fi
42443 if test $ol_with_mp = gmp || test $ol_with_mp = auto ; then
42444
42445 for ac_header in gmp.h
42446 do
42447 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
42448 if eval "test \"\${$as_ac_Header+set}\" = set"; then
42449   echo "$as_me:$LINENO: checking for $ac_header" >&5
42450 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
42451 if eval "test \"\${$as_ac_Header+set}\" = set"; then
42452   echo $ECHO_N "(cached) $ECHO_C" >&6
42453 fi
42454 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
42455 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
42456 else
42457   # Is the header compilable?
42458 echo "$as_me:$LINENO: checking $ac_header usability" >&5
42459 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
42460 cat >conftest.$ac_ext <<_ACEOF
42461 /* confdefs.h.  */
42462 _ACEOF
42463 cat confdefs.h >>conftest.$ac_ext
42464 cat >>conftest.$ac_ext <<_ACEOF
42465 /* end confdefs.h.  */
42466 $ac_includes_default
42467 #include <$ac_header>
42468 _ACEOF
42469 rm -f conftest.$ac_objext
42470 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42471   (eval $ac_compile) 2>conftest.er1
42472   ac_status=$?
42473   grep -v '^ *+' conftest.er1 >conftest.err
42474   rm -f conftest.er1
42475   cat conftest.err >&5
42476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42477   (exit $ac_status); } &&
42478          { ac_try='test -z "$ac_c_werror_flag"
42479                          || test ! -s conftest.err'
42480   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42481   (eval $ac_try) 2>&5
42482   ac_status=$?
42483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42484   (exit $ac_status); }; } &&
42485          { ac_try='test -s conftest.$ac_objext'
42486   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42487   (eval $ac_try) 2>&5
42488   ac_status=$?
42489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42490   (exit $ac_status); }; }; then
42491   ac_header_compiler=yes
42492 else
42493   echo "$as_me: failed program was:" >&5
42494 sed 's/^/| /' conftest.$ac_ext >&5
42495
42496 ac_header_compiler=no
42497 fi
42498 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
42499 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
42500 echo "${ECHO_T}$ac_header_compiler" >&6
42501
42502 # Is the header present?
42503 echo "$as_me:$LINENO: checking $ac_header presence" >&5
42504 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
42505 cat >conftest.$ac_ext <<_ACEOF
42506 /* confdefs.h.  */
42507 _ACEOF
42508 cat confdefs.h >>conftest.$ac_ext
42509 cat >>conftest.$ac_ext <<_ACEOF
42510 /* end confdefs.h.  */
42511 #include <$ac_header>
42512 _ACEOF
42513 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
42514   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
42515   ac_status=$?
42516   grep -v '^ *+' conftest.er1 >conftest.err
42517   rm -f conftest.er1
42518   cat conftest.err >&5
42519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42520   (exit $ac_status); } >/dev/null; then
42521   if test -s conftest.err; then
42522     ac_cpp_err=$ac_c_preproc_warn_flag
42523     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
42524   else
42525     ac_cpp_err=
42526   fi
42527 else
42528   ac_cpp_err=yes
42529 fi
42530 if test -z "$ac_cpp_err"; then
42531   ac_header_preproc=yes
42532 else
42533   echo "$as_me: failed program was:" >&5
42534 sed 's/^/| /' conftest.$ac_ext >&5
42535
42536   ac_header_preproc=no
42537 fi
42538 rm -f conftest.err conftest.$ac_ext
42539 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
42540 echo "${ECHO_T}$ac_header_preproc" >&6
42541
42542 # So?  What about this header?
42543 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
42544   yes:no: )
42545     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
42546 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
42547     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
42548 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
42549     ac_header_preproc=yes
42550     ;;
42551   no:yes:* )
42552     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
42553 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
42554     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
42555 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
42556     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
42557 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
42558     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
42559 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
42560     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
42561 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
42562     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
42563 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
42564     (
42565       cat <<\_ASBOX
42566 ## --------------------------------------------- ##
42567 ## Report this to <http://www.openldap.org/its/> ##
42568 ## --------------------------------------------- ##
42569 _ASBOX
42570     ) |
42571       sed "s/^/$as_me: WARNING:     /" >&2
42572     ;;
42573 esac
42574 echo "$as_me:$LINENO: checking for $ac_header" >&5
42575 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
42576 if eval "test \"\${$as_ac_Header+set}\" = set"; then
42577   echo $ECHO_N "(cached) $ECHO_C" >&6
42578 else
42579   eval "$as_ac_Header=\$ac_header_preproc"
42580 fi
42581 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
42582 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
42583
42584 fi
42585 if test `eval echo '${'$as_ac_Header'}'` = yes; then
42586   cat >>confdefs.h <<_ACEOF
42587 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
42588 _ACEOF
42589
42590 fi
42591
42592 done
42593
42594
42595 echo "$as_me:$LINENO: checking for __gmpz_add_ui in -lgmp" >&5
42596 echo $ECHO_N "checking for __gmpz_add_ui in -lgmp... $ECHO_C" >&6
42597 if test "${ac_cv_lib_gmp___gmpz_add_ui+set}" = set; then
42598   echo $ECHO_N "(cached) $ECHO_C" >&6
42599 else
42600   ac_check_lib_save_LIBS=$LIBS
42601 LIBS="-lgmp  $LIBS"
42602 cat >conftest.$ac_ext <<_ACEOF
42603 /* confdefs.h.  */
42604 _ACEOF
42605 cat confdefs.h >>conftest.$ac_ext
42606 cat >>conftest.$ac_ext <<_ACEOF
42607 /* end confdefs.h.  */
42608
42609 /* Override any gcc2 internal prototype to avoid an error.  */
42610 #ifdef __cplusplus
42611 extern "C"
42612 #endif
42613 /* We use char because int might match the return type of a gcc2
42614    builtin and then its argument prototype would still apply.  */
42615 char __gmpz_add_ui ();
42616 int
42617 main ()
42618 {
42619 __gmpz_add_ui ();
42620   ;
42621   return 0;
42622 }
42623 _ACEOF
42624 rm -f conftest.$ac_objext conftest$ac_exeext
42625 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42626   (eval $ac_link) 2>conftest.er1
42627   ac_status=$?
42628   grep -v '^ *+' conftest.er1 >conftest.err
42629   rm -f conftest.er1
42630   cat conftest.err >&5
42631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42632   (exit $ac_status); } &&
42633          { ac_try='test -z "$ac_c_werror_flag"
42634                          || test ! -s conftest.err'
42635   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42636   (eval $ac_try) 2>&5
42637   ac_status=$?
42638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42639   (exit $ac_status); }; } &&
42640          { ac_try='test -s conftest$ac_exeext'
42641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42642   (eval $ac_try) 2>&5
42643   ac_status=$?
42644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42645   (exit $ac_status); }; }; then
42646   ac_cv_lib_gmp___gmpz_add_ui=yes
42647 else
42648   echo "$as_me: failed program was:" >&5
42649 sed 's/^/| /' conftest.$ac_ext >&5
42650
42651 ac_cv_lib_gmp___gmpz_add_ui=no
42652 fi
42653 rm -f conftest.err conftest.$ac_objext \
42654       conftest$ac_exeext conftest.$ac_ext
42655 LIBS=$ac_check_lib_save_LIBS
42656 fi
42657 echo "$as_me:$LINENO: result: $ac_cv_lib_gmp___gmpz_add_ui" >&5
42658 echo "${ECHO_T}$ac_cv_lib_gmp___gmpz_add_ui" >&6
42659 if test $ac_cv_lib_gmp___gmpz_add_ui = yes; then
42660   cat >>confdefs.h <<_ACEOF
42661 #define HAVE_LIBGMP 1
42662 _ACEOF
42663
42664   LIBS="-lgmp $LIBS"
42665
42666 fi
42667
42668         if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp = yes ; then
42669
42670 cat >>confdefs.h <<\_ACEOF
42671 #define USE_MP_GMP 1
42672 _ACEOF
42673
42674                 ol_with_mp=gmp
42675         elif test $ol_with_mp = gmp ; then
42676                 { { echo "$as_me:$LINENO: error: gmp not available" >&5
42677 echo "$as_me: error: gmp not available" >&2;}
42678    { (exit 1); exit 1; }; }
42679         fi
42680 fi
42681 if test $ol_with_mp = auto ; then
42682         ol_with_mp=no
42683 fi
42684
42685 echo "$as_me:$LINENO: checking for working memcmp" >&5
42686 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
42687 if test "${ac_cv_func_memcmp_working+set}" = set; then
42688   echo $ECHO_N "(cached) $ECHO_C" >&6
42689 else
42690   if test "$cross_compiling" = yes; then
42691   ac_cv_func_memcmp_working=no
42692 else
42693   cat >conftest.$ac_ext <<_ACEOF
42694 /* confdefs.h.  */
42695 _ACEOF
42696 cat confdefs.h >>conftest.$ac_ext
42697 cat >>conftest.$ac_ext <<_ACEOF
42698 /* end confdefs.h.  */
42699 $ac_includes_default
42700 int
42701 main ()
42702 {
42703
42704   /* Some versions of memcmp are not 8-bit clean.  */
42705   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
42706   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
42707     exit (1);
42708
42709   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
42710      or more and with at least one buffer not starting on a 4-byte boundary.
42711      William Lewis provided this test program.   */
42712   {
42713     char foo[21];
42714     char bar[21];
42715     int i;
42716     for (i = 0; i < 4; i++)
42717       {
42718         char *a = foo + i;
42719         char *b = bar + i;
42720         strcpy (a, "--------01111111");
42721         strcpy (b, "--------10000000");
42722         if (memcmp (a, b, 16) >= 0)
42723           exit (1);
42724       }
42725     exit (0);
42726   }
42727
42728   ;
42729   return 0;
42730 }
42731 _ACEOF
42732 rm -f conftest$ac_exeext
42733 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42734   (eval $ac_link) 2>&5
42735   ac_status=$?
42736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42737   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
42738   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42739   (eval $ac_try) 2>&5
42740   ac_status=$?
42741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42742   (exit $ac_status); }; }; then
42743   ac_cv_func_memcmp_working=yes
42744 else
42745   echo "$as_me: program exited with status $ac_status" >&5
42746 echo "$as_me: failed program was:" >&5
42747 sed 's/^/| /' conftest.$ac_ext >&5
42748
42749 ( exit $ac_status )
42750 ac_cv_func_memcmp_working=no
42751 fi
42752 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
42753 fi
42754 fi
42755 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
42756 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
42757 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
42758     "memcmp.$ac_objext"   | \
42759   *" memcmp.$ac_objext"   | \
42760     "memcmp.$ac_objext "* | \
42761   *" memcmp.$ac_objext "* ) ;;
42762   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
42763 esac
42764
42765
42766
42767 if test $ac_cv_func_memcmp_working = no ; then
42768
42769 cat >>confdefs.h <<\_ACEOF
42770 #define NEED_MEMCMP_REPLACEMENT 1
42771 _ACEOF
42772
42773 fi
42774
42775
42776 for ac_func in strftime
42777 do
42778 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
42779 echo "$as_me:$LINENO: checking for $ac_func" >&5
42780 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
42781 if eval "test \"\${$as_ac_var+set}\" = set"; then
42782   echo $ECHO_N "(cached) $ECHO_C" >&6
42783 else
42784   cat >conftest.$ac_ext <<_ACEOF
42785 /* confdefs.h.  */
42786 _ACEOF
42787 cat confdefs.h >>conftest.$ac_ext
42788 cat >>conftest.$ac_ext <<_ACEOF
42789 /* end confdefs.h.  */
42790 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
42791    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
42792 #define $ac_func innocuous_$ac_func
42793
42794 /* System header to define __stub macros and hopefully few prototypes,
42795     which can conflict with char $ac_func (); below.
42796     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
42797     <limits.h> exists even on freestanding compilers.  */
42798
42799 #ifdef __STDC__
42800 # include <limits.h>
42801 #else
42802 # include <assert.h>
42803 #endif
42804
42805 #undef $ac_func
42806
42807 /* Override any gcc2 internal prototype to avoid an error.  */
42808 #ifdef __cplusplus
42809 extern "C"
42810 {
42811 #endif
42812 /* We use char because int might match the return type of a gcc2
42813    builtin and then its argument prototype would still apply.  */
42814 char $ac_func ();
42815 /* The GNU C library defines this for functions which it implements
42816     to always fail with ENOSYS.  Some functions are actually named
42817     something starting with __ and the normal name is an alias.  */
42818 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
42819 choke me
42820 #else
42821 char (*f) () = $ac_func;
42822 #endif
42823 #ifdef __cplusplus
42824 }
42825 #endif
42826
42827 int
42828 main ()
42829 {
42830 return f != $ac_func;
42831   ;
42832   return 0;
42833 }
42834 _ACEOF
42835 rm -f conftest.$ac_objext conftest$ac_exeext
42836 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42837   (eval $ac_link) 2>conftest.er1
42838   ac_status=$?
42839   grep -v '^ *+' conftest.er1 >conftest.err
42840   rm -f conftest.er1
42841   cat conftest.err >&5
42842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42843   (exit $ac_status); } &&
42844          { ac_try='test -z "$ac_c_werror_flag"
42845                          || test ! -s conftest.err'
42846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42847   (eval $ac_try) 2>&5
42848   ac_status=$?
42849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42850   (exit $ac_status); }; } &&
42851          { ac_try='test -s conftest$ac_exeext'
42852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42853   (eval $ac_try) 2>&5
42854   ac_status=$?
42855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42856   (exit $ac_status); }; }; then
42857   eval "$as_ac_var=yes"
42858 else
42859   echo "$as_me: failed program was:" >&5
42860 sed 's/^/| /' conftest.$ac_ext >&5
42861
42862 eval "$as_ac_var=no"
42863 fi
42864 rm -f conftest.err conftest.$ac_objext \
42865       conftest$ac_exeext conftest.$ac_ext
42866 fi
42867 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
42868 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
42869 if test `eval echo '${'$as_ac_var'}'` = yes; then
42870   cat >>confdefs.h <<_ACEOF
42871 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
42872 _ACEOF
42873
42874 else
42875   # strftime is in -lintl on SCO UNIX.
42876 echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
42877 echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
42878 if test "${ac_cv_lib_intl_strftime+set}" = set; then
42879   echo $ECHO_N "(cached) $ECHO_C" >&6
42880 else
42881   ac_check_lib_save_LIBS=$LIBS
42882 LIBS="-lintl  $LIBS"
42883 cat >conftest.$ac_ext <<_ACEOF
42884 /* confdefs.h.  */
42885 _ACEOF
42886 cat confdefs.h >>conftest.$ac_ext
42887 cat >>conftest.$ac_ext <<_ACEOF
42888 /* end confdefs.h.  */
42889
42890 /* Override any gcc2 internal prototype to avoid an error.  */
42891 #ifdef __cplusplus
42892 extern "C"
42893 #endif
42894 /* We use char because int might match the return type of a gcc2
42895    builtin and then its argument prototype would still apply.  */
42896 char strftime ();
42897 int
42898 main ()
42899 {
42900 strftime ();
42901   ;
42902   return 0;
42903 }
42904 _ACEOF
42905 rm -f conftest.$ac_objext conftest$ac_exeext
42906 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42907   (eval $ac_link) 2>conftest.er1
42908   ac_status=$?
42909   grep -v '^ *+' conftest.er1 >conftest.err
42910   rm -f conftest.er1
42911   cat conftest.err >&5
42912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42913   (exit $ac_status); } &&
42914          { ac_try='test -z "$ac_c_werror_flag"
42915                          || test ! -s conftest.err'
42916   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42917   (eval $ac_try) 2>&5
42918   ac_status=$?
42919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42920   (exit $ac_status); }; } &&
42921          { ac_try='test -s conftest$ac_exeext'
42922   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42923   (eval $ac_try) 2>&5
42924   ac_status=$?
42925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42926   (exit $ac_status); }; }; then
42927   ac_cv_lib_intl_strftime=yes
42928 else
42929   echo "$as_me: failed program was:" >&5
42930 sed 's/^/| /' conftest.$ac_ext >&5
42931
42932 ac_cv_lib_intl_strftime=no
42933 fi
42934 rm -f conftest.err conftest.$ac_objext \
42935       conftest$ac_exeext conftest.$ac_ext
42936 LIBS=$ac_check_lib_save_LIBS
42937 fi
42938 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
42939 echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
42940 if test $ac_cv_lib_intl_strftime = yes; then
42941   cat >>confdefs.h <<\_ACEOF
42942 #define HAVE_STRFTIME 1
42943 _ACEOF
42944
42945 LIBS="-lintl $LIBS"
42946 fi
42947
42948 fi
42949 done
42950
42951
42952 echo "$as_me:$LINENO: checking for inet_aton()" >&5
42953 echo $ECHO_N "checking for inet_aton()... $ECHO_C" >&6
42954 if test "${ol_cv_func_inet_aton+set}" = set; then
42955   echo $ECHO_N "(cached) $ECHO_C" >&6
42956 else
42957   cat >conftest.$ac_ext <<_ACEOF
42958 /* confdefs.h.  */
42959 _ACEOF
42960 cat confdefs.h >>conftest.$ac_ext
42961 cat >>conftest.$ac_ext <<_ACEOF
42962 /* end confdefs.h.  */
42963
42964 #ifdef HAVE_SYS_TYPES_H
42965 #       include <sys/types.h>
42966 #endif
42967 #ifdef HAVE_SYS_SOCKET_H
42968 #       include <sys/socket.h>
42969 #       ifdef HAVE_SYS_SELECT_H
42970 #               include <sys/select.h>
42971 #       endif
42972 #       include <netinet/in.h>
42973 #       ifdef HAVE_ARPA_INET_H
42974 #               include <arpa/inet.h>
42975 #       endif
42976 #endif
42977
42978 int
42979 main ()
42980 {
42981 struct in_addr in;
42982 int rc = inet_aton( "255.255.255.255", &in );
42983   ;
42984   return 0;
42985 }
42986 _ACEOF
42987 rm -f conftest.$ac_objext conftest$ac_exeext
42988 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42989   (eval $ac_link) 2>conftest.er1
42990   ac_status=$?
42991   grep -v '^ *+' conftest.er1 >conftest.err
42992   rm -f conftest.er1
42993   cat conftest.err >&5
42994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
42995   (exit $ac_status); } &&
42996          { ac_try='test -z "$ac_c_werror_flag"
42997                          || test ! -s conftest.err'
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); }; } &&
43003          { ac_try='test -s conftest$ac_exeext'
43004   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43005   (eval $ac_try) 2>&5
43006   ac_status=$?
43007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43008   (exit $ac_status); }; }; then
43009   ol_cv_func_inet_aton=yes
43010 else
43011   echo "$as_me: failed program was:" >&5
43012 sed 's/^/| /' conftest.$ac_ext >&5
43013
43014 ol_cv_func_inet_aton=no
43015 fi
43016 rm -f conftest.err conftest.$ac_objext \
43017       conftest$ac_exeext conftest.$ac_ext
43018 fi
43019 echo "$as_me:$LINENO: result: $ol_cv_func_inet_aton" >&5
43020 echo "${ECHO_T}$ol_cv_func_inet_aton" >&6
43021   if test $ol_cv_func_inet_aton != no; then
43022
43023 cat >>confdefs.h <<\_ACEOF
43024 #define HAVE_INET_ATON 1
43025 _ACEOF
43026
43027   fi
43028
43029
43030 echo "$as_me:$LINENO: checking for _spawnlp" >&5
43031 echo $ECHO_N "checking for _spawnlp... $ECHO_C" >&6
43032 if test "${ac_cv_func__spawnlp+set}" = set; then
43033   echo $ECHO_N "(cached) $ECHO_C" >&6
43034 else
43035   cat >conftest.$ac_ext <<_ACEOF
43036 /* confdefs.h.  */
43037 _ACEOF
43038 cat confdefs.h >>conftest.$ac_ext
43039 cat >>conftest.$ac_ext <<_ACEOF
43040 /* end confdefs.h.  */
43041 /* Define _spawnlp to an innocuous variant, in case <limits.h> declares _spawnlp.
43042    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43043 #define _spawnlp innocuous__spawnlp
43044
43045 /* System header to define __stub macros and hopefully few prototypes,
43046     which can conflict with char _spawnlp (); below.
43047     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43048     <limits.h> exists even on freestanding compilers.  */
43049
43050 #ifdef __STDC__
43051 # include <limits.h>
43052 #else
43053 # include <assert.h>
43054 #endif
43055
43056 #undef _spawnlp
43057
43058 /* Override any gcc2 internal prototype to avoid an error.  */
43059 #ifdef __cplusplus
43060 extern "C"
43061 {
43062 #endif
43063 /* We use char because int might match the return type of a gcc2
43064    builtin and then its argument prototype would still apply.  */
43065 char _spawnlp ();
43066 /* The GNU C library defines this for functions which it implements
43067     to always fail with ENOSYS.  Some functions are actually named
43068     something starting with __ and the normal name is an alias.  */
43069 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
43070 choke me
43071 #else
43072 char (*f) () = _spawnlp;
43073 #endif
43074 #ifdef __cplusplus
43075 }
43076 #endif
43077
43078 int
43079 main ()
43080 {
43081 return f != _spawnlp;
43082   ;
43083   return 0;
43084 }
43085 _ACEOF
43086 rm -f conftest.$ac_objext conftest$ac_exeext
43087 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43088   (eval $ac_link) 2>conftest.er1
43089   ac_status=$?
43090   grep -v '^ *+' conftest.er1 >conftest.err
43091   rm -f conftest.er1
43092   cat conftest.err >&5
43093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43094   (exit $ac_status); } &&
43095          { ac_try='test -z "$ac_c_werror_flag"
43096                          || test ! -s conftest.err'
43097   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43098   (eval $ac_try) 2>&5
43099   ac_status=$?
43100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43101   (exit $ac_status); }; } &&
43102          { ac_try='test -s conftest$ac_exeext'
43103   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43104   (eval $ac_try) 2>&5
43105   ac_status=$?
43106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43107   (exit $ac_status); }; }; then
43108   ac_cv_func__spawnlp=yes
43109 else
43110   echo "$as_me: failed program was:" >&5
43111 sed 's/^/| /' conftest.$ac_ext >&5
43112
43113 ac_cv_func__spawnlp=no
43114 fi
43115 rm -f conftest.err conftest.$ac_objext \
43116       conftest$ac_exeext conftest.$ac_ext
43117 fi
43118 echo "$as_me:$LINENO: result: $ac_cv_func__spawnlp" >&5
43119 echo "${ECHO_T}$ac_cv_func__spawnlp" >&6
43120 if test $ac_cv_func__spawnlp = yes; then
43121
43122 cat >>confdefs.h <<\_ACEOF
43123 #define HAVE_SPAWNLP 1
43124 _ACEOF
43125
43126 fi
43127
43128
43129 echo "$as_me:$LINENO: checking for _snprintf" >&5
43130 echo $ECHO_N "checking for _snprintf... $ECHO_C" >&6
43131 if test "${ac_cv_func__snprintf+set}" = set; then
43132   echo $ECHO_N "(cached) $ECHO_C" >&6
43133 else
43134   cat >conftest.$ac_ext <<_ACEOF
43135 /* confdefs.h.  */
43136 _ACEOF
43137 cat confdefs.h >>conftest.$ac_ext
43138 cat >>conftest.$ac_ext <<_ACEOF
43139 /* end confdefs.h.  */
43140 /* Define _snprintf to an innocuous variant, in case <limits.h> declares _snprintf.
43141    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43142 #define _snprintf innocuous__snprintf
43143
43144 /* System header to define __stub macros and hopefully few prototypes,
43145     which can conflict with char _snprintf (); below.
43146     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43147     <limits.h> exists even on freestanding compilers.  */
43148
43149 #ifdef __STDC__
43150 # include <limits.h>
43151 #else
43152 # include <assert.h>
43153 #endif
43154
43155 #undef _snprintf
43156
43157 /* Override any gcc2 internal prototype to avoid an error.  */
43158 #ifdef __cplusplus
43159 extern "C"
43160 {
43161 #endif
43162 /* We use char because int might match the return type of a gcc2
43163    builtin and then its argument prototype would still apply.  */
43164 char _snprintf ();
43165 /* The GNU C library defines this for functions which it implements
43166     to always fail with ENOSYS.  Some functions are actually named
43167     something starting with __ and the normal name is an alias.  */
43168 #if defined (__stub__snprintf) || defined (__stub____snprintf)
43169 choke me
43170 #else
43171 char (*f) () = _snprintf;
43172 #endif
43173 #ifdef __cplusplus
43174 }
43175 #endif
43176
43177 int
43178 main ()
43179 {
43180 return f != _snprintf;
43181   ;
43182   return 0;
43183 }
43184 _ACEOF
43185 rm -f conftest.$ac_objext conftest$ac_exeext
43186 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43187   (eval $ac_link) 2>conftest.er1
43188   ac_status=$?
43189   grep -v '^ *+' conftest.er1 >conftest.err
43190   rm -f conftest.er1
43191   cat conftest.err >&5
43192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43193   (exit $ac_status); } &&
43194          { ac_try='test -z "$ac_c_werror_flag"
43195                          || test ! -s conftest.err'
43196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43197   (eval $ac_try) 2>&5
43198   ac_status=$?
43199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43200   (exit $ac_status); }; } &&
43201          { ac_try='test -s conftest$ac_exeext'
43202   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43203   (eval $ac_try) 2>&5
43204   ac_status=$?
43205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43206   (exit $ac_status); }; }; then
43207   ac_cv_func__snprintf=yes
43208 else
43209   echo "$as_me: failed program was:" >&5
43210 sed 's/^/| /' conftest.$ac_ext >&5
43211
43212 ac_cv_func__snprintf=no
43213 fi
43214 rm -f conftest.err conftest.$ac_objext \
43215       conftest$ac_exeext conftest.$ac_ext
43216 fi
43217 echo "$as_me:$LINENO: result: $ac_cv_func__snprintf" >&5
43218 echo "${ECHO_T}$ac_cv_func__snprintf" >&6
43219 if test $ac_cv_func__snprintf = yes; then
43220   ac_cv_func_snprintf=yes
43221
43222 cat >>confdefs.h <<\_ACEOF
43223 #define snprintf _snprintf
43224 _ACEOF
43225
43226
43227 fi
43228
43229
43230 echo "$as_me:$LINENO: checking for _vsnprintf" >&5
43231 echo $ECHO_N "checking for _vsnprintf... $ECHO_C" >&6
43232 if test "${ac_cv_func__vsnprintf+set}" = set; then
43233   echo $ECHO_N "(cached) $ECHO_C" >&6
43234 else
43235   cat >conftest.$ac_ext <<_ACEOF
43236 /* confdefs.h.  */
43237 _ACEOF
43238 cat confdefs.h >>conftest.$ac_ext
43239 cat >>conftest.$ac_ext <<_ACEOF
43240 /* end confdefs.h.  */
43241 /* Define _vsnprintf to an innocuous variant, in case <limits.h> declares _vsnprintf.
43242    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43243 #define _vsnprintf innocuous__vsnprintf
43244
43245 /* System header to define __stub macros and hopefully few prototypes,
43246     which can conflict with char _vsnprintf (); below.
43247     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43248     <limits.h> exists even on freestanding compilers.  */
43249
43250 #ifdef __STDC__
43251 # include <limits.h>
43252 #else
43253 # include <assert.h>
43254 #endif
43255
43256 #undef _vsnprintf
43257
43258 /* Override any gcc2 internal prototype to avoid an error.  */
43259 #ifdef __cplusplus
43260 extern "C"
43261 {
43262 #endif
43263 /* We use char because int might match the return type of a gcc2
43264    builtin and then its argument prototype would still apply.  */
43265 char _vsnprintf ();
43266 /* The GNU C library defines this for functions which it implements
43267     to always fail with ENOSYS.  Some functions are actually named
43268     something starting with __ and the normal name is an alias.  */
43269 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
43270 choke me
43271 #else
43272 char (*f) () = _vsnprintf;
43273 #endif
43274 #ifdef __cplusplus
43275 }
43276 #endif
43277
43278 int
43279 main ()
43280 {
43281 return f != _vsnprintf;
43282   ;
43283   return 0;
43284 }
43285 _ACEOF
43286 rm -f conftest.$ac_objext conftest$ac_exeext
43287 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43288   (eval $ac_link) 2>conftest.er1
43289   ac_status=$?
43290   grep -v '^ *+' conftest.er1 >conftest.err
43291   rm -f conftest.er1
43292   cat conftest.err >&5
43293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43294   (exit $ac_status); } &&
43295          { ac_try='test -z "$ac_c_werror_flag"
43296                          || test ! -s conftest.err'
43297   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43298   (eval $ac_try) 2>&5
43299   ac_status=$?
43300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43301   (exit $ac_status); }; } &&
43302          { ac_try='test -s conftest$ac_exeext'
43303   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43304   (eval $ac_try) 2>&5
43305   ac_status=$?
43306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43307   (exit $ac_status); }; }; then
43308   ac_cv_func__vsnprintf=yes
43309 else
43310   echo "$as_me: failed program was:" >&5
43311 sed 's/^/| /' conftest.$ac_ext >&5
43312
43313 ac_cv_func__vsnprintf=no
43314 fi
43315 rm -f conftest.err conftest.$ac_objext \
43316       conftest$ac_exeext conftest.$ac_ext
43317 fi
43318 echo "$as_me:$LINENO: result: $ac_cv_func__vsnprintf" >&5
43319 echo "${ECHO_T}$ac_cv_func__vsnprintf" >&6
43320 if test $ac_cv_func__vsnprintf = yes; then
43321   ac_cv_func_vsnprintf=yes
43322
43323 cat >>confdefs.h <<\_ACEOF
43324 #define vsnprintf _vsnprintf
43325 _ACEOF
43326
43327
43328 fi
43329
43330
43331
43332 for ac_func in vprintf
43333 do
43334 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
43335 echo "$as_me:$LINENO: checking for $ac_func" >&5
43336 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
43337 if eval "test \"\${$as_ac_var+set}\" = set"; then
43338   echo $ECHO_N "(cached) $ECHO_C" >&6
43339 else
43340   cat >conftest.$ac_ext <<_ACEOF
43341 /* confdefs.h.  */
43342 _ACEOF
43343 cat confdefs.h >>conftest.$ac_ext
43344 cat >>conftest.$ac_ext <<_ACEOF
43345 /* end confdefs.h.  */
43346 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
43347    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43348 #define $ac_func innocuous_$ac_func
43349
43350 /* System header to define __stub macros and hopefully few prototypes,
43351     which can conflict with char $ac_func (); below.
43352     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43353     <limits.h> exists even on freestanding compilers.  */
43354
43355 #ifdef __STDC__
43356 # include <limits.h>
43357 #else
43358 # include <assert.h>
43359 #endif
43360
43361 #undef $ac_func
43362
43363 /* Override any gcc2 internal prototype to avoid an error.  */
43364 #ifdef __cplusplus
43365 extern "C"
43366 {
43367 #endif
43368 /* We use char because int might match the return type of a gcc2
43369    builtin and then its argument prototype would still apply.  */
43370 char $ac_func ();
43371 /* The GNU C library defines this for functions which it implements
43372     to always fail with ENOSYS.  Some functions are actually named
43373     something starting with __ and the normal name is an alias.  */
43374 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
43375 choke me
43376 #else
43377 char (*f) () = $ac_func;
43378 #endif
43379 #ifdef __cplusplus
43380 }
43381 #endif
43382
43383 int
43384 main ()
43385 {
43386 return f != $ac_func;
43387   ;
43388   return 0;
43389 }
43390 _ACEOF
43391 rm -f conftest.$ac_objext conftest$ac_exeext
43392 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43393   (eval $ac_link) 2>conftest.er1
43394   ac_status=$?
43395   grep -v '^ *+' conftest.er1 >conftest.err
43396   rm -f conftest.er1
43397   cat conftest.err >&5
43398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43399   (exit $ac_status); } &&
43400          { ac_try='test -z "$ac_c_werror_flag"
43401                          || test ! -s conftest.err'
43402   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43403   (eval $ac_try) 2>&5
43404   ac_status=$?
43405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43406   (exit $ac_status); }; } &&
43407          { ac_try='test -s conftest$ac_exeext'
43408   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43409   (eval $ac_try) 2>&5
43410   ac_status=$?
43411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43412   (exit $ac_status); }; }; then
43413   eval "$as_ac_var=yes"
43414 else
43415   echo "$as_me: failed program was:" >&5
43416 sed 's/^/| /' conftest.$ac_ext >&5
43417
43418 eval "$as_ac_var=no"
43419 fi
43420 rm -f conftest.err conftest.$ac_objext \
43421       conftest$ac_exeext conftest.$ac_ext
43422 fi
43423 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
43424 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
43425 if test `eval echo '${'$as_ac_var'}'` = yes; then
43426   cat >>confdefs.h <<_ACEOF
43427 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
43428 _ACEOF
43429
43430 echo "$as_me:$LINENO: checking for _doprnt" >&5
43431 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
43432 if test "${ac_cv_func__doprnt+set}" = set; then
43433   echo $ECHO_N "(cached) $ECHO_C" >&6
43434 else
43435   cat >conftest.$ac_ext <<_ACEOF
43436 /* confdefs.h.  */
43437 _ACEOF
43438 cat confdefs.h >>conftest.$ac_ext
43439 cat >>conftest.$ac_ext <<_ACEOF
43440 /* end confdefs.h.  */
43441 /* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
43442    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43443 #define _doprnt innocuous__doprnt
43444
43445 /* System header to define __stub macros and hopefully few prototypes,
43446     which can conflict with char _doprnt (); below.
43447     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43448     <limits.h> exists even on freestanding compilers.  */
43449
43450 #ifdef __STDC__
43451 # include <limits.h>
43452 #else
43453 # include <assert.h>
43454 #endif
43455
43456 #undef _doprnt
43457
43458 /* Override any gcc2 internal prototype to avoid an error.  */
43459 #ifdef __cplusplus
43460 extern "C"
43461 {
43462 #endif
43463 /* We use char because int might match the return type of a gcc2
43464    builtin and then its argument prototype would still apply.  */
43465 char _doprnt ();
43466 /* The GNU C library defines this for functions which it implements
43467     to always fail with ENOSYS.  Some functions are actually named
43468     something starting with __ and the normal name is an alias.  */
43469 #if defined (__stub__doprnt) || defined (__stub____doprnt)
43470 choke me
43471 #else
43472 char (*f) () = _doprnt;
43473 #endif
43474 #ifdef __cplusplus
43475 }
43476 #endif
43477
43478 int
43479 main ()
43480 {
43481 return f != _doprnt;
43482   ;
43483   return 0;
43484 }
43485 _ACEOF
43486 rm -f conftest.$ac_objext conftest$ac_exeext
43487 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43488   (eval $ac_link) 2>conftest.er1
43489   ac_status=$?
43490   grep -v '^ *+' conftest.er1 >conftest.err
43491   rm -f conftest.er1
43492   cat conftest.err >&5
43493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43494   (exit $ac_status); } &&
43495          { ac_try='test -z "$ac_c_werror_flag"
43496                          || test ! -s conftest.err'
43497   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43498   (eval $ac_try) 2>&5
43499   ac_status=$?
43500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43501   (exit $ac_status); }; } &&
43502          { ac_try='test -s conftest$ac_exeext'
43503   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43504   (eval $ac_try) 2>&5
43505   ac_status=$?
43506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43507   (exit $ac_status); }; }; then
43508   ac_cv_func__doprnt=yes
43509 else
43510   echo "$as_me: failed program was:" >&5
43511 sed 's/^/| /' conftest.$ac_ext >&5
43512
43513 ac_cv_func__doprnt=no
43514 fi
43515 rm -f conftest.err conftest.$ac_objext \
43516       conftest$ac_exeext conftest.$ac_ext
43517 fi
43518 echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
43519 echo "${ECHO_T}$ac_cv_func__doprnt" >&6
43520 if test $ac_cv_func__doprnt = yes; then
43521
43522 cat >>confdefs.h <<\_ACEOF
43523 #define HAVE_DOPRNT 1
43524 _ACEOF
43525
43526 fi
43527
43528 fi
43529 done
43530
43531
43532
43533 if test $ac_cv_func_vprintf = yes ; then
43534
43535
43536 for ac_func in snprintf vsnprintf
43537 do
43538 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
43539 echo "$as_me:$LINENO: checking for $ac_func" >&5
43540 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
43541 if eval "test \"\${$as_ac_var+set}\" = set"; then
43542   echo $ECHO_N "(cached) $ECHO_C" >&6
43543 else
43544   cat >conftest.$ac_ext <<_ACEOF
43545 /* confdefs.h.  */
43546 _ACEOF
43547 cat confdefs.h >>conftest.$ac_ext
43548 cat >>conftest.$ac_ext <<_ACEOF
43549 /* end confdefs.h.  */
43550 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
43551    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43552 #define $ac_func innocuous_$ac_func
43553
43554 /* System header to define __stub macros and hopefully few prototypes,
43555     which can conflict with char $ac_func (); below.
43556     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43557     <limits.h> exists even on freestanding compilers.  */
43558
43559 #ifdef __STDC__
43560 # include <limits.h>
43561 #else
43562 # include <assert.h>
43563 #endif
43564
43565 #undef $ac_func
43566
43567 /* Override any gcc2 internal prototype to avoid an error.  */
43568 #ifdef __cplusplus
43569 extern "C"
43570 {
43571 #endif
43572 /* We use char because int might match the return type of a gcc2
43573    builtin and then its argument prototype would still apply.  */
43574 char $ac_func ();
43575 /* The GNU C library defines this for functions which it implements
43576     to always fail with ENOSYS.  Some functions are actually named
43577     something starting with __ and the normal name is an alias.  */
43578 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
43579 choke me
43580 #else
43581 char (*f) () = $ac_func;
43582 #endif
43583 #ifdef __cplusplus
43584 }
43585 #endif
43586
43587 int
43588 main ()
43589 {
43590 return f != $ac_func;
43591   ;
43592   return 0;
43593 }
43594 _ACEOF
43595 rm -f conftest.$ac_objext conftest$ac_exeext
43596 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43597   (eval $ac_link) 2>conftest.er1
43598   ac_status=$?
43599   grep -v '^ *+' conftest.er1 >conftest.err
43600   rm -f conftest.er1
43601   cat conftest.err >&5
43602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43603   (exit $ac_status); } &&
43604          { ac_try='test -z "$ac_c_werror_flag"
43605                          || test ! -s conftest.err'
43606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43607   (eval $ac_try) 2>&5
43608   ac_status=$?
43609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43610   (exit $ac_status); }; } &&
43611          { ac_try='test -s conftest$ac_exeext'
43612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43613   (eval $ac_try) 2>&5
43614   ac_status=$?
43615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43616   (exit $ac_status); }; }; then
43617   eval "$as_ac_var=yes"
43618 else
43619   echo "$as_me: failed program was:" >&5
43620 sed 's/^/| /' conftest.$ac_ext >&5
43621
43622 eval "$as_ac_var=no"
43623 fi
43624 rm -f conftest.err conftest.$ac_objext \
43625       conftest$ac_exeext conftest.$ac_ext
43626 fi
43627 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
43628 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
43629 if test `eval echo '${'$as_ac_var'}'` = yes; then
43630   cat >>confdefs.h <<_ACEOF
43631 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
43632 _ACEOF
43633
43634 fi
43635 done
43636
43637 fi
43638
43639
43640
43641
43642
43643
43644
43645
43646
43647
43648
43649
43650
43651
43652
43653
43654
43655
43656
43657
43658
43659
43660
43661
43662
43663
43664
43665
43666
43667
43668
43669
43670
43671
43672
43673
43674
43675
43676
43677
43678
43679
43680
43681
43682
43683
43684
43685
43686
43687
43688
43689
43690
43691
43692
43693 for ac_func in \
43694         bcopy                   \
43695         closesocket             \
43696         chroot                  \
43697         endgrent                \
43698         endpwent                \
43699         fcntl                   \
43700         flock                   \
43701         fstat                   \
43702         getdtablesize   \
43703         getgrgid                \
43704         gethostname             \
43705         getpass                 \
43706         getpassphrase   \
43707         getpwuid                \
43708         getpwnam                \
43709         getspnam                \
43710         gettimeofday    \
43711         initgroups              \
43712         inet_ntoa_b             \
43713         lockf                   \
43714         memcpy                  \
43715         memmove                 \
43716         memrchr                 \
43717         mkstemp                 \
43718         mktemp                  \
43719         pipe                    \
43720         read                    \
43721         recv                    \
43722         recvfrom                \
43723         setpwfile               \
43724         setgid                  \
43725         setegid                 \
43726         setsid                  \
43727         setuid                  \
43728         seteuid                 \
43729         signal                  \
43730         strdup                  \
43731         strpbrk                 \
43732         strrchr                 \
43733         strsep                  \
43734         strstr                  \
43735         strtol                  \
43736         strtoul                 \
43737         strtoq                  \
43738         strtouq                 \
43739         strtoll                 \
43740         strspn                  \
43741         sysconf                 \
43742         waitpid                 \
43743         wait4                   \
43744         write                   \
43745         send                    \
43746         sendmsg                 \
43747         sendto                  \
43748
43749 do
43750 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
43751 echo "$as_me:$LINENO: checking for $ac_func" >&5
43752 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
43753 if eval "test \"\${$as_ac_var+set}\" = set"; then
43754   echo $ECHO_N "(cached) $ECHO_C" >&6
43755 else
43756   cat >conftest.$ac_ext <<_ACEOF
43757 /* confdefs.h.  */
43758 _ACEOF
43759 cat confdefs.h >>conftest.$ac_ext
43760 cat >>conftest.$ac_ext <<_ACEOF
43761 /* end confdefs.h.  */
43762 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
43763    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43764 #define $ac_func innocuous_$ac_func
43765
43766 /* System header to define __stub macros and hopefully few prototypes,
43767     which can conflict with char $ac_func (); below.
43768     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43769     <limits.h> exists even on freestanding compilers.  */
43770
43771 #ifdef __STDC__
43772 # include <limits.h>
43773 #else
43774 # include <assert.h>
43775 #endif
43776
43777 #undef $ac_func
43778
43779 /* Override any gcc2 internal prototype to avoid an error.  */
43780 #ifdef __cplusplus
43781 extern "C"
43782 {
43783 #endif
43784 /* We use char because int might match the return type of a gcc2
43785    builtin and then its argument prototype would still apply.  */
43786 char $ac_func ();
43787 /* The GNU C library defines this for functions which it implements
43788     to always fail with ENOSYS.  Some functions are actually named
43789     something starting with __ and the normal name is an alias.  */
43790 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
43791 choke me
43792 #else
43793 char (*f) () = $ac_func;
43794 #endif
43795 #ifdef __cplusplus
43796 }
43797 #endif
43798
43799 int
43800 main ()
43801 {
43802 return f != $ac_func;
43803   ;
43804   return 0;
43805 }
43806 _ACEOF
43807 rm -f conftest.$ac_objext conftest$ac_exeext
43808 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43809   (eval $ac_link) 2>conftest.er1
43810   ac_status=$?
43811   grep -v '^ *+' conftest.er1 >conftest.err
43812   rm -f conftest.er1
43813   cat conftest.err >&5
43814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43815   (exit $ac_status); } &&
43816          { ac_try='test -z "$ac_c_werror_flag"
43817                          || test ! -s conftest.err'
43818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43819   (eval $ac_try) 2>&5
43820   ac_status=$?
43821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43822   (exit $ac_status); }; } &&
43823          { ac_try='test -s conftest$ac_exeext'
43824   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43825   (eval $ac_try) 2>&5
43826   ac_status=$?
43827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43828   (exit $ac_status); }; }; then
43829   eval "$as_ac_var=yes"
43830 else
43831   echo "$as_me: failed program was:" >&5
43832 sed 's/^/| /' conftest.$ac_ext >&5
43833
43834 eval "$as_ac_var=no"
43835 fi
43836 rm -f conftest.err conftest.$ac_objext \
43837       conftest$ac_exeext conftest.$ac_ext
43838 fi
43839 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
43840 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
43841 if test `eval echo '${'$as_ac_var'}'` = yes; then
43842   cat >>confdefs.h <<_ACEOF
43843 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
43844 _ACEOF
43845
43846 fi
43847 done
43848
43849
43850
43851
43852 for ac_func in getopt getpeereid
43853 do
43854 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
43855 echo "$as_me:$LINENO: checking for $ac_func" >&5
43856 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
43857 if eval "test \"\${$as_ac_var+set}\" = set"; then
43858   echo $ECHO_N "(cached) $ECHO_C" >&6
43859 else
43860   cat >conftest.$ac_ext <<_ACEOF
43861 /* confdefs.h.  */
43862 _ACEOF
43863 cat confdefs.h >>conftest.$ac_ext
43864 cat >>conftest.$ac_ext <<_ACEOF
43865 /* end confdefs.h.  */
43866 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
43867    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43868 #define $ac_func innocuous_$ac_func
43869
43870 /* System header to define __stub macros and hopefully few prototypes,
43871     which can conflict with char $ac_func (); below.
43872     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43873     <limits.h> exists even on freestanding compilers.  */
43874
43875 #ifdef __STDC__
43876 # include <limits.h>
43877 #else
43878 # include <assert.h>
43879 #endif
43880
43881 #undef $ac_func
43882
43883 /* Override any gcc2 internal prototype to avoid an error.  */
43884 #ifdef __cplusplus
43885 extern "C"
43886 {
43887 #endif
43888 /* We use char because int might match the return type of a gcc2
43889    builtin and then its argument prototype would still apply.  */
43890 char $ac_func ();
43891 /* The GNU C library defines this for functions which it implements
43892     to always fail with ENOSYS.  Some functions are actually named
43893     something starting with __ and the normal name is an alias.  */
43894 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
43895 choke me
43896 #else
43897 char (*f) () = $ac_func;
43898 #endif
43899 #ifdef __cplusplus
43900 }
43901 #endif
43902
43903 int
43904 main ()
43905 {
43906 return f != $ac_func;
43907   ;
43908   return 0;
43909 }
43910 _ACEOF
43911 rm -f conftest.$ac_objext conftest$ac_exeext
43912 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43913   (eval $ac_link) 2>conftest.er1
43914   ac_status=$?
43915   grep -v '^ *+' conftest.er1 >conftest.err
43916   rm -f conftest.er1
43917   cat conftest.err >&5
43918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43919   (exit $ac_status); } &&
43920          { ac_try='test -z "$ac_c_werror_flag"
43921                          || test ! -s conftest.err'
43922   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43923   (eval $ac_try) 2>&5
43924   ac_status=$?
43925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43926   (exit $ac_status); }; } &&
43927          { ac_try='test -s conftest$ac_exeext'
43928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
43929   (eval $ac_try) 2>&5
43930   ac_status=$?
43931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
43932   (exit $ac_status); }; }; then
43933   eval "$as_ac_var=yes"
43934 else
43935   echo "$as_me: failed program was:" >&5
43936 sed 's/^/| /' conftest.$ac_ext >&5
43937
43938 eval "$as_ac_var=no"
43939 fi
43940 rm -f conftest.err conftest.$ac_objext \
43941       conftest$ac_exeext conftest.$ac_ext
43942 fi
43943 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
43944 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
43945 if test `eval echo '${'$as_ac_var'}'` = yes; then
43946   cat >>confdefs.h <<_ACEOF
43947 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
43948 _ACEOF
43949
43950 else
43951   case $LIBOBJS in
43952     "$ac_func.$ac_objext"   | \
43953   *" $ac_func.$ac_objext"   | \
43954     "$ac_func.$ac_objext "* | \
43955   *" $ac_func.$ac_objext "* ) ;;
43956   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
43957 esac
43958
43959 fi
43960 done
43961
43962
43963
43964 if test "$ac_cv_func_getopt" != yes; then
43965         LIBSRCS="$LIBSRCS getopt.c"
43966 fi
43967
43968 if test "$ac_cv_func_getpeereid" != yes; then
43969
43970 for ac_func in getpeerucred
43971 do
43972 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
43973 echo "$as_me:$LINENO: checking for $ac_func" >&5
43974 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
43975 if eval "test \"\${$as_ac_var+set}\" = set"; then
43976   echo $ECHO_N "(cached) $ECHO_C" >&6
43977 else
43978   cat >conftest.$ac_ext <<_ACEOF
43979 /* confdefs.h.  */
43980 _ACEOF
43981 cat confdefs.h >>conftest.$ac_ext
43982 cat >>conftest.$ac_ext <<_ACEOF
43983 /* end confdefs.h.  */
43984 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
43985    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
43986 #define $ac_func innocuous_$ac_func
43987
43988 /* System header to define __stub macros and hopefully few prototypes,
43989     which can conflict with char $ac_func (); below.
43990     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43991     <limits.h> exists even on freestanding compilers.  */
43992
43993 #ifdef __STDC__
43994 # include <limits.h>
43995 #else
43996 # include <assert.h>
43997 #endif
43998
43999 #undef $ac_func
44000
44001 /* Override any gcc2 internal prototype to avoid an error.  */
44002 #ifdef __cplusplus
44003 extern "C"
44004 {
44005 #endif
44006 /* We use char because int might match the return type of a gcc2
44007    builtin and then its argument prototype would still apply.  */
44008 char $ac_func ();
44009 /* The GNU C library defines this for functions which it implements
44010     to always fail with ENOSYS.  Some functions are actually named
44011     something starting with __ and the normal name is an alias.  */
44012 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
44013 choke me
44014 #else
44015 char (*f) () = $ac_func;
44016 #endif
44017 #ifdef __cplusplus
44018 }
44019 #endif
44020
44021 int
44022 main ()
44023 {
44024 return f != $ac_func;
44025   ;
44026   return 0;
44027 }
44028 _ACEOF
44029 rm -f conftest.$ac_objext conftest$ac_exeext
44030 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
44031   (eval $ac_link) 2>conftest.er1
44032   ac_status=$?
44033   grep -v '^ *+' conftest.er1 >conftest.err
44034   rm -f conftest.er1
44035   cat conftest.err >&5
44036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44037   (exit $ac_status); } &&
44038          { ac_try='test -z "$ac_c_werror_flag"
44039                          || test ! -s conftest.err'
44040   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44041   (eval $ac_try) 2>&5
44042   ac_status=$?
44043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44044   (exit $ac_status); }; } &&
44045          { ac_try='test -s conftest$ac_exeext'
44046   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44047   (eval $ac_try) 2>&5
44048   ac_status=$?
44049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44050   (exit $ac_status); }; }; then
44051   eval "$as_ac_var=yes"
44052 else
44053   echo "$as_me: failed program was:" >&5
44054 sed 's/^/| /' conftest.$ac_ext >&5
44055
44056 eval "$as_ac_var=no"
44057 fi
44058 rm -f conftest.err conftest.$ac_objext \
44059       conftest$ac_exeext conftest.$ac_ext
44060 fi
44061 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
44062 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
44063 if test `eval echo '${'$as_ac_var'}'` = yes; then
44064   cat >>confdefs.h <<_ACEOF
44065 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
44066 _ACEOF
44067
44068 fi
44069 done
44070
44071         if test "$ac_cv_func_getpeerucred" != yes ; then
44072                 echo "$as_me:$LINENO: checking for struct msghdr.msg_accrightslen" >&5
44073 echo $ECHO_N "checking for struct msghdr.msg_accrightslen... $ECHO_C" >&6
44074 if test "${ac_cv_member_struct_msghdr_msg_accrightslen+set}" = set; then
44075   echo $ECHO_N "(cached) $ECHO_C" >&6
44076 else
44077   cat >conftest.$ac_ext <<_ACEOF
44078 /* confdefs.h.  */
44079 _ACEOF
44080 cat confdefs.h >>conftest.$ac_ext
44081 cat >>conftest.$ac_ext <<_ACEOF
44082 /* end confdefs.h.  */
44083 $ac_includes_default
44084 #ifdef HAVE_SYS_SOCKET_H
44085 #include <sys/socket.h>
44086 #endif
44087
44088 int
44089 main ()
44090 {
44091 static struct msghdr ac_aggr;
44092 if (ac_aggr.msg_accrightslen)
44093 return 0;
44094   ;
44095   return 0;
44096 }
44097 _ACEOF
44098 rm -f conftest.$ac_objext
44099 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
44100   (eval $ac_compile) 2>conftest.er1
44101   ac_status=$?
44102   grep -v '^ *+' conftest.er1 >conftest.err
44103   rm -f conftest.er1
44104   cat conftest.err >&5
44105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44106   (exit $ac_status); } &&
44107          { ac_try='test -z "$ac_c_werror_flag"
44108                          || test ! -s conftest.err'
44109   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44110   (eval $ac_try) 2>&5
44111   ac_status=$?
44112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44113   (exit $ac_status); }; } &&
44114          { ac_try='test -s conftest.$ac_objext'
44115   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44116   (eval $ac_try) 2>&5
44117   ac_status=$?
44118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44119   (exit $ac_status); }; }; then
44120   ac_cv_member_struct_msghdr_msg_accrightslen=yes
44121 else
44122   echo "$as_me: failed program was:" >&5
44123 sed 's/^/| /' conftest.$ac_ext >&5
44124
44125 cat >conftest.$ac_ext <<_ACEOF
44126 /* confdefs.h.  */
44127 _ACEOF
44128 cat confdefs.h >>conftest.$ac_ext
44129 cat >>conftest.$ac_ext <<_ACEOF
44130 /* end confdefs.h.  */
44131 $ac_includes_default
44132 #ifdef HAVE_SYS_SOCKET_H
44133 #include <sys/socket.h>
44134 #endif
44135
44136 int
44137 main ()
44138 {
44139 static struct msghdr ac_aggr;
44140 if (sizeof ac_aggr.msg_accrightslen)
44141 return 0;
44142   ;
44143   return 0;
44144 }
44145 _ACEOF
44146 rm -f conftest.$ac_objext
44147 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
44148   (eval $ac_compile) 2>conftest.er1
44149   ac_status=$?
44150   grep -v '^ *+' conftest.er1 >conftest.err
44151   rm -f conftest.er1
44152   cat conftest.err >&5
44153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44154   (exit $ac_status); } &&
44155          { ac_try='test -z "$ac_c_werror_flag"
44156                          || test ! -s conftest.err'
44157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44158   (eval $ac_try) 2>&5
44159   ac_status=$?
44160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44161   (exit $ac_status); }; } &&
44162          { ac_try='test -s conftest.$ac_objext'
44163   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44164   (eval $ac_try) 2>&5
44165   ac_status=$?
44166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44167   (exit $ac_status); }; }; then
44168   ac_cv_member_struct_msghdr_msg_accrightslen=yes
44169 else
44170   echo "$as_me: failed program was:" >&5
44171 sed 's/^/| /' conftest.$ac_ext >&5
44172
44173 ac_cv_member_struct_msghdr_msg_accrightslen=no
44174 fi
44175 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
44176 fi
44177 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
44178 fi
44179 echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_accrightslen" >&5
44180 echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_accrightslen" >&6
44181 if test $ac_cv_member_struct_msghdr_msg_accrightslen = yes; then
44182
44183 cat >>confdefs.h <<_ACEOF
44184 #define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTSLEN 1
44185 _ACEOF
44186
44187
44188 fi
44189
44190                 if test "$ac_cv_member_struct_msghdr_msg_accrightslen" != yes; then
44191                         echo "$as_me:$LINENO: checking for struct msghdr.msg_control" >&5
44192 echo $ECHO_N "checking for struct msghdr.msg_control... $ECHO_C" >&6
44193 if test "${ac_cv_member_struct_msghdr_msg_control+set}" = set; then
44194   echo $ECHO_N "(cached) $ECHO_C" >&6
44195 else
44196   cat >conftest.$ac_ext <<_ACEOF
44197 /* confdefs.h.  */
44198 _ACEOF
44199 cat confdefs.h >>conftest.$ac_ext
44200 cat >>conftest.$ac_ext <<_ACEOF
44201 /* end confdefs.h.  */
44202 $ac_includes_default
44203 #ifdef HAVE_SYS_SOCKET_H
44204 #include <sys/socket.h>
44205 #endif
44206
44207 int
44208 main ()
44209 {
44210 static struct msghdr ac_aggr;
44211 if (ac_aggr.msg_control)
44212 return 0;
44213   ;
44214   return 0;
44215 }
44216 _ACEOF
44217 rm -f conftest.$ac_objext
44218 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
44219   (eval $ac_compile) 2>conftest.er1
44220   ac_status=$?
44221   grep -v '^ *+' conftest.er1 >conftest.err
44222   rm -f conftest.er1
44223   cat conftest.err >&5
44224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44225   (exit $ac_status); } &&
44226          { ac_try='test -z "$ac_c_werror_flag"
44227                          || test ! -s conftest.err'
44228   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44229   (eval $ac_try) 2>&5
44230   ac_status=$?
44231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44232   (exit $ac_status); }; } &&
44233          { ac_try='test -s conftest.$ac_objext'
44234   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44235   (eval $ac_try) 2>&5
44236   ac_status=$?
44237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44238   (exit $ac_status); }; }; then
44239   ac_cv_member_struct_msghdr_msg_control=yes
44240 else
44241   echo "$as_me: failed program was:" >&5
44242 sed 's/^/| /' conftest.$ac_ext >&5
44243
44244 cat >conftest.$ac_ext <<_ACEOF
44245 /* confdefs.h.  */
44246 _ACEOF
44247 cat confdefs.h >>conftest.$ac_ext
44248 cat >>conftest.$ac_ext <<_ACEOF
44249 /* end confdefs.h.  */
44250 $ac_includes_default
44251 #ifdef HAVE_SYS_SOCKET_H
44252 #include <sys/socket.h>
44253 #endif
44254
44255 int
44256 main ()
44257 {
44258 static struct msghdr ac_aggr;
44259 if (sizeof ac_aggr.msg_control)
44260 return 0;
44261   ;
44262   return 0;
44263 }
44264 _ACEOF
44265 rm -f conftest.$ac_objext
44266 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
44267   (eval $ac_compile) 2>conftest.er1
44268   ac_status=$?
44269   grep -v '^ *+' conftest.er1 >conftest.err
44270   rm -f conftest.er1
44271   cat conftest.err >&5
44272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44273   (exit $ac_status); } &&
44274          { ac_try='test -z "$ac_c_werror_flag"
44275                          || test ! -s conftest.err'
44276   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44277   (eval $ac_try) 2>&5
44278   ac_status=$?
44279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44280   (exit $ac_status); }; } &&
44281          { ac_try='test -s conftest.$ac_objext'
44282   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44283   (eval $ac_try) 2>&5
44284   ac_status=$?
44285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44286   (exit $ac_status); }; }; then
44287   ac_cv_member_struct_msghdr_msg_control=yes
44288 else
44289   echo "$as_me: failed program was:" >&5
44290 sed 's/^/| /' conftest.$ac_ext >&5
44291
44292 ac_cv_member_struct_msghdr_msg_control=no
44293 fi
44294 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
44295 fi
44296 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
44297 fi
44298 echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_control" >&5
44299 echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_control" >&6
44300 if test $ac_cv_member_struct_msghdr_msg_control = yes; then
44301
44302 cat >>confdefs.h <<_ACEOF
44303 #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
44304 _ACEOF
44305
44306
44307 fi
44308
44309                 fi
44310         fi
44311         LIBSRCS="$LIBSRCS getpeereid.c"
44312 fi
44313
44314 if test "$ac_cv_func_snprintf" != yes ||
44315    test "$ac_cv_func_vsnprintf" != yes; then
44316         if test "$ac_cv_func_snprintf" != yes; then
44317
44318 cat >>confdefs.h <<\_ACEOF
44319 #define snprintf ber_pvt_snprintf
44320 _ACEOF
44321
44322         fi
44323         if test "$ac_cv_func_vsnprintf" != yes; then
44324
44325 cat >>confdefs.h <<\_ACEOF
44326 #define vsnprintf ber_pvt_vsnprintf
44327 _ACEOF
44328
44329         fi
44330 fi
44331
44332
44333 if test "$ol_enable_slapi" != no ; then
44334
44335 for ac_header in ltdl.h
44336 do
44337 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
44338 if eval "test \"\${$as_ac_Header+set}\" = set"; then
44339   echo "$as_me:$LINENO: checking for $ac_header" >&5
44340 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
44341 if eval "test \"\${$as_ac_Header+set}\" = set"; then
44342   echo $ECHO_N "(cached) $ECHO_C" >&6
44343 fi
44344 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
44345 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
44346 else
44347   # Is the header compilable?
44348 echo "$as_me:$LINENO: checking $ac_header usability" >&5
44349 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
44350 cat >conftest.$ac_ext <<_ACEOF
44351 /* confdefs.h.  */
44352 _ACEOF
44353 cat confdefs.h >>conftest.$ac_ext
44354 cat >>conftest.$ac_ext <<_ACEOF
44355 /* end confdefs.h.  */
44356 $ac_includes_default
44357 #include <$ac_header>
44358 _ACEOF
44359 rm -f conftest.$ac_objext
44360 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
44361   (eval $ac_compile) 2>conftest.er1
44362   ac_status=$?
44363   grep -v '^ *+' conftest.er1 >conftest.err
44364   rm -f conftest.er1
44365   cat conftest.err >&5
44366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44367   (exit $ac_status); } &&
44368          { ac_try='test -z "$ac_c_werror_flag"
44369                          || test ! -s conftest.err'
44370   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44371   (eval $ac_try) 2>&5
44372   ac_status=$?
44373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44374   (exit $ac_status); }; } &&
44375          { ac_try='test -s conftest.$ac_objext'
44376   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44377   (eval $ac_try) 2>&5
44378   ac_status=$?
44379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44380   (exit $ac_status); }; }; then
44381   ac_header_compiler=yes
44382 else
44383   echo "$as_me: failed program was:" >&5
44384 sed 's/^/| /' conftest.$ac_ext >&5
44385
44386 ac_header_compiler=no
44387 fi
44388 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
44389 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
44390 echo "${ECHO_T}$ac_header_compiler" >&6
44391
44392 # Is the header present?
44393 echo "$as_me:$LINENO: checking $ac_header presence" >&5
44394 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
44395 cat >conftest.$ac_ext <<_ACEOF
44396 /* confdefs.h.  */
44397 _ACEOF
44398 cat confdefs.h >>conftest.$ac_ext
44399 cat >>conftest.$ac_ext <<_ACEOF
44400 /* end confdefs.h.  */
44401 #include <$ac_header>
44402 _ACEOF
44403 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
44404   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
44405   ac_status=$?
44406   grep -v '^ *+' conftest.er1 >conftest.err
44407   rm -f conftest.er1
44408   cat conftest.err >&5
44409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44410   (exit $ac_status); } >/dev/null; then
44411   if test -s conftest.err; then
44412     ac_cpp_err=$ac_c_preproc_warn_flag
44413     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
44414   else
44415     ac_cpp_err=
44416   fi
44417 else
44418   ac_cpp_err=yes
44419 fi
44420 if test -z "$ac_cpp_err"; then
44421   ac_header_preproc=yes
44422 else
44423   echo "$as_me: failed program was:" >&5
44424 sed 's/^/| /' conftest.$ac_ext >&5
44425
44426   ac_header_preproc=no
44427 fi
44428 rm -f conftest.err conftest.$ac_ext
44429 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
44430 echo "${ECHO_T}$ac_header_preproc" >&6
44431
44432 # So?  What about this header?
44433 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
44434   yes:no: )
44435     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
44436 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
44437     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
44438 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
44439     ac_header_preproc=yes
44440     ;;
44441   no:yes:* )
44442     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
44443 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
44444     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
44445 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
44446     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
44447 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
44448     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
44449 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
44450     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
44451 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
44452     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
44453 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
44454     (
44455       cat <<\_ASBOX
44456 ## --------------------------------------------- ##
44457 ## Report this to <http://www.openldap.org/its/> ##
44458 ## --------------------------------------------- ##
44459 _ASBOX
44460     ) |
44461       sed "s/^/$as_me: WARNING:     /" >&2
44462     ;;
44463 esac
44464 echo "$as_me:$LINENO: checking for $ac_header" >&5
44465 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
44466 if eval "test \"\${$as_ac_Header+set}\" = set"; then
44467   echo $ECHO_N "(cached) $ECHO_C" >&6
44468 else
44469   eval "$as_ac_Header=\$ac_header_preproc"
44470 fi
44471 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
44472 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
44473
44474 fi
44475 if test `eval echo '${'$as_ac_Header'}'` = yes; then
44476   cat >>confdefs.h <<_ACEOF
44477 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
44478 _ACEOF
44479
44480 fi
44481
44482 done
44483
44484
44485         if test $ac_cv_header_ltdl_h != yes ; then
44486                 { { echo "$as_me:$LINENO: error: could not locate <ltdl.h>" >&5
44487 echo "$as_me: error: could not locate <ltdl.h>" >&2;}
44488    { (exit 1); exit 1; }; }
44489         fi
44490         echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
44491 echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6
44492 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
44493   echo $ECHO_N "(cached) $ECHO_C" >&6
44494 else
44495   ac_check_lib_save_LIBS=$LIBS
44496 LIBS="-lltdl  $LIBS"
44497 cat >conftest.$ac_ext <<_ACEOF
44498 /* confdefs.h.  */
44499 _ACEOF
44500 cat confdefs.h >>conftest.$ac_ext
44501 cat >>conftest.$ac_ext <<_ACEOF
44502 /* end confdefs.h.  */
44503
44504 /* Override any gcc2 internal prototype to avoid an error.  */
44505 #ifdef __cplusplus
44506 extern "C"
44507 #endif
44508 /* We use char because int might match the return type of a gcc2
44509    builtin and then its argument prototype would still apply.  */
44510 char lt_dlinit ();
44511 int
44512 main ()
44513 {
44514 lt_dlinit ();
44515   ;
44516   return 0;
44517 }
44518 _ACEOF
44519 rm -f conftest.$ac_objext conftest$ac_exeext
44520 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
44521   (eval $ac_link) 2>conftest.er1
44522   ac_status=$?
44523   grep -v '^ *+' conftest.er1 >conftest.err
44524   rm -f conftest.er1
44525   cat conftest.err >&5
44526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44527   (exit $ac_status); } &&
44528          { ac_try='test -z "$ac_c_werror_flag"
44529                          || test ! -s conftest.err'
44530   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44531   (eval $ac_try) 2>&5
44532   ac_status=$?
44533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44534   (exit $ac_status); }; } &&
44535          { ac_try='test -s conftest$ac_exeext'
44536   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44537   (eval $ac_try) 2>&5
44538   ac_status=$?
44539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
44540   (exit $ac_status); }; }; then
44541   ac_cv_lib_ltdl_lt_dlinit=yes
44542 else
44543   echo "$as_me: failed program was:" >&5
44544 sed 's/^/| /' conftest.$ac_ext >&5
44545
44546 ac_cv_lib_ltdl_lt_dlinit=no
44547 fi
44548 rm -f conftest.err conftest.$ac_objext \
44549       conftest$ac_exeext conftest.$ac_ext
44550 LIBS=$ac_check_lib_save_LIBS
44551 fi
44552 echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
44553 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6
44554 if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
44555
44556                 SLAPI_LIBS=-lltdl
44557                 LIBSLAPI=libslapi.a
44558                 LIBSLAPITOOLS=../libslapi.a
44559
44560 cat >>confdefs.h <<\_ACEOF
44561 #define HAVE_LIBLTDL 1
44562 _ACEOF
44563
44564
44565 else
44566   { { echo "$as_me:$LINENO: error: could not locate libtool -lltdl" >&5
44567 echo "$as_me: error: could not locate libtool -lltdl" >&2;}
44568    { (exit 1); exit 1; }; }
44569 fi
44570
44571
44572
44573 cat >>confdefs.h <<\_ACEOF
44574 #define LDAP_SLAPI 1
44575 _ACEOF
44576
44577 fi
44578
44579 if test "$ol_enable_debug" != no ; then
44580         if test "$ol_enable_debug" = traditional; then
44581
44582 cat >>confdefs.h <<\_ACEOF
44583 #define OLD_DEBUG 1
44584 _ACEOF
44585
44586         fi
44587
44588 cat >>confdefs.h <<\_ACEOF
44589 #define LDAP_DEBUG 1
44590 _ACEOF
44591
44592 fi
44593 if test "$ol_enable_syslog" = yes ; then
44594
44595 cat >>confdefs.h <<\_ACEOF
44596 #define LDAP_SYSLOG 1
44597 _ACEOF
44598
44599 fi
44600 if test "$ol_link_kbind" != no ; then
44601
44602 cat >>confdefs.h <<\_ACEOF
44603 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
44604 _ACEOF
44605
44606 fi
44607 if test "$ol_enable_proctitle" != no ; then
44608
44609 cat >>confdefs.h <<\_ACEOF
44610 #define LDAP_PROCTITLE 1
44611 _ACEOF
44612
44613 fi
44614 if test "$ol_enable_referrals" != no ; then
44615
44616 cat >>confdefs.h <<\_ACEOF
44617 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
44618 _ACEOF
44619
44620 fi
44621 if test "$ol_enable_local" != no; then
44622
44623 cat >>confdefs.h <<\_ACEOF
44624 #define LDAP_PF_LOCAL 1
44625 _ACEOF
44626
44627 fi
44628 if test "$ol_link_ipv6" != no; then
44629
44630 cat >>confdefs.h <<\_ACEOF
44631 #define LDAP_PF_INET6 1
44632 _ACEOF
44633
44634 fi
44635 if test "$ol_enable_cleartext" != no ; then
44636
44637 cat >>confdefs.h <<\_ACEOF
44638 #define SLAPD_CLEARTEXT 1
44639 _ACEOF
44640
44641 fi
44642 if test "$ol_enable_crypt" != no ; then
44643
44644 cat >>confdefs.h <<\_ACEOF
44645 #define SLAPD_CRYPT 1
44646 _ACEOF
44647
44648 fi
44649 if test "$ol_link_spasswd" != no ; then
44650
44651 cat >>confdefs.h <<\_ACEOF
44652 #define SLAPD_SPASSWD 1
44653 _ACEOF
44654
44655 fi
44656 if test "$ol_enable_rlookups" != no ; then
44657
44658 cat >>confdefs.h <<\_ACEOF
44659 #define SLAPD_RLOOKUPS 1
44660 _ACEOF
44661
44662 fi
44663 if test "$ol_enable_aci" != no ; then
44664         if test $ol_enable_dynacl = no ; then
44665                 ol_enable_dynacl=yes
44666                 { echo "$as_me:$LINENO: WARNING: ACIs need dynacl" >&5
44667 echo "$as_me: WARNING: ACIs need dynacl" >&2;}
44668         fi
44669         if test "$ol_enable_aci" = mod ; then
44670                 MFLAG=SLAPD_MOD_DYNAMIC
44671                                 { { echo "$as_me:$LINENO: error: ACI build as dynamic module not supported (yet)" >&5
44672 echo "$as_me: error: ACI build as dynamic module not supported (yet)" >&2;}
44673    { (exit 1); exit 1; }; }
44674         else
44675                 MFLAG=SLAPD_MOD_STATIC
44676         fi
44677         WITH_ACI_ENABLED=$ol_enable_aci
44678
44679 cat >>confdefs.h <<_ACEOF
44680 #define SLAPD_ACI_ENABLED $MFLAG
44681 _ACEOF
44682
44683 else
44684         WITH_ACI_ENABLED=no
44685 fi
44686 if test "$ol_enable_dynacl" != no ; then
44687
44688 cat >>confdefs.h <<\_ACEOF
44689 #define SLAP_DYNACL 1
44690 _ACEOF
44691
44692 fi
44693
44694 if test "$ol_link_modules" != no ; then
44695
44696 cat >>confdefs.h <<\_ACEOF
44697 #define SLAPD_MODULES 1
44698 _ACEOF
44699
44700         BUILD_SLAPD=yes
44701         SLAPD_MODULES_LDFLAGS="-dlopen self"
44702 fi
44703
44704
44705 cat >>confdefs.h <<\_ACEOF
44706 #define SLAPD_MOD_STATIC 1
44707 _ACEOF
44708
44709
44710 cat >>confdefs.h <<\_ACEOF
44711 #define SLAPD_MOD_DYNAMIC 2
44712 _ACEOF
44713
44714
44715 if test "$ol_enable_bdb" != no ; then
44716         BUILD_SLAPD=yes
44717         BUILD_BDB=$ol_enable_bdb
44718         if test "$ol_enable_bdb" = mod ; then
44719                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
44720                 MFLAG=SLAPD_MOD_DYNAMIC
44721         else
44722                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
44723                 MFLAG=SLAPD_MOD_STATIC
44724         fi
44725
44726 cat >>confdefs.h <<_ACEOF
44727 #define SLAPD_BDB $MFLAG
44728 _ACEOF
44729
44730 fi
44731
44732 if test "$ol_enable_dnssrv" != no ; then
44733         BUILD_SLAPD=yes
44734         BUILD_DNSSRV=$ol_enable_dnssrv
44735         if test "$ol_enable_dnssrv" = mod ; then
44736                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
44737                 MFLAG=SLAPD_MOD_DYNAMIC
44738         else
44739                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
44740                 MFLAG=SLAPD_MOD_STATIC
44741         fi
44742
44743 cat >>confdefs.h <<_ACEOF
44744 #define SLAPD_DNSSRV $MFLAG
44745 _ACEOF
44746
44747 fi
44748
44749 if test "$ol_enable_hdb" != no ; then
44750         BUILD_SLAPD=yes
44751         BUILD_HDB=$ol_enable_hdb
44752         if test "$ol_enable_hdb" = mod ; then
44753                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
44754                 MFLAG=SLAPD_MOD_DYNAMIC
44755         else
44756                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
44757                 MFLAG=SLAPD_MOD_STATIC
44758         fi
44759
44760 cat >>confdefs.h <<_ACEOF
44761 #define SLAPD_HDB $MFLAG
44762 _ACEOF
44763
44764 fi
44765
44766 if test "$ol_enable_ldap" != no ; then
44767         BUILD_SLAPD=yes
44768         BUILD_LDAP=$ol_enable_ldap
44769         if test "$ol_enable_ldap" = mod ; then
44770                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
44771                 MFLAG=SLAPD_MOD_DYNAMIC
44772         else
44773                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
44774                 MFLAG=SLAPD_MOD_STATIC
44775         fi
44776
44777 cat >>confdefs.h <<_ACEOF
44778 #define SLAPD_LDAP $MFLAG
44779 _ACEOF
44780
44781 fi
44782
44783 if test "$ol_link_ldbm" != no && test $ol_enable_ldbm != no; then
44784         BUILD_SLAPD=yes
44785         BUILD_LDBM=$ol_enable_ldbm
44786         if test "$ol_enable_ldbm" = mod ; then
44787                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
44788                 MFLAG=SLAPD_MOD_DYNAMIC
44789         else
44790                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
44791                 MFLAG=SLAPD_MOD_STATIC
44792         fi
44793
44794 cat >>confdefs.h <<_ACEOF
44795 #define SLAPD_LDBM $MFLAG
44796 _ACEOF
44797
44798 fi
44799
44800 if test "$ol_enable_meta" != no ; then
44801         BUILD_SLAPD=yes
44802         BUILD_META=$ol_enable_meta
44803         BUILD_REWRITE=yes
44804         if test "$ol_enable_meta" = mod ; then
44805                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
44806                 MFLAG=SLAPD_MOD_DYNAMIC
44807         else
44808                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
44809                 MFLAG=SLAPD_MOD_STATIC
44810         fi
44811
44812 cat >>confdefs.h <<_ACEOF
44813 #define SLAPD_META $MFLAG
44814 _ACEOF
44815
44816 fi
44817
44818 if test "$ol_enable_monitor" != no ; then
44819         BUILD_SLAPD=yes
44820         BUILD_MONITOR=$ol_enable_monitor
44821         if test "$ol_enable_monitor" = mod ; then
44822                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
44823                 MFLAG=SLAPD_MOD_DYNAMIC
44824         else
44825                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
44826                 MFLAG=SLAPD_MOD_STATIC
44827         fi
44828
44829 cat >>confdefs.h <<_ACEOF
44830 #define SLAPD_MONITOR $MFLAG
44831 _ACEOF
44832
44833 fi
44834
44835 if test "$ol_enable_null" != no ; then
44836         BUILD_SLAPD=yes
44837         BUILD_NULL=$ol_enable_null
44838         if test "$ol_enable_null" = mod ; then
44839                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
44840                 MFLAG=SLAPD_MOD_DYNAMIC
44841         else
44842                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
44843                 MFLAG=SLAPD_MOD_STATIC
44844         fi
44845
44846 cat >>confdefs.h <<_ACEOF
44847 #define SLAPD_NULL $MFLAG
44848 _ACEOF
44849
44850 fi
44851
44852 if test "$ol_enable_passwd" != no ; then
44853         BUILD_SLAPD=yes
44854         BUILD_PASSWD=$ol_enable_passwd
44855         if test "$ol_enable_passwd" = mod ; then
44856                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
44857                 MFLAG=SLAPD_MOD_DYNAMIC
44858         else
44859                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
44860                 MFLAG=SLAPD_MOD_STATIC
44861         fi
44862
44863 cat >>confdefs.h <<_ACEOF
44864 #define SLAPD_PASSWD $MFLAG
44865 _ACEOF
44866
44867 fi
44868
44869 if test "$ol_link_perl" != no ; then
44870         BUILD_SLAPD=yes
44871         BUILD_PERL=$ol_enable_perl
44872         if test "$ol_enable_perl" = mod ; then
44873                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
44874                 MFLAG=SLAPD_MOD_DYNAMIC
44875         else
44876                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
44877                 MFLAG=SLAPD_MOD_STATIC
44878         fi
44879
44880 cat >>confdefs.h <<_ACEOF
44881 #define SLAPD_PERL $MFLAG
44882 _ACEOF
44883
44884 fi
44885
44886 if test "$ol_enable_relay" != no ; then
44887         BUILD_SLAPD=yes
44888         BUILD_RELAY=$ol_enable_relay
44889         if test "$ol_enable_relay" = mod ; then
44890                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
44891                 MFLAG=SLAPD_MOD_DYNAMIC
44892         else
44893                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
44894                 MFLAG=SLAPD_MOD_STATIC
44895         fi
44896
44897 cat >>confdefs.h <<_ACEOF
44898 #define SLAPD_RELAY $MFLAG
44899 _ACEOF
44900
44901 fi
44902
44903 if test "$ol_enable_shell" != no ; then
44904         if test "$ol_link_threads" != no ; then
44905                 { echo "$as_me:$LINENO: WARNING: Use of --without-threads is recommended with back-shell" >&5
44906 echo "$as_me: WARNING: Use of --without-threads is recommended with back-shell" >&2;}
44907         fi
44908         BUILD_SLAPD=yes
44909         BUILD_SHELL=$ol_enable_shell
44910         if test "$ol_enable_shell" = mod ; then
44911                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
44912                 MFLAG=SLAPD_MOD_DYNAMIC
44913         else
44914                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
44915                 MFLAG=SLAPD_MOD_STATIC
44916         fi
44917
44918 cat >>confdefs.h <<_ACEOF
44919 #define SLAPD_SHELL $MFLAG
44920 _ACEOF
44921
44922 fi
44923
44924 if test "$ol_link_sql" != no ; then
44925         BUILD_SLAPD=yes
44926         BUILD_SQL=$ol_enable_sql
44927         if test "$ol_enable_sql" = mod; then
44928                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
44929                 MFLAG=SLAPD_MOD_DYNAMIC
44930         else
44931                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
44932                 MFLAG=SLAPD_MOD_STATIC
44933         fi
44934
44935 cat >>confdefs.h <<_ACEOF
44936 #define SLAPD_SQL $MFLAG
44937 _ACEOF
44938
44939 fi
44940
44941 if test "$ol_enable_accesslog" != no ; then
44942         BUILD_ACCESSLOG=$ol_enable_accesslog
44943         if test "$ol_enable_accesslog" = mod ; then
44944                 MFLAG=SLAPD_MOD_DYNAMIC
44945                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
44946         else
44947                 MFLAG=SLAPD_MOD_STATIC
44948                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
44949         fi
44950
44951 cat >>confdefs.h <<_ACEOF
44952 #define SLAPD_OVER_ACCESSLOG $MFLAG
44953 _ACEOF
44954
44955 fi
44956
44957 if test "$ol_enable_auditlog" != no ; then
44958         BUILD_AUDITLOG=$ol_enable_auditlog
44959         if test "$ol_enable_auditlog" = mod ; then
44960                 MFLAG=SLAPD_MOD_DYNAMIC
44961                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS auditlog.la"
44962         else
44963                 MFLAG=SLAPD_MOD_STATIC
44964                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS auditlog.o"
44965         fi
44966
44967 cat >>confdefs.h <<_ACEOF
44968 #define SLAPD_OVER_AUDITLOG $MFLAG
44969 _ACEOF
44970
44971 fi
44972
44973 if test "$ol_enable_dds" != no ; then
44974         BUILD_DDS=$ol_enable_dds
44975         if test "$ol_enable_dds" = mod ; then
44976                 MFLAG=SLAPD_MOD_DYNAMIC
44977                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dds.la"
44978         else
44979                 MFLAG=SLAPD_MOD_STATIC
44980                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dds.o"
44981         fi
44982
44983 cat >>confdefs.h <<_ACEOF
44984 #define SLAPD_OVER_DDS $MFLAG
44985 _ACEOF
44986
44987 fi
44988
44989 if test "$ol_enable_denyop" != no ; then
44990         BUILD_DENYOP=$ol_enable_denyop
44991         if test "$ol_enable_denyop" = mod ; then
44992                 MFLAG=SLAPD_MOD_DYNAMIC
44993                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
44994         else
44995                 MFLAG=SLAPD_MOD_STATIC
44996                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS denyop.o"
44997         fi
44998
44999 cat >>confdefs.h <<_ACEOF
45000 #define SLAPD_OVER_DENYOP $MFLAG
45001 _ACEOF
45002
45003 fi
45004
45005 if test "$ol_enable_dyngroup" != no ; then
45006         BUILD_DYNGROUP=$ol_enable_dyngroup
45007         if test "$ol_enable_dyngroup" = mod ; then
45008                 MFLAG=SLAPD_MOD_DYNAMIC
45009                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
45010         else
45011                 MFLAG=SLAPD_MOD_STATIC
45012                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
45013         fi
45014
45015 cat >>confdefs.h <<_ACEOF
45016 #define SLAPD_OVER_DYNGROUP $MFLAG
45017 _ACEOF
45018
45019 fi
45020
45021 if test "$ol_enable_dynlist" != no ; then
45022         BUILD_DYNLIST=$ol_enable_dynlist
45023         if test "$ol_enable_dynlist" = mod ; then
45024                 MFLAG=SLAPD_MOD_DYNAMIC
45025                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
45026         else
45027                 MFLAG=SLAPD_MOD_STATIC
45028                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
45029         fi
45030
45031 cat >>confdefs.h <<_ACEOF
45032 #define SLAPD_OVER_DYNLIST $MFLAG
45033 _ACEOF
45034
45035 fi
45036
45037 if test "$ol_enable_lastmod" != no ; then
45038         BUILD_LASTMOD=$ol_enable_lastmod
45039         if test "$ol_enable_lastmod" = mod ; then
45040                 MFLAG=SLAPD_MOD_DYNAMIC
45041                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
45042         else
45043                 MFLAG=SLAPD_MOD_STATIC
45044                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS lastmod.o"
45045         fi
45046
45047 cat >>confdefs.h <<_ACEOF
45048 #define SLAPD_OVER_LASTMOD $MFLAG
45049 _ACEOF
45050
45051 fi
45052
45053 if test "$ol_enable_ppolicy" != no ; then
45054         BUILD_PPOLICY=$ol_enable_ppolicy
45055         if test "$ol_enable_ppolicy" = mod ; then
45056                 MFLAG=SLAPD_MOD_DYNAMIC
45057                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
45058         else
45059                 MFLAG=SLAPD_MOD_STATIC
45060                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
45061         fi
45062
45063 cat >>confdefs.h <<_ACEOF
45064 #define SLAPD_OVER_PPOLICY $MFLAG
45065 _ACEOF
45066
45067 fi
45068
45069 if test "$ol_enable_proxycache" != no ; then
45070         BUILD_PROXYCACHE=$ol_enable_proxycache
45071         if test "$ol_enable_proxycache" = mod ; then
45072                 MFLAG=SLAPD_MOD_DYNAMIC
45073                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
45074         else
45075                 MFLAG=SLAPD_MOD_STATIC
45076                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
45077         fi
45078
45079 cat >>confdefs.h <<_ACEOF
45080 #define SLAPD_OVER_PROXYCACHE $MFLAG
45081 _ACEOF
45082
45083 fi
45084
45085 if test "$ol_enable_refint" != no ; then
45086         BUILD_REFINT=$ol_enable_refint
45087         if test "$ol_enable_refint" = mod ; then
45088                 MFLAG=SLAPD_MOD_DYNAMIC
45089                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
45090         else
45091                 MFLAG=SLAPD_MOD_STATIC
45092                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
45093         fi
45094
45095 cat >>confdefs.h <<_ACEOF
45096 #define SLAPD_OVER_REFINT $MFLAG
45097 _ACEOF
45098
45099 fi
45100
45101 if test "$ol_enable_retcode" != no ; then
45102         BUILD_RETCODE=$ol_enable_retcode
45103         if test "$ol_enable_retcode" = mod ; then
45104                 MFLAG=SLAPD_MOD_DYNAMIC
45105                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
45106         else
45107                 MFLAG=SLAPD_MOD_STATIC
45108                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
45109         fi
45110
45111 cat >>confdefs.h <<_ACEOF
45112 #define SLAPD_OVER_RETCODE $MFLAG
45113 _ACEOF
45114
45115 fi
45116
45117 if test "$ol_enable_rwm" != no ; then
45118         BUILD_REWRITE=yes
45119         BUILD_RWM=$ol_enable_rwm
45120         if test "$ol_enable_rwm" = mod ; then
45121                 MFLAG=SLAPD_MOD_DYNAMIC
45122                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
45123         else
45124                 MFLAG=SLAPD_MOD_STATIC
45125                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
45126         fi
45127
45128 cat >>confdefs.h <<_ACEOF
45129 #define SLAPD_OVER_RWM $MFLAG
45130 _ACEOF
45131
45132 fi
45133
45134 if test "$ol_enable_seqmod" != no ; then
45135         BUILD_SEQMOD=$ol_enable_seqmod
45136         if test "$ol_enable_seqmod" = mod ; then
45137                 MFLAG=SLAPD_MOD_DYNAMIC
45138                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS seqmod.la"
45139         else
45140                 MFLAG=SLAPD_MOD_STATIC
45141                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS seqmod.o"
45142         fi
45143
45144 cat >>confdefs.h <<_ACEOF
45145 #define SLAPD_OVER_SEQMOD $MFLAG
45146 _ACEOF
45147
45148 fi
45149
45150 if test "$ol_enable_syncprov" != no ; then
45151         BUILD_SYNCPROV=$ol_enable_syncprov
45152         if test "$ol_enable_syncprov" = mod ; then
45153                 MFLAG=SLAPD_MOD_DYNAMIC
45154                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
45155         else
45156                 MFLAG=SLAPD_MOD_STATIC
45157                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
45158         fi
45159
45160 cat >>confdefs.h <<_ACEOF
45161 #define SLAPD_OVER_SYNCPROV $MFLAG
45162 _ACEOF
45163
45164 fi
45165
45166 if test "$ol_enable_translucent" != no ; then
45167         BUILD_TRANSLUCENT=$ol_enable_translucent
45168         if test "$ol_enable_translucent" = mod ; then
45169                 MFLAG=SLAPD_MOD_DYNAMIC
45170                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
45171         else
45172                 MFLAG=SLAPD_MOD_STATIC
45173                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
45174         fi
45175
45176 cat >>confdefs.h <<_ACEOF
45177 #define SLAPD_OVER_TRANSLUCENT $MFLAG
45178 _ACEOF
45179
45180 fi
45181
45182 if test "$ol_enable_unique" != no ; then
45183         BUILD_UNIQUE=$ol_enable_unique
45184         if test "$ol_enable_unique" = mod ; then
45185                 MFLAG=SLAPD_MOD_DYNAMIC
45186                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
45187         else
45188                 MFLAG=SLAPD_MOD_STATIC
45189                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
45190         fi
45191
45192 cat >>confdefs.h <<_ACEOF
45193 #define SLAPD_OVER_UNIQUE $MFLAG
45194 _ACEOF
45195
45196 fi
45197
45198 if test "$ol_enable_valsort" != no ; then
45199         BUILD_VALSORT=$ol_enable_valsort
45200         if test "$ol_enable_valsort" = mod ; then
45201                 MFLAG=SLAPD_MOD_DYNAMIC
45202                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS valsort.la"
45203         else
45204                 MFLAG=SLAPD_MOD_STATIC
45205                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS valsort.o"
45206         fi
45207
45208 cat >>confdefs.h <<_ACEOF
45209 #define SLAPD_OVER_VALSORT $MFLAG
45210 _ACEOF
45211
45212 fi
45213
45214 if test "$ol_enable_slurpd" != no &&
45215    test "$ol_link_threads" != no &&
45216    test $BUILD_SLAPD = yes ; then
45217         BUILD_SLURPD=yes
45218 fi
45219
45220 if test "$ol_enable_rewrite" != no ; then
45221
45222 cat >>confdefs.h <<\_ACEOF
45223 #define ENABLE_REWRITE 1
45224 _ACEOF
45225
45226         BUILD_REWRITE=yes
45227 fi
45228
45229 if test "$ol_enable_slapi" != no ; then
45230
45231 cat >>confdefs.h <<\_ACEOF
45232 #define ENABLE_SLAPI 1
45233 _ACEOF
45234
45235         BUILD_SLAPI=yes
45236         SLAPD_SLAPI_DEPEND=libslapi.a
45237 fi
45238
45239
45240
45241 if test "$ac_cv_mingw32" = yes ; then
45242         PLAT=NT
45243         SLAPD_MODULES_LDFLAGS=
45244 else
45245         PLAT=UNIX
45246 fi
45247
45248
45249
45250
45251
45252
45253
45254
45255
45256
45257
45258
45259
45260
45261
45262
45263
45264
45265
45266
45267
45268
45269
45270
45271
45272
45273
45274
45275
45276
45277
45278
45279
45280
45281
45282
45283
45284
45285
45286
45287
45288
45289
45290
45291
45292
45293
45294
45295
45296
45297
45298
45299
45300
45301
45302
45303
45304
45305
45306
45307
45308
45309
45310
45311
45312
45313
45314
45315
45316
45317
45318
45319
45320
45321
45322
45323
45324
45325
45326
45327
45328
45329
45330
45331
45332 # Check whether --with-xxinstall or --without-xxinstall was given.
45333 if test "${with_xxinstall+set}" = set; then
45334   withval="$with_xxinstall"
45335
45336 fi;
45337
45338
45339                                                                                                                                                                                                                                                                                                                                                                                                                 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"
45340
45341
45342           ac_config_commands="$ac_config_commands default"
45343
45344
45345
45346 test "x$prefix" = xNONE && prefix=$ac_default_prefix
45347 # Let make expand exec_prefix.
45348 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
45349
45350 # VPATH may cause trouble with some makes, so we remove $(srcdir),
45351 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
45352 # trailing colons and then remove the whole line if VPATH becomes empty
45353 # (actually we leave an empty line to preserve line numbers).
45354 if test "x$srcdir" = x.; then
45355   ac_vpsub='/^[  ]*VPATH[        ]*=/{
45356 s/:*\$(srcdir):*/:/;
45357 s/:*\${srcdir}:*/:/;
45358 s/:*@srcdir@:*/:/;
45359 s/^\([^=]*=[     ]*\):*/\1/;
45360 s/:*$//;
45361 s/^[^=]*=[       ]*$//;
45362 }'
45363 fi
45364
45365 DEFS=-DHAVE_CONFIG_H
45366
45367 ac_libobjs=
45368 ac_ltlibobjs=
45369 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
45370   # 1. Remove the extension, and $U if already installed.
45371   ac_i=`echo "$ac_i" |
45372          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
45373   # 2. Add them.
45374   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
45375   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
45376 done
45377 LIBOBJS=$ac_libobjs
45378
45379 LTLIBOBJS=$ac_ltlibobjs
45380
45381
45382 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
45383   { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
45384 Usually this means the macro was only invoked conditionally." >&5
45385 echo "$as_me: error: conditional \"AMDEP\" was never defined.
45386 Usually this means the macro was only invoked conditionally." >&2;}
45387    { (exit 1); exit 1; }; }
45388 fi
45389 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
45390   { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
45391 Usually this means the macro was only invoked conditionally." >&5
45392 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
45393 Usually this means the macro was only invoked conditionally." >&2;}
45394    { (exit 1); exit 1; }; }
45395 fi
45396 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
45397   { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
45398 Usually this means the macro was only invoked conditionally." >&5
45399 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
45400 Usually this means the macro was only invoked conditionally." >&2;}
45401    { (exit 1); exit 1; }; }
45402 fi
45403
45404 : ${CONFIG_STATUS=./config.status}
45405 ac_clean_files_save=$ac_clean_files
45406 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
45407 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
45408 echo "$as_me: creating $CONFIG_STATUS" >&6;}
45409 cat >$CONFIG_STATUS <<_ACEOF
45410 #! $SHELL
45411 # Generated by $as_me.
45412 # Run this file to recreate the current configuration.
45413 # Compiler output produced by configure, useful for debugging
45414 # configure, is in config.log if it exists.
45415
45416 debug=false
45417 ac_cs_recheck=false
45418 ac_cs_silent=false
45419 SHELL=\${CONFIG_SHELL-$SHELL}
45420 _ACEOF
45421
45422 cat >>$CONFIG_STATUS <<\_ACEOF
45423 ## --------------------- ##
45424 ## M4sh Initialization.  ##
45425 ## --------------------- ##
45426
45427 # Be Bourne compatible
45428 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
45429   emulate sh
45430   NULLCMD=:
45431   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
45432   # is contrary to our usage.  Disable this feature.
45433   alias -g '${1+"$@"}'='"$@"'
45434 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
45435   set -o posix
45436 fi
45437 DUALCASE=1; export DUALCASE # for MKS sh
45438
45439 # Support unset when possible.
45440 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
45441   as_unset=unset
45442 else
45443   as_unset=false
45444 fi
45445
45446
45447 # Work around bugs in pre-3.0 UWIN ksh.
45448 $as_unset ENV MAIL MAILPATH
45449 PS1='$ '
45450 PS2='> '
45451 PS4='+ '
45452
45453 # NLS nuisances.
45454 for as_var in \
45455   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
45456   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
45457   LC_TELEPHONE LC_TIME
45458 do
45459   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
45460     eval $as_var=C; export $as_var
45461   else
45462     $as_unset $as_var
45463   fi
45464 done
45465
45466 # Required to use basename.
45467 if expr a : '\(a\)' >/dev/null 2>&1; then
45468   as_expr=expr
45469 else
45470   as_expr=false
45471 fi
45472
45473 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
45474   as_basename=basename
45475 else
45476   as_basename=false
45477 fi
45478
45479
45480 # Name of the executable.
45481 as_me=`$as_basename "$0" ||
45482 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
45483          X"$0" : 'X\(//\)$' \| \
45484          X"$0" : 'X\(/\)$' \| \
45485          .     : '\(.\)' 2>/dev/null ||
45486 echo X/"$0" |
45487     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
45488           /^X\/\(\/\/\)$/{ s//\1/; q; }
45489           /^X\/\(\/\).*/{ s//\1/; q; }
45490           s/.*/./; q'`
45491
45492
45493 # PATH needs CR, and LINENO needs CR and PATH.
45494 # Avoid depending upon Character Ranges.
45495 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
45496 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
45497 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
45498 as_cr_digits='0123456789'
45499 as_cr_alnum=$as_cr_Letters$as_cr_digits
45500
45501 # The user is always right.
45502 if test "${PATH_SEPARATOR+set}" != set; then
45503   echo "#! /bin/sh" >conf$$.sh
45504   echo  "exit 0"   >>conf$$.sh
45505   chmod +x conf$$.sh
45506   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
45507     PATH_SEPARATOR=';'
45508   else
45509     PATH_SEPARATOR=:
45510   fi
45511   rm -f conf$$.sh
45512 fi
45513
45514
45515   as_lineno_1=$LINENO
45516   as_lineno_2=$LINENO
45517   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
45518   test "x$as_lineno_1" != "x$as_lineno_2" &&
45519   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
45520   # Find who we are.  Look in the path if we contain no path at all
45521   # relative or not.
45522   case $0 in
45523     *[\\/]* ) as_myself=$0 ;;
45524     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45525 for as_dir in $PATH
45526 do
45527   IFS=$as_save_IFS
45528   test -z "$as_dir" && as_dir=.
45529   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
45530 done
45531
45532        ;;
45533   esac
45534   # We did not find ourselves, most probably we were run as `sh COMMAND'
45535   # in which case we are not to be found in the path.
45536   if test "x$as_myself" = x; then
45537     as_myself=$0
45538   fi
45539   if test ! -f "$as_myself"; then
45540     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
45541 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
45542    { (exit 1); exit 1; }; }
45543   fi
45544   case $CONFIG_SHELL in
45545   '')
45546     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45547 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
45548 do
45549   IFS=$as_save_IFS
45550   test -z "$as_dir" && as_dir=.
45551   for as_base in sh bash ksh sh5; do
45552          case $as_dir in
45553          /*)
45554            if ("$as_dir/$as_base" -c '
45555   as_lineno_1=$LINENO
45556   as_lineno_2=$LINENO
45557   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
45558   test "x$as_lineno_1" != "x$as_lineno_2" &&
45559   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
45560              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
45561              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
45562              CONFIG_SHELL=$as_dir/$as_base
45563              export CONFIG_SHELL
45564              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
45565            fi;;
45566          esac
45567        done
45568 done
45569 ;;
45570   esac
45571
45572   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
45573   # uniformly replaced by the line number.  The first 'sed' inserts a
45574   # line-number line before each line; the second 'sed' does the real
45575   # work.  The second script uses 'N' to pair each line-number line
45576   # with the numbered line, and appends trailing '-' during
45577   # substitution so that $LINENO is not a special case at line end.
45578   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
45579   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
45580   sed '=' <$as_myself |
45581     sed '
45582       N
45583       s,$,-,
45584       : loop
45585       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
45586       t loop
45587       s,-$,,
45588       s,^['$as_cr_digits']*\n,,
45589     ' >$as_me.lineno &&
45590   chmod +x $as_me.lineno ||
45591     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
45592 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
45593    { (exit 1); exit 1; }; }
45594
45595   # Don't try to exec as it changes $[0], causing all sort of problems
45596   # (the dirname of $[0] is not the place where we might find the
45597   # original and so on.  Autoconf is especially sensible to this).
45598   . ./$as_me.lineno
45599   # Exit status is that of the last command.
45600   exit
45601 }
45602
45603
45604 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
45605   *c*,-n*) ECHO_N= ECHO_C='
45606 ' ECHO_T='      ' ;;
45607   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
45608   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
45609 esac
45610
45611 if expr a : '\(a\)' >/dev/null 2>&1; then
45612   as_expr=expr
45613 else
45614   as_expr=false
45615 fi
45616
45617 rm -f conf$$ conf$$.exe conf$$.file
45618 echo >conf$$.file
45619 if ln -s conf$$.file conf$$ 2>/dev/null; then
45620   # We could just check for DJGPP; but this test a) works b) is more generic
45621   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45622   if test -f conf$$.exe; then
45623     # Don't use ln at all; we don't have any links
45624     as_ln_s='cp -p'
45625   else
45626     as_ln_s='ln -s'
45627   fi
45628 elif ln conf$$.file conf$$ 2>/dev/null; then
45629   as_ln_s=ln
45630 else
45631   as_ln_s='cp -p'
45632 fi
45633 rm -f conf$$ conf$$.exe conf$$.file
45634
45635 if mkdir -p . 2>/dev/null; then
45636   as_mkdir_p=:
45637 else
45638   test -d ./-p && rmdir ./-p
45639   as_mkdir_p=false
45640 fi
45641
45642 as_executable_p="test -f"
45643
45644 # Sed expression to map a string onto a valid CPP name.
45645 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
45646
45647 # Sed expression to map a string onto a valid variable name.
45648 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
45649
45650
45651 # IFS
45652 # We need space, tab and new line, in precisely that order.
45653 as_nl='
45654 '
45655 IFS="   $as_nl"
45656
45657 # CDPATH.
45658 $as_unset CDPATH
45659
45660 exec 6>&1
45661
45662 # Open the log real soon, to keep \$[0] and so on meaningful, and to
45663 # report actual input values of CONFIG_FILES etc. instead of their
45664 # values after options handling.  Logging --version etc. is OK.
45665 exec 5>>config.log
45666 {
45667   echo
45668   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
45669 ## Running $as_me. ##
45670 _ASBOX
45671 } >&5
45672 cat >&5 <<_CSEOF
45673
45674 This file was extended by $as_me, which was
45675 generated by GNU Autoconf 2.59.  Invocation command line was
45676
45677   CONFIG_FILES    = $CONFIG_FILES
45678   CONFIG_HEADERS  = $CONFIG_HEADERS
45679   CONFIG_LINKS    = $CONFIG_LINKS
45680   CONFIG_COMMANDS = $CONFIG_COMMANDS
45681   $ $0 $@
45682
45683 _CSEOF
45684 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
45685 echo >&5
45686 _ACEOF
45687
45688 # Files that config.status was made for.
45689 if test -n "$ac_config_files"; then
45690   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
45691 fi
45692
45693 if test -n "$ac_config_headers"; then
45694   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
45695 fi
45696
45697 if test -n "$ac_config_links"; then
45698   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
45699 fi
45700
45701 if test -n "$ac_config_commands"; then
45702   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
45703 fi
45704
45705 cat >>$CONFIG_STATUS <<\_ACEOF
45706
45707 ac_cs_usage="\
45708 \`$as_me' instantiates files from templates according to the
45709 current configuration.
45710
45711 Usage: $0 [OPTIONS] [FILE]...
45712
45713   -h, --help       print this help, then exit
45714   -V, --version    print version number, then exit
45715   -q, --quiet      do not print progress messages
45716   -d, --debug      don't remove temporary files
45717       --recheck    update $as_me by reconfiguring in the same conditions
45718   --file=FILE[:TEMPLATE]
45719                    instantiate the configuration file FILE
45720   --header=FILE[:TEMPLATE]
45721                    instantiate the configuration header FILE
45722
45723 Configuration files:
45724 $config_files
45725
45726 Configuration headers:
45727 $config_headers
45728
45729 Configuration commands:
45730 $config_commands
45731
45732 Report bugs to <bug-autoconf@gnu.org>."
45733 _ACEOF
45734
45735 cat >>$CONFIG_STATUS <<_ACEOF
45736 ac_cs_version="\\
45737 config.status
45738 configured by $0, generated by GNU Autoconf 2.59,
45739   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
45740
45741 Copyright (C) 2003 Free Software Foundation, Inc.
45742 This config.status script is free software; the Free Software Foundation
45743 gives unlimited permission to copy, distribute and modify it."
45744 srcdir=$srcdir
45745 INSTALL="$INSTALL"
45746 _ACEOF
45747
45748 cat >>$CONFIG_STATUS <<\_ACEOF
45749 # If no file are specified by the user, then we need to provide default
45750 # value.  By we need to know if files were specified by the user.
45751 ac_need_defaults=:
45752 while test $# != 0
45753 do
45754   case $1 in
45755   --*=*)
45756     ac_option=`expr "x$1" : 'x\([^=]*\)='`
45757     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
45758     ac_shift=:
45759     ;;
45760   -*)
45761     ac_option=$1
45762     ac_optarg=$2
45763     ac_shift=shift
45764     ;;
45765   *) # This is not an option, so the user has probably given explicit
45766      # arguments.
45767      ac_option=$1
45768      ac_need_defaults=false;;
45769   esac
45770
45771   case $ac_option in
45772   # Handling of the options.
45773 _ACEOF
45774 cat >>$CONFIG_STATUS <<\_ACEOF
45775   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
45776     ac_cs_recheck=: ;;
45777   --version | --vers* | -V )
45778     echo "$ac_cs_version"; exit 0 ;;
45779   --he | --h)
45780     # Conflict between --help and --header
45781     { { echo "$as_me:$LINENO: error: ambiguous option: $1
45782 Try \`$0 --help' for more information." >&5
45783 echo "$as_me: error: ambiguous option: $1
45784 Try \`$0 --help' for more information." >&2;}
45785    { (exit 1); exit 1; }; };;
45786   --help | --hel | -h )
45787     echo "$ac_cs_usage"; exit 0 ;;
45788   --debug | --d* | -d )
45789     debug=: ;;
45790   --file | --fil | --fi | --f )
45791     $ac_shift
45792     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
45793     ac_need_defaults=false;;
45794   --header | --heade | --head | --hea )
45795     $ac_shift
45796     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
45797     ac_need_defaults=false;;
45798   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
45799   | -silent | --silent | --silen | --sile | --sil | --si | --s)
45800     ac_cs_silent=: ;;
45801
45802   # This is an error.
45803   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
45804 Try \`$0 --help' for more information." >&5
45805 echo "$as_me: error: unrecognized option: $1
45806 Try \`$0 --help' for more information." >&2;}
45807    { (exit 1); exit 1; }; } ;;
45808
45809   *) ac_config_targets="$ac_config_targets $1" ;;
45810
45811   esac
45812   shift
45813 done
45814
45815 ac_configure_extra_args=
45816
45817 if $ac_cs_silent; then
45818   exec 6>/dev/null
45819   ac_configure_extra_args="$ac_configure_extra_args --silent"
45820 fi
45821
45822 _ACEOF
45823 cat >>$CONFIG_STATUS <<_ACEOF
45824 if \$ac_cs_recheck; then
45825   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
45826   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
45827 fi
45828
45829 _ACEOF
45830
45831 cat >>$CONFIG_STATUS <<_ACEOF
45832 #
45833 # INIT-COMMANDS section.
45834 #
45835
45836 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
45837
45838 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
45839 STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS"
45840
45841
45842 _ACEOF
45843
45844
45845
45846 cat >>$CONFIG_STATUS <<\_ACEOF
45847 for ac_config_target in $ac_config_targets
45848 do
45849   case "$ac_config_target" in
45850   # Handling of arguments.
45851   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:build/top.mk:Makefile.in:build/dir.mk" ;;
45852   "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk" ;;
45853   "doc/man/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk" ;;
45854   "doc/man/man1/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk" ;;
45855   "doc/man/man3/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk" ;;
45856   "doc/man/man5/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk" ;;
45857   "doc/man/man8/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk" ;;
45858   "clients/Makefile" ) CONFIG_FILES="$CONFIG_FILES clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk" ;;
45859   "clients/tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk" ;;
45860   "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile:build/top.mk:include/Makefile.in" ;;
45861   "libraries/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk" ;;
45862   "libraries/liblber/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
45863   "libraries/libldap/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
45864   "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" ;;
45865   "libraries/liblunicode/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
45866   "libraries/liblutil/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
45867   "libraries/librewrite/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
45868   "servers/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk" ;;
45869   "servers/slapd/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk" ;;
45870   "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" ;;
45871   "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" ;;
45872   "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" ;;
45873   "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" ;;
45874   "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" ;;
45875   "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" ;;
45876   "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" ;;
45877   "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" ;;
45878   "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" ;;
45879   "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" ;;
45880   "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" ;;
45881   "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" ;;
45882   "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" ;;
45883   "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" ;;
45884   "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" ;;
45885   "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" ;;
45886   "servers/slapd/overlays/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk" ;;
45887   "servers/slurpd/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk" ;;
45888   "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;;
45889   "tests/run" ) CONFIG_FILES="$CONFIG_FILES tests/run" ;;
45890   "tests/progs/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;;
45891   "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
45892   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
45893   "include/portable.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h:include/portable.hin" ;;
45894   "include/ldap_features.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h:include/ldap_features.hin" ;;
45895   "include/lber_types.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h:include/lber_types.hin" ;;
45896   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
45897 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
45898    { (exit 1); exit 1; }; };;
45899   esac
45900 done
45901
45902 # If the user did not use the arguments to specify the items to instantiate,
45903 # then the envvar interface is used.  Set only those that are not.
45904 # We use the long form for the default assignment because of an extremely
45905 # bizarre bug on SunOS 4.1.3.
45906 if $ac_need_defaults; then
45907   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
45908   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
45909   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
45910 fi
45911
45912 # Have a temporary directory for convenience.  Make it in the build tree
45913 # simply because there is no reason to put it here, and in addition,
45914 # creating and moving files from /tmp can sometimes cause problems.
45915 # Create a temporary directory, and hook for its removal unless debugging.
45916 $debug ||
45917 {
45918   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
45919   trap '{ (exit 1); exit 1; }' 1 2 13 15
45920 }
45921
45922 # Create a (secure) tmp directory for tmp files.
45923
45924 {
45925   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
45926   test -n "$tmp" && test -d "$tmp"
45927 }  ||
45928 {
45929   tmp=./confstat$$-$RANDOM
45930   (umask 077 && mkdir $tmp)
45931 } ||
45932 {
45933    echo "$me: cannot create a temporary directory in ." >&2
45934    { (exit 1); exit 1; }
45935 }
45936
45937 _ACEOF
45938
45939 cat >>$CONFIG_STATUS <<_ACEOF
45940
45941 #
45942 # CONFIG_FILES section.
45943 #
45944
45945 # No need to generate the scripts if there are no CONFIG_FILES.
45946 # This happens for instance when ./config.status config.h
45947 if test -n "\$CONFIG_FILES"; then
45948   # Protect against being on the right side of a sed subst in config.status.
45949   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
45950    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
45951 s,@SHELL@,$SHELL,;t t
45952 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
45953 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
45954 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
45955 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
45956 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
45957 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
45958 s,@exec_prefix@,$exec_prefix,;t t
45959 s,@prefix@,$prefix,;t t
45960 s,@program_transform_name@,$program_transform_name,;t t
45961 s,@bindir@,$bindir,;t t
45962 s,@sbindir@,$sbindir,;t t
45963 s,@libexecdir@,$libexecdir,;t t
45964 s,@datadir@,$datadir,;t t
45965 s,@sysconfdir@,$sysconfdir,;t t
45966 s,@sharedstatedir@,$sharedstatedir,;t t
45967 s,@localstatedir@,$localstatedir,;t t
45968 s,@libdir@,$libdir,;t t
45969 s,@includedir@,$includedir,;t t
45970 s,@oldincludedir@,$oldincludedir,;t t
45971 s,@infodir@,$infodir,;t t
45972 s,@mandir@,$mandir,;t t
45973 s,@build_alias@,$build_alias,;t t
45974 s,@host_alias@,$host_alias,;t t
45975 s,@target_alias@,$target_alias,;t t
45976 s,@DEFS@,$DEFS,;t t
45977 s,@ECHO_C@,$ECHO_C,;t t
45978 s,@ECHO_N@,$ECHO_N,;t t
45979 s,@ECHO_T@,$ECHO_T,;t t
45980 s,@LIBS@,$LIBS,;t t
45981 s,@build@,$build,;t t
45982 s,@build_cpu@,$build_cpu,;t t
45983 s,@build_vendor@,$build_vendor,;t t
45984 s,@build_os@,$build_os,;t t
45985 s,@host@,$host,;t t
45986 s,@host_cpu@,$host_cpu,;t t
45987 s,@host_vendor@,$host_vendor,;t t
45988 s,@host_os@,$host_os,;t t
45989 s,@target@,$target,;t t
45990 s,@target_cpu@,$target_cpu,;t t
45991 s,@target_vendor@,$target_vendor,;t t
45992 s,@target_os@,$target_os,;t t
45993 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
45994 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
45995 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
45996 s,@CYGPATH_W@,$CYGPATH_W,;t t
45997 s,@PACKAGE@,$PACKAGE,;t t
45998 s,@VERSION@,$VERSION,;t t
45999 s,@ACLOCAL@,$ACLOCAL,;t t
46000 s,@AUTOCONF@,$AUTOCONF,;t t
46001 s,@AUTOMAKE@,$AUTOMAKE,;t t
46002 s,@AUTOHEADER@,$AUTOHEADER,;t t
46003 s,@MAKEINFO@,$MAKEINFO,;t t
46004 s,@install_sh@,$install_sh,;t t
46005 s,@STRIP@,$STRIP,;t t
46006 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
46007 s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
46008 s,@mkdir_p@,$mkdir_p,;t t
46009 s,@AWK@,$AWK,;t t
46010 s,@SET_MAKE@,$SET_MAKE,;t t
46011 s,@am__leading_dot@,$am__leading_dot,;t t
46012 s,@AMTAR@,$AMTAR,;t t
46013 s,@am__tar@,$am__tar,;t t
46014 s,@am__untar@,$am__untar,;t t
46015 s,@OPENLDAP_LIBRELEASE@,$OPENLDAP_LIBRELEASE,;t t
46016 s,@OPENLDAP_LIBVERSION@,$OPENLDAP_LIBVERSION,;t t
46017 s,@OPENLDAP_RELEASE_DATE@,$OPENLDAP_RELEASE_DATE,;t t
46018 s,@top_builddir@,$top_builddir,;t t
46019 s,@ldap_subdir@,$ldap_subdir,;t t
46020 s,@CC@,$CC,;t t
46021 s,@AR@,$AR,;t t
46022 s,@CFLAGS@,$CFLAGS,;t t
46023 s,@LDFLAGS@,$LDFLAGS,;t t
46024 s,@CPPFLAGS@,$CPPFLAGS,;t t
46025 s,@ac_ct_CC@,$ac_ct_CC,;t t
46026 s,@EXEEXT@,$EXEEXT,;t t
46027 s,@OBJEXT@,$OBJEXT,;t t
46028 s,@DEPDIR@,$DEPDIR,;t t
46029 s,@am__include@,$am__include,;t t
46030 s,@am__quote@,$am__quote,;t t
46031 s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
46032 s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
46033 s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
46034 s,@CCDEPMODE@,$CCDEPMODE,;t t
46035 s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
46036 s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
46037 s,@EGREP@,$EGREP,;t t
46038 s,@LN_S@,$LN_S,;t t
46039 s,@ECHO@,$ECHO,;t t
46040 s,@ac_ct_AR@,$ac_ct_AR,;t t
46041 s,@RANLIB@,$RANLIB,;t t
46042 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
46043 s,@DLLTOOL@,$DLLTOOL,;t t
46044 s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
46045 s,@AS@,$AS,;t t
46046 s,@ac_ct_AS@,$ac_ct_AS,;t t
46047 s,@OBJDUMP@,$OBJDUMP,;t t
46048 s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t
46049 s,@CPP@,$CPP,;t t
46050 s,@LIBTOOL@,$LIBTOOL,;t t
46051 s,@PERLBIN@,$PERLBIN,;t t
46052 s,@OL_MKDEP@,$OL_MKDEP,;t t
46053 s,@OL_MKDEP_FLAGS@,$OL_MKDEP_FLAGS,;t t
46054 s,@LTSTATIC@,$LTSTATIC,;t t
46055 s,@LIBOBJS@,$LIBOBJS,;t t
46056 s,@LIBSRCS@,$LIBSRCS,;t t
46057 s,@PLAT@,$PLAT,;t t
46058 s,@WITH_SASL@,$WITH_SASL,;t t
46059 s,@WITH_TLS@,$WITH_TLS,;t t
46060 s,@WITH_MODULES_ENABLED@,$WITH_MODULES_ENABLED,;t t
46061 s,@WITH_ACI_ENABLED@,$WITH_ACI_ENABLED,;t t
46062 s,@BUILD_THREAD@,$BUILD_THREAD,;t t
46063 s,@BUILD_LIBS_DYNAMIC@,$BUILD_LIBS_DYNAMIC,;t t
46064 s,@BUILD_SLAPD@,$BUILD_SLAPD,;t t
46065 s,@BUILD_SLAPI@,$BUILD_SLAPI,;t t
46066 s,@SLAPD_SLAPI_DEPEND@,$SLAPD_SLAPI_DEPEND,;t t
46067 s,@BUILD_BDB@,$BUILD_BDB,;t t
46068 s,@BUILD_DNSSRV@,$BUILD_DNSSRV,;t t
46069 s,@BUILD_HDB@,$BUILD_HDB,;t t
46070 s,@BUILD_LDAP@,$BUILD_LDAP,;t t
46071 s,@BUILD_LDBM@,$BUILD_LDBM,;t t
46072 s,@BUILD_META@,$BUILD_META,;t t
46073 s,@BUILD_MONITOR@,$BUILD_MONITOR,;t t
46074 s,@BUILD_NULL@,$BUILD_NULL,;t t
46075 s,@BUILD_PASSWD@,$BUILD_PASSWD,;t t
46076 s,@BUILD_RELAY@,$BUILD_RELAY,;t t
46077 s,@BUILD_PERL@,$BUILD_PERL,;t t
46078 s,@BUILD_SHELL@,$BUILD_SHELL,;t t
46079 s,@BUILD_SQL@,$BUILD_SQL,;t t
46080 s,@BUILD_ACCESSLOG@,$BUILD_ACCESSLOG,;t t
46081 s,@BUILD_AUDITLOG@,$BUILD_AUDITLOG,;t t
46082 s,@BUILD_DDS@,$BUILD_DDS,;t t
46083 s,@BUILD_DENYOP@,$BUILD_DENYOP,;t t
46084 s,@BUILD_DYNGROUP@,$BUILD_DYNGROUP,;t t
46085 s,@BUILD_DYNLIST@,$BUILD_DYNLIST,;t t
46086 s,@BUILD_LASTMOD@,$BUILD_LASTMOD,;t t
46087 s,@BUILD_PPOLICY@,$BUILD_PPOLICY,;t t
46088 s,@BUILD_PROXYCACHE@,$BUILD_PROXYCACHE,;t t
46089 s,@BUILD_REFINT@,$BUILD_REFINT,;t t
46090 s,@BUILD_RETCODE@,$BUILD_RETCODE,;t t
46091 s,@BUILD_RWM@,$BUILD_RWM,;t t
46092 s,@BUILD_SEQMOD@,$BUILD_SEQMOD,;t t
46093 s,@BUILD_SYNCPROV@,$BUILD_SYNCPROV,;t t
46094 s,@BUILD_TRANSLUCENT@,$BUILD_TRANSLUCENT,;t t
46095 s,@BUILD_UNIQUE@,$BUILD_UNIQUE,;t t
46096 s,@BUILD_VALSORT@,$BUILD_VALSORT,;t t
46097 s,@BUILD_SLURPD@,$BUILD_SLURPD,;t t
46098 s,@LDAP_LIBS@,$LDAP_LIBS,;t t
46099 s,@SLAPD_LIBS@,$SLAPD_LIBS,;t t
46100 s,@SLURPD_LIBS@,$SLURPD_LIBS,;t t
46101 s,@LDBM_LIBS@,$LDBM_LIBS,;t t
46102 s,@LTHREAD_LIBS@,$LTHREAD_LIBS,;t t
46103 s,@LUTIL_LIBS@,$LUTIL_LIBS,;t t
46104 s,@WRAP_LIBS@,$WRAP_LIBS,;t t
46105 s,@SLAPD_MODULES_CPPFLAGS@,$SLAPD_MODULES_CPPFLAGS,;t t
46106 s,@SLAPD_MODULES_LDFLAGS@,$SLAPD_MODULES_LDFLAGS,;t t
46107 s,@SLAPD_NO_STATIC@,$SLAPD_NO_STATIC,;t t
46108 s,@SLAPD_STATIC_BACKENDS@,$SLAPD_STATIC_BACKENDS,;t t
46109 s,@SLAPD_DYNAMIC_BACKENDS@,$SLAPD_DYNAMIC_BACKENDS,;t t
46110 s,@SLAPD_STATIC_OVERLAYS@,$SLAPD_STATIC_OVERLAYS,;t t
46111 s,@SLAPD_DYNAMIC_OVERLAYS@,$SLAPD_DYNAMIC_OVERLAYS,;t t
46112 s,@PERL_CPPFLAGS@,$PERL_CPPFLAGS,;t t
46113 s,@SLAPD_PERL_LDFLAGS@,$SLAPD_PERL_LDFLAGS,;t t
46114 s,@MOD_PERL_LDFLAGS@,$MOD_PERL_LDFLAGS,;t t
46115 s,@KRB4_LIBS@,$KRB4_LIBS,;t t
46116 s,@KRB5_LIBS@,$KRB5_LIBS,;t t
46117 s,@SASL_LIBS@,$SASL_LIBS,;t t
46118 s,@TLS_LIBS@,$TLS_LIBS,;t t
46119 s,@MODULES_LIBS@,$MODULES_LIBS,;t t
46120 s,@SLAPI_LIBS@,$SLAPI_LIBS,;t t
46121 s,@LIBSLAPI@,$LIBSLAPI,;t t
46122 s,@LIBSLAPITOOLS@,$LIBSLAPITOOLS,;t t
46123 s,@AUTH_LIBS@,$AUTH_LIBS,;t t
46124 s,@ICU_LIBS@,$ICU_LIBS,;t t
46125 s,@SLAPD_SLP_LIBS@,$SLAPD_SLP_LIBS,;t t
46126 s,@SLAPD_GMP_LIBS@,$SLAPD_GMP_LIBS,;t t
46127 s,@SLAPD_SQL_LDFLAGS@,$SLAPD_SQL_LDFLAGS,;t t
46128 s,@SLAPD_SQL_LIBS@,$SLAPD_SQL_LIBS,;t t
46129 s,@SLAPD_SQL_INCLUDES@,$SLAPD_SQL_INCLUDES,;t t
46130 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
46131 CEOF
46132
46133 _ACEOF
46134
46135   cat >>$CONFIG_STATUS <<\_ACEOF
46136   # Split the substitutions into bite-sized pieces for seds with
46137   # small command number limits, like on Digital OSF/1 and HP-UX.
46138   ac_max_sed_lines=48
46139   ac_sed_frag=1 # Number of current file.
46140   ac_beg=1 # First line for current file.
46141   ac_end=$ac_max_sed_lines # Line after last line for current file.
46142   ac_more_lines=:
46143   ac_sed_cmds=
46144   while $ac_more_lines; do
46145     if test $ac_beg -gt 1; then
46146       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
46147     else
46148       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
46149     fi
46150     if test ! -s $tmp/subs.frag; then
46151       ac_more_lines=false
46152     else
46153       # The purpose of the label and of the branching condition is to
46154       # speed up the sed processing (if there are no `@' at all, there
46155       # is no need to browse any of the substitutions).
46156       # These are the two extra sed commands mentioned above.
46157       (echo ':t
46158   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
46159       if test -z "$ac_sed_cmds"; then
46160         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
46161       else
46162         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
46163       fi
46164       ac_sed_frag=`expr $ac_sed_frag + 1`
46165       ac_beg=$ac_end
46166       ac_end=`expr $ac_end + $ac_max_sed_lines`
46167     fi
46168   done
46169   if test -z "$ac_sed_cmds"; then
46170     ac_sed_cmds=cat
46171   fi
46172 fi # test -n "$CONFIG_FILES"
46173
46174 _ACEOF
46175 cat >>$CONFIG_STATUS <<\_ACEOF
46176 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
46177   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
46178   case $ac_file in
46179   - | *:- | *:-:* ) # input from stdin
46180         cat >$tmp/stdin
46181         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
46182         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
46183   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
46184         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
46185   * )   ac_file_in=$ac_file.in ;;
46186   esac
46187
46188   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
46189   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
46190 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46191          X"$ac_file" : 'X\(//\)[^/]' \| \
46192          X"$ac_file" : 'X\(//\)$' \| \
46193          X"$ac_file" : 'X\(/\)' \| \
46194          .     : '\(.\)' 2>/dev/null ||
46195 echo X"$ac_file" |
46196     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46197           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46198           /^X\(\/\/\)$/{ s//\1/; q; }
46199           /^X\(\/\).*/{ s//\1/; q; }
46200           s/.*/./; q'`
46201   { if $as_mkdir_p; then
46202     mkdir -p "$ac_dir"
46203   else
46204     as_dir="$ac_dir"
46205     as_dirs=
46206     while test ! -d "$as_dir"; do
46207       as_dirs="$as_dir $as_dirs"
46208       as_dir=`(dirname "$as_dir") 2>/dev/null ||
46209 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46210          X"$as_dir" : 'X\(//\)[^/]' \| \
46211          X"$as_dir" : 'X\(//\)$' \| \
46212          X"$as_dir" : 'X\(/\)' \| \
46213          .     : '\(.\)' 2>/dev/null ||
46214 echo X"$as_dir" |
46215     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46216           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46217           /^X\(\/\/\)$/{ s//\1/; q; }
46218           /^X\(\/\).*/{ s//\1/; q; }
46219           s/.*/./; q'`
46220     done
46221     test ! -n "$as_dirs" || mkdir $as_dirs
46222   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
46223 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
46224    { (exit 1); exit 1; }; }; }
46225
46226   ac_builddir=.
46227
46228 if test "$ac_dir" != .; then
46229   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
46230   # A "../" for each directory in $ac_dir_suffix.
46231   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
46232 else
46233   ac_dir_suffix= ac_top_builddir=
46234 fi
46235
46236 case $srcdir in
46237   .)  # No --srcdir option.  We are building in place.
46238     ac_srcdir=.
46239     if test -z "$ac_top_builddir"; then
46240        ac_top_srcdir=.
46241     else
46242        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
46243     fi ;;
46244   [\\/]* | ?:[\\/]* )  # Absolute path.
46245     ac_srcdir=$srcdir$ac_dir_suffix;
46246     ac_top_srcdir=$srcdir ;;
46247   *) # Relative path.
46248     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
46249     ac_top_srcdir=$ac_top_builddir$srcdir ;;
46250 esac
46251
46252 # Do not use `cd foo && pwd` to compute absolute paths, because
46253 # the directories may not exist.
46254 case `pwd` in
46255 .) ac_abs_builddir="$ac_dir";;
46256 *)
46257   case "$ac_dir" in
46258   .) ac_abs_builddir=`pwd`;;
46259   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
46260   *) ac_abs_builddir=`pwd`/"$ac_dir";;
46261   esac;;
46262 esac
46263 case $ac_abs_builddir in
46264 .) ac_abs_top_builddir=${ac_top_builddir}.;;
46265 *)
46266   case ${ac_top_builddir}. in
46267   .) ac_abs_top_builddir=$ac_abs_builddir;;
46268   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
46269   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
46270   esac;;
46271 esac
46272 case $ac_abs_builddir in
46273 .) ac_abs_srcdir=$ac_srcdir;;
46274 *)
46275   case $ac_srcdir in
46276   .) ac_abs_srcdir=$ac_abs_builddir;;
46277   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
46278   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
46279   esac;;
46280 esac
46281 case $ac_abs_builddir in
46282 .) ac_abs_top_srcdir=$ac_top_srcdir;;
46283 *)
46284   case $ac_top_srcdir in
46285   .) ac_abs_top_srcdir=$ac_abs_builddir;;
46286   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
46287   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
46288   esac;;
46289 esac
46290
46291
46292   case $INSTALL in
46293   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
46294   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
46295   esac
46296
46297   if test x"$ac_file" != x-; then
46298     { echo "$as_me:$LINENO: creating $ac_file" >&5
46299 echo "$as_me: creating $ac_file" >&6;}
46300     rm -f "$ac_file"
46301   fi
46302   # Let's still pretend it is `configure' which instantiates (i.e., don't
46303   # use $as_me), people would be surprised to read:
46304   #    /* config.h.  Generated by config.status.  */
46305   if test x"$ac_file" = x-; then
46306     configure_input=
46307   else
46308     configure_input="$ac_file.  "
46309   fi
46310   configure_input=$configure_input"Generated from `echo $ac_file_in |
46311                                      sed 's,.*/,,'` by configure."
46312
46313   # First look for the input files in the build tree, otherwise in the
46314   # src tree.
46315   ac_file_inputs=`IFS=:
46316     for f in $ac_file_in; do
46317       case $f in
46318       -) echo $tmp/stdin ;;
46319       [\\/$]*)
46320          # Absolute (can't be DOS-style, as IFS=:)
46321          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
46322 echo "$as_me: error: cannot find input file: $f" >&2;}
46323    { (exit 1); exit 1; }; }
46324          echo "$f";;
46325       *) # Relative
46326          if test -f "$f"; then
46327            # Build tree
46328            echo "$f"
46329          elif test -f "$srcdir/$f"; then
46330            # Source tree
46331            echo "$srcdir/$f"
46332          else
46333            # /dev/null tree
46334            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
46335 echo "$as_me: error: cannot find input file: $f" >&2;}
46336    { (exit 1); exit 1; }; }
46337          fi;;
46338       esac
46339     done` || { (exit 1); exit 1; }
46340 _ACEOF
46341 cat >>$CONFIG_STATUS <<_ACEOF
46342   sed "$ac_vpsub
46343 $extrasub
46344 _ACEOF
46345 cat >>$CONFIG_STATUS <<\_ACEOF
46346 :t
46347 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
46348 s,@configure_input@,$configure_input,;t t
46349 s,@srcdir@,$ac_srcdir,;t t
46350 s,@abs_srcdir@,$ac_abs_srcdir,;t t
46351 s,@top_srcdir@,$ac_top_srcdir,;t t
46352 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
46353 s,@builddir@,$ac_builddir,;t t
46354 s,@abs_builddir@,$ac_abs_builddir,;t t
46355 s,@top_builddir@,$ac_top_builddir,;t t
46356 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
46357 s,@INSTALL@,$ac_INSTALL,;t t
46358 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
46359   rm -f $tmp/stdin
46360   if test x"$ac_file" != x-; then
46361     mv $tmp/out $ac_file
46362   else
46363     cat $tmp/out
46364     rm -f $tmp/out
46365   fi
46366
46367 done
46368 _ACEOF
46369 cat >>$CONFIG_STATUS <<\_ACEOF
46370
46371 #
46372 # CONFIG_HEADER section.
46373 #
46374
46375 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
46376 # NAME is the cpp macro being defined and VALUE is the value it is being given.
46377 #
46378 # ac_d sets the value in "#define NAME VALUE" lines.
46379 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
46380 ac_dB='[         ].*$,\1#\2'
46381 ac_dC=' '
46382 ac_dD=',;t'
46383 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
46384 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
46385 ac_uB='$,\1#\2define\3'
46386 ac_uC=' '
46387 ac_uD=',;t'
46388
46389 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
46390   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
46391   case $ac_file in
46392   - | *:- | *:-:* ) # input from stdin
46393         cat >$tmp/stdin
46394         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
46395         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
46396   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
46397         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
46398   * )   ac_file_in=$ac_file.in ;;
46399   esac
46400
46401   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
46402 echo "$as_me: creating $ac_file" >&6;}
46403
46404   # First look for the input files in the build tree, otherwise in the
46405   # src tree.
46406   ac_file_inputs=`IFS=:
46407     for f in $ac_file_in; do
46408       case $f in
46409       -) echo $tmp/stdin ;;
46410       [\\/$]*)
46411          # Absolute (can't be DOS-style, as IFS=:)
46412          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
46413 echo "$as_me: error: cannot find input file: $f" >&2;}
46414    { (exit 1); exit 1; }; }
46415          # Do quote $f, to prevent DOS paths from being IFS'd.
46416          echo "$f";;
46417       *) # Relative
46418          if test -f "$f"; then
46419            # Build tree
46420            echo "$f"
46421          elif test -f "$srcdir/$f"; then
46422            # Source tree
46423            echo "$srcdir/$f"
46424          else
46425            # /dev/null tree
46426            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
46427 echo "$as_me: error: cannot find input file: $f" >&2;}
46428    { (exit 1); exit 1; }; }
46429          fi;;
46430       esac
46431     done` || { (exit 1); exit 1; }
46432   # Remove the trailing spaces.
46433   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
46434
46435 _ACEOF
46436
46437 # Transform confdefs.h into two sed scripts, `conftest.defines' and
46438 # `conftest.undefs', that substitutes the proper values into
46439 # config.h.in to produce config.h.  The first handles `#define'
46440 # templates, and the second `#undef' templates.
46441 # And first: Protect against being on the right side of a sed subst in
46442 # config.status.  Protect against being in an unquoted here document
46443 # in config.status.
46444 rm -f conftest.defines conftest.undefs
46445 # Using a here document instead of a string reduces the quoting nightmare.
46446 # Putting comments in sed scripts is not portable.
46447 #
46448 # `end' is used to avoid that the second main sed command (meant for
46449 # 0-ary CPP macros) applies to n-ary macro definitions.
46450 # See the Autoconf documentation for `clear'.
46451 cat >confdef2sed.sed <<\_ACEOF
46452 s/[\\&,]/\\&/g
46453 s,[\\$`],\\&,g
46454 t clear
46455 : clear
46456 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
46457 t end
46458 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
46459 : end
46460 _ACEOF
46461 # If some macros were called several times there might be several times
46462 # the same #defines, which is useless.  Nevertheless, we may not want to
46463 # sort them, since we want the *last* AC-DEFINE to be honored.
46464 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
46465 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
46466 rm -f confdef2sed.sed
46467
46468 # This sed command replaces #undef with comments.  This is necessary, for
46469 # example, in the case of _POSIX_SOURCE, which is predefined and required
46470 # on some systems where configure will not decide to define it.
46471 cat >>conftest.undefs <<\_ACEOF
46472 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
46473 _ACEOF
46474
46475 # Break up conftest.defines because some shells have a limit on the size
46476 # of here documents, and old seds have small limits too (100 cmds).
46477 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
46478 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
46479 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
46480 echo '  :' >>$CONFIG_STATUS
46481 rm -f conftest.tail
46482 while grep . conftest.defines >/dev/null
46483 do
46484   # Write a limited-size here document to $tmp/defines.sed.
46485   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
46486   # Speed up: don't consider the non `#define' lines.
46487   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
46488   # Work around the forget-to-reset-the-flag bug.
46489   echo 't clr' >>$CONFIG_STATUS
46490   echo ': clr' >>$CONFIG_STATUS
46491   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
46492   echo 'CEOF
46493   sed -f $tmp/defines.sed $tmp/in >$tmp/out
46494   rm -f $tmp/in
46495   mv $tmp/out $tmp/in
46496 ' >>$CONFIG_STATUS
46497   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
46498   rm -f conftest.defines
46499   mv conftest.tail conftest.defines
46500 done
46501 rm -f conftest.defines
46502 echo '  fi # grep' >>$CONFIG_STATUS
46503 echo >>$CONFIG_STATUS
46504
46505 # Break up conftest.undefs because some shells have a limit on the size
46506 # of here documents, and old seds have small limits too (100 cmds).
46507 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
46508 rm -f conftest.tail
46509 while grep . conftest.undefs >/dev/null
46510 do
46511   # Write a limited-size here document to $tmp/undefs.sed.
46512   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
46513   # Speed up: don't consider the non `#undef'
46514   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
46515   # Work around the forget-to-reset-the-flag bug.
46516   echo 't clr' >>$CONFIG_STATUS
46517   echo ': clr' >>$CONFIG_STATUS
46518   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
46519   echo 'CEOF
46520   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
46521   rm -f $tmp/in
46522   mv $tmp/out $tmp/in
46523 ' >>$CONFIG_STATUS
46524   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
46525   rm -f conftest.undefs
46526   mv conftest.tail conftest.undefs
46527 done
46528 rm -f conftest.undefs
46529
46530 cat >>$CONFIG_STATUS <<\_ACEOF
46531   # Let's still pretend it is `configure' which instantiates (i.e., don't
46532   # use $as_me), people would be surprised to read:
46533   #    /* config.h.  Generated by config.status.  */
46534   if test x"$ac_file" = x-; then
46535     echo "/* Generated by configure.  */" >$tmp/config.h
46536   else
46537     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
46538   fi
46539   cat $tmp/in >>$tmp/config.h
46540   rm -f $tmp/in
46541   if test x"$ac_file" != x-; then
46542     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
46543       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
46544 echo "$as_me: $ac_file is unchanged" >&6;}
46545     else
46546       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
46547 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46548          X"$ac_file" : 'X\(//\)[^/]' \| \
46549          X"$ac_file" : 'X\(//\)$' \| \
46550          X"$ac_file" : 'X\(/\)' \| \
46551          .     : '\(.\)' 2>/dev/null ||
46552 echo X"$ac_file" |
46553     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46554           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46555           /^X\(\/\/\)$/{ s//\1/; q; }
46556           /^X\(\/\).*/{ s//\1/; q; }
46557           s/.*/./; q'`
46558       { if $as_mkdir_p; then
46559     mkdir -p "$ac_dir"
46560   else
46561     as_dir="$ac_dir"
46562     as_dirs=
46563     while test ! -d "$as_dir"; do
46564       as_dirs="$as_dir $as_dirs"
46565       as_dir=`(dirname "$as_dir") 2>/dev/null ||
46566 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46567          X"$as_dir" : 'X\(//\)[^/]' \| \
46568          X"$as_dir" : 'X\(//\)$' \| \
46569          X"$as_dir" : 'X\(/\)' \| \
46570          .     : '\(.\)' 2>/dev/null ||
46571 echo X"$as_dir" |
46572     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46573           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46574           /^X\(\/\/\)$/{ s//\1/; q; }
46575           /^X\(\/\).*/{ s//\1/; q; }
46576           s/.*/./; q'`
46577     done
46578     test ! -n "$as_dirs" || mkdir $as_dirs
46579   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
46580 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
46581    { (exit 1); exit 1; }; }; }
46582
46583       rm -f $ac_file
46584       mv $tmp/config.h $ac_file
46585     fi
46586   else
46587     cat $tmp/config.h
46588     rm -f $tmp/config.h
46589   fi
46590 # Compute $ac_file's index in $config_headers.
46591 _am_stamp_count=1
46592 for _am_header in $config_headers :; do
46593   case $_am_header in
46594     $ac_file | $ac_file:* )
46595       break ;;
46596     * )
46597       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
46598   esac
46599 done
46600 echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
46601 $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46602          X$ac_file : 'X\(//\)[^/]' \| \
46603          X$ac_file : 'X\(//\)$' \| \
46604          X$ac_file : 'X\(/\)' \| \
46605          .     : '\(.\)' 2>/dev/null ||
46606 echo X$ac_file |
46607     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46608           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46609           /^X\(\/\/\)$/{ s//\1/; q; }
46610           /^X\(\/\).*/{ s//\1/; q; }
46611           s/.*/./; q'`/stamp-h$_am_stamp_count
46612 done
46613 _ACEOF
46614 cat >>$CONFIG_STATUS <<\_ACEOF
46615
46616 #
46617 # CONFIG_COMMANDS section.
46618 #
46619 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
46620   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
46621   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
46622   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
46623 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46624          X"$ac_dest" : 'X\(//\)[^/]' \| \
46625          X"$ac_dest" : 'X\(//\)$' \| \
46626          X"$ac_dest" : 'X\(/\)' \| \
46627          .     : '\(.\)' 2>/dev/null ||
46628 echo X"$ac_dest" |
46629     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46630           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46631           /^X\(\/\/\)$/{ s//\1/; q; }
46632           /^X\(\/\).*/{ s//\1/; q; }
46633           s/.*/./; q'`
46634   { if $as_mkdir_p; then
46635     mkdir -p "$ac_dir"
46636   else
46637     as_dir="$ac_dir"
46638     as_dirs=
46639     while test ! -d "$as_dir"; do
46640       as_dirs="$as_dir $as_dirs"
46641       as_dir=`(dirname "$as_dir") 2>/dev/null ||
46642 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46643          X"$as_dir" : 'X\(//\)[^/]' \| \
46644          X"$as_dir" : 'X\(//\)$' \| \
46645          X"$as_dir" : 'X\(/\)' \| \
46646          .     : '\(.\)' 2>/dev/null ||
46647 echo X"$as_dir" |
46648     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46649           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46650           /^X\(\/\/\)$/{ s//\1/; q; }
46651           /^X\(\/\).*/{ s//\1/; q; }
46652           s/.*/./; q'`
46653     done
46654     test ! -n "$as_dirs" || mkdir $as_dirs
46655   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
46656 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
46657    { (exit 1); exit 1; }; }; }
46658
46659   ac_builddir=.
46660
46661 if test "$ac_dir" != .; then
46662   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
46663   # A "../" for each directory in $ac_dir_suffix.
46664   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
46665 else
46666   ac_dir_suffix= ac_top_builddir=
46667 fi
46668
46669 case $srcdir in
46670   .)  # No --srcdir option.  We are building in place.
46671     ac_srcdir=.
46672     if test -z "$ac_top_builddir"; then
46673        ac_top_srcdir=.
46674     else
46675        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
46676     fi ;;
46677   [\\/]* | ?:[\\/]* )  # Absolute path.
46678     ac_srcdir=$srcdir$ac_dir_suffix;
46679     ac_top_srcdir=$srcdir ;;
46680   *) # Relative path.
46681     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
46682     ac_top_srcdir=$ac_top_builddir$srcdir ;;
46683 esac
46684
46685 # Do not use `cd foo && pwd` to compute absolute paths, because
46686 # the directories may not exist.
46687 case `pwd` in
46688 .) ac_abs_builddir="$ac_dir";;
46689 *)
46690   case "$ac_dir" in
46691   .) ac_abs_builddir=`pwd`;;
46692   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
46693   *) ac_abs_builddir=`pwd`/"$ac_dir";;
46694   esac;;
46695 esac
46696 case $ac_abs_builddir in
46697 .) ac_abs_top_builddir=${ac_top_builddir}.;;
46698 *)
46699   case ${ac_top_builddir}. in
46700   .) ac_abs_top_builddir=$ac_abs_builddir;;
46701   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
46702   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
46703   esac;;
46704 esac
46705 case $ac_abs_builddir in
46706 .) ac_abs_srcdir=$ac_srcdir;;
46707 *)
46708   case $ac_srcdir in
46709   .) ac_abs_srcdir=$ac_abs_builddir;;
46710   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
46711   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
46712   esac;;
46713 esac
46714 case $ac_abs_builddir in
46715 .) ac_abs_top_srcdir=$ac_top_srcdir;;
46716 *)
46717   case $ac_top_srcdir in
46718   .) ac_abs_top_srcdir=$ac_abs_builddir;;
46719   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
46720   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
46721   esac;;
46722 esac
46723
46724
46725   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
46726 echo "$as_me: executing $ac_dest commands" >&6;}
46727   case $ac_dest in
46728     depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
46729   # Strip MF so we end up with the name of the file.
46730   mf=`echo "$mf" | sed -e 's/:.*$//'`
46731   # Check whether this is an Automake generated Makefile or not.
46732   # We used to match only the files named `Makefile.in', but
46733   # some people rename them; so instead we look at the file content.
46734   # Grep'ing the first line is not enough: some people post-process
46735   # each Makefile.in and add a new line on top of each file to say so.
46736   # So let's grep whole file.
46737   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
46738     dirpart=`(dirname "$mf") 2>/dev/null ||
46739 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46740          X"$mf" : 'X\(//\)[^/]' \| \
46741          X"$mf" : 'X\(//\)$' \| \
46742          X"$mf" : 'X\(/\)' \| \
46743          .     : '\(.\)' 2>/dev/null ||
46744 echo X"$mf" |
46745     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46746           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46747           /^X\(\/\/\)$/{ s//\1/; q; }
46748           /^X\(\/\).*/{ s//\1/; q; }
46749           s/.*/./; q'`
46750   else
46751     continue
46752   fi
46753   # Extract the definition of DEPDIR, am__include, and am__quote
46754   # from the Makefile without running `make'.
46755   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
46756   test -z "$DEPDIR" && continue
46757   am__include=`sed -n 's/^am__include = //p' < "$mf"`
46758   test -z "am__include" && continue
46759   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
46760   # When using ansi2knr, U may be empty or an underscore; expand it
46761   U=`sed -n 's/^U = //p' < "$mf"`
46762   # Find all dependency output files, they are included files with
46763   # $(DEPDIR) in their names.  We invoke sed twice because it is the
46764   # simplest approach to changing $(DEPDIR) to its actual value in the
46765   # expansion.
46766   for file in `sed -n "
46767     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
46768        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
46769     # Make sure the directory exists.
46770     test -f "$dirpart/$file" && continue
46771     fdir=`(dirname "$file") 2>/dev/null ||
46772 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46773          X"$file" : 'X\(//\)[^/]' \| \
46774          X"$file" : 'X\(//\)$' \| \
46775          X"$file" : 'X\(/\)' \| \
46776          .     : '\(.\)' 2>/dev/null ||
46777 echo X"$file" |
46778     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46779           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46780           /^X\(\/\/\)$/{ s//\1/; q; }
46781           /^X\(\/\).*/{ s//\1/; q; }
46782           s/.*/./; q'`
46783     { if $as_mkdir_p; then
46784     mkdir -p $dirpart/$fdir
46785   else
46786     as_dir=$dirpart/$fdir
46787     as_dirs=
46788     while test ! -d "$as_dir"; do
46789       as_dirs="$as_dir $as_dirs"
46790       as_dir=`(dirname "$as_dir") 2>/dev/null ||
46791 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46792          X"$as_dir" : 'X\(//\)[^/]' \| \
46793          X"$as_dir" : 'X\(//\)$' \| \
46794          X"$as_dir" : 'X\(/\)' \| \
46795          .     : '\(.\)' 2>/dev/null ||
46796 echo X"$as_dir" |
46797     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
46798           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
46799           /^X\(\/\/\)$/{ s//\1/; q; }
46800           /^X\(\/\).*/{ s//\1/; q; }
46801           s/.*/./; q'`
46802     done
46803     test ! -n "$as_dirs" || mkdir $as_dirs
46804   fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
46805 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
46806    { (exit 1); exit 1; }; }; }
46807
46808     # echo "creating $dirpart/$file"
46809     echo '# dummy' > "$dirpart/$file"
46810   done
46811 done
46812  ;;
46813     default )
46814 chmod +x tests/run
46815 date > stamp-h
46816 BACKENDSC="servers/slapd/backends.c"
46817 echo "Making $BACKENDSC"
46818 rm -f $BACKENDSC
46819 cat > $BACKENDSC << ENDX
46820 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
46821  *
46822  * Copyright 1998-2006 The OpenLDAP Foundation.
46823  * All rights reserved.
46824  *
46825  * Redistribution and use in source and binary forms, with or without
46826  * modification, are permitted only as authorized by the OpenLDAP
46827  * Public License.
46828  *
46829  * A copy of this license is available in the file LICENSE in the
46830  * top-level directory of the distribution or, alternatively, at
46831  * <http://www.OpenLDAP.org/license.html>.
46832  */
46833 /* This file is automatically generated by configure; please do not edit. */
46834
46835 #include "portable.h"
46836 #include "slap.h"
46837
46838 ENDX
46839 if test "${STATIC_BACKENDS}"; then
46840         for b in config ${STATIC_BACKENDS}; do
46841                 bb=`echo "${b}" | sed -e 's/back-//'`
46842                 cat >> $BACKENDSC << ENDX
46843 extern BI_init ${bb}_back_initialize;
46844 ENDX
46845         done
46846
46847         cat >> $BACKENDSC << ENDX
46848
46849 BackendInfo slap_binfo[] = {
46850 ENDX
46851
46852         for b in config ${STATIC_BACKENDS}; do
46853                 bb=`echo "${b}" | sed -e 's/back-//'`
46854                 echo "    Add ${bb} ..."
46855                 cat >> $BACKENDSC << ENDX
46856         { "${bb}", ${bb}_back_initialize },
46857 ENDX
46858         done
46859
46860         cat >> $BACKENDSC << ENDX
46861         { NULL, NULL },
46862 };
46863
46864 /* end of generated file */
46865 ENDX
46866 fi
46867 OVERLAYSC="servers/slapd/overlays/statover.c"
46868 echo "Making $OVERLAYSC"
46869 rm -f $OVERLAYSC
46870 cat > $OVERLAYSC << ENDX
46871 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
46872  *
46873  * Copyright 1998-2006 The OpenLDAP Foundation.
46874  * All rights reserved.
46875  *
46876  * Redistribution and use in source and binary forms, with or without
46877  * modification, are permitted only as authorized by the OpenLDAP
46878  * Public License.
46879  *
46880  * A copy of this license is available in the file LICENSE in the
46881  * top-level directory of the distribution or, alternatively, at
46882  * <http://www.OpenLDAP.org/license.html>.
46883  */
46884 /* This file is automatically generated by configure; please do not edit. */
46885
46886 #include "portable.h"
46887 #include "slap.h"
46888
46889 ENDX
46890 if test "${STATIC_OVERLAYS}"; then
46891         for o in ${STATIC_OVERLAYS}; do
46892                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
46893                 cat >> $OVERLAYSC << ENDX
46894 extern OV_init ${oo}_initialize;
46895 ENDX
46896         done
46897 fi
46898
46899 cat >> $OVERLAYSC << ENDX
46900
46901 OverlayInit slap_oinfo[] = {
46902 ENDX
46903
46904 if test "${STATIC_OVERLAYS}"; then
46905         for o in ${STATIC_OVERLAYS}; do
46906                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
46907                 echo "    Add ${oo} ..."
46908                 cat >> $OVERLAYSC << ENDX
46909         { "${oo}", ${oo}_initialize },
46910 ENDX
46911         done
46912 fi
46913
46914         cat >> $OVERLAYSC << ENDX
46915         { NULL, NULL },
46916 };
46917
46918 /* end of generated file */
46919 ENDX
46920
46921 echo Please run \"make depend\" to build dependencies
46922  ;;
46923   esac
46924 done
46925 _ACEOF
46926
46927 cat >>$CONFIG_STATUS <<\_ACEOF
46928
46929 { (exit 0); exit 0; }
46930 _ACEOF
46931 chmod +x $CONFIG_STATUS
46932 ac_clean_files=$ac_clean_files_save
46933
46934
46935 # configure is writing to config.log, and then calls config.status.
46936 # config.status does its own redirection, appending to config.log.
46937 # Unfortunately, on DOS this fails, as config.log is still kept open
46938 # by configure, so config.status won't be able to write to it; its
46939 # output is simply discarded.  So we exec the FD to /dev/null,
46940 # effectively closing config.log, so it can be properly (re)opened and
46941 # appended to by config.status.  When coming back to configure, we
46942 # need to make the FD available again.
46943 if test "$no_create" != yes; then
46944   ac_cs_success=:
46945   ac_config_status_args=
46946   test "$silent" = yes &&
46947     ac_config_status_args="$ac_config_status_args --quiet"
46948   exec 5>/dev/null
46949   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
46950   exec 5>>config.log
46951   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
46952   # would make configure fail if this is the last instruction.
46953   $ac_cs_success || { (exit 1); exit 1; }
46954 fi
46955