]> git.sur5r.net Git - openldap/blob - configure
Add Pre- and Postread Control to the supported controls (ITS#4538)
[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_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 BDB_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-meta         enable metadirectory backend no|yes|mod [no]
1038     --enable-monitor      enable monitor backend no|yes|mod [yes]
1039     --enable-null         enable null backend no|yes|mod [no]
1040     --enable-passwd       enable passwd backend no|yes|mod [no]
1041     --enable-perl         enable perl backend no|yes|mod [no]
1042     --enable-relay        enable relay backend no|yes|mod [yes]
1043     --enable-shell        enable shell backend no|yes|mod [no]
1044     --enable-sql          enable sql backend no|yes|mod [no]
1045
1046 SLAPD Overlay Options:
1047     --enable-overlays     enable all available overlays no|yes|mod
1048     --enable-accesslog    In-Directory Access Logging overlay no|yes|mod [no]
1049     --enable-auditlog     Audit Logging overlay no|yes|mod [no]
1050     --enable-dds          Dynamic Directory Services overlay no|yes|mod [no]
1051     --enable-denyop       Deny Operation overlay no|yes|mod [no]
1052     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]
1053     --enable-dynlist      Dynamic List overlay no|yes|mod [no]
1054     --enable-lastmod      Last Modification overlay no|yes|mod [no]
1055     --enable-ppolicy      Password Policy overlay no|yes|mod [no]
1056     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]
1057     --enable-refint       Referential Integrity overlay no|yes|mod [no]
1058     --enable-retcode      Return Code testing overlay no|yes|mod [no]
1059     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]
1060     --enable-seqmod       Sequential Modify overlay no|yes|mod [yes]
1061     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [yes]
1062     --enable-translucent  Translucent Proxy overlay no|yes|mod [no]
1063     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]
1064     --enable-valsort      Value Sorting overlay no|yes|mod [no]
1065
1066 SLURPD (Replication Daemon) Options:
1067   --enable-slurpd         enable building slurpd [auto]
1068
1069 Library Generation & Linking Options
1070   --enable-static[=PKGS]
1071                           build static libraries [default=yes]
1072   --enable-shared[=PKGS]
1073                           build shared libraries [default=yes]
1074   --enable-fast-install[=PKGS]
1075                           optimize for fast installation [default=yes]
1076   --disable-dependency-tracking  speeds up one-time build
1077   --enable-dependency-tracking   do not reject slow dependency extractors
1078   --disable-libtool-lock  avoid locking (might break parallel builds)
1079
1080 Optional Packages:
1081   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1082   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1083   --with-subdir=DIR       change default subdirectory used for installs
1084   --with-cyrus-sasl       with Cyrus SASL support [auto]
1085   --with-fetch            with fetch(3) URL support [auto]
1086   --with-threads          with threads [auto]
1087   --with-tls              with TLS/SSL support [auto]
1088   --with-yielding-select  with implicitly yielding select [auto]
1089   --with-mp               with multiple precision statistics auto|longlong|long|bignum|gmp [auto]
1090   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1091   --with-pic              try to use only PIC/non-PIC objects [default=use
1092                           both]
1093   --with-tags[=TAGS]
1094                           include additional configurations [automatic]
1095
1096 See INSTALL file for further details.
1097
1098 Some influential environment variables:
1099   CC          C compiler command
1100   CFLAGS      C compiler flags
1101   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1102               nonstandard directory <lib dir>
1103   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
1104               headers in a nonstandard directory <include dir>
1105   CPP         C preprocessor
1106
1107 Use these variables to override the choices made by `configure' or to help
1108 it to find libraries and programs with nonstandard names/locations.
1109
1110 _ACEOF
1111 fi
1112
1113 if test "$ac_init_help" = "recursive"; then
1114   # If there are subdirs, report their specific --help.
1115   ac_popdir=`pwd`
1116   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1117     test -d $ac_dir || continue
1118     ac_builddir=.
1119
1120 if test "$ac_dir" != .; then
1121   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1122   # A "../" for each directory in $ac_dir_suffix.
1123   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
1124 else
1125   ac_dir_suffix= ac_top_builddir=
1126 fi
1127
1128 case $srcdir in
1129   .)  # No --srcdir option.  We are building in place.
1130     ac_srcdir=.
1131     if test -z "$ac_top_builddir"; then
1132        ac_top_srcdir=.
1133     else
1134        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
1135     fi ;;
1136   [\\/]* | ?:[\\/]* )  # Absolute path.
1137     ac_srcdir=$srcdir$ac_dir_suffix;
1138     ac_top_srcdir=$srcdir ;;
1139   *) # Relative path.
1140     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
1141     ac_top_srcdir=$ac_top_builddir$srcdir ;;
1142 esac
1143
1144 # Do not use `cd foo && pwd` to compute absolute paths, because
1145 # the directories may not exist.
1146 case `pwd` in
1147 .) ac_abs_builddir="$ac_dir";;
1148 *)
1149   case "$ac_dir" in
1150   .) ac_abs_builddir=`pwd`;;
1151   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
1152   *) ac_abs_builddir=`pwd`/"$ac_dir";;
1153   esac;;
1154 esac
1155 case $ac_abs_builddir in
1156 .) ac_abs_top_builddir=${ac_top_builddir}.;;
1157 *)
1158   case ${ac_top_builddir}. in
1159   .) ac_abs_top_builddir=$ac_abs_builddir;;
1160   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
1161   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
1162   esac;;
1163 esac
1164 case $ac_abs_builddir in
1165 .) ac_abs_srcdir=$ac_srcdir;;
1166 *)
1167   case $ac_srcdir in
1168   .) ac_abs_srcdir=$ac_abs_builddir;;
1169   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1170   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1171   esac;;
1172 esac
1173 case $ac_abs_builddir in
1174 .) ac_abs_top_srcdir=$ac_top_srcdir;;
1175 *)
1176   case $ac_top_srcdir in
1177   .) ac_abs_top_srcdir=$ac_abs_builddir;;
1178   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1179   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1180   esac;;
1181 esac
1182
1183     cd $ac_dir
1184     # Check for guested configure; otherwise get Cygnus style configure.
1185     if test -f $ac_srcdir/configure.gnu; then
1186       echo
1187       $SHELL $ac_srcdir/configure.gnu  --help=recursive
1188     elif test -f $ac_srcdir/configure; then
1189       echo
1190       $SHELL $ac_srcdir/configure  --help=recursive
1191     elif test -f $ac_srcdir/configure.ac ||
1192            test -f $ac_srcdir/configure.in; then
1193       echo
1194       $ac_configure --help
1195     else
1196       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1197     fi
1198     cd $ac_popdir
1199   done
1200 fi
1201
1202 test -n "$ac_init_help" && exit 0
1203 if $ac_init_version; then
1204   cat <<\_ACEOF
1205
1206 Copyright (C) 2003 Free Software Foundation, Inc.
1207 This configure script is free software; the Free Software Foundation
1208 gives unlimited permission to copy, distribute and modify it.
1209
1210 Copyright 1998-2006 The OpenLDAP Foundation. All rights reserved.
1211 Restrictions apply, see COPYRIGHT and LICENSE files.
1212 _ACEOF
1213   exit 0
1214 fi
1215 exec 5>config.log
1216 cat >&5 <<_ACEOF
1217 This file contains any messages produced by compilers while
1218 running configure, to aid debugging if configure makes a mistake.
1219
1220 It was created by $as_me, which was
1221 generated by GNU Autoconf 2.59.  Invocation command line was
1222
1223   $ $0 $@
1224
1225 _ACEOF
1226 {
1227 cat <<_ASUNAME
1228 ## --------- ##
1229 ## Platform. ##
1230 ## --------- ##
1231
1232 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1233 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1234 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1235 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1236 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1237
1238 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1239 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1240
1241 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1242 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1243 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1244 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1245 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1246 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1247 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1248
1249 _ASUNAME
1250
1251 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1252 for as_dir in $PATH
1253 do
1254   IFS=$as_save_IFS
1255   test -z "$as_dir" && as_dir=.
1256   echo "PATH: $as_dir"
1257 done
1258
1259 } >&5
1260
1261 cat >&5 <<_ACEOF
1262
1263
1264 ## ----------- ##
1265 ## Core tests. ##
1266 ## ----------- ##
1267
1268 _ACEOF
1269
1270
1271 # Keep a trace of the command line.
1272 # Strip out --no-create and --no-recursion so they do not pile up.
1273 # Strip out --silent because we don't want to record it for future runs.
1274 # Also quote any args containing shell meta-characters.
1275 # Make two passes to allow for proper duplicate-argument suppression.
1276 ac_configure_args=
1277 ac_configure_args0=
1278 ac_configure_args1=
1279 ac_sep=
1280 ac_must_keep_next=false
1281 for ac_pass in 1 2
1282 do
1283   for ac_arg
1284   do
1285     case $ac_arg in
1286     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1287     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1288     | -silent | --silent | --silen | --sile | --sil)
1289       continue ;;
1290     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1291       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1292     esac
1293     case $ac_pass in
1294     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1295     2)
1296       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1297       if test $ac_must_keep_next = true; then
1298         ac_must_keep_next=false # Got value, back to normal.
1299       else
1300         case $ac_arg in
1301           *=* | --config-cache | -C | -disable-* | --disable-* \
1302           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1303           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1304           | -with-* | --with-* | -without-* | --without-* | --x)
1305             case "$ac_configure_args0 " in
1306               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1307             esac
1308             ;;
1309           -* ) ac_must_keep_next=true ;;
1310         esac
1311       fi
1312       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1313       # Get rid of the leading space.
1314       ac_sep=" "
1315       ;;
1316     esac
1317   done
1318 done
1319 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1320 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1321
1322 # When interrupted or exit'd, cleanup temporary files, and complete
1323 # config.log.  We remove comments because anyway the quotes in there
1324 # would cause problems or look ugly.
1325 # WARNING: Be sure not to use single quotes in there, as some shells,
1326 # such as our DU 5.0 friend, will then `close' the trap.
1327 trap 'exit_status=$?
1328   # Save into config.log some information that might help in debugging.
1329   {
1330     echo
1331
1332     cat <<\_ASBOX
1333 ## ---------------- ##
1334 ## Cache variables. ##
1335 ## ---------------- ##
1336 _ASBOX
1337     echo
1338     # The following way of writing the cache mishandles newlines in values,
1339 {
1340   (set) 2>&1 |
1341     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1342     *ac_space=\ *)
1343       sed -n \
1344         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1345           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1346       ;;
1347     *)
1348       sed -n \
1349         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1350       ;;
1351     esac;
1352 }
1353     echo
1354
1355     cat <<\_ASBOX
1356 ## ----------------- ##
1357 ## Output variables. ##
1358 ## ----------------- ##
1359 _ASBOX
1360     echo
1361     for ac_var in $ac_subst_vars
1362     do
1363       eval ac_val=$`echo $ac_var`
1364       echo "$ac_var='"'"'$ac_val'"'"'"
1365     done | sort
1366     echo
1367
1368     if test -n "$ac_subst_files"; then
1369       cat <<\_ASBOX
1370 ## ------------- ##
1371 ## Output files. ##
1372 ## ------------- ##
1373 _ASBOX
1374       echo
1375       for ac_var in $ac_subst_files
1376       do
1377         eval ac_val=$`echo $ac_var`
1378         echo "$ac_var='"'"'$ac_val'"'"'"
1379       done | sort
1380       echo
1381     fi
1382
1383     if test -s confdefs.h; then
1384       cat <<\_ASBOX
1385 ## ----------- ##
1386 ## confdefs.h. ##
1387 ## ----------- ##
1388 _ASBOX
1389       echo
1390       sed "/^$/d" confdefs.h | sort
1391       echo
1392     fi
1393     test "$ac_signal" != 0 &&
1394       echo "$as_me: caught signal $ac_signal"
1395     echo "$as_me: exit $exit_status"
1396   } >&5
1397   rm -f core *.core &&
1398   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1399     exit $exit_status
1400      ' 0
1401 for ac_signal in 1 2 13 15; do
1402   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1403 done
1404 ac_signal=0
1405
1406 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1407 rm -rf conftest* confdefs.h
1408 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1409 echo >confdefs.h
1410
1411 # Predefined preprocessor variables.
1412
1413 cat >>confdefs.h <<_ACEOF
1414 #define PACKAGE_NAME "$PACKAGE_NAME"
1415 _ACEOF
1416
1417
1418 cat >>confdefs.h <<_ACEOF
1419 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1420 _ACEOF
1421
1422
1423 cat >>confdefs.h <<_ACEOF
1424 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1425 _ACEOF
1426
1427
1428 cat >>confdefs.h <<_ACEOF
1429 #define PACKAGE_STRING "$PACKAGE_STRING"
1430 _ACEOF
1431
1432
1433 cat >>confdefs.h <<_ACEOF
1434 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1435 _ACEOF
1436
1437
1438 # Let the site file select an alternate cache file if it wants to.
1439 # Prefer explicitly selected file to automatically selected ones.
1440 if test -z "$CONFIG_SITE"; then
1441   if test "x$prefix" != xNONE; then
1442     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1443   else
1444     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1445   fi
1446 fi
1447 for ac_site_file in $CONFIG_SITE; do
1448   if test -r "$ac_site_file"; then
1449     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1450 echo "$as_me: loading site script $ac_site_file" >&6;}
1451     sed 's/^/| /' "$ac_site_file" >&5
1452     . "$ac_site_file"
1453   fi
1454 done
1455
1456
1457 # Check that the precious variables saved in the cache have kept the same
1458 # value.
1459 ac_cache_corrupted=false
1460 for ac_var in `(set) 2>&1 |
1461                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1462   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1463   eval ac_new_set=\$ac_env_${ac_var}_set
1464   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1465   eval ac_new_val="\$ac_env_${ac_var}_value"
1466   case $ac_old_set,$ac_new_set in
1467     set,)
1468       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1469 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1470       ac_cache_corrupted=: ;;
1471     ,set)
1472       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1473 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1474       ac_cache_corrupted=: ;;
1475     ,);;
1476     *)
1477       if test "x$ac_old_val" != "x$ac_new_val"; then
1478         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1479 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1480         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1481 echo "$as_me:   former value:  $ac_old_val" >&2;}
1482         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1483 echo "$as_me:   current value: $ac_new_val" >&2;}
1484         ac_cache_corrupted=:
1485       fi;;
1486   esac
1487   # Pass precious variables to config.status.
1488   if test "$ac_new_set" = set; then
1489     case $ac_new_val in
1490     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1491       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1492     *) ac_arg=$ac_var=$ac_new_val ;;
1493     esac
1494     case " $ac_configure_args " in
1495       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1496       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1497     esac
1498   fi
1499 done
1500 if $ac_cache_corrupted; then
1501   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1502 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1503   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1504 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1505    { (exit 1); exit 1; }; }
1506 fi
1507
1508 ac_ext=c
1509 ac_cpp='$CPP $CPPFLAGS'
1510 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1511 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1512 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556 ac_aux_dir=
1557 for ac_dir in build $srcdir/build; do
1558   if test -f $ac_dir/install-sh; then
1559     ac_aux_dir=$ac_dir
1560     ac_install_sh="$ac_aux_dir/install-sh -c"
1561     break
1562   elif 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/shtool; then
1567     ac_aux_dir=$ac_dir
1568     ac_install_sh="$ac_aux_dir/shtool install -c"
1569     break
1570   fi
1571 done
1572 if test -z "$ac_aux_dir"; then
1573   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build $srcdir/build" >&5
1574 echo "$as_me: error: cannot find install-sh or install.sh in build $srcdir/build" >&2;}
1575    { (exit 1); exit 1; }; }
1576 fi
1577 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1578 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1579 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1580
1581 eval `$ac_aux_dir/version.sh`
1582 if test -z "$OL_STRING"; then
1583         { { echo "$as_me:$LINENO: error: could not determine version" >&5
1584 echo "$as_me: error: could not determine version" >&2;}
1585    { (exit 1); exit 1; }; }
1586 fi
1587
1588 if test -f "$ac_aux_dir/shtool" && test ! -d $ac_aux_dir/shtool; then
1589         ac_cv_shtool="$ac_aux_dir/shtool"
1590 else
1591         { { echo "$as_me:$LINENO: error: no shtool found in $ac_aux_dir" >&5
1592 echo "$as_me: error: no shtool found in $ac_aux_dir" >&2;}
1593    { (exit 1); exit 1; }; }
1594 fi
1595
1596 SHTOOL="$ac_cv_shtool"
1597
1598 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
1599 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
1600
1601 OPENLDAP_CVS=""
1602 if test -d $ac_aux_dir/CVS; then
1603         OPENLDAP_CVS="(from CVS sources) "
1604 fi
1605
1606 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
1607
1608 # Make sure we can run config.sub.
1609 $ac_config_sub sun4 >/dev/null 2>&1 ||
1610   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1611 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1612    { (exit 1); exit 1; }; }
1613
1614 echo "$as_me:$LINENO: checking build system type" >&5
1615 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1616 if test "${ac_cv_build+set}" = set; then
1617   echo $ECHO_N "(cached) $ECHO_C" >&6
1618 else
1619   ac_cv_build_alias=$build_alias
1620 test -z "$ac_cv_build_alias" &&
1621   ac_cv_build_alias=`$ac_config_guess`
1622 test -z "$ac_cv_build_alias" &&
1623   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1624 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1625    { (exit 1); exit 1; }; }
1626 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1627   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1628 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1629    { (exit 1); exit 1; }; }
1630
1631 fi
1632 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1633 echo "${ECHO_T}$ac_cv_build" >&6
1634 build=$ac_cv_build
1635 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1636 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1637 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1638
1639
1640 echo "$as_me:$LINENO: checking host system type" >&5
1641 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1642 if test "${ac_cv_host+set}" = set; then
1643   echo $ECHO_N "(cached) $ECHO_C" >&6
1644 else
1645   ac_cv_host_alias=$host_alias
1646 test -z "$ac_cv_host_alias" &&
1647   ac_cv_host_alias=$ac_cv_build_alias
1648 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1649   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1650 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1651    { (exit 1); exit 1; }; }
1652
1653 fi
1654 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1655 echo "${ECHO_T}$ac_cv_host" >&6
1656 host=$ac_cv_host
1657 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1658 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1659 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1660
1661
1662 echo "$as_me:$LINENO: checking target system type" >&5
1663 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1664 if test "${ac_cv_target+set}" = set; then
1665   echo $ECHO_N "(cached) $ECHO_C" >&6
1666 else
1667   ac_cv_target_alias=$target_alias
1668 test "x$ac_cv_target_alias" = "x" &&
1669   ac_cv_target_alias=$ac_cv_host_alias
1670 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1671   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1672 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1673    { (exit 1); exit 1; }; }
1674
1675 fi
1676 echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1677 echo "${ECHO_T}$ac_cv_target" >&6
1678 target=$ac_cv_target
1679 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1680 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1681 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1682
1683
1684 # The aliases save the names the user supplied, while $host etc.
1685 # will get canonicalized.
1686 test -n "$target_alias" &&
1687   test "$program_prefix$program_suffix$program_transform_name" = \
1688     NONENONEs,x,x, &&
1689   program_prefix=${target_alias}-
1690
1691 am__api_version="1.9"
1692 # Find a good install program.  We prefer a C program (faster),
1693 # so one script is as good as another.  But avoid the broken or
1694 # incompatible versions:
1695 # SysV /etc/install, /usr/sbin/install
1696 # SunOS /usr/etc/install
1697 # IRIX /sbin/install
1698 # AIX /bin/install
1699 # AmigaOS /C/install, which installs bootblocks on floppy discs
1700 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1701 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1702 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1703 # OS/2's system install, which has a completely different semantic
1704 # ./install, which can be erroneously created by make from ./install.sh.
1705 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
1706 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
1707 if test -z "$INSTALL"; then
1708 if test "${ac_cv_path_install+set}" = set; then
1709   echo $ECHO_N "(cached) $ECHO_C" >&6
1710 else
1711   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1712 for as_dir in $PATH
1713 do
1714   IFS=$as_save_IFS
1715   test -z "$as_dir" && as_dir=.
1716   # Account for people who put trailing slashes in PATH elements.
1717 case $as_dir/ in
1718   ./ | .// | /cC/* | \
1719   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
1720   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
1721   /usr/ucb/* ) ;;
1722   *)
1723     # OSF1 and SCO ODT 3.0 have their own names for install.
1724     # Don't use installbsd from OSF since it installs stuff as root
1725     # by default.
1726     for ac_prog in ginstall scoinst install; do
1727       for ac_exec_ext in '' $ac_executable_extensions; do
1728         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
1729           if test $ac_prog = install &&
1730             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
1731             # AIX install.  It has an incompatible calling convention.
1732             :
1733           elif test $ac_prog = install &&
1734             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
1735             # program-specific install script used by HP pwplus--don't use.
1736             :
1737           else
1738             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
1739             break 3
1740           fi
1741         fi
1742       done
1743     done
1744     ;;
1745 esac
1746 done
1747
1748
1749 fi
1750   if test "${ac_cv_path_install+set}" = set; then
1751     INSTALL=$ac_cv_path_install
1752   else
1753     # As a last resort, use the slow shell script.  We don't cache a
1754     # path for INSTALL within a source directory, because that will
1755     # break other packages using the cache if that directory is
1756     # removed, or if the path is relative.
1757     INSTALL=$ac_install_sh
1758   fi
1759 fi
1760 echo "$as_me:$LINENO: result: $INSTALL" >&5
1761 echo "${ECHO_T}$INSTALL" >&6
1762
1763 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1764 # It thinks the first close brace ends the variable substitution.
1765 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1766
1767 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1768
1769 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1770
1771 echo "$as_me:$LINENO: checking whether build environment is sane" >&5
1772 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
1773 # Just in case
1774 sleep 1
1775 echo timestamp > conftest.file
1776 # Do `set' in a subshell so we don't clobber the current shell's
1777 # arguments.  Must try -L first in case configure is actually a
1778 # symlink; some systems play weird games with the mod time of symlinks
1779 # (eg FreeBSD returns the mod time of the symlink's containing
1780 # directory).
1781 if (
1782    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1783    if test "$*" = "X"; then
1784       # -L didn't work.
1785       set X `ls -t $srcdir/configure conftest.file`
1786    fi
1787    rm -f conftest.file
1788    if test "$*" != "X $srcdir/configure conftest.file" \
1789       && test "$*" != "X conftest.file $srcdir/configure"; then
1790
1791       # If neither matched, then we have a broken ls.  This can happen
1792       # if, for instance, CONFIG_SHELL is bash and it inherits a
1793       # broken ls alias from the environment.  This has actually
1794       # happened.  Such a system could not be considered "sane".
1795       { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
1796 alias in your environment" >&5
1797 echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
1798 alias in your environment" >&2;}
1799    { (exit 1); exit 1; }; }
1800    fi
1801
1802    test "$2" = conftest.file
1803    )
1804 then
1805    # Ok.
1806    :
1807 else
1808    { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
1809 Check your system clock" >&5
1810 echo "$as_me: error: newly created file is older than distributed files!
1811 Check your system clock" >&2;}
1812    { (exit 1); exit 1; }; }
1813 fi
1814 echo "$as_me:$LINENO: result: yes" >&5
1815 echo "${ECHO_T}yes" >&6
1816 test "$program_prefix" != NONE &&
1817   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1818 # Use a double $ so make ignores it.
1819 test "$program_suffix" != NONE &&
1820   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1821 # Double any \ or $.  echo might interpret backslashes.
1822 # By default was `s,x,x', remove it if useless.
1823 cat <<\_ACEOF >conftest.sed
1824 s/[\\$]/&&/g;s/;s,x,x,$//
1825 _ACEOF
1826 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1827 rm conftest.sed
1828
1829 # expand $ac_aux_dir to an absolute path
1830 am_aux_dir=`cd $ac_aux_dir && pwd`
1831
1832 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
1833 # Use eval to expand $SHELL
1834 if eval "$MISSING --run true"; then
1835   am_missing_run="$MISSING --run "
1836 else
1837   am_missing_run=
1838   { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
1839 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
1840 fi
1841
1842 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
1843   # We used to keeping the `.' as first argument, in order to
1844   # allow $(mkdir_p) to be used without argument.  As in
1845   #   $(mkdir_p) $(somedir)
1846   # where $(somedir) is conditionally defined.  However this is wrong
1847   # for two reasons:
1848   #  1. if the package is installed by a user who cannot write `.'
1849   #     make install will fail,
1850   #  2. the above comment should most certainly read
1851   #     $(mkdir_p) $(DESTDIR)$(somedir)
1852   #     so it does not work when $(somedir) is undefined and
1853   #     $(DESTDIR) is not.
1854   #  To support the latter case, we have to write
1855   #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
1856   #  so the `.' trick is pointless.
1857   mkdir_p='mkdir -p --'
1858 else
1859   # On NextStep and OpenStep, the `mkdir' command does not
1860   # recognize any option.  It will interpret all options as
1861   # directories to create, and then abort because `.' already
1862   # exists.
1863   for d in ./-p ./--version;
1864   do
1865     test -d $d && rmdir $d
1866   done
1867   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
1868   if test -f "$ac_aux_dir/mkinstalldirs"; then
1869     mkdir_p='$(mkinstalldirs)'
1870   else
1871     mkdir_p='$(install_sh) -d'
1872   fi
1873 fi
1874
1875 for ac_prog in gawk mawk nawk awk
1876 do
1877   # Extract the first word of "$ac_prog", so it can be a program name with args.
1878 set dummy $ac_prog; ac_word=$2
1879 echo "$as_me:$LINENO: checking for $ac_word" >&5
1880 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1881 if test "${ac_cv_prog_AWK+set}" = set; then
1882   echo $ECHO_N "(cached) $ECHO_C" >&6
1883 else
1884   if test -n "$AWK"; then
1885   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1886 else
1887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1888 for as_dir in $PATH
1889 do
1890   IFS=$as_save_IFS
1891   test -z "$as_dir" && as_dir=.
1892   for ac_exec_ext in '' $ac_executable_extensions; do
1893   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1894     ac_cv_prog_AWK="$ac_prog"
1895     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1896     break 2
1897   fi
1898 done
1899 done
1900
1901 fi
1902 fi
1903 AWK=$ac_cv_prog_AWK
1904 if test -n "$AWK"; then
1905   echo "$as_me:$LINENO: result: $AWK" >&5
1906 echo "${ECHO_T}$AWK" >&6
1907 else
1908   echo "$as_me:$LINENO: result: no" >&5
1909 echo "${ECHO_T}no" >&6
1910 fi
1911
1912   test -n "$AWK" && break
1913 done
1914
1915 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
1916 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
1917 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
1918 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1919   echo $ECHO_N "(cached) $ECHO_C" >&6
1920 else
1921   cat >conftest.make <<\_ACEOF
1922 all:
1923         @echo 'ac_maketemp="$(MAKE)"'
1924 _ACEOF
1925 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1926 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1927 if test -n "$ac_maketemp"; then
1928   eval ac_cv_prog_make_${ac_make}_set=yes
1929 else
1930   eval ac_cv_prog_make_${ac_make}_set=no
1931 fi
1932 rm -f conftest.make
1933 fi
1934 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1935   echo "$as_me:$LINENO: result: yes" >&5
1936 echo "${ECHO_T}yes" >&6
1937   SET_MAKE=
1938 else
1939   echo "$as_me:$LINENO: result: no" >&5
1940 echo "${ECHO_T}no" >&6
1941   SET_MAKE="MAKE=${MAKE-make}"
1942 fi
1943
1944 rm -rf .tst 2>/dev/null
1945 mkdir .tst 2>/dev/null
1946 if test -d .tst; then
1947   am__leading_dot=.
1948 else
1949   am__leading_dot=_
1950 fi
1951 rmdir .tst 2>/dev/null
1952
1953 # test to see if srcdir already configured
1954 if test "`cd $srcdir && pwd`" != "`pwd`" &&
1955    test -f $srcdir/config.status; then
1956   { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
1957 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
1958    { (exit 1); exit 1; }; }
1959 fi
1960
1961 # test whether we have cygpath
1962 if test -z "$CYGPATH_W"; then
1963   if (cygpath --version) >/dev/null 2>/dev/null; then
1964     CYGPATH_W='cygpath -w'
1965   else
1966     CYGPATH_W=echo
1967   fi
1968 fi
1969
1970
1971 # Define the identity of the package.
1972  PACKAGE=$OL_PACKAGE
1973  VERSION=$OL_VERSION
1974
1975
1976 # Some tools Automake needs.
1977
1978 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
1979
1980
1981 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
1982
1983
1984 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
1985
1986
1987 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
1988
1989
1990 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
1991
1992 install_sh=${install_sh-"$am_aux_dir/install-sh"}
1993
1994 # Installed binaries are usually stripped using `strip' when the user
1995 # run `make install-strip'.  However `strip' might not be the right
1996 # tool to use in cross-compilation environments, therefore Automake
1997 # will honor the `STRIP' environment variable to overrule this program.
1998 if test "$cross_compiling" != no; then
1999   if test -n "$ac_tool_prefix"; then
2000   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2001 set dummy ${ac_tool_prefix}strip; ac_word=$2
2002 echo "$as_me:$LINENO: checking for $ac_word" >&5
2003 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2004 if test "${ac_cv_prog_STRIP+set}" = set; then
2005   echo $ECHO_N "(cached) $ECHO_C" >&6
2006 else
2007   if test -n "$STRIP"; then
2008   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2009 else
2010 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2011 for as_dir in $PATH
2012 do
2013   IFS=$as_save_IFS
2014   test -z "$as_dir" && as_dir=.
2015   for ac_exec_ext in '' $ac_executable_extensions; do
2016   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2017     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2018     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2019     break 2
2020   fi
2021 done
2022 done
2023
2024 fi
2025 fi
2026 STRIP=$ac_cv_prog_STRIP
2027 if test -n "$STRIP"; then
2028   echo "$as_me:$LINENO: result: $STRIP" >&5
2029 echo "${ECHO_T}$STRIP" >&6
2030 else
2031   echo "$as_me:$LINENO: result: no" >&5
2032 echo "${ECHO_T}no" >&6
2033 fi
2034
2035 fi
2036 if test -z "$ac_cv_prog_STRIP"; then
2037   ac_ct_STRIP=$STRIP
2038   # Extract the first word of "strip", so it can be a program name with args.
2039 set dummy strip; ac_word=$2
2040 echo "$as_me:$LINENO: checking for $ac_word" >&5
2041 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2042 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
2043   echo $ECHO_N "(cached) $ECHO_C" >&6
2044 else
2045   if test -n "$ac_ct_STRIP"; then
2046   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2047 else
2048 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2049 for as_dir in $PATH
2050 do
2051   IFS=$as_save_IFS
2052   test -z "$as_dir" && as_dir=.
2053   for ac_exec_ext in '' $ac_executable_extensions; do
2054   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2055     ac_cv_prog_ac_ct_STRIP="strip"
2056     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2057     break 2
2058   fi
2059 done
2060 done
2061
2062   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
2063 fi
2064 fi
2065 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2066 if test -n "$ac_ct_STRIP"; then
2067   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
2068 echo "${ECHO_T}$ac_ct_STRIP" >&6
2069 else
2070   echo "$as_me:$LINENO: result: no" >&5
2071 echo "${ECHO_T}no" >&6
2072 fi
2073
2074   STRIP=$ac_ct_STRIP
2075 else
2076   STRIP="$ac_cv_prog_STRIP"
2077 fi
2078
2079 fi
2080 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
2081
2082 # We need awk for the "check" target.  The system "awk" is bad on
2083 # some platforms.
2084 # Always define AMTAR for backward compatibility.
2085
2086 AMTAR=${AMTAR-"${am_missing_run}tar"}
2087
2088 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
2089
2090
2091
2092
2093
2094 cat >>confdefs.h <<_ACEOF
2095 #define OPENLDAP_PACKAGE "$PACKAGE"
2096 _ACEOF
2097
2098
2099 cat >>confdefs.h <<_ACEOF
2100 #define OPENLDAP_VERSION "$VERSION"
2101 _ACEOF
2102
2103
2104
2105 cat >>confdefs.h <<_ACEOF
2106 #define LDAP_VENDOR_VERSION $OL_API_INC
2107 _ACEOF
2108
2109
2110 cat >>confdefs.h <<_ACEOF
2111 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
2112 _ACEOF
2113
2114
2115 cat >>confdefs.h <<_ACEOF
2116 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
2117 _ACEOF
2118
2119
2120 cat >>confdefs.h <<_ACEOF
2121 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
2122 _ACEOF
2123
2124
2125 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
2126
2127 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
2128
2129 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
2130
2131
2132
2133
2134
2135
2136
2137           ac_config_headers="$ac_config_headers include/portable.h:include/portable.hin"
2138
2139           ac_config_headers="$ac_config_headers include/ldap_features.h:include/ldap_features.hin"
2140
2141           ac_config_headers="$ac_config_headers include/lber_types.h:include/lber_types.hin"
2142
2143
2144 echo "$as_me:$LINENO: checking configure arguments" >&5
2145 echo $ECHO_N "checking configure arguments... $ECHO_C" >&6
2146
2147
2148 top_builddir=`pwd`
2149
2150 ldap_subdir="/openldap"
2151
2152
2153 # Check whether --with-subdir or --without-subdir was given.
2154 if test "${with_subdir+set}" = set; then
2155   withval="$with_subdir"
2156   case "$withval" in
2157         no) ldap_subdir=""
2158                 ;;
2159         yes)
2160                 ;;
2161         /*|\\*)
2162                 ldap_subdir="$withval"
2163                 ;;
2164         *)
2165                 ldap_subdir="/$withval"
2166                 ;;
2167 esac
2168
2169 fi;
2170
2171 # OpenLDAP --enable-debug
2172
2173         # Check whether --enable-debug or --disable-debug was given.
2174 if test "${enable_debug+set}" = set; then
2175   enableval="$enable_debug"
2176
2177         ol_arg=invalid
2178         for ol_val in no yes traditional ; do
2179                 if test "$enableval" = "$ol_val" ; then
2180                         ol_arg="$ol_val"
2181                 fi
2182         done
2183         if test "$ol_arg" = "invalid" ; then
2184                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-debug" >&5
2185 echo "$as_me: error: bad value $enableval for --enable-debug" >&2;}
2186    { (exit 1); exit 1; }; }
2187         fi
2188         ol_enable_debug="$ol_arg"
2189
2190 else
2191         ol_enable_debug=yes
2192 fi;
2193 # end --enable-debug
2194 # OpenLDAP --enable-dynamic
2195
2196         # Check whether --enable-dynamic or --disable-dynamic was given.
2197 if test "${enable_dynamic+set}" = set; then
2198   enableval="$enable_dynamic"
2199
2200         ol_arg=invalid
2201         for ol_val in auto yes no ; do
2202                 if test "$enableval" = "$ol_val" ; then
2203                         ol_arg="$ol_val"
2204                 fi
2205         done
2206         if test "$ol_arg" = "invalid" ; then
2207                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dynamic" >&5
2208 echo "$as_me: error: bad value $enableval for --enable-dynamic" >&2;}
2209    { (exit 1); exit 1; }; }
2210         fi
2211         ol_enable_dynamic="$ol_arg"
2212
2213 else
2214         ol_enable_dynamic=no
2215 fi;
2216 # end --enable-dynamic
2217 # OpenLDAP --enable-syslog
2218
2219         # Check whether --enable-syslog or --disable-syslog was given.
2220 if test "${enable_syslog+set}" = set; then
2221   enableval="$enable_syslog"
2222
2223         ol_arg=invalid
2224         for ol_val in auto yes no ; do
2225                 if test "$enableval" = "$ol_val" ; then
2226                         ol_arg="$ol_val"
2227                 fi
2228         done
2229         if test "$ol_arg" = "invalid" ; then
2230                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-syslog" >&5
2231 echo "$as_me: error: bad value $enableval for --enable-syslog" >&2;}
2232    { (exit 1); exit 1; }; }
2233         fi
2234         ol_enable_syslog="$ol_arg"
2235
2236 else
2237         ol_enable_syslog=auto
2238 fi;
2239 # end --enable-syslog
2240 # OpenLDAP --enable-proctitle
2241
2242         # Check whether --enable-proctitle or --disable-proctitle was given.
2243 if test "${enable_proctitle+set}" = set; then
2244   enableval="$enable_proctitle"
2245
2246         ol_arg=invalid
2247         for ol_val in auto yes no ; do
2248                 if test "$enableval" = "$ol_val" ; then
2249                         ol_arg="$ol_val"
2250                 fi
2251         done
2252         if test "$ol_arg" = "invalid" ; then
2253                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-proctitle" >&5
2254 echo "$as_me: error: bad value $enableval for --enable-proctitle" >&2;}
2255    { (exit 1); exit 1; }; }
2256         fi
2257         ol_enable_proctitle="$ol_arg"
2258
2259 else
2260         ol_enable_proctitle=yes
2261 fi;
2262 # end --enable-proctitle
2263 ol_enable_referrals=${ol_enable_referrals-no}
2264 ol_enable_kbind=${ol_enable_kbind-no}
2265 # OpenLDAP --enable-ipv6
2266
2267         # Check whether --enable-ipv6 or --disable-ipv6 was given.
2268 if test "${enable_ipv6+set}" = set; then
2269   enableval="$enable_ipv6"
2270
2271         ol_arg=invalid
2272         for ol_val in auto yes no ; do
2273                 if test "$enableval" = "$ol_val" ; then
2274                         ol_arg="$ol_val"
2275                 fi
2276         done
2277         if test "$ol_arg" = "invalid" ; then
2278                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ipv6" >&5
2279 echo "$as_me: error: bad value $enableval for --enable-ipv6" >&2;}
2280    { (exit 1); exit 1; }; }
2281         fi
2282         ol_enable_ipv6="$ol_arg"
2283
2284 else
2285         ol_enable_ipv6=auto
2286 fi;
2287 # end --enable-ipv6
2288 # OpenLDAP --enable-local
2289
2290         # Check whether --enable-local or --disable-local was given.
2291 if test "${enable_local+set}" = set; then
2292   enableval="$enable_local"
2293
2294         ol_arg=invalid
2295         for ol_val in auto yes no ; do
2296                 if test "$enableval" = "$ol_val" ; then
2297                         ol_arg="$ol_val"
2298                 fi
2299         done
2300         if test "$ol_arg" = "invalid" ; then
2301                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-local" >&5
2302 echo "$as_me: error: bad value $enableval for --enable-local" >&2;}
2303    { (exit 1); exit 1; }; }
2304         fi
2305         ol_enable_local="$ol_arg"
2306
2307 else
2308         ol_enable_local=auto
2309 fi;
2310 # end --enable-local
2311
2312 # OpenLDAP --with-cyrus_sasl
2313
2314 # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
2315 if test "${with_cyrus_sasl+set}" = set; then
2316   withval="$with_cyrus_sasl"
2317
2318         ol_arg=invalid
2319         for ol_val in auto yes no  ; do
2320                 if test "$withval" = "$ol_val" ; then
2321                         ol_arg="$ol_val"
2322                 fi
2323         done
2324         if test "$ol_arg" = "invalid" ; then
2325                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-cyrus_sasl" >&5
2326 echo "$as_me: error: bad value $withval for --with-cyrus_sasl" >&2;}
2327    { (exit 1); exit 1; }; }
2328         fi
2329         ol_with_cyrus_sasl="$ol_arg"
2330
2331 else
2332         ol_with_cyrus_sasl="auto"
2333 fi; # end --with-cyrus_sasl
2334
2335 # OpenLDAP --with-fetch
2336
2337 # Check whether --with-fetch or --without-fetch was given.
2338 if test "${with_fetch+set}" = set; then
2339   withval="$with_fetch"
2340
2341         ol_arg=invalid
2342         for ol_val in auto yes no  ; do
2343                 if test "$withval" = "$ol_val" ; then
2344                         ol_arg="$ol_val"
2345                 fi
2346         done
2347         if test "$ol_arg" = "invalid" ; then
2348                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-fetch" >&5
2349 echo "$as_me: error: bad value $withval for --with-fetch" >&2;}
2350    { (exit 1); exit 1; }; }
2351         fi
2352         ol_with_fetch="$ol_arg"
2353
2354 else
2355         ol_with_fetch="auto"
2356 fi; # end --with-fetch
2357
2358 ol_with_kerberos=${ol_with_kerberos-auto}
2359 # OpenLDAP --with-threads
2360
2361 # Check whether --with-threads or --without-threads was given.
2362 if test "${with_threads+set}" = set; then
2363   withval="$with_threads"
2364
2365         ol_arg=invalid
2366         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
2367                 if test "$withval" = "$ol_val" ; then
2368                         ol_arg="$ol_val"
2369                 fi
2370         done
2371         if test "$ol_arg" = "invalid" ; then
2372                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-threads" >&5
2373 echo "$as_me: error: bad value $withval for --with-threads" >&2;}
2374    { (exit 1); exit 1; }; }
2375         fi
2376         ol_with_threads="$ol_arg"
2377
2378 else
2379         ol_with_threads="auto"
2380 fi; # end --with-threads
2381
2382 # OpenLDAP --with-tls
2383
2384 # Check whether --with-tls or --without-tls was given.
2385 if test "${with_tls+set}" = set; then
2386   withval="$with_tls"
2387
2388         ol_arg=invalid
2389         for ol_val in auto openssl yes no  ; do
2390                 if test "$withval" = "$ol_val" ; then
2391                         ol_arg="$ol_val"
2392                 fi
2393         done
2394         if test "$ol_arg" = "invalid" ; then
2395                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-tls" >&5
2396 echo "$as_me: error: bad value $withval for --with-tls" >&2;}
2397    { (exit 1); exit 1; }; }
2398         fi
2399         ol_with_tls="$ol_arg"
2400
2401 else
2402         ol_with_tls="auto"
2403 fi; # end --with-tls
2404
2405 # OpenLDAP --with-yielding_select
2406
2407 # Check whether --with-yielding_select or --without-yielding_select was given.
2408 if test "${with_yielding_select+set}" = set; then
2409   withval="$with_yielding_select"
2410
2411         ol_arg=invalid
2412         for ol_val in auto yes no manual  ; do
2413                 if test "$withval" = "$ol_val" ; then
2414                         ol_arg="$ol_val"
2415                 fi
2416         done
2417         if test "$ol_arg" = "invalid" ; then
2418                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-yielding_select" >&5
2419 echo "$as_me: error: bad value $withval for --with-yielding_select" >&2;}
2420    { (exit 1); exit 1; }; }
2421         fi
2422         ol_with_yielding_select="$ol_arg"
2423
2424 else
2425         ol_with_yielding_select="auto"
2426 fi; # end --with-yielding_select
2427
2428 # OpenLDAP --with-mp
2429
2430 # Check whether --with-mp or --without-mp was given.
2431 if test "${with_mp+set}" = set; then
2432   withval="$with_mp"
2433
2434         ol_arg=invalid
2435         for ol_val in auto longlong long bignum gmp yes no ; do
2436                 if test "$withval" = "$ol_val" ; then
2437                         ol_arg="$ol_val"
2438                 fi
2439         done
2440         if test "$ol_arg" = "invalid" ; then
2441                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-mp" >&5
2442 echo "$as_me: error: bad value $withval for --with-mp" >&2;}
2443    { (exit 1); exit 1; }; }
2444         fi
2445         ol_with_mp="$ol_arg"
2446
2447 else
2448         ol_with_mp="auto"
2449 fi; # end --with-mp
2450
2451
2452
2453 # Check whether --enable-xxslapdoptions or --disable-xxslapdoptions was given.
2454 if test "${enable_xxslapdoptions+set}" = set; then
2455   enableval="$enable_xxslapdoptions"
2456
2457 fi;
2458 # OpenLDAP --enable-slapd
2459
2460         # Check whether --enable-slapd or --disable-slapd was given.
2461 if test "${enable_slapd+set}" = set; then
2462   enableval="$enable_slapd"
2463
2464         ol_arg=invalid
2465         for ol_val in auto yes no ; do
2466                 if test "$enableval" = "$ol_val" ; then
2467                         ol_arg="$ol_val"
2468                 fi
2469         done
2470         if test "$ol_arg" = "invalid" ; then
2471                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slapd" >&5
2472 echo "$as_me: error: bad value $enableval for --enable-slapd" >&2;}
2473    { (exit 1); exit 1; }; }
2474         fi
2475         ol_enable_slapd="$ol_arg"
2476
2477 else
2478         ol_enable_slapd=yes
2479 fi;
2480 # end --enable-slapd
2481 # OpenLDAP --enable-dynacl
2482
2483         # Check whether --enable-dynacl or --disable-dynacl was given.
2484 if test "${enable_dynacl+set}" = set; then
2485   enableval="$enable_dynacl"
2486
2487         ol_arg=invalid
2488         for ol_val in auto yes no ; do
2489                 if test "$enableval" = "$ol_val" ; then
2490                         ol_arg="$ol_val"
2491                 fi
2492         done
2493         if test "$ol_arg" = "invalid" ; then
2494                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dynacl" >&5
2495 echo "$as_me: error: bad value $enableval for --enable-dynacl" >&2;}
2496    { (exit 1); exit 1; }; }
2497         fi
2498         ol_enable_dynacl="$ol_arg"
2499
2500 else
2501         ol_enable_dynacl=no
2502 fi;
2503 # end --enable-dynacl
2504 # OpenLDAP --enable-aci
2505
2506         # Check whether --enable-aci or --disable-aci was given.
2507 if test "${enable_aci+set}" = set; then
2508   enableval="$enable_aci"
2509
2510         ol_arg=invalid
2511         for ol_val in no yes mod ; do
2512                 if test "$enableval" = "$ol_val" ; then
2513                         ol_arg="$ol_val"
2514                 fi
2515         done
2516         if test "$ol_arg" = "invalid" ; then
2517                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-aci" >&5
2518 echo "$as_me: error: bad value $enableval for --enable-aci" >&2;}
2519    { (exit 1); exit 1; }; }
2520         fi
2521         ol_enable_aci="$ol_arg"
2522
2523 else
2524         ol_enable_aci=no
2525 fi;
2526 # end --enable-aci
2527 # OpenLDAP --enable-cleartext
2528
2529         # Check whether --enable-cleartext or --disable-cleartext was given.
2530 if test "${enable_cleartext+set}" = set; then
2531   enableval="$enable_cleartext"
2532
2533         ol_arg=invalid
2534         for ol_val in auto yes no ; do
2535                 if test "$enableval" = "$ol_val" ; then
2536                         ol_arg="$ol_val"
2537                 fi
2538         done
2539         if test "$ol_arg" = "invalid" ; then
2540                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-cleartext" >&5
2541 echo "$as_me: error: bad value $enableval for --enable-cleartext" >&2;}
2542    { (exit 1); exit 1; }; }
2543         fi
2544         ol_enable_cleartext="$ol_arg"
2545
2546 else
2547         ol_enable_cleartext=yes
2548 fi;
2549 # end --enable-cleartext
2550 # OpenLDAP --enable-crypt
2551
2552         # Check whether --enable-crypt or --disable-crypt was given.
2553 if test "${enable_crypt+set}" = set; then
2554   enableval="$enable_crypt"
2555
2556         ol_arg=invalid
2557         for ol_val in auto yes no ; do
2558                 if test "$enableval" = "$ol_val" ; then
2559                         ol_arg="$ol_val"
2560                 fi
2561         done
2562         if test "$ol_arg" = "invalid" ; then
2563                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-crypt" >&5
2564 echo "$as_me: error: bad value $enableval for --enable-crypt" >&2;}
2565    { (exit 1); exit 1; }; }
2566         fi
2567         ol_enable_crypt="$ol_arg"
2568
2569 else
2570         ol_enable_crypt=no
2571 fi;
2572 # end --enable-crypt
2573 # OpenLDAP --enable-lmpasswd
2574
2575         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
2576 if test "${enable_lmpasswd+set}" = set; then
2577   enableval="$enable_lmpasswd"
2578
2579         ol_arg=invalid
2580         for ol_val in auto yes no ; do
2581                 if test "$enableval" = "$ol_val" ; then
2582                         ol_arg="$ol_val"
2583                 fi
2584         done
2585         if test "$ol_arg" = "invalid" ; then
2586                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-lmpasswd" >&5
2587 echo "$as_me: error: bad value $enableval for --enable-lmpasswd" >&2;}
2588    { (exit 1); exit 1; }; }
2589         fi
2590         ol_enable_lmpasswd="$ol_arg"
2591
2592 else
2593         ol_enable_lmpasswd=no
2594 fi;
2595 # end --enable-lmpasswd
2596 # OpenLDAP --enable-spasswd
2597
2598         # Check whether --enable-spasswd or --disable-spasswd was given.
2599 if test "${enable_spasswd+set}" = set; then
2600   enableval="$enable_spasswd"
2601
2602         ol_arg=invalid
2603         for ol_val in auto yes no ; do
2604                 if test "$enableval" = "$ol_val" ; then
2605                         ol_arg="$ol_val"
2606                 fi
2607         done
2608         if test "$ol_arg" = "invalid" ; then
2609                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-spasswd" >&5
2610 echo "$as_me: error: bad value $enableval for --enable-spasswd" >&2;}
2611    { (exit 1); exit 1; }; }
2612         fi
2613         ol_enable_spasswd="$ol_arg"
2614
2615 else
2616         ol_enable_spasswd=no
2617 fi;
2618 # end --enable-spasswd
2619 # OpenLDAP --enable-modules
2620
2621         # Check whether --enable-modules or --disable-modules was given.
2622 if test "${enable_modules+set}" = set; then
2623   enableval="$enable_modules"
2624
2625         ol_arg=invalid
2626         for ol_val in auto yes no ; do
2627                 if test "$enableval" = "$ol_val" ; then
2628                         ol_arg="$ol_val"
2629                 fi
2630         done
2631         if test "$ol_arg" = "invalid" ; then
2632                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-modules" >&5
2633 echo "$as_me: error: bad value $enableval for --enable-modules" >&2;}
2634    { (exit 1); exit 1; }; }
2635         fi
2636         ol_enable_modules="$ol_arg"
2637
2638 else
2639         ol_enable_modules=no
2640 fi;
2641 # end --enable-modules
2642 # OpenLDAP --enable-rewrite
2643
2644         # Check whether --enable-rewrite or --disable-rewrite was given.
2645 if test "${enable_rewrite+set}" = set; then
2646   enableval="$enable_rewrite"
2647
2648         ol_arg=invalid
2649         for ol_val in auto yes no ; do
2650                 if test "$enableval" = "$ol_val" ; then
2651                         ol_arg="$ol_val"
2652                 fi
2653         done
2654         if test "$ol_arg" = "invalid" ; then
2655                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rewrite" >&5
2656 echo "$as_me: error: bad value $enableval for --enable-rewrite" >&2;}
2657    { (exit 1); exit 1; }; }
2658         fi
2659         ol_enable_rewrite="$ol_arg"
2660
2661 else
2662         ol_enable_rewrite=auto
2663 fi;
2664 # end --enable-rewrite
2665 # OpenLDAP --enable-rlookups
2666
2667         # Check whether --enable-rlookups or --disable-rlookups was given.
2668 if test "${enable_rlookups+set}" = set; then
2669   enableval="$enable_rlookups"
2670
2671         ol_arg=invalid
2672         for ol_val in auto yes no ; do
2673                 if test "$enableval" = "$ol_val" ; then
2674                         ol_arg="$ol_val"
2675                 fi
2676         done
2677         if test "$ol_arg" = "invalid" ; then
2678                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rlookups" >&5
2679 echo "$as_me: error: bad value $enableval for --enable-rlookups" >&2;}
2680    { (exit 1); exit 1; }; }
2681         fi
2682         ol_enable_rlookups="$ol_arg"
2683
2684 else
2685         ol_enable_rlookups=no
2686 fi;
2687 # end --enable-rlookups
2688 # OpenLDAP --enable-slapi
2689
2690         # Check whether --enable-slapi or --disable-slapi was given.
2691 if test "${enable_slapi+set}" = set; then
2692   enableval="$enable_slapi"
2693
2694         ol_arg=invalid
2695         for ol_val in auto yes no ; do
2696                 if test "$enableval" = "$ol_val" ; then
2697                         ol_arg="$ol_val"
2698                 fi
2699         done
2700         if test "$ol_arg" = "invalid" ; then
2701                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slapi" >&5
2702 echo "$as_me: error: bad value $enableval for --enable-slapi" >&2;}
2703    { (exit 1); exit 1; }; }
2704         fi
2705         ol_enable_slapi="$ol_arg"
2706
2707 else
2708         ol_enable_slapi=no
2709 fi;
2710 # end --enable-slapi
2711 # OpenLDAP --enable-slp
2712
2713         # Check whether --enable-slp or --disable-slp was given.
2714 if test "${enable_slp+set}" = set; then
2715   enableval="$enable_slp"
2716
2717         ol_arg=invalid
2718         for ol_val in auto yes no ; do
2719                 if test "$enableval" = "$ol_val" ; then
2720                         ol_arg="$ol_val"
2721                 fi
2722         done
2723         if test "$ol_arg" = "invalid" ; then
2724                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slp" >&5
2725 echo "$as_me: error: bad value $enableval for --enable-slp" >&2;}
2726    { (exit 1); exit 1; }; }
2727         fi
2728         ol_enable_slp="$ol_arg"
2729
2730 else
2731         ol_enable_slp=no
2732 fi;
2733 # end --enable-slp
2734 # OpenLDAP --enable-wrappers
2735
2736         # Check whether --enable-wrappers or --disable-wrappers was given.
2737 if test "${enable_wrappers+set}" = set; then
2738   enableval="$enable_wrappers"
2739
2740         ol_arg=invalid
2741         for ol_val in auto yes no ; do
2742                 if test "$enableval" = "$ol_val" ; then
2743                         ol_arg="$ol_val"
2744                 fi
2745         done
2746         if test "$ol_arg" = "invalid" ; then
2747                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-wrappers" >&5
2748 echo "$as_me: error: bad value $enableval for --enable-wrappers" >&2;}
2749    { (exit 1); exit 1; }; }
2750         fi
2751         ol_enable_wrappers="$ol_arg"
2752
2753 else
2754         ol_enable_wrappers=no
2755 fi;
2756 # end --enable-wrappers
2757
2758 Backends="bdb \
2759         dnssrv \
2760         hdb \
2761         ldap \
2762         meta \
2763         monitor \
2764         null \
2765         passwd \
2766         perl \
2767         relay \
2768         shell \
2769         sql"
2770
2771 # Check whether --enable-xxslapbackends or --disable-xxslapbackends was given.
2772 if test "${enable_xxslapbackends+set}" = set; then
2773   enableval="$enable_xxslapbackends"
2774
2775 fi;
2776
2777 # OpenLDAP --enable-backends
2778
2779         # Check whether --enable-backends or --disable-backends was given.
2780 if test "${enable_backends+set}" = set; then
2781   enableval="$enable_backends"
2782
2783         ol_arg=invalid
2784         for ol_val in no yes mod ; do
2785                 if test "$enableval" = "$ol_val" ; then
2786                         ol_arg="$ol_val"
2787                 fi
2788         done
2789         if test "$ol_arg" = "invalid" ; then
2790                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-backends" >&5
2791 echo "$as_me: error: bad value $enableval for --enable-backends" >&2;}
2792    { (exit 1); exit 1; }; }
2793         fi
2794         ol_enable_backends="$ol_arg"
2795
2796 fi;
2797 # end --enable-backends
2798 # OpenLDAP --enable-bdb
2799
2800         # Check whether --enable-bdb or --disable-bdb was given.
2801 if test "${enable_bdb+set}" = set; then
2802   enableval="$enable_bdb"
2803
2804         ol_arg=invalid
2805         for ol_val in no yes mod ; do
2806                 if test "$enableval" = "$ol_val" ; then
2807                         ol_arg="$ol_val"
2808                 fi
2809         done
2810         if test "$ol_arg" = "invalid" ; then
2811                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-bdb" >&5
2812 echo "$as_me: error: bad value $enableval for --enable-bdb" >&2;}
2813    { (exit 1); exit 1; }; }
2814         fi
2815         ol_enable_bdb="$ol_arg"
2816
2817 else
2818         ol_enable_bdb=${ol_enable_backends:-yes}
2819 fi;
2820 # end --enable-bdb
2821 # OpenLDAP --enable-dnssrv
2822
2823         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2824 if test "${enable_dnssrv+set}" = set; then
2825   enableval="$enable_dnssrv"
2826
2827         ol_arg=invalid
2828         for ol_val in no yes mod ; do
2829                 if test "$enableval" = "$ol_val" ; then
2830                         ol_arg="$ol_val"
2831                 fi
2832         done
2833         if test "$ol_arg" = "invalid" ; then
2834                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dnssrv" >&5
2835 echo "$as_me: error: bad value $enableval for --enable-dnssrv" >&2;}
2836    { (exit 1); exit 1; }; }
2837         fi
2838         ol_enable_dnssrv="$ol_arg"
2839
2840 else
2841         ol_enable_dnssrv=${ol_enable_backends:-no}
2842 fi;
2843 # end --enable-dnssrv
2844 # OpenLDAP --enable-hdb
2845
2846         # Check whether --enable-hdb or --disable-hdb was given.
2847 if test "${enable_hdb+set}" = set; then
2848   enableval="$enable_hdb"
2849
2850         ol_arg=invalid
2851         for ol_val in no yes mod ; do
2852                 if test "$enableval" = "$ol_val" ; then
2853                         ol_arg="$ol_val"
2854                 fi
2855         done
2856         if test "$ol_arg" = "invalid" ; then
2857                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-hdb" >&5
2858 echo "$as_me: error: bad value $enableval for --enable-hdb" >&2;}
2859    { (exit 1); exit 1; }; }
2860         fi
2861         ol_enable_hdb="$ol_arg"
2862
2863 else
2864         ol_enable_hdb=${ol_enable_backends:-yes}
2865 fi;
2866 # end --enable-hdb
2867 # OpenLDAP --enable-ldap
2868
2869         # Check whether --enable-ldap or --disable-ldap was given.
2870 if test "${enable_ldap+set}" = set; then
2871   enableval="$enable_ldap"
2872
2873         ol_arg=invalid
2874         for ol_val in no yes mod ; do
2875                 if test "$enableval" = "$ol_val" ; then
2876                         ol_arg="$ol_val"
2877                 fi
2878         done
2879         if test "$ol_arg" = "invalid" ; then
2880                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldap" >&5
2881 echo "$as_me: error: bad value $enableval for --enable-ldap" >&2;}
2882    { (exit 1); exit 1; }; }
2883         fi
2884         ol_enable_ldap="$ol_arg"
2885
2886 else
2887         ol_enable_ldap=${ol_enable_backends:-no}
2888 fi;
2889 # end --enable-ldap
2890 # OpenLDAP --enable-meta
2891
2892         # Check whether --enable-meta or --disable-meta was given.
2893 if test "${enable_meta+set}" = set; then
2894   enableval="$enable_meta"
2895
2896         ol_arg=invalid
2897         for ol_val in no yes mod ; do
2898                 if test "$enableval" = "$ol_val" ; then
2899                         ol_arg="$ol_val"
2900                 fi
2901         done
2902         if test "$ol_arg" = "invalid" ; then
2903                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-meta" >&5
2904 echo "$as_me: error: bad value $enableval for --enable-meta" >&2;}
2905    { (exit 1); exit 1; }; }
2906         fi
2907         ol_enable_meta="$ol_arg"
2908
2909 else
2910         ol_enable_meta=${ol_enable_backends:-no}
2911 fi;
2912 # end --enable-meta
2913 # OpenLDAP --enable-monitor
2914
2915         # Check whether --enable-monitor or --disable-monitor was given.
2916 if test "${enable_monitor+set}" = set; then
2917   enableval="$enable_monitor"
2918
2919         ol_arg=invalid
2920         for ol_val in no yes mod ; do
2921                 if test "$enableval" = "$ol_val" ; then
2922                         ol_arg="$ol_val"
2923                 fi
2924         done
2925         if test "$ol_arg" = "invalid" ; then
2926                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-monitor" >&5
2927 echo "$as_me: error: bad value $enableval for --enable-monitor" >&2;}
2928    { (exit 1); exit 1; }; }
2929         fi
2930         ol_enable_monitor="$ol_arg"
2931
2932 else
2933         ol_enable_monitor=${ol_enable_backends:-yes}
2934 fi;
2935 # end --enable-monitor
2936 # OpenLDAP --enable-null
2937
2938         # Check whether --enable-null or --disable-null was given.
2939 if test "${enable_null+set}" = set; then
2940   enableval="$enable_null"
2941
2942         ol_arg=invalid
2943         for ol_val in no yes mod ; do
2944                 if test "$enableval" = "$ol_val" ; then
2945                         ol_arg="$ol_val"
2946                 fi
2947         done
2948         if test "$ol_arg" = "invalid" ; then
2949                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-null" >&5
2950 echo "$as_me: error: bad value $enableval for --enable-null" >&2;}
2951    { (exit 1); exit 1; }; }
2952         fi
2953         ol_enable_null="$ol_arg"
2954
2955 else
2956         ol_enable_null=${ol_enable_backends:-no}
2957 fi;
2958 # end --enable-null
2959 # OpenLDAP --enable-passwd
2960
2961         # Check whether --enable-passwd or --disable-passwd was given.
2962 if test "${enable_passwd+set}" = set; then
2963   enableval="$enable_passwd"
2964
2965         ol_arg=invalid
2966         for ol_val in no yes mod ; do
2967                 if test "$enableval" = "$ol_val" ; then
2968                         ol_arg="$ol_val"
2969                 fi
2970         done
2971         if test "$ol_arg" = "invalid" ; then
2972                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-passwd" >&5
2973 echo "$as_me: error: bad value $enableval for --enable-passwd" >&2;}
2974    { (exit 1); exit 1; }; }
2975         fi
2976         ol_enable_passwd="$ol_arg"
2977
2978 else
2979         ol_enable_passwd=${ol_enable_backends:-no}
2980 fi;
2981 # end --enable-passwd
2982 # OpenLDAP --enable-perl
2983
2984         # Check whether --enable-perl or --disable-perl was given.
2985 if test "${enable_perl+set}" = set; then
2986   enableval="$enable_perl"
2987
2988         ol_arg=invalid
2989         for ol_val in no yes mod ; do
2990                 if test "$enableval" = "$ol_val" ; then
2991                         ol_arg="$ol_val"
2992                 fi
2993         done
2994         if test "$ol_arg" = "invalid" ; then
2995                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-perl" >&5
2996 echo "$as_me: error: bad value $enableval for --enable-perl" >&2;}
2997    { (exit 1); exit 1; }; }
2998         fi
2999         ol_enable_perl="$ol_arg"
3000
3001 else
3002         ol_enable_perl=${ol_enable_backends:-no}
3003 fi;
3004 # end --enable-perl
3005 # OpenLDAP --enable-relay
3006
3007         # Check whether --enable-relay or --disable-relay was given.
3008 if test "${enable_relay+set}" = set; then
3009   enableval="$enable_relay"
3010
3011         ol_arg=invalid
3012         for ol_val in no yes mod ; do
3013                 if test "$enableval" = "$ol_val" ; then
3014                         ol_arg="$ol_val"
3015                 fi
3016         done
3017         if test "$ol_arg" = "invalid" ; then
3018                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-relay" >&5
3019 echo "$as_me: error: bad value $enableval for --enable-relay" >&2;}
3020    { (exit 1); exit 1; }; }
3021         fi
3022         ol_enable_relay="$ol_arg"
3023
3024 else
3025         ol_enable_relay=${ol_enable_backends:-yes}
3026 fi;
3027 # end --enable-relay
3028 # OpenLDAP --enable-shell
3029
3030         # Check whether --enable-shell or --disable-shell was given.
3031 if test "${enable_shell+set}" = set; then
3032   enableval="$enable_shell"
3033
3034         ol_arg=invalid
3035         for ol_val in no yes mod ; do
3036                 if test "$enableval" = "$ol_val" ; then
3037                         ol_arg="$ol_val"
3038                 fi
3039         done
3040         if test "$ol_arg" = "invalid" ; then
3041                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-shell" >&5
3042 echo "$as_me: error: bad value $enableval for --enable-shell" >&2;}
3043    { (exit 1); exit 1; }; }
3044         fi
3045         ol_enable_shell="$ol_arg"
3046
3047 else
3048         ol_enable_shell=${ol_enable_backends:-no}
3049 fi;
3050 # end --enable-shell
3051 # OpenLDAP --enable-sql
3052
3053         # Check whether --enable-sql or --disable-sql was given.
3054 if test "${enable_sql+set}" = set; then
3055   enableval="$enable_sql"
3056
3057         ol_arg=invalid
3058         for ol_val in no yes mod ; do
3059                 if test "$enableval" = "$ol_val" ; then
3060                         ol_arg="$ol_val"
3061                 fi
3062         done
3063         if test "$ol_arg" = "invalid" ; then
3064                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-sql" >&5
3065 echo "$as_me: error: bad value $enableval for --enable-sql" >&2;}
3066    { (exit 1); exit 1; }; }
3067         fi
3068         ol_enable_sql="$ol_arg"
3069
3070 else
3071         ol_enable_sql=${ol_enable_backends:-no}
3072 fi;
3073 # end --enable-sql
3074
3075 Overlays="accesslog \
3076         auditlog \
3077         dds \
3078         denyop \
3079         dyngroup \
3080         dynlist \
3081         lastmod \
3082         ppolicy \
3083         proxycache \
3084         refint \
3085         retcode \
3086         rwm \
3087         seqmod \
3088         syncprov \
3089         translucent \
3090         unique \
3091         valsort"
3092
3093 # Check whether --enable-xxslapoverlays or --disable-xxslapoverlays was given.
3094 if test "${enable_xxslapoverlays+set}" = set; then
3095   enableval="$enable_xxslapoverlays"
3096
3097 fi;
3098
3099 # OpenLDAP --enable-overlays
3100
3101         # Check whether --enable-overlays or --disable-overlays was given.
3102 if test "${enable_overlays+set}" = set; then
3103   enableval="$enable_overlays"
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-overlays" >&5
3113 echo "$as_me: error: bad value $enableval for --enable-overlays" >&2;}
3114    { (exit 1); exit 1; }; }
3115         fi
3116         ol_enable_overlays="$ol_arg"
3117
3118 fi;
3119 # end --enable-overlays
3120 # OpenLDAP --enable-accesslog
3121
3122         # Check whether --enable-accesslog or --disable-accesslog was given.
3123 if test "${enable_accesslog+set}" = set; then
3124   enableval="$enable_accesslog"
3125
3126         ol_arg=invalid
3127         for ol_val in no yes mod ; do
3128                 if test "$enableval" = "$ol_val" ; then
3129                         ol_arg="$ol_val"
3130                 fi
3131         done
3132         if test "$ol_arg" = "invalid" ; then
3133                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-accesslog" >&5
3134 echo "$as_me: error: bad value $enableval for --enable-accesslog" >&2;}
3135    { (exit 1); exit 1; }; }
3136         fi
3137         ol_enable_accesslog="$ol_arg"
3138
3139 else
3140         ol_enable_accesslog=${ol_enable_overlays:-no}
3141 fi;
3142 # end --enable-accesslog
3143
3144 # OpenLDAP --enable-auditlog
3145
3146         # Check whether --enable-auditlog or --disable-auditlog was given.
3147 if test "${enable_auditlog+set}" = set; then
3148   enableval="$enable_auditlog"
3149
3150         ol_arg=invalid
3151         for ol_val in no yes mod ; do
3152                 if test "$enableval" = "$ol_val" ; then
3153                         ol_arg="$ol_val"
3154                 fi
3155         done
3156         if test "$ol_arg" = "invalid" ; then
3157                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-auditlog" >&5
3158 echo "$as_me: error: bad value $enableval for --enable-auditlog" >&2;}
3159    { (exit 1); exit 1; }; }
3160         fi
3161         ol_enable_auditlog="$ol_arg"
3162
3163 else
3164         ol_enable_auditlog=${ol_enable_overlays:-no}
3165 fi;
3166 # end --enable-auditlog
3167
3168 # OpenLDAP --enable-dds
3169
3170         # Check whether --enable-dds or --disable-dds was given.
3171 if test "${enable_dds+set}" = set; then
3172   enableval="$enable_dds"
3173
3174         ol_arg=invalid
3175         for ol_val in no yes mod ; do
3176                 if test "$enableval" = "$ol_val" ; then
3177                         ol_arg="$ol_val"
3178                 fi
3179         done
3180         if test "$ol_arg" = "invalid" ; then
3181                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dds" >&5
3182 echo "$as_me: error: bad value $enableval for --enable-dds" >&2;}
3183    { (exit 1); exit 1; }; }
3184         fi
3185         ol_enable_dds="$ol_arg"
3186
3187 else
3188         ol_enable_dds=${ol_enable_overlays:-no}
3189 fi;
3190 # end --enable-dds
3191
3192 # OpenLDAP --enable-denyop
3193
3194         # Check whether --enable-denyop or --disable-denyop was given.
3195 if test "${enable_denyop+set}" = set; then
3196   enableval="$enable_denyop"
3197
3198         ol_arg=invalid
3199         for ol_val in no yes mod ; do
3200                 if test "$enableval" = "$ol_val" ; then
3201                         ol_arg="$ol_val"
3202                 fi
3203         done
3204         if test "$ol_arg" = "invalid" ; then
3205                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-denyop" >&5
3206 echo "$as_me: error: bad value $enableval for --enable-denyop" >&2;}
3207    { (exit 1); exit 1; }; }
3208         fi
3209         ol_enable_denyop="$ol_arg"
3210
3211 else
3212         ol_enable_denyop=${ol_enable_overlays:-no}
3213 fi;
3214 # end --enable-denyop
3215
3216 # OpenLDAP --enable-dyngroup
3217
3218         # Check whether --enable-dyngroup or --disable-dyngroup was given.
3219 if test "${enable_dyngroup+set}" = set; then
3220   enableval="$enable_dyngroup"
3221
3222         ol_arg=invalid
3223         for ol_val in no yes mod ; do
3224                 if test "$enableval" = "$ol_val" ; then
3225                         ol_arg="$ol_val"
3226                 fi
3227         done
3228         if test "$ol_arg" = "invalid" ; then
3229                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dyngroup" >&5
3230 echo "$as_me: error: bad value $enableval for --enable-dyngroup" >&2;}
3231    { (exit 1); exit 1; }; }
3232         fi
3233         ol_enable_dyngroup="$ol_arg"
3234
3235 else
3236         ol_enable_dyngroup=${ol_enable_overlays:-no}
3237 fi;
3238 # end --enable-dyngroup
3239
3240 # OpenLDAP --enable-dynlist
3241
3242         # Check whether --enable-dynlist or --disable-dynlist was given.
3243 if test "${enable_dynlist+set}" = set; then
3244   enableval="$enable_dynlist"
3245
3246         ol_arg=invalid
3247         for ol_val in no yes mod ; do
3248                 if test "$enableval" = "$ol_val" ; then
3249                         ol_arg="$ol_val"
3250                 fi
3251         done
3252         if test "$ol_arg" = "invalid" ; then
3253                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dynlist" >&5
3254 echo "$as_me: error: bad value $enableval for --enable-dynlist" >&2;}
3255    { (exit 1); exit 1; }; }
3256         fi
3257         ol_enable_dynlist="$ol_arg"
3258
3259 else
3260         ol_enable_dynlist=${ol_enable_overlays:-no}
3261 fi;
3262 # end --enable-dynlist
3263
3264 # OpenLDAP --enable-lastmod
3265
3266         # Check whether --enable-lastmod or --disable-lastmod was given.
3267 if test "${enable_lastmod+set}" = set; then
3268   enableval="$enable_lastmod"
3269
3270         ol_arg=invalid
3271         for ol_val in no yes mod ; do
3272                 if test "$enableval" = "$ol_val" ; then
3273                         ol_arg="$ol_val"
3274                 fi
3275         done
3276         if test "$ol_arg" = "invalid" ; then
3277                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-lastmod" >&5
3278 echo "$as_me: error: bad value $enableval for --enable-lastmod" >&2;}
3279    { (exit 1); exit 1; }; }
3280         fi
3281         ol_enable_lastmod="$ol_arg"
3282
3283 else
3284         ol_enable_lastmod=${ol_enable_overlays:-no}
3285 fi;
3286 # end --enable-lastmod
3287
3288 # OpenLDAP --enable-ppolicy
3289
3290         # Check whether --enable-ppolicy or --disable-ppolicy was given.
3291 if test "${enable_ppolicy+set}" = set; then
3292   enableval="$enable_ppolicy"
3293
3294         ol_arg=invalid
3295         for ol_val in no yes mod ; do
3296                 if test "$enableval" = "$ol_val" ; then
3297                         ol_arg="$ol_val"
3298                 fi
3299         done
3300         if test "$ol_arg" = "invalid" ; then
3301                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ppolicy" >&5
3302 echo "$as_me: error: bad value $enableval for --enable-ppolicy" >&2;}
3303    { (exit 1); exit 1; }; }
3304         fi
3305         ol_enable_ppolicy="$ol_arg"
3306
3307 else
3308         ol_enable_ppolicy=${ol_enable_overlays:-no}
3309 fi;
3310 # end --enable-ppolicy
3311
3312 # OpenLDAP --enable-proxycache
3313
3314         # Check whether --enable-proxycache or --disable-proxycache was given.
3315 if test "${enable_proxycache+set}" = set; then
3316   enableval="$enable_proxycache"
3317
3318         ol_arg=invalid
3319         for ol_val in no yes mod ; do
3320                 if test "$enableval" = "$ol_val" ; then
3321                         ol_arg="$ol_val"
3322                 fi
3323         done
3324         if test "$ol_arg" = "invalid" ; then
3325                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-proxycache" >&5
3326 echo "$as_me: error: bad value $enableval for --enable-proxycache" >&2;}
3327    { (exit 1); exit 1; }; }
3328         fi
3329         ol_enable_proxycache="$ol_arg"
3330
3331 else
3332         ol_enable_proxycache=${ol_enable_overlays:-no}
3333 fi;
3334 # end --enable-proxycache
3335
3336 # OpenLDAP --enable-refint
3337
3338         # Check whether --enable-refint or --disable-refint was given.
3339 if test "${enable_refint+set}" = set; then
3340   enableval="$enable_refint"
3341
3342         ol_arg=invalid
3343         for ol_val in no yes mod ; do
3344                 if test "$enableval" = "$ol_val" ; then
3345                         ol_arg="$ol_val"
3346                 fi
3347         done
3348         if test "$ol_arg" = "invalid" ; then
3349                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-refint" >&5
3350 echo "$as_me: error: bad value $enableval for --enable-refint" >&2;}
3351    { (exit 1); exit 1; }; }
3352         fi
3353         ol_enable_refint="$ol_arg"
3354
3355 else
3356         ol_enable_refint=${ol_enable_overlays:-no}
3357 fi;
3358 # end --enable-refint
3359
3360 # OpenLDAP --enable-retcode
3361
3362         # Check whether --enable-retcode or --disable-retcode was given.
3363 if test "${enable_retcode+set}" = set; then
3364   enableval="$enable_retcode"
3365
3366         ol_arg=invalid
3367         for ol_val in no yes mod ; do
3368                 if test "$enableval" = "$ol_val" ; then
3369                         ol_arg="$ol_val"
3370                 fi
3371         done
3372         if test "$ol_arg" = "invalid" ; then
3373                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-retcode" >&5
3374 echo "$as_me: error: bad value $enableval for --enable-retcode" >&2;}
3375    { (exit 1); exit 1; }; }
3376         fi
3377         ol_enable_retcode="$ol_arg"
3378
3379 else
3380         ol_enable_retcode=${ol_enable_overlays:-no}
3381 fi;
3382 # end --enable-retcode
3383
3384 # OpenLDAP --enable-rwm
3385
3386         # Check whether --enable-rwm or --disable-rwm was given.
3387 if test "${enable_rwm+set}" = set; then
3388   enableval="$enable_rwm"
3389
3390         ol_arg=invalid
3391         for ol_val in no yes mod ; do
3392                 if test "$enableval" = "$ol_val" ; then
3393                         ol_arg="$ol_val"
3394                 fi
3395         done
3396         if test "$ol_arg" = "invalid" ; then
3397                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rwm" >&5
3398 echo "$as_me: error: bad value $enableval for --enable-rwm" >&2;}
3399    { (exit 1); exit 1; }; }
3400         fi
3401         ol_enable_rwm="$ol_arg"
3402
3403 else
3404         ol_enable_rwm=${ol_enable_overlays:-no}
3405 fi;
3406 # end --enable-rwm
3407
3408 # OpenLDAP --enable-seqmod
3409
3410         # Check whether --enable-seqmod or --disable-seqmod was given.
3411 if test "${enable_seqmod+set}" = set; then
3412   enableval="$enable_seqmod"
3413
3414         ol_arg=invalid
3415         for ol_val in no yes mod ; do
3416                 if test "$enableval" = "$ol_val" ; then
3417                         ol_arg="$ol_val"
3418                 fi
3419         done
3420         if test "$ol_arg" = "invalid" ; then
3421                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-seqmod" >&5
3422 echo "$as_me: error: bad value $enableval for --enable-seqmod" >&2;}
3423    { (exit 1); exit 1; }; }
3424         fi
3425         ol_enable_seqmod="$ol_arg"
3426
3427 else
3428         ol_enable_seqmod=${ol_enable_overlays:-yes}
3429 fi;
3430 # end --enable-seqmod
3431
3432 # OpenLDAP --enable-syncprov
3433
3434         # Check whether --enable-syncprov or --disable-syncprov was given.
3435 if test "${enable_syncprov+set}" = set; then
3436   enableval="$enable_syncprov"
3437
3438         ol_arg=invalid
3439         for ol_val in no yes mod ; do
3440                 if test "$enableval" = "$ol_val" ; then
3441                         ol_arg="$ol_val"
3442                 fi
3443         done
3444         if test "$ol_arg" = "invalid" ; then
3445                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-syncprov" >&5
3446 echo "$as_me: error: bad value $enableval for --enable-syncprov" >&2;}
3447    { (exit 1); exit 1; }; }
3448         fi
3449         ol_enable_syncprov="$ol_arg"
3450
3451 else
3452         ol_enable_syncprov=${ol_enable_overlays:-yes}
3453 fi;
3454 # end --enable-syncprov
3455
3456 # OpenLDAP --enable-translucent
3457
3458         # Check whether --enable-translucent or --disable-translucent was given.
3459 if test "${enable_translucent+set}" = set; then
3460   enableval="$enable_translucent"
3461
3462         ol_arg=invalid
3463         for ol_val in no yes mod ; do
3464                 if test "$enableval" = "$ol_val" ; then
3465                         ol_arg="$ol_val"
3466                 fi
3467         done
3468         if test "$ol_arg" = "invalid" ; then
3469                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-translucent" >&5
3470 echo "$as_me: error: bad value $enableval for --enable-translucent" >&2;}
3471    { (exit 1); exit 1; }; }
3472         fi
3473         ol_enable_translucent="$ol_arg"
3474
3475 else
3476         ol_enable_translucent=${ol_enable_overlays:-no}
3477 fi;
3478 # end --enable-translucent
3479
3480 # OpenLDAP --enable-unique
3481
3482         # Check whether --enable-unique or --disable-unique was given.
3483 if test "${enable_unique+set}" = set; then
3484   enableval="$enable_unique"
3485
3486         ol_arg=invalid
3487         for ol_val in no yes mod ; do
3488                 if test "$enableval" = "$ol_val" ; then
3489                         ol_arg="$ol_val"
3490                 fi
3491         done
3492         if test "$ol_arg" = "invalid" ; then
3493                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-unique" >&5
3494 echo "$as_me: error: bad value $enableval for --enable-unique" >&2;}
3495    { (exit 1); exit 1; }; }
3496         fi
3497         ol_enable_unique="$ol_arg"
3498
3499 else
3500         ol_enable_unique=${ol_enable_overlays:-no}
3501 fi;
3502 # end --enable-unique
3503
3504 # OpenLDAP --enable-valsort
3505
3506         # Check whether --enable-valsort or --disable-valsort was given.
3507 if test "${enable_valsort+set}" = set; then
3508   enableval="$enable_valsort"
3509
3510         ol_arg=invalid
3511         for ol_val in no yes mod ; do
3512                 if test "$enableval" = "$ol_val" ; then
3513                         ol_arg="$ol_val"
3514                 fi
3515         done
3516         if test "$ol_arg" = "invalid" ; then
3517                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-valsort" >&5
3518 echo "$as_me: error: bad value $enableval for --enable-valsort" >&2;}
3519    { (exit 1); exit 1; }; }
3520         fi
3521         ol_enable_valsort="$ol_arg"
3522
3523 else
3524         ol_enable_valsort=${ol_enable_overlays:-no}
3525 fi;
3526 # end --enable-valsort
3527
3528
3529 # Check whether --enable-xxslurpdoptions or --disable-xxslurpdoptions was given.
3530 if test "${enable_xxslurpdoptions+set}" = set; then
3531   enableval="$enable_xxslurpdoptions"
3532
3533 fi;
3534 # OpenLDAP --enable-slurpd
3535
3536         # Check whether --enable-slurpd or --disable-slurpd was given.
3537 if test "${enable_slurpd+set}" = set; then
3538   enableval="$enable_slurpd"
3539
3540         ol_arg=invalid
3541         for ol_val in auto yes no ; do
3542                 if test "$enableval" = "$ol_val" ; then
3543                         ol_arg="$ol_val"
3544                 fi
3545         done
3546         if test "$ol_arg" = "invalid" ; then
3547                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slurpd" >&5
3548 echo "$as_me: error: bad value $enableval for --enable-slurpd" >&2;}
3549    { (exit 1); exit 1; }; }
3550         fi
3551         ol_enable_slurpd="$ol_arg"
3552
3553 else
3554         ol_enable_slurpd=auto
3555 fi;
3556 # end --enable-slurpd
3557
3558 # Check whether --enable-xxliboptions or --disable-xxliboptions was given.
3559 if test "${enable_xxliboptions+set}" = set; then
3560   enableval="$enable_xxliboptions"
3561
3562 fi;
3563 # Check whether --enable-static or --disable-static was given.
3564 if test "${enable_static+set}" = set; then
3565   enableval="$enable_static"
3566   p=${PACKAGE-default}
3567     case $enableval in
3568     yes) enable_static=yes ;;
3569     no) enable_static=no ;;
3570     *)
3571      enable_static=no
3572       # Look at the argument we got.  We use all the common list separators.
3573       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3574       for pkg in $enableval; do
3575         IFS="$lt_save_ifs"
3576         if test "X$pkg" = "X$p"; then
3577           enable_static=yes
3578         fi
3579       done
3580       IFS="$lt_save_ifs"
3581       ;;
3582     esac
3583 else
3584   enable_static=yes
3585 fi;
3586
3587 # Check whether --enable-shared or --disable-shared was given.
3588 if test "${enable_shared+set}" = set; then
3589   enableval="$enable_shared"
3590   p=${PACKAGE-default}
3591     case $enableval in
3592     yes) enable_shared=yes ;;
3593     no) enable_shared=no ;;
3594     *)
3595       enable_shared=no
3596       # Look at the argument we got.  We use all the common list separators.
3597       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3598       for pkg in $enableval; do
3599         IFS="$lt_save_ifs"
3600         if test "X$pkg" = "X$p"; then
3601           enable_shared=yes
3602         fi
3603       done
3604       IFS="$lt_save_ifs"
3605       ;;
3606     esac
3607 else
3608   enable_shared=yes
3609 fi;
3610
3611
3612
3613 # validate options
3614 if test $ol_enable_slapd = no ; then
3615                 if test $ol_enable_slapi = yes ; then
3616                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-slapi argument" >&5
3617 echo "$as_me: WARNING: slapd disabled, ignoring --enable-slapi argument" >&2;}
3618         fi
3619         case "$ol_enable_backends" in yes | mod)
3620                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-backends argument" >&5
3621 echo "$as_me: WARNING: slapd disabled, ignoring --enable-backends argument" >&2;}
3622         esac
3623         for i in $Backends; do
3624                 eval "ol_tmp=\$ol_enable_$i"
3625                 if test $ol_tmp != no ; then
3626                         { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
3627 echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
3628                         eval "ol_enable_$i=no"
3629                 fi
3630         done
3631         if test $ol_enable_modules = yes ; then
3632                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-modules argument" >&5
3633 echo "$as_me: WARNING: slapd disabled, ignoring --enable-modules argument" >&2;}
3634         fi
3635         if test $ol_enable_wrappers = yes ; then
3636                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&5
3637 echo "$as_me: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&2;}
3638         fi
3639         if test $ol_enable_rlookups = yes ; then
3640                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&5
3641 echo "$as_me: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&2;}
3642         fi
3643         if test $ol_enable_dynacl = yes ; then
3644                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&5
3645 echo "$as_me: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&2;}
3646         fi
3647         if test $ol_enable_aci != no ; then
3648                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-aci argument" >&5
3649 echo "$as_me: WARNING: slapd disabled, ignoring --enable-aci argument" >&2;}
3650         fi
3651         if test $ol_enable_slurpd = yes ; then
3652                 { { echo "$as_me:$LINENO: error: slurpd requires slapd" >&5
3653 echo "$as_me: error: slurpd requires slapd" >&2;}
3654    { (exit 1); exit 1; }; }
3655         fi
3656         if test $ol_enable_rewrite = yes ; then
3657                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&5
3658 echo "$as_me: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&2;}
3659         fi
3660                 case "$ol_enable_overlays" in yes | mod)
3661                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-overlays argument" >&5
3662 echo "$as_me: WARNING: slapd disabled, ignoring --enable-overlays argument" >&2;}
3663         esac
3664         for i in $Overlays; do
3665                 eval "ol_tmp=\$ol_enable_$i"
3666                 if test $ol_tmp != no ; then
3667                         { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
3668 echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
3669                         eval "ol_enable_$i=no"
3670                 fi
3671         done
3672
3673         # force settings to no
3674         ol_enable_slapi=no
3675
3676         ol_enable_backends=
3677         ol_enable_overlays=
3678         ol_enable_modules=no
3679         ol_enable_rlookups=no
3680         ol_enable_dynacl=no
3681         ol_enable_aci=no
3682         ol_enable_wrappers=no
3683
3684         ol_enable_slurpd=no
3685
3686         ol_enable_rewrite=no
3687
3688 elif test $ol_enable_modules != yes &&
3689         test $ol_enable_bdb = no &&
3690         test $ol_enable_dnssrv = no &&
3691         test $ol_enable_hdb = no &&
3692         test $ol_enable_ldap = no &&
3693         test $ol_enable_meta = no &&
3694         test $ol_enable_monitor = no &&
3695         test $ol_enable_null = no &&
3696         test $ol_enable_passwd = no &&
3697         test $ol_enable_perl = no &&
3698         test $ol_enable_relay = no &&
3699         test $ol_enable_shell = no &&
3700         test $ol_enable_sql = no ; then
3701
3702         if test $ol_enable_slapd = yes ; then
3703                 { { echo "$as_me:$LINENO: error: slapd requires a backend" >&5
3704 echo "$as_me: error: slapd requires a backend" >&2;}
3705    { (exit 1); exit 1; }; }
3706         else
3707                 { echo "$as_me:$LINENO: WARNING: skipping slapd, no backend specified" >&5
3708 echo "$as_me: WARNING: skipping slapd, no backend specified" >&2;}
3709                 ol_enable_slapd=no
3710         fi
3711 fi
3712
3713 if test $ol_enable_meta/$ol_enable_ldap = yes/no ; then
3714         { { echo "$as_me:$LINENO: error: --enable-meta requires --enable-ldap" >&5
3715 echo "$as_me: error: --enable-meta requires --enable-ldap" >&2;}
3716    { (exit 1); exit 1; }; }
3717 fi
3718
3719 if test $ol_enable_slurpd = yes ; then
3720                 if test $ol_with_threads = no ; then
3721                 { { echo "$as_me:$LINENO: error: slurpd requires threads" >&5
3722 echo "$as_me: error: slurpd requires threads" >&2;}
3723    { (exit 1); exit 1; }; }
3724         fi
3725 fi
3726
3727 if test $ol_enable_lmpasswd = yes ; then
3728         if test $ol_with_tls = no ; then
3729                 { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5
3730 echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;}
3731    { (exit 1); exit 1; }; }
3732         fi
3733 fi
3734
3735 if test $ol_enable_kbind = yes ; then
3736         if test $ol_with_kerberos = no ; then
3737                 { { echo "$as_me:$LINENO: error: options require --with-kerberos" >&5
3738 echo "$as_me: error: options require --with-kerberos" >&2;}
3739    { (exit 1); exit 1; }; }
3740         elif test $ol_with_kerberos = auto ; then
3741                 ol_with_kerberos=yes
3742         fi
3743
3744 elif test $ol_enable_kbind = no ; then
3745         if test $ol_with_kerberos = auto ; then
3746                 ol_with_kerberos=no
3747         elif test $ol_with_kerberos != no ; then
3748                 { echo "$as_me:$LINENO: WARNING: Kerberos detection enabled unnecessarily" >&5
3749 echo "$as_me: WARNING: Kerberos detection enabled unnecessarily" >&2;};
3750                 ol_with_kerberos=no
3751         fi
3752 fi
3753
3754 if test $ol_enable_spasswd = yes ; then
3755         if test $ol_with_cyrus_sasl = no ; then
3756                 { { echo "$as_me:$LINENO: error: options require --with-cyrus-sasl" >&5
3757 echo "$as_me: error: options require --with-cyrus-sasl" >&2;}
3758    { (exit 1); exit 1; }; }
3759         fi
3760         ol_with_cyrus_sasl=yes
3761 fi
3762
3763 echo "$as_me:$LINENO: result: done" >&5
3764 echo "${ECHO_T}done" >&6
3765
3766 LDAP_LIBS=
3767 BDB_LIBS=
3768 LTHREAD_LIBS=
3769 LUTIL_LIBS=
3770
3771 SLAPD_LIBS=
3772 SLURPD_LIBS=
3773
3774 BUILD_SLAPD=no
3775 BUILD_SLURPD=no
3776
3777 BUILD_THREAD=no
3778
3779 BUILD_SLAPI=no
3780 SLAPD_SLAPI_DEPEND=
3781
3782 BUILD_BDB=no
3783 BUILD_DNSSRV=no
3784 BUILD_HDB=no
3785 BUILD_LDAP=no
3786 BUILD_META=no
3787 BUILD_MONITOR=no
3788 BUILD_NULL=no
3789 BUILD_PASSWD=no
3790 BUILD_PERL=no
3791 BUILD_RELAY=no
3792 BUILD_SHELL=no
3793 BUILD_SQL=no
3794
3795 BUILD_ACCESSLOG=no
3796 BUILD_AUDITLOG=no
3797 BUILD_DDS=no
3798 BUILD_DENYOP=no
3799 BUILD_DYNGROUP=no
3800 BUILD_DYNLIST=no
3801 BUILD_LASTMOD=no
3802 BUILD_PPOLICY=no
3803 BUILD_PROXYCACHE=no
3804 BUILD_REFINT=no
3805 BUILD_RETCODE=no
3806 BUILD_RWM=no
3807 BUILD_SEQMOD=no
3808 BUILD_SYNCPROV=no
3809 BUILD_TRANSLUCENT=no
3810 BUILD_UNIQUE=no
3811 BUILD_VALSORT=no
3812
3813 SLAPD_STATIC_OVERLAYS=
3814 SLAPD_DYNAMIC_OVERLAYS=
3815
3816 SLAPD_MODULES_LDFLAGS=
3817 SLAPD_MODULES_CPPFLAGS=
3818
3819 SLAPD_STATIC_BACKENDS=back-ldif
3820 SLAPD_DYNAMIC_BACKENDS=
3821
3822 SLAPD_PERL_LDFLAGS=
3823 MOD_PERL_LDFLAGS=
3824 PERL_CPPFLAGS=
3825
3826 SLAPD_SQL_LDFLAGS=
3827 SLAPD_SQL_LIBS=
3828 SLAPD_SQL_INCLUDES=
3829
3830 KRB4_LIBS=
3831 KRB5_LIBS=
3832 SASL_LIBS=
3833 TLS_LIBS=
3834 MODULES_LIBS=
3835 SLAPI_LIBS=
3836 LIBSLAPI=
3837 LIBSLAPITOOLS=
3838 AUTH_LIBS=
3839 ICU_LIBS=
3840
3841 SLAPD_SLP_LIBS=
3842 SLAPD_GMP_LIBS=
3843
3844
3845
3846 cat >>confdefs.h <<\_ACEOF
3847 #define HAVE_MKVERSION 1
3848 _ACEOF
3849
3850
3851
3852
3853 ol_aix_threads=no
3854 case "$target" in
3855 *-*-aix*)       if test -z "$CC" ; then
3856                 case "$ol_with_threads" in
3857                 auto | yes |  posix) ol_aix_threads=yes ;;
3858                 esac
3859         fi
3860 ;;
3861 esac
3862
3863 if test $ol_aix_threads = yes ; then
3864         if test -z "${CC}" ; then
3865                 for ac_prog in cc_r xlc_r cc
3866 do
3867   # Extract the first word of "$ac_prog", so it can be a program name with args.
3868 set dummy $ac_prog; ac_word=$2
3869 echo "$as_me:$LINENO: checking for $ac_word" >&5
3870 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3871 if test "${ac_cv_prog_CC+set}" = set; then
3872   echo $ECHO_N "(cached) $ECHO_C" >&6
3873 else
3874   if test -n "$CC"; then
3875   ac_cv_prog_CC="$CC" # Let the user override the test.
3876 else
3877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3878 for as_dir in $PATH
3879 do
3880   IFS=$as_save_IFS
3881   test -z "$as_dir" && as_dir=.
3882   for ac_exec_ext in '' $ac_executable_extensions; do
3883   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3884     ac_cv_prog_CC="$ac_prog"
3885     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3886     break 2
3887   fi
3888 done
3889 done
3890
3891 fi
3892 fi
3893 CC=$ac_cv_prog_CC
3894 if test -n "$CC"; then
3895   echo "$as_me:$LINENO: result: $CC" >&5
3896 echo "${ECHO_T}$CC" >&6
3897 else
3898   echo "$as_me:$LINENO: result: no" >&5
3899 echo "${ECHO_T}no" >&6
3900 fi
3901
3902   test -n "$CC" && break
3903 done
3904
3905
3906                 if test "$CC" = cc ; then
3907                                                 if test $ol_with_threads != auto ; then
3908                                 { { echo "$as_me:$LINENO: error: --with-threads requires cc_r (or other suitable compiler) on AIX" >&5
3909 echo "$as_me: error: --with-threads requires cc_r (or other suitable compiler) on AIX" >&2;}
3910    { (exit 1); exit 1; }; }
3911                         else
3912                                 { echo "$as_me:$LINENO: WARNING: disabling threads, no cc_r on AIX" >&5
3913 echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
3914                         fi
3915                         ol_with_threads=no
3916                 fi
3917         fi
3918
3919         case ${CC} in cc_r | xlc_r)
3920                 ol_with_threads=posix
3921                 ol_cv_pthread_create=yes
3922                 ;;
3923         esac
3924 fi
3925
3926 if test -z "${CC}"; then
3927         for ac_prog in cc gcc
3928 do
3929   # Extract the first word of "$ac_prog", so it can be a program name with args.
3930 set dummy $ac_prog; ac_word=$2
3931 echo "$as_me:$LINENO: checking for $ac_word" >&5
3932 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3933 if test "${ac_cv_prog_CC+set}" = set; then
3934   echo $ECHO_N "(cached) $ECHO_C" >&6
3935 else
3936   if test -n "$CC"; then
3937   ac_cv_prog_CC="$CC" # Let the user override the test.
3938 else
3939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3940 for as_dir in $PATH
3941 do
3942   IFS=$as_save_IFS
3943   test -z "$as_dir" && as_dir=.
3944   for ac_exec_ext in '' $ac_executable_extensions; do
3945   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3946     ac_cv_prog_CC="$ac_prog"
3947     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3948     break 2
3949   fi
3950 done
3951 done
3952
3953 fi
3954 fi
3955 CC=$ac_cv_prog_CC
3956 if test -n "$CC"; then
3957   echo "$as_me:$LINENO: result: $CC" >&5
3958 echo "${ECHO_T}$CC" >&6
3959 else
3960   echo "$as_me:$LINENO: result: no" >&5
3961 echo "${ECHO_T}no" >&6
3962 fi
3963
3964   test -n "$CC" && break
3965 done
3966 test -n "$CC" || CC="missing"
3967
3968
3969         if test "${CC}" = "missing" ; then
3970                 { { echo "$as_me:$LINENO: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." >&5
3971 echo "$as_me: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." >&2;}
3972    { (exit 1); exit 1; }; }
3973         fi
3974 fi
3975
3976 if test -z "${AR}"; then
3977         for ac_prog in ar gar
3978 do
3979   # Extract the first word of "$ac_prog", so it can be a program name with args.
3980 set dummy $ac_prog; ac_word=$2
3981 echo "$as_me:$LINENO: checking for $ac_word" >&5
3982 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3983 if test "${ac_cv_prog_AR+set}" = set; then
3984   echo $ECHO_N "(cached) $ECHO_C" >&6
3985 else
3986   if test -n "$AR"; then
3987   ac_cv_prog_AR="$AR" # Let the user override the test.
3988 else
3989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3990 for as_dir in $PATH
3991 do
3992   IFS=$as_save_IFS
3993   test -z "$as_dir" && as_dir=.
3994   for ac_exec_ext in '' $ac_executable_extensions; do
3995   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3996     ac_cv_prog_AR="$ac_prog"
3997     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3998     break 2
3999   fi
4000 done
4001 done
4002
4003 fi
4004 fi
4005 AR=$ac_cv_prog_AR
4006 if test -n "$AR"; then
4007   echo "$as_me:$LINENO: result: $AR" >&5
4008 echo "${ECHO_T}$AR" >&6
4009 else
4010   echo "$as_me:$LINENO: result: no" >&5
4011 echo "${ECHO_T}no" >&6
4012 fi
4013
4014   test -n "$AR" && break
4015 done
4016 test -n "$AR" || AR="missing"
4017
4018
4019         if test "${AR}" = "missing" ; then
4020                 { { echo "$as_me:$LINENO: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." >&5
4021 echo "$as_me: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." >&2;}
4022    { (exit 1); exit 1; }; }
4023         fi
4024 fi
4025
4026
4027
4028
4029
4030 # Check whether --enable-fast-install or --disable-fast-install was given.
4031 if test "${enable_fast_install+set}" = set; then
4032   enableval="$enable_fast_install"
4033   p=${PACKAGE-default}
4034     case $enableval in
4035     yes) enable_fast_install=yes ;;
4036     no) enable_fast_install=no ;;
4037     *)
4038       enable_fast_install=no
4039       # Look at the argument we got.  We use all the common list separators.
4040       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4041       for pkg in $enableval; do
4042         IFS="$lt_save_ifs"
4043         if test "X$pkg" = "X$p"; then
4044           enable_fast_install=yes
4045         fi
4046       done
4047       IFS="$lt_save_ifs"
4048       ;;
4049     esac
4050 else
4051   enable_fast_install=yes
4052 fi;
4053
4054 DEPDIR="${am__leading_dot}deps"
4055
4056           ac_config_commands="$ac_config_commands depfiles"
4057
4058
4059 am_make=${MAKE-make}
4060 cat > confinc << 'END'
4061 am__doit:
4062         @echo done
4063 .PHONY: am__doit
4064 END
4065 # If we don't find an include directive, just comment out the code.
4066 echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
4067 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
4068 am__include="#"
4069 am__quote=
4070 _am_result=none
4071 # First try GNU make style include.
4072 echo "include confinc" > confmf
4073 # We grep out `Entering directory' and `Leaving directory'
4074 # messages which can occur if `w' ends up in MAKEFLAGS.
4075 # In particular we don't look at `^make:' because GNU make might
4076 # be invoked under some other name (usually "gmake"), in which
4077 # case it prints its new name instead of `make'.
4078 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
4079    am__include=include
4080    am__quote=
4081    _am_result=GNU
4082 fi
4083 # Now try BSD make style include.
4084 if test "$am__include" = "#"; then
4085    echo '.include "confinc"' > confmf
4086    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
4087       am__include=.include
4088       am__quote="\""
4089       _am_result=BSD
4090    fi
4091 fi
4092
4093
4094 echo "$as_me:$LINENO: result: $_am_result" >&5
4095 echo "${ECHO_T}$_am_result" >&6
4096 rm -f confinc confmf
4097
4098 # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
4099 if test "${enable_dependency_tracking+set}" = set; then
4100   enableval="$enable_dependency_tracking"
4101
4102 fi;
4103 if test "x$enable_dependency_tracking" != xno; then
4104   am_depcomp="$ac_aux_dir/depcomp"
4105   AMDEPBACKSLASH='\'
4106 fi
4107
4108
4109 if test "x$enable_dependency_tracking" != xno; then
4110   AMDEP_TRUE=
4111   AMDEP_FALSE='#'
4112 else
4113   AMDEP_TRUE='#'
4114   AMDEP_FALSE=
4115 fi
4116
4117
4118
4119 ac_ext=c
4120 ac_cpp='$CPP $CPPFLAGS'
4121 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4122 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4123 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4124 if test -n "$ac_tool_prefix"; then
4125   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4126 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4127 echo "$as_me:$LINENO: checking for $ac_word" >&5
4128 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4129 if test "${ac_cv_prog_CC+set}" = set; then
4130   echo $ECHO_N "(cached) $ECHO_C" >&6
4131 else
4132   if test -n "$CC"; then
4133   ac_cv_prog_CC="$CC" # Let the user override the test.
4134 else
4135 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4136 for as_dir in $PATH
4137 do
4138   IFS=$as_save_IFS
4139   test -z "$as_dir" && as_dir=.
4140   for ac_exec_ext in '' $ac_executable_extensions; do
4141   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4142     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4143     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4144     break 2
4145   fi
4146 done
4147 done
4148
4149 fi
4150 fi
4151 CC=$ac_cv_prog_CC
4152 if test -n "$CC"; then
4153   echo "$as_me:$LINENO: result: $CC" >&5
4154 echo "${ECHO_T}$CC" >&6
4155 else
4156   echo "$as_me:$LINENO: result: no" >&5
4157 echo "${ECHO_T}no" >&6
4158 fi
4159
4160 fi
4161 if test -z "$ac_cv_prog_CC"; then
4162   ac_ct_CC=$CC
4163   # Extract the first word of "gcc", so it can be a program name with args.
4164 set dummy gcc; ac_word=$2
4165 echo "$as_me:$LINENO: checking for $ac_word" >&5
4166 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4167 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4168   echo $ECHO_N "(cached) $ECHO_C" >&6
4169 else
4170   if test -n "$ac_ct_CC"; then
4171   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4172 else
4173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4174 for as_dir in $PATH
4175 do
4176   IFS=$as_save_IFS
4177   test -z "$as_dir" && as_dir=.
4178   for ac_exec_ext in '' $ac_executable_extensions; do
4179   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4180     ac_cv_prog_ac_ct_CC="gcc"
4181     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4182     break 2
4183   fi
4184 done
4185 done
4186
4187 fi
4188 fi
4189 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4190 if test -n "$ac_ct_CC"; then
4191   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4192 echo "${ECHO_T}$ac_ct_CC" >&6
4193 else
4194   echo "$as_me:$LINENO: result: no" >&5
4195 echo "${ECHO_T}no" >&6
4196 fi
4197
4198   CC=$ac_ct_CC
4199 else
4200   CC="$ac_cv_prog_CC"
4201 fi
4202
4203 if test -z "$CC"; then
4204   if test -n "$ac_tool_prefix"; then
4205   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4206 set dummy ${ac_tool_prefix}cc; ac_word=$2
4207 echo "$as_me:$LINENO: checking for $ac_word" >&5
4208 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4209 if test "${ac_cv_prog_CC+set}" = set; then
4210   echo $ECHO_N "(cached) $ECHO_C" >&6
4211 else
4212   if test -n "$CC"; then
4213   ac_cv_prog_CC="$CC" # Let the user override the test.
4214 else
4215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4216 for as_dir in $PATH
4217 do
4218   IFS=$as_save_IFS
4219   test -z "$as_dir" && as_dir=.
4220   for ac_exec_ext in '' $ac_executable_extensions; do
4221   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4222     ac_cv_prog_CC="${ac_tool_prefix}cc"
4223     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4224     break 2
4225   fi
4226 done
4227 done
4228
4229 fi
4230 fi
4231 CC=$ac_cv_prog_CC
4232 if test -n "$CC"; then
4233   echo "$as_me:$LINENO: result: $CC" >&5
4234 echo "${ECHO_T}$CC" >&6
4235 else
4236   echo "$as_me:$LINENO: result: no" >&5
4237 echo "${ECHO_T}no" >&6
4238 fi
4239
4240 fi
4241 if test -z "$ac_cv_prog_CC"; then
4242   ac_ct_CC=$CC
4243   # Extract the first word of "cc", so it can be a program name with args.
4244 set dummy cc; ac_word=$2
4245 echo "$as_me:$LINENO: checking for $ac_word" >&5
4246 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4247 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4248   echo $ECHO_N "(cached) $ECHO_C" >&6
4249 else
4250   if test -n "$ac_ct_CC"; then
4251   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4252 else
4253 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4254 for as_dir in $PATH
4255 do
4256   IFS=$as_save_IFS
4257   test -z "$as_dir" && as_dir=.
4258   for ac_exec_ext in '' $ac_executable_extensions; do
4259   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4260     ac_cv_prog_ac_ct_CC="cc"
4261     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4262     break 2
4263   fi
4264 done
4265 done
4266
4267 fi
4268 fi
4269 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4270 if test -n "$ac_ct_CC"; then
4271   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4272 echo "${ECHO_T}$ac_ct_CC" >&6
4273 else
4274   echo "$as_me:$LINENO: result: no" >&5
4275 echo "${ECHO_T}no" >&6
4276 fi
4277
4278   CC=$ac_ct_CC
4279 else
4280   CC="$ac_cv_prog_CC"
4281 fi
4282
4283 fi
4284 if test -z "$CC"; then
4285   # Extract the first word of "cc", so it can be a program name with args.
4286 set dummy cc; ac_word=$2
4287 echo "$as_me:$LINENO: checking for $ac_word" >&5
4288 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4289 if test "${ac_cv_prog_CC+set}" = set; then
4290   echo $ECHO_N "(cached) $ECHO_C" >&6
4291 else
4292   if test -n "$CC"; then
4293   ac_cv_prog_CC="$CC" # Let the user override the test.
4294 else
4295   ac_prog_rejected=no
4296 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4297 for as_dir in $PATH
4298 do
4299   IFS=$as_save_IFS
4300   test -z "$as_dir" && as_dir=.
4301   for ac_exec_ext in '' $ac_executable_extensions; do
4302   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4303     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4304        ac_prog_rejected=yes
4305        continue
4306      fi
4307     ac_cv_prog_CC="cc"
4308     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4309     break 2
4310   fi
4311 done
4312 done
4313
4314 if test $ac_prog_rejected = yes; then
4315   # We found a bogon in the path, so make sure we never use it.
4316   set dummy $ac_cv_prog_CC
4317   shift
4318   if test $# != 0; then
4319     # We chose a different compiler from the bogus one.
4320     # However, it has the same basename, so the bogon will be chosen
4321     # first if we set CC to just the basename; use the full file name.
4322     shift
4323     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4324   fi
4325 fi
4326 fi
4327 fi
4328 CC=$ac_cv_prog_CC
4329 if test -n "$CC"; then
4330   echo "$as_me:$LINENO: result: $CC" >&5
4331 echo "${ECHO_T}$CC" >&6
4332 else
4333   echo "$as_me:$LINENO: result: no" >&5
4334 echo "${ECHO_T}no" >&6
4335 fi
4336
4337 fi
4338 if test -z "$CC"; then
4339   if test -n "$ac_tool_prefix"; then
4340   for ac_prog in cl
4341   do
4342     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4343 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4344 echo "$as_me:$LINENO: checking for $ac_word" >&5
4345 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4346 if test "${ac_cv_prog_CC+set}" = set; then
4347   echo $ECHO_N "(cached) $ECHO_C" >&6
4348 else
4349   if test -n "$CC"; then
4350   ac_cv_prog_CC="$CC" # Let the user override the test.
4351 else
4352 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4353 for as_dir in $PATH
4354 do
4355   IFS=$as_save_IFS
4356   test -z "$as_dir" && as_dir=.
4357   for ac_exec_ext in '' $ac_executable_extensions; do
4358   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4359     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4360     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4361     break 2
4362   fi
4363 done
4364 done
4365
4366 fi
4367 fi
4368 CC=$ac_cv_prog_CC
4369 if test -n "$CC"; then
4370   echo "$as_me:$LINENO: result: $CC" >&5
4371 echo "${ECHO_T}$CC" >&6
4372 else
4373   echo "$as_me:$LINENO: result: no" >&5
4374 echo "${ECHO_T}no" >&6
4375 fi
4376
4377     test -n "$CC" && break
4378   done
4379 fi
4380 if test -z "$CC"; then
4381   ac_ct_CC=$CC
4382   for ac_prog in cl
4383 do
4384   # Extract the first word of "$ac_prog", so it can be a program name with args.
4385 set dummy $ac_prog; ac_word=$2
4386 echo "$as_me:$LINENO: checking for $ac_word" >&5
4387 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4388 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4389   echo $ECHO_N "(cached) $ECHO_C" >&6
4390 else
4391   if test -n "$ac_ct_CC"; then
4392   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4393 else
4394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4395 for as_dir in $PATH
4396 do
4397   IFS=$as_save_IFS
4398   test -z "$as_dir" && as_dir=.
4399   for ac_exec_ext in '' $ac_executable_extensions; do
4400   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4401     ac_cv_prog_ac_ct_CC="$ac_prog"
4402     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4403     break 2
4404   fi
4405 done
4406 done
4407
4408 fi
4409 fi
4410 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4411 if test -n "$ac_ct_CC"; then
4412   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4413 echo "${ECHO_T}$ac_ct_CC" >&6
4414 else
4415   echo "$as_me:$LINENO: result: no" >&5
4416 echo "${ECHO_T}no" >&6
4417 fi
4418
4419   test -n "$ac_ct_CC" && break
4420 done
4421
4422   CC=$ac_ct_CC
4423 fi
4424
4425 fi
4426
4427
4428 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
4429 See \`config.log' for more details." >&5
4430 echo "$as_me: error: no acceptable C compiler found in \$PATH
4431 See \`config.log' for more details." >&2;}
4432    { (exit 1); exit 1; }; }
4433
4434 # Provide some information about the compiler.
4435 echo "$as_me:$LINENO:" \
4436      "checking for C compiler version" >&5
4437 ac_compiler=`set X $ac_compile; echo $2`
4438 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
4439   (eval $ac_compiler --version </dev/null >&5) 2>&5
4440   ac_status=$?
4441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4442   (exit $ac_status); }
4443 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
4444   (eval $ac_compiler -v </dev/null >&5) 2>&5
4445   ac_status=$?
4446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4447   (exit $ac_status); }
4448 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
4449   (eval $ac_compiler -V </dev/null >&5) 2>&5
4450   ac_status=$?
4451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4452   (exit $ac_status); }
4453
4454 cat >conftest.$ac_ext <<_ACEOF
4455 /* confdefs.h.  */
4456 _ACEOF
4457 cat confdefs.h >>conftest.$ac_ext
4458 cat >>conftest.$ac_ext <<_ACEOF
4459 /* end confdefs.h.  */
4460
4461 int
4462 main ()
4463 {
4464
4465   ;
4466   return 0;
4467 }
4468 _ACEOF
4469 ac_clean_files_save=$ac_clean_files
4470 ac_clean_files="$ac_clean_files a.out a.exe b.out"
4471 # Try to create an executable without -o first, disregard a.out.
4472 # It will help us diagnose broken compilers, and finding out an intuition
4473 # of exeext.
4474 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
4475 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
4476 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4477 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
4478   (eval $ac_link_default) 2>&5
4479   ac_status=$?
4480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4481   (exit $ac_status); }; then
4482   # Find the output, starting from the most likely.  This scheme is
4483 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
4484 # resort.
4485
4486 # Be careful to initialize this variable, since it used to be cached.
4487 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
4488 ac_cv_exeext=
4489 # b.out is created by i960 compilers.
4490 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
4491 do
4492   test -f "$ac_file" || continue
4493   case $ac_file in
4494     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
4495         ;;
4496     conftest.$ac_ext )
4497         # This is the source file.
4498         ;;
4499     [ab].out )
4500         # We found the default executable, but exeext='' is most
4501         # certainly right.
4502         break;;
4503     *.* )
4504         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4505         # FIXME: I believe we export ac_cv_exeext for Libtool,
4506         # but it would be cool to find out if it's true.  Does anybody
4507         # maintain Libtool? --akim.
4508         export ac_cv_exeext
4509         break;;
4510     * )
4511         break;;
4512   esac
4513 done
4514 else
4515   echo "$as_me: failed program was:" >&5
4516 sed 's/^/| /' conftest.$ac_ext >&5
4517
4518 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
4519 See \`config.log' for more details." >&5
4520 echo "$as_me: error: C compiler cannot create executables
4521 See \`config.log' for more details." >&2;}
4522    { (exit 77); exit 77; }; }
4523 fi
4524
4525 ac_exeext=$ac_cv_exeext
4526 echo "$as_me:$LINENO: result: $ac_file" >&5
4527 echo "${ECHO_T}$ac_file" >&6
4528
4529 # Check the compiler produces executables we can run.  If not, either
4530 # the compiler is broken, or we cross compile.
4531 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
4532 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
4533 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
4534 # If not cross compiling, check that we can run a simple program.
4535 if test "$cross_compiling" != yes; then
4536   if { ac_try='./$ac_file'
4537   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4538   (eval $ac_try) 2>&5
4539   ac_status=$?
4540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4541   (exit $ac_status); }; }; then
4542     cross_compiling=no
4543   else
4544     if test "$cross_compiling" = maybe; then
4545         cross_compiling=yes
4546     else
4547         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
4548 If you meant to cross compile, use \`--host'.
4549 See \`config.log' for more details." >&5
4550 echo "$as_me: error: cannot run C compiled programs.
4551 If you meant to cross compile, use \`--host'.
4552 See \`config.log' for more details." >&2;}
4553    { (exit 1); exit 1; }; }
4554     fi
4555   fi
4556 fi
4557 echo "$as_me:$LINENO: result: yes" >&5
4558 echo "${ECHO_T}yes" >&6
4559
4560 rm -f a.out a.exe conftest$ac_cv_exeext b.out
4561 ac_clean_files=$ac_clean_files_save
4562 # Check the compiler produces executables we can run.  If not, either
4563 # the compiler is broken, or we cross compile.
4564 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
4565 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
4566 echo "$as_me:$LINENO: result: $cross_compiling" >&5
4567 echo "${ECHO_T}$cross_compiling" >&6
4568
4569 echo "$as_me:$LINENO: checking for suffix of executables" >&5
4570 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
4571 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4572   (eval $ac_link) 2>&5
4573   ac_status=$?
4574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4575   (exit $ac_status); }; then
4576   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4577 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4578 # work properly (i.e., refer to `conftest.exe'), while it won't with
4579 # `rm'.
4580 for ac_file in conftest.exe conftest conftest.*; do
4581   test -f "$ac_file" || continue
4582   case $ac_file in
4583     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
4584     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4585           export ac_cv_exeext
4586           break;;
4587     * ) break;;
4588   esac
4589 done
4590 else
4591   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
4592 See \`config.log' for more details." >&5
4593 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
4594 See \`config.log' for more details." >&2;}
4595    { (exit 1); exit 1; }; }
4596 fi
4597
4598 rm -f conftest$ac_cv_exeext
4599 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
4600 echo "${ECHO_T}$ac_cv_exeext" >&6
4601
4602 rm -f conftest.$ac_ext
4603 EXEEXT=$ac_cv_exeext
4604 ac_exeext=$EXEEXT
4605 echo "$as_me:$LINENO: checking for suffix of object files" >&5
4606 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
4607 if test "${ac_cv_objext+set}" = set; then
4608   echo $ECHO_N "(cached) $ECHO_C" >&6
4609 else
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 rm -f conftest.o conftest.obj
4626 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4627   (eval $ac_compile) 2>&5
4628   ac_status=$?
4629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4630   (exit $ac_status); }; then
4631   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
4632   case $ac_file in
4633     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
4634     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4635        break;;
4636   esac
4637 done
4638 else
4639   echo "$as_me: failed program was:" >&5
4640 sed 's/^/| /' conftest.$ac_ext >&5
4641
4642 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
4643 See \`config.log' for more details." >&5
4644 echo "$as_me: error: cannot compute suffix of object files: cannot compile
4645 See \`config.log' for more details." >&2;}
4646    { (exit 1); exit 1; }; }
4647 fi
4648
4649 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4650 fi
4651 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
4652 echo "${ECHO_T}$ac_cv_objext" >&6
4653 OBJEXT=$ac_cv_objext
4654 ac_objext=$OBJEXT
4655 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
4656 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
4657 if test "${ac_cv_c_compiler_gnu+set}" = set; then
4658   echo $ECHO_N "(cached) $ECHO_C" >&6
4659 else
4660   cat >conftest.$ac_ext <<_ACEOF
4661 /* confdefs.h.  */
4662 _ACEOF
4663 cat confdefs.h >>conftest.$ac_ext
4664 cat >>conftest.$ac_ext <<_ACEOF
4665 /* end confdefs.h.  */
4666
4667 int
4668 main ()
4669 {
4670 #ifndef __GNUC__
4671        choke me
4672 #endif
4673
4674   ;
4675   return 0;
4676 }
4677 _ACEOF
4678 rm -f conftest.$ac_objext
4679 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4680   (eval $ac_compile) 2>conftest.er1
4681   ac_status=$?
4682   grep -v '^ *+' conftest.er1 >conftest.err
4683   rm -f conftest.er1
4684   cat conftest.err >&5
4685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4686   (exit $ac_status); } &&
4687          { ac_try='test -z "$ac_c_werror_flag"
4688                          || test ! -s conftest.err'
4689   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4690   (eval $ac_try) 2>&5
4691   ac_status=$?
4692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4693   (exit $ac_status); }; } &&
4694          { ac_try='test -s conftest.$ac_objext'
4695   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4696   (eval $ac_try) 2>&5
4697   ac_status=$?
4698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4699   (exit $ac_status); }; }; then
4700   ac_compiler_gnu=yes
4701 else
4702   echo "$as_me: failed program was:" >&5
4703 sed 's/^/| /' conftest.$ac_ext >&5
4704
4705 ac_compiler_gnu=no
4706 fi
4707 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4708 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4709
4710 fi
4711 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
4712 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
4713 GCC=`test $ac_compiler_gnu = yes && echo yes`
4714 ac_test_CFLAGS=${CFLAGS+set}
4715 ac_save_CFLAGS=$CFLAGS
4716 CFLAGS="-g"
4717 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
4718 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
4719 if test "${ac_cv_prog_cc_g+set}" = set; then
4720   echo $ECHO_N "(cached) $ECHO_C" >&6
4721 else
4722   cat >conftest.$ac_ext <<_ACEOF
4723 /* confdefs.h.  */
4724 _ACEOF
4725 cat confdefs.h >>conftest.$ac_ext
4726 cat >>conftest.$ac_ext <<_ACEOF
4727 /* end confdefs.h.  */
4728
4729 int
4730 main ()
4731 {
4732
4733   ;
4734   return 0;
4735 }
4736 _ACEOF
4737 rm -f conftest.$ac_objext
4738 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4739   (eval $ac_compile) 2>conftest.er1
4740   ac_status=$?
4741   grep -v '^ *+' conftest.er1 >conftest.err
4742   rm -f conftest.er1
4743   cat conftest.err >&5
4744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4745   (exit $ac_status); } &&
4746          { ac_try='test -z "$ac_c_werror_flag"
4747                          || test ! -s conftest.err'
4748   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4749   (eval $ac_try) 2>&5
4750   ac_status=$?
4751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4752   (exit $ac_status); }; } &&
4753          { ac_try='test -s conftest.$ac_objext'
4754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4755   (eval $ac_try) 2>&5
4756   ac_status=$?
4757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4758   (exit $ac_status); }; }; then
4759   ac_cv_prog_cc_g=yes
4760 else
4761   echo "$as_me: failed program was:" >&5
4762 sed 's/^/| /' conftest.$ac_ext >&5
4763
4764 ac_cv_prog_cc_g=no
4765 fi
4766 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4767 fi
4768 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
4769 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
4770 if test "$ac_test_CFLAGS" = set; then
4771   CFLAGS=$ac_save_CFLAGS
4772 elif test $ac_cv_prog_cc_g = yes; then
4773   if test "$GCC" = yes; then
4774     CFLAGS="-g -O2"
4775   else
4776     CFLAGS="-g"
4777   fi
4778 else
4779   if test "$GCC" = yes; then
4780     CFLAGS="-O2"
4781   else
4782     CFLAGS=
4783   fi
4784 fi
4785 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
4786 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
4787 if test "${ac_cv_prog_cc_stdc+set}" = set; then
4788   echo $ECHO_N "(cached) $ECHO_C" >&6
4789 else
4790   ac_cv_prog_cc_stdc=no
4791 ac_save_CC=$CC
4792 cat >conftest.$ac_ext <<_ACEOF
4793 /* confdefs.h.  */
4794 _ACEOF
4795 cat confdefs.h >>conftest.$ac_ext
4796 cat >>conftest.$ac_ext <<_ACEOF
4797 /* end confdefs.h.  */
4798 #include <stdarg.h>
4799 #include <stdio.h>
4800 #include <sys/types.h>
4801 #include <sys/stat.h>
4802 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4803 struct buf { int x; };
4804 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4805 static char *e (p, i)
4806      char **p;
4807      int i;
4808 {
4809   return p[i];
4810 }
4811 static char *f (char * (*g) (char **, int), char **p, ...)
4812 {
4813   char *s;
4814   va_list v;
4815   va_start (v,p);
4816   s = g (p, va_arg (v,int));
4817   va_end (v);
4818   return s;
4819 }
4820
4821 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4822    function prototypes and stuff, but not '\xHH' hex character constants.
4823    These don't provoke an error unfortunately, instead are silently treated
4824    as 'x'.  The following induces an error, until -std1 is added to get
4825    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4826    array size at least.  It's necessary to write '\x00'==0 to get something
4827    that's true only with -std1.  */
4828 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4829
4830 int test (int i, double x);
4831 struct s1 {int (*f) (int a);};
4832 struct s2 {int (*f) (double a);};
4833 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4834 int argc;
4835 char **argv;
4836 int
4837 main ()
4838 {
4839 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4840   ;
4841   return 0;
4842 }
4843 _ACEOF
4844 # Don't try gcc -ansi; that turns off useful extensions and
4845 # breaks some systems' header files.
4846 # AIX                   -qlanglvl=ansi
4847 # Ultrix and OSF/1      -std1
4848 # HP-UX 10.20 and later -Ae
4849 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4850 # SVR4                  -Xc -D__EXTENSIONS__
4851 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4852 do
4853   CC="$ac_save_CC $ac_arg"
4854   rm -f conftest.$ac_objext
4855 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4856   (eval $ac_compile) 2>conftest.er1
4857   ac_status=$?
4858   grep -v '^ *+' conftest.er1 >conftest.err
4859   rm -f conftest.er1
4860   cat conftest.err >&5
4861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4862   (exit $ac_status); } &&
4863          { ac_try='test -z "$ac_c_werror_flag"
4864                          || test ! -s conftest.err'
4865   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4866   (eval $ac_try) 2>&5
4867   ac_status=$?
4868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4869   (exit $ac_status); }; } &&
4870          { ac_try='test -s conftest.$ac_objext'
4871   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4872   (eval $ac_try) 2>&5
4873   ac_status=$?
4874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4875   (exit $ac_status); }; }; then
4876   ac_cv_prog_cc_stdc=$ac_arg
4877 break
4878 else
4879   echo "$as_me: failed program was:" >&5
4880 sed 's/^/| /' conftest.$ac_ext >&5
4881
4882 fi
4883 rm -f conftest.err conftest.$ac_objext
4884 done
4885 rm -f conftest.$ac_ext conftest.$ac_objext
4886 CC=$ac_save_CC
4887
4888 fi
4889
4890 case "x$ac_cv_prog_cc_stdc" in
4891   x|xno)
4892     echo "$as_me:$LINENO: result: none needed" >&5
4893 echo "${ECHO_T}none needed" >&6 ;;
4894   *)
4895     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
4896 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
4897     CC="$CC $ac_cv_prog_cc_stdc" ;;
4898 esac
4899
4900 # Some people use a C++ compiler to compile C.  Since we use `exit',
4901 # in C++ we need to declare it.  In case someone uses the same compiler
4902 # for both compiling C and C++ we need to have the C++ compiler decide
4903 # the declaration of exit, since it's the most demanding environment.
4904 cat >conftest.$ac_ext <<_ACEOF
4905 #ifndef __cplusplus
4906   choke me
4907 #endif
4908 _ACEOF
4909 rm -f conftest.$ac_objext
4910 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4911   (eval $ac_compile) 2>conftest.er1
4912   ac_status=$?
4913   grep -v '^ *+' conftest.er1 >conftest.err
4914   rm -f conftest.er1
4915   cat conftest.err >&5
4916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4917   (exit $ac_status); } &&
4918          { ac_try='test -z "$ac_c_werror_flag"
4919                          || test ! -s conftest.err'
4920   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4921   (eval $ac_try) 2>&5
4922   ac_status=$?
4923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4924   (exit $ac_status); }; } &&
4925          { ac_try='test -s conftest.$ac_objext'
4926   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4927   (eval $ac_try) 2>&5
4928   ac_status=$?
4929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4930   (exit $ac_status); }; }; then
4931   for ac_declaration in \
4932    '' \
4933    'extern "C" void std::exit (int) throw (); using std::exit;' \
4934    'extern "C" void std::exit (int); using std::exit;' \
4935    'extern "C" void exit (int) throw ();' \
4936    'extern "C" void exit (int);' \
4937    'void exit (int);'
4938 do
4939   cat >conftest.$ac_ext <<_ACEOF
4940 /* confdefs.h.  */
4941 _ACEOF
4942 cat confdefs.h >>conftest.$ac_ext
4943 cat >>conftest.$ac_ext <<_ACEOF
4944 /* end confdefs.h.  */
4945 $ac_declaration
4946 #include <stdlib.h>
4947 int
4948 main ()
4949 {
4950 exit (42);
4951   ;
4952   return 0;
4953 }
4954 _ACEOF
4955 rm -f conftest.$ac_objext
4956 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4957   (eval $ac_compile) 2>conftest.er1
4958   ac_status=$?
4959   grep -v '^ *+' conftest.er1 >conftest.err
4960   rm -f conftest.er1
4961   cat conftest.err >&5
4962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4963   (exit $ac_status); } &&
4964          { ac_try='test -z "$ac_c_werror_flag"
4965                          || test ! -s conftest.err'
4966   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4967   (eval $ac_try) 2>&5
4968   ac_status=$?
4969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4970   (exit $ac_status); }; } &&
4971          { ac_try='test -s conftest.$ac_objext'
4972   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4973   (eval $ac_try) 2>&5
4974   ac_status=$?
4975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4976   (exit $ac_status); }; }; then
4977   :
4978 else
4979   echo "$as_me: failed program was:" >&5
4980 sed 's/^/| /' conftest.$ac_ext >&5
4981
4982 continue
4983 fi
4984 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4985   cat >conftest.$ac_ext <<_ACEOF
4986 /* confdefs.h.  */
4987 _ACEOF
4988 cat confdefs.h >>conftest.$ac_ext
4989 cat >>conftest.$ac_ext <<_ACEOF
4990 /* end confdefs.h.  */
4991 $ac_declaration
4992 int
4993 main ()
4994 {
4995 exit (42);
4996   ;
4997   return 0;
4998 }
4999 _ACEOF
5000 rm -f conftest.$ac_objext
5001 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5002   (eval $ac_compile) 2>conftest.er1
5003   ac_status=$?
5004   grep -v '^ *+' conftest.er1 >conftest.err
5005   rm -f conftest.er1
5006   cat conftest.err >&5
5007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5008   (exit $ac_status); } &&
5009          { ac_try='test -z "$ac_c_werror_flag"
5010                          || test ! -s conftest.err'
5011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5012   (eval $ac_try) 2>&5
5013   ac_status=$?
5014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5015   (exit $ac_status); }; } &&
5016          { ac_try='test -s conftest.$ac_objext'
5017   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5018   (eval $ac_try) 2>&5
5019   ac_status=$?
5020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5021   (exit $ac_status); }; }; then
5022   break
5023 else
5024   echo "$as_me: failed program was:" >&5
5025 sed 's/^/| /' conftest.$ac_ext >&5
5026
5027 fi
5028 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5029 done
5030 rm -f conftest*
5031 if test -n "$ac_declaration"; then
5032   echo '#ifdef __cplusplus' >>confdefs.h
5033   echo $ac_declaration      >>confdefs.h
5034   echo '#endif'             >>confdefs.h
5035 fi
5036
5037 else
5038   echo "$as_me: failed program was:" >&5
5039 sed 's/^/| /' conftest.$ac_ext >&5
5040
5041 fi
5042 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5043 ac_ext=c
5044 ac_cpp='$CPP $CPPFLAGS'
5045 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5046 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5047 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5048
5049 depcc="$CC"   am_compiler_list=
5050
5051 echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
5052 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
5053 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
5054   echo $ECHO_N "(cached) $ECHO_C" >&6
5055 else
5056   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5057   # We make a subdir and do the tests there.  Otherwise we can end up
5058   # making bogus files that we don't know about and never remove.  For
5059   # instance it was reported that on HP-UX the gcc test will end up
5060   # making a dummy file named `D' -- because `-MD' means `put the output
5061   # in D'.
5062   mkdir conftest.dir
5063   # Copy depcomp to subdir because otherwise we won't find it if we're
5064   # using a relative directory.
5065   cp "$am_depcomp" conftest.dir
5066   cd conftest.dir
5067   # We will build objects and dependencies in a subdirectory because
5068   # it helps to detect inapplicable dependency modes.  For instance
5069   # both Tru64's cc and ICC support -MD to output dependencies as a
5070   # side effect of compilation, but ICC will put the dependencies in
5071   # the current directory while Tru64 will put them in the object
5072   # directory.
5073   mkdir sub
5074
5075   am_cv_CC_dependencies_compiler_type=none
5076   if test "$am_compiler_list" = ""; then
5077      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5078   fi
5079   for depmode in $am_compiler_list; do
5080     # Setup a source with many dependencies, because some compilers
5081     # like to wrap large dependency lists on column 80 (with \), and
5082     # we should not choose a depcomp mode which is confused by this.
5083     #
5084     # We need to recreate these files for each test, as the compiler may
5085     # overwrite some of them when testing with obscure command lines.
5086     # This happens at least with the AIX C compiler.
5087     : > sub/conftest.c
5088     for i in 1 2 3 4 5 6; do
5089       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5090       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5091       # Solaris 8's {/usr,}/bin/sh.
5092       touch sub/conftst$i.h
5093     done
5094     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5095
5096     case $depmode in
5097     nosideeffect)
5098       # after this tag, mechanisms are not by side-effect, so they'll
5099       # only be used when explicitly requested
5100       if test "x$enable_dependency_tracking" = xyes; then
5101         continue
5102       else
5103         break
5104       fi
5105       ;;
5106     none) break ;;
5107     esac
5108     # We check with `-c' and `-o' for the sake of the "dashmstdout"
5109     # mode.  It turns out that the SunPro C++ compiler does not properly
5110     # handle `-M -o', and we need to detect this.
5111     if depmode=$depmode \
5112        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5113        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5114        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
5115          >/dev/null 2>conftest.err &&
5116        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5117        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
5118        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5119       # icc doesn't choke on unknown options, it will just issue warnings
5120       # or remarks (even with -Werror).  So we grep stderr for any message
5121       # that says an option was ignored or not supported.
5122       # When given -MP, icc 7.0 and 7.1 complain thusly:
5123       #   icc: Command line warning: ignoring option '-M'; no argument required
5124       # The diagnosis changed in icc 8.0:
5125       #   icc: Command line remark: option '-MP' not supported
5126       if (grep 'ignoring option' conftest.err ||
5127           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5128         am_cv_CC_dependencies_compiler_type=$depmode
5129         break
5130       fi
5131     fi
5132   done
5133
5134   cd ..
5135   rm -rf conftest.dir
5136 else
5137   am_cv_CC_dependencies_compiler_type=none
5138 fi
5139
5140 fi
5141 echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
5142 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
5143 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5144
5145
5146
5147 if
5148   test "x$enable_dependency_tracking" != xno \
5149   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5150   am__fastdepCC_TRUE=
5151   am__fastdepCC_FALSE='#'
5152 else
5153   am__fastdepCC_TRUE='#'
5154   am__fastdepCC_FALSE=
5155 fi
5156
5157
5158 echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
5159 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
5160 if test "${lt_cv_path_SED+set}" = set; then
5161   echo $ECHO_N "(cached) $ECHO_C" >&6
5162 else
5163   # Loop through the user's path and test for sed and gsed.
5164 # Then use that list of sed's as ones to test for truncation.
5165 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5166 for as_dir in $PATH
5167 do
5168   IFS=$as_save_IFS
5169   test -z "$as_dir" && as_dir=.
5170   for lt_ac_prog in sed gsed; do
5171     for ac_exec_ext in '' $ac_executable_extensions; do
5172       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
5173         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
5174       fi
5175     done
5176   done
5177 done
5178 lt_ac_max=0
5179 lt_ac_count=0
5180 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
5181 # along with /bin/sed that truncates output.
5182 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
5183   test ! -f $lt_ac_sed && continue
5184   cat /dev/null > conftest.in
5185   lt_ac_count=0
5186   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
5187   # Check for GNU sed and select it if it is found.
5188   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
5189     lt_cv_path_SED=$lt_ac_sed
5190     break
5191   fi
5192   while true; do
5193     cat conftest.in conftest.in >conftest.tmp
5194     mv conftest.tmp conftest.in
5195     cp conftest.in conftest.nl
5196     echo >>conftest.nl
5197     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
5198     cmp -s conftest.out conftest.nl || break
5199     # 10000 chars as input seems more than enough
5200     test $lt_ac_count -gt 10 && break
5201     lt_ac_count=`expr $lt_ac_count + 1`
5202     if test $lt_ac_count -gt $lt_ac_max; then
5203       lt_ac_max=$lt_ac_count
5204       lt_cv_path_SED=$lt_ac_sed
5205     fi
5206   done
5207 done
5208
5209 fi
5210
5211 SED=$lt_cv_path_SED
5212 echo "$as_me:$LINENO: result: $SED" >&5
5213 echo "${ECHO_T}$SED" >&6
5214
5215 echo "$as_me:$LINENO: checking for egrep" >&5
5216 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
5217 if test "${ac_cv_prog_egrep+set}" = set; then
5218   echo $ECHO_N "(cached) $ECHO_C" >&6
5219 else
5220   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
5221     then ac_cv_prog_egrep='grep -E'
5222     else ac_cv_prog_egrep='egrep'
5223     fi
5224 fi
5225 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
5226 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
5227  EGREP=$ac_cv_prog_egrep
5228
5229
5230
5231 # Check whether --with-gnu-ld or --without-gnu-ld was given.
5232 if test "${with_gnu_ld+set}" = set; then
5233   withval="$with_gnu_ld"
5234   test "$withval" = no || with_gnu_ld=yes
5235 else
5236   with_gnu_ld=no
5237 fi;
5238 ac_prog=ld
5239 if test "$GCC" = yes; then
5240   # Check if gcc -print-prog-name=ld gives a path.
5241   echo "$as_me:$LINENO: checking for ld used by $CC" >&5
5242 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
5243   case $host in
5244   *-*-mingw*)
5245     # gcc leaves a trailing carriage return which upsets mingw
5246     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5247   *)
5248     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5249   esac
5250   case $ac_prog in
5251     # Accept absolute paths.
5252     [\\/]* | ?:[\\/]*)
5253       re_direlt='/[^/][^/]*/\.\./'
5254       # Canonicalize the pathname of ld
5255       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
5256       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5257         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
5258       done
5259       test -z "$LD" && LD="$ac_prog"
5260       ;;
5261   "")
5262     # If it fails, then pretend we aren't using GCC.
5263     ac_prog=ld
5264     ;;
5265   *)
5266     # If it is relative, then search for the first ld in PATH.
5267     with_gnu_ld=unknown
5268     ;;
5269   esac
5270 elif test "$with_gnu_ld" = yes; then
5271   echo "$as_me:$LINENO: checking for GNU ld" >&5
5272 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
5273 else
5274   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
5275 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
5276 fi
5277 if test "${lt_cv_path_LD+set}" = set; then
5278   echo $ECHO_N "(cached) $ECHO_C" >&6
5279 else
5280   if test -z "$LD"; then
5281   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5282   for ac_dir in $PATH; do
5283     IFS="$lt_save_ifs"
5284     test -z "$ac_dir" && ac_dir=.
5285     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5286       lt_cv_path_LD="$ac_dir/$ac_prog"
5287       # Check to see if the program is GNU ld.  I'd rather use --version,
5288       # but apparently some variants of GNU ld only accept -v.
5289       # Break only if it was the GNU/non-GNU ld that we prefer.
5290       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5291       *GNU* | *'with BFD'*)
5292         test "$with_gnu_ld" != no && break
5293         ;;
5294       *)
5295         test "$with_gnu_ld" != yes && break
5296         ;;
5297       esac
5298     fi
5299   done
5300   IFS="$lt_save_ifs"
5301 else
5302   lt_cv_path_LD="$LD" # Let the user override the test with a path.
5303 fi
5304 fi
5305
5306 LD="$lt_cv_path_LD"
5307 if test -n "$LD"; then
5308   echo "$as_me:$LINENO: result: $LD" >&5
5309 echo "${ECHO_T}$LD" >&6
5310 else
5311   echo "$as_me:$LINENO: result: no" >&5
5312 echo "${ECHO_T}no" >&6
5313 fi
5314 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
5315 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
5316    { (exit 1); exit 1; }; }
5317 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
5318 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
5319 if test "${lt_cv_prog_gnu_ld+set}" = set; then
5320   echo $ECHO_N "(cached) $ECHO_C" >&6
5321 else
5322   # I'd rather use --version here, but apparently some GNU lds only accept -v.
5323 case `$LD -v 2>&1 </dev/null` in
5324 *GNU* | *'with BFD'*)
5325   lt_cv_prog_gnu_ld=yes
5326   ;;
5327 *)
5328   lt_cv_prog_gnu_ld=no
5329   ;;
5330 esac
5331 fi
5332 echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
5333 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
5334 with_gnu_ld=$lt_cv_prog_gnu_ld
5335
5336
5337 echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
5338 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
5339 if test "${lt_cv_ld_reload_flag+set}" = set; then
5340   echo $ECHO_N "(cached) $ECHO_C" >&6
5341 else
5342   lt_cv_ld_reload_flag='-r'
5343 fi
5344 echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
5345 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
5346 reload_flag=$lt_cv_ld_reload_flag
5347 case $reload_flag in
5348 "" | " "*) ;;
5349 *) reload_flag=" $reload_flag" ;;
5350 esac
5351 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5352 case $host_os in
5353   darwin*)
5354     if test "$GCC" = yes; then
5355       reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
5356     else
5357       reload_cmds='$LD$reload_flag -o $output$reload_objs'
5358     fi
5359     ;;
5360 esac
5361
5362 echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
5363 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
5364 if test "${lt_cv_path_NM+set}" = set; then
5365   echo $ECHO_N "(cached) $ECHO_C" >&6
5366 else
5367   if test -n "$NM"; then
5368   # Let the user override the test.
5369   lt_cv_path_NM="$NM"
5370 else
5371   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5372   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
5373     IFS="$lt_save_ifs"
5374     test -z "$ac_dir" && ac_dir=.
5375     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
5376     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5377       # Check to see if the nm accepts a BSD-compat flag.
5378       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5379       #   nm: unknown option "B" ignored
5380       # Tru64's nm complains that /dev/null is an invalid object file
5381       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5382       */dev/null* | *'Invalid file or object type'*)
5383         lt_cv_path_NM="$tmp_nm -B"
5384         break
5385         ;;
5386       *)
5387         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5388         */dev/null*)
5389           lt_cv_path_NM="$tmp_nm -p"
5390           break
5391           ;;
5392         *)
5393           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5394           continue # so that we can try to find one that supports BSD flags
5395           ;;
5396         esac
5397       esac
5398     fi
5399   done
5400   IFS="$lt_save_ifs"
5401   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
5402 fi
5403 fi
5404 echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
5405 echo "${ECHO_T}$lt_cv_path_NM" >&6
5406 NM="$lt_cv_path_NM"
5407
5408 echo "$as_me:$LINENO: checking whether ln -s works" >&5
5409 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
5410 LN_S=$as_ln_s
5411 if test "$LN_S" = "ln -s"; then
5412   echo "$as_me:$LINENO: result: yes" >&5
5413 echo "${ECHO_T}yes" >&6
5414 else
5415   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
5416 echo "${ECHO_T}no, using $LN_S" >&6
5417 fi
5418
5419 echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
5420 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
5421 if test "${lt_cv_deplibs_check_method+set}" = set; then
5422   echo $ECHO_N "(cached) $ECHO_C" >&6
5423 else
5424   lt_cv_file_magic_cmd='$MAGIC_CMD'
5425 lt_cv_file_magic_test_file=
5426 lt_cv_deplibs_check_method='unknown'
5427 # Need to set the preceding variable on all platforms that support
5428 # interlibrary dependencies.
5429 # 'none' -- dependencies not supported.
5430 # `unknown' -- same as none, but documents that we really don't know.
5431 # 'pass_all' -- all dependencies passed with no checks.
5432 # 'test_compile' -- check by making test program.
5433 # 'file_magic [[regex]]' -- check by looking for files in library path
5434 # which responds to the $file_magic_cmd with a given extended regex.
5435 # If you have `file' or equivalent on your system and you're not sure
5436 # whether `pass_all' will *always* work, you probably want this one.
5437
5438 case $host_os in
5439 aix4* | aix5*)
5440   lt_cv_deplibs_check_method=pass_all
5441   ;;
5442
5443 beos*)
5444   lt_cv_deplibs_check_method=pass_all
5445   ;;
5446
5447 bsdi[45]*)
5448   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
5449   lt_cv_file_magic_cmd='/usr/bin/file -L'
5450   lt_cv_file_magic_test_file=/shlib/libc.so
5451   ;;
5452
5453 cygwin*)
5454   # func_win32_libid is a shell function defined in ltmain.sh
5455   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5456   lt_cv_file_magic_cmd='func_win32_libid'
5457   ;;
5458
5459 mingw* | pw32*)
5460   # Base MSYS/MinGW do not provide the 'file' command needed by
5461   # func_win32_libid shell function, so use a weaker test based on 'objdump'.
5462   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
5463   lt_cv_file_magic_cmd='$OBJDUMP -f'
5464   ;;
5465
5466 darwin* | rhapsody*)
5467   lt_cv_deplibs_check_method=pass_all
5468   ;;
5469
5470 freebsd* | kfreebsd*-gnu | dragonfly*)
5471   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5472     case $host_cpu in
5473     i*86 )
5474       # Not sure whether the presence of OpenBSD here was a mistake.
5475       # Let's accept both of them until this is cleared up.
5476       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
5477       lt_cv_file_magic_cmd=/usr/bin/file
5478       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5479       ;;
5480     esac
5481   else
5482     lt_cv_deplibs_check_method=pass_all
5483   fi
5484   ;;
5485
5486 gnu*)
5487   lt_cv_deplibs_check_method=pass_all
5488   ;;
5489
5490 hpux10.20* | hpux11*)
5491   lt_cv_file_magic_cmd=/usr/bin/file
5492   case $host_cpu in
5493   ia64*)
5494     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
5495     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5496     ;;
5497   hppa*64*)
5498     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]'
5499     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5500     ;;
5501   *)
5502     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
5503     lt_cv_file_magic_test_file=/usr/lib/libc.sl
5504     ;;
5505   esac
5506   ;;
5507
5508 irix5* | irix6* | nonstopux*)
5509   case $LD in
5510   *-32|*"-32 ") libmagic=32-bit;;
5511   *-n32|*"-n32 ") libmagic=N32;;
5512   *-64|*"-64 ") libmagic=64-bit;;
5513   *) libmagic=never-match;;
5514   esac
5515   lt_cv_deplibs_check_method=pass_all
5516   ;;
5517
5518 # This must be Linux ELF.
5519 linux*)
5520   lt_cv_deplibs_check_method=pass_all
5521   ;;
5522
5523 netbsd*)
5524   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5525     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5526   else
5527     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
5528   fi
5529   ;;
5530
5531 newos6*)
5532   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
5533   lt_cv_file_magic_cmd=/usr/bin/file
5534   lt_cv_file_magic_test_file=/usr/lib/libnls.so
5535   ;;
5536
5537 nto-qnx*)
5538   lt_cv_deplibs_check_method=unknown
5539   ;;
5540
5541 openbsd*)
5542   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5543     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
5544   else
5545     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5546   fi
5547   ;;
5548
5549 osf3* | osf4* | osf5*)
5550   lt_cv_deplibs_check_method=pass_all
5551   ;;
5552
5553 sco3.2v5*)
5554   lt_cv_deplibs_check_method=pass_all
5555   ;;
5556
5557 solaris*)
5558   lt_cv_deplibs_check_method=pass_all
5559   ;;
5560
5561 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5562   case $host_vendor in
5563   motorola)
5564     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]'
5565     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5566     ;;
5567   ncr)
5568     lt_cv_deplibs_check_method=pass_all
5569     ;;
5570   sequent)
5571     lt_cv_file_magic_cmd='/bin/file'
5572     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
5573     ;;
5574   sni)
5575     lt_cv_file_magic_cmd='/bin/file'
5576     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
5577     lt_cv_file_magic_test_file=/lib/libc.so
5578     ;;
5579   siemens)
5580     lt_cv_deplibs_check_method=pass_all
5581     ;;
5582   esac
5583   ;;
5584
5585 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
5586   lt_cv_deplibs_check_method=pass_all
5587   ;;
5588 esac
5589
5590 fi
5591 echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
5592 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
5593 file_magic_cmd=$lt_cv_file_magic_cmd
5594 deplibs_check_method=$lt_cv_deplibs_check_method
5595 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5596
5597
5598
5599
5600 # If no C compiler was specified, use CC.
5601 LTCC=${LTCC-"$CC"}
5602
5603 # Allow CC to be a program name with arguments.
5604 compiler=$CC
5605
5606
5607 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
5608 if test "${enable_libtool_lock+set}" = set; then
5609   enableval="$enable_libtool_lock"
5610
5611 fi;
5612 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5613
5614 # Some flags need to be propagated to the compiler or linker for good
5615 # libtool support.
5616 case $host in
5617 ia64-*-hpux*)
5618   # Find out which ABI we are using.
5619   echo 'int i;' > conftest.$ac_ext
5620   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5621   (eval $ac_compile) 2>&5
5622   ac_status=$?
5623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5624   (exit $ac_status); }; then
5625     case `/usr/bin/file conftest.$ac_objext` in
5626     *ELF-32*)
5627       HPUX_IA64_MODE="32"
5628       ;;
5629     *ELF-64*)
5630       HPUX_IA64_MODE="64"
5631       ;;
5632     esac
5633   fi
5634   rm -rf conftest*
5635   ;;
5636 *-*-irix6*)
5637   # Find out which ABI we are using.
5638   echo '#line 5638 "configure"' > conftest.$ac_ext
5639   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5640   (eval $ac_compile) 2>&5
5641   ac_status=$?
5642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5643   (exit $ac_status); }; then
5644    if test "$lt_cv_prog_gnu_ld" = yes; then
5645     case `/usr/bin/file conftest.$ac_objext` in
5646     *32-bit*)
5647       LD="${LD-ld} -melf32bsmip"
5648       ;;
5649     *N32*)
5650       LD="${LD-ld} -melf32bmipn32"
5651       ;;
5652     *64-bit*)
5653       LD="${LD-ld} -melf64bmip"
5654       ;;
5655     esac
5656    else
5657     case `/usr/bin/file conftest.$ac_objext` in
5658     *32-bit*)
5659       LD="${LD-ld} -32"
5660       ;;
5661     *N32*)
5662       LD="${LD-ld} -n32"
5663       ;;
5664     *64-bit*)
5665       LD="${LD-ld} -64"
5666       ;;
5667     esac
5668    fi
5669   fi
5670   rm -rf conftest*
5671   ;;
5672
5673 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
5674   # Find out which ABI we are using.
5675   echo 'int i;' > conftest.$ac_ext
5676   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5677   (eval $ac_compile) 2>&5
5678   ac_status=$?
5679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5680   (exit $ac_status); }; then
5681     case `/usr/bin/file conftest.o` in
5682     *32-bit*)
5683       case $host in
5684         x86_64-*linux*)
5685           LD="${LD-ld} -m elf_i386"
5686           ;;
5687         ppc64-*linux*|powerpc64-*linux*)
5688           LD="${LD-ld} -m elf32ppclinux"
5689           ;;
5690         s390x-*linux*)
5691           LD="${LD-ld} -m elf_s390"
5692           ;;
5693         sparc64-*linux*)
5694           LD="${LD-ld} -m elf32_sparc"
5695           ;;
5696       esac
5697       ;;
5698     *64-bit*)
5699       case $host in
5700         x86_64-*linux*)
5701           LD="${LD-ld} -m elf_x86_64"
5702           ;;
5703         ppc*-*linux*|powerpc*-*linux*)
5704           LD="${LD-ld} -m elf64ppc"
5705           ;;
5706         s390*-*linux*)
5707           LD="${LD-ld} -m elf64_s390"
5708           ;;
5709         sparc*-*linux*)
5710           LD="${LD-ld} -m elf64_sparc"
5711           ;;
5712       esac
5713       ;;
5714     esac
5715   fi
5716   rm -rf conftest*
5717   ;;
5718
5719 *-*-sco3.2v5*)
5720   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
5721   SAVE_CFLAGS="$CFLAGS"
5722   CFLAGS="$CFLAGS -belf"
5723   echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
5724 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
5725 if test "${lt_cv_cc_needs_belf+set}" = set; then
5726   echo $ECHO_N "(cached) $ECHO_C" >&6
5727 else
5728   ac_ext=c
5729 ac_cpp='$CPP $CPPFLAGS'
5730 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5731 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5732 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5733
5734      cat >conftest.$ac_ext <<_ACEOF
5735 /* confdefs.h.  */
5736 _ACEOF
5737 cat confdefs.h >>conftest.$ac_ext
5738 cat >>conftest.$ac_ext <<_ACEOF
5739 /* end confdefs.h.  */
5740
5741 int
5742 main ()
5743 {
5744
5745   ;
5746   return 0;
5747 }
5748 _ACEOF
5749 rm -f conftest.$ac_objext conftest$ac_exeext
5750 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5751   (eval $ac_link) 2>conftest.er1
5752   ac_status=$?
5753   grep -v '^ *+' conftest.er1 >conftest.err
5754   rm -f conftest.er1
5755   cat conftest.err >&5
5756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5757   (exit $ac_status); } &&
5758          { ac_try='test -z "$ac_c_werror_flag"
5759                          || test ! -s conftest.err'
5760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5761   (eval $ac_try) 2>&5
5762   ac_status=$?
5763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5764   (exit $ac_status); }; } &&
5765          { ac_try='test -s conftest$ac_exeext'
5766   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5767   (eval $ac_try) 2>&5
5768   ac_status=$?
5769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5770   (exit $ac_status); }; }; then
5771   lt_cv_cc_needs_belf=yes
5772 else
5773   echo "$as_me: failed program was:" >&5
5774 sed 's/^/| /' conftest.$ac_ext >&5
5775
5776 lt_cv_cc_needs_belf=no
5777 fi
5778 rm -f conftest.err conftest.$ac_objext \
5779       conftest$ac_exeext conftest.$ac_ext
5780      ac_ext=c
5781 ac_cpp='$CPP $CPPFLAGS'
5782 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5783 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5784 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5785
5786 fi
5787 echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
5788 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
5789   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5790     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5791     CFLAGS="$SAVE_CFLAGS"
5792   fi
5793   ;;
5794 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
5795   if test -n "$ac_tool_prefix"; then
5796   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5797 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
5798 echo "$as_me:$LINENO: checking for $ac_word" >&5
5799 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5800 if test "${ac_cv_prog_DLLTOOL+set}" = set; then
5801   echo $ECHO_N "(cached) $ECHO_C" >&6
5802 else
5803   if test -n "$DLLTOOL"; then
5804   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
5805 else
5806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5807 for as_dir in $PATH
5808 do
5809   IFS=$as_save_IFS
5810   test -z "$as_dir" && as_dir=.
5811   for ac_exec_ext in '' $ac_executable_extensions; do
5812   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5813     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
5814     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5815     break 2
5816   fi
5817 done
5818 done
5819
5820 fi
5821 fi
5822 DLLTOOL=$ac_cv_prog_DLLTOOL
5823 if test -n "$DLLTOOL"; then
5824   echo "$as_me:$LINENO: result: $DLLTOOL" >&5
5825 echo "${ECHO_T}$DLLTOOL" >&6
5826 else
5827   echo "$as_me:$LINENO: result: no" >&5
5828 echo "${ECHO_T}no" >&6
5829 fi
5830
5831 fi
5832 if test -z "$ac_cv_prog_DLLTOOL"; then
5833   ac_ct_DLLTOOL=$DLLTOOL
5834   # Extract the first word of "dlltool", so it can be a program name with args.
5835 set dummy dlltool; ac_word=$2
5836 echo "$as_me:$LINENO: checking for $ac_word" >&5
5837 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5838 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
5839   echo $ECHO_N "(cached) $ECHO_C" >&6
5840 else
5841   if test -n "$ac_ct_DLLTOOL"; then
5842   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
5843 else
5844 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5845 for as_dir in $PATH
5846 do
5847   IFS=$as_save_IFS
5848   test -z "$as_dir" && as_dir=.
5849   for ac_exec_ext in '' $ac_executable_extensions; do
5850   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5851     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
5852     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5853     break 2
5854   fi
5855 done
5856 done
5857
5858   test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="false"
5859 fi
5860 fi
5861 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
5862 if test -n "$ac_ct_DLLTOOL"; then
5863   echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
5864 echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
5865 else
5866   echo "$as_me:$LINENO: result: no" >&5
5867 echo "${ECHO_T}no" >&6
5868 fi
5869
5870   DLLTOOL=$ac_ct_DLLTOOL
5871 else
5872   DLLTOOL="$ac_cv_prog_DLLTOOL"
5873 fi
5874
5875   if test -n "$ac_tool_prefix"; then
5876   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
5877 set dummy ${ac_tool_prefix}as; ac_word=$2
5878 echo "$as_me:$LINENO: checking for $ac_word" >&5
5879 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5880 if test "${ac_cv_prog_AS+set}" = set; then
5881   echo $ECHO_N "(cached) $ECHO_C" >&6
5882 else
5883   if test -n "$AS"; then
5884   ac_cv_prog_AS="$AS" # Let the user override the test.
5885 else
5886 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5887 for as_dir in $PATH
5888 do
5889   IFS=$as_save_IFS
5890   test -z "$as_dir" && as_dir=.
5891   for ac_exec_ext in '' $ac_executable_extensions; do
5892   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5893     ac_cv_prog_AS="${ac_tool_prefix}as"
5894     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5895     break 2
5896   fi
5897 done
5898 done
5899
5900 fi
5901 fi
5902 AS=$ac_cv_prog_AS
5903 if test -n "$AS"; then
5904   echo "$as_me:$LINENO: result: $AS" >&5
5905 echo "${ECHO_T}$AS" >&6
5906 else
5907   echo "$as_me:$LINENO: result: no" >&5
5908 echo "${ECHO_T}no" >&6
5909 fi
5910
5911 fi
5912 if test -z "$ac_cv_prog_AS"; then
5913   ac_ct_AS=$AS
5914   # Extract the first word of "as", so it can be a program name with args.
5915 set dummy as; ac_word=$2
5916 echo "$as_me:$LINENO: checking for $ac_word" >&5
5917 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5918 if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
5919   echo $ECHO_N "(cached) $ECHO_C" >&6
5920 else
5921   if test -n "$ac_ct_AS"; then
5922   ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
5923 else
5924 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5925 for as_dir in $PATH
5926 do
5927   IFS=$as_save_IFS
5928   test -z "$as_dir" && as_dir=.
5929   for ac_exec_ext in '' $ac_executable_extensions; do
5930   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5931     ac_cv_prog_ac_ct_AS="as"
5932     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5933     break 2
5934   fi
5935 done
5936 done
5937
5938   test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="false"
5939 fi
5940 fi
5941 ac_ct_AS=$ac_cv_prog_ac_ct_AS
5942 if test -n "$ac_ct_AS"; then
5943   echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
5944 echo "${ECHO_T}$ac_ct_AS" >&6
5945 else
5946   echo "$as_me:$LINENO: result: no" >&5
5947 echo "${ECHO_T}no" >&6
5948 fi
5949
5950   AS=$ac_ct_AS
5951 else
5952   AS="$ac_cv_prog_AS"
5953 fi
5954
5955   if test -n "$ac_tool_prefix"; then
5956   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
5957 set dummy ${ac_tool_prefix}objdump; ac_word=$2
5958 echo "$as_me:$LINENO: checking for $ac_word" >&5
5959 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5960 if test "${ac_cv_prog_OBJDUMP+set}" = set; then
5961   echo $ECHO_N "(cached) $ECHO_C" >&6
5962 else
5963   if test -n "$OBJDUMP"; then
5964   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
5965 else
5966 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5967 for as_dir in $PATH
5968 do
5969   IFS=$as_save_IFS
5970   test -z "$as_dir" && as_dir=.
5971   for ac_exec_ext in '' $ac_executable_extensions; do
5972   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5973     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
5974     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5975     break 2
5976   fi
5977 done
5978 done
5979
5980 fi
5981 fi
5982 OBJDUMP=$ac_cv_prog_OBJDUMP
5983 if test -n "$OBJDUMP"; then
5984   echo "$as_me:$LINENO: result: $OBJDUMP" >&5
5985 echo "${ECHO_T}$OBJDUMP" >&6
5986 else
5987   echo "$as_me:$LINENO: result: no" >&5
5988 echo "${ECHO_T}no" >&6
5989 fi
5990
5991 fi
5992 if test -z "$ac_cv_prog_OBJDUMP"; then
5993   ac_ct_OBJDUMP=$OBJDUMP
5994   # Extract the first word of "objdump", so it can be a program name with args.
5995 set dummy objdump; ac_word=$2
5996 echo "$as_me:$LINENO: checking for $ac_word" >&5
5997 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5998 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
5999   echo $ECHO_N "(cached) $ECHO_C" >&6
6000 else
6001   if test -n "$ac_ct_OBJDUMP"; then
6002   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
6003 else
6004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005 for as_dir in $PATH
6006 do
6007   IFS=$as_save_IFS
6008   test -z "$as_dir" && as_dir=.
6009   for ac_exec_ext in '' $ac_executable_extensions; do
6010   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6011     ac_cv_prog_ac_ct_OBJDUMP="objdump"
6012     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6013     break 2
6014   fi
6015 done
6016 done
6017
6018   test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false"
6019 fi
6020 fi
6021 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
6022 if test -n "$ac_ct_OBJDUMP"; then
6023   echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
6024 echo "${ECHO_T}$ac_ct_OBJDUMP" >&6
6025 else
6026   echo "$as_me:$LINENO: result: no" >&5
6027 echo "${ECHO_T}no" >&6
6028 fi
6029
6030   OBJDUMP=$ac_ct_OBJDUMP
6031 else
6032   OBJDUMP="$ac_cv_prog_OBJDUMP"
6033 fi
6034
6035   ;;
6036
6037 esac
6038
6039 need_locks="$enable_libtool_lock"
6040
6041
6042 ac_ext=c
6043 ac_cpp='$CPP $CPPFLAGS'
6044 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6045 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6046 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6047 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
6048 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
6049 # On Suns, sometimes $CPP names a directory.
6050 if test -n "$CPP" && test -d "$CPP"; then
6051   CPP=
6052 fi
6053 if test -z "$CPP"; then
6054   if test "${ac_cv_prog_CPP+set}" = set; then
6055   echo $ECHO_N "(cached) $ECHO_C" >&6
6056 else
6057       # Double quotes because CPP needs to be expanded
6058     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6059     do
6060       ac_preproc_ok=false
6061 for ac_c_preproc_warn_flag in '' yes
6062 do
6063   # Use a header file that comes with gcc, so configuring glibc
6064   # with a fresh cross-compiler works.
6065   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6066   # <limits.h> exists even on freestanding compilers.
6067   # On the NeXT, cc -E runs the code through the compiler's parser,
6068   # not just through cpp. "Syntax error" is here to catch this case.
6069   cat >conftest.$ac_ext <<_ACEOF
6070 /* confdefs.h.  */
6071 _ACEOF
6072 cat confdefs.h >>conftest.$ac_ext
6073 cat >>conftest.$ac_ext <<_ACEOF
6074 /* end confdefs.h.  */
6075 #ifdef __STDC__
6076 # include <limits.h>
6077 #else
6078 # include <assert.h>
6079 #endif
6080                      Syntax error
6081 _ACEOF
6082 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6083   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6084   ac_status=$?
6085   grep -v '^ *+' conftest.er1 >conftest.err
6086   rm -f conftest.er1
6087   cat conftest.err >&5
6088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6089   (exit $ac_status); } >/dev/null; then
6090   if test -s conftest.err; then
6091     ac_cpp_err=$ac_c_preproc_warn_flag
6092     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6093   else
6094     ac_cpp_err=
6095   fi
6096 else
6097   ac_cpp_err=yes
6098 fi
6099 if test -z "$ac_cpp_err"; then
6100   :
6101 else
6102   echo "$as_me: failed program was:" >&5
6103 sed 's/^/| /' conftest.$ac_ext >&5
6104
6105   # Broken: fails on valid input.
6106 continue
6107 fi
6108 rm -f conftest.err conftest.$ac_ext
6109
6110   # OK, works on sane cases.  Now check whether non-existent headers
6111   # can be detected and how.
6112   cat >conftest.$ac_ext <<_ACEOF
6113 /* confdefs.h.  */
6114 _ACEOF
6115 cat confdefs.h >>conftest.$ac_ext
6116 cat >>conftest.$ac_ext <<_ACEOF
6117 /* end confdefs.h.  */
6118 #include <ac_nonexistent.h>
6119 _ACEOF
6120 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6121   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6122   ac_status=$?
6123   grep -v '^ *+' conftest.er1 >conftest.err
6124   rm -f conftest.er1
6125   cat conftest.err >&5
6126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6127   (exit $ac_status); } >/dev/null; then
6128   if test -s conftest.err; then
6129     ac_cpp_err=$ac_c_preproc_warn_flag
6130     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6131   else
6132     ac_cpp_err=
6133   fi
6134 else
6135   ac_cpp_err=yes
6136 fi
6137 if test -z "$ac_cpp_err"; then
6138   # Broken: success on invalid input.
6139 continue
6140 else
6141   echo "$as_me: failed program was:" >&5
6142 sed 's/^/| /' conftest.$ac_ext >&5
6143
6144   # Passes both tests.
6145 ac_preproc_ok=:
6146 break
6147 fi
6148 rm -f conftest.err conftest.$ac_ext
6149
6150 done
6151 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6152 rm -f conftest.err conftest.$ac_ext
6153 if $ac_preproc_ok; then
6154   break
6155 fi
6156
6157     done
6158     ac_cv_prog_CPP=$CPP
6159
6160 fi
6161   CPP=$ac_cv_prog_CPP
6162 else
6163   ac_cv_prog_CPP=$CPP
6164 fi
6165 echo "$as_me:$LINENO: result: $CPP" >&5
6166 echo "${ECHO_T}$CPP" >&6
6167 ac_preproc_ok=false
6168 for ac_c_preproc_warn_flag in '' yes
6169 do
6170   # Use a header file that comes with gcc, so configuring glibc
6171   # with a fresh cross-compiler works.
6172   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6173   # <limits.h> exists even on freestanding compilers.
6174   # On the NeXT, cc -E runs the code through the compiler's parser,
6175   # not just through cpp. "Syntax error" is here to catch this case.
6176   cat >conftest.$ac_ext <<_ACEOF
6177 /* confdefs.h.  */
6178 _ACEOF
6179 cat confdefs.h >>conftest.$ac_ext
6180 cat >>conftest.$ac_ext <<_ACEOF
6181 /* end confdefs.h.  */
6182 #ifdef __STDC__
6183 # include <limits.h>
6184 #else
6185 # include <assert.h>
6186 #endif
6187                      Syntax error
6188 _ACEOF
6189 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6190   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6191   ac_status=$?
6192   grep -v '^ *+' conftest.er1 >conftest.err
6193   rm -f conftest.er1
6194   cat conftest.err >&5
6195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6196   (exit $ac_status); } >/dev/null; then
6197   if test -s conftest.err; then
6198     ac_cpp_err=$ac_c_preproc_warn_flag
6199     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6200   else
6201     ac_cpp_err=
6202   fi
6203 else
6204   ac_cpp_err=yes
6205 fi
6206 if test -z "$ac_cpp_err"; then
6207   :
6208 else
6209   echo "$as_me: failed program was:" >&5
6210 sed 's/^/| /' conftest.$ac_ext >&5
6211
6212   # Broken: fails on valid input.
6213 continue
6214 fi
6215 rm -f conftest.err conftest.$ac_ext
6216
6217   # OK, works on sane cases.  Now check whether non-existent headers
6218   # can be detected and how.
6219   cat >conftest.$ac_ext <<_ACEOF
6220 /* confdefs.h.  */
6221 _ACEOF
6222 cat confdefs.h >>conftest.$ac_ext
6223 cat >>conftest.$ac_ext <<_ACEOF
6224 /* end confdefs.h.  */
6225 #include <ac_nonexistent.h>
6226 _ACEOF
6227 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6228   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6229   ac_status=$?
6230   grep -v '^ *+' conftest.er1 >conftest.err
6231   rm -f conftest.er1
6232   cat conftest.err >&5
6233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6234   (exit $ac_status); } >/dev/null; then
6235   if test -s conftest.err; then
6236     ac_cpp_err=$ac_c_preproc_warn_flag
6237     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6238   else
6239     ac_cpp_err=
6240   fi
6241 else
6242   ac_cpp_err=yes
6243 fi
6244 if test -z "$ac_cpp_err"; then
6245   # Broken: success on invalid input.
6246 continue
6247 else
6248   echo "$as_me: failed program was:" >&5
6249 sed 's/^/| /' conftest.$ac_ext >&5
6250
6251   # Passes both tests.
6252 ac_preproc_ok=:
6253 break
6254 fi
6255 rm -f conftest.err conftest.$ac_ext
6256
6257 done
6258 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6259 rm -f conftest.err conftest.$ac_ext
6260 if $ac_preproc_ok; then
6261   :
6262 else
6263   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
6264 See \`config.log' for more details." >&5
6265 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
6266 See \`config.log' for more details." >&2;}
6267    { (exit 1); exit 1; }; }
6268 fi
6269
6270 ac_ext=c
6271 ac_cpp='$CPP $CPPFLAGS'
6272 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6273 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6274 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6275
6276
6277 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6278 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6279 if test "${ac_cv_header_stdc+set}" = set; then
6280   echo $ECHO_N "(cached) $ECHO_C" >&6
6281 else
6282   cat >conftest.$ac_ext <<_ACEOF
6283 /* confdefs.h.  */
6284 _ACEOF
6285 cat confdefs.h >>conftest.$ac_ext
6286 cat >>conftest.$ac_ext <<_ACEOF
6287 /* end confdefs.h.  */
6288 #include <stdlib.h>
6289 #include <stdarg.h>
6290 #include <string.h>
6291 #include <float.h>
6292
6293 int
6294 main ()
6295 {
6296
6297   ;
6298   return 0;
6299 }
6300 _ACEOF
6301 rm -f conftest.$ac_objext
6302 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6303   (eval $ac_compile) 2>conftest.er1
6304   ac_status=$?
6305   grep -v '^ *+' conftest.er1 >conftest.err
6306   rm -f conftest.er1
6307   cat conftest.err >&5
6308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6309   (exit $ac_status); } &&
6310          { ac_try='test -z "$ac_c_werror_flag"
6311                          || test ! -s conftest.err'
6312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6313   (eval $ac_try) 2>&5
6314   ac_status=$?
6315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6316   (exit $ac_status); }; } &&
6317          { ac_try='test -s conftest.$ac_objext'
6318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6319   (eval $ac_try) 2>&5
6320   ac_status=$?
6321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6322   (exit $ac_status); }; }; then
6323   ac_cv_header_stdc=yes
6324 else
6325   echo "$as_me: failed program was:" >&5
6326 sed 's/^/| /' conftest.$ac_ext >&5
6327
6328 ac_cv_header_stdc=no
6329 fi
6330 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6331
6332 if test $ac_cv_header_stdc = yes; then
6333   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6334   cat >conftest.$ac_ext <<_ACEOF
6335 /* confdefs.h.  */
6336 _ACEOF
6337 cat confdefs.h >>conftest.$ac_ext
6338 cat >>conftest.$ac_ext <<_ACEOF
6339 /* end confdefs.h.  */
6340 #include <string.h>
6341
6342 _ACEOF
6343 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6344   $EGREP "memchr" >/dev/null 2>&1; then
6345   :
6346 else
6347   ac_cv_header_stdc=no
6348 fi
6349 rm -f conftest*
6350
6351 fi
6352
6353 if test $ac_cv_header_stdc = yes; then
6354   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6355   cat >conftest.$ac_ext <<_ACEOF
6356 /* confdefs.h.  */
6357 _ACEOF
6358 cat confdefs.h >>conftest.$ac_ext
6359 cat >>conftest.$ac_ext <<_ACEOF
6360 /* end confdefs.h.  */
6361 #include <stdlib.h>
6362
6363 _ACEOF
6364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6365   $EGREP "free" >/dev/null 2>&1; then
6366   :
6367 else
6368   ac_cv_header_stdc=no
6369 fi
6370 rm -f conftest*
6371
6372 fi
6373
6374 if test $ac_cv_header_stdc = yes; then
6375   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6376   if test "$cross_compiling" = yes; then
6377   :
6378 else
6379   cat >conftest.$ac_ext <<_ACEOF
6380 /* confdefs.h.  */
6381 _ACEOF
6382 cat confdefs.h >>conftest.$ac_ext
6383 cat >>conftest.$ac_ext <<_ACEOF
6384 /* end confdefs.h.  */
6385 #include <ctype.h>
6386 #if ((' ' & 0x0FF) == 0x020)
6387 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6388 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6389 #else
6390 # define ISLOWER(c) \
6391                    (('a' <= (c) && (c) <= 'i') \
6392                      || ('j' <= (c) && (c) <= 'r') \
6393                      || ('s' <= (c) && (c) <= 'z'))
6394 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6395 #endif
6396
6397 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6398 int
6399 main ()
6400 {
6401   int i;
6402   for (i = 0; i < 256; i++)
6403     if (XOR (islower (i), ISLOWER (i))
6404         || toupper (i) != TOUPPER (i))
6405       exit(2);
6406   exit (0);
6407 }
6408 _ACEOF
6409 rm -f conftest$ac_exeext
6410 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6411   (eval $ac_link) 2>&5
6412   ac_status=$?
6413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6414   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6415   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6416   (eval $ac_try) 2>&5
6417   ac_status=$?
6418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6419   (exit $ac_status); }; }; then
6420   :
6421 else
6422   echo "$as_me: program exited with status $ac_status" >&5
6423 echo "$as_me: failed program was:" >&5
6424 sed 's/^/| /' conftest.$ac_ext >&5
6425
6426 ( exit $ac_status )
6427 ac_cv_header_stdc=no
6428 fi
6429 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6430 fi
6431 fi
6432 fi
6433 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6434 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6435 if test $ac_cv_header_stdc = yes; then
6436
6437 cat >>confdefs.h <<\_ACEOF
6438 #define STDC_HEADERS 1
6439 _ACEOF
6440
6441 fi
6442
6443 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6454                   inttypes.h stdint.h unistd.h
6455 do
6456 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6457 echo "$as_me:$LINENO: checking for $ac_header" >&5
6458 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6459 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6460   echo $ECHO_N "(cached) $ECHO_C" >&6
6461 else
6462   cat >conftest.$ac_ext <<_ACEOF
6463 /* confdefs.h.  */
6464 _ACEOF
6465 cat confdefs.h >>conftest.$ac_ext
6466 cat >>conftest.$ac_ext <<_ACEOF
6467 /* end confdefs.h.  */
6468 $ac_includes_default
6469
6470 #include <$ac_header>
6471 _ACEOF
6472 rm -f conftest.$ac_objext
6473 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6474   (eval $ac_compile) 2>conftest.er1
6475   ac_status=$?
6476   grep -v '^ *+' conftest.er1 >conftest.err
6477   rm -f conftest.er1
6478   cat conftest.err >&5
6479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6480   (exit $ac_status); } &&
6481          { ac_try='test -z "$ac_c_werror_flag"
6482                          || test ! -s conftest.err'
6483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6484   (eval $ac_try) 2>&5
6485   ac_status=$?
6486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6487   (exit $ac_status); }; } &&
6488          { ac_try='test -s conftest.$ac_objext'
6489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6490   (eval $ac_try) 2>&5
6491   ac_status=$?
6492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6493   (exit $ac_status); }; }; then
6494   eval "$as_ac_Header=yes"
6495 else
6496   echo "$as_me: failed program was:" >&5
6497 sed 's/^/| /' conftest.$ac_ext >&5
6498
6499 eval "$as_ac_Header=no"
6500 fi
6501 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6502 fi
6503 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6504 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6505 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6506   cat >>confdefs.h <<_ACEOF
6507 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6508 _ACEOF
6509
6510 fi
6511
6512 done
6513
6514
6515
6516 for ac_header in dlfcn.h
6517 do
6518 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6519 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6520   echo "$as_me:$LINENO: checking for $ac_header" >&5
6521 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6522 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6523   echo $ECHO_N "(cached) $ECHO_C" >&6
6524 fi
6525 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6526 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6527 else
6528   # Is the header compilable?
6529 echo "$as_me:$LINENO: checking $ac_header usability" >&5
6530 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6531 cat >conftest.$ac_ext <<_ACEOF
6532 /* confdefs.h.  */
6533 _ACEOF
6534 cat confdefs.h >>conftest.$ac_ext
6535 cat >>conftest.$ac_ext <<_ACEOF
6536 /* end confdefs.h.  */
6537 $ac_includes_default
6538 #include <$ac_header>
6539 _ACEOF
6540 rm -f conftest.$ac_objext
6541 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6542   (eval $ac_compile) 2>conftest.er1
6543   ac_status=$?
6544   grep -v '^ *+' conftest.er1 >conftest.err
6545   rm -f conftest.er1
6546   cat conftest.err >&5
6547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6548   (exit $ac_status); } &&
6549          { ac_try='test -z "$ac_c_werror_flag"
6550                          || test ! -s conftest.err'
6551   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6552   (eval $ac_try) 2>&5
6553   ac_status=$?
6554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6555   (exit $ac_status); }; } &&
6556          { ac_try='test -s conftest.$ac_objext'
6557   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6558   (eval $ac_try) 2>&5
6559   ac_status=$?
6560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6561   (exit $ac_status); }; }; then
6562   ac_header_compiler=yes
6563 else
6564   echo "$as_me: failed program was:" >&5
6565 sed 's/^/| /' conftest.$ac_ext >&5
6566
6567 ac_header_compiler=no
6568 fi
6569 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6570 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6571 echo "${ECHO_T}$ac_header_compiler" >&6
6572
6573 # Is the header present?
6574 echo "$as_me:$LINENO: checking $ac_header presence" >&5
6575 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6576 cat >conftest.$ac_ext <<_ACEOF
6577 /* confdefs.h.  */
6578 _ACEOF
6579 cat confdefs.h >>conftest.$ac_ext
6580 cat >>conftest.$ac_ext <<_ACEOF
6581 /* end confdefs.h.  */
6582 #include <$ac_header>
6583 _ACEOF
6584 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6585   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6586   ac_status=$?
6587   grep -v '^ *+' conftest.er1 >conftest.err
6588   rm -f conftest.er1
6589   cat conftest.err >&5
6590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6591   (exit $ac_status); } >/dev/null; then
6592   if test -s conftest.err; then
6593     ac_cpp_err=$ac_c_preproc_warn_flag
6594     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6595   else
6596     ac_cpp_err=
6597   fi
6598 else
6599   ac_cpp_err=yes
6600 fi
6601 if test -z "$ac_cpp_err"; then
6602   ac_header_preproc=yes
6603 else
6604   echo "$as_me: failed program was:" >&5
6605 sed 's/^/| /' conftest.$ac_ext >&5
6606
6607   ac_header_preproc=no
6608 fi
6609 rm -f conftest.err conftest.$ac_ext
6610 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6611 echo "${ECHO_T}$ac_header_preproc" >&6
6612
6613 # So?  What about this header?
6614 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6615   yes:no: )
6616     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6617 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6618     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6619 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6620     ac_header_preproc=yes
6621     ;;
6622   no:yes:* )
6623     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6624 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6625     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6626 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6627     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6628 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6629     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6630 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6631     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6632 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6633     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6634 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6635     (
6636       cat <<\_ASBOX
6637 ## --------------------------------------------- ##
6638 ## Report this to <http://www.openldap.org/its/> ##
6639 ## --------------------------------------------- ##
6640 _ASBOX
6641     ) |
6642       sed "s/^/$as_me: WARNING:     /" >&2
6643     ;;
6644 esac
6645 echo "$as_me:$LINENO: checking for $ac_header" >&5
6646 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6647 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6648   echo $ECHO_N "(cached) $ECHO_C" >&6
6649 else
6650   eval "$as_ac_Header=\$ac_header_preproc"
6651 fi
6652 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6653 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6654
6655 fi
6656 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6657   cat >>confdefs.h <<_ACEOF
6658 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6659 _ACEOF
6660
6661 fi
6662
6663 done
6664
6665
6666 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
6667
6668 # find the maximum length of command line arguments
6669 echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
6670 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
6671 if test "${lt_cv_sys_max_cmd_len+set}" = set; then
6672   echo $ECHO_N "(cached) $ECHO_C" >&6
6673 else
6674     i=0
6675   teststring="ABCD"
6676
6677   case $build_os in
6678   msdosdjgpp*)
6679     # On DJGPP, this test can blow up pretty badly due to problems in libc
6680     # (any single argument exceeding 2000 bytes causes a buffer overrun
6681     # during glob expansion).  Even if it were fixed, the result of this
6682     # check would be larger than it should be.
6683     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
6684     ;;
6685
6686   gnu*)
6687     # Under GNU Hurd, this test is not required because there is
6688     # no limit to the length of command line arguments.
6689     # Libtool will interpret -1 as no limit whatsoever
6690     lt_cv_sys_max_cmd_len=-1;
6691     ;;
6692
6693   cygwin* | mingw*)
6694     # On Win9x/ME, this test blows up -- it succeeds, but takes
6695     # about 5 minutes as the teststring grows exponentially.
6696     # Worse, since 9x/ME are not pre-emptively multitasking,
6697     # you end up with a "frozen" computer, even though with patience
6698     # the test eventually succeeds (with a max line length of 256k).
6699     # Instead, let's just punt: use the minimum linelength reported by
6700     # all of the supported platforms: 8192 (on NT/2K/XP).
6701     lt_cv_sys_max_cmd_len=8192;
6702     ;;
6703
6704   amigaos*)
6705     # On AmigaOS with pdksh, this test takes hours, literally.
6706     # So we just punt and use a minimum line length of 8192.
6707     lt_cv_sys_max_cmd_len=8192;
6708     ;;
6709
6710   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
6711     # This has been around since 386BSD, at least.  Likely further.
6712     if test -x /sbin/sysctl; then
6713       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
6714     elif test -x /usr/sbin/sysctl; then
6715       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
6716     else
6717       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
6718     fi
6719     # And add a safety zone
6720     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6721     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6722     ;;
6723   osf*)
6724     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
6725     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
6726     # nice to cause kernel panics so lets avoid the loop below.
6727     # First set a reasonable default.
6728     lt_cv_sys_max_cmd_len=16384
6729     #
6730     if test -x /sbin/sysconfig; then
6731       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
6732         *1*) lt_cv_sys_max_cmd_len=-1 ;;
6733       esac
6734     fi
6735     ;;
6736   *)
6737     # If test is not a shell built-in, we'll probably end up computing a
6738     # maximum length that is only half of the actual maximum length, but
6739     # we can't tell.
6740     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
6741     while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
6742                = "XX$teststring") >/dev/null 2>&1 &&
6743             new_result=`expr "X$teststring" : ".*" 2>&1` &&
6744             lt_cv_sys_max_cmd_len=$new_result &&
6745             test $i != 17 # 1/2 MB should be enough
6746     do
6747       i=`expr $i + 1`
6748       teststring=$teststring$teststring
6749     done
6750     teststring=
6751     # Add a significant safety factor because C++ compilers can tack on massive
6752     # amounts of additional arguments before passing them to the linker.
6753     # It appears as though 1/2 is a usable value.
6754     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6755     ;;
6756   esac
6757
6758 fi
6759
6760 if test -n $lt_cv_sys_max_cmd_len ; then
6761   echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
6762 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
6763 else
6764   echo "$as_me:$LINENO: result: none" >&5
6765 echo "${ECHO_T}none" >&6
6766 fi
6767
6768
6769
6770
6771 # Check for command to grab the raw symbol name followed by C symbol from nm.
6772 echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
6773 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
6774 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
6775   echo $ECHO_N "(cached) $ECHO_C" >&6
6776 else
6777
6778 # These are sane defaults that work on at least a few old systems.
6779 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
6780
6781 # Character class describing NM global symbol codes.
6782 symcode='[BCDEGRST]'
6783
6784 # Regexp to match symbols that can be accessed directly from C.
6785 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
6786
6787 # Transform an extracted symbol line into a proper C declaration
6788 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6789
6790 # Transform an extracted symbol line into symbol name and symbol address
6791 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'"
6792
6793 # Define system-specific variables.
6794 case $host_os in
6795 aix*)
6796   symcode='[BCDT]'
6797   ;;
6798 cygwin* | mingw* | pw32*)
6799   symcode='[ABCDGISTW]'
6800   ;;
6801 hpux*) # Its linker distinguishes data from code symbols
6802   if test "$host_cpu" = ia64; then
6803     symcode='[ABCDEGRST]'
6804   fi
6805   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6806   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'"
6807   ;;
6808 linux*)
6809   if test "$host_cpu" = ia64; then
6810     symcode='[ABCDGIRSTW]'
6811     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6812     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'"
6813   fi
6814   ;;
6815 irix* | nonstopux*)
6816   symcode='[BCDEGRST]'
6817   ;;
6818 osf*)
6819   symcode='[BCDEGQRST]'
6820   ;;
6821 solaris* | sysv5*)
6822   symcode='[BDRT]'
6823   ;;
6824 sysv4)
6825   symcode='[DFNSTU]'
6826   ;;
6827 esac
6828
6829 # Handle CRLF in mingw tool chain
6830 opt_cr=
6831 case $build_os in
6832 mingw*)
6833   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6834   ;;
6835 esac
6836
6837 # If we're using GNU nm, then use its standard symbol codes.
6838 case `$NM -V 2>&1` in
6839 *GNU* | *'with BFD'*)
6840   symcode='[ABCDGIRSTW]' ;;
6841 esac
6842
6843 # Try without a prefix undercore, then with it.
6844 for ac_symprfx in "" "_"; do
6845
6846   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6847   symxfrm="\\1 $ac_symprfx\\2 \\2"
6848
6849   # Write the raw and C identifiers.
6850   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[       ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6851
6852   # Check to see that the pipe works correctly.
6853   pipe_works=no
6854
6855   rm -f conftest*
6856   cat > conftest.$ac_ext <<EOF
6857 #ifdef __cplusplus
6858 extern "C" {
6859 #endif
6860 char nm_test_var;
6861 void nm_test_func(){}
6862 #ifdef __cplusplus
6863 }
6864 #endif
6865 int main(){nm_test_var='a';nm_test_func();return(0);}
6866 EOF
6867
6868   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6869   (eval $ac_compile) 2>&5
6870   ac_status=$?
6871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6872   (exit $ac_status); }; then
6873     # Now try to grab the symbols.
6874     nlist=conftest.nm
6875     if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
6876   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
6877   ac_status=$?
6878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6879   (exit $ac_status); } && test -s "$nlist"; then
6880       # Try sorting and uniquifying the output.
6881       if sort "$nlist" | uniq > "$nlist"T; then
6882         mv -f "$nlist"T "$nlist"
6883       else
6884         rm -f "$nlist"T
6885       fi
6886
6887       # Make sure that we snagged all the symbols we need.
6888       if grep ' nm_test_var$' "$nlist" >/dev/null; then
6889         if grep ' nm_test_func$' "$nlist" >/dev/null; then
6890           cat <<EOF > conftest.$ac_ext
6891 #ifdef __cplusplus
6892 extern "C" {
6893 #endif
6894
6895 EOF
6896           # Now generate the symbol file.
6897           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6898
6899           cat <<EOF >> conftest.$ac_ext
6900 #if defined (__STDC__) && __STDC__
6901 # define lt_ptr_t void *
6902 #else
6903 # define lt_ptr_t char *
6904 # define const
6905 #endif
6906
6907 /* The mapping between symbol names and symbols. */
6908 const struct {
6909   const char *name;
6910   lt_ptr_t address;
6911 }
6912 lt_preloaded_symbols[] =
6913 {
6914 EOF
6915           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
6916           cat <<\EOF >> conftest.$ac_ext
6917   {0, (lt_ptr_t) 0}
6918 };
6919
6920 #ifdef __cplusplus
6921 }
6922 #endif
6923 EOF
6924           # Now try linking the two files.
6925           mv conftest.$ac_objext conftstm.$ac_objext
6926           lt_save_LIBS="$LIBS"
6927           lt_save_CFLAGS="$CFLAGS"
6928           LIBS="conftstm.$ac_objext"
6929           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
6930           if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6931   (eval $ac_link) 2>&5
6932   ac_status=$?
6933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6934   (exit $ac_status); } && test -s conftest${ac_exeext}; then
6935             pipe_works=yes
6936           fi
6937           LIBS="$lt_save_LIBS"
6938           CFLAGS="$lt_save_CFLAGS"
6939         else
6940           echo "cannot find nm_test_func in $nlist" >&5
6941         fi
6942       else
6943         echo "cannot find nm_test_var in $nlist" >&5
6944       fi
6945     else
6946       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
6947     fi
6948   else
6949     echo "$progname: failed program was:" >&5
6950     cat conftest.$ac_ext >&5
6951   fi
6952   rm -f conftest* conftst*
6953
6954   # Do not use the global_symbol_pipe unless it works.
6955   if test "$pipe_works" = yes; then
6956     break
6957   else
6958     lt_cv_sys_global_symbol_pipe=
6959   fi
6960 done
6961
6962 fi
6963
6964 if test -z "$lt_cv_sys_global_symbol_pipe"; then
6965   lt_cv_sys_global_symbol_to_cdecl=
6966 fi
6967 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6968   echo "$as_me:$LINENO: result: failed" >&5
6969 echo "${ECHO_T}failed" >&6
6970 else
6971   echo "$as_me:$LINENO: result: ok" >&5
6972 echo "${ECHO_T}ok" >&6
6973 fi
6974
6975 echo "$as_me:$LINENO: checking for objdir" >&5
6976 echo $ECHO_N "checking for objdir... $ECHO_C" >&6
6977 if test "${lt_cv_objdir+set}" = set; then
6978   echo $ECHO_N "(cached) $ECHO_C" >&6
6979 else
6980   rm -f .libs 2>/dev/null
6981 mkdir .libs 2>/dev/null
6982 if test -d .libs; then
6983   lt_cv_objdir=.libs
6984 else
6985   # MS-DOS does not allow filenames that begin with a dot.
6986   lt_cv_objdir=_libs
6987 fi
6988 rmdir .libs 2>/dev/null
6989 fi
6990 echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
6991 echo "${ECHO_T}$lt_cv_objdir" >&6
6992 objdir=$lt_cv_objdir
6993
6994
6995
6996
6997
6998 case $host_os in
6999 aix3*)
7000   # AIX sometimes has problems with the GCC collect2 program.  For some
7001   # reason, if we set the COLLECT_NAMES environment variable, the problems
7002   # vanish in a puff of smoke.
7003   if test "X${COLLECT_NAMES+set}" != Xset; then
7004     COLLECT_NAMES=
7005     export COLLECT_NAMES
7006   fi
7007   ;;
7008 esac
7009
7010 # Sed substitution that helps us do robust quoting.  It backslashifies
7011 # metacharacters that are still active within double-quoted strings.
7012 Xsed='sed -e 1s/^X//'
7013 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
7014
7015 # Same as above, but do not quote variable references.
7016 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
7017
7018 # Sed substitution to delay expansion of an escaped shell variable in a
7019 # double_quote_subst'ed string.
7020 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7021
7022 # Sed substitution to avoid accidental globbing in evaled expressions
7023 no_glob_subst='s/\*/\\\*/g'
7024
7025 # Constants:
7026 rm="rm -f"
7027
7028 # Global variables:
7029 default_ofile=libtool
7030 can_build_shared=yes
7031
7032 # All known linkers require a `.a' archive for static linking (except MSVC,
7033 # which needs '.lib').
7034 libext=a
7035 ltmain="$ac_aux_dir/ltmain.sh"
7036 ofile="$default_ofile"
7037 with_gnu_ld="$lt_cv_prog_gnu_ld"
7038
7039 if test -n "$ac_tool_prefix"; then
7040   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7041 set dummy ${ac_tool_prefix}ar; ac_word=$2
7042 echo "$as_me:$LINENO: checking for $ac_word" >&5
7043 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7044 if test "${ac_cv_prog_AR+set}" = set; then
7045   echo $ECHO_N "(cached) $ECHO_C" >&6
7046 else
7047   if test -n "$AR"; then
7048   ac_cv_prog_AR="$AR" # Let the user override the test.
7049 else
7050 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7051 for as_dir in $PATH
7052 do
7053   IFS=$as_save_IFS
7054   test -z "$as_dir" && as_dir=.
7055   for ac_exec_ext in '' $ac_executable_extensions; do
7056   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7057     ac_cv_prog_AR="${ac_tool_prefix}ar"
7058     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7059     break 2
7060   fi
7061 done
7062 done
7063
7064 fi
7065 fi
7066 AR=$ac_cv_prog_AR
7067 if test -n "$AR"; then
7068   echo "$as_me:$LINENO: result: $AR" >&5
7069 echo "${ECHO_T}$AR" >&6
7070 else
7071   echo "$as_me:$LINENO: result: no" >&5
7072 echo "${ECHO_T}no" >&6
7073 fi
7074
7075 fi
7076 if test -z "$ac_cv_prog_AR"; then
7077   ac_ct_AR=$AR
7078   # Extract the first word of "ar", so it can be a program name with args.
7079 set dummy ar; ac_word=$2
7080 echo "$as_me:$LINENO: checking for $ac_word" >&5
7081 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7082 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
7083   echo $ECHO_N "(cached) $ECHO_C" >&6
7084 else
7085   if test -n "$ac_ct_AR"; then
7086   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7087 else
7088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7089 for as_dir in $PATH
7090 do
7091   IFS=$as_save_IFS
7092   test -z "$as_dir" && as_dir=.
7093   for ac_exec_ext in '' $ac_executable_extensions; do
7094   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7095     ac_cv_prog_ac_ct_AR="ar"
7096     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7097     break 2
7098   fi
7099 done
7100 done
7101
7102   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
7103 fi
7104 fi
7105 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7106 if test -n "$ac_ct_AR"; then
7107   echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
7108 echo "${ECHO_T}$ac_ct_AR" >&6
7109 else
7110   echo "$as_me:$LINENO: result: no" >&5
7111 echo "${ECHO_T}no" >&6
7112 fi
7113
7114   AR=$ac_ct_AR
7115 else
7116   AR="$ac_cv_prog_AR"
7117 fi
7118
7119 if test -n "$ac_tool_prefix"; then
7120   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7121 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7122 echo "$as_me:$LINENO: checking for $ac_word" >&5
7123 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7124 if test "${ac_cv_prog_RANLIB+set}" = set; then
7125   echo $ECHO_N "(cached) $ECHO_C" >&6
7126 else
7127   if test -n "$RANLIB"; then
7128   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7129 else
7130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7131 for as_dir in $PATH
7132 do
7133   IFS=$as_save_IFS
7134   test -z "$as_dir" && as_dir=.
7135   for ac_exec_ext in '' $ac_executable_extensions; do
7136   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7137     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7138     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7139     break 2
7140   fi
7141 done
7142 done
7143
7144 fi
7145 fi
7146 RANLIB=$ac_cv_prog_RANLIB
7147 if test -n "$RANLIB"; then
7148   echo "$as_me:$LINENO: result: $RANLIB" >&5
7149 echo "${ECHO_T}$RANLIB" >&6
7150 else
7151   echo "$as_me:$LINENO: result: no" >&5
7152 echo "${ECHO_T}no" >&6
7153 fi
7154
7155 fi
7156 if test -z "$ac_cv_prog_RANLIB"; then
7157   ac_ct_RANLIB=$RANLIB
7158   # Extract the first word of "ranlib", so it can be a program name with args.
7159 set dummy ranlib; ac_word=$2
7160 echo "$as_me:$LINENO: checking for $ac_word" >&5
7161 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7162 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7163   echo $ECHO_N "(cached) $ECHO_C" >&6
7164 else
7165   if test -n "$ac_ct_RANLIB"; then
7166   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7167 else
7168 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7169 for as_dir in $PATH
7170 do
7171   IFS=$as_save_IFS
7172   test -z "$as_dir" && as_dir=.
7173   for ac_exec_ext in '' $ac_executable_extensions; do
7174   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7175     ac_cv_prog_ac_ct_RANLIB="ranlib"
7176     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7177     break 2
7178   fi
7179 done
7180 done
7181
7182   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7183 fi
7184 fi
7185 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7186 if test -n "$ac_ct_RANLIB"; then
7187   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7188 echo "${ECHO_T}$ac_ct_RANLIB" >&6
7189 else
7190   echo "$as_me:$LINENO: result: no" >&5
7191 echo "${ECHO_T}no" >&6
7192 fi
7193
7194   RANLIB=$ac_ct_RANLIB
7195 else
7196   RANLIB="$ac_cv_prog_RANLIB"
7197 fi
7198
7199 if test -n "$ac_tool_prefix"; then
7200   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7201 set dummy ${ac_tool_prefix}strip; ac_word=$2
7202 echo "$as_me:$LINENO: checking for $ac_word" >&5
7203 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7204 if test "${ac_cv_prog_STRIP+set}" = set; then
7205   echo $ECHO_N "(cached) $ECHO_C" >&6
7206 else
7207   if test -n "$STRIP"; then
7208   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7209 else
7210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7211 for as_dir in $PATH
7212 do
7213   IFS=$as_save_IFS
7214   test -z "$as_dir" && as_dir=.
7215   for ac_exec_ext in '' $ac_executable_extensions; do
7216   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7217     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7218     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7219     break 2
7220   fi
7221 done
7222 done
7223
7224 fi
7225 fi
7226 STRIP=$ac_cv_prog_STRIP
7227 if test -n "$STRIP"; then
7228   echo "$as_me:$LINENO: result: $STRIP" >&5
7229 echo "${ECHO_T}$STRIP" >&6
7230 else
7231   echo "$as_me:$LINENO: result: no" >&5
7232 echo "${ECHO_T}no" >&6
7233 fi
7234
7235 fi
7236 if test -z "$ac_cv_prog_STRIP"; then
7237   ac_ct_STRIP=$STRIP
7238   # Extract the first word of "strip", so it can be a program name with args.
7239 set dummy strip; ac_word=$2
7240 echo "$as_me:$LINENO: checking for $ac_word" >&5
7241 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7242 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
7243   echo $ECHO_N "(cached) $ECHO_C" >&6
7244 else
7245   if test -n "$ac_ct_STRIP"; then
7246   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7247 else
7248 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7249 for as_dir in $PATH
7250 do
7251   IFS=$as_save_IFS
7252   test -z "$as_dir" && as_dir=.
7253   for ac_exec_ext in '' $ac_executable_extensions; do
7254   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7255     ac_cv_prog_ac_ct_STRIP="strip"
7256     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7257     break 2
7258   fi
7259 done
7260 done
7261
7262   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
7263 fi
7264 fi
7265 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7266 if test -n "$ac_ct_STRIP"; then
7267   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
7268 echo "${ECHO_T}$ac_ct_STRIP" >&6
7269 else
7270   echo "$as_me:$LINENO: result: no" >&5
7271 echo "${ECHO_T}no" >&6
7272 fi
7273
7274   STRIP=$ac_ct_STRIP
7275 else
7276   STRIP="$ac_cv_prog_STRIP"
7277 fi
7278
7279
7280 old_CC="$CC"
7281 old_CFLAGS="$CFLAGS"
7282
7283 # Set sane defaults for various variables
7284 test -z "$AR" && AR=ar
7285 test -z "$AR_FLAGS" && AR_FLAGS=cru
7286 test -z "$AS" && AS=as
7287 test -z "$CC" && CC=cc
7288 test -z "$LTCC" && LTCC=$CC
7289 test -z "$DLLTOOL" && DLLTOOL=dlltool
7290 test -z "$LD" && LD=ld
7291 test -z "$LN_S" && LN_S="ln -s"
7292 test -z "$MAGIC_CMD" && MAGIC_CMD=file
7293 test -z "$NM" && NM=nm
7294 test -z "$SED" && SED=sed
7295 test -z "$OBJDUMP" && OBJDUMP=objdump
7296 test -z "$RANLIB" && RANLIB=:
7297 test -z "$STRIP" && STRIP=:
7298 test -z "$ac_objext" && ac_objext=o
7299
7300 # Determine commands to create old-style static archives.
7301 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
7302 old_postinstall_cmds='chmod 644 $oldlib'
7303 old_postuninstall_cmds=
7304
7305 if test -n "$RANLIB"; then
7306   case $host_os in
7307   openbsd*)
7308     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
7309     ;;
7310   *)
7311     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
7312     ;;
7313   esac
7314   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
7315 fi
7316
7317 for cc_temp in $compiler""; do
7318   case $cc_temp in
7319     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
7320     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
7321     \-*) ;;
7322     *) break;;
7323   esac
7324 done
7325 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
7326
7327
7328 # Only perform the check for file, if the check method requires it
7329 case $deplibs_check_method in
7330 file_magic*)
7331   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
7332     echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
7333 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
7334 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
7335   echo $ECHO_N "(cached) $ECHO_C" >&6
7336 else
7337   case $MAGIC_CMD in
7338 [\\/*] |  ?:[\\/]*)
7339   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7340   ;;
7341 *)
7342   lt_save_MAGIC_CMD="$MAGIC_CMD"
7343   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7344   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7345   for ac_dir in $ac_dummy; do
7346     IFS="$lt_save_ifs"
7347     test -z "$ac_dir" && ac_dir=.
7348     if test -f $ac_dir/${ac_tool_prefix}file; then
7349       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
7350       if test -n "$file_magic_test_file"; then
7351         case $deplibs_check_method in
7352         "file_magic "*)
7353           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7354           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7355           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7356             $EGREP "$file_magic_regex" > /dev/null; then
7357             :
7358           else
7359             cat <<EOF 1>&2
7360
7361 *** Warning: the command libtool uses to detect shared libraries,
7362 *** $file_magic_cmd, produces output that libtool cannot recognize.
7363 *** The result is that libtool may fail to recognize shared libraries
7364 *** as such.  This will affect the creation of libtool libraries that
7365 *** depend on shared libraries, but programs linked with such libtool
7366 *** libraries will work regardless of this problem.  Nevertheless, you
7367 *** may want to report the problem to your system manager and/or to
7368 *** bug-libtool@gnu.org
7369
7370 EOF
7371           fi ;;
7372         esac
7373       fi
7374       break
7375     fi
7376   done
7377   IFS="$lt_save_ifs"
7378   MAGIC_CMD="$lt_save_MAGIC_CMD"
7379   ;;
7380 esac
7381 fi
7382
7383 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7384 if test -n "$MAGIC_CMD"; then
7385   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
7386 echo "${ECHO_T}$MAGIC_CMD" >&6
7387 else
7388   echo "$as_me:$LINENO: result: no" >&5
7389 echo "${ECHO_T}no" >&6
7390 fi
7391
7392 if test -z "$lt_cv_path_MAGIC_CMD"; then
7393   if test -n "$ac_tool_prefix"; then
7394     echo "$as_me:$LINENO: checking for file" >&5
7395 echo $ECHO_N "checking for file... $ECHO_C" >&6
7396 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
7397   echo $ECHO_N "(cached) $ECHO_C" >&6
7398 else
7399   case $MAGIC_CMD in
7400 [\\/*] |  ?:[\\/]*)
7401   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7402   ;;
7403 *)
7404   lt_save_MAGIC_CMD="$MAGIC_CMD"
7405   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7406   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7407   for ac_dir in $ac_dummy; do
7408     IFS="$lt_save_ifs"
7409     test -z "$ac_dir" && ac_dir=.
7410     if test -f $ac_dir/file; then
7411       lt_cv_path_MAGIC_CMD="$ac_dir/file"
7412       if test -n "$file_magic_test_file"; then
7413         case $deplibs_check_method in
7414         "file_magic "*)
7415           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7416           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7417           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7418             $EGREP "$file_magic_regex" > /dev/null; then
7419             :
7420           else
7421             cat <<EOF 1>&2
7422
7423 *** Warning: the command libtool uses to detect shared libraries,
7424 *** $file_magic_cmd, produces output that libtool cannot recognize.
7425 *** The result is that libtool may fail to recognize shared libraries
7426 *** as such.  This will affect the creation of libtool libraries that
7427 *** depend on shared libraries, but programs linked with such libtool
7428 *** libraries will work regardless of this problem.  Nevertheless, you
7429 *** may want to report the problem to your system manager and/or to
7430 *** bug-libtool@gnu.org
7431
7432 EOF
7433           fi ;;
7434         esac
7435       fi
7436       break
7437     fi
7438   done
7439   IFS="$lt_save_ifs"
7440   MAGIC_CMD="$lt_save_MAGIC_CMD"
7441   ;;
7442 esac
7443 fi
7444
7445 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7446 if test -n "$MAGIC_CMD"; then
7447   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
7448 echo "${ECHO_T}$MAGIC_CMD" >&6
7449 else
7450   echo "$as_me:$LINENO: result: no" >&5
7451 echo "${ECHO_T}no" >&6
7452 fi
7453
7454   else
7455     MAGIC_CMD=:
7456   fi
7457 fi
7458
7459   fi
7460   ;;
7461 esac
7462
7463 enable_dlopen=yes
7464 enable_win32_dll=yes
7465
7466 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
7467 if test "${enable_libtool_lock+set}" = set; then
7468   enableval="$enable_libtool_lock"
7469
7470 fi;
7471 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
7472
7473
7474 # Check whether --with-pic or --without-pic was given.
7475 if test "${with_pic+set}" = set; then
7476   withval="$with_pic"
7477   pic_mode="$withval"
7478 else
7479   pic_mode=default
7480 fi;
7481 test -z "$pic_mode" && pic_mode=default
7482
7483 # Use C for the default configuration in the libtool script
7484 tagname=
7485 lt_save_CC="$CC"
7486 ac_ext=c
7487 ac_cpp='$CPP $CPPFLAGS'
7488 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7489 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7490 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7491
7492
7493 # Source file extension for C test sources.
7494 ac_ext=c
7495
7496 # Object file extension for compiled C test sources.
7497 objext=o
7498 objext=$objext
7499
7500 # Code to be used in simple compile tests
7501 lt_simple_compile_test_code="int some_variable = 0;\n"
7502
7503 # Code to be used in simple link tests
7504 lt_simple_link_test_code='int main(){return(0);}\n'
7505
7506
7507 # If no C compiler was specified, use CC.
7508 LTCC=${LTCC-"$CC"}
7509
7510 # Allow CC to be a program name with arguments.
7511 compiler=$CC
7512
7513
7514 # save warnings/boilerplate of simple test code
7515 ac_outfile=conftest.$ac_objext
7516 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
7517 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
7518 _lt_compiler_boilerplate=`cat conftest.err`
7519 $rm conftest*
7520
7521 ac_outfile=conftest.$ac_objext
7522 printf "$lt_simple_link_test_code" >conftest.$ac_ext
7523 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
7524 _lt_linker_boilerplate=`cat conftest.err`
7525 $rm conftest*
7526
7527
7528 #
7529 # Check for any special shared library compilation flags.
7530 #
7531 lt_prog_cc_shlib=
7532 if test "$GCC" = no; then
7533   case $host_os in
7534   sco3.2v5*)
7535     lt_prog_cc_shlib='-belf'
7536     ;;
7537   esac
7538 fi
7539 if test -n "$lt_prog_cc_shlib"; then
7540   { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
7541 echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
7542   if echo "$old_CC $old_CFLAGS " | grep "[      ]$lt_prog_cc_shlib[     ]" >/dev/null; then :
7543   else
7544     { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
7545 echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
7546     lt_cv_prog_cc_can_build_shared=no
7547   fi
7548 fi
7549
7550
7551 #
7552 # Check to make sure the static flag actually works.
7553 #
7554 echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5
7555 echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6
7556 if test "${lt_prog_compiler_static_works+set}" = set; then
7557   echo $ECHO_N "(cached) $ECHO_C" >&6
7558 else
7559   lt_prog_compiler_static_works=no
7560    save_LDFLAGS="$LDFLAGS"
7561    LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
7562    printf "$lt_simple_link_test_code" > conftest.$ac_ext
7563    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
7564      # The linker can only warn and ignore the option if not recognized
7565      # So say no if there are warnings
7566      if test -s conftest.err; then
7567        # Append any errors to the config.log.
7568        cat conftest.err 1>&5
7569        $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
7570        $SED '/^$/d' conftest.err >conftest.er2
7571        if diff conftest.exp conftest.er2 >/dev/null; then
7572          lt_prog_compiler_static_works=yes
7573        fi
7574      else
7575        lt_prog_compiler_static_works=yes
7576      fi
7577    fi
7578    $rm conftest*
7579    LDFLAGS="$save_LDFLAGS"
7580
7581 fi
7582 echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
7583 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
7584
7585 if test x"$lt_prog_compiler_static_works" = xyes; then
7586     :
7587 else
7588     lt_prog_compiler_static=
7589 fi
7590
7591
7592
7593
7594 lt_prog_compiler_no_builtin_flag=
7595
7596 if test "$GCC" = yes; then
7597   lt_prog_compiler_no_builtin_flag=' -fno-builtin'
7598
7599
7600 echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
7601 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
7602 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
7603   echo $ECHO_N "(cached) $ECHO_C" >&6
7604 else
7605   lt_cv_prog_compiler_rtti_exceptions=no
7606   ac_outfile=conftest.$ac_objext
7607    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7608    lt_compiler_flag="-fno-rtti -fno-exceptions"
7609    # Insert the option either (1) after the last *FLAGS variable, or
7610    # (2) before a word containing "conftest.", or (3) at the end.
7611    # Note that $ac_compile itself does not contain backslashes and begins
7612    # with a dollar sign (not a hyphen), so the echo should work correctly.
7613    # The option is referenced via a variable to avoid confusing sed.
7614    lt_compile=`echo "$ac_compile" | $SED \
7615    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7616    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7617    -e 's:$: $lt_compiler_flag:'`
7618    (eval echo "\"\$as_me:7618: $lt_compile\"" >&5)
7619    (eval "$lt_compile" 2>conftest.err)
7620    ac_status=$?
7621    cat conftest.err >&5
7622    echo "$as_me:7622: \$? = $ac_status" >&5
7623    if (exit $ac_status) && test -s "$ac_outfile"; then
7624      # The compiler can only warn and ignore the option if not recognized
7625      # So say no if there are warnings other than the usual output.
7626      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
7627      $SED '/^$/d' conftest.err >conftest.er2
7628      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
7629        lt_cv_prog_compiler_rtti_exceptions=yes
7630      fi
7631    fi
7632    $rm conftest*
7633
7634 fi
7635 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
7636 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
7637
7638 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
7639     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
7640 else
7641     :
7642 fi
7643
7644 fi
7645
7646 lt_prog_compiler_wl=
7647 lt_prog_compiler_pic=
7648 lt_prog_compiler_static=
7649
7650 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
7651 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
7652
7653   if test "$GCC" = yes; then
7654     lt_prog_compiler_wl='-Wl,'
7655     lt_prog_compiler_static='-static'
7656
7657     case $host_os in
7658       aix*)
7659       # All AIX code is PIC.
7660       if test "$host_cpu" = ia64; then
7661         # AIX 5 now supports IA64 processor
7662         lt_prog_compiler_static='-Bstatic'
7663       fi
7664       ;;
7665
7666     amigaos*)
7667       # FIXME: we need at least 68020 code to build shared libraries, but
7668       # adding the `-m68020' flag to GCC prevents building anything better,
7669       # like `-m68040'.
7670       lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
7671       ;;
7672
7673     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7674       # PIC is the default for these OSes.
7675       ;;
7676
7677     mingw* | pw32* | os2*)
7678       # This hack is so that the source file can tell whether it is being
7679       # built for inclusion in a dll (and should export symbols for example).
7680       lt_prog_compiler_pic='-DDLL_EXPORT'
7681       ;;
7682
7683     darwin* | rhapsody*)
7684       # PIC is the default on this platform
7685       # Common symbols not allowed in MH_DYLIB files
7686       lt_prog_compiler_pic='-fno-common'
7687       ;;
7688
7689     msdosdjgpp*)
7690       # Just because we use GCC doesn't mean we suddenly get shared libraries
7691       # on systems that don't support them.
7692       lt_prog_compiler_can_build_shared=no
7693       enable_shared=no
7694       ;;
7695
7696     sysv4*MP*)
7697       if test -d /usr/nec; then
7698         lt_prog_compiler_pic=-Kconform_pic
7699       fi
7700       ;;
7701
7702     hpux*)
7703       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7704       # not for PA HP-UX.
7705       case $host_cpu in
7706       hppa*64*|ia64*)
7707         # +Z the default
7708         ;;
7709       *)
7710         lt_prog_compiler_pic='-fPIC'
7711         ;;
7712       esac
7713       ;;
7714
7715     *)
7716       lt_prog_compiler_pic='-fPIC'
7717       ;;
7718     esac
7719   else
7720     # PORTME Check for flag to pass linker flags through the system compiler.
7721     case $host_os in
7722     aix*)
7723       lt_prog_compiler_wl='-Wl,'
7724       if test "$host_cpu" = ia64; then
7725         # AIX 5 now supports IA64 processor
7726         lt_prog_compiler_static='-Bstatic'
7727       else
7728         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
7729       fi
7730       ;;
7731       darwin*)
7732         # PIC is the default on this platform
7733         # Common symbols not allowed in MH_DYLIB files
7734        case $cc_basename in
7735          xlc*)
7736          lt_prog_compiler_pic='-qnocommon'
7737          lt_prog_compiler_wl='-Wl,'
7738          ;;
7739        esac
7740        ;;
7741
7742     mingw* | pw32* | os2*)
7743       # This hack is so that the source file can tell whether it is being
7744       # built for inclusion in a dll (and should export symbols for example).
7745       lt_prog_compiler_pic='-DDLL_EXPORT'
7746       ;;
7747
7748     hpux9* | hpux10* | hpux11*)
7749       lt_prog_compiler_wl='-Wl,'
7750       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7751       # not for PA HP-UX.
7752       case $host_cpu in
7753       hppa*64*|ia64*)
7754         # +Z the default
7755         ;;
7756       *)
7757         lt_prog_compiler_pic='+Z'
7758         ;;
7759       esac
7760       # Is there a better lt_prog_compiler_static that works with the bundled CC?
7761       lt_prog_compiler_static='${wl}-a ${wl}archive'
7762       ;;
7763
7764     irix5* | irix6* | nonstopux*)
7765       lt_prog_compiler_wl='-Wl,'
7766       # PIC (with -KPIC) is the default.
7767       lt_prog_compiler_static='-non_shared'
7768       ;;
7769
7770     newsos6)
7771       lt_prog_compiler_pic='-KPIC'
7772       lt_prog_compiler_static='-Bstatic'
7773       ;;
7774
7775     linux*)
7776       case $cc_basename in
7777       icc* | ecc*)
7778         lt_prog_compiler_wl='-Wl,'
7779         lt_prog_compiler_pic='-KPIC'
7780         lt_prog_compiler_static='-static'
7781         ;;
7782       pgcc* | pgf77* | pgf90* | pgf95*)
7783         # Portland Group compilers (*not* the Pentium gcc compiler,
7784         # which looks to be a dead project)
7785         lt_prog_compiler_wl='-Wl,'
7786         lt_prog_compiler_pic='-fpic'
7787         lt_prog_compiler_static='-Bstatic'
7788         ;;
7789       ccc*)
7790         lt_prog_compiler_wl='-Wl,'
7791         # All Alpha code is PIC.
7792         lt_prog_compiler_static='-non_shared'
7793         ;;
7794       esac
7795       ;;
7796
7797     osf3* | osf4* | osf5*)
7798       lt_prog_compiler_wl='-Wl,'
7799       # All OSF/1 code is PIC.
7800       lt_prog_compiler_static='-non_shared'
7801       ;;
7802
7803     sco3.2v5*)
7804       lt_prog_compiler_pic='-Kpic'
7805       lt_prog_compiler_static='-dn'
7806       ;;
7807
7808     solaris*)
7809       lt_prog_compiler_pic='-KPIC'
7810       lt_prog_compiler_static='-Bstatic'
7811       case $cc_basename in
7812       f77* | f90* | f95*)
7813         lt_prog_compiler_wl='-Qoption ld ';;
7814       *)
7815         lt_prog_compiler_wl='-Wl,';;
7816       esac
7817       ;;
7818
7819     sunos4*)
7820       lt_prog_compiler_wl='-Qoption ld '
7821       lt_prog_compiler_pic='-PIC'
7822       lt_prog_compiler_static='-Bstatic'
7823       ;;
7824
7825     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7826       lt_prog_compiler_wl='-Wl,'
7827       lt_prog_compiler_pic='-KPIC'
7828       lt_prog_compiler_static='-Bstatic'
7829       ;;
7830
7831     sysv4*MP*)
7832       if test -d /usr/nec ;then
7833         lt_prog_compiler_pic='-Kconform_pic'
7834         lt_prog_compiler_static='-Bstatic'
7835       fi
7836       ;;
7837
7838     unicos*)
7839       lt_prog_compiler_wl='-Wl,'
7840       lt_prog_compiler_can_build_shared=no
7841       ;;
7842
7843     uts4*)
7844       lt_prog_compiler_pic='-pic'
7845       lt_prog_compiler_static='-Bstatic'
7846       ;;
7847
7848     *)
7849       lt_prog_compiler_can_build_shared=no
7850       ;;
7851     esac
7852   fi
7853
7854 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
7855 echo "${ECHO_T}$lt_prog_compiler_pic" >&6
7856
7857 #
7858 # Check to make sure the PIC flag actually works.
7859 #
7860 if test -n "$lt_prog_compiler_pic"; then
7861
7862 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
7863 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
7864 if test "${lt_prog_compiler_pic_works+set}" = set; then
7865   echo $ECHO_N "(cached) $ECHO_C" >&6
7866 else
7867   lt_prog_compiler_pic_works=no
7868   ac_outfile=conftest.$ac_objext
7869    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7870    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
7871    # Insert the option either (1) after the last *FLAGS variable, or
7872    # (2) before a word containing "conftest.", or (3) at the end.
7873    # Note that $ac_compile itself does not contain backslashes and begins
7874    # with a dollar sign (not a hyphen), so the echo should work correctly.
7875    # The option is referenced via a variable to avoid confusing sed.
7876    lt_compile=`echo "$ac_compile" | $SED \
7877    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7878    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7879    -e 's:$: $lt_compiler_flag:'`
7880    (eval echo "\"\$as_me:7880: $lt_compile\"" >&5)
7881    (eval "$lt_compile" 2>conftest.err)
7882    ac_status=$?
7883    cat conftest.err >&5
7884    echo "$as_me:7884: \$? = $ac_status" >&5
7885    if (exit $ac_status) && test -s "$ac_outfile"; then
7886      # The compiler can only warn and ignore the option if not recognized
7887      # So say no if there are warnings other than the usual output.
7888      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
7889      $SED '/^$/d' conftest.err >conftest.er2
7890      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
7891        lt_prog_compiler_pic_works=yes
7892      fi
7893    fi
7894    $rm conftest*
7895
7896 fi
7897 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
7898 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
7899
7900 if test x"$lt_prog_compiler_pic_works" = xyes; then
7901     case $lt_prog_compiler_pic in
7902      "" | " "*) ;;
7903      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
7904      esac
7905 else
7906     lt_prog_compiler_pic=
7907      lt_prog_compiler_can_build_shared=no
7908 fi
7909
7910 fi
7911 case $host_os in
7912   # For platforms which do not support PIC, -DPIC is meaningless:
7913   *djgpp*)
7914     lt_prog_compiler_pic=
7915     ;;
7916   *)
7917     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
7918     ;;
7919 esac
7920
7921 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
7922 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
7923 if test "${lt_cv_prog_compiler_c_o+set}" = set; then
7924   echo $ECHO_N "(cached) $ECHO_C" >&6
7925 else
7926   lt_cv_prog_compiler_c_o=no
7927    $rm -r conftest 2>/dev/null
7928    mkdir conftest
7929    cd conftest
7930    mkdir out
7931    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7932
7933    lt_compiler_flag="-o out/conftest2.$ac_objext"
7934    # Insert the option either (1) after the last *FLAGS variable, or
7935    # (2) before a word containing "conftest.", or (3) at the end.
7936    # Note that $ac_compile itself does not contain backslashes and begins
7937    # with a dollar sign (not a hyphen), so the echo should work correctly.
7938    lt_compile=`echo "$ac_compile" | $SED \
7939    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7940    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7941    -e 's:$: $lt_compiler_flag:'`
7942    (eval echo "\"\$as_me:7942: $lt_compile\"" >&5)
7943    (eval "$lt_compile" 2>out/conftest.err)
7944    ac_status=$?
7945    cat out/conftest.err >&5
7946    echo "$as_me:7946: \$? = $ac_status" >&5
7947    if (exit $ac_status) && test -s out/conftest2.$ac_objext
7948    then
7949      # The compiler can only warn and ignore the option if not recognized
7950      # So say no if there are warnings
7951      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
7952      $SED '/^$/d' out/conftest.err >out/conftest.er2
7953      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
7954        lt_cv_prog_compiler_c_o=yes
7955      fi
7956    fi
7957    chmod u+w . 2>&5
7958    $rm conftest*
7959    # SGI C++ compiler will create directory out/ii_files/ for
7960    # template instantiation
7961    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
7962    $rm out/* && rmdir out
7963    cd ..
7964    rmdir conftest
7965    $rm conftest*
7966
7967 fi
7968 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
7969 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
7970
7971
7972 hard_links="nottested"
7973 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
7974   # do not overwrite the value of need_locks provided by the user
7975   echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
7976 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
7977   hard_links=yes
7978   $rm conftest*
7979   ln conftest.a conftest.b 2>/dev/null && hard_links=no
7980   touch conftest.a
7981   ln conftest.a conftest.b 2>&5 || hard_links=no
7982   ln conftest.a conftest.b 2>/dev/null && hard_links=no
7983   echo "$as_me:$LINENO: result: $hard_links" >&5
7984 echo "${ECHO_T}$hard_links" >&6
7985   if test "$hard_links" = no; then
7986     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
7987 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
7988     need_locks=warn
7989   fi
7990 else
7991   need_locks=no
7992 fi
7993
7994 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
7995 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
7996
7997   runpath_var=
7998   allow_undefined_flag=
7999   enable_shared_with_static_runtimes=no
8000   archive_cmds=
8001   archive_expsym_cmds=
8002   old_archive_From_new_cmds=
8003   old_archive_from_expsyms_cmds=
8004   export_dynamic_flag_spec=
8005   whole_archive_flag_spec=
8006   thread_safe_flag_spec=
8007   hardcode_libdir_flag_spec=
8008   hardcode_libdir_flag_spec_ld=
8009   hardcode_libdir_separator=
8010   hardcode_direct=no
8011   hardcode_minus_L=no
8012   hardcode_shlibpath_var=unsupported
8013   link_all_deplibs=unknown
8014   hardcode_automatic=no
8015   module_cmds=
8016   module_expsym_cmds=
8017   always_export_symbols=no
8018   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8019   # include_expsyms should be a list of space-separated symbols to be *always*
8020   # included in the symbol list
8021   include_expsyms=
8022   # exclude_expsyms can be an extended regexp of symbols to exclude
8023   # it will be wrapped by ` (' and `)$', so one must not match beginning or
8024   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
8025   # as well as any symbol that contains `d'.
8026   exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
8027   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8028   # platforms (ab)use it in PIC code, but their linkers get confused if
8029   # the symbol is explicitly referenced.  Since portable code cannot
8030   # rely on this symbol name, it's probably fine to never include it in
8031   # preloaded symbol tables.
8032   extract_expsyms_cmds=
8033   # Just being paranoid about ensuring that cc_basename is set.
8034   for cc_temp in $compiler""; do
8035   case $cc_temp in
8036     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8037     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8038     \-*) ;;
8039     *) break;;
8040   esac
8041 done
8042 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8043
8044   case $host_os in
8045   cygwin* | mingw* | pw32*)
8046     # FIXME: the MSVC++ port hasn't been tested in a loooong time
8047     # When not using gcc, we currently assume that we are using
8048     # Microsoft Visual C++.
8049     if test "$GCC" != yes; then
8050       with_gnu_ld=no
8051     fi
8052     ;;
8053   openbsd*)
8054     with_gnu_ld=no
8055     ;;
8056   esac
8057
8058   ld_shlibs=yes
8059   if test "$with_gnu_ld" = yes; then
8060     # If archive_cmds runs LD, not CC, wlarc should be empty
8061     wlarc='${wl}'
8062
8063     # Set some defaults for GNU ld with shared library support. These
8064     # are reset later if shared libraries are not supported. Putting them
8065     # here allows them to be overridden if necessary.
8066     runpath_var=LD_RUN_PATH
8067     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
8068     export_dynamic_flag_spec='${wl}--export-dynamic'
8069     # ancient GNU ld didn't support --whole-archive et. al.
8070     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
8071         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8072       else
8073         whole_archive_flag_spec=
8074     fi
8075     supports_anon_versioning=no
8076     case `$LD -v 2>/dev/null` in
8077       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
8078       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8079       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8080       *\ 2.11.*) ;; # other 2.11 versions
8081       *) supports_anon_versioning=yes ;;
8082     esac
8083
8084     # See if GNU ld supports shared libraries.
8085     case $host_os in
8086     aix3* | aix4* | aix5*)
8087       # On AIX/PPC, the GNU linker is very broken
8088       if test "$host_cpu" != ia64; then
8089         ld_shlibs=no
8090         cat <<EOF 1>&2
8091
8092 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
8093 *** to be unable to reliably create shared libraries on AIX.
8094 *** Therefore, libtool is disabling shared libraries support.  If you
8095 *** really care for shared libraries, you may want to modify your PATH
8096 *** so that a non-GNU linker is found, and then restart.
8097
8098 EOF
8099       fi
8100       ;;
8101
8102     amigaos*)
8103       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)'
8104       hardcode_libdir_flag_spec='-L$libdir'
8105       hardcode_minus_L=yes
8106
8107       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
8108       # that the semantics of dynamic libraries on AmigaOS, at least up
8109       # to version 4, is to share data among multiple programs linked
8110       # with the same dynamic library.  Since this doesn't match the
8111       # behavior of shared libraries on other platforms, we can't use
8112       # them.
8113       ld_shlibs=no
8114       ;;
8115
8116     beos*)
8117       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8118         allow_undefined_flag=unsupported
8119         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8120         # support --undefined.  This deserves some investigation.  FIXME
8121         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8122       else
8123         ld_shlibs=no
8124       fi
8125       ;;
8126
8127     cygwin* | mingw* | pw32*)
8128       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
8129       # as there is no search path for DLLs.
8130       hardcode_libdir_flag_spec='-L$libdir'
8131       allow_undefined_flag=unsupported
8132       always_export_symbols=no
8133       enable_shared_with_static_runtimes=yes
8134       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
8135
8136       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8137         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8138         # If the export-symbols file already is a .def file (1st line
8139         # is EXPORTS), use it as is; otherwise, prepend...
8140         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8141           cp $export_symbols $output_objdir/$soname.def;
8142         else
8143           echo EXPORTS > $output_objdir/$soname.def;
8144           cat $export_symbols >> $output_objdir/$soname.def;
8145         fi~
8146         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
8147       else
8148         ld_shlibs=no
8149       fi
8150       ;;
8151
8152     linux*)
8153       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8154         tmp_addflag=
8155         case $cc_basename,$host_cpu in
8156         pgcc*)                          # Portland Group C compiler
8157           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'
8158           tmp_addflag=' $pic_flag'
8159           ;;
8160         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
8161           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'
8162           tmp_addflag=' $pic_flag -Mnomain' ;;
8163         ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
8164           tmp_addflag=' -i_dynamic' ;;
8165         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
8166           tmp_addflag=' -i_dynamic -nofor_main' ;;
8167         ifc* | ifort*)                  # Intel Fortran compiler
8168           tmp_addflag=' -nofor_main' ;;
8169         esac
8170         archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8171
8172         if test $supports_anon_versioning = yes; then
8173           archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
8174   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8175   $echo "local: *; };" >> $output_objdir/$libname.ver~
8176           $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8177         fi
8178       else
8179         ld_shlibs=no
8180       fi
8181       ;;
8182
8183     netbsd*)
8184       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8185         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
8186         wlarc=
8187       else
8188         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8189         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8190       fi
8191       ;;
8192
8193     solaris* | sysv5*)
8194       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
8195         ld_shlibs=no
8196         cat <<EOF 1>&2
8197
8198 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
8199 *** create shared libraries on Solaris systems.  Therefore, libtool
8200 *** is disabling shared libraries support.  We urge you to upgrade GNU
8201 *** binutils to release 2.9.1 or newer.  Another option is to modify
8202 *** your PATH or compiler configuration so that the native linker is
8203 *** used, and then restart.
8204
8205 EOF
8206       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8207         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8208         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8209       else
8210         ld_shlibs=no
8211       fi
8212       ;;
8213
8214     sunos4*)
8215       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8216       wlarc=
8217       hardcode_direct=yes
8218       hardcode_shlibpath_var=no
8219       ;;
8220
8221     *)
8222       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8223         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8224         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8225       else
8226         ld_shlibs=no
8227       fi
8228       ;;
8229     esac
8230
8231     if test "$ld_shlibs" = no; then
8232       runpath_var=
8233       hardcode_libdir_flag_spec=
8234       export_dynamic_flag_spec=
8235       whole_archive_flag_spec=
8236     fi
8237   else
8238     # PORTME fill in a description of your system's linker (not GNU ld)
8239     case $host_os in
8240     aix3*)
8241       allow_undefined_flag=unsupported
8242       always_export_symbols=yes
8243       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'
8244       # Note: this linker hardcodes the directories in LIBPATH if there
8245       # are no directories specified by -L.
8246       hardcode_minus_L=yes
8247       if test "$GCC" = yes && test -z "$link_static_flag"; then
8248         # Neither direct hardcoding nor static linking is supported with a
8249         # broken collect2.
8250         hardcode_direct=unsupported
8251       fi
8252       ;;
8253
8254     aix4* | aix5*)
8255       if test "$host_cpu" = ia64; then
8256         # On IA64, the linker does run time linking by default, so we don't
8257         # have to do anything special.
8258         aix_use_runtimelinking=no
8259         exp_sym_flag='-Bexport'
8260         no_entry_flag=""
8261       else
8262         # If we're using GNU nm, then we don't want the "-C" option.
8263         # -C means demangle to AIX nm, but means don't demangle with GNU nm
8264         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
8265           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'
8266         else
8267           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'
8268         fi
8269         aix_use_runtimelinking=no
8270
8271         # Test if we are trying to use run time linking or normal
8272         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8273         # need to do runtime linking.
8274         case $host_os in aix4.[23]|aix4.[23].*|aix5*)
8275           for ld_flag in $LDFLAGS; do
8276           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
8277             aix_use_runtimelinking=yes
8278             break
8279           fi
8280           done
8281         esac
8282
8283         exp_sym_flag='-bexport'
8284         no_entry_flag='-bnoentry'
8285       fi
8286
8287       # When large executables or shared objects are built, AIX ld can
8288       # have problems creating the table of contents.  If linking a library
8289       # or program results in "error TOC overflow" add -mminimal-toc to
8290       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
8291       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8292
8293       archive_cmds=''
8294       hardcode_direct=yes
8295       hardcode_libdir_separator=':'
8296       link_all_deplibs=yes
8297
8298       if test "$GCC" = yes; then
8299         case $host_os in aix4.[012]|aix4.[012].*)
8300         # We only want to do this on AIX 4.2 and lower, the check
8301         # below for broken collect2 doesn't work under 4.3+
8302           collect2name=`${CC} -print-prog-name=collect2`
8303           if test -f "$collect2name" && \
8304            strings "$collect2name" | grep resolve_lib_name >/dev/null
8305           then
8306           # We have reworked collect2
8307           hardcode_direct=yes
8308           else
8309           # We have old collect2
8310           hardcode_direct=unsupported
8311           # It fails to find uninstalled libraries when the uninstalled
8312           # path is not listed in the libpath.  Setting hardcode_minus_L
8313           # to unsupported forces relinking
8314           hardcode_minus_L=yes
8315           hardcode_libdir_flag_spec='-L$libdir'
8316           hardcode_libdir_separator=
8317           fi
8318         esac
8319         shared_flag='-shared'
8320         if test "$aix_use_runtimelinking" = yes; then
8321           shared_flag="$shared_flag "'${wl}-G'
8322         fi
8323       else
8324         # not using gcc
8325         if test "$host_cpu" = ia64; then
8326         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8327         # chokes on -Wl,-G. The following line is correct:
8328           shared_flag='-G'
8329         else
8330         if test "$aix_use_runtimelinking" = yes; then
8331             shared_flag='${wl}-G'
8332           else
8333             shared_flag='${wl}-bM:SRE'
8334         fi
8335         fi
8336       fi
8337
8338       # It seems that -bexpall does not export symbols beginning with
8339       # underscore (_), so it is better to generate a list of symbols to export.
8340       always_export_symbols=yes
8341       if test "$aix_use_runtimelinking" = yes; then
8342         # Warning - without using the other runtime loading flags (-brtl),
8343         # -berok will link without error, but may produce a broken library.
8344         allow_undefined_flag='-berok'
8345        # Determine the default libpath from the value encoded in an empty executable.
8346        cat >conftest.$ac_ext <<_ACEOF
8347 /* confdefs.h.  */
8348 _ACEOF
8349 cat confdefs.h >>conftest.$ac_ext
8350 cat >>conftest.$ac_ext <<_ACEOF
8351 /* end confdefs.h.  */
8352
8353 int
8354 main ()
8355 {
8356
8357   ;
8358   return 0;
8359 }
8360 _ACEOF
8361 rm -f conftest.$ac_objext conftest$ac_exeext
8362 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8363   (eval $ac_link) 2>conftest.er1
8364   ac_status=$?
8365   grep -v '^ *+' conftest.er1 >conftest.err
8366   rm -f conftest.er1
8367   cat conftest.err >&5
8368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8369   (exit $ac_status); } &&
8370          { ac_try='test -z "$ac_c_werror_flag"
8371                          || test ! -s conftest.err'
8372   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8373   (eval $ac_try) 2>&5
8374   ac_status=$?
8375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8376   (exit $ac_status); }; } &&
8377          { ac_try='test -s conftest$ac_exeext'
8378   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8379   (eval $ac_try) 2>&5
8380   ac_status=$?
8381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8382   (exit $ac_status); }; }; then
8383
8384 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
8385 }'`
8386 # Check for a 64-bit object if we didn't find anything.
8387 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; }
8388 }'`; fi
8389 else
8390   echo "$as_me: failed program was:" >&5
8391 sed 's/^/| /' conftest.$ac_ext >&5
8392
8393 fi
8394 rm -f conftest.err conftest.$ac_objext \
8395       conftest$ac_exeext conftest.$ac_ext
8396 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8397
8398        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8399         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"
8400        else
8401         if test "$host_cpu" = ia64; then
8402           hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
8403           allow_undefined_flag="-z nodefs"
8404           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"
8405         else
8406          # Determine the default libpath from the value encoded in an empty executable.
8407          cat >conftest.$ac_ext <<_ACEOF
8408 /* confdefs.h.  */
8409 _ACEOF
8410 cat confdefs.h >>conftest.$ac_ext
8411 cat >>conftest.$ac_ext <<_ACEOF
8412 /* end confdefs.h.  */
8413
8414 int
8415 main ()
8416 {
8417
8418   ;
8419   return 0;
8420 }
8421 _ACEOF
8422 rm -f conftest.$ac_objext conftest$ac_exeext
8423 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8424   (eval $ac_link) 2>conftest.er1
8425   ac_status=$?
8426   grep -v '^ *+' conftest.er1 >conftest.err
8427   rm -f conftest.er1
8428   cat conftest.err >&5
8429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8430   (exit $ac_status); } &&
8431          { ac_try='test -z "$ac_c_werror_flag"
8432                          || test ! -s conftest.err'
8433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8434   (eval $ac_try) 2>&5
8435   ac_status=$?
8436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8437   (exit $ac_status); }; } &&
8438          { ac_try='test -s conftest$ac_exeext'
8439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8440   (eval $ac_try) 2>&5
8441   ac_status=$?
8442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8443   (exit $ac_status); }; }; then
8444
8445 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
8446 }'`
8447 # Check for a 64-bit object if we didn't find anything.
8448 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; }
8449 }'`; fi
8450 else
8451   echo "$as_me: failed program was:" >&5
8452 sed 's/^/| /' conftest.$ac_ext >&5
8453
8454 fi
8455 rm -f conftest.err conftest.$ac_objext \
8456       conftest$ac_exeext conftest.$ac_ext
8457 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8458
8459          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8460           # Warning - without using the other run time loading flags,
8461           # -berok will link without error, but may produce a broken library.
8462           no_undefined_flag=' ${wl}-bernotok'
8463           allow_undefined_flag=' ${wl}-berok'
8464           # -bexpall does not export symbols beginning with underscore (_)
8465           always_export_symbols=yes
8466           # Exported symbols can be pulled into shared objects from archives
8467           whole_archive_flag_spec=' '
8468           archive_cmds_need_lc=yes
8469           # This is similar to how AIX traditionally builds its shared libraries.
8470           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'
8471         fi
8472       fi
8473       ;;
8474
8475     amigaos*)
8476       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)'
8477       hardcode_libdir_flag_spec='-L$libdir'
8478       hardcode_minus_L=yes
8479       # see comment about different semantics on the GNU ld section
8480       ld_shlibs=no
8481       ;;
8482
8483     bsdi[45]*)
8484       export_dynamic_flag_spec=-rdynamic
8485       ;;
8486
8487     cygwin* | mingw* | pw32*)
8488       # When not using gcc, we currently assume that we are using
8489       # Microsoft Visual C++.
8490       # hardcode_libdir_flag_spec is actually meaningless, as there is
8491       # no search path for DLLs.
8492       hardcode_libdir_flag_spec=' '
8493       allow_undefined_flag=unsupported
8494       # Tell ltmain to make .lib files, not .a files.
8495       libext=lib
8496       # Tell ltmain to make .dll files, not .so files.
8497       shrext_cmds=".dll"
8498       # FIXME: Setting linknames here is a bad hack.
8499       archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
8500       # The linker will automatically build a .lib file if we build a DLL.
8501       old_archive_From_new_cmds='true'
8502       # FIXME: Should let the user specify the lib program.
8503       old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
8504       fix_srcfile_path='`cygpath -w "$srcfile"`'
8505       enable_shared_with_static_runtimes=yes
8506       ;;
8507
8508     darwin* | rhapsody*)
8509       case $host_os in
8510         rhapsody* | darwin1.[012])
8511          allow_undefined_flag='${wl}-undefined ${wl}suppress'
8512          ;;
8513        *) # Darwin 1.3 on
8514          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8515            allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8516          else
8517            case ${MACOSX_DEPLOYMENT_TARGET} in
8518              10.[012])
8519                allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8520                ;;
8521              10.*)
8522                allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
8523                ;;
8524            esac
8525          fi
8526          ;;
8527       esac
8528       archive_cmds_need_lc=no
8529       hardcode_direct=no
8530       hardcode_automatic=yes
8531       hardcode_shlibpath_var=unsupported
8532       whole_archive_flag_spec=''
8533       link_all_deplibs=yes
8534     if test "$GCC" = yes ; then
8535         output_verbose_link_cmd='echo'
8536         archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
8537       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8538       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8539       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}'
8540       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}'
8541     else
8542       case $cc_basename in
8543         xlc*)
8544          output_verbose_link_cmd='echo'
8545          archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
8546          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8547           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8548          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}'
8549           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}'
8550           ;;
8551        *)
8552          ld_shlibs=no
8553           ;;
8554       esac
8555     fi
8556       ;;
8557
8558     dgux*)
8559       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8560       hardcode_libdir_flag_spec='-L$libdir'
8561       hardcode_shlibpath_var=no
8562       ;;
8563
8564     freebsd1*)
8565       ld_shlibs=no
8566       ;;
8567
8568     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8569     # support.  Future versions do this automatically, but an explicit c++rt0.o
8570     # does not break anything, and helps significantly (at the cost of a little
8571     # extra space).
8572     freebsd2.2*)
8573       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
8574       hardcode_libdir_flag_spec='-R$libdir'
8575       hardcode_direct=yes
8576       hardcode_shlibpath_var=no
8577       ;;
8578
8579     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8580     freebsd2*)
8581       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8582       hardcode_direct=yes
8583       hardcode_minus_L=yes
8584       hardcode_shlibpath_var=no
8585       ;;
8586
8587     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
8588     freebsd* | kfreebsd*-gnu | dragonfly*)
8589       archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
8590       hardcode_libdir_flag_spec='-R$libdir'
8591       hardcode_direct=yes
8592       hardcode_shlibpath_var=no
8593       ;;
8594
8595     hpux9*)
8596       if test "$GCC" = yes; then
8597         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'
8598       else
8599         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'
8600       fi
8601       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8602       hardcode_libdir_separator=:
8603       hardcode_direct=yes
8604
8605       # hardcode_minus_L: Not really in the search PATH,
8606       # but as the default location of the library.
8607       hardcode_minus_L=yes
8608       export_dynamic_flag_spec='${wl}-E'
8609       ;;
8610
8611     hpux10* | hpux11*)
8612       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8613         case $host_cpu in
8614         hppa*64*|ia64*)
8615           archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8616           ;;
8617         *)
8618           archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8619           ;;
8620         esac
8621       else
8622         case $host_cpu in
8623         hppa*64*|ia64*)
8624           archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
8625           ;;
8626         *)
8627           archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
8628           ;;
8629         esac
8630       fi
8631       if test "$with_gnu_ld" = no; then
8632         case $host_cpu in
8633         hppa*64*)
8634           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8635           hardcode_libdir_flag_spec_ld='+b $libdir'
8636           hardcode_libdir_separator=:
8637           hardcode_direct=no
8638           hardcode_shlibpath_var=no
8639           ;;
8640         ia64*)
8641           hardcode_libdir_flag_spec='-L$libdir'
8642           hardcode_direct=no
8643           hardcode_shlibpath_var=no
8644
8645           # hardcode_minus_L: Not really in the search PATH,
8646           # but as the default location of the library.
8647           hardcode_minus_L=yes
8648           ;;
8649         *)
8650           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8651           hardcode_libdir_separator=:
8652           hardcode_direct=yes
8653           export_dynamic_flag_spec='${wl}-E'
8654
8655           # hardcode_minus_L: Not really in the search PATH,
8656           # but as the default location of the library.
8657           hardcode_minus_L=yes
8658           ;;
8659         esac
8660       fi
8661       ;;
8662
8663     irix5* | irix6* | nonstopux*)
8664       if test "$GCC" = yes; then
8665         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'
8666       else
8667         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'
8668         hardcode_libdir_flag_spec_ld='-rpath $libdir'
8669       fi
8670       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8671       hardcode_libdir_separator=:
8672       link_all_deplibs=yes
8673       ;;
8674
8675     netbsd*)
8676       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8677         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
8678       else
8679         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
8680       fi
8681       hardcode_libdir_flag_spec='-R$libdir'
8682       hardcode_direct=yes
8683       hardcode_shlibpath_var=no
8684       ;;
8685
8686     newsos6)
8687       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8688       hardcode_direct=yes
8689       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8690       hardcode_libdir_separator=:
8691       hardcode_shlibpath_var=no
8692       ;;
8693
8694     openbsd*)
8695       hardcode_direct=yes
8696       hardcode_shlibpath_var=no
8697       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8698         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8699         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
8700         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8701         export_dynamic_flag_spec='${wl}-E'
8702       else
8703        case $host_os in
8704          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
8705            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8706            hardcode_libdir_flag_spec='-R$libdir'
8707            ;;
8708          *)
8709            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8710            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8711            ;;
8712        esac
8713       fi
8714       ;;
8715
8716     os2*)
8717       hardcode_libdir_flag_spec='-L$libdir'
8718       hardcode_minus_L=yes
8719       allow_undefined_flag=unsupported
8720       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'
8721       old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
8722       ;;
8723
8724     osf3*)
8725       if test "$GCC" = yes; then
8726         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8727         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'
8728       else
8729         allow_undefined_flag=' -expect_unresolved \*'
8730         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'
8731       fi
8732       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8733       hardcode_libdir_separator=:
8734       ;;
8735
8736     osf4* | osf5*)      # as osf3* with the addition of -msym flag
8737       if test "$GCC" = yes; then
8738         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8739         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'
8740         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8741       else
8742         allow_undefined_flag=' -expect_unresolved \*'
8743         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'
8744         archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
8745         $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'
8746
8747         # Both c and cxx compiler support -rpath directly
8748         hardcode_libdir_flag_spec='-rpath $libdir'
8749       fi
8750       hardcode_libdir_separator=:
8751       ;;
8752
8753     sco3.2v5*)
8754       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8755       hardcode_shlibpath_var=no
8756       export_dynamic_flag_spec='${wl}-Bexport'
8757       runpath_var=LD_RUN_PATH
8758       hardcode_runpath_var=yes
8759       ;;
8760
8761     solaris*)
8762       no_undefined_flag=' -z text'
8763       if test "$GCC" = yes; then
8764         wlarc='${wl}'
8765         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8766         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8767           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
8768       else
8769         wlarc=''
8770         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8771         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8772         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8773       fi
8774       hardcode_libdir_flag_spec='-R$libdir'
8775       hardcode_shlibpath_var=no
8776       case $host_os in
8777       solaris2.[0-5] | solaris2.[0-5].*) ;;
8778       *)
8779         # The compiler driver will combine linker options so we
8780         # cannot just pass the convience library names through
8781         # without $wl, iff we do not link with $LD.
8782         # Luckily, gcc supports the same syntax we need for Sun Studio.
8783         # Supported since Solaris 2.6 (maybe 2.5.1?)
8784         case $wlarc in
8785         '')
8786           whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
8787         *)
8788           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' ;;
8789         esac ;;
8790       esac
8791       link_all_deplibs=yes
8792       ;;
8793
8794     sunos4*)
8795       if test "x$host_vendor" = xsequent; then
8796         # Use $CC to link under sequent, because it throws in some extra .o
8797         # files that make .init and .fini sections work.
8798         archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
8799       else
8800         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
8801       fi
8802       hardcode_libdir_flag_spec='-L$libdir'
8803       hardcode_direct=yes
8804       hardcode_minus_L=yes
8805       hardcode_shlibpath_var=no
8806       ;;
8807
8808     sysv4)
8809       case $host_vendor in
8810         sni)
8811           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8812           hardcode_direct=yes # is this really true???
8813         ;;
8814         siemens)
8815           ## LD is ld it makes a PLAMLIB
8816           ## CC just makes a GrossModule.
8817           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8818           reload_cmds='$CC -r -o $output$reload_objs'
8819           hardcode_direct=no
8820         ;;
8821         motorola)
8822           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8823           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
8824         ;;
8825       esac
8826       runpath_var='LD_RUN_PATH'
8827       hardcode_shlibpath_var=no
8828       ;;
8829
8830     sysv4.3*)
8831       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8832       hardcode_shlibpath_var=no
8833       export_dynamic_flag_spec='-Bexport'
8834       ;;
8835
8836     sysv4*MP*)
8837       if test -d /usr/nec; then
8838         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8839         hardcode_shlibpath_var=no
8840         runpath_var=LD_RUN_PATH
8841         hardcode_runpath_var=yes
8842         ld_shlibs=yes
8843       fi
8844       ;;
8845
8846     sysv4.2uw2*)
8847       archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8848       hardcode_direct=yes
8849       hardcode_minus_L=no
8850       hardcode_shlibpath_var=no
8851       hardcode_runpath_var=yes
8852       runpath_var=LD_RUN_PATH
8853       ;;
8854
8855    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
8856       no_undefined_flag='${wl}-z ${wl}text'
8857       if test "$GCC" = yes; then
8858         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8859       else
8860         archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8861       fi
8862       runpath_var='LD_RUN_PATH'
8863       hardcode_shlibpath_var=no
8864       ;;
8865
8866     sysv5*)
8867       no_undefined_flag=' -z text'
8868       # $CC -shared without GNU ld will not create a library from C++
8869       # object files and a static libstdc++, better avoid it by now
8870       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8871       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8872                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8873       hardcode_libdir_flag_spec=
8874       hardcode_shlibpath_var=no
8875       runpath_var='LD_RUN_PATH'
8876       ;;
8877
8878     uts4*)
8879       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8880       hardcode_libdir_flag_spec='-L$libdir'
8881       hardcode_shlibpath_var=no
8882       ;;
8883
8884     *)
8885       ld_shlibs=no
8886       ;;
8887     esac
8888   fi
8889
8890 echo "$as_me:$LINENO: result: $ld_shlibs" >&5
8891 echo "${ECHO_T}$ld_shlibs" >&6
8892 test "$ld_shlibs" = no && can_build_shared=no
8893
8894 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
8895 if test "$GCC" = yes; then
8896   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
8897 fi
8898
8899 #
8900 # Do we need to explicitly link libc?
8901 #
8902 case "x$archive_cmds_need_lc" in
8903 x|xyes)
8904   # Assume -lc should be added
8905   archive_cmds_need_lc=yes
8906
8907   if test "$enable_shared" = yes && test "$GCC" = yes; then
8908     case $archive_cmds in
8909     *'~'*)
8910       # FIXME: we may have to deal with multi-command sequences.
8911       ;;
8912     '$CC '*)
8913       # Test whether the compiler implicitly links with -lc since on some
8914       # systems, -lgcc has to come before -lc. If gcc already passes -lc
8915       # to ld, don't add -lc before -lgcc.
8916       echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
8917 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
8918       $rm conftest*
8919       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8920
8921       if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8922   (eval $ac_compile) 2>&5
8923   ac_status=$?
8924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8925   (exit $ac_status); } 2>conftest.err; then
8926         soname=conftest
8927         lib=conftest
8928         libobjs=conftest.$ac_objext
8929         deplibs=
8930         wl=$lt_prog_compiler_wl
8931         compiler_flags=-v
8932         linker_flags=-v
8933         verstring=
8934         output_objdir=.
8935         libname=conftest
8936         lt_save_allow_undefined_flag=$allow_undefined_flag
8937         allow_undefined_flag=
8938         if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
8939   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
8940   ac_status=$?
8941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8942   (exit $ac_status); }
8943         then
8944           archive_cmds_need_lc=no
8945         else
8946           archive_cmds_need_lc=yes
8947         fi
8948         allow_undefined_flag=$lt_save_allow_undefined_flag
8949       else
8950         cat conftest.err 1>&5
8951       fi
8952       $rm conftest*
8953       echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
8954 echo "${ECHO_T}$archive_cmds_need_lc" >&6
8955       ;;
8956     esac
8957   fi
8958   ;;
8959 esac
8960
8961 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
8962 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
8963 library_names_spec=
8964 libname_spec='lib$name'
8965 soname_spec=
8966 shrext_cmds=".so"
8967 postinstall_cmds=
8968 postuninstall_cmds=
8969 finish_cmds=
8970 finish_eval=
8971 shlibpath_var=
8972 shlibpath_overrides_runpath=unknown
8973 version_type=none
8974 dynamic_linker="$host_os ld.so"
8975 sys_lib_dlsearch_path_spec="/lib /usr/lib"
8976 if test "$GCC" = yes; then
8977   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
8978   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
8979     # if the path contains ";" then we assume it to be the separator
8980     # otherwise default to the standard path separator (i.e. ":") - it is
8981     # assumed that no part of a normal pathname contains ";" but that should
8982     # okay in the real world where ";" in dirpaths is itself problematic.
8983     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
8984   else
8985     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
8986   fi
8987 else
8988   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
8989 fi
8990 need_lib_prefix=unknown
8991 hardcode_into_libs=no
8992
8993 # when you set need_version to no, make sure it does not cause -set_version
8994 # flags to be left without arguments
8995 need_version=unknown
8996
8997 case $host_os in
8998 aix3*)
8999   version_type=linux
9000   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
9001   shlibpath_var=LIBPATH
9002
9003   # AIX 3 has no versioning support, so we append a major version to the name.
9004   soname_spec='${libname}${release}${shared_ext}$major'
9005   ;;
9006
9007 aix4* | aix5*)
9008   version_type=linux
9009   need_lib_prefix=no
9010   need_version=no
9011   hardcode_into_libs=yes
9012   if test "$host_cpu" = ia64; then
9013     # AIX 5 supports IA64
9014     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
9015     shlibpath_var=LD_LIBRARY_PATH
9016   else
9017     # With GCC up to 2.95.x, collect2 would create an import file
9018     # for dependence libraries.  The import file would start with
9019     # the line `#! .'.  This would cause the generated library to
9020     # depend on `.', always an invalid library.  This was fixed in
9021     # development snapshots of GCC prior to 3.0.
9022     case $host_os in
9023       aix4 | aix4.[01] | aix4.[01].*)
9024       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
9025            echo ' yes '
9026            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
9027         :
9028       else
9029         can_build_shared=no
9030       fi
9031       ;;
9032     esac
9033     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
9034     # soname into executable. Probably we can add versioning support to
9035     # collect2, so additional links can be useful in future.
9036     if test "$aix_use_runtimelinking" = yes; then
9037       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
9038       # instead of lib<name>.a to let people know that these are not
9039       # typical AIX shared libraries.
9040       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9041     else
9042       # We preserve .a as extension for shared libraries through AIX4.2
9043       # and later when we are not doing run time linking.
9044       library_names_spec='${libname}${release}.a $libname.a'
9045       soname_spec='${libname}${release}${shared_ext}$major'
9046     fi
9047     shlibpath_var=LIBPATH
9048   fi
9049   ;;
9050
9051 amigaos*)
9052   library_names_spec='$libname.ixlibrary $libname.a'
9053   # Create ${libname}_ixlibrary.a entries in /sys/libs.
9054   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'
9055   ;;
9056
9057 beos*)
9058   library_names_spec='${libname}${shared_ext}'
9059   dynamic_linker="$host_os ld.so"
9060   shlibpath_var=LIBRARY_PATH
9061   ;;
9062
9063 bsdi[45]*)
9064   version_type=linux
9065   need_version=no
9066   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9067   soname_spec='${libname}${release}${shared_ext}$major'
9068   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
9069   shlibpath_var=LD_LIBRARY_PATH
9070   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
9071   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
9072   # the default ld.so.conf also contains /usr/contrib/lib and
9073   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
9074   # libtool to hard-code these into programs
9075   ;;
9076
9077 cygwin* | mingw* | pw32*)
9078   version_type=windows
9079   shrext_cmds=".dll"
9080   need_version=no
9081   need_lib_prefix=no
9082
9083   case $GCC,$host_os in
9084   yes,cygwin* | yes,mingw* | yes,pw32*)
9085     library_names_spec='$libname.dll.a'
9086     # DLL is installed to $(libdir)/../bin by postinstall_cmds
9087     postinstall_cmds='base_file=`basename \${file}`~
9088       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
9089       dldir=$destdir/`dirname \$dlpath`~
9090       test -d \$dldir || mkdir -p \$dldir~
9091       $install_prog $dir/$dlname \$dldir/$dlname~
9092       chmod a+x \$dldir/$dlname'
9093     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
9094       dlpath=$dir/\$dldll~
9095        $rm \$dlpath'
9096     shlibpath_overrides_runpath=yes
9097
9098     case $host_os in
9099     cygwin*)
9100       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
9101       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9102       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
9103       ;;
9104     mingw*)
9105       # MinGW DLLs use traditional 'lib' prefix
9106       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9107       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9108       if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
9109         # It is most probably a Windows format PATH printed by
9110         # mingw gcc, but we are running on Cygwin. Gcc prints its search
9111         # path with ; separators, and with drive letters. We can handle the
9112         # drive letters (cygwin fileutils understands them), so leave them,
9113         # especially as we might pass files found there to a mingw objdump,
9114         # which wouldn't understand a cygwinified path. Ahh.
9115         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9116       else
9117         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
9118       fi
9119       ;;
9120     pw32*)
9121       # pw32 DLLs use 'pw' prefix rather than 'lib'
9122       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9123       ;;
9124     esac
9125     ;;
9126
9127   *)
9128     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
9129     ;;
9130   esac
9131   dynamic_linker='Win32 ld.exe'
9132   # FIXME: first we should search . and the directory the executable is in
9133   shlibpath_var=PATH
9134   ;;
9135
9136 darwin* | rhapsody*)
9137   dynamic_linker="$host_os dyld"
9138   version_type=darwin
9139   need_lib_prefix=no
9140   need_version=no
9141   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
9142   soname_spec='${libname}${release}${major}$shared_ext'
9143   shlibpath_overrides_runpath=yes
9144   shlibpath_var=DYLD_LIBRARY_PATH
9145   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
9146   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
9147   if test "$GCC" = yes; then
9148     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"`
9149   else
9150     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
9151   fi
9152   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
9153   ;;
9154
9155 dgux*)
9156   version_type=linux
9157   need_lib_prefix=no
9158   need_version=no
9159   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
9160   soname_spec='${libname}${release}${shared_ext}$major'
9161   shlibpath_var=LD_LIBRARY_PATH
9162   ;;
9163
9164 freebsd1*)
9165   dynamic_linker=no
9166   ;;
9167
9168 kfreebsd*-gnu)
9169   version_type=linux
9170   need_lib_prefix=no
9171   need_version=no
9172   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9173   soname_spec='${libname}${release}${shared_ext}$major'
9174   shlibpath_var=LD_LIBRARY_PATH
9175   shlibpath_overrides_runpath=no
9176   hardcode_into_libs=yes
9177   dynamic_linker='GNU ld.so'
9178   ;;
9179
9180 freebsd* | dragonfly*)
9181   # DragonFly does not have aout.  When/if they implement a new
9182   # versioning mechanism, adjust this.
9183   if test -x /usr/bin/objformat; then
9184     objformat=`/usr/bin/objformat`
9185   else
9186     case $host_os in
9187     freebsd[123]*) objformat=aout ;;
9188     *) objformat=elf ;;
9189     esac
9190   fi
9191   version_type=freebsd-$objformat
9192   case $version_type in
9193     freebsd-elf*)
9194       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
9195       need_version=no
9196       need_lib_prefix=no
9197       ;;
9198     freebsd-*)
9199       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
9200       need_version=yes
9201       ;;
9202   esac
9203   shlibpath_var=LD_LIBRARY_PATH
9204   case $host_os in
9205   freebsd2*)
9206     shlibpath_overrides_runpath=yes
9207     ;;
9208   freebsd3.[01]* | freebsdelf3.[01]*)
9209     shlibpath_overrides_runpath=yes
9210     hardcode_into_libs=yes
9211     ;;
9212   *) # from 3.2 on
9213     shlibpath_overrides_runpath=no
9214     hardcode_into_libs=yes
9215     ;;
9216   esac
9217   ;;
9218
9219 gnu*)
9220   version_type=linux
9221   need_lib_prefix=no
9222   need_version=no
9223   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
9224   soname_spec='${libname}${release}${shared_ext}$major'
9225   shlibpath_var=LD_LIBRARY_PATH
9226   hardcode_into_libs=yes
9227   ;;
9228
9229 hpux9* | hpux10* | hpux11*)
9230   # Give a soname corresponding to the major version so that dld.sl refuses to
9231   # link against other versions.
9232   version_type=sunos
9233   need_lib_prefix=no
9234   need_version=no
9235   case $host_cpu in
9236   ia64*)
9237     shrext_cmds='.so'
9238     hardcode_into_libs=yes
9239     dynamic_linker="$host_os dld.so"
9240     shlibpath_var=LD_LIBRARY_PATH
9241     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9242     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9243     soname_spec='${libname}${release}${shared_ext}$major'
9244     if test "X$HPUX_IA64_MODE" = X32; then
9245       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
9246     else
9247       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
9248     fi
9249     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9250     ;;
9251    hppa*64*)
9252      shrext_cmds='.sl'
9253      hardcode_into_libs=yes
9254      dynamic_linker="$host_os dld.sl"
9255      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
9256      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9257      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9258      soname_spec='${libname}${release}${shared_ext}$major'
9259      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
9260      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9261      ;;
9262    *)
9263     shrext_cmds='.sl'
9264     dynamic_linker="$host_os dld.sl"
9265     shlibpath_var=SHLIB_PATH
9266     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
9267     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9268     soname_spec='${libname}${release}${shared_ext}$major'
9269     ;;
9270   esac
9271   # HP-UX runs *really* slowly unless shared libraries are mode 555.
9272   postinstall_cmds='chmod 555 $lib'
9273   ;;
9274
9275 irix5* | irix6* | nonstopux*)
9276   case $host_os in
9277     nonstopux*) version_type=nonstopux ;;
9278     *)
9279         if test "$lt_cv_prog_gnu_ld" = yes; then
9280                 version_type=linux
9281         else
9282                 version_type=irix
9283         fi ;;
9284   esac
9285   need_lib_prefix=no
9286   need_version=no
9287   soname_spec='${libname}${release}${shared_ext}$major'
9288   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
9289   case $host_os in
9290   irix5* | nonstopux*)
9291     libsuff= shlibsuff=
9292     ;;
9293   *)
9294     case $LD in # libtool.m4 will add one of these switches to LD
9295     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
9296       libsuff= shlibsuff= libmagic=32-bit;;
9297     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
9298       libsuff=32 shlibsuff=N32 libmagic=N32;;
9299     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
9300       libsuff=64 shlibsuff=64 libmagic=64-bit;;
9301     *) libsuff= shlibsuff= libmagic=never-match;;
9302     esac
9303     ;;
9304   esac
9305   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
9306   shlibpath_overrides_runpath=no
9307   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
9308   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
9309   hardcode_into_libs=yes
9310   ;;
9311
9312 # No shared lib support for Linux oldld, aout, or coff.
9313 linux*oldld* | linux*aout* | linux*coff*)
9314   dynamic_linker=no
9315   ;;
9316
9317 # This must be Linux ELF.
9318 linux*)
9319   version_type=linux
9320   need_lib_prefix=no
9321   need_version=no
9322   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9323   soname_spec='${libname}${release}${shared_ext}$major'
9324   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
9325   shlibpath_var=LD_LIBRARY_PATH
9326   shlibpath_overrides_runpath=no
9327   # This implies no fast_install, which is unacceptable.
9328   # Some rework will be needed to allow for fast_install
9329   # before this can be enabled.
9330   hardcode_into_libs=yes
9331
9332   # Append ld.so.conf contents to the search path
9333   if test -f /etc/ld.so.conf; then
9334     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' ' '`
9335     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
9336   fi
9337
9338   # We used to test for /lib/ld.so.1 and disable shared libraries on
9339   # powerpc, because MkLinux only supported shared libraries with the
9340   # GNU dynamic linker.  Since this was broken with cross compilers,
9341   # most powerpc-linux boxes support dynamic linking these days and
9342   # people can always --disable-shared, the test was removed, and we
9343   # assume the GNU/Linux dynamic linker is in use.
9344   dynamic_linker='GNU/Linux ld.so'
9345   ;;
9346
9347 knetbsd*-gnu)
9348   version_type=linux
9349   need_lib_prefix=no
9350   need_version=no
9351   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9352   soname_spec='${libname}${release}${shared_ext}$major'
9353   shlibpath_var=LD_LIBRARY_PATH
9354   shlibpath_overrides_runpath=no
9355   hardcode_into_libs=yes
9356   dynamic_linker='GNU ld.so'
9357   ;;
9358
9359 netbsd*)
9360   version_type=sunos
9361   need_lib_prefix=no
9362   need_version=no
9363   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9364     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9365     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9366     dynamic_linker='NetBSD (a.out) ld.so'
9367   else
9368     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9369     soname_spec='${libname}${release}${shared_ext}$major'
9370     dynamic_linker='NetBSD ld.elf_so'
9371   fi
9372   shlibpath_var=LD_LIBRARY_PATH
9373   shlibpath_overrides_runpath=yes
9374   hardcode_into_libs=yes
9375   ;;
9376
9377 newsos6)
9378   version_type=linux
9379   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9380   shlibpath_var=LD_LIBRARY_PATH
9381   shlibpath_overrides_runpath=yes
9382   ;;
9383
9384 nto-qnx*)
9385   version_type=linux
9386   need_lib_prefix=no
9387   need_version=no
9388   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9389   soname_spec='${libname}${release}${shared_ext}$major'
9390   shlibpath_var=LD_LIBRARY_PATH
9391   shlibpath_overrides_runpath=yes
9392   ;;
9393
9394 openbsd*)
9395   version_type=sunos
9396   need_lib_prefix=no
9397   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
9398   case $host_os in
9399     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
9400     *)                         need_version=no  ;;
9401   esac
9402   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9403   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9404   shlibpath_var=LD_LIBRARY_PATH
9405   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9406     case $host_os in
9407       openbsd2.[89] | openbsd2.[89].*)
9408         shlibpath_overrides_runpath=no
9409         ;;
9410       *)
9411         shlibpath_overrides_runpath=yes
9412         ;;
9413       esac
9414   else
9415     shlibpath_overrides_runpath=yes
9416   fi
9417   ;;
9418
9419 os2*)
9420   libname_spec='$name'
9421   shrext_cmds=".dll"
9422   need_lib_prefix=no
9423   library_names_spec='$libname${shared_ext} $libname.a'
9424   dynamic_linker='OS/2 ld.exe'
9425   shlibpath_var=LIBPATH
9426   ;;
9427
9428 osf3* | osf4* | osf5*)
9429   version_type=osf
9430   need_lib_prefix=no
9431   need_version=no
9432   soname_spec='${libname}${release}${shared_ext}$major'
9433   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9434   shlibpath_var=LD_LIBRARY_PATH
9435   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
9436   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
9437   ;;
9438
9439 sco3.2v5*)
9440   version_type=osf
9441   soname_spec='${libname}${release}${shared_ext}$major'
9442   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9443   shlibpath_var=LD_LIBRARY_PATH
9444   ;;
9445
9446 solaris*)
9447   version_type=linux
9448   need_lib_prefix=no
9449   need_version=no
9450   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9451   soname_spec='${libname}${release}${shared_ext}$major'
9452   shlibpath_var=LD_LIBRARY_PATH
9453   shlibpath_overrides_runpath=yes
9454   hardcode_into_libs=yes
9455   # ldd complains unless libraries are executable
9456   postinstall_cmds='chmod +x $lib'
9457   ;;
9458
9459 sunos4*)
9460   version_type=sunos
9461   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9462   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
9463   shlibpath_var=LD_LIBRARY_PATH
9464   shlibpath_overrides_runpath=yes
9465   if test "$with_gnu_ld" = yes; then
9466     need_lib_prefix=no
9467   fi
9468   need_version=yes
9469   ;;
9470
9471 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9472   version_type=linux
9473   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9474   soname_spec='${libname}${release}${shared_ext}$major'
9475   shlibpath_var=LD_LIBRARY_PATH
9476   case $host_vendor in
9477     sni)
9478       shlibpath_overrides_runpath=no
9479       need_lib_prefix=no
9480       export_dynamic_flag_spec='${wl}-Blargedynsym'
9481       runpath_var=LD_RUN_PATH
9482       ;;
9483     siemens)
9484       need_lib_prefix=no
9485       ;;
9486     motorola)
9487       need_lib_prefix=no
9488       need_version=no
9489       shlibpath_overrides_runpath=no
9490       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
9491       ;;
9492   esac
9493   ;;
9494
9495 sysv4*MP*)
9496   if test -d /usr/nec ;then
9497     version_type=linux
9498     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
9499     soname_spec='$libname${shared_ext}.$major'
9500     shlibpath_var=LD_LIBRARY_PATH
9501   fi
9502   ;;
9503
9504 uts4*)
9505   version_type=linux
9506   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9507   soname_spec='${libname}${release}${shared_ext}$major'
9508   shlibpath_var=LD_LIBRARY_PATH
9509   ;;
9510
9511 *)
9512   dynamic_linker=no
9513   ;;
9514 esac
9515 echo "$as_me:$LINENO: result: $dynamic_linker" >&5
9516 echo "${ECHO_T}$dynamic_linker" >&6
9517 test "$dynamic_linker" = no && can_build_shared=no
9518
9519 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
9520 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
9521 hardcode_action=
9522 if test -n "$hardcode_libdir_flag_spec" || \
9523    test -n "$runpath_var" || \
9524    test "X$hardcode_automatic" = "Xyes" ; then
9525
9526   # We can hardcode non-existant directories.
9527   if test "$hardcode_direct" != no &&
9528      # If the only mechanism to avoid hardcoding is shlibpath_var, we
9529      # have to relink, otherwise we might link with an installed library
9530      # when we should be linking with a yet-to-be-installed one
9531      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
9532      test "$hardcode_minus_L" != no; then
9533     # Linking always hardcodes the temporary library directory.
9534     hardcode_action=relink
9535   else
9536     # We can link without hardcoding, and we can hardcode nonexisting dirs.
9537     hardcode_action=immediate
9538   fi
9539 else
9540   # We cannot hardcode anything, or else we can only hardcode existing
9541   # directories.
9542   hardcode_action=unsupported
9543 fi
9544 echo "$as_me:$LINENO: result: $hardcode_action" >&5
9545 echo "${ECHO_T}$hardcode_action" >&6
9546
9547 if test "$hardcode_action" = relink; then
9548   # Fast installation is not supported
9549   enable_fast_install=no
9550 elif test "$shlibpath_overrides_runpath" = yes ||
9551      test "$enable_shared" = no; then
9552   # Fast installation is not necessary
9553   enable_fast_install=needless
9554 fi
9555
9556 striplib=
9557 old_striplib=
9558 echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
9559 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
9560 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
9561   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
9562   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
9563   echo "$as_me:$LINENO: result: yes" >&5
9564 echo "${ECHO_T}yes" >&6
9565 else
9566 # FIXME - insert some real tests, host_os isn't really good enough
9567   case $host_os in
9568    darwin*)
9569        if test -n "$STRIP" ; then
9570          striplib="$STRIP -x"
9571          echo "$as_me:$LINENO: result: yes" >&5
9572 echo "${ECHO_T}yes" >&6
9573        else
9574   echo "$as_me:$LINENO: result: no" >&5
9575 echo "${ECHO_T}no" >&6
9576 fi
9577        ;;
9578    *)
9579   echo "$as_me:$LINENO: result: no" >&5
9580 echo "${ECHO_T}no" >&6
9581     ;;
9582   esac
9583 fi
9584
9585 if test "x$enable_dlopen" != xyes; then
9586   enable_dlopen=unknown
9587   enable_dlopen_self=unknown
9588   enable_dlopen_self_static=unknown
9589 else
9590   lt_cv_dlopen=no
9591   lt_cv_dlopen_libs=
9592
9593   case $host_os in
9594   beos*)
9595     lt_cv_dlopen="load_add_on"
9596     lt_cv_dlopen_libs=
9597     lt_cv_dlopen_self=yes
9598     ;;
9599
9600   mingw* | pw32*)
9601     lt_cv_dlopen="LoadLibrary"
9602     lt_cv_dlopen_libs=
9603    ;;
9604
9605   cygwin*)
9606     lt_cv_dlopen="dlopen"
9607     lt_cv_dlopen_libs=
9608    ;;
9609
9610   darwin*)
9611   # if libdl is installed we need to link against it
9612     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9613 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9614 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9615   echo $ECHO_N "(cached) $ECHO_C" >&6
9616 else
9617   ac_check_lib_save_LIBS=$LIBS
9618 LIBS="-ldl  $LIBS"
9619 cat >conftest.$ac_ext <<_ACEOF
9620 /* confdefs.h.  */
9621 _ACEOF
9622 cat confdefs.h >>conftest.$ac_ext
9623 cat >>conftest.$ac_ext <<_ACEOF
9624 /* end confdefs.h.  */
9625
9626 /* Override any gcc2 internal prototype to avoid an error.  */
9627 #ifdef __cplusplus
9628 extern "C"
9629 #endif
9630 /* We use char because int might match the return type of a gcc2
9631    builtin and then its argument prototype would still apply.  */
9632 char dlopen ();
9633 int
9634 main ()
9635 {
9636 dlopen ();
9637   ;
9638   return 0;
9639 }
9640 _ACEOF
9641 rm -f conftest.$ac_objext conftest$ac_exeext
9642 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9643   (eval $ac_link) 2>conftest.er1
9644   ac_status=$?
9645   grep -v '^ *+' conftest.er1 >conftest.err
9646   rm -f conftest.er1
9647   cat conftest.err >&5
9648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9649   (exit $ac_status); } &&
9650          { ac_try='test -z "$ac_c_werror_flag"
9651                          || test ! -s conftest.err'
9652   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9653   (eval $ac_try) 2>&5
9654   ac_status=$?
9655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9656   (exit $ac_status); }; } &&
9657          { ac_try='test -s conftest$ac_exeext'
9658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9659   (eval $ac_try) 2>&5
9660   ac_status=$?
9661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9662   (exit $ac_status); }; }; then
9663   ac_cv_lib_dl_dlopen=yes
9664 else
9665   echo "$as_me: failed program was:" >&5
9666 sed 's/^/| /' conftest.$ac_ext >&5
9667
9668 ac_cv_lib_dl_dlopen=no
9669 fi
9670 rm -f conftest.err conftest.$ac_objext \
9671       conftest$ac_exeext conftest.$ac_ext
9672 LIBS=$ac_check_lib_save_LIBS
9673 fi
9674 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9675 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9676 if test $ac_cv_lib_dl_dlopen = yes; then
9677   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
9678 else
9679
9680     lt_cv_dlopen="dyld"
9681     lt_cv_dlopen_libs=
9682     lt_cv_dlopen_self=yes
9683
9684 fi
9685
9686    ;;
9687
9688   *)
9689     echo "$as_me:$LINENO: checking for shl_load" >&5
9690 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
9691 if test "${ac_cv_func_shl_load+set}" = set; then
9692   echo $ECHO_N "(cached) $ECHO_C" >&6
9693 else
9694   cat >conftest.$ac_ext <<_ACEOF
9695 /* confdefs.h.  */
9696 _ACEOF
9697 cat confdefs.h >>conftest.$ac_ext
9698 cat >>conftest.$ac_ext <<_ACEOF
9699 /* end confdefs.h.  */
9700 /* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
9701    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9702 #define shl_load innocuous_shl_load
9703
9704 /* System header to define __stub macros and hopefully few prototypes,
9705     which can conflict with char shl_load (); below.
9706     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9707     <limits.h> exists even on freestanding compilers.  */
9708
9709 #ifdef __STDC__
9710 # include <limits.h>
9711 #else
9712 # include <assert.h>
9713 #endif
9714
9715 #undef shl_load
9716
9717 /* Override any gcc2 internal prototype to avoid an error.  */
9718 #ifdef __cplusplus
9719 extern "C"
9720 {
9721 #endif
9722 /* We use char because int might match the return type of a gcc2
9723    builtin and then its argument prototype would still apply.  */
9724 char shl_load ();
9725 /* The GNU C library defines this for functions which it implements
9726     to always fail with ENOSYS.  Some functions are actually named
9727     something starting with __ and the normal name is an alias.  */
9728 #if defined (__stub_shl_load) || defined (__stub___shl_load)
9729 choke me
9730 #else
9731 char (*f) () = shl_load;
9732 #endif
9733 #ifdef __cplusplus
9734 }
9735 #endif
9736
9737 int
9738 main ()
9739 {
9740 return f != shl_load;
9741   ;
9742   return 0;
9743 }
9744 _ACEOF
9745 rm -f conftest.$ac_objext conftest$ac_exeext
9746 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9747   (eval $ac_link) 2>conftest.er1
9748   ac_status=$?
9749   grep -v '^ *+' conftest.er1 >conftest.err
9750   rm -f conftest.er1
9751   cat conftest.err >&5
9752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9753   (exit $ac_status); } &&
9754          { ac_try='test -z "$ac_c_werror_flag"
9755                          || test ! -s conftest.err'
9756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9757   (eval $ac_try) 2>&5
9758   ac_status=$?
9759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9760   (exit $ac_status); }; } &&
9761          { ac_try='test -s conftest$ac_exeext'
9762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9763   (eval $ac_try) 2>&5
9764   ac_status=$?
9765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9766   (exit $ac_status); }; }; then
9767   ac_cv_func_shl_load=yes
9768 else
9769   echo "$as_me: failed program was:" >&5
9770 sed 's/^/| /' conftest.$ac_ext >&5
9771
9772 ac_cv_func_shl_load=no
9773 fi
9774 rm -f conftest.err conftest.$ac_objext \
9775       conftest$ac_exeext conftest.$ac_ext
9776 fi
9777 echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
9778 echo "${ECHO_T}$ac_cv_func_shl_load" >&6
9779 if test $ac_cv_func_shl_load = yes; then
9780   lt_cv_dlopen="shl_load"
9781 else
9782   echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9783 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9784 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9785   echo $ECHO_N "(cached) $ECHO_C" >&6
9786 else
9787   ac_check_lib_save_LIBS=$LIBS
9788 LIBS="-ldld  $LIBS"
9789 cat >conftest.$ac_ext <<_ACEOF
9790 /* confdefs.h.  */
9791 _ACEOF
9792 cat confdefs.h >>conftest.$ac_ext
9793 cat >>conftest.$ac_ext <<_ACEOF
9794 /* end confdefs.h.  */
9795
9796 /* Override any gcc2 internal prototype to avoid an error.  */
9797 #ifdef __cplusplus
9798 extern "C"
9799 #endif
9800 /* We use char because int might match the return type of a gcc2
9801    builtin and then its argument prototype would still apply.  */
9802 char shl_load ();
9803 int
9804 main ()
9805 {
9806 shl_load ();
9807   ;
9808   return 0;
9809 }
9810 _ACEOF
9811 rm -f conftest.$ac_objext conftest$ac_exeext
9812 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9813   (eval $ac_link) 2>conftest.er1
9814   ac_status=$?
9815   grep -v '^ *+' conftest.er1 >conftest.err
9816   rm -f conftest.er1
9817   cat conftest.err >&5
9818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9819   (exit $ac_status); } &&
9820          { ac_try='test -z "$ac_c_werror_flag"
9821                          || test ! -s conftest.err'
9822   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9823   (eval $ac_try) 2>&5
9824   ac_status=$?
9825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9826   (exit $ac_status); }; } &&
9827          { ac_try='test -s conftest$ac_exeext'
9828   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9829   (eval $ac_try) 2>&5
9830   ac_status=$?
9831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9832   (exit $ac_status); }; }; then
9833   ac_cv_lib_dld_shl_load=yes
9834 else
9835   echo "$as_me: failed program was:" >&5
9836 sed 's/^/| /' conftest.$ac_ext >&5
9837
9838 ac_cv_lib_dld_shl_load=no
9839 fi
9840 rm -f conftest.err conftest.$ac_objext \
9841       conftest$ac_exeext conftest.$ac_ext
9842 LIBS=$ac_check_lib_save_LIBS
9843 fi
9844 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9845 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9846 if test $ac_cv_lib_dld_shl_load = yes; then
9847   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
9848 else
9849   echo "$as_me:$LINENO: checking for dlopen" >&5
9850 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
9851 if test "${ac_cv_func_dlopen+set}" = set; then
9852   echo $ECHO_N "(cached) $ECHO_C" >&6
9853 else
9854   cat >conftest.$ac_ext <<_ACEOF
9855 /* confdefs.h.  */
9856 _ACEOF
9857 cat confdefs.h >>conftest.$ac_ext
9858 cat >>conftest.$ac_ext <<_ACEOF
9859 /* end confdefs.h.  */
9860 /* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
9861    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9862 #define dlopen innocuous_dlopen
9863
9864 /* System header to define __stub macros and hopefully few prototypes,
9865     which can conflict with char dlopen (); below.
9866     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9867     <limits.h> exists even on freestanding compilers.  */
9868
9869 #ifdef __STDC__
9870 # include <limits.h>
9871 #else
9872 # include <assert.h>
9873 #endif
9874
9875 #undef dlopen
9876
9877 /* Override any gcc2 internal prototype to avoid an error.  */
9878 #ifdef __cplusplus
9879 extern "C"
9880 {
9881 #endif
9882 /* We use char because int might match the return type of a gcc2
9883    builtin and then its argument prototype would still apply.  */
9884 char dlopen ();
9885 /* The GNU C library defines this for functions which it implements
9886     to always fail with ENOSYS.  Some functions are actually named
9887     something starting with __ and the normal name is an alias.  */
9888 #if defined (__stub_dlopen) || defined (__stub___dlopen)
9889 choke me
9890 #else
9891 char (*f) () = dlopen;
9892 #endif
9893 #ifdef __cplusplus
9894 }
9895 #endif
9896
9897 int
9898 main ()
9899 {
9900 return f != dlopen;
9901   ;
9902   return 0;
9903 }
9904 _ACEOF
9905 rm -f conftest.$ac_objext conftest$ac_exeext
9906 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9907   (eval $ac_link) 2>conftest.er1
9908   ac_status=$?
9909   grep -v '^ *+' conftest.er1 >conftest.err
9910   rm -f conftest.er1
9911   cat conftest.err >&5
9912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9913   (exit $ac_status); } &&
9914          { ac_try='test -z "$ac_c_werror_flag"
9915                          || test ! -s conftest.err'
9916   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9917   (eval $ac_try) 2>&5
9918   ac_status=$?
9919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9920   (exit $ac_status); }; } &&
9921          { ac_try='test -s conftest$ac_exeext'
9922   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9923   (eval $ac_try) 2>&5
9924   ac_status=$?
9925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9926   (exit $ac_status); }; }; then
9927   ac_cv_func_dlopen=yes
9928 else
9929   echo "$as_me: failed program was:" >&5
9930 sed 's/^/| /' conftest.$ac_ext >&5
9931
9932 ac_cv_func_dlopen=no
9933 fi
9934 rm -f conftest.err conftest.$ac_objext \
9935       conftest$ac_exeext conftest.$ac_ext
9936 fi
9937 echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
9938 echo "${ECHO_T}$ac_cv_func_dlopen" >&6
9939 if test $ac_cv_func_dlopen = yes; then
9940   lt_cv_dlopen="dlopen"
9941 else
9942   echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9943 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9944 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9945   echo $ECHO_N "(cached) $ECHO_C" >&6
9946 else
9947   ac_check_lib_save_LIBS=$LIBS
9948 LIBS="-ldl  $LIBS"
9949 cat >conftest.$ac_ext <<_ACEOF
9950 /* confdefs.h.  */
9951 _ACEOF
9952 cat confdefs.h >>conftest.$ac_ext
9953 cat >>conftest.$ac_ext <<_ACEOF
9954 /* end confdefs.h.  */
9955
9956 /* Override any gcc2 internal prototype to avoid an error.  */
9957 #ifdef __cplusplus
9958 extern "C"
9959 #endif
9960 /* We use char because int might match the return type of a gcc2
9961    builtin and then its argument prototype would still apply.  */
9962 char dlopen ();
9963 int
9964 main ()
9965 {
9966 dlopen ();
9967   ;
9968   return 0;
9969 }
9970 _ACEOF
9971 rm -f conftest.$ac_objext conftest$ac_exeext
9972 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9973   (eval $ac_link) 2>conftest.er1
9974   ac_status=$?
9975   grep -v '^ *+' conftest.er1 >conftest.err
9976   rm -f conftest.er1
9977   cat conftest.err >&5
9978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9979   (exit $ac_status); } &&
9980          { ac_try='test -z "$ac_c_werror_flag"
9981                          || test ! -s conftest.err'
9982   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9983   (eval $ac_try) 2>&5
9984   ac_status=$?
9985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9986   (exit $ac_status); }; } &&
9987          { ac_try='test -s conftest$ac_exeext'
9988   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9989   (eval $ac_try) 2>&5
9990   ac_status=$?
9991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9992   (exit $ac_status); }; }; then
9993   ac_cv_lib_dl_dlopen=yes
9994 else
9995   echo "$as_me: failed program was:" >&5
9996 sed 's/^/| /' conftest.$ac_ext >&5
9997
9998 ac_cv_lib_dl_dlopen=no
9999 fi
10000 rm -f conftest.err conftest.$ac_objext \
10001       conftest$ac_exeext conftest.$ac_ext
10002 LIBS=$ac_check_lib_save_LIBS
10003 fi
10004 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10005 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10006 if test $ac_cv_lib_dl_dlopen = yes; then
10007   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10008 else
10009   echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
10010 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
10011 if test "${ac_cv_lib_svld_dlopen+set}" = set; then
10012   echo $ECHO_N "(cached) $ECHO_C" >&6
10013 else
10014   ac_check_lib_save_LIBS=$LIBS
10015 LIBS="-lsvld  $LIBS"
10016 cat >conftest.$ac_ext <<_ACEOF
10017 /* confdefs.h.  */
10018 _ACEOF
10019 cat confdefs.h >>conftest.$ac_ext
10020 cat >>conftest.$ac_ext <<_ACEOF
10021 /* end confdefs.h.  */
10022
10023 /* Override any gcc2 internal prototype to avoid an error.  */
10024 #ifdef __cplusplus
10025 extern "C"
10026 #endif
10027 /* We use char because int might match the return type of a gcc2
10028    builtin and then its argument prototype would still apply.  */
10029 char dlopen ();
10030 int
10031 main ()
10032 {
10033 dlopen ();
10034   ;
10035   return 0;
10036 }
10037 _ACEOF
10038 rm -f conftest.$ac_objext conftest$ac_exeext
10039 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10040   (eval $ac_link) 2>conftest.er1
10041   ac_status=$?
10042   grep -v '^ *+' conftest.er1 >conftest.err
10043   rm -f conftest.er1
10044   cat conftest.err >&5
10045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10046   (exit $ac_status); } &&
10047          { ac_try='test -z "$ac_c_werror_flag"
10048                          || test ! -s conftest.err'
10049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10050   (eval $ac_try) 2>&5
10051   ac_status=$?
10052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10053   (exit $ac_status); }; } &&
10054          { ac_try='test -s conftest$ac_exeext'
10055   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10056   (eval $ac_try) 2>&5
10057   ac_status=$?
10058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10059   (exit $ac_status); }; }; then
10060   ac_cv_lib_svld_dlopen=yes
10061 else
10062   echo "$as_me: failed program was:" >&5
10063 sed 's/^/| /' conftest.$ac_ext >&5
10064
10065 ac_cv_lib_svld_dlopen=no
10066 fi
10067 rm -f conftest.err conftest.$ac_objext \
10068       conftest$ac_exeext conftest.$ac_ext
10069 LIBS=$ac_check_lib_save_LIBS
10070 fi
10071 echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
10072 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
10073 if test $ac_cv_lib_svld_dlopen = yes; then
10074   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
10075 else
10076   echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
10077 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
10078 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
10079   echo $ECHO_N "(cached) $ECHO_C" >&6
10080 else
10081   ac_check_lib_save_LIBS=$LIBS
10082 LIBS="-ldld  $LIBS"
10083 cat >conftest.$ac_ext <<_ACEOF
10084 /* confdefs.h.  */
10085 _ACEOF
10086 cat confdefs.h >>conftest.$ac_ext
10087 cat >>conftest.$ac_ext <<_ACEOF
10088 /* end confdefs.h.  */
10089
10090 /* Override any gcc2 internal prototype to avoid an error.  */
10091 #ifdef __cplusplus
10092 extern "C"
10093 #endif
10094 /* We use char because int might match the return type of a gcc2
10095    builtin and then its argument prototype would still apply.  */
10096 char dld_link ();
10097 int
10098 main ()
10099 {
10100 dld_link ();
10101   ;
10102   return 0;
10103 }
10104 _ACEOF
10105 rm -f conftest.$ac_objext conftest$ac_exeext
10106 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10107   (eval $ac_link) 2>conftest.er1
10108   ac_status=$?
10109   grep -v '^ *+' conftest.er1 >conftest.err
10110   rm -f conftest.er1
10111   cat conftest.err >&5
10112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10113   (exit $ac_status); } &&
10114          { ac_try='test -z "$ac_c_werror_flag"
10115                          || test ! -s conftest.err'
10116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10117   (eval $ac_try) 2>&5
10118   ac_status=$?
10119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10120   (exit $ac_status); }; } &&
10121          { ac_try='test -s conftest$ac_exeext'
10122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10123   (eval $ac_try) 2>&5
10124   ac_status=$?
10125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10126   (exit $ac_status); }; }; then
10127   ac_cv_lib_dld_dld_link=yes
10128 else
10129   echo "$as_me: failed program was:" >&5
10130 sed 's/^/| /' conftest.$ac_ext >&5
10131
10132 ac_cv_lib_dld_dld_link=no
10133 fi
10134 rm -f conftest.err conftest.$ac_objext \
10135       conftest$ac_exeext conftest.$ac_ext
10136 LIBS=$ac_check_lib_save_LIBS
10137 fi
10138 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
10139 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
10140 if test $ac_cv_lib_dld_dld_link = yes; then
10141   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
10142 fi
10143
10144
10145 fi
10146
10147
10148 fi
10149
10150
10151 fi
10152
10153
10154 fi
10155
10156
10157 fi
10158
10159     ;;
10160   esac
10161
10162   if test "x$lt_cv_dlopen" != xno; then
10163     enable_dlopen=yes
10164   else
10165     enable_dlopen=no
10166   fi
10167
10168   case $lt_cv_dlopen in
10169   dlopen)
10170     save_CPPFLAGS="$CPPFLAGS"
10171     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
10172
10173     save_LDFLAGS="$LDFLAGS"
10174     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
10175
10176     save_LIBS="$LIBS"
10177     LIBS="$lt_cv_dlopen_libs $LIBS"
10178
10179     echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
10180 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
10181 if test "${lt_cv_dlopen_self+set}" = set; then
10182   echo $ECHO_N "(cached) $ECHO_C" >&6
10183 else
10184           if test "$cross_compiling" = yes; then :
10185   lt_cv_dlopen_self=cross
10186 else
10187   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10188   lt_status=$lt_dlunknown
10189   cat > conftest.$ac_ext <<EOF
10190 #line 10190 "configure"
10191 #include "confdefs.h"
10192
10193 #if HAVE_DLFCN_H
10194 #include <dlfcn.h>
10195 #endif
10196
10197 #include <stdio.h>
10198
10199 #ifdef RTLD_GLOBAL
10200 #  define LT_DLGLOBAL           RTLD_GLOBAL
10201 #else
10202 #  ifdef DL_GLOBAL
10203 #    define LT_DLGLOBAL         DL_GLOBAL
10204 #  else
10205 #    define LT_DLGLOBAL         0
10206 #  endif
10207 #endif
10208
10209 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10210    find out it does not work in some platform. */
10211 #ifndef LT_DLLAZY_OR_NOW
10212 #  ifdef RTLD_LAZY
10213 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10214 #  else
10215 #    ifdef DL_LAZY
10216 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10217 #    else
10218 #      ifdef RTLD_NOW
10219 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10220 #      else
10221 #        ifdef DL_NOW
10222 #          define LT_DLLAZY_OR_NOW      DL_NOW
10223 #        else
10224 #          define LT_DLLAZY_OR_NOW      0
10225 #        endif
10226 #      endif
10227 #    endif
10228 #  endif
10229 #endif
10230
10231 #ifdef __cplusplus
10232 extern "C" void exit (int);
10233 #endif
10234
10235 void fnord() { int i=42;}
10236 int main ()
10237 {
10238   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10239   int status = $lt_dlunknown;
10240
10241   if (self)
10242     {
10243       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10244       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10245       /* dlclose (self); */
10246     }
10247
10248     exit (status);
10249 }
10250 EOF
10251   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10252   (eval $ac_link) 2>&5
10253   ac_status=$?
10254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10255   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
10256     (./conftest; exit; ) >&5 2>/dev/null
10257     lt_status=$?
10258     case x$lt_status in
10259       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
10260       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
10261       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
10262     esac
10263   else :
10264     # compilation failed
10265     lt_cv_dlopen_self=no
10266   fi
10267 fi
10268 rm -fr conftest*
10269
10270
10271 fi
10272 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
10273 echo "${ECHO_T}$lt_cv_dlopen_self" >&6
10274
10275     if test "x$lt_cv_dlopen_self" = xyes; then
10276       LDFLAGS="$LDFLAGS $link_static_flag"
10277       echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
10278 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
10279 if test "${lt_cv_dlopen_self_static+set}" = set; then
10280   echo $ECHO_N "(cached) $ECHO_C" >&6
10281 else
10282           if test "$cross_compiling" = yes; then :
10283   lt_cv_dlopen_self_static=cross
10284 else
10285   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10286   lt_status=$lt_dlunknown
10287   cat > conftest.$ac_ext <<EOF
10288 #line 10288 "configure"
10289 #include "confdefs.h"
10290
10291 #if HAVE_DLFCN_H
10292 #include <dlfcn.h>
10293 #endif
10294
10295 #include <stdio.h>
10296
10297 #ifdef RTLD_GLOBAL
10298 #  define LT_DLGLOBAL           RTLD_GLOBAL
10299 #else
10300 #  ifdef DL_GLOBAL
10301 #    define LT_DLGLOBAL         DL_GLOBAL
10302 #  else
10303 #    define LT_DLGLOBAL         0
10304 #  endif
10305 #endif
10306
10307 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10308    find out it does not work in some platform. */
10309 #ifndef LT_DLLAZY_OR_NOW
10310 #  ifdef RTLD_LAZY
10311 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10312 #  else
10313 #    ifdef DL_LAZY
10314 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10315 #    else
10316 #      ifdef RTLD_NOW
10317 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10318 #      else
10319 #        ifdef DL_NOW
10320 #          define LT_DLLAZY_OR_NOW      DL_NOW
10321 #        else
10322 #          define LT_DLLAZY_OR_NOW      0
10323 #        endif
10324 #      endif
10325 #    endif
10326 #  endif
10327 #endif
10328
10329 #ifdef __cplusplus
10330 extern "C" void exit (int);
10331 #endif
10332
10333 void fnord() { int i=42;}
10334 int main ()
10335 {
10336   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10337   int status = $lt_dlunknown;
10338
10339   if (self)
10340     {
10341       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10342       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10343       /* dlclose (self); */
10344     }
10345
10346     exit (status);
10347 }
10348 EOF
10349   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10350   (eval $ac_link) 2>&5
10351   ac_status=$?
10352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10353   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
10354     (./conftest; exit; ) >&5 2>/dev/null
10355     lt_status=$?
10356     case x$lt_status in
10357       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
10358       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
10359       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
10360     esac
10361   else :
10362     # compilation failed
10363     lt_cv_dlopen_self_static=no
10364   fi
10365 fi
10366 rm -fr conftest*
10367
10368
10369 fi
10370 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
10371 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
10372     fi
10373
10374     CPPFLAGS="$save_CPPFLAGS"
10375     LDFLAGS="$save_LDFLAGS"
10376     LIBS="$save_LIBS"
10377     ;;
10378   esac
10379
10380   case $lt_cv_dlopen_self in
10381   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
10382   *) enable_dlopen_self=unknown ;;
10383   esac
10384
10385   case $lt_cv_dlopen_self_static in
10386   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
10387   *) enable_dlopen_self_static=unknown ;;
10388   esac
10389 fi
10390
10391
10392 # Report which librarie types wil actually be built
10393 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
10394 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
10395 echo "$as_me:$LINENO: result: $can_build_shared" >&5
10396 echo "${ECHO_T}$can_build_shared" >&6
10397
10398 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
10399 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
10400 test "$can_build_shared" = "no" && enable_shared=no
10401
10402 # On AIX, shared libraries and static libraries use the same namespace, and
10403 # are all built from PIC.
10404 case $host_os in
10405 aix3*)
10406   test "$enable_shared" = yes && enable_static=no
10407   if test -n "$RANLIB"; then
10408     archive_cmds="$archive_cmds~\$RANLIB \$lib"
10409     postinstall_cmds='$RANLIB $lib'
10410   fi
10411   ;;
10412
10413 aix4* | aix5*)
10414   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
10415     test "$enable_shared" = yes && enable_static=no
10416   fi
10417     ;;
10418 esac
10419 echo "$as_me:$LINENO: result: $enable_shared" >&5
10420 echo "${ECHO_T}$enable_shared" >&6
10421
10422 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
10423 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
10424 # Make sure either enable_shared or enable_static is yes.
10425 test "$enable_shared" = yes || enable_static=yes
10426 echo "$as_me:$LINENO: result: $enable_static" >&5
10427 echo "${ECHO_T}$enable_static" >&6
10428
10429 # The else clause should only fire when bootstrapping the
10430 # libtool distribution, otherwise you forgot to ship ltmain.sh
10431 # with your package, and you will get complaints that there are
10432 # no rules to generate ltmain.sh.
10433 if test -f "$ltmain"; then
10434   # See if we are running on zsh, and set the options which allow our commands through
10435   # without removal of \ escapes.
10436   if test -n "${ZSH_VERSION+set}" ; then
10437     setopt NO_GLOB_SUBST
10438   fi
10439   # Now quote all the things that may contain metacharacters while being
10440   # careful not to overquote the AC_SUBSTed values.  We take copies of the
10441   # variables and quote the copies for generation of the libtool script.
10442   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
10443     SED SHELL STRIP \
10444     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
10445     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
10446     deplibs_check_method reload_flag reload_cmds need_locks \
10447     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
10448     lt_cv_sys_global_symbol_to_c_name_address \
10449     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
10450     old_postinstall_cmds old_postuninstall_cmds \
10451     compiler \
10452     CC \
10453     LD \
10454     lt_prog_compiler_wl \
10455     lt_prog_compiler_pic \
10456     lt_prog_compiler_static \
10457     lt_prog_compiler_no_builtin_flag \
10458     export_dynamic_flag_spec \
10459     thread_safe_flag_spec \
10460     whole_archive_flag_spec \
10461     enable_shared_with_static_runtimes \
10462     old_archive_cmds \
10463     old_archive_from_new_cmds \
10464     predep_objects \
10465     postdep_objects \
10466     predeps \
10467     postdeps \
10468     compiler_lib_search_path \
10469     archive_cmds \
10470     archive_expsym_cmds \
10471     postinstall_cmds \
10472     postuninstall_cmds \
10473     old_archive_from_expsyms_cmds \
10474     allow_undefined_flag \
10475     no_undefined_flag \
10476     export_symbols_cmds \
10477     hardcode_libdir_flag_spec \
10478     hardcode_libdir_flag_spec_ld \
10479     hardcode_libdir_separator \
10480     hardcode_automatic \
10481     module_cmds \
10482     module_expsym_cmds \
10483     lt_cv_prog_compiler_c_o \
10484     exclude_expsyms \
10485     include_expsyms; do
10486
10487     case $var in
10488     old_archive_cmds | \
10489     old_archive_from_new_cmds | \
10490     archive_cmds | \
10491     archive_expsym_cmds | \
10492     module_cmds | \
10493     module_expsym_cmds | \
10494     old_archive_from_expsyms_cmds | \
10495     export_symbols_cmds | \
10496     extract_expsyms_cmds | reload_cmds | finish_cmds | \
10497     postinstall_cmds | postuninstall_cmds | \
10498     old_postinstall_cmds | old_postuninstall_cmds | \
10499     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
10500       # Double-quote double-evaled strings.
10501       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
10502       ;;
10503     *)
10504       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
10505       ;;
10506     esac
10507   done
10508
10509   case $lt_echo in
10510   *'\$0 --fallback-echo"')
10511     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
10512     ;;
10513   esac
10514
10515 cfgfile="${ofile}T"
10516   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
10517   $rm -f "$cfgfile"
10518   { echo "$as_me:$LINENO: creating $ofile" >&5
10519 echo "$as_me: creating $ofile" >&6;}
10520
10521   cat <<__EOF__ >> "$cfgfile"
10522 #! $SHELL
10523
10524 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
10525 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
10526 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
10527 #
10528 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
10529 # Free Software Foundation, Inc.
10530 #
10531 # This file is part of GNU Libtool:
10532 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
10533 #
10534 # This program is free software; you can redistribute it and/or modify
10535 # it under the terms of the GNU General Public License as published by
10536 # the Free Software Foundation; either version 2 of the License, or
10537 # (at your option) any later version.
10538 #
10539 # This program is distributed in the hope that it will be useful, but
10540 # WITHOUT ANY WARRANTY; without even the implied warranty of
10541 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10542 # General Public License for more details.
10543 #
10544 # You should have received a copy of the GNU General Public License
10545 # along with this program; if not, write to the Free Software
10546 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
10547 #
10548 # As a special exception to the GNU General Public License, if you
10549 # distribute this file as part of a program that contains a
10550 # configuration script generated by Autoconf, you may include it under
10551 # the same distribution terms that you use for the rest of that program.
10552
10553 # A sed program that does not truncate output.
10554 SED=$lt_SED
10555
10556 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
10557 Xsed="$SED -e 1s/^X//"
10558
10559 # The HP-UX ksh and POSIX shell print the target directory to stdout
10560 # if CDPATH is set.
10561 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
10562
10563 # The names of the tagged configurations supported by this script.
10564 available_tags=
10565
10566 # ### BEGIN LIBTOOL CONFIG
10567
10568 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10569
10570 # Shell to use when invoking shell scripts.
10571 SHELL=$lt_SHELL
10572
10573 # Whether or not to build shared libraries.
10574 build_libtool_libs=$enable_shared
10575
10576 # Whether or not to build static libraries.
10577 build_old_libs=$enable_static
10578
10579 # Whether or not to add -lc for building shared libraries.
10580 build_libtool_need_lc=$archive_cmds_need_lc
10581
10582 # Whether or not to disallow shared libs when runtime libs are static
10583 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
10584
10585 # Whether or not to optimize for fast installation.
10586 fast_install=$enable_fast_install
10587
10588 # The host system.
10589 host_alias=$host_alias
10590 host=$host
10591 host_os=$host_os
10592
10593 # The build system.
10594 build_alias=$build_alias
10595 build=$build
10596 build_os=$build_os
10597
10598 # An echo program that does not interpret backslashes.
10599 echo=$lt_echo
10600
10601 # The archiver.
10602 AR=$lt_AR
10603 AR_FLAGS=$lt_AR_FLAGS
10604
10605 # A C compiler.
10606 LTCC=$lt_LTCC
10607
10608 # A language-specific compiler.
10609 CC=$lt_compiler
10610
10611 # Is the compiler the GNU C compiler?
10612 with_gcc=$GCC
10613
10614 # An ERE matcher.
10615 EGREP=$lt_EGREP
10616
10617 # The linker used to build libraries.
10618 LD=$lt_LD
10619
10620 # Whether we need hard or soft links.
10621 LN_S=$lt_LN_S
10622
10623 # A BSD-compatible nm program.
10624 NM=$lt_NM
10625
10626 # A symbol stripping program
10627 STRIP=$lt_STRIP
10628
10629 # Used to examine libraries when file_magic_cmd begins "file"
10630 MAGIC_CMD=$MAGIC_CMD
10631
10632 # Used on cygwin: DLL creation program.
10633 DLLTOOL="$DLLTOOL"
10634
10635 # Used on cygwin: object dumper.
10636 OBJDUMP="$OBJDUMP"
10637
10638 # Used on cygwin: assembler.
10639 AS="$AS"
10640
10641 # The name of the directory that contains temporary libtool files.
10642 objdir=$objdir
10643
10644 # How to create reloadable object files.
10645 reload_flag=$lt_reload_flag
10646 reload_cmds=$lt_reload_cmds
10647
10648 # How to pass a linker flag through the compiler.
10649 wl=$lt_lt_prog_compiler_wl
10650
10651 # Object file suffix (normally "o").
10652 objext="$ac_objext"
10653
10654 # Old archive suffix (normally "a").
10655 libext="$libext"
10656
10657 # Shared library suffix (normally ".so").
10658 shrext_cmds='$shrext_cmds'
10659
10660 # Executable file suffix (normally "").
10661 exeext="$exeext"
10662
10663 # Additional compiler flags for building library objects.
10664 pic_flag=$lt_lt_prog_compiler_pic
10665 pic_mode=$pic_mode
10666
10667 # What is the maximum length of a command?
10668 max_cmd_len=$lt_cv_sys_max_cmd_len
10669
10670 # Does compiler simultaneously support -c and -o options?
10671 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
10672
10673 # Must we lock files when doing compilation?
10674 need_locks=$lt_need_locks
10675
10676 # Do we need the lib prefix for modules?
10677 need_lib_prefix=$need_lib_prefix
10678
10679 # Do we need a version for libraries?
10680 need_version=$need_version
10681
10682 # Whether dlopen is supported.
10683 dlopen_support=$enable_dlopen
10684
10685 # Whether dlopen of programs is supported.
10686 dlopen_self=$enable_dlopen_self
10687
10688 # Whether dlopen of statically linked programs is supported.
10689 dlopen_self_static=$enable_dlopen_self_static
10690
10691 # Compiler flag to prevent dynamic linking.
10692 link_static_flag=$lt_lt_prog_compiler_static
10693
10694 # Compiler flag to turn off builtin functions.
10695 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
10696
10697 # Compiler flag to allow reflexive dlopens.
10698 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
10699
10700 # Compiler flag to generate shared objects directly from archives.
10701 whole_archive_flag_spec=$lt_whole_archive_flag_spec
10702
10703 # Compiler flag to generate thread-safe objects.
10704 thread_safe_flag_spec=$lt_thread_safe_flag_spec
10705
10706 # Library versioning type.
10707 version_type=$version_type
10708
10709 # Format of library name prefix.
10710 libname_spec=$lt_libname_spec
10711
10712 # List of archive names.  First name is the real one, the rest are links.
10713 # The last name is the one that the linker finds with -lNAME.
10714 library_names_spec=$lt_library_names_spec
10715
10716 # The coded name of the library, if different from the real name.
10717 soname_spec=$lt_soname_spec
10718
10719 # Commands used to build and install an old-style archive.
10720 RANLIB=$lt_RANLIB
10721 old_archive_cmds=$lt_old_archive_cmds
10722 old_postinstall_cmds=$lt_old_postinstall_cmds
10723 old_postuninstall_cmds=$lt_old_postuninstall_cmds
10724
10725 # Create an old-style archive from a shared archive.
10726 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
10727
10728 # Create a temporary old-style archive to link instead of a shared archive.
10729 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
10730
10731 # Commands used to build and install a shared archive.
10732 archive_cmds=$lt_archive_cmds
10733 archive_expsym_cmds=$lt_archive_expsym_cmds
10734 postinstall_cmds=$lt_postinstall_cmds
10735 postuninstall_cmds=$lt_postuninstall_cmds
10736
10737 # Commands used to build a loadable module (assumed same as above if empty)
10738 module_cmds=$lt_module_cmds
10739 module_expsym_cmds=$lt_module_expsym_cmds
10740
10741 # Commands to strip libraries.
10742 old_striplib=$lt_old_striplib
10743 striplib=$lt_striplib
10744
10745 # Dependencies to place before the objects being linked to create a
10746 # shared library.
10747 predep_objects=$lt_predep_objects
10748
10749 # Dependencies to place after the objects being linked to create a
10750 # shared library.
10751 postdep_objects=$lt_postdep_objects
10752
10753 # Dependencies to place before the objects being linked to create a
10754 # shared library.
10755 predeps=$lt_predeps
10756
10757 # Dependencies to place after the objects being linked to create a
10758 # shared library.
10759 postdeps=$lt_postdeps
10760
10761 # The library search path used internally by the compiler when linking
10762 # a shared library.
10763 compiler_lib_search_path=$lt_compiler_lib_search_path
10764
10765 # Method to check whether dependent libraries are shared objects.
10766 deplibs_check_method=$lt_deplibs_check_method
10767
10768 # Command to use when deplibs_check_method == file_magic.
10769 file_magic_cmd=$lt_file_magic_cmd
10770
10771 # Flag that allows shared libraries with undefined symbols to be built.
10772 allow_undefined_flag=$lt_allow_undefined_flag
10773
10774 # Flag that forces no undefined symbols.
10775 no_undefined_flag=$lt_no_undefined_flag
10776
10777 # Commands used to finish a libtool library installation in a directory.
10778 finish_cmds=$lt_finish_cmds
10779
10780 # Same as above, but a single script fragment to be evaled but not shown.
10781 finish_eval=$lt_finish_eval
10782
10783 # Take the output of nm and produce a listing of raw symbols and C names.
10784 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
10785
10786 # Transform the output of nm in a proper C declaration
10787 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
10788
10789 # Transform the output of nm in a C name address pair
10790 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
10791
10792 # This is the shared library runtime path variable.
10793 runpath_var=$runpath_var
10794
10795 # This is the shared library path variable.
10796 shlibpath_var=$shlibpath_var
10797
10798 # Is shlibpath searched before the hard-coded library search path?
10799 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
10800
10801 # How to hardcode a shared library path into an executable.
10802 hardcode_action=$hardcode_action
10803
10804 # Whether we should hardcode library paths into libraries.
10805 hardcode_into_libs=$hardcode_into_libs
10806
10807 # Flag to hardcode \$libdir into a binary during linking.
10808 # This must work even if \$libdir does not exist.
10809 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
10810
10811 # If ld is used when linking, flag to hardcode \$libdir into
10812 # a binary during linking. This must work even if \$libdir does
10813 # not exist.
10814 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
10815
10816 # Whether we need a single -rpath flag with a separated argument.
10817 hardcode_libdir_separator=$lt_hardcode_libdir_separator
10818
10819 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
10820 # resulting binary.
10821 hardcode_direct=$hardcode_direct
10822
10823 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
10824 # resulting binary.
10825 hardcode_minus_L=$hardcode_minus_L
10826
10827 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
10828 # the resulting binary.
10829 hardcode_shlibpath_var=$hardcode_shlibpath_var
10830
10831 # Set to yes if building a shared library automatically hardcodes DIR into the library
10832 # and all subsequent libraries and executables linked against it.
10833 hardcode_automatic=$hardcode_automatic
10834
10835 # Variables whose values should be saved in libtool wrapper scripts and
10836 # restored at relink time.
10837 variables_saved_for_relink="$variables_saved_for_relink"
10838
10839 # Whether libtool must link a program against all its dependency libraries.
10840 link_all_deplibs=$link_all_deplibs
10841
10842 # Compile-time system search path for libraries
10843 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
10844
10845 # Run-time system search path for libraries
10846 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
10847
10848 # Fix the shell variable \$srcfile for the compiler.
10849 fix_srcfile_path="$fix_srcfile_path"
10850
10851 # Set to yes if exported symbols are required.
10852 always_export_symbols=$always_export_symbols
10853
10854 # The commands to list exported symbols.
10855 export_symbols_cmds=$lt_export_symbols_cmds
10856
10857 # The commands to extract the exported symbol list from a shared archive.
10858 extract_expsyms_cmds=$lt_extract_expsyms_cmds
10859
10860 # Symbols that should not be listed in the preloaded symbols.
10861 exclude_expsyms=$lt_exclude_expsyms
10862
10863 # Symbols that must always be exported.
10864 include_expsyms=$lt_include_expsyms
10865
10866 # ### END LIBTOOL CONFIG
10867
10868 __EOF__
10869
10870
10871   case $host_os in
10872   aix3*)
10873     cat <<\EOF >> "$cfgfile"
10874
10875 # AIX sometimes has problems with the GCC collect2 program.  For some
10876 # reason, if we set the COLLECT_NAMES environment variable, the problems
10877 # vanish in a puff of smoke.
10878 if test "X${COLLECT_NAMES+set}" != Xset; then
10879   COLLECT_NAMES=
10880   export COLLECT_NAMES
10881 fi
10882 EOF
10883     ;;
10884   esac
10885
10886   # We use sed instead of cat because bash on DJGPP gets confused if
10887   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
10888   # text mode, it properly converts lines to CR/LF.  This bash problem
10889   # is reportedly fixed, but why not run on old versions too?
10890   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
10891
10892   mv -f "$cfgfile" "$ofile" || \
10893     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
10894   chmod +x "$ofile"
10895
10896 else
10897   # If there is no Makefile yet, we rely on a make rule to execute
10898   # `config.status --recheck' to rerun these tests and create the
10899   # libtool script then.
10900   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
10901   if test -f "$ltmain_in"; then
10902     test -f Makefile && make "$ltmain"
10903   fi
10904 fi
10905
10906
10907 ac_ext=c
10908 ac_cpp='$CPP $CPPFLAGS'
10909 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10910 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10911 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10912
10913 CC="$lt_save_CC"
10914
10915
10916 # Check whether --with-tags or --without-tags was given.
10917 if test "${with_tags+set}" = set; then
10918   withval="$with_tags"
10919   tagnames="$withval"
10920 fi;
10921
10922 if test -f "$ltmain" && test -n "$tagnames"; then
10923   if test ! -f "${ofile}"; then
10924     { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
10925 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
10926   fi
10927
10928   if test -z "$LTCC"; then
10929     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
10930     if test -z "$LTCC"; then
10931       { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
10932 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
10933     else
10934       { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
10935 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
10936     fi
10937   fi
10938
10939   # Extract list of available tagged configurations in $ofile.
10940   # Note that this assumes the entire list is on one line.
10941   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
10942
10943   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10944   for tagname in $tagnames; do
10945     IFS="$lt_save_ifs"
10946     # Check whether tagname contains only valid characters
10947     case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
10948     "") ;;
10949     *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
10950 echo "$as_me: error: invalid tag name: $tagname" >&2;}
10951    { (exit 1); exit 1; }; }
10952         ;;
10953     esac
10954
10955     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
10956     then
10957       { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
10958 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
10959    { (exit 1); exit 1; }; }
10960     fi
10961
10962     # Update the list of available tags.
10963     if test -n "$tagname"; then
10964       echo appending configuration tag \"$tagname\" to $ofile
10965
10966       case $tagname in
10967       CXX)
10968         if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
10969             ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
10970             (test "X$CXX" != "Xg++"))) ; then
10971           :
10972         else
10973           tagname=""
10974         fi
10975         ;;
10976
10977       F77)
10978         if test -n "$F77" && test "X$F77" != "Xno"; then
10979           :
10980         else
10981           tagname=""
10982         fi
10983         ;;
10984
10985       GCJ)
10986         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
10987           :
10988         else
10989           tagname=""
10990         fi
10991         ;;
10992
10993       RC)
10994
10995
10996
10997 # Source file extension for RC test sources.
10998 ac_ext=rc
10999
11000 # Object file extension for compiled RC test sources.
11001 objext=o
11002 objext_RC=$objext
11003
11004 # Code to be used in simple compile tests
11005 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
11006
11007 # Code to be used in simple link tests
11008 lt_simple_link_test_code="$lt_simple_compile_test_code"
11009
11010 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11011
11012 # If no C compiler was specified, use CC.
11013 LTCC=${LTCC-"$CC"}
11014
11015 # Allow CC to be a program name with arguments.
11016 compiler=$CC
11017
11018
11019 # save warnings/boilerplate of simple test code
11020 ac_outfile=conftest.$ac_objext
11021 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
11022 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11023 _lt_compiler_boilerplate=`cat conftest.err`
11024 $rm conftest*
11025
11026 ac_outfile=conftest.$ac_objext
11027 printf "$lt_simple_link_test_code" >conftest.$ac_ext
11028 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11029 _lt_linker_boilerplate=`cat conftest.err`
11030 $rm conftest*
11031
11032
11033 # Allow CC to be a program name with arguments.
11034 lt_save_CC="$CC"
11035 CC=${RC-"windres"}
11036 compiler=$CC
11037 compiler_RC=$CC
11038 for cc_temp in $compiler""; do
11039   case $cc_temp in
11040     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
11041     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
11042     \-*) ;;
11043     *) break;;
11044   esac
11045 done
11046 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
11047
11048 lt_cv_prog_compiler_c_o_RC=yes
11049
11050 # The else clause should only fire when bootstrapping the
11051 # libtool distribution, otherwise you forgot to ship ltmain.sh
11052 # with your package, and you will get complaints that there are
11053 # no rules to generate ltmain.sh.
11054 if test -f "$ltmain"; then
11055   # See if we are running on zsh, and set the options which allow our commands through
11056   # without removal of \ escapes.
11057   if test -n "${ZSH_VERSION+set}" ; then
11058     setopt NO_GLOB_SUBST
11059   fi
11060   # Now quote all the things that may contain metacharacters while being
11061   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11062   # variables and quote the copies for generation of the libtool script.
11063   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11064     SED SHELL STRIP \
11065     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11066     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11067     deplibs_check_method reload_flag reload_cmds need_locks \
11068     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11069     lt_cv_sys_global_symbol_to_c_name_address \
11070     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11071     old_postinstall_cmds old_postuninstall_cmds \
11072     compiler_RC \
11073     CC_RC \
11074     LD_RC \
11075     lt_prog_compiler_wl_RC \
11076     lt_prog_compiler_pic_RC \
11077     lt_prog_compiler_static_RC \
11078     lt_prog_compiler_no_builtin_flag_RC \
11079     export_dynamic_flag_spec_RC \
11080     thread_safe_flag_spec_RC \
11081     whole_archive_flag_spec_RC \
11082     enable_shared_with_static_runtimes_RC \
11083     old_archive_cmds_RC \
11084     old_archive_from_new_cmds_RC \
11085     predep_objects_RC \
11086     postdep_objects_RC \
11087     predeps_RC \
11088     postdeps_RC \
11089     compiler_lib_search_path_RC \
11090     archive_cmds_RC \
11091     archive_expsym_cmds_RC \
11092     postinstall_cmds_RC \
11093     postuninstall_cmds_RC \
11094     old_archive_from_expsyms_cmds_RC \
11095     allow_undefined_flag_RC \
11096     no_undefined_flag_RC \
11097     export_symbols_cmds_RC \
11098     hardcode_libdir_flag_spec_RC \
11099     hardcode_libdir_flag_spec_ld_RC \
11100     hardcode_libdir_separator_RC \
11101     hardcode_automatic_RC \
11102     module_cmds_RC \
11103     module_expsym_cmds_RC \
11104     lt_cv_prog_compiler_c_o_RC \
11105     exclude_expsyms_RC \
11106     include_expsyms_RC; do
11107
11108     case $var in
11109     old_archive_cmds_RC | \
11110     old_archive_from_new_cmds_RC | \
11111     archive_cmds_RC | \
11112     archive_expsym_cmds_RC | \
11113     module_cmds_RC | \
11114     module_expsym_cmds_RC | \
11115     old_archive_from_expsyms_cmds_RC | \
11116     export_symbols_cmds_RC | \
11117     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11118     postinstall_cmds | postuninstall_cmds | \
11119     old_postinstall_cmds | old_postuninstall_cmds | \
11120     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11121       # Double-quote double-evaled strings.
11122       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11123       ;;
11124     *)
11125       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11126       ;;
11127     esac
11128   done
11129
11130   case $lt_echo in
11131   *'\$0 --fallback-echo"')
11132     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11133     ;;
11134   esac
11135
11136 cfgfile="$ofile"
11137
11138   cat <<__EOF__ >> "$cfgfile"
11139 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
11140
11141 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11142
11143 # Shell to use when invoking shell scripts.
11144 SHELL=$lt_SHELL
11145
11146 # Whether or not to build shared libraries.
11147 build_libtool_libs=$enable_shared
11148
11149 # Whether or not to build static libraries.
11150 build_old_libs=$enable_static
11151
11152 # Whether or not to add -lc for building shared libraries.
11153 build_libtool_need_lc=$archive_cmds_need_lc_RC
11154
11155 # Whether or not to disallow shared libs when runtime libs are static
11156 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
11157
11158 # Whether or not to optimize for fast installation.
11159 fast_install=$enable_fast_install
11160
11161 # The host system.
11162 host_alias=$host_alias
11163 host=$host
11164 host_os=$host_os
11165
11166 # The build system.
11167 build_alias=$build_alias
11168 build=$build
11169 build_os=$build_os
11170
11171 # An echo program that does not interpret backslashes.
11172 echo=$lt_echo
11173
11174 # The archiver.
11175 AR=$lt_AR
11176 AR_FLAGS=$lt_AR_FLAGS
11177
11178 # A C compiler.
11179 LTCC=$lt_LTCC
11180
11181 # A language-specific compiler.
11182 CC=$lt_compiler_RC
11183
11184 # Is the compiler the GNU C compiler?
11185 with_gcc=$GCC_RC
11186
11187 # An ERE matcher.
11188 EGREP=$lt_EGREP
11189
11190 # The linker used to build libraries.
11191 LD=$lt_LD_RC
11192
11193 # Whether we need hard or soft links.
11194 LN_S=$lt_LN_S
11195
11196 # A BSD-compatible nm program.
11197 NM=$lt_NM
11198
11199 # A symbol stripping program
11200 STRIP=$lt_STRIP
11201
11202 # Used to examine libraries when file_magic_cmd begins "file"
11203 MAGIC_CMD=$MAGIC_CMD
11204
11205 # Used on cygwin: DLL creation program.
11206 DLLTOOL="$DLLTOOL"
11207
11208 # Used on cygwin: object dumper.
11209 OBJDUMP="$OBJDUMP"
11210
11211 # Used on cygwin: assembler.
11212 AS="$AS"
11213
11214 # The name of the directory that contains temporary libtool files.
11215 objdir=$objdir
11216
11217 # How to create reloadable object files.
11218 reload_flag=$lt_reload_flag
11219 reload_cmds=$lt_reload_cmds
11220
11221 # How to pass a linker flag through the compiler.
11222 wl=$lt_lt_prog_compiler_wl_RC
11223
11224 # Object file suffix (normally "o").
11225 objext="$ac_objext"
11226
11227 # Old archive suffix (normally "a").
11228 libext="$libext"
11229
11230 # Shared library suffix (normally ".so").
11231 shrext_cmds='$shrext_cmds'
11232
11233 # Executable file suffix (normally "").
11234 exeext="$exeext"
11235
11236 # Additional compiler flags for building library objects.
11237 pic_flag=$lt_lt_prog_compiler_pic_RC
11238 pic_mode=$pic_mode
11239
11240 # What is the maximum length of a command?
11241 max_cmd_len=$lt_cv_sys_max_cmd_len
11242
11243 # Does compiler simultaneously support -c and -o options?
11244 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
11245
11246 # Must we lock files when doing compilation?
11247 need_locks=$lt_need_locks
11248
11249 # Do we need the lib prefix for modules?
11250 need_lib_prefix=$need_lib_prefix
11251
11252 # Do we need a version for libraries?
11253 need_version=$need_version
11254
11255 # Whether dlopen is supported.
11256 dlopen_support=$enable_dlopen
11257
11258 # Whether dlopen of programs is supported.
11259 dlopen_self=$enable_dlopen_self
11260
11261 # Whether dlopen of statically linked programs is supported.
11262 dlopen_self_static=$enable_dlopen_self_static
11263
11264 # Compiler flag to prevent dynamic linking.
11265 link_static_flag=$lt_lt_prog_compiler_static_RC
11266
11267 # Compiler flag to turn off builtin functions.
11268 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
11269
11270 # Compiler flag to allow reflexive dlopens.
11271 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
11272
11273 # Compiler flag to generate shared objects directly from archives.
11274 whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
11275
11276 # Compiler flag to generate thread-safe objects.
11277 thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
11278
11279 # Library versioning type.
11280 version_type=$version_type
11281
11282 # Format of library name prefix.
11283 libname_spec=$lt_libname_spec
11284
11285 # List of archive names.  First name is the real one, the rest are links.
11286 # The last name is the one that the linker finds with -lNAME.
11287 library_names_spec=$lt_library_names_spec
11288
11289 # The coded name of the library, if different from the real name.
11290 soname_spec=$lt_soname_spec
11291
11292 # Commands used to build and install an old-style archive.
11293 RANLIB=$lt_RANLIB
11294 old_archive_cmds=$lt_old_archive_cmds_RC
11295 old_postinstall_cmds=$lt_old_postinstall_cmds
11296 old_postuninstall_cmds=$lt_old_postuninstall_cmds
11297
11298 # Create an old-style archive from a shared archive.
11299 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
11300
11301 # Create a temporary old-style archive to link instead of a shared archive.
11302 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
11303
11304 # Commands used to build and install a shared archive.
11305 archive_cmds=$lt_archive_cmds_RC
11306 archive_expsym_cmds=$lt_archive_expsym_cmds_RC
11307 postinstall_cmds=$lt_postinstall_cmds
11308 postuninstall_cmds=$lt_postuninstall_cmds
11309
11310 # Commands used to build a loadable module (assumed same as above if empty)
11311 module_cmds=$lt_module_cmds_RC
11312 module_expsym_cmds=$lt_module_expsym_cmds_RC
11313
11314 # Commands to strip libraries.
11315 old_striplib=$lt_old_striplib
11316 striplib=$lt_striplib
11317
11318 # Dependencies to place before the objects being linked to create a
11319 # shared library.
11320 predep_objects=$lt_predep_objects_RC
11321
11322 # Dependencies to place after the objects being linked to create a
11323 # shared library.
11324 postdep_objects=$lt_postdep_objects_RC
11325
11326 # Dependencies to place before the objects being linked to create a
11327 # shared library.
11328 predeps=$lt_predeps_RC
11329
11330 # Dependencies to place after the objects being linked to create a
11331 # shared library.
11332 postdeps=$lt_postdeps_RC
11333
11334 # The library search path used internally by the compiler when linking
11335 # a shared library.
11336 compiler_lib_search_path=$lt_compiler_lib_search_path_RC
11337
11338 # Method to check whether dependent libraries are shared objects.
11339 deplibs_check_method=$lt_deplibs_check_method
11340
11341 # Command to use when deplibs_check_method == file_magic.
11342 file_magic_cmd=$lt_file_magic_cmd
11343
11344 # Flag that allows shared libraries with undefined symbols to be built.
11345 allow_undefined_flag=$lt_allow_undefined_flag_RC
11346
11347 # Flag that forces no undefined symbols.
11348 no_undefined_flag=$lt_no_undefined_flag_RC
11349
11350 # Commands used to finish a libtool library installation in a directory.
11351 finish_cmds=$lt_finish_cmds
11352
11353 # Same as above, but a single script fragment to be evaled but not shown.
11354 finish_eval=$lt_finish_eval
11355
11356 # Take the output of nm and produce a listing of raw symbols and C names.
11357 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
11358
11359 # Transform the output of nm in a proper C declaration
11360 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
11361
11362 # Transform the output of nm in a C name address pair
11363 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
11364
11365 # This is the shared library runtime path variable.
11366 runpath_var=$runpath_var
11367
11368 # This is the shared library path variable.
11369 shlibpath_var=$shlibpath_var
11370
11371 # Is shlibpath searched before the hard-coded library search path?
11372 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
11373
11374 # How to hardcode a shared library path into an executable.
11375 hardcode_action=$hardcode_action_RC
11376
11377 # Whether we should hardcode library paths into libraries.
11378 hardcode_into_libs=$hardcode_into_libs
11379
11380 # Flag to hardcode \$libdir into a binary during linking.
11381 # This must work even if \$libdir does not exist.
11382 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
11383
11384 # If ld is used when linking, flag to hardcode \$libdir into
11385 # a binary during linking. This must work even if \$libdir does
11386 # not exist.
11387 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
11388
11389 # Whether we need a single -rpath flag with a separated argument.
11390 hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
11391
11392 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
11393 # resulting binary.
11394 hardcode_direct=$hardcode_direct_RC
11395
11396 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
11397 # resulting binary.
11398 hardcode_minus_L=$hardcode_minus_L_RC
11399
11400 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
11401 # the resulting binary.
11402 hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
11403
11404 # Set to yes if building a shared library automatically hardcodes DIR into the library
11405 # and all subsequent libraries and executables linked against it.
11406 hardcode_automatic=$hardcode_automatic_RC
11407
11408 # Variables whose values should be saved in libtool wrapper scripts and
11409 # restored at relink time.
11410 variables_saved_for_relink="$variables_saved_for_relink"
11411
11412 # Whether libtool must link a program against all its dependency libraries.
11413 link_all_deplibs=$link_all_deplibs_RC
11414
11415 # Compile-time system search path for libraries
11416 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
11417
11418 # Run-time system search path for libraries
11419 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
11420
11421 # Fix the shell variable \$srcfile for the compiler.
11422 fix_srcfile_path="$fix_srcfile_path_RC"
11423
11424 # Set to yes if exported symbols are required.
11425 always_export_symbols=$always_export_symbols_RC
11426
11427 # The commands to list exported symbols.
11428 export_symbols_cmds=$lt_export_symbols_cmds_RC
11429
11430 # The commands to extract the exported symbol list from a shared archive.
11431 extract_expsyms_cmds=$lt_extract_expsyms_cmds
11432
11433 # Symbols that should not be listed in the preloaded symbols.
11434 exclude_expsyms=$lt_exclude_expsyms_RC
11435
11436 # Symbols that must always be exported.
11437 include_expsyms=$lt_include_expsyms_RC
11438
11439 # ### END LIBTOOL TAG CONFIG: $tagname
11440
11441 __EOF__
11442
11443
11444 else
11445   # If there is no Makefile yet, we rely on a make rule to execute
11446   # `config.status --recheck' to rerun these tests and create the
11447   # libtool script then.
11448   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
11449   if test -f "$ltmain_in"; then
11450     test -f Makefile && make "$ltmain"
11451   fi
11452 fi
11453
11454
11455 ac_ext=c
11456 ac_cpp='$CPP $CPPFLAGS'
11457 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11458 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11459 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11460
11461 CC="$lt_save_CC"
11462
11463         ;;
11464
11465       *)
11466         { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
11467 echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
11468    { (exit 1); exit 1; }; }
11469         ;;
11470       esac
11471
11472       # Append the new tag name to the list of available tags.
11473       if test -n "$tagname" ; then
11474       available_tags="$available_tags $tagname"
11475     fi
11476     fi
11477   done
11478   IFS="$lt_save_ifs"
11479
11480   # Now substitute the updated list of available tags.
11481   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
11482     mv "${ofile}T" "$ofile"
11483     chmod +x "$ofile"
11484   else
11485     rm -f "${ofile}T"
11486     { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
11487 echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
11488    { (exit 1); exit 1; }; }
11489   fi
11490 fi
11491
11492
11493
11494 # This can be used to rebuild libtool when needed
11495 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
11496
11497 # Always use our own libtool.
11498 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
11499
11500 # Prevent multiple expansion
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511 ol_link_perl=no
11512 if test $ol_enable_perl != no ; then
11513         # Extract the first word of "perl", so it can be a program name with args.
11514 set dummy perl; ac_word=$2
11515 echo "$as_me:$LINENO: checking for $ac_word" >&5
11516 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11517 if test "${ac_cv_path_PERLBIN+set}" = set; then
11518   echo $ECHO_N "(cached) $ECHO_C" >&6
11519 else
11520   case $PERLBIN in
11521   [\\/]* | ?:[\\/]*)
11522   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
11523   ;;
11524   *)
11525   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11526 for as_dir in $PATH
11527 do
11528   IFS=$as_save_IFS
11529   test -z "$as_dir" && as_dir=.
11530   for ac_exec_ext in '' $ac_executable_extensions; do
11531   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11532     ac_cv_path_PERLBIN="$as_dir/$ac_word$ac_exec_ext"
11533     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11534     break 2
11535   fi
11536 done
11537 done
11538
11539   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
11540   ;;
11541 esac
11542 fi
11543 PERLBIN=$ac_cv_path_PERLBIN
11544
11545 if test -n "$PERLBIN"; then
11546   echo "$as_me:$LINENO: result: $PERLBIN" >&5
11547 echo "${ECHO_T}$PERLBIN" >&6
11548 else
11549   echo "$as_me:$LINENO: result: no" >&5
11550 echo "${ECHO_T}no" >&6
11551 fi
11552
11553
11554         if test "no$PERLBIN" = "no" ; then
11555                 if test $ol_enable_perl = yes ; then
11556                         { { echo "$as_me:$LINENO: error: could not locate perl" >&5
11557 echo "$as_me: error: could not locate perl" >&2;}
11558    { (exit 1); exit 1; }; }
11559                 fi
11560
11561         else
11562                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
11563                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
11564
11565                 if test x"$ol_enable_perl" = "xyes" ; then
11566                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
11567                 else
11568                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
11569                 fi
11570                                 ol_link_perl=yes
11571         fi
11572 fi
11573
11574 ac_ext=c
11575 ac_cpp='$CPP $CPPFLAGS'
11576 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11577 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11578 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11579 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
11580 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
11581 # On Suns, sometimes $CPP names a directory.
11582 if test -n "$CPP" && test -d "$CPP"; then
11583   CPP=
11584 fi
11585 if test -z "$CPP"; then
11586   if test "${ac_cv_prog_CPP+set}" = set; then
11587   echo $ECHO_N "(cached) $ECHO_C" >&6
11588 else
11589       # Double quotes because CPP needs to be expanded
11590     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
11591     do
11592       ac_preproc_ok=false
11593 for ac_c_preproc_warn_flag in '' yes
11594 do
11595   # Use a header file that comes with gcc, so configuring glibc
11596   # with a fresh cross-compiler works.
11597   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11598   # <limits.h> exists even on freestanding compilers.
11599   # On the NeXT, cc -E runs the code through the compiler's parser,
11600   # not just through cpp. "Syntax error" is here to catch this case.
11601   cat >conftest.$ac_ext <<_ACEOF
11602 /* confdefs.h.  */
11603 _ACEOF
11604 cat confdefs.h >>conftest.$ac_ext
11605 cat >>conftest.$ac_ext <<_ACEOF
11606 /* end confdefs.h.  */
11607 #ifdef __STDC__
11608 # include <limits.h>
11609 #else
11610 # include <assert.h>
11611 #endif
11612                      Syntax error
11613 _ACEOF
11614 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11615   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11616   ac_status=$?
11617   grep -v '^ *+' conftest.er1 >conftest.err
11618   rm -f conftest.er1
11619   cat conftest.err >&5
11620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11621   (exit $ac_status); } >/dev/null; then
11622   if test -s conftest.err; then
11623     ac_cpp_err=$ac_c_preproc_warn_flag
11624     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11625   else
11626     ac_cpp_err=
11627   fi
11628 else
11629   ac_cpp_err=yes
11630 fi
11631 if test -z "$ac_cpp_err"; then
11632   :
11633 else
11634   echo "$as_me: failed program was:" >&5
11635 sed 's/^/| /' conftest.$ac_ext >&5
11636
11637   # Broken: fails on valid input.
11638 continue
11639 fi
11640 rm -f conftest.err conftest.$ac_ext
11641
11642   # OK, works on sane cases.  Now check whether non-existent headers
11643   # can be detected and how.
11644   cat >conftest.$ac_ext <<_ACEOF
11645 /* confdefs.h.  */
11646 _ACEOF
11647 cat confdefs.h >>conftest.$ac_ext
11648 cat >>conftest.$ac_ext <<_ACEOF
11649 /* end confdefs.h.  */
11650 #include <ac_nonexistent.h>
11651 _ACEOF
11652 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11653   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11654   ac_status=$?
11655   grep -v '^ *+' conftest.er1 >conftest.err
11656   rm -f conftest.er1
11657   cat conftest.err >&5
11658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11659   (exit $ac_status); } >/dev/null; then
11660   if test -s conftest.err; then
11661     ac_cpp_err=$ac_c_preproc_warn_flag
11662     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11663   else
11664     ac_cpp_err=
11665   fi
11666 else
11667   ac_cpp_err=yes
11668 fi
11669 if test -z "$ac_cpp_err"; then
11670   # Broken: success on invalid input.
11671 continue
11672 else
11673   echo "$as_me: failed program was:" >&5
11674 sed 's/^/| /' conftest.$ac_ext >&5
11675
11676   # Passes both tests.
11677 ac_preproc_ok=:
11678 break
11679 fi
11680 rm -f conftest.err conftest.$ac_ext
11681
11682 done
11683 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
11684 rm -f conftest.err conftest.$ac_ext
11685 if $ac_preproc_ok; then
11686   break
11687 fi
11688
11689     done
11690     ac_cv_prog_CPP=$CPP
11691
11692 fi
11693   CPP=$ac_cv_prog_CPP
11694 else
11695   ac_cv_prog_CPP=$CPP
11696 fi
11697 echo "$as_me:$LINENO: result: $CPP" >&5
11698 echo "${ECHO_T}$CPP" >&6
11699 ac_preproc_ok=false
11700 for ac_c_preproc_warn_flag in '' yes
11701 do
11702   # Use a header file that comes with gcc, so configuring glibc
11703   # with a fresh cross-compiler works.
11704   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11705   # <limits.h> exists even on freestanding compilers.
11706   # On the NeXT, cc -E runs the code through the compiler's parser,
11707   # not just through cpp. "Syntax error" is here to catch this case.
11708   cat >conftest.$ac_ext <<_ACEOF
11709 /* confdefs.h.  */
11710 _ACEOF
11711 cat confdefs.h >>conftest.$ac_ext
11712 cat >>conftest.$ac_ext <<_ACEOF
11713 /* end confdefs.h.  */
11714 #ifdef __STDC__
11715 # include <limits.h>
11716 #else
11717 # include <assert.h>
11718 #endif
11719                      Syntax error
11720 _ACEOF
11721 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11722   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11723   ac_status=$?
11724   grep -v '^ *+' conftest.er1 >conftest.err
11725   rm -f conftest.er1
11726   cat conftest.err >&5
11727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11728   (exit $ac_status); } >/dev/null; then
11729   if test -s conftest.err; then
11730     ac_cpp_err=$ac_c_preproc_warn_flag
11731     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11732   else
11733     ac_cpp_err=
11734   fi
11735 else
11736   ac_cpp_err=yes
11737 fi
11738 if test -z "$ac_cpp_err"; then
11739   :
11740 else
11741   echo "$as_me: failed program was:" >&5
11742 sed 's/^/| /' conftest.$ac_ext >&5
11743
11744   # Broken: fails on valid input.
11745 continue
11746 fi
11747 rm -f conftest.err conftest.$ac_ext
11748
11749   # OK, works on sane cases.  Now check whether non-existent headers
11750   # can be detected and how.
11751   cat >conftest.$ac_ext <<_ACEOF
11752 /* confdefs.h.  */
11753 _ACEOF
11754 cat confdefs.h >>conftest.$ac_ext
11755 cat >>conftest.$ac_ext <<_ACEOF
11756 /* end confdefs.h.  */
11757 #include <ac_nonexistent.h>
11758 _ACEOF
11759 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11760   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11761   ac_status=$?
11762   grep -v '^ *+' conftest.er1 >conftest.err
11763   rm -f conftest.er1
11764   cat conftest.err >&5
11765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11766   (exit $ac_status); } >/dev/null; then
11767   if test -s conftest.err; then
11768     ac_cpp_err=$ac_c_preproc_warn_flag
11769     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11770   else
11771     ac_cpp_err=
11772   fi
11773 else
11774   ac_cpp_err=yes
11775 fi
11776 if test -z "$ac_cpp_err"; then
11777   # Broken: success on invalid input.
11778 continue
11779 else
11780   echo "$as_me: failed program was:" >&5
11781 sed 's/^/| /' conftest.$ac_ext >&5
11782
11783   # Passes both tests.
11784 ac_preproc_ok=:
11785 break
11786 fi
11787 rm -f conftest.err conftest.$ac_ext
11788
11789 done
11790 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
11791 rm -f conftest.err conftest.$ac_ext
11792 if $ac_preproc_ok; then
11793   :
11794 else
11795   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
11796 See \`config.log' for more details." >&5
11797 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
11798 See \`config.log' for more details." >&2;}
11799    { (exit 1); exit 1; }; }
11800 fi
11801
11802 ac_ext=c
11803 ac_cpp='$CPP $CPPFLAGS'
11804 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11805 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11806 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11807
11808
11809 case $host_os in
11810   *mingw32* ) ac_cv_mingw32=yes ;;
11811   *cygwin* ) ac_cv_cygwin=yes ;;
11812 esac
11813
11814
11815
11816
11817 cat >>confdefs.h <<_ACEOF
11818 #define EXEEXT "${EXEEXT}"
11819 _ACEOF
11820
11821
11822 echo "$as_me:$LINENO: checking for be_app in -lbe" >&5
11823 echo $ECHO_N "checking for be_app in -lbe... $ECHO_C" >&6
11824 if test "${ac_cv_lib_be_be_app+set}" = set; then
11825   echo $ECHO_N "(cached) $ECHO_C" >&6
11826 else
11827   ac_check_lib_save_LIBS=$LIBS
11828 LIBS="-lbe -lroot -lnet $LIBS"
11829 cat >conftest.$ac_ext <<_ACEOF
11830 /* confdefs.h.  */
11831 _ACEOF
11832 cat confdefs.h >>conftest.$ac_ext
11833 cat >>conftest.$ac_ext <<_ACEOF
11834 /* end confdefs.h.  */
11835
11836 /* Override any gcc2 internal prototype to avoid an error.  */
11837 #ifdef __cplusplus
11838 extern "C"
11839 #endif
11840 /* We use char because int might match the return type of a gcc2
11841    builtin and then its argument prototype would still apply.  */
11842 char be_app ();
11843 int
11844 main ()
11845 {
11846 be_app ();
11847   ;
11848   return 0;
11849 }
11850 _ACEOF
11851 rm -f conftest.$ac_objext conftest$ac_exeext
11852 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11853   (eval $ac_link) 2>conftest.er1
11854   ac_status=$?
11855   grep -v '^ *+' conftest.er1 >conftest.err
11856   rm -f conftest.er1
11857   cat conftest.err >&5
11858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11859   (exit $ac_status); } &&
11860          { ac_try='test -z "$ac_c_werror_flag"
11861                          || test ! -s conftest.err'
11862   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11863   (eval $ac_try) 2>&5
11864   ac_status=$?
11865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11866   (exit $ac_status); }; } &&
11867          { ac_try='test -s conftest$ac_exeext'
11868   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11869   (eval $ac_try) 2>&5
11870   ac_status=$?
11871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11872   (exit $ac_status); }; }; then
11873   ac_cv_lib_be_be_app=yes
11874 else
11875   echo "$as_me: failed program was:" >&5
11876 sed 's/^/| /' conftest.$ac_ext >&5
11877
11878 ac_cv_lib_be_be_app=no
11879 fi
11880 rm -f conftest.err conftest.$ac_objext \
11881       conftest$ac_exeext conftest.$ac_ext
11882 LIBS=$ac_check_lib_save_LIBS
11883 fi
11884 echo "$as_me:$LINENO: result: $ac_cv_lib_be_be_app" >&5
11885 echo "${ECHO_T}$ac_cv_lib_be_be_app" >&6
11886 if test $ac_cv_lib_be_be_app = yes; then
11887   LIBS="$LIBS -lbe -lroot -lnet"
11888 else
11889   :
11890 fi
11891
11892
11893 ac_ext=c
11894 ac_cpp='$CPP $CPPFLAGS'
11895 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11896 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11897 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11898 if test -n "$ac_tool_prefix"; then
11899   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
11900 set dummy ${ac_tool_prefix}gcc; ac_word=$2
11901 echo "$as_me:$LINENO: checking for $ac_word" >&5
11902 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11903 if test "${ac_cv_prog_CC+set}" = set; then
11904   echo $ECHO_N "(cached) $ECHO_C" >&6
11905 else
11906   if test -n "$CC"; then
11907   ac_cv_prog_CC="$CC" # Let the user override the test.
11908 else
11909 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11910 for as_dir in $PATH
11911 do
11912   IFS=$as_save_IFS
11913   test -z "$as_dir" && as_dir=.
11914   for ac_exec_ext in '' $ac_executable_extensions; do
11915   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11916     ac_cv_prog_CC="${ac_tool_prefix}gcc"
11917     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11918     break 2
11919   fi
11920 done
11921 done
11922
11923 fi
11924 fi
11925 CC=$ac_cv_prog_CC
11926 if test -n "$CC"; then
11927   echo "$as_me:$LINENO: result: $CC" >&5
11928 echo "${ECHO_T}$CC" >&6
11929 else
11930   echo "$as_me:$LINENO: result: no" >&5
11931 echo "${ECHO_T}no" >&6
11932 fi
11933
11934 fi
11935 if test -z "$ac_cv_prog_CC"; then
11936   ac_ct_CC=$CC
11937   # Extract the first word of "gcc", so it can be a program name with args.
11938 set dummy gcc; ac_word=$2
11939 echo "$as_me:$LINENO: checking for $ac_word" >&5
11940 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11941 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
11942   echo $ECHO_N "(cached) $ECHO_C" >&6
11943 else
11944   if test -n "$ac_ct_CC"; then
11945   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
11946 else
11947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11948 for as_dir in $PATH
11949 do
11950   IFS=$as_save_IFS
11951   test -z "$as_dir" && as_dir=.
11952   for ac_exec_ext in '' $ac_executable_extensions; do
11953   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11954     ac_cv_prog_ac_ct_CC="gcc"
11955     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11956     break 2
11957   fi
11958 done
11959 done
11960
11961 fi
11962 fi
11963 ac_ct_CC=$ac_cv_prog_ac_ct_CC
11964 if test -n "$ac_ct_CC"; then
11965   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
11966 echo "${ECHO_T}$ac_ct_CC" >&6
11967 else
11968   echo "$as_me:$LINENO: result: no" >&5
11969 echo "${ECHO_T}no" >&6
11970 fi
11971
11972   CC=$ac_ct_CC
11973 else
11974   CC="$ac_cv_prog_CC"
11975 fi
11976
11977 if test -z "$CC"; then
11978   if test -n "$ac_tool_prefix"; then
11979   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
11980 set dummy ${ac_tool_prefix}cc; ac_word=$2
11981 echo "$as_me:$LINENO: checking for $ac_word" >&5
11982 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11983 if test "${ac_cv_prog_CC+set}" = set; then
11984   echo $ECHO_N "(cached) $ECHO_C" >&6
11985 else
11986   if test -n "$CC"; then
11987   ac_cv_prog_CC="$CC" # Let the user override the test.
11988 else
11989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11990 for as_dir in $PATH
11991 do
11992   IFS=$as_save_IFS
11993   test -z "$as_dir" && as_dir=.
11994   for ac_exec_ext in '' $ac_executable_extensions; do
11995   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11996     ac_cv_prog_CC="${ac_tool_prefix}cc"
11997     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11998     break 2
11999   fi
12000 done
12001 done
12002
12003 fi
12004 fi
12005 CC=$ac_cv_prog_CC
12006 if test -n "$CC"; then
12007   echo "$as_me:$LINENO: result: $CC" >&5
12008 echo "${ECHO_T}$CC" >&6
12009 else
12010   echo "$as_me:$LINENO: result: no" >&5
12011 echo "${ECHO_T}no" >&6
12012 fi
12013
12014 fi
12015 if test -z "$ac_cv_prog_CC"; then
12016   ac_ct_CC=$CC
12017   # Extract the first word of "cc", so it can be a program name with args.
12018 set dummy cc; ac_word=$2
12019 echo "$as_me:$LINENO: checking for $ac_word" >&5
12020 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12021 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
12022   echo $ECHO_N "(cached) $ECHO_C" >&6
12023 else
12024   if test -n "$ac_ct_CC"; then
12025   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12026 else
12027 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12028 for as_dir in $PATH
12029 do
12030   IFS=$as_save_IFS
12031   test -z "$as_dir" && as_dir=.
12032   for ac_exec_ext in '' $ac_executable_extensions; do
12033   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12034     ac_cv_prog_ac_ct_CC="cc"
12035     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12036     break 2
12037   fi
12038 done
12039 done
12040
12041 fi
12042 fi
12043 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12044 if test -n "$ac_ct_CC"; then
12045   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
12046 echo "${ECHO_T}$ac_ct_CC" >&6
12047 else
12048   echo "$as_me:$LINENO: result: no" >&5
12049 echo "${ECHO_T}no" >&6
12050 fi
12051
12052   CC=$ac_ct_CC
12053 else
12054   CC="$ac_cv_prog_CC"
12055 fi
12056
12057 fi
12058 if test -z "$CC"; then
12059   # Extract the first word of "cc", so it can be a program name with args.
12060 set dummy cc; ac_word=$2
12061 echo "$as_me:$LINENO: checking for $ac_word" >&5
12062 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12063 if test "${ac_cv_prog_CC+set}" = set; then
12064   echo $ECHO_N "(cached) $ECHO_C" >&6
12065 else
12066   if test -n "$CC"; then
12067   ac_cv_prog_CC="$CC" # Let the user override the test.
12068 else
12069   ac_prog_rejected=no
12070 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12071 for as_dir in $PATH
12072 do
12073   IFS=$as_save_IFS
12074   test -z "$as_dir" && as_dir=.
12075   for ac_exec_ext in '' $ac_executable_extensions; do
12076   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12077     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
12078        ac_prog_rejected=yes
12079        continue
12080      fi
12081     ac_cv_prog_CC="cc"
12082     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12083     break 2
12084   fi
12085 done
12086 done
12087
12088 if test $ac_prog_rejected = yes; then
12089   # We found a bogon in the path, so make sure we never use it.
12090   set dummy $ac_cv_prog_CC
12091   shift
12092   if test $# != 0; then
12093     # We chose a different compiler from the bogus one.
12094     # However, it has the same basename, so the bogon will be chosen
12095     # first if we set CC to just the basename; use the full file name.
12096     shift
12097     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
12098   fi
12099 fi
12100 fi
12101 fi
12102 CC=$ac_cv_prog_CC
12103 if test -n "$CC"; then
12104   echo "$as_me:$LINENO: result: $CC" >&5
12105 echo "${ECHO_T}$CC" >&6
12106 else
12107   echo "$as_me:$LINENO: result: no" >&5
12108 echo "${ECHO_T}no" >&6
12109 fi
12110
12111 fi
12112 if test -z "$CC"; then
12113   if test -n "$ac_tool_prefix"; then
12114   for ac_prog in cl
12115   do
12116     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12117 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12118 echo "$as_me:$LINENO: checking for $ac_word" >&5
12119 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12120 if test "${ac_cv_prog_CC+set}" = set; then
12121   echo $ECHO_N "(cached) $ECHO_C" >&6
12122 else
12123   if test -n "$CC"; then
12124   ac_cv_prog_CC="$CC" # Let the user override the test.
12125 else
12126 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12127 for as_dir in $PATH
12128 do
12129   IFS=$as_save_IFS
12130   test -z "$as_dir" && as_dir=.
12131   for ac_exec_ext in '' $ac_executable_extensions; do
12132   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12133     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
12134     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12135     break 2
12136   fi
12137 done
12138 done
12139
12140 fi
12141 fi
12142 CC=$ac_cv_prog_CC
12143 if test -n "$CC"; then
12144   echo "$as_me:$LINENO: result: $CC" >&5
12145 echo "${ECHO_T}$CC" >&6
12146 else
12147   echo "$as_me:$LINENO: result: no" >&5
12148 echo "${ECHO_T}no" >&6
12149 fi
12150
12151     test -n "$CC" && break
12152   done
12153 fi
12154 if test -z "$CC"; then
12155   ac_ct_CC=$CC
12156   for ac_prog in cl
12157 do
12158   # Extract the first word of "$ac_prog", so it can be a program name with args.
12159 set dummy $ac_prog; ac_word=$2
12160 echo "$as_me:$LINENO: checking for $ac_word" >&5
12161 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12162 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
12163   echo $ECHO_N "(cached) $ECHO_C" >&6
12164 else
12165   if test -n "$ac_ct_CC"; then
12166   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12167 else
12168 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12169 for as_dir in $PATH
12170 do
12171   IFS=$as_save_IFS
12172   test -z "$as_dir" && as_dir=.
12173   for ac_exec_ext in '' $ac_executable_extensions; do
12174   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12175     ac_cv_prog_ac_ct_CC="$ac_prog"
12176     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12177     break 2
12178   fi
12179 done
12180 done
12181
12182 fi
12183 fi
12184 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12185 if test -n "$ac_ct_CC"; then
12186   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
12187 echo "${ECHO_T}$ac_ct_CC" >&6
12188 else
12189   echo "$as_me:$LINENO: result: no" >&5
12190 echo "${ECHO_T}no" >&6
12191 fi
12192
12193   test -n "$ac_ct_CC" && break
12194 done
12195
12196   CC=$ac_ct_CC
12197 fi
12198
12199 fi
12200
12201
12202 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
12203 See \`config.log' for more details." >&5
12204 echo "$as_me: error: no acceptable C compiler found in \$PATH
12205 See \`config.log' for more details." >&2;}
12206    { (exit 1); exit 1; }; }
12207
12208 # Provide some information about the compiler.
12209 echo "$as_me:$LINENO:" \
12210      "checking for C compiler version" >&5
12211 ac_compiler=`set X $ac_compile; echo $2`
12212 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
12213   (eval $ac_compiler --version </dev/null >&5) 2>&5
12214   ac_status=$?
12215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12216   (exit $ac_status); }
12217 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
12218   (eval $ac_compiler -v </dev/null >&5) 2>&5
12219   ac_status=$?
12220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12221   (exit $ac_status); }
12222 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
12223   (eval $ac_compiler -V </dev/null >&5) 2>&5
12224   ac_status=$?
12225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12226   (exit $ac_status); }
12227
12228 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
12229 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
12230 if test "${ac_cv_c_compiler_gnu+set}" = set; then
12231   echo $ECHO_N "(cached) $ECHO_C" >&6
12232 else
12233   cat >conftest.$ac_ext <<_ACEOF
12234 /* confdefs.h.  */
12235 _ACEOF
12236 cat confdefs.h >>conftest.$ac_ext
12237 cat >>conftest.$ac_ext <<_ACEOF
12238 /* end confdefs.h.  */
12239
12240 int
12241 main ()
12242 {
12243 #ifndef __GNUC__
12244        choke me
12245 #endif
12246
12247   ;
12248   return 0;
12249 }
12250 _ACEOF
12251 rm -f conftest.$ac_objext
12252 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12253   (eval $ac_compile) 2>conftest.er1
12254   ac_status=$?
12255   grep -v '^ *+' conftest.er1 >conftest.err
12256   rm -f conftest.er1
12257   cat conftest.err >&5
12258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12259   (exit $ac_status); } &&
12260          { ac_try='test -z "$ac_c_werror_flag"
12261                          || test ! -s conftest.err'
12262   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12263   (eval $ac_try) 2>&5
12264   ac_status=$?
12265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12266   (exit $ac_status); }; } &&
12267          { ac_try='test -s conftest.$ac_objext'
12268   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12269   (eval $ac_try) 2>&5
12270   ac_status=$?
12271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12272   (exit $ac_status); }; }; then
12273   ac_compiler_gnu=yes
12274 else
12275   echo "$as_me: failed program was:" >&5
12276 sed 's/^/| /' conftest.$ac_ext >&5
12277
12278 ac_compiler_gnu=no
12279 fi
12280 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12281 ac_cv_c_compiler_gnu=$ac_compiler_gnu
12282
12283 fi
12284 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
12285 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
12286 GCC=`test $ac_compiler_gnu = yes && echo yes`
12287 ac_test_CFLAGS=${CFLAGS+set}
12288 ac_save_CFLAGS=$CFLAGS
12289 CFLAGS="-g"
12290 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
12291 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
12292 if test "${ac_cv_prog_cc_g+set}" = set; then
12293   echo $ECHO_N "(cached) $ECHO_C" >&6
12294 else
12295   cat >conftest.$ac_ext <<_ACEOF
12296 /* confdefs.h.  */
12297 _ACEOF
12298 cat confdefs.h >>conftest.$ac_ext
12299 cat >>conftest.$ac_ext <<_ACEOF
12300 /* end confdefs.h.  */
12301
12302 int
12303 main ()
12304 {
12305
12306   ;
12307   return 0;
12308 }
12309 _ACEOF
12310 rm -f conftest.$ac_objext
12311 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12312   (eval $ac_compile) 2>conftest.er1
12313   ac_status=$?
12314   grep -v '^ *+' conftest.er1 >conftest.err
12315   rm -f conftest.er1
12316   cat conftest.err >&5
12317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12318   (exit $ac_status); } &&
12319          { ac_try='test -z "$ac_c_werror_flag"
12320                          || test ! -s conftest.err'
12321   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12322   (eval $ac_try) 2>&5
12323   ac_status=$?
12324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12325   (exit $ac_status); }; } &&
12326          { ac_try='test -s conftest.$ac_objext'
12327   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12328   (eval $ac_try) 2>&5
12329   ac_status=$?
12330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12331   (exit $ac_status); }; }; then
12332   ac_cv_prog_cc_g=yes
12333 else
12334   echo "$as_me: failed program was:" >&5
12335 sed 's/^/| /' conftest.$ac_ext >&5
12336
12337 ac_cv_prog_cc_g=no
12338 fi
12339 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12340 fi
12341 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
12342 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
12343 if test "$ac_test_CFLAGS" = set; then
12344   CFLAGS=$ac_save_CFLAGS
12345 elif test $ac_cv_prog_cc_g = yes; then
12346   if test "$GCC" = yes; then
12347     CFLAGS="-g -O2"
12348   else
12349     CFLAGS="-g"
12350   fi
12351 else
12352   if test "$GCC" = yes; then
12353     CFLAGS="-O2"
12354   else
12355     CFLAGS=
12356   fi
12357 fi
12358 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
12359 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
12360 if test "${ac_cv_prog_cc_stdc+set}" = set; then
12361   echo $ECHO_N "(cached) $ECHO_C" >&6
12362 else
12363   ac_cv_prog_cc_stdc=no
12364 ac_save_CC=$CC
12365 cat >conftest.$ac_ext <<_ACEOF
12366 /* confdefs.h.  */
12367 _ACEOF
12368 cat confdefs.h >>conftest.$ac_ext
12369 cat >>conftest.$ac_ext <<_ACEOF
12370 /* end confdefs.h.  */
12371 #include <stdarg.h>
12372 #include <stdio.h>
12373 #include <sys/types.h>
12374 #include <sys/stat.h>
12375 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12376 struct buf { int x; };
12377 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12378 static char *e (p, i)
12379      char **p;
12380      int i;
12381 {
12382   return p[i];
12383 }
12384 static char *f (char * (*g) (char **, int), char **p, ...)
12385 {
12386   char *s;
12387   va_list v;
12388   va_start (v,p);
12389   s = g (p, va_arg (v,int));
12390   va_end (v);
12391   return s;
12392 }
12393
12394 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
12395    function prototypes and stuff, but not '\xHH' hex character constants.
12396    These don't provoke an error unfortunately, instead are silently treated
12397    as 'x'.  The following induces an error, until -std1 is added to get
12398    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
12399    array size at least.  It's necessary to write '\x00'==0 to get something
12400    that's true only with -std1.  */
12401 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
12402
12403 int test (int i, double x);
12404 struct s1 {int (*f) (int a);};
12405 struct s2 {int (*f) (double a);};
12406 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12407 int argc;
12408 char **argv;
12409 int
12410 main ()
12411 {
12412 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12413   ;
12414   return 0;
12415 }
12416 _ACEOF
12417 # Don't try gcc -ansi; that turns off useful extensions and
12418 # breaks some systems' header files.
12419 # AIX                   -qlanglvl=ansi
12420 # Ultrix and OSF/1      -std1
12421 # HP-UX 10.20 and later -Ae
12422 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12423 # SVR4                  -Xc -D__EXTENSIONS__
12424 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12425 do
12426   CC="$ac_save_CC $ac_arg"
12427   rm -f conftest.$ac_objext
12428 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12429   (eval $ac_compile) 2>conftest.er1
12430   ac_status=$?
12431   grep -v '^ *+' conftest.er1 >conftest.err
12432   rm -f conftest.er1
12433   cat conftest.err >&5
12434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12435   (exit $ac_status); } &&
12436          { ac_try='test -z "$ac_c_werror_flag"
12437                          || test ! -s conftest.err'
12438   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12439   (eval $ac_try) 2>&5
12440   ac_status=$?
12441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12442   (exit $ac_status); }; } &&
12443          { ac_try='test -s conftest.$ac_objext'
12444   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12445   (eval $ac_try) 2>&5
12446   ac_status=$?
12447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12448   (exit $ac_status); }; }; then
12449   ac_cv_prog_cc_stdc=$ac_arg
12450 break
12451 else
12452   echo "$as_me: failed program was:" >&5
12453 sed 's/^/| /' conftest.$ac_ext >&5
12454
12455 fi
12456 rm -f conftest.err conftest.$ac_objext
12457 done
12458 rm -f conftest.$ac_ext conftest.$ac_objext
12459 CC=$ac_save_CC
12460
12461 fi
12462
12463 case "x$ac_cv_prog_cc_stdc" in
12464   x|xno)
12465     echo "$as_me:$LINENO: result: none needed" >&5
12466 echo "${ECHO_T}none needed" >&6 ;;
12467   *)
12468     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
12469 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12470     CC="$CC $ac_cv_prog_cc_stdc" ;;
12471 esac
12472
12473 # Some people use a C++ compiler to compile C.  Since we use `exit',
12474 # in C++ we need to declare it.  In case someone uses the same compiler
12475 # for both compiling C and C++ we need to have the C++ compiler decide
12476 # the declaration of exit, since it's the most demanding environment.
12477 cat >conftest.$ac_ext <<_ACEOF
12478 #ifndef __cplusplus
12479   choke me
12480 #endif
12481 _ACEOF
12482 rm -f conftest.$ac_objext
12483 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12484   (eval $ac_compile) 2>conftest.er1
12485   ac_status=$?
12486   grep -v '^ *+' conftest.er1 >conftest.err
12487   rm -f conftest.er1
12488   cat conftest.err >&5
12489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12490   (exit $ac_status); } &&
12491          { ac_try='test -z "$ac_c_werror_flag"
12492                          || test ! -s conftest.err'
12493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12494   (eval $ac_try) 2>&5
12495   ac_status=$?
12496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12497   (exit $ac_status); }; } &&
12498          { ac_try='test -s conftest.$ac_objext'
12499   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12500   (eval $ac_try) 2>&5
12501   ac_status=$?
12502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12503   (exit $ac_status); }; }; then
12504   for ac_declaration in \
12505    '' \
12506    'extern "C" void std::exit (int) throw (); using std::exit;' \
12507    'extern "C" void std::exit (int); using std::exit;' \
12508    'extern "C" void exit (int) throw ();' \
12509    'extern "C" void exit (int);' \
12510    'void exit (int);'
12511 do
12512   cat >conftest.$ac_ext <<_ACEOF
12513 /* confdefs.h.  */
12514 _ACEOF
12515 cat confdefs.h >>conftest.$ac_ext
12516 cat >>conftest.$ac_ext <<_ACEOF
12517 /* end confdefs.h.  */
12518 $ac_declaration
12519 #include <stdlib.h>
12520 int
12521 main ()
12522 {
12523 exit (42);
12524   ;
12525   return 0;
12526 }
12527 _ACEOF
12528 rm -f conftest.$ac_objext
12529 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12530   (eval $ac_compile) 2>conftest.er1
12531   ac_status=$?
12532   grep -v '^ *+' conftest.er1 >conftest.err
12533   rm -f conftest.er1
12534   cat conftest.err >&5
12535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12536   (exit $ac_status); } &&
12537          { ac_try='test -z "$ac_c_werror_flag"
12538                          || test ! -s conftest.err'
12539   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12540   (eval $ac_try) 2>&5
12541   ac_status=$?
12542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12543   (exit $ac_status); }; } &&
12544          { ac_try='test -s conftest.$ac_objext'
12545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12546   (eval $ac_try) 2>&5
12547   ac_status=$?
12548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12549   (exit $ac_status); }; }; then
12550   :
12551 else
12552   echo "$as_me: failed program was:" >&5
12553 sed 's/^/| /' conftest.$ac_ext >&5
12554
12555 continue
12556 fi
12557 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12558   cat >conftest.$ac_ext <<_ACEOF
12559 /* confdefs.h.  */
12560 _ACEOF
12561 cat confdefs.h >>conftest.$ac_ext
12562 cat >>conftest.$ac_ext <<_ACEOF
12563 /* end confdefs.h.  */
12564 $ac_declaration
12565 int
12566 main ()
12567 {
12568 exit (42);
12569   ;
12570   return 0;
12571 }
12572 _ACEOF
12573 rm -f conftest.$ac_objext
12574 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12575   (eval $ac_compile) 2>conftest.er1
12576   ac_status=$?
12577   grep -v '^ *+' conftest.er1 >conftest.err
12578   rm -f conftest.er1
12579   cat conftest.err >&5
12580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12581   (exit $ac_status); } &&
12582          { ac_try='test -z "$ac_c_werror_flag"
12583                          || test ! -s conftest.err'
12584   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12585   (eval $ac_try) 2>&5
12586   ac_status=$?
12587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12588   (exit $ac_status); }; } &&
12589          { ac_try='test -s conftest.$ac_objext'
12590   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12591   (eval $ac_try) 2>&5
12592   ac_status=$?
12593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12594   (exit $ac_status); }; }; then
12595   break
12596 else
12597   echo "$as_me: failed program was:" >&5
12598 sed 's/^/| /' conftest.$ac_ext >&5
12599
12600 fi
12601 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12602 done
12603 rm -f conftest*
12604 if test -n "$ac_declaration"; then
12605   echo '#ifdef __cplusplus' >>confdefs.h
12606   echo $ac_declaration      >>confdefs.h
12607   echo '#endif'             >>confdefs.h
12608 fi
12609
12610 else
12611   echo "$as_me: failed program was:" >&5
12612 sed 's/^/| /' conftest.$ac_ext >&5
12613
12614 fi
12615 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12616 ac_ext=c
12617 ac_cpp='$CPP $CPPFLAGS'
12618 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12619 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12620 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12621
12622 depcc="$CC"   am_compiler_list=
12623
12624 echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
12625 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
12626 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
12627   echo $ECHO_N "(cached) $ECHO_C" >&6
12628 else
12629   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
12630   # We make a subdir and do the tests there.  Otherwise we can end up
12631   # making bogus files that we don't know about and never remove.  For
12632   # instance it was reported that on HP-UX the gcc test will end up
12633   # making a dummy file named `D' -- because `-MD' means `put the output
12634   # in D'.
12635   mkdir conftest.dir
12636   # Copy depcomp to subdir because otherwise we won't find it if we're
12637   # using a relative directory.
12638   cp "$am_depcomp" conftest.dir
12639   cd conftest.dir
12640   # We will build objects and dependencies in a subdirectory because
12641   # it helps to detect inapplicable dependency modes.  For instance
12642   # both Tru64's cc and ICC support -MD to output dependencies as a
12643   # side effect of compilation, but ICC will put the dependencies in
12644   # the current directory while Tru64 will put them in the object
12645   # directory.
12646   mkdir sub
12647
12648   am_cv_CC_dependencies_compiler_type=none
12649   if test "$am_compiler_list" = ""; then
12650      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
12651   fi
12652   for depmode in $am_compiler_list; do
12653     # Setup a source with many dependencies, because some compilers
12654     # like to wrap large dependency lists on column 80 (with \), and
12655     # we should not choose a depcomp mode which is confused by this.
12656     #
12657     # We need to recreate these files for each test, as the compiler may
12658     # overwrite some of them when testing with obscure command lines.
12659     # This happens at least with the AIX C compiler.
12660     : > sub/conftest.c
12661     for i in 1 2 3 4 5 6; do
12662       echo '#include "conftst'$i'.h"' >> sub/conftest.c
12663       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
12664       # Solaris 8's {/usr,}/bin/sh.
12665       touch sub/conftst$i.h
12666     done
12667     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
12668
12669     case $depmode in
12670     nosideeffect)
12671       # after this tag, mechanisms are not by side-effect, so they'll
12672       # only be used when explicitly requested
12673       if test "x$enable_dependency_tracking" = xyes; then
12674         continue
12675       else
12676         break
12677       fi
12678       ;;
12679     none) break ;;
12680     esac
12681     # We check with `-c' and `-o' for the sake of the "dashmstdout"
12682     # mode.  It turns out that the SunPro C++ compiler does not properly
12683     # handle `-M -o', and we need to detect this.
12684     if depmode=$depmode \
12685        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
12686        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
12687        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
12688          >/dev/null 2>conftest.err &&
12689        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
12690        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
12691        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
12692       # icc doesn't choke on unknown options, it will just issue warnings
12693       # or remarks (even with -Werror).  So we grep stderr for any message
12694       # that says an option was ignored or not supported.
12695       # When given -MP, icc 7.0 and 7.1 complain thusly:
12696       #   icc: Command line warning: ignoring option '-M'; no argument required
12697       # The diagnosis changed in icc 8.0:
12698       #   icc: Command line remark: option '-MP' not supported
12699       if (grep 'ignoring option' conftest.err ||
12700           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
12701         am_cv_CC_dependencies_compiler_type=$depmode
12702         break
12703       fi
12704     fi
12705   done
12706
12707   cd ..
12708   rm -rf conftest.dir
12709 else
12710   am_cv_CC_dependencies_compiler_type=none
12711 fi
12712
12713 fi
12714 echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
12715 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
12716 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
12717
12718
12719
12720 if
12721   test "x$enable_dependency_tracking" != xno \
12722   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
12723   am__fastdepCC_TRUE=
12724   am__fastdepCC_FALSE='#'
12725 else
12726   am__fastdepCC_TRUE='#'
12727   am__fastdepCC_FALSE=
12728 fi
12729
12730
12731 if test "X${ac_cv_prog_cc_stdc}" = "Xno" ; then
12732         { { echo "$as_me:$LINENO: error: OpenLDAP requires compiler to support STDC constructs." >&5
12733 echo "$as_me: error: OpenLDAP requires compiler to support STDC constructs." >&2;}
12734    { (exit 1); exit 1; }; }
12735 fi
12736
12737 # test for make depend flag
12738 OL_MKDEP=
12739 OL_MKDEP_FLAGS=
12740 if test -z "${MKDEP}"; then
12741         OL_MKDEP="${CC-cc}"
12742         if test -z "${MKDEP_FLAGS}"; then
12743                 echo "$as_me:$LINENO: checking for ${OL_MKDEP} depend flag" >&5
12744 echo $ECHO_N "checking for ${OL_MKDEP} depend flag... $ECHO_C" >&6
12745 if test "${ol_cv_mkdep+set}" = set; then
12746   echo $ECHO_N "(cached) $ECHO_C" >&6
12747 else
12748
12749                         ol_cv_mkdep=no
12750                         for flag in "-M" "-xM"; do
12751                                 cat > conftest.c <<EOF
12752  noCode;
12753 EOF
12754                                 if { ac_try='$OL_MKDEP $flag conftest.c'
12755   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12756   (eval $ac_try) 2>&5
12757   ac_status=$?
12758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12759   (exit $ac_status); }; } \
12760                                         | grep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
12761                                 then
12762                                         if test ! -f conftest."${ac_object}" ; then
12763                                                 ol_cv_mkdep=$flag
12764                                                 OL_MKDEP_FLAGS="$flag"
12765                                                 break
12766                                         fi
12767                                 fi
12768                         done
12769                         rm -f conftest*
12770
12771 fi
12772 echo "$as_me:$LINENO: result: $ol_cv_mkdep" >&5
12773 echo "${ECHO_T}$ol_cv_mkdep" >&6
12774         else
12775                 cc_cv_mkdep=yes
12776                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
12777         fi
12778 else
12779         cc_cv_mkdep=yes
12780         OL_MKDEP="${MKDEP}"
12781         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
12782 fi
12783
12784
12785
12786 if test "${ol_cv_mkdep}" = no ; then
12787         # this will soon become an error
12788         { echo "$as_me:$LINENO: WARNING: do not know how to generate dependencies" >&5
12789 echo "$as_me: WARNING: do not know how to generate dependencies" >&2;}
12790 fi
12791
12792 echo "$as_me:$LINENO: checking for afopen in -ls" >&5
12793 echo $ECHO_N "checking for afopen in -ls... $ECHO_C" >&6
12794 if test "${ac_cv_lib_s_afopen+set}" = set; then
12795   echo $ECHO_N "(cached) $ECHO_C" >&6
12796 else
12797   ac_check_lib_save_LIBS=$LIBS
12798 LIBS="-ls  $LIBS"
12799 cat >conftest.$ac_ext <<_ACEOF
12800 /* confdefs.h.  */
12801 _ACEOF
12802 cat confdefs.h >>conftest.$ac_ext
12803 cat >>conftest.$ac_ext <<_ACEOF
12804 /* end confdefs.h.  */
12805
12806 /* Override any gcc2 internal prototype to avoid an error.  */
12807 #ifdef __cplusplus
12808 extern "C"
12809 #endif
12810 /* We use char because int might match the return type of a gcc2
12811    builtin and then its argument prototype would still apply.  */
12812 char afopen ();
12813 int
12814 main ()
12815 {
12816 afopen ();
12817   ;
12818   return 0;
12819 }
12820 _ACEOF
12821 rm -f conftest.$ac_objext conftest$ac_exeext
12822 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12823   (eval $ac_link) 2>conftest.er1
12824   ac_status=$?
12825   grep -v '^ *+' conftest.er1 >conftest.err
12826   rm -f conftest.er1
12827   cat conftest.err >&5
12828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12829   (exit $ac_status); } &&
12830          { ac_try='test -z "$ac_c_werror_flag"
12831                          || test ! -s conftest.err'
12832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12833   (eval $ac_try) 2>&5
12834   ac_status=$?
12835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12836   (exit $ac_status); }; } &&
12837          { ac_try='test -s conftest$ac_exeext'
12838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12839   (eval $ac_try) 2>&5
12840   ac_status=$?
12841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12842   (exit $ac_status); }; }; then
12843   ac_cv_lib_s_afopen=yes
12844 else
12845   echo "$as_me: failed program was:" >&5
12846 sed 's/^/| /' conftest.$ac_ext >&5
12847
12848 ac_cv_lib_s_afopen=no
12849 fi
12850 rm -f conftest.err conftest.$ac_objext \
12851       conftest$ac_exeext conftest.$ac_ext
12852 LIBS=$ac_check_lib_save_LIBS
12853 fi
12854 echo "$as_me:$LINENO: result: $ac_cv_lib_s_afopen" >&5
12855 echo "${ECHO_T}$ac_cv_lib_s_afopen" >&6
12856 if test $ac_cv_lib_s_afopen = yes; then
12857
12858         AUTH_LIBS=-ls
12859
12860 cat >>confdefs.h <<\_ACEOF
12861 #define HAVE_AIX_SECURITY 1
12862 _ACEOF
12863
12864
12865 fi
12866
12867
12868 case "$target" in
12869 *-ibm-openedition)
12870         ac_cv_func_getopt=no
12871
12872 cat >>confdefs.h <<\_ACEOF
12873 #define BOTH_STRINGS_H 1
12874 _ACEOF
12875
12876         ;;
12877 esac
12878
12879 ol_link_modules=no
12880 WITH_MODULES_ENABLED=no
12881 if test $ol_enable_modules != no ; then
12882
12883 for ac_header in ltdl.h
12884 do
12885 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12886 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12887   echo "$as_me:$LINENO: checking for $ac_header" >&5
12888 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12889 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12890   echo $ECHO_N "(cached) $ECHO_C" >&6
12891 fi
12892 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12893 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12894 else
12895   # Is the header compilable?
12896 echo "$as_me:$LINENO: checking $ac_header usability" >&5
12897 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12898 cat >conftest.$ac_ext <<_ACEOF
12899 /* confdefs.h.  */
12900 _ACEOF
12901 cat confdefs.h >>conftest.$ac_ext
12902 cat >>conftest.$ac_ext <<_ACEOF
12903 /* end confdefs.h.  */
12904 $ac_includes_default
12905 #include <$ac_header>
12906 _ACEOF
12907 rm -f conftest.$ac_objext
12908 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12909   (eval $ac_compile) 2>conftest.er1
12910   ac_status=$?
12911   grep -v '^ *+' conftest.er1 >conftest.err
12912   rm -f conftest.er1
12913   cat conftest.err >&5
12914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12915   (exit $ac_status); } &&
12916          { ac_try='test -z "$ac_c_werror_flag"
12917                          || test ! -s conftest.err'
12918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12919   (eval $ac_try) 2>&5
12920   ac_status=$?
12921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12922   (exit $ac_status); }; } &&
12923          { ac_try='test -s conftest.$ac_objext'
12924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12925   (eval $ac_try) 2>&5
12926   ac_status=$?
12927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12928   (exit $ac_status); }; }; then
12929   ac_header_compiler=yes
12930 else
12931   echo "$as_me: failed program was:" >&5
12932 sed 's/^/| /' conftest.$ac_ext >&5
12933
12934 ac_header_compiler=no
12935 fi
12936 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12937 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12938 echo "${ECHO_T}$ac_header_compiler" >&6
12939
12940 # Is the header present?
12941 echo "$as_me:$LINENO: checking $ac_header presence" >&5
12942 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
12943 cat >conftest.$ac_ext <<_ACEOF
12944 /* confdefs.h.  */
12945 _ACEOF
12946 cat confdefs.h >>conftest.$ac_ext
12947 cat >>conftest.$ac_ext <<_ACEOF
12948 /* end confdefs.h.  */
12949 #include <$ac_header>
12950 _ACEOF
12951 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12952   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12953   ac_status=$?
12954   grep -v '^ *+' conftest.er1 >conftest.err
12955   rm -f conftest.er1
12956   cat conftest.err >&5
12957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12958   (exit $ac_status); } >/dev/null; then
12959   if test -s conftest.err; then
12960     ac_cpp_err=$ac_c_preproc_warn_flag
12961     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12962   else
12963     ac_cpp_err=
12964   fi
12965 else
12966   ac_cpp_err=yes
12967 fi
12968 if test -z "$ac_cpp_err"; then
12969   ac_header_preproc=yes
12970 else
12971   echo "$as_me: failed program was:" >&5
12972 sed 's/^/| /' conftest.$ac_ext >&5
12973
12974   ac_header_preproc=no
12975 fi
12976 rm -f conftest.err conftest.$ac_ext
12977 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12978 echo "${ECHO_T}$ac_header_preproc" >&6
12979
12980 # So?  What about this header?
12981 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12982   yes:no: )
12983     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12984 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12985     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12986 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12987     ac_header_preproc=yes
12988     ;;
12989   no:yes:* )
12990     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12991 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12992     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12993 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12994     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12995 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12996     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12997 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12998     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12999 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13000     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13001 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13002     (
13003       cat <<\_ASBOX
13004 ## --------------------------------------------- ##
13005 ## Report this to <http://www.openldap.org/its/> ##
13006 ## --------------------------------------------- ##
13007 _ASBOX
13008     ) |
13009       sed "s/^/$as_me: WARNING:     /" >&2
13010     ;;
13011 esac
13012 echo "$as_me:$LINENO: checking for $ac_header" >&5
13013 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13014 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13015   echo $ECHO_N "(cached) $ECHO_C" >&6
13016 else
13017   eval "$as_ac_Header=\$ac_header_preproc"
13018 fi
13019 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13020 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13021
13022 fi
13023 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13024   cat >>confdefs.h <<_ACEOF
13025 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13026 _ACEOF
13027
13028 fi
13029
13030 done
13031
13032
13033         if test $ac_cv_header_ltdl_h = no ; then
13034                 { { echo "$as_me:$LINENO: error: could not locate libtool ltdl.h" >&5
13035 echo "$as_me: error: could not locate libtool ltdl.h" >&2;}
13036    { (exit 1); exit 1; }; }
13037         fi
13038
13039         echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
13040 echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6
13041 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
13042   echo $ECHO_N "(cached) $ECHO_C" >&6
13043 else
13044   ac_check_lib_save_LIBS=$LIBS
13045 LIBS="-lltdl  $LIBS"
13046 cat >conftest.$ac_ext <<_ACEOF
13047 /* confdefs.h.  */
13048 _ACEOF
13049 cat confdefs.h >>conftest.$ac_ext
13050 cat >>conftest.$ac_ext <<_ACEOF
13051 /* end confdefs.h.  */
13052
13053 /* Override any gcc2 internal prototype to avoid an error.  */
13054 #ifdef __cplusplus
13055 extern "C"
13056 #endif
13057 /* We use char because int might match the return type of a gcc2
13058    builtin and then its argument prototype would still apply.  */
13059 char lt_dlinit ();
13060 int
13061 main ()
13062 {
13063 lt_dlinit ();
13064   ;
13065   return 0;
13066 }
13067 _ACEOF
13068 rm -f conftest.$ac_objext conftest$ac_exeext
13069 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13070   (eval $ac_link) 2>conftest.er1
13071   ac_status=$?
13072   grep -v '^ *+' conftest.er1 >conftest.err
13073   rm -f conftest.er1
13074   cat conftest.err >&5
13075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13076   (exit $ac_status); } &&
13077          { ac_try='test -z "$ac_c_werror_flag"
13078                          || test ! -s conftest.err'
13079   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13080   (eval $ac_try) 2>&5
13081   ac_status=$?
13082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13083   (exit $ac_status); }; } &&
13084          { ac_try='test -s conftest$ac_exeext'
13085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13086   (eval $ac_try) 2>&5
13087   ac_status=$?
13088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13089   (exit $ac_status); }; }; then
13090   ac_cv_lib_ltdl_lt_dlinit=yes
13091 else
13092   echo "$as_me: failed program was:" >&5
13093 sed 's/^/| /' conftest.$ac_ext >&5
13094
13095 ac_cv_lib_ltdl_lt_dlinit=no
13096 fi
13097 rm -f conftest.err conftest.$ac_objext \
13098       conftest$ac_exeext conftest.$ac_ext
13099 LIBS=$ac_check_lib_save_LIBS
13100 fi
13101 echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
13102 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6
13103 if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
13104
13105                 MODULES_LIBS=-lltdl
13106
13107 cat >>confdefs.h <<\_ACEOF
13108 #define HAVE_LIBLTDL 1
13109 _ACEOF
13110
13111
13112 fi
13113
13114
13115         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
13116                 { { echo "$as_me:$LINENO: error: could not locate libtool -lltdl" >&5
13117 echo "$as_me: error: could not locate libtool -lltdl" >&2;}
13118    { (exit 1); exit 1; }; }
13119         fi
13120         ol_link_modules=yes
13121         WITH_MODULES_ENABLED=yes
13122
13123 else
13124         for i in $Backends; do
13125                 eval "ol_tmp=\$ol_enable_$i"
13126                 if test $ol_tmp = mod ; then
13127                         { echo "$as_me:$LINENO: WARNING: building static $i backend" >&5
13128 echo "$as_me: WARNING: building static $i backend" >&2;}
13129                         eval "ol_enable_$i=yes"
13130                 fi
13131         done
13132         for i in $Overlays; do
13133                 eval "ol_tmp=\$ol_enable_$i"
13134                 if test $ol_tmp = mod ; then
13135                         { echo "$as_me:$LINENO: WARNING: building static $i overlay" >&5
13136 echo "$as_me: WARNING: building static $i overlay" >&2;}
13137                         eval "ol_enable_$i=yes"
13138                 fi
13139         done
13140 fi
13141
13142 # test for EBCDIC
13143 echo "$as_me:$LINENO: checking for EBCDIC" >&5
13144 echo $ECHO_N "checking for EBCDIC... $ECHO_C" >&6
13145 if test "${ol_cv_cpp_ebcdic+set}" = set; then
13146   echo $ECHO_N "(cached) $ECHO_C" >&6
13147 else
13148
13149         cat >conftest.$ac_ext <<_ACEOF
13150 /* confdefs.h.  */
13151 _ACEOF
13152 cat confdefs.h >>conftest.$ac_ext
13153 cat >>conftest.$ac_ext <<_ACEOF
13154 /* end confdefs.h.  */
13155
13156 #if !('M' == 0xd4)
13157 #include <__ASCII__/generate_error.h>
13158 #endif
13159
13160 _ACEOF
13161 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13162   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13163   ac_status=$?
13164   grep -v '^ *+' conftest.er1 >conftest.err
13165   rm -f conftest.er1
13166   cat conftest.err >&5
13167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13168   (exit $ac_status); } >/dev/null; then
13169   if test -s conftest.err; then
13170     ac_cpp_err=$ac_c_preproc_warn_flag
13171     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13172   else
13173     ac_cpp_err=
13174   fi
13175 else
13176   ac_cpp_err=yes
13177 fi
13178 if test -z "$ac_cpp_err"; then
13179   ol_cv_cpp_ebcdic=yes
13180 else
13181   echo "$as_me: failed program was:" >&5
13182 sed 's/^/| /' conftest.$ac_ext >&5
13183
13184   ol_cv_cpp_ebcdic=no
13185 fi
13186 rm -f conftest.err conftest.$ac_ext
13187 fi
13188 echo "$as_me:$LINENO: result: $ol_cv_cpp_ebcdic" >&5
13189 echo "${ECHO_T}$ol_cv_cpp_ebcdic" >&6
13190 if test $ol_cv_cpp_ebcdic = yes ; then
13191
13192 cat >>confdefs.h <<\_ACEOF
13193 #define HAVE_EBCDIC 1
13194 _ACEOF
13195
13196 fi
13197
13198 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
13199 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13200 if test "${ol_cv_header_stdc+set}" = set; then
13201   echo $ECHO_N "(cached) $ECHO_C" >&6
13202 else
13203   cat >conftest.$ac_ext <<_ACEOF
13204 /* confdefs.h.  */
13205 _ACEOF
13206 cat confdefs.h >>conftest.$ac_ext
13207 cat >>conftest.$ac_ext <<_ACEOF
13208 /* end confdefs.h.  */
13209 #include <stdlib.h>
13210 #include <stdarg.h>
13211 #include <string.h>
13212 #include <float.h>
13213 _ACEOF
13214 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13215   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13216   ac_status=$?
13217   grep -v '^ *+' conftest.er1 >conftest.err
13218   rm -f conftest.er1
13219   cat conftest.err >&5
13220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13221   (exit $ac_status); } >/dev/null; then
13222   if test -s conftest.err; then
13223     ac_cpp_err=$ac_c_preproc_warn_flag
13224     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13225   else
13226     ac_cpp_err=
13227   fi
13228 else
13229   ac_cpp_err=yes
13230 fi
13231 if test -z "$ac_cpp_err"; then
13232   ol_cv_header_stdc=yes
13233 else
13234   echo "$as_me: failed program was:" >&5
13235 sed 's/^/| /' conftest.$ac_ext >&5
13236
13237   ol_cv_header_stdc=no
13238 fi
13239 rm -f conftest.err conftest.$ac_ext
13240
13241 if test $ol_cv_header_stdc = yes; then
13242   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13243 cat >conftest.$ac_ext <<_ACEOF
13244 /* confdefs.h.  */
13245 _ACEOF
13246 cat confdefs.h >>conftest.$ac_ext
13247 cat >>conftest.$ac_ext <<_ACEOF
13248 /* end confdefs.h.  */
13249 #include <string.h>
13250
13251 _ACEOF
13252 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13253   $EGREP "memchr" >/dev/null 2>&1; then
13254   :
13255 else
13256   ol_cv_header_stdc=no
13257 fi
13258 rm -f conftest*
13259
13260 fi
13261
13262 if test $ol_cv_header_stdc = yes; then
13263   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13264 cat >conftest.$ac_ext <<_ACEOF
13265 /* confdefs.h.  */
13266 _ACEOF
13267 cat confdefs.h >>conftest.$ac_ext
13268 cat >>conftest.$ac_ext <<_ACEOF
13269 /* end confdefs.h.  */
13270 #include <stdlib.h>
13271
13272 _ACEOF
13273 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13274   $EGREP "free" >/dev/null 2>&1; then
13275   :
13276 else
13277   ol_cv_header_stdc=no
13278 fi
13279 rm -f conftest*
13280
13281 fi
13282
13283 if test $ol_cv_header_stdc = yes; then
13284   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13285 if test "$cross_compiling" = yes; then
13286   :
13287 else
13288   cat >conftest.$ac_ext <<_ACEOF
13289 /* confdefs.h.  */
13290 _ACEOF
13291 cat confdefs.h >>conftest.$ac_ext
13292 cat >>conftest.$ac_ext <<_ACEOF
13293 /* end confdefs.h.  */
13294 #include <ctype.h>
13295 #ifndef HAVE_EBCDIC
13296 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13297 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13298 #else
13299 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13300                 || ('j' <= (c) && (c) <= 'r') \
13301                 || ('s' <= (c) && (c) <= 'z'))
13302 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
13303 #endif
13304 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13305 int main () { int i; for (i = 0; i < 256; i++)
13306 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13307 exit (0); }
13308
13309 _ACEOF
13310 rm -f conftest$ac_exeext
13311 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13312   (eval $ac_link) 2>&5
13313   ac_status=$?
13314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13315   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13316   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13317   (eval $ac_try) 2>&5
13318   ac_status=$?
13319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13320   (exit $ac_status); }; }; then
13321   :
13322 else
13323   echo "$as_me: program exited with status $ac_status" >&5
13324 echo "$as_me: failed program was:" >&5
13325 sed 's/^/| /' conftest.$ac_ext >&5
13326
13327 ( exit $ac_status )
13328 ol_cv_header_stdc=no
13329 fi
13330 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13331 fi
13332 fi
13333 fi
13334 echo "$as_me:$LINENO: result: $ol_cv_header_stdc" >&5
13335 echo "${ECHO_T}$ol_cv_header_stdc" >&6
13336 if test $ol_cv_header_stdc = yes; then
13337   cat >>confdefs.h <<\_ACEOF
13338 #define STDC_HEADERS 1
13339 _ACEOF
13340
13341 fi
13342 ac_cv_header_stdc=disable
13343
13344
13345 if test $ol_cv_header_stdc != yes; then
13346         { echo "$as_me:$LINENO: WARNING: could not locate Standard C compliant headers" >&5
13347 echo "$as_me: WARNING: could not locate Standard C compliant headers" >&2;}
13348 fi
13349
13350
13351
13352
13353
13354
13355 ac_header_dirent=no
13356 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13357   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13358 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
13359 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13360 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13361   echo $ECHO_N "(cached) $ECHO_C" >&6
13362 else
13363   cat >conftest.$ac_ext <<_ACEOF
13364 /* confdefs.h.  */
13365 _ACEOF
13366 cat confdefs.h >>conftest.$ac_ext
13367 cat >>conftest.$ac_ext <<_ACEOF
13368 /* end confdefs.h.  */
13369 #include <sys/types.h>
13370 #include <$ac_hdr>
13371
13372 int
13373 main ()
13374 {
13375 if ((DIR *) 0)
13376 return 0;
13377   ;
13378   return 0;
13379 }
13380 _ACEOF
13381 rm -f conftest.$ac_objext
13382 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13383   (eval $ac_compile) 2>conftest.er1
13384   ac_status=$?
13385   grep -v '^ *+' conftest.er1 >conftest.err
13386   rm -f conftest.er1
13387   cat conftest.err >&5
13388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13389   (exit $ac_status); } &&
13390          { ac_try='test -z "$ac_c_werror_flag"
13391                          || test ! -s conftest.err'
13392   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13393   (eval $ac_try) 2>&5
13394   ac_status=$?
13395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13396   (exit $ac_status); }; } &&
13397          { ac_try='test -s conftest.$ac_objext'
13398   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13399   (eval $ac_try) 2>&5
13400   ac_status=$?
13401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13402   (exit $ac_status); }; }; then
13403   eval "$as_ac_Header=yes"
13404 else
13405   echo "$as_me: failed program was:" >&5
13406 sed 's/^/| /' conftest.$ac_ext >&5
13407
13408 eval "$as_ac_Header=no"
13409 fi
13410 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13411 fi
13412 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13413 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13414 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13415   cat >>confdefs.h <<_ACEOF
13416 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13417 _ACEOF
13418
13419 ac_header_dirent=$ac_hdr; break
13420 fi
13421
13422 done
13423 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13424 if test $ac_header_dirent = dirent.h; then
13425   echo "$as_me:$LINENO: checking for library containing opendir" >&5
13426 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
13427 if test "${ac_cv_search_opendir+set}" = set; then
13428   echo $ECHO_N "(cached) $ECHO_C" >&6
13429 else
13430   ac_func_search_save_LIBS=$LIBS
13431 ac_cv_search_opendir=no
13432 cat >conftest.$ac_ext <<_ACEOF
13433 /* confdefs.h.  */
13434 _ACEOF
13435 cat confdefs.h >>conftest.$ac_ext
13436 cat >>conftest.$ac_ext <<_ACEOF
13437 /* end confdefs.h.  */
13438
13439 /* Override any gcc2 internal prototype to avoid an error.  */
13440 #ifdef __cplusplus
13441 extern "C"
13442 #endif
13443 /* We use char because int might match the return type of a gcc2
13444    builtin and then its argument prototype would still apply.  */
13445 char opendir ();
13446 int
13447 main ()
13448 {
13449 opendir ();
13450   ;
13451   return 0;
13452 }
13453 _ACEOF
13454 rm -f conftest.$ac_objext conftest$ac_exeext
13455 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13456   (eval $ac_link) 2>conftest.er1
13457   ac_status=$?
13458   grep -v '^ *+' conftest.er1 >conftest.err
13459   rm -f conftest.er1
13460   cat conftest.err >&5
13461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13462   (exit $ac_status); } &&
13463          { ac_try='test -z "$ac_c_werror_flag"
13464                          || test ! -s conftest.err'
13465   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13466   (eval $ac_try) 2>&5
13467   ac_status=$?
13468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13469   (exit $ac_status); }; } &&
13470          { ac_try='test -s conftest$ac_exeext'
13471   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13472   (eval $ac_try) 2>&5
13473   ac_status=$?
13474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13475   (exit $ac_status); }; }; then
13476   ac_cv_search_opendir="none required"
13477 else
13478   echo "$as_me: failed program was:" >&5
13479 sed 's/^/| /' conftest.$ac_ext >&5
13480
13481 fi
13482 rm -f conftest.err conftest.$ac_objext \
13483       conftest$ac_exeext conftest.$ac_ext
13484 if test "$ac_cv_search_opendir" = no; then
13485   for ac_lib in dir; do
13486     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13487     cat >conftest.$ac_ext <<_ACEOF
13488 /* confdefs.h.  */
13489 _ACEOF
13490 cat confdefs.h >>conftest.$ac_ext
13491 cat >>conftest.$ac_ext <<_ACEOF
13492 /* end confdefs.h.  */
13493
13494 /* Override any gcc2 internal prototype to avoid an error.  */
13495 #ifdef __cplusplus
13496 extern "C"
13497 #endif
13498 /* We use char because int might match the return type of a gcc2
13499    builtin and then its argument prototype would still apply.  */
13500 char opendir ();
13501 int
13502 main ()
13503 {
13504 opendir ();
13505   ;
13506   return 0;
13507 }
13508 _ACEOF
13509 rm -f conftest.$ac_objext conftest$ac_exeext
13510 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13511   (eval $ac_link) 2>conftest.er1
13512   ac_status=$?
13513   grep -v '^ *+' conftest.er1 >conftest.err
13514   rm -f conftest.er1
13515   cat conftest.err >&5
13516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13517   (exit $ac_status); } &&
13518          { ac_try='test -z "$ac_c_werror_flag"
13519                          || test ! -s conftest.err'
13520   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13521   (eval $ac_try) 2>&5
13522   ac_status=$?
13523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13524   (exit $ac_status); }; } &&
13525          { ac_try='test -s conftest$ac_exeext'
13526   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13527   (eval $ac_try) 2>&5
13528   ac_status=$?
13529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13530   (exit $ac_status); }; }; then
13531   ac_cv_search_opendir="-l$ac_lib"
13532 break
13533 else
13534   echo "$as_me: failed program was:" >&5
13535 sed 's/^/| /' conftest.$ac_ext >&5
13536
13537 fi
13538 rm -f conftest.err conftest.$ac_objext \
13539       conftest$ac_exeext conftest.$ac_ext
13540   done
13541 fi
13542 LIBS=$ac_func_search_save_LIBS
13543 fi
13544 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
13545 echo "${ECHO_T}$ac_cv_search_opendir" >&6
13546 if test "$ac_cv_search_opendir" != no; then
13547   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
13548
13549 fi
13550
13551 else
13552   echo "$as_me:$LINENO: checking for library containing opendir" >&5
13553 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
13554 if test "${ac_cv_search_opendir+set}" = set; then
13555   echo $ECHO_N "(cached) $ECHO_C" >&6
13556 else
13557   ac_func_search_save_LIBS=$LIBS
13558 ac_cv_search_opendir=no
13559 cat >conftest.$ac_ext <<_ACEOF
13560 /* confdefs.h.  */
13561 _ACEOF
13562 cat confdefs.h >>conftest.$ac_ext
13563 cat >>conftest.$ac_ext <<_ACEOF
13564 /* end confdefs.h.  */
13565
13566 /* Override any gcc2 internal prototype to avoid an error.  */
13567 #ifdef __cplusplus
13568 extern "C"
13569 #endif
13570 /* We use char because int might match the return type of a gcc2
13571    builtin and then its argument prototype would still apply.  */
13572 char opendir ();
13573 int
13574 main ()
13575 {
13576 opendir ();
13577   ;
13578   return 0;
13579 }
13580 _ACEOF
13581 rm -f conftest.$ac_objext conftest$ac_exeext
13582 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13583   (eval $ac_link) 2>conftest.er1
13584   ac_status=$?
13585   grep -v '^ *+' conftest.er1 >conftest.err
13586   rm -f conftest.er1
13587   cat conftest.err >&5
13588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13589   (exit $ac_status); } &&
13590          { ac_try='test -z "$ac_c_werror_flag"
13591                          || test ! -s conftest.err'
13592   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13593   (eval $ac_try) 2>&5
13594   ac_status=$?
13595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13596   (exit $ac_status); }; } &&
13597          { ac_try='test -s conftest$ac_exeext'
13598   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13599   (eval $ac_try) 2>&5
13600   ac_status=$?
13601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13602   (exit $ac_status); }; }; then
13603   ac_cv_search_opendir="none required"
13604 else
13605   echo "$as_me: failed program was:" >&5
13606 sed 's/^/| /' conftest.$ac_ext >&5
13607
13608 fi
13609 rm -f conftest.err conftest.$ac_objext \
13610       conftest$ac_exeext conftest.$ac_ext
13611 if test "$ac_cv_search_opendir" = no; then
13612   for ac_lib in x; do
13613     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13614     cat >conftest.$ac_ext <<_ACEOF
13615 /* confdefs.h.  */
13616 _ACEOF
13617 cat confdefs.h >>conftest.$ac_ext
13618 cat >>conftest.$ac_ext <<_ACEOF
13619 /* end confdefs.h.  */
13620
13621 /* Override any gcc2 internal prototype to avoid an error.  */
13622 #ifdef __cplusplus
13623 extern "C"
13624 #endif
13625 /* We use char because int might match the return type of a gcc2
13626    builtin and then its argument prototype would still apply.  */
13627 char opendir ();
13628 int
13629 main ()
13630 {
13631 opendir ();
13632   ;
13633   return 0;
13634 }
13635 _ACEOF
13636 rm -f conftest.$ac_objext conftest$ac_exeext
13637 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13638   (eval $ac_link) 2>conftest.er1
13639   ac_status=$?
13640   grep -v '^ *+' conftest.er1 >conftest.err
13641   rm -f conftest.er1
13642   cat conftest.err >&5
13643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13644   (exit $ac_status); } &&
13645          { ac_try='test -z "$ac_c_werror_flag"
13646                          || test ! -s conftest.err'
13647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13648   (eval $ac_try) 2>&5
13649   ac_status=$?
13650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13651   (exit $ac_status); }; } &&
13652          { ac_try='test -s conftest$ac_exeext'
13653   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13654   (eval $ac_try) 2>&5
13655   ac_status=$?
13656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13657   (exit $ac_status); }; }; then
13658   ac_cv_search_opendir="-l$ac_lib"
13659 break
13660 else
13661   echo "$as_me: failed program was:" >&5
13662 sed 's/^/| /' conftest.$ac_ext >&5
13663
13664 fi
13665 rm -f conftest.err conftest.$ac_objext \
13666       conftest$ac_exeext conftest.$ac_ext
13667   done
13668 fi
13669 LIBS=$ac_func_search_save_LIBS
13670 fi
13671 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
13672 echo "${ECHO_T}$ac_cv_search_opendir" >&6
13673 if test "$ac_cv_search_opendir" != no; then
13674   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
13675
13676 fi
13677
13678 fi
13679
13680 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
13681 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
13682 if test "${ac_cv_header_sys_wait_h+set}" = set; then
13683   echo $ECHO_N "(cached) $ECHO_C" >&6
13684 else
13685   cat >conftest.$ac_ext <<_ACEOF
13686 /* confdefs.h.  */
13687 _ACEOF
13688 cat confdefs.h >>conftest.$ac_ext
13689 cat >>conftest.$ac_ext <<_ACEOF
13690 /* end confdefs.h.  */
13691 #include <sys/types.h>
13692 #include <sys/wait.h>
13693 #ifndef WEXITSTATUS
13694 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
13695 #endif
13696 #ifndef WIFEXITED
13697 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
13698 #endif
13699
13700 int
13701 main ()
13702 {
13703   int s;
13704   wait (&s);
13705   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
13706   ;
13707   return 0;
13708 }
13709 _ACEOF
13710 rm -f conftest.$ac_objext
13711 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13712   (eval $ac_compile) 2>conftest.er1
13713   ac_status=$?
13714   grep -v '^ *+' conftest.er1 >conftest.err
13715   rm -f conftest.er1
13716   cat conftest.err >&5
13717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13718   (exit $ac_status); } &&
13719          { ac_try='test -z "$ac_c_werror_flag"
13720                          || test ! -s conftest.err'
13721   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13722   (eval $ac_try) 2>&5
13723   ac_status=$?
13724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13725   (exit $ac_status); }; } &&
13726          { ac_try='test -s conftest.$ac_objext'
13727   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13728   (eval $ac_try) 2>&5
13729   ac_status=$?
13730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13731   (exit $ac_status); }; }; then
13732   ac_cv_header_sys_wait_h=yes
13733 else
13734   echo "$as_me: failed program was:" >&5
13735 sed 's/^/| /' conftest.$ac_ext >&5
13736
13737 ac_cv_header_sys_wait_h=no
13738 fi
13739 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13740 fi
13741 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
13742 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
13743 if test $ac_cv_header_sys_wait_h = yes; then
13744
13745 cat >>confdefs.h <<\_ACEOF
13746 #define HAVE_SYS_WAIT_H 1
13747 _ACEOF
13748
13749 fi
13750
13751 echo "$as_me:$LINENO: checking whether termios.h defines TIOCGWINSZ" >&5
13752 echo $ECHO_N "checking whether termios.h defines TIOCGWINSZ... $ECHO_C" >&6
13753 if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then
13754   echo $ECHO_N "(cached) $ECHO_C" >&6
13755 else
13756   cat >conftest.$ac_ext <<_ACEOF
13757 /* confdefs.h.  */
13758 _ACEOF
13759 cat confdefs.h >>conftest.$ac_ext
13760 cat >>conftest.$ac_ext <<_ACEOF
13761 /* end confdefs.h.  */
13762 #include <sys/types.h>
13763 #include <termios.h>
13764 #ifdef TIOCGWINSZ
13765   yes
13766 #endif
13767
13768 _ACEOF
13769 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13770   $EGREP "yes" >/dev/null 2>&1; then
13771   ac_cv_sys_tiocgwinsz_in_termios_h=yes
13772 else
13773   ac_cv_sys_tiocgwinsz_in_termios_h=no
13774 fi
13775 rm -f conftest*
13776
13777 fi
13778 echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
13779 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_termios_h" >&6
13780
13781 if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
13782   echo "$as_me:$LINENO: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
13783 echo $ECHO_N "checking whether sys/ioctl.h defines TIOCGWINSZ... $ECHO_C" >&6
13784 if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then
13785   echo $ECHO_N "(cached) $ECHO_C" >&6
13786 else
13787   cat >conftest.$ac_ext <<_ACEOF
13788 /* confdefs.h.  */
13789 _ACEOF
13790 cat confdefs.h >>conftest.$ac_ext
13791 cat >>conftest.$ac_ext <<_ACEOF
13792 /* end confdefs.h.  */
13793 #include <sys/types.h>
13794 #include <sys/ioctl.h>
13795 #ifdef TIOCGWINSZ
13796   yes
13797 #endif
13798
13799 _ACEOF
13800 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13801   $EGREP "yes" >/dev/null 2>&1; then
13802   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
13803 else
13804   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
13805 fi
13806 rm -f conftest*
13807
13808 fi
13809 echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
13810 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6
13811
13812   if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
13813
13814 cat >>confdefs.h <<\_ACEOF
13815 #define GWINSZ_IN_SYS_IOCTL 1
13816 _ACEOF
13817
13818   fi
13819 fi
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868 for ac_header in \
13869         arpa/inet.h             \
13870         arpa/nameser.h  \
13871         assert.h                \
13872         bits/types.h    \
13873         conio.h                 \
13874         crypt.h                 \
13875         direct.h                \
13876         errno.h                 \
13877         fcntl.h                 \
13878         filio.h                 \
13879         getopt.h                \
13880         grp.h                   \
13881         io.h                    \
13882         libutil.h               \
13883         limits.h                \
13884         locale.h                \
13885         malloc.h                \
13886         memory.h                \
13887         psap.h                  \
13888         pwd.h                   \
13889         process.h               \
13890         sgtty.h                 \
13891         shadow.h                \
13892         stddef.h                \
13893         string.h                \
13894         strings.h               \
13895         sysexits.h              \
13896         sys/file.h              \
13897         sys/filio.h             \
13898         sys/errno.h             \
13899         sys/ioctl.h             \
13900         sys/param.h             \
13901         sys/resource.h  \
13902         sys/select.h    \
13903         sys/socket.h    \
13904         sys/stat.h              \
13905         sys/syslog.h    \
13906         sys/time.h              \
13907         sys/types.h             \
13908         sys/uio.h               \
13909         syslog.h                \
13910         termios.h               \
13911         unistd.h                \
13912         utime.h                 \
13913         winsock.h               \
13914         winsock2.h              \
13915
13916 do
13917 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13918 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13919   echo "$as_me:$LINENO: checking for $ac_header" >&5
13920 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13921 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13922   echo $ECHO_N "(cached) $ECHO_C" >&6
13923 fi
13924 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13925 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13926 else
13927   # Is the header compilable?
13928 echo "$as_me:$LINENO: checking $ac_header usability" >&5
13929 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13930 cat >conftest.$ac_ext <<_ACEOF
13931 /* confdefs.h.  */
13932 _ACEOF
13933 cat confdefs.h >>conftest.$ac_ext
13934 cat >>conftest.$ac_ext <<_ACEOF
13935 /* end confdefs.h.  */
13936 $ac_includes_default
13937 #include <$ac_header>
13938 _ACEOF
13939 rm -f conftest.$ac_objext
13940 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13941   (eval $ac_compile) 2>conftest.er1
13942   ac_status=$?
13943   grep -v '^ *+' conftest.er1 >conftest.err
13944   rm -f conftest.er1
13945   cat conftest.err >&5
13946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13947   (exit $ac_status); } &&
13948          { ac_try='test -z "$ac_c_werror_flag"
13949                          || test ! -s conftest.err'
13950   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13951   (eval $ac_try) 2>&5
13952   ac_status=$?
13953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13954   (exit $ac_status); }; } &&
13955          { ac_try='test -s conftest.$ac_objext'
13956   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13957   (eval $ac_try) 2>&5
13958   ac_status=$?
13959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13960   (exit $ac_status); }; }; then
13961   ac_header_compiler=yes
13962 else
13963   echo "$as_me: failed program was:" >&5
13964 sed 's/^/| /' conftest.$ac_ext >&5
13965
13966 ac_header_compiler=no
13967 fi
13968 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13969 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13970 echo "${ECHO_T}$ac_header_compiler" >&6
13971
13972 # Is the header present?
13973 echo "$as_me:$LINENO: checking $ac_header presence" >&5
13974 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13975 cat >conftest.$ac_ext <<_ACEOF
13976 /* confdefs.h.  */
13977 _ACEOF
13978 cat confdefs.h >>conftest.$ac_ext
13979 cat >>conftest.$ac_ext <<_ACEOF
13980 /* end confdefs.h.  */
13981 #include <$ac_header>
13982 _ACEOF
13983 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13984   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13985   ac_status=$?
13986   grep -v '^ *+' conftest.er1 >conftest.err
13987   rm -f conftest.er1
13988   cat conftest.err >&5
13989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13990   (exit $ac_status); } >/dev/null; then
13991   if test -s conftest.err; then
13992     ac_cpp_err=$ac_c_preproc_warn_flag
13993     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13994   else
13995     ac_cpp_err=
13996   fi
13997 else
13998   ac_cpp_err=yes
13999 fi
14000 if test -z "$ac_cpp_err"; then
14001   ac_header_preproc=yes
14002 else
14003   echo "$as_me: failed program was:" >&5
14004 sed 's/^/| /' conftest.$ac_ext >&5
14005
14006   ac_header_preproc=no
14007 fi
14008 rm -f conftest.err conftest.$ac_ext
14009 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14010 echo "${ECHO_T}$ac_header_preproc" >&6
14011
14012 # So?  What about this header?
14013 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14014   yes:no: )
14015     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14016 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14017     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14018 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14019     ac_header_preproc=yes
14020     ;;
14021   no:yes:* )
14022     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14023 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14024     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
14025 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
14026     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14027 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14028     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
14029 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
14030     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14031 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14032     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14033 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14034     (
14035       cat <<\_ASBOX
14036 ## --------------------------------------------- ##
14037 ## Report this to <http://www.openldap.org/its/> ##
14038 ## --------------------------------------------- ##
14039 _ASBOX
14040     ) |
14041       sed "s/^/$as_me: WARNING:     /" >&2
14042     ;;
14043 esac
14044 echo "$as_me:$LINENO: checking for $ac_header" >&5
14045 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14046 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14047   echo $ECHO_N "(cached) $ECHO_C" >&6
14048 else
14049   eval "$as_ac_Header=\$ac_header_preproc"
14050 fi
14051 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14052 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14053
14054 fi
14055 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14056   cat >>confdefs.h <<_ACEOF
14057 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14058 _ACEOF
14059
14060 fi
14061
14062 done
14063
14064
14065
14066 for ac_header in resolv.h
14067 do
14068 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14069 echo "$as_me:$LINENO: checking for $ac_header" >&5
14070 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14071 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14072   echo $ECHO_N "(cached) $ECHO_C" >&6
14073 else
14074   cat >conftest.$ac_ext <<_ACEOF
14075 /* confdefs.h.  */
14076 _ACEOF
14077 cat confdefs.h >>conftest.$ac_ext
14078 cat >>conftest.$ac_ext <<_ACEOF
14079 /* end confdefs.h.  */
14080 $ac_includes_default
14081 #include <netinet/in.h>
14082
14083
14084 #include <$ac_header>
14085 _ACEOF
14086 rm -f conftest.$ac_objext
14087 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14088   (eval $ac_compile) 2>conftest.er1
14089   ac_status=$?
14090   grep -v '^ *+' conftest.er1 >conftest.err
14091   rm -f conftest.er1
14092   cat conftest.err >&5
14093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14094   (exit $ac_status); } &&
14095          { ac_try='test -z "$ac_c_werror_flag"
14096                          || test ! -s conftest.err'
14097   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14098   (eval $ac_try) 2>&5
14099   ac_status=$?
14100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14101   (exit $ac_status); }; } &&
14102          { ac_try='test -s conftest.$ac_objext'
14103   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14104   (eval $ac_try) 2>&5
14105   ac_status=$?
14106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14107   (exit $ac_status); }; }; then
14108   eval "$as_ac_Header=yes"
14109 else
14110   echo "$as_me: failed program was:" >&5
14111 sed 's/^/| /' conftest.$ac_ext >&5
14112
14113 eval "$as_ac_Header=no"
14114 fi
14115 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14116 fi
14117 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14118 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14119 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14120   cat >>confdefs.h <<_ACEOF
14121 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14122 _ACEOF
14123
14124 fi
14125
14126 done
14127
14128
14129
14130 for ac_header in netinet/tcp.h
14131 do
14132 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14133 echo "$as_me:$LINENO: checking for $ac_header" >&5
14134 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14135 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14136   echo $ECHO_N "(cached) $ECHO_C" >&6
14137 else
14138   cat >conftest.$ac_ext <<_ACEOF
14139 /* confdefs.h.  */
14140 _ACEOF
14141 cat confdefs.h >>conftest.$ac_ext
14142 cat >>conftest.$ac_ext <<_ACEOF
14143 /* end confdefs.h.  */
14144 $ac_includes_default
14145 #include <netinet/in.h>
14146
14147
14148 #include <$ac_header>
14149 _ACEOF
14150 rm -f conftest.$ac_objext
14151 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14152   (eval $ac_compile) 2>conftest.er1
14153   ac_status=$?
14154   grep -v '^ *+' conftest.er1 >conftest.err
14155   rm -f conftest.er1
14156   cat conftest.err >&5
14157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14158   (exit $ac_status); } &&
14159          { ac_try='test -z "$ac_c_werror_flag"
14160                          || test ! -s conftest.err'
14161   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14162   (eval $ac_try) 2>&5
14163   ac_status=$?
14164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14165   (exit $ac_status); }; } &&
14166          { ac_try='test -s conftest.$ac_objext'
14167   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14168   (eval $ac_try) 2>&5
14169   ac_status=$?
14170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14171   (exit $ac_status); }; }; then
14172   eval "$as_ac_Header=yes"
14173 else
14174   echo "$as_me: failed program was:" >&5
14175 sed 's/^/| /' conftest.$ac_ext >&5
14176
14177 eval "$as_ac_Header=no"
14178 fi
14179 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14180 fi
14181 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14182 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14183 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14184   cat >>confdefs.h <<_ACEOF
14185 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14186 _ACEOF
14187
14188 fi
14189
14190 done
14191
14192
14193
14194 for ac_header in sys/ucred.h
14195 do
14196 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14197 echo "$as_me:$LINENO: checking for $ac_header" >&5
14198 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14199 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14200   echo $ECHO_N "(cached) $ECHO_C" >&6
14201 else
14202   cat >conftest.$ac_ext <<_ACEOF
14203 /* confdefs.h.  */
14204 _ACEOF
14205 cat confdefs.h >>conftest.$ac_ext
14206 cat >>conftest.$ac_ext <<_ACEOF
14207 /* end confdefs.h.  */
14208 $ac_includes_default
14209 #ifdef HAVE_SYS_PARAM_H
14210 #include <sys/param.h>
14211 #endif
14212
14213
14214 #include <$ac_header>
14215 _ACEOF
14216 rm -f conftest.$ac_objext
14217 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14218   (eval $ac_compile) 2>conftest.er1
14219   ac_status=$?
14220   grep -v '^ *+' conftest.er1 >conftest.err
14221   rm -f conftest.er1
14222   cat conftest.err >&5
14223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14224   (exit $ac_status); } &&
14225          { ac_try='test -z "$ac_c_werror_flag"
14226                          || test ! -s conftest.err'
14227   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14228   (eval $ac_try) 2>&5
14229   ac_status=$?
14230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14231   (exit $ac_status); }; } &&
14232          { ac_try='test -s conftest.$ac_objext'
14233   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14234   (eval $ac_try) 2>&5
14235   ac_status=$?
14236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14237   (exit $ac_status); }; }; then
14238   eval "$as_ac_Header=yes"
14239 else
14240   echo "$as_me: failed program was:" >&5
14241 sed 's/^/| /' conftest.$ac_ext >&5
14242
14243 eval "$as_ac_Header=no"
14244 fi
14245 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14246 fi
14247 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14248 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14249 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14250   cat >>confdefs.h <<_ACEOF
14251 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14252 _ACEOF
14253
14254 fi
14255
14256 done
14257
14258
14259
14260
14261
14262 for ac_func in sigaction sigset
14263 do
14264 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14265 echo "$as_me:$LINENO: checking for $ac_func" >&5
14266 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14267 if eval "test \"\${$as_ac_var+set}\" = set"; then
14268   echo $ECHO_N "(cached) $ECHO_C" >&6
14269 else
14270   cat >conftest.$ac_ext <<_ACEOF
14271 /* confdefs.h.  */
14272 _ACEOF
14273 cat confdefs.h >>conftest.$ac_ext
14274 cat >>conftest.$ac_ext <<_ACEOF
14275 /* end confdefs.h.  */
14276 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14277    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14278 #define $ac_func innocuous_$ac_func
14279
14280 /* System header to define __stub macros and hopefully few prototypes,
14281     which can conflict with char $ac_func (); below.
14282     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14283     <limits.h> exists even on freestanding compilers.  */
14284
14285 #ifdef __STDC__
14286 # include <limits.h>
14287 #else
14288 # include <assert.h>
14289 #endif
14290
14291 #undef $ac_func
14292
14293 /* Override any gcc2 internal prototype to avoid an error.  */
14294 #ifdef __cplusplus
14295 extern "C"
14296 {
14297 #endif
14298 /* We use char because int might match the return type of a gcc2
14299    builtin and then its argument prototype would still apply.  */
14300 char $ac_func ();
14301 /* The GNU C library defines this for functions which it implements
14302     to always fail with ENOSYS.  Some functions are actually named
14303     something starting with __ and the normal name is an alias.  */
14304 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14305 choke me
14306 #else
14307 char (*f) () = $ac_func;
14308 #endif
14309 #ifdef __cplusplus
14310 }
14311 #endif
14312
14313 int
14314 main ()
14315 {
14316 return f != $ac_func;
14317   ;
14318   return 0;
14319 }
14320 _ACEOF
14321 rm -f conftest.$ac_objext conftest$ac_exeext
14322 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14323   (eval $ac_link) 2>conftest.er1
14324   ac_status=$?
14325   grep -v '^ *+' conftest.er1 >conftest.err
14326   rm -f conftest.er1
14327   cat conftest.err >&5
14328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14329   (exit $ac_status); } &&
14330          { ac_try='test -z "$ac_c_werror_flag"
14331                          || test ! -s conftest.err'
14332   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14333   (eval $ac_try) 2>&5
14334   ac_status=$?
14335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14336   (exit $ac_status); }; } &&
14337          { ac_try='test -s conftest$ac_exeext'
14338   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14339   (eval $ac_try) 2>&5
14340   ac_status=$?
14341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14342   (exit $ac_status); }; }; then
14343   eval "$as_ac_var=yes"
14344 else
14345   echo "$as_me: failed program was:" >&5
14346 sed 's/^/| /' conftest.$ac_ext >&5
14347
14348 eval "$as_ac_var=no"
14349 fi
14350 rm -f conftest.err conftest.$ac_objext \
14351       conftest$ac_exeext conftest.$ac_ext
14352 fi
14353 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14354 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14355 if test `eval echo '${'$as_ac_var'}'` = yes; then
14356   cat >>confdefs.h <<_ACEOF
14357 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14358 _ACEOF
14359
14360 fi
14361 done
14362
14363
14364 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
14365
14366 echo "$as_me:$LINENO: checking for sigset in -lV3" >&5
14367 echo $ECHO_N "checking for sigset in -lV3... $ECHO_C" >&6
14368 if test "${ac_cv_lib_V3_sigset+set}" = set; then
14369   echo $ECHO_N "(cached) $ECHO_C" >&6
14370 else
14371   ac_check_lib_save_LIBS=$LIBS
14372 LIBS="-lV3  $LIBS"
14373 cat >conftest.$ac_ext <<_ACEOF
14374 /* confdefs.h.  */
14375 _ACEOF
14376 cat confdefs.h >>conftest.$ac_ext
14377 cat >>conftest.$ac_ext <<_ACEOF
14378 /* end confdefs.h.  */
14379
14380 /* Override any gcc2 internal prototype to avoid an error.  */
14381 #ifdef __cplusplus
14382 extern "C"
14383 #endif
14384 /* We use char because int might match the return type of a gcc2
14385    builtin and then its argument prototype would still apply.  */
14386 char sigset ();
14387 int
14388 main ()
14389 {
14390 sigset ();
14391   ;
14392   return 0;
14393 }
14394 _ACEOF
14395 rm -f conftest.$ac_objext conftest$ac_exeext
14396 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14397   (eval $ac_link) 2>conftest.er1
14398   ac_status=$?
14399   grep -v '^ *+' conftest.er1 >conftest.err
14400   rm -f conftest.er1
14401   cat conftest.err >&5
14402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14403   (exit $ac_status); } &&
14404          { ac_try='test -z "$ac_c_werror_flag"
14405                          || test ! -s conftest.err'
14406   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14407   (eval $ac_try) 2>&5
14408   ac_status=$?
14409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14410   (exit $ac_status); }; } &&
14411          { ac_try='test -s conftest$ac_exeext'
14412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14413   (eval $ac_try) 2>&5
14414   ac_status=$?
14415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14416   (exit $ac_status); }; }; then
14417   ac_cv_lib_V3_sigset=yes
14418 else
14419   echo "$as_me: failed program was:" >&5
14420 sed 's/^/| /' conftest.$ac_ext >&5
14421
14422 ac_cv_lib_V3_sigset=no
14423 fi
14424 rm -f conftest.err conftest.$ac_objext \
14425       conftest$ac_exeext conftest.$ac_ext
14426 LIBS=$ac_check_lib_save_LIBS
14427 fi
14428 echo "$as_me:$LINENO: result: $ac_cv_lib_V3_sigset" >&5
14429 echo "${ECHO_T}$ac_cv_lib_V3_sigset" >&6
14430 if test $ac_cv_lib_V3_sigset = yes; then
14431   cat >>confdefs.h <<_ACEOF
14432 #define HAVE_LIBV3 1
14433 _ACEOF
14434
14435   LIBS="-lV3 $LIBS"
14436
14437 fi
14438
14439 fi
14440
14441 if test "$ac_cv_cygwin" != yes && test "$ac_cv_header_winsock_h" = yes; then
14442 echo "$as_me:$LINENO: checking for winsock" >&5
14443 echo $ECHO_N "checking for winsock... $ECHO_C" >&6
14444 if test "${ol_cv_winsock+set}" = set; then
14445   echo $ECHO_N "(cached) $ECHO_C" >&6
14446 else
14447   save_LIBS="$LIBS"
14448 for curlib in ws2_32 wsock32; do
14449         LIBS="$LIBS -l$curlib"
14450         cat >conftest.$ac_ext <<_ACEOF
14451 /* confdefs.h.  */
14452 _ACEOF
14453 cat confdefs.h >>conftest.$ac_ext
14454 cat >>conftest.$ac_ext <<_ACEOF
14455 /* end confdefs.h.  */
14456 #include <winsock.h>
14457
14458 int
14459 main ()
14460 {
14461
14462                         socket(0,0,0);
14463                         select(0,NULL,NULL,NULL,NULL);
14464                         closesocket(0);
14465                         gethostname(NULL,0);
14466
14467   ;
14468   return 0;
14469 }
14470 _ACEOF
14471 rm -f conftest.$ac_objext conftest$ac_exeext
14472 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14473   (eval $ac_link) 2>conftest.er1
14474   ac_status=$?
14475   grep -v '^ *+' conftest.er1 >conftest.err
14476   rm -f conftest.er1
14477   cat conftest.err >&5
14478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14479   (exit $ac_status); } &&
14480          { ac_try='test -z "$ac_c_werror_flag"
14481                          || test ! -s conftest.err'
14482   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14483   (eval $ac_try) 2>&5
14484   ac_status=$?
14485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14486   (exit $ac_status); }; } &&
14487          { ac_try='test -s conftest$ac_exeext'
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); }; }; then
14493   ol_cv_winsock=yes
14494 else
14495   echo "$as_me: failed program was:" >&5
14496 sed 's/^/| /' conftest.$ac_ext >&5
14497
14498 ol_cv_winsock=no
14499 fi
14500 rm -f conftest.err conftest.$ac_objext \
14501       conftest$ac_exeext conftest.$ac_ext
14502
14503         if test $ol_cv_winsock = yes; then
14504
14505 cat >>confdefs.h <<\_ACEOF
14506 #define HAVE_WINSOCK 1
14507 _ACEOF
14508
14509                 ac_cv_func_socket=yes
14510                 ac_cv_func_select=yes
14511                 ac_cv_func_closesocket=yes
14512                 ac_cv_func_gethostname=yes
14513                 if test $curlib = ws2_32; then
14514                         ol_cv_winsock=winsock2
14515
14516 cat >>confdefs.h <<\_ACEOF
14517 #define HAVE_WINSOCK2 1
14518 _ACEOF
14519
14520                 fi
14521                 break
14522         fi
14523         LIBS="$save_LIBS"
14524 done
14525 fi
14526 echo "$as_me:$LINENO: result: $ol_cv_winsock" >&5
14527 echo "${ECHO_T}$ol_cv_winsock" >&6
14528 fi
14529
14530
14531 echo "$as_me:$LINENO: checking for socket" >&5
14532 echo $ECHO_N "checking for socket... $ECHO_C" >&6
14533 if test "${ac_cv_func_socket+set}" = set; then
14534   echo $ECHO_N "(cached) $ECHO_C" >&6
14535 else
14536   cat >conftest.$ac_ext <<_ACEOF
14537 /* confdefs.h.  */
14538 _ACEOF
14539 cat confdefs.h >>conftest.$ac_ext
14540 cat >>conftest.$ac_ext <<_ACEOF
14541 /* end confdefs.h.  */
14542 /* Define socket to an innocuous variant, in case <limits.h> declares socket.
14543    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14544 #define socket innocuous_socket
14545
14546 /* System header to define __stub macros and hopefully few prototypes,
14547     which can conflict with char socket (); below.
14548     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14549     <limits.h> exists even on freestanding compilers.  */
14550
14551 #ifdef __STDC__
14552 # include <limits.h>
14553 #else
14554 # include <assert.h>
14555 #endif
14556
14557 #undef socket
14558
14559 /* Override any gcc2 internal prototype to avoid an error.  */
14560 #ifdef __cplusplus
14561 extern "C"
14562 {
14563 #endif
14564 /* We use char because int might match the return type of a gcc2
14565    builtin and then its argument prototype would still apply.  */
14566 char socket ();
14567 /* The GNU C library defines this for functions which it implements
14568     to always fail with ENOSYS.  Some functions are actually named
14569     something starting with __ and the normal name is an alias.  */
14570 #if defined (__stub_socket) || defined (__stub___socket)
14571 choke me
14572 #else
14573 char (*f) () = socket;
14574 #endif
14575 #ifdef __cplusplus
14576 }
14577 #endif
14578
14579 int
14580 main ()
14581 {
14582 return f != socket;
14583   ;
14584   return 0;
14585 }
14586 _ACEOF
14587 rm -f conftest.$ac_objext conftest$ac_exeext
14588 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14589   (eval $ac_link) 2>conftest.er1
14590   ac_status=$?
14591   grep -v '^ *+' conftest.er1 >conftest.err
14592   rm -f conftest.er1
14593   cat conftest.err >&5
14594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14595   (exit $ac_status); } &&
14596          { ac_try='test -z "$ac_c_werror_flag"
14597                          || test ! -s conftest.err'
14598   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14599   (eval $ac_try) 2>&5
14600   ac_status=$?
14601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14602   (exit $ac_status); }; } &&
14603          { ac_try='test -s conftest$ac_exeext'
14604   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14605   (eval $ac_try) 2>&5
14606   ac_status=$?
14607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14608   (exit $ac_status); }; }; then
14609   ac_cv_func_socket=yes
14610 else
14611   echo "$as_me: failed program was:" >&5
14612 sed 's/^/| /' conftest.$ac_ext >&5
14613
14614 ac_cv_func_socket=no
14615 fi
14616 rm -f conftest.err conftest.$ac_objext \
14617       conftest$ac_exeext conftest.$ac_ext
14618 fi
14619 echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
14620 echo "${ECHO_T}$ac_cv_func_socket" >&6
14621 if test $ac_cv_func_socket = yes; then
14622   :
14623 else
14624
14625
14626 echo "$as_me:$LINENO: checking for main in -lsocket" >&5
14627 echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
14628 if test "${ac_cv_lib_socket_main+set}" = set; then
14629   echo $ECHO_N "(cached) $ECHO_C" >&6
14630 else
14631   ac_check_lib_save_LIBS=$LIBS
14632 LIBS="-lsocket  $LIBS"
14633 cat >conftest.$ac_ext <<_ACEOF
14634 /* confdefs.h.  */
14635 _ACEOF
14636 cat confdefs.h >>conftest.$ac_ext
14637 cat >>conftest.$ac_ext <<_ACEOF
14638 /* end confdefs.h.  */
14639
14640
14641 int
14642 main ()
14643 {
14644 main ();
14645   ;
14646   return 0;
14647 }
14648 _ACEOF
14649 rm -f conftest.$ac_objext conftest$ac_exeext
14650 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14651   (eval $ac_link) 2>conftest.er1
14652   ac_status=$?
14653   grep -v '^ *+' conftest.er1 >conftest.err
14654   rm -f conftest.er1
14655   cat conftest.err >&5
14656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14657   (exit $ac_status); } &&
14658          { ac_try='test -z "$ac_c_werror_flag"
14659                          || test ! -s conftest.err'
14660   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14661   (eval $ac_try) 2>&5
14662   ac_status=$?
14663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14664   (exit $ac_status); }; } &&
14665          { ac_try='test -s conftest$ac_exeext'
14666   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14667   (eval $ac_try) 2>&5
14668   ac_status=$?
14669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14670   (exit $ac_status); }; }; then
14671   ac_cv_lib_socket_main=yes
14672 else
14673   echo "$as_me: failed program was:" >&5
14674 sed 's/^/| /' conftest.$ac_ext >&5
14675
14676 ac_cv_lib_socket_main=no
14677 fi
14678 rm -f conftest.err conftest.$ac_objext \
14679       conftest$ac_exeext conftest.$ac_ext
14680 LIBS=$ac_check_lib_save_LIBS
14681 fi
14682 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
14683 echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
14684 if test $ac_cv_lib_socket_main = yes; then
14685   cat >>confdefs.h <<_ACEOF
14686 #define HAVE_LIBSOCKET 1
14687 _ACEOF
14688
14689   LIBS="-lsocket $LIBS"
14690
14691 fi
14692
14693
14694 echo "$as_me:$LINENO: checking for main in -lnet" >&5
14695 echo $ECHO_N "checking for main in -lnet... $ECHO_C" >&6
14696 if test "${ac_cv_lib_net_main+set}" = set; then
14697   echo $ECHO_N "(cached) $ECHO_C" >&6
14698 else
14699   ac_check_lib_save_LIBS=$LIBS
14700 LIBS="-lnet  $LIBS"
14701 cat >conftest.$ac_ext <<_ACEOF
14702 /* confdefs.h.  */
14703 _ACEOF
14704 cat confdefs.h >>conftest.$ac_ext
14705 cat >>conftest.$ac_ext <<_ACEOF
14706 /* end confdefs.h.  */
14707
14708
14709 int
14710 main ()
14711 {
14712 main ();
14713   ;
14714   return 0;
14715 }
14716 _ACEOF
14717 rm -f conftest.$ac_objext conftest$ac_exeext
14718 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14719   (eval $ac_link) 2>conftest.er1
14720   ac_status=$?
14721   grep -v '^ *+' conftest.er1 >conftest.err
14722   rm -f conftest.er1
14723   cat conftest.err >&5
14724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14725   (exit $ac_status); } &&
14726          { ac_try='test -z "$ac_c_werror_flag"
14727                          || test ! -s conftest.err'
14728   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14729   (eval $ac_try) 2>&5
14730   ac_status=$?
14731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14732   (exit $ac_status); }; } &&
14733          { ac_try='test -s conftest$ac_exeext'
14734   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14735   (eval $ac_try) 2>&5
14736   ac_status=$?
14737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14738   (exit $ac_status); }; }; then
14739   ac_cv_lib_net_main=yes
14740 else
14741   echo "$as_me: failed program was:" >&5
14742 sed 's/^/| /' conftest.$ac_ext >&5
14743
14744 ac_cv_lib_net_main=no
14745 fi
14746 rm -f conftest.err conftest.$ac_objext \
14747       conftest$ac_exeext conftest.$ac_ext
14748 LIBS=$ac_check_lib_save_LIBS
14749 fi
14750 echo "$as_me:$LINENO: result: $ac_cv_lib_net_main" >&5
14751 echo "${ECHO_T}$ac_cv_lib_net_main" >&6
14752 if test $ac_cv_lib_net_main = yes; then
14753   cat >>confdefs.h <<_ACEOF
14754 #define HAVE_LIBNET 1
14755 _ACEOF
14756
14757   LIBS="-lnet $LIBS"
14758
14759 fi
14760
14761
14762 echo "$as_me:$LINENO: checking for main in -lnsl_s" >&5
14763 echo $ECHO_N "checking for main in -lnsl_s... $ECHO_C" >&6
14764 if test "${ac_cv_lib_nsl_s_main+set}" = set; then
14765   echo $ECHO_N "(cached) $ECHO_C" >&6
14766 else
14767   ac_check_lib_save_LIBS=$LIBS
14768 LIBS="-lnsl_s  $LIBS"
14769 cat >conftest.$ac_ext <<_ACEOF
14770 /* confdefs.h.  */
14771 _ACEOF
14772 cat confdefs.h >>conftest.$ac_ext
14773 cat >>conftest.$ac_ext <<_ACEOF
14774 /* end confdefs.h.  */
14775
14776
14777 int
14778 main ()
14779 {
14780 main ();
14781   ;
14782   return 0;
14783 }
14784 _ACEOF
14785 rm -f conftest.$ac_objext conftest$ac_exeext
14786 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14787   (eval $ac_link) 2>conftest.er1
14788   ac_status=$?
14789   grep -v '^ *+' conftest.er1 >conftest.err
14790   rm -f conftest.er1
14791   cat conftest.err >&5
14792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14793   (exit $ac_status); } &&
14794          { ac_try='test -z "$ac_c_werror_flag"
14795                          || test ! -s conftest.err'
14796   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14797   (eval $ac_try) 2>&5
14798   ac_status=$?
14799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14800   (exit $ac_status); }; } &&
14801          { ac_try='test -s conftest$ac_exeext'
14802   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14803   (eval $ac_try) 2>&5
14804   ac_status=$?
14805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14806   (exit $ac_status); }; }; then
14807   ac_cv_lib_nsl_s_main=yes
14808 else
14809   echo "$as_me: failed program was:" >&5
14810 sed 's/^/| /' conftest.$ac_ext >&5
14811
14812 ac_cv_lib_nsl_s_main=no
14813 fi
14814 rm -f conftest.err conftest.$ac_objext \
14815       conftest$ac_exeext conftest.$ac_ext
14816 LIBS=$ac_check_lib_save_LIBS
14817 fi
14818 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_s_main" >&5
14819 echo "${ECHO_T}$ac_cv_lib_nsl_s_main" >&6
14820 if test $ac_cv_lib_nsl_s_main = yes; then
14821   cat >>confdefs.h <<_ACEOF
14822 #define HAVE_LIBNSL_S 1
14823 _ACEOF
14824
14825   LIBS="-lnsl_s $LIBS"
14826
14827 fi
14828
14829
14830 echo "$as_me:$LINENO: checking for main in -lnsl" >&5
14831 echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
14832 if test "${ac_cv_lib_nsl_main+set}" = set; then
14833   echo $ECHO_N "(cached) $ECHO_C" >&6
14834 else
14835   ac_check_lib_save_LIBS=$LIBS
14836 LIBS="-lnsl  $LIBS"
14837 cat >conftest.$ac_ext <<_ACEOF
14838 /* confdefs.h.  */
14839 _ACEOF
14840 cat confdefs.h >>conftest.$ac_ext
14841 cat >>conftest.$ac_ext <<_ACEOF
14842 /* end confdefs.h.  */
14843
14844
14845 int
14846 main ()
14847 {
14848 main ();
14849   ;
14850   return 0;
14851 }
14852 _ACEOF
14853 rm -f conftest.$ac_objext conftest$ac_exeext
14854 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14855   (eval $ac_link) 2>conftest.er1
14856   ac_status=$?
14857   grep -v '^ *+' conftest.er1 >conftest.err
14858   rm -f conftest.er1
14859   cat conftest.err >&5
14860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14861   (exit $ac_status); } &&
14862          { ac_try='test -z "$ac_c_werror_flag"
14863                          || test ! -s conftest.err'
14864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14865   (eval $ac_try) 2>&5
14866   ac_status=$?
14867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14868   (exit $ac_status); }; } &&
14869          { ac_try='test -s conftest$ac_exeext'
14870   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14871   (eval $ac_try) 2>&5
14872   ac_status=$?
14873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14874   (exit $ac_status); }; }; then
14875   ac_cv_lib_nsl_main=yes
14876 else
14877   echo "$as_me: failed program was:" >&5
14878 sed 's/^/| /' conftest.$ac_ext >&5
14879
14880 ac_cv_lib_nsl_main=no
14881 fi
14882 rm -f conftest.err conftest.$ac_objext \
14883       conftest$ac_exeext conftest.$ac_ext
14884 LIBS=$ac_check_lib_save_LIBS
14885 fi
14886 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
14887 echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
14888 if test $ac_cv_lib_nsl_main = yes; then
14889   cat >>confdefs.h <<_ACEOF
14890 #define HAVE_LIBNSL 1
14891 _ACEOF
14892
14893   LIBS="-lnsl $LIBS"
14894
14895 fi
14896
14897
14898 echo "$as_me:$LINENO: checking for socket in -linet" >&5
14899 echo $ECHO_N "checking for socket in -linet... $ECHO_C" >&6
14900 if test "${ac_cv_lib_inet_socket+set}" = set; then
14901   echo $ECHO_N "(cached) $ECHO_C" >&6
14902 else
14903   ac_check_lib_save_LIBS=$LIBS
14904 LIBS="-linet  $LIBS"
14905 cat >conftest.$ac_ext <<_ACEOF
14906 /* confdefs.h.  */
14907 _ACEOF
14908 cat confdefs.h >>conftest.$ac_ext
14909 cat >>conftest.$ac_ext <<_ACEOF
14910 /* end confdefs.h.  */
14911
14912 /* Override any gcc2 internal prototype to avoid an error.  */
14913 #ifdef __cplusplus
14914 extern "C"
14915 #endif
14916 /* We use char because int might match the return type of a gcc2
14917    builtin and then its argument prototype would still apply.  */
14918 char socket ();
14919 int
14920 main ()
14921 {
14922 socket ();
14923   ;
14924   return 0;
14925 }
14926 _ACEOF
14927 rm -f conftest.$ac_objext conftest$ac_exeext
14928 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14929   (eval $ac_link) 2>conftest.er1
14930   ac_status=$?
14931   grep -v '^ *+' conftest.er1 >conftest.err
14932   rm -f conftest.er1
14933   cat conftest.err >&5
14934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14935   (exit $ac_status); } &&
14936          { ac_try='test -z "$ac_c_werror_flag"
14937                          || test ! -s conftest.err'
14938   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14939   (eval $ac_try) 2>&5
14940   ac_status=$?
14941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14942   (exit $ac_status); }; } &&
14943          { ac_try='test -s conftest$ac_exeext'
14944   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14945   (eval $ac_try) 2>&5
14946   ac_status=$?
14947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14948   (exit $ac_status); }; }; then
14949   ac_cv_lib_inet_socket=yes
14950 else
14951   echo "$as_me: failed program was:" >&5
14952 sed 's/^/| /' conftest.$ac_ext >&5
14953
14954 ac_cv_lib_inet_socket=no
14955 fi
14956 rm -f conftest.err conftest.$ac_objext \
14957       conftest$ac_exeext conftest.$ac_ext
14958 LIBS=$ac_check_lib_save_LIBS
14959 fi
14960 echo "$as_me:$LINENO: result: $ac_cv_lib_inet_socket" >&5
14961 echo "${ECHO_T}$ac_cv_lib_inet_socket" >&6
14962 if test $ac_cv_lib_inet_socket = yes; then
14963   cat >>confdefs.h <<_ACEOF
14964 #define HAVE_LIBINET 1
14965 _ACEOF
14966
14967   LIBS="-linet $LIBS"
14968
14969 fi
14970
14971
14972 echo "$as_me:$LINENO: checking for main in -lgen" >&5
14973 echo $ECHO_N "checking for main in -lgen... $ECHO_C" >&6
14974 if test "${ac_cv_lib_gen_main+set}" = set; then
14975   echo $ECHO_N "(cached) $ECHO_C" >&6
14976 else
14977   ac_check_lib_save_LIBS=$LIBS
14978 LIBS="-lgen  $LIBS"
14979 cat >conftest.$ac_ext <<_ACEOF
14980 /* confdefs.h.  */
14981 _ACEOF
14982 cat confdefs.h >>conftest.$ac_ext
14983 cat >>conftest.$ac_ext <<_ACEOF
14984 /* end confdefs.h.  */
14985
14986
14987 int
14988 main ()
14989 {
14990 main ();
14991   ;
14992   return 0;
14993 }
14994 _ACEOF
14995 rm -f conftest.$ac_objext conftest$ac_exeext
14996 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14997   (eval $ac_link) 2>conftest.er1
14998   ac_status=$?
14999   grep -v '^ *+' conftest.er1 >conftest.err
15000   rm -f conftest.er1
15001   cat conftest.err >&5
15002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15003   (exit $ac_status); } &&
15004          { ac_try='test -z "$ac_c_werror_flag"
15005                          || test ! -s conftest.err'
15006   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15007   (eval $ac_try) 2>&5
15008   ac_status=$?
15009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15010   (exit $ac_status); }; } &&
15011          { ac_try='test -s conftest$ac_exeext'
15012   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15013   (eval $ac_try) 2>&5
15014   ac_status=$?
15015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15016   (exit $ac_status); }; }; then
15017   ac_cv_lib_gen_main=yes
15018 else
15019   echo "$as_me: failed program was:" >&5
15020 sed 's/^/| /' conftest.$ac_ext >&5
15021
15022 ac_cv_lib_gen_main=no
15023 fi
15024 rm -f conftest.err conftest.$ac_objext \
15025       conftest$ac_exeext conftest.$ac_ext
15026 LIBS=$ac_check_lib_save_LIBS
15027 fi
15028 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_main" >&5
15029 echo "${ECHO_T}$ac_cv_lib_gen_main" >&6
15030 if test $ac_cv_lib_gen_main = yes; then
15031   cat >>confdefs.h <<_ACEOF
15032 #define HAVE_LIBGEN 1
15033 _ACEOF
15034
15035   LIBS="-lgen $LIBS"
15036
15037 fi
15038
15039
15040 fi
15041
15042
15043 echo "$as_me:$LINENO: checking for select" >&5
15044 echo $ECHO_N "checking for select... $ECHO_C" >&6
15045 if test "${ac_cv_func_select+set}" = set; then
15046   echo $ECHO_N "(cached) $ECHO_C" >&6
15047 else
15048   cat >conftest.$ac_ext <<_ACEOF
15049 /* confdefs.h.  */
15050 _ACEOF
15051 cat confdefs.h >>conftest.$ac_ext
15052 cat >>conftest.$ac_ext <<_ACEOF
15053 /* end confdefs.h.  */
15054 /* Define select to an innocuous variant, in case <limits.h> declares select.
15055    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15056 #define select innocuous_select
15057
15058 /* System header to define __stub macros and hopefully few prototypes,
15059     which can conflict with char select (); below.
15060     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15061     <limits.h> exists even on freestanding compilers.  */
15062
15063 #ifdef __STDC__
15064 # include <limits.h>
15065 #else
15066 # include <assert.h>
15067 #endif
15068
15069 #undef select
15070
15071 /* Override any gcc2 internal prototype to avoid an error.  */
15072 #ifdef __cplusplus
15073 extern "C"
15074 {
15075 #endif
15076 /* We use char because int might match the return type of a gcc2
15077    builtin and then its argument prototype would still apply.  */
15078 char select ();
15079 /* The GNU C library defines this for functions which it implements
15080     to always fail with ENOSYS.  Some functions are actually named
15081     something starting with __ and the normal name is an alias.  */
15082 #if defined (__stub_select) || defined (__stub___select)
15083 choke me
15084 #else
15085 char (*f) () = select;
15086 #endif
15087 #ifdef __cplusplus
15088 }
15089 #endif
15090
15091 int
15092 main ()
15093 {
15094 return f != select;
15095   ;
15096   return 0;
15097 }
15098 _ACEOF
15099 rm -f conftest.$ac_objext conftest$ac_exeext
15100 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15101   (eval $ac_link) 2>conftest.er1
15102   ac_status=$?
15103   grep -v '^ *+' conftest.er1 >conftest.err
15104   rm -f conftest.er1
15105   cat conftest.err >&5
15106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15107   (exit $ac_status); } &&
15108          { ac_try='test -z "$ac_c_werror_flag"
15109                          || test ! -s conftest.err'
15110   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15111   (eval $ac_try) 2>&5
15112   ac_status=$?
15113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15114   (exit $ac_status); }; } &&
15115          { ac_try='test -s conftest$ac_exeext'
15116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15117   (eval $ac_try) 2>&5
15118   ac_status=$?
15119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15120   (exit $ac_status); }; }; then
15121   ac_cv_func_select=yes
15122 else
15123   echo "$as_me: failed program was:" >&5
15124 sed 's/^/| /' conftest.$ac_ext >&5
15125
15126 ac_cv_func_select=no
15127 fi
15128 rm -f conftest.err conftest.$ac_objext \
15129       conftest$ac_exeext conftest.$ac_ext
15130 fi
15131 echo "$as_me:$LINENO: result: $ac_cv_func_select" >&5
15132 echo "${ECHO_T}$ac_cv_func_select" >&6
15133 if test $ac_cv_func_select = yes; then
15134   :
15135 else
15136   { { echo "$as_me:$LINENO: error: select() required." >&5
15137 echo "$as_me: error: select() required." >&2;}
15138    { (exit 1); exit 1; }; }
15139 fi
15140
15141
15142 if test "${ac_cv_header_winsock_h}" != yes; then
15143
15144
15145 for ac_header in sys/select.h sys/socket.h
15146 do
15147 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15148 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15149   echo "$as_me:$LINENO: checking for $ac_header" >&5
15150 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15151 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15152   echo $ECHO_N "(cached) $ECHO_C" >&6
15153 fi
15154 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15155 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15156 else
15157   # Is the header compilable?
15158 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15159 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15160 cat >conftest.$ac_ext <<_ACEOF
15161 /* confdefs.h.  */
15162 _ACEOF
15163 cat confdefs.h >>conftest.$ac_ext
15164 cat >>conftest.$ac_ext <<_ACEOF
15165 /* end confdefs.h.  */
15166 $ac_includes_default
15167 #include <$ac_header>
15168 _ACEOF
15169 rm -f conftest.$ac_objext
15170 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15171   (eval $ac_compile) 2>conftest.er1
15172   ac_status=$?
15173   grep -v '^ *+' conftest.er1 >conftest.err
15174   rm -f conftest.er1
15175   cat conftest.err >&5
15176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15177   (exit $ac_status); } &&
15178          { ac_try='test -z "$ac_c_werror_flag"
15179                          || test ! -s conftest.err'
15180   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15181   (eval $ac_try) 2>&5
15182   ac_status=$?
15183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15184   (exit $ac_status); }; } &&
15185          { ac_try='test -s conftest.$ac_objext'
15186   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15187   (eval $ac_try) 2>&5
15188   ac_status=$?
15189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15190   (exit $ac_status); }; }; then
15191   ac_header_compiler=yes
15192 else
15193   echo "$as_me: failed program was:" >&5
15194 sed 's/^/| /' conftest.$ac_ext >&5
15195
15196 ac_header_compiler=no
15197 fi
15198 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15199 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15200 echo "${ECHO_T}$ac_header_compiler" >&6
15201
15202 # Is the header present?
15203 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15204 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15205 cat >conftest.$ac_ext <<_ACEOF
15206 /* confdefs.h.  */
15207 _ACEOF
15208 cat confdefs.h >>conftest.$ac_ext
15209 cat >>conftest.$ac_ext <<_ACEOF
15210 /* end confdefs.h.  */
15211 #include <$ac_header>
15212 _ACEOF
15213 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15214   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15215   ac_status=$?
15216   grep -v '^ *+' conftest.er1 >conftest.err
15217   rm -f conftest.er1
15218   cat conftest.err >&5
15219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15220   (exit $ac_status); } >/dev/null; then
15221   if test -s conftest.err; then
15222     ac_cpp_err=$ac_c_preproc_warn_flag
15223     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15224   else
15225     ac_cpp_err=
15226   fi
15227 else
15228   ac_cpp_err=yes
15229 fi
15230 if test -z "$ac_cpp_err"; then
15231   ac_header_preproc=yes
15232 else
15233   echo "$as_me: failed program was:" >&5
15234 sed 's/^/| /' conftest.$ac_ext >&5
15235
15236   ac_header_preproc=no
15237 fi
15238 rm -f conftest.err conftest.$ac_ext
15239 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15240 echo "${ECHO_T}$ac_header_preproc" >&6
15241
15242 # So?  What about this header?
15243 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15244   yes:no: )
15245     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15246 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15247     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15248 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15249     ac_header_preproc=yes
15250     ;;
15251   no:yes:* )
15252     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15253 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15254     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15255 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15256     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15257 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15258     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15259 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15260     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15261 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15262     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15263 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15264     (
15265       cat <<\_ASBOX
15266 ## --------------------------------------------- ##
15267 ## Report this to <http://www.openldap.org/its/> ##
15268 ## --------------------------------------------- ##
15269 _ASBOX
15270     ) |
15271       sed "s/^/$as_me: WARNING:     /" >&2
15272     ;;
15273 esac
15274 echo "$as_me:$LINENO: checking for $ac_header" >&5
15275 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15276 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15277   echo $ECHO_N "(cached) $ECHO_C" >&6
15278 else
15279   eval "$as_ac_Header=\$ac_header_preproc"
15280 fi
15281 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15282 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15283
15284 fi
15285 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15286   cat >>confdefs.h <<_ACEOF
15287 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15288 _ACEOF
15289
15290 fi
15291
15292 done
15293
15294 echo "$as_me:$LINENO: checking types of arguments for select" >&5
15295 echo $ECHO_N "checking types of arguments for select... $ECHO_C" >&6
15296 if test "${ac_cv_func_select_args+set}" = set; then
15297   echo $ECHO_N "(cached) $ECHO_C" >&6
15298 else
15299   for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
15300  for ac_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
15301   for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
15302    cat >conftest.$ac_ext <<_ACEOF
15303 /* confdefs.h.  */
15304 _ACEOF
15305 cat confdefs.h >>conftest.$ac_ext
15306 cat >>conftest.$ac_ext <<_ACEOF
15307 /* end confdefs.h.  */
15308 $ac_includes_default
15309 #if HAVE_SYS_SELECT_H
15310 # include <sys/select.h>
15311 #endif
15312 #if HAVE_SYS_SOCKET_H
15313 # include <sys/socket.h>
15314 #endif
15315
15316 int
15317 main ()
15318 {
15319 extern int select ($ac_arg1,
15320                                             $ac_arg234, $ac_arg234, $ac_arg234,
15321                                             $ac_arg5);
15322   ;
15323   return 0;
15324 }
15325 _ACEOF
15326 rm -f conftest.$ac_objext
15327 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15328   (eval $ac_compile) 2>conftest.er1
15329   ac_status=$?
15330   grep -v '^ *+' conftest.er1 >conftest.err
15331   rm -f conftest.er1
15332   cat conftest.err >&5
15333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15334   (exit $ac_status); } &&
15335          { ac_try='test -z "$ac_c_werror_flag"
15336                          || test ! -s conftest.err'
15337   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15338   (eval $ac_try) 2>&5
15339   ac_status=$?
15340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15341   (exit $ac_status); }; } &&
15342          { ac_try='test -s conftest.$ac_objext'
15343   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15344   (eval $ac_try) 2>&5
15345   ac_status=$?
15346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15347   (exit $ac_status); }; }; then
15348   ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
15349 else
15350   echo "$as_me: failed program was:" >&5
15351 sed 's/^/| /' conftest.$ac_ext >&5
15352
15353 fi
15354 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15355   done
15356  done
15357 done
15358 # Provide a safe default value.
15359 : ${ac_cv_func_select_args='int,int *,struct timeval *'}
15360
15361 fi
15362 echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5
15363 echo "${ECHO_T}$ac_cv_func_select_args" >&6
15364 ac_save_IFS=$IFS; IFS=','
15365 set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
15366 IFS=$ac_save_IFS
15367 shift
15368
15369 cat >>confdefs.h <<_ACEOF
15370 #define SELECT_TYPE_ARG1 $1
15371 _ACEOF
15372
15373
15374 cat >>confdefs.h <<_ACEOF
15375 #define SELECT_TYPE_ARG234 ($2)
15376 _ACEOF
15377
15378
15379 cat >>confdefs.h <<_ACEOF
15380 #define SELECT_TYPE_ARG5 ($3)
15381 _ACEOF
15382
15383 rm -f conftest*
15384
15385 fi
15386
15387
15388
15389 for ac_func in poll
15390 do
15391 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15392 echo "$as_me:$LINENO: checking for $ac_func" >&5
15393 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15394 if eval "test \"\${$as_ac_var+set}\" = set"; then
15395   echo $ECHO_N "(cached) $ECHO_C" >&6
15396 else
15397   cat >conftest.$ac_ext <<_ACEOF
15398 /* confdefs.h.  */
15399 _ACEOF
15400 cat confdefs.h >>conftest.$ac_ext
15401 cat >>conftest.$ac_ext <<_ACEOF
15402 /* end confdefs.h.  */
15403 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15404    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15405 #define $ac_func innocuous_$ac_func
15406
15407 /* System header to define __stub macros and hopefully few prototypes,
15408     which can conflict with char $ac_func (); below.
15409     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15410     <limits.h> exists even on freestanding compilers.  */
15411
15412 #ifdef __STDC__
15413 # include <limits.h>
15414 #else
15415 # include <assert.h>
15416 #endif
15417
15418 #undef $ac_func
15419
15420 /* Override any gcc2 internal prototype to avoid an error.  */
15421 #ifdef __cplusplus
15422 extern "C"
15423 {
15424 #endif
15425 /* We use char because int might match the return type of a gcc2
15426    builtin and then its argument prototype would still apply.  */
15427 char $ac_func ();
15428 /* The GNU C library defines this for functions which it implements
15429     to always fail with ENOSYS.  Some functions are actually named
15430     something starting with __ and the normal name is an alias.  */
15431 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15432 choke me
15433 #else
15434 char (*f) () = $ac_func;
15435 #endif
15436 #ifdef __cplusplus
15437 }
15438 #endif
15439
15440 int
15441 main ()
15442 {
15443 return f != $ac_func;
15444   ;
15445   return 0;
15446 }
15447 _ACEOF
15448 rm -f conftest.$ac_objext conftest$ac_exeext
15449 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15450   (eval $ac_link) 2>conftest.er1
15451   ac_status=$?
15452   grep -v '^ *+' conftest.er1 >conftest.err
15453   rm -f conftest.er1
15454   cat conftest.err >&5
15455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15456   (exit $ac_status); } &&
15457          { ac_try='test -z "$ac_c_werror_flag"
15458                          || test ! -s conftest.err'
15459   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15460   (eval $ac_try) 2>&5
15461   ac_status=$?
15462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15463   (exit $ac_status); }; } &&
15464          { ac_try='test -s conftest$ac_exeext'
15465   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15466   (eval $ac_try) 2>&5
15467   ac_status=$?
15468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15469   (exit $ac_status); }; }; then
15470   eval "$as_ac_var=yes"
15471 else
15472   echo "$as_me: failed program was:" >&5
15473 sed 's/^/| /' conftest.$ac_ext >&5
15474
15475 eval "$as_ac_var=no"
15476 fi
15477 rm -f conftest.err conftest.$ac_objext \
15478       conftest$ac_exeext conftest.$ac_ext
15479 fi
15480 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15481 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15482 if test `eval echo '${'$as_ac_var'}'` = yes; then
15483   cat >>confdefs.h <<_ACEOF
15484 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15485 _ACEOF
15486
15487 fi
15488 done
15489
15490
15491 for ac_header in poll.h
15492 do
15493 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15494 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15495   echo "$as_me:$LINENO: checking for $ac_header" >&5
15496 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15497 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15498   echo $ECHO_N "(cached) $ECHO_C" >&6
15499 fi
15500 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15501 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15502 else
15503   # Is the header compilable?
15504 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15505 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15506 cat >conftest.$ac_ext <<_ACEOF
15507 /* confdefs.h.  */
15508 _ACEOF
15509 cat confdefs.h >>conftest.$ac_ext
15510 cat >>conftest.$ac_ext <<_ACEOF
15511 /* end confdefs.h.  */
15512 $ac_includes_default
15513 #include <$ac_header>
15514 _ACEOF
15515 rm -f conftest.$ac_objext
15516 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15517   (eval $ac_compile) 2>conftest.er1
15518   ac_status=$?
15519   grep -v '^ *+' conftest.er1 >conftest.err
15520   rm -f conftest.er1
15521   cat conftest.err >&5
15522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15523   (exit $ac_status); } &&
15524          { ac_try='test -z "$ac_c_werror_flag"
15525                          || test ! -s conftest.err'
15526   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15527   (eval $ac_try) 2>&5
15528   ac_status=$?
15529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15530   (exit $ac_status); }; } &&
15531          { ac_try='test -s conftest.$ac_objext'
15532   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15533   (eval $ac_try) 2>&5
15534   ac_status=$?
15535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15536   (exit $ac_status); }; }; then
15537   ac_header_compiler=yes
15538 else
15539   echo "$as_me: failed program was:" >&5
15540 sed 's/^/| /' conftest.$ac_ext >&5
15541
15542 ac_header_compiler=no
15543 fi
15544 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15545 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15546 echo "${ECHO_T}$ac_header_compiler" >&6
15547
15548 # Is the header present?
15549 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15550 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15551 cat >conftest.$ac_ext <<_ACEOF
15552 /* confdefs.h.  */
15553 _ACEOF
15554 cat confdefs.h >>conftest.$ac_ext
15555 cat >>conftest.$ac_ext <<_ACEOF
15556 /* end confdefs.h.  */
15557 #include <$ac_header>
15558 _ACEOF
15559 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15560   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15561   ac_status=$?
15562   grep -v '^ *+' conftest.er1 >conftest.err
15563   rm -f conftest.er1
15564   cat conftest.err >&5
15565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15566   (exit $ac_status); } >/dev/null; then
15567   if test -s conftest.err; then
15568     ac_cpp_err=$ac_c_preproc_warn_flag
15569     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15570   else
15571     ac_cpp_err=
15572   fi
15573 else
15574   ac_cpp_err=yes
15575 fi
15576 if test -z "$ac_cpp_err"; then
15577   ac_header_preproc=yes
15578 else
15579   echo "$as_me: failed program was:" >&5
15580 sed 's/^/| /' conftest.$ac_ext >&5
15581
15582   ac_header_preproc=no
15583 fi
15584 rm -f conftest.err conftest.$ac_ext
15585 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15586 echo "${ECHO_T}$ac_header_preproc" >&6
15587
15588 # So?  What about this header?
15589 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15590   yes:no: )
15591     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15592 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15593     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15594 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15595     ac_header_preproc=yes
15596     ;;
15597   no:yes:* )
15598     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15599 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15600     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15601 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15602     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15603 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15604     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15605 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15606     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15607 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15608     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15609 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15610     (
15611       cat <<\_ASBOX
15612 ## --------------------------------------------- ##
15613 ## Report this to <http://www.openldap.org/its/> ##
15614 ## --------------------------------------------- ##
15615 _ASBOX
15616     ) |
15617       sed "s/^/$as_me: WARNING:     /" >&2
15618     ;;
15619 esac
15620 echo "$as_me:$LINENO: checking for $ac_header" >&5
15621 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15622 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15623   echo $ECHO_N "(cached) $ECHO_C" >&6
15624 else
15625   eval "$as_ac_Header=\$ac_header_preproc"
15626 fi
15627 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15628 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15629
15630 fi
15631 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15632   cat >>confdefs.h <<_ACEOF
15633 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15634 _ACEOF
15635
15636 fi
15637
15638 done
15639
15640
15641
15642 for ac_header in sys/epoll.h
15643 do
15644 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15645 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15646   echo "$as_me:$LINENO: checking for $ac_header" >&5
15647 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15648 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15649   echo $ECHO_N "(cached) $ECHO_C" >&6
15650 fi
15651 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15652 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15653 else
15654   # Is the header compilable?
15655 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15656 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15657 cat >conftest.$ac_ext <<_ACEOF
15658 /* confdefs.h.  */
15659 _ACEOF
15660 cat confdefs.h >>conftest.$ac_ext
15661 cat >>conftest.$ac_ext <<_ACEOF
15662 /* end confdefs.h.  */
15663 $ac_includes_default
15664 #include <$ac_header>
15665 _ACEOF
15666 rm -f conftest.$ac_objext
15667 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15668   (eval $ac_compile) 2>conftest.er1
15669   ac_status=$?
15670   grep -v '^ *+' conftest.er1 >conftest.err
15671   rm -f conftest.er1
15672   cat conftest.err >&5
15673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15674   (exit $ac_status); } &&
15675          { ac_try='test -z "$ac_c_werror_flag"
15676                          || test ! -s conftest.err'
15677   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15678   (eval $ac_try) 2>&5
15679   ac_status=$?
15680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15681   (exit $ac_status); }; } &&
15682          { ac_try='test -s conftest.$ac_objext'
15683   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15684   (eval $ac_try) 2>&5
15685   ac_status=$?
15686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15687   (exit $ac_status); }; }; then
15688   ac_header_compiler=yes
15689 else
15690   echo "$as_me: failed program was:" >&5
15691 sed 's/^/| /' conftest.$ac_ext >&5
15692
15693 ac_header_compiler=no
15694 fi
15695 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15696 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15697 echo "${ECHO_T}$ac_header_compiler" >&6
15698
15699 # Is the header present?
15700 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15701 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15702 cat >conftest.$ac_ext <<_ACEOF
15703 /* confdefs.h.  */
15704 _ACEOF
15705 cat confdefs.h >>conftest.$ac_ext
15706 cat >>conftest.$ac_ext <<_ACEOF
15707 /* end confdefs.h.  */
15708 #include <$ac_header>
15709 _ACEOF
15710 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15711   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15712   ac_status=$?
15713   grep -v '^ *+' conftest.er1 >conftest.err
15714   rm -f conftest.er1
15715   cat conftest.err >&5
15716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15717   (exit $ac_status); } >/dev/null; then
15718   if test -s conftest.err; then
15719     ac_cpp_err=$ac_c_preproc_warn_flag
15720     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15721   else
15722     ac_cpp_err=
15723   fi
15724 else
15725   ac_cpp_err=yes
15726 fi
15727 if test -z "$ac_cpp_err"; then
15728   ac_header_preproc=yes
15729 else
15730   echo "$as_me: failed program was:" >&5
15731 sed 's/^/| /' conftest.$ac_ext >&5
15732
15733   ac_header_preproc=no
15734 fi
15735 rm -f conftest.err conftest.$ac_ext
15736 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15737 echo "${ECHO_T}$ac_header_preproc" >&6
15738
15739 # So?  What about this header?
15740 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15741   yes:no: )
15742     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15743 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15744     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15745 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15746     ac_header_preproc=yes
15747     ;;
15748   no:yes:* )
15749     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15750 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15751     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15752 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15753     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15754 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15755     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15756 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15757     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15758 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15759     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15760 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15761     (
15762       cat <<\_ASBOX
15763 ## --------------------------------------------- ##
15764 ## Report this to <http://www.openldap.org/its/> ##
15765 ## --------------------------------------------- ##
15766 _ASBOX
15767     ) |
15768       sed "s/^/$as_me: WARNING:     /" >&2
15769     ;;
15770 esac
15771 echo "$as_me:$LINENO: checking for $ac_header" >&5
15772 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15773 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15774   echo $ECHO_N "(cached) $ECHO_C" >&6
15775 else
15776   eval "$as_ac_Header=\$ac_header_preproc"
15777 fi
15778 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15779 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15780
15781 fi
15782 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15783   cat >>confdefs.h <<_ACEOF
15784 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15785 _ACEOF
15786
15787 fi
15788
15789 done
15790
15791 if test "${ac_cv_header_sys_epoll_h}" = yes; then
15792 echo "$as_me:$LINENO: checking for epoll system call" >&5
15793 echo $ECHO_N "checking for epoll system call... $ECHO_C" >&6
15794 if test "$cross_compiling" = yes; then
15795   echo "$as_me:$LINENO: result: no" >&5
15796 echo "${ECHO_T}no" >&6
15797 else
15798   cat >conftest.$ac_ext <<_ACEOF
15799 /* confdefs.h.  */
15800 _ACEOF
15801 cat confdefs.h >>conftest.$ac_ext
15802 cat >>conftest.$ac_ext <<_ACEOF
15803 /* end confdefs.h.  */
15804 int main(int argc, char *argv)
15805 {
15806         int epfd = epoll_create(256);
15807         exit (epfd == -1 ? 1 : 0);
15808 }
15809 _ACEOF
15810 rm -f conftest$ac_exeext
15811 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15812   (eval $ac_link) 2>&5
15813   ac_status=$?
15814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15815   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15817   (eval $ac_try) 2>&5
15818   ac_status=$?
15819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15820   (exit $ac_status); }; }; then
15821   echo "$as_me:$LINENO: result: yes" >&5
15822 echo "${ECHO_T}yes" >&6
15823
15824 cat >>confdefs.h <<\_ACEOF
15825 #define HAVE_EPOLL 1
15826 _ACEOF
15827
15828 else
15829   echo "$as_me: program exited with status $ac_status" >&5
15830 echo "$as_me: failed program was:" >&5
15831 sed 's/^/| /' conftest.$ac_ext >&5
15832
15833 ( exit $ac_status )
15834 echo "$as_me:$LINENO: result: no" >&5
15835 echo "${ECHO_T}no" >&6
15836 fi
15837 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15838 fi
15839 fi
15840
15841 # strerror checks
15842 echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5
15843 echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6
15844 if test "${ol_cv_dcl_sys_errlist+set}" = set; then
15845   echo $ECHO_N "(cached) $ECHO_C" >&6
15846 else
15847
15848         cat >conftest.$ac_ext <<_ACEOF
15849 /* confdefs.h.  */
15850 _ACEOF
15851 cat confdefs.h >>conftest.$ac_ext
15852 cat >>conftest.$ac_ext <<_ACEOF
15853 /* end confdefs.h.  */
15854
15855 #include <stdio.h>
15856 #include <sys/types.h>
15857 #include <errno.h>
15858 #ifdef WINNT
15859 #include <stdlib.h>
15860 #endif
15861 int
15862 main ()
15863 {
15864 char *c = (char *) *sys_errlist
15865   ;
15866   return 0;
15867 }
15868 _ACEOF
15869 rm -f conftest.$ac_objext
15870 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15871   (eval $ac_compile) 2>conftest.er1
15872   ac_status=$?
15873   grep -v '^ *+' conftest.er1 >conftest.err
15874   rm -f conftest.er1
15875   cat conftest.err >&5
15876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15877   (exit $ac_status); } &&
15878          { ac_try='test -z "$ac_c_werror_flag"
15879                          || test ! -s conftest.err'
15880   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15881   (eval $ac_try) 2>&5
15882   ac_status=$?
15883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15884   (exit $ac_status); }; } &&
15885          { ac_try='test -s conftest.$ac_objext'
15886   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15887   (eval $ac_try) 2>&5
15888   ac_status=$?
15889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15890   (exit $ac_status); }; }; then
15891   ol_cv_dcl_sys_errlist=yes
15892         ol_cv_have_sys_errlist=yes
15893 else
15894   echo "$as_me: failed program was:" >&5
15895 sed 's/^/| /' conftest.$ac_ext >&5
15896
15897 ol_cv_dcl_sys_errlist=no
15898 fi
15899 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15900 fi
15901 echo "$as_me:$LINENO: result: $ol_cv_dcl_sys_errlist" >&5
15902 echo "${ECHO_T}$ol_cv_dcl_sys_errlist" >&6
15903 #
15904 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15905 if test $ol_cv_dcl_sys_errlist = no ; then
15906
15907 cat >>confdefs.h <<\_ACEOF
15908 #define DECL_SYS_ERRLIST 1
15909 _ACEOF
15910
15911
15912         echo "$as_me:$LINENO: checking existence of sys_errlist" >&5
15913 echo $ECHO_N "checking existence of sys_errlist... $ECHO_C" >&6
15914 if test "${ol_cv_have_sys_errlist+set}" = set; then
15915   echo $ECHO_N "(cached) $ECHO_C" >&6
15916 else
15917
15918                 cat >conftest.$ac_ext <<_ACEOF
15919 /* confdefs.h.  */
15920 _ACEOF
15921 cat confdefs.h >>conftest.$ac_ext
15922 cat >>conftest.$ac_ext <<_ACEOF
15923 /* end confdefs.h.  */
15924 #include <errno.h>
15925 int
15926 main ()
15927 {
15928 char *c = (char *) *sys_errlist
15929   ;
15930   return 0;
15931 }
15932 _ACEOF
15933 rm -f conftest.$ac_objext conftest$ac_exeext
15934 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15935   (eval $ac_link) 2>conftest.er1
15936   ac_status=$?
15937   grep -v '^ *+' conftest.er1 >conftest.err
15938   rm -f conftest.er1
15939   cat conftest.err >&5
15940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15941   (exit $ac_status); } &&
15942          { ac_try='test -z "$ac_c_werror_flag"
15943                          || test ! -s conftest.err'
15944   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15945   (eval $ac_try) 2>&5
15946   ac_status=$?
15947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15948   (exit $ac_status); }; } &&
15949          { ac_try='test -s conftest$ac_exeext'
15950   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15951   (eval $ac_try) 2>&5
15952   ac_status=$?
15953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15954   (exit $ac_status); }; }; then
15955   ol_cv_have_sys_errlist=yes
15956 else
15957   echo "$as_me: failed program was:" >&5
15958 sed 's/^/| /' conftest.$ac_ext >&5
15959
15960 ol_cv_have_sys_errlist=no
15961 fi
15962 rm -f conftest.err conftest.$ac_objext \
15963       conftest$ac_exeext conftest.$ac_ext
15964 fi
15965 echo "$as_me:$LINENO: result: $ol_cv_have_sys_errlist" >&5
15966 echo "${ECHO_T}$ol_cv_have_sys_errlist" >&6
15967 fi
15968 if test $ol_cv_have_sys_errlist = yes ; then
15969
15970 cat >>confdefs.h <<\_ACEOF
15971 #define HAVE_SYS_ERRLIST 1
15972 _ACEOF
15973
15974 fi
15975
15976
15977 for ac_func in strerror strerror_r
15978 do
15979 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15980 echo "$as_me:$LINENO: checking for $ac_func" >&5
15981 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15982 if eval "test \"\${$as_ac_var+set}\" = set"; then
15983   echo $ECHO_N "(cached) $ECHO_C" >&6
15984 else
15985   cat >conftest.$ac_ext <<_ACEOF
15986 /* confdefs.h.  */
15987 _ACEOF
15988 cat confdefs.h >>conftest.$ac_ext
15989 cat >>conftest.$ac_ext <<_ACEOF
15990 /* end confdefs.h.  */
15991 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15992    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15993 #define $ac_func innocuous_$ac_func
15994
15995 /* System header to define __stub macros and hopefully few prototypes,
15996     which can conflict with char $ac_func (); below.
15997     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15998     <limits.h> exists even on freestanding compilers.  */
15999
16000 #ifdef __STDC__
16001 # include <limits.h>
16002 #else
16003 # include <assert.h>
16004 #endif
16005
16006 #undef $ac_func
16007
16008 /* Override any gcc2 internal prototype to avoid an error.  */
16009 #ifdef __cplusplus
16010 extern "C"
16011 {
16012 #endif
16013 /* We use char because int might match the return type of a gcc2
16014    builtin and then its argument prototype would still apply.  */
16015 char $ac_func ();
16016 /* The GNU C library defines this for functions which it implements
16017     to always fail with ENOSYS.  Some functions are actually named
16018     something starting with __ and the normal name is an alias.  */
16019 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16020 choke me
16021 #else
16022 char (*f) () = $ac_func;
16023 #endif
16024 #ifdef __cplusplus
16025 }
16026 #endif
16027
16028 int
16029 main ()
16030 {
16031 return f != $ac_func;
16032   ;
16033   return 0;
16034 }
16035 _ACEOF
16036 rm -f conftest.$ac_objext conftest$ac_exeext
16037 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16038   (eval $ac_link) 2>conftest.er1
16039   ac_status=$?
16040   grep -v '^ *+' conftest.er1 >conftest.err
16041   rm -f conftest.er1
16042   cat conftest.err >&5
16043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16044   (exit $ac_status); } &&
16045          { ac_try='test -z "$ac_c_werror_flag"
16046                          || test ! -s conftest.err'
16047   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16048   (eval $ac_try) 2>&5
16049   ac_status=$?
16050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16051   (exit $ac_status); }; } &&
16052          { ac_try='test -s conftest$ac_exeext'
16053   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16054   (eval $ac_try) 2>&5
16055   ac_status=$?
16056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16057   (exit $ac_status); }; }; then
16058   eval "$as_ac_var=yes"
16059 else
16060   echo "$as_me: failed program was:" >&5
16061 sed 's/^/| /' conftest.$ac_ext >&5
16062
16063 eval "$as_ac_var=no"
16064 fi
16065 rm -f conftest.err conftest.$ac_objext \
16066       conftest$ac_exeext conftest.$ac_ext
16067 fi
16068 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16069 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16070 if test `eval echo '${'$as_ac_var'}'` = yes; then
16071   cat >>confdefs.h <<_ACEOF
16072 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16073 _ACEOF
16074
16075 fi
16076 done
16077
16078 ol_cv_func_strerror_r=no
16079 if test "${ac_cv_func_strerror_r}" = yes ; then
16080         echo "$as_me:$LINENO: checking non-posix strerror_r" >&5
16081 echo $ECHO_N "checking non-posix strerror_r... $ECHO_C" >&6
16082 if test "${ol_cv_nonposix_strerror_r+set}" = set; then
16083   echo $ECHO_N "(cached) $ECHO_C" >&6
16084 else
16085
16086         cat >conftest.$ac_ext <<_ACEOF
16087 /* confdefs.h.  */
16088 _ACEOF
16089 cat confdefs.h >>conftest.$ac_ext
16090 cat >>conftest.$ac_ext <<_ACEOF
16091 /* end confdefs.h.  */
16092 #include <string.h>
16093 _ACEOF
16094 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16095   $EGREP "strerror_r" >/dev/null 2>&1; then
16096   ol_decl_strerror_r=yes
16097 else
16098   ol_decl_strerror_r=no
16099 fi
16100 rm -f conftest*
16101
16102         if test $ol_decl_strerror_r = yes ; then
16103                 cat >conftest.$ac_ext <<_ACEOF
16104 /* confdefs.h.  */
16105 _ACEOF
16106 cat confdefs.h >>conftest.$ac_ext
16107 cat >>conftest.$ac_ext <<_ACEOF
16108 /* end confdefs.h.  */
16109 #include <string.h>
16110 int
16111 main ()
16112 {
16113    /* from autoconf 2.59 */
16114                                 char buf[100];
16115                                 char x = *strerror_r (0, buf, sizeof buf);
16116                                 char *p = strerror_r (0, buf, sizeof buf);
16117
16118   ;
16119   return 0;
16120 }
16121 _ACEOF
16122 rm -f conftest.$ac_objext
16123 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16124   (eval $ac_compile) 2>conftest.er1
16125   ac_status=$?
16126   grep -v '^ *+' conftest.er1 >conftest.err
16127   rm -f conftest.er1
16128   cat conftest.err >&5
16129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16130   (exit $ac_status); } &&
16131          { ac_try='test -z "$ac_c_werror_flag"
16132                          || test ! -s conftest.err'
16133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16134   (eval $ac_try) 2>&5
16135   ac_status=$?
16136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16137   (exit $ac_status); }; } &&
16138          { ac_try='test -s conftest.$ac_objext'
16139   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16140   (eval $ac_try) 2>&5
16141   ac_status=$?
16142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16143   (exit $ac_status); }; }; then
16144   ol_cv_nonposix_strerror_r=yes
16145 else
16146   echo "$as_me: failed program was:" >&5
16147 sed 's/^/| /' conftest.$ac_ext >&5
16148
16149 ol_cv_nonposix_strerror_r=no
16150 fi
16151 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16152         else
16153                 if test "$cross_compiling" = yes; then
16154   ol_cv_nonposix_strerror=no
16155 else
16156   cat >conftest.$ac_ext <<_ACEOF
16157 /* confdefs.h.  */
16158 _ACEOF
16159 cat confdefs.h >>conftest.$ac_ext
16160 cat >>conftest.$ac_ext <<_ACEOF
16161 /* end confdefs.h.  */
16162
16163                         main() {
16164                                 char buf[100];
16165                                 buf[0] = 0;
16166                                 strerror_r( 1, buf, sizeof buf );
16167                                 exit( buf[0] == 0 );
16168                         }
16169
16170 _ACEOF
16171 rm -f conftest$ac_exeext
16172 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16173   (eval $ac_link) 2>&5
16174   ac_status=$?
16175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16176   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16177   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16178   (eval $ac_try) 2>&5
16179   ac_status=$?
16180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16181   (exit $ac_status); }; }; then
16182   ol_cv_nonposix_strerror_r=yes
16183 else
16184   echo "$as_me: program exited with status $ac_status" >&5
16185 echo "$as_me: failed program was:" >&5
16186 sed 's/^/| /' conftest.$ac_ext >&5
16187
16188 ( exit $ac_status )
16189 ol_cv_nonposix_strerror=no
16190 fi
16191 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16192 fi
16193         fi
16194
16195 fi
16196 echo "$as_me:$LINENO: result: $ol_cv_nonposix_strerror_r" >&5
16197 echo "${ECHO_T}$ol_cv_nonposix_strerror_r" >&6
16198 if test $ol_cv_nonposix_strerror_r = yes ; then
16199
16200 cat >>confdefs.h <<\_ACEOF
16201 #define HAVE_NONPOSIX_STRERROR_R 1
16202 _ACEOF
16203
16204 fi
16205
16206 elif test "${ac_cv_func_strerror}" = no ; then
16207         echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5
16208 echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6
16209 if test "${ol_cv_dcl_sys_errlist+set}" = set; then
16210   echo $ECHO_N "(cached) $ECHO_C" >&6
16211 else
16212
16213         cat >conftest.$ac_ext <<_ACEOF
16214 /* confdefs.h.  */
16215 _ACEOF
16216 cat confdefs.h >>conftest.$ac_ext
16217 cat >>conftest.$ac_ext <<_ACEOF
16218 /* end confdefs.h.  */
16219
16220 #include <stdio.h>
16221 #include <sys/types.h>
16222 #include <errno.h>
16223 #ifdef WINNT
16224 #include <stdlib.h>
16225 #endif
16226 int
16227 main ()
16228 {
16229 char *c = (char *) *sys_errlist
16230   ;
16231   return 0;
16232 }
16233 _ACEOF
16234 rm -f conftest.$ac_objext
16235 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16236   (eval $ac_compile) 2>conftest.er1
16237   ac_status=$?
16238   grep -v '^ *+' conftest.er1 >conftest.err
16239   rm -f conftest.er1
16240   cat conftest.err >&5
16241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16242   (exit $ac_status); } &&
16243          { ac_try='test -z "$ac_c_werror_flag"
16244                          || test ! -s conftest.err'
16245   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16246   (eval $ac_try) 2>&5
16247   ac_status=$?
16248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16249   (exit $ac_status); }; } &&
16250          { ac_try='test -s conftest.$ac_objext'
16251   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16252   (eval $ac_try) 2>&5
16253   ac_status=$?
16254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16255   (exit $ac_status); }; }; then
16256   ol_cv_dcl_sys_errlist=yes
16257         ol_cv_have_sys_errlist=yes
16258 else
16259   echo "$as_me: failed program was:" >&5
16260 sed 's/^/| /' conftest.$ac_ext >&5
16261
16262 ol_cv_dcl_sys_errlist=no
16263 fi
16264 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16265 fi
16266 echo "$as_me:$LINENO: result: $ol_cv_dcl_sys_errlist" >&5
16267 echo "${ECHO_T}$ol_cv_dcl_sys_errlist" >&6
16268 #
16269 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16270 if test $ol_cv_dcl_sys_errlist = no ; then
16271
16272 cat >>confdefs.h <<\_ACEOF
16273 #define DECL_SYS_ERRLIST 1
16274 _ACEOF
16275
16276
16277         echo "$as_me:$LINENO: checking existence of sys_errlist" >&5
16278 echo $ECHO_N "checking existence of sys_errlist... $ECHO_C" >&6
16279 if test "${ol_cv_have_sys_errlist+set}" = set; then
16280   echo $ECHO_N "(cached) $ECHO_C" >&6
16281 else
16282
16283                 cat >conftest.$ac_ext <<_ACEOF
16284 /* confdefs.h.  */
16285 _ACEOF
16286 cat confdefs.h >>conftest.$ac_ext
16287 cat >>conftest.$ac_ext <<_ACEOF
16288 /* end confdefs.h.  */
16289 #include <errno.h>
16290 int
16291 main ()
16292 {
16293 char *c = (char *) *sys_errlist
16294   ;
16295   return 0;
16296 }
16297 _ACEOF
16298 rm -f conftest.$ac_objext conftest$ac_exeext
16299 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16300   (eval $ac_link) 2>conftest.er1
16301   ac_status=$?
16302   grep -v '^ *+' conftest.er1 >conftest.err
16303   rm -f conftest.er1
16304   cat conftest.err >&5
16305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16306   (exit $ac_status); } &&
16307          { ac_try='test -z "$ac_c_werror_flag"
16308                          || test ! -s conftest.err'
16309   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16310   (eval $ac_try) 2>&5
16311   ac_status=$?
16312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16313   (exit $ac_status); }; } &&
16314          { ac_try='test -s conftest$ac_exeext'
16315   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16316   (eval $ac_try) 2>&5
16317   ac_status=$?
16318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16319   (exit $ac_status); }; }; then
16320   ol_cv_have_sys_errlist=yes
16321 else
16322   echo "$as_me: failed program was:" >&5
16323 sed 's/^/| /' conftest.$ac_ext >&5
16324
16325 ol_cv_have_sys_errlist=no
16326 fi
16327 rm -f conftest.err conftest.$ac_objext \
16328       conftest$ac_exeext conftest.$ac_ext
16329 fi
16330 echo "$as_me:$LINENO: result: $ol_cv_have_sys_errlist" >&5
16331 echo "${ECHO_T}$ol_cv_have_sys_errlist" >&6
16332 fi
16333 if test $ol_cv_have_sys_errlist = yes ; then
16334
16335 cat >>confdefs.h <<\_ACEOF
16336 #define HAVE_SYS_ERRLIST 1
16337 _ACEOF
16338
16339 fi
16340
16341 fi
16342
16343
16344
16345 for ac_header in regex.h
16346 do
16347 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16348 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16349   echo "$as_me:$LINENO: checking for $ac_header" >&5
16350 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16351 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16352   echo $ECHO_N "(cached) $ECHO_C" >&6
16353 fi
16354 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16355 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16356 else
16357   # Is the header compilable?
16358 echo "$as_me:$LINENO: checking $ac_header usability" >&5
16359 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16360 cat >conftest.$ac_ext <<_ACEOF
16361 /* confdefs.h.  */
16362 _ACEOF
16363 cat confdefs.h >>conftest.$ac_ext
16364 cat >>conftest.$ac_ext <<_ACEOF
16365 /* end confdefs.h.  */
16366 $ac_includes_default
16367 #include <$ac_header>
16368 _ACEOF
16369 rm -f conftest.$ac_objext
16370 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16371   (eval $ac_compile) 2>conftest.er1
16372   ac_status=$?
16373   grep -v '^ *+' conftest.er1 >conftest.err
16374   rm -f conftest.er1
16375   cat conftest.err >&5
16376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16377   (exit $ac_status); } &&
16378          { ac_try='test -z "$ac_c_werror_flag"
16379                          || test ! -s conftest.err'
16380   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16381   (eval $ac_try) 2>&5
16382   ac_status=$?
16383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16384   (exit $ac_status); }; } &&
16385          { ac_try='test -s conftest.$ac_objext'
16386   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16387   (eval $ac_try) 2>&5
16388   ac_status=$?
16389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16390   (exit $ac_status); }; }; then
16391   ac_header_compiler=yes
16392 else
16393   echo "$as_me: failed program was:" >&5
16394 sed 's/^/| /' conftest.$ac_ext >&5
16395
16396 ac_header_compiler=no
16397 fi
16398 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16399 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16400 echo "${ECHO_T}$ac_header_compiler" >&6
16401
16402 # Is the header present?
16403 echo "$as_me:$LINENO: checking $ac_header presence" >&5
16404 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16405 cat >conftest.$ac_ext <<_ACEOF
16406 /* confdefs.h.  */
16407 _ACEOF
16408 cat confdefs.h >>conftest.$ac_ext
16409 cat >>conftest.$ac_ext <<_ACEOF
16410 /* end confdefs.h.  */
16411 #include <$ac_header>
16412 _ACEOF
16413 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16414   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16415   ac_status=$?
16416   grep -v '^ *+' conftest.er1 >conftest.err
16417   rm -f conftest.er1
16418   cat conftest.err >&5
16419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16420   (exit $ac_status); } >/dev/null; then
16421   if test -s conftest.err; then
16422     ac_cpp_err=$ac_c_preproc_warn_flag
16423     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16424   else
16425     ac_cpp_err=
16426   fi
16427 else
16428   ac_cpp_err=yes
16429 fi
16430 if test -z "$ac_cpp_err"; then
16431   ac_header_preproc=yes
16432 else
16433   echo "$as_me: failed program was:" >&5
16434 sed 's/^/| /' conftest.$ac_ext >&5
16435
16436   ac_header_preproc=no
16437 fi
16438 rm -f conftest.err conftest.$ac_ext
16439 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16440 echo "${ECHO_T}$ac_header_preproc" >&6
16441
16442 # So?  What about this header?
16443 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16444   yes:no: )
16445     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16446 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16447     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16448 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16449     ac_header_preproc=yes
16450     ;;
16451   no:yes:* )
16452     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16453 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16454     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
16455 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
16456     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16457 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16458     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
16459 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
16460     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16461 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16462     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16463 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
16464     (
16465       cat <<\_ASBOX
16466 ## --------------------------------------------- ##
16467 ## Report this to <http://www.openldap.org/its/> ##
16468 ## --------------------------------------------- ##
16469 _ASBOX
16470     ) |
16471       sed "s/^/$as_me: WARNING:     /" >&2
16472     ;;
16473 esac
16474 echo "$as_me:$LINENO: checking for $ac_header" >&5
16475 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16476 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16477   echo $ECHO_N "(cached) $ECHO_C" >&6
16478 else
16479   eval "$as_ac_Header=\$ac_header_preproc"
16480 fi
16481 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16482 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16483
16484 fi
16485 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16486   cat >>confdefs.h <<_ACEOF
16487 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16488 _ACEOF
16489
16490 fi
16491
16492 done
16493
16494 if test "$ac_cv_header_regex_h" != yes ; then
16495         { { echo "$as_me:$LINENO: error: POSIX regex.h required." >&5
16496 echo "$as_me: error: POSIX regex.h required." >&2;}
16497    { (exit 1); exit 1; }; }
16498 fi
16499 echo "$as_me:$LINENO: checking for library containing regfree" >&5
16500 echo $ECHO_N "checking for library containing regfree... $ECHO_C" >&6
16501 if test "${ac_cv_search_regfree+set}" = set; then
16502   echo $ECHO_N "(cached) $ECHO_C" >&6
16503 else
16504   ac_func_search_save_LIBS=$LIBS
16505 ac_cv_search_regfree=no
16506 cat >conftest.$ac_ext <<_ACEOF
16507 /* confdefs.h.  */
16508 _ACEOF
16509 cat confdefs.h >>conftest.$ac_ext
16510 cat >>conftest.$ac_ext <<_ACEOF
16511 /* end confdefs.h.  */
16512
16513 /* Override any gcc2 internal prototype to avoid an error.  */
16514 #ifdef __cplusplus
16515 extern "C"
16516 #endif
16517 /* We use char because int might match the return type of a gcc2
16518    builtin and then its argument prototype would still apply.  */
16519 char regfree ();
16520 int
16521 main ()
16522 {
16523 regfree ();
16524   ;
16525   return 0;
16526 }
16527 _ACEOF
16528 rm -f conftest.$ac_objext conftest$ac_exeext
16529 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16530   (eval $ac_link) 2>conftest.er1
16531   ac_status=$?
16532   grep -v '^ *+' conftest.er1 >conftest.err
16533   rm -f conftest.er1
16534   cat conftest.err >&5
16535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16536   (exit $ac_status); } &&
16537          { ac_try='test -z "$ac_c_werror_flag"
16538                          || test ! -s conftest.err'
16539   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16540   (eval $ac_try) 2>&5
16541   ac_status=$?
16542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16543   (exit $ac_status); }; } &&
16544          { ac_try='test -s conftest$ac_exeext'
16545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16546   (eval $ac_try) 2>&5
16547   ac_status=$?
16548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16549   (exit $ac_status); }; }; then
16550   ac_cv_search_regfree="none required"
16551 else
16552   echo "$as_me: failed program was:" >&5
16553 sed 's/^/| /' conftest.$ac_ext >&5
16554
16555 fi
16556 rm -f conftest.err conftest.$ac_objext \
16557       conftest$ac_exeext conftest.$ac_ext
16558 if test "$ac_cv_search_regfree" = no; then
16559   for ac_lib in regex gnuregex; do
16560     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
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
16568 /* Override any gcc2 internal prototype to avoid an error.  */
16569 #ifdef __cplusplus
16570 extern "C"
16571 #endif
16572 /* We use char because int might match the return type of a gcc2
16573    builtin and then its argument prototype would still apply.  */
16574 char regfree ();
16575 int
16576 main ()
16577 {
16578 regfree ();
16579   ;
16580   return 0;
16581 }
16582 _ACEOF
16583 rm -f conftest.$ac_objext conftest$ac_exeext
16584 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16585   (eval $ac_link) 2>conftest.er1
16586   ac_status=$?
16587   grep -v '^ *+' conftest.er1 >conftest.err
16588   rm -f conftest.er1
16589   cat conftest.err >&5
16590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16591   (exit $ac_status); } &&
16592          { ac_try='test -z "$ac_c_werror_flag"
16593                          || test ! -s conftest.err'
16594   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16595   (eval $ac_try) 2>&5
16596   ac_status=$?
16597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16598   (exit $ac_status); }; } &&
16599          { ac_try='test -s conftest$ac_exeext'
16600   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16601   (eval $ac_try) 2>&5
16602   ac_status=$?
16603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16604   (exit $ac_status); }; }; then
16605   ac_cv_search_regfree="-l$ac_lib"
16606 break
16607 else
16608   echo "$as_me: failed program was:" >&5
16609 sed 's/^/| /' conftest.$ac_ext >&5
16610
16611 fi
16612 rm -f conftest.err conftest.$ac_objext \
16613       conftest$ac_exeext conftest.$ac_ext
16614   done
16615 fi
16616 LIBS=$ac_func_search_save_LIBS
16617 fi
16618 echo "$as_me:$LINENO: result: $ac_cv_search_regfree" >&5
16619 echo "${ECHO_T}$ac_cv_search_regfree" >&6
16620 if test "$ac_cv_search_regfree" != no; then
16621   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
16622   :
16623 else
16624   { { echo "$as_me:$LINENO: error: POSIX regex required." >&5
16625 echo "$as_me: error: POSIX regex required." >&2;}
16626    { (exit 1); exit 1; }; }
16627 fi
16628
16629
16630
16631 echo "$as_me:$LINENO: checking for compatible POSIX regex" >&5
16632 echo $ECHO_N "checking for compatible POSIX regex... $ECHO_C" >&6
16633 if test "${ol_cv_c_posix_regex+set}" = set; then
16634   echo $ECHO_N "(cached) $ECHO_C" >&6
16635 else
16636
16637         if test "$cross_compiling" = yes; then
16638   ol_cv_c_posix_regex=cross
16639 else
16640   cat >conftest.$ac_ext <<_ACEOF
16641 /* confdefs.h.  */
16642 _ACEOF
16643 cat confdefs.h >>conftest.$ac_ext
16644 cat >>conftest.$ac_ext <<_ACEOF
16645 /* end confdefs.h.  */
16646
16647 #include <sys/types.h>
16648 #include <regex.h>
16649 static char *pattern, *string;
16650 main()
16651 {
16652         int rc;
16653         regex_t re;
16654
16655         pattern = "^A";
16656
16657         if(regcomp(&re, pattern, 0)) {
16658                 return -1;
16659         }
16660
16661         string = "ALL MATCH";
16662
16663         rc = regexec(&re, string, 0, (void*)0, 0);
16664
16665         regfree(&re);
16666
16667         return rc;
16668 }
16669 _ACEOF
16670 rm -f conftest$ac_exeext
16671 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16672   (eval $ac_link) 2>&5
16673   ac_status=$?
16674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16675   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16676   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16677   (eval $ac_try) 2>&5
16678   ac_status=$?
16679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16680   (exit $ac_status); }; }; then
16681   ol_cv_c_posix_regex=yes
16682 else
16683   echo "$as_me: program exited with status $ac_status" >&5
16684 echo "$as_me: failed program was:" >&5
16685 sed 's/^/| /' conftest.$ac_ext >&5
16686
16687 ( exit $ac_status )
16688 ol_cv_c_posix_regex=no
16689 fi
16690 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16691 fi
16692 fi
16693 echo "$as_me:$LINENO: result: $ol_cv_c_posix_regex" >&5
16694 echo "${ECHO_T}$ol_cv_c_posix_regex" >&6
16695
16696 if test "$ol_cv_c_posix_regex" = no ; then
16697         { { echo "$as_me:$LINENO: error: broken POSIX regex!" >&5
16698 echo "$as_me: error: broken POSIX regex!" >&2;}
16699    { (exit 1); exit 1; }; }
16700 fi
16701
16702
16703 have_uuid=no
16704
16705 for ac_header in sys/uuid.h
16706 do
16707 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16708 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16709   echo "$as_me:$LINENO: checking for $ac_header" >&5
16710 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16711 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16712   echo $ECHO_N "(cached) $ECHO_C" >&6
16713 fi
16714 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16715 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16716 else
16717   # Is the header compilable?
16718 echo "$as_me:$LINENO: checking $ac_header usability" >&5
16719 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16720 cat >conftest.$ac_ext <<_ACEOF
16721 /* confdefs.h.  */
16722 _ACEOF
16723 cat confdefs.h >>conftest.$ac_ext
16724 cat >>conftest.$ac_ext <<_ACEOF
16725 /* end confdefs.h.  */
16726 $ac_includes_default
16727 #include <$ac_header>
16728 _ACEOF
16729 rm -f conftest.$ac_objext
16730 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16731   (eval $ac_compile) 2>conftest.er1
16732   ac_status=$?
16733   grep -v '^ *+' conftest.er1 >conftest.err
16734   rm -f conftest.er1
16735   cat conftest.err >&5
16736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16737   (exit $ac_status); } &&
16738          { ac_try='test -z "$ac_c_werror_flag"
16739                          || test ! -s conftest.err'
16740   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16741   (eval $ac_try) 2>&5
16742   ac_status=$?
16743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16744   (exit $ac_status); }; } &&
16745          { ac_try='test -s conftest.$ac_objext'
16746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16747   (eval $ac_try) 2>&5
16748   ac_status=$?
16749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16750   (exit $ac_status); }; }; then
16751   ac_header_compiler=yes
16752 else
16753   echo "$as_me: failed program was:" >&5
16754 sed 's/^/| /' conftest.$ac_ext >&5
16755
16756 ac_header_compiler=no
16757 fi
16758 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16759 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16760 echo "${ECHO_T}$ac_header_compiler" >&6
16761
16762 # Is the header present?
16763 echo "$as_me:$LINENO: checking $ac_header presence" >&5
16764 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16765 cat >conftest.$ac_ext <<_ACEOF
16766 /* confdefs.h.  */
16767 _ACEOF
16768 cat confdefs.h >>conftest.$ac_ext
16769 cat >>conftest.$ac_ext <<_ACEOF
16770 /* end confdefs.h.  */
16771 #include <$ac_header>
16772 _ACEOF
16773 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16774   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16775   ac_status=$?
16776   grep -v '^ *+' conftest.er1 >conftest.err
16777   rm -f conftest.er1
16778   cat conftest.err >&5
16779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16780   (exit $ac_status); } >/dev/null; then
16781   if test -s conftest.err; then
16782     ac_cpp_err=$ac_c_preproc_warn_flag
16783     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16784   else
16785     ac_cpp_err=
16786   fi
16787 else
16788   ac_cpp_err=yes
16789 fi
16790 if test -z "$ac_cpp_err"; then
16791   ac_header_preproc=yes
16792 else
16793   echo "$as_me: failed program was:" >&5
16794 sed 's/^/| /' conftest.$ac_ext >&5
16795
16796   ac_header_preproc=no
16797 fi
16798 rm -f conftest.err conftest.$ac_ext
16799 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16800 echo "${ECHO_T}$ac_header_preproc" >&6
16801
16802 # So?  What about this header?
16803 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16804   yes:no: )
16805     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16806 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16807     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16808 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16809     ac_header_preproc=yes
16810     ;;
16811   no:yes:* )
16812     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16813 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16814     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
16815 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
16816     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16817 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16818     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
16819 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
16820     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16821 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16822     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16823 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
16824     (
16825       cat <<\_ASBOX
16826 ## --------------------------------------------- ##
16827 ## Report this to <http://www.openldap.org/its/> ##
16828 ## --------------------------------------------- ##
16829 _ASBOX
16830     ) |
16831       sed "s/^/$as_me: WARNING:     /" >&2
16832     ;;
16833 esac
16834 echo "$as_me:$LINENO: checking for $ac_header" >&5
16835 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16836 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16837   echo $ECHO_N "(cached) $ECHO_C" >&6
16838 else
16839   eval "$as_ac_Header=\$ac_header_preproc"
16840 fi
16841 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16842 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16843
16844 fi
16845 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16846   cat >>confdefs.h <<_ACEOF
16847 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16848 _ACEOF
16849
16850 fi
16851
16852 done
16853
16854 if test $ac_cv_header_sys_uuid_h = yes ; then
16855         save_LIBS="$LIBS"
16856         echo "$as_me:$LINENO: checking for library containing uuid_to_str" >&5
16857 echo $ECHO_N "checking for library containing uuid_to_str... $ECHO_C" >&6
16858 if test "${ac_cv_search_uuid_to_str+set}" = set; then
16859   echo $ECHO_N "(cached) $ECHO_C" >&6
16860 else
16861   ac_func_search_save_LIBS=$LIBS
16862 ac_cv_search_uuid_to_str=no
16863 cat >conftest.$ac_ext <<_ACEOF
16864 /* confdefs.h.  */
16865 _ACEOF
16866 cat confdefs.h >>conftest.$ac_ext
16867 cat >>conftest.$ac_ext <<_ACEOF
16868 /* end confdefs.h.  */
16869
16870 /* Override any gcc2 internal prototype to avoid an error.  */
16871 #ifdef __cplusplus
16872 extern "C"
16873 #endif
16874 /* We use char because int might match the return type of a gcc2
16875    builtin and then its argument prototype would still apply.  */
16876 char uuid_to_str ();
16877 int
16878 main ()
16879 {
16880 uuid_to_str ();
16881   ;
16882   return 0;
16883 }
16884 _ACEOF
16885 rm -f conftest.$ac_objext conftest$ac_exeext
16886 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16887   (eval $ac_link) 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_exeext'
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_cv_search_uuid_to_str="none required"
16908 else
16909   echo "$as_me: failed program was:" >&5
16910 sed 's/^/| /' conftest.$ac_ext >&5
16911
16912 fi
16913 rm -f conftest.err conftest.$ac_objext \
16914       conftest$ac_exeext conftest.$ac_ext
16915 if test "$ac_cv_search_uuid_to_str" = no; then
16916   for ac_lib in uuid; do
16917     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16918     cat >conftest.$ac_ext <<_ACEOF
16919 /* confdefs.h.  */
16920 _ACEOF
16921 cat confdefs.h >>conftest.$ac_ext
16922 cat >>conftest.$ac_ext <<_ACEOF
16923 /* end confdefs.h.  */
16924
16925 /* Override any gcc2 internal prototype to avoid an error.  */
16926 #ifdef __cplusplus
16927 extern "C"
16928 #endif
16929 /* We use char because int might match the return type of a gcc2
16930    builtin and then its argument prototype would still apply.  */
16931 char uuid_to_str ();
16932 int
16933 main ()
16934 {
16935 uuid_to_str ();
16936   ;
16937   return 0;
16938 }
16939 _ACEOF
16940 rm -f conftest.$ac_objext conftest$ac_exeext
16941 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16942   (eval $ac_link) 2>conftest.er1
16943   ac_status=$?
16944   grep -v '^ *+' conftest.er1 >conftest.err
16945   rm -f conftest.er1
16946   cat conftest.err >&5
16947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16948   (exit $ac_status); } &&
16949          { ac_try='test -z "$ac_c_werror_flag"
16950                          || test ! -s conftest.err'
16951   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16952   (eval $ac_try) 2>&5
16953   ac_status=$?
16954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16955   (exit $ac_status); }; } &&
16956          { ac_try='test -s conftest$ac_exeext'
16957   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16958   (eval $ac_try) 2>&5
16959   ac_status=$?
16960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16961   (exit $ac_status); }; }; then
16962   ac_cv_search_uuid_to_str="-l$ac_lib"
16963 break
16964 else
16965   echo "$as_me: failed program was:" >&5
16966 sed 's/^/| /' conftest.$ac_ext >&5
16967
16968 fi
16969 rm -f conftest.err conftest.$ac_objext \
16970       conftest$ac_exeext conftest.$ac_ext
16971   done
16972 fi
16973 LIBS=$ac_func_search_save_LIBS
16974 fi
16975 echo "$as_me:$LINENO: result: $ac_cv_search_uuid_to_str" >&5
16976 echo "${ECHO_T}$ac_cv_search_uuid_to_str" >&6
16977 if test "$ac_cv_search_uuid_to_str" != no; then
16978   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
16979   have_uuid=yes
16980 else
16981   :
16982 fi
16983
16984         LIBS="$save_LIBS"
16985
16986         if test have_uuid = yes ; then
16987
16988 cat >>confdefs.h <<\_ACEOF
16989 #define HAVE_UUID_TO_STR 1
16990 _ACEOF
16991
16992
16993                 test "$ac_cv_search_uuid_to_str" = "none required" || \
16994                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
16995         fi
16996 fi
16997
16998 if test $have_uuid = no ; then
16999         echo "$as_me:$LINENO: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
17000 echo $ECHO_N "checking to see if -lrpcrt4 is needed for win32 UUID support... $ECHO_C" >&6
17001         save_LIBS="$LIBS"
17002         LIBS="$LIBS -lrpcrt4"
17003         cat >conftest.$ac_ext <<_ACEOF
17004 /* confdefs.h.  */
17005 _ACEOF
17006 cat confdefs.h >>conftest.$ac_ext
17007 cat >>conftest.$ac_ext <<_ACEOF
17008 /* end confdefs.h.  */
17009
17010                 int __stdcall UuidCreate(void *);
17011                 int __stdcall UuidToStringA(void *,void **);
17012
17013 int
17014 main ()
17015 {
17016
17017                 UuidCreate(0);
17018                 UuidToStringA(0,0);
17019
17020   ;
17021   return 0;
17022 }
17023 _ACEOF
17024 rm -f conftest.$ac_objext conftest$ac_exeext
17025 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17026   (eval $ac_link) 2>conftest.er1
17027   ac_status=$?
17028   grep -v '^ *+' conftest.er1 >conftest.err
17029   rm -f conftest.er1
17030   cat conftest.err >&5
17031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17032   (exit $ac_status); } &&
17033          { ac_try='test -z "$ac_c_werror_flag"
17034                          || test ! -s conftest.err'
17035   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17036   (eval $ac_try) 2>&5
17037   ac_status=$?
17038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17039   (exit $ac_status); }; } &&
17040          { ac_try='test -s conftest$ac_exeext'
17041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17042   (eval $ac_try) 2>&5
17043   ac_status=$?
17044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17045   (exit $ac_status); }; }; then
17046   need_rpcrt=yes
17047 else
17048   echo "$as_me: failed program was:" >&5
17049 sed 's/^/| /' conftest.$ac_ext >&5
17050
17051 need_rpcrt=no
17052 fi
17053 rm -f conftest.err conftest.$ac_objext \
17054       conftest$ac_exeext conftest.$ac_ext
17055         if test $need_rpcrt = yes; then
17056                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
17057         fi
17058         LIBS="$save_LIBS"
17059         echo "$as_me:$LINENO: result: $need_rpcrt" >&5
17060 echo "${ECHO_T}$need_rpcrt" >&6
17061 fi
17062
17063 ol_cv_lib_resolver=no
17064 if test $ol_cv_lib_resolver = no ; then
17065         echo "$as_me:$LINENO: checking for resolver link (default)" >&5
17066 echo $ECHO_N "checking for resolver link (default)... $ECHO_C" >&6
17067 if test "${ol_cv_resolver_none+set}" = set; then
17068   echo $ECHO_N "(cached) $ECHO_C" >&6
17069 else
17070
17071         ol_RESOLVER_LIB=
17072         ol_LIBS=$LIBS
17073         LIBS="$ol_RESOLVER_LIB $LIBS"
17074
17075         cat >conftest.$ac_ext <<_ACEOF
17076 /* confdefs.h.  */
17077 _ACEOF
17078 cat confdefs.h >>conftest.$ac_ext
17079 cat >>conftest.$ac_ext <<_ACEOF
17080 /* end confdefs.h.  */
17081
17082 #ifdef HAVE_SYS_TYPES_H
17083 #       include <sys/types.h>
17084 #endif
17085 #include <netinet/in.h>
17086 #ifdef HAVE_ARPA_NAMESER_H
17087 #       include <arpa/nameser.h>
17088 #endif
17089 #ifdef HAVE_RESOLV_H
17090 #       include <resolv.h>
17091 #endif
17092
17093 int
17094 main ()
17095 {
17096 {
17097         int len, status;
17098         char *request = NULL;
17099         unsigned char reply[64*1024];
17100         unsigned char host[64*1024];
17101         unsigned char *p;
17102
17103 #ifdef NS_HFIXEDSZ
17104         /* Bind 8/9 interface */
17105         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17106 #else
17107         /* Bind 4 interface */
17108 # ifndef T_SRV
17109 #  define T_SRV 33
17110 # endif
17111         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17112 #endif
17113         p = reply;
17114 #ifdef NS_HFIXEDSZ
17115         /* Bind 8/9 interface */
17116         p += NS_HFIXEDSZ;
17117 #elif defined(HFIXEDSZ)
17118         /* Bind 4 interface w/ HFIXEDSZ */
17119         p += HFIXEDSZ;
17120 #else
17121         /* Bind 4 interface w/o HFIXEDSZ */
17122         p += sizeof(HEADER);
17123 #endif
17124         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17125 }
17126   ;
17127   return 0;
17128 }
17129 _ACEOF
17130 rm -f conftest.$ac_objext conftest$ac_exeext
17131 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17132   (eval $ac_link) 2>conftest.er1
17133   ac_status=$?
17134   grep -v '^ *+' conftest.er1 >conftest.err
17135   rm -f conftest.er1
17136   cat conftest.err >&5
17137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17138   (exit $ac_status); } &&
17139          { ac_try='test -z "$ac_c_werror_flag"
17140                          || test ! -s conftest.err'
17141   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17142   (eval $ac_try) 2>&5
17143   ac_status=$?
17144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17145   (exit $ac_status); }; } &&
17146          { ac_try='test -s conftest$ac_exeext'
17147   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17148   (eval $ac_try) 2>&5
17149   ac_status=$?
17150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17151   (exit $ac_status); }; }; then
17152   ol_cv_resolver_none=yes
17153 else
17154   echo "$as_me: failed program was:" >&5
17155 sed 's/^/| /' conftest.$ac_ext >&5
17156
17157 ol_cv_resolver_none=no
17158 fi
17159 rm -f conftest.err conftest.$ac_objext \
17160       conftest$ac_exeext conftest.$ac_ext
17161
17162         LIBS="$ol_LIBS"
17163
17164 fi
17165 echo "$as_me:$LINENO: result: $ol_cv_resolver_none" >&5
17166 echo "${ECHO_T}$ol_cv_resolver_none" >&6
17167
17168         if test $ol_cv_resolver_none = yes ; then
17169                 ol_cv_lib_resolver=yes
17170         fi
17171 fi
17172
17173 if test $ol_cv_lib_resolver = no ; then
17174         echo "$as_me:$LINENO: checking for resolver link (-lresolv)" >&5
17175 echo $ECHO_N "checking for resolver link (-lresolv)... $ECHO_C" >&6
17176 if test "${ol_cv_resolver_resolv+set}" = set; then
17177   echo $ECHO_N "(cached) $ECHO_C" >&6
17178 else
17179
17180         ol_RESOLVER_LIB=-lresolv
17181         ol_LIBS=$LIBS
17182         LIBS="$ol_RESOLVER_LIB $LIBS"
17183
17184         cat >conftest.$ac_ext <<_ACEOF
17185 /* confdefs.h.  */
17186 _ACEOF
17187 cat confdefs.h >>conftest.$ac_ext
17188 cat >>conftest.$ac_ext <<_ACEOF
17189 /* end confdefs.h.  */
17190
17191 #ifdef HAVE_SYS_TYPES_H
17192 #       include <sys/types.h>
17193 #endif
17194 #include <netinet/in.h>
17195 #ifdef HAVE_ARPA_NAMESER_H
17196 #       include <arpa/nameser.h>
17197 #endif
17198 #ifdef HAVE_RESOLV_H
17199 #       include <resolv.h>
17200 #endif
17201
17202 int
17203 main ()
17204 {
17205 {
17206         int len, status;
17207         char *request = NULL;
17208         unsigned char reply[64*1024];
17209         unsigned char host[64*1024];
17210         unsigned char *p;
17211
17212 #ifdef NS_HFIXEDSZ
17213         /* Bind 8/9 interface */
17214         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17215 #else
17216         /* Bind 4 interface */
17217 # ifndef T_SRV
17218 #  define T_SRV 33
17219 # endif
17220         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17221 #endif
17222         p = reply;
17223 #ifdef NS_HFIXEDSZ
17224         /* Bind 8/9 interface */
17225         p += NS_HFIXEDSZ;
17226 #elif defined(HFIXEDSZ)
17227         /* Bind 4 interface w/ HFIXEDSZ */
17228         p += HFIXEDSZ;
17229 #else
17230         /* Bind 4 interface w/o HFIXEDSZ */
17231         p += sizeof(HEADER);
17232 #endif
17233         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17234 }
17235   ;
17236   return 0;
17237 }
17238 _ACEOF
17239 rm -f conftest.$ac_objext conftest$ac_exeext
17240 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17241   (eval $ac_link) 2>conftest.er1
17242   ac_status=$?
17243   grep -v '^ *+' conftest.er1 >conftest.err
17244   rm -f conftest.er1
17245   cat conftest.err >&5
17246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17247   (exit $ac_status); } &&
17248          { ac_try='test -z "$ac_c_werror_flag"
17249                          || test ! -s conftest.err'
17250   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17251   (eval $ac_try) 2>&5
17252   ac_status=$?
17253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17254   (exit $ac_status); }; } &&
17255          { ac_try='test -s conftest$ac_exeext'
17256   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17257   (eval $ac_try) 2>&5
17258   ac_status=$?
17259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17260   (exit $ac_status); }; }; then
17261   ol_cv_resolver_resolv=yes
17262 else
17263   echo "$as_me: failed program was:" >&5
17264 sed 's/^/| /' conftest.$ac_ext >&5
17265
17266 ol_cv_resolver_resolv=no
17267 fi
17268 rm -f conftest.err conftest.$ac_objext \
17269       conftest$ac_exeext conftest.$ac_ext
17270
17271         LIBS="$ol_LIBS"
17272
17273 fi
17274 echo "$as_me:$LINENO: result: $ol_cv_resolver_resolv" >&5
17275 echo "${ECHO_T}$ol_cv_resolver_resolv" >&6
17276
17277         if test $ol_cv_resolver_resolv = yes ; then
17278                 ol_cv_lib_resolver=-lresolv
17279         fi
17280 fi
17281
17282 if test $ol_cv_lib_resolver = no ; then
17283         echo "$as_me:$LINENO: checking for resolver link (-lbind)" >&5
17284 echo $ECHO_N "checking for resolver link (-lbind)... $ECHO_C" >&6
17285 if test "${ol_cv_resolver_bind+set}" = set; then
17286   echo $ECHO_N "(cached) $ECHO_C" >&6
17287 else
17288
17289         ol_RESOLVER_LIB=-lbind
17290         ol_LIBS=$LIBS
17291         LIBS="$ol_RESOLVER_LIB $LIBS"
17292
17293         cat >conftest.$ac_ext <<_ACEOF
17294 /* confdefs.h.  */
17295 _ACEOF
17296 cat confdefs.h >>conftest.$ac_ext
17297 cat >>conftest.$ac_ext <<_ACEOF
17298 /* end confdefs.h.  */
17299
17300 #ifdef HAVE_SYS_TYPES_H
17301 #       include <sys/types.h>
17302 #endif
17303 #include <netinet/in.h>
17304 #ifdef HAVE_ARPA_NAMESER_H
17305 #       include <arpa/nameser.h>
17306 #endif
17307 #ifdef HAVE_RESOLV_H
17308 #       include <resolv.h>
17309 #endif
17310
17311 int
17312 main ()
17313 {
17314 {
17315         int len, status;
17316         char *request = NULL;
17317         unsigned char reply[64*1024];
17318         unsigned char host[64*1024];
17319         unsigned char *p;
17320
17321 #ifdef NS_HFIXEDSZ
17322         /* Bind 8/9 interface */
17323         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17324 #else
17325         /* Bind 4 interface */
17326 # ifndef T_SRV
17327 #  define T_SRV 33
17328 # endif
17329         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17330 #endif
17331         p = reply;
17332 #ifdef NS_HFIXEDSZ
17333         /* Bind 8/9 interface */
17334         p += NS_HFIXEDSZ;
17335 #elif defined(HFIXEDSZ)
17336         /* Bind 4 interface w/ HFIXEDSZ */
17337         p += HFIXEDSZ;
17338 #else
17339         /* Bind 4 interface w/o HFIXEDSZ */
17340         p += sizeof(HEADER);
17341 #endif
17342         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17343 }
17344   ;
17345   return 0;
17346 }
17347 _ACEOF
17348 rm -f conftest.$ac_objext conftest$ac_exeext
17349 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17350   (eval $ac_link) 2>conftest.er1
17351   ac_status=$?
17352   grep -v '^ *+' conftest.er1 >conftest.err
17353   rm -f conftest.er1
17354   cat conftest.err >&5
17355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17356   (exit $ac_status); } &&
17357          { ac_try='test -z "$ac_c_werror_flag"
17358                          || test ! -s conftest.err'
17359   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17360   (eval $ac_try) 2>&5
17361   ac_status=$?
17362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17363   (exit $ac_status); }; } &&
17364          { ac_try='test -s conftest$ac_exeext'
17365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17366   (eval $ac_try) 2>&5
17367   ac_status=$?
17368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17369   (exit $ac_status); }; }; then
17370   ol_cv_resolver_bind=yes
17371 else
17372   echo "$as_me: failed program was:" >&5
17373 sed 's/^/| /' conftest.$ac_ext >&5
17374
17375 ol_cv_resolver_bind=no
17376 fi
17377 rm -f conftest.err conftest.$ac_objext \
17378       conftest$ac_exeext conftest.$ac_ext
17379
17380         LIBS="$ol_LIBS"
17381
17382 fi
17383 echo "$as_me:$LINENO: result: $ol_cv_resolver_bind" >&5
17384 echo "${ECHO_T}$ol_cv_resolver_bind" >&6
17385
17386         if test $ol_cv_resolver_bind = yes ; then
17387                 ol_cv_lib_resolver=-lbind
17388         fi
17389 fi
17390
17391
17392
17393 ol_link_dnssrv=no
17394 if test "$ol_cv_lib_resolver" != no ; then
17395
17396 cat >>confdefs.h <<\_ACEOF
17397 #define HAVE_RES_QUERY 1
17398 _ACEOF
17399
17400
17401         if test "$ol_enable_dnssrv" != no ; then
17402                 ol_link_dnssrv=yes
17403         fi
17404
17405         if test "$ol_cv_lib_resolver" != yes ; then
17406                 LIBS="$ol_cv_lib_resolver $LIBS"
17407         fi
17408 fi
17409
17410 if test "$ol_enable_dnssrv" = yes || test "$ol_enable_dnssrv" = mod ; then
17411         if test "$ol_link_dnssrv" = no ; then
17412                 { { echo "$as_me:$LINENO: error: DNSSRV requires res_query()" >&5
17413 echo "$as_me: error: DNSSRV requires res_query()" >&2;}
17414    { (exit 1); exit 1; }; }
17415         fi
17416 else
17417         ol_enable_dnssrv=no
17418 fi
17419
17420
17421 for ac_func in hstrerror
17422 do
17423 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17424 echo "$as_me:$LINENO: checking for $ac_func" >&5
17425 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17426 if eval "test \"\${$as_ac_var+set}\" = set"; then
17427   echo $ECHO_N "(cached) $ECHO_C" >&6
17428 else
17429   cat >conftest.$ac_ext <<_ACEOF
17430 /* confdefs.h.  */
17431 _ACEOF
17432 cat confdefs.h >>conftest.$ac_ext
17433 cat >>conftest.$ac_ext <<_ACEOF
17434 /* end confdefs.h.  */
17435 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17436    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17437 #define $ac_func innocuous_$ac_func
17438
17439 /* System header to define __stub macros and hopefully few prototypes,
17440     which can conflict with char $ac_func (); below.
17441     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17442     <limits.h> exists even on freestanding compilers.  */
17443
17444 #ifdef __STDC__
17445 # include <limits.h>
17446 #else
17447 # include <assert.h>
17448 #endif
17449
17450 #undef $ac_func
17451
17452 /* Override any gcc2 internal prototype to avoid an error.  */
17453 #ifdef __cplusplus
17454 extern "C"
17455 {
17456 #endif
17457 /* We use char because int might match the return type of a gcc2
17458    builtin and then its argument prototype would still apply.  */
17459 char $ac_func ();
17460 /* The GNU C library defines this for functions which it implements
17461     to always fail with ENOSYS.  Some functions are actually named
17462     something starting with __ and the normal name is an alias.  */
17463 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17464 choke me
17465 #else
17466 char (*f) () = $ac_func;
17467 #endif
17468 #ifdef __cplusplus
17469 }
17470 #endif
17471
17472 int
17473 main ()
17474 {
17475 return f != $ac_func;
17476   ;
17477   return 0;
17478 }
17479 _ACEOF
17480 rm -f conftest.$ac_objext conftest$ac_exeext
17481 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17482   (eval $ac_link) 2>conftest.er1
17483   ac_status=$?
17484   grep -v '^ *+' conftest.er1 >conftest.err
17485   rm -f conftest.er1
17486   cat conftest.err >&5
17487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17488   (exit $ac_status); } &&
17489          { ac_try='test -z "$ac_c_werror_flag"
17490                          || test ! -s conftest.err'
17491   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17492   (eval $ac_try) 2>&5
17493   ac_status=$?
17494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17495   (exit $ac_status); }; } &&
17496          { ac_try='test -s conftest$ac_exeext'
17497   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17498   (eval $ac_try) 2>&5
17499   ac_status=$?
17500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17501   (exit $ac_status); }; }; then
17502   eval "$as_ac_var=yes"
17503 else
17504   echo "$as_me: failed program was:" >&5
17505 sed 's/^/| /' conftest.$ac_ext >&5
17506
17507 eval "$as_ac_var=no"
17508 fi
17509 rm -f conftest.err conftest.$ac_objext \
17510       conftest$ac_exeext conftest.$ac_ext
17511 fi
17512 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17513 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17514 if test `eval echo '${'$as_ac_var'}'` = yes; then
17515   cat >>confdefs.h <<_ACEOF
17516 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17517 _ACEOF
17518
17519 fi
17520 done
17521
17522
17523
17524
17525
17526
17527 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop
17528 do
17529 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17530 echo "$as_me:$LINENO: checking for $ac_func" >&5
17531 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17532 if eval "test \"\${$as_ac_var+set}\" = set"; then
17533   echo $ECHO_N "(cached) $ECHO_C" >&6
17534 else
17535   cat >conftest.$ac_ext <<_ACEOF
17536 /* confdefs.h.  */
17537 _ACEOF
17538 cat confdefs.h >>conftest.$ac_ext
17539 cat >>conftest.$ac_ext <<_ACEOF
17540 /* end confdefs.h.  */
17541 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17542    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17543 #define $ac_func innocuous_$ac_func
17544
17545 /* System header to define __stub macros and hopefully few prototypes,
17546     which can conflict with char $ac_func (); below.
17547     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17548     <limits.h> exists even on freestanding compilers.  */
17549
17550 #ifdef __STDC__
17551 # include <limits.h>
17552 #else
17553 # include <assert.h>
17554 #endif
17555
17556 #undef $ac_func
17557
17558 /* Override any gcc2 internal prototype to avoid an error.  */
17559 #ifdef __cplusplus
17560 extern "C"
17561 {
17562 #endif
17563 /* We use char because int might match the return type of a gcc2
17564    builtin and then its argument prototype would still apply.  */
17565 char $ac_func ();
17566 /* The GNU C library defines this for functions which it implements
17567     to always fail with ENOSYS.  Some functions are actually named
17568     something starting with __ and the normal name is an alias.  */
17569 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17570 choke me
17571 #else
17572 char (*f) () = $ac_func;
17573 #endif
17574 #ifdef __cplusplus
17575 }
17576 #endif
17577
17578 int
17579 main ()
17580 {
17581 return f != $ac_func;
17582   ;
17583   return 0;
17584 }
17585 _ACEOF
17586 rm -f conftest.$ac_objext conftest$ac_exeext
17587 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17588   (eval $ac_link) 2>conftest.er1
17589   ac_status=$?
17590   grep -v '^ *+' conftest.er1 >conftest.err
17591   rm -f conftest.er1
17592   cat conftest.err >&5
17593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17594   (exit $ac_status); } &&
17595          { ac_try='test -z "$ac_c_werror_flag"
17596                          || test ! -s conftest.err'
17597   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17598   (eval $ac_try) 2>&5
17599   ac_status=$?
17600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17601   (exit $ac_status); }; } &&
17602          { ac_try='test -s conftest$ac_exeext'
17603   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17604   (eval $ac_try) 2>&5
17605   ac_status=$?
17606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17607   (exit $ac_status); }; }; then
17608   eval "$as_ac_var=yes"
17609 else
17610   echo "$as_me: failed program was:" >&5
17611 sed 's/^/| /' conftest.$ac_ext >&5
17612
17613 eval "$as_ac_var=no"
17614 fi
17615 rm -f conftest.err conftest.$ac_objext \
17616       conftest$ac_exeext conftest.$ac_ext
17617 fi
17618 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17619 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17620 if test `eval echo '${'$as_ac_var'}'` = yes; then
17621   cat >>confdefs.h <<_ACEOF
17622 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17623 _ACEOF
17624
17625 fi
17626 done
17627
17628
17629 ol_link_ipv6=no
17630 if test $ac_cv_func_getaddrinfo = no || test $ac_cv_func_inet_ntop = no ; then
17631         if test $ol_enable_ipv6 = yes ; then
17632                 { { echo "$as_me:$LINENO: error: IPv6 support requires getaddrinfo() and inet_ntop()" >&5
17633 echo "$as_me: error: IPv6 support requires getaddrinfo() and inet_ntop()" >&2;}
17634    { (exit 1); exit 1; }; }
17635         fi
17636 elif test $ol_enable_ipv6 != no ; then
17637         echo "$as_me:$LINENO: checking INET6_ADDRSTRLEN" >&5
17638 echo $ECHO_N "checking INET6_ADDRSTRLEN... $ECHO_C" >&6
17639 if test "${ol_cv_inet6_addrstrlen+set}" = set; then
17640   echo $ECHO_N "(cached) $ECHO_C" >&6
17641 else
17642
17643                 cat >conftest.$ac_ext <<_ACEOF
17644 /* confdefs.h.  */
17645 _ACEOF
17646 cat confdefs.h >>conftest.$ac_ext
17647 cat >>conftest.$ac_ext <<_ACEOF
17648 /* end confdefs.h.  */
17649
17650 #                       include <netinet/in.h>
17651 #                       ifdef INET6_ADDRSTRLEN
17652                                 __has_inet6_addrstrlen__;
17653 #                       endif
17654
17655 _ACEOF
17656 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17657   $EGREP "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
17658   ol_cv_inet6_addrstrlen=yes
17659 else
17660   ol_cv_inet6_addrstrlen=no
17661 fi
17662 rm -f conftest*
17663
17664 fi
17665 echo "$as_me:$LINENO: result: $ol_cv_inet6_addrstrlen" >&5
17666 echo "${ECHO_T}$ol_cv_inet6_addrstrlen" >&6
17667
17668
17669         echo "$as_me:$LINENO: checking struct sockaddr_storage" >&5
17670 echo $ECHO_N "checking struct sockaddr_storage... $ECHO_C" >&6
17671 if test "${ol_cv_struct_sockaddr_storage+set}" = set; then
17672   echo $ECHO_N "(cached) $ECHO_C" >&6
17673 else
17674
17675                 cat >conftest.$ac_ext <<_ACEOF
17676 /* confdefs.h.  */
17677 _ACEOF
17678 cat confdefs.h >>conftest.$ac_ext
17679 cat >>conftest.$ac_ext <<_ACEOF
17680 /* end confdefs.h.  */
17681
17682 #include <sys/types.h>
17683 #include <sys/socket.h>
17684
17685 int
17686 main ()
17687 {
17688
17689                         struct sockaddr_storage ss;
17690
17691   ;
17692   return 0;
17693 }
17694 _ACEOF
17695 rm -f conftest.$ac_objext
17696 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17697   (eval $ac_compile) 2>conftest.er1
17698   ac_status=$?
17699   grep -v '^ *+' conftest.er1 >conftest.err
17700   rm -f conftest.er1
17701   cat conftest.err >&5
17702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17703   (exit $ac_status); } &&
17704          { ac_try='test -z "$ac_c_werror_flag"
17705                          || test ! -s conftest.err'
17706   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17707   (eval $ac_try) 2>&5
17708   ac_status=$?
17709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17710   (exit $ac_status); }; } &&
17711          { ac_try='test -s conftest.$ac_objext'
17712   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17713   (eval $ac_try) 2>&5
17714   ac_status=$?
17715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17716   (exit $ac_status); }; }; then
17717   ol_cv_struct_sockaddr_storage=yes
17718 else
17719   echo "$as_me: failed program was:" >&5
17720 sed 's/^/| /' conftest.$ac_ext >&5
17721
17722 ol_cv_struct_sockaddr_storage=no
17723 fi
17724 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17725 fi
17726 echo "$as_me:$LINENO: result: $ol_cv_struct_sockaddr_storage" >&5
17727 echo "${ECHO_T}$ol_cv_struct_sockaddr_storage" >&6
17728
17729         if test $ol_cv_inet6_addrstrlen = yes &&
17730            test $ol_cv_struct_sockaddr_storage = yes ; then
17731                 ol_link_ipv6=yes
17732         elif test $ol_enable_ipv6 = yes &&
17733              test $ol_cv_inet6_addrstrlen = no ; then
17734                 { { echo "$as_me:$LINENO: error: IPv6 support requires INET6_ADDRSTRLEN" >&5
17735 echo "$as_me: error: IPv6 support requires INET6_ADDRSTRLEN" >&2;}
17736    { (exit 1); exit 1; }; }
17737         elif test $ol_enable_ipv6 = yes &&
17738              test $ol_cv_struct_sockaddr_storage = no ; then
17739                 { { echo "$as_me:$LINENO: error: IPv6 support requires struct sockaddr_storage" >&5
17740 echo "$as_me: error: IPv6 support requires struct sockaddr_storage" >&2;}
17741    { (exit 1); exit 1; }; }
17742         fi
17743 fi
17744
17745 if test $ol_enable_local != no ; then
17746
17747 for ac_header in sys/un.h
17748 do
17749 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17750 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17751   echo "$as_me:$LINENO: checking for $ac_header" >&5
17752 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17753 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17754   echo $ECHO_N "(cached) $ECHO_C" >&6
17755 fi
17756 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17757 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17758 else
17759   # Is the header compilable?
17760 echo "$as_me:$LINENO: checking $ac_header usability" >&5
17761 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17762 cat >conftest.$ac_ext <<_ACEOF
17763 /* confdefs.h.  */
17764 _ACEOF
17765 cat confdefs.h >>conftest.$ac_ext
17766 cat >>conftest.$ac_ext <<_ACEOF
17767 /* end confdefs.h.  */
17768 $ac_includes_default
17769 #include <$ac_header>
17770 _ACEOF
17771 rm -f conftest.$ac_objext
17772 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17773   (eval $ac_compile) 2>conftest.er1
17774   ac_status=$?
17775   grep -v '^ *+' conftest.er1 >conftest.err
17776   rm -f conftest.er1
17777   cat conftest.err >&5
17778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17779   (exit $ac_status); } &&
17780          { ac_try='test -z "$ac_c_werror_flag"
17781                          || test ! -s conftest.err'
17782   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17783   (eval $ac_try) 2>&5
17784   ac_status=$?
17785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17786   (exit $ac_status); }; } &&
17787          { ac_try='test -s conftest.$ac_objext'
17788   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17789   (eval $ac_try) 2>&5
17790   ac_status=$?
17791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17792   (exit $ac_status); }; }; then
17793   ac_header_compiler=yes
17794 else
17795   echo "$as_me: failed program was:" >&5
17796 sed 's/^/| /' conftest.$ac_ext >&5
17797
17798 ac_header_compiler=no
17799 fi
17800 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17801 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17802 echo "${ECHO_T}$ac_header_compiler" >&6
17803
17804 # Is the header present?
17805 echo "$as_me:$LINENO: checking $ac_header presence" >&5
17806 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17807 cat >conftest.$ac_ext <<_ACEOF
17808 /* confdefs.h.  */
17809 _ACEOF
17810 cat confdefs.h >>conftest.$ac_ext
17811 cat >>conftest.$ac_ext <<_ACEOF
17812 /* end confdefs.h.  */
17813 #include <$ac_header>
17814 _ACEOF
17815 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17816   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17817   ac_status=$?
17818   grep -v '^ *+' conftest.er1 >conftest.err
17819   rm -f conftest.er1
17820   cat conftest.err >&5
17821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17822   (exit $ac_status); } >/dev/null; then
17823   if test -s conftest.err; then
17824     ac_cpp_err=$ac_c_preproc_warn_flag
17825     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17826   else
17827     ac_cpp_err=
17828   fi
17829 else
17830   ac_cpp_err=yes
17831 fi
17832 if test -z "$ac_cpp_err"; then
17833   ac_header_preproc=yes
17834 else
17835   echo "$as_me: failed program was:" >&5
17836 sed 's/^/| /' conftest.$ac_ext >&5
17837
17838   ac_header_preproc=no
17839 fi
17840 rm -f conftest.err conftest.$ac_ext
17841 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17842 echo "${ECHO_T}$ac_header_preproc" >&6
17843
17844 # So?  What about this header?
17845 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17846   yes:no: )
17847     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17848 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17849     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17850 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17851     ac_header_preproc=yes
17852     ;;
17853   no:yes:* )
17854     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17855 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17856     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17857 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17858     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17859 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17860     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17861 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17862     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17863 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17864     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17865 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17866     (
17867       cat <<\_ASBOX
17868 ## --------------------------------------------- ##
17869 ## Report this to <http://www.openldap.org/its/> ##
17870 ## --------------------------------------------- ##
17871 _ASBOX
17872     ) |
17873       sed "s/^/$as_me: WARNING:     /" >&2
17874     ;;
17875 esac
17876 echo "$as_me:$LINENO: checking for $ac_header" >&5
17877 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17878 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17879   echo $ECHO_N "(cached) $ECHO_C" >&6
17880 else
17881   eval "$as_ac_Header=\$ac_header_preproc"
17882 fi
17883 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17884 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17885
17886 fi
17887 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17888   cat >>confdefs.h <<_ACEOF
17889 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17890 _ACEOF
17891
17892 fi
17893
17894 done
17895
17896
17897         if test $ol_enable_local = auto ; then
17898                 ol_enable_local=$ac_cv_header_sys_un_h
17899         elif test $ac_cv_header_sys_un_h = no ; then
17900                 { { echo "$as_me:$LINENO: error: AF_LOCAL domain support requires sys/un.h" >&5
17901 echo "$as_me: error: AF_LOCAL domain support requires sys/un.h" >&2;}
17902    { (exit 1); exit 1; }; }
17903         fi
17904 fi
17905
17906 ol_link_kbind=no
17907 ol_link_krb5=no
17908 ol_link_krb4=no
17909
17910 case $ol_with_kerberos in yes | auto | k5 | k5only | k425)
17911
17912
17913 for ac_header in krb5.h
17914 do
17915 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17916 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17917   echo "$as_me:$LINENO: checking for $ac_header" >&5
17918 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17919 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17920   echo $ECHO_N "(cached) $ECHO_C" >&6
17921 fi
17922 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17923 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17924 else
17925   # Is the header compilable?
17926 echo "$as_me:$LINENO: checking $ac_header usability" >&5
17927 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17928 cat >conftest.$ac_ext <<_ACEOF
17929 /* confdefs.h.  */
17930 _ACEOF
17931 cat confdefs.h >>conftest.$ac_ext
17932 cat >>conftest.$ac_ext <<_ACEOF
17933 /* end confdefs.h.  */
17934 $ac_includes_default
17935 #include <$ac_header>
17936 _ACEOF
17937 rm -f conftest.$ac_objext
17938 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17939   (eval $ac_compile) 2>conftest.er1
17940   ac_status=$?
17941   grep -v '^ *+' conftest.er1 >conftest.err
17942   rm -f conftest.er1
17943   cat conftest.err >&5
17944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17945   (exit $ac_status); } &&
17946          { ac_try='test -z "$ac_c_werror_flag"
17947                          || test ! -s conftest.err'
17948   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17949   (eval $ac_try) 2>&5
17950   ac_status=$?
17951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17952   (exit $ac_status); }; } &&
17953          { ac_try='test -s conftest.$ac_objext'
17954   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17955   (eval $ac_try) 2>&5
17956   ac_status=$?
17957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17958   (exit $ac_status); }; }; then
17959   ac_header_compiler=yes
17960 else
17961   echo "$as_me: failed program was:" >&5
17962 sed 's/^/| /' conftest.$ac_ext >&5
17963
17964 ac_header_compiler=no
17965 fi
17966 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17967 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17968 echo "${ECHO_T}$ac_header_compiler" >&6
17969
17970 # Is the header present?
17971 echo "$as_me:$LINENO: checking $ac_header presence" >&5
17972 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17973 cat >conftest.$ac_ext <<_ACEOF
17974 /* confdefs.h.  */
17975 _ACEOF
17976 cat confdefs.h >>conftest.$ac_ext
17977 cat >>conftest.$ac_ext <<_ACEOF
17978 /* end confdefs.h.  */
17979 #include <$ac_header>
17980 _ACEOF
17981 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17982   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17983   ac_status=$?
17984   grep -v '^ *+' conftest.er1 >conftest.err
17985   rm -f conftest.er1
17986   cat conftest.err >&5
17987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17988   (exit $ac_status); } >/dev/null; then
17989   if test -s conftest.err; then
17990     ac_cpp_err=$ac_c_preproc_warn_flag
17991     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17992   else
17993     ac_cpp_err=
17994   fi
17995 else
17996   ac_cpp_err=yes
17997 fi
17998 if test -z "$ac_cpp_err"; then
17999   ac_header_preproc=yes
18000 else
18001   echo "$as_me: failed program was:" >&5
18002 sed 's/^/| /' conftest.$ac_ext >&5
18003
18004   ac_header_preproc=no
18005 fi
18006 rm -f conftest.err conftest.$ac_ext
18007 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18008 echo "${ECHO_T}$ac_header_preproc" >&6
18009
18010 # So?  What about this header?
18011 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18012   yes:no: )
18013     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18014 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18015     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18016 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18017     ac_header_preproc=yes
18018     ;;
18019   no:yes:* )
18020     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18021 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18022     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18023 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18024     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18025 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18026     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18027 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18028     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18029 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18030     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18031 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18032     (
18033       cat <<\_ASBOX
18034 ## --------------------------------------------- ##
18035 ## Report this to <http://www.openldap.org/its/> ##
18036 ## --------------------------------------------- ##
18037 _ASBOX
18038     ) |
18039       sed "s/^/$as_me: WARNING:     /" >&2
18040     ;;
18041 esac
18042 echo "$as_me:$LINENO: checking for $ac_header" >&5
18043 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18044 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18045   echo $ECHO_N "(cached) $ECHO_C" >&6
18046 else
18047   eval "$as_ac_Header=\$ac_header_preproc"
18048 fi
18049 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18050 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18051
18052 fi
18053 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18054   cat >>confdefs.h <<_ACEOF
18055 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18056 _ACEOF
18057
18058 fi
18059
18060 done
18061
18062
18063         if test $ac_cv_header_krb5_h = yes ; then
18064
18065 for ac_header in heim_err.h
18066 do
18067 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18068 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18069   echo "$as_me:$LINENO: checking for $ac_header" >&5
18070 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18071 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18072   echo $ECHO_N "(cached) $ECHO_C" >&6
18073 fi
18074 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18075 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18076 else
18077   # Is the header compilable?
18078 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18079 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18080 cat >conftest.$ac_ext <<_ACEOF
18081 /* confdefs.h.  */
18082 _ACEOF
18083 cat confdefs.h >>conftest.$ac_ext
18084 cat >>conftest.$ac_ext <<_ACEOF
18085 /* end confdefs.h.  */
18086 $ac_includes_default
18087 #include <$ac_header>
18088 _ACEOF
18089 rm -f conftest.$ac_objext
18090 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18091   (eval $ac_compile) 2>conftest.er1
18092   ac_status=$?
18093   grep -v '^ *+' conftest.er1 >conftest.err
18094   rm -f conftest.er1
18095   cat conftest.err >&5
18096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18097   (exit $ac_status); } &&
18098          { ac_try='test -z "$ac_c_werror_flag"
18099                          || test ! -s conftest.err'
18100   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18101   (eval $ac_try) 2>&5
18102   ac_status=$?
18103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18104   (exit $ac_status); }; } &&
18105          { ac_try='test -s conftest.$ac_objext'
18106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18107   (eval $ac_try) 2>&5
18108   ac_status=$?
18109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18110   (exit $ac_status); }; }; then
18111   ac_header_compiler=yes
18112 else
18113   echo "$as_me: failed program was:" >&5
18114 sed 's/^/| /' conftest.$ac_ext >&5
18115
18116 ac_header_compiler=no
18117 fi
18118 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18119 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18120 echo "${ECHO_T}$ac_header_compiler" >&6
18121
18122 # Is the header present?
18123 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18124 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18125 cat >conftest.$ac_ext <<_ACEOF
18126 /* confdefs.h.  */
18127 _ACEOF
18128 cat confdefs.h >>conftest.$ac_ext
18129 cat >>conftest.$ac_ext <<_ACEOF
18130 /* end confdefs.h.  */
18131 #include <$ac_header>
18132 _ACEOF
18133 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18134   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18135   ac_status=$?
18136   grep -v '^ *+' conftest.er1 >conftest.err
18137   rm -f conftest.er1
18138   cat conftest.err >&5
18139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18140   (exit $ac_status); } >/dev/null; then
18141   if test -s conftest.err; then
18142     ac_cpp_err=$ac_c_preproc_warn_flag
18143     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18144   else
18145     ac_cpp_err=
18146   fi
18147 else
18148   ac_cpp_err=yes
18149 fi
18150 if test -z "$ac_cpp_err"; then
18151   ac_header_preproc=yes
18152 else
18153   echo "$as_me: failed program was:" >&5
18154 sed 's/^/| /' conftest.$ac_ext >&5
18155
18156   ac_header_preproc=no
18157 fi
18158 rm -f conftest.err conftest.$ac_ext
18159 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18160 echo "${ECHO_T}$ac_header_preproc" >&6
18161
18162 # So?  What about this header?
18163 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18164   yes:no: )
18165     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18166 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18167     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18168 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18169     ac_header_preproc=yes
18170     ;;
18171   no:yes:* )
18172     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18173 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18174     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18175 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18176     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18177 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18178     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18179 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18180     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18181 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18182     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18183 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18184     (
18185       cat <<\_ASBOX
18186 ## --------------------------------------------- ##
18187 ## Report this to <http://www.openldap.org/its/> ##
18188 ## --------------------------------------------- ##
18189 _ASBOX
18190     ) |
18191       sed "s/^/$as_me: WARNING:     /" >&2
18192     ;;
18193 esac
18194 echo "$as_me:$LINENO: checking for $ac_header" >&5
18195 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18196 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18197   echo $ECHO_N "(cached) $ECHO_C" >&6
18198 else
18199   eval "$as_ac_Header=\$ac_header_preproc"
18200 fi
18201 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18202 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18203
18204 fi
18205 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18206   cat >>confdefs.h <<_ACEOF
18207 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18208 _ACEOF
18209
18210 fi
18211
18212 done
18213
18214                 if test $ac_cv_header_heim_err_h = yes ; then
18215                         krb5_impl=heimdal
18216                 else
18217                         krb5_impl=mit
18218                 fi
18219
18220                 if test $krb5_impl = mit; then
18221                         echo "$as_me:$LINENO: checking for main in -lk5crypto" >&5
18222 echo $ECHO_N "checking for main in -lk5crypto... $ECHO_C" >&6
18223 if test "${ac_cv_lib_k5crypto_main+set}" = set; then
18224   echo $ECHO_N "(cached) $ECHO_C" >&6
18225 else
18226   ac_check_lib_save_LIBS=$LIBS
18227 LIBS="-lk5crypto  $LIBS"
18228 cat >conftest.$ac_ext <<_ACEOF
18229 /* confdefs.h.  */
18230 _ACEOF
18231 cat confdefs.h >>conftest.$ac_ext
18232 cat >>conftest.$ac_ext <<_ACEOF
18233 /* end confdefs.h.  */
18234
18235
18236 int
18237 main ()
18238 {
18239 main ();
18240   ;
18241   return 0;
18242 }
18243 _ACEOF
18244 rm -f conftest.$ac_objext conftest$ac_exeext
18245 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18246   (eval $ac_link) 2>conftest.er1
18247   ac_status=$?
18248   grep -v '^ *+' conftest.er1 >conftest.err
18249   rm -f conftest.er1
18250   cat conftest.err >&5
18251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18252   (exit $ac_status); } &&
18253          { ac_try='test -z "$ac_c_werror_flag"
18254                          || test ! -s conftest.err'
18255   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18256   (eval $ac_try) 2>&5
18257   ac_status=$?
18258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18259   (exit $ac_status); }; } &&
18260          { ac_try='test -s conftest$ac_exeext'
18261   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18262   (eval $ac_try) 2>&5
18263   ac_status=$?
18264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18265   (exit $ac_status); }; }; then
18266   ac_cv_lib_k5crypto_main=yes
18267 else
18268   echo "$as_me: failed program was:" >&5
18269 sed 's/^/| /' conftest.$ac_ext >&5
18270
18271 ac_cv_lib_k5crypto_main=no
18272 fi
18273 rm -f conftest.err conftest.$ac_objext \
18274       conftest$ac_exeext conftest.$ac_ext
18275 LIBS=$ac_check_lib_save_LIBS
18276 fi
18277 echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_main" >&5
18278 echo "${ECHO_T}$ac_cv_lib_k5crypto_main" >&6
18279 if test $ac_cv_lib_k5crypto_main = yes; then
18280   krb5crypto=k5crypto
18281 else
18282   krb5crypto=crypto
18283 fi
18284
18285
18286                         echo "$as_me:$LINENO: checking for main in -lkrb5" >&5
18287 echo $ECHO_N "checking for main in -lkrb5... $ECHO_C" >&6
18288 if test "${ac_cv_lib_krb5_main+set}" = set; then
18289   echo $ECHO_N "(cached) $ECHO_C" >&6
18290 else
18291   ac_check_lib_save_LIBS=$LIBS
18292 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
18293 cat >conftest.$ac_ext <<_ACEOF
18294 /* confdefs.h.  */
18295 _ACEOF
18296 cat confdefs.h >>conftest.$ac_ext
18297 cat >>conftest.$ac_ext <<_ACEOF
18298 /* end confdefs.h.  */
18299
18300
18301 int
18302 main ()
18303 {
18304 main ();
18305   ;
18306   return 0;
18307 }
18308 _ACEOF
18309 rm -f conftest.$ac_objext conftest$ac_exeext
18310 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18311   (eval $ac_link) 2>conftest.er1
18312   ac_status=$?
18313   grep -v '^ *+' conftest.er1 >conftest.err
18314   rm -f conftest.er1
18315   cat conftest.err >&5
18316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18317   (exit $ac_status); } &&
18318          { ac_try='test -z "$ac_c_werror_flag"
18319                          || test ! -s conftest.err'
18320   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18321   (eval $ac_try) 2>&5
18322   ac_status=$?
18323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18324   (exit $ac_status); }; } &&
18325          { ac_try='test -s conftest$ac_exeext'
18326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18327   (eval $ac_try) 2>&5
18328   ac_status=$?
18329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18330   (exit $ac_status); }; }; then
18331   ac_cv_lib_krb5_main=yes
18332 else
18333   echo "$as_me: failed program was:" >&5
18334 sed 's/^/| /' conftest.$ac_ext >&5
18335
18336 ac_cv_lib_krb5_main=no
18337 fi
18338 rm -f conftest.err conftest.$ac_objext \
18339       conftest$ac_exeext conftest.$ac_ext
18340 LIBS=$ac_check_lib_save_LIBS
18341 fi
18342 echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_main" >&5
18343 echo "${ECHO_T}$ac_cv_lib_krb5_main" >&6
18344 if test $ac_cv_lib_krb5_main = yes; then
18345   have_krb5=yes
18346                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
18347 else
18348   have_krb5=no
18349 fi
18350
18351
18352                 elif test $krb5_impl = heimdal; then
18353                         echo "$as_me:$LINENO: checking for main in -ldes" >&5
18354 echo $ECHO_N "checking for main in -ldes... $ECHO_C" >&6
18355 if test "${ac_cv_lib_des_main+set}" = set; then
18356   echo $ECHO_N "(cached) $ECHO_C" >&6
18357 else
18358   ac_check_lib_save_LIBS=$LIBS
18359 LIBS="-ldes  $LIBS"
18360 cat >conftest.$ac_ext <<_ACEOF
18361 /* confdefs.h.  */
18362 _ACEOF
18363 cat confdefs.h >>conftest.$ac_ext
18364 cat >>conftest.$ac_ext <<_ACEOF
18365 /* end confdefs.h.  */
18366
18367
18368 int
18369 main ()
18370 {
18371 main ();
18372   ;
18373   return 0;
18374 }
18375 _ACEOF
18376 rm -f conftest.$ac_objext conftest$ac_exeext
18377 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18378   (eval $ac_link) 2>conftest.er1
18379   ac_status=$?
18380   grep -v '^ *+' conftest.er1 >conftest.err
18381   rm -f conftest.er1
18382   cat conftest.err >&5
18383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18384   (exit $ac_status); } &&
18385          { ac_try='test -z "$ac_c_werror_flag"
18386                          || test ! -s conftest.err'
18387   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18388   (eval $ac_try) 2>&5
18389   ac_status=$?
18390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18391   (exit $ac_status); }; } &&
18392          { ac_try='test -s conftest$ac_exeext'
18393   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18394   (eval $ac_try) 2>&5
18395   ac_status=$?
18396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18397   (exit $ac_status); }; }; then
18398   ac_cv_lib_des_main=yes
18399 else
18400   echo "$as_me: failed program was:" >&5
18401 sed 's/^/| /' conftest.$ac_ext >&5
18402
18403 ac_cv_lib_des_main=no
18404 fi
18405 rm -f conftest.err conftest.$ac_objext \
18406       conftest$ac_exeext conftest.$ac_ext
18407 LIBS=$ac_check_lib_save_LIBS
18408 fi
18409 echo "$as_me:$LINENO: result: $ac_cv_lib_des_main" >&5
18410 echo "${ECHO_T}$ac_cv_lib_des_main" >&6
18411 if test $ac_cv_lib_des_main = yes; then
18412   krb5crypto=des
18413 else
18414   krb5crypto=crypto
18415 fi
18416
18417
18418                         echo "$as_me:$LINENO: checking for main in -lkrb5" >&5
18419 echo $ECHO_N "checking for main in -lkrb5... $ECHO_C" >&6
18420 if test "${ac_cv_lib_krb5_main+set}" = set; then
18421   echo $ECHO_N "(cached) $ECHO_C" >&6
18422 else
18423   ac_check_lib_save_LIBS=$LIBS
18424 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
18425 cat >conftest.$ac_ext <<_ACEOF
18426 /* confdefs.h.  */
18427 _ACEOF
18428 cat confdefs.h >>conftest.$ac_ext
18429 cat >>conftest.$ac_ext <<_ACEOF
18430 /* end confdefs.h.  */
18431
18432
18433 int
18434 main ()
18435 {
18436 main ();
18437   ;
18438   return 0;
18439 }
18440 _ACEOF
18441 rm -f conftest.$ac_objext conftest$ac_exeext
18442 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18443   (eval $ac_link) 2>conftest.er1
18444   ac_status=$?
18445   grep -v '^ *+' conftest.er1 >conftest.err
18446   rm -f conftest.er1
18447   cat conftest.err >&5
18448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18449   (exit $ac_status); } &&
18450          { ac_try='test -z "$ac_c_werror_flag"
18451                          || test ! -s conftest.err'
18452   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18453   (eval $ac_try) 2>&5
18454   ac_status=$?
18455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18456   (exit $ac_status); }; } &&
18457          { ac_try='test -s conftest$ac_exeext'
18458   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18459   (eval $ac_try) 2>&5
18460   ac_status=$?
18461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18462   (exit $ac_status); }; }; then
18463   ac_cv_lib_krb5_main=yes
18464 else
18465   echo "$as_me: failed program was:" >&5
18466 sed 's/^/| /' conftest.$ac_ext >&5
18467
18468 ac_cv_lib_krb5_main=no
18469 fi
18470 rm -f conftest.err conftest.$ac_objext \
18471       conftest$ac_exeext conftest.$ac_ext
18472 LIBS=$ac_check_lib_save_LIBS
18473 fi
18474 echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_main" >&5
18475 echo "${ECHO_T}$ac_cv_lib_krb5_main" >&6
18476 if test $ac_cv_lib_krb5_main = yes; then
18477   have_krb5=yes
18478                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
18479 else
18480   have_krb5=no
18481 fi
18482
18483
18484
18485 cat >>confdefs.h <<\_ACEOF
18486 #define HAVE_HEIMDAL_KERBEROS 1
18487 _ACEOF
18488
18489
18490                 else
18491                         have_krb5=no
18492                         { echo "$as_me:$LINENO: WARNING: Unrecognized Kerberos5 Implementation" >&5
18493 echo "$as_me: WARNING: Unrecognized Kerberos5 Implementation" >&2;}
18494                 fi
18495
18496                 if test $have_krb5 = yes ; then
18497                         ol_link_krb5=yes
18498
18499
18500 cat >>confdefs.h <<\_ACEOF
18501 #define HAVE_KRB5 1
18502 _ACEOF
18503
18504
18505                         if test $ol_with_kerberos = k5only ; then
18506                                 ol_with_kerberos=found
18507                         fi
18508
18509                 elif test $ol_with_kerberos != auto ; then
18510                         { { echo "$as_me:$LINENO: error: Required Kerberos 5 support not available" >&5
18511 echo "$as_me: error: Required Kerberos 5 support not available" >&2;}
18512    { (exit 1); exit 1; }; }
18513                 fi
18514
18515         fi
18516         ;;
18517 esac
18518
18519 if test $ol_link_krb5 = yes &&
18520    { test $ol_with_kerberos = yes ||
18521      test $ol_with_kerberos = auto ||
18522      test $ol_with_kerberos = k425; }; then
18523
18524
18525
18526 for ac_header in kerberosIV/krb.h kerberosIV/des.h
18527 do
18528 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18529 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18530   echo "$as_me:$LINENO: checking for $ac_header" >&5
18531 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18532 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18533   echo $ECHO_N "(cached) $ECHO_C" >&6
18534 fi
18535 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18536 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18537 else
18538   # Is the header compilable?
18539 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18540 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18541 cat >conftest.$ac_ext <<_ACEOF
18542 /* confdefs.h.  */
18543 _ACEOF
18544 cat confdefs.h >>conftest.$ac_ext
18545 cat >>conftest.$ac_ext <<_ACEOF
18546 /* end confdefs.h.  */
18547 $ac_includes_default
18548 #include <$ac_header>
18549 _ACEOF
18550 rm -f conftest.$ac_objext
18551 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18552   (eval $ac_compile) 2>conftest.er1
18553   ac_status=$?
18554   grep -v '^ *+' conftest.er1 >conftest.err
18555   rm -f conftest.er1
18556   cat conftest.err >&5
18557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18558   (exit $ac_status); } &&
18559          { ac_try='test -z "$ac_c_werror_flag"
18560                          || test ! -s conftest.err'
18561   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18562   (eval $ac_try) 2>&5
18563   ac_status=$?
18564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18565   (exit $ac_status); }; } &&
18566          { ac_try='test -s conftest.$ac_objext'
18567   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18568   (eval $ac_try) 2>&5
18569   ac_status=$?
18570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18571   (exit $ac_status); }; }; then
18572   ac_header_compiler=yes
18573 else
18574   echo "$as_me: failed program was:" >&5
18575 sed 's/^/| /' conftest.$ac_ext >&5
18576
18577 ac_header_compiler=no
18578 fi
18579 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18580 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18581 echo "${ECHO_T}$ac_header_compiler" >&6
18582
18583 # Is the header present?
18584 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18585 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18586 cat >conftest.$ac_ext <<_ACEOF
18587 /* confdefs.h.  */
18588 _ACEOF
18589 cat confdefs.h >>conftest.$ac_ext
18590 cat >>conftest.$ac_ext <<_ACEOF
18591 /* end confdefs.h.  */
18592 #include <$ac_header>
18593 _ACEOF
18594 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18595   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18596   ac_status=$?
18597   grep -v '^ *+' conftest.er1 >conftest.err
18598   rm -f conftest.er1
18599   cat conftest.err >&5
18600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18601   (exit $ac_status); } >/dev/null; then
18602   if test -s conftest.err; then
18603     ac_cpp_err=$ac_c_preproc_warn_flag
18604     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18605   else
18606     ac_cpp_err=
18607   fi
18608 else
18609   ac_cpp_err=yes
18610 fi
18611 if test -z "$ac_cpp_err"; then
18612   ac_header_preproc=yes
18613 else
18614   echo "$as_me: failed program was:" >&5
18615 sed 's/^/| /' conftest.$ac_ext >&5
18616
18617   ac_header_preproc=no
18618 fi
18619 rm -f conftest.err conftest.$ac_ext
18620 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18621 echo "${ECHO_T}$ac_header_preproc" >&6
18622
18623 # So?  What about this header?
18624 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18625   yes:no: )
18626     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18627 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18628     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18629 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18630     ac_header_preproc=yes
18631     ;;
18632   no:yes:* )
18633     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18634 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18635     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18636 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18637     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18638 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18639     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18640 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18641     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18642 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18643     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18644 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18645     (
18646       cat <<\_ASBOX
18647 ## --------------------------------------------- ##
18648 ## Report this to <http://www.openldap.org/its/> ##
18649 ## --------------------------------------------- ##
18650 _ASBOX
18651     ) |
18652       sed "s/^/$as_me: WARNING:     /" >&2
18653     ;;
18654 esac
18655 echo "$as_me:$LINENO: checking for $ac_header" >&5
18656 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18657 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18658   echo $ECHO_N "(cached) $ECHO_C" >&6
18659 else
18660   eval "$as_ac_Header=\$ac_header_preproc"
18661 fi
18662 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18663 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18664
18665 fi
18666 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18667   cat >>confdefs.h <<_ACEOF
18668 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18669 _ACEOF
18670
18671 fi
18672
18673 done
18674
18675
18676         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
18677                 if test $krb5_impl = mit; then
18678                         echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
18679 echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6
18680 if test "${ac_cv_lib_krb4_main+set}" = set; then
18681   echo $ECHO_N "(cached) $ECHO_C" >&6
18682 else
18683   ac_check_lib_save_LIBS=$LIBS
18684 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
18685 cat >conftest.$ac_ext <<_ACEOF
18686 /* confdefs.h.  */
18687 _ACEOF
18688 cat confdefs.h >>conftest.$ac_ext
18689 cat >>conftest.$ac_ext <<_ACEOF
18690 /* end confdefs.h.  */
18691
18692
18693 int
18694 main ()
18695 {
18696 main ();
18697   ;
18698   return 0;
18699 }
18700 _ACEOF
18701 rm -f conftest.$ac_objext conftest$ac_exeext
18702 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18703   (eval $ac_link) 2>conftest.er1
18704   ac_status=$?
18705   grep -v '^ *+' conftest.er1 >conftest.err
18706   rm -f conftest.er1
18707   cat conftest.err >&5
18708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18709   (exit $ac_status); } &&
18710          { ac_try='test -z "$ac_c_werror_flag"
18711                          || test ! -s conftest.err'
18712   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18713   (eval $ac_try) 2>&5
18714   ac_status=$?
18715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18716   (exit $ac_status); }; } &&
18717          { ac_try='test -s conftest$ac_exeext'
18718   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18719   (eval $ac_try) 2>&5
18720   ac_status=$?
18721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18722   (exit $ac_status); }; }; then
18723   ac_cv_lib_krb4_main=yes
18724 else
18725   echo "$as_me: failed program was:" >&5
18726 sed 's/^/| /' conftest.$ac_ext >&5
18727
18728 ac_cv_lib_krb4_main=no
18729 fi
18730 rm -f conftest.err conftest.$ac_objext \
18731       conftest$ac_exeext conftest.$ac_ext
18732 LIBS=$ac_check_lib_save_LIBS
18733 fi
18734 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5
18735 echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6
18736 if test $ac_cv_lib_krb4_main = yes; then
18737   have_k425=yes
18738                                 KRB4_LIBS="-lkrb4 -ldes425"
18739 else
18740   have_k425=no
18741 fi
18742
18743
18744                 elif test $krb5_impl = heimdal; then
18745                         echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
18746 echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6
18747 if test "${ac_cv_lib_krb4_main+set}" = set; then
18748   echo $ECHO_N "(cached) $ECHO_C" >&6
18749 else
18750   ac_check_lib_save_LIBS=$LIBS
18751 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
18752 cat >conftest.$ac_ext <<_ACEOF
18753 /* confdefs.h.  */
18754 _ACEOF
18755 cat confdefs.h >>conftest.$ac_ext
18756 cat >>conftest.$ac_ext <<_ACEOF
18757 /* end confdefs.h.  */
18758
18759
18760 int
18761 main ()
18762 {
18763 main ();
18764   ;
18765   return 0;
18766 }
18767 _ACEOF
18768 rm -f conftest.$ac_objext conftest$ac_exeext
18769 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18770   (eval $ac_link) 2>conftest.er1
18771   ac_status=$?
18772   grep -v '^ *+' conftest.er1 >conftest.err
18773   rm -f conftest.er1
18774   cat conftest.err >&5
18775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18776   (exit $ac_status); } &&
18777          { ac_try='test -z "$ac_c_werror_flag"
18778                          || test ! -s conftest.err'
18779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18780   (eval $ac_try) 2>&5
18781   ac_status=$?
18782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18783   (exit $ac_status); }; } &&
18784          { ac_try='test -s conftest$ac_exeext'
18785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18786   (eval $ac_try) 2>&5
18787   ac_status=$?
18788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18789   (exit $ac_status); }; }; then
18790   ac_cv_lib_krb4_main=yes
18791 else
18792   echo "$as_me: failed program was:" >&5
18793 sed 's/^/| /' conftest.$ac_ext >&5
18794
18795 ac_cv_lib_krb4_main=no
18796 fi
18797 rm -f conftest.err conftest.$ac_objext \
18798       conftest$ac_exeext conftest.$ac_ext
18799 LIBS=$ac_check_lib_save_LIBS
18800 fi
18801 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5
18802 echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6
18803 if test $ac_cv_lib_krb4_main = yes; then
18804   have_k425=yes
18805                                 KRB4_LIBS="-lkrb4"
18806 else
18807   have_k425=no
18808 fi
18809
18810
18811                 else
18812                         have_425=no
18813                         { echo "$as_me:$LINENO: WARNING: Unrecongized Kerberos V Implementation" >&5
18814 echo "$as_me: WARNING: Unrecongized Kerberos V Implementation" >&2;}
18815                 fi
18816
18817                 if test $have_k425 = yes ; then
18818                         ol_with_kerberos=found
18819                         ol_link_krb4=yes
18820
18821
18822 cat >>confdefs.h <<\_ACEOF
18823 #define HAVE_KRB425 1
18824 _ACEOF
18825
18826
18827 cat >>confdefs.h <<\_ACEOF
18828 #define HAVE_KRB4 1
18829 _ACEOF
18830
18831
18832                         echo "$as_me:$LINENO: checking for des_debug in Kerberos libraries" >&5
18833 echo $ECHO_N "checking for des_debug in Kerberos libraries... $ECHO_C" >&6
18834 if test "${ol_cv_var_des_debug+set}" = set; then
18835   echo $ECHO_N "(cached) $ECHO_C" >&6
18836 else
18837
18838                                                                 save_LIBS="$LIBS"
18839                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
18840                                 cat >conftest.$ac_ext <<_ACEOF
18841 /* confdefs.h.  */
18842 _ACEOF
18843 cat confdefs.h >>conftest.$ac_ext
18844 cat >>conftest.$ac_ext <<_ACEOF
18845 /* end confdefs.h.  */
18846
18847 #include <kerberosIV/krb.h>
18848 #include <kerberosIV/des.h>
18849 extern int des_debug;
18850
18851 int
18852 main ()
18853 {
18854
18855 des_debug = 1;
18856
18857   ;
18858   return 0;
18859 }
18860 _ACEOF
18861 rm -f conftest.$ac_objext conftest$ac_exeext
18862 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18863   (eval $ac_link) 2>conftest.er1
18864   ac_status=$?
18865   grep -v '^ *+' conftest.er1 >conftest.err
18866   rm -f conftest.er1
18867   cat conftest.err >&5
18868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18869   (exit $ac_status); } &&
18870          { ac_try='test -z "$ac_c_werror_flag"
18871                          || test ! -s conftest.err'
18872   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18873   (eval $ac_try) 2>&5
18874   ac_status=$?
18875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18876   (exit $ac_status); }; } &&
18877          { ac_try='test -s conftest$ac_exeext'
18878   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18879   (eval $ac_try) 2>&5
18880   ac_status=$?
18881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18882   (exit $ac_status); }; }; then
18883   ol_cv_var_des_debug=yes
18884 else
18885   echo "$as_me: failed program was:" >&5
18886 sed 's/^/| /' conftest.$ac_ext >&5
18887
18888 ol_cv_var_des_debug=no
18889 fi
18890 rm -f conftest.err conftest.$ac_objext \
18891       conftest$ac_exeext conftest.$ac_ext
18892                                                                 LIBS="$save_LIBS"
18893
18894 fi
18895 echo "$as_me:$LINENO: result: $ol_cv_var_des_debug" >&5
18896 echo "${ECHO_T}$ol_cv_var_des_debug" >&6
18897
18898                         if test $ol_cv_var_des_debug = yes ; then
18899
18900 cat >>confdefs.h <<\_ACEOF
18901 #define HAVE_DES_DEBUG 1
18902 _ACEOF
18903
18904                         fi
18905
18906                         LIBS="$save_LIBS"
18907                 fi
18908         fi
18909 fi
18910
18911 if test $ol_link_krb5 = yes ; then
18912         ol_with_kerberos=found
18913 fi
18914
18915 case $ol_with_kerberos in yes | auto | k4 | kth)
18916
18917
18918
18919
18920 for ac_header in krb.h des.h krb-archaeology.h
18921 do
18922 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18923 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18924   echo "$as_me:$LINENO: checking for $ac_header" >&5
18925 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18926 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18927   echo $ECHO_N "(cached) $ECHO_C" >&6
18928 fi
18929 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18930 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18931 else
18932   # Is the header compilable?
18933 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18934 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18935 cat >conftest.$ac_ext <<_ACEOF
18936 /* confdefs.h.  */
18937 _ACEOF
18938 cat confdefs.h >>conftest.$ac_ext
18939 cat >>conftest.$ac_ext <<_ACEOF
18940 /* end confdefs.h.  */
18941 $ac_includes_default
18942 #include <$ac_header>
18943 _ACEOF
18944 rm -f conftest.$ac_objext
18945 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18946   (eval $ac_compile) 2>conftest.er1
18947   ac_status=$?
18948   grep -v '^ *+' conftest.er1 >conftest.err
18949   rm -f conftest.er1
18950   cat conftest.err >&5
18951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18952   (exit $ac_status); } &&
18953          { ac_try='test -z "$ac_c_werror_flag"
18954                          || test ! -s conftest.err'
18955   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18956   (eval $ac_try) 2>&5
18957   ac_status=$?
18958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18959   (exit $ac_status); }; } &&
18960          { ac_try='test -s conftest.$ac_objext'
18961   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18962   (eval $ac_try) 2>&5
18963   ac_status=$?
18964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18965   (exit $ac_status); }; }; then
18966   ac_header_compiler=yes
18967 else
18968   echo "$as_me: failed program was:" >&5
18969 sed 's/^/| /' conftest.$ac_ext >&5
18970
18971 ac_header_compiler=no
18972 fi
18973 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18974 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18975 echo "${ECHO_T}$ac_header_compiler" >&6
18976
18977 # Is the header present?
18978 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18979 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18980 cat >conftest.$ac_ext <<_ACEOF
18981 /* confdefs.h.  */
18982 _ACEOF
18983 cat confdefs.h >>conftest.$ac_ext
18984 cat >>conftest.$ac_ext <<_ACEOF
18985 /* end confdefs.h.  */
18986 #include <$ac_header>
18987 _ACEOF
18988 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18989   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18990   ac_status=$?
18991   grep -v '^ *+' conftest.er1 >conftest.err
18992   rm -f conftest.er1
18993   cat conftest.err >&5
18994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18995   (exit $ac_status); } >/dev/null; then
18996   if test -s conftest.err; then
18997     ac_cpp_err=$ac_c_preproc_warn_flag
18998     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18999   else
19000     ac_cpp_err=
19001   fi
19002 else
19003   ac_cpp_err=yes
19004 fi
19005 if test -z "$ac_cpp_err"; then
19006   ac_header_preproc=yes
19007 else
19008   echo "$as_me: failed program was:" >&5
19009 sed 's/^/| /' conftest.$ac_ext >&5
19010
19011   ac_header_preproc=no
19012 fi
19013 rm -f conftest.err conftest.$ac_ext
19014 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19015 echo "${ECHO_T}$ac_header_preproc" >&6
19016
19017 # So?  What about this header?
19018 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19019   yes:no: )
19020     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19021 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19022     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19023 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19024     ac_header_preproc=yes
19025     ;;
19026   no:yes:* )
19027     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19028 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19029     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19030 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19031     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19032 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19033     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19034 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19035     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19036 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19037     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19038 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19039     (
19040       cat <<\_ASBOX
19041 ## --------------------------------------------- ##
19042 ## Report this to <http://www.openldap.org/its/> ##
19043 ## --------------------------------------------- ##
19044 _ASBOX
19045     ) |
19046       sed "s/^/$as_me: WARNING:     /" >&2
19047     ;;
19048 esac
19049 echo "$as_me:$LINENO: checking for $ac_header" >&5
19050 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19051 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19052   echo $ECHO_N "(cached) $ECHO_C" >&6
19053 else
19054   eval "$as_ac_Header=\$ac_header_preproc"
19055 fi
19056 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19057 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19058
19059 fi
19060 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19061   cat >>confdefs.h <<_ACEOF
19062 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19063 _ACEOF
19064
19065 fi
19066
19067 done
19068
19069
19070         if test $ac_cv_header_krb_h = yes ; then
19071                 echo "$as_me:$LINENO: checking for main in -lkrb" >&5
19072 echo $ECHO_N "checking for main in -lkrb... $ECHO_C" >&6
19073 if test "${ac_cv_lib_krb_main+set}" = set; then
19074   echo $ECHO_N "(cached) $ECHO_C" >&6
19075 else
19076   ac_check_lib_save_LIBS=$LIBS
19077 LIBS="-lkrb -ldes $LIBS"
19078 cat >conftest.$ac_ext <<_ACEOF
19079 /* confdefs.h.  */
19080 _ACEOF
19081 cat confdefs.h >>conftest.$ac_ext
19082 cat >>conftest.$ac_ext <<_ACEOF
19083 /* end confdefs.h.  */
19084
19085
19086 int
19087 main ()
19088 {
19089 main ();
19090   ;
19091   return 0;
19092 }
19093 _ACEOF
19094 rm -f conftest.$ac_objext conftest$ac_exeext
19095 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19096   (eval $ac_link) 2>conftest.er1
19097   ac_status=$?
19098   grep -v '^ *+' conftest.er1 >conftest.err
19099   rm -f conftest.er1
19100   cat conftest.err >&5
19101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19102   (exit $ac_status); } &&
19103          { ac_try='test -z "$ac_c_werror_flag"
19104                          || test ! -s conftest.err'
19105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19106   (eval $ac_try) 2>&5
19107   ac_status=$?
19108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19109   (exit $ac_status); }; } &&
19110          { ac_try='test -s conftest$ac_exeext'
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); }; }; then
19116   ac_cv_lib_krb_main=yes
19117 else
19118   echo "$as_me: failed program was:" >&5
19119 sed 's/^/| /' conftest.$ac_ext >&5
19120
19121 ac_cv_lib_krb_main=no
19122 fi
19123 rm -f conftest.err conftest.$ac_objext \
19124       conftest$ac_exeext conftest.$ac_ext
19125 LIBS=$ac_check_lib_save_LIBS
19126 fi
19127 echo "$as_me:$LINENO: result: $ac_cv_lib_krb_main" >&5
19128 echo "${ECHO_T}$ac_cv_lib_krb_main" >&6
19129 if test $ac_cv_lib_krb_main = yes; then
19130   have_k4=yes
19131 else
19132   have_k4=no
19133 fi
19134
19135
19136                 if test $have_k4 = yes ; then
19137                         ol_with_kerberos=found
19138                         ol_link_krb4=yes
19139
19140
19141 cat >>confdefs.h <<\_ACEOF
19142 #define HAVE_KRB4 1
19143 _ACEOF
19144
19145
19146                         KRB4_LIBS="-lkrb -ldes"
19147
19148                         if test $ac_cv_header_krb_archaeology_h = yes ; then
19149
19150 cat >>confdefs.h <<\_ACEOF
19151 #define HAVE_KTH_KERBEROS 1
19152 _ACEOF
19153
19154                         fi
19155                 fi
19156         fi
19157         ;;
19158 esac
19159
19160 if test $ol_link_krb4 = yes && test $ol_enable_kbind != no ; then
19161         ol_link_kbind=yes
19162
19163 elif test $ol_enable_kbind = yes ; then
19164         { { echo "$as_me:$LINENO: error: Kerberos IV detection failed" >&5
19165 echo "$as_me: error: Kerberos IV detection failed" >&2;}
19166    { (exit 1); exit 1; }; }
19167 fi
19168
19169 if test $ol_link_krb4 = yes || test $ol_link_krb5 = yes ; then
19170
19171 cat >>confdefs.h <<\_ACEOF
19172 #define HAVE_KERBEROS 1
19173 _ACEOF
19174
19175
19176 elif test $ol_with_kerberos != auto && test $ol_with_kerberos != no ; then
19177         { { echo "$as_me:$LINENO: error: Kerberos detection failed" >&5
19178 echo "$as_me: error: Kerberos detection failed" >&2;}
19179    { (exit 1); exit 1; }; }
19180 fi
19181
19182
19183 if test $ol_with_tls = yes ; then
19184         ol_with_tls=auto
19185 fi
19186
19187 ol_link_tls=no
19188 if test $ol_with_tls = openssl || test $ol_with_tls = auto ; then
19189
19190 for ac_header in openssl/ssl.h
19191 do
19192 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19193 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19194   echo "$as_me:$LINENO: checking for $ac_header" >&5
19195 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19196 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19197   echo $ECHO_N "(cached) $ECHO_C" >&6
19198 fi
19199 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19200 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19201 else
19202   # Is the header compilable?
19203 echo "$as_me:$LINENO: checking $ac_header usability" >&5
19204 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19205 cat >conftest.$ac_ext <<_ACEOF
19206 /* confdefs.h.  */
19207 _ACEOF
19208 cat confdefs.h >>conftest.$ac_ext
19209 cat >>conftest.$ac_ext <<_ACEOF
19210 /* end confdefs.h.  */
19211 $ac_includes_default
19212 #include <$ac_header>
19213 _ACEOF
19214 rm -f conftest.$ac_objext
19215 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19216   (eval $ac_compile) 2>conftest.er1
19217   ac_status=$?
19218   grep -v '^ *+' conftest.er1 >conftest.err
19219   rm -f conftest.er1
19220   cat conftest.err >&5
19221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19222   (exit $ac_status); } &&
19223          { ac_try='test -z "$ac_c_werror_flag"
19224                          || test ! -s conftest.err'
19225   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19226   (eval $ac_try) 2>&5
19227   ac_status=$?
19228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19229   (exit $ac_status); }; } &&
19230          { ac_try='test -s conftest.$ac_objext'
19231   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19232   (eval $ac_try) 2>&5
19233   ac_status=$?
19234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19235   (exit $ac_status); }; }; then
19236   ac_header_compiler=yes
19237 else
19238   echo "$as_me: failed program was:" >&5
19239 sed 's/^/| /' conftest.$ac_ext >&5
19240
19241 ac_header_compiler=no
19242 fi
19243 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19244 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19245 echo "${ECHO_T}$ac_header_compiler" >&6
19246
19247 # Is the header present?
19248 echo "$as_me:$LINENO: checking $ac_header presence" >&5
19249 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19250 cat >conftest.$ac_ext <<_ACEOF
19251 /* confdefs.h.  */
19252 _ACEOF
19253 cat confdefs.h >>conftest.$ac_ext
19254 cat >>conftest.$ac_ext <<_ACEOF
19255 /* end confdefs.h.  */
19256 #include <$ac_header>
19257 _ACEOF
19258 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19259   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19260   ac_status=$?
19261   grep -v '^ *+' conftest.er1 >conftest.err
19262   rm -f conftest.er1
19263   cat conftest.err >&5
19264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19265   (exit $ac_status); } >/dev/null; then
19266   if test -s conftest.err; then
19267     ac_cpp_err=$ac_c_preproc_warn_flag
19268     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19269   else
19270     ac_cpp_err=
19271   fi
19272 else
19273   ac_cpp_err=yes
19274 fi
19275 if test -z "$ac_cpp_err"; then
19276   ac_header_preproc=yes
19277 else
19278   echo "$as_me: failed program was:" >&5
19279 sed 's/^/| /' conftest.$ac_ext >&5
19280
19281   ac_header_preproc=no
19282 fi
19283 rm -f conftest.err conftest.$ac_ext
19284 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19285 echo "${ECHO_T}$ac_header_preproc" >&6
19286
19287 # So?  What about this header?
19288 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19289   yes:no: )
19290     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19291 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19292     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19293 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19294     ac_header_preproc=yes
19295     ;;
19296   no:yes:* )
19297     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19298 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19299     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19300 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19301     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19302 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19303     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19304 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19305     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19306 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19307     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19308 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19309     (
19310       cat <<\_ASBOX
19311 ## --------------------------------------------- ##
19312 ## Report this to <http://www.openldap.org/its/> ##
19313 ## --------------------------------------------- ##
19314 _ASBOX
19315     ) |
19316       sed "s/^/$as_me: WARNING:     /" >&2
19317     ;;
19318 esac
19319 echo "$as_me:$LINENO: checking for $ac_header" >&5
19320 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19321 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19322   echo $ECHO_N "(cached) $ECHO_C" >&6
19323 else
19324   eval "$as_ac_Header=\$ac_header_preproc"
19325 fi
19326 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19327 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19328
19329 fi
19330 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19331   cat >>confdefs.h <<_ACEOF
19332 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19333 _ACEOF
19334
19335 fi
19336
19337 done
19338
19339
19340         if test $ac_cv_header_openssl_ssl_h = yes ; then
19341                 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
19342 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
19343 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
19344   echo $ECHO_N "(cached) $ECHO_C" >&6
19345 else
19346   ac_check_lib_save_LIBS=$LIBS
19347 LIBS="-lssl -lcrypto $LIBS"
19348 cat >conftest.$ac_ext <<_ACEOF
19349 /* confdefs.h.  */
19350 _ACEOF
19351 cat confdefs.h >>conftest.$ac_ext
19352 cat >>conftest.$ac_ext <<_ACEOF
19353 /* end confdefs.h.  */
19354
19355 /* Override any gcc2 internal prototype to avoid an error.  */
19356 #ifdef __cplusplus
19357 extern "C"
19358 #endif
19359 /* We use char because int might match the return type of a gcc2
19360    builtin and then its argument prototype would still apply.  */
19361 char SSL_library_init ();
19362 int
19363 main ()
19364 {
19365 SSL_library_init ();
19366   ;
19367   return 0;
19368 }
19369 _ACEOF
19370 rm -f conftest.$ac_objext conftest$ac_exeext
19371 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19372   (eval $ac_link) 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_exeext'
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_cv_lib_ssl_SSL_library_init=yes
19393 else
19394   echo "$as_me: failed program was:" >&5
19395 sed 's/^/| /' conftest.$ac_ext >&5
19396
19397 ac_cv_lib_ssl_SSL_library_init=no
19398 fi
19399 rm -f conftest.err conftest.$ac_objext \
19400       conftest$ac_exeext conftest.$ac_ext
19401 LIBS=$ac_check_lib_save_LIBS
19402 fi
19403 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
19404 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
19405 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
19406   have_openssl=yes
19407                         need_rsaref=no
19408 else
19409   have_openssl=no
19410 fi
19411
19412
19413                 if test $have_openssl = no ; then
19414                         echo "$as_me:$LINENO: checking for ssl3_accept in -lssl" >&5
19415 echo $ECHO_N "checking for ssl3_accept in -lssl... $ECHO_C" >&6
19416 if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then
19417   echo $ECHO_N "(cached) $ECHO_C" >&6
19418 else
19419   ac_check_lib_save_LIBS=$LIBS
19420 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
19421 cat >conftest.$ac_ext <<_ACEOF
19422 /* confdefs.h.  */
19423 _ACEOF
19424 cat confdefs.h >>conftest.$ac_ext
19425 cat >>conftest.$ac_ext <<_ACEOF
19426 /* end confdefs.h.  */
19427
19428 /* Override any gcc2 internal prototype to avoid an error.  */
19429 #ifdef __cplusplus
19430 extern "C"
19431 #endif
19432 /* We use char because int might match the return type of a gcc2
19433    builtin and then its argument prototype would still apply.  */
19434 char ssl3_accept ();
19435 int
19436 main ()
19437 {
19438 ssl3_accept ();
19439   ;
19440   return 0;
19441 }
19442 _ACEOF
19443 rm -f conftest.$ac_objext conftest$ac_exeext
19444 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19445   (eval $ac_link) 2>conftest.er1
19446   ac_status=$?
19447   grep -v '^ *+' conftest.er1 >conftest.err
19448   rm -f conftest.er1
19449   cat conftest.err >&5
19450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19451   (exit $ac_status); } &&
19452          { ac_try='test -z "$ac_c_werror_flag"
19453                          || test ! -s conftest.err'
19454   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19455   (eval $ac_try) 2>&5
19456   ac_status=$?
19457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19458   (exit $ac_status); }; } &&
19459          { ac_try='test -s conftest$ac_exeext'
19460   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19461   (eval $ac_try) 2>&5
19462   ac_status=$?
19463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19464   (exit $ac_status); }; }; then
19465   ac_cv_lib_ssl_ssl3_accept=yes
19466 else
19467   echo "$as_me: failed program was:" >&5
19468 sed 's/^/| /' conftest.$ac_ext >&5
19469
19470 ac_cv_lib_ssl_ssl3_accept=no
19471 fi
19472 rm -f conftest.err conftest.$ac_objext \
19473       conftest$ac_exeext conftest.$ac_ext
19474 LIBS=$ac_check_lib_save_LIBS
19475 fi
19476 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_ssl3_accept" >&5
19477 echo "${ECHO_T}$ac_cv_lib_ssl_ssl3_accept" >&6
19478 if test $ac_cv_lib_ssl_ssl3_accept = yes; then
19479   have_openssl=yes
19480                                 need_rsaref=yes
19481 else
19482   have_openssl=no
19483 fi
19484
19485                 fi
19486
19487                 if test $have_openssl = yes ; then
19488                         ol_with_tls=openssl
19489                         ol_link_tls=yes
19490
19491
19492 cat >>confdefs.h <<\_ACEOF
19493 #define HAVE_OPENSSL 1
19494 _ACEOF
19495
19496
19497                         if test $need_rsaref = yes; then
19498
19499 cat >>confdefs.h <<\_ACEOF
19500 #define HAVE_RSAREF 1
19501 _ACEOF
19502
19503
19504                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
19505                         else
19506                                 TLS_LIBS="-lssl -lcrypto"
19507                         fi
19508
19509                         echo "$as_me:$LINENO: checking OpenSSL library version (CRL checking capability)" >&5
19510 echo $ECHO_N "checking OpenSSL library version (CRL checking capability)... $ECHO_C" >&6
19511 if test "${ol_cv_ssl_crl_compat+set}" = set; then
19512   echo $ECHO_N "(cached) $ECHO_C" >&6
19513 else
19514
19515                 cat >conftest.$ac_ext <<_ACEOF
19516 /* confdefs.h.  */
19517 _ACEOF
19518 cat confdefs.h >>conftest.$ac_ext
19519 cat >>conftest.$ac_ext <<_ACEOF
19520 /* end confdefs.h.  */
19521
19522 #ifdef HAVE_OPENSSL_SSL_H
19523 #include <openssl/ssl.h>
19524 #endif
19525
19526 /* Require 0.9.7d+ */
19527 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
19528         char *__ssl_compat = "0.9.7d";
19529 #endif
19530
19531 _ACEOF
19532 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19533   $EGREP "__ssl_compat" >/dev/null 2>&1; then
19534   ol_cv_ssl_crl_compat=yes
19535 else
19536   ol_cv_ssl_crl_compat=no
19537 fi
19538 rm -f conftest*
19539
19540 fi
19541 echo "$as_me:$LINENO: result: $ol_cv_ssl_crl_compat" >&5
19542 echo "${ECHO_T}$ol_cv_ssl_crl_compat" >&6
19543
19544                         if test $ol_cv_ssl_crl_compat = yes ; then
19545
19546 cat >>confdefs.h <<\_ACEOF
19547 #define HAVE_OPENSSL_CRL 1
19548 _ACEOF
19549
19550                         fi
19551                 fi
19552         fi
19553 fi
19554
19555 WITH_TLS=no
19556 if test $ol_link_tls = yes ; then
19557
19558 cat >>confdefs.h <<\_ACEOF
19559 #define HAVE_TLS 1
19560 _ACEOF
19561
19562         WITH_TLS=yes
19563 elif test $ol_with_tls = auto ; then
19564         { echo "$as_me:$LINENO: WARNING: Could not locate TLS/SSL package" >&5
19565 echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;}
19566         { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5
19567 echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
19568 elif test $ol_with_tls != no ; then
19569         { { echo "$as_me:$LINENO: error: Could not locate TLS/SSL package" >&5
19570 echo "$as_me: error: Could not locate TLS/SSL package" >&2;}
19571    { (exit 1); exit 1; }; }
19572 else
19573         { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5
19574 echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
19575 fi
19576
19577 if test $ol_enable_lmpasswd != no; then
19578         if test $ol_link_tls != yes ; then
19579                 { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5
19580 echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;}
19581    { (exit 1); exit 1; }; }
19582         fi
19583
19584
19585 cat >>confdefs.h <<\_ACEOF
19586 #define SLAPD_LMHASH 1
19587 _ACEOF
19588
19589 fi
19590
19591 ol_link_threads=no
19592
19593 case $ol_with_threads in auto | yes | nt)
19594
19595
19596         echo "$as_me:$LINENO: checking for _beginthread" >&5
19597 echo $ECHO_N "checking for _beginthread... $ECHO_C" >&6
19598 if test "${ac_cv_func__beginthread+set}" = set; then
19599   echo $ECHO_N "(cached) $ECHO_C" >&6
19600 else
19601   cat >conftest.$ac_ext <<_ACEOF
19602 /* confdefs.h.  */
19603 _ACEOF
19604 cat confdefs.h >>conftest.$ac_ext
19605 cat >>conftest.$ac_ext <<_ACEOF
19606 /* end confdefs.h.  */
19607 /* Define _beginthread to an innocuous variant, in case <limits.h> declares _beginthread.
19608    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19609 #define _beginthread innocuous__beginthread
19610
19611 /* System header to define __stub macros and hopefully few prototypes,
19612     which can conflict with char _beginthread (); below.
19613     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19614     <limits.h> exists even on freestanding compilers.  */
19615
19616 #ifdef __STDC__
19617 # include <limits.h>
19618 #else
19619 # include <assert.h>
19620 #endif
19621
19622 #undef _beginthread
19623
19624 /* Override any gcc2 internal prototype to avoid an error.  */
19625 #ifdef __cplusplus
19626 extern "C"
19627 {
19628 #endif
19629 /* We use char because int might match the return type of a gcc2
19630    builtin and then its argument prototype would still apply.  */
19631 char _beginthread ();
19632 /* The GNU C library defines this for functions which it implements
19633     to always fail with ENOSYS.  Some functions are actually named
19634     something starting with __ and the normal name is an alias.  */
19635 #if defined (__stub__beginthread) || defined (__stub____beginthread)
19636 choke me
19637 #else
19638 char (*f) () = _beginthread;
19639 #endif
19640 #ifdef __cplusplus
19641 }
19642 #endif
19643
19644 int
19645 main ()
19646 {
19647 return f != _beginthread;
19648   ;
19649   return 0;
19650 }
19651 _ACEOF
19652 rm -f conftest.$ac_objext conftest$ac_exeext
19653 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19654   (eval $ac_link) 2>conftest.er1
19655   ac_status=$?
19656   grep -v '^ *+' conftest.er1 >conftest.err
19657   rm -f conftest.er1
19658   cat conftest.err >&5
19659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19660   (exit $ac_status); } &&
19661          { ac_try='test -z "$ac_c_werror_flag"
19662                          || test ! -s conftest.err'
19663   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19664   (eval $ac_try) 2>&5
19665   ac_status=$?
19666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19667   (exit $ac_status); }; } &&
19668          { ac_try='test -s conftest$ac_exeext'
19669   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19670   (eval $ac_try) 2>&5
19671   ac_status=$?
19672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19673   (exit $ac_status); }; }; then
19674   ac_cv_func__beginthread=yes
19675 else
19676   echo "$as_me: failed program was:" >&5
19677 sed 's/^/| /' conftest.$ac_ext >&5
19678
19679 ac_cv_func__beginthread=no
19680 fi
19681 rm -f conftest.err conftest.$ac_objext \
19682       conftest$ac_exeext conftest.$ac_ext
19683 fi
19684 echo "$as_me:$LINENO: result: $ac_cv_func__beginthread" >&5
19685 echo "${ECHO_T}$ac_cv_func__beginthread" >&6
19686
19687
19688         if test $ac_cv_func__beginthread = yes ; then
19689
19690 cat >>confdefs.h <<\_ACEOF
19691 #define HAVE_NT_THREADS 1
19692 _ACEOF
19693
19694                 ol_cv_nt_threads=yes
19695         fi
19696
19697
19698         if test "$ol_cv_nt_threads" = yes ; then
19699                 ol_link_threads=nt
19700                 ol_with_threads=found
19701                 ol_with_yielding_select=yes
19702
19703
19704 cat >>confdefs.h <<\_ACEOF
19705 #define HAVE_NT_SERVICE_MANAGER 1
19706 _ACEOF
19707
19708
19709 cat >>confdefs.h <<\_ACEOF
19710 #define HAVE_NT_EVENT_LOG 1
19711 _ACEOF
19712
19713         fi
19714
19715         if test $ol_with_threads = nt ; then
19716                 { { echo "$as_me:$LINENO: error: could not locate NT Threads" >&5
19717 echo "$as_me: error: could not locate NT Threads" >&2;}
19718    { (exit 1); exit 1; }; }
19719         fi
19720         ;;
19721 esac
19722
19723 case $ol_with_threads in auto | yes | posix)
19724
19725
19726 for ac_header in pthread.h
19727 do
19728 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19729 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19730   echo "$as_me:$LINENO: checking for $ac_header" >&5
19731 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19732 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19733   echo $ECHO_N "(cached) $ECHO_C" >&6
19734 fi
19735 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19736 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19737 else
19738   # Is the header compilable?
19739 echo "$as_me:$LINENO: checking $ac_header usability" >&5
19740 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19741 cat >conftest.$ac_ext <<_ACEOF
19742 /* confdefs.h.  */
19743 _ACEOF
19744 cat confdefs.h >>conftest.$ac_ext
19745 cat >>conftest.$ac_ext <<_ACEOF
19746 /* end confdefs.h.  */
19747 $ac_includes_default
19748 #include <$ac_header>
19749 _ACEOF
19750 rm -f conftest.$ac_objext
19751 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19752   (eval $ac_compile) 2>conftest.er1
19753   ac_status=$?
19754   grep -v '^ *+' conftest.er1 >conftest.err
19755   rm -f conftest.er1
19756   cat conftest.err >&5
19757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19758   (exit $ac_status); } &&
19759          { ac_try='test -z "$ac_c_werror_flag"
19760                          || test ! -s conftest.err'
19761   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19762   (eval $ac_try) 2>&5
19763   ac_status=$?
19764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19765   (exit $ac_status); }; } &&
19766          { ac_try='test -s conftest.$ac_objext'
19767   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19768   (eval $ac_try) 2>&5
19769   ac_status=$?
19770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19771   (exit $ac_status); }; }; then
19772   ac_header_compiler=yes
19773 else
19774   echo "$as_me: failed program was:" >&5
19775 sed 's/^/| /' conftest.$ac_ext >&5
19776
19777 ac_header_compiler=no
19778 fi
19779 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19780 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19781 echo "${ECHO_T}$ac_header_compiler" >&6
19782
19783 # Is the header present?
19784 echo "$as_me:$LINENO: checking $ac_header presence" >&5
19785 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19786 cat >conftest.$ac_ext <<_ACEOF
19787 /* confdefs.h.  */
19788 _ACEOF
19789 cat confdefs.h >>conftest.$ac_ext
19790 cat >>conftest.$ac_ext <<_ACEOF
19791 /* end confdefs.h.  */
19792 #include <$ac_header>
19793 _ACEOF
19794 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19795   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19796   ac_status=$?
19797   grep -v '^ *+' conftest.er1 >conftest.err
19798   rm -f conftest.er1
19799   cat conftest.err >&5
19800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19801   (exit $ac_status); } >/dev/null; then
19802   if test -s conftest.err; then
19803     ac_cpp_err=$ac_c_preproc_warn_flag
19804     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19805   else
19806     ac_cpp_err=
19807   fi
19808 else
19809   ac_cpp_err=yes
19810 fi
19811 if test -z "$ac_cpp_err"; then
19812   ac_header_preproc=yes
19813 else
19814   echo "$as_me: failed program was:" >&5
19815 sed 's/^/| /' conftest.$ac_ext >&5
19816
19817   ac_header_preproc=no
19818 fi
19819 rm -f conftest.err conftest.$ac_ext
19820 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19821 echo "${ECHO_T}$ac_header_preproc" >&6
19822
19823 # So?  What about this header?
19824 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19825   yes:no: )
19826     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19827 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19828     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19829 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19830     ac_header_preproc=yes
19831     ;;
19832   no:yes:* )
19833     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19834 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19835     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19836 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19837     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19838 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19839     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19840 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19841     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19842 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19843     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19844 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19845     (
19846       cat <<\_ASBOX
19847 ## --------------------------------------------- ##
19848 ## Report this to <http://www.openldap.org/its/> ##
19849 ## --------------------------------------------- ##
19850 _ASBOX
19851     ) |
19852       sed "s/^/$as_me: WARNING:     /" >&2
19853     ;;
19854 esac
19855 echo "$as_me:$LINENO: checking for $ac_header" >&5
19856 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19857 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19858   echo $ECHO_N "(cached) $ECHO_C" >&6
19859 else
19860   eval "$as_ac_Header=\$ac_header_preproc"
19861 fi
19862 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19863 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19864
19865 fi
19866 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19867   cat >>confdefs.h <<_ACEOF
19868 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19869 _ACEOF
19870
19871 fi
19872
19873 done
19874
19875
19876         if test $ac_cv_header_pthread_h = yes ; then
19877                 echo "$as_me:$LINENO: checking POSIX thread version" >&5
19878 echo $ECHO_N "checking POSIX thread version... $ECHO_C" >&6
19879 if test "${ol_cv_pthread_version+set}" = set; then
19880   echo $ECHO_N "(cached) $ECHO_C" >&6
19881 else
19882
19883         cat >conftest.$ac_ext <<_ACEOF
19884 /* confdefs.h.  */
19885 _ACEOF
19886 cat confdefs.h >>conftest.$ac_ext
19887 cat >>conftest.$ac_ext <<_ACEOF
19888 /* end confdefs.h.  */
19889
19890 #               include <pthread.h>
19891
19892 int
19893 main ()
19894 {
19895
19896                 int i = PTHREAD_CREATE_JOINABLE;
19897
19898   ;
19899   return 0;
19900 }
19901 _ACEOF
19902 rm -f conftest.$ac_objext
19903 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19904   (eval $ac_compile) 2>conftest.er1
19905   ac_status=$?
19906   grep -v '^ *+' conftest.er1 >conftest.err
19907   rm -f conftest.er1
19908   cat conftest.err >&5
19909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19910   (exit $ac_status); } &&
19911          { ac_try='test -z "$ac_c_werror_flag"
19912                          || test ! -s conftest.err'
19913   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19914   (eval $ac_try) 2>&5
19915   ac_status=$?
19916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19917   (exit $ac_status); }; } &&
19918          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
19924
19925         cat >conftest.$ac_ext <<_ACEOF
19926 /* confdefs.h.  */
19927 _ACEOF
19928 cat confdefs.h >>conftest.$ac_ext
19929 cat >>conftest.$ac_ext <<_ACEOF
19930 /* end confdefs.h.  */
19931 #include <pthread.h>
19932
19933 _ACEOF
19934 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19935   $EGREP "pthread_detach" >/dev/null 2>&1; then
19936   ol_cv_pthread_version=10
19937 else
19938   ol_cv_pthread_version=8
19939 fi
19940 rm -f conftest*
19941
19942 else
19943   echo "$as_me: failed program was:" >&5
19944 sed 's/^/| /' conftest.$ac_ext >&5
19945
19946
19947         cat >conftest.$ac_ext <<_ACEOF
19948 /* confdefs.h.  */
19949 _ACEOF
19950 cat confdefs.h >>conftest.$ac_ext
19951 cat >>conftest.$ac_ext <<_ACEOF
19952 /* end confdefs.h.  */
19953
19954 #               include <pthread.h>
19955 #               ifdef PTHREAD_CREATE_UNDETACHED
19956                 draft7
19957 #               endif
19958
19959 _ACEOF
19960 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19961   $EGREP "draft7" >/dev/null 2>&1; then
19962   ol_cv_pthread_version=7
19963 else
19964
19965         cat >conftest.$ac_ext <<_ACEOF
19966 /* confdefs.h.  */
19967 _ACEOF
19968 cat confdefs.h >>conftest.$ac_ext
19969 cat >>conftest.$ac_ext <<_ACEOF
19970 /* end confdefs.h.  */
19971 #include <pthread.h>
19972
19973 _ACEOF
19974 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19975   $EGREP "pthread_attr_init" >/dev/null 2>&1; then
19976   ol_cv_pthread_version=6
19977 else
19978
19979         cat >conftest.$ac_ext <<_ACEOF
19980 /* confdefs.h.  */
19981 _ACEOF
19982 cat confdefs.h >>conftest.$ac_ext
19983 cat >>conftest.$ac_ext <<_ACEOF
19984 /* end confdefs.h.  */
19985
19986 #               include <pthread.h>
19987 #ifdef          PTHREAD_MUTEX_INITIALIZER
19988                 draft5
19989 #endif
19990
19991 _ACEOF
19992 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19993   $EGREP "draft5" >/dev/null 2>&1; then
19994   ol_cv_pthread_version=5
19995 else
19996   ol_cv_pthread_version=4
19997 fi
19998 rm -f conftest*
19999
20000 fi
20001 rm -f conftest*
20002
20003 fi
20004 rm -f conftest*
20005
20006 fi
20007 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20008
20009 fi
20010 echo "$as_me:$LINENO: result: $ol_cv_pthread_version" >&5
20011 echo "${ECHO_T}$ol_cv_pthread_version" >&6
20012
20013
20014                 if test $ol_cv_pthread_version != 0 ; then
20015
20016 cat >>confdefs.h <<_ACEOF
20017 #define HAVE_PTHREADS $ol_cv_pthread_version
20018 _ACEOF
20019
20020                 else
20021                         { { echo "$as_me:$LINENO: error: unknown pthread version" >&5
20022 echo "$as_me: error: unknown pthread version" >&2;}
20023    { (exit 1); exit 1; }; }
20024                 fi
20025
20026                 # consider threads found
20027                 ol_with_threads=found
20028
20029
20030         echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5
20031 echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6
20032 if test "${ol_cv_header_linux_threads+set}" = set; then
20033   echo $ECHO_N "(cached) $ECHO_C" >&6
20034 else
20035   cat >conftest.$ac_ext <<_ACEOF
20036 /* confdefs.h.  */
20037 _ACEOF
20038 cat confdefs.h >>conftest.$ac_ext
20039 cat >>conftest.$ac_ext <<_ACEOF
20040 /* end confdefs.h.  */
20041 #include <pthread.h>
20042 _ACEOF
20043 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20044   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then
20045   ol_cv_header_linux_threads=yes
20046 else
20047   ol_cv_header_linux_threads=no
20048 fi
20049 rm -f conftest*
20050
20051
20052 fi
20053 echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5
20054 echo "${ECHO_T}$ol_cv_header_linux_threads" >&6
20055         if test $ol_cv_header_linux_threads = yes; then
20056
20057 cat >>confdefs.h <<\_ACEOF
20058 #define HAVE_LINUX_THREADS 1
20059 _ACEOF
20060
20061         fi
20062
20063
20064         echo "$as_me:$LINENO: checking for GNU Pth pthread.h" >&5
20065 echo $ECHO_N "checking for GNU Pth pthread.h... $ECHO_C" >&6
20066 if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then
20067   echo $ECHO_N "(cached) $ECHO_C" >&6
20068 else
20069   cat >conftest.$ac_ext <<_ACEOF
20070 /* confdefs.h.  */
20071 _ACEOF
20072 cat confdefs.h >>conftest.$ac_ext
20073 cat >>conftest.$ac_ext <<_ACEOF
20074 /* end confdefs.h.  */
20075 #include <pthread.h>
20076 #ifdef _POSIX_THREAD_IS_GNU_PTH
20077         __gnu_pth__;
20078 #endif
20079
20080 _ACEOF
20081 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20082   $EGREP "__gnu_pth__" >/dev/null 2>&1; then
20083   ol_cv_header_gnu_pth_pthread_h=yes
20084 else
20085   ol_cv_header_gnu_pth_pthread_h=no
20086 fi
20087 rm -f conftest*
20088
20089
20090 fi
20091 echo "$as_me:$LINENO: result: $ol_cv_header_gnu_pth_pthread_h" >&5
20092 echo "${ECHO_T}$ol_cv_header_gnu_pth_pthread_h" >&6
20093
20094
20095                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
20096
20097 for ac_header in sched.h
20098 do
20099 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20100 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20101   echo "$as_me:$LINENO: checking for $ac_header" >&5
20102 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20103 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20104   echo $ECHO_N "(cached) $ECHO_C" >&6
20105 fi
20106 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20107 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20108 else
20109   # Is the header compilable?
20110 echo "$as_me:$LINENO: checking $ac_header usability" >&5
20111 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20112 cat >conftest.$ac_ext <<_ACEOF
20113 /* confdefs.h.  */
20114 _ACEOF
20115 cat confdefs.h >>conftest.$ac_ext
20116 cat >>conftest.$ac_ext <<_ACEOF
20117 /* end confdefs.h.  */
20118 $ac_includes_default
20119 #include <$ac_header>
20120 _ACEOF
20121 rm -f conftest.$ac_objext
20122 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20123   (eval $ac_compile) 2>conftest.er1
20124   ac_status=$?
20125   grep -v '^ *+' conftest.er1 >conftest.err
20126   rm -f conftest.er1
20127   cat conftest.err >&5
20128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20129   (exit $ac_status); } &&
20130          { ac_try='test -z "$ac_c_werror_flag"
20131                          || test ! -s conftest.err'
20132   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20133   (eval $ac_try) 2>&5
20134   ac_status=$?
20135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20136   (exit $ac_status); }; } &&
20137          { ac_try='test -s conftest.$ac_objext'
20138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20139   (eval $ac_try) 2>&5
20140   ac_status=$?
20141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20142   (exit $ac_status); }; }; then
20143   ac_header_compiler=yes
20144 else
20145   echo "$as_me: failed program was:" >&5
20146 sed 's/^/| /' conftest.$ac_ext >&5
20147
20148 ac_header_compiler=no
20149 fi
20150 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20151 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20152 echo "${ECHO_T}$ac_header_compiler" >&6
20153
20154 # Is the header present?
20155 echo "$as_me:$LINENO: checking $ac_header presence" >&5
20156 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20157 cat >conftest.$ac_ext <<_ACEOF
20158 /* confdefs.h.  */
20159 _ACEOF
20160 cat confdefs.h >>conftest.$ac_ext
20161 cat >>conftest.$ac_ext <<_ACEOF
20162 /* end confdefs.h.  */
20163 #include <$ac_header>
20164 _ACEOF
20165 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20166   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20167   ac_status=$?
20168   grep -v '^ *+' conftest.er1 >conftest.err
20169   rm -f conftest.er1
20170   cat conftest.err >&5
20171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20172   (exit $ac_status); } >/dev/null; then
20173   if test -s conftest.err; then
20174     ac_cpp_err=$ac_c_preproc_warn_flag
20175     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20176   else
20177     ac_cpp_err=
20178   fi
20179 else
20180   ac_cpp_err=yes
20181 fi
20182 if test -z "$ac_cpp_err"; then
20183   ac_header_preproc=yes
20184 else
20185   echo "$as_me: failed program was:" >&5
20186 sed 's/^/| /' conftest.$ac_ext >&5
20187
20188   ac_header_preproc=no
20189 fi
20190 rm -f conftest.err conftest.$ac_ext
20191 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20192 echo "${ECHO_T}$ac_header_preproc" >&6
20193
20194 # So?  What about this header?
20195 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20196   yes:no: )
20197     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20198 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
20199     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20200 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20201     ac_header_preproc=yes
20202     ;;
20203   no:yes:* )
20204     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20205 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
20206     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
20207 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
20208     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20209 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20210     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
20211 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
20212     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20213 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
20214     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20215 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
20216     (
20217       cat <<\_ASBOX
20218 ## --------------------------------------------- ##
20219 ## Report this to <http://www.openldap.org/its/> ##
20220 ## --------------------------------------------- ##
20221 _ASBOX
20222     ) |
20223       sed "s/^/$as_me: WARNING:     /" >&2
20224     ;;
20225 esac
20226 echo "$as_me:$LINENO: checking for $ac_header" >&5
20227 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20228 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20229   echo $ECHO_N "(cached) $ECHO_C" >&6
20230 else
20231   eval "$as_ac_Header=\$ac_header_preproc"
20232 fi
20233 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20234 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20235
20236 fi
20237 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20238   cat >>confdefs.h <<_ACEOF
20239 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20240 _ACEOF
20241
20242 fi
20243
20244 done
20245
20246                 fi
20247
20248
20249                                 echo "$as_me:$LINENO: checking for pthread_create in default libraries" >&5
20250 echo $ECHO_N "checking for pthread_create in default libraries... $ECHO_C" >&6
20251 if test "${ol_cv_pthread_create+set}" = set; then
20252   echo $ECHO_N "(cached) $ECHO_C" >&6
20253 else
20254
20255                         if test "$cross_compiling" = yes; then
20256   cat >conftest.$ac_ext <<_ACEOF
20257 /* confdefs.h.  */
20258 _ACEOF
20259 cat confdefs.h >>conftest.$ac_ext
20260 cat >>conftest.$ac_ext <<_ACEOF
20261 /* end confdefs.h.  */
20262
20263 /* pthread test headers */
20264 #include <pthread.h>
20265 #if HAVE_PTHREADS < 7
20266 #include <errno.h>
20267 #endif
20268 #ifndef NULL
20269 #define NULL (void*)0
20270 #endif
20271
20272 static void *task(p)
20273         void *p;
20274 {
20275         return (void *) (p == NULL);
20276 }
20277
20278 int
20279 main ()
20280 {
20281
20282         /* pthread test function */
20283 #ifndef PTHREAD_CREATE_DETACHED
20284 #define PTHREAD_CREATE_DETACHED 1
20285 #endif
20286         pthread_t t;
20287         int status;
20288         int detach = PTHREAD_CREATE_DETACHED;
20289
20290 #if HAVE_PTHREADS > 4
20291         /* Final pthreads */
20292         pthread_attr_t attr;
20293
20294         status = pthread_attr_init(&attr);
20295         if( status ) return status;
20296
20297 #if HAVE_PTHREADS < 7
20298         status = pthread_attr_setdetachstate(&attr, &detach);
20299         if( status < 0 ) status = errno;
20300 #else
20301         status = pthread_attr_setdetachstate(&attr, detach);
20302 #endif
20303         if( status ) return status;
20304         status = pthread_create( &t, &attr, task, NULL );
20305 #if HAVE_PTHREADS < 7
20306         if( status < 0 ) status = errno;
20307 #endif
20308         if( status ) return status;
20309 #else
20310         /* Draft 4 pthreads */
20311         status = pthread_create( &t, pthread_attr_default, task, NULL );
20312         if( status ) return errno;
20313
20314         /* give thread a chance to complete */
20315         /* it should remain joinable and hence detachable */
20316         sleep( 1 );
20317
20318         status = pthread_detach( &t );
20319         if( status ) return errno;
20320 #endif
20321
20322 #ifdef HAVE_LINUX_THREADS
20323         pthread_kill_other_threads_np();
20324 #endif
20325
20326         return 0;
20327
20328   ;
20329   return 0;
20330 }
20331 _ACEOF
20332 rm -f conftest.$ac_objext conftest$ac_exeext
20333 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20334   (eval $ac_link) 2>conftest.er1
20335   ac_status=$?
20336   grep -v '^ *+' conftest.er1 >conftest.err
20337   rm -f conftest.er1
20338   cat conftest.err >&5
20339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20340   (exit $ac_status); } &&
20341          { ac_try='test -z "$ac_c_werror_flag"
20342                          || test ! -s conftest.err'
20343   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20344   (eval $ac_try) 2>&5
20345   ac_status=$?
20346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20347   (exit $ac_status); }; } &&
20348          { ac_try='test -s conftest$ac_exeext'
20349   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20350   (eval $ac_try) 2>&5
20351   ac_status=$?
20352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20353   (exit $ac_status); }; }; then
20354   ol_cv_pthread_create=yes
20355 else
20356   echo "$as_me: failed program was:" >&5
20357 sed 's/^/| /' conftest.$ac_ext >&5
20358
20359 ol_cv_pthread_create=no
20360 fi
20361 rm -f conftest.err conftest.$ac_objext \
20362       conftest$ac_exeext conftest.$ac_ext
20363 else
20364   cat >conftest.$ac_ext <<_ACEOF
20365 /* confdefs.h.  */
20366 _ACEOF
20367 cat confdefs.h >>conftest.$ac_ext
20368 cat >>conftest.$ac_ext <<_ACEOF
20369 /* end confdefs.h.  */
20370
20371 /* pthread test headers */
20372 #include <pthread.h>
20373 #if HAVE_PTHREADS < 7
20374 #include <errno.h>
20375 #endif
20376 #ifndef NULL
20377 #define NULL (void*)0
20378 #endif
20379
20380 static void *task(p)
20381         void *p;
20382 {
20383         return (void *) (p == NULL);
20384 }
20385
20386
20387 int main(argc, argv)
20388         int argc;
20389         char **argv;
20390 {
20391
20392         /* pthread test function */
20393 #ifndef PTHREAD_CREATE_DETACHED
20394 #define PTHREAD_CREATE_DETACHED 1
20395 #endif
20396         pthread_t t;
20397         int status;
20398         int detach = PTHREAD_CREATE_DETACHED;
20399
20400 #if HAVE_PTHREADS > 4
20401         /* Final pthreads */
20402         pthread_attr_t attr;
20403
20404         status = pthread_attr_init(&attr);
20405         if( status ) return status;
20406
20407 #if HAVE_PTHREADS < 7
20408         status = pthread_attr_setdetachstate(&attr, &detach);
20409         if( status < 0 ) status = errno;
20410 #else
20411         status = pthread_attr_setdetachstate(&attr, detach);
20412 #endif
20413         if( status ) return status;
20414         status = pthread_create( &t, &attr, task, NULL );
20415 #if HAVE_PTHREADS < 7
20416         if( status < 0 ) status = errno;
20417 #endif
20418         if( status ) return status;
20419 #else
20420         /* Draft 4 pthreads */
20421         status = pthread_create( &t, pthread_attr_default, task, NULL );
20422         if( status ) return errno;
20423
20424         /* give thread a chance to complete */
20425         /* it should remain joinable and hence detachable */
20426         sleep( 1 );
20427
20428         status = pthread_detach( &t );
20429         if( status ) return errno;
20430 #endif
20431
20432 #ifdef HAVE_LINUX_THREADS
20433         pthread_kill_other_threads_np();
20434 #endif
20435
20436         return 0;
20437
20438 }
20439
20440 _ACEOF
20441 rm -f conftest$ac_exeext
20442 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20443   (eval $ac_link) 2>&5
20444   ac_status=$?
20445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20446   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20447   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20448   (eval $ac_try) 2>&5
20449   ac_status=$?
20450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20451   (exit $ac_status); }; }; then
20452   ol_cv_pthread_create=yes
20453 else
20454   echo "$as_me: program exited with status $ac_status" >&5
20455 echo "$as_me: failed program was:" >&5
20456 sed 's/^/| /' conftest.$ac_ext >&5
20457
20458 ( exit $ac_status )
20459 ol_cv_pthread_create=no
20460 fi
20461 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20462 fi
20463 fi
20464 echo "$as_me:$LINENO: result: $ol_cv_pthread_create" >&5
20465 echo "${ECHO_T}$ol_cv_pthread_create" >&6
20466
20467                 if test $ol_cv_pthread_create != no ; then
20468                         ol_link_threads=posix
20469                         ol_link_pthreads=""
20470                 fi
20471
20472                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
20473 if test "$ol_link_threads" = no ; then
20474         # try -kthread
20475         echo "$as_me:$LINENO: checking for pthread link with -kthread" >&5
20476 echo $ECHO_N "checking for pthread link with -kthread... $ECHO_C" >&6
20477 if test "${ol_cv_pthread_kthread+set}" = set; then
20478   echo $ECHO_N "(cached) $ECHO_C" >&6
20479 else
20480
20481                 # save the flags
20482                 ol_LIBS="$LIBS"
20483                 LIBS="-kthread $LIBS"
20484
20485                 if test "$cross_compiling" = yes; then
20486   cat >conftest.$ac_ext <<_ACEOF
20487 /* confdefs.h.  */
20488 _ACEOF
20489 cat confdefs.h >>conftest.$ac_ext
20490 cat >>conftest.$ac_ext <<_ACEOF
20491 /* end confdefs.h.  */
20492
20493 /* pthread test headers */
20494 #include <pthread.h>
20495 #if HAVE_PTHREADS < 7
20496 #include <errno.h>
20497 #endif
20498 #ifndef NULL
20499 #define NULL (void*)0
20500 #endif
20501
20502 static void *task(p)
20503         void *p;
20504 {
20505         return (void *) (p == NULL);
20506 }
20507
20508 int
20509 main ()
20510 {
20511
20512         /* pthread test function */
20513 #ifndef PTHREAD_CREATE_DETACHED
20514 #define PTHREAD_CREATE_DETACHED 1
20515 #endif
20516         pthread_t t;
20517         int status;
20518         int detach = PTHREAD_CREATE_DETACHED;
20519
20520 #if HAVE_PTHREADS > 4
20521         /* Final pthreads */
20522         pthread_attr_t attr;
20523
20524         status = pthread_attr_init(&attr);
20525         if( status ) return status;
20526
20527 #if HAVE_PTHREADS < 7
20528         status = pthread_attr_setdetachstate(&attr, &detach);
20529         if( status < 0 ) status = errno;
20530 #else
20531         status = pthread_attr_setdetachstate(&attr, detach);
20532 #endif
20533         if( status ) return status;
20534         status = pthread_create( &t, &attr, task, NULL );
20535 #if HAVE_PTHREADS < 7
20536         if( status < 0 ) status = errno;
20537 #endif
20538         if( status ) return status;
20539 #else
20540         /* Draft 4 pthreads */
20541         status = pthread_create( &t, pthread_attr_default, task, NULL );
20542         if( status ) return errno;
20543
20544         /* give thread a chance to complete */
20545         /* it should remain joinable and hence detachable */
20546         sleep( 1 );
20547
20548         status = pthread_detach( &t );
20549         if( status ) return errno;
20550 #endif
20551
20552 #ifdef HAVE_LINUX_THREADS
20553         pthread_kill_other_threads_np();
20554 #endif
20555
20556         return 0;
20557
20558   ;
20559   return 0;
20560 }
20561 _ACEOF
20562 rm -f conftest.$ac_objext conftest$ac_exeext
20563 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20564   (eval $ac_link) 2>conftest.er1
20565   ac_status=$?
20566   grep -v '^ *+' conftest.er1 >conftest.err
20567   rm -f conftest.er1
20568   cat conftest.err >&5
20569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20570   (exit $ac_status); } &&
20571          { ac_try='test -z "$ac_c_werror_flag"
20572                          || test ! -s conftest.err'
20573   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20574   (eval $ac_try) 2>&5
20575   ac_status=$?
20576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20577   (exit $ac_status); }; } &&
20578          { ac_try='test -s conftest$ac_exeext'
20579   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20580   (eval $ac_try) 2>&5
20581   ac_status=$?
20582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20583   (exit $ac_status); }; }; then
20584   ol_cv_pthread_kthread=yes
20585 else
20586   echo "$as_me: failed program was:" >&5
20587 sed 's/^/| /' conftest.$ac_ext >&5
20588
20589 ol_cv_pthread_kthread=no
20590 fi
20591 rm -f conftest.err conftest.$ac_objext \
20592       conftest$ac_exeext conftest.$ac_ext
20593 else
20594   cat >conftest.$ac_ext <<_ACEOF
20595 /* confdefs.h.  */
20596 _ACEOF
20597 cat confdefs.h >>conftest.$ac_ext
20598 cat >>conftest.$ac_ext <<_ACEOF
20599 /* end confdefs.h.  */
20600
20601 /* pthread test headers */
20602 #include <pthread.h>
20603 #if HAVE_PTHREADS < 7
20604 #include <errno.h>
20605 #endif
20606 #ifndef NULL
20607 #define NULL (void*)0
20608 #endif
20609
20610 static void *task(p)
20611         void *p;
20612 {
20613         return (void *) (p == NULL);
20614 }
20615
20616
20617 int main(argc, argv)
20618         int argc;
20619         char **argv;
20620 {
20621
20622         /* pthread test function */
20623 #ifndef PTHREAD_CREATE_DETACHED
20624 #define PTHREAD_CREATE_DETACHED 1
20625 #endif
20626         pthread_t t;
20627         int status;
20628         int detach = PTHREAD_CREATE_DETACHED;
20629
20630 #if HAVE_PTHREADS > 4
20631         /* Final pthreads */
20632         pthread_attr_t attr;
20633
20634         status = pthread_attr_init(&attr);
20635         if( status ) return status;
20636
20637 #if HAVE_PTHREADS < 7
20638         status = pthread_attr_setdetachstate(&attr, &detach);
20639         if( status < 0 ) status = errno;
20640 #else
20641         status = pthread_attr_setdetachstate(&attr, detach);
20642 #endif
20643         if( status ) return status;
20644         status = pthread_create( &t, &attr, task, NULL );
20645 #if HAVE_PTHREADS < 7
20646         if( status < 0 ) status = errno;
20647 #endif
20648         if( status ) return status;
20649 #else
20650         /* Draft 4 pthreads */
20651         status = pthread_create( &t, pthread_attr_default, task, NULL );
20652         if( status ) return errno;
20653
20654         /* give thread a chance to complete */
20655         /* it should remain joinable and hence detachable */
20656         sleep( 1 );
20657
20658         status = pthread_detach( &t );
20659         if( status ) return errno;
20660 #endif
20661
20662 #ifdef HAVE_LINUX_THREADS
20663         pthread_kill_other_threads_np();
20664 #endif
20665
20666         return 0;
20667
20668 }
20669
20670 _ACEOF
20671 rm -f conftest$ac_exeext
20672 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20673   (eval $ac_link) 2>&5
20674   ac_status=$?
20675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20676   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20677   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20678   (eval $ac_try) 2>&5
20679   ac_status=$?
20680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20681   (exit $ac_status); }; }; then
20682   ol_cv_pthread_kthread=yes
20683 else
20684   echo "$as_me: program exited with status $ac_status" >&5
20685 echo "$as_me: failed program was:" >&5
20686 sed 's/^/| /' conftest.$ac_ext >&5
20687
20688 ( exit $ac_status )
20689 ol_cv_pthread_kthread=no
20690 fi
20691 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20692 fi
20693
20694                 # restore the LIBS
20695                 LIBS="$ol_LIBS"
20696
20697 fi
20698 echo "$as_me:$LINENO: result: $ol_cv_pthread_kthread" >&5
20699 echo "${ECHO_T}$ol_cv_pthread_kthread" >&6
20700
20701         if test $ol_cv_pthread_kthread = yes ; then
20702                 ol_link_pthreads="-kthread"
20703                 ol_link_threads=posix
20704         fi
20705 fi
20706
20707                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
20708 if test "$ol_link_threads" = no ; then
20709         # try -pthread
20710         echo "$as_me:$LINENO: checking for pthread link with -pthread" >&5
20711 echo $ECHO_N "checking for pthread link with -pthread... $ECHO_C" >&6
20712 if test "${ol_cv_pthread_pthread+set}" = set; then
20713   echo $ECHO_N "(cached) $ECHO_C" >&6
20714 else
20715
20716                 # save the flags
20717                 ol_LIBS="$LIBS"
20718                 LIBS="-pthread $LIBS"
20719
20720                 if test "$cross_compiling" = yes; then
20721   cat >conftest.$ac_ext <<_ACEOF
20722 /* confdefs.h.  */
20723 _ACEOF
20724 cat confdefs.h >>conftest.$ac_ext
20725 cat >>conftest.$ac_ext <<_ACEOF
20726 /* end confdefs.h.  */
20727
20728 /* pthread test headers */
20729 #include <pthread.h>
20730 #if HAVE_PTHREADS < 7
20731 #include <errno.h>
20732 #endif
20733 #ifndef NULL
20734 #define NULL (void*)0
20735 #endif
20736
20737 static void *task(p)
20738         void *p;
20739 {
20740         return (void *) (p == NULL);
20741 }
20742
20743 int
20744 main ()
20745 {
20746
20747         /* pthread test function */
20748 #ifndef PTHREAD_CREATE_DETACHED
20749 #define PTHREAD_CREATE_DETACHED 1
20750 #endif
20751         pthread_t t;
20752         int status;
20753         int detach = PTHREAD_CREATE_DETACHED;
20754
20755 #if HAVE_PTHREADS > 4
20756         /* Final pthreads */
20757         pthread_attr_t attr;
20758
20759         status = pthread_attr_init(&attr);
20760         if( status ) return status;
20761
20762 #if HAVE_PTHREADS < 7
20763         status = pthread_attr_setdetachstate(&attr, &detach);
20764         if( status < 0 ) status = errno;
20765 #else
20766         status = pthread_attr_setdetachstate(&attr, detach);
20767 #endif
20768         if( status ) return status;
20769         status = pthread_create( &t, &attr, task, NULL );
20770 #if HAVE_PTHREADS < 7
20771         if( status < 0 ) status = errno;
20772 #endif
20773         if( status ) return status;
20774 #else
20775         /* Draft 4 pthreads */
20776         status = pthread_create( &t, pthread_attr_default, task, NULL );
20777         if( status ) return errno;
20778
20779         /* give thread a chance to complete */
20780         /* it should remain joinable and hence detachable */
20781         sleep( 1 );
20782
20783         status = pthread_detach( &t );
20784         if( status ) return errno;
20785 #endif
20786
20787 #ifdef HAVE_LINUX_THREADS
20788         pthread_kill_other_threads_np();
20789 #endif
20790
20791         return 0;
20792
20793   ;
20794   return 0;
20795 }
20796 _ACEOF
20797 rm -f conftest.$ac_objext conftest$ac_exeext
20798 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20799   (eval $ac_link) 2>conftest.er1
20800   ac_status=$?
20801   grep -v '^ *+' conftest.er1 >conftest.err
20802   rm -f conftest.er1
20803   cat conftest.err >&5
20804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20805   (exit $ac_status); } &&
20806          { ac_try='test -z "$ac_c_werror_flag"
20807                          || test ! -s conftest.err'
20808   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20809   (eval $ac_try) 2>&5
20810   ac_status=$?
20811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20812   (exit $ac_status); }; } &&
20813          { ac_try='test -s conftest$ac_exeext'
20814   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20815   (eval $ac_try) 2>&5
20816   ac_status=$?
20817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20818   (exit $ac_status); }; }; then
20819   ol_cv_pthread_pthread=yes
20820 else
20821   echo "$as_me: failed program was:" >&5
20822 sed 's/^/| /' conftest.$ac_ext >&5
20823
20824 ol_cv_pthread_pthread=no
20825 fi
20826 rm -f conftest.err conftest.$ac_objext \
20827       conftest$ac_exeext conftest.$ac_ext
20828 else
20829   cat >conftest.$ac_ext <<_ACEOF
20830 /* confdefs.h.  */
20831 _ACEOF
20832 cat confdefs.h >>conftest.$ac_ext
20833 cat >>conftest.$ac_ext <<_ACEOF
20834 /* end confdefs.h.  */
20835
20836 /* pthread test headers */
20837 #include <pthread.h>
20838 #if HAVE_PTHREADS < 7
20839 #include <errno.h>
20840 #endif
20841 #ifndef NULL
20842 #define NULL (void*)0
20843 #endif
20844
20845 static void *task(p)
20846         void *p;
20847 {
20848         return (void *) (p == NULL);
20849 }
20850
20851
20852 int main(argc, argv)
20853         int argc;
20854         char **argv;
20855 {
20856
20857         /* pthread test function */
20858 #ifndef PTHREAD_CREATE_DETACHED
20859 #define PTHREAD_CREATE_DETACHED 1
20860 #endif
20861         pthread_t t;
20862         int status;
20863         int detach = PTHREAD_CREATE_DETACHED;
20864
20865 #if HAVE_PTHREADS > 4
20866         /* Final pthreads */
20867         pthread_attr_t attr;
20868
20869         status = pthread_attr_init(&attr);
20870         if( status ) return status;
20871
20872 #if HAVE_PTHREADS < 7
20873         status = pthread_attr_setdetachstate(&attr, &detach);
20874         if( status < 0 ) status = errno;
20875 #else
20876         status = pthread_attr_setdetachstate(&attr, detach);
20877 #endif
20878         if( status ) return status;
20879         status = pthread_create( &t, &attr, task, NULL );
20880 #if HAVE_PTHREADS < 7
20881         if( status < 0 ) status = errno;
20882 #endif
20883         if( status ) return status;
20884 #else
20885         /* Draft 4 pthreads */
20886         status = pthread_create( &t, pthread_attr_default, task, NULL );
20887         if( status ) return errno;
20888
20889         /* give thread a chance to complete */
20890         /* it should remain joinable and hence detachable */
20891         sleep( 1 );
20892
20893         status = pthread_detach( &t );
20894         if( status ) return errno;
20895 #endif
20896
20897 #ifdef HAVE_LINUX_THREADS
20898         pthread_kill_other_threads_np();
20899 #endif
20900
20901         return 0;
20902
20903 }
20904
20905 _ACEOF
20906 rm -f conftest$ac_exeext
20907 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20908   (eval $ac_link) 2>&5
20909   ac_status=$?
20910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20911   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20913   (eval $ac_try) 2>&5
20914   ac_status=$?
20915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20916   (exit $ac_status); }; }; then
20917   ol_cv_pthread_pthread=yes
20918 else
20919   echo "$as_me: program exited with status $ac_status" >&5
20920 echo "$as_me: failed program was:" >&5
20921 sed 's/^/| /' conftest.$ac_ext >&5
20922
20923 ( exit $ac_status )
20924 ol_cv_pthread_pthread=no
20925 fi
20926 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20927 fi
20928
20929                 # restore the LIBS
20930                 LIBS="$ol_LIBS"
20931
20932 fi
20933 echo "$as_me:$LINENO: result: $ol_cv_pthread_pthread" >&5
20934 echo "${ECHO_T}$ol_cv_pthread_pthread" >&6
20935
20936         if test $ol_cv_pthread_pthread = yes ; then
20937                 ol_link_pthreads="-pthread"
20938                 ol_link_threads=posix
20939         fi
20940 fi
20941
20942                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
20943 if test "$ol_link_threads" = no ; then
20944         # try -pthreads
20945         echo "$as_me:$LINENO: checking for pthread link with -pthreads" >&5
20946 echo $ECHO_N "checking for pthread link with -pthreads... $ECHO_C" >&6
20947 if test "${ol_cv_pthread_pthreads+set}" = set; then
20948   echo $ECHO_N "(cached) $ECHO_C" >&6
20949 else
20950
20951                 # save the flags
20952                 ol_LIBS="$LIBS"
20953                 LIBS="-pthreads $LIBS"
20954
20955                 if test "$cross_compiling" = yes; then
20956   cat >conftest.$ac_ext <<_ACEOF
20957 /* confdefs.h.  */
20958 _ACEOF
20959 cat confdefs.h >>conftest.$ac_ext
20960 cat >>conftest.$ac_ext <<_ACEOF
20961 /* end confdefs.h.  */
20962
20963 /* pthread test headers */
20964 #include <pthread.h>
20965 #if HAVE_PTHREADS < 7
20966 #include <errno.h>
20967 #endif
20968 #ifndef NULL
20969 #define NULL (void*)0
20970 #endif
20971
20972 static void *task(p)
20973         void *p;
20974 {
20975         return (void *) (p == NULL);
20976 }
20977
20978 int
20979 main ()
20980 {
20981
20982         /* pthread test function */
20983 #ifndef PTHREAD_CREATE_DETACHED
20984 #define PTHREAD_CREATE_DETACHED 1
20985 #endif
20986         pthread_t t;
20987         int status;
20988         int detach = PTHREAD_CREATE_DETACHED;
20989
20990 #if HAVE_PTHREADS > 4
20991         /* Final pthreads */
20992         pthread_attr_t attr;
20993
20994         status = pthread_attr_init(&attr);
20995         if( status ) return status;
20996
20997 #if HAVE_PTHREADS < 7
20998         status = pthread_attr_setdetachstate(&attr, &detach);
20999         if( status < 0 ) status = errno;
21000 #else
21001         status = pthread_attr_setdetachstate(&attr, detach);
21002 #endif
21003         if( status ) return status;
21004         status = pthread_create( &t, &attr, task, NULL );
21005 #if HAVE_PTHREADS < 7
21006         if( status < 0 ) status = errno;
21007 #endif
21008         if( status ) return status;
21009 #else
21010         /* Draft 4 pthreads */
21011         status = pthread_create( &t, pthread_attr_default, task, NULL );
21012         if( status ) return errno;
21013
21014         /* give thread a chance to complete */
21015         /* it should remain joinable and hence detachable */
21016         sleep( 1 );
21017
21018         status = pthread_detach( &t );
21019         if( status ) return errno;
21020 #endif
21021
21022 #ifdef HAVE_LINUX_THREADS
21023         pthread_kill_other_threads_np();
21024 #endif
21025
21026         return 0;
21027
21028   ;
21029   return 0;
21030 }
21031 _ACEOF
21032 rm -f conftest.$ac_objext conftest$ac_exeext
21033 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21034   (eval $ac_link) 2>conftest.er1
21035   ac_status=$?
21036   grep -v '^ *+' conftest.er1 >conftest.err
21037   rm -f conftest.er1
21038   cat conftest.err >&5
21039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21040   (exit $ac_status); } &&
21041          { ac_try='test -z "$ac_c_werror_flag"
21042                          || test ! -s conftest.err'
21043   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21044   (eval $ac_try) 2>&5
21045   ac_status=$?
21046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21047   (exit $ac_status); }; } &&
21048          { ac_try='test -s conftest$ac_exeext'
21049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21050   (eval $ac_try) 2>&5
21051   ac_status=$?
21052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21053   (exit $ac_status); }; }; then
21054   ol_cv_pthread_pthreads=yes
21055 else
21056   echo "$as_me: failed program was:" >&5
21057 sed 's/^/| /' conftest.$ac_ext >&5
21058
21059 ol_cv_pthread_pthreads=no
21060 fi
21061 rm -f conftest.err conftest.$ac_objext \
21062       conftest$ac_exeext conftest.$ac_ext
21063 else
21064   cat >conftest.$ac_ext <<_ACEOF
21065 /* confdefs.h.  */
21066 _ACEOF
21067 cat confdefs.h >>conftest.$ac_ext
21068 cat >>conftest.$ac_ext <<_ACEOF
21069 /* end confdefs.h.  */
21070
21071 /* pthread test headers */
21072 #include <pthread.h>
21073 #if HAVE_PTHREADS < 7
21074 #include <errno.h>
21075 #endif
21076 #ifndef NULL
21077 #define NULL (void*)0
21078 #endif
21079
21080 static void *task(p)
21081         void *p;
21082 {
21083         return (void *) (p == NULL);
21084 }
21085
21086
21087 int main(argc, argv)
21088         int argc;
21089         char **argv;
21090 {
21091
21092         /* pthread test function */
21093 #ifndef PTHREAD_CREATE_DETACHED
21094 #define PTHREAD_CREATE_DETACHED 1
21095 #endif
21096         pthread_t t;
21097         int status;
21098         int detach = PTHREAD_CREATE_DETACHED;
21099
21100 #if HAVE_PTHREADS > 4
21101         /* Final pthreads */
21102         pthread_attr_t attr;
21103
21104         status = pthread_attr_init(&attr);
21105         if( status ) return status;
21106
21107 #if HAVE_PTHREADS < 7
21108         status = pthread_attr_setdetachstate(&attr, &detach);
21109         if( status < 0 ) status = errno;
21110 #else
21111         status = pthread_attr_setdetachstate(&attr, detach);
21112 #endif
21113         if( status ) return status;
21114         status = pthread_create( &t, &attr, task, NULL );
21115 #if HAVE_PTHREADS < 7
21116         if( status < 0 ) status = errno;
21117 #endif
21118         if( status ) return status;
21119 #else
21120         /* Draft 4 pthreads */
21121         status = pthread_create( &t, pthread_attr_default, task, NULL );
21122         if( status ) return errno;
21123
21124         /* give thread a chance to complete */
21125         /* it should remain joinable and hence detachable */
21126         sleep( 1 );
21127
21128         status = pthread_detach( &t );
21129         if( status ) return errno;
21130 #endif
21131
21132 #ifdef HAVE_LINUX_THREADS
21133         pthread_kill_other_threads_np();
21134 #endif
21135
21136         return 0;
21137
21138 }
21139
21140 _ACEOF
21141 rm -f conftest$ac_exeext
21142 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21143   (eval $ac_link) 2>&5
21144   ac_status=$?
21145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21146   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21147   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21148   (eval $ac_try) 2>&5
21149   ac_status=$?
21150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21151   (exit $ac_status); }; }; then
21152   ol_cv_pthread_pthreads=yes
21153 else
21154   echo "$as_me: program exited with status $ac_status" >&5
21155 echo "$as_me: failed program was:" >&5
21156 sed 's/^/| /' conftest.$ac_ext >&5
21157
21158 ( exit $ac_status )
21159 ol_cv_pthread_pthreads=no
21160 fi
21161 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21162 fi
21163
21164                 # restore the LIBS
21165                 LIBS="$ol_LIBS"
21166
21167 fi
21168 echo "$as_me:$LINENO: result: $ol_cv_pthread_pthreads" >&5
21169 echo "${ECHO_T}$ol_cv_pthread_pthreads" >&6
21170
21171         if test $ol_cv_pthread_pthreads = yes ; then
21172                 ol_link_pthreads="-pthreads"
21173                 ol_link_threads=posix
21174         fi
21175 fi
21176
21177                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
21178 if test "$ol_link_threads" = no ; then
21179         # try -mthreads
21180         echo "$as_me:$LINENO: checking for pthread link with -mthreads" >&5
21181 echo $ECHO_N "checking for pthread link with -mthreads... $ECHO_C" >&6
21182 if test "${ol_cv_pthread_mthreads+set}" = set; then
21183   echo $ECHO_N "(cached) $ECHO_C" >&6
21184 else
21185
21186                 # save the flags
21187                 ol_LIBS="$LIBS"
21188                 LIBS="-mthreads $LIBS"
21189
21190                 if test "$cross_compiling" = yes; then
21191   cat >conftest.$ac_ext <<_ACEOF
21192 /* confdefs.h.  */
21193 _ACEOF
21194 cat confdefs.h >>conftest.$ac_ext
21195 cat >>conftest.$ac_ext <<_ACEOF
21196 /* end confdefs.h.  */
21197
21198 /* pthread test headers */
21199 #include <pthread.h>
21200 #if HAVE_PTHREADS < 7
21201 #include <errno.h>
21202 #endif
21203 #ifndef NULL
21204 #define NULL (void*)0
21205 #endif
21206
21207 static void *task(p)
21208         void *p;
21209 {
21210         return (void *) (p == NULL);
21211 }
21212
21213 int
21214 main ()
21215 {
21216
21217         /* pthread test function */
21218 #ifndef PTHREAD_CREATE_DETACHED
21219 #define PTHREAD_CREATE_DETACHED 1
21220 #endif
21221         pthread_t t;
21222         int status;
21223         int detach = PTHREAD_CREATE_DETACHED;
21224
21225 #if HAVE_PTHREADS > 4
21226         /* Final pthreads */
21227         pthread_attr_t attr;
21228
21229         status = pthread_attr_init(&attr);
21230         if( status ) return status;
21231
21232 #if HAVE_PTHREADS < 7
21233         status = pthread_attr_setdetachstate(&attr, &detach);
21234         if( status < 0 ) status = errno;
21235 #else
21236         status = pthread_attr_setdetachstate(&attr, detach);
21237 #endif
21238         if( status ) return status;
21239         status = pthread_create( &t, &attr, task, NULL );
21240 #if HAVE_PTHREADS < 7
21241         if( status < 0 ) status = errno;
21242 #endif
21243         if( status ) return status;
21244 #else
21245         /* Draft 4 pthreads */
21246         status = pthread_create( &t, pthread_attr_default, task, NULL );
21247         if( status ) return errno;
21248
21249         /* give thread a chance to complete */
21250         /* it should remain joinable and hence detachable */
21251         sleep( 1 );
21252
21253         status = pthread_detach( &t );
21254         if( status ) return errno;
21255 #endif
21256
21257 #ifdef HAVE_LINUX_THREADS
21258         pthread_kill_other_threads_np();
21259 #endif
21260
21261         return 0;
21262
21263   ;
21264   return 0;
21265 }
21266 _ACEOF
21267 rm -f conftest.$ac_objext conftest$ac_exeext
21268 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21269   (eval $ac_link) 2>conftest.er1
21270   ac_status=$?
21271   grep -v '^ *+' conftest.er1 >conftest.err
21272   rm -f conftest.er1
21273   cat conftest.err >&5
21274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21275   (exit $ac_status); } &&
21276          { ac_try='test -z "$ac_c_werror_flag"
21277                          || test ! -s conftest.err'
21278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21279   (eval $ac_try) 2>&5
21280   ac_status=$?
21281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21282   (exit $ac_status); }; } &&
21283          { ac_try='test -s conftest$ac_exeext'
21284   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21285   (eval $ac_try) 2>&5
21286   ac_status=$?
21287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21288   (exit $ac_status); }; }; then
21289   ol_cv_pthread_mthreads=yes
21290 else
21291   echo "$as_me: failed program was:" >&5
21292 sed 's/^/| /' conftest.$ac_ext >&5
21293
21294 ol_cv_pthread_mthreads=no
21295 fi
21296 rm -f conftest.err conftest.$ac_objext \
21297       conftest$ac_exeext conftest.$ac_ext
21298 else
21299   cat >conftest.$ac_ext <<_ACEOF
21300 /* confdefs.h.  */
21301 _ACEOF
21302 cat confdefs.h >>conftest.$ac_ext
21303 cat >>conftest.$ac_ext <<_ACEOF
21304 /* end confdefs.h.  */
21305
21306 /* pthread test headers */
21307 #include <pthread.h>
21308 #if HAVE_PTHREADS < 7
21309 #include <errno.h>
21310 #endif
21311 #ifndef NULL
21312 #define NULL (void*)0
21313 #endif
21314
21315 static void *task(p)
21316         void *p;
21317 {
21318         return (void *) (p == NULL);
21319 }
21320
21321
21322 int main(argc, argv)
21323         int argc;
21324         char **argv;
21325 {
21326
21327         /* pthread test function */
21328 #ifndef PTHREAD_CREATE_DETACHED
21329 #define PTHREAD_CREATE_DETACHED 1
21330 #endif
21331         pthread_t t;
21332         int status;
21333         int detach = PTHREAD_CREATE_DETACHED;
21334
21335 #if HAVE_PTHREADS > 4
21336         /* Final pthreads */
21337         pthread_attr_t attr;
21338
21339         status = pthread_attr_init(&attr);
21340         if( status ) return status;
21341
21342 #if HAVE_PTHREADS < 7
21343         status = pthread_attr_setdetachstate(&attr, &detach);
21344         if( status < 0 ) status = errno;
21345 #else
21346         status = pthread_attr_setdetachstate(&attr, detach);
21347 #endif
21348         if( status ) return status;
21349         status = pthread_create( &t, &attr, task, NULL );
21350 #if HAVE_PTHREADS < 7
21351         if( status < 0 ) status = errno;
21352 #endif
21353         if( status ) return status;
21354 #else
21355         /* Draft 4 pthreads */
21356         status = pthread_create( &t, pthread_attr_default, task, NULL );
21357         if( status ) return errno;
21358
21359         /* give thread a chance to complete */
21360         /* it should remain joinable and hence detachable */
21361         sleep( 1 );
21362
21363         status = pthread_detach( &t );
21364         if( status ) return errno;
21365 #endif
21366
21367 #ifdef HAVE_LINUX_THREADS
21368         pthread_kill_other_threads_np();
21369 #endif
21370
21371         return 0;
21372
21373 }
21374
21375 _ACEOF
21376 rm -f conftest$ac_exeext
21377 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21378   (eval $ac_link) 2>&5
21379   ac_status=$?
21380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21381   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21382   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21383   (eval $ac_try) 2>&5
21384   ac_status=$?
21385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21386   (exit $ac_status); }; }; then
21387   ol_cv_pthread_mthreads=yes
21388 else
21389   echo "$as_me: program exited with status $ac_status" >&5
21390 echo "$as_me: failed program was:" >&5
21391 sed 's/^/| /' conftest.$ac_ext >&5
21392
21393 ( exit $ac_status )
21394 ol_cv_pthread_mthreads=no
21395 fi
21396 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21397 fi
21398
21399                 # restore the LIBS
21400                 LIBS="$ol_LIBS"
21401
21402 fi
21403 echo "$as_me:$LINENO: result: $ol_cv_pthread_mthreads" >&5
21404 echo "${ECHO_T}$ol_cv_pthread_mthreads" >&6
21405
21406         if test $ol_cv_pthread_mthreads = yes ; then
21407                 ol_link_pthreads="-mthreads"
21408                 ol_link_threads=posix
21409         fi
21410 fi
21411
21412                 # Pthread try link: -thread (ol_cv_pthread_thread)
21413 if test "$ol_link_threads" = no ; then
21414         # try -thread
21415         echo "$as_me:$LINENO: checking for pthread link with -thread" >&5
21416 echo $ECHO_N "checking for pthread link with -thread... $ECHO_C" >&6
21417 if test "${ol_cv_pthread_thread+set}" = set; then
21418   echo $ECHO_N "(cached) $ECHO_C" >&6
21419 else
21420
21421                 # save the flags
21422                 ol_LIBS="$LIBS"
21423                 LIBS="-thread $LIBS"
21424
21425                 if test "$cross_compiling" = yes; then
21426   cat >conftest.$ac_ext <<_ACEOF
21427 /* confdefs.h.  */
21428 _ACEOF
21429 cat confdefs.h >>conftest.$ac_ext
21430 cat >>conftest.$ac_ext <<_ACEOF
21431 /* end confdefs.h.  */
21432
21433 /* pthread test headers */
21434 #include <pthread.h>
21435 #if HAVE_PTHREADS < 7
21436 #include <errno.h>
21437 #endif
21438 #ifndef NULL
21439 #define NULL (void*)0
21440 #endif
21441
21442 static void *task(p)
21443         void *p;
21444 {
21445         return (void *) (p == NULL);
21446 }
21447
21448 int
21449 main ()
21450 {
21451
21452         /* pthread test function */
21453 #ifndef PTHREAD_CREATE_DETACHED
21454 #define PTHREAD_CREATE_DETACHED 1
21455 #endif
21456         pthread_t t;
21457         int status;
21458         int detach = PTHREAD_CREATE_DETACHED;
21459
21460 #if HAVE_PTHREADS > 4
21461         /* Final pthreads */
21462         pthread_attr_t attr;
21463
21464         status = pthread_attr_init(&attr);
21465         if( status ) return status;
21466
21467 #if HAVE_PTHREADS < 7
21468         status = pthread_attr_setdetachstate(&attr, &detach);
21469         if( status < 0 ) status = errno;
21470 #else
21471         status = pthread_attr_setdetachstate(&attr, detach);
21472 #endif
21473         if( status ) return status;
21474         status = pthread_create( &t, &attr, task, NULL );
21475 #if HAVE_PTHREADS < 7
21476         if( status < 0 ) status = errno;
21477 #endif
21478         if( status ) return status;
21479 #else
21480         /* Draft 4 pthreads */
21481         status = pthread_create( &t, pthread_attr_default, task, NULL );
21482         if( status ) return errno;
21483
21484         /* give thread a chance to complete */
21485         /* it should remain joinable and hence detachable */
21486         sleep( 1 );
21487
21488         status = pthread_detach( &t );
21489         if( status ) return errno;
21490 #endif
21491
21492 #ifdef HAVE_LINUX_THREADS
21493         pthread_kill_other_threads_np();
21494 #endif
21495
21496         return 0;
21497
21498   ;
21499   return 0;
21500 }
21501 _ACEOF
21502 rm -f conftest.$ac_objext conftest$ac_exeext
21503 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21504   (eval $ac_link) 2>conftest.er1
21505   ac_status=$?
21506   grep -v '^ *+' conftest.er1 >conftest.err
21507   rm -f conftest.er1
21508   cat conftest.err >&5
21509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21510   (exit $ac_status); } &&
21511          { ac_try='test -z "$ac_c_werror_flag"
21512                          || test ! -s conftest.err'
21513   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21514   (eval $ac_try) 2>&5
21515   ac_status=$?
21516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21517   (exit $ac_status); }; } &&
21518          { ac_try='test -s conftest$ac_exeext'
21519   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21520   (eval $ac_try) 2>&5
21521   ac_status=$?
21522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21523   (exit $ac_status); }; }; then
21524   ol_cv_pthread_thread=yes
21525 else
21526   echo "$as_me: failed program was:" >&5
21527 sed 's/^/| /' conftest.$ac_ext >&5
21528
21529 ol_cv_pthread_thread=no
21530 fi
21531 rm -f conftest.err conftest.$ac_objext \
21532       conftest$ac_exeext conftest.$ac_ext
21533 else
21534   cat >conftest.$ac_ext <<_ACEOF
21535 /* confdefs.h.  */
21536 _ACEOF
21537 cat confdefs.h >>conftest.$ac_ext
21538 cat >>conftest.$ac_ext <<_ACEOF
21539 /* end confdefs.h.  */
21540
21541 /* pthread test headers */
21542 #include <pthread.h>
21543 #if HAVE_PTHREADS < 7
21544 #include <errno.h>
21545 #endif
21546 #ifndef NULL
21547 #define NULL (void*)0
21548 #endif
21549
21550 static void *task(p)
21551         void *p;
21552 {
21553         return (void *) (p == NULL);
21554 }
21555
21556
21557 int main(argc, argv)
21558         int argc;
21559         char **argv;
21560 {
21561
21562         /* pthread test function */
21563 #ifndef PTHREAD_CREATE_DETACHED
21564 #define PTHREAD_CREATE_DETACHED 1
21565 #endif
21566         pthread_t t;
21567         int status;
21568         int detach = PTHREAD_CREATE_DETACHED;
21569
21570 #if HAVE_PTHREADS > 4
21571         /* Final pthreads */
21572         pthread_attr_t attr;
21573
21574         status = pthread_attr_init(&attr);
21575         if( status ) return status;
21576
21577 #if HAVE_PTHREADS < 7
21578         status = pthread_attr_setdetachstate(&attr, &detach);
21579         if( status < 0 ) status = errno;
21580 #else
21581         status = pthread_attr_setdetachstate(&attr, detach);
21582 #endif
21583         if( status ) return status;
21584         status = pthread_create( &t, &attr, task, NULL );
21585 #if HAVE_PTHREADS < 7
21586         if( status < 0 ) status = errno;
21587 #endif
21588         if( status ) return status;
21589 #else
21590         /* Draft 4 pthreads */
21591         status = pthread_create( &t, pthread_attr_default, task, NULL );
21592         if( status ) return errno;
21593
21594         /* give thread a chance to complete */
21595         /* it should remain joinable and hence detachable */
21596         sleep( 1 );
21597
21598         status = pthread_detach( &t );
21599         if( status ) return errno;
21600 #endif
21601
21602 #ifdef HAVE_LINUX_THREADS
21603         pthread_kill_other_threads_np();
21604 #endif
21605
21606         return 0;
21607
21608 }
21609
21610 _ACEOF
21611 rm -f conftest$ac_exeext
21612 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21613   (eval $ac_link) 2>&5
21614   ac_status=$?
21615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21616   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21617   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21618   (eval $ac_try) 2>&5
21619   ac_status=$?
21620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21621   (exit $ac_status); }; }; then
21622   ol_cv_pthread_thread=yes
21623 else
21624   echo "$as_me: program exited with status $ac_status" >&5
21625 echo "$as_me: failed program was:" >&5
21626 sed 's/^/| /' conftest.$ac_ext >&5
21627
21628 ( exit $ac_status )
21629 ol_cv_pthread_thread=no
21630 fi
21631 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21632 fi
21633
21634                 # restore the LIBS
21635                 LIBS="$ol_LIBS"
21636
21637 fi
21638 echo "$as_me:$LINENO: result: $ol_cv_pthread_thread" >&5
21639 echo "${ECHO_T}$ol_cv_pthread_thread" >&6
21640
21641         if test $ol_cv_pthread_thread = yes ; then
21642                 ol_link_pthreads="-thread"
21643                 ol_link_threads=posix
21644         fi
21645 fi
21646
21647
21648                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
21649 if test "$ol_link_threads" = no ; then
21650         # try -lpthread -lmach -lexc -lc_r
21651         echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
21652 echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc -lc_r... $ECHO_C" >&6
21653 if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then
21654   echo $ECHO_N "(cached) $ECHO_C" >&6
21655 else
21656
21657                 # save the flags
21658                 ol_LIBS="$LIBS"
21659                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
21660
21661                 if test "$cross_compiling" = yes; then
21662   cat >conftest.$ac_ext <<_ACEOF
21663 /* confdefs.h.  */
21664 _ACEOF
21665 cat confdefs.h >>conftest.$ac_ext
21666 cat >>conftest.$ac_ext <<_ACEOF
21667 /* end confdefs.h.  */
21668
21669 /* pthread test headers */
21670 #include <pthread.h>
21671 #if HAVE_PTHREADS < 7
21672 #include <errno.h>
21673 #endif
21674 #ifndef NULL
21675 #define NULL (void*)0
21676 #endif
21677
21678 static void *task(p)
21679         void *p;
21680 {
21681         return (void *) (p == NULL);
21682 }
21683
21684 int
21685 main ()
21686 {
21687
21688         /* pthread test function */
21689 #ifndef PTHREAD_CREATE_DETACHED
21690 #define PTHREAD_CREATE_DETACHED 1
21691 #endif
21692         pthread_t t;
21693         int status;
21694         int detach = PTHREAD_CREATE_DETACHED;
21695
21696 #if HAVE_PTHREADS > 4
21697         /* Final pthreads */
21698         pthread_attr_t attr;
21699
21700         status = pthread_attr_init(&attr);
21701         if( status ) return status;
21702
21703 #if HAVE_PTHREADS < 7
21704         status = pthread_attr_setdetachstate(&attr, &detach);
21705         if( status < 0 ) status = errno;
21706 #else
21707         status = pthread_attr_setdetachstate(&attr, detach);
21708 #endif
21709         if( status ) return status;
21710         status = pthread_create( &t, &attr, task, NULL );
21711 #if HAVE_PTHREADS < 7
21712         if( status < 0 ) status = errno;
21713 #endif
21714         if( status ) return status;
21715 #else
21716         /* Draft 4 pthreads */
21717         status = pthread_create( &t, pthread_attr_default, task, NULL );
21718         if( status ) return errno;
21719
21720         /* give thread a chance to complete */
21721         /* it should remain joinable and hence detachable */
21722         sleep( 1 );
21723
21724         status = pthread_detach( &t );
21725         if( status ) return errno;
21726 #endif
21727
21728 #ifdef HAVE_LINUX_THREADS
21729         pthread_kill_other_threads_np();
21730 #endif
21731
21732         return 0;
21733
21734   ;
21735   return 0;
21736 }
21737 _ACEOF
21738 rm -f conftest.$ac_objext conftest$ac_exeext
21739 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21740   (eval $ac_link) 2>conftest.er1
21741   ac_status=$?
21742   grep -v '^ *+' conftest.er1 >conftest.err
21743   rm -f conftest.er1
21744   cat conftest.err >&5
21745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21746   (exit $ac_status); } &&
21747          { ac_try='test -z "$ac_c_werror_flag"
21748                          || test ! -s conftest.err'
21749   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21750   (eval $ac_try) 2>&5
21751   ac_status=$?
21752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21753   (exit $ac_status); }; } &&
21754          { ac_try='test -s conftest$ac_exeext'
21755   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21756   (eval $ac_try) 2>&5
21757   ac_status=$?
21758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21759   (exit $ac_status); }; }; then
21760   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
21761 else
21762   echo "$as_me: failed program was:" >&5
21763 sed 's/^/| /' conftest.$ac_ext >&5
21764
21765 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
21766 fi
21767 rm -f conftest.err conftest.$ac_objext \
21768       conftest$ac_exeext conftest.$ac_ext
21769 else
21770   cat >conftest.$ac_ext <<_ACEOF
21771 /* confdefs.h.  */
21772 _ACEOF
21773 cat confdefs.h >>conftest.$ac_ext
21774 cat >>conftest.$ac_ext <<_ACEOF
21775 /* end confdefs.h.  */
21776
21777 /* pthread test headers */
21778 #include <pthread.h>
21779 #if HAVE_PTHREADS < 7
21780 #include <errno.h>
21781 #endif
21782 #ifndef NULL
21783 #define NULL (void*)0
21784 #endif
21785
21786 static void *task(p)
21787         void *p;
21788 {
21789         return (void *) (p == NULL);
21790 }
21791
21792
21793 int main(argc, argv)
21794         int argc;
21795         char **argv;
21796 {
21797
21798         /* pthread test function */
21799 #ifndef PTHREAD_CREATE_DETACHED
21800 #define PTHREAD_CREATE_DETACHED 1
21801 #endif
21802         pthread_t t;
21803         int status;
21804         int detach = PTHREAD_CREATE_DETACHED;
21805
21806 #if HAVE_PTHREADS > 4
21807         /* Final pthreads */
21808         pthread_attr_t attr;
21809
21810         status = pthread_attr_init(&attr);
21811         if( status ) return status;
21812
21813 #if HAVE_PTHREADS < 7
21814         status = pthread_attr_setdetachstate(&attr, &detach);
21815         if( status < 0 ) status = errno;
21816 #else
21817         status = pthread_attr_setdetachstate(&attr, detach);
21818 #endif
21819         if( status ) return status;
21820         status = pthread_create( &t, &attr, task, NULL );
21821 #if HAVE_PTHREADS < 7
21822         if( status < 0 ) status = errno;
21823 #endif
21824         if( status ) return status;
21825 #else
21826         /* Draft 4 pthreads */
21827         status = pthread_create( &t, pthread_attr_default, task, NULL );
21828         if( status ) return errno;
21829
21830         /* give thread a chance to complete */
21831         /* it should remain joinable and hence detachable */
21832         sleep( 1 );
21833
21834         status = pthread_detach( &t );
21835         if( status ) return errno;
21836 #endif
21837
21838 #ifdef HAVE_LINUX_THREADS
21839         pthread_kill_other_threads_np();
21840 #endif
21841
21842         return 0;
21843
21844 }
21845
21846 _ACEOF
21847 rm -f conftest$ac_exeext
21848 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21849   (eval $ac_link) 2>&5
21850   ac_status=$?
21851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21852   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21853   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21854   (eval $ac_try) 2>&5
21855   ac_status=$?
21856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21857   (exit $ac_status); }; }; then
21858   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
21859 else
21860   echo "$as_me: program exited with status $ac_status" >&5
21861 echo "$as_me: failed program was:" >&5
21862 sed 's/^/| /' conftest.$ac_ext >&5
21863
21864 ( exit $ac_status )
21865 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
21866 fi
21867 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21868 fi
21869
21870                 # restore the LIBS
21871                 LIBS="$ol_LIBS"
21872
21873 fi
21874 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
21875 echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6
21876
21877         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
21878                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
21879                 ol_link_threads=posix
21880         fi
21881 fi
21882
21883                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
21884 if test "$ol_link_threads" = no ; then
21885         # try -lpthread -lmach -lexc
21886         echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc" >&5
21887 echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc... $ECHO_C" >&6
21888 if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then
21889   echo $ECHO_N "(cached) $ECHO_C" >&6
21890 else
21891
21892                 # save the flags
21893                 ol_LIBS="$LIBS"
21894                 LIBS="-lpthread -lmach -lexc $LIBS"
21895
21896                 if test "$cross_compiling" = yes; then
21897   cat >conftest.$ac_ext <<_ACEOF
21898 /* confdefs.h.  */
21899 _ACEOF
21900 cat confdefs.h >>conftest.$ac_ext
21901 cat >>conftest.$ac_ext <<_ACEOF
21902 /* end confdefs.h.  */
21903
21904 /* pthread test headers */
21905 #include <pthread.h>
21906 #if HAVE_PTHREADS < 7
21907 #include <errno.h>
21908 #endif
21909 #ifndef NULL
21910 #define NULL (void*)0
21911 #endif
21912
21913 static void *task(p)
21914         void *p;
21915 {
21916         return (void *) (p == NULL);
21917 }
21918
21919 int
21920 main ()
21921 {
21922
21923         /* pthread test function */
21924 #ifndef PTHREAD_CREATE_DETACHED
21925 #define PTHREAD_CREATE_DETACHED 1
21926 #endif
21927         pthread_t t;
21928         int status;
21929         int detach = PTHREAD_CREATE_DETACHED;
21930
21931 #if HAVE_PTHREADS > 4
21932         /* Final pthreads */
21933         pthread_attr_t attr;
21934
21935         status = pthread_attr_init(&attr);
21936         if( status ) return status;
21937
21938 #if HAVE_PTHREADS < 7
21939         status = pthread_attr_setdetachstate(&attr, &detach);
21940         if( status < 0 ) status = errno;
21941 #else
21942         status = pthread_attr_setdetachstate(&attr, detach);
21943 #endif
21944         if( status ) return status;
21945         status = pthread_create( &t, &attr, task, NULL );
21946 #if HAVE_PTHREADS < 7
21947         if( status < 0 ) status = errno;
21948 #endif
21949         if( status ) return status;
21950 #else
21951         /* Draft 4 pthreads */
21952         status = pthread_create( &t, pthread_attr_default, task, NULL );
21953         if( status ) return errno;
21954
21955         /* give thread a chance to complete */
21956         /* it should remain joinable and hence detachable */
21957         sleep( 1 );
21958
21959         status = pthread_detach( &t );
21960         if( status ) return errno;
21961 #endif
21962
21963 #ifdef HAVE_LINUX_THREADS
21964         pthread_kill_other_threads_np();
21965 #endif
21966
21967         return 0;
21968
21969   ;
21970   return 0;
21971 }
21972 _ACEOF
21973 rm -f conftest.$ac_objext conftest$ac_exeext
21974 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21975   (eval $ac_link) 2>conftest.er1
21976   ac_status=$?
21977   grep -v '^ *+' conftest.er1 >conftest.err
21978   rm -f conftest.er1
21979   cat conftest.err >&5
21980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21981   (exit $ac_status); } &&
21982          { ac_try='test -z "$ac_c_werror_flag"
21983                          || test ! -s conftest.err'
21984   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21985   (eval $ac_try) 2>&5
21986   ac_status=$?
21987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21988   (exit $ac_status); }; } &&
21989          { ac_try='test -s conftest$ac_exeext'
21990   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21991   (eval $ac_try) 2>&5
21992   ac_status=$?
21993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21994   (exit $ac_status); }; }; then
21995   ol_cv_pthread_lpthread_lmach_lexc=yes
21996 else
21997   echo "$as_me: failed program was:" >&5
21998 sed 's/^/| /' conftest.$ac_ext >&5
21999
22000 ol_cv_pthread_lpthread_lmach_lexc=no
22001 fi
22002 rm -f conftest.err conftest.$ac_objext \
22003       conftest$ac_exeext conftest.$ac_ext
22004 else
22005   cat >conftest.$ac_ext <<_ACEOF
22006 /* confdefs.h.  */
22007 _ACEOF
22008 cat confdefs.h >>conftest.$ac_ext
22009 cat >>conftest.$ac_ext <<_ACEOF
22010 /* end confdefs.h.  */
22011
22012 /* pthread test headers */
22013 #include <pthread.h>
22014 #if HAVE_PTHREADS < 7
22015 #include <errno.h>
22016 #endif
22017 #ifndef NULL
22018 #define NULL (void*)0
22019 #endif
22020
22021 static void *task(p)
22022         void *p;
22023 {
22024         return (void *) (p == NULL);
22025 }
22026
22027
22028 int main(argc, argv)
22029         int argc;
22030         char **argv;
22031 {
22032
22033         /* pthread test function */
22034 #ifndef PTHREAD_CREATE_DETACHED
22035 #define PTHREAD_CREATE_DETACHED 1
22036 #endif
22037         pthread_t t;
22038         int status;
22039         int detach = PTHREAD_CREATE_DETACHED;
22040
22041 #if HAVE_PTHREADS > 4
22042         /* Final pthreads */
22043         pthread_attr_t attr;
22044
22045         status = pthread_attr_init(&attr);
22046         if( status ) return status;
22047
22048 #if HAVE_PTHREADS < 7
22049         status = pthread_attr_setdetachstate(&attr, &detach);
22050         if( status < 0 ) status = errno;
22051 #else
22052         status = pthread_attr_setdetachstate(&attr, detach);
22053 #endif
22054         if( status ) return status;
22055         status = pthread_create( &t, &attr, task, NULL );
22056 #if HAVE_PTHREADS < 7
22057         if( status < 0 ) status = errno;
22058 #endif
22059         if( status ) return status;
22060 #else
22061         /* Draft 4 pthreads */
22062         status = pthread_create( &t, pthread_attr_default, task, NULL );
22063         if( status ) return errno;
22064
22065         /* give thread a chance to complete */
22066         /* it should remain joinable and hence detachable */
22067         sleep( 1 );
22068
22069         status = pthread_detach( &t );
22070         if( status ) return errno;
22071 #endif
22072
22073 #ifdef HAVE_LINUX_THREADS
22074         pthread_kill_other_threads_np();
22075 #endif
22076
22077         return 0;
22078
22079 }
22080
22081 _ACEOF
22082 rm -f conftest$ac_exeext
22083 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22084   (eval $ac_link) 2>&5
22085   ac_status=$?
22086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22087   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22088   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22089   (eval $ac_try) 2>&5
22090   ac_status=$?
22091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22092   (exit $ac_status); }; }; then
22093   ol_cv_pthread_lpthread_lmach_lexc=yes
22094 else
22095   echo "$as_me: program exited with status $ac_status" >&5
22096 echo "$as_me: failed program was:" >&5
22097 sed 's/^/| /' conftest.$ac_ext >&5
22098
22099 ( exit $ac_status )
22100 ol_cv_pthread_lpthread_lmach_lexc=no
22101 fi
22102 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22103 fi
22104
22105                 # restore the LIBS
22106                 LIBS="$ol_LIBS"
22107
22108 fi
22109 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
22110 echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc" >&6
22111
22112         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
22113                 ol_link_pthreads="-lpthread -lmach -lexc"
22114                 ol_link_threads=posix
22115         fi
22116 fi
22117
22118
22119                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
22120 if test "$ol_link_threads" = no ; then
22121         # try -lpthread -Wl,-woff,85
22122         echo "$as_me:$LINENO: checking for pthread link with -lpthread -Wl,-woff,85" >&5
22123 echo $ECHO_N "checking for pthread link with -lpthread -Wl,-woff,85... $ECHO_C" >&6
22124 if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then
22125   echo $ECHO_N "(cached) $ECHO_C" >&6
22126 else
22127
22128                 # save the flags
22129                 ol_LIBS="$LIBS"
22130                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
22131
22132                 if test "$cross_compiling" = yes; then
22133   cat >conftest.$ac_ext <<_ACEOF
22134 /* confdefs.h.  */
22135 _ACEOF
22136 cat confdefs.h >>conftest.$ac_ext
22137 cat >>conftest.$ac_ext <<_ACEOF
22138 /* end confdefs.h.  */
22139
22140 /* pthread test headers */
22141 #include <pthread.h>
22142 #if HAVE_PTHREADS < 7
22143 #include <errno.h>
22144 #endif
22145 #ifndef NULL
22146 #define NULL (void*)0
22147 #endif
22148
22149 static void *task(p)
22150         void *p;
22151 {
22152         return (void *) (p == NULL);
22153 }
22154
22155 int
22156 main ()
22157 {
22158
22159         /* pthread test function */
22160 #ifndef PTHREAD_CREATE_DETACHED
22161 #define PTHREAD_CREATE_DETACHED 1
22162 #endif
22163         pthread_t t;
22164         int status;
22165         int detach = PTHREAD_CREATE_DETACHED;
22166
22167 #if HAVE_PTHREADS > 4
22168         /* Final pthreads */
22169         pthread_attr_t attr;
22170
22171         status = pthread_attr_init(&attr);
22172         if( status ) return status;
22173
22174 #if HAVE_PTHREADS < 7
22175         status = pthread_attr_setdetachstate(&attr, &detach);
22176         if( status < 0 ) status = errno;
22177 #else
22178         status = pthread_attr_setdetachstate(&attr, detach);
22179 #endif
22180         if( status ) return status;
22181         status = pthread_create( &t, &attr, task, NULL );
22182 #if HAVE_PTHREADS < 7
22183         if( status < 0 ) status = errno;
22184 #endif
22185         if( status ) return status;
22186 #else
22187         /* Draft 4 pthreads */
22188         status = pthread_create( &t, pthread_attr_default, task, NULL );
22189         if( status ) return errno;
22190
22191         /* give thread a chance to complete */
22192         /* it should remain joinable and hence detachable */
22193         sleep( 1 );
22194
22195         status = pthread_detach( &t );
22196         if( status ) return errno;
22197 #endif
22198
22199 #ifdef HAVE_LINUX_THREADS
22200         pthread_kill_other_threads_np();
22201 #endif
22202
22203         return 0;
22204
22205   ;
22206   return 0;
22207 }
22208 _ACEOF
22209 rm -f conftest.$ac_objext conftest$ac_exeext
22210 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22211   (eval $ac_link) 2>conftest.er1
22212   ac_status=$?
22213   grep -v '^ *+' conftest.er1 >conftest.err
22214   rm -f conftest.er1
22215   cat conftest.err >&5
22216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22217   (exit $ac_status); } &&
22218          { ac_try='test -z "$ac_c_werror_flag"
22219                          || test ! -s conftest.err'
22220   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22221   (eval $ac_try) 2>&5
22222   ac_status=$?
22223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22224   (exit $ac_status); }; } &&
22225          { ac_try='test -s conftest$ac_exeext'
22226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22227   (eval $ac_try) 2>&5
22228   ac_status=$?
22229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22230   (exit $ac_status); }; }; then
22231   ol_cv_pthread_lib_lpthread_woff=yes
22232 else
22233   echo "$as_me: failed program was:" >&5
22234 sed 's/^/| /' conftest.$ac_ext >&5
22235
22236 ol_cv_pthread_lib_lpthread_woff=no
22237 fi
22238 rm -f conftest.err conftest.$ac_objext \
22239       conftest$ac_exeext conftest.$ac_ext
22240 else
22241   cat >conftest.$ac_ext <<_ACEOF
22242 /* confdefs.h.  */
22243 _ACEOF
22244 cat confdefs.h >>conftest.$ac_ext
22245 cat >>conftest.$ac_ext <<_ACEOF
22246 /* end confdefs.h.  */
22247
22248 /* pthread test headers */
22249 #include <pthread.h>
22250 #if HAVE_PTHREADS < 7
22251 #include <errno.h>
22252 #endif
22253 #ifndef NULL
22254 #define NULL (void*)0
22255 #endif
22256
22257 static void *task(p)
22258         void *p;
22259 {
22260         return (void *) (p == NULL);
22261 }
22262
22263
22264 int main(argc, argv)
22265         int argc;
22266         char **argv;
22267 {
22268
22269         /* pthread test function */
22270 #ifndef PTHREAD_CREATE_DETACHED
22271 #define PTHREAD_CREATE_DETACHED 1
22272 #endif
22273         pthread_t t;
22274         int status;
22275         int detach = PTHREAD_CREATE_DETACHED;
22276
22277 #if HAVE_PTHREADS > 4
22278         /* Final pthreads */
22279         pthread_attr_t attr;
22280
22281         status = pthread_attr_init(&attr);
22282         if( status ) return status;
22283
22284 #if HAVE_PTHREADS < 7
22285         status = pthread_attr_setdetachstate(&attr, &detach);
22286         if( status < 0 ) status = errno;
22287 #else
22288         status = pthread_attr_setdetachstate(&attr, detach);
22289 #endif
22290         if( status ) return status;
22291         status = pthread_create( &t, &attr, task, NULL );
22292 #if HAVE_PTHREADS < 7
22293         if( status < 0 ) status = errno;
22294 #endif
22295         if( status ) return status;
22296 #else
22297         /* Draft 4 pthreads */
22298         status = pthread_create( &t, pthread_attr_default, task, NULL );
22299         if( status ) return errno;
22300
22301         /* give thread a chance to complete */
22302         /* it should remain joinable and hence detachable */
22303         sleep( 1 );
22304
22305         status = pthread_detach( &t );
22306         if( status ) return errno;
22307 #endif
22308
22309 #ifdef HAVE_LINUX_THREADS
22310         pthread_kill_other_threads_np();
22311 #endif
22312
22313         return 0;
22314
22315 }
22316
22317 _ACEOF
22318 rm -f conftest$ac_exeext
22319 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22320   (eval $ac_link) 2>&5
22321   ac_status=$?
22322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22323   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22324   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22325   (eval $ac_try) 2>&5
22326   ac_status=$?
22327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22328   (exit $ac_status); }; }; then
22329   ol_cv_pthread_lib_lpthread_woff=yes
22330 else
22331   echo "$as_me: program exited with status $ac_status" >&5
22332 echo "$as_me: failed program was:" >&5
22333 sed 's/^/| /' conftest.$ac_ext >&5
22334
22335 ( exit $ac_status )
22336 ol_cv_pthread_lib_lpthread_woff=no
22337 fi
22338 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22339 fi
22340
22341                 # restore the LIBS
22342                 LIBS="$ol_LIBS"
22343
22344 fi
22345 echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthread_woff" >&5
22346 echo "${ECHO_T}$ol_cv_pthread_lib_lpthread_woff" >&6
22347
22348         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
22349                 ol_link_pthreads="-lpthread -Wl,-woff,85"
22350                 ol_link_threads=posix
22351         fi
22352 fi
22353
22354
22355                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
22356 if test "$ol_link_threads" = no ; then
22357         # try -lpthread
22358         echo "$as_me:$LINENO: checking for pthread link with -lpthread" >&5
22359 echo $ECHO_N "checking for pthread link with -lpthread... $ECHO_C" >&6
22360 if test "${ol_cv_pthread_lpthread+set}" = set; then
22361   echo $ECHO_N "(cached) $ECHO_C" >&6
22362 else
22363
22364                 # save the flags
22365                 ol_LIBS="$LIBS"
22366                 LIBS="-lpthread $LIBS"
22367
22368                 if test "$cross_compiling" = yes; then
22369   cat >conftest.$ac_ext <<_ACEOF
22370 /* confdefs.h.  */
22371 _ACEOF
22372 cat confdefs.h >>conftest.$ac_ext
22373 cat >>conftest.$ac_ext <<_ACEOF
22374 /* end confdefs.h.  */
22375
22376 /* pthread test headers */
22377 #include <pthread.h>
22378 #if HAVE_PTHREADS < 7
22379 #include <errno.h>
22380 #endif
22381 #ifndef NULL
22382 #define NULL (void*)0
22383 #endif
22384
22385 static void *task(p)
22386         void *p;
22387 {
22388         return (void *) (p == NULL);
22389 }
22390
22391 int
22392 main ()
22393 {
22394
22395         /* pthread test function */
22396 #ifndef PTHREAD_CREATE_DETACHED
22397 #define PTHREAD_CREATE_DETACHED 1
22398 #endif
22399         pthread_t t;
22400         int status;
22401         int detach = PTHREAD_CREATE_DETACHED;
22402
22403 #if HAVE_PTHREADS > 4
22404         /* Final pthreads */
22405         pthread_attr_t attr;
22406
22407         status = pthread_attr_init(&attr);
22408         if( status ) return status;
22409
22410 #if HAVE_PTHREADS < 7
22411         status = pthread_attr_setdetachstate(&attr, &detach);
22412         if( status < 0 ) status = errno;
22413 #else
22414         status = pthread_attr_setdetachstate(&attr, detach);
22415 #endif
22416         if( status ) return status;
22417         status = pthread_create( &t, &attr, task, NULL );
22418 #if HAVE_PTHREADS < 7
22419         if( status < 0 ) status = errno;
22420 #endif
22421         if( status ) return status;
22422 #else
22423         /* Draft 4 pthreads */
22424         status = pthread_create( &t, pthread_attr_default, task, NULL );
22425         if( status ) return errno;
22426
22427         /* give thread a chance to complete */
22428         /* it should remain joinable and hence detachable */
22429         sleep( 1 );
22430
22431         status = pthread_detach( &t );
22432         if( status ) return errno;
22433 #endif
22434
22435 #ifdef HAVE_LINUX_THREADS
22436         pthread_kill_other_threads_np();
22437 #endif
22438
22439         return 0;
22440
22441   ;
22442   return 0;
22443 }
22444 _ACEOF
22445 rm -f conftest.$ac_objext conftest$ac_exeext
22446 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22447   (eval $ac_link) 2>conftest.er1
22448   ac_status=$?
22449   grep -v '^ *+' conftest.er1 >conftest.err
22450   rm -f conftest.er1
22451   cat conftest.err >&5
22452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22453   (exit $ac_status); } &&
22454          { ac_try='test -z "$ac_c_werror_flag"
22455                          || test ! -s conftest.err'
22456   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22457   (eval $ac_try) 2>&5
22458   ac_status=$?
22459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22460   (exit $ac_status); }; } &&
22461          { ac_try='test -s conftest$ac_exeext'
22462   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22463   (eval $ac_try) 2>&5
22464   ac_status=$?
22465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22466   (exit $ac_status); }; }; then
22467   ol_cv_pthread_lpthread=yes
22468 else
22469   echo "$as_me: failed program was:" >&5
22470 sed 's/^/| /' conftest.$ac_ext >&5
22471
22472 ol_cv_pthread_lpthread=no
22473 fi
22474 rm -f conftest.err conftest.$ac_objext \
22475       conftest$ac_exeext conftest.$ac_ext
22476 else
22477   cat >conftest.$ac_ext <<_ACEOF
22478 /* confdefs.h.  */
22479 _ACEOF
22480 cat confdefs.h >>conftest.$ac_ext
22481 cat >>conftest.$ac_ext <<_ACEOF
22482 /* end confdefs.h.  */
22483
22484 /* pthread test headers */
22485 #include <pthread.h>
22486 #if HAVE_PTHREADS < 7
22487 #include <errno.h>
22488 #endif
22489 #ifndef NULL
22490 #define NULL (void*)0
22491 #endif
22492
22493 static void *task(p)
22494         void *p;
22495 {
22496         return (void *) (p == NULL);
22497 }
22498
22499
22500 int main(argc, argv)
22501         int argc;
22502         char **argv;
22503 {
22504
22505         /* pthread test function */
22506 #ifndef PTHREAD_CREATE_DETACHED
22507 #define PTHREAD_CREATE_DETACHED 1
22508 #endif
22509         pthread_t t;
22510         int status;
22511         int detach = PTHREAD_CREATE_DETACHED;
22512
22513 #if HAVE_PTHREADS > 4
22514         /* Final pthreads */
22515         pthread_attr_t attr;
22516
22517         status = pthread_attr_init(&attr);
22518         if( status ) return status;
22519
22520 #if HAVE_PTHREADS < 7
22521         status = pthread_attr_setdetachstate(&attr, &detach);
22522         if( status < 0 ) status = errno;
22523 #else
22524         status = pthread_attr_setdetachstate(&attr, detach);
22525 #endif
22526         if( status ) return status;
22527         status = pthread_create( &t, &attr, task, NULL );
22528 #if HAVE_PTHREADS < 7
22529         if( status < 0 ) status = errno;
22530 #endif
22531         if( status ) return status;
22532 #else
22533         /* Draft 4 pthreads */
22534         status = pthread_create( &t, pthread_attr_default, task, NULL );
22535         if( status ) return errno;
22536
22537         /* give thread a chance to complete */
22538         /* it should remain joinable and hence detachable */
22539         sleep( 1 );
22540
22541         status = pthread_detach( &t );
22542         if( status ) return errno;
22543 #endif
22544
22545 #ifdef HAVE_LINUX_THREADS
22546         pthread_kill_other_threads_np();
22547 #endif
22548
22549         return 0;
22550
22551 }
22552
22553 _ACEOF
22554 rm -f conftest$ac_exeext
22555 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22556   (eval $ac_link) 2>&5
22557   ac_status=$?
22558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22559   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22560   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22561   (eval $ac_try) 2>&5
22562   ac_status=$?
22563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22564   (exit $ac_status); }; }; then
22565   ol_cv_pthread_lpthread=yes
22566 else
22567   echo "$as_me: program exited with status $ac_status" >&5
22568 echo "$as_me: failed program was:" >&5
22569 sed 's/^/| /' conftest.$ac_ext >&5
22570
22571 ( exit $ac_status )
22572 ol_cv_pthread_lpthread=no
22573 fi
22574 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22575 fi
22576
22577                 # restore the LIBS
22578                 LIBS="$ol_LIBS"
22579
22580 fi
22581 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread" >&5
22582 echo "${ECHO_T}$ol_cv_pthread_lpthread" >&6
22583
22584         if test $ol_cv_pthread_lpthread = yes ; then
22585                 ol_link_pthreads="-lpthread"
22586                 ol_link_threads=posix
22587         fi
22588 fi
22589
22590                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
22591 if test "$ol_link_threads" = no ; then
22592         # try -lc_r
22593         echo "$as_me:$LINENO: checking for pthread link with -lc_r" >&5
22594 echo $ECHO_N "checking for pthread link with -lc_r... $ECHO_C" >&6
22595 if test "${ol_cv_pthread_lc_r+set}" = set; then
22596   echo $ECHO_N "(cached) $ECHO_C" >&6
22597 else
22598
22599                 # save the flags
22600                 ol_LIBS="$LIBS"
22601                 LIBS="-lc_r $LIBS"
22602
22603                 if test "$cross_compiling" = yes; then
22604   cat >conftest.$ac_ext <<_ACEOF
22605 /* confdefs.h.  */
22606 _ACEOF
22607 cat confdefs.h >>conftest.$ac_ext
22608 cat >>conftest.$ac_ext <<_ACEOF
22609 /* end confdefs.h.  */
22610
22611 /* pthread test headers */
22612 #include <pthread.h>
22613 #if HAVE_PTHREADS < 7
22614 #include <errno.h>
22615 #endif
22616 #ifndef NULL
22617 #define NULL (void*)0
22618 #endif
22619
22620 static void *task(p)
22621         void *p;
22622 {
22623         return (void *) (p == NULL);
22624 }
22625
22626 int
22627 main ()
22628 {
22629
22630         /* pthread test function */
22631 #ifndef PTHREAD_CREATE_DETACHED
22632 #define PTHREAD_CREATE_DETACHED 1
22633 #endif
22634         pthread_t t;
22635         int status;
22636         int detach = PTHREAD_CREATE_DETACHED;
22637
22638 #if HAVE_PTHREADS > 4
22639         /* Final pthreads */
22640         pthread_attr_t attr;
22641
22642         status = pthread_attr_init(&attr);
22643         if( status ) return status;
22644
22645 #if HAVE_PTHREADS < 7
22646         status = pthread_attr_setdetachstate(&attr, &detach);
22647         if( status < 0 ) status = errno;
22648 #else
22649         status = pthread_attr_setdetachstate(&attr, detach);
22650 #endif
22651         if( status ) return status;
22652         status = pthread_create( &t, &attr, task, NULL );
22653 #if HAVE_PTHREADS < 7
22654         if( status < 0 ) status = errno;
22655 #endif
22656         if( status ) return status;
22657 #else
22658         /* Draft 4 pthreads */
22659         status = pthread_create( &t, pthread_attr_default, task, NULL );
22660         if( status ) return errno;
22661
22662         /* give thread a chance to complete */
22663         /* it should remain joinable and hence detachable */
22664         sleep( 1 );
22665
22666         status = pthread_detach( &t );
22667         if( status ) return errno;
22668 #endif
22669
22670 #ifdef HAVE_LINUX_THREADS
22671         pthread_kill_other_threads_np();
22672 #endif
22673
22674         return 0;
22675
22676   ;
22677   return 0;
22678 }
22679 _ACEOF
22680 rm -f conftest.$ac_objext conftest$ac_exeext
22681 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22682   (eval $ac_link) 2>conftest.er1
22683   ac_status=$?
22684   grep -v '^ *+' conftest.er1 >conftest.err
22685   rm -f conftest.er1
22686   cat conftest.err >&5
22687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22688   (exit $ac_status); } &&
22689          { ac_try='test -z "$ac_c_werror_flag"
22690                          || test ! -s conftest.err'
22691   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22692   (eval $ac_try) 2>&5
22693   ac_status=$?
22694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22695   (exit $ac_status); }; } &&
22696          { ac_try='test -s conftest$ac_exeext'
22697   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22698   (eval $ac_try) 2>&5
22699   ac_status=$?
22700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22701   (exit $ac_status); }; }; then
22702   ol_cv_pthread_lc_r=yes
22703 else
22704   echo "$as_me: failed program was:" >&5
22705 sed 's/^/| /' conftest.$ac_ext >&5
22706
22707 ol_cv_pthread_lc_r=no
22708 fi
22709 rm -f conftest.err conftest.$ac_objext \
22710       conftest$ac_exeext conftest.$ac_ext
22711 else
22712   cat >conftest.$ac_ext <<_ACEOF
22713 /* confdefs.h.  */
22714 _ACEOF
22715 cat confdefs.h >>conftest.$ac_ext
22716 cat >>conftest.$ac_ext <<_ACEOF
22717 /* end confdefs.h.  */
22718
22719 /* pthread test headers */
22720 #include <pthread.h>
22721 #if HAVE_PTHREADS < 7
22722 #include <errno.h>
22723 #endif
22724 #ifndef NULL
22725 #define NULL (void*)0
22726 #endif
22727
22728 static void *task(p)
22729         void *p;
22730 {
22731         return (void *) (p == NULL);
22732 }
22733
22734
22735 int main(argc, argv)
22736         int argc;
22737         char **argv;
22738 {
22739
22740         /* pthread test function */
22741 #ifndef PTHREAD_CREATE_DETACHED
22742 #define PTHREAD_CREATE_DETACHED 1
22743 #endif
22744         pthread_t t;
22745         int status;
22746         int detach = PTHREAD_CREATE_DETACHED;
22747
22748 #if HAVE_PTHREADS > 4
22749         /* Final pthreads */
22750         pthread_attr_t attr;
22751
22752         status = pthread_attr_init(&attr);
22753         if( status ) return status;
22754
22755 #if HAVE_PTHREADS < 7
22756         status = pthread_attr_setdetachstate(&attr, &detach);
22757         if( status < 0 ) status = errno;
22758 #else
22759         status = pthread_attr_setdetachstate(&attr, detach);
22760 #endif
22761         if( status ) return status;
22762         status = pthread_create( &t, &attr, task, NULL );
22763 #if HAVE_PTHREADS < 7
22764         if( status < 0 ) status = errno;
22765 #endif
22766         if( status ) return status;
22767 #else
22768         /* Draft 4 pthreads */
22769         status = pthread_create( &t, pthread_attr_default, task, NULL );
22770         if( status ) return errno;
22771
22772         /* give thread a chance to complete */
22773         /* it should remain joinable and hence detachable */
22774         sleep( 1 );
22775
22776         status = pthread_detach( &t );
22777         if( status ) return errno;
22778 #endif
22779
22780 #ifdef HAVE_LINUX_THREADS
22781         pthread_kill_other_threads_np();
22782 #endif
22783
22784         return 0;
22785
22786 }
22787
22788 _ACEOF
22789 rm -f conftest$ac_exeext
22790 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22791   (eval $ac_link) 2>&5
22792   ac_status=$?
22793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22794   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22796   (eval $ac_try) 2>&5
22797   ac_status=$?
22798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22799   (exit $ac_status); }; }; then
22800   ol_cv_pthread_lc_r=yes
22801 else
22802   echo "$as_me: program exited with status $ac_status" >&5
22803 echo "$as_me: failed program was:" >&5
22804 sed 's/^/| /' conftest.$ac_ext >&5
22805
22806 ( exit $ac_status )
22807 ol_cv_pthread_lc_r=no
22808 fi
22809 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22810 fi
22811
22812                 # restore the LIBS
22813                 LIBS="$ol_LIBS"
22814
22815 fi
22816 echo "$as_me:$LINENO: result: $ol_cv_pthread_lc_r" >&5
22817 echo "${ECHO_T}$ol_cv_pthread_lc_r" >&6
22818
22819         if test $ol_cv_pthread_lc_r = yes ; then
22820                 ol_link_pthreads="-lc_r"
22821                 ol_link_threads=posix
22822         fi
22823 fi
22824
22825
22826                 # Pthread try link: -threads (ol_cv_pthread_threads)
22827 if test "$ol_link_threads" = no ; then
22828         # try -threads
22829         echo "$as_me:$LINENO: checking for pthread link with -threads" >&5
22830 echo $ECHO_N "checking for pthread link with -threads... $ECHO_C" >&6
22831 if test "${ol_cv_pthread_threads+set}" = set; then
22832   echo $ECHO_N "(cached) $ECHO_C" >&6
22833 else
22834
22835                 # save the flags
22836                 ol_LIBS="$LIBS"
22837                 LIBS="-threads $LIBS"
22838
22839                 if test "$cross_compiling" = yes; then
22840   cat >conftest.$ac_ext <<_ACEOF
22841 /* confdefs.h.  */
22842 _ACEOF
22843 cat confdefs.h >>conftest.$ac_ext
22844 cat >>conftest.$ac_ext <<_ACEOF
22845 /* end confdefs.h.  */
22846
22847 /* pthread test headers */
22848 #include <pthread.h>
22849 #if HAVE_PTHREADS < 7
22850 #include <errno.h>
22851 #endif
22852 #ifndef NULL
22853 #define NULL (void*)0
22854 #endif
22855
22856 static void *task(p)
22857         void *p;
22858 {
22859         return (void *) (p == NULL);
22860 }
22861
22862 int
22863 main ()
22864 {
22865
22866         /* pthread test function */
22867 #ifndef PTHREAD_CREATE_DETACHED
22868 #define PTHREAD_CREATE_DETACHED 1
22869 #endif
22870         pthread_t t;
22871         int status;
22872         int detach = PTHREAD_CREATE_DETACHED;
22873
22874 #if HAVE_PTHREADS > 4
22875         /* Final pthreads */
22876         pthread_attr_t attr;
22877
22878         status = pthread_attr_init(&attr);
22879         if( status ) return status;
22880
22881 #if HAVE_PTHREADS < 7
22882         status = pthread_attr_setdetachstate(&attr, &detach);
22883         if( status < 0 ) status = errno;
22884 #else
22885         status = pthread_attr_setdetachstate(&attr, detach);
22886 #endif
22887         if( status ) return status;
22888         status = pthread_create( &t, &attr, task, NULL );
22889 #if HAVE_PTHREADS < 7
22890         if( status < 0 ) status = errno;
22891 #endif
22892         if( status ) return status;
22893 #else
22894         /* Draft 4 pthreads */
22895         status = pthread_create( &t, pthread_attr_default, task, NULL );
22896         if( status ) return errno;
22897
22898         /* give thread a chance to complete */
22899         /* it should remain joinable and hence detachable */
22900         sleep( 1 );
22901
22902         status = pthread_detach( &t );
22903         if( status ) return errno;
22904 #endif
22905
22906 #ifdef HAVE_LINUX_THREADS
22907         pthread_kill_other_threads_np();
22908 #endif
22909
22910         return 0;
22911
22912   ;
22913   return 0;
22914 }
22915 _ACEOF
22916 rm -f conftest.$ac_objext conftest$ac_exeext
22917 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22918   (eval $ac_link) 2>conftest.er1
22919   ac_status=$?
22920   grep -v '^ *+' conftest.er1 >conftest.err
22921   rm -f conftest.er1
22922   cat conftest.err >&5
22923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22924   (exit $ac_status); } &&
22925          { ac_try='test -z "$ac_c_werror_flag"
22926                          || test ! -s conftest.err'
22927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22928   (eval $ac_try) 2>&5
22929   ac_status=$?
22930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22931   (exit $ac_status); }; } &&
22932          { ac_try='test -s conftest$ac_exeext'
22933   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22934   (eval $ac_try) 2>&5
22935   ac_status=$?
22936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22937   (exit $ac_status); }; }; then
22938   ol_cv_pthread_threads=yes
22939 else
22940   echo "$as_me: failed program was:" >&5
22941 sed 's/^/| /' conftest.$ac_ext >&5
22942
22943 ol_cv_pthread_threads=no
22944 fi
22945 rm -f conftest.err conftest.$ac_objext \
22946       conftest$ac_exeext conftest.$ac_ext
22947 else
22948   cat >conftest.$ac_ext <<_ACEOF
22949 /* confdefs.h.  */
22950 _ACEOF
22951 cat confdefs.h >>conftest.$ac_ext
22952 cat >>conftest.$ac_ext <<_ACEOF
22953 /* end confdefs.h.  */
22954
22955 /* pthread test headers */
22956 #include <pthread.h>
22957 #if HAVE_PTHREADS < 7
22958 #include <errno.h>
22959 #endif
22960 #ifndef NULL
22961 #define NULL (void*)0
22962 #endif
22963
22964 static void *task(p)
22965         void *p;
22966 {
22967         return (void *) (p == NULL);
22968 }
22969
22970
22971 int main(argc, argv)
22972         int argc;
22973         char **argv;
22974 {
22975
22976         /* pthread test function */
22977 #ifndef PTHREAD_CREATE_DETACHED
22978 #define PTHREAD_CREATE_DETACHED 1
22979 #endif
22980         pthread_t t;
22981         int status;
22982         int detach = PTHREAD_CREATE_DETACHED;
22983
22984 #if HAVE_PTHREADS > 4
22985         /* Final pthreads */
22986         pthread_attr_t attr;
22987
22988         status = pthread_attr_init(&attr);
22989         if( status ) return status;
22990
22991 #if HAVE_PTHREADS < 7
22992         status = pthread_attr_setdetachstate(&attr, &detach);
22993         if( status < 0 ) status = errno;
22994 #else
22995         status = pthread_attr_setdetachstate(&attr, detach);
22996 #endif
22997         if( status ) return status;
22998         status = pthread_create( &t, &attr, task, NULL );
22999 #if HAVE_PTHREADS < 7
23000         if( status < 0 ) status = errno;
23001 #endif
23002         if( status ) return status;
23003 #else
23004         /* Draft 4 pthreads */
23005         status = pthread_create( &t, pthread_attr_default, task, NULL );
23006         if( status ) return errno;
23007
23008         /* give thread a chance to complete */
23009         /* it should remain joinable and hence detachable */
23010         sleep( 1 );
23011
23012         status = pthread_detach( &t );
23013         if( status ) return errno;
23014 #endif
23015
23016 #ifdef HAVE_LINUX_THREADS
23017         pthread_kill_other_threads_np();
23018 #endif
23019
23020         return 0;
23021
23022 }
23023
23024 _ACEOF
23025 rm -f conftest$ac_exeext
23026 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23027   (eval $ac_link) 2>&5
23028   ac_status=$?
23029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23030   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23031   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23032   (eval $ac_try) 2>&5
23033   ac_status=$?
23034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23035   (exit $ac_status); }; }; then
23036   ol_cv_pthread_threads=yes
23037 else
23038   echo "$as_me: program exited with status $ac_status" >&5
23039 echo "$as_me: failed program was:" >&5
23040 sed 's/^/| /' conftest.$ac_ext >&5
23041
23042 ( exit $ac_status )
23043 ol_cv_pthread_threads=no
23044 fi
23045 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23046 fi
23047
23048                 # restore the LIBS
23049                 LIBS="$ol_LIBS"
23050
23051 fi
23052 echo "$as_me:$LINENO: result: $ol_cv_pthread_threads" >&5
23053 echo "${ECHO_T}$ol_cv_pthread_threads" >&6
23054
23055         if test $ol_cv_pthread_threads = yes ; then
23056                 ol_link_pthreads="-threads"
23057                 ol_link_threads=posix
23058         fi
23059 fi
23060
23061
23062                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
23063 if test "$ol_link_threads" = no ; then
23064         # try -lpthreads -lmach -lexc -lc_r
23065         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
23066 echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc -lc_r... $ECHO_C" >&6
23067 if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then
23068   echo $ECHO_N "(cached) $ECHO_C" >&6
23069 else
23070
23071                 # save the flags
23072                 ol_LIBS="$LIBS"
23073                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
23074
23075                 if test "$cross_compiling" = yes; then
23076   cat >conftest.$ac_ext <<_ACEOF
23077 /* confdefs.h.  */
23078 _ACEOF
23079 cat confdefs.h >>conftest.$ac_ext
23080 cat >>conftest.$ac_ext <<_ACEOF
23081 /* end confdefs.h.  */
23082
23083 /* pthread test headers */
23084 #include <pthread.h>
23085 #if HAVE_PTHREADS < 7
23086 #include <errno.h>
23087 #endif
23088 #ifndef NULL
23089 #define NULL (void*)0
23090 #endif
23091
23092 static void *task(p)
23093         void *p;
23094 {
23095         return (void *) (p == NULL);
23096 }
23097
23098 int
23099 main ()
23100 {
23101
23102         /* pthread test function */
23103 #ifndef PTHREAD_CREATE_DETACHED
23104 #define PTHREAD_CREATE_DETACHED 1
23105 #endif
23106         pthread_t t;
23107         int status;
23108         int detach = PTHREAD_CREATE_DETACHED;
23109
23110 #if HAVE_PTHREADS > 4
23111         /* Final pthreads */
23112         pthread_attr_t attr;
23113
23114         status = pthread_attr_init(&attr);
23115         if( status ) return status;
23116
23117 #if HAVE_PTHREADS < 7
23118         status = pthread_attr_setdetachstate(&attr, &detach);
23119         if( status < 0 ) status = errno;
23120 #else
23121         status = pthread_attr_setdetachstate(&attr, detach);
23122 #endif
23123         if( status ) return status;
23124         status = pthread_create( &t, &attr, task, NULL );
23125 #if HAVE_PTHREADS < 7
23126         if( status < 0 ) status = errno;
23127 #endif
23128         if( status ) return status;
23129 #else
23130         /* Draft 4 pthreads */
23131         status = pthread_create( &t, pthread_attr_default, task, NULL );
23132         if( status ) return errno;
23133
23134         /* give thread a chance to complete */
23135         /* it should remain joinable and hence detachable */
23136         sleep( 1 );
23137
23138         status = pthread_detach( &t );
23139         if( status ) return errno;
23140 #endif
23141
23142 #ifdef HAVE_LINUX_THREADS
23143         pthread_kill_other_threads_np();
23144 #endif
23145
23146         return 0;
23147
23148   ;
23149   return 0;
23150 }
23151 _ACEOF
23152 rm -f conftest.$ac_objext conftest$ac_exeext
23153 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23154   (eval $ac_link) 2>conftest.er1
23155   ac_status=$?
23156   grep -v '^ *+' conftest.er1 >conftest.err
23157   rm -f conftest.er1
23158   cat conftest.err >&5
23159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23160   (exit $ac_status); } &&
23161          { ac_try='test -z "$ac_c_werror_flag"
23162                          || test ! -s conftest.err'
23163   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23164   (eval $ac_try) 2>&5
23165   ac_status=$?
23166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23167   (exit $ac_status); }; } &&
23168          { ac_try='test -s conftest$ac_exeext'
23169   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23170   (eval $ac_try) 2>&5
23171   ac_status=$?
23172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23173   (exit $ac_status); }; }; then
23174   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
23175 else
23176   echo "$as_me: failed program was:" >&5
23177 sed 's/^/| /' conftest.$ac_ext >&5
23178
23179 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
23180 fi
23181 rm -f conftest.err conftest.$ac_objext \
23182       conftest$ac_exeext conftest.$ac_ext
23183 else
23184   cat >conftest.$ac_ext <<_ACEOF
23185 /* confdefs.h.  */
23186 _ACEOF
23187 cat confdefs.h >>conftest.$ac_ext
23188 cat >>conftest.$ac_ext <<_ACEOF
23189 /* end confdefs.h.  */
23190
23191 /* pthread test headers */
23192 #include <pthread.h>
23193 #if HAVE_PTHREADS < 7
23194 #include <errno.h>
23195 #endif
23196 #ifndef NULL
23197 #define NULL (void*)0
23198 #endif
23199
23200 static void *task(p)
23201         void *p;
23202 {
23203         return (void *) (p == NULL);
23204 }
23205
23206
23207 int main(argc, argv)
23208         int argc;
23209         char **argv;
23210 {
23211
23212         /* pthread test function */
23213 #ifndef PTHREAD_CREATE_DETACHED
23214 #define PTHREAD_CREATE_DETACHED 1
23215 #endif
23216         pthread_t t;
23217         int status;
23218         int detach = PTHREAD_CREATE_DETACHED;
23219
23220 #if HAVE_PTHREADS > 4
23221         /* Final pthreads */
23222         pthread_attr_t attr;
23223
23224         status = pthread_attr_init(&attr);
23225         if( status ) return status;
23226
23227 #if HAVE_PTHREADS < 7
23228         status = pthread_attr_setdetachstate(&attr, &detach);
23229         if( status < 0 ) status = errno;
23230 #else
23231         status = pthread_attr_setdetachstate(&attr, detach);
23232 #endif
23233         if( status ) return status;
23234         status = pthread_create( &t, &attr, task, NULL );
23235 #if HAVE_PTHREADS < 7
23236         if( status < 0 ) status = errno;
23237 #endif
23238         if( status ) return status;
23239 #else
23240         /* Draft 4 pthreads */
23241         status = pthread_create( &t, pthread_attr_default, task, NULL );
23242         if( status ) return errno;
23243
23244         /* give thread a chance to complete */
23245         /* it should remain joinable and hence detachable */
23246         sleep( 1 );
23247
23248         status = pthread_detach( &t );
23249         if( status ) return errno;
23250 #endif
23251
23252 #ifdef HAVE_LINUX_THREADS
23253         pthread_kill_other_threads_np();
23254 #endif
23255
23256         return 0;
23257
23258 }
23259
23260 _ACEOF
23261 rm -f conftest$ac_exeext
23262 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23263   (eval $ac_link) 2>&5
23264   ac_status=$?
23265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23266   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23267   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23268   (eval $ac_try) 2>&5
23269   ac_status=$?
23270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23271   (exit $ac_status); }; }; then
23272   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
23273 else
23274   echo "$as_me: program exited with status $ac_status" >&5
23275 echo "$as_me: failed program was:" >&5
23276 sed 's/^/| /' conftest.$ac_ext >&5
23277
23278 ( exit $ac_status )
23279 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
23280 fi
23281 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23282 fi
23283
23284                 # restore the LIBS
23285                 LIBS="$ol_LIBS"
23286
23287 fi
23288 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
23289 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6
23290
23291         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
23292                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
23293                 ol_link_threads=posix
23294         fi
23295 fi
23296
23297                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
23298 if test "$ol_link_threads" = no ; then
23299         # try -lpthreads -lmach -lexc
23300         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc" >&5
23301 echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc... $ECHO_C" >&6
23302 if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then
23303   echo $ECHO_N "(cached) $ECHO_C" >&6
23304 else
23305
23306                 # save the flags
23307                 ol_LIBS="$LIBS"
23308                 LIBS="-lpthreads -lmach -lexc $LIBS"
23309
23310                 if test "$cross_compiling" = yes; then
23311   cat >conftest.$ac_ext <<_ACEOF
23312 /* confdefs.h.  */
23313 _ACEOF
23314 cat confdefs.h >>conftest.$ac_ext
23315 cat >>conftest.$ac_ext <<_ACEOF
23316 /* end confdefs.h.  */
23317
23318 /* pthread test headers */
23319 #include <pthread.h>
23320 #if HAVE_PTHREADS < 7
23321 #include <errno.h>
23322 #endif
23323 #ifndef NULL
23324 #define NULL (void*)0
23325 #endif
23326
23327 static void *task(p)
23328         void *p;
23329 {
23330         return (void *) (p == NULL);
23331 }
23332
23333 int
23334 main ()
23335 {
23336
23337         /* pthread test function */
23338 #ifndef PTHREAD_CREATE_DETACHED
23339 #define PTHREAD_CREATE_DETACHED 1
23340 #endif
23341         pthread_t t;
23342         int status;
23343         int detach = PTHREAD_CREATE_DETACHED;
23344
23345 #if HAVE_PTHREADS > 4
23346         /* Final pthreads */
23347         pthread_attr_t attr;
23348
23349         status = pthread_attr_init(&attr);
23350         if( status ) return status;
23351
23352 #if HAVE_PTHREADS < 7
23353         status = pthread_attr_setdetachstate(&attr, &detach);
23354         if( status < 0 ) status = errno;
23355 #else
23356         status = pthread_attr_setdetachstate(&attr, detach);
23357 #endif
23358         if( status ) return status;
23359         status = pthread_create( &t, &attr, task, NULL );
23360 #if HAVE_PTHREADS < 7
23361         if( status < 0 ) status = errno;
23362 #endif
23363         if( status ) return status;
23364 #else
23365         /* Draft 4 pthreads */
23366         status = pthread_create( &t, pthread_attr_default, task, NULL );
23367         if( status ) return errno;
23368
23369         /* give thread a chance to complete */
23370         /* it should remain joinable and hence detachable */
23371         sleep( 1 );
23372
23373         status = pthread_detach( &t );
23374         if( status ) return errno;
23375 #endif
23376
23377 #ifdef HAVE_LINUX_THREADS
23378         pthread_kill_other_threads_np();
23379 #endif
23380
23381         return 0;
23382
23383   ;
23384   return 0;
23385 }
23386 _ACEOF
23387 rm -f conftest.$ac_objext conftest$ac_exeext
23388 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23389   (eval $ac_link) 2>conftest.er1
23390   ac_status=$?
23391   grep -v '^ *+' conftest.er1 >conftest.err
23392   rm -f conftest.er1
23393   cat conftest.err >&5
23394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23395   (exit $ac_status); } &&
23396          { ac_try='test -z "$ac_c_werror_flag"
23397                          || test ! -s conftest.err'
23398   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23399   (eval $ac_try) 2>&5
23400   ac_status=$?
23401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23402   (exit $ac_status); }; } &&
23403          { ac_try='test -s conftest$ac_exeext'
23404   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23405   (eval $ac_try) 2>&5
23406   ac_status=$?
23407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23408   (exit $ac_status); }; }; then
23409   ol_cv_pthread_lpthreads_lmach_lexc=yes
23410 else
23411   echo "$as_me: failed program was:" >&5
23412 sed 's/^/| /' conftest.$ac_ext >&5
23413
23414 ol_cv_pthread_lpthreads_lmach_lexc=no
23415 fi
23416 rm -f conftest.err conftest.$ac_objext \
23417       conftest$ac_exeext conftest.$ac_ext
23418 else
23419   cat >conftest.$ac_ext <<_ACEOF
23420 /* confdefs.h.  */
23421 _ACEOF
23422 cat confdefs.h >>conftest.$ac_ext
23423 cat >>conftest.$ac_ext <<_ACEOF
23424 /* end confdefs.h.  */
23425
23426 /* pthread test headers */
23427 #include <pthread.h>
23428 #if HAVE_PTHREADS < 7
23429 #include <errno.h>
23430 #endif
23431 #ifndef NULL
23432 #define NULL (void*)0
23433 #endif
23434
23435 static void *task(p)
23436         void *p;
23437 {
23438         return (void *) (p == NULL);
23439 }
23440
23441
23442 int main(argc, argv)
23443         int argc;
23444         char **argv;
23445 {
23446
23447         /* pthread test function */
23448 #ifndef PTHREAD_CREATE_DETACHED
23449 #define PTHREAD_CREATE_DETACHED 1
23450 #endif
23451         pthread_t t;
23452         int status;
23453         int detach = PTHREAD_CREATE_DETACHED;
23454
23455 #if HAVE_PTHREADS > 4
23456         /* Final pthreads */
23457         pthread_attr_t attr;
23458
23459         status = pthread_attr_init(&attr);
23460         if( status ) return status;
23461
23462 #if HAVE_PTHREADS < 7
23463         status = pthread_attr_setdetachstate(&attr, &detach);
23464         if( status < 0 ) status = errno;
23465 #else
23466         status = pthread_attr_setdetachstate(&attr, detach);
23467 #endif
23468         if( status ) return status;
23469         status = pthread_create( &t, &attr, task, NULL );
23470 #if HAVE_PTHREADS < 7
23471         if( status < 0 ) status = errno;
23472 #endif
23473         if( status ) return status;
23474 #else
23475         /* Draft 4 pthreads */
23476         status = pthread_create( &t, pthread_attr_default, task, NULL );
23477         if( status ) return errno;
23478
23479         /* give thread a chance to complete */
23480         /* it should remain joinable and hence detachable */
23481         sleep( 1 );
23482
23483         status = pthread_detach( &t );
23484         if( status ) return errno;
23485 #endif
23486
23487 #ifdef HAVE_LINUX_THREADS
23488         pthread_kill_other_threads_np();
23489 #endif
23490
23491         return 0;
23492
23493 }
23494
23495 _ACEOF
23496 rm -f conftest$ac_exeext
23497 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23498   (eval $ac_link) 2>&5
23499   ac_status=$?
23500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23501   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23502   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23503   (eval $ac_try) 2>&5
23504   ac_status=$?
23505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23506   (exit $ac_status); }; }; then
23507   ol_cv_pthread_lpthreads_lmach_lexc=yes
23508 else
23509   echo "$as_me: program exited with status $ac_status" >&5
23510 echo "$as_me: failed program was:" >&5
23511 sed 's/^/| /' conftest.$ac_ext >&5
23512
23513 ( exit $ac_status )
23514 ol_cv_pthread_lpthreads_lmach_lexc=no
23515 fi
23516 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23517 fi
23518
23519                 # restore the LIBS
23520                 LIBS="$ol_LIBS"
23521
23522 fi
23523 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
23524 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc" >&6
23525
23526         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
23527                 ol_link_pthreads="-lpthreads -lmach -lexc"
23528                 ol_link_threads=posix
23529         fi
23530 fi
23531
23532                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
23533 if test "$ol_link_threads" = no ; then
23534         # try -lpthreads -lexc
23535         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lexc" >&5
23536 echo $ECHO_N "checking for pthread link with -lpthreads -lexc... $ECHO_C" >&6
23537 if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then
23538   echo $ECHO_N "(cached) $ECHO_C" >&6
23539 else
23540
23541                 # save the flags
23542                 ol_LIBS="$LIBS"
23543                 LIBS="-lpthreads -lexc $LIBS"
23544
23545                 if test "$cross_compiling" = yes; then
23546   cat >conftest.$ac_ext <<_ACEOF
23547 /* confdefs.h.  */
23548 _ACEOF
23549 cat confdefs.h >>conftest.$ac_ext
23550 cat >>conftest.$ac_ext <<_ACEOF
23551 /* end confdefs.h.  */
23552
23553 /* pthread test headers */
23554 #include <pthread.h>
23555 #if HAVE_PTHREADS < 7
23556 #include <errno.h>
23557 #endif
23558 #ifndef NULL
23559 #define NULL (void*)0
23560 #endif
23561
23562 static void *task(p)
23563         void *p;
23564 {
23565         return (void *) (p == NULL);
23566 }
23567
23568 int
23569 main ()
23570 {
23571
23572         /* pthread test function */
23573 #ifndef PTHREAD_CREATE_DETACHED
23574 #define PTHREAD_CREATE_DETACHED 1
23575 #endif
23576         pthread_t t;
23577         int status;
23578         int detach = PTHREAD_CREATE_DETACHED;
23579
23580 #if HAVE_PTHREADS > 4
23581         /* Final pthreads */
23582         pthread_attr_t attr;
23583
23584         status = pthread_attr_init(&attr);
23585         if( status ) return status;
23586
23587 #if HAVE_PTHREADS < 7
23588         status = pthread_attr_setdetachstate(&attr, &detach);
23589         if( status < 0 ) status = errno;
23590 #else
23591         status = pthread_attr_setdetachstate(&attr, detach);
23592 #endif
23593         if( status ) return status;
23594         status = pthread_create( &t, &attr, task, NULL );
23595 #if HAVE_PTHREADS < 7
23596         if( status < 0 ) status = errno;
23597 #endif
23598         if( status ) return status;
23599 #else
23600         /* Draft 4 pthreads */
23601         status = pthread_create( &t, pthread_attr_default, task, NULL );
23602         if( status ) return errno;
23603
23604         /* give thread a chance to complete */
23605         /* it should remain joinable and hence detachable */
23606         sleep( 1 );
23607
23608         status = pthread_detach( &t );
23609         if( status ) return errno;
23610 #endif
23611
23612 #ifdef HAVE_LINUX_THREADS
23613         pthread_kill_other_threads_np();
23614 #endif
23615
23616         return 0;
23617
23618   ;
23619   return 0;
23620 }
23621 _ACEOF
23622 rm -f conftest.$ac_objext conftest$ac_exeext
23623 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23624   (eval $ac_link) 2>conftest.er1
23625   ac_status=$?
23626   grep -v '^ *+' conftest.er1 >conftest.err
23627   rm -f conftest.er1
23628   cat conftest.err >&5
23629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23630   (exit $ac_status); } &&
23631          { ac_try='test -z "$ac_c_werror_flag"
23632                          || test ! -s conftest.err'
23633   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23634   (eval $ac_try) 2>&5
23635   ac_status=$?
23636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23637   (exit $ac_status); }; } &&
23638          { ac_try='test -s conftest$ac_exeext'
23639   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23640   (eval $ac_try) 2>&5
23641   ac_status=$?
23642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23643   (exit $ac_status); }; }; then
23644   ol_cv_pthread_lpthreads_lexc=yes
23645 else
23646   echo "$as_me: failed program was:" >&5
23647 sed 's/^/| /' conftest.$ac_ext >&5
23648
23649 ol_cv_pthread_lpthreads_lexc=no
23650 fi
23651 rm -f conftest.err conftest.$ac_objext \
23652       conftest$ac_exeext conftest.$ac_ext
23653 else
23654   cat >conftest.$ac_ext <<_ACEOF
23655 /* confdefs.h.  */
23656 _ACEOF
23657 cat confdefs.h >>conftest.$ac_ext
23658 cat >>conftest.$ac_ext <<_ACEOF
23659 /* end confdefs.h.  */
23660
23661 /* pthread test headers */
23662 #include <pthread.h>
23663 #if HAVE_PTHREADS < 7
23664 #include <errno.h>
23665 #endif
23666 #ifndef NULL
23667 #define NULL (void*)0
23668 #endif
23669
23670 static void *task(p)
23671         void *p;
23672 {
23673         return (void *) (p == NULL);
23674 }
23675
23676
23677 int main(argc, argv)
23678         int argc;
23679         char **argv;
23680 {
23681
23682         /* pthread test function */
23683 #ifndef PTHREAD_CREATE_DETACHED
23684 #define PTHREAD_CREATE_DETACHED 1
23685 #endif
23686         pthread_t t;
23687         int status;
23688         int detach = PTHREAD_CREATE_DETACHED;
23689
23690 #if HAVE_PTHREADS > 4
23691         /* Final pthreads */
23692         pthread_attr_t attr;
23693
23694         status = pthread_attr_init(&attr);
23695         if( status ) return status;
23696
23697 #if HAVE_PTHREADS < 7
23698         status = pthread_attr_setdetachstate(&attr, &detach);
23699         if( status < 0 ) status = errno;
23700 #else
23701         status = pthread_attr_setdetachstate(&attr, detach);
23702 #endif
23703         if( status ) return status;
23704         status = pthread_create( &t, &attr, task, NULL );
23705 #if HAVE_PTHREADS < 7
23706         if( status < 0 ) status = errno;
23707 #endif
23708         if( status ) return status;
23709 #else
23710         /* Draft 4 pthreads */
23711         status = pthread_create( &t, pthread_attr_default, task, NULL );
23712         if( status ) return errno;
23713
23714         /* give thread a chance to complete */
23715         /* it should remain joinable and hence detachable */
23716         sleep( 1 );
23717
23718         status = pthread_detach( &t );
23719         if( status ) return errno;
23720 #endif
23721
23722 #ifdef HAVE_LINUX_THREADS
23723         pthread_kill_other_threads_np();
23724 #endif
23725
23726         return 0;
23727
23728 }
23729
23730 _ACEOF
23731 rm -f conftest$ac_exeext
23732 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23733   (eval $ac_link) 2>&5
23734   ac_status=$?
23735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23736   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23737   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23738   (eval $ac_try) 2>&5
23739   ac_status=$?
23740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23741   (exit $ac_status); }; }; then
23742   ol_cv_pthread_lpthreads_lexc=yes
23743 else
23744   echo "$as_me: program exited with status $ac_status" >&5
23745 echo "$as_me: failed program was:" >&5
23746 sed 's/^/| /' conftest.$ac_ext >&5
23747
23748 ( exit $ac_status )
23749 ol_cv_pthread_lpthreads_lexc=no
23750 fi
23751 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23752 fi
23753
23754                 # restore the LIBS
23755                 LIBS="$ol_LIBS"
23756
23757 fi
23758 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lexc" >&5
23759 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lexc" >&6
23760
23761         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
23762                 ol_link_pthreads="-lpthreads -lexc"
23763                 ol_link_threads=posix
23764         fi
23765 fi
23766
23767
23768                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
23769 if test "$ol_link_threads" = no ; then
23770         # try -lpthreads
23771         echo "$as_me:$LINENO: checking for pthread link with -lpthreads" >&5
23772 echo $ECHO_N "checking for pthread link with -lpthreads... $ECHO_C" >&6
23773 if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then
23774   echo $ECHO_N "(cached) $ECHO_C" >&6
23775 else
23776
23777                 # save the flags
23778                 ol_LIBS="$LIBS"
23779                 LIBS="-lpthreads $LIBS"
23780
23781                 if test "$cross_compiling" = yes; then
23782   cat >conftest.$ac_ext <<_ACEOF
23783 /* confdefs.h.  */
23784 _ACEOF
23785 cat confdefs.h >>conftest.$ac_ext
23786 cat >>conftest.$ac_ext <<_ACEOF
23787 /* end confdefs.h.  */
23788
23789 /* pthread test headers */
23790 #include <pthread.h>
23791 #if HAVE_PTHREADS < 7
23792 #include <errno.h>
23793 #endif
23794 #ifndef NULL
23795 #define NULL (void*)0
23796 #endif
23797
23798 static void *task(p)
23799         void *p;
23800 {
23801         return (void *) (p == NULL);
23802 }
23803
23804 int
23805 main ()
23806 {
23807
23808         /* pthread test function */
23809 #ifndef PTHREAD_CREATE_DETACHED
23810 #define PTHREAD_CREATE_DETACHED 1
23811 #endif
23812         pthread_t t;
23813         int status;
23814         int detach = PTHREAD_CREATE_DETACHED;
23815
23816 #if HAVE_PTHREADS > 4
23817         /* Final pthreads */
23818         pthread_attr_t attr;
23819
23820         status = pthread_attr_init(&attr);
23821         if( status ) return status;
23822
23823 #if HAVE_PTHREADS < 7
23824         status = pthread_attr_setdetachstate(&attr, &detach);
23825         if( status < 0 ) status = errno;
23826 #else
23827         status = pthread_attr_setdetachstate(&attr, detach);
23828 #endif
23829         if( status ) return status;
23830         status = pthread_create( &t, &attr, task, NULL );
23831 #if HAVE_PTHREADS < 7
23832         if( status < 0 ) status = errno;
23833 #endif
23834         if( status ) return status;
23835 #else
23836         /* Draft 4 pthreads */
23837         status = pthread_create( &t, pthread_attr_default, task, NULL );
23838         if( status ) return errno;
23839
23840         /* give thread a chance to complete */
23841         /* it should remain joinable and hence detachable */
23842         sleep( 1 );
23843
23844         status = pthread_detach( &t );
23845         if( status ) return errno;
23846 #endif
23847
23848 #ifdef HAVE_LINUX_THREADS
23849         pthread_kill_other_threads_np();
23850 #endif
23851
23852         return 0;
23853
23854   ;
23855   return 0;
23856 }
23857 _ACEOF
23858 rm -f conftest.$ac_objext conftest$ac_exeext
23859 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23860   (eval $ac_link) 2>conftest.er1
23861   ac_status=$?
23862   grep -v '^ *+' conftest.er1 >conftest.err
23863   rm -f conftest.er1
23864   cat conftest.err >&5
23865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23866   (exit $ac_status); } &&
23867          { ac_try='test -z "$ac_c_werror_flag"
23868                          || test ! -s conftest.err'
23869   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23870   (eval $ac_try) 2>&5
23871   ac_status=$?
23872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23873   (exit $ac_status); }; } &&
23874          { ac_try='test -s conftest$ac_exeext'
23875   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23876   (eval $ac_try) 2>&5
23877   ac_status=$?
23878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23879   (exit $ac_status); }; }; then
23880   ol_cv_pthread_lib_lpthreads=yes
23881 else
23882   echo "$as_me: failed program was:" >&5
23883 sed 's/^/| /' conftest.$ac_ext >&5
23884
23885 ol_cv_pthread_lib_lpthreads=no
23886 fi
23887 rm -f conftest.err conftest.$ac_objext \
23888       conftest$ac_exeext conftest.$ac_ext
23889 else
23890   cat >conftest.$ac_ext <<_ACEOF
23891 /* confdefs.h.  */
23892 _ACEOF
23893 cat confdefs.h >>conftest.$ac_ext
23894 cat >>conftest.$ac_ext <<_ACEOF
23895 /* end confdefs.h.  */
23896
23897 /* pthread test headers */
23898 #include <pthread.h>
23899 #if HAVE_PTHREADS < 7
23900 #include <errno.h>
23901 #endif
23902 #ifndef NULL
23903 #define NULL (void*)0
23904 #endif
23905
23906 static void *task(p)
23907         void *p;
23908 {
23909         return (void *) (p == NULL);
23910 }
23911
23912
23913 int main(argc, argv)
23914         int argc;
23915         char **argv;
23916 {
23917
23918         /* pthread test function */
23919 #ifndef PTHREAD_CREATE_DETACHED
23920 #define PTHREAD_CREATE_DETACHED 1
23921 #endif
23922         pthread_t t;
23923         int status;
23924         int detach = PTHREAD_CREATE_DETACHED;
23925
23926 #if HAVE_PTHREADS > 4
23927         /* Final pthreads */
23928         pthread_attr_t attr;
23929
23930         status = pthread_attr_init(&attr);
23931         if( status ) return status;
23932
23933 #if HAVE_PTHREADS < 7
23934         status = pthread_attr_setdetachstate(&attr, &detach);
23935         if( status < 0 ) status = errno;
23936 #else
23937         status = pthread_attr_setdetachstate(&attr, detach);
23938 #endif
23939         if( status ) return status;
23940         status = pthread_create( &t, &attr, task, NULL );
23941 #if HAVE_PTHREADS < 7
23942         if( status < 0 ) status = errno;
23943 #endif
23944         if( status ) return status;
23945 #else
23946         /* Draft 4 pthreads */
23947         status = pthread_create( &t, pthread_attr_default, task, NULL );
23948         if( status ) return errno;
23949
23950         /* give thread a chance to complete */
23951         /* it should remain joinable and hence detachable */
23952         sleep( 1 );
23953
23954         status = pthread_detach( &t );
23955         if( status ) return errno;
23956 #endif
23957
23958 #ifdef HAVE_LINUX_THREADS
23959         pthread_kill_other_threads_np();
23960 #endif
23961
23962         return 0;
23963
23964 }
23965
23966 _ACEOF
23967 rm -f conftest$ac_exeext
23968 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23969   (eval $ac_link) 2>&5
23970   ac_status=$?
23971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23972   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23973   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23974   (eval $ac_try) 2>&5
23975   ac_status=$?
23976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23977   (exit $ac_status); }; }; then
23978   ol_cv_pthread_lib_lpthreads=yes
23979 else
23980   echo "$as_me: program exited with status $ac_status" >&5
23981 echo "$as_me: failed program was:" >&5
23982 sed 's/^/| /' conftest.$ac_ext >&5
23983
23984 ( exit $ac_status )
23985 ol_cv_pthread_lib_lpthreads=no
23986 fi
23987 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23988 fi
23989
23990                 # restore the LIBS
23991                 LIBS="$ol_LIBS"
23992
23993 fi
23994 echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthreads" >&5
23995 echo "${ECHO_T}$ol_cv_pthread_lib_lpthreads" >&6
23996
23997         if test $ol_cv_pthread_lib_lpthreads = yes ; then
23998                 ol_link_pthreads="-lpthreads"
23999                 ol_link_threads=posix
24000         fi
24001 fi
24002
24003
24004                 if test $ol_link_threads != no ; then
24005                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
24006
24007                                                 save_CPPFLAGS="$CPPFLAGS"
24008                         save_LIBS="$LIBS"
24009                         LIBS="$LTHREAD_LIBS $LIBS"
24010
24011
24012
24013
24014 for ac_func in sched_yield pthread_yield thr_yield
24015 do
24016 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24017 echo "$as_me:$LINENO: checking for $ac_func" >&5
24018 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24019 if eval "test \"\${$as_ac_var+set}\" = set"; then
24020   echo $ECHO_N "(cached) $ECHO_C" >&6
24021 else
24022   cat >conftest.$ac_ext <<_ACEOF
24023 /* confdefs.h.  */
24024 _ACEOF
24025 cat confdefs.h >>conftest.$ac_ext
24026 cat >>conftest.$ac_ext <<_ACEOF
24027 /* end confdefs.h.  */
24028 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24029    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24030 #define $ac_func innocuous_$ac_func
24031
24032 /* System header to define __stub macros and hopefully few prototypes,
24033     which can conflict with char $ac_func (); below.
24034     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24035     <limits.h> exists even on freestanding compilers.  */
24036
24037 #ifdef __STDC__
24038 # include <limits.h>
24039 #else
24040 # include <assert.h>
24041 #endif
24042
24043 #undef $ac_func
24044
24045 /* Override any gcc2 internal prototype to avoid an error.  */
24046 #ifdef __cplusplus
24047 extern "C"
24048 {
24049 #endif
24050 /* We use char because int might match the return type of a gcc2
24051    builtin and then its argument prototype would still apply.  */
24052 char $ac_func ();
24053 /* The GNU C library defines this for functions which it implements
24054     to always fail with ENOSYS.  Some functions are actually named
24055     something starting with __ and the normal name is an alias.  */
24056 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24057 choke me
24058 #else
24059 char (*f) () = $ac_func;
24060 #endif
24061 #ifdef __cplusplus
24062 }
24063 #endif
24064
24065 int
24066 main ()
24067 {
24068 return f != $ac_func;
24069   ;
24070   return 0;
24071 }
24072 _ACEOF
24073 rm -f conftest.$ac_objext conftest$ac_exeext
24074 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24075   (eval $ac_link) 2>conftest.er1
24076   ac_status=$?
24077   grep -v '^ *+' conftest.er1 >conftest.err
24078   rm -f conftest.er1
24079   cat conftest.err >&5
24080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24081   (exit $ac_status); } &&
24082          { ac_try='test -z "$ac_c_werror_flag"
24083                          || test ! -s conftest.err'
24084   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24085   (eval $ac_try) 2>&5
24086   ac_status=$?
24087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24088   (exit $ac_status); }; } &&
24089          { ac_try='test -s conftest$ac_exeext'
24090   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24091   (eval $ac_try) 2>&5
24092   ac_status=$?
24093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24094   (exit $ac_status); }; }; then
24095   eval "$as_ac_var=yes"
24096 else
24097   echo "$as_me: failed program was:" >&5
24098 sed 's/^/| /' conftest.$ac_ext >&5
24099
24100 eval "$as_ac_var=no"
24101 fi
24102 rm -f conftest.err conftest.$ac_objext \
24103       conftest$ac_exeext conftest.$ac_ext
24104 fi
24105 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24106 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24107 if test `eval echo '${'$as_ac_var'}'` = yes; then
24108   cat >>confdefs.h <<_ACEOF
24109 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24110 _ACEOF
24111
24112 fi
24113 done
24114
24115
24116                         if test $ac_cv_func_sched_yield = no &&
24117                            test $ac_cv_func_pthread_yield = no &&
24118                            test $ac_cv_func_thr_yield = no ; then
24119                                                                 echo "$as_me:$LINENO: checking for sched_yield in -lrt" >&5
24120 echo $ECHO_N "checking for sched_yield in -lrt... $ECHO_C" >&6
24121 if test "${ac_cv_lib_rt_sched_yield+set}" = set; then
24122   echo $ECHO_N "(cached) $ECHO_C" >&6
24123 else
24124   ac_check_lib_save_LIBS=$LIBS
24125 LIBS="-lrt  $LIBS"
24126 cat >conftest.$ac_ext <<_ACEOF
24127 /* confdefs.h.  */
24128 _ACEOF
24129 cat confdefs.h >>conftest.$ac_ext
24130 cat >>conftest.$ac_ext <<_ACEOF
24131 /* end confdefs.h.  */
24132
24133 /* Override any gcc2 internal prototype to avoid an error.  */
24134 #ifdef __cplusplus
24135 extern "C"
24136 #endif
24137 /* We use char because int might match the return type of a gcc2
24138    builtin and then its argument prototype would still apply.  */
24139 char sched_yield ();
24140 int
24141 main ()
24142 {
24143 sched_yield ();
24144   ;
24145   return 0;
24146 }
24147 _ACEOF
24148 rm -f conftest.$ac_objext conftest$ac_exeext
24149 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24150   (eval $ac_link) 2>conftest.er1
24151   ac_status=$?
24152   grep -v '^ *+' conftest.er1 >conftest.err
24153   rm -f conftest.er1
24154   cat conftest.err >&5
24155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24156   (exit $ac_status); } &&
24157          { ac_try='test -z "$ac_c_werror_flag"
24158                          || test ! -s conftest.err'
24159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24160   (eval $ac_try) 2>&5
24161   ac_status=$?
24162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24163   (exit $ac_status); }; } &&
24164          { ac_try='test -s conftest$ac_exeext'
24165   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24166   (eval $ac_try) 2>&5
24167   ac_status=$?
24168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24169   (exit $ac_status); }; }; then
24170   ac_cv_lib_rt_sched_yield=yes
24171 else
24172   echo "$as_me: failed program was:" >&5
24173 sed 's/^/| /' conftest.$ac_ext >&5
24174
24175 ac_cv_lib_rt_sched_yield=no
24176 fi
24177 rm -f conftest.err conftest.$ac_objext \
24178       conftest$ac_exeext conftest.$ac_ext
24179 LIBS=$ac_check_lib_save_LIBS
24180 fi
24181 echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_yield" >&5
24182 echo "${ECHO_T}$ac_cv_lib_rt_sched_yield" >&6
24183 if test $ac_cv_lib_rt_sched_yield = yes; then
24184   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
24185
24186 cat >>confdefs.h <<\_ACEOF
24187 #define HAVE_SCHED_YIELD 1
24188 _ACEOF
24189
24190                                         ac_cv_func_sched_yield=yes
24191 else
24192   ac_cv_func_sched_yield=no
24193 fi
24194
24195                         fi
24196                         if test $ac_cv_func_sched_yield = no &&
24197                            test $ac_cv_func_pthread_yield = no &&
24198                            test "$ac_cv_func_thr_yield" = no ; then
24199                                 { echo "$as_me:$LINENO: WARNING: could not locate sched_yield() or pthread_yield()" >&5
24200 echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
24201                         fi
24202
24203
24204
24205 for ac_func in pthread_kill pthread_rwlock_destroy
24206 do
24207 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24208 echo "$as_me:$LINENO: checking for $ac_func" >&5
24209 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24210 if eval "test \"\${$as_ac_var+set}\" = set"; then
24211   echo $ECHO_N "(cached) $ECHO_C" >&6
24212 else
24213   cat >conftest.$ac_ext <<_ACEOF
24214 /* confdefs.h.  */
24215 _ACEOF
24216 cat confdefs.h >>conftest.$ac_ext
24217 cat >>conftest.$ac_ext <<_ACEOF
24218 /* end confdefs.h.  */
24219 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24220    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24221 #define $ac_func innocuous_$ac_func
24222
24223 /* System header to define __stub macros and hopefully few prototypes,
24224     which can conflict with char $ac_func (); below.
24225     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24226     <limits.h> exists even on freestanding compilers.  */
24227
24228 #ifdef __STDC__
24229 # include <limits.h>
24230 #else
24231 # include <assert.h>
24232 #endif
24233
24234 #undef $ac_func
24235
24236 /* Override any gcc2 internal prototype to avoid an error.  */
24237 #ifdef __cplusplus
24238 extern "C"
24239 {
24240 #endif
24241 /* We use char because int might match the return type of a gcc2
24242    builtin and then its argument prototype would still apply.  */
24243 char $ac_func ();
24244 /* The GNU C library defines this for functions which it implements
24245     to always fail with ENOSYS.  Some functions are actually named
24246     something starting with __ and the normal name is an alias.  */
24247 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24248 choke me
24249 #else
24250 char (*f) () = $ac_func;
24251 #endif
24252 #ifdef __cplusplus
24253 }
24254 #endif
24255
24256 int
24257 main ()
24258 {
24259 return f != $ac_func;
24260   ;
24261   return 0;
24262 }
24263 _ACEOF
24264 rm -f conftest.$ac_objext conftest$ac_exeext
24265 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24266   (eval $ac_link) 2>conftest.er1
24267   ac_status=$?
24268   grep -v '^ *+' conftest.er1 >conftest.err
24269   rm -f conftest.er1
24270   cat conftest.err >&5
24271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24272   (exit $ac_status); } &&
24273          { ac_try='test -z "$ac_c_werror_flag"
24274                          || test ! -s conftest.err'
24275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24276   (eval $ac_try) 2>&5
24277   ac_status=$?
24278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24279   (exit $ac_status); }; } &&
24280          { ac_try='test -s conftest$ac_exeext'
24281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24282   (eval $ac_try) 2>&5
24283   ac_status=$?
24284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24285   (exit $ac_status); }; }; then
24286   eval "$as_ac_var=yes"
24287 else
24288   echo "$as_me: failed program was:" >&5
24289 sed 's/^/| /' conftest.$ac_ext >&5
24290
24291 eval "$as_ac_var=no"
24292 fi
24293 rm -f conftest.err conftest.$ac_objext \
24294       conftest$ac_exeext conftest.$ac_ext
24295 fi
24296 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24297 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24298 if test `eval echo '${'$as_ac_var'}'` = yes; then
24299   cat >>confdefs.h <<_ACEOF
24300 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24301 _ACEOF
24302
24303 fi
24304 done
24305
24306
24307                                                                         echo "$as_me:$LINENO: checking for pthread_detach with <pthread.h>" >&5
24308 echo $ECHO_N "checking for pthread_detach with <pthread.h>... $ECHO_C" >&6
24309 if test "${ol_cv_func_pthread_detach+set}" = set; then
24310   echo $ECHO_N "(cached) $ECHO_C" >&6
24311 else
24312
24313                                                                 cat >conftest.$ac_ext <<_ACEOF
24314 /* confdefs.h.  */
24315 _ACEOF
24316 cat confdefs.h >>conftest.$ac_ext
24317 cat >>conftest.$ac_ext <<_ACEOF
24318 /* end confdefs.h.  */
24319
24320 #include <pthread.h>
24321 #ifndef NULL
24322 #define NULL (void*)0
24323 #endif
24324
24325 int
24326 main ()
24327 {
24328 pthread_detach(NULL);
24329   ;
24330   return 0;
24331 }
24332 _ACEOF
24333 rm -f conftest.$ac_objext conftest$ac_exeext
24334 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24335   (eval $ac_link) 2>conftest.er1
24336   ac_status=$?
24337   grep -v '^ *+' conftest.er1 >conftest.err
24338   rm -f conftest.er1
24339   cat conftest.err >&5
24340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24341   (exit $ac_status); } &&
24342          { ac_try='test -z "$ac_c_werror_flag"
24343                          || test ! -s conftest.err'
24344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24345   (eval $ac_try) 2>&5
24346   ac_status=$?
24347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24348   (exit $ac_status); }; } &&
24349          { ac_try='test -s conftest$ac_exeext'
24350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24351   (eval $ac_try) 2>&5
24352   ac_status=$?
24353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24354   (exit $ac_status); }; }; then
24355   ol_cv_func_pthread_detach=yes
24356 else
24357   echo "$as_me: failed program was:" >&5
24358 sed 's/^/| /' conftest.$ac_ext >&5
24359
24360 ol_cv_func_pthread_detach=no
24361 fi
24362 rm -f conftest.err conftest.$ac_objext \
24363       conftest$ac_exeext conftest.$ac_ext
24364
24365 fi
24366 echo "$as_me:$LINENO: result: $ol_cv_func_pthread_detach" >&5
24367 echo "${ECHO_T}$ol_cv_func_pthread_detach" >&6
24368
24369                         if test $ol_cv_func_pthread_detach = no ; then
24370                                 { { echo "$as_me:$LINENO: error: could not locate pthread_detach()" >&5
24371 echo "$as_me: error: could not locate pthread_detach()" >&2;}
24372    { (exit 1); exit 1; }; }
24373                         fi
24374
24375
24376 cat >>confdefs.h <<\_ACEOF
24377 #define HAVE_PTHREAD_DETACH 1
24378 _ACEOF
24379
24380
24381
24382
24383
24384
24385 for ac_func in \
24386                                 pthread_setconcurrency \
24387                                 pthread_getconcurrency \
24388                                 thr_setconcurrency \
24389                                 thr_getconcurrency \
24390
24391 do
24392 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24393 echo "$as_me:$LINENO: checking for $ac_func" >&5
24394 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24395 if eval "test \"\${$as_ac_var+set}\" = set"; then
24396   echo $ECHO_N "(cached) $ECHO_C" >&6
24397 else
24398   cat >conftest.$ac_ext <<_ACEOF
24399 /* confdefs.h.  */
24400 _ACEOF
24401 cat confdefs.h >>conftest.$ac_ext
24402 cat >>conftest.$ac_ext <<_ACEOF
24403 /* end confdefs.h.  */
24404 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24405    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24406 #define $ac_func innocuous_$ac_func
24407
24408 /* System header to define __stub macros and hopefully few prototypes,
24409     which can conflict with char $ac_func (); below.
24410     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24411     <limits.h> exists even on freestanding compilers.  */
24412
24413 #ifdef __STDC__
24414 # include <limits.h>
24415 #else
24416 # include <assert.h>
24417 #endif
24418
24419 #undef $ac_func
24420
24421 /* Override any gcc2 internal prototype to avoid an error.  */
24422 #ifdef __cplusplus
24423 extern "C"
24424 {
24425 #endif
24426 /* We use char because int might match the return type of a gcc2
24427    builtin and then its argument prototype would still apply.  */
24428 char $ac_func ();
24429 /* The GNU C library defines this for functions which it implements
24430     to always fail with ENOSYS.  Some functions are actually named
24431     something starting with __ and the normal name is an alias.  */
24432 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24433 choke me
24434 #else
24435 char (*f) () = $ac_func;
24436 #endif
24437 #ifdef __cplusplus
24438 }
24439 #endif
24440
24441 int
24442 main ()
24443 {
24444 return f != $ac_func;
24445   ;
24446   return 0;
24447 }
24448 _ACEOF
24449 rm -f conftest.$ac_objext conftest$ac_exeext
24450 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24451   (eval $ac_link) 2>conftest.er1
24452   ac_status=$?
24453   grep -v '^ *+' conftest.er1 >conftest.err
24454   rm -f conftest.er1
24455   cat conftest.err >&5
24456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24457   (exit $ac_status); } &&
24458          { ac_try='test -z "$ac_c_werror_flag"
24459                          || test ! -s conftest.err'
24460   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24461   (eval $ac_try) 2>&5
24462   ac_status=$?
24463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24464   (exit $ac_status); }; } &&
24465          { ac_try='test -s conftest$ac_exeext'
24466   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24467   (eval $ac_try) 2>&5
24468   ac_status=$?
24469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24470   (exit $ac_status); }; }; then
24471   eval "$as_ac_var=yes"
24472 else
24473   echo "$as_me: failed program was:" >&5
24474 sed 's/^/| /' conftest.$ac_ext >&5
24475
24476 eval "$as_ac_var=no"
24477 fi
24478 rm -f conftest.err conftest.$ac_objext \
24479       conftest$ac_exeext conftest.$ac_ext
24480 fi
24481 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24482 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24483 if test `eval echo '${'$as_ac_var'}'` = yes; then
24484   cat >>confdefs.h <<_ACEOF
24485 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24486 _ACEOF
24487
24488 fi
24489 done
24490
24491
24492
24493
24494 for ac_func in pthread_kill_other_threads_np
24495 do
24496 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24497 echo "$as_me:$LINENO: checking for $ac_func" >&5
24498 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24499 if eval "test \"\${$as_ac_var+set}\" = set"; then
24500   echo $ECHO_N "(cached) $ECHO_C" >&6
24501 else
24502   cat >conftest.$ac_ext <<_ACEOF
24503 /* confdefs.h.  */
24504 _ACEOF
24505 cat confdefs.h >>conftest.$ac_ext
24506 cat >>conftest.$ac_ext <<_ACEOF
24507 /* end confdefs.h.  */
24508 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24509    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24510 #define $ac_func innocuous_$ac_func
24511
24512 /* System header to define __stub macros and hopefully few prototypes,
24513     which can conflict with char $ac_func (); below.
24514     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24515     <limits.h> exists even on freestanding compilers.  */
24516
24517 #ifdef __STDC__
24518 # include <limits.h>
24519 #else
24520 # include <assert.h>
24521 #endif
24522
24523 #undef $ac_func
24524
24525 /* Override any gcc2 internal prototype to avoid an error.  */
24526 #ifdef __cplusplus
24527 extern "C"
24528 {
24529 #endif
24530 /* We use char because int might match the return type of a gcc2
24531    builtin and then its argument prototype would still apply.  */
24532 char $ac_func ();
24533 /* The GNU C library defines this for functions which it implements
24534     to always fail with ENOSYS.  Some functions are actually named
24535     something starting with __ and the normal name is an alias.  */
24536 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24537 choke me
24538 #else
24539 char (*f) () = $ac_func;
24540 #endif
24541 #ifdef __cplusplus
24542 }
24543 #endif
24544
24545 int
24546 main ()
24547 {
24548 return f != $ac_func;
24549   ;
24550   return 0;
24551 }
24552 _ACEOF
24553 rm -f conftest.$ac_objext conftest$ac_exeext
24554 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24555   (eval $ac_link) 2>conftest.er1
24556   ac_status=$?
24557   grep -v '^ *+' conftest.er1 >conftest.err
24558   rm -f conftest.er1
24559   cat conftest.err >&5
24560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24561   (exit $ac_status); } &&
24562          { ac_try='test -z "$ac_c_werror_flag"
24563                          || test ! -s conftest.err'
24564   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24565   (eval $ac_try) 2>&5
24566   ac_status=$?
24567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24568   (exit $ac_status); }; } &&
24569          { ac_try='test -s conftest$ac_exeext'
24570   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24571   (eval $ac_try) 2>&5
24572   ac_status=$?
24573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24574   (exit $ac_status); }; }; then
24575   eval "$as_ac_var=yes"
24576 else
24577   echo "$as_me: failed program was:" >&5
24578 sed 's/^/| /' conftest.$ac_ext >&5
24579
24580 eval "$as_ac_var=no"
24581 fi
24582 rm -f conftest.err conftest.$ac_objext \
24583       conftest$ac_exeext conftest.$ac_ext
24584 fi
24585 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24586 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24587 if test `eval echo '${'$as_ac_var'}'` = yes; then
24588   cat >>confdefs.h <<_ACEOF
24589 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24590 _ACEOF
24591
24592 fi
24593 done
24594
24595         echo "$as_me:$LINENO: checking for LinuxThreads implementation" >&5
24596 echo $ECHO_N "checking for LinuxThreads implementation... $ECHO_C" >&6
24597 if test "${ol_cv_sys_linux_threads+set}" = set; then
24598   echo $ECHO_N "(cached) $ECHO_C" >&6
24599 else
24600   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
24601 fi
24602 echo "$as_me:$LINENO: result: $ol_cv_sys_linux_threads" >&5
24603 echo "${ECHO_T}$ol_cv_sys_linux_threads" >&6
24604
24605
24606
24607
24608         echo "$as_me:$LINENO: checking for LinuxThreads consistency" >&5
24609 echo $ECHO_N "checking for LinuxThreads consistency... $ECHO_C" >&6
24610 if test "${ol_cv_linux_threads+set}" = set; then
24611   echo $ECHO_N "(cached) $ECHO_C" >&6
24612 else
24613
24614                 if test $ol_cv_header_linux_threads = yes &&
24615                    test $ol_cv_sys_linux_threads = yes; then
24616                         ol_cv_linux_threads=yes
24617                 elif test $ol_cv_header_linux_threads = no &&
24618                      test $ol_cv_sys_linux_threads = no; then
24619                         ol_cv_linux_threads=no
24620                 else
24621                         ol_cv_linux_threads=error
24622                 fi
24623
24624 fi
24625 echo "$as_me:$LINENO: result: $ol_cv_linux_threads" >&5
24626 echo "${ECHO_T}$ol_cv_linux_threads" >&6
24627
24628
24629                         if test $ol_cv_linux_threads = error; then
24630                                 { { echo "$as_me:$LINENO: error: LinuxThreads header/library mismatch" >&5
24631 echo "$as_me: error: LinuxThreads header/library mismatch" >&2;}
24632    { (exit 1); exit 1; }; };
24633                         fi
24634
24635                         echo "$as_me:$LINENO: checking if pthread_create() works" >&5
24636 echo $ECHO_N "checking if pthread_create() works... $ECHO_C" >&6
24637 if test "${ol_cv_pthread_create_works+set}" = set; then
24638   echo $ECHO_N "(cached) $ECHO_C" >&6
24639 else
24640
24641                         if test "$cross_compiling" = yes; then
24642                                 ol_cv_pthread_create_works=yes
24643 else
24644   cat >conftest.$ac_ext <<_ACEOF
24645 /* confdefs.h.  */
24646 _ACEOF
24647 cat confdefs.h >>conftest.$ac_ext
24648 cat >>conftest.$ac_ext <<_ACEOF
24649 /* end confdefs.h.  */
24650
24651 /* pthread test headers */
24652 #include <pthread.h>
24653 #if HAVE_PTHREADS < 7
24654 #include <errno.h>
24655 #endif
24656 #ifndef NULL
24657 #define NULL (void*)0
24658 #endif
24659
24660 static void *task(p)
24661         void *p;
24662 {
24663         return (void *) (p == NULL);
24664 }
24665
24666
24667 int main(argc, argv)
24668         int argc;
24669         char **argv;
24670 {
24671
24672         /* pthread test function */
24673 #ifndef PTHREAD_CREATE_DETACHED
24674 #define PTHREAD_CREATE_DETACHED 1
24675 #endif
24676         pthread_t t;
24677         int status;
24678         int detach = PTHREAD_CREATE_DETACHED;
24679
24680 #if HAVE_PTHREADS > 4
24681         /* Final pthreads */
24682         pthread_attr_t attr;
24683
24684         status = pthread_attr_init(&attr);
24685         if( status ) return status;
24686
24687 #if HAVE_PTHREADS < 7
24688         status = pthread_attr_setdetachstate(&attr, &detach);
24689         if( status < 0 ) status = errno;
24690 #else
24691         status = pthread_attr_setdetachstate(&attr, detach);
24692 #endif
24693         if( status ) return status;
24694         status = pthread_create( &t, &attr, task, NULL );
24695 #if HAVE_PTHREADS < 7
24696         if( status < 0 ) status = errno;
24697 #endif
24698         if( status ) return status;
24699 #else
24700         /* Draft 4 pthreads */
24701         status = pthread_create( &t, pthread_attr_default, task, NULL );
24702         if( status ) return errno;
24703
24704         /* give thread a chance to complete */
24705         /* it should remain joinable and hence detachable */
24706         sleep( 1 );
24707
24708         status = pthread_detach( &t );
24709         if( status ) return errno;
24710 #endif
24711
24712 #ifdef HAVE_LINUX_THREADS
24713         pthread_kill_other_threads_np();
24714 #endif
24715
24716         return 0;
24717
24718 }
24719
24720 _ACEOF
24721 rm -f conftest$ac_exeext
24722 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24723   (eval $ac_link) 2>&5
24724   ac_status=$?
24725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24726   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24727   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24728   (eval $ac_try) 2>&5
24729   ac_status=$?
24730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24731   (exit $ac_status); }; }; then
24732   ol_cv_pthread_create_works=yes
24733 else
24734   echo "$as_me: program exited with status $ac_status" >&5
24735 echo "$as_me: failed program was:" >&5
24736 sed 's/^/| /' conftest.$ac_ext >&5
24737
24738 ( exit $ac_status )
24739 ol_cv_pthread_create_works=no
24740 fi
24741 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24742 fi
24743 fi
24744 echo "$as_me:$LINENO: result: $ol_cv_pthread_create_works" >&5
24745 echo "${ECHO_T}$ol_cv_pthread_create_works" >&6
24746
24747                         if test $ol_cv_pthread_create_works = no ; then
24748                                 { { echo "$as_me:$LINENO: error: pthread_create is not usable, check environment settings" >&5
24749 echo "$as_me: error: pthread_create is not usable, check environment settings" >&2;}
24750    { (exit 1); exit 1; }; }
24751                         fi
24752
24753                         ol_replace_broken_yield=no
24754
24755                         if test $ol_replace_broken_yield = yes ; then
24756
24757 cat >>confdefs.h <<\_ACEOF
24758 #define REPLACE_BROKEN_YIELD 1
24759 _ACEOF
24760
24761                         fi
24762
24763                                                 if test $ol_with_yielding_select = auto ; then
24764                                 echo "$as_me:$LINENO: checking if select yields when using pthreads" >&5
24765 echo $ECHO_N "checking if select yields when using pthreads... $ECHO_C" >&6
24766 if test "${ol_cv_pthread_select_yields+set}" = set; then
24767   echo $ECHO_N "(cached) $ECHO_C" >&6
24768 else
24769
24770                                 if test "$cross_compiling" = yes; then
24771   ol_cv_pthread_select_yields=cross
24772 else
24773   cat >conftest.$ac_ext <<_ACEOF
24774 /* confdefs.h.  */
24775 _ACEOF
24776 cat confdefs.h >>conftest.$ac_ext
24777 cat >>conftest.$ac_ext <<_ACEOF
24778 /* end confdefs.h.  */
24779
24780 #include <sys/types.h>
24781 #include <sys/time.h>
24782 #include <unistd.h>
24783 #include <pthread.h>
24784 #ifndef NULL
24785 #define NULL (void*) 0
24786 #endif
24787
24788 static int fildes[2];
24789
24790 static void *task(p)
24791         void *p;
24792 {
24793         int i;
24794         struct timeval tv;
24795
24796         fd_set rfds;
24797
24798         tv.tv_sec=10;
24799         tv.tv_usec=0;
24800
24801         FD_ZERO(&rfds);
24802         FD_SET(fildes[0], &rfds);
24803
24804         /* we're not interested in any fds */
24805         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
24806
24807         if(i < 0) {
24808                 perror("select");
24809                 exit(10);
24810         }
24811
24812         exit(0); /* if we exit here, the select blocked the whole process */
24813 }
24814
24815 int main(argc, argv)
24816         int argc;
24817         char **argv;
24818 {
24819         pthread_t t;
24820
24821         /* create a pipe to select */
24822         if(pipe(&fildes[0])) {
24823                 perror("select");
24824                 exit(1);
24825         }
24826
24827 #ifdef HAVE_PTHREAD_SETCONCURRENCY
24828         (void) pthread_setconcurrency(2);
24829 #else
24830 #ifdef HAVE_THR_SETCONCURRENCY
24831         /* Set Solaris LWP concurrency to 2 */
24832         thr_setconcurrency(2);
24833 #endif
24834 #endif
24835
24836 #if HAVE_PTHREADS < 6
24837         pthread_create(&t, pthread_attr_default, task, NULL);
24838 #else
24839         pthread_create(&t, NULL, task, NULL);
24840 #endif
24841
24842         /* make sure task runs first */
24843 #if HAVE_THR_YIELD
24844         thr_yield();
24845 #elif defined( HAVE_SCHED_YIELD )
24846         sched_yield();
24847 #elif defined( HAVE_PTHREAD_YIELD )
24848         pthread_yield();
24849 #endif
24850
24851         exit(2);
24852 }
24853 _ACEOF
24854 rm -f conftest$ac_exeext
24855 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24856   (eval $ac_link) 2>&5
24857   ac_status=$?
24858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24859   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24860   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24861   (eval $ac_try) 2>&5
24862   ac_status=$?
24863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24864   (exit $ac_status); }; }; then
24865   ol_cv_pthread_select_yields=no
24866 else
24867   echo "$as_me: program exited with status $ac_status" >&5
24868 echo "$as_me: failed program was:" >&5
24869 sed 's/^/| /' conftest.$ac_ext >&5
24870
24871 ( exit $ac_status )
24872 ol_cv_pthread_select_yields=yes
24873 fi
24874 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24875 fi
24876 fi
24877 echo "$as_me:$LINENO: result: $ol_cv_pthread_select_yields" >&5
24878 echo "${ECHO_T}$ol_cv_pthread_select_yields" >&6
24879
24880                                 if test $ol_cv_pthread_select_yields = cross ; then
24881                                         { { echo "$as_me:$LINENO: error: crossing compiling: use --with-yielding_select=yes|no|manual" >&5
24882 echo "$as_me: error: crossing compiling: use --with-yielding_select=yes|no|manual" >&2;}
24883    { (exit 1); exit 1; }; }
24884                                 fi
24885
24886                                 if test $ol_cv_pthread_select_yields = yes ; then
24887                                         ol_with_yielding_select=yes
24888                                 fi
24889                         fi
24890
24891                                                 CPPFLAGS="$save_CPPFLAGS"
24892                         LIBS="$save_LIBS"
24893                 else
24894                         { { echo "$as_me:$LINENO: error: could not locate usable POSIX Threads" >&5
24895 echo "$as_me: error: could not locate usable POSIX Threads" >&2;}
24896    { (exit 1); exit 1; }; }
24897                 fi
24898         fi
24899
24900         if test $ol_with_threads = posix ; then
24901                 { { echo "$as_me:$LINENO: error: could not locate POSIX Threads" >&5
24902 echo "$as_me: error: could not locate POSIX Threads" >&2;}
24903    { (exit 1); exit 1; }; }
24904         fi
24905         ;;
24906 esac
24907
24908 case $ol_with_threads in auto | yes | mach)
24909
24910
24911
24912 for ac_header in mach/cthreads.h cthreads.h
24913 do
24914 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24915 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24916   echo "$as_me:$LINENO: checking for $ac_header" >&5
24917 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24918 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24919   echo $ECHO_N "(cached) $ECHO_C" >&6
24920 fi
24921 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
24922 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24923 else
24924   # Is the header compilable?
24925 echo "$as_me:$LINENO: checking $ac_header usability" >&5
24926 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
24927 cat >conftest.$ac_ext <<_ACEOF
24928 /* confdefs.h.  */
24929 _ACEOF
24930 cat confdefs.h >>conftest.$ac_ext
24931 cat >>conftest.$ac_ext <<_ACEOF
24932 /* end confdefs.h.  */
24933 $ac_includes_default
24934 #include <$ac_header>
24935 _ACEOF
24936 rm -f conftest.$ac_objext
24937 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
24938   (eval $ac_compile) 2>conftest.er1
24939   ac_status=$?
24940   grep -v '^ *+' conftest.er1 >conftest.err
24941   rm -f conftest.er1
24942   cat conftest.err >&5
24943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24944   (exit $ac_status); } &&
24945          { ac_try='test -z "$ac_c_werror_flag"
24946                          || test ! -s conftest.err'
24947   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24948   (eval $ac_try) 2>&5
24949   ac_status=$?
24950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24951   (exit $ac_status); }; } &&
24952          { ac_try='test -s conftest.$ac_objext'
24953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24954   (eval $ac_try) 2>&5
24955   ac_status=$?
24956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24957   (exit $ac_status); }; }; then
24958   ac_header_compiler=yes
24959 else
24960   echo "$as_me: failed program was:" >&5
24961 sed 's/^/| /' conftest.$ac_ext >&5
24962
24963 ac_header_compiler=no
24964 fi
24965 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
24966 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24967 echo "${ECHO_T}$ac_header_compiler" >&6
24968
24969 # Is the header present?
24970 echo "$as_me:$LINENO: checking $ac_header presence" >&5
24971 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
24972 cat >conftest.$ac_ext <<_ACEOF
24973 /* confdefs.h.  */
24974 _ACEOF
24975 cat confdefs.h >>conftest.$ac_ext
24976 cat >>conftest.$ac_ext <<_ACEOF
24977 /* end confdefs.h.  */
24978 #include <$ac_header>
24979 _ACEOF
24980 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
24981   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24982   ac_status=$?
24983   grep -v '^ *+' conftest.er1 >conftest.err
24984   rm -f conftest.er1
24985   cat conftest.err >&5
24986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24987   (exit $ac_status); } >/dev/null; then
24988   if test -s conftest.err; then
24989     ac_cpp_err=$ac_c_preproc_warn_flag
24990     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
24991   else
24992     ac_cpp_err=
24993   fi
24994 else
24995   ac_cpp_err=yes
24996 fi
24997 if test -z "$ac_cpp_err"; then
24998   ac_header_preproc=yes
24999 else
25000   echo "$as_me: failed program was:" >&5
25001 sed 's/^/| /' conftest.$ac_ext >&5
25002
25003   ac_header_preproc=no
25004 fi
25005 rm -f conftest.err conftest.$ac_ext
25006 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25007 echo "${ECHO_T}$ac_header_preproc" >&6
25008
25009 # So?  What about this header?
25010 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25011   yes:no: )
25012     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25013 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25014     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25015 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25016     ac_header_preproc=yes
25017     ;;
25018   no:yes:* )
25019     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25020 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25021     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25022 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25023     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25024 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25025     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25026 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25027     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25028 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25029     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25030 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25031     (
25032       cat <<\_ASBOX
25033 ## --------------------------------------------- ##
25034 ## Report this to <http://www.openldap.org/its/> ##
25035 ## --------------------------------------------- ##
25036 _ASBOX
25037     ) |
25038       sed "s/^/$as_me: WARNING:     /" >&2
25039     ;;
25040 esac
25041 echo "$as_me:$LINENO: checking for $ac_header" >&5
25042 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25043 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25044   echo $ECHO_N "(cached) $ECHO_C" >&6
25045 else
25046   eval "$as_ac_Header=\$ac_header_preproc"
25047 fi
25048 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25049 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25050
25051 fi
25052 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25053   cat >>confdefs.h <<_ACEOF
25054 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25055 _ACEOF
25056
25057 fi
25058
25059 done
25060
25061         if test $ac_cv_header_mach_cthreads_h = yes ; then
25062                 ol_with_threads=found
25063
25064                                 echo "$as_me:$LINENO: checking for cthread_fork" >&5
25065 echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6
25066 if test "${ac_cv_func_cthread_fork+set}" = set; then
25067   echo $ECHO_N "(cached) $ECHO_C" >&6
25068 else
25069   cat >conftest.$ac_ext <<_ACEOF
25070 /* confdefs.h.  */
25071 _ACEOF
25072 cat confdefs.h >>conftest.$ac_ext
25073 cat >>conftest.$ac_ext <<_ACEOF
25074 /* end confdefs.h.  */
25075 /* Define cthread_fork to an innocuous variant, in case <limits.h> declares cthread_fork.
25076    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
25077 #define cthread_fork innocuous_cthread_fork
25078
25079 /* System header to define __stub macros and hopefully few prototypes,
25080     which can conflict with char cthread_fork (); below.
25081     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25082     <limits.h> exists even on freestanding compilers.  */
25083
25084 #ifdef __STDC__
25085 # include <limits.h>
25086 #else
25087 # include <assert.h>
25088 #endif
25089
25090 #undef cthread_fork
25091
25092 /* Override any gcc2 internal prototype to avoid an error.  */
25093 #ifdef __cplusplus
25094 extern "C"
25095 {
25096 #endif
25097 /* We use char because int might match the return type of a gcc2
25098    builtin and then its argument prototype would still apply.  */
25099 char cthread_fork ();
25100 /* The GNU C library defines this for functions which it implements
25101     to always fail with ENOSYS.  Some functions are actually named
25102     something starting with __ and the normal name is an alias.  */
25103 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
25104 choke me
25105 #else
25106 char (*f) () = cthread_fork;
25107 #endif
25108 #ifdef __cplusplus
25109 }
25110 #endif
25111
25112 int
25113 main ()
25114 {
25115 return f != cthread_fork;
25116   ;
25117   return 0;
25118 }
25119 _ACEOF
25120 rm -f conftest.$ac_objext conftest$ac_exeext
25121 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25122   (eval $ac_link) 2>conftest.er1
25123   ac_status=$?
25124   grep -v '^ *+' conftest.er1 >conftest.err
25125   rm -f conftest.er1
25126   cat conftest.err >&5
25127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25128   (exit $ac_status); } &&
25129          { ac_try='test -z "$ac_c_werror_flag"
25130                          || test ! -s conftest.err'
25131   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25132   (eval $ac_try) 2>&5
25133   ac_status=$?
25134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25135   (exit $ac_status); }; } &&
25136          { ac_try='test -s conftest$ac_exeext'
25137   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25138   (eval $ac_try) 2>&5
25139   ac_status=$?
25140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25141   (exit $ac_status); }; }; then
25142   ac_cv_func_cthread_fork=yes
25143 else
25144   echo "$as_me: failed program was:" >&5
25145 sed 's/^/| /' conftest.$ac_ext >&5
25146
25147 ac_cv_func_cthread_fork=no
25148 fi
25149 rm -f conftest.err conftest.$ac_objext \
25150       conftest$ac_exeext conftest.$ac_ext
25151 fi
25152 echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5
25153 echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6
25154 if test $ac_cv_func_cthread_fork = yes; then
25155   ol_link_threads=yes
25156 fi
25157
25158
25159                 if test $ol_link_threads = no ; then
25160                                                                         echo "$as_me:$LINENO: checking for cthread_fork with -all_load" >&5
25161 echo $ECHO_N "checking for cthread_fork with -all_load... $ECHO_C" >&6
25162 if test "${ol_cv_cthread_all_load+set}" = set; then
25163   echo $ECHO_N "(cached) $ECHO_C" >&6
25164 else
25165
25166                                                                 save_LIBS="$LIBS"
25167                                 LIBS="-all_load $LIBS"
25168                                 cat >conftest.$ac_ext <<_ACEOF
25169 /* confdefs.h.  */
25170 _ACEOF
25171 cat confdefs.h >>conftest.$ac_ext
25172 cat >>conftest.$ac_ext <<_ACEOF
25173 /* end confdefs.h.  */
25174 #include <mach/cthreads.h>
25175 int
25176 main ()
25177 {
25178
25179                                         cthread_fork((void *)0, (void *)0);
25180
25181   ;
25182   return 0;
25183 }
25184 _ACEOF
25185 rm -f conftest.$ac_objext conftest$ac_exeext
25186 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25187   (eval $ac_link) 2>conftest.er1
25188   ac_status=$?
25189   grep -v '^ *+' conftest.er1 >conftest.err
25190   rm -f conftest.er1
25191   cat conftest.err >&5
25192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25193   (exit $ac_status); } &&
25194          { ac_try='test -z "$ac_c_werror_flag"
25195                          || test ! -s conftest.err'
25196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25197   (eval $ac_try) 2>&5
25198   ac_status=$?
25199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25200   (exit $ac_status); }; } &&
25201          { ac_try='test -s conftest$ac_exeext'
25202   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25203   (eval $ac_try) 2>&5
25204   ac_status=$?
25205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25206   (exit $ac_status); }; }; then
25207   ol_cv_cthread_all_load=yes
25208 else
25209   echo "$as_me: failed program was:" >&5
25210 sed 's/^/| /' conftest.$ac_ext >&5
25211
25212 ol_cv_cthread_all_load=no
25213 fi
25214 rm -f conftest.err conftest.$ac_objext \
25215       conftest$ac_exeext conftest.$ac_ext
25216                                                                 LIBS="$save_LIBS"
25217
25218 fi
25219 echo "$as_me:$LINENO: result: $ol_cv_cthread_all_load" >&5
25220 echo "${ECHO_T}$ol_cv_cthread_all_load" >&6
25221
25222                         if test $ol_cv_cthread_all_load = yes ; then
25223                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
25224                                 ol_link_threads=mach
25225                                 ol_with_threads=found
25226                         fi
25227                 fi
25228
25229         elif test $ac_cv_header_cthreads_h = yes ; then
25230
25231                 ol_with_threads=found
25232
25233                                 save_LIBS="$LIBS"
25234                 LIBS="$LIBS -lthreads"
25235                 echo "$as_me:$LINENO: checking for cthread_fork" >&5
25236 echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6
25237 if test "${ac_cv_func_cthread_fork+set}" = set; then
25238   echo $ECHO_N "(cached) $ECHO_C" >&6
25239 else
25240   cat >conftest.$ac_ext <<_ACEOF
25241 /* confdefs.h.  */
25242 _ACEOF
25243 cat confdefs.h >>conftest.$ac_ext
25244 cat >>conftest.$ac_ext <<_ACEOF
25245 /* end confdefs.h.  */
25246 /* Define cthread_fork to an innocuous variant, in case <limits.h> declares cthread_fork.
25247    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
25248 #define cthread_fork innocuous_cthread_fork
25249
25250 /* System header to define __stub macros and hopefully few prototypes,
25251     which can conflict with char cthread_fork (); below.
25252     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25253     <limits.h> exists even on freestanding compilers.  */
25254
25255 #ifdef __STDC__
25256 # include <limits.h>
25257 #else
25258 # include <assert.h>
25259 #endif
25260
25261 #undef cthread_fork
25262
25263 /* Override any gcc2 internal prototype to avoid an error.  */
25264 #ifdef __cplusplus
25265 extern "C"
25266 {
25267 #endif
25268 /* We use char because int might match the return type of a gcc2
25269    builtin and then its argument prototype would still apply.  */
25270 char cthread_fork ();
25271 /* The GNU C library defines this for functions which it implements
25272     to always fail with ENOSYS.  Some functions are actually named
25273     something starting with __ and the normal name is an alias.  */
25274 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
25275 choke me
25276 #else
25277 char (*f) () = cthread_fork;
25278 #endif
25279 #ifdef __cplusplus
25280 }
25281 #endif
25282
25283 int
25284 main ()
25285 {
25286 return f != cthread_fork;
25287   ;
25288   return 0;
25289 }
25290 _ACEOF
25291 rm -f conftest.$ac_objext conftest$ac_exeext
25292 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25293   (eval $ac_link) 2>conftest.er1
25294   ac_status=$?
25295   grep -v '^ *+' conftest.er1 >conftest.err
25296   rm -f conftest.er1
25297   cat conftest.err >&5
25298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25299   (exit $ac_status); } &&
25300          { ac_try='test -z "$ac_c_werror_flag"
25301                          || test ! -s conftest.err'
25302   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25303   (eval $ac_try) 2>&5
25304   ac_status=$?
25305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25306   (exit $ac_status); }; } &&
25307          { ac_try='test -s conftest$ac_exeext'
25308   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25309   (eval $ac_try) 2>&5
25310   ac_status=$?
25311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25312   (exit $ac_status); }; }; then
25313   ac_cv_func_cthread_fork=yes
25314 else
25315   echo "$as_me: failed program was:" >&5
25316 sed 's/^/| /' conftest.$ac_ext >&5
25317
25318 ac_cv_func_cthread_fork=no
25319 fi
25320 rm -f conftest.err conftest.$ac_objext \
25321       conftest$ac_exeext conftest.$ac_ext
25322 fi
25323 echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5
25324 echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6
25325 if test $ac_cv_func_cthread_fork = yes; then
25326   ol_link_threads=yes
25327 fi
25328
25329                 LIBS="$save_LIBS"
25330
25331                 if test $ol_link_threads = yes ; then
25332                         LTHREAD_LIBS="-lthreads"
25333                         ol_link_threads=mach
25334                         ol_with_threads=found
25335                 else
25336                         { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5
25337 echo "$as_me: error: could not link with Mach CThreads" >&2;}
25338    { (exit 1); exit 1; }; }
25339                 fi
25340
25341         elif test $ol_with_threads = mach ; then
25342                 { { echo "$as_me:$LINENO: error: could not locate Mach CThreads" >&5
25343 echo "$as_me: error: could not locate Mach CThreads" >&2;}
25344    { (exit 1); exit 1; }; }
25345         fi
25346
25347         if test $ol_link_threads = mach ; then
25348
25349 cat >>confdefs.h <<\_ACEOF
25350 #define HAVE_MACH_CTHREADS 1
25351 _ACEOF
25352
25353         elif test $ol_with_threads = found ; then
25354                 { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5
25355 echo "$as_me: error: could not link with Mach CThreads" >&2;}
25356    { (exit 1); exit 1; }; }
25357         fi
25358         ;;
25359 esac
25360
25361 case $ol_with_threads in auto | yes | pth)
25362
25363
25364 for ac_header in pth.h
25365 do
25366 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25367 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25368   echo "$as_me:$LINENO: checking for $ac_header" >&5
25369 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25370 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25371   echo $ECHO_N "(cached) $ECHO_C" >&6
25372 fi
25373 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25374 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25375 else
25376   # Is the header compilable?
25377 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25378 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25379 cat >conftest.$ac_ext <<_ACEOF
25380 /* confdefs.h.  */
25381 _ACEOF
25382 cat confdefs.h >>conftest.$ac_ext
25383 cat >>conftest.$ac_ext <<_ACEOF
25384 /* end confdefs.h.  */
25385 $ac_includes_default
25386 #include <$ac_header>
25387 _ACEOF
25388 rm -f conftest.$ac_objext
25389 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25390   (eval $ac_compile) 2>conftest.er1
25391   ac_status=$?
25392   grep -v '^ *+' conftest.er1 >conftest.err
25393   rm -f conftest.er1
25394   cat conftest.err >&5
25395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25396   (exit $ac_status); } &&
25397          { ac_try='test -z "$ac_c_werror_flag"
25398                          || test ! -s conftest.err'
25399   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25400   (eval $ac_try) 2>&5
25401   ac_status=$?
25402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25403   (exit $ac_status); }; } &&
25404          { ac_try='test -s conftest.$ac_objext'
25405   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25406   (eval $ac_try) 2>&5
25407   ac_status=$?
25408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25409   (exit $ac_status); }; }; then
25410   ac_header_compiler=yes
25411 else
25412   echo "$as_me: failed program was:" >&5
25413 sed 's/^/| /' conftest.$ac_ext >&5
25414
25415 ac_header_compiler=no
25416 fi
25417 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25418 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25419 echo "${ECHO_T}$ac_header_compiler" >&6
25420
25421 # Is the header present?
25422 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25423 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
25424 cat >conftest.$ac_ext <<_ACEOF
25425 /* confdefs.h.  */
25426 _ACEOF
25427 cat confdefs.h >>conftest.$ac_ext
25428 cat >>conftest.$ac_ext <<_ACEOF
25429 /* end confdefs.h.  */
25430 #include <$ac_header>
25431 _ACEOF
25432 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25433   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25434   ac_status=$?
25435   grep -v '^ *+' conftest.er1 >conftest.err
25436   rm -f conftest.er1
25437   cat conftest.err >&5
25438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25439   (exit $ac_status); } >/dev/null; then
25440   if test -s conftest.err; then
25441     ac_cpp_err=$ac_c_preproc_warn_flag
25442     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25443   else
25444     ac_cpp_err=
25445   fi
25446 else
25447   ac_cpp_err=yes
25448 fi
25449 if test -z "$ac_cpp_err"; then
25450   ac_header_preproc=yes
25451 else
25452   echo "$as_me: failed program was:" >&5
25453 sed 's/^/| /' conftest.$ac_ext >&5
25454
25455   ac_header_preproc=no
25456 fi
25457 rm -f conftest.err conftest.$ac_ext
25458 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25459 echo "${ECHO_T}$ac_header_preproc" >&6
25460
25461 # So?  What about this header?
25462 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25463   yes:no: )
25464     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25465 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25466     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25467 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25468     ac_header_preproc=yes
25469     ;;
25470   no:yes:* )
25471     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25472 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25473     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25474 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25475     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25476 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25477     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25478 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25479     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25480 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25481     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25482 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25483     (
25484       cat <<\_ASBOX
25485 ## --------------------------------------------- ##
25486 ## Report this to <http://www.openldap.org/its/> ##
25487 ## --------------------------------------------- ##
25488 _ASBOX
25489     ) |
25490       sed "s/^/$as_me: WARNING:     /" >&2
25491     ;;
25492 esac
25493 echo "$as_me:$LINENO: checking for $ac_header" >&5
25494 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25495 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25496   echo $ECHO_N "(cached) $ECHO_C" >&6
25497 else
25498   eval "$as_ac_Header=\$ac_header_preproc"
25499 fi
25500 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25501 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25502
25503 fi
25504 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25505   cat >>confdefs.h <<_ACEOF
25506 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25507 _ACEOF
25508
25509 fi
25510
25511 done
25512
25513
25514         if test $ac_cv_header_pth_h = yes ; then
25515                 echo "$as_me:$LINENO: checking for pth_version in -lpth" >&5
25516 echo $ECHO_N "checking for pth_version in -lpth... $ECHO_C" >&6
25517 if test "${ac_cv_lib_pth_pth_version+set}" = set; then
25518   echo $ECHO_N "(cached) $ECHO_C" >&6
25519 else
25520   ac_check_lib_save_LIBS=$LIBS
25521 LIBS="-lpth  $LIBS"
25522 cat >conftest.$ac_ext <<_ACEOF
25523 /* confdefs.h.  */
25524 _ACEOF
25525 cat confdefs.h >>conftest.$ac_ext
25526 cat >>conftest.$ac_ext <<_ACEOF
25527 /* end confdefs.h.  */
25528
25529 /* Override any gcc2 internal prototype to avoid an error.  */
25530 #ifdef __cplusplus
25531 extern "C"
25532 #endif
25533 /* We use char because int might match the return type of a gcc2
25534    builtin and then its argument prototype would still apply.  */
25535 char pth_version ();
25536 int
25537 main ()
25538 {
25539 pth_version ();
25540   ;
25541   return 0;
25542 }
25543 _ACEOF
25544 rm -f conftest.$ac_objext conftest$ac_exeext
25545 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25546   (eval $ac_link) 2>conftest.er1
25547   ac_status=$?
25548   grep -v '^ *+' conftest.er1 >conftest.err
25549   rm -f conftest.er1
25550   cat conftest.err >&5
25551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25552   (exit $ac_status); } &&
25553          { ac_try='test -z "$ac_c_werror_flag"
25554                          || test ! -s conftest.err'
25555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25556   (eval $ac_try) 2>&5
25557   ac_status=$?
25558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25559   (exit $ac_status); }; } &&
25560          { ac_try='test -s conftest$ac_exeext'
25561   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25562   (eval $ac_try) 2>&5
25563   ac_status=$?
25564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25565   (exit $ac_status); }; }; then
25566   ac_cv_lib_pth_pth_version=yes
25567 else
25568   echo "$as_me: failed program was:" >&5
25569 sed 's/^/| /' conftest.$ac_ext >&5
25570
25571 ac_cv_lib_pth_pth_version=no
25572 fi
25573 rm -f conftest.err conftest.$ac_objext \
25574       conftest$ac_exeext conftest.$ac_ext
25575 LIBS=$ac_check_lib_save_LIBS
25576 fi
25577 echo "$as_me:$LINENO: result: $ac_cv_lib_pth_pth_version" >&5
25578 echo "${ECHO_T}$ac_cv_lib_pth_pth_version" >&6
25579 if test $ac_cv_lib_pth_pth_version = yes; then
25580   have_pth=yes
25581 else
25582   have_pth=no
25583 fi
25584
25585
25586                 if test $have_pth = yes ; then
25587
25588 cat >>confdefs.h <<\_ACEOF
25589 #define HAVE_GNU_PTH 1
25590 _ACEOF
25591
25592                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
25593                         ol_link_threads=pth
25594                         ol_with_threads=found
25595
25596                         if test $ol_with_yielding_select = auto ; then
25597                                 ol_with_yielding_select=yes
25598                         fi
25599                 fi
25600         fi
25601         ;;
25602 esac
25603
25604 case $ol_with_threads in auto | yes | lwp)
25605
25606
25607
25608 for ac_header in thread.h synch.h
25609 do
25610 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25611 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25612   echo "$as_me:$LINENO: checking for $ac_header" >&5
25613 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25614 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25615   echo $ECHO_N "(cached) $ECHO_C" >&6
25616 fi
25617 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25618 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25619 else
25620   # Is the header compilable?
25621 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25622 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25623 cat >conftest.$ac_ext <<_ACEOF
25624 /* confdefs.h.  */
25625 _ACEOF
25626 cat confdefs.h >>conftest.$ac_ext
25627 cat >>conftest.$ac_ext <<_ACEOF
25628 /* end confdefs.h.  */
25629 $ac_includes_default
25630 #include <$ac_header>
25631 _ACEOF
25632 rm -f conftest.$ac_objext
25633 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25634   (eval $ac_compile) 2>conftest.er1
25635   ac_status=$?
25636   grep -v '^ *+' conftest.er1 >conftest.err
25637   rm -f conftest.er1
25638   cat conftest.err >&5
25639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25640   (exit $ac_status); } &&
25641          { ac_try='test -z "$ac_c_werror_flag"
25642                          || test ! -s conftest.err'
25643   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25644   (eval $ac_try) 2>&5
25645   ac_status=$?
25646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25647   (exit $ac_status); }; } &&
25648          { ac_try='test -s conftest.$ac_objext'
25649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25650   (eval $ac_try) 2>&5
25651   ac_status=$?
25652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25653   (exit $ac_status); }; }; then
25654   ac_header_compiler=yes
25655 else
25656   echo "$as_me: failed program was:" >&5
25657 sed 's/^/| /' conftest.$ac_ext >&5
25658
25659 ac_header_compiler=no
25660 fi
25661 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25662 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25663 echo "${ECHO_T}$ac_header_compiler" >&6
25664
25665 # Is the header present?
25666 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25667 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
25668 cat >conftest.$ac_ext <<_ACEOF
25669 /* confdefs.h.  */
25670 _ACEOF
25671 cat confdefs.h >>conftest.$ac_ext
25672 cat >>conftest.$ac_ext <<_ACEOF
25673 /* end confdefs.h.  */
25674 #include <$ac_header>
25675 _ACEOF
25676 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25677   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25678   ac_status=$?
25679   grep -v '^ *+' conftest.er1 >conftest.err
25680   rm -f conftest.er1
25681   cat conftest.err >&5
25682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25683   (exit $ac_status); } >/dev/null; then
25684   if test -s conftest.err; then
25685     ac_cpp_err=$ac_c_preproc_warn_flag
25686     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25687   else
25688     ac_cpp_err=
25689   fi
25690 else
25691   ac_cpp_err=yes
25692 fi
25693 if test -z "$ac_cpp_err"; then
25694   ac_header_preproc=yes
25695 else
25696   echo "$as_me: failed program was:" >&5
25697 sed 's/^/| /' conftest.$ac_ext >&5
25698
25699   ac_header_preproc=no
25700 fi
25701 rm -f conftest.err conftest.$ac_ext
25702 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25703 echo "${ECHO_T}$ac_header_preproc" >&6
25704
25705 # So?  What about this header?
25706 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25707   yes:no: )
25708     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25709 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25710     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25711 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25712     ac_header_preproc=yes
25713     ;;
25714   no:yes:* )
25715     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25716 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25717     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25718 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25719     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25720 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25721     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25722 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25723     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25724 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25725     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25726 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25727     (
25728       cat <<\_ASBOX
25729 ## --------------------------------------------- ##
25730 ## Report this to <http://www.openldap.org/its/> ##
25731 ## --------------------------------------------- ##
25732 _ASBOX
25733     ) |
25734       sed "s/^/$as_me: WARNING:     /" >&2
25735     ;;
25736 esac
25737 echo "$as_me:$LINENO: checking for $ac_header" >&5
25738 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25739 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25740   echo $ECHO_N "(cached) $ECHO_C" >&6
25741 else
25742   eval "$as_ac_Header=\$ac_header_preproc"
25743 fi
25744 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25745 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25746
25747 fi
25748 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25749   cat >>confdefs.h <<_ACEOF
25750 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25751 _ACEOF
25752
25753 fi
25754
25755 done
25756
25757         if test $ac_cv_header_thread_h = yes &&
25758            test $ac_cv_header_synch_h = yes ; then
25759                 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
25760 echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
25761 if test "${ac_cv_lib_thread_thr_create+set}" = set; then
25762   echo $ECHO_N "(cached) $ECHO_C" >&6
25763 else
25764   ac_check_lib_save_LIBS=$LIBS
25765 LIBS="-lthread  $LIBS"
25766 cat >conftest.$ac_ext <<_ACEOF
25767 /* confdefs.h.  */
25768 _ACEOF
25769 cat confdefs.h >>conftest.$ac_ext
25770 cat >>conftest.$ac_ext <<_ACEOF
25771 /* end confdefs.h.  */
25772
25773 /* Override any gcc2 internal prototype to avoid an error.  */
25774 #ifdef __cplusplus
25775 extern "C"
25776 #endif
25777 /* We use char because int might match the return type of a gcc2
25778    builtin and then its argument prototype would still apply.  */
25779 char thr_create ();
25780 int
25781 main ()
25782 {
25783 thr_create ();
25784   ;
25785   return 0;
25786 }
25787 _ACEOF
25788 rm -f conftest.$ac_objext conftest$ac_exeext
25789 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25790   (eval $ac_link) 2>conftest.er1
25791   ac_status=$?
25792   grep -v '^ *+' conftest.er1 >conftest.err
25793   rm -f conftest.er1
25794   cat conftest.err >&5
25795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25796   (exit $ac_status); } &&
25797          { ac_try='test -z "$ac_c_werror_flag"
25798                          || test ! -s conftest.err'
25799   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25800   (eval $ac_try) 2>&5
25801   ac_status=$?
25802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25803   (exit $ac_status); }; } &&
25804          { ac_try='test -s conftest$ac_exeext'
25805   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25806   (eval $ac_try) 2>&5
25807   ac_status=$?
25808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25809   (exit $ac_status); }; }; then
25810   ac_cv_lib_thread_thr_create=yes
25811 else
25812   echo "$as_me: failed program was:" >&5
25813 sed 's/^/| /' conftest.$ac_ext >&5
25814
25815 ac_cv_lib_thread_thr_create=no
25816 fi
25817 rm -f conftest.err conftest.$ac_objext \
25818       conftest$ac_exeext conftest.$ac_ext
25819 LIBS=$ac_check_lib_save_LIBS
25820 fi
25821 echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
25822 echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
25823 if test $ac_cv_lib_thread_thr_create = yes; then
25824   have_thr=yes
25825 else
25826   have_thr=no
25827 fi
25828
25829
25830                 if test $have_thr = yes ; then
25831
25832 cat >>confdefs.h <<\_ACEOF
25833 #define HAVE_THR 1
25834 _ACEOF
25835
25836                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
25837                         ol_link_threads=thr
25838
25839                         if test $ol_with_yielding_select = auto ; then
25840                                 ol_with_yielding_select=yes
25841                         fi
25842
25843
25844
25845 for ac_func in \
25846                                 thr_setconcurrency \
25847                                 thr_getconcurrency \
25848
25849 do
25850 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
25851 echo "$as_me:$LINENO: checking for $ac_func" >&5
25852 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
25853 if eval "test \"\${$as_ac_var+set}\" = set"; then
25854   echo $ECHO_N "(cached) $ECHO_C" >&6
25855 else
25856   cat >conftest.$ac_ext <<_ACEOF
25857 /* confdefs.h.  */
25858 _ACEOF
25859 cat confdefs.h >>conftest.$ac_ext
25860 cat >>conftest.$ac_ext <<_ACEOF
25861 /* end confdefs.h.  */
25862 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
25863    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
25864 #define $ac_func innocuous_$ac_func
25865
25866 /* System header to define __stub macros and hopefully few prototypes,
25867     which can conflict with char $ac_func (); below.
25868     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25869     <limits.h> exists even on freestanding compilers.  */
25870
25871 #ifdef __STDC__
25872 # include <limits.h>
25873 #else
25874 # include <assert.h>
25875 #endif
25876
25877 #undef $ac_func
25878
25879 /* Override any gcc2 internal prototype to avoid an error.  */
25880 #ifdef __cplusplus
25881 extern "C"
25882 {
25883 #endif
25884 /* We use char because int might match the return type of a gcc2
25885    builtin and then its argument prototype would still apply.  */
25886 char $ac_func ();
25887 /* The GNU C library defines this for functions which it implements
25888     to always fail with ENOSYS.  Some functions are actually named
25889     something starting with __ and the normal name is an alias.  */
25890 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
25891 choke me
25892 #else
25893 char (*f) () = $ac_func;
25894 #endif
25895 #ifdef __cplusplus
25896 }
25897 #endif
25898
25899 int
25900 main ()
25901 {
25902 return f != $ac_func;
25903   ;
25904   return 0;
25905 }
25906 _ACEOF
25907 rm -f conftest.$ac_objext conftest$ac_exeext
25908 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25909   (eval $ac_link) 2>conftest.er1
25910   ac_status=$?
25911   grep -v '^ *+' conftest.er1 >conftest.err
25912   rm -f conftest.er1
25913   cat conftest.err >&5
25914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25915   (exit $ac_status); } &&
25916          { ac_try='test -z "$ac_c_werror_flag"
25917                          || test ! -s conftest.err'
25918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25919   (eval $ac_try) 2>&5
25920   ac_status=$?
25921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25922   (exit $ac_status); }; } &&
25923          { ac_try='test -s conftest$ac_exeext'
25924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25925   (eval $ac_try) 2>&5
25926   ac_status=$?
25927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25928   (exit $ac_status); }; }; then
25929   eval "$as_ac_var=yes"
25930 else
25931   echo "$as_me: failed program was:" >&5
25932 sed 's/^/| /' conftest.$ac_ext >&5
25933
25934 eval "$as_ac_var=no"
25935 fi
25936 rm -f conftest.err conftest.$ac_objext \
25937       conftest$ac_exeext conftest.$ac_ext
25938 fi
25939 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
25940 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
25941 if test `eval echo '${'$as_ac_var'}'` = yes; then
25942   cat >>confdefs.h <<_ACEOF
25943 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
25944 _ACEOF
25945
25946 fi
25947 done
25948
25949                 fi
25950         fi
25951
25952
25953 for ac_header in lwp/lwp.h
25954 do
25955 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25956 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25957   echo "$as_me:$LINENO: checking for $ac_header" >&5
25958 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25959 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25960   echo $ECHO_N "(cached) $ECHO_C" >&6
25961 fi
25962 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25963 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25964 else
25965   # Is the header compilable?
25966 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25967 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25968 cat >conftest.$ac_ext <<_ACEOF
25969 /* confdefs.h.  */
25970 _ACEOF
25971 cat confdefs.h >>conftest.$ac_ext
25972 cat >>conftest.$ac_ext <<_ACEOF
25973 /* end confdefs.h.  */
25974 $ac_includes_default
25975 #include <$ac_header>
25976 _ACEOF
25977 rm -f conftest.$ac_objext
25978 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25979   (eval $ac_compile) 2>conftest.er1
25980   ac_status=$?
25981   grep -v '^ *+' conftest.er1 >conftest.err
25982   rm -f conftest.er1
25983   cat conftest.err >&5
25984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25985   (exit $ac_status); } &&
25986          { ac_try='test -z "$ac_c_werror_flag"
25987                          || test ! -s conftest.err'
25988   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25989   (eval $ac_try) 2>&5
25990   ac_status=$?
25991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25992   (exit $ac_status); }; } &&
25993          { ac_try='test -s conftest.$ac_objext'
25994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25995   (eval $ac_try) 2>&5
25996   ac_status=$?
25997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25998   (exit $ac_status); }; }; then
25999   ac_header_compiler=yes
26000 else
26001   echo "$as_me: failed program was:" >&5
26002 sed 's/^/| /' conftest.$ac_ext >&5
26003
26004 ac_header_compiler=no
26005 fi
26006 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26007 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26008 echo "${ECHO_T}$ac_header_compiler" >&6
26009
26010 # Is the header present?
26011 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26012 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26013 cat >conftest.$ac_ext <<_ACEOF
26014 /* confdefs.h.  */
26015 _ACEOF
26016 cat confdefs.h >>conftest.$ac_ext
26017 cat >>conftest.$ac_ext <<_ACEOF
26018 /* end confdefs.h.  */
26019 #include <$ac_header>
26020 _ACEOF
26021 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26022   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26023   ac_status=$?
26024   grep -v '^ *+' conftest.er1 >conftest.err
26025   rm -f conftest.er1
26026   cat conftest.err >&5
26027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26028   (exit $ac_status); } >/dev/null; then
26029   if test -s conftest.err; then
26030     ac_cpp_err=$ac_c_preproc_warn_flag
26031     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26032   else
26033     ac_cpp_err=
26034   fi
26035 else
26036   ac_cpp_err=yes
26037 fi
26038 if test -z "$ac_cpp_err"; then
26039   ac_header_preproc=yes
26040 else
26041   echo "$as_me: failed program was:" >&5
26042 sed 's/^/| /' conftest.$ac_ext >&5
26043
26044   ac_header_preproc=no
26045 fi
26046 rm -f conftest.err conftest.$ac_ext
26047 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26048 echo "${ECHO_T}$ac_header_preproc" >&6
26049
26050 # So?  What about this header?
26051 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26052   yes:no: )
26053     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26054 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26055     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26056 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26057     ac_header_preproc=yes
26058     ;;
26059   no:yes:* )
26060     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26061 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26062     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26063 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26064     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26065 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26066     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26067 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26068     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26069 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26070     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26071 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26072     (
26073       cat <<\_ASBOX
26074 ## --------------------------------------------- ##
26075 ## Report this to <http://www.openldap.org/its/> ##
26076 ## --------------------------------------------- ##
26077 _ASBOX
26078     ) |
26079       sed "s/^/$as_me: WARNING:     /" >&2
26080     ;;
26081 esac
26082 echo "$as_me:$LINENO: checking for $ac_header" >&5
26083 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26084 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26085   echo $ECHO_N "(cached) $ECHO_C" >&6
26086 else
26087   eval "$as_ac_Header=\$ac_header_preproc"
26088 fi
26089 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26090 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26091
26092 fi
26093 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26094   cat >>confdefs.h <<_ACEOF
26095 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26096 _ACEOF
26097
26098 fi
26099
26100 done
26101
26102         if test $ac_cv_header_lwp_lwp_h = yes ; then
26103                 echo "$as_me:$LINENO: checking for lwp_create in -llwp" >&5
26104 echo $ECHO_N "checking for lwp_create in -llwp... $ECHO_C" >&6
26105 if test "${ac_cv_lib_lwp_lwp_create+set}" = set; then
26106   echo $ECHO_N "(cached) $ECHO_C" >&6
26107 else
26108   ac_check_lib_save_LIBS=$LIBS
26109 LIBS="-llwp  $LIBS"
26110 cat >conftest.$ac_ext <<_ACEOF
26111 /* confdefs.h.  */
26112 _ACEOF
26113 cat confdefs.h >>conftest.$ac_ext
26114 cat >>conftest.$ac_ext <<_ACEOF
26115 /* end confdefs.h.  */
26116
26117 /* Override any gcc2 internal prototype to avoid an error.  */
26118 #ifdef __cplusplus
26119 extern "C"
26120 #endif
26121 /* We use char because int might match the return type of a gcc2
26122    builtin and then its argument prototype would still apply.  */
26123 char lwp_create ();
26124 int
26125 main ()
26126 {
26127 lwp_create ();
26128   ;
26129   return 0;
26130 }
26131 _ACEOF
26132 rm -f conftest.$ac_objext conftest$ac_exeext
26133 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26134   (eval $ac_link) 2>conftest.er1
26135   ac_status=$?
26136   grep -v '^ *+' conftest.er1 >conftest.err
26137   rm -f conftest.er1
26138   cat conftest.err >&5
26139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26140   (exit $ac_status); } &&
26141          { ac_try='test -z "$ac_c_werror_flag"
26142                          || test ! -s conftest.err'
26143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26144   (eval $ac_try) 2>&5
26145   ac_status=$?
26146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26147   (exit $ac_status); }; } &&
26148          { ac_try='test -s conftest$ac_exeext'
26149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26150   (eval $ac_try) 2>&5
26151   ac_status=$?
26152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26153   (exit $ac_status); }; }; then
26154   ac_cv_lib_lwp_lwp_create=yes
26155 else
26156   echo "$as_me: failed program was:" >&5
26157 sed 's/^/| /' conftest.$ac_ext >&5
26158
26159 ac_cv_lib_lwp_lwp_create=no
26160 fi
26161 rm -f conftest.err conftest.$ac_objext \
26162       conftest$ac_exeext conftest.$ac_ext
26163 LIBS=$ac_check_lib_save_LIBS
26164 fi
26165 echo "$as_me:$LINENO: result: $ac_cv_lib_lwp_lwp_create" >&5
26166 echo "${ECHO_T}$ac_cv_lib_lwp_lwp_create" >&6
26167 if test $ac_cv_lib_lwp_lwp_create = yes; then
26168   have_lwp=yes
26169 else
26170   have_lwp=no
26171 fi
26172
26173
26174                 if test $have_lwp = yes ; then
26175
26176 cat >>confdefs.h <<\_ACEOF
26177 #define HAVE_LWP 1
26178 _ACEOF
26179
26180                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
26181                         ol_link_threads=lwp
26182
26183                         if test $ol_with_yielding_select = auto ; then
26184                                 ol_with_yielding_select=no
26185                         fi
26186                 fi
26187         fi
26188         ;;
26189 esac
26190
26191 if test $ol_with_yielding_select = yes ; then
26192
26193 cat >>confdefs.h <<\_ACEOF
26194 #define HAVE_YIELDING_SELECT 1
26195 _ACEOF
26196
26197 fi
26198
26199 if test $ol_with_threads = manual ; then
26200                 ol_link_threads=yes
26201
26202         { echo "$as_me:$LINENO: WARNING: thread defines and link options must be set manually" >&5
26203 echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
26204
26205
26206
26207 for ac_header in pthread.h sched.h
26208 do
26209 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26210 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26211   echo "$as_me:$LINENO: checking for $ac_header" >&5
26212 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26213 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26214   echo $ECHO_N "(cached) $ECHO_C" >&6
26215 fi
26216 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26217 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26218 else
26219   # Is the header compilable?
26220 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26221 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26222 cat >conftest.$ac_ext <<_ACEOF
26223 /* confdefs.h.  */
26224 _ACEOF
26225 cat confdefs.h >>conftest.$ac_ext
26226 cat >>conftest.$ac_ext <<_ACEOF
26227 /* end confdefs.h.  */
26228 $ac_includes_default
26229 #include <$ac_header>
26230 _ACEOF
26231 rm -f conftest.$ac_objext
26232 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26233   (eval $ac_compile) 2>conftest.er1
26234   ac_status=$?
26235   grep -v '^ *+' conftest.er1 >conftest.err
26236   rm -f conftest.er1
26237   cat conftest.err >&5
26238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26239   (exit $ac_status); } &&
26240          { ac_try='test -z "$ac_c_werror_flag"
26241                          || test ! -s conftest.err'
26242   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26243   (eval $ac_try) 2>&5
26244   ac_status=$?
26245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26246   (exit $ac_status); }; } &&
26247          { ac_try='test -s conftest.$ac_objext'
26248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26249   (eval $ac_try) 2>&5
26250   ac_status=$?
26251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26252   (exit $ac_status); }; }; then
26253   ac_header_compiler=yes
26254 else
26255   echo "$as_me: failed program was:" >&5
26256 sed 's/^/| /' conftest.$ac_ext >&5
26257
26258 ac_header_compiler=no
26259 fi
26260 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26261 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26262 echo "${ECHO_T}$ac_header_compiler" >&6
26263
26264 # Is the header present?
26265 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26266 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26267 cat >conftest.$ac_ext <<_ACEOF
26268 /* confdefs.h.  */
26269 _ACEOF
26270 cat confdefs.h >>conftest.$ac_ext
26271 cat >>conftest.$ac_ext <<_ACEOF
26272 /* end confdefs.h.  */
26273 #include <$ac_header>
26274 _ACEOF
26275 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26276   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26277   ac_status=$?
26278   grep -v '^ *+' conftest.er1 >conftest.err
26279   rm -f conftest.er1
26280   cat conftest.err >&5
26281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26282   (exit $ac_status); } >/dev/null; then
26283   if test -s conftest.err; then
26284     ac_cpp_err=$ac_c_preproc_warn_flag
26285     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26286   else
26287     ac_cpp_err=
26288   fi
26289 else
26290   ac_cpp_err=yes
26291 fi
26292 if test -z "$ac_cpp_err"; then
26293   ac_header_preproc=yes
26294 else
26295   echo "$as_me: failed program was:" >&5
26296 sed 's/^/| /' conftest.$ac_ext >&5
26297
26298   ac_header_preproc=no
26299 fi
26300 rm -f conftest.err conftest.$ac_ext
26301 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26302 echo "${ECHO_T}$ac_header_preproc" >&6
26303
26304 # So?  What about this header?
26305 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26306   yes:no: )
26307     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26308 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26309     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26310 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26311     ac_header_preproc=yes
26312     ;;
26313   no:yes:* )
26314     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26315 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26316     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26317 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26318     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26319 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26320     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26321 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26322     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26323 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26324     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26325 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26326     (
26327       cat <<\_ASBOX
26328 ## --------------------------------------------- ##
26329 ## Report this to <http://www.openldap.org/its/> ##
26330 ## --------------------------------------------- ##
26331 _ASBOX
26332     ) |
26333       sed "s/^/$as_me: WARNING:     /" >&2
26334     ;;
26335 esac
26336 echo "$as_me:$LINENO: checking for $ac_header" >&5
26337 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26338 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26339   echo $ECHO_N "(cached) $ECHO_C" >&6
26340 else
26341   eval "$as_ac_Header=\$ac_header_preproc"
26342 fi
26343 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26344 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26345
26346 fi
26347 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26348   cat >>confdefs.h <<_ACEOF
26349 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26350 _ACEOF
26351
26352 fi
26353
26354 done
26355
26356
26357
26358 for ac_func in sched_yield pthread_yield
26359 do
26360 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
26361 echo "$as_me:$LINENO: checking for $ac_func" >&5
26362 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
26363 if eval "test \"\${$as_ac_var+set}\" = set"; then
26364   echo $ECHO_N "(cached) $ECHO_C" >&6
26365 else
26366   cat >conftest.$ac_ext <<_ACEOF
26367 /* confdefs.h.  */
26368 _ACEOF
26369 cat confdefs.h >>conftest.$ac_ext
26370 cat >>conftest.$ac_ext <<_ACEOF
26371 /* end confdefs.h.  */
26372 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
26373    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
26374 #define $ac_func innocuous_$ac_func
26375
26376 /* System header to define __stub macros and hopefully few prototypes,
26377     which can conflict with char $ac_func (); below.
26378     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
26379     <limits.h> exists even on freestanding compilers.  */
26380
26381 #ifdef __STDC__
26382 # include <limits.h>
26383 #else
26384 # include <assert.h>
26385 #endif
26386
26387 #undef $ac_func
26388
26389 /* Override any gcc2 internal prototype to avoid an error.  */
26390 #ifdef __cplusplus
26391 extern "C"
26392 {
26393 #endif
26394 /* We use char because int might match the return type of a gcc2
26395    builtin and then its argument prototype would still apply.  */
26396 char $ac_func ();
26397 /* The GNU C library defines this for functions which it implements
26398     to always fail with ENOSYS.  Some functions are actually named
26399     something starting with __ and the normal name is an alias.  */
26400 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
26401 choke me
26402 #else
26403 char (*f) () = $ac_func;
26404 #endif
26405 #ifdef __cplusplus
26406 }
26407 #endif
26408
26409 int
26410 main ()
26411 {
26412 return f != $ac_func;
26413   ;
26414   return 0;
26415 }
26416 _ACEOF
26417 rm -f conftest.$ac_objext conftest$ac_exeext
26418 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26419   (eval $ac_link) 2>conftest.er1
26420   ac_status=$?
26421   grep -v '^ *+' conftest.er1 >conftest.err
26422   rm -f conftest.er1
26423   cat conftest.err >&5
26424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26425   (exit $ac_status); } &&
26426          { ac_try='test -z "$ac_c_werror_flag"
26427                          || test ! -s conftest.err'
26428   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26429   (eval $ac_try) 2>&5
26430   ac_status=$?
26431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26432   (exit $ac_status); }; } &&
26433          { ac_try='test -s conftest$ac_exeext'
26434   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26435   (eval $ac_try) 2>&5
26436   ac_status=$?
26437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26438   (exit $ac_status); }; }; then
26439   eval "$as_ac_var=yes"
26440 else
26441   echo "$as_me: failed program was:" >&5
26442 sed 's/^/| /' conftest.$ac_ext >&5
26443
26444 eval "$as_ac_var=no"
26445 fi
26446 rm -f conftest.err conftest.$ac_objext \
26447       conftest$ac_exeext conftest.$ac_ext
26448 fi
26449 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
26450 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
26451 if test `eval echo '${'$as_ac_var'}'` = yes; then
26452   cat >>confdefs.h <<_ACEOF
26453 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
26454 _ACEOF
26455
26456 fi
26457 done
26458
26459
26460         echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5
26461 echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6
26462 if test "${ol_cv_header_linux_threads+set}" = set; then
26463   echo $ECHO_N "(cached) $ECHO_C" >&6
26464 else
26465   cat >conftest.$ac_ext <<_ACEOF
26466 /* confdefs.h.  */
26467 _ACEOF
26468 cat confdefs.h >>conftest.$ac_ext
26469 cat >>conftest.$ac_ext <<_ACEOF
26470 /* end confdefs.h.  */
26471 #include <pthread.h>
26472 _ACEOF
26473 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26474   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then
26475   ol_cv_header_linux_threads=yes
26476 else
26477   ol_cv_header_linux_threads=no
26478 fi
26479 rm -f conftest*
26480
26481
26482 fi
26483 echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5
26484 echo "${ECHO_T}$ol_cv_header_linux_threads" >&6
26485         if test $ol_cv_header_linux_threads = yes; then
26486
26487 cat >>confdefs.h <<\_ACEOF
26488 #define HAVE_LINUX_THREADS 1
26489 _ACEOF
26490
26491         fi
26492
26493
26494
26495 for ac_header in mach/cthreads.h
26496 do
26497 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26498 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26499   echo "$as_me:$LINENO: checking for $ac_header" >&5
26500 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26501 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26502   echo $ECHO_N "(cached) $ECHO_C" >&6
26503 fi
26504 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26505 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26506 else
26507   # Is the header compilable?
26508 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26509 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26510 cat >conftest.$ac_ext <<_ACEOF
26511 /* confdefs.h.  */
26512 _ACEOF
26513 cat confdefs.h >>conftest.$ac_ext
26514 cat >>conftest.$ac_ext <<_ACEOF
26515 /* end confdefs.h.  */
26516 $ac_includes_default
26517 #include <$ac_header>
26518 _ACEOF
26519 rm -f conftest.$ac_objext
26520 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26521   (eval $ac_compile) 2>conftest.er1
26522   ac_status=$?
26523   grep -v '^ *+' conftest.er1 >conftest.err
26524   rm -f conftest.er1
26525   cat conftest.err >&5
26526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26527   (exit $ac_status); } &&
26528          { ac_try='test -z "$ac_c_werror_flag"
26529                          || test ! -s conftest.err'
26530   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26531   (eval $ac_try) 2>&5
26532   ac_status=$?
26533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26534   (exit $ac_status); }; } &&
26535          { ac_try='test -s conftest.$ac_objext'
26536   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26537   (eval $ac_try) 2>&5
26538   ac_status=$?
26539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26540   (exit $ac_status); }; }; then
26541   ac_header_compiler=yes
26542 else
26543   echo "$as_me: failed program was:" >&5
26544 sed 's/^/| /' conftest.$ac_ext >&5
26545
26546 ac_header_compiler=no
26547 fi
26548 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26549 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26550 echo "${ECHO_T}$ac_header_compiler" >&6
26551
26552 # Is the header present?
26553 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26554 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26555 cat >conftest.$ac_ext <<_ACEOF
26556 /* confdefs.h.  */
26557 _ACEOF
26558 cat confdefs.h >>conftest.$ac_ext
26559 cat >>conftest.$ac_ext <<_ACEOF
26560 /* end confdefs.h.  */
26561 #include <$ac_header>
26562 _ACEOF
26563 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26564   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26565   ac_status=$?
26566   grep -v '^ *+' conftest.er1 >conftest.err
26567   rm -f conftest.er1
26568   cat conftest.err >&5
26569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26570   (exit $ac_status); } >/dev/null; then
26571   if test -s conftest.err; then
26572     ac_cpp_err=$ac_c_preproc_warn_flag
26573     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26574   else
26575     ac_cpp_err=
26576   fi
26577 else
26578   ac_cpp_err=yes
26579 fi
26580 if test -z "$ac_cpp_err"; then
26581   ac_header_preproc=yes
26582 else
26583   echo "$as_me: failed program was:" >&5
26584 sed 's/^/| /' conftest.$ac_ext >&5
26585
26586   ac_header_preproc=no
26587 fi
26588 rm -f conftest.err conftest.$ac_ext
26589 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26590 echo "${ECHO_T}$ac_header_preproc" >&6
26591
26592 # So?  What about this header?
26593 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26594   yes:no: )
26595     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26596 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26597     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26598 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26599     ac_header_preproc=yes
26600     ;;
26601   no:yes:* )
26602     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26603 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26604     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26605 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26606     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26607 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26608     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26609 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26610     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26611 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26612     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26613 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26614     (
26615       cat <<\_ASBOX
26616 ## --------------------------------------------- ##
26617 ## Report this to <http://www.openldap.org/its/> ##
26618 ## --------------------------------------------- ##
26619 _ASBOX
26620     ) |
26621       sed "s/^/$as_me: WARNING:     /" >&2
26622     ;;
26623 esac
26624 echo "$as_me:$LINENO: checking for $ac_header" >&5
26625 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26626 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26627   echo $ECHO_N "(cached) $ECHO_C" >&6
26628 else
26629   eval "$as_ac_Header=\$ac_header_preproc"
26630 fi
26631 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26632 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26633
26634 fi
26635 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26636   cat >>confdefs.h <<_ACEOF
26637 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26638 _ACEOF
26639
26640 fi
26641
26642 done
26643
26644
26645 for ac_header in lwp/lwp.h
26646 do
26647 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26648 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26649   echo "$as_me:$LINENO: checking for $ac_header" >&5
26650 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26651 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26652   echo $ECHO_N "(cached) $ECHO_C" >&6
26653 fi
26654 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26655 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26656 else
26657   # Is the header compilable?
26658 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26659 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26660 cat >conftest.$ac_ext <<_ACEOF
26661 /* confdefs.h.  */
26662 _ACEOF
26663 cat confdefs.h >>conftest.$ac_ext
26664 cat >>conftest.$ac_ext <<_ACEOF
26665 /* end confdefs.h.  */
26666 $ac_includes_default
26667 #include <$ac_header>
26668 _ACEOF
26669 rm -f conftest.$ac_objext
26670 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26671   (eval $ac_compile) 2>conftest.er1
26672   ac_status=$?
26673   grep -v '^ *+' conftest.er1 >conftest.err
26674   rm -f conftest.er1
26675   cat conftest.err >&5
26676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26677   (exit $ac_status); } &&
26678          { ac_try='test -z "$ac_c_werror_flag"
26679                          || test ! -s conftest.err'
26680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26681   (eval $ac_try) 2>&5
26682   ac_status=$?
26683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26684   (exit $ac_status); }; } &&
26685          { ac_try='test -s conftest.$ac_objext'
26686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26687   (eval $ac_try) 2>&5
26688   ac_status=$?
26689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26690   (exit $ac_status); }; }; then
26691   ac_header_compiler=yes
26692 else
26693   echo "$as_me: failed program was:" >&5
26694 sed 's/^/| /' conftest.$ac_ext >&5
26695
26696 ac_header_compiler=no
26697 fi
26698 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26699 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26700 echo "${ECHO_T}$ac_header_compiler" >&6
26701
26702 # Is the header present?
26703 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26704 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26705 cat >conftest.$ac_ext <<_ACEOF
26706 /* confdefs.h.  */
26707 _ACEOF
26708 cat confdefs.h >>conftest.$ac_ext
26709 cat >>conftest.$ac_ext <<_ACEOF
26710 /* end confdefs.h.  */
26711 #include <$ac_header>
26712 _ACEOF
26713 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26714   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26715   ac_status=$?
26716   grep -v '^ *+' conftest.er1 >conftest.err
26717   rm -f conftest.er1
26718   cat conftest.err >&5
26719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26720   (exit $ac_status); } >/dev/null; then
26721   if test -s conftest.err; then
26722     ac_cpp_err=$ac_c_preproc_warn_flag
26723     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26724   else
26725     ac_cpp_err=
26726   fi
26727 else
26728   ac_cpp_err=yes
26729 fi
26730 if test -z "$ac_cpp_err"; then
26731   ac_header_preproc=yes
26732 else
26733   echo "$as_me: failed program was:" >&5
26734 sed 's/^/| /' conftest.$ac_ext >&5
26735
26736   ac_header_preproc=no
26737 fi
26738 rm -f conftest.err conftest.$ac_ext
26739 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26740 echo "${ECHO_T}$ac_header_preproc" >&6
26741
26742 # So?  What about this header?
26743 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26744   yes:no: )
26745     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26746 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26747     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26748 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26749     ac_header_preproc=yes
26750     ;;
26751   no:yes:* )
26752     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26753 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26754     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26755 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26756     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26757 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26758     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26759 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26760     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26761 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26762     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26763 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26764     (
26765       cat <<\_ASBOX
26766 ## --------------------------------------------- ##
26767 ## Report this to <http://www.openldap.org/its/> ##
26768 ## --------------------------------------------- ##
26769 _ASBOX
26770     ) |
26771       sed "s/^/$as_me: WARNING:     /" >&2
26772     ;;
26773 esac
26774 echo "$as_me:$LINENO: checking for $ac_header" >&5
26775 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26776 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26777   echo $ECHO_N "(cached) $ECHO_C" >&6
26778 else
26779   eval "$as_ac_Header=\$ac_header_preproc"
26780 fi
26781 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26782 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26783
26784 fi
26785 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26786   cat >>confdefs.h <<_ACEOF
26787 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26788 _ACEOF
26789
26790 fi
26791
26792 done
26793
26794
26795
26796 for ac_header in thread.h synch.h
26797 do
26798 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26799 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26800   echo "$as_me:$LINENO: checking for $ac_header" >&5
26801 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26802 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26803   echo $ECHO_N "(cached) $ECHO_C" >&6
26804 fi
26805 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26806 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26807 else
26808   # Is the header compilable?
26809 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26810 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26811 cat >conftest.$ac_ext <<_ACEOF
26812 /* confdefs.h.  */
26813 _ACEOF
26814 cat confdefs.h >>conftest.$ac_ext
26815 cat >>conftest.$ac_ext <<_ACEOF
26816 /* end confdefs.h.  */
26817 $ac_includes_default
26818 #include <$ac_header>
26819 _ACEOF
26820 rm -f conftest.$ac_objext
26821 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26822   (eval $ac_compile) 2>conftest.er1
26823   ac_status=$?
26824   grep -v '^ *+' conftest.er1 >conftest.err
26825   rm -f conftest.er1
26826   cat conftest.err >&5
26827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26828   (exit $ac_status); } &&
26829          { ac_try='test -z "$ac_c_werror_flag"
26830                          || test ! -s conftest.err'
26831   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26832   (eval $ac_try) 2>&5
26833   ac_status=$?
26834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26835   (exit $ac_status); }; } &&
26836          { ac_try='test -s conftest.$ac_objext'
26837   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26838   (eval $ac_try) 2>&5
26839   ac_status=$?
26840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26841   (exit $ac_status); }; }; then
26842   ac_header_compiler=yes
26843 else
26844   echo "$as_me: failed program was:" >&5
26845 sed 's/^/| /' conftest.$ac_ext >&5
26846
26847 ac_header_compiler=no
26848 fi
26849 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26850 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26851 echo "${ECHO_T}$ac_header_compiler" >&6
26852
26853 # Is the header present?
26854 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26855 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26856 cat >conftest.$ac_ext <<_ACEOF
26857 /* confdefs.h.  */
26858 _ACEOF
26859 cat confdefs.h >>conftest.$ac_ext
26860 cat >>conftest.$ac_ext <<_ACEOF
26861 /* end confdefs.h.  */
26862 #include <$ac_header>
26863 _ACEOF
26864 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26865   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26866   ac_status=$?
26867   grep -v '^ *+' conftest.er1 >conftest.err
26868   rm -f conftest.er1
26869   cat conftest.err >&5
26870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26871   (exit $ac_status); } >/dev/null; then
26872   if test -s conftest.err; then
26873     ac_cpp_err=$ac_c_preproc_warn_flag
26874     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26875   else
26876     ac_cpp_err=
26877   fi
26878 else
26879   ac_cpp_err=yes
26880 fi
26881 if test -z "$ac_cpp_err"; then
26882   ac_header_preproc=yes
26883 else
26884   echo "$as_me: failed program was:" >&5
26885 sed 's/^/| /' conftest.$ac_ext >&5
26886
26887   ac_header_preproc=no
26888 fi
26889 rm -f conftest.err conftest.$ac_ext
26890 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26891 echo "${ECHO_T}$ac_header_preproc" >&6
26892
26893 # So?  What about this header?
26894 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26895   yes:no: )
26896     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26897 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26898     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26899 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26900     ac_header_preproc=yes
26901     ;;
26902   no:yes:* )
26903     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26904 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26905     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26906 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26907     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26908 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26909     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26910 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26911     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26912 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26913     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26914 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26915     (
26916       cat <<\_ASBOX
26917 ## --------------------------------------------- ##
26918 ## Report this to <http://www.openldap.org/its/> ##
26919 ## --------------------------------------------- ##
26920 _ASBOX
26921     ) |
26922       sed "s/^/$as_me: WARNING:     /" >&2
26923     ;;
26924 esac
26925 echo "$as_me:$LINENO: checking for $ac_header" >&5
26926 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26927 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26928   echo $ECHO_N "(cached) $ECHO_C" >&6
26929 else
26930   eval "$as_ac_Header=\$ac_header_preproc"
26931 fi
26932 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26933 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26934
26935 fi
26936 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26937   cat >>confdefs.h <<_ACEOF
26938 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26939 _ACEOF
26940
26941 fi
26942
26943 done
26944
26945 fi
26946
26947 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
26948                         cat >>confdefs.h <<\_ACEOF
26949 #define REENTRANT 1
26950 _ACEOF
26951
26952         cat >>confdefs.h <<\_ACEOF
26953 #define _REENTRANT 1
26954 _ACEOF
26955
26956         cat >>confdefs.h <<\_ACEOF
26957 #define THREAD_SAFE 1
26958 _ACEOF
26959
26960         cat >>confdefs.h <<\_ACEOF
26961 #define _THREAD_SAFE 1
26962 _ACEOF
26963
26964         cat >>confdefs.h <<\_ACEOF
26965 #define THREADSAFE 1
26966 _ACEOF
26967
26968         cat >>confdefs.h <<\_ACEOF
26969 #define _THREADSAFE 1
26970 _ACEOF
26971
26972         cat >>confdefs.h <<\_ACEOF
26973 #define _SGI_MP_SOURCE 1
26974 _ACEOF
26975
26976
26977                         echo "$as_me:$LINENO: checking for thread specific errno" >&5
26978 echo $ECHO_N "checking for thread specific errno... $ECHO_C" >&6
26979 if test "${ol_cv_errno_thread_specific+set}" = set; then
26980   echo $ECHO_N "(cached) $ECHO_C" >&6
26981 else
26982
26983                 cat >conftest.$ac_ext <<_ACEOF
26984 /* confdefs.h.  */
26985 _ACEOF
26986 cat confdefs.h >>conftest.$ac_ext
26987 cat >>conftest.$ac_ext <<_ACEOF
26988 /* end confdefs.h.  */
26989 #include <errno.h>
26990 int
26991 main ()
26992 {
26993 errno = 0;
26994   ;
26995   return 0;
26996 }
26997 _ACEOF
26998 rm -f conftest.$ac_objext conftest$ac_exeext
26999 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27000   (eval $ac_link) 2>conftest.er1
27001   ac_status=$?
27002   grep -v '^ *+' conftest.er1 >conftest.err
27003   rm -f conftest.er1
27004   cat conftest.err >&5
27005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27006   (exit $ac_status); } &&
27007          { ac_try='test -z "$ac_c_werror_flag"
27008                          || test ! -s conftest.err'
27009   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27010   (eval $ac_try) 2>&5
27011   ac_status=$?
27012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27013   (exit $ac_status); }; } &&
27014          { ac_try='test -s conftest$ac_exeext'
27015   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27016   (eval $ac_try) 2>&5
27017   ac_status=$?
27018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27019   (exit $ac_status); }; }; then
27020   ol_cv_errno_thread_specific=yes
27021 else
27022   echo "$as_me: failed program was:" >&5
27023 sed 's/^/| /' conftest.$ac_ext >&5
27024
27025 ol_cv_errno_thread_specific=no
27026 fi
27027 rm -f conftest.err conftest.$ac_objext \
27028       conftest$ac_exeext conftest.$ac_ext
27029
27030 fi
27031 echo "$as_me:$LINENO: result: $ol_cv_errno_thread_specific" >&5
27032 echo "${ECHO_T}$ol_cv_errno_thread_specific" >&6
27033
27034                         echo "$as_me:$LINENO: checking for thread specific h_errno" >&5
27035 echo $ECHO_N "checking for thread specific h_errno... $ECHO_C" >&6
27036 if test "${ol_cv_h_errno_thread_specific+set}" = set; then
27037   echo $ECHO_N "(cached) $ECHO_C" >&6
27038 else
27039
27040                 cat >conftest.$ac_ext <<_ACEOF
27041 /* confdefs.h.  */
27042 _ACEOF
27043 cat confdefs.h >>conftest.$ac_ext
27044 cat >>conftest.$ac_ext <<_ACEOF
27045 /* end confdefs.h.  */
27046 #include <netdb.h>
27047 int
27048 main ()
27049 {
27050 h_errno = 0;
27051   ;
27052   return 0;
27053 }
27054 _ACEOF
27055 rm -f conftest.$ac_objext conftest$ac_exeext
27056 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27057   (eval $ac_link) 2>conftest.er1
27058   ac_status=$?
27059   grep -v '^ *+' conftest.er1 >conftest.err
27060   rm -f conftest.er1
27061   cat conftest.err >&5
27062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27063   (exit $ac_status); } &&
27064          { ac_try='test -z "$ac_c_werror_flag"
27065                          || test ! -s conftest.err'
27066   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27067   (eval $ac_try) 2>&5
27068   ac_status=$?
27069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27070   (exit $ac_status); }; } &&
27071          { ac_try='test -s conftest$ac_exeext'
27072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27073   (eval $ac_try) 2>&5
27074   ac_status=$?
27075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27076   (exit $ac_status); }; }; then
27077   ol_cv_h_errno_thread_specific=yes
27078 else
27079   echo "$as_me: failed program was:" >&5
27080 sed 's/^/| /' conftest.$ac_ext >&5
27081
27082 ol_cv_h_errno_thread_specific=no
27083 fi
27084 rm -f conftest.err conftest.$ac_objext \
27085       conftest$ac_exeext conftest.$ac_ext
27086
27087 fi
27088 echo "$as_me:$LINENO: result: $ol_cv_h_errno_thread_specific" >&5
27089 echo "${ECHO_T}$ol_cv_h_errno_thread_specific" >&6
27090
27091         if test $ol_cv_errno_thread_specific != yes ||
27092            test $ol_cv_h_errno_thread_specific != yes ; then
27093                 LIBS="$LTHREAD_LIBS $LIBS"
27094                 LTHREAD_LIBS=""
27095         fi
27096
27097 fi
27098
27099 if test $ol_link_threads = no ; then
27100         if test $ol_with_threads = yes ; then
27101                 { { echo "$as_me:$LINENO: error: no suitable thread support" >&5
27102 echo "$as_me: error: no suitable thread support" >&2;}
27103    { (exit 1); exit 1; }; }
27104         fi
27105
27106         if test $ol_with_threads = auto ; then
27107                 { echo "$as_me:$LINENO: WARNING: no suitable thread support, disabling threads" >&5
27108 echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
27109                 ol_with_threads=no
27110         fi
27111
27112
27113 cat >>confdefs.h <<\_ACEOF
27114 #define NO_THREADS 1
27115 _ACEOF
27116
27117         LTHREAD_LIBS=""
27118         BUILD_THREAD=no
27119 else
27120         BUILD_THREAD=yes
27121 fi
27122
27123 if test $ol_link_threads != no ; then
27124
27125 cat >>confdefs.h <<\_ACEOF
27126 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
27127 _ACEOF
27128
27129 fi
27130
27131
27132
27133
27134 for ac_func in \
27135         ctime_r                 \
27136         gethostbyname_r gethostbyaddr_r \
27137
27138 do
27139 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
27140 echo "$as_me:$LINENO: checking for $ac_func" >&5
27141 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
27142 if eval "test \"\${$as_ac_var+set}\" = set"; then
27143   echo $ECHO_N "(cached) $ECHO_C" >&6
27144 else
27145   cat >conftest.$ac_ext <<_ACEOF
27146 /* confdefs.h.  */
27147 _ACEOF
27148 cat confdefs.h >>conftest.$ac_ext
27149 cat >>conftest.$ac_ext <<_ACEOF
27150 /* end confdefs.h.  */
27151 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
27152    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
27153 #define $ac_func innocuous_$ac_func
27154
27155 /* System header to define __stub macros and hopefully few prototypes,
27156     which can conflict with char $ac_func (); below.
27157     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
27158     <limits.h> exists even on freestanding compilers.  */
27159
27160 #ifdef __STDC__
27161 # include <limits.h>
27162 #else
27163 # include <assert.h>
27164 #endif
27165
27166 #undef $ac_func
27167
27168 /* Override any gcc2 internal prototype to avoid an error.  */
27169 #ifdef __cplusplus
27170 extern "C"
27171 {
27172 #endif
27173 /* We use char because int might match the return type of a gcc2
27174    builtin and then its argument prototype would still apply.  */
27175 char $ac_func ();
27176 /* The GNU C library defines this for functions which it implements
27177     to always fail with ENOSYS.  Some functions are actually named
27178     something starting with __ and the normal name is an alias.  */
27179 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
27180 choke me
27181 #else
27182 char (*f) () = $ac_func;
27183 #endif
27184 #ifdef __cplusplus
27185 }
27186 #endif
27187
27188 int
27189 main ()
27190 {
27191 return f != $ac_func;
27192   ;
27193   return 0;
27194 }
27195 _ACEOF
27196 rm -f conftest.$ac_objext conftest$ac_exeext
27197 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27198   (eval $ac_link) 2>conftest.er1
27199   ac_status=$?
27200   grep -v '^ *+' conftest.er1 >conftest.err
27201   rm -f conftest.er1
27202   cat conftest.err >&5
27203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27204   (exit $ac_status); } &&
27205          { ac_try='test -z "$ac_c_werror_flag"
27206                          || test ! -s conftest.err'
27207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27208   (eval $ac_try) 2>&5
27209   ac_status=$?
27210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27211   (exit $ac_status); }; } &&
27212          { ac_try='test -s conftest$ac_exeext'
27213   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27214   (eval $ac_try) 2>&5
27215   ac_status=$?
27216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27217   (exit $ac_status); }; }; then
27218   eval "$as_ac_var=yes"
27219 else
27220   echo "$as_me: failed program was:" >&5
27221 sed 's/^/| /' conftest.$ac_ext >&5
27222
27223 eval "$as_ac_var=no"
27224 fi
27225 rm -f conftest.err conftest.$ac_objext \
27226       conftest$ac_exeext conftest.$ac_ext
27227 fi
27228 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
27229 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
27230 if test `eval echo '${'$as_ac_var'}'` = yes; then
27231   cat >>confdefs.h <<_ACEOF
27232 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
27233 _ACEOF
27234
27235 fi
27236 done
27237
27238
27239 if test "$ac_cv_func_ctime_r" = no ; then
27240         ol_cv_func_ctime_r_nargs=0
27241 else
27242         echo "$as_me:$LINENO: checking number of arguments of ctime_r" >&5
27243 echo $ECHO_N "checking number of arguments of ctime_r... $ECHO_C" >&6
27244 if test "${ol_cv_func_ctime_r_nargs+set}" = set; then
27245   echo $ECHO_N "(cached) $ECHO_C" >&6
27246 else
27247   cat >conftest.$ac_ext <<_ACEOF
27248 /* confdefs.h.  */
27249 _ACEOF
27250 cat confdefs.h >>conftest.$ac_ext
27251 cat >>conftest.$ac_ext <<_ACEOF
27252 /* end confdefs.h.  */
27253 #include <time.h>
27254 int
27255 main ()
27256 {
27257 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
27258   ;
27259   return 0;
27260 }
27261 _ACEOF
27262 rm -f conftest.$ac_objext
27263 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27264   (eval $ac_compile) 2>conftest.er1
27265   ac_status=$?
27266   grep -v '^ *+' conftest.er1 >conftest.err
27267   rm -f conftest.er1
27268   cat conftest.err >&5
27269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27270   (exit $ac_status); } &&
27271          { ac_try='test -z "$ac_c_werror_flag"
27272                          || test ! -s conftest.err'
27273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27274   (eval $ac_try) 2>&5
27275   ac_status=$?
27276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27277   (exit $ac_status); }; } &&
27278          { ac_try='test -s conftest.$ac_objext'
27279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27280   (eval $ac_try) 2>&5
27281   ac_status=$?
27282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27283   (exit $ac_status); }; }; then
27284   ol_cv_func_ctime_r_nargs3=yes
27285 else
27286   echo "$as_me: failed program was:" >&5
27287 sed 's/^/| /' conftest.$ac_ext >&5
27288
27289 ol_cv_func_ctime_r_nargs3=no
27290 fi
27291 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27292
27293         cat >conftest.$ac_ext <<_ACEOF
27294 /* confdefs.h.  */
27295 _ACEOF
27296 cat confdefs.h >>conftest.$ac_ext
27297 cat >>conftest.$ac_ext <<_ACEOF
27298 /* end confdefs.h.  */
27299 #include <time.h>
27300 int
27301 main ()
27302 {
27303 time_t ti; char *buffer; ctime_r(&ti,buffer);
27304   ;
27305   return 0;
27306 }
27307 _ACEOF
27308 rm -f conftest.$ac_objext
27309 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27310   (eval $ac_compile) 2>conftest.er1
27311   ac_status=$?
27312   grep -v '^ *+' conftest.er1 >conftest.err
27313   rm -f conftest.er1
27314   cat conftest.err >&5
27315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27316   (exit $ac_status); } &&
27317          { ac_try='test -z "$ac_c_werror_flag"
27318                          || test ! -s conftest.err'
27319   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27320   (eval $ac_try) 2>&5
27321   ac_status=$?
27322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27323   (exit $ac_status); }; } &&
27324          { ac_try='test -s conftest.$ac_objext'
27325   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27326   (eval $ac_try) 2>&5
27327   ac_status=$?
27328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27329   (exit $ac_status); }; }; then
27330   ol_cv_func_ctime_r_nargs2=yes
27331 else
27332   echo "$as_me: failed program was:" >&5
27333 sed 's/^/| /' conftest.$ac_ext >&5
27334
27335 ol_cv_func_ctime_r_nargs2=no
27336 fi
27337 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27338
27339         if test $ol_cv_func_ctime_r_nargs3 = yes &&
27340            test $ol_cv_func_ctime_r_nargs2 = no ; then
27341
27342                 ol_cv_func_ctime_r_nargs=3
27343
27344         elif test $ol_cv_func_ctime_r_nargs3 = no &&
27345              test $ol_cv_func_ctime_r_nargs2 = yes ; then
27346
27347                 ol_cv_func_ctime_r_nargs=2
27348
27349         else
27350                 ol_cv_func_ctime_r_nargs=0
27351         fi
27352
27353 fi
27354 echo "$as_me:$LINENO: result: $ol_cv_func_ctime_r_nargs" >&5
27355 echo "${ECHO_T}$ol_cv_func_ctime_r_nargs" >&6
27356
27357   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
27358
27359 cat >>confdefs.h <<_ACEOF
27360 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
27361 _ACEOF
27362
27363   fi
27364
27365 fi
27366
27367 if test "$ac_cv_func_gethostbyname_r" = yes ; then
27368         echo "$as_me:$LINENO: checking number of arguments of gethostbyname_r" >&5
27369 echo $ECHO_N "checking number of arguments of gethostbyname_r... $ECHO_C" >&6
27370 if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then
27371   echo $ECHO_N "(cached) $ECHO_C" >&6
27372 else
27373   cat >conftest.$ac_ext <<_ACEOF
27374 /* confdefs.h.  */
27375 _ACEOF
27376 cat confdefs.h >>conftest.$ac_ext
27377 cat >>conftest.$ac_ext <<_ACEOF
27378 /* end confdefs.h.  */
27379 #include <sys/types.h>
27380 #include <sys/socket.h>
27381 #include <netinet/in.h>
27382 #include <netdb.h>
27383 #define BUFSIZE (sizeof(struct hostent)+10)
27384 int
27385 main ()
27386 {
27387 struct hostent hent; char buffer[BUFSIZE];
27388                 int bufsize=BUFSIZE;int h_errno;
27389                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
27390                         buffer, bufsize, &h_errno);
27391   ;
27392   return 0;
27393 }
27394 _ACEOF
27395 rm -f conftest.$ac_objext
27396 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27397   (eval $ac_compile) 2>conftest.er1
27398   ac_status=$?
27399   grep -v '^ *+' conftest.er1 >conftest.err
27400   rm -f conftest.er1
27401   cat conftest.err >&5
27402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27403   (exit $ac_status); } &&
27404          { ac_try='test -z "$ac_c_werror_flag"
27405                          || test ! -s conftest.err'
27406   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27407   (eval $ac_try) 2>&5
27408   ac_status=$?
27409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27410   (exit $ac_status); }; } &&
27411          { ac_try='test -s conftest.$ac_objext'
27412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27413   (eval $ac_try) 2>&5
27414   ac_status=$?
27415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27416   (exit $ac_status); }; }; then
27417   ol_cv_func_gethostbyname_r_nargs5=yes
27418 else
27419   echo "$as_me: failed program was:" >&5
27420 sed 's/^/| /' conftest.$ac_ext >&5
27421
27422 ol_cv_func_gethostbyname_r_nargs5=no
27423 fi
27424 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27425
27426         cat >conftest.$ac_ext <<_ACEOF
27427 /* confdefs.h.  */
27428 _ACEOF
27429 cat confdefs.h >>conftest.$ac_ext
27430 cat >>conftest.$ac_ext <<_ACEOF
27431 /* end confdefs.h.  */
27432 #include <sys/types.h>
27433 #include <sys/socket.h>
27434 #include <netinet/in.h>
27435 #include <netdb.h>
27436 #define BUFSIZE (sizeof(struct hostent)+10)
27437 int
27438 main ()
27439 {
27440 struct hostent hent;struct hostent *rhent;
27441                 char buffer[BUFSIZE];
27442                 int bufsize=BUFSIZE;int h_errno;
27443                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
27444                         &rhent, &h_errno);
27445   ;
27446   return 0;
27447 }
27448 _ACEOF
27449 rm -f conftest.$ac_objext
27450 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27451   (eval $ac_compile) 2>conftest.er1
27452   ac_status=$?
27453   grep -v '^ *+' conftest.er1 >conftest.err
27454   rm -f conftest.er1
27455   cat conftest.err >&5
27456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27457   (exit $ac_status); } &&
27458          { ac_try='test -z "$ac_c_werror_flag"
27459                          || test ! -s conftest.err'
27460   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27461   (eval $ac_try) 2>&5
27462   ac_status=$?
27463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27464   (exit $ac_status); }; } &&
27465          { ac_try='test -s conftest.$ac_objext'
27466   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27467   (eval $ac_try) 2>&5
27468   ac_status=$?
27469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27470   (exit $ac_status); }; }; then
27471   ol_cv_func_gethostbyname_r_nargs6=yes
27472 else
27473   echo "$as_me: failed program was:" >&5
27474 sed 's/^/| /' conftest.$ac_ext >&5
27475
27476 ol_cv_func_gethostbyname_r_nargs6=no
27477 fi
27478 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27479
27480         if test $ol_cv_func_gethostbyname_r_nargs5 = yes &&
27481            test $ol_cv_func_gethostbyname_r_nargs6 = no ; then
27482
27483                 ol_cv_func_gethostbyname_r_nargs=5
27484
27485         elif test $ol_cv_func_gethostbyname_r_nargs5 = no &&
27486              test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
27487
27488                 ol_cv_func_gethostbyname_r_nargs=6
27489
27490         else
27491                 ol_cv_func_gethostbyname_r_nargs=0
27492         fi
27493
27494 fi
27495 echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyname_r_nargs" >&5
27496 echo "${ECHO_T}$ol_cv_func_gethostbyname_r_nargs" >&6
27497   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
27498
27499 cat >>confdefs.h <<_ACEOF
27500 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
27501 _ACEOF
27502
27503   fi
27504
27505 else
27506         ol_cv_func_gethostbyname_r_nargs=0
27507 fi
27508
27509 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
27510         echo "$as_me:$LINENO: checking number of arguments of gethostbyaddr_r" >&5
27511 echo $ECHO_N "checking number of arguments of gethostbyaddr_r... $ECHO_C" >&6
27512 if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then
27513   echo $ECHO_N "(cached) $ECHO_C" >&6
27514 else
27515   cat >conftest.$ac_ext <<_ACEOF
27516 /* confdefs.h.  */
27517 _ACEOF
27518 cat confdefs.h >>conftest.$ac_ext
27519 cat >>conftest.$ac_ext <<_ACEOF
27520 /* end confdefs.h.  */
27521 #include <sys/types.h>
27522 #include <sys/socket.h>
27523 #include <netinet/in.h>
27524 #include <netdb.h>
27525 #define BUFSIZE (sizeof(struct hostent)+10)
27526 int
27527 main ()
27528 {
27529 struct hostent hent; char buffer[BUFSIZE];
27530             struct in_addr add;
27531             size_t alen=sizeof(struct in_addr);
27532             int bufsize=BUFSIZE;int h_errno;
27533                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
27534                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
27535   ;
27536   return 0;
27537 }
27538 _ACEOF
27539 rm -f conftest.$ac_objext
27540 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27541   (eval $ac_compile) 2>conftest.er1
27542   ac_status=$?
27543   grep -v '^ *+' conftest.er1 >conftest.err
27544   rm -f conftest.er1
27545   cat conftest.err >&5
27546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27547   (exit $ac_status); } &&
27548          { ac_try='test -z "$ac_c_werror_flag"
27549                          || test ! -s conftest.err'
27550   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27551   (eval $ac_try) 2>&5
27552   ac_status=$?
27553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27554   (exit $ac_status); }; } &&
27555          { ac_try='test -s conftest.$ac_objext'
27556   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27557   (eval $ac_try) 2>&5
27558   ac_status=$?
27559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27560   (exit $ac_status); }; }; then
27561   ol_cv_func_gethostbyaddr_r_nargs7=yes
27562 else
27563   echo "$as_me: failed program was:" >&5
27564 sed 's/^/| /' conftest.$ac_ext >&5
27565
27566 ol_cv_func_gethostbyaddr_r_nargs7=no
27567 fi
27568 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27569
27570         cat >conftest.$ac_ext <<_ACEOF
27571 /* confdefs.h.  */
27572 _ACEOF
27573 cat confdefs.h >>conftest.$ac_ext
27574 cat >>conftest.$ac_ext <<_ACEOF
27575 /* end confdefs.h.  */
27576 #include <sys/types.h>
27577 #include <sys/socket.h>
27578 #include <netinet/in.h>
27579 #include <netdb.h>
27580 #define BUFSIZE (sizeof(struct hostent)+10)
27581 int
27582 main ()
27583 {
27584 struct hostent hent;
27585                 struct hostent *rhent; char buffer[BUFSIZE];
27586                 struct in_addr add;
27587                 size_t alen=sizeof(struct in_addr);
27588                 int bufsize=BUFSIZE;int h_errno;
27589                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
27590                         alen, AF_INET, &hent, buffer, bufsize,
27591                         &rhent, &h_errno);
27592   ;
27593   return 0;
27594 }
27595 _ACEOF
27596 rm -f conftest.$ac_objext
27597 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27598   (eval $ac_compile) 2>conftest.er1
27599   ac_status=$?
27600   grep -v '^ *+' conftest.er1 >conftest.err
27601   rm -f conftest.er1
27602   cat conftest.err >&5
27603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27604   (exit $ac_status); } &&
27605          { ac_try='test -z "$ac_c_werror_flag"
27606                          || test ! -s conftest.err'
27607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27608   (eval $ac_try) 2>&5
27609   ac_status=$?
27610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27611   (exit $ac_status); }; } &&
27612          { ac_try='test -s conftest.$ac_objext'
27613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27614   (eval $ac_try) 2>&5
27615   ac_status=$?
27616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27617   (exit $ac_status); }; }; then
27618   ol_cv_func_gethostbyaddr_r_nargs8=yes
27619 else
27620   echo "$as_me: failed program was:" >&5
27621 sed 's/^/| /' conftest.$ac_ext >&5
27622
27623 ol_cv_func_gethostbyaddr_r_nargs8=no
27624 fi
27625 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27626
27627         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes &&
27628            test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
27629
27630                 ol_cv_func_gethostbyaddr_r_nargs=7
27631
27632         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no &&
27633              test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
27634
27635                 ol_cv_func_gethostbyaddr_r_nargs=8
27636
27637         else
27638                 ol_cv_func_gethostbyaddr_r_nargs=0
27639         fi
27640
27641 fi
27642 echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5
27643 echo "${ECHO_T}$ol_cv_func_gethostbyaddr_r_nargs" >&6
27644   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
27645
27646 cat >>confdefs.h <<_ACEOF
27647 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
27648 _ACEOF
27649
27650   fi
27651
27652 else
27653         ol_cv_func_gethostbyaddr_r_nargs=0
27654 fi
27655
27656 ol_link_bdb=no
27657
27658 if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
27659         ol_cv_berkeley_db=no
27660
27661 for ac_header in db.h
27662 do
27663 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
27664 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27665   echo "$as_me:$LINENO: checking for $ac_header" >&5
27666 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27667 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27668   echo $ECHO_N "(cached) $ECHO_C" >&6
27669 fi
27670 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27671 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27672 else
27673   # Is the header compilable?
27674 echo "$as_me:$LINENO: checking $ac_header usability" >&5
27675 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
27676 cat >conftest.$ac_ext <<_ACEOF
27677 /* confdefs.h.  */
27678 _ACEOF
27679 cat confdefs.h >>conftest.$ac_ext
27680 cat >>conftest.$ac_ext <<_ACEOF
27681 /* end confdefs.h.  */
27682 $ac_includes_default
27683 #include <$ac_header>
27684 _ACEOF
27685 rm -f conftest.$ac_objext
27686 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27687   (eval $ac_compile) 2>conftest.er1
27688   ac_status=$?
27689   grep -v '^ *+' conftest.er1 >conftest.err
27690   rm -f conftest.er1
27691   cat conftest.err >&5
27692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27693   (exit $ac_status); } &&
27694          { ac_try='test -z "$ac_c_werror_flag"
27695                          || test ! -s conftest.err'
27696   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27697   (eval $ac_try) 2>&5
27698   ac_status=$?
27699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27700   (exit $ac_status); }; } &&
27701          { ac_try='test -s conftest.$ac_objext'
27702   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27703   (eval $ac_try) 2>&5
27704   ac_status=$?
27705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27706   (exit $ac_status); }; }; then
27707   ac_header_compiler=yes
27708 else
27709   echo "$as_me: failed program was:" >&5
27710 sed 's/^/| /' conftest.$ac_ext >&5
27711
27712 ac_header_compiler=no
27713 fi
27714 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27715 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27716 echo "${ECHO_T}$ac_header_compiler" >&6
27717
27718 # Is the header present?
27719 echo "$as_me:$LINENO: checking $ac_header presence" >&5
27720 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
27721 cat >conftest.$ac_ext <<_ACEOF
27722 /* confdefs.h.  */
27723 _ACEOF
27724 cat confdefs.h >>conftest.$ac_ext
27725 cat >>conftest.$ac_ext <<_ACEOF
27726 /* end confdefs.h.  */
27727 #include <$ac_header>
27728 _ACEOF
27729 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
27730   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
27731   ac_status=$?
27732   grep -v '^ *+' conftest.er1 >conftest.err
27733   rm -f conftest.er1
27734   cat conftest.err >&5
27735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27736   (exit $ac_status); } >/dev/null; then
27737   if test -s conftest.err; then
27738     ac_cpp_err=$ac_c_preproc_warn_flag
27739     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
27740   else
27741     ac_cpp_err=
27742   fi
27743 else
27744   ac_cpp_err=yes
27745 fi
27746 if test -z "$ac_cpp_err"; then
27747   ac_header_preproc=yes
27748 else
27749   echo "$as_me: failed program was:" >&5
27750 sed 's/^/| /' conftest.$ac_ext >&5
27751
27752   ac_header_preproc=no
27753 fi
27754 rm -f conftest.err conftest.$ac_ext
27755 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27756 echo "${ECHO_T}$ac_header_preproc" >&6
27757
27758 # So?  What about this header?
27759 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
27760   yes:no: )
27761     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27762 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27763     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
27764 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
27765     ac_header_preproc=yes
27766     ;;
27767   no:yes:* )
27768     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27769 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27770     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
27771 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
27772     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
27773 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
27774     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
27775 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
27776     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27777 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27778     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
27779 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
27780     (
27781       cat <<\_ASBOX
27782 ## --------------------------------------------- ##
27783 ## Report this to <http://www.openldap.org/its/> ##
27784 ## --------------------------------------------- ##
27785 _ASBOX
27786     ) |
27787       sed "s/^/$as_me: WARNING:     /" >&2
27788     ;;
27789 esac
27790 echo "$as_me:$LINENO: checking for $ac_header" >&5
27791 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27792 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27793   echo $ECHO_N "(cached) $ECHO_C" >&6
27794 else
27795   eval "$as_ac_Header=\$ac_header_preproc"
27796 fi
27797 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27798 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27799
27800 fi
27801 if test `eval echo '${'$as_ac_Header'}'` = yes; then
27802   cat >>confdefs.h <<_ACEOF
27803 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
27804 _ACEOF
27805
27806 fi
27807
27808 done
27809
27810 if test $ac_cv_header_db_h = yes; then
27811         ol_cv_lib_db=no
27812
27813 echo "$as_me:$LINENO: checking for Berkeley DB major version" >&5
27814 echo $ECHO_N "checking for Berkeley DB major version... $ECHO_C" >&6
27815 if test "${ol_cv_bdb_major+set}" = set; then
27816   echo $ECHO_N "(cached) $ECHO_C" >&6
27817 else
27818
27819         ol_cv_bdb_major=0
27820         if test $ol_cv_bdb_major = 0 ; then
27821                 cat >conftest.$ac_ext <<_ACEOF
27822 /* confdefs.h.  */
27823 _ACEOF
27824 cat confdefs.h >>conftest.$ac_ext
27825 cat >>conftest.$ac_ext <<_ACEOF
27826 /* end confdefs.h.  */
27827
27828 #include <db.h>
27829 #ifndef DB_VERSION_MAJOR
27830 #       define DB_VERSION_MAJOR 1
27831 #endif
27832 #if DB_VERSION_MAJOR == 4
27833 __db_version
27834 #endif
27835
27836 _ACEOF
27837 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27838   $EGREP "__db_version" >/dev/null 2>&1; then
27839   ol_cv_bdb_major=4
27840 else
27841   :
27842 fi
27843 rm -f conftest*
27844
27845         fi
27846         if test $ol_cv_bdb_major = 0 ; then
27847                 cat >conftest.$ac_ext <<_ACEOF
27848 /* confdefs.h.  */
27849 _ACEOF
27850 cat confdefs.h >>conftest.$ac_ext
27851 cat >>conftest.$ac_ext <<_ACEOF
27852 /* end confdefs.h.  */
27853
27854 #include <db.h>
27855 #ifndef DB_VERSION_MAJOR
27856 #       define DB_VERSION_MAJOR 1
27857 #endif
27858 #if DB_VERSION_MAJOR == 3
27859 __db_version
27860 #endif
27861
27862 _ACEOF
27863 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27864   $EGREP "__db_version" >/dev/null 2>&1; then
27865   ol_cv_bdb_major=3
27866 else
27867   :
27868 fi
27869 rm -f conftest*
27870
27871         fi
27872         if test $ol_cv_bdb_major = 0 ; then
27873                 cat >conftest.$ac_ext <<_ACEOF
27874 /* confdefs.h.  */
27875 _ACEOF
27876 cat confdefs.h >>conftest.$ac_ext
27877 cat >>conftest.$ac_ext <<_ACEOF
27878 /* end confdefs.h.  */
27879
27880 #include <db.h>
27881 #ifndef DB_VERSION_MAJOR
27882 #       define DB_VERSION_MAJOR 1
27883 #endif
27884 #if DB_VERSION_MAJOR == 2
27885 __db_version
27886 #endif
27887
27888 _ACEOF
27889 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27890   $EGREP "__db_version" >/dev/null 2>&1; then
27891   ol_cv_bdb_major=2
27892 else
27893   :
27894 fi
27895 rm -f conftest*
27896
27897         fi
27898         if test $ol_cv_bdb_major = 0 ; then
27899                 cat >conftest.$ac_ext <<_ACEOF
27900 /* confdefs.h.  */
27901 _ACEOF
27902 cat confdefs.h >>conftest.$ac_ext
27903 cat >>conftest.$ac_ext <<_ACEOF
27904 /* end confdefs.h.  */
27905
27906 #include <db.h>
27907 #ifndef DB_VERSION_MAJOR
27908 #       define DB_VERSION_MAJOR 1
27909 #endif
27910 #if DB_VERSION_MAJOR == 1
27911 __db_version
27912 #endif
27913
27914 _ACEOF
27915 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27916   $EGREP "__db_version" >/dev/null 2>&1; then
27917   ol_cv_bdb_major=1
27918 else
27919   :
27920 fi
27921 rm -f conftest*
27922
27923         fi
27924
27925         if test $ol_cv_bdb_major = 0 ; then
27926                 { { echo "$as_me:$LINENO: error: Unknown Berkeley DB major version" >&5
27927 echo "$as_me: error: Unknown Berkeley DB major version" >&2;}
27928    { (exit 1); exit 1; }; }
27929         fi
27930
27931 fi
27932 echo "$as_me:$LINENO: result: $ol_cv_bdb_major" >&5
27933 echo "${ECHO_T}$ol_cv_bdb_major" >&6
27934
27935 echo "$as_me:$LINENO: checking for Berkeley DB minor version" >&5
27936 echo $ECHO_N "checking for Berkeley DB minor version... $ECHO_C" >&6
27937 if test "${ol_cv_bdb_minor+set}" = set; then
27938   echo $ECHO_N "(cached) $ECHO_C" >&6
27939 else
27940
27941         ol_cv_bdb_minor=0
27942         if test $ol_cv_bdb_minor = 0 ; then
27943                 cat >conftest.$ac_ext <<_ACEOF
27944 /* confdefs.h.  */
27945 _ACEOF
27946 cat confdefs.h >>conftest.$ac_ext
27947 cat >>conftest.$ac_ext <<_ACEOF
27948 /* end confdefs.h.  */
27949
27950 #include <db.h>
27951 #ifndef DB_VERSION_MINOR
27952 #       define DB_VERSION_MINOR 0
27953 #endif
27954 #if DB_VERSION_MINOR == 9
27955 __db_version
27956 #endif
27957
27958 _ACEOF
27959 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27960   $EGREP "__db_version" >/dev/null 2>&1; then
27961   ol_cv_bdb_minor=9
27962 else
27963   :
27964 fi
27965 rm -f conftest*
27966
27967         fi
27968         if test $ol_cv_bdb_minor = 0 ; then
27969                 cat >conftest.$ac_ext <<_ACEOF
27970 /* confdefs.h.  */
27971 _ACEOF
27972 cat confdefs.h >>conftest.$ac_ext
27973 cat >>conftest.$ac_ext <<_ACEOF
27974 /* end confdefs.h.  */
27975
27976 #include <db.h>
27977 #ifndef DB_VERSION_MINOR
27978 #       define DB_VERSION_MINOR 0
27979 #endif
27980 #if DB_VERSION_MINOR == 8
27981 __db_version
27982 #endif
27983
27984 _ACEOF
27985 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27986   $EGREP "__db_version" >/dev/null 2>&1; then
27987   ol_cv_bdb_minor=8
27988 else
27989   :
27990 fi
27991 rm -f conftest*
27992
27993         fi
27994         if test $ol_cv_bdb_minor = 0 ; then
27995                 cat >conftest.$ac_ext <<_ACEOF
27996 /* confdefs.h.  */
27997 _ACEOF
27998 cat confdefs.h >>conftest.$ac_ext
27999 cat >>conftest.$ac_ext <<_ACEOF
28000 /* end confdefs.h.  */
28001
28002 #include <db.h>
28003 #ifndef DB_VERSION_MINOR
28004 #       define DB_VERSION_MINOR 0
28005 #endif
28006 #if DB_VERSION_MINOR == 7
28007 __db_version
28008 #endif
28009
28010 _ACEOF
28011 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28012   $EGREP "__db_version" >/dev/null 2>&1; then
28013   ol_cv_bdb_minor=7
28014 else
28015   :
28016 fi
28017 rm -f conftest*
28018
28019         fi
28020         if test $ol_cv_bdb_minor = 0 ; then
28021                 cat >conftest.$ac_ext <<_ACEOF
28022 /* confdefs.h.  */
28023 _ACEOF
28024 cat confdefs.h >>conftest.$ac_ext
28025 cat >>conftest.$ac_ext <<_ACEOF
28026 /* end confdefs.h.  */
28027
28028 #include <db.h>
28029 #ifndef DB_VERSION_MINOR
28030 #       define DB_VERSION_MINOR 0
28031 #endif
28032 #if DB_VERSION_MINOR == 6
28033 __db_version
28034 #endif
28035
28036 _ACEOF
28037 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28038   $EGREP "__db_version" >/dev/null 2>&1; then
28039   ol_cv_bdb_minor=6
28040 else
28041   :
28042 fi
28043 rm -f conftest*
28044
28045         fi
28046         if test $ol_cv_bdb_minor = 0 ; then
28047                 cat >conftest.$ac_ext <<_ACEOF
28048 /* confdefs.h.  */
28049 _ACEOF
28050 cat confdefs.h >>conftest.$ac_ext
28051 cat >>conftest.$ac_ext <<_ACEOF
28052 /* end confdefs.h.  */
28053
28054 #include <db.h>
28055 #ifndef DB_VERSION_MINOR
28056 #       define DB_VERSION_MINOR 0
28057 #endif
28058 #if DB_VERSION_MINOR == 5
28059 __db_version
28060 #endif
28061
28062 _ACEOF
28063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28064   $EGREP "__db_version" >/dev/null 2>&1; then
28065   ol_cv_bdb_minor=5
28066 else
28067   :
28068 fi
28069 rm -f conftest*
28070
28071         fi
28072         if test $ol_cv_bdb_minor = 0 ; then
28073                 cat >conftest.$ac_ext <<_ACEOF
28074 /* confdefs.h.  */
28075 _ACEOF
28076 cat confdefs.h >>conftest.$ac_ext
28077 cat >>conftest.$ac_ext <<_ACEOF
28078 /* end confdefs.h.  */
28079
28080 #include <db.h>
28081 #ifndef DB_VERSION_MINOR
28082 #       define DB_VERSION_MINOR 0
28083 #endif
28084 #if DB_VERSION_MINOR == 4
28085 __db_version
28086 #endif
28087
28088 _ACEOF
28089 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28090   $EGREP "__db_version" >/dev/null 2>&1; then
28091   ol_cv_bdb_minor=4
28092 else
28093   :
28094 fi
28095 rm -f conftest*
28096
28097         fi
28098         if test $ol_cv_bdb_minor = 0 ; then
28099                 cat >conftest.$ac_ext <<_ACEOF
28100 /* confdefs.h.  */
28101 _ACEOF
28102 cat confdefs.h >>conftest.$ac_ext
28103 cat >>conftest.$ac_ext <<_ACEOF
28104 /* end confdefs.h.  */
28105
28106 #include <db.h>
28107 #ifndef DB_VERSION_MINOR
28108 #       define DB_VERSION_MINOR 0
28109 #endif
28110 #if DB_VERSION_MINOR == 3
28111 __db_version
28112 #endif
28113
28114 _ACEOF
28115 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28116   $EGREP "__db_version" >/dev/null 2>&1; then
28117   ol_cv_bdb_minor=3
28118 else
28119   :
28120 fi
28121 rm -f conftest*
28122
28123         fi
28124         if test $ol_cv_bdb_minor = 0 ; then
28125                 cat >conftest.$ac_ext <<_ACEOF
28126 /* confdefs.h.  */
28127 _ACEOF
28128 cat confdefs.h >>conftest.$ac_ext
28129 cat >>conftest.$ac_ext <<_ACEOF
28130 /* end confdefs.h.  */
28131
28132 #include <db.h>
28133 #ifndef DB_VERSION_MINOR
28134 #       define DB_VERSION_MINOR 0
28135 #endif
28136 #if DB_VERSION_MINOR == 2
28137 __db_version
28138 #endif
28139
28140 _ACEOF
28141 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28142   $EGREP "__db_version" >/dev/null 2>&1; then
28143   ol_cv_bdb_minor=2
28144 else
28145   :
28146 fi
28147 rm -f conftest*
28148
28149         fi
28150         if test $ol_cv_bdb_minor = 0 ; then
28151                 cat >conftest.$ac_ext <<_ACEOF
28152 /* confdefs.h.  */
28153 _ACEOF
28154 cat confdefs.h >>conftest.$ac_ext
28155 cat >>conftest.$ac_ext <<_ACEOF
28156 /* end confdefs.h.  */
28157
28158 #include <db.h>
28159 #ifndef DB_VERSION_MINOR
28160 #       define DB_VERSION_MINOR 0
28161 #endif
28162 #if DB_VERSION_MINOR == 1
28163 __db_version
28164 #endif
28165
28166 _ACEOF
28167 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28168   $EGREP "__db_version" >/dev/null 2>&1; then
28169   ol_cv_bdb_minor=1
28170 else
28171   :
28172 fi
28173 rm -f conftest*
28174
28175         fi
28176
28177 fi
28178 echo "$as_me:$LINENO: result: $ol_cv_bdb_minor" >&5
28179 echo "${ECHO_T}$ol_cv_bdb_minor" >&6
28180
28181 if test $ol_cv_bdb_major = 4 ; then
28182         if test $ol_cv_bdb_minor = 4 ; then
28183                 if test $ol_cv_lib_db = no ; then
28184         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb44)" >&5
28185 echo $ECHO_N "checking for Berkeley DB link (-ldb44)... $ECHO_C" >&6
28186 if test "${ol_cv_db_db44+set}" = set; then
28187   echo $ECHO_N "(cached) $ECHO_C" >&6
28188 else
28189
28190         ol_DB_LIB=-ldb44
28191         ol_LIBS=$LIBS
28192         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28193
28194         cat >conftest.$ac_ext <<_ACEOF
28195 /* confdefs.h.  */
28196 _ACEOF
28197 cat confdefs.h >>conftest.$ac_ext
28198 cat >>conftest.$ac_ext <<_ACEOF
28199 /* end confdefs.h.  */
28200
28201 #ifdef HAVE_DB_185_H
28202 # include <db_185.h>
28203 #else
28204 # include <db.h>
28205 #endif
28206
28207 #ifndef DB_VERSION_MAJOR
28208 # define DB_VERSION_MAJOR 1
28209 #endif
28210
28211 #ifndef NULL
28212 #define NULL ((void*)0)
28213 #endif
28214
28215 int
28216 main ()
28217 {
28218
28219 #if DB_VERSION_MAJOR > 1
28220         {
28221                 char *version;
28222                 int major, minor, patch;
28223
28224                 version = db_version( &major, &minor, &patch );
28225
28226                 if( major != DB_VERSION_MAJOR ||
28227                         minor < DB_VERSION_MINOR )
28228                 {
28229                         printf("Berkeley DB version mismatch\n"
28230                                 "\theader: %s\n\tlibrary: %s\n",
28231                                 DB_VERSION_STRING, version);
28232                         return 1;
28233                 }
28234         }
28235 #endif
28236
28237 #if DB_VERSION_MAJOR > 2
28238         db_env_create( NULL, 0 );
28239 #elif DB_VERSION_MAJOR > 1
28240         db_appexit( NULL );
28241 #else
28242         (void) dbopen( NULL, 0, 0, 0, NULL);
28243 #endif
28244
28245   ;
28246   return 0;
28247 }
28248 _ACEOF
28249 rm -f conftest.$ac_objext conftest$ac_exeext
28250 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28251   (eval $ac_link) 2>conftest.er1
28252   ac_status=$?
28253   grep -v '^ *+' conftest.er1 >conftest.err
28254   rm -f conftest.er1
28255   cat conftest.err >&5
28256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28257   (exit $ac_status); } &&
28258          { ac_try='test -z "$ac_c_werror_flag"
28259                          || test ! -s conftest.err'
28260   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28261   (eval $ac_try) 2>&5
28262   ac_status=$?
28263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28264   (exit $ac_status); }; } &&
28265          { ac_try='test -s conftest$ac_exeext'
28266   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28267   (eval $ac_try) 2>&5
28268   ac_status=$?
28269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28270   (exit $ac_status); }; }; then
28271   ol_cv_db_db44=yes
28272 else
28273   echo "$as_me: failed program was:" >&5
28274 sed 's/^/| /' conftest.$ac_ext >&5
28275
28276 ol_cv_db_db44=no
28277 fi
28278 rm -f conftest.err conftest.$ac_objext \
28279       conftest$ac_exeext conftest.$ac_ext
28280
28281         LIBS="$ol_LIBS"
28282
28283 fi
28284 echo "$as_me:$LINENO: result: $ol_cv_db_db44" >&5
28285 echo "${ECHO_T}$ol_cv_db_db44" >&6
28286
28287         if test $ol_cv_db_db44 = yes ; then
28288                 ol_cv_lib_db=-ldb44
28289         fi
28290 fi
28291
28292                 if test $ol_cv_lib_db = no ; then
28293         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-44)" >&5
28294 echo $ECHO_N "checking for Berkeley DB link (-ldb-44)... $ECHO_C" >&6
28295 if test "${ol_cv_db_db_44+set}" = set; then
28296   echo $ECHO_N "(cached) $ECHO_C" >&6
28297 else
28298
28299         ol_DB_LIB=-ldb-44
28300         ol_LIBS=$LIBS
28301         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28302
28303         cat >conftest.$ac_ext <<_ACEOF
28304 /* confdefs.h.  */
28305 _ACEOF
28306 cat confdefs.h >>conftest.$ac_ext
28307 cat >>conftest.$ac_ext <<_ACEOF
28308 /* end confdefs.h.  */
28309
28310 #ifdef HAVE_DB_185_H
28311 # include <db_185.h>
28312 #else
28313 # include <db.h>
28314 #endif
28315
28316 #ifndef DB_VERSION_MAJOR
28317 # define DB_VERSION_MAJOR 1
28318 #endif
28319
28320 #ifndef NULL
28321 #define NULL ((void*)0)
28322 #endif
28323
28324 int
28325 main ()
28326 {
28327
28328 #if DB_VERSION_MAJOR > 1
28329         {
28330                 char *version;
28331                 int major, minor, patch;
28332
28333                 version = db_version( &major, &minor, &patch );
28334
28335                 if( major != DB_VERSION_MAJOR ||
28336                         minor < DB_VERSION_MINOR )
28337                 {
28338                         printf("Berkeley DB version mismatch\n"
28339                                 "\theader: %s\n\tlibrary: %s\n",
28340                                 DB_VERSION_STRING, version);
28341                         return 1;
28342                 }
28343         }
28344 #endif
28345
28346 #if DB_VERSION_MAJOR > 2
28347         db_env_create( NULL, 0 );
28348 #elif DB_VERSION_MAJOR > 1
28349         db_appexit( NULL );
28350 #else
28351         (void) dbopen( NULL, 0, 0, 0, NULL);
28352 #endif
28353
28354   ;
28355   return 0;
28356 }
28357 _ACEOF
28358 rm -f conftest.$ac_objext conftest$ac_exeext
28359 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28360   (eval $ac_link) 2>conftest.er1
28361   ac_status=$?
28362   grep -v '^ *+' conftest.er1 >conftest.err
28363   rm -f conftest.er1
28364   cat conftest.err >&5
28365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28366   (exit $ac_status); } &&
28367          { ac_try='test -z "$ac_c_werror_flag"
28368                          || test ! -s conftest.err'
28369   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28370   (eval $ac_try) 2>&5
28371   ac_status=$?
28372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28373   (exit $ac_status); }; } &&
28374          { ac_try='test -s conftest$ac_exeext'
28375   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28376   (eval $ac_try) 2>&5
28377   ac_status=$?
28378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28379   (exit $ac_status); }; }; then
28380   ol_cv_db_db_44=yes
28381 else
28382   echo "$as_me: failed program was:" >&5
28383 sed 's/^/| /' conftest.$ac_ext >&5
28384
28385 ol_cv_db_db_44=no
28386 fi
28387 rm -f conftest.err conftest.$ac_objext \
28388       conftest$ac_exeext conftest.$ac_ext
28389
28390         LIBS="$ol_LIBS"
28391
28392 fi
28393 echo "$as_me:$LINENO: result: $ol_cv_db_db_44" >&5
28394 echo "${ECHO_T}$ol_cv_db_db_44" >&6
28395
28396         if test $ol_cv_db_db_44 = yes ; then
28397                 ol_cv_lib_db=-ldb-44
28398         fi
28399 fi
28400
28401                 if test $ol_cv_lib_db = no ; then
28402         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.4)" >&5
28403 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.4)... $ECHO_C" >&6
28404 if test "${ol_cv_db_db_4_dot_4+set}" = set; then
28405   echo $ECHO_N "(cached) $ECHO_C" >&6
28406 else
28407
28408         ol_DB_LIB=-ldb-4.4
28409         ol_LIBS=$LIBS
28410         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28411
28412         cat >conftest.$ac_ext <<_ACEOF
28413 /* confdefs.h.  */
28414 _ACEOF
28415 cat confdefs.h >>conftest.$ac_ext
28416 cat >>conftest.$ac_ext <<_ACEOF
28417 /* end confdefs.h.  */
28418
28419 #ifdef HAVE_DB_185_H
28420 # include <db_185.h>
28421 #else
28422 # include <db.h>
28423 #endif
28424
28425 #ifndef DB_VERSION_MAJOR
28426 # define DB_VERSION_MAJOR 1
28427 #endif
28428
28429 #ifndef NULL
28430 #define NULL ((void*)0)
28431 #endif
28432
28433 int
28434 main ()
28435 {
28436
28437 #if DB_VERSION_MAJOR > 1
28438         {
28439                 char *version;
28440                 int major, minor, patch;
28441
28442                 version = db_version( &major, &minor, &patch );
28443
28444                 if( major != DB_VERSION_MAJOR ||
28445                         minor < DB_VERSION_MINOR )
28446                 {
28447                         printf("Berkeley DB version mismatch\n"
28448                                 "\theader: %s\n\tlibrary: %s\n",
28449                                 DB_VERSION_STRING, version);
28450                         return 1;
28451                 }
28452         }
28453 #endif
28454
28455 #if DB_VERSION_MAJOR > 2
28456         db_env_create( NULL, 0 );
28457 #elif DB_VERSION_MAJOR > 1
28458         db_appexit( NULL );
28459 #else
28460         (void) dbopen( NULL, 0, 0, 0, NULL);
28461 #endif
28462
28463   ;
28464   return 0;
28465 }
28466 _ACEOF
28467 rm -f conftest.$ac_objext conftest$ac_exeext
28468 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28469   (eval $ac_link) 2>conftest.er1
28470   ac_status=$?
28471   grep -v '^ *+' conftest.er1 >conftest.err
28472   rm -f conftest.er1
28473   cat conftest.err >&5
28474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28475   (exit $ac_status); } &&
28476          { ac_try='test -z "$ac_c_werror_flag"
28477                          || test ! -s conftest.err'
28478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28479   (eval $ac_try) 2>&5
28480   ac_status=$?
28481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28482   (exit $ac_status); }; } &&
28483          { ac_try='test -s conftest$ac_exeext'
28484   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28485   (eval $ac_try) 2>&5
28486   ac_status=$?
28487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28488   (exit $ac_status); }; }; then
28489   ol_cv_db_db_4_dot_4=yes
28490 else
28491   echo "$as_me: failed program was:" >&5
28492 sed 's/^/| /' conftest.$ac_ext >&5
28493
28494 ol_cv_db_db_4_dot_4=no
28495 fi
28496 rm -f conftest.err conftest.$ac_objext \
28497       conftest$ac_exeext conftest.$ac_ext
28498
28499         LIBS="$ol_LIBS"
28500
28501 fi
28502 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_4" >&5
28503 echo "${ECHO_T}$ol_cv_db_db_4_dot_4" >&6
28504
28505         if test $ol_cv_db_db_4_dot_4 = yes ; then
28506                 ol_cv_lib_db=-ldb-4.4
28507         fi
28508 fi
28509
28510                 if test $ol_cv_lib_db = no ; then
28511         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-4)" >&5
28512 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-4)... $ECHO_C" >&6
28513 if test "${ol_cv_db_db_4_4+set}" = set; then
28514   echo $ECHO_N "(cached) $ECHO_C" >&6
28515 else
28516
28517         ol_DB_LIB=-ldb-4-4
28518         ol_LIBS=$LIBS
28519         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28520
28521         cat >conftest.$ac_ext <<_ACEOF
28522 /* confdefs.h.  */
28523 _ACEOF
28524 cat confdefs.h >>conftest.$ac_ext
28525 cat >>conftest.$ac_ext <<_ACEOF
28526 /* end confdefs.h.  */
28527
28528 #ifdef HAVE_DB_185_H
28529 # include <db_185.h>
28530 #else
28531 # include <db.h>
28532 #endif
28533
28534 #ifndef DB_VERSION_MAJOR
28535 # define DB_VERSION_MAJOR 1
28536 #endif
28537
28538 #ifndef NULL
28539 #define NULL ((void*)0)
28540 #endif
28541
28542 int
28543 main ()
28544 {
28545
28546 #if DB_VERSION_MAJOR > 1
28547         {
28548                 char *version;
28549                 int major, minor, patch;
28550
28551                 version = db_version( &major, &minor, &patch );
28552
28553                 if( major != DB_VERSION_MAJOR ||
28554                         minor < DB_VERSION_MINOR )
28555                 {
28556                         printf("Berkeley DB version mismatch\n"
28557                                 "\theader: %s\n\tlibrary: %s\n",
28558                                 DB_VERSION_STRING, version);
28559                         return 1;
28560                 }
28561         }
28562 #endif
28563
28564 #if DB_VERSION_MAJOR > 2
28565         db_env_create( NULL, 0 );
28566 #elif DB_VERSION_MAJOR > 1
28567         db_appexit( NULL );
28568 #else
28569         (void) dbopen( NULL, 0, 0, 0, NULL);
28570 #endif
28571
28572   ;
28573   return 0;
28574 }
28575 _ACEOF
28576 rm -f conftest.$ac_objext conftest$ac_exeext
28577 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28578   (eval $ac_link) 2>conftest.er1
28579   ac_status=$?
28580   grep -v '^ *+' conftest.er1 >conftest.err
28581   rm -f conftest.er1
28582   cat conftest.err >&5
28583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28584   (exit $ac_status); } &&
28585          { ac_try='test -z "$ac_c_werror_flag"
28586                          || test ! -s conftest.err'
28587   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28588   (eval $ac_try) 2>&5
28589   ac_status=$?
28590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28591   (exit $ac_status); }; } &&
28592          { ac_try='test -s conftest$ac_exeext'
28593   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28594   (eval $ac_try) 2>&5
28595   ac_status=$?
28596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28597   (exit $ac_status); }; }; then
28598   ol_cv_db_db_4_4=yes
28599 else
28600   echo "$as_me: failed program was:" >&5
28601 sed 's/^/| /' conftest.$ac_ext >&5
28602
28603 ol_cv_db_db_4_4=no
28604 fi
28605 rm -f conftest.err conftest.$ac_objext \
28606       conftest$ac_exeext conftest.$ac_ext
28607
28608         LIBS="$ol_LIBS"
28609
28610 fi
28611 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_4" >&5
28612 echo "${ECHO_T}$ol_cv_db_db_4_4" >&6
28613
28614         if test $ol_cv_db_db_4_4 = yes ; then
28615                 ol_cv_lib_db=-ldb-4-4
28616         fi
28617 fi
28618
28619         elif test $ol_cv_bdb_minor = 3 ; then
28620                 if test $ol_cv_lib_db = no ; then
28621         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb43)" >&5
28622 echo $ECHO_N "checking for Berkeley DB link (-ldb43)... $ECHO_C" >&6
28623 if test "${ol_cv_db_db43+set}" = set; then
28624   echo $ECHO_N "(cached) $ECHO_C" >&6
28625 else
28626
28627         ol_DB_LIB=-ldb43
28628         ol_LIBS=$LIBS
28629         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28630
28631         cat >conftest.$ac_ext <<_ACEOF
28632 /* confdefs.h.  */
28633 _ACEOF
28634 cat confdefs.h >>conftest.$ac_ext
28635 cat >>conftest.$ac_ext <<_ACEOF
28636 /* end confdefs.h.  */
28637
28638 #ifdef HAVE_DB_185_H
28639 # include <db_185.h>
28640 #else
28641 # include <db.h>
28642 #endif
28643
28644 #ifndef DB_VERSION_MAJOR
28645 # define DB_VERSION_MAJOR 1
28646 #endif
28647
28648 #ifndef NULL
28649 #define NULL ((void*)0)
28650 #endif
28651
28652 int
28653 main ()
28654 {
28655
28656 #if DB_VERSION_MAJOR > 1
28657         {
28658                 char *version;
28659                 int major, minor, patch;
28660
28661                 version = db_version( &major, &minor, &patch );
28662
28663                 if( major != DB_VERSION_MAJOR ||
28664                         minor < DB_VERSION_MINOR )
28665                 {
28666                         printf("Berkeley DB version mismatch\n"
28667                                 "\theader: %s\n\tlibrary: %s\n",
28668                                 DB_VERSION_STRING, version);
28669                         return 1;
28670                 }
28671         }
28672 #endif
28673
28674 #if DB_VERSION_MAJOR > 2
28675         db_env_create( NULL, 0 );
28676 #elif DB_VERSION_MAJOR > 1
28677         db_appexit( NULL );
28678 #else
28679         (void) dbopen( NULL, 0, 0, 0, NULL);
28680 #endif
28681
28682   ;
28683   return 0;
28684 }
28685 _ACEOF
28686 rm -f conftest.$ac_objext conftest$ac_exeext
28687 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28688   (eval $ac_link) 2>conftest.er1
28689   ac_status=$?
28690   grep -v '^ *+' conftest.er1 >conftest.err
28691   rm -f conftest.er1
28692   cat conftest.err >&5
28693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28694   (exit $ac_status); } &&
28695          { ac_try='test -z "$ac_c_werror_flag"
28696                          || test ! -s conftest.err'
28697   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28698   (eval $ac_try) 2>&5
28699   ac_status=$?
28700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28701   (exit $ac_status); }; } &&
28702          { ac_try='test -s conftest$ac_exeext'
28703   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28704   (eval $ac_try) 2>&5
28705   ac_status=$?
28706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28707   (exit $ac_status); }; }; then
28708   ol_cv_db_db43=yes
28709 else
28710   echo "$as_me: failed program was:" >&5
28711 sed 's/^/| /' conftest.$ac_ext >&5
28712
28713 ol_cv_db_db43=no
28714 fi
28715 rm -f conftest.err conftest.$ac_objext \
28716       conftest$ac_exeext conftest.$ac_ext
28717
28718         LIBS="$ol_LIBS"
28719
28720 fi
28721 echo "$as_me:$LINENO: result: $ol_cv_db_db43" >&5
28722 echo "${ECHO_T}$ol_cv_db_db43" >&6
28723
28724         if test $ol_cv_db_db43 = yes ; then
28725                 ol_cv_lib_db=-ldb43
28726         fi
28727 fi
28728
28729                 if test $ol_cv_lib_db = no ; then
28730         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-43)" >&5
28731 echo $ECHO_N "checking for Berkeley DB link (-ldb-43)... $ECHO_C" >&6
28732 if test "${ol_cv_db_db_43+set}" = set; then
28733   echo $ECHO_N "(cached) $ECHO_C" >&6
28734 else
28735
28736         ol_DB_LIB=-ldb-43
28737         ol_LIBS=$LIBS
28738         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28739
28740         cat >conftest.$ac_ext <<_ACEOF
28741 /* confdefs.h.  */
28742 _ACEOF
28743 cat confdefs.h >>conftest.$ac_ext
28744 cat >>conftest.$ac_ext <<_ACEOF
28745 /* end confdefs.h.  */
28746
28747 #ifdef HAVE_DB_185_H
28748 # include <db_185.h>
28749 #else
28750 # include <db.h>
28751 #endif
28752
28753 #ifndef DB_VERSION_MAJOR
28754 # define DB_VERSION_MAJOR 1
28755 #endif
28756
28757 #ifndef NULL
28758 #define NULL ((void*)0)
28759 #endif
28760
28761 int
28762 main ()
28763 {
28764
28765 #if DB_VERSION_MAJOR > 1
28766         {
28767                 char *version;
28768                 int major, minor, patch;
28769
28770                 version = db_version( &major, &minor, &patch );
28771
28772                 if( major != DB_VERSION_MAJOR ||
28773                         minor < DB_VERSION_MINOR )
28774                 {
28775                         printf("Berkeley DB version mismatch\n"
28776                                 "\theader: %s\n\tlibrary: %s\n",
28777                                 DB_VERSION_STRING, version);
28778                         return 1;
28779                 }
28780         }
28781 #endif
28782
28783 #if DB_VERSION_MAJOR > 2
28784         db_env_create( NULL, 0 );
28785 #elif DB_VERSION_MAJOR > 1
28786         db_appexit( NULL );
28787 #else
28788         (void) dbopen( NULL, 0, 0, 0, NULL);
28789 #endif
28790
28791   ;
28792   return 0;
28793 }
28794 _ACEOF
28795 rm -f conftest.$ac_objext conftest$ac_exeext
28796 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28797   (eval $ac_link) 2>conftest.er1
28798   ac_status=$?
28799   grep -v '^ *+' conftest.er1 >conftest.err
28800   rm -f conftest.er1
28801   cat conftest.err >&5
28802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28803   (exit $ac_status); } &&
28804          { ac_try='test -z "$ac_c_werror_flag"
28805                          || test ! -s conftest.err'
28806   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28807   (eval $ac_try) 2>&5
28808   ac_status=$?
28809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28810   (exit $ac_status); }; } &&
28811          { ac_try='test -s conftest$ac_exeext'
28812   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28813   (eval $ac_try) 2>&5
28814   ac_status=$?
28815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28816   (exit $ac_status); }; }; then
28817   ol_cv_db_db_43=yes
28818 else
28819   echo "$as_me: failed program was:" >&5
28820 sed 's/^/| /' conftest.$ac_ext >&5
28821
28822 ol_cv_db_db_43=no
28823 fi
28824 rm -f conftest.err conftest.$ac_objext \
28825       conftest$ac_exeext conftest.$ac_ext
28826
28827         LIBS="$ol_LIBS"
28828
28829 fi
28830 echo "$as_me:$LINENO: result: $ol_cv_db_db_43" >&5
28831 echo "${ECHO_T}$ol_cv_db_db_43" >&6
28832
28833         if test $ol_cv_db_db_43 = yes ; then
28834                 ol_cv_lib_db=-ldb-43
28835         fi
28836 fi
28837
28838                 if test $ol_cv_lib_db = no ; then
28839         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.3)" >&5
28840 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.3)... $ECHO_C" >&6
28841 if test "${ol_cv_db_db_4_dot_3+set}" = set; then
28842   echo $ECHO_N "(cached) $ECHO_C" >&6
28843 else
28844
28845         ol_DB_LIB=-ldb-4.3
28846         ol_LIBS=$LIBS
28847         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28848
28849         cat >conftest.$ac_ext <<_ACEOF
28850 /* confdefs.h.  */
28851 _ACEOF
28852 cat confdefs.h >>conftest.$ac_ext
28853 cat >>conftest.$ac_ext <<_ACEOF
28854 /* end confdefs.h.  */
28855
28856 #ifdef HAVE_DB_185_H
28857 # include <db_185.h>
28858 #else
28859 # include <db.h>
28860 #endif
28861
28862 #ifndef DB_VERSION_MAJOR
28863 # define DB_VERSION_MAJOR 1
28864 #endif
28865
28866 #ifndef NULL
28867 #define NULL ((void*)0)
28868 #endif
28869
28870 int
28871 main ()
28872 {
28873
28874 #if DB_VERSION_MAJOR > 1
28875         {
28876                 char *version;
28877                 int major, minor, patch;
28878
28879                 version = db_version( &major, &minor, &patch );
28880
28881                 if( major != DB_VERSION_MAJOR ||
28882                         minor < DB_VERSION_MINOR )
28883                 {
28884                         printf("Berkeley DB version mismatch\n"
28885                                 "\theader: %s\n\tlibrary: %s\n",
28886                                 DB_VERSION_STRING, version);
28887                         return 1;
28888                 }
28889         }
28890 #endif
28891
28892 #if DB_VERSION_MAJOR > 2
28893         db_env_create( NULL, 0 );
28894 #elif DB_VERSION_MAJOR > 1
28895         db_appexit( NULL );
28896 #else
28897         (void) dbopen( NULL, 0, 0, 0, NULL);
28898 #endif
28899
28900   ;
28901   return 0;
28902 }
28903 _ACEOF
28904 rm -f conftest.$ac_objext conftest$ac_exeext
28905 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28906   (eval $ac_link) 2>conftest.er1
28907   ac_status=$?
28908   grep -v '^ *+' conftest.er1 >conftest.err
28909   rm -f conftest.er1
28910   cat conftest.err >&5
28911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28912   (exit $ac_status); } &&
28913          { ac_try='test -z "$ac_c_werror_flag"
28914                          || test ! -s conftest.err'
28915   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28916   (eval $ac_try) 2>&5
28917   ac_status=$?
28918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28919   (exit $ac_status); }; } &&
28920          { ac_try='test -s conftest$ac_exeext'
28921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28922   (eval $ac_try) 2>&5
28923   ac_status=$?
28924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28925   (exit $ac_status); }; }; then
28926   ol_cv_db_db_4_dot_3=yes
28927 else
28928   echo "$as_me: failed program was:" >&5
28929 sed 's/^/| /' conftest.$ac_ext >&5
28930
28931 ol_cv_db_db_4_dot_3=no
28932 fi
28933 rm -f conftest.err conftest.$ac_objext \
28934       conftest$ac_exeext conftest.$ac_ext
28935
28936         LIBS="$ol_LIBS"
28937
28938 fi
28939 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_3" >&5
28940 echo "${ECHO_T}$ol_cv_db_db_4_dot_3" >&6
28941
28942         if test $ol_cv_db_db_4_dot_3 = yes ; then
28943                 ol_cv_lib_db=-ldb-4.3
28944         fi
28945 fi
28946
28947                 if test $ol_cv_lib_db = no ; then
28948         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-3)" >&5
28949 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-3)... $ECHO_C" >&6
28950 if test "${ol_cv_db_db_4_3+set}" = set; then
28951   echo $ECHO_N "(cached) $ECHO_C" >&6
28952 else
28953
28954         ol_DB_LIB=-ldb-4-3
28955         ol_LIBS=$LIBS
28956         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28957
28958         cat >conftest.$ac_ext <<_ACEOF
28959 /* confdefs.h.  */
28960 _ACEOF
28961 cat confdefs.h >>conftest.$ac_ext
28962 cat >>conftest.$ac_ext <<_ACEOF
28963 /* end confdefs.h.  */
28964
28965 #ifdef HAVE_DB_185_H
28966 # include <db_185.h>
28967 #else
28968 # include <db.h>
28969 #endif
28970
28971 #ifndef DB_VERSION_MAJOR
28972 # define DB_VERSION_MAJOR 1
28973 #endif
28974
28975 #ifndef NULL
28976 #define NULL ((void*)0)
28977 #endif
28978
28979 int
28980 main ()
28981 {
28982
28983 #if DB_VERSION_MAJOR > 1
28984         {
28985                 char *version;
28986                 int major, minor, patch;
28987
28988                 version = db_version( &major, &minor, &patch );
28989
28990                 if( major != DB_VERSION_MAJOR ||
28991                         minor < DB_VERSION_MINOR )
28992                 {
28993                         printf("Berkeley DB version mismatch\n"
28994                                 "\theader: %s\n\tlibrary: %s\n",
28995                                 DB_VERSION_STRING, version);
28996                         return 1;
28997                 }
28998         }
28999 #endif
29000
29001 #if DB_VERSION_MAJOR > 2
29002         db_env_create( NULL, 0 );
29003 #elif DB_VERSION_MAJOR > 1
29004         db_appexit( NULL );
29005 #else
29006         (void) dbopen( NULL, 0, 0, 0, NULL);
29007 #endif
29008
29009   ;
29010   return 0;
29011 }
29012 _ACEOF
29013 rm -f conftest.$ac_objext conftest$ac_exeext
29014 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29015   (eval $ac_link) 2>conftest.er1
29016   ac_status=$?
29017   grep -v '^ *+' conftest.er1 >conftest.err
29018   rm -f conftest.er1
29019   cat conftest.err >&5
29020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29021   (exit $ac_status); } &&
29022          { ac_try='test -z "$ac_c_werror_flag"
29023                          || test ! -s conftest.err'
29024   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29025   (eval $ac_try) 2>&5
29026   ac_status=$?
29027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29028   (exit $ac_status); }; } &&
29029          { ac_try='test -s conftest$ac_exeext'
29030   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29031   (eval $ac_try) 2>&5
29032   ac_status=$?
29033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29034   (exit $ac_status); }; }; then
29035   ol_cv_db_db_4_3=yes
29036 else
29037   echo "$as_me: failed program was:" >&5
29038 sed 's/^/| /' conftest.$ac_ext >&5
29039
29040 ol_cv_db_db_4_3=no
29041 fi
29042 rm -f conftest.err conftest.$ac_objext \
29043       conftest$ac_exeext conftest.$ac_ext
29044
29045         LIBS="$ol_LIBS"
29046
29047 fi
29048 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_3" >&5
29049 echo "${ECHO_T}$ol_cv_db_db_4_3" >&6
29050
29051         if test $ol_cv_db_db_4_3 = yes ; then
29052                 ol_cv_lib_db=-ldb-4-3
29053         fi
29054 fi
29055
29056         elif test $ol_cv_bdb_minor = 2 ; then
29057                 if test $ol_cv_lib_db = no ; then
29058         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb42)" >&5
29059 echo $ECHO_N "checking for Berkeley DB link (-ldb42)... $ECHO_C" >&6
29060 if test "${ol_cv_db_db42+set}" = set; then
29061   echo $ECHO_N "(cached) $ECHO_C" >&6
29062 else
29063
29064         ol_DB_LIB=-ldb42
29065         ol_LIBS=$LIBS
29066         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29067
29068         cat >conftest.$ac_ext <<_ACEOF
29069 /* confdefs.h.  */
29070 _ACEOF
29071 cat confdefs.h >>conftest.$ac_ext
29072 cat >>conftest.$ac_ext <<_ACEOF
29073 /* end confdefs.h.  */
29074
29075 #ifdef HAVE_DB_185_H
29076 # include <db_185.h>
29077 #else
29078 # include <db.h>
29079 #endif
29080
29081 #ifndef DB_VERSION_MAJOR
29082 # define DB_VERSION_MAJOR 1
29083 #endif
29084
29085 #ifndef NULL
29086 #define NULL ((void*)0)
29087 #endif
29088
29089 int
29090 main ()
29091 {
29092
29093 #if DB_VERSION_MAJOR > 1
29094         {
29095                 char *version;
29096                 int major, minor, patch;
29097
29098                 version = db_version( &major, &minor, &patch );
29099
29100                 if( major != DB_VERSION_MAJOR ||
29101                         minor < DB_VERSION_MINOR )
29102                 {
29103                         printf("Berkeley DB version mismatch\n"
29104                                 "\theader: %s\n\tlibrary: %s\n",
29105                                 DB_VERSION_STRING, version);
29106                         return 1;
29107                 }
29108         }
29109 #endif
29110
29111 #if DB_VERSION_MAJOR > 2
29112         db_env_create( NULL, 0 );
29113 #elif DB_VERSION_MAJOR > 1
29114         db_appexit( NULL );
29115 #else
29116         (void) dbopen( NULL, 0, 0, 0, NULL);
29117 #endif
29118
29119   ;
29120   return 0;
29121 }
29122 _ACEOF
29123 rm -f conftest.$ac_objext conftest$ac_exeext
29124 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29125   (eval $ac_link) 2>conftest.er1
29126   ac_status=$?
29127   grep -v '^ *+' conftest.er1 >conftest.err
29128   rm -f conftest.er1
29129   cat conftest.err >&5
29130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29131   (exit $ac_status); } &&
29132          { ac_try='test -z "$ac_c_werror_flag"
29133                          || test ! -s conftest.err'
29134   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29135   (eval $ac_try) 2>&5
29136   ac_status=$?
29137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29138   (exit $ac_status); }; } &&
29139          { ac_try='test -s conftest$ac_exeext'
29140   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29141   (eval $ac_try) 2>&5
29142   ac_status=$?
29143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29144   (exit $ac_status); }; }; then
29145   ol_cv_db_db42=yes
29146 else
29147   echo "$as_me: failed program was:" >&5
29148 sed 's/^/| /' conftest.$ac_ext >&5
29149
29150 ol_cv_db_db42=no
29151 fi
29152 rm -f conftest.err conftest.$ac_objext \
29153       conftest$ac_exeext conftest.$ac_ext
29154
29155         LIBS="$ol_LIBS"
29156
29157 fi
29158 echo "$as_me:$LINENO: result: $ol_cv_db_db42" >&5
29159 echo "${ECHO_T}$ol_cv_db_db42" >&6
29160
29161         if test $ol_cv_db_db42 = yes ; then
29162                 ol_cv_lib_db=-ldb42
29163         fi
29164 fi
29165
29166                 if test $ol_cv_lib_db = no ; then
29167         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-42)" >&5
29168 echo $ECHO_N "checking for Berkeley DB link (-ldb-42)... $ECHO_C" >&6
29169 if test "${ol_cv_db_db_42+set}" = set; then
29170   echo $ECHO_N "(cached) $ECHO_C" >&6
29171 else
29172
29173         ol_DB_LIB=-ldb-42
29174         ol_LIBS=$LIBS
29175         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29176
29177         cat >conftest.$ac_ext <<_ACEOF
29178 /* confdefs.h.  */
29179 _ACEOF
29180 cat confdefs.h >>conftest.$ac_ext
29181 cat >>conftest.$ac_ext <<_ACEOF
29182 /* end confdefs.h.  */
29183
29184 #ifdef HAVE_DB_185_H
29185 # include <db_185.h>
29186 #else
29187 # include <db.h>
29188 #endif
29189
29190 #ifndef DB_VERSION_MAJOR
29191 # define DB_VERSION_MAJOR 1
29192 #endif
29193
29194 #ifndef NULL
29195 #define NULL ((void*)0)
29196 #endif
29197
29198 int
29199 main ()
29200 {
29201
29202 #if DB_VERSION_MAJOR > 1
29203         {
29204                 char *version;
29205                 int major, minor, patch;
29206
29207                 version = db_version( &major, &minor, &patch );
29208
29209                 if( major != DB_VERSION_MAJOR ||
29210                         minor < DB_VERSION_MINOR )
29211                 {
29212                         printf("Berkeley DB version mismatch\n"
29213                                 "\theader: %s\n\tlibrary: %s\n",
29214                                 DB_VERSION_STRING, version);
29215                         return 1;
29216                 }
29217         }
29218 #endif
29219
29220 #if DB_VERSION_MAJOR > 2
29221         db_env_create( NULL, 0 );
29222 #elif DB_VERSION_MAJOR > 1
29223         db_appexit( NULL );
29224 #else
29225         (void) dbopen( NULL, 0, 0, 0, NULL);
29226 #endif
29227
29228   ;
29229   return 0;
29230 }
29231 _ACEOF
29232 rm -f conftest.$ac_objext conftest$ac_exeext
29233 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29234   (eval $ac_link) 2>conftest.er1
29235   ac_status=$?
29236   grep -v '^ *+' conftest.er1 >conftest.err
29237   rm -f conftest.er1
29238   cat conftest.err >&5
29239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29240   (exit $ac_status); } &&
29241          { ac_try='test -z "$ac_c_werror_flag"
29242                          || test ! -s conftest.err'
29243   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29244   (eval $ac_try) 2>&5
29245   ac_status=$?
29246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29247   (exit $ac_status); }; } &&
29248          { ac_try='test -s conftest$ac_exeext'
29249   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29250   (eval $ac_try) 2>&5
29251   ac_status=$?
29252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29253   (exit $ac_status); }; }; then
29254   ol_cv_db_db_42=yes
29255 else
29256   echo "$as_me: failed program was:" >&5
29257 sed 's/^/| /' conftest.$ac_ext >&5
29258
29259 ol_cv_db_db_42=no
29260 fi
29261 rm -f conftest.err conftest.$ac_objext \
29262       conftest$ac_exeext conftest.$ac_ext
29263
29264         LIBS="$ol_LIBS"
29265
29266 fi
29267 echo "$as_me:$LINENO: result: $ol_cv_db_db_42" >&5
29268 echo "${ECHO_T}$ol_cv_db_db_42" >&6
29269
29270         if test $ol_cv_db_db_42 = yes ; then
29271                 ol_cv_lib_db=-ldb-42
29272         fi
29273 fi
29274
29275                 if test $ol_cv_lib_db = no ; then
29276         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.2)" >&5
29277 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.2)... $ECHO_C" >&6
29278 if test "${ol_cv_db_db_4_dot_2+set}" = set; then
29279   echo $ECHO_N "(cached) $ECHO_C" >&6
29280 else
29281
29282         ol_DB_LIB=-ldb-4.2
29283         ol_LIBS=$LIBS
29284         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29285
29286         cat >conftest.$ac_ext <<_ACEOF
29287 /* confdefs.h.  */
29288 _ACEOF
29289 cat confdefs.h >>conftest.$ac_ext
29290 cat >>conftest.$ac_ext <<_ACEOF
29291 /* end confdefs.h.  */
29292
29293 #ifdef HAVE_DB_185_H
29294 # include <db_185.h>
29295 #else
29296 # include <db.h>
29297 #endif
29298
29299 #ifndef DB_VERSION_MAJOR
29300 # define DB_VERSION_MAJOR 1
29301 #endif
29302
29303 #ifndef NULL
29304 #define NULL ((void*)0)
29305 #endif
29306
29307 int
29308 main ()
29309 {
29310
29311 #if DB_VERSION_MAJOR > 1
29312         {
29313                 char *version;
29314                 int major, minor, patch;
29315
29316                 version = db_version( &major, &minor, &patch );
29317
29318                 if( major != DB_VERSION_MAJOR ||
29319                         minor < DB_VERSION_MINOR )
29320                 {
29321                         printf("Berkeley DB version mismatch\n"
29322                                 "\theader: %s\n\tlibrary: %s\n",
29323                                 DB_VERSION_STRING, version);
29324                         return 1;
29325                 }
29326         }
29327 #endif
29328
29329 #if DB_VERSION_MAJOR > 2
29330         db_env_create( NULL, 0 );
29331 #elif DB_VERSION_MAJOR > 1
29332         db_appexit( NULL );
29333 #else
29334         (void) dbopen( NULL, 0, 0, 0, NULL);
29335 #endif
29336
29337   ;
29338   return 0;
29339 }
29340 _ACEOF
29341 rm -f conftest.$ac_objext conftest$ac_exeext
29342 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29343   (eval $ac_link) 2>conftest.er1
29344   ac_status=$?
29345   grep -v '^ *+' conftest.er1 >conftest.err
29346   rm -f conftest.er1
29347   cat conftest.err >&5
29348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29349   (exit $ac_status); } &&
29350          { ac_try='test -z "$ac_c_werror_flag"
29351                          || test ! -s conftest.err'
29352   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29353   (eval $ac_try) 2>&5
29354   ac_status=$?
29355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29356   (exit $ac_status); }; } &&
29357          { ac_try='test -s conftest$ac_exeext'
29358   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29359   (eval $ac_try) 2>&5
29360   ac_status=$?
29361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29362   (exit $ac_status); }; }; then
29363   ol_cv_db_db_4_dot_2=yes
29364 else
29365   echo "$as_me: failed program was:" >&5
29366 sed 's/^/| /' conftest.$ac_ext >&5
29367
29368 ol_cv_db_db_4_dot_2=no
29369 fi
29370 rm -f conftest.err conftest.$ac_objext \
29371       conftest$ac_exeext conftest.$ac_ext
29372
29373         LIBS="$ol_LIBS"
29374
29375 fi
29376 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_2" >&5
29377 echo "${ECHO_T}$ol_cv_db_db_4_dot_2" >&6
29378
29379         if test $ol_cv_db_db_4_dot_2 = yes ; then
29380                 ol_cv_lib_db=-ldb-4.2
29381         fi
29382 fi
29383
29384                 if test $ol_cv_lib_db = no ; then
29385         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-2)" >&5
29386 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-2)... $ECHO_C" >&6
29387 if test "${ol_cv_db_db_4_2+set}" = set; then
29388   echo $ECHO_N "(cached) $ECHO_C" >&6
29389 else
29390
29391         ol_DB_LIB=-ldb-4-2
29392         ol_LIBS=$LIBS
29393         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29394
29395         cat >conftest.$ac_ext <<_ACEOF
29396 /* confdefs.h.  */
29397 _ACEOF
29398 cat confdefs.h >>conftest.$ac_ext
29399 cat >>conftest.$ac_ext <<_ACEOF
29400 /* end confdefs.h.  */
29401
29402 #ifdef HAVE_DB_185_H
29403 # include <db_185.h>
29404 #else
29405 # include <db.h>
29406 #endif
29407
29408 #ifndef DB_VERSION_MAJOR
29409 # define DB_VERSION_MAJOR 1
29410 #endif
29411
29412 #ifndef NULL
29413 #define NULL ((void*)0)
29414 #endif
29415
29416 int
29417 main ()
29418 {
29419
29420 #if DB_VERSION_MAJOR > 1
29421         {
29422                 char *version;
29423                 int major, minor, patch;
29424
29425                 version = db_version( &major, &minor, &patch );
29426
29427                 if( major != DB_VERSION_MAJOR ||
29428                         minor < DB_VERSION_MINOR )
29429                 {
29430                         printf("Berkeley DB version mismatch\n"
29431                                 "\theader: %s\n\tlibrary: %s\n",
29432                                 DB_VERSION_STRING, version);
29433                         return 1;
29434                 }
29435         }
29436 #endif
29437
29438 #if DB_VERSION_MAJOR > 2
29439         db_env_create( NULL, 0 );
29440 #elif DB_VERSION_MAJOR > 1
29441         db_appexit( NULL );
29442 #else
29443         (void) dbopen( NULL, 0, 0, 0, NULL);
29444 #endif
29445
29446   ;
29447   return 0;
29448 }
29449 _ACEOF
29450 rm -f conftest.$ac_objext conftest$ac_exeext
29451 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29452   (eval $ac_link) 2>conftest.er1
29453   ac_status=$?
29454   grep -v '^ *+' conftest.er1 >conftest.err
29455   rm -f conftest.er1
29456   cat conftest.err >&5
29457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29458   (exit $ac_status); } &&
29459          { ac_try='test -z "$ac_c_werror_flag"
29460                          || test ! -s conftest.err'
29461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29462   (eval $ac_try) 2>&5
29463   ac_status=$?
29464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29465   (exit $ac_status); }; } &&
29466          { ac_try='test -s conftest$ac_exeext'
29467   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29468   (eval $ac_try) 2>&5
29469   ac_status=$?
29470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29471   (exit $ac_status); }; }; then
29472   ol_cv_db_db_4_2=yes
29473 else
29474   echo "$as_me: failed program was:" >&5
29475 sed 's/^/| /' conftest.$ac_ext >&5
29476
29477 ol_cv_db_db_4_2=no
29478 fi
29479 rm -f conftest.err conftest.$ac_objext \
29480       conftest$ac_exeext conftest.$ac_ext
29481
29482         LIBS="$ol_LIBS"
29483
29484 fi
29485 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_2" >&5
29486 echo "${ECHO_T}$ol_cv_db_db_4_2" >&6
29487
29488         if test $ol_cv_db_db_4_2 = yes ; then
29489                 ol_cv_lib_db=-ldb-4-2
29490         fi
29491 fi
29492
29493         elif test $ol_cv_bdb_minor = 1 ; then
29494                 if test $ol_cv_lib_db = no ; then
29495         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb41)" >&5
29496 echo $ECHO_N "checking for Berkeley DB link (-ldb41)... $ECHO_C" >&6
29497 if test "${ol_cv_db_db41+set}" = set; then
29498   echo $ECHO_N "(cached) $ECHO_C" >&6
29499 else
29500
29501         ol_DB_LIB=-ldb41
29502         ol_LIBS=$LIBS
29503         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29504
29505         cat >conftest.$ac_ext <<_ACEOF
29506 /* confdefs.h.  */
29507 _ACEOF
29508 cat confdefs.h >>conftest.$ac_ext
29509 cat >>conftest.$ac_ext <<_ACEOF
29510 /* end confdefs.h.  */
29511
29512 #ifdef HAVE_DB_185_H
29513 # include <db_185.h>
29514 #else
29515 # include <db.h>
29516 #endif
29517
29518 #ifndef DB_VERSION_MAJOR
29519 # define DB_VERSION_MAJOR 1
29520 #endif
29521
29522 #ifndef NULL
29523 #define NULL ((void*)0)
29524 #endif
29525
29526 int
29527 main ()
29528 {
29529
29530 #if DB_VERSION_MAJOR > 1
29531         {
29532                 char *version;
29533                 int major, minor, patch;
29534
29535                 version = db_version( &major, &minor, &patch );
29536
29537                 if( major != DB_VERSION_MAJOR ||
29538                         minor < DB_VERSION_MINOR )
29539                 {
29540                         printf("Berkeley DB version mismatch\n"
29541                                 "\theader: %s\n\tlibrary: %s\n",
29542                                 DB_VERSION_STRING, version);
29543                         return 1;
29544                 }
29545         }
29546 #endif
29547
29548 #if DB_VERSION_MAJOR > 2
29549         db_env_create( NULL, 0 );
29550 #elif DB_VERSION_MAJOR > 1
29551         db_appexit( NULL );
29552 #else
29553         (void) dbopen( NULL, 0, 0, 0, NULL);
29554 #endif
29555
29556   ;
29557   return 0;
29558 }
29559 _ACEOF
29560 rm -f conftest.$ac_objext conftest$ac_exeext
29561 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29562   (eval $ac_link) 2>conftest.er1
29563   ac_status=$?
29564   grep -v '^ *+' conftest.er1 >conftest.err
29565   rm -f conftest.er1
29566   cat conftest.err >&5
29567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29568   (exit $ac_status); } &&
29569          { ac_try='test -z "$ac_c_werror_flag"
29570                          || test ! -s conftest.err'
29571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29572   (eval $ac_try) 2>&5
29573   ac_status=$?
29574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29575   (exit $ac_status); }; } &&
29576          { ac_try='test -s conftest$ac_exeext'
29577   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29578   (eval $ac_try) 2>&5
29579   ac_status=$?
29580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29581   (exit $ac_status); }; }; then
29582   ol_cv_db_db41=yes
29583 else
29584   echo "$as_me: failed program was:" >&5
29585 sed 's/^/| /' conftest.$ac_ext >&5
29586
29587 ol_cv_db_db41=no
29588 fi
29589 rm -f conftest.err conftest.$ac_objext \
29590       conftest$ac_exeext conftest.$ac_ext
29591
29592         LIBS="$ol_LIBS"
29593
29594 fi
29595 echo "$as_me:$LINENO: result: $ol_cv_db_db41" >&5
29596 echo "${ECHO_T}$ol_cv_db_db41" >&6
29597
29598         if test $ol_cv_db_db41 = yes ; then
29599                 ol_cv_lib_db=-ldb41
29600         fi
29601 fi
29602
29603                 if test $ol_cv_lib_db = no ; then
29604         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-41)" >&5
29605 echo $ECHO_N "checking for Berkeley DB link (-ldb-41)... $ECHO_C" >&6
29606 if test "${ol_cv_db_db_41+set}" = set; then
29607   echo $ECHO_N "(cached) $ECHO_C" >&6
29608 else
29609
29610         ol_DB_LIB=-ldb-41
29611         ol_LIBS=$LIBS
29612         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29613
29614         cat >conftest.$ac_ext <<_ACEOF
29615 /* confdefs.h.  */
29616 _ACEOF
29617 cat confdefs.h >>conftest.$ac_ext
29618 cat >>conftest.$ac_ext <<_ACEOF
29619 /* end confdefs.h.  */
29620
29621 #ifdef HAVE_DB_185_H
29622 # include <db_185.h>
29623 #else
29624 # include <db.h>
29625 #endif
29626
29627 #ifndef DB_VERSION_MAJOR
29628 # define DB_VERSION_MAJOR 1
29629 #endif
29630
29631 #ifndef NULL
29632 #define NULL ((void*)0)
29633 #endif
29634
29635 int
29636 main ()
29637 {
29638
29639 #if DB_VERSION_MAJOR > 1
29640         {
29641                 char *version;
29642                 int major, minor, patch;
29643
29644                 version = db_version( &major, &minor, &patch );
29645
29646                 if( major != DB_VERSION_MAJOR ||
29647                         minor < DB_VERSION_MINOR )
29648                 {
29649                         printf("Berkeley DB version mismatch\n"
29650                                 "\theader: %s\n\tlibrary: %s\n",
29651                                 DB_VERSION_STRING, version);
29652                         return 1;
29653                 }
29654         }
29655 #endif
29656
29657 #if DB_VERSION_MAJOR > 2
29658         db_env_create( NULL, 0 );
29659 #elif DB_VERSION_MAJOR > 1
29660         db_appexit( NULL );
29661 #else
29662         (void) dbopen( NULL, 0, 0, 0, NULL);
29663 #endif
29664
29665   ;
29666   return 0;
29667 }
29668 _ACEOF
29669 rm -f conftest.$ac_objext conftest$ac_exeext
29670 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29671   (eval $ac_link) 2>conftest.er1
29672   ac_status=$?
29673   grep -v '^ *+' conftest.er1 >conftest.err
29674   rm -f conftest.er1
29675   cat conftest.err >&5
29676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29677   (exit $ac_status); } &&
29678          { ac_try='test -z "$ac_c_werror_flag"
29679                          || test ! -s conftest.err'
29680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29681   (eval $ac_try) 2>&5
29682   ac_status=$?
29683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29684   (exit $ac_status); }; } &&
29685          { ac_try='test -s conftest$ac_exeext'
29686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29687   (eval $ac_try) 2>&5
29688   ac_status=$?
29689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29690   (exit $ac_status); }; }; then
29691   ol_cv_db_db_41=yes
29692 else
29693   echo "$as_me: failed program was:" >&5
29694 sed 's/^/| /' conftest.$ac_ext >&5
29695
29696 ol_cv_db_db_41=no
29697 fi
29698 rm -f conftest.err conftest.$ac_objext \
29699       conftest$ac_exeext conftest.$ac_ext
29700
29701         LIBS="$ol_LIBS"
29702
29703 fi
29704 echo "$as_me:$LINENO: result: $ol_cv_db_db_41" >&5
29705 echo "${ECHO_T}$ol_cv_db_db_41" >&6
29706
29707         if test $ol_cv_db_db_41 = yes ; then
29708                 ol_cv_lib_db=-ldb-41
29709         fi
29710 fi
29711
29712                 if test $ol_cv_lib_db = no ; then
29713         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.1)" >&5
29714 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.1)... $ECHO_C" >&6
29715 if test "${ol_cv_db_db_4_dot_1+set}" = set; then
29716   echo $ECHO_N "(cached) $ECHO_C" >&6
29717 else
29718
29719         ol_DB_LIB=-ldb-4.1
29720         ol_LIBS=$LIBS
29721         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29722
29723         cat >conftest.$ac_ext <<_ACEOF
29724 /* confdefs.h.  */
29725 _ACEOF
29726 cat confdefs.h >>conftest.$ac_ext
29727 cat >>conftest.$ac_ext <<_ACEOF
29728 /* end confdefs.h.  */
29729
29730 #ifdef HAVE_DB_185_H
29731 # include <db_185.h>
29732 #else
29733 # include <db.h>
29734 #endif
29735
29736 #ifndef DB_VERSION_MAJOR
29737 # define DB_VERSION_MAJOR 1
29738 #endif
29739
29740 #ifndef NULL
29741 #define NULL ((void*)0)
29742 #endif
29743
29744 int
29745 main ()
29746 {
29747
29748 #if DB_VERSION_MAJOR > 1
29749         {
29750                 char *version;
29751                 int major, minor, patch;
29752
29753                 version = db_version( &major, &minor, &patch );
29754
29755                 if( major != DB_VERSION_MAJOR ||
29756                         minor < DB_VERSION_MINOR )
29757                 {
29758                         printf("Berkeley DB version mismatch\n"
29759                                 "\theader: %s\n\tlibrary: %s\n",
29760                                 DB_VERSION_STRING, version);
29761                         return 1;
29762                 }
29763         }
29764 #endif
29765
29766 #if DB_VERSION_MAJOR > 2
29767         db_env_create( NULL, 0 );
29768 #elif DB_VERSION_MAJOR > 1
29769         db_appexit( NULL );
29770 #else
29771         (void) dbopen( NULL, 0, 0, 0, NULL);
29772 #endif
29773
29774   ;
29775   return 0;
29776 }
29777 _ACEOF
29778 rm -f conftest.$ac_objext conftest$ac_exeext
29779 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29780   (eval $ac_link) 2>conftest.er1
29781   ac_status=$?
29782   grep -v '^ *+' conftest.er1 >conftest.err
29783   rm -f conftest.er1
29784   cat conftest.err >&5
29785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29786   (exit $ac_status); } &&
29787          { ac_try='test -z "$ac_c_werror_flag"
29788                          || test ! -s conftest.err'
29789   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29790   (eval $ac_try) 2>&5
29791   ac_status=$?
29792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29793   (exit $ac_status); }; } &&
29794          { ac_try='test -s conftest$ac_exeext'
29795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29796   (eval $ac_try) 2>&5
29797   ac_status=$?
29798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29799   (exit $ac_status); }; }; then
29800   ol_cv_db_db_4_dot_1=yes
29801 else
29802   echo "$as_me: failed program was:" >&5
29803 sed 's/^/| /' conftest.$ac_ext >&5
29804
29805 ol_cv_db_db_4_dot_1=no
29806 fi
29807 rm -f conftest.err conftest.$ac_objext \
29808       conftest$ac_exeext conftest.$ac_ext
29809
29810         LIBS="$ol_LIBS"
29811
29812 fi
29813 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_1" >&5
29814 echo "${ECHO_T}$ol_cv_db_db_4_dot_1" >&6
29815
29816         if test $ol_cv_db_db_4_dot_1 = yes ; then
29817                 ol_cv_lib_db=-ldb-4.1
29818         fi
29819 fi
29820
29821                 if test $ol_cv_lib_db = no ; then
29822         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-1)" >&5
29823 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-1)... $ECHO_C" >&6
29824 if test "${ol_cv_db_db_4_1+set}" = set; then
29825   echo $ECHO_N "(cached) $ECHO_C" >&6
29826 else
29827
29828         ol_DB_LIB=-ldb-4-1
29829         ol_LIBS=$LIBS
29830         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29831
29832         cat >conftest.$ac_ext <<_ACEOF
29833 /* confdefs.h.  */
29834 _ACEOF
29835 cat confdefs.h >>conftest.$ac_ext
29836 cat >>conftest.$ac_ext <<_ACEOF
29837 /* end confdefs.h.  */
29838
29839 #ifdef HAVE_DB_185_H
29840 # include <db_185.h>
29841 #else
29842 # include <db.h>
29843 #endif
29844
29845 #ifndef DB_VERSION_MAJOR
29846 # define DB_VERSION_MAJOR 1
29847 #endif
29848
29849 #ifndef NULL
29850 #define NULL ((void*)0)
29851 #endif
29852
29853 int
29854 main ()
29855 {
29856
29857 #if DB_VERSION_MAJOR > 1
29858         {
29859                 char *version;
29860                 int major, minor, patch;
29861
29862                 version = db_version( &major, &minor, &patch );
29863
29864                 if( major != DB_VERSION_MAJOR ||
29865                         minor < DB_VERSION_MINOR )
29866                 {
29867                         printf("Berkeley DB version mismatch\n"
29868                                 "\theader: %s\n\tlibrary: %s\n",
29869                                 DB_VERSION_STRING, version);
29870                         return 1;
29871                 }
29872         }
29873 #endif
29874
29875 #if DB_VERSION_MAJOR > 2
29876         db_env_create( NULL, 0 );
29877 #elif DB_VERSION_MAJOR > 1
29878         db_appexit( NULL );
29879 #else
29880         (void) dbopen( NULL, 0, 0, 0, NULL);
29881 #endif
29882
29883   ;
29884   return 0;
29885 }
29886 _ACEOF
29887 rm -f conftest.$ac_objext conftest$ac_exeext
29888 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29889   (eval $ac_link) 2>conftest.er1
29890   ac_status=$?
29891   grep -v '^ *+' conftest.er1 >conftest.err
29892   rm -f conftest.er1
29893   cat conftest.err >&5
29894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29895   (exit $ac_status); } &&
29896          { ac_try='test -z "$ac_c_werror_flag"
29897                          || test ! -s conftest.err'
29898   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29899   (eval $ac_try) 2>&5
29900   ac_status=$?
29901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29902   (exit $ac_status); }; } &&
29903          { ac_try='test -s conftest$ac_exeext'
29904   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29905   (eval $ac_try) 2>&5
29906   ac_status=$?
29907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29908   (exit $ac_status); }; }; then
29909   ol_cv_db_db_4_1=yes
29910 else
29911   echo "$as_me: failed program was:" >&5
29912 sed 's/^/| /' conftest.$ac_ext >&5
29913
29914 ol_cv_db_db_4_1=no
29915 fi
29916 rm -f conftest.err conftest.$ac_objext \
29917       conftest$ac_exeext conftest.$ac_ext
29918
29919         LIBS="$ol_LIBS"
29920
29921 fi
29922 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_1" >&5
29923 echo "${ECHO_T}$ol_cv_db_db_4_1" >&6
29924
29925         if test $ol_cv_db_db_4_1 = yes ; then
29926                 ol_cv_lib_db=-ldb-4-1
29927         fi
29928 fi
29929
29930         fi
29931         if test $ol_cv_lib_db = no ; then
29932         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4)" >&5
29933 echo $ECHO_N "checking for Berkeley DB link (-ldb-4)... $ECHO_C" >&6
29934 if test "${ol_cv_db_db_4+set}" = set; then
29935   echo $ECHO_N "(cached) $ECHO_C" >&6
29936 else
29937
29938         ol_DB_LIB=-ldb-4
29939         ol_LIBS=$LIBS
29940         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29941
29942         cat >conftest.$ac_ext <<_ACEOF
29943 /* confdefs.h.  */
29944 _ACEOF
29945 cat confdefs.h >>conftest.$ac_ext
29946 cat >>conftest.$ac_ext <<_ACEOF
29947 /* end confdefs.h.  */
29948
29949 #ifdef HAVE_DB_185_H
29950 # include <db_185.h>
29951 #else
29952 # include <db.h>
29953 #endif
29954
29955 #ifndef DB_VERSION_MAJOR
29956 # define DB_VERSION_MAJOR 1
29957 #endif
29958
29959 #ifndef NULL
29960 #define NULL ((void*)0)
29961 #endif
29962
29963 int
29964 main ()
29965 {
29966
29967 #if DB_VERSION_MAJOR > 1
29968         {
29969                 char *version;
29970                 int major, minor, patch;
29971
29972                 version = db_version( &major, &minor, &patch );
29973
29974                 if( major != DB_VERSION_MAJOR ||
29975                         minor < DB_VERSION_MINOR )
29976                 {
29977                         printf("Berkeley DB version mismatch\n"
29978                                 "\theader: %s\n\tlibrary: %s\n",
29979                                 DB_VERSION_STRING, version);
29980                         return 1;
29981                 }
29982         }
29983 #endif
29984
29985 #if DB_VERSION_MAJOR > 2
29986         db_env_create( NULL, 0 );
29987 #elif DB_VERSION_MAJOR > 1
29988         db_appexit( NULL );
29989 #else
29990         (void) dbopen( NULL, 0, 0, 0, NULL);
29991 #endif
29992
29993   ;
29994   return 0;
29995 }
29996 _ACEOF
29997 rm -f conftest.$ac_objext conftest$ac_exeext
29998 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29999   (eval $ac_link) 2>conftest.er1
30000   ac_status=$?
30001   grep -v '^ *+' conftest.er1 >conftest.err
30002   rm -f conftest.er1
30003   cat conftest.err >&5
30004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30005   (exit $ac_status); } &&
30006          { ac_try='test -z "$ac_c_werror_flag"
30007                          || test ! -s conftest.err'
30008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30009   (eval $ac_try) 2>&5
30010   ac_status=$?
30011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30012   (exit $ac_status); }; } &&
30013          { ac_try='test -s conftest$ac_exeext'
30014   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30015   (eval $ac_try) 2>&5
30016   ac_status=$?
30017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30018   (exit $ac_status); }; }; then
30019   ol_cv_db_db_4=yes
30020 else
30021   echo "$as_me: failed program was:" >&5
30022 sed 's/^/| /' conftest.$ac_ext >&5
30023
30024 ol_cv_db_db_4=no
30025 fi
30026 rm -f conftest.err conftest.$ac_objext \
30027       conftest$ac_exeext conftest.$ac_ext
30028
30029         LIBS="$ol_LIBS"
30030
30031 fi
30032 echo "$as_me:$LINENO: result: $ol_cv_db_db_4" >&5
30033 echo "${ECHO_T}$ol_cv_db_db_4" >&6
30034
30035         if test $ol_cv_db_db_4 = yes ; then
30036                 ol_cv_lib_db=-ldb-4
30037         fi
30038 fi
30039
30040         if test $ol_cv_lib_db = no ; then
30041         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb4)" >&5
30042 echo $ECHO_N "checking for Berkeley DB link (-ldb4)... $ECHO_C" >&6
30043 if test "${ol_cv_db_db4+set}" = set; then
30044   echo $ECHO_N "(cached) $ECHO_C" >&6
30045 else
30046
30047         ol_DB_LIB=-ldb4
30048         ol_LIBS=$LIBS
30049         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30050
30051         cat >conftest.$ac_ext <<_ACEOF
30052 /* confdefs.h.  */
30053 _ACEOF
30054 cat confdefs.h >>conftest.$ac_ext
30055 cat >>conftest.$ac_ext <<_ACEOF
30056 /* end confdefs.h.  */
30057
30058 #ifdef HAVE_DB_185_H
30059 # include <db_185.h>
30060 #else
30061 # include <db.h>
30062 #endif
30063
30064 #ifndef DB_VERSION_MAJOR
30065 # define DB_VERSION_MAJOR 1
30066 #endif
30067
30068 #ifndef NULL
30069 #define NULL ((void*)0)
30070 #endif
30071
30072 int
30073 main ()
30074 {
30075
30076 #if DB_VERSION_MAJOR > 1
30077         {
30078                 char *version;
30079                 int major, minor, patch;
30080
30081                 version = db_version( &major, &minor, &patch );
30082
30083                 if( major != DB_VERSION_MAJOR ||
30084                         minor < DB_VERSION_MINOR )
30085                 {
30086                         printf("Berkeley DB version mismatch\n"
30087                                 "\theader: %s\n\tlibrary: %s\n",
30088                                 DB_VERSION_STRING, version);
30089                         return 1;
30090                 }
30091         }
30092 #endif
30093
30094 #if DB_VERSION_MAJOR > 2
30095         db_env_create( NULL, 0 );
30096 #elif DB_VERSION_MAJOR > 1
30097         db_appexit( NULL );
30098 #else
30099         (void) dbopen( NULL, 0, 0, 0, NULL);
30100 #endif
30101
30102   ;
30103   return 0;
30104 }
30105 _ACEOF
30106 rm -f conftest.$ac_objext conftest$ac_exeext
30107 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30108   (eval $ac_link) 2>conftest.er1
30109   ac_status=$?
30110   grep -v '^ *+' conftest.er1 >conftest.err
30111   rm -f conftest.er1
30112   cat conftest.err >&5
30113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30114   (exit $ac_status); } &&
30115          { ac_try='test -z "$ac_c_werror_flag"
30116                          || test ! -s conftest.err'
30117   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30118   (eval $ac_try) 2>&5
30119   ac_status=$?
30120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30121   (exit $ac_status); }; } &&
30122          { ac_try='test -s conftest$ac_exeext'
30123   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30124   (eval $ac_try) 2>&5
30125   ac_status=$?
30126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30127   (exit $ac_status); }; }; then
30128   ol_cv_db_db4=yes
30129 else
30130   echo "$as_me: failed program was:" >&5
30131 sed 's/^/| /' conftest.$ac_ext >&5
30132
30133 ol_cv_db_db4=no
30134 fi
30135 rm -f conftest.err conftest.$ac_objext \
30136       conftest$ac_exeext conftest.$ac_ext
30137
30138         LIBS="$ol_LIBS"
30139
30140 fi
30141 echo "$as_me:$LINENO: result: $ol_cv_db_db4" >&5
30142 echo "${ECHO_T}$ol_cv_db_db4" >&6
30143
30144         if test $ol_cv_db_db4 = yes ; then
30145                 ol_cv_lib_db=-ldb4
30146         fi
30147 fi
30148
30149         if test $ol_cv_lib_db = no ; then
30150         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb)" >&5
30151 echo $ECHO_N "checking for Berkeley DB link (-ldb)... $ECHO_C" >&6
30152 if test "${ol_cv_db_db+set}" = set; then
30153   echo $ECHO_N "(cached) $ECHO_C" >&6
30154 else
30155
30156         ol_DB_LIB=-ldb
30157         ol_LIBS=$LIBS
30158         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30159
30160         cat >conftest.$ac_ext <<_ACEOF
30161 /* confdefs.h.  */
30162 _ACEOF
30163 cat confdefs.h >>conftest.$ac_ext
30164 cat >>conftest.$ac_ext <<_ACEOF
30165 /* end confdefs.h.  */
30166
30167 #ifdef HAVE_DB_185_H
30168 # include <db_185.h>
30169 #else
30170 # include <db.h>
30171 #endif
30172
30173 #ifndef DB_VERSION_MAJOR
30174 # define DB_VERSION_MAJOR 1
30175 #endif
30176
30177 #ifndef NULL
30178 #define NULL ((void*)0)
30179 #endif
30180
30181 int
30182 main ()
30183 {
30184
30185 #if DB_VERSION_MAJOR > 1
30186         {
30187                 char *version;
30188                 int major, minor, patch;
30189
30190                 version = db_version( &major, &minor, &patch );
30191
30192                 if( major != DB_VERSION_MAJOR ||
30193                         minor < DB_VERSION_MINOR )
30194                 {
30195                         printf("Berkeley DB version mismatch\n"
30196                                 "\theader: %s\n\tlibrary: %s\n",
30197                                 DB_VERSION_STRING, version);
30198                         return 1;
30199                 }
30200         }
30201 #endif
30202
30203 #if DB_VERSION_MAJOR > 2
30204         db_env_create( NULL, 0 );
30205 #elif DB_VERSION_MAJOR > 1
30206         db_appexit( NULL );
30207 #else
30208         (void) dbopen( NULL, 0, 0, 0, NULL);
30209 #endif
30210
30211   ;
30212   return 0;
30213 }
30214 _ACEOF
30215 rm -f conftest.$ac_objext conftest$ac_exeext
30216 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30217   (eval $ac_link) 2>conftest.er1
30218   ac_status=$?
30219   grep -v '^ *+' conftest.er1 >conftest.err
30220   rm -f conftest.er1
30221   cat conftest.err >&5
30222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30223   (exit $ac_status); } &&
30224          { ac_try='test -z "$ac_c_werror_flag"
30225                          || test ! -s conftest.err'
30226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30227   (eval $ac_try) 2>&5
30228   ac_status=$?
30229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30230   (exit $ac_status); }; } &&
30231          { ac_try='test -s conftest$ac_exeext'
30232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30233   (eval $ac_try) 2>&5
30234   ac_status=$?
30235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30236   (exit $ac_status); }; }; then
30237   ol_cv_db_db=yes
30238 else
30239   echo "$as_me: failed program was:" >&5
30240 sed 's/^/| /' conftest.$ac_ext >&5
30241
30242 ol_cv_db_db=no
30243 fi
30244 rm -f conftest.err conftest.$ac_objext \
30245       conftest$ac_exeext conftest.$ac_ext
30246
30247         LIBS="$ol_LIBS"
30248
30249 fi
30250 echo "$as_me:$LINENO: result: $ol_cv_db_db" >&5
30251 echo "${ECHO_T}$ol_cv_db_db" >&6
30252
30253         if test $ol_cv_db_db = yes ; then
30254                 ol_cv_lib_db=-ldb
30255         fi
30256 fi
30257
30258
30259 elif test $ol_cv_bdb_major = 3 ; then
30260         if test $ol_cv_lib_db = no ; then
30261         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb3)" >&5
30262 echo $ECHO_N "checking for Berkeley DB link (-ldb3)... $ECHO_C" >&6
30263 if test "${ol_cv_db_db3+set}" = set; then
30264   echo $ECHO_N "(cached) $ECHO_C" >&6
30265 else
30266
30267         ol_DB_LIB=-ldb3
30268         ol_LIBS=$LIBS
30269         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30270
30271         cat >conftest.$ac_ext <<_ACEOF
30272 /* confdefs.h.  */
30273 _ACEOF
30274 cat confdefs.h >>conftest.$ac_ext
30275 cat >>conftest.$ac_ext <<_ACEOF
30276 /* end confdefs.h.  */
30277
30278 #ifdef HAVE_DB_185_H
30279 # include <db_185.h>
30280 #else
30281 # include <db.h>
30282 #endif
30283
30284 #ifndef DB_VERSION_MAJOR
30285 # define DB_VERSION_MAJOR 1
30286 #endif
30287
30288 #ifndef NULL
30289 #define NULL ((void*)0)
30290 #endif
30291
30292 int
30293 main ()
30294 {
30295
30296 #if DB_VERSION_MAJOR > 1
30297         {
30298                 char *version;
30299                 int major, minor, patch;
30300
30301                 version = db_version( &major, &minor, &patch );
30302
30303                 if( major != DB_VERSION_MAJOR ||
30304                         minor < DB_VERSION_MINOR )
30305                 {
30306                         printf("Berkeley DB version mismatch\n"
30307                                 "\theader: %s\n\tlibrary: %s\n",
30308                                 DB_VERSION_STRING, version);
30309                         return 1;
30310                 }
30311         }
30312 #endif
30313
30314 #if DB_VERSION_MAJOR > 2
30315         db_env_create( NULL, 0 );
30316 #elif DB_VERSION_MAJOR > 1
30317         db_appexit( NULL );
30318 #else
30319         (void) dbopen( NULL, 0, 0, 0, NULL);
30320 #endif
30321
30322   ;
30323   return 0;
30324 }
30325 _ACEOF
30326 rm -f conftest.$ac_objext conftest$ac_exeext
30327 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30328   (eval $ac_link) 2>conftest.er1
30329   ac_status=$?
30330   grep -v '^ *+' conftest.er1 >conftest.err
30331   rm -f conftest.er1
30332   cat conftest.err >&5
30333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30334   (exit $ac_status); } &&
30335          { ac_try='test -z "$ac_c_werror_flag"
30336                          || test ! -s conftest.err'
30337   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30338   (eval $ac_try) 2>&5
30339   ac_status=$?
30340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30341   (exit $ac_status); }; } &&
30342          { ac_try='test -s conftest$ac_exeext'
30343   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30344   (eval $ac_try) 2>&5
30345   ac_status=$?
30346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30347   (exit $ac_status); }; }; then
30348   ol_cv_db_db3=yes
30349 else
30350   echo "$as_me: failed program was:" >&5
30351 sed 's/^/| /' conftest.$ac_ext >&5
30352
30353 ol_cv_db_db3=no
30354 fi
30355 rm -f conftest.err conftest.$ac_objext \
30356       conftest$ac_exeext conftest.$ac_ext
30357
30358         LIBS="$ol_LIBS"
30359
30360 fi
30361 echo "$as_me:$LINENO: result: $ol_cv_db_db3" >&5
30362 echo "${ECHO_T}$ol_cv_db_db3" >&6
30363
30364         if test $ol_cv_db_db3 = yes ; then
30365                 ol_cv_lib_db=-ldb3
30366         fi
30367 fi
30368
30369         if test $ol_cv_lib_db = no ; then
30370         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-3)" >&5
30371 echo $ECHO_N "checking for Berkeley DB link (-ldb-3)... $ECHO_C" >&6
30372 if test "${ol_cv_db_db_3+set}" = set; then
30373   echo $ECHO_N "(cached) $ECHO_C" >&6
30374 else
30375
30376         ol_DB_LIB=-ldb-3
30377         ol_LIBS=$LIBS
30378         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30379
30380         cat >conftest.$ac_ext <<_ACEOF
30381 /* confdefs.h.  */
30382 _ACEOF
30383 cat confdefs.h >>conftest.$ac_ext
30384 cat >>conftest.$ac_ext <<_ACEOF
30385 /* end confdefs.h.  */
30386
30387 #ifdef HAVE_DB_185_H
30388 # include <db_185.h>
30389 #else
30390 # include <db.h>
30391 #endif
30392
30393 #ifndef DB_VERSION_MAJOR
30394 # define DB_VERSION_MAJOR 1
30395 #endif
30396
30397 #ifndef NULL
30398 #define NULL ((void*)0)
30399 #endif
30400
30401 int
30402 main ()
30403 {
30404
30405 #if DB_VERSION_MAJOR > 1
30406         {
30407                 char *version;
30408                 int major, minor, patch;
30409
30410                 version = db_version( &major, &minor, &patch );
30411
30412                 if( major != DB_VERSION_MAJOR ||
30413                         minor < DB_VERSION_MINOR )
30414                 {
30415                         printf("Berkeley DB version mismatch\n"
30416                                 "\theader: %s\n\tlibrary: %s\n",
30417                                 DB_VERSION_STRING, version);
30418                         return 1;
30419                 }
30420         }
30421 #endif
30422
30423 #if DB_VERSION_MAJOR > 2
30424         db_env_create( NULL, 0 );
30425 #elif DB_VERSION_MAJOR > 1
30426         db_appexit( NULL );
30427 #else
30428         (void) dbopen( NULL, 0, 0, 0, NULL);
30429 #endif
30430
30431   ;
30432   return 0;
30433 }
30434 _ACEOF
30435 rm -f conftest.$ac_objext conftest$ac_exeext
30436 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30437   (eval $ac_link) 2>conftest.er1
30438   ac_status=$?
30439   grep -v '^ *+' conftest.er1 >conftest.err
30440   rm -f conftest.er1
30441   cat conftest.err >&5
30442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30443   (exit $ac_status); } &&
30444          { ac_try='test -z "$ac_c_werror_flag"
30445                          || test ! -s conftest.err'
30446   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30447   (eval $ac_try) 2>&5
30448   ac_status=$?
30449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30450   (exit $ac_status); }; } &&
30451          { ac_try='test -s conftest$ac_exeext'
30452   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30453   (eval $ac_try) 2>&5
30454   ac_status=$?
30455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30456   (exit $ac_status); }; }; then
30457   ol_cv_db_db_3=yes
30458 else
30459   echo "$as_me: failed program was:" >&5
30460 sed 's/^/| /' conftest.$ac_ext >&5
30461
30462 ol_cv_db_db_3=no
30463 fi
30464 rm -f conftest.err conftest.$ac_objext \
30465       conftest$ac_exeext conftest.$ac_ext
30466
30467         LIBS="$ol_LIBS"
30468
30469 fi
30470 echo "$as_me:$LINENO: result: $ol_cv_db_db_3" >&5
30471 echo "${ECHO_T}$ol_cv_db_db_3" >&6
30472
30473         if test $ol_cv_db_db_3 = yes ; then
30474                 ol_cv_lib_db=-ldb-3
30475         fi
30476 fi
30477
30478
30479 elif test $ol_cv_bdb_major = 2 ; then
30480         if test $ol_cv_lib_db = no ; then
30481         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb2)" >&5
30482 echo $ECHO_N "checking for Berkeley DB link (-ldb2)... $ECHO_C" >&6
30483 if test "${ol_cv_db_db2+set}" = set; then
30484   echo $ECHO_N "(cached) $ECHO_C" >&6
30485 else
30486
30487         ol_DB_LIB=-ldb2
30488         ol_LIBS=$LIBS
30489         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30490
30491         cat >conftest.$ac_ext <<_ACEOF
30492 /* confdefs.h.  */
30493 _ACEOF
30494 cat confdefs.h >>conftest.$ac_ext
30495 cat >>conftest.$ac_ext <<_ACEOF
30496 /* end confdefs.h.  */
30497
30498 #ifdef HAVE_DB_185_H
30499 # include <db_185.h>
30500 #else
30501 # include <db.h>
30502 #endif
30503
30504 #ifndef DB_VERSION_MAJOR
30505 # define DB_VERSION_MAJOR 1
30506 #endif
30507
30508 #ifndef NULL
30509 #define NULL ((void*)0)
30510 #endif
30511
30512 int
30513 main ()
30514 {
30515
30516 #if DB_VERSION_MAJOR > 1
30517         {
30518                 char *version;
30519                 int major, minor, patch;
30520
30521                 version = db_version( &major, &minor, &patch );
30522
30523                 if( major != DB_VERSION_MAJOR ||
30524                         minor < DB_VERSION_MINOR )
30525                 {
30526                         printf("Berkeley DB version mismatch\n"
30527                                 "\theader: %s\n\tlibrary: %s\n",
30528                                 DB_VERSION_STRING, version);
30529                         return 1;
30530                 }
30531         }
30532 #endif
30533
30534 #if DB_VERSION_MAJOR > 2
30535         db_env_create( NULL, 0 );
30536 #elif DB_VERSION_MAJOR > 1
30537         db_appexit( NULL );
30538 #else
30539         (void) dbopen( NULL, 0, 0, 0, NULL);
30540 #endif
30541
30542   ;
30543   return 0;
30544 }
30545 _ACEOF
30546 rm -f conftest.$ac_objext conftest$ac_exeext
30547 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30548   (eval $ac_link) 2>conftest.er1
30549   ac_status=$?
30550   grep -v '^ *+' conftest.er1 >conftest.err
30551   rm -f conftest.er1
30552   cat conftest.err >&5
30553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30554   (exit $ac_status); } &&
30555          { ac_try='test -z "$ac_c_werror_flag"
30556                          || test ! -s conftest.err'
30557   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30558   (eval $ac_try) 2>&5
30559   ac_status=$?
30560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30561   (exit $ac_status); }; } &&
30562          { ac_try='test -s conftest$ac_exeext'
30563   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30564   (eval $ac_try) 2>&5
30565   ac_status=$?
30566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30567   (exit $ac_status); }; }; then
30568   ol_cv_db_db2=yes
30569 else
30570   echo "$as_me: failed program was:" >&5
30571 sed 's/^/| /' conftest.$ac_ext >&5
30572
30573 ol_cv_db_db2=no
30574 fi
30575 rm -f conftest.err conftest.$ac_objext \
30576       conftest$ac_exeext conftest.$ac_ext
30577
30578         LIBS="$ol_LIBS"
30579
30580 fi
30581 echo "$as_me:$LINENO: result: $ol_cv_db_db2" >&5
30582 echo "${ECHO_T}$ol_cv_db_db2" >&6
30583
30584         if test $ol_cv_db_db2 = yes ; then
30585                 ol_cv_lib_db=-ldb2
30586         fi
30587 fi
30588
30589         if test $ol_cv_lib_db = no ; then
30590         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-2)" >&5
30591 echo $ECHO_N "checking for Berkeley DB link (-ldb-2)... $ECHO_C" >&6
30592 if test "${ol_cv_db_db_2+set}" = set; then
30593   echo $ECHO_N "(cached) $ECHO_C" >&6
30594 else
30595
30596         ol_DB_LIB=-ldb-2
30597         ol_LIBS=$LIBS
30598         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30599
30600         cat >conftest.$ac_ext <<_ACEOF
30601 /* confdefs.h.  */
30602 _ACEOF
30603 cat confdefs.h >>conftest.$ac_ext
30604 cat >>conftest.$ac_ext <<_ACEOF
30605 /* end confdefs.h.  */
30606
30607 #ifdef HAVE_DB_185_H
30608 # include <db_185.h>
30609 #else
30610 # include <db.h>
30611 #endif
30612
30613 #ifndef DB_VERSION_MAJOR
30614 # define DB_VERSION_MAJOR 1
30615 #endif
30616
30617 #ifndef NULL
30618 #define NULL ((void*)0)
30619 #endif
30620
30621 int
30622 main ()
30623 {
30624
30625 #if DB_VERSION_MAJOR > 1
30626         {
30627                 char *version;
30628                 int major, minor, patch;
30629
30630                 version = db_version( &major, &minor, &patch );
30631
30632                 if( major != DB_VERSION_MAJOR ||
30633                         minor < DB_VERSION_MINOR )
30634                 {
30635                         printf("Berkeley DB version mismatch\n"
30636                                 "\theader: %s\n\tlibrary: %s\n",
30637                                 DB_VERSION_STRING, version);
30638                         return 1;
30639                 }
30640         }
30641 #endif
30642
30643 #if DB_VERSION_MAJOR > 2
30644         db_env_create( NULL, 0 );
30645 #elif DB_VERSION_MAJOR > 1
30646         db_appexit( NULL );
30647 #else
30648         (void) dbopen( NULL, 0, 0, 0, NULL);
30649 #endif
30650
30651   ;
30652   return 0;
30653 }
30654 _ACEOF
30655 rm -f conftest.$ac_objext conftest$ac_exeext
30656 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30657   (eval $ac_link) 2>conftest.er1
30658   ac_status=$?
30659   grep -v '^ *+' conftest.er1 >conftest.err
30660   rm -f conftest.er1
30661   cat conftest.err >&5
30662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30663   (exit $ac_status); } &&
30664          { ac_try='test -z "$ac_c_werror_flag"
30665                          || test ! -s conftest.err'
30666   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30667   (eval $ac_try) 2>&5
30668   ac_status=$?
30669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30670   (exit $ac_status); }; } &&
30671          { ac_try='test -s conftest$ac_exeext'
30672   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30673   (eval $ac_try) 2>&5
30674   ac_status=$?
30675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30676   (exit $ac_status); }; }; then
30677   ol_cv_db_db_2=yes
30678 else
30679   echo "$as_me: failed program was:" >&5
30680 sed 's/^/| /' conftest.$ac_ext >&5
30681
30682 ol_cv_db_db_2=no
30683 fi
30684 rm -f conftest.err conftest.$ac_objext \
30685       conftest$ac_exeext conftest.$ac_ext
30686
30687         LIBS="$ol_LIBS"
30688
30689 fi
30690 echo "$as_me:$LINENO: result: $ol_cv_db_db_2" >&5
30691 echo "${ECHO_T}$ol_cv_db_db_2" >&6
30692
30693         if test $ol_cv_db_db_2 = yes ; then
30694                 ol_cv_lib_db=-ldb-2
30695         fi
30696 fi
30697
30698
30699 elif test $ol_cv_bdb_major = 1 ; then
30700         if test $ol_cv_lib_db = no ; then
30701         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb1)" >&5
30702 echo $ECHO_N "checking for Berkeley DB link (-ldb1)... $ECHO_C" >&6
30703 if test "${ol_cv_db_db1+set}" = set; then
30704   echo $ECHO_N "(cached) $ECHO_C" >&6
30705 else
30706
30707         ol_DB_LIB=-ldb1
30708         ol_LIBS=$LIBS
30709         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30710
30711         cat >conftest.$ac_ext <<_ACEOF
30712 /* confdefs.h.  */
30713 _ACEOF
30714 cat confdefs.h >>conftest.$ac_ext
30715 cat >>conftest.$ac_ext <<_ACEOF
30716 /* end confdefs.h.  */
30717
30718 #ifdef HAVE_DB_185_H
30719 # include <db_185.h>
30720 #else
30721 # include <db.h>
30722 #endif
30723
30724 #ifndef DB_VERSION_MAJOR
30725 # define DB_VERSION_MAJOR 1
30726 #endif
30727
30728 #ifndef NULL
30729 #define NULL ((void*)0)
30730 #endif
30731
30732 int
30733 main ()
30734 {
30735
30736 #if DB_VERSION_MAJOR > 1
30737         {
30738                 char *version;
30739                 int major, minor, patch;
30740
30741                 version = db_version( &major, &minor, &patch );
30742
30743                 if( major != DB_VERSION_MAJOR ||
30744                         minor < DB_VERSION_MINOR )
30745                 {
30746                         printf("Berkeley DB version mismatch\n"
30747                                 "\theader: %s\n\tlibrary: %s\n",
30748                                 DB_VERSION_STRING, version);
30749                         return 1;
30750                 }
30751         }
30752 #endif
30753
30754 #if DB_VERSION_MAJOR > 2
30755         db_env_create( NULL, 0 );
30756 #elif DB_VERSION_MAJOR > 1
30757         db_appexit( NULL );
30758 #else
30759         (void) dbopen( NULL, 0, 0, 0, NULL);
30760 #endif
30761
30762   ;
30763   return 0;
30764 }
30765 _ACEOF
30766 rm -f conftest.$ac_objext conftest$ac_exeext
30767 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30768   (eval $ac_link) 2>conftest.er1
30769   ac_status=$?
30770   grep -v '^ *+' conftest.er1 >conftest.err
30771   rm -f conftest.er1
30772   cat conftest.err >&5
30773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30774   (exit $ac_status); } &&
30775          { ac_try='test -z "$ac_c_werror_flag"
30776                          || test ! -s conftest.err'
30777   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30778   (eval $ac_try) 2>&5
30779   ac_status=$?
30780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30781   (exit $ac_status); }; } &&
30782          { ac_try='test -s conftest$ac_exeext'
30783   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30784   (eval $ac_try) 2>&5
30785   ac_status=$?
30786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30787   (exit $ac_status); }; }; then
30788   ol_cv_db_db1=yes
30789 else
30790   echo "$as_me: failed program was:" >&5
30791 sed 's/^/| /' conftest.$ac_ext >&5
30792
30793 ol_cv_db_db1=no
30794 fi
30795 rm -f conftest.err conftest.$ac_objext \
30796       conftest$ac_exeext conftest.$ac_ext
30797
30798         LIBS="$ol_LIBS"
30799
30800 fi
30801 echo "$as_me:$LINENO: result: $ol_cv_db_db1" >&5
30802 echo "${ECHO_T}$ol_cv_db_db1" >&6
30803
30804         if test $ol_cv_db_db1 = yes ; then
30805                 ol_cv_lib_db=-ldb1
30806         fi
30807 fi
30808
30809         if test $ol_cv_lib_db = no ; then
30810         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-1)" >&5
30811 echo $ECHO_N "checking for Berkeley DB link (-ldb-1)... $ECHO_C" >&6
30812 if test "${ol_cv_db_db_1+set}" = set; then
30813   echo $ECHO_N "(cached) $ECHO_C" >&6
30814 else
30815
30816         ol_DB_LIB=-ldb-1
30817         ol_LIBS=$LIBS
30818         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30819
30820         cat >conftest.$ac_ext <<_ACEOF
30821 /* confdefs.h.  */
30822 _ACEOF
30823 cat confdefs.h >>conftest.$ac_ext
30824 cat >>conftest.$ac_ext <<_ACEOF
30825 /* end confdefs.h.  */
30826
30827 #ifdef HAVE_DB_185_H
30828 # include <db_185.h>
30829 #else
30830 # include <db.h>
30831 #endif
30832
30833 #ifndef DB_VERSION_MAJOR
30834 # define DB_VERSION_MAJOR 1
30835 #endif
30836
30837 #ifndef NULL
30838 #define NULL ((void*)0)
30839 #endif
30840
30841 int
30842 main ()
30843 {
30844
30845 #if DB_VERSION_MAJOR > 1
30846         {
30847                 char *version;
30848                 int major, minor, patch;
30849
30850                 version = db_version( &major, &minor, &patch );
30851
30852                 if( major != DB_VERSION_MAJOR ||
30853                         minor < DB_VERSION_MINOR )
30854                 {
30855                         printf("Berkeley DB version mismatch\n"
30856                                 "\theader: %s\n\tlibrary: %s\n",
30857                                 DB_VERSION_STRING, version);
30858                         return 1;
30859                 }
30860         }
30861 #endif
30862
30863 #if DB_VERSION_MAJOR > 2
30864         db_env_create( NULL, 0 );
30865 #elif DB_VERSION_MAJOR > 1
30866         db_appexit( NULL );
30867 #else
30868         (void) dbopen( NULL, 0, 0, 0, NULL);
30869 #endif
30870
30871   ;
30872   return 0;
30873 }
30874 _ACEOF
30875 rm -f conftest.$ac_objext conftest$ac_exeext
30876 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30877   (eval $ac_link) 2>conftest.er1
30878   ac_status=$?
30879   grep -v '^ *+' conftest.er1 >conftest.err
30880   rm -f conftest.er1
30881   cat conftest.err >&5
30882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30883   (exit $ac_status); } &&
30884          { ac_try='test -z "$ac_c_werror_flag"
30885                          || test ! -s conftest.err'
30886   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30887   (eval $ac_try) 2>&5
30888   ac_status=$?
30889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30890   (exit $ac_status); }; } &&
30891          { ac_try='test -s conftest$ac_exeext'
30892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30893   (eval $ac_try) 2>&5
30894   ac_status=$?
30895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30896   (exit $ac_status); }; }; then
30897   ol_cv_db_db_1=yes
30898 else
30899   echo "$as_me: failed program was:" >&5
30900 sed 's/^/| /' conftest.$ac_ext >&5
30901
30902 ol_cv_db_db_1=no
30903 fi
30904 rm -f conftest.err conftest.$ac_objext \
30905       conftest$ac_exeext conftest.$ac_ext
30906
30907         LIBS="$ol_LIBS"
30908
30909 fi
30910 echo "$as_me:$LINENO: result: $ol_cv_db_db_1" >&5
30911 echo "${ECHO_T}$ol_cv_db_db_1" >&6
30912
30913         if test $ol_cv_db_db_1 = yes ; then
30914                 ol_cv_lib_db=-ldb-1
30915         fi
30916 fi
30917
30918 fi
30919 if test $ol_cv_lib_db = no ; then
30920         echo "$as_me:$LINENO: checking for Berkeley DB link (default)" >&5
30921 echo $ECHO_N "checking for Berkeley DB link (default)... $ECHO_C" >&6
30922 if test "${ol_cv_db_none+set}" = set; then
30923   echo $ECHO_N "(cached) $ECHO_C" >&6
30924 else
30925
30926         ol_DB_LIB=
30927         ol_LIBS=$LIBS
30928         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
30929
30930         cat >conftest.$ac_ext <<_ACEOF
30931 /* confdefs.h.  */
30932 _ACEOF
30933 cat confdefs.h >>conftest.$ac_ext
30934 cat >>conftest.$ac_ext <<_ACEOF
30935 /* end confdefs.h.  */
30936
30937 #ifdef HAVE_DB_185_H
30938 # include <db_185.h>
30939 #else
30940 # include <db.h>
30941 #endif
30942
30943 #ifndef DB_VERSION_MAJOR
30944 # define DB_VERSION_MAJOR 1
30945 #endif
30946
30947 #ifndef NULL
30948 #define NULL ((void*)0)
30949 #endif
30950
30951 int
30952 main ()
30953 {
30954
30955 #if DB_VERSION_MAJOR > 1
30956         {
30957                 char *version;
30958                 int major, minor, patch;
30959
30960                 version = db_version( &major, &minor, &patch );
30961
30962                 if( major != DB_VERSION_MAJOR ||
30963                         minor < DB_VERSION_MINOR )
30964                 {
30965                         printf("Berkeley DB version mismatch\n"
30966                                 "\theader: %s\n\tlibrary: %s\n",
30967                                 DB_VERSION_STRING, version);
30968                         return 1;
30969                 }
30970         }
30971 #endif
30972
30973 #if DB_VERSION_MAJOR > 2
30974         db_env_create( NULL, 0 );
30975 #elif DB_VERSION_MAJOR > 1
30976         db_appexit( NULL );
30977 #else
30978         (void) dbopen( NULL, 0, 0, 0, NULL);
30979 #endif
30980
30981   ;
30982   return 0;
30983 }
30984 _ACEOF
30985 rm -f conftest.$ac_objext conftest$ac_exeext
30986 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30987   (eval $ac_link) 2>conftest.er1
30988   ac_status=$?
30989   grep -v '^ *+' conftest.er1 >conftest.err
30990   rm -f conftest.er1
30991   cat conftest.err >&5
30992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30993   (exit $ac_status); } &&
30994          { ac_try='test -z "$ac_c_werror_flag"
30995                          || test ! -s conftest.err'
30996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30997   (eval $ac_try) 2>&5
30998   ac_status=$?
30999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31000   (exit $ac_status); }; } &&
31001          { ac_try='test -s conftest$ac_exeext'
31002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31003   (eval $ac_try) 2>&5
31004   ac_status=$?
31005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31006   (exit $ac_status); }; }; then
31007   ol_cv_db_none=yes
31008 else
31009   echo "$as_me: failed program was:" >&5
31010 sed 's/^/| /' conftest.$ac_ext >&5
31011
31012 ol_cv_db_none=no
31013 fi
31014 rm -f conftest.err conftest.$ac_objext \
31015       conftest$ac_exeext conftest.$ac_ext
31016
31017         LIBS="$ol_LIBS"
31018
31019 fi
31020 echo "$as_me:$LINENO: result: $ol_cv_db_none" >&5
31021 echo "${ECHO_T}$ol_cv_db_none" >&6
31022
31023         if test $ol_cv_db_none = yes ; then
31024                 ol_cv_lib_db=yes
31025         fi
31026 fi
31027
31028
31029         if test "$ol_cv_lib_db" != no ; then
31030                 ol_cv_berkeley_db=yes
31031                 echo "$as_me:$LINENO: checking for Berkeley DB version match" >&5
31032 echo $ECHO_N "checking for Berkeley DB version match... $ECHO_C" >&6
31033 if test "${ol_cv_berkeley_db_version+set}" = set; then
31034   echo $ECHO_N "(cached) $ECHO_C" >&6
31035 else
31036
31037         ol_LIBS="$LIBS"
31038         LIBS="$LTHREAD_LIBS $LIBS"
31039         if test $ol_cv_lib_db != yes ; then
31040                 LIBS="$ol_cv_lib_db $LIBS"
31041         fi
31042
31043         if test "$cross_compiling" = yes; then
31044   ol_cv_berkeley_db_version=cross
31045 else
31046   cat >conftest.$ac_ext <<_ACEOF
31047 /* confdefs.h.  */
31048 _ACEOF
31049 cat confdefs.h >>conftest.$ac_ext
31050 cat >>conftest.$ac_ext <<_ACEOF
31051 /* end confdefs.h.  */
31052
31053 #ifdef HAVE_DB_185_H
31054         choke me;
31055 #else
31056 #include <db.h>
31057 #endif
31058 #ifndef DB_VERSION_MAJOR
31059 # define DB_VERSION_MAJOR 1
31060 #endif
31061 #ifndef NULL
31062 #define NULL ((void *)0)
31063 #endif
31064 main()
31065 {
31066 #if DB_VERSION_MAJOR > 1
31067         char *version;
31068         int major, minor, patch;
31069
31070         version = db_version( &major, &minor, &patch );
31071
31072         if( major != DB_VERSION_MAJOR ||
31073                 minor != DB_VERSION_MINOR ||
31074                 patch != DB_VERSION_PATCH )
31075         {
31076                 printf("Berkeley DB version mismatch\n"
31077                         "\theader: %s\n\tlibrary: %s\n",
31078                         DB_VERSION_STRING, version);
31079                 return 1;
31080         }
31081 #endif
31082
31083         return 0;
31084 }
31085 _ACEOF
31086 rm -f conftest$ac_exeext
31087 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31088   (eval $ac_link) 2>&5
31089   ac_status=$?
31090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31091   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
31092   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31093   (eval $ac_try) 2>&5
31094   ac_status=$?
31095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31096   (exit $ac_status); }; }; then
31097   ol_cv_berkeley_db_version=yes
31098 else
31099   echo "$as_me: program exited with status $ac_status" >&5
31100 echo "$as_me: failed program was:" >&5
31101 sed 's/^/| /' conftest.$ac_ext >&5
31102
31103 ( exit $ac_status )
31104 ol_cv_berkeley_db_version=no
31105 fi
31106 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
31107 fi
31108
31109         LIBS="$ol_LIBS"
31110
31111 fi
31112 echo "$as_me:$LINENO: result: $ol_cv_berkeley_db_version" >&5
31113 echo "${ECHO_T}$ol_cv_berkeley_db_version" >&6
31114
31115         if test $ol_cv_berkeley_db_version = no ; then
31116                 { { echo "$as_me:$LINENO: error: Berkeley DB version mismatch" >&5
31117 echo "$as_me: error: Berkeley DB version mismatch" >&2;}
31118    { (exit 1); exit 1; }; }
31119         fi
31120
31121                 echo "$as_me:$LINENO: checking for Berkeley DB thread support" >&5
31122 echo $ECHO_N "checking for Berkeley DB thread support... $ECHO_C" >&6
31123 if test "${ol_cv_berkeley_db_thread+set}" = set; then
31124   echo $ECHO_N "(cached) $ECHO_C" >&6
31125 else
31126
31127         ol_LIBS="$LIBS"
31128         LIBS="$LTHREAD_LIBS $LIBS"
31129         if test $ol_cv_lib_db != yes ; then
31130                 LIBS="$ol_cv_lib_db $LIBS"
31131         fi
31132
31133         if test "$cross_compiling" = yes; then
31134   ol_cv_berkeley_db_thread=cross
31135 else
31136   cat >conftest.$ac_ext <<_ACEOF
31137 /* confdefs.h.  */
31138 _ACEOF
31139 cat confdefs.h >>conftest.$ac_ext
31140 cat >>conftest.$ac_ext <<_ACEOF
31141 /* end confdefs.h.  */
31142
31143 #ifdef HAVE_DB_185_H
31144         choke me;
31145 #else
31146 #include <db.h>
31147 #endif
31148 #ifndef NULL
31149 #define NULL ((void *)0)
31150 #endif
31151 main()
31152 {
31153         int rc;
31154         u_int32_t flags = DB_CREATE |
31155 #ifdef DB_PRIVATE
31156                 DB_PRIVATE |
31157 #endif
31158                 DB_THREAD;
31159
31160 #if DB_VERSION_MAJOR > 2
31161         DB_ENV *env = NULL;
31162
31163         rc = db_env_create( &env, 0 );
31164
31165         flags |= DB_INIT_MPOOL;
31166 #ifdef DB_MPOOL_PRIVATE
31167         flags |= DB_MPOOL_PRIVATE;
31168 #endif
31169
31170         if( rc ) {
31171                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
31172                 return rc;
31173         }
31174
31175 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
31176         rc = env->open( env, NULL, flags, 0 );
31177 #else
31178         rc = env->open( env, NULL, NULL, flags, 0 );
31179 #endif
31180
31181         if ( rc == 0 ) {
31182                 rc = env->close( env, 0 );
31183         }
31184
31185         if( rc ) {
31186                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
31187                 return rc;
31188         }
31189
31190 #else
31191         DB_ENV env;
31192         memset( &env, '\0', sizeof(env) );
31193
31194         rc = db_appinit( NULL, NULL, &env, flags );
31195
31196         if( rc == 0 ) {
31197                 db_appexit( &env );
31198         }
31199
31200         unlink("__db_mpool.share");
31201         unlink("__db_lock.share");
31202 #endif
31203
31204         return rc;
31205 }
31206 _ACEOF
31207 rm -f conftest$ac_exeext
31208 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31209   (eval $ac_link) 2>&5
31210   ac_status=$?
31211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31212   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
31213   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31214   (eval $ac_try) 2>&5
31215   ac_status=$?
31216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31217   (exit $ac_status); }; }; then
31218   ol_cv_berkeley_db_thread=yes
31219 else
31220   echo "$as_me: program exited with status $ac_status" >&5
31221 echo "$as_me: failed program was:" >&5
31222 sed 's/^/| /' conftest.$ac_ext >&5
31223
31224 ( exit $ac_status )
31225 ol_cv_berkeley_db_thread=no
31226 fi
31227 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
31228 fi
31229
31230         LIBS="$ol_LIBS"
31231
31232 fi
31233 echo "$as_me:$LINENO: result: $ol_cv_berkeley_db_thread" >&5
31234 echo "${ECHO_T}$ol_cv_berkeley_db_thread" >&6
31235
31236         if test $ol_cv_berkeley_db_thread != no ; then
31237
31238 cat >>confdefs.h <<\_ACEOF
31239 #define HAVE_BERKELEY_DB_THREAD 1
31240 _ACEOF
31241
31242         fi
31243
31244         fi
31245 fi
31246
31247
31248         if test $ol_cv_berkeley_db = no ; then
31249                 { { echo "$as_me:$LINENO: error: BDB/HDB: BerkeleyDB not available" >&5
31250 echo "$as_me: error: BDB/HDB: BerkeleyDB not available" >&2;}
31251    { (exit 1); exit 1; }; }
31252         fi
31253
31254
31255 cat >>confdefs.h <<\_ACEOF
31256 #define HAVE_BERKELEY_DB 1
31257 _ACEOF
31258
31259
31260                         if test $ol_cv_lib_db != yes ; then
31261                 BDB_LIBS="$BDB_LIBS $ol_cv_lib_db"
31262         fi
31263
31264         echo "$as_me:$LINENO: checking Berkeley DB version for BDB/HDB backends" >&5
31265 echo $ECHO_N "checking Berkeley DB version for BDB/HDB backends... $ECHO_C" >&6
31266 if test "${ol_cv_bdb_compat+set}" = set; then
31267   echo $ECHO_N "(cached) $ECHO_C" >&6
31268 else
31269
31270         cat >conftest.$ac_ext <<_ACEOF
31271 /* confdefs.h.  */
31272 _ACEOF
31273 cat confdefs.h >>conftest.$ac_ext
31274 cat >>conftest.$ac_ext <<_ACEOF
31275 /* end confdefs.h.  */
31276
31277 #include <db.h>
31278
31279  /* this check could be improved */
31280 #ifndef DB_VERSION_MAJOR
31281 #       define DB_VERSION_MAJOR 1
31282 #endif
31283 #ifndef DB_VERSION_MINOR
31284 #       define DB_VERSION_MINOR 0
31285 #endif
31286
31287 /* require 4.2 or later */
31288 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
31289         __db_version_compat
31290 #endif
31291
31292 _ACEOF
31293 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31294   $EGREP "__db_version_compat" >/dev/null 2>&1; then
31295   ol_cv_bdb_compat=yes
31296 else
31297   ol_cv_bdb_compat=no
31298 fi
31299 rm -f conftest*
31300
31301 fi
31302 echo "$as_me:$LINENO: result: $ol_cv_bdb_compat" >&5
31303 echo "${ECHO_T}$ol_cv_bdb_compat" >&6
31304
31305
31306         if test $ol_cv_bdb_compat != yes ; then
31307                 { { echo "$as_me:$LINENO: error: BDB/HDB: BerkeleyDB version incompatible" >&5
31308 echo "$as_me: error: BDB/HDB: BerkeleyDB version incompatible" >&2;}
31309    { (exit 1); exit 1; }; }
31310         fi
31311
31312         SLAPD_LIBS="$SLAPD_LIBS \$(BDB_LIBS)"
31313
31314         ol_link_bdb=yes
31315 fi
31316
31317
31318 if test $ol_enable_dynamic = yes && test $enable_shared = yes ; then
31319         BUILD_LIBS_DYNAMIC=shared
31320
31321 cat >>confdefs.h <<\_ACEOF
31322 #define LDAP_LIBS_DYNAMIC 1
31323 _ACEOF
31324
31325         LTSTATIC=""
31326 else
31327         BUILD_LIBS_DYNAMIC=static
31328         LTSTATIC="-static"
31329 fi
31330
31331 if test $ol_enable_wrappers != no ; then
31332
31333 for ac_header in tcpd.h
31334 do
31335 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
31336 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31337   echo "$as_me:$LINENO: checking for $ac_header" >&5
31338 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31339 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31340   echo $ECHO_N "(cached) $ECHO_C" >&6
31341 fi
31342 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
31343 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
31344 else
31345   # Is the header compilable?
31346 echo "$as_me:$LINENO: checking $ac_header usability" >&5
31347 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
31348 cat >conftest.$ac_ext <<_ACEOF
31349 /* confdefs.h.  */
31350 _ACEOF
31351 cat confdefs.h >>conftest.$ac_ext
31352 cat >>conftest.$ac_ext <<_ACEOF
31353 /* end confdefs.h.  */
31354 $ac_includes_default
31355 #include <$ac_header>
31356 _ACEOF
31357 rm -f conftest.$ac_objext
31358 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
31359   (eval $ac_compile) 2>conftest.er1
31360   ac_status=$?
31361   grep -v '^ *+' conftest.er1 >conftest.err
31362   rm -f conftest.er1
31363   cat conftest.err >&5
31364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31365   (exit $ac_status); } &&
31366          { ac_try='test -z "$ac_c_werror_flag"
31367                          || test ! -s conftest.err'
31368   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31369   (eval $ac_try) 2>&5
31370   ac_status=$?
31371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31372   (exit $ac_status); }; } &&
31373          { ac_try='test -s conftest.$ac_objext'
31374   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31375   (eval $ac_try) 2>&5
31376   ac_status=$?
31377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31378   (exit $ac_status); }; }; then
31379   ac_header_compiler=yes
31380 else
31381   echo "$as_me: failed program was:" >&5
31382 sed 's/^/| /' conftest.$ac_ext >&5
31383
31384 ac_header_compiler=no
31385 fi
31386 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
31387 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
31388 echo "${ECHO_T}$ac_header_compiler" >&6
31389
31390 # Is the header present?
31391 echo "$as_me:$LINENO: checking $ac_header presence" >&5
31392 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
31393 cat >conftest.$ac_ext <<_ACEOF
31394 /* confdefs.h.  */
31395 _ACEOF
31396 cat confdefs.h >>conftest.$ac_ext
31397 cat >>conftest.$ac_ext <<_ACEOF
31398 /* end confdefs.h.  */
31399 #include <$ac_header>
31400 _ACEOF
31401 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
31402   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
31403   ac_status=$?
31404   grep -v '^ *+' conftest.er1 >conftest.err
31405   rm -f conftest.er1
31406   cat conftest.err >&5
31407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31408   (exit $ac_status); } >/dev/null; then
31409   if test -s conftest.err; then
31410     ac_cpp_err=$ac_c_preproc_warn_flag
31411     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
31412   else
31413     ac_cpp_err=
31414   fi
31415 else
31416   ac_cpp_err=yes
31417 fi
31418 if test -z "$ac_cpp_err"; then
31419   ac_header_preproc=yes
31420 else
31421   echo "$as_me: failed program was:" >&5
31422 sed 's/^/| /' conftest.$ac_ext >&5
31423
31424   ac_header_preproc=no
31425 fi
31426 rm -f conftest.err conftest.$ac_ext
31427 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
31428 echo "${ECHO_T}$ac_header_preproc" >&6
31429
31430 # So?  What about this header?
31431 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
31432   yes:no: )
31433     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
31434 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
31435     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
31436 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
31437     ac_header_preproc=yes
31438     ;;
31439   no:yes:* )
31440     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
31441 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
31442     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
31443 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
31444     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
31445 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
31446     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
31447 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
31448     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
31449 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
31450     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
31451 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
31452     (
31453       cat <<\_ASBOX
31454 ## --------------------------------------------- ##
31455 ## Report this to <http://www.openldap.org/its/> ##
31456 ## --------------------------------------------- ##
31457 _ASBOX
31458     ) |
31459       sed "s/^/$as_me: WARNING:     /" >&2
31460     ;;
31461 esac
31462 echo "$as_me:$LINENO: checking for $ac_header" >&5
31463 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31464 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31465   echo $ECHO_N "(cached) $ECHO_C" >&6
31466 else
31467   eval "$as_ac_Header=\$ac_header_preproc"
31468 fi
31469 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
31470 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
31471
31472 fi
31473 if test `eval echo '${'$as_ac_Header'}'` = yes; then
31474   cat >>confdefs.h <<_ACEOF
31475 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
31476 _ACEOF
31477
31478                 echo "$as_me:$LINENO: checking for TCP wrappers library" >&5
31479 echo $ECHO_N "checking for TCP wrappers library... $ECHO_C" >&6
31480                 save_LIBS="$LIBS"
31481                 LIBS="$LIBS -lwrap"
31482                 cat >conftest.$ac_ext <<_ACEOF
31483 /* confdefs.h.  */
31484 _ACEOF
31485 cat confdefs.h >>conftest.$ac_ext
31486 cat >>conftest.$ac_ext <<_ACEOF
31487 /* end confdefs.h.  */
31488
31489 #include <tcpd.h>
31490 int allow_severity = 0;
31491 int deny_severity  = 0;
31492
31493 struct request_info *req;
31494
31495 int
31496 main ()
31497 {
31498
31499 hosts_access(req)
31500
31501   ;
31502   return 0;
31503 }
31504 _ACEOF
31505 rm -f conftest.$ac_objext conftest$ac_exeext
31506 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31507   (eval $ac_link) 2>conftest.er1
31508   ac_status=$?
31509   grep -v '^ *+' conftest.er1 >conftest.err
31510   rm -f conftest.er1
31511   cat conftest.err >&5
31512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31513   (exit $ac_status); } &&
31514          { ac_try='test -z "$ac_c_werror_flag"
31515                          || test ! -s conftest.err'
31516   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31517   (eval $ac_try) 2>&5
31518   ac_status=$?
31519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31520   (exit $ac_status); }; } &&
31521          { ac_try='test -s conftest$ac_exeext'
31522   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31523   (eval $ac_try) 2>&5
31524   ac_status=$?
31525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31526   (exit $ac_status); }; }; then
31527   echo "$as_me:$LINENO: result: -lwrap" >&5
31528 echo "${ECHO_T}-lwrap" >&6
31529                 have_wrappers=yes
31530                 LIBS="$save_LIBS"
31531 else
31532   echo "$as_me: failed program was:" >&5
31533 sed 's/^/| /' conftest.$ac_ext >&5
31534
31535
31536                                 LIBS="$LIBS -lnsl"
31537                 cat >conftest.$ac_ext <<_ACEOF
31538 /* confdefs.h.  */
31539 _ACEOF
31540 cat confdefs.h >>conftest.$ac_ext
31541 cat >>conftest.$ac_ext <<_ACEOF
31542 /* end confdefs.h.  */
31543
31544 #include <tcpd.h>
31545 int allow_severity = 0;
31546 int deny_severity  = 0;
31547
31548 struct request_info *req;
31549
31550 int
31551 main ()
31552 {
31553
31554 hosts_access(req)
31555
31556   ;
31557   return 0;
31558 }
31559 _ACEOF
31560 rm -f conftest.$ac_objext conftest$ac_exeext
31561 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31562   (eval $ac_link) 2>conftest.er1
31563   ac_status=$?
31564   grep -v '^ *+' conftest.er1 >conftest.err
31565   rm -f conftest.er1
31566   cat conftest.err >&5
31567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31568   (exit $ac_status); } &&
31569          { ac_try='test -z "$ac_c_werror_flag"
31570                          || test ! -s conftest.err'
31571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31572   (eval $ac_try) 2>&5
31573   ac_status=$?
31574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31575   (exit $ac_status); }; } &&
31576          { ac_try='test -s conftest$ac_exeext'
31577   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31578   (eval $ac_try) 2>&5
31579   ac_status=$?
31580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31581   (exit $ac_status); }; }; then
31582   echo "$as_me:$LINENO: result: -lwrap -lnsl" >&5
31583 echo "${ECHO_T}-lwrap -lnsl" >&6
31584                 have_wrappers=yes
31585                 LIBS="$save_LIBS -lnsl"
31586 else
31587   echo "$as_me: failed program was:" >&5
31588 sed 's/^/| /' conftest.$ac_ext >&5
31589
31590
31591                 echo "$as_me:$LINENO: result: no" >&5
31592 echo "${ECHO_T}no" >&6
31593                 have_wrappers=no
31594                 LIBS=$save_LIBS
31595 fi
31596 rm -f conftest.err conftest.$ac_objext \
31597       conftest$ac_exeext conftest.$ac_ext
31598 fi
31599 rm -f conftest.err conftest.$ac_objext \
31600       conftest$ac_exeext conftest.$ac_ext
31601 else
31602   have_wrappers=no
31603 fi
31604
31605 done
31606
31607
31608         if test $have_wrappers = yes ; then
31609
31610 cat >>confdefs.h <<\_ACEOF
31611 #define HAVE_TCPD 1
31612 _ACEOF
31613
31614                 WRAP_LIBS="-lwrap"
31615         elif test $ol_enable_wrappers = yes ; then
31616                 { { echo "$as_me:$LINENO: error: could not find TCP wrappers, select apppropriate options or disable" >&5
31617 echo "$as_me: error: could not find TCP wrappers, select apppropriate options or disable" >&2;}
31618    { (exit 1); exit 1; }; }
31619         else
31620                 { echo "$as_me:$LINENO: WARNING: could not find TCP wrappers, support disabled" >&5
31621 echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
31622                 WRAP_LIBS=""
31623         fi
31624 fi
31625
31626 if test $ol_enable_syslog != no ; then
31627         echo "$as_me:$LINENO: checking for openlog" >&5
31628 echo $ECHO_N "checking for openlog... $ECHO_C" >&6
31629 if test "${ac_cv_func_openlog+set}" = set; then
31630   echo $ECHO_N "(cached) $ECHO_C" >&6
31631 else
31632   cat >conftest.$ac_ext <<_ACEOF
31633 /* confdefs.h.  */
31634 _ACEOF
31635 cat confdefs.h >>conftest.$ac_ext
31636 cat >>conftest.$ac_ext <<_ACEOF
31637 /* end confdefs.h.  */
31638 /* Define openlog to an innocuous variant, in case <limits.h> declares openlog.
31639    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
31640 #define openlog innocuous_openlog
31641
31642 /* System header to define __stub macros and hopefully few prototypes,
31643     which can conflict with char openlog (); below.
31644     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31645     <limits.h> exists even on freestanding compilers.  */
31646
31647 #ifdef __STDC__
31648 # include <limits.h>
31649 #else
31650 # include <assert.h>
31651 #endif
31652
31653 #undef openlog
31654
31655 /* Override any gcc2 internal prototype to avoid an error.  */
31656 #ifdef __cplusplus
31657 extern "C"
31658 {
31659 #endif
31660 /* We use char because int might match the return type of a gcc2
31661    builtin and then its argument prototype would still apply.  */
31662 char openlog ();
31663 /* The GNU C library defines this for functions which it implements
31664     to always fail with ENOSYS.  Some functions are actually named
31665     something starting with __ and the normal name is an alias.  */
31666 #if defined (__stub_openlog) || defined (__stub___openlog)
31667 choke me
31668 #else
31669 char (*f) () = openlog;
31670 #endif
31671 #ifdef __cplusplus
31672 }
31673 #endif
31674
31675 int
31676 main ()
31677 {
31678 return f != openlog;
31679   ;
31680   return 0;
31681 }
31682 _ACEOF
31683 rm -f conftest.$ac_objext conftest$ac_exeext
31684 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31685   (eval $ac_link) 2>conftest.er1
31686   ac_status=$?
31687   grep -v '^ *+' conftest.er1 >conftest.err
31688   rm -f conftest.er1
31689   cat conftest.err >&5
31690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31691   (exit $ac_status); } &&
31692          { ac_try='test -z "$ac_c_werror_flag"
31693                          || test ! -s conftest.err'
31694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31695   (eval $ac_try) 2>&5
31696   ac_status=$?
31697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31698   (exit $ac_status); }; } &&
31699          { ac_try='test -s conftest$ac_exeext'
31700   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31701   (eval $ac_try) 2>&5
31702   ac_status=$?
31703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31704   (exit $ac_status); }; }; then
31705   ac_cv_func_openlog=yes
31706 else
31707   echo "$as_me: failed program was:" >&5
31708 sed 's/^/| /' conftest.$ac_ext >&5
31709
31710 ac_cv_func_openlog=no
31711 fi
31712 rm -f conftest.err conftest.$ac_objext \
31713       conftest$ac_exeext conftest.$ac_ext
31714 fi
31715 echo "$as_me:$LINENO: result: $ac_cv_func_openlog" >&5
31716 echo "${ECHO_T}$ac_cv_func_openlog" >&6
31717
31718         if test $ac_cv_func_openlog = no && test $ol_enable_syslog = yes; then
31719                 { { echo "$as_me:$LINENO: error: could not find syslog" >&5
31720 echo "$as_me: error: could not find syslog" >&2;}
31721    { (exit select appropriate options or disable); exit select appropriate options or disable; }; }
31722         fi
31723         ol_enable_syslog=$ac_cv_func_openlog
31724 fi
31725
31726 ol_link_sql=no
31727 if test $ol_enable_sql != no ; then
31728
31729
31730 for ac_header in sql.h sqlext.h
31731 do
31732 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
31733 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31734   echo "$as_me:$LINENO: checking for $ac_header" >&5
31735 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31736 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31737   echo $ECHO_N "(cached) $ECHO_C" >&6
31738 fi
31739 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
31740 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
31741 else
31742   # Is the header compilable?
31743 echo "$as_me:$LINENO: checking $ac_header usability" >&5
31744 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
31745 cat >conftest.$ac_ext <<_ACEOF
31746 /* confdefs.h.  */
31747 _ACEOF
31748 cat confdefs.h >>conftest.$ac_ext
31749 cat >>conftest.$ac_ext <<_ACEOF
31750 /* end confdefs.h.  */
31751 $ac_includes_default
31752 #include <$ac_header>
31753 _ACEOF
31754 rm -f conftest.$ac_objext
31755 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
31756   (eval $ac_compile) 2>conftest.er1
31757   ac_status=$?
31758   grep -v '^ *+' conftest.er1 >conftest.err
31759   rm -f conftest.er1
31760   cat conftest.err >&5
31761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31762   (exit $ac_status); } &&
31763          { ac_try='test -z "$ac_c_werror_flag"
31764                          || test ! -s conftest.err'
31765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31766   (eval $ac_try) 2>&5
31767   ac_status=$?
31768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31769   (exit $ac_status); }; } &&
31770          { ac_try='test -s conftest.$ac_objext'
31771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31772   (eval $ac_try) 2>&5
31773   ac_status=$?
31774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31775   (exit $ac_status); }; }; then
31776   ac_header_compiler=yes
31777 else
31778   echo "$as_me: failed program was:" >&5
31779 sed 's/^/| /' conftest.$ac_ext >&5
31780
31781 ac_header_compiler=no
31782 fi
31783 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
31784 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
31785 echo "${ECHO_T}$ac_header_compiler" >&6
31786
31787 # Is the header present?
31788 echo "$as_me:$LINENO: checking $ac_header presence" >&5
31789 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
31790 cat >conftest.$ac_ext <<_ACEOF
31791 /* confdefs.h.  */
31792 _ACEOF
31793 cat confdefs.h >>conftest.$ac_ext
31794 cat >>conftest.$ac_ext <<_ACEOF
31795 /* end confdefs.h.  */
31796 #include <$ac_header>
31797 _ACEOF
31798 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
31799   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
31800   ac_status=$?
31801   grep -v '^ *+' conftest.er1 >conftest.err
31802   rm -f conftest.er1
31803   cat conftest.err >&5
31804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31805   (exit $ac_status); } >/dev/null; then
31806   if test -s conftest.err; then
31807     ac_cpp_err=$ac_c_preproc_warn_flag
31808     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
31809   else
31810     ac_cpp_err=
31811   fi
31812 else
31813   ac_cpp_err=yes
31814 fi
31815 if test -z "$ac_cpp_err"; then
31816   ac_header_preproc=yes
31817 else
31818   echo "$as_me: failed program was:" >&5
31819 sed 's/^/| /' conftest.$ac_ext >&5
31820
31821   ac_header_preproc=no
31822 fi
31823 rm -f conftest.err conftest.$ac_ext
31824 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
31825 echo "${ECHO_T}$ac_header_preproc" >&6
31826
31827 # So?  What about this header?
31828 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
31829   yes:no: )
31830     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
31831 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
31832     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
31833 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
31834     ac_header_preproc=yes
31835     ;;
31836   no:yes:* )
31837     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
31838 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
31839     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
31840 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
31841     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
31842 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
31843     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
31844 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
31845     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
31846 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
31847     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
31848 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
31849     (
31850       cat <<\_ASBOX
31851 ## --------------------------------------------- ##
31852 ## Report this to <http://www.openldap.org/its/> ##
31853 ## --------------------------------------------- ##
31854 _ASBOX
31855     ) |
31856       sed "s/^/$as_me: WARNING:     /" >&2
31857     ;;
31858 esac
31859 echo "$as_me:$LINENO: checking for $ac_header" >&5
31860 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31861 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31862   echo $ECHO_N "(cached) $ECHO_C" >&6
31863 else
31864   eval "$as_ac_Header=\$ac_header_preproc"
31865 fi
31866 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
31867 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
31868
31869 fi
31870 if test `eval echo '${'$as_ac_Header'}'` = yes; then
31871   cat >>confdefs.h <<_ACEOF
31872 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
31873 _ACEOF
31874
31875 else
31876
31877                 { { echo "$as_me:$LINENO: error: could not locate SQL headers" >&5
31878 echo "$as_me: error: could not locate SQL headers" >&2;}
31879    { (exit 1); exit 1; }; }
31880
31881 fi
31882
31883 done
31884
31885
31886         sql_LIBS="$LIBS"
31887         LIBS="$LTHREAD_LIBS"
31888
31889         echo "$as_me:$LINENO: checking for SQLDriverConnect in -liodbc" >&5
31890 echo $ECHO_N "checking for SQLDriverConnect in -liodbc... $ECHO_C" >&6
31891 if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then
31892   echo $ECHO_N "(cached) $ECHO_C" >&6
31893 else
31894   ac_check_lib_save_LIBS=$LIBS
31895 LIBS="-liodbc  $LIBS"
31896 cat >conftest.$ac_ext <<_ACEOF
31897 /* confdefs.h.  */
31898 _ACEOF
31899 cat confdefs.h >>conftest.$ac_ext
31900 cat >>conftest.$ac_ext <<_ACEOF
31901 /* end confdefs.h.  */
31902
31903 /* Override any gcc2 internal prototype to avoid an error.  */
31904 #ifdef __cplusplus
31905 extern "C"
31906 #endif
31907 /* We use char because int might match the return type of a gcc2
31908    builtin and then its argument prototype would still apply.  */
31909 char SQLDriverConnect ();
31910 int
31911 main ()
31912 {
31913 SQLDriverConnect ();
31914   ;
31915   return 0;
31916 }
31917 _ACEOF
31918 rm -f conftest.$ac_objext conftest$ac_exeext
31919 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31920   (eval $ac_link) 2>conftest.er1
31921   ac_status=$?
31922   grep -v '^ *+' conftest.er1 >conftest.err
31923   rm -f conftest.er1
31924   cat conftest.err >&5
31925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31926   (exit $ac_status); } &&
31927          { ac_try='test -z "$ac_c_werror_flag"
31928                          || test ! -s conftest.err'
31929   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31930   (eval $ac_try) 2>&5
31931   ac_status=$?
31932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31933   (exit $ac_status); }; } &&
31934          { ac_try='test -s conftest$ac_exeext'
31935   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31936   (eval $ac_try) 2>&5
31937   ac_status=$?
31938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31939   (exit $ac_status); }; }; then
31940   ac_cv_lib_iodbc_SQLDriverConnect=yes
31941 else
31942   echo "$as_me: failed program was:" >&5
31943 sed 's/^/| /' conftest.$ac_ext >&5
31944
31945 ac_cv_lib_iodbc_SQLDriverConnect=no
31946 fi
31947 rm -f conftest.err conftest.$ac_objext \
31948       conftest$ac_exeext conftest.$ac_ext
31949 LIBS=$ac_check_lib_save_LIBS
31950 fi
31951 echo "$as_me:$LINENO: result: $ac_cv_lib_iodbc_SQLDriverConnect" >&5
31952 echo "${ECHO_T}$ac_cv_lib_iodbc_SQLDriverConnect" >&6
31953 if test $ac_cv_lib_iodbc_SQLDriverConnect = yes; then
31954   have_iodbc=yes
31955 else
31956   have_iodbc=no
31957 fi
31958
31959         if test $have_iodbc = yes ; then
31960                 ol_link_sql="-liodbc"
31961         else
31962                 echo "$as_me:$LINENO: checking for SQLDriverConnect in -lodbc" >&5
31963 echo $ECHO_N "checking for SQLDriverConnect in -lodbc... $ECHO_C" >&6
31964 if test "${ac_cv_lib_odbc_SQLDriverConnect+set}" = set; then
31965   echo $ECHO_N "(cached) $ECHO_C" >&6
31966 else
31967   ac_check_lib_save_LIBS=$LIBS
31968 LIBS="-lodbc  $LIBS"
31969 cat >conftest.$ac_ext <<_ACEOF
31970 /* confdefs.h.  */
31971 _ACEOF
31972 cat confdefs.h >>conftest.$ac_ext
31973 cat >>conftest.$ac_ext <<_ACEOF
31974 /* end confdefs.h.  */
31975
31976 /* Override any gcc2 internal prototype to avoid an error.  */
31977 #ifdef __cplusplus
31978 extern "C"
31979 #endif
31980 /* We use char because int might match the return type of a gcc2
31981    builtin and then its argument prototype would still apply.  */
31982 char SQLDriverConnect ();
31983 int
31984 main ()
31985 {
31986 SQLDriverConnect ();
31987   ;
31988   return 0;
31989 }
31990 _ACEOF
31991 rm -f conftest.$ac_objext conftest$ac_exeext
31992 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31993   (eval $ac_link) 2>conftest.er1
31994   ac_status=$?
31995   grep -v '^ *+' conftest.er1 >conftest.err
31996   rm -f conftest.er1
31997   cat conftest.err >&5
31998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31999   (exit $ac_status); } &&
32000          { ac_try='test -z "$ac_c_werror_flag"
32001                          || test ! -s conftest.err'
32002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32003   (eval $ac_try) 2>&5
32004   ac_status=$?
32005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32006   (exit $ac_status); }; } &&
32007          { ac_try='test -s conftest$ac_exeext'
32008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32009   (eval $ac_try) 2>&5
32010   ac_status=$?
32011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32012   (exit $ac_status); }; }; then
32013   ac_cv_lib_odbc_SQLDriverConnect=yes
32014 else
32015   echo "$as_me: failed program was:" >&5
32016 sed 's/^/| /' conftest.$ac_ext >&5
32017
32018 ac_cv_lib_odbc_SQLDriverConnect=no
32019 fi
32020 rm -f conftest.err conftest.$ac_objext \
32021       conftest$ac_exeext conftest.$ac_ext
32022 LIBS=$ac_check_lib_save_LIBS
32023 fi
32024 echo "$as_me:$LINENO: result: $ac_cv_lib_odbc_SQLDriverConnect" >&5
32025 echo "${ECHO_T}$ac_cv_lib_odbc_SQLDriverConnect" >&6
32026 if test $ac_cv_lib_odbc_SQLDriverConnect = yes; then
32027   have_odbc=yes
32028 else
32029   have_odbc=no
32030 fi
32031
32032                 if test $have_odbc = yes ; then
32033                         ol_link_sql="-lodbc"
32034                 fi
32035         fi
32036
32037         LIBS="$sql_LIBS"
32038
32039         if test $ol_link_sql != no ; then
32040                 SLAPD_SQL_LIBS="$ol_link_sql"
32041
32042         elif test $ol_enable_sql != auto ; then
32043                 { { echo "$as_me:$LINENO: error: could not locate suitable ODBC library" >&5
32044 echo "$as_me: error: could not locate suitable ODBC library" >&2;}
32045    { (exit 1); exit 1; }; }
32046         fi
32047 fi
32048
32049 ol_icu=no
32050
32051 for ac_header in unicode/utypes.h
32052 do
32053 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
32054 if eval "test \"\${$as_ac_Header+set}\" = set"; then
32055   echo "$as_me:$LINENO: checking for $ac_header" >&5
32056 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
32057 if eval "test \"\${$as_ac_Header+set}\" = set"; then
32058   echo $ECHO_N "(cached) $ECHO_C" >&6
32059 fi
32060 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
32061 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
32062 else
32063   # Is the header compilable?
32064 echo "$as_me:$LINENO: checking $ac_header usability" >&5
32065 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
32066 cat >conftest.$ac_ext <<_ACEOF
32067 /* confdefs.h.  */
32068 _ACEOF
32069 cat confdefs.h >>conftest.$ac_ext
32070 cat >>conftest.$ac_ext <<_ACEOF
32071 /* end confdefs.h.  */
32072 $ac_includes_default
32073 #include <$ac_header>
32074 _ACEOF
32075 rm -f conftest.$ac_objext
32076 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
32077   (eval $ac_compile) 2>conftest.er1
32078   ac_status=$?
32079   grep -v '^ *+' conftest.er1 >conftest.err
32080   rm -f conftest.er1
32081   cat conftest.err >&5
32082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32083   (exit $ac_status); } &&
32084          { ac_try='test -z "$ac_c_werror_flag"
32085                          || test ! -s conftest.err'
32086   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32087   (eval $ac_try) 2>&5
32088   ac_status=$?
32089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32090   (exit $ac_status); }; } &&
32091          { ac_try='test -s conftest.$ac_objext'
32092   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32093   (eval $ac_try) 2>&5
32094   ac_status=$?
32095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32096   (exit $ac_status); }; }; then
32097   ac_header_compiler=yes
32098 else
32099   echo "$as_me: failed program was:" >&5
32100 sed 's/^/| /' conftest.$ac_ext >&5
32101
32102 ac_header_compiler=no
32103 fi
32104 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
32105 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
32106 echo "${ECHO_T}$ac_header_compiler" >&6
32107
32108 # Is the header present?
32109 echo "$as_me:$LINENO: checking $ac_header presence" >&5
32110 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
32111 cat >conftest.$ac_ext <<_ACEOF
32112 /* confdefs.h.  */
32113 _ACEOF
32114 cat confdefs.h >>conftest.$ac_ext
32115 cat >>conftest.$ac_ext <<_ACEOF
32116 /* end confdefs.h.  */
32117 #include <$ac_header>
32118 _ACEOF
32119 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
32120   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
32121   ac_status=$?
32122   grep -v '^ *+' conftest.er1 >conftest.err
32123   rm -f conftest.er1
32124   cat conftest.err >&5
32125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32126   (exit $ac_status); } >/dev/null; then
32127   if test -s conftest.err; then
32128     ac_cpp_err=$ac_c_preproc_warn_flag
32129     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
32130   else
32131     ac_cpp_err=
32132   fi
32133 else
32134   ac_cpp_err=yes
32135 fi
32136 if test -z "$ac_cpp_err"; then
32137   ac_header_preproc=yes
32138 else
32139   echo "$as_me: failed program was:" >&5
32140 sed 's/^/| /' conftest.$ac_ext >&5
32141
32142   ac_header_preproc=no
32143 fi
32144 rm -f conftest.err conftest.$ac_ext
32145 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
32146 echo "${ECHO_T}$ac_header_preproc" >&6
32147
32148 # So?  What about this header?
32149 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
32150   yes:no: )
32151     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
32152 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
32153     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
32154 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
32155     ac_header_preproc=yes
32156     ;;
32157   no:yes:* )
32158     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
32159 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
32160     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
32161 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
32162     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
32163 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
32164     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
32165 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
32166     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
32167 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
32168     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
32169 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
32170     (
32171       cat <<\_ASBOX
32172 ## --------------------------------------------- ##
32173 ## Report this to <http://www.openldap.org/its/> ##
32174 ## --------------------------------------------- ##
32175 _ASBOX
32176     ) |
32177       sed "s/^/$as_me: WARNING:     /" >&2
32178     ;;
32179 esac
32180 echo "$as_me:$LINENO: checking for $ac_header" >&5
32181 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
32182 if eval "test \"\${$as_ac_Header+set}\" = set"; then
32183   echo $ECHO_N "(cached) $ECHO_C" >&6
32184 else
32185   eval "$as_ac_Header=\$ac_header_preproc"
32186 fi
32187 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
32188 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
32189
32190 fi
32191 if test `eval echo '${'$as_ac_Header'}'` = yes; then
32192   cat >>confdefs.h <<_ACEOF
32193 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
32194 _ACEOF
32195
32196 fi
32197
32198 done
32199
32200 if test $ac_cv_header_unicode_utypes_h = yes ; then
32201                 OL_ICULIBS="-licuuc -licudata"
32202
32203         echo "$as_me:$LINENO: checking for ICU libraries" >&5
32204 echo $ECHO_N "checking for ICU libraries... $ECHO_C" >&6
32205 if test "${ol_cv_lib_icu+set}" = set; then
32206   echo $ECHO_N "(cached) $ECHO_C" >&6
32207 else
32208
32209                 ol_LIBS="$LIBS"
32210                 LIBS="$OL_ICULIBS $LIBS"
32211                 cat >conftest.$ac_ext <<_ACEOF
32212 /* confdefs.h.  */
32213 _ACEOF
32214 cat confdefs.h >>conftest.$ac_ext
32215 cat >>conftest.$ac_ext <<_ACEOF
32216 /* end confdefs.h.  */
32217
32218 #include <unicode/utypes.h>
32219
32220 int
32221 main ()
32222 {
32223
32224 (void) u_errorName(0);
32225
32226   ;
32227   return 0;
32228 }
32229 _ACEOF
32230 rm -f conftest.$ac_objext conftest$ac_exeext
32231 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32232   (eval $ac_link) 2>conftest.er1
32233   ac_status=$?
32234   grep -v '^ *+' conftest.er1 >conftest.err
32235   rm -f conftest.er1
32236   cat conftest.err >&5
32237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32238   (exit $ac_status); } &&
32239          { ac_try='test -z "$ac_c_werror_flag"
32240                          || test ! -s conftest.err'
32241   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32242   (eval $ac_try) 2>&5
32243   ac_status=$?
32244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32245   (exit $ac_status); }; } &&
32246          { ac_try='test -s conftest$ac_exeext'
32247   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32248   (eval $ac_try) 2>&5
32249   ac_status=$?
32250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32251   (exit $ac_status); }; }; then
32252   ol_cv_lib_icu=yes
32253 else
32254   echo "$as_me: failed program was:" >&5
32255 sed 's/^/| /' conftest.$ac_ext >&5
32256
32257 ol_cv_lib_icu=no
32258 fi
32259 rm -f conftest.err conftest.$ac_objext \
32260       conftest$ac_exeext conftest.$ac_ext
32261                 LIBS="$ol_LIBS"
32262
32263 fi
32264 echo "$as_me:$LINENO: result: $ol_cv_lib_icu" >&5
32265 echo "${ECHO_T}$ol_cv_lib_icu" >&6
32266
32267         if test $ol_cv_lib_icu != no ; then
32268                 ol_icu="$OL_ICULIBS"
32269
32270 cat >>confdefs.h <<\_ACEOF
32271 #define HAVE_ICU 1
32272 _ACEOF
32273
32274         fi
32275 fi
32276
32277 if test "$ol_icu" = no ; then
32278         { echo "$as_me:$LINENO: WARNING: ICU not available" >&5
32279 echo "$as_me: WARNING: ICU not available" >&2;}
32280 else
32281         ICU_LIBS="$ol_icu"
32282 fi
32283 WITH_SASL=no
32284 ol_link_sasl=no
32285 ol_link_spasswd=no
32286 if test $ol_with_cyrus_sasl != no ; then
32287
32288
32289 for ac_header in sasl/sasl.h sasl.h
32290 do
32291 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
32292 if eval "test \"\${$as_ac_Header+set}\" = set"; then
32293   echo "$as_me:$LINENO: checking for $ac_header" >&5
32294 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
32295 if eval "test \"\${$as_ac_Header+set}\" = set"; then
32296   echo $ECHO_N "(cached) $ECHO_C" >&6
32297 fi
32298 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
32299 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
32300 else
32301   # Is the header compilable?
32302 echo "$as_me:$LINENO: checking $ac_header usability" >&5
32303 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
32304 cat >conftest.$ac_ext <<_ACEOF
32305 /* confdefs.h.  */
32306 _ACEOF
32307 cat confdefs.h >>conftest.$ac_ext
32308 cat >>conftest.$ac_ext <<_ACEOF
32309 /* end confdefs.h.  */
32310 $ac_includes_default
32311 #include <$ac_header>
32312 _ACEOF
32313 rm -f conftest.$ac_objext
32314 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
32315   (eval $ac_compile) 2>conftest.er1
32316   ac_status=$?
32317   grep -v '^ *+' conftest.er1 >conftest.err
32318   rm -f conftest.er1
32319   cat conftest.err >&5
32320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32321   (exit $ac_status); } &&
32322          { ac_try='test -z "$ac_c_werror_flag"
32323                          || test ! -s conftest.err'
32324   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32325   (eval $ac_try) 2>&5
32326   ac_status=$?
32327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32328   (exit $ac_status); }; } &&
32329          { ac_try='test -s conftest.$ac_objext'
32330   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32331   (eval $ac_try) 2>&5
32332   ac_status=$?
32333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32334   (exit $ac_status); }; }; then
32335   ac_header_compiler=yes
32336 else
32337   echo "$as_me: failed program was:" >&5
32338 sed 's/^/| /' conftest.$ac_ext >&5
32339
32340 ac_header_compiler=no
32341 fi
32342 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
32343 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
32344 echo "${ECHO_T}$ac_header_compiler" >&6
32345
32346 # Is the header present?
32347 echo "$as_me:$LINENO: checking $ac_header presence" >&5
32348 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
32349 cat >conftest.$ac_ext <<_ACEOF
32350 /* confdefs.h.  */
32351 _ACEOF
32352 cat confdefs.h >>conftest.$ac_ext
32353 cat >>conftest.$ac_ext <<_ACEOF
32354 /* end confdefs.h.  */
32355 #include <$ac_header>
32356 _ACEOF
32357 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
32358   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
32359   ac_status=$?
32360   grep -v '^ *+' conftest.er1 >conftest.err
32361   rm -f conftest.er1
32362   cat conftest.err >&5
32363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32364   (exit $ac_status); } >/dev/null; then
32365   if test -s conftest.err; then
32366     ac_cpp_err=$ac_c_preproc_warn_flag
32367     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
32368   else
32369     ac_cpp_err=
32370   fi
32371 else
32372   ac_cpp_err=yes
32373 fi
32374 if test -z "$ac_cpp_err"; then
32375   ac_header_preproc=yes
32376 else
32377   echo "$as_me: failed program was:" >&5
32378 sed 's/^/| /' conftest.$ac_ext >&5
32379
32380   ac_header_preproc=no
32381 fi
32382 rm -f conftest.err conftest.$ac_ext
32383 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
32384 echo "${ECHO_T}$ac_header_preproc" >&6
32385
32386 # So?  What about this header?
32387 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
32388   yes:no: )
32389     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
32390 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
32391     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
32392 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
32393     ac_header_preproc=yes
32394     ;;
32395   no:yes:* )
32396     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
32397 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
32398     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
32399 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
32400     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
32401 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
32402     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
32403 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
32404     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
32405 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
32406     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
32407 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
32408     (
32409       cat <<\_ASBOX
32410 ## --------------------------------------------- ##
32411 ## Report this to <http://www.openldap.org/its/> ##
32412 ## --------------------------------------------- ##
32413 _ASBOX
32414     ) |
32415       sed "s/^/$as_me: WARNING:     /" >&2
32416     ;;
32417 esac
32418 echo "$as_me:$LINENO: checking for $ac_header" >&5
32419 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
32420 if eval "test \"\${$as_ac_Header+set}\" = set"; then
32421   echo $ECHO_N "(cached) $ECHO_C" >&6
32422 else
32423   eval "$as_ac_Header=\$ac_header_preproc"
32424 fi
32425 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
32426 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
32427
32428 fi
32429 if test `eval echo '${'$as_ac_Header'}'` = yes; then
32430   cat >>confdefs.h <<_ACEOF
32431 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
32432 _ACEOF
32433
32434 fi
32435
32436 done
32437
32438
32439         if test $ac_cv_header_sasl_sasl_h = yes ||
32440            test $ac_cv_header_sasl_h = yes; then
32441                 echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl2" >&5
32442 echo $ECHO_N "checking for sasl_client_init in -lsasl2... $ECHO_C" >&6
32443 if test "${ac_cv_lib_sasl2_sasl_client_init+set}" = set; then
32444   echo $ECHO_N "(cached) $ECHO_C" >&6
32445 else
32446   ac_check_lib_save_LIBS=$LIBS
32447 LIBS="-lsasl2  $LIBS"
32448 cat >conftest.$ac_ext <<_ACEOF
32449 /* confdefs.h.  */
32450 _ACEOF
32451 cat confdefs.h >>conftest.$ac_ext
32452 cat >>conftest.$ac_ext <<_ACEOF
32453 /* end confdefs.h.  */
32454
32455 /* Override any gcc2 internal prototype to avoid an error.  */
32456 #ifdef __cplusplus
32457 extern "C"
32458 #endif
32459 /* We use char because int might match the return type of a gcc2
32460    builtin and then its argument prototype would still apply.  */
32461 char sasl_client_init ();
32462 int
32463 main ()
32464 {
32465 sasl_client_init ();
32466   ;
32467   return 0;
32468 }
32469 _ACEOF
32470 rm -f conftest.$ac_objext conftest$ac_exeext
32471 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32472   (eval $ac_link) 2>conftest.er1
32473   ac_status=$?
32474   grep -v '^ *+' conftest.er1 >conftest.err
32475   rm -f conftest.er1
32476   cat conftest.err >&5
32477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32478   (exit $ac_status); } &&
32479          { ac_try='test -z "$ac_c_werror_flag"
32480                          || test ! -s conftest.err'
32481   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32482   (eval $ac_try) 2>&5
32483   ac_status=$?
32484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32485   (exit $ac_status); }; } &&
32486          { ac_try='test -s conftest$ac_exeext'
32487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32488   (eval $ac_try) 2>&5
32489   ac_status=$?
32490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32491   (exit $ac_status); }; }; then
32492   ac_cv_lib_sasl2_sasl_client_init=yes
32493 else
32494   echo "$as_me: failed program was:" >&5
32495 sed 's/^/| /' conftest.$ac_ext >&5
32496
32497 ac_cv_lib_sasl2_sasl_client_init=no
32498 fi
32499 rm -f conftest.err conftest.$ac_objext \
32500       conftest$ac_exeext conftest.$ac_ext
32501 LIBS=$ac_check_lib_save_LIBS
32502 fi
32503 echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_sasl_client_init" >&5
32504 echo "${ECHO_T}$ac_cv_lib_sasl2_sasl_client_init" >&6
32505 if test $ac_cv_lib_sasl2_sasl_client_init = yes; then
32506   ol_link_sasl="-lsasl2"
32507 else
32508   echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl" >&5
32509 echo $ECHO_N "checking for sasl_client_init in -lsasl... $ECHO_C" >&6
32510 if test "${ac_cv_lib_sasl_sasl_client_init+set}" = set; then
32511   echo $ECHO_N "(cached) $ECHO_C" >&6
32512 else
32513   ac_check_lib_save_LIBS=$LIBS
32514 LIBS="-lsasl  $LIBS"
32515 cat >conftest.$ac_ext <<_ACEOF
32516 /* confdefs.h.  */
32517 _ACEOF
32518 cat confdefs.h >>conftest.$ac_ext
32519 cat >>conftest.$ac_ext <<_ACEOF
32520 /* end confdefs.h.  */
32521
32522 /* Override any gcc2 internal prototype to avoid an error.  */
32523 #ifdef __cplusplus
32524 extern "C"
32525 #endif
32526 /* We use char because int might match the return type of a gcc2
32527    builtin and then its argument prototype would still apply.  */
32528 char sasl_client_init ();
32529 int
32530 main ()
32531 {
32532 sasl_client_init ();
32533   ;
32534   return 0;
32535 }
32536 _ACEOF
32537 rm -f conftest.$ac_objext conftest$ac_exeext
32538 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32539   (eval $ac_link) 2>conftest.er1
32540   ac_status=$?
32541   grep -v '^ *+' conftest.er1 >conftest.err
32542   rm -f conftest.er1
32543   cat conftest.err >&5
32544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32545   (exit $ac_status); } &&
32546          { ac_try='test -z "$ac_c_werror_flag"
32547                          || test ! -s conftest.err'
32548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32549   (eval $ac_try) 2>&5
32550   ac_status=$?
32551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32552   (exit $ac_status); }; } &&
32553          { ac_try='test -s conftest$ac_exeext'
32554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32555   (eval $ac_try) 2>&5
32556   ac_status=$?
32557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32558   (exit $ac_status); }; }; then
32559   ac_cv_lib_sasl_sasl_client_init=yes
32560 else
32561   echo "$as_me: failed program was:" >&5
32562 sed 's/^/| /' conftest.$ac_ext >&5
32563
32564 ac_cv_lib_sasl_sasl_client_init=no
32565 fi
32566 rm -f conftest.err conftest.$ac_objext \
32567       conftest$ac_exeext conftest.$ac_ext
32568 LIBS=$ac_check_lib_save_LIBS
32569 fi
32570 echo "$as_me:$LINENO: result: $ac_cv_lib_sasl_sasl_client_init" >&5
32571 echo "${ECHO_T}$ac_cv_lib_sasl_sasl_client_init" >&6
32572 if test $ac_cv_lib_sasl_sasl_client_init = yes; then
32573   ol_link_sasl="-lsasl"
32574 fi
32575
32576 fi
32577
32578         fi
32579
32580         if test $ol_link_sasl = no ; then
32581                 if test $ol_with_cyrus_sasl != auto ; then
32582                         { { echo "$as_me:$LINENO: error: Could not locate Cyrus SASL" >&5
32583 echo "$as_me: error: Could not locate Cyrus SASL" >&2;}
32584    { (exit 1); exit 1; }; }
32585                 else
32586                         { echo "$as_me:$LINENO: WARNING: Could not locate Cyrus SASL" >&5
32587 echo "$as_me: WARNING: Could not locate Cyrus SASL" >&2;}
32588                         { echo "$as_me:$LINENO: WARNING: SASL authentication not supported!" >&5
32589 echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
32590                         if test $ol_link_tls = no ; then
32591                                 { echo "$as_me:$LINENO: WARNING: Strong authentication not supported!" >&5
32592 echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
32593                         fi
32594                 fi
32595         else
32596                 echo "$as_me:$LINENO: checking Cyrus SASL library version" >&5
32597 echo $ECHO_N "checking Cyrus SASL library version... $ECHO_C" >&6
32598 if test "${ol_cv_sasl_compat+set}" = set; then
32599   echo $ECHO_N "(cached) $ECHO_C" >&6
32600 else
32601
32602         cat >conftest.$ac_ext <<_ACEOF
32603 /* confdefs.h.  */
32604 _ACEOF
32605 cat confdefs.h >>conftest.$ac_ext
32606 cat >>conftest.$ac_ext <<_ACEOF
32607 /* end confdefs.h.  */
32608
32609 #ifdef HAVE_SASL_SASL_H
32610 #include <sasl/sasl.h>
32611 #else
32612 #include <sasl.h>
32613 #endif
32614
32615 /* Require 2.1.15+ */
32616 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
32617         char *__sasl_compat = "2.2+ or better okay (we guess)";
32618 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
32619         && SASL_VERSION_STEP >=15
32620         char *__sasl_compat = "2.1.15+ or better okay";
32621 #endif
32622
32623 _ACEOF
32624 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32625   $EGREP "__sasl_compat" >/dev/null 2>&1; then
32626   ol_cv_sasl_compat=yes
32627 else
32628   ol_cv_sasl_compat=no
32629 fi
32630 rm -f conftest*
32631
32632 fi
32633 echo "$as_me:$LINENO: result: $ol_cv_sasl_compat" >&5
32634 echo "${ECHO_T}$ol_cv_sasl_compat" >&6
32635
32636                 if test $ol_cv_sasl_compat = no ; then
32637                         ol_link_sasl=no
32638                         { { echo "$as_me:$LINENO: error: Cyrus SASL library located but is incompatible" >&5
32639 echo "$as_me: error: Cyrus SASL library located but is incompatible" >&2;}
32640    { (exit 1); exit 1; }; }
32641                 fi
32642
32643
32644 cat >>confdefs.h <<\_ACEOF
32645 #define HAVE_CYRUS_SASL 1
32646 _ACEOF
32647
32648                 SASL_LIBS="$ol_link_sasl"
32649                 if test $ol_enable_spasswd != no ; then
32650                         ol_link_spasswd=yes
32651                 fi
32652
32653                 ac_save_LIBS="$LIBS"
32654                 LIBS="$LIBS $ol_link_sasl"
32655                 echo "$as_me:$LINENO: checking for sasl_version" >&5
32656 echo $ECHO_N "checking for sasl_version... $ECHO_C" >&6
32657 if test "${ac_cv_func_sasl_version+set}" = set; then
32658   echo $ECHO_N "(cached) $ECHO_C" >&6
32659 else
32660   cat >conftest.$ac_ext <<_ACEOF
32661 /* confdefs.h.  */
32662 _ACEOF
32663 cat confdefs.h >>conftest.$ac_ext
32664 cat >>conftest.$ac_ext <<_ACEOF
32665 /* end confdefs.h.  */
32666 /* Define sasl_version to an innocuous variant, in case <limits.h> declares sasl_version.
32667    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
32668 #define sasl_version innocuous_sasl_version
32669
32670 /* System header to define __stub macros and hopefully few prototypes,
32671     which can conflict with char sasl_version (); below.
32672     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32673     <limits.h> exists even on freestanding compilers.  */
32674
32675 #ifdef __STDC__
32676 # include <limits.h>
32677 #else
32678 # include <assert.h>
32679 #endif
32680
32681 #undef sasl_version
32682
32683 /* Override any gcc2 internal prototype to avoid an error.  */
32684 #ifdef __cplusplus
32685 extern "C"
32686 {
32687 #endif
32688 /* We use char because int might match the return type of a gcc2
32689    builtin and then its argument prototype would still apply.  */
32690 char sasl_version ();
32691 /* The GNU C library defines this for functions which it implements
32692     to always fail with ENOSYS.  Some functions are actually named
32693     something starting with __ and the normal name is an alias.  */
32694 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
32695 choke me
32696 #else
32697 char (*f) () = sasl_version;
32698 #endif
32699 #ifdef __cplusplus
32700 }
32701 #endif
32702
32703 int
32704 main ()
32705 {
32706 return f != sasl_version;
32707   ;
32708   return 0;
32709 }
32710 _ACEOF
32711 rm -f conftest.$ac_objext conftest$ac_exeext
32712 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32713   (eval $ac_link) 2>conftest.er1
32714   ac_status=$?
32715   grep -v '^ *+' conftest.er1 >conftest.err
32716   rm -f conftest.er1
32717   cat conftest.err >&5
32718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32719   (exit $ac_status); } &&
32720          { ac_try='test -z "$ac_c_werror_flag"
32721                          || test ! -s conftest.err'
32722   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32723   (eval $ac_try) 2>&5
32724   ac_status=$?
32725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32726   (exit $ac_status); }; } &&
32727          { ac_try='test -s conftest$ac_exeext'
32728   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32729   (eval $ac_try) 2>&5
32730   ac_status=$?
32731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32732   (exit $ac_status); }; }; then
32733   ac_cv_func_sasl_version=yes
32734 else
32735   echo "$as_me: failed program was:" >&5
32736 sed 's/^/| /' conftest.$ac_ext >&5
32737
32738 ac_cv_func_sasl_version=no
32739 fi
32740 rm -f conftest.err conftest.$ac_objext \
32741       conftest$ac_exeext conftest.$ac_ext
32742 fi
32743 echo "$as_me:$LINENO: result: $ac_cv_func_sasl_version" >&5
32744 echo "${ECHO_T}$ac_cv_func_sasl_version" >&6
32745 if test $ac_cv_func_sasl_version = yes; then
32746
32747 cat >>confdefs.h <<\_ACEOF
32748 #define HAVE_SASL_VERSION 1
32749 _ACEOF
32750
32751 fi
32752
32753                 LIBS="$ac_save_LIBS"
32754
32755                 WITH_SASL=yes
32756         fi
32757
32758 else
32759         { echo "$as_me:$LINENO: WARNING: SASL authentication not supported!" >&5
32760 echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
32761         if test $ol_link_tls = no ; then
32762                 { echo "$as_me:$LINENO: WARNING: Strong authentication not supported!" >&5
32763 echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
32764         fi
32765 fi
32766
32767 if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
32768         dev=no
32769         if test -r /dev/urandom ; then
32770                 dev="/dev/urandom";
32771         elif test -r /idev/urandom ; then
32772                 dev="/idev/urandom";
32773         elif test -r /dev/srandom ; then
32774                 dev="/dev/srandom";
32775         elif test -r /dev/random ; then
32776                 dev="/dev/random";
32777         elif test -r /idev/random ; then
32778                 dev="/idev/random";
32779         fi
32780
32781         if test $dev != no ; then
32782
32783 cat >>confdefs.h <<_ACEOF
32784 #define URANDOM_DEVICE "$dev"
32785 _ACEOF
32786
32787         fi
32788 fi
32789
32790 ol_link_fetch=no
32791 if test $ol_with_fetch != no ; then
32792         ol_LIBS=$LIBS
32793 LIBS="-lfetch -lcom_err $LIBS"
32794 echo "$as_me:$LINENO: checking fetch(3) library" >&5
32795 echo $ECHO_N "checking fetch(3) library... $ECHO_C" >&6
32796 if test "${ol_cv_lib_fetch+set}" = set; then
32797   echo $ECHO_N "(cached) $ECHO_C" >&6
32798 else
32799
32800         cat >conftest.$ac_ext <<_ACEOF
32801 /* confdefs.h.  */
32802 _ACEOF
32803 cat confdefs.h >>conftest.$ac_ext
32804 cat >>conftest.$ac_ext <<_ACEOF
32805 /* end confdefs.h.  */
32806
32807 #include <sys/param.h>
32808 #include <stdio.h>
32809 #include <fetch.h>
32810 int
32811 main ()
32812 {
32813 struct url *u = fetchParseURL("file:///");
32814   ;
32815   return 0;
32816 }
32817 _ACEOF
32818 rm -f conftest.$ac_objext conftest$ac_exeext
32819 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32820   (eval $ac_link) 2>conftest.er1
32821   ac_status=$?
32822   grep -v '^ *+' conftest.er1 >conftest.err
32823   rm -f conftest.er1
32824   cat conftest.err >&5
32825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32826   (exit $ac_status); } &&
32827          { ac_try='test -z "$ac_c_werror_flag"
32828                          || test ! -s conftest.err'
32829   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32830   (eval $ac_try) 2>&5
32831   ac_status=$?
32832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32833   (exit $ac_status); }; } &&
32834          { ac_try='test -s conftest$ac_exeext'
32835   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32836   (eval $ac_try) 2>&5
32837   ac_status=$?
32838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32839   (exit $ac_status); }; }; then
32840   ol_cv_lib_fetch=yes
32841 else
32842   echo "$as_me: failed program was:" >&5
32843 sed 's/^/| /' conftest.$ac_ext >&5
32844
32845 ol_cv_lib_fetch=no
32846 fi
32847 rm -f conftest.err conftest.$ac_objext \
32848       conftest$ac_exeext conftest.$ac_ext
32849 fi
32850 echo "$as_me:$LINENO: result: $ol_cv_lib_fetch" >&5
32851 echo "${ECHO_T}$ol_cv_lib_fetch" >&6
32852 LIBS=$ol_LIBS
32853 if test $ol_cv_lib_fetch != no ; then
32854         ol_link_fetch="-lfetch -lcom_err"
32855
32856 cat >>confdefs.h <<\_ACEOF
32857 #define HAVE_FETCH 1
32858 _ACEOF
32859
32860 fi
32861
32862
32863         if test $ol_cv_lib_fetch != no ; then
32864                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
32865                 ol_link_fetch=freebsd
32866
32867         elif test $ol_with_fetch != auto ; then
32868                 { { echo "$as_me:$LINENO: error: no suitable API for --with-fetch=$ol_with_fetch" >&5
32869 echo "$as_me: error: no suitable API for --with-fetch=$ol_with_fetch" >&2;}
32870    { (exit 1); exit 1; }; }
32871         fi
32872 fi
32873
32874 if test $ol_enable_crypt != no ; then
32875         save_LIBS="$LIBS"
32876         LIBS="$TLS_LIBS $LIBS"
32877
32878         echo "$as_me:$LINENO: checking for crypt" >&5
32879 echo $ECHO_N "checking for crypt... $ECHO_C" >&6
32880 if test "${ac_cv_func_crypt+set}" = set; then
32881   echo $ECHO_N "(cached) $ECHO_C" >&6
32882 else
32883   cat >conftest.$ac_ext <<_ACEOF
32884 /* confdefs.h.  */
32885 _ACEOF
32886 cat confdefs.h >>conftest.$ac_ext
32887 cat >>conftest.$ac_ext <<_ACEOF
32888 /* end confdefs.h.  */
32889 /* Define crypt to an innocuous variant, in case <limits.h> declares crypt.
32890    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
32891 #define crypt innocuous_crypt
32892
32893 /* System header to define __stub macros and hopefully few prototypes,
32894     which can conflict with char crypt (); below.
32895     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32896     <limits.h> exists even on freestanding compilers.  */
32897
32898 #ifdef __STDC__
32899 # include <limits.h>
32900 #else
32901 # include <assert.h>
32902 #endif
32903
32904 #undef crypt
32905
32906 /* Override any gcc2 internal prototype to avoid an error.  */
32907 #ifdef __cplusplus
32908 extern "C"
32909 {
32910 #endif
32911 /* We use char because int might match the return type of a gcc2
32912    builtin and then its argument prototype would still apply.  */
32913 char crypt ();
32914 /* The GNU C library defines this for functions which it implements
32915     to always fail with ENOSYS.  Some functions are actually named
32916     something starting with __ and the normal name is an alias.  */
32917 #if defined (__stub_crypt) || defined (__stub___crypt)
32918 choke me
32919 #else
32920 char (*f) () = crypt;
32921 #endif
32922 #ifdef __cplusplus
32923 }
32924 #endif
32925
32926 int
32927 main ()
32928 {
32929 return f != crypt;
32930   ;
32931   return 0;
32932 }
32933 _ACEOF
32934 rm -f conftest.$ac_objext conftest$ac_exeext
32935 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32936   (eval $ac_link) 2>conftest.er1
32937   ac_status=$?
32938   grep -v '^ *+' conftest.er1 >conftest.err
32939   rm -f conftest.er1
32940   cat conftest.err >&5
32941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32942   (exit $ac_status); } &&
32943          { ac_try='test -z "$ac_c_werror_flag"
32944                          || test ! -s conftest.err'
32945   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32946   (eval $ac_try) 2>&5
32947   ac_status=$?
32948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32949   (exit $ac_status); }; } &&
32950          { ac_try='test -s conftest$ac_exeext'
32951   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32952   (eval $ac_try) 2>&5
32953   ac_status=$?
32954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32955   (exit $ac_status); }; }; then
32956   ac_cv_func_crypt=yes
32957 else
32958   echo "$as_me: failed program was:" >&5
32959 sed 's/^/| /' conftest.$ac_ext >&5
32960
32961 ac_cv_func_crypt=no
32962 fi
32963 rm -f conftest.err conftest.$ac_objext \
32964       conftest$ac_exeext conftest.$ac_ext
32965 fi
32966 echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
32967 echo "${ECHO_T}$ac_cv_func_crypt" >&6
32968 if test $ac_cv_func_crypt = yes; then
32969   have_crypt=yes
32970 else
32971
32972                 LIBS="$save_LIBS"
32973                 echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
32974 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
32975 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
32976   echo $ECHO_N "(cached) $ECHO_C" >&6
32977 else
32978   ac_check_lib_save_LIBS=$LIBS
32979 LIBS="-lcrypt  $LIBS"
32980 cat >conftest.$ac_ext <<_ACEOF
32981 /* confdefs.h.  */
32982 _ACEOF
32983 cat confdefs.h >>conftest.$ac_ext
32984 cat >>conftest.$ac_ext <<_ACEOF
32985 /* end confdefs.h.  */
32986
32987 /* Override any gcc2 internal prototype to avoid an error.  */
32988 #ifdef __cplusplus
32989 extern "C"
32990 #endif
32991 /* We use char because int might match the return type of a gcc2
32992    builtin and then its argument prototype would still apply.  */
32993 char crypt ();
32994 int
32995 main ()
32996 {
32997 crypt ();
32998   ;
32999   return 0;
33000 }
33001 _ACEOF
33002 rm -f conftest.$ac_objext conftest$ac_exeext
33003 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33004   (eval $ac_link) 2>conftest.er1
33005   ac_status=$?
33006   grep -v '^ *+' conftest.er1 >conftest.err
33007   rm -f conftest.er1
33008   cat conftest.err >&5
33009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33010   (exit $ac_status); } &&
33011          { ac_try='test -z "$ac_c_werror_flag"
33012                          || test ! -s conftest.err'
33013   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33014   (eval $ac_try) 2>&5
33015   ac_status=$?
33016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33017   (exit $ac_status); }; } &&
33018          { ac_try='test -s conftest$ac_exeext'
33019   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33020   (eval $ac_try) 2>&5
33021   ac_status=$?
33022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33023   (exit $ac_status); }; }; then
33024   ac_cv_lib_crypt_crypt=yes
33025 else
33026   echo "$as_me: failed program was:" >&5
33027 sed 's/^/| /' conftest.$ac_ext >&5
33028
33029 ac_cv_lib_crypt_crypt=no
33030 fi
33031 rm -f conftest.err conftest.$ac_objext \
33032       conftest$ac_exeext conftest.$ac_ext
33033 LIBS=$ac_check_lib_save_LIBS
33034 fi
33035 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
33036 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
33037 if test $ac_cv_lib_crypt_crypt = yes; then
33038   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
33039                         have_crypt=yes
33040 else
33041   have_crypt=no
33042 fi
33043
33044 fi
33045
33046
33047         LIBS="$save_LIBS"
33048
33049         if test $have_crypt = yes ; then
33050
33051 cat >>confdefs.h <<\_ACEOF
33052 #define HAVE_CRYPT 1
33053 _ACEOF
33054
33055         else
33056                 { echo "$as_me:$LINENO: WARNING: could not find crypt" >&5
33057 echo "$as_me: WARNING: could not find crypt" >&2;}
33058                 if test $ol_enable_crypt = yes ; then
33059                         { { echo "$as_me:$LINENO: error: could not find crypt, select appropriate options or disable" >&5
33060 echo "$as_me: error: could not find crypt, select appropriate options or disable" >&2;}
33061    { (exit 1); exit 1; }; }
33062                 fi
33063
33064                 { echo "$as_me:$LINENO: WARNING: disabling crypt support" >&5
33065 echo "$as_me: WARNING: disabling crypt support" >&2;}
33066                 ol_enable_crypt=no
33067         fi
33068 fi
33069
33070 if test $ol_enable_proctitle != no ; then
33071         echo "$as_me:$LINENO: checking for setproctitle" >&5
33072 echo $ECHO_N "checking for setproctitle... $ECHO_C" >&6
33073 if test "${ac_cv_func_setproctitle+set}" = set; then
33074   echo $ECHO_N "(cached) $ECHO_C" >&6
33075 else
33076   cat >conftest.$ac_ext <<_ACEOF
33077 /* confdefs.h.  */
33078 _ACEOF
33079 cat confdefs.h >>conftest.$ac_ext
33080 cat >>conftest.$ac_ext <<_ACEOF
33081 /* end confdefs.h.  */
33082 /* Define setproctitle to an innocuous variant, in case <limits.h> declares setproctitle.
33083    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
33084 #define setproctitle innocuous_setproctitle
33085
33086 /* System header to define __stub macros and hopefully few prototypes,
33087     which can conflict with char setproctitle (); below.
33088     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33089     <limits.h> exists even on freestanding compilers.  */
33090
33091 #ifdef __STDC__
33092 # include <limits.h>
33093 #else
33094 # include <assert.h>
33095 #endif
33096
33097 #undef setproctitle
33098
33099 /* Override any gcc2 internal prototype to avoid an error.  */
33100 #ifdef __cplusplus
33101 extern "C"
33102 {
33103 #endif
33104 /* We use char because int might match the return type of a gcc2
33105    builtin and then its argument prototype would still apply.  */
33106 char setproctitle ();
33107 /* The GNU C library defines this for functions which it implements
33108     to always fail with ENOSYS.  Some functions are actually named
33109     something starting with __ and the normal name is an alias.  */
33110 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
33111 choke me
33112 #else
33113 char (*f) () = setproctitle;
33114 #endif
33115 #ifdef __cplusplus
33116 }
33117 #endif
33118
33119 int
33120 main ()
33121 {
33122 return f != setproctitle;
33123   ;
33124   return 0;
33125 }
33126 _ACEOF
33127 rm -f conftest.$ac_objext conftest$ac_exeext
33128 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33129   (eval $ac_link) 2>conftest.er1
33130   ac_status=$?
33131   grep -v '^ *+' conftest.er1 >conftest.err
33132   rm -f conftest.er1
33133   cat conftest.err >&5
33134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33135   (exit $ac_status); } &&
33136          { ac_try='test -z "$ac_c_werror_flag"
33137                          || test ! -s conftest.err'
33138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33139   (eval $ac_try) 2>&5
33140   ac_status=$?
33141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33142   (exit $ac_status); }; } &&
33143          { ac_try='test -s conftest$ac_exeext'
33144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33145   (eval $ac_try) 2>&5
33146   ac_status=$?
33147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33148   (exit $ac_status); }; }; then
33149   ac_cv_func_setproctitle=yes
33150 else
33151   echo "$as_me: failed program was:" >&5
33152 sed 's/^/| /' conftest.$ac_ext >&5
33153
33154 ac_cv_func_setproctitle=no
33155 fi
33156 rm -f conftest.err conftest.$ac_objext \
33157       conftest$ac_exeext conftest.$ac_ext
33158 fi
33159 echo "$as_me:$LINENO: result: $ac_cv_func_setproctitle" >&5
33160 echo "${ECHO_T}$ac_cv_func_setproctitle" >&6
33161 if test $ac_cv_func_setproctitle = yes; then
33162   have_setproctitle=yes
33163 else
33164
33165                 echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
33166 echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
33167 if test "${ac_cv_lib_util_setproctitle+set}" = set; then
33168   echo $ECHO_N "(cached) $ECHO_C" >&6
33169 else
33170   ac_check_lib_save_LIBS=$LIBS
33171 LIBS="-lutil  $LIBS"
33172 cat >conftest.$ac_ext <<_ACEOF
33173 /* confdefs.h.  */
33174 _ACEOF
33175 cat confdefs.h >>conftest.$ac_ext
33176 cat >>conftest.$ac_ext <<_ACEOF
33177 /* end confdefs.h.  */
33178
33179 /* Override any gcc2 internal prototype to avoid an error.  */
33180 #ifdef __cplusplus
33181 extern "C"
33182 #endif
33183 /* We use char because int might match the return type of a gcc2
33184    builtin and then its argument prototype would still apply.  */
33185 char setproctitle ();
33186 int
33187 main ()
33188 {
33189 setproctitle ();
33190   ;
33191   return 0;
33192 }
33193 _ACEOF
33194 rm -f conftest.$ac_objext conftest$ac_exeext
33195 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33196   (eval $ac_link) 2>conftest.er1
33197   ac_status=$?
33198   grep -v '^ *+' conftest.er1 >conftest.err
33199   rm -f conftest.er1
33200   cat conftest.err >&5
33201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33202   (exit $ac_status); } &&
33203          { ac_try='test -z "$ac_c_werror_flag"
33204                          || test ! -s conftest.err'
33205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33206   (eval $ac_try) 2>&5
33207   ac_status=$?
33208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33209   (exit $ac_status); }; } &&
33210          { ac_try='test -s conftest$ac_exeext'
33211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33212   (eval $ac_try) 2>&5
33213   ac_status=$?
33214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33215   (exit $ac_status); }; }; then
33216   ac_cv_lib_util_setproctitle=yes
33217 else
33218   echo "$as_me: failed program was:" >&5
33219 sed 's/^/| /' conftest.$ac_ext >&5
33220
33221 ac_cv_lib_util_setproctitle=no
33222 fi
33223 rm -f conftest.err conftest.$ac_objext \
33224       conftest$ac_exeext conftest.$ac_ext
33225 LIBS=$ac_check_lib_save_LIBS
33226 fi
33227 echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
33228 echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
33229 if test $ac_cv_lib_util_setproctitle = yes; then
33230   have_setproctitle=yes
33231                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
33232 else
33233   have_setproctitle=no
33234                         case $LIBOBJS in
33235     "setproctitle.$ac_objext"   | \
33236   *" setproctitle.$ac_objext"   | \
33237     "setproctitle.$ac_objext "* | \
33238   *" setproctitle.$ac_objext "* ) ;;
33239   *) LIBOBJS="$LIBOBJS setproctitle.$ac_objext" ;;
33240 esac
33241
33242                         LIBSRCS="$LIBSRCS setproctitle.c"
33243 fi
33244
33245 fi
33246
33247
33248         if test $have_setproctitle = yes ; then
33249
33250 cat >>confdefs.h <<\_ACEOF
33251 #define HAVE_SETPROCTITLE 1
33252 _ACEOF
33253
33254         fi
33255 fi
33256
33257 if test $ol_enable_slp != no ; then
33258
33259 for ac_header in slp.h
33260 do
33261 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
33262 if eval "test \"\${$as_ac_Header+set}\" = set"; then
33263   echo "$as_me:$LINENO: checking for $ac_header" >&5
33264 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
33265 if eval "test \"\${$as_ac_Header+set}\" = set"; then
33266   echo $ECHO_N "(cached) $ECHO_C" >&6
33267 fi
33268 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
33269 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
33270 else
33271   # Is the header compilable?
33272 echo "$as_me:$LINENO: checking $ac_header usability" >&5
33273 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
33274 cat >conftest.$ac_ext <<_ACEOF
33275 /* confdefs.h.  */
33276 _ACEOF
33277 cat confdefs.h >>conftest.$ac_ext
33278 cat >>conftest.$ac_ext <<_ACEOF
33279 /* end confdefs.h.  */
33280 $ac_includes_default
33281 #include <$ac_header>
33282 _ACEOF
33283 rm -f conftest.$ac_objext
33284 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33285   (eval $ac_compile) 2>conftest.er1
33286   ac_status=$?
33287   grep -v '^ *+' conftest.er1 >conftest.err
33288   rm -f conftest.er1
33289   cat conftest.err >&5
33290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33291   (exit $ac_status); } &&
33292          { ac_try='test -z "$ac_c_werror_flag"
33293                          || test ! -s conftest.err'
33294   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33295   (eval $ac_try) 2>&5
33296   ac_status=$?
33297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33298   (exit $ac_status); }; } &&
33299          { ac_try='test -s conftest.$ac_objext'
33300   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33301   (eval $ac_try) 2>&5
33302   ac_status=$?
33303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33304   (exit $ac_status); }; }; then
33305   ac_header_compiler=yes
33306 else
33307   echo "$as_me: failed program was:" >&5
33308 sed 's/^/| /' conftest.$ac_ext >&5
33309
33310 ac_header_compiler=no
33311 fi
33312 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
33313 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
33314 echo "${ECHO_T}$ac_header_compiler" >&6
33315
33316 # Is the header present?
33317 echo "$as_me:$LINENO: checking $ac_header presence" >&5
33318 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
33319 cat >conftest.$ac_ext <<_ACEOF
33320 /* confdefs.h.  */
33321 _ACEOF
33322 cat confdefs.h >>conftest.$ac_ext
33323 cat >>conftest.$ac_ext <<_ACEOF
33324 /* end confdefs.h.  */
33325 #include <$ac_header>
33326 _ACEOF
33327 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
33328   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
33329   ac_status=$?
33330   grep -v '^ *+' conftest.er1 >conftest.err
33331   rm -f conftest.er1
33332   cat conftest.err >&5
33333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33334   (exit $ac_status); } >/dev/null; then
33335   if test -s conftest.err; then
33336     ac_cpp_err=$ac_c_preproc_warn_flag
33337     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
33338   else
33339     ac_cpp_err=
33340   fi
33341 else
33342   ac_cpp_err=yes
33343 fi
33344 if test -z "$ac_cpp_err"; then
33345   ac_header_preproc=yes
33346 else
33347   echo "$as_me: failed program was:" >&5
33348 sed 's/^/| /' conftest.$ac_ext >&5
33349
33350   ac_header_preproc=no
33351 fi
33352 rm -f conftest.err conftest.$ac_ext
33353 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
33354 echo "${ECHO_T}$ac_header_preproc" >&6
33355
33356 # So?  What about this header?
33357 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
33358   yes:no: )
33359     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
33360 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
33361     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
33362 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
33363     ac_header_preproc=yes
33364     ;;
33365   no:yes:* )
33366     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
33367 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
33368     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
33369 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
33370     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
33371 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
33372     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
33373 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
33374     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
33375 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
33376     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
33377 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
33378     (
33379       cat <<\_ASBOX
33380 ## --------------------------------------------- ##
33381 ## Report this to <http://www.openldap.org/its/> ##
33382 ## --------------------------------------------- ##
33383 _ASBOX
33384     ) |
33385       sed "s/^/$as_me: WARNING:     /" >&2
33386     ;;
33387 esac
33388 echo "$as_me:$LINENO: checking for $ac_header" >&5
33389 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
33390 if eval "test \"\${$as_ac_Header+set}\" = set"; then
33391   echo $ECHO_N "(cached) $ECHO_C" >&6
33392 else
33393   eval "$as_ac_Header=\$ac_header_preproc"
33394 fi
33395 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
33396 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
33397
33398 fi
33399 if test `eval echo '${'$as_ac_Header'}'` = yes; then
33400   cat >>confdefs.h <<_ACEOF
33401 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
33402 _ACEOF
33403
33404 fi
33405
33406 done
33407
33408
33409         if test $ac_cv_header_slp_h = yes ; then
33410                 echo "$as_me:$LINENO: checking for SLPOpen in -lslp" >&5
33411 echo $ECHO_N "checking for SLPOpen in -lslp... $ECHO_C" >&6
33412 if test "${ac_cv_lib_slp_SLPOpen+set}" = set; then
33413   echo $ECHO_N "(cached) $ECHO_C" >&6
33414 else
33415   ac_check_lib_save_LIBS=$LIBS
33416 LIBS="-lslp  $LIBS"
33417 cat >conftest.$ac_ext <<_ACEOF
33418 /* confdefs.h.  */
33419 _ACEOF
33420 cat confdefs.h >>conftest.$ac_ext
33421 cat >>conftest.$ac_ext <<_ACEOF
33422 /* end confdefs.h.  */
33423
33424 /* Override any gcc2 internal prototype to avoid an error.  */
33425 #ifdef __cplusplus
33426 extern "C"
33427 #endif
33428 /* We use char because int might match the return type of a gcc2
33429    builtin and then its argument prototype would still apply.  */
33430 char SLPOpen ();
33431 int
33432 main ()
33433 {
33434 SLPOpen ();
33435   ;
33436   return 0;
33437 }
33438 _ACEOF
33439 rm -f conftest.$ac_objext conftest$ac_exeext
33440 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33441   (eval $ac_link) 2>conftest.er1
33442   ac_status=$?
33443   grep -v '^ *+' conftest.er1 >conftest.err
33444   rm -f conftest.er1
33445   cat conftest.err >&5
33446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33447   (exit $ac_status); } &&
33448          { ac_try='test -z "$ac_c_werror_flag"
33449                          || test ! -s conftest.err'
33450   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33451   (eval $ac_try) 2>&5
33452   ac_status=$?
33453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33454   (exit $ac_status); }; } &&
33455          { ac_try='test -s conftest$ac_exeext'
33456   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33457   (eval $ac_try) 2>&5
33458   ac_status=$?
33459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33460   (exit $ac_status); }; }; then
33461   ac_cv_lib_slp_SLPOpen=yes
33462 else
33463   echo "$as_me: failed program was:" >&5
33464 sed 's/^/| /' conftest.$ac_ext >&5
33465
33466 ac_cv_lib_slp_SLPOpen=no
33467 fi
33468 rm -f conftest.err conftest.$ac_objext \
33469       conftest$ac_exeext conftest.$ac_ext
33470 LIBS=$ac_check_lib_save_LIBS
33471 fi
33472 echo "$as_me:$LINENO: result: $ac_cv_lib_slp_SLPOpen" >&5
33473 echo "${ECHO_T}$ac_cv_lib_slp_SLPOpen" >&6
33474 if test $ac_cv_lib_slp_SLPOpen = yes; then
33475   have_slp=yes
33476 else
33477   have_slp=no
33478 fi
33479
33480                 if test $have_slp = yes ; then
33481
33482 cat >>confdefs.h <<\_ACEOF
33483 #define HAVE_SLP 1
33484 _ACEOF
33485
33486                         SLAPD_SLP_LIBS=-lslp
33487                 fi
33488
33489         elif test $ol_enable_slp = yes ; then
33490                 { { echo "$as_me:$LINENO: error: SLP not found" >&5
33491 echo "$as_me: error: SLP not found" >&2;}
33492    { (exit 1); exit 1; }; }
33493         fi
33494 fi
33495
33496
33497 echo "$as_me:$LINENO: checking for mode_t" >&5
33498 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
33499 if test "${ac_cv_type_mode_t+set}" = set; then
33500   echo $ECHO_N "(cached) $ECHO_C" >&6
33501 else
33502   cat >conftest.$ac_ext <<_ACEOF
33503 /* confdefs.h.  */
33504 _ACEOF
33505 cat confdefs.h >>conftest.$ac_ext
33506 cat >>conftest.$ac_ext <<_ACEOF
33507 /* end confdefs.h.  */
33508 $ac_includes_default
33509 int
33510 main ()
33511 {
33512 if ((mode_t *) 0)
33513   return 0;
33514 if (sizeof (mode_t))
33515   return 0;
33516   ;
33517   return 0;
33518 }
33519 _ACEOF
33520 rm -f conftest.$ac_objext
33521 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33522   (eval $ac_compile) 2>conftest.er1
33523   ac_status=$?
33524   grep -v '^ *+' conftest.er1 >conftest.err
33525   rm -f conftest.er1
33526   cat conftest.err >&5
33527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33528   (exit $ac_status); } &&
33529          { ac_try='test -z "$ac_c_werror_flag"
33530                          || test ! -s conftest.err'
33531   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33532   (eval $ac_try) 2>&5
33533   ac_status=$?
33534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33535   (exit $ac_status); }; } &&
33536          { ac_try='test -s conftest.$ac_objext'
33537   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33538   (eval $ac_try) 2>&5
33539   ac_status=$?
33540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33541   (exit $ac_status); }; }; then
33542   ac_cv_type_mode_t=yes
33543 else
33544   echo "$as_me: failed program was:" >&5
33545 sed 's/^/| /' conftest.$ac_ext >&5
33546
33547 ac_cv_type_mode_t=no
33548 fi
33549 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
33550 fi
33551 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
33552 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
33553 if test $ac_cv_type_mode_t = yes; then
33554   :
33555 else
33556
33557 cat >>confdefs.h <<_ACEOF
33558 #define mode_t int
33559 _ACEOF
33560
33561 fi
33562
33563 echo "$as_me:$LINENO: checking for off_t" >&5
33564 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
33565 if test "${ac_cv_type_off_t+set}" = set; then
33566   echo $ECHO_N "(cached) $ECHO_C" >&6
33567 else
33568   cat >conftest.$ac_ext <<_ACEOF
33569 /* confdefs.h.  */
33570 _ACEOF
33571 cat confdefs.h >>conftest.$ac_ext
33572 cat >>conftest.$ac_ext <<_ACEOF
33573 /* end confdefs.h.  */
33574 $ac_includes_default
33575 int
33576 main ()
33577 {
33578 if ((off_t *) 0)
33579   return 0;
33580 if (sizeof (off_t))
33581   return 0;
33582   ;
33583   return 0;
33584 }
33585 _ACEOF
33586 rm -f conftest.$ac_objext
33587 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33588   (eval $ac_compile) 2>conftest.er1
33589   ac_status=$?
33590   grep -v '^ *+' conftest.er1 >conftest.err
33591   rm -f conftest.er1
33592   cat conftest.err >&5
33593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33594   (exit $ac_status); } &&
33595          { ac_try='test -z "$ac_c_werror_flag"
33596                          || test ! -s conftest.err'
33597   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33598   (eval $ac_try) 2>&5
33599   ac_status=$?
33600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33601   (exit $ac_status); }; } &&
33602          { ac_try='test -s conftest.$ac_objext'
33603   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33604   (eval $ac_try) 2>&5
33605   ac_status=$?
33606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33607   (exit $ac_status); }; }; then
33608   ac_cv_type_off_t=yes
33609 else
33610   echo "$as_me: failed program was:" >&5
33611 sed 's/^/| /' conftest.$ac_ext >&5
33612
33613 ac_cv_type_off_t=no
33614 fi
33615 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
33616 fi
33617 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
33618 echo "${ECHO_T}$ac_cv_type_off_t" >&6
33619 if test $ac_cv_type_off_t = yes; then
33620   :
33621 else
33622
33623 cat >>confdefs.h <<_ACEOF
33624 #define off_t long
33625 _ACEOF
33626
33627 fi
33628
33629 echo "$as_me:$LINENO: checking for pid_t" >&5
33630 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
33631 if test "${ac_cv_type_pid_t+set}" = set; then
33632   echo $ECHO_N "(cached) $ECHO_C" >&6
33633 else
33634   cat >conftest.$ac_ext <<_ACEOF
33635 /* confdefs.h.  */
33636 _ACEOF
33637 cat confdefs.h >>conftest.$ac_ext
33638 cat >>conftest.$ac_ext <<_ACEOF
33639 /* end confdefs.h.  */
33640 $ac_includes_default
33641 int
33642 main ()
33643 {
33644 if ((pid_t *) 0)
33645   return 0;
33646 if (sizeof (pid_t))
33647   return 0;
33648   ;
33649   return 0;
33650 }
33651 _ACEOF
33652 rm -f conftest.$ac_objext
33653 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33654   (eval $ac_compile) 2>conftest.er1
33655   ac_status=$?
33656   grep -v '^ *+' conftest.er1 >conftest.err
33657   rm -f conftest.er1
33658   cat conftest.err >&5
33659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33660   (exit $ac_status); } &&
33661          { ac_try='test -z "$ac_c_werror_flag"
33662                          || test ! -s conftest.err'
33663   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33664   (eval $ac_try) 2>&5
33665   ac_status=$?
33666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33667   (exit $ac_status); }; } &&
33668          { ac_try='test -s conftest.$ac_objext'
33669   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33670   (eval $ac_try) 2>&5
33671   ac_status=$?
33672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33673   (exit $ac_status); }; }; then
33674   ac_cv_type_pid_t=yes
33675 else
33676   echo "$as_me: failed program was:" >&5
33677 sed 's/^/| /' conftest.$ac_ext >&5
33678
33679 ac_cv_type_pid_t=no
33680 fi
33681 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
33682 fi
33683 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
33684 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
33685 if test $ac_cv_type_pid_t = yes; then
33686   :
33687 else
33688
33689 cat >>confdefs.h <<_ACEOF
33690 #define pid_t int
33691 _ACEOF
33692
33693 fi
33694
33695 echo "$as_me:$LINENO: checking for ssize_t" >&5
33696 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
33697 if test "${ac_cv_type_ssize_t+set}" = set; then
33698   echo $ECHO_N "(cached) $ECHO_C" >&6
33699 else
33700   cat >conftest.$ac_ext <<_ACEOF
33701 /* confdefs.h.  */
33702 _ACEOF
33703 cat confdefs.h >>conftest.$ac_ext
33704 cat >>conftest.$ac_ext <<_ACEOF
33705 /* end confdefs.h.  */
33706 $ac_includes_default
33707 int
33708 main ()
33709 {
33710 if ((ssize_t *) 0)
33711   return 0;
33712 if (sizeof (ssize_t))
33713   return 0;
33714   ;
33715   return 0;
33716 }
33717 _ACEOF
33718 rm -f conftest.$ac_objext
33719 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33720   (eval $ac_compile) 2>conftest.er1
33721   ac_status=$?
33722   grep -v '^ *+' conftest.er1 >conftest.err
33723   rm -f conftest.er1
33724   cat conftest.err >&5
33725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33726   (exit $ac_status); } &&
33727          { ac_try='test -z "$ac_c_werror_flag"
33728                          || test ! -s conftest.err'
33729   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33730   (eval $ac_try) 2>&5
33731   ac_status=$?
33732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33733   (exit $ac_status); }; } &&
33734          { ac_try='test -s conftest.$ac_objext'
33735   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33736   (eval $ac_try) 2>&5
33737   ac_status=$?
33738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33739   (exit $ac_status); }; }; then
33740   ac_cv_type_ssize_t=yes
33741 else
33742   echo "$as_me: failed program was:" >&5
33743 sed 's/^/| /' conftest.$ac_ext >&5
33744
33745 ac_cv_type_ssize_t=no
33746 fi
33747 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
33748 fi
33749 echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
33750 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
33751 if test $ac_cv_type_ssize_t = yes; then
33752   :
33753 else
33754
33755 cat >>confdefs.h <<_ACEOF
33756 #define ssize_t signed int
33757 _ACEOF
33758
33759 fi
33760
33761 echo "$as_me:$LINENO: checking for caddr_t" >&5
33762 echo $ECHO_N "checking for caddr_t... $ECHO_C" >&6
33763 if test "${ac_cv_type_caddr_t+set}" = set; then
33764   echo $ECHO_N "(cached) $ECHO_C" >&6
33765 else
33766   cat >conftest.$ac_ext <<_ACEOF
33767 /* confdefs.h.  */
33768 _ACEOF
33769 cat confdefs.h >>conftest.$ac_ext
33770 cat >>conftest.$ac_ext <<_ACEOF
33771 /* end confdefs.h.  */
33772 $ac_includes_default
33773 int
33774 main ()
33775 {
33776 if ((caddr_t *) 0)
33777   return 0;
33778 if (sizeof (caddr_t))
33779   return 0;
33780   ;
33781   return 0;
33782 }
33783 _ACEOF
33784 rm -f conftest.$ac_objext
33785 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33786   (eval $ac_compile) 2>conftest.er1
33787   ac_status=$?
33788   grep -v '^ *+' conftest.er1 >conftest.err
33789   rm -f conftest.er1
33790   cat conftest.err >&5
33791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33792   (exit $ac_status); } &&
33793          { ac_try='test -z "$ac_c_werror_flag"
33794                          || test ! -s conftest.err'
33795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33796   (eval $ac_try) 2>&5
33797   ac_status=$?
33798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33799   (exit $ac_status); }; } &&
33800          { ac_try='test -s conftest.$ac_objext'
33801   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33802   (eval $ac_try) 2>&5
33803   ac_status=$?
33804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33805   (exit $ac_status); }; }; then
33806   ac_cv_type_caddr_t=yes
33807 else
33808   echo "$as_me: failed program was:" >&5
33809 sed 's/^/| /' conftest.$ac_ext >&5
33810
33811 ac_cv_type_caddr_t=no
33812 fi
33813 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
33814 fi
33815 echo "$as_me:$LINENO: result: $ac_cv_type_caddr_t" >&5
33816 echo "${ECHO_T}$ac_cv_type_caddr_t" >&6
33817 if test $ac_cv_type_caddr_t = yes; then
33818   :
33819 else
33820
33821 cat >>confdefs.h <<_ACEOF
33822 #define caddr_t char *
33823 _ACEOF
33824
33825 fi
33826
33827 echo "$as_me:$LINENO: checking for size_t" >&5
33828 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
33829 if test "${ac_cv_type_size_t+set}" = set; then
33830   echo $ECHO_N "(cached) $ECHO_C" >&6
33831 else
33832   cat >conftest.$ac_ext <<_ACEOF
33833 /* confdefs.h.  */
33834 _ACEOF
33835 cat confdefs.h >>conftest.$ac_ext
33836 cat >>conftest.$ac_ext <<_ACEOF
33837 /* end confdefs.h.  */
33838 $ac_includes_default
33839 int
33840 main ()
33841 {
33842 if ((size_t *) 0)
33843   return 0;
33844 if (sizeof (size_t))
33845   return 0;
33846   ;
33847   return 0;
33848 }
33849 _ACEOF
33850 rm -f conftest.$ac_objext
33851 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33852   (eval $ac_compile) 2>conftest.er1
33853   ac_status=$?
33854   grep -v '^ *+' conftest.er1 >conftest.err
33855   rm -f conftest.er1
33856   cat conftest.err >&5
33857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33858   (exit $ac_status); } &&
33859          { ac_try='test -z "$ac_c_werror_flag"
33860                          || test ! -s conftest.err'
33861   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33862   (eval $ac_try) 2>&5
33863   ac_status=$?
33864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33865   (exit $ac_status); }; } &&
33866          { ac_try='test -s conftest.$ac_objext'
33867   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33868   (eval $ac_try) 2>&5
33869   ac_status=$?
33870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33871   (exit $ac_status); }; }; then
33872   ac_cv_type_size_t=yes
33873 else
33874   echo "$as_me: failed program was:" >&5
33875 sed 's/^/| /' conftest.$ac_ext >&5
33876
33877 ac_cv_type_size_t=no
33878 fi
33879 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
33880 fi
33881 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
33882 echo "${ECHO_T}$ac_cv_type_size_t" >&6
33883 if test $ac_cv_type_size_t = yes; then
33884   :
33885 else
33886
33887 cat >>confdefs.h <<_ACEOF
33888 #define size_t unsigned
33889 _ACEOF
33890
33891 fi
33892
33893
33894 echo "$as_me:$LINENO: checking for long long" >&5
33895 echo $ECHO_N "checking for long long... $ECHO_C" >&6
33896 if test "${ac_cv_type_long_long+set}" = set; then
33897   echo $ECHO_N "(cached) $ECHO_C" >&6
33898 else
33899   cat >conftest.$ac_ext <<_ACEOF
33900 /* confdefs.h.  */
33901 _ACEOF
33902 cat confdefs.h >>conftest.$ac_ext
33903 cat >>conftest.$ac_ext <<_ACEOF
33904 /* end confdefs.h.  */
33905 $ac_includes_default
33906 int
33907 main ()
33908 {
33909 if ((long long *) 0)
33910   return 0;
33911 if (sizeof (long long))
33912   return 0;
33913   ;
33914   return 0;
33915 }
33916 _ACEOF
33917 rm -f conftest.$ac_objext
33918 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33919   (eval $ac_compile) 2>conftest.er1
33920   ac_status=$?
33921   grep -v '^ *+' conftest.er1 >conftest.err
33922   rm -f conftest.er1
33923   cat conftest.err >&5
33924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33925   (exit $ac_status); } &&
33926          { ac_try='test -z "$ac_c_werror_flag"
33927                          || test ! -s conftest.err'
33928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33929   (eval $ac_try) 2>&5
33930   ac_status=$?
33931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33932   (exit $ac_status); }; } &&
33933          { ac_try='test -s conftest.$ac_objext'
33934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33935   (eval $ac_try) 2>&5
33936   ac_status=$?
33937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33938   (exit $ac_status); }; }; then
33939   ac_cv_type_long_long=yes
33940 else
33941   echo "$as_me: failed program was:" >&5
33942 sed 's/^/| /' conftest.$ac_ext >&5
33943
33944 ac_cv_type_long_long=no
33945 fi
33946 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
33947 fi
33948 echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
33949 echo "${ECHO_T}$ac_cv_type_long_long" >&6
33950 if test $ac_cv_type_long_long = yes; then
33951
33952 cat >>confdefs.h <<_ACEOF
33953 #define HAVE_LONG_LONG 1
33954 _ACEOF
33955
33956
33957 fi
33958
33959 echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
33960 echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
33961 if test "${ac_cv_type_ptrdiff_t+set}" = set; then
33962   echo $ECHO_N "(cached) $ECHO_C" >&6
33963 else
33964   cat >conftest.$ac_ext <<_ACEOF
33965 /* confdefs.h.  */
33966 _ACEOF
33967 cat confdefs.h >>conftest.$ac_ext
33968 cat >>conftest.$ac_ext <<_ACEOF
33969 /* end confdefs.h.  */
33970 $ac_includes_default
33971 int
33972 main ()
33973 {
33974 if ((ptrdiff_t *) 0)
33975   return 0;
33976 if (sizeof (ptrdiff_t))
33977   return 0;
33978   ;
33979   return 0;
33980 }
33981 _ACEOF
33982 rm -f conftest.$ac_objext
33983 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33984   (eval $ac_compile) 2>conftest.er1
33985   ac_status=$?
33986   grep -v '^ *+' conftest.er1 >conftest.err
33987   rm -f conftest.er1
33988   cat conftest.err >&5
33989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33990   (exit $ac_status); } &&
33991          { ac_try='test -z "$ac_c_werror_flag"
33992                          || test ! -s conftest.err'
33993   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33994   (eval $ac_try) 2>&5
33995   ac_status=$?
33996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33997   (exit $ac_status); }; } &&
33998          { ac_try='test -s conftest.$ac_objext'
33999   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34000   (eval $ac_try) 2>&5
34001   ac_status=$?
34002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34003   (exit $ac_status); }; }; then
34004   ac_cv_type_ptrdiff_t=yes
34005 else
34006   echo "$as_me: failed program was:" >&5
34007 sed 's/^/| /' conftest.$ac_ext >&5
34008
34009 ac_cv_type_ptrdiff_t=no
34010 fi
34011 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34012 fi
34013 echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
34014 echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6
34015 if test $ac_cv_type_ptrdiff_t = yes; then
34016
34017 cat >>confdefs.h <<_ACEOF
34018 #define HAVE_PTRDIFF_T 1
34019 _ACEOF
34020
34021
34022 fi
34023
34024
34025 echo "$as_me:$LINENO: checking for socklen_t" >&5
34026 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
34027 if test "${ac_cv_type_socklen_t+set}" = set; then
34028   echo $ECHO_N "(cached) $ECHO_C" >&6
34029 else
34030   cat >conftest.$ac_ext <<_ACEOF
34031 /* confdefs.h.  */
34032 _ACEOF
34033 cat confdefs.h >>conftest.$ac_ext
34034 cat >>conftest.$ac_ext <<_ACEOF
34035 /* end confdefs.h.  */
34036 $ac_includes_default
34037 #ifdef HAVE_SYS_SOCKET_H
34038 #include <sys/socket.h>
34039 #endif
34040
34041
34042 int
34043 main ()
34044 {
34045 if ((socklen_t *) 0)
34046   return 0;
34047 if (sizeof (socklen_t))
34048   return 0;
34049   ;
34050   return 0;
34051 }
34052 _ACEOF
34053 rm -f conftest.$ac_objext
34054 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34055   (eval $ac_compile) 2>conftest.er1
34056   ac_status=$?
34057   grep -v '^ *+' conftest.er1 >conftest.err
34058   rm -f conftest.er1
34059   cat conftest.err >&5
34060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34061   (exit $ac_status); } &&
34062          { ac_try='test -z "$ac_c_werror_flag"
34063                          || test ! -s conftest.err'
34064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34065   (eval $ac_try) 2>&5
34066   ac_status=$?
34067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34068   (exit $ac_status); }; } &&
34069          { ac_try='test -s conftest.$ac_objext'
34070   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34071   (eval $ac_try) 2>&5
34072   ac_status=$?
34073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34074   (exit $ac_status); }; }; then
34075   ac_cv_type_socklen_t=yes
34076 else
34077   echo "$as_me: failed program was:" >&5
34078 sed 's/^/| /' conftest.$ac_ext >&5
34079
34080 ac_cv_type_socklen_t=no
34081 fi
34082 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34083 fi
34084 echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
34085 echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
34086 if test $ac_cv_type_socklen_t = yes; then
34087   :
34088 else
34089
34090 cat >>confdefs.h <<_ACEOF
34091 #define socklen_t int
34092 _ACEOF
34093
34094 fi
34095
34096
34097 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
34098 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
34099 if test "${ac_cv_type_signal+set}" = set; then
34100   echo $ECHO_N "(cached) $ECHO_C" >&6
34101 else
34102   cat >conftest.$ac_ext <<_ACEOF
34103 /* confdefs.h.  */
34104 _ACEOF
34105 cat confdefs.h >>conftest.$ac_ext
34106 cat >>conftest.$ac_ext <<_ACEOF
34107 /* end confdefs.h.  */
34108 #include <sys/types.h>
34109 #include <signal.h>
34110 #ifdef signal
34111 # undef signal
34112 #endif
34113 #ifdef __cplusplus
34114 extern "C" void (*signal (int, void (*)(int)))(int);
34115 #else
34116 void (*signal ()) ();
34117 #endif
34118
34119 int
34120 main ()
34121 {
34122 int i;
34123   ;
34124   return 0;
34125 }
34126 _ACEOF
34127 rm -f conftest.$ac_objext
34128 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34129   (eval $ac_compile) 2>conftest.er1
34130   ac_status=$?
34131   grep -v '^ *+' conftest.er1 >conftest.err
34132   rm -f conftest.er1
34133   cat conftest.err >&5
34134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34135   (exit $ac_status); } &&
34136          { ac_try='test -z "$ac_c_werror_flag"
34137                          || test ! -s conftest.err'
34138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34139   (eval $ac_try) 2>&5
34140   ac_status=$?
34141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34142   (exit $ac_status); }; } &&
34143          { ac_try='test -s conftest.$ac_objext'
34144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34145   (eval $ac_try) 2>&5
34146   ac_status=$?
34147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34148   (exit $ac_status); }; }; then
34149   ac_cv_type_signal=void
34150 else
34151   echo "$as_me: failed program was:" >&5
34152 sed 's/^/| /' conftest.$ac_ext >&5
34153
34154 ac_cv_type_signal=int
34155 fi
34156 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34157 fi
34158 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
34159 echo "${ECHO_T}$ac_cv_type_signal" >&6
34160
34161 cat >>confdefs.h <<_ACEOF
34162 #define RETSIGTYPE $ac_cv_type_signal
34163 _ACEOF
34164
34165
34166
34167 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
34168 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
34169 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
34170   echo $ECHO_N "(cached) $ECHO_C" >&6
34171 else
34172   cat >conftest.$ac_ext <<_ACEOF
34173 /* confdefs.h.  */
34174 _ACEOF
34175 cat confdefs.h >>conftest.$ac_ext
34176 cat >>conftest.$ac_ext <<_ACEOF
34177 /* end confdefs.h.  */
34178 $ac_includes_default
34179 #include <signal.h>
34180
34181
34182 int
34183 main ()
34184 {
34185 if ((sig_atomic_t *) 0)
34186   return 0;
34187 if (sizeof (sig_atomic_t))
34188   return 0;
34189   ;
34190   return 0;
34191 }
34192 _ACEOF
34193 rm -f conftest.$ac_objext
34194 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34195   (eval $ac_compile) 2>conftest.er1
34196   ac_status=$?
34197   grep -v '^ *+' conftest.er1 >conftest.err
34198   rm -f conftest.er1
34199   cat conftest.err >&5
34200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34201   (exit $ac_status); } &&
34202          { ac_try='test -z "$ac_c_werror_flag"
34203                          || test ! -s conftest.err'
34204   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34205   (eval $ac_try) 2>&5
34206   ac_status=$?
34207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34208   (exit $ac_status); }; } &&
34209          { ac_try='test -s conftest.$ac_objext'
34210   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34211   (eval $ac_try) 2>&5
34212   ac_status=$?
34213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34214   (exit $ac_status); }; }; then
34215   ac_cv_type_sig_atomic_t=yes
34216 else
34217   echo "$as_me: failed program was:" >&5
34218 sed 's/^/| /' conftest.$ac_ext >&5
34219
34220 ac_cv_type_sig_atomic_t=no
34221 fi
34222 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34223 fi
34224 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
34225 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
34226 if test $ac_cv_type_sig_atomic_t = yes; then
34227   :
34228 else
34229
34230 cat >>confdefs.h <<_ACEOF
34231 #define sig_atomic_t int
34232 _ACEOF
34233
34234 fi
34235
34236
34237 echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
34238 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
34239 if test "${ac_cv_type_uid_t+set}" = set; then
34240   echo $ECHO_N "(cached) $ECHO_C" >&6
34241 else
34242   cat >conftest.$ac_ext <<_ACEOF
34243 /* confdefs.h.  */
34244 _ACEOF
34245 cat confdefs.h >>conftest.$ac_ext
34246 cat >>conftest.$ac_ext <<_ACEOF
34247 /* end confdefs.h.  */
34248 #include <sys/types.h>
34249
34250 _ACEOF
34251 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34252   $EGREP "uid_t" >/dev/null 2>&1; then
34253   ac_cv_type_uid_t=yes
34254 else
34255   ac_cv_type_uid_t=no
34256 fi
34257 rm -f conftest*
34258
34259 fi
34260 echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
34261 echo "${ECHO_T}$ac_cv_type_uid_t" >&6
34262 if test $ac_cv_type_uid_t = no; then
34263
34264 cat >>confdefs.h <<\_ACEOF
34265 #define uid_t int
34266 _ACEOF
34267
34268
34269 cat >>confdefs.h <<\_ACEOF
34270 #define gid_t int
34271 _ACEOF
34272
34273 fi
34274
34275
34276 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
34277 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
34278 if test "${ac_cv_header_time+set}" = set; then
34279   echo $ECHO_N "(cached) $ECHO_C" >&6
34280 else
34281   cat >conftest.$ac_ext <<_ACEOF
34282 /* confdefs.h.  */
34283 _ACEOF
34284 cat confdefs.h >>conftest.$ac_ext
34285 cat >>conftest.$ac_ext <<_ACEOF
34286 /* end confdefs.h.  */
34287 #include <sys/types.h>
34288 #include <sys/time.h>
34289 #include <time.h>
34290
34291 int
34292 main ()
34293 {
34294 if ((struct tm *) 0)
34295 return 0;
34296   ;
34297   return 0;
34298 }
34299 _ACEOF
34300 rm -f conftest.$ac_objext
34301 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34302   (eval $ac_compile) 2>conftest.er1
34303   ac_status=$?
34304   grep -v '^ *+' conftest.er1 >conftest.err
34305   rm -f conftest.er1
34306   cat conftest.err >&5
34307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34308   (exit $ac_status); } &&
34309          { ac_try='test -z "$ac_c_werror_flag"
34310                          || test ! -s conftest.err'
34311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34312   (eval $ac_try) 2>&5
34313   ac_status=$?
34314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34315   (exit $ac_status); }; } &&
34316          { ac_try='test -s conftest.$ac_objext'
34317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34318   (eval $ac_try) 2>&5
34319   ac_status=$?
34320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34321   (exit $ac_status); }; }; then
34322   ac_cv_header_time=yes
34323 else
34324   echo "$as_me: failed program was:" >&5
34325 sed 's/^/| /' conftest.$ac_ext >&5
34326
34327 ac_cv_header_time=no
34328 fi
34329 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34330 fi
34331 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
34332 echo "${ECHO_T}$ac_cv_header_time" >&6
34333 if test $ac_cv_header_time = yes; then
34334
34335 cat >>confdefs.h <<\_ACEOF
34336 #define TIME_WITH_SYS_TIME 1
34337 _ACEOF
34338
34339 fi
34340
34341 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
34342 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
34343 if test "${ac_cv_struct_tm+set}" = set; then
34344   echo $ECHO_N "(cached) $ECHO_C" >&6
34345 else
34346   cat >conftest.$ac_ext <<_ACEOF
34347 /* confdefs.h.  */
34348 _ACEOF
34349 cat confdefs.h >>conftest.$ac_ext
34350 cat >>conftest.$ac_ext <<_ACEOF
34351 /* end confdefs.h.  */
34352 #include <sys/types.h>
34353 #include <time.h>
34354
34355 int
34356 main ()
34357 {
34358 struct tm *tp; tp->tm_sec;
34359   ;
34360   return 0;
34361 }
34362 _ACEOF
34363 rm -f conftest.$ac_objext
34364 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34365   (eval $ac_compile) 2>conftest.er1
34366   ac_status=$?
34367   grep -v '^ *+' conftest.er1 >conftest.err
34368   rm -f conftest.er1
34369   cat conftest.err >&5
34370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34371   (exit $ac_status); } &&
34372          { ac_try='test -z "$ac_c_werror_flag"
34373                          || test ! -s conftest.err'
34374   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34375   (eval $ac_try) 2>&5
34376   ac_status=$?
34377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34378   (exit $ac_status); }; } &&
34379          { ac_try='test -s conftest.$ac_objext'
34380   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34381   (eval $ac_try) 2>&5
34382   ac_status=$?
34383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34384   (exit $ac_status); }; }; then
34385   ac_cv_struct_tm=time.h
34386 else
34387   echo "$as_me: failed program was:" >&5
34388 sed 's/^/| /' conftest.$ac_ext >&5
34389
34390 ac_cv_struct_tm=sys/time.h
34391 fi
34392 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34393 fi
34394 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
34395 echo "${ECHO_T}$ac_cv_struct_tm" >&6
34396 if test $ac_cv_struct_tm = sys/time.h; then
34397
34398 cat >>confdefs.h <<\_ACEOF
34399 #define TM_IN_SYS_TIME 1
34400 _ACEOF
34401
34402 fi
34403
34404 echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
34405 echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
34406 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
34407   echo $ECHO_N "(cached) $ECHO_C" >&6
34408 else
34409   cat >conftest.$ac_ext <<_ACEOF
34410 /* confdefs.h.  */
34411 _ACEOF
34412 cat confdefs.h >>conftest.$ac_ext
34413 cat >>conftest.$ac_ext <<_ACEOF
34414 /* end confdefs.h.  */
34415 $ac_includes_default
34416 int
34417 main ()
34418 {
34419 static struct stat ac_aggr;
34420 if (ac_aggr.st_blksize)
34421 return 0;
34422   ;
34423   return 0;
34424 }
34425 _ACEOF
34426 rm -f conftest.$ac_objext
34427 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34428   (eval $ac_compile) 2>conftest.er1
34429   ac_status=$?
34430   grep -v '^ *+' conftest.er1 >conftest.err
34431   rm -f conftest.er1
34432   cat conftest.err >&5
34433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34434   (exit $ac_status); } &&
34435          { ac_try='test -z "$ac_c_werror_flag"
34436                          || test ! -s conftest.err'
34437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34438   (eval $ac_try) 2>&5
34439   ac_status=$?
34440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34441   (exit $ac_status); }; } &&
34442          { ac_try='test -s conftest.$ac_objext'
34443   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34444   (eval $ac_try) 2>&5
34445   ac_status=$?
34446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34447   (exit $ac_status); }; }; then
34448   ac_cv_member_struct_stat_st_blksize=yes
34449 else
34450   echo "$as_me: failed program was:" >&5
34451 sed 's/^/| /' conftest.$ac_ext >&5
34452
34453 cat >conftest.$ac_ext <<_ACEOF
34454 /* confdefs.h.  */
34455 _ACEOF
34456 cat confdefs.h >>conftest.$ac_ext
34457 cat >>conftest.$ac_ext <<_ACEOF
34458 /* end confdefs.h.  */
34459 $ac_includes_default
34460 int
34461 main ()
34462 {
34463 static struct stat ac_aggr;
34464 if (sizeof ac_aggr.st_blksize)
34465 return 0;
34466   ;
34467   return 0;
34468 }
34469 _ACEOF
34470 rm -f conftest.$ac_objext
34471 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34472   (eval $ac_compile) 2>conftest.er1
34473   ac_status=$?
34474   grep -v '^ *+' conftest.er1 >conftest.err
34475   rm -f conftest.er1
34476   cat conftest.err >&5
34477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34478   (exit $ac_status); } &&
34479          { ac_try='test -z "$ac_c_werror_flag"
34480                          || test ! -s conftest.err'
34481   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34482   (eval $ac_try) 2>&5
34483   ac_status=$?
34484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34485   (exit $ac_status); }; } &&
34486          { ac_try='test -s conftest.$ac_objext'
34487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34488   (eval $ac_try) 2>&5
34489   ac_status=$?
34490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34491   (exit $ac_status); }; }; then
34492   ac_cv_member_struct_stat_st_blksize=yes
34493 else
34494   echo "$as_me: failed program was:" >&5
34495 sed 's/^/| /' conftest.$ac_ext >&5
34496
34497 ac_cv_member_struct_stat_st_blksize=no
34498 fi
34499 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34500 fi
34501 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34502 fi
34503 echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
34504 echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
34505 if test $ac_cv_member_struct_stat_st_blksize = yes; then
34506
34507 cat >>confdefs.h <<_ACEOF
34508 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
34509 _ACEOF
34510
34511
34512 fi
34513
34514 echo "$as_me:$LINENO: checking for struct passwd.pw_gecos" >&5
34515 echo $ECHO_N "checking for struct passwd.pw_gecos... $ECHO_C" >&6
34516 if test "${ac_cv_member_struct_passwd_pw_gecos+set}" = set; then
34517   echo $ECHO_N "(cached) $ECHO_C" >&6
34518 else
34519   cat >conftest.$ac_ext <<_ACEOF
34520 /* confdefs.h.  */
34521 _ACEOF
34522 cat confdefs.h >>conftest.$ac_ext
34523 cat >>conftest.$ac_ext <<_ACEOF
34524 /* end confdefs.h.  */
34525 $ac_includes_default
34526 #include <pwd.h>
34527
34528 int
34529 main ()
34530 {
34531 static struct passwd ac_aggr;
34532 if (ac_aggr.pw_gecos)
34533 return 0;
34534   ;
34535   return 0;
34536 }
34537 _ACEOF
34538 rm -f conftest.$ac_objext
34539 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34540   (eval $ac_compile) 2>conftest.er1
34541   ac_status=$?
34542   grep -v '^ *+' conftest.er1 >conftest.err
34543   rm -f conftest.er1
34544   cat conftest.err >&5
34545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34546   (exit $ac_status); } &&
34547          { ac_try='test -z "$ac_c_werror_flag"
34548                          || test ! -s conftest.err'
34549   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34550   (eval $ac_try) 2>&5
34551   ac_status=$?
34552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34553   (exit $ac_status); }; } &&
34554          { ac_try='test -s conftest.$ac_objext'
34555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34556   (eval $ac_try) 2>&5
34557   ac_status=$?
34558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34559   (exit $ac_status); }; }; then
34560   ac_cv_member_struct_passwd_pw_gecos=yes
34561 else
34562   echo "$as_me: failed program was:" >&5
34563 sed 's/^/| /' conftest.$ac_ext >&5
34564
34565 cat >conftest.$ac_ext <<_ACEOF
34566 /* confdefs.h.  */
34567 _ACEOF
34568 cat confdefs.h >>conftest.$ac_ext
34569 cat >>conftest.$ac_ext <<_ACEOF
34570 /* end confdefs.h.  */
34571 $ac_includes_default
34572 #include <pwd.h>
34573
34574 int
34575 main ()
34576 {
34577 static struct passwd ac_aggr;
34578 if (sizeof ac_aggr.pw_gecos)
34579 return 0;
34580   ;
34581   return 0;
34582 }
34583 _ACEOF
34584 rm -f conftest.$ac_objext
34585 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34586   (eval $ac_compile) 2>conftest.er1
34587   ac_status=$?
34588   grep -v '^ *+' conftest.er1 >conftest.err
34589   rm -f conftest.er1
34590   cat conftest.err >&5
34591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34592   (exit $ac_status); } &&
34593          { ac_try='test -z "$ac_c_werror_flag"
34594                          || test ! -s conftest.err'
34595   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34596   (eval $ac_try) 2>&5
34597   ac_status=$?
34598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34599   (exit $ac_status); }; } &&
34600          { ac_try='test -s conftest.$ac_objext'
34601   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34602   (eval $ac_try) 2>&5
34603   ac_status=$?
34604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34605   (exit $ac_status); }; }; then
34606   ac_cv_member_struct_passwd_pw_gecos=yes
34607 else
34608   echo "$as_me: failed program was:" >&5
34609 sed 's/^/| /' conftest.$ac_ext >&5
34610
34611 ac_cv_member_struct_passwd_pw_gecos=no
34612 fi
34613 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34614 fi
34615 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34616 fi
34617 echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_gecos" >&5
34618 echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_gecos" >&6
34619 if test $ac_cv_member_struct_passwd_pw_gecos = yes; then
34620
34621 cat >>confdefs.h <<_ACEOF
34622 #define HAVE_STRUCT_PASSWD_PW_GECOS 1
34623 _ACEOF
34624
34625
34626 fi
34627
34628 echo "$as_me:$LINENO: checking for struct passwd.pw_passwd" >&5
34629 echo $ECHO_N "checking for struct passwd.pw_passwd... $ECHO_C" >&6
34630 if test "${ac_cv_member_struct_passwd_pw_passwd+set}" = set; then
34631   echo $ECHO_N "(cached) $ECHO_C" >&6
34632 else
34633   cat >conftest.$ac_ext <<_ACEOF
34634 /* confdefs.h.  */
34635 _ACEOF
34636 cat confdefs.h >>conftest.$ac_ext
34637 cat >>conftest.$ac_ext <<_ACEOF
34638 /* end confdefs.h.  */
34639 $ac_includes_default
34640 #include <pwd.h>
34641
34642 int
34643 main ()
34644 {
34645 static struct passwd ac_aggr;
34646 if (ac_aggr.pw_passwd)
34647 return 0;
34648   ;
34649   return 0;
34650 }
34651 _ACEOF
34652 rm -f conftest.$ac_objext
34653 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34654   (eval $ac_compile) 2>conftest.er1
34655   ac_status=$?
34656   grep -v '^ *+' conftest.er1 >conftest.err
34657   rm -f conftest.er1
34658   cat conftest.err >&5
34659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34660   (exit $ac_status); } &&
34661          { ac_try='test -z "$ac_c_werror_flag"
34662                          || test ! -s conftest.err'
34663   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34664   (eval $ac_try) 2>&5
34665   ac_status=$?
34666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34667   (exit $ac_status); }; } &&
34668          { ac_try='test -s conftest.$ac_objext'
34669   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34670   (eval $ac_try) 2>&5
34671   ac_status=$?
34672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34673   (exit $ac_status); }; }; then
34674   ac_cv_member_struct_passwd_pw_passwd=yes
34675 else
34676   echo "$as_me: failed program was:" >&5
34677 sed 's/^/| /' conftest.$ac_ext >&5
34678
34679 cat >conftest.$ac_ext <<_ACEOF
34680 /* confdefs.h.  */
34681 _ACEOF
34682 cat confdefs.h >>conftest.$ac_ext
34683 cat >>conftest.$ac_ext <<_ACEOF
34684 /* end confdefs.h.  */
34685 $ac_includes_default
34686 #include <pwd.h>
34687
34688 int
34689 main ()
34690 {
34691 static struct passwd ac_aggr;
34692 if (sizeof ac_aggr.pw_passwd)
34693 return 0;
34694   ;
34695   return 0;
34696 }
34697 _ACEOF
34698 rm -f conftest.$ac_objext
34699 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34700   (eval $ac_compile) 2>conftest.er1
34701   ac_status=$?
34702   grep -v '^ *+' conftest.er1 >conftest.err
34703   rm -f conftest.er1
34704   cat conftest.err >&5
34705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34706   (exit $ac_status); } &&
34707          { ac_try='test -z "$ac_c_werror_flag"
34708                          || test ! -s conftest.err'
34709   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34710   (eval $ac_try) 2>&5
34711   ac_status=$?
34712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34713   (exit $ac_status); }; } &&
34714          { ac_try='test -s conftest.$ac_objext'
34715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34716   (eval $ac_try) 2>&5
34717   ac_status=$?
34718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34719   (exit $ac_status); }; }; then
34720   ac_cv_member_struct_passwd_pw_passwd=yes
34721 else
34722   echo "$as_me: failed program was:" >&5
34723 sed 's/^/| /' conftest.$ac_ext >&5
34724
34725 ac_cv_member_struct_passwd_pw_passwd=no
34726 fi
34727 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34728 fi
34729 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34730 fi
34731 echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_passwd" >&5
34732 echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_passwd" >&6
34733 if test $ac_cv_member_struct_passwd_pw_passwd = yes; then
34734
34735 cat >>confdefs.h <<_ACEOF
34736 #define HAVE_STRUCT_PASSWD_PW_PASSWD 1
34737 _ACEOF
34738
34739
34740 fi
34741
34742
34743 echo "$as_me:$LINENO: checking if toupper() requires islower()" >&5
34744 echo $ECHO_N "checking if toupper() requires islower()... $ECHO_C" >&6
34745 if test "${ol_cv_c_upper_lower+set}" = set; then
34746   echo $ECHO_N "(cached) $ECHO_C" >&6
34747 else
34748
34749         if test "$cross_compiling" = yes; then
34750   ol_cv_c_upper_lower=safe
34751 else
34752   cat >conftest.$ac_ext <<_ACEOF
34753 /* confdefs.h.  */
34754 _ACEOF
34755 cat confdefs.h >>conftest.$ac_ext
34756 cat >>conftest.$ac_ext <<_ACEOF
34757 /* end confdefs.h.  */
34758
34759 #include <ctype.h>
34760 main()
34761 {
34762         if ('C' == toupper('C'))
34763                 exit(0);
34764         else
34765                 exit(1);
34766 }
34767 _ACEOF
34768 rm -f conftest$ac_exeext
34769 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34770   (eval $ac_link) 2>&5
34771   ac_status=$?
34772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34773   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
34774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34775   (eval $ac_try) 2>&5
34776   ac_status=$?
34777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34778   (exit $ac_status); }; }; then
34779   ol_cv_c_upper_lower=no
34780 else
34781   echo "$as_me: program exited with status $ac_status" >&5
34782 echo "$as_me: failed program was:" >&5
34783 sed 's/^/| /' conftest.$ac_ext >&5
34784
34785 ( exit $ac_status )
34786 ol_cv_c_upper_lower=yes
34787 fi
34788 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
34789 fi
34790 fi
34791 echo "$as_me:$LINENO: result: $ol_cv_c_upper_lower" >&5
34792 echo "${ECHO_T}$ol_cv_c_upper_lower" >&6
34793 if test $ol_cv_c_upper_lower != no ; then
34794
34795 cat >>confdefs.h <<\_ACEOF
34796 #define C_UPPER_LOWER 1
34797 _ACEOF
34798
34799 fi
34800
34801 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
34802 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
34803 if test "${ac_cv_c_const+set}" = set; then
34804   echo $ECHO_N "(cached) $ECHO_C" >&6
34805 else
34806   cat >conftest.$ac_ext <<_ACEOF
34807 /* confdefs.h.  */
34808 _ACEOF
34809 cat confdefs.h >>conftest.$ac_ext
34810 cat >>conftest.$ac_ext <<_ACEOF
34811 /* end confdefs.h.  */
34812
34813 int
34814 main ()
34815 {
34816 /* FIXME: Include the comments suggested by Paul. */
34817 #ifndef __cplusplus
34818   /* Ultrix mips cc rejects this.  */
34819   typedef int charset[2];
34820   const charset x;
34821   /* SunOS 4.1.1 cc rejects this.  */
34822   char const *const *ccp;
34823   char **p;
34824   /* NEC SVR4.0.2 mips cc rejects this.  */
34825   struct point {int x, y;};
34826   static struct point const zero = {0,0};
34827   /* AIX XL C 1.02.0.0 rejects this.
34828      It does not let you subtract one const X* pointer from another in
34829      an arm of an if-expression whose if-part is not a constant
34830      expression */
34831   const char *g = "string";
34832   ccp = &g + (g ? g-g : 0);
34833   /* HPUX 7.0 cc rejects these. */
34834   ++ccp;
34835   p = (char**) ccp;
34836   ccp = (char const *const *) p;
34837   { /* SCO 3.2v4 cc rejects this.  */
34838     char *t;
34839     char const *s = 0 ? (char *) 0 : (char const *) 0;
34840
34841     *t++ = 0;
34842   }
34843   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
34844     int x[] = {25, 17};
34845     const int *foo = &x[0];
34846     ++foo;
34847   }
34848   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
34849     typedef const int *iptr;
34850     iptr p = 0;
34851     ++p;
34852   }
34853   { /* AIX XL C 1.02.0.0 rejects this saying
34854        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
34855     struct s { int j; const int *ap[3]; };
34856     struct s *b; b->j = 5;
34857   }
34858   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
34859     const int foo = 10;
34860   }
34861 #endif
34862
34863   ;
34864   return 0;
34865 }
34866 _ACEOF
34867 rm -f conftest.$ac_objext
34868 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34869   (eval $ac_compile) 2>conftest.er1
34870   ac_status=$?
34871   grep -v '^ *+' conftest.er1 >conftest.err
34872   rm -f conftest.er1
34873   cat conftest.err >&5
34874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34875   (exit $ac_status); } &&
34876          { ac_try='test -z "$ac_c_werror_flag"
34877                          || test ! -s conftest.err'
34878   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34879   (eval $ac_try) 2>&5
34880   ac_status=$?
34881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34882   (exit $ac_status); }; } &&
34883          { ac_try='test -s conftest.$ac_objext'
34884   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34885   (eval $ac_try) 2>&5
34886   ac_status=$?
34887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34888   (exit $ac_status); }; }; then
34889   ac_cv_c_const=yes
34890 else
34891   echo "$as_me: failed program was:" >&5
34892 sed 's/^/| /' conftest.$ac_ext >&5
34893
34894 ac_cv_c_const=no
34895 fi
34896 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34897 fi
34898 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
34899 echo "${ECHO_T}$ac_cv_c_const" >&6
34900 if test $ac_cv_c_const = no; then
34901
34902 cat >>confdefs.h <<\_ACEOF
34903 #define const
34904 _ACEOF
34905
34906 fi
34907
34908 echo "$as_me:$LINENO: checking if compiler understands volatile" >&5
34909 echo $ECHO_N "checking if compiler understands volatile... $ECHO_C" >&6
34910 if test "${ol_cv_c_volatile+set}" = set; then
34911   echo $ECHO_N "(cached) $ECHO_C" >&6
34912 else
34913   cat >conftest.$ac_ext <<_ACEOF
34914 /* confdefs.h.  */
34915 _ACEOF
34916 cat confdefs.h >>conftest.$ac_ext
34917 cat >>conftest.$ac_ext <<_ACEOF
34918 /* end confdefs.h.  */
34919 int x, y, z;
34920 int
34921 main ()
34922 {
34923 volatile int a; int * volatile b = x ? &y : &z;
34924       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
34925       *b = 0;
34926   ;
34927   return 0;
34928 }
34929 _ACEOF
34930 rm -f conftest.$ac_objext
34931 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34932   (eval $ac_compile) 2>conftest.er1
34933   ac_status=$?
34934   grep -v '^ *+' conftest.er1 >conftest.err
34935   rm -f conftest.er1
34936   cat conftest.err >&5
34937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34938   (exit $ac_status); } &&
34939          { ac_try='test -z "$ac_c_werror_flag"
34940                          || test ! -s conftest.err'
34941   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34942   (eval $ac_try) 2>&5
34943   ac_status=$?
34944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34945   (exit $ac_status); }; } &&
34946          { ac_try='test -s conftest.$ac_objext'
34947   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34948   (eval $ac_try) 2>&5
34949   ac_status=$?
34950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34951   (exit $ac_status); }; }; then
34952   ol_cv_c_volatile=yes
34953 else
34954   echo "$as_me: failed program was:" >&5
34955 sed 's/^/| /' conftest.$ac_ext >&5
34956
34957 ol_cv_c_volatile=no
34958 fi
34959 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34960 fi
34961 echo "$as_me:$LINENO: result: $ol_cv_c_volatile" >&5
34962 echo "${ECHO_T}$ol_cv_c_volatile" >&6
34963   if test $ol_cv_c_volatile = yes; then
34964     :
34965   else
34966
34967 cat >>confdefs.h <<\_ACEOF
34968 #define volatile
34969 _ACEOF
34970
34971   fi
34972
34973
34974 if test $cross_compiling = yes ; then
34975         { echo "$as_me:$LINENO: WARNING: Crossing compiling... all bets are off!" >&5
34976 echo "$as_me: WARNING: Crossing compiling... all bets are off!" >&2;}
34977
34978 cat >>confdefs.h <<\_ACEOF
34979 #define CROSS_COMPILING 1
34980 _ACEOF
34981
34982 else
34983         echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
34984 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
34985 if test "${ac_cv_c_bigendian+set}" = set; then
34986   echo $ECHO_N "(cached) $ECHO_C" >&6
34987 else
34988   # See if sys/param.h defines the BYTE_ORDER macro.
34989 cat >conftest.$ac_ext <<_ACEOF
34990 /* confdefs.h.  */
34991 _ACEOF
34992 cat confdefs.h >>conftest.$ac_ext
34993 cat >>conftest.$ac_ext <<_ACEOF
34994 /* end confdefs.h.  */
34995 #include <sys/types.h>
34996 #include <sys/param.h>
34997
34998 int
34999 main ()
35000 {
35001 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
35002  bogus endian macros
35003 #endif
35004
35005   ;
35006   return 0;
35007 }
35008 _ACEOF
35009 rm -f conftest.$ac_objext
35010 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35011   (eval $ac_compile) 2>conftest.er1
35012   ac_status=$?
35013   grep -v '^ *+' conftest.er1 >conftest.err
35014   rm -f conftest.er1
35015   cat conftest.err >&5
35016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35017   (exit $ac_status); } &&
35018          { ac_try='test -z "$ac_c_werror_flag"
35019                          || test ! -s conftest.err'
35020   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35021   (eval $ac_try) 2>&5
35022   ac_status=$?
35023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35024   (exit $ac_status); }; } &&
35025          { ac_try='test -s conftest.$ac_objext'
35026   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35027   (eval $ac_try) 2>&5
35028   ac_status=$?
35029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35030   (exit $ac_status); }; }; then
35031   # It does; now see whether it defined to BIG_ENDIAN or not.
35032 cat >conftest.$ac_ext <<_ACEOF
35033 /* confdefs.h.  */
35034 _ACEOF
35035 cat confdefs.h >>conftest.$ac_ext
35036 cat >>conftest.$ac_ext <<_ACEOF
35037 /* end confdefs.h.  */
35038 #include <sys/types.h>
35039 #include <sys/param.h>
35040
35041 int
35042 main ()
35043 {
35044 #if BYTE_ORDER != BIG_ENDIAN
35045  not big endian
35046 #endif
35047
35048   ;
35049   return 0;
35050 }
35051 _ACEOF
35052 rm -f conftest.$ac_objext
35053 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35054   (eval $ac_compile) 2>conftest.er1
35055   ac_status=$?
35056   grep -v '^ *+' conftest.er1 >conftest.err
35057   rm -f conftest.er1
35058   cat conftest.err >&5
35059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35060   (exit $ac_status); } &&
35061          { ac_try='test -z "$ac_c_werror_flag"
35062                          || test ! -s conftest.err'
35063   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35064   (eval $ac_try) 2>&5
35065   ac_status=$?
35066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35067   (exit $ac_status); }; } &&
35068          { ac_try='test -s conftest.$ac_objext'
35069   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35070   (eval $ac_try) 2>&5
35071   ac_status=$?
35072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35073   (exit $ac_status); }; }; then
35074   ac_cv_c_bigendian=yes
35075 else
35076   echo "$as_me: failed program was:" >&5
35077 sed 's/^/| /' conftest.$ac_ext >&5
35078
35079 ac_cv_c_bigendian=no
35080 fi
35081 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35082 else
35083   echo "$as_me: failed program was:" >&5
35084 sed 's/^/| /' conftest.$ac_ext >&5
35085
35086 # It does not; compile a test program.
35087 if test "$cross_compiling" = yes; then
35088   # try to guess the endianness by grepping values into an object file
35089   ac_cv_c_bigendian=unknown
35090   cat >conftest.$ac_ext <<_ACEOF
35091 /* confdefs.h.  */
35092 _ACEOF
35093 cat confdefs.h >>conftest.$ac_ext
35094 cat >>conftest.$ac_ext <<_ACEOF
35095 /* end confdefs.h.  */
35096 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
35097 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
35098 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
35099 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
35100 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
35101 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
35102 int
35103 main ()
35104 {
35105  _ascii (); _ebcdic ();
35106   ;
35107   return 0;
35108 }
35109 _ACEOF
35110 rm -f conftest.$ac_objext
35111 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35112   (eval $ac_compile) 2>conftest.er1
35113   ac_status=$?
35114   grep -v '^ *+' conftest.er1 >conftest.err
35115   rm -f conftest.er1
35116   cat conftest.err >&5
35117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35118   (exit $ac_status); } &&
35119          { ac_try='test -z "$ac_c_werror_flag"
35120                          || test ! -s conftest.err'
35121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35122   (eval $ac_try) 2>&5
35123   ac_status=$?
35124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35125   (exit $ac_status); }; } &&
35126          { ac_try='test -s conftest.$ac_objext'
35127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35128   (eval $ac_try) 2>&5
35129   ac_status=$?
35130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35131   (exit $ac_status); }; }; then
35132   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
35133   ac_cv_c_bigendian=yes
35134 fi
35135 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
35136   if test "$ac_cv_c_bigendian" = unknown; then
35137     ac_cv_c_bigendian=no
35138   else
35139     # finding both strings is unlikely to happen, but who knows?
35140     ac_cv_c_bigendian=unknown
35141   fi
35142 fi
35143 else
35144   echo "$as_me: failed program was:" >&5
35145 sed 's/^/| /' conftest.$ac_ext >&5
35146
35147 fi
35148 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35149 else
35150   cat >conftest.$ac_ext <<_ACEOF
35151 /* confdefs.h.  */
35152 _ACEOF
35153 cat confdefs.h >>conftest.$ac_ext
35154 cat >>conftest.$ac_ext <<_ACEOF
35155 /* end confdefs.h.  */
35156 int
35157 main ()
35158 {
35159   /* Are we little or big endian?  From Harbison&Steele.  */
35160   union
35161   {
35162     long l;
35163     char c[sizeof (long)];
35164   } u;
35165   u.l = 1;
35166   exit (u.c[sizeof (long) - 1] == 1);
35167 }
35168 _ACEOF
35169 rm -f conftest$ac_exeext
35170 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35171   (eval $ac_link) 2>&5
35172   ac_status=$?
35173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35174   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
35175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35176   (eval $ac_try) 2>&5
35177   ac_status=$?
35178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35179   (exit $ac_status); }; }; then
35180   ac_cv_c_bigendian=no
35181 else
35182   echo "$as_me: program exited with status $ac_status" >&5
35183 echo "$as_me: failed program was:" >&5
35184 sed 's/^/| /' conftest.$ac_ext >&5
35185
35186 ( exit $ac_status )
35187 ac_cv_c_bigendian=yes
35188 fi
35189 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
35190 fi
35191 fi
35192 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35193 fi
35194 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
35195 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
35196 case $ac_cv_c_bigendian in
35197   yes)
35198
35199 cat >>confdefs.h <<\_ACEOF
35200 #define WORDS_BIGENDIAN 1
35201 _ACEOF
35202  ;;
35203   no)
35204      ;;
35205   *)
35206     { { echo "$as_me:$LINENO: error: unknown endianness
35207 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
35208 echo "$as_me: error: unknown endianness
35209 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
35210    { (exit 1); exit 1; }; } ;;
35211 esac
35212
35213 fi
35214
35215 echo "$as_me:$LINENO: checking for short" >&5
35216 echo $ECHO_N "checking for short... $ECHO_C" >&6
35217 if test "${ac_cv_type_short+set}" = set; then
35218   echo $ECHO_N "(cached) $ECHO_C" >&6
35219 else
35220   cat >conftest.$ac_ext <<_ACEOF
35221 /* confdefs.h.  */
35222 _ACEOF
35223 cat confdefs.h >>conftest.$ac_ext
35224 cat >>conftest.$ac_ext <<_ACEOF
35225 /* end confdefs.h.  */
35226 $ac_includes_default
35227 int
35228 main ()
35229 {
35230 if ((short *) 0)
35231   return 0;
35232 if (sizeof (short))
35233   return 0;
35234   ;
35235   return 0;
35236 }
35237 _ACEOF
35238 rm -f conftest.$ac_objext
35239 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35240   (eval $ac_compile) 2>conftest.er1
35241   ac_status=$?
35242   grep -v '^ *+' conftest.er1 >conftest.err
35243   rm -f conftest.er1
35244   cat conftest.err >&5
35245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35246   (exit $ac_status); } &&
35247          { ac_try='test -z "$ac_c_werror_flag"
35248                          || test ! -s conftest.err'
35249   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35250   (eval $ac_try) 2>&5
35251   ac_status=$?
35252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35253   (exit $ac_status); }; } &&
35254          { ac_try='test -s conftest.$ac_objext'
35255   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35256   (eval $ac_try) 2>&5
35257   ac_status=$?
35258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35259   (exit $ac_status); }; }; then
35260   ac_cv_type_short=yes
35261 else
35262   echo "$as_me: failed program was:" >&5
35263 sed 's/^/| /' conftest.$ac_ext >&5
35264
35265 ac_cv_type_short=no
35266 fi
35267 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35268 fi
35269 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
35270 echo "${ECHO_T}$ac_cv_type_short" >&6
35271
35272 echo "$as_me:$LINENO: checking size of short" >&5
35273 echo $ECHO_N "checking size of short... $ECHO_C" >&6
35274 if test "${ac_cv_sizeof_short+set}" = set; then
35275   echo $ECHO_N "(cached) $ECHO_C" >&6
35276 else
35277   if test "$ac_cv_type_short" = yes; then
35278   # The cast to unsigned long works around a bug in the HP C Compiler
35279   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
35280   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
35281   # This bug is HP SR number 8606223364.
35282   if test "$cross_compiling" = yes; then
35283   # Depending upon the size, compute the lo and hi bounds.
35284 cat >conftest.$ac_ext <<_ACEOF
35285 /* confdefs.h.  */
35286 _ACEOF
35287 cat confdefs.h >>conftest.$ac_ext
35288 cat >>conftest.$ac_ext <<_ACEOF
35289 /* end confdefs.h.  */
35290 $ac_includes_default
35291 int
35292 main ()
35293 {
35294 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
35295 test_array [0] = 0
35296
35297   ;
35298   return 0;
35299 }
35300 _ACEOF
35301 rm -f conftest.$ac_objext
35302 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35303   (eval $ac_compile) 2>conftest.er1
35304   ac_status=$?
35305   grep -v '^ *+' conftest.er1 >conftest.err
35306   rm -f conftest.er1
35307   cat conftest.err >&5
35308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35309   (exit $ac_status); } &&
35310          { ac_try='test -z "$ac_c_werror_flag"
35311                          || test ! -s conftest.err'
35312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35313   (eval $ac_try) 2>&5
35314   ac_status=$?
35315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35316   (exit $ac_status); }; } &&
35317          { ac_try='test -s conftest.$ac_objext'
35318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35319   (eval $ac_try) 2>&5
35320   ac_status=$?
35321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35322   (exit $ac_status); }; }; then
35323   ac_lo=0 ac_mid=0
35324   while :; do
35325     cat >conftest.$ac_ext <<_ACEOF
35326 /* confdefs.h.  */
35327 _ACEOF
35328 cat confdefs.h >>conftest.$ac_ext
35329 cat >>conftest.$ac_ext <<_ACEOF
35330 /* end confdefs.h.  */
35331 $ac_includes_default
35332 int
35333 main ()
35334 {
35335 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
35336 test_array [0] = 0
35337
35338   ;
35339   return 0;
35340 }
35341 _ACEOF
35342 rm -f conftest.$ac_objext
35343 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35344   (eval $ac_compile) 2>conftest.er1
35345   ac_status=$?
35346   grep -v '^ *+' conftest.er1 >conftest.err
35347   rm -f conftest.er1
35348   cat conftest.err >&5
35349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35350   (exit $ac_status); } &&
35351          { ac_try='test -z "$ac_c_werror_flag"
35352                          || test ! -s conftest.err'
35353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35354   (eval $ac_try) 2>&5
35355   ac_status=$?
35356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35357   (exit $ac_status); }; } &&
35358          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
35364   ac_hi=$ac_mid; break
35365 else
35366   echo "$as_me: failed program was:" >&5
35367 sed 's/^/| /' conftest.$ac_ext >&5
35368
35369 ac_lo=`expr $ac_mid + 1`
35370                     if test $ac_lo -le $ac_mid; then
35371                       ac_lo= ac_hi=
35372                       break
35373                     fi
35374                     ac_mid=`expr 2 '*' $ac_mid + 1`
35375 fi
35376 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35377   done
35378 else
35379   echo "$as_me: failed program was:" >&5
35380 sed 's/^/| /' conftest.$ac_ext >&5
35381
35382 cat >conftest.$ac_ext <<_ACEOF
35383 /* confdefs.h.  */
35384 _ACEOF
35385 cat confdefs.h >>conftest.$ac_ext
35386 cat >>conftest.$ac_ext <<_ACEOF
35387 /* end confdefs.h.  */
35388 $ac_includes_default
35389 int
35390 main ()
35391 {
35392 static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
35393 test_array [0] = 0
35394
35395   ;
35396   return 0;
35397 }
35398 _ACEOF
35399 rm -f conftest.$ac_objext
35400 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35401   (eval $ac_compile) 2>conftest.er1
35402   ac_status=$?
35403   grep -v '^ *+' conftest.er1 >conftest.err
35404   rm -f conftest.er1
35405   cat conftest.err >&5
35406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35407   (exit $ac_status); } &&
35408          { ac_try='test -z "$ac_c_werror_flag"
35409                          || test ! -s conftest.err'
35410   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35411   (eval $ac_try) 2>&5
35412   ac_status=$?
35413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35414   (exit $ac_status); }; } &&
35415          { ac_try='test -s conftest.$ac_objext'
35416   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35417   (eval $ac_try) 2>&5
35418   ac_status=$?
35419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35420   (exit $ac_status); }; }; then
35421   ac_hi=-1 ac_mid=-1
35422   while :; do
35423     cat >conftest.$ac_ext <<_ACEOF
35424 /* confdefs.h.  */
35425 _ACEOF
35426 cat confdefs.h >>conftest.$ac_ext
35427 cat >>conftest.$ac_ext <<_ACEOF
35428 /* end confdefs.h.  */
35429 $ac_includes_default
35430 int
35431 main ()
35432 {
35433 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
35434 test_array [0] = 0
35435
35436   ;
35437   return 0;
35438 }
35439 _ACEOF
35440 rm -f conftest.$ac_objext
35441 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35442   (eval $ac_compile) 2>conftest.er1
35443   ac_status=$?
35444   grep -v '^ *+' conftest.er1 >conftest.err
35445   rm -f conftest.er1
35446   cat conftest.err >&5
35447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35448   (exit $ac_status); } &&
35449          { ac_try='test -z "$ac_c_werror_flag"
35450                          || test ! -s conftest.err'
35451   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35452   (eval $ac_try) 2>&5
35453   ac_status=$?
35454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35455   (exit $ac_status); }; } &&
35456          { ac_try='test -s conftest.$ac_objext'
35457   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35458   (eval $ac_try) 2>&5
35459   ac_status=$?
35460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35461   (exit $ac_status); }; }; then
35462   ac_lo=$ac_mid; break
35463 else
35464   echo "$as_me: failed program was:" >&5
35465 sed 's/^/| /' conftest.$ac_ext >&5
35466
35467 ac_hi=`expr '(' $ac_mid ')' - 1`
35468                        if test $ac_mid -le $ac_hi; then
35469                          ac_lo= ac_hi=
35470                          break
35471                        fi
35472                        ac_mid=`expr 2 '*' $ac_mid`
35473 fi
35474 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35475   done
35476 else
35477   echo "$as_me: failed program was:" >&5
35478 sed 's/^/| /' conftest.$ac_ext >&5
35479
35480 ac_lo= ac_hi=
35481 fi
35482 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35483 fi
35484 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35485 # Binary search between lo and hi bounds.
35486 while test "x$ac_lo" != "x$ac_hi"; do
35487   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
35488   cat >conftest.$ac_ext <<_ACEOF
35489 /* confdefs.h.  */
35490 _ACEOF
35491 cat confdefs.h >>conftest.$ac_ext
35492 cat >>conftest.$ac_ext <<_ACEOF
35493 /* end confdefs.h.  */
35494 $ac_includes_default
35495 int
35496 main ()
35497 {
35498 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
35499 test_array [0] = 0
35500
35501   ;
35502   return 0;
35503 }
35504 _ACEOF
35505 rm -f conftest.$ac_objext
35506 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35507   (eval $ac_compile) 2>conftest.er1
35508   ac_status=$?
35509   grep -v '^ *+' conftest.er1 >conftest.err
35510   rm -f conftest.er1
35511   cat conftest.err >&5
35512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35513   (exit $ac_status); } &&
35514          { ac_try='test -z "$ac_c_werror_flag"
35515                          || test ! -s conftest.err'
35516   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35517   (eval $ac_try) 2>&5
35518   ac_status=$?
35519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35520   (exit $ac_status); }; } &&
35521          { ac_try='test -s conftest.$ac_objext'
35522   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35523   (eval $ac_try) 2>&5
35524   ac_status=$?
35525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35526   (exit $ac_status); }; }; then
35527   ac_hi=$ac_mid
35528 else
35529   echo "$as_me: failed program was:" >&5
35530 sed 's/^/| /' conftest.$ac_ext >&5
35531
35532 ac_lo=`expr '(' $ac_mid ')' + 1`
35533 fi
35534 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35535 done
35536 case $ac_lo in
35537 ?*) ac_cv_sizeof_short=$ac_lo;;
35538 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
35539 See \`config.log' for more details." >&5
35540 echo "$as_me: error: cannot compute sizeof (short), 77
35541 See \`config.log' for more details." >&2;}
35542    { (exit 1); exit 1; }; } ;;
35543 esac
35544 else
35545   if test "$cross_compiling" = yes; then
35546   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
35547 See \`config.log' for more details." >&5
35548 echo "$as_me: error: cannot run test program while cross compiling
35549 See \`config.log' for more details." >&2;}
35550    { (exit 1); exit 1; }; }
35551 else
35552   cat >conftest.$ac_ext <<_ACEOF
35553 /* confdefs.h.  */
35554 _ACEOF
35555 cat confdefs.h >>conftest.$ac_ext
35556 cat >>conftest.$ac_ext <<_ACEOF
35557 /* end confdefs.h.  */
35558 $ac_includes_default
35559 long longval () { return (long) (sizeof (short)); }
35560 unsigned long ulongval () { return (long) (sizeof (short)); }
35561 #include <stdio.h>
35562 #include <stdlib.h>
35563 int
35564 main ()
35565 {
35566
35567   FILE *f = fopen ("conftest.val", "w");
35568   if (! f)
35569     exit (1);
35570   if (((long) (sizeof (short))) < 0)
35571     {
35572       long i = longval ();
35573       if (i != ((long) (sizeof (short))))
35574         exit (1);
35575       fprintf (f, "%ld\n", i);
35576     }
35577   else
35578     {
35579       unsigned long i = ulongval ();
35580       if (i != ((long) (sizeof (short))))
35581         exit (1);
35582       fprintf (f, "%lu\n", i);
35583     }
35584   exit (ferror (f) || fclose (f) != 0);
35585
35586   ;
35587   return 0;
35588 }
35589 _ACEOF
35590 rm -f conftest$ac_exeext
35591 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35592   (eval $ac_link) 2>&5
35593   ac_status=$?
35594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35595   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
35596   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35597   (eval $ac_try) 2>&5
35598   ac_status=$?
35599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35600   (exit $ac_status); }; }; then
35601   ac_cv_sizeof_short=`cat conftest.val`
35602 else
35603   echo "$as_me: program exited with status $ac_status" >&5
35604 echo "$as_me: failed program was:" >&5
35605 sed 's/^/| /' conftest.$ac_ext >&5
35606
35607 ( exit $ac_status )
35608 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
35609 See \`config.log' for more details." >&5
35610 echo "$as_me: error: cannot compute sizeof (short), 77
35611 See \`config.log' for more details." >&2;}
35612    { (exit 1); exit 1; }; }
35613 fi
35614 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
35615 fi
35616 fi
35617 rm -f conftest.val
35618 else
35619   ac_cv_sizeof_short=0
35620 fi
35621 fi
35622 echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
35623 echo "${ECHO_T}$ac_cv_sizeof_short" >&6
35624 cat >>confdefs.h <<_ACEOF
35625 #define SIZEOF_SHORT $ac_cv_sizeof_short
35626 _ACEOF
35627
35628
35629 echo "$as_me:$LINENO: checking for int" >&5
35630 echo $ECHO_N "checking for int... $ECHO_C" >&6
35631 if test "${ac_cv_type_int+set}" = set; then
35632   echo $ECHO_N "(cached) $ECHO_C" >&6
35633 else
35634   cat >conftest.$ac_ext <<_ACEOF
35635 /* confdefs.h.  */
35636 _ACEOF
35637 cat confdefs.h >>conftest.$ac_ext
35638 cat >>conftest.$ac_ext <<_ACEOF
35639 /* end confdefs.h.  */
35640 $ac_includes_default
35641 int
35642 main ()
35643 {
35644 if ((int *) 0)
35645   return 0;
35646 if (sizeof (int))
35647   return 0;
35648   ;
35649   return 0;
35650 }
35651 _ACEOF
35652 rm -f conftest.$ac_objext
35653 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35654   (eval $ac_compile) 2>conftest.er1
35655   ac_status=$?
35656   grep -v '^ *+' conftest.er1 >conftest.err
35657   rm -f conftest.er1
35658   cat conftest.err >&5
35659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35660   (exit $ac_status); } &&
35661          { ac_try='test -z "$ac_c_werror_flag"
35662                          || test ! -s conftest.err'
35663   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35664   (eval $ac_try) 2>&5
35665   ac_status=$?
35666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35667   (exit $ac_status); }; } &&
35668          { ac_try='test -s conftest.$ac_objext'
35669   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35670   (eval $ac_try) 2>&5
35671   ac_status=$?
35672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35673   (exit $ac_status); }; }; then
35674   ac_cv_type_int=yes
35675 else
35676   echo "$as_me: failed program was:" >&5
35677 sed 's/^/| /' conftest.$ac_ext >&5
35678
35679 ac_cv_type_int=no
35680 fi
35681 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35682 fi
35683 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
35684 echo "${ECHO_T}$ac_cv_type_int" >&6
35685
35686 echo "$as_me:$LINENO: checking size of int" >&5
35687 echo $ECHO_N "checking size of int... $ECHO_C" >&6
35688 if test "${ac_cv_sizeof_int+set}" = set; then
35689   echo $ECHO_N "(cached) $ECHO_C" >&6
35690 else
35691   if test "$ac_cv_type_int" = yes; then
35692   # The cast to unsigned long works around a bug in the HP C Compiler
35693   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
35694   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
35695   # This bug is HP SR number 8606223364.
35696   if test "$cross_compiling" = yes; then
35697   # Depending upon the size, compute the lo and hi bounds.
35698 cat >conftest.$ac_ext <<_ACEOF
35699 /* confdefs.h.  */
35700 _ACEOF
35701 cat confdefs.h >>conftest.$ac_ext
35702 cat >>conftest.$ac_ext <<_ACEOF
35703 /* end confdefs.h.  */
35704 $ac_includes_default
35705 int
35706 main ()
35707 {
35708 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
35709 test_array [0] = 0
35710
35711   ;
35712   return 0;
35713 }
35714 _ACEOF
35715 rm -f conftest.$ac_objext
35716 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35717   (eval $ac_compile) 2>conftest.er1
35718   ac_status=$?
35719   grep -v '^ *+' conftest.er1 >conftest.err
35720   rm -f conftest.er1
35721   cat conftest.err >&5
35722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35723   (exit $ac_status); } &&
35724          { ac_try='test -z "$ac_c_werror_flag"
35725                          || test ! -s conftest.err'
35726   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35727   (eval $ac_try) 2>&5
35728   ac_status=$?
35729   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35730   (exit $ac_status); }; } &&
35731          { ac_try='test -s conftest.$ac_objext'
35732   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35733   (eval $ac_try) 2>&5
35734   ac_status=$?
35735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35736   (exit $ac_status); }; }; then
35737   ac_lo=0 ac_mid=0
35738   while :; do
35739     cat >conftest.$ac_ext <<_ACEOF
35740 /* confdefs.h.  */
35741 _ACEOF
35742 cat confdefs.h >>conftest.$ac_ext
35743 cat >>conftest.$ac_ext <<_ACEOF
35744 /* end confdefs.h.  */
35745 $ac_includes_default
35746 int
35747 main ()
35748 {
35749 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
35750 test_array [0] = 0
35751
35752   ;
35753   return 0;
35754 }
35755 _ACEOF
35756 rm -f conftest.$ac_objext
35757 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35758   (eval $ac_compile) 2>conftest.er1
35759   ac_status=$?
35760   grep -v '^ *+' conftest.er1 >conftest.err
35761   rm -f conftest.er1
35762   cat conftest.err >&5
35763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35764   (exit $ac_status); } &&
35765          { ac_try='test -z "$ac_c_werror_flag"
35766                          || test ! -s conftest.err'
35767   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35768   (eval $ac_try) 2>&5
35769   ac_status=$?
35770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35771   (exit $ac_status); }; } &&
35772          { ac_try='test -s conftest.$ac_objext'
35773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35774   (eval $ac_try) 2>&5
35775   ac_status=$?
35776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35777   (exit $ac_status); }; }; then
35778   ac_hi=$ac_mid; break
35779 else
35780   echo "$as_me: failed program was:" >&5
35781 sed 's/^/| /' conftest.$ac_ext >&5
35782
35783 ac_lo=`expr $ac_mid + 1`
35784                     if test $ac_lo -le $ac_mid; then
35785                       ac_lo= ac_hi=
35786                       break
35787                     fi
35788                     ac_mid=`expr 2 '*' $ac_mid + 1`
35789 fi
35790 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35791   done
35792 else
35793   echo "$as_me: failed program was:" >&5
35794 sed 's/^/| /' conftest.$ac_ext >&5
35795
35796 cat >conftest.$ac_ext <<_ACEOF
35797 /* confdefs.h.  */
35798 _ACEOF
35799 cat confdefs.h >>conftest.$ac_ext
35800 cat >>conftest.$ac_ext <<_ACEOF
35801 /* end confdefs.h.  */
35802 $ac_includes_default
35803 int
35804 main ()
35805 {
35806 static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
35807 test_array [0] = 0
35808
35809   ;
35810   return 0;
35811 }
35812 _ACEOF
35813 rm -f conftest.$ac_objext
35814 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35815   (eval $ac_compile) 2>conftest.er1
35816   ac_status=$?
35817   grep -v '^ *+' conftest.er1 >conftest.err
35818   rm -f conftest.er1
35819   cat conftest.err >&5
35820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35821   (exit $ac_status); } &&
35822          { ac_try='test -z "$ac_c_werror_flag"
35823                          || test ! -s conftest.err'
35824   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35825   (eval $ac_try) 2>&5
35826   ac_status=$?
35827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35828   (exit $ac_status); }; } &&
35829          { ac_try='test -s conftest.$ac_objext'
35830   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35831   (eval $ac_try) 2>&5
35832   ac_status=$?
35833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35834   (exit $ac_status); }; }; then
35835   ac_hi=-1 ac_mid=-1
35836   while :; do
35837     cat >conftest.$ac_ext <<_ACEOF
35838 /* confdefs.h.  */
35839 _ACEOF
35840 cat confdefs.h >>conftest.$ac_ext
35841 cat >>conftest.$ac_ext <<_ACEOF
35842 /* end confdefs.h.  */
35843 $ac_includes_default
35844 int
35845 main ()
35846 {
35847 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
35848 test_array [0] = 0
35849
35850   ;
35851   return 0;
35852 }
35853 _ACEOF
35854 rm -f conftest.$ac_objext
35855 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35856   (eval $ac_compile) 2>conftest.er1
35857   ac_status=$?
35858   grep -v '^ *+' conftest.er1 >conftest.err
35859   rm -f conftest.er1
35860   cat conftest.err >&5
35861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35862   (exit $ac_status); } &&
35863          { ac_try='test -z "$ac_c_werror_flag"
35864                          || test ! -s conftest.err'
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); }; } &&
35870          { ac_try='test -s conftest.$ac_objext'
35871   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35872   (eval $ac_try) 2>&5
35873   ac_status=$?
35874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35875   (exit $ac_status); }; }; then
35876   ac_lo=$ac_mid; break
35877 else
35878   echo "$as_me: failed program was:" >&5
35879 sed 's/^/| /' conftest.$ac_ext >&5
35880
35881 ac_hi=`expr '(' $ac_mid ')' - 1`
35882                        if test $ac_mid -le $ac_hi; then
35883                          ac_lo= ac_hi=
35884                          break
35885                        fi
35886                        ac_mid=`expr 2 '*' $ac_mid`
35887 fi
35888 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35889   done
35890 else
35891   echo "$as_me: failed program was:" >&5
35892 sed 's/^/| /' conftest.$ac_ext >&5
35893
35894 ac_lo= ac_hi=
35895 fi
35896 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35897 fi
35898 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35899 # Binary search between lo and hi bounds.
35900 while test "x$ac_lo" != "x$ac_hi"; do
35901   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
35902   cat >conftest.$ac_ext <<_ACEOF
35903 /* confdefs.h.  */
35904 _ACEOF
35905 cat confdefs.h >>conftest.$ac_ext
35906 cat >>conftest.$ac_ext <<_ACEOF
35907 /* end confdefs.h.  */
35908 $ac_includes_default
35909 int
35910 main ()
35911 {
35912 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
35913 test_array [0] = 0
35914
35915   ;
35916   return 0;
35917 }
35918 _ACEOF
35919 rm -f conftest.$ac_objext
35920 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35921   (eval $ac_compile) 2>conftest.er1
35922   ac_status=$?
35923   grep -v '^ *+' conftest.er1 >conftest.err
35924   rm -f conftest.er1
35925   cat conftest.err >&5
35926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35927   (exit $ac_status); } &&
35928          { ac_try='test -z "$ac_c_werror_flag"
35929                          || test ! -s conftest.err'
35930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35931   (eval $ac_try) 2>&5
35932   ac_status=$?
35933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35934   (exit $ac_status); }; } &&
35935          { ac_try='test -s conftest.$ac_objext'
35936   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35937   (eval $ac_try) 2>&5
35938   ac_status=$?
35939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35940   (exit $ac_status); }; }; then
35941   ac_hi=$ac_mid
35942 else
35943   echo "$as_me: failed program was:" >&5
35944 sed 's/^/| /' conftest.$ac_ext >&5
35945
35946 ac_lo=`expr '(' $ac_mid ')' + 1`
35947 fi
35948 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35949 done
35950 case $ac_lo in
35951 ?*) ac_cv_sizeof_int=$ac_lo;;
35952 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
35953 See \`config.log' for more details." >&5
35954 echo "$as_me: error: cannot compute sizeof (int), 77
35955 See \`config.log' for more details." >&2;}
35956    { (exit 1); exit 1; }; } ;;
35957 esac
35958 else
35959   if test "$cross_compiling" = yes; then
35960   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
35961 See \`config.log' for more details." >&5
35962 echo "$as_me: error: cannot run test program while cross compiling
35963 See \`config.log' for more details." >&2;}
35964    { (exit 1); exit 1; }; }
35965 else
35966   cat >conftest.$ac_ext <<_ACEOF
35967 /* confdefs.h.  */
35968 _ACEOF
35969 cat confdefs.h >>conftest.$ac_ext
35970 cat >>conftest.$ac_ext <<_ACEOF
35971 /* end confdefs.h.  */
35972 $ac_includes_default
35973 long longval () { return (long) (sizeof (int)); }
35974 unsigned long ulongval () { return (long) (sizeof (int)); }
35975 #include <stdio.h>
35976 #include <stdlib.h>
35977 int
35978 main ()
35979 {
35980
35981   FILE *f = fopen ("conftest.val", "w");
35982   if (! f)
35983     exit (1);
35984   if (((long) (sizeof (int))) < 0)
35985     {
35986       long i = longval ();
35987       if (i != ((long) (sizeof (int))))
35988         exit (1);
35989       fprintf (f, "%ld\n", i);
35990     }
35991   else
35992     {
35993       unsigned long i = ulongval ();
35994       if (i != ((long) (sizeof (int))))
35995         exit (1);
35996       fprintf (f, "%lu\n", i);
35997     }
35998   exit (ferror (f) || fclose (f) != 0);
35999
36000   ;
36001   return 0;
36002 }
36003 _ACEOF
36004 rm -f conftest$ac_exeext
36005 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36006   (eval $ac_link) 2>&5
36007   ac_status=$?
36008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36009   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
36010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36011   (eval $ac_try) 2>&5
36012   ac_status=$?
36013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36014   (exit $ac_status); }; }; then
36015   ac_cv_sizeof_int=`cat conftest.val`
36016 else
36017   echo "$as_me: program exited with status $ac_status" >&5
36018 echo "$as_me: failed program was:" >&5
36019 sed 's/^/| /' conftest.$ac_ext >&5
36020
36021 ( exit $ac_status )
36022 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
36023 See \`config.log' for more details." >&5
36024 echo "$as_me: error: cannot compute sizeof (int), 77
36025 See \`config.log' for more details." >&2;}
36026    { (exit 1); exit 1; }; }
36027 fi
36028 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
36029 fi
36030 fi
36031 rm -f conftest.val
36032 else
36033   ac_cv_sizeof_int=0
36034 fi
36035 fi
36036 echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
36037 echo "${ECHO_T}$ac_cv_sizeof_int" >&6
36038 cat >>confdefs.h <<_ACEOF
36039 #define SIZEOF_INT $ac_cv_sizeof_int
36040 _ACEOF
36041
36042
36043 echo "$as_me:$LINENO: checking for long" >&5
36044 echo $ECHO_N "checking for long... $ECHO_C" >&6
36045 if test "${ac_cv_type_long+set}" = set; then
36046   echo $ECHO_N "(cached) $ECHO_C" >&6
36047 else
36048   cat >conftest.$ac_ext <<_ACEOF
36049 /* confdefs.h.  */
36050 _ACEOF
36051 cat confdefs.h >>conftest.$ac_ext
36052 cat >>conftest.$ac_ext <<_ACEOF
36053 /* end confdefs.h.  */
36054 $ac_includes_default
36055 int
36056 main ()
36057 {
36058 if ((long *) 0)
36059   return 0;
36060 if (sizeof (long))
36061   return 0;
36062   ;
36063   return 0;
36064 }
36065 _ACEOF
36066 rm -f conftest.$ac_objext
36067 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36068   (eval $ac_compile) 2>conftest.er1
36069   ac_status=$?
36070   grep -v '^ *+' conftest.er1 >conftest.err
36071   rm -f conftest.er1
36072   cat conftest.err >&5
36073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36074   (exit $ac_status); } &&
36075          { ac_try='test -z "$ac_c_werror_flag"
36076                          || test ! -s conftest.err'
36077   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36078   (eval $ac_try) 2>&5
36079   ac_status=$?
36080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36081   (exit $ac_status); }; } &&
36082          { ac_try='test -s conftest.$ac_objext'
36083   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36084   (eval $ac_try) 2>&5
36085   ac_status=$?
36086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36087   (exit $ac_status); }; }; then
36088   ac_cv_type_long=yes
36089 else
36090   echo "$as_me: failed program was:" >&5
36091 sed 's/^/| /' conftest.$ac_ext >&5
36092
36093 ac_cv_type_long=no
36094 fi
36095 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36096 fi
36097 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
36098 echo "${ECHO_T}$ac_cv_type_long" >&6
36099
36100 echo "$as_me:$LINENO: checking size of long" >&5
36101 echo $ECHO_N "checking size of long... $ECHO_C" >&6
36102 if test "${ac_cv_sizeof_long+set}" = set; then
36103   echo $ECHO_N "(cached) $ECHO_C" >&6
36104 else
36105   if test "$ac_cv_type_long" = yes; then
36106   # The cast to unsigned long works around a bug in the HP C Compiler
36107   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
36108   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
36109   # This bug is HP SR number 8606223364.
36110   if test "$cross_compiling" = yes; then
36111   # Depending upon the size, compute the lo and hi bounds.
36112 cat >conftest.$ac_ext <<_ACEOF
36113 /* confdefs.h.  */
36114 _ACEOF
36115 cat confdefs.h >>conftest.$ac_ext
36116 cat >>conftest.$ac_ext <<_ACEOF
36117 /* end confdefs.h.  */
36118 $ac_includes_default
36119 int
36120 main ()
36121 {
36122 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
36123 test_array [0] = 0
36124
36125   ;
36126   return 0;
36127 }
36128 _ACEOF
36129 rm -f conftest.$ac_objext
36130 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36131   (eval $ac_compile) 2>conftest.er1
36132   ac_status=$?
36133   grep -v '^ *+' conftest.er1 >conftest.err
36134   rm -f conftest.er1
36135   cat conftest.err >&5
36136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36137   (exit $ac_status); } &&
36138          { ac_try='test -z "$ac_c_werror_flag"
36139                          || test ! -s conftest.err'
36140   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36141   (eval $ac_try) 2>&5
36142   ac_status=$?
36143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36144   (exit $ac_status); }; } &&
36145          { ac_try='test -s conftest.$ac_objext'
36146   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36147   (eval $ac_try) 2>&5
36148   ac_status=$?
36149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36150   (exit $ac_status); }; }; then
36151   ac_lo=0 ac_mid=0
36152   while :; do
36153     cat >conftest.$ac_ext <<_ACEOF
36154 /* confdefs.h.  */
36155 _ACEOF
36156 cat confdefs.h >>conftest.$ac_ext
36157 cat >>conftest.$ac_ext <<_ACEOF
36158 /* end confdefs.h.  */
36159 $ac_includes_default
36160 int
36161 main ()
36162 {
36163 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
36164 test_array [0] = 0
36165
36166   ;
36167   return 0;
36168 }
36169 _ACEOF
36170 rm -f conftest.$ac_objext
36171 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36172   (eval $ac_compile) 2>conftest.er1
36173   ac_status=$?
36174   grep -v '^ *+' conftest.er1 >conftest.err
36175   rm -f conftest.er1
36176   cat conftest.err >&5
36177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36178   (exit $ac_status); } &&
36179          { ac_try='test -z "$ac_c_werror_flag"
36180                          || test ! -s conftest.err'
36181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36182   (eval $ac_try) 2>&5
36183   ac_status=$?
36184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36185   (exit $ac_status); }; } &&
36186          { ac_try='test -s conftest.$ac_objext'
36187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36188   (eval $ac_try) 2>&5
36189   ac_status=$?
36190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36191   (exit $ac_status); }; }; then
36192   ac_hi=$ac_mid; break
36193 else
36194   echo "$as_me: failed program was:" >&5
36195 sed 's/^/| /' conftest.$ac_ext >&5
36196
36197 ac_lo=`expr $ac_mid + 1`
36198                     if test $ac_lo -le $ac_mid; then
36199                       ac_lo= ac_hi=
36200                       break
36201                     fi
36202                     ac_mid=`expr 2 '*' $ac_mid + 1`
36203 fi
36204 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36205   done
36206 else
36207   echo "$as_me: failed program was:" >&5
36208 sed 's/^/| /' conftest.$ac_ext >&5
36209
36210 cat >conftest.$ac_ext <<_ACEOF
36211 /* confdefs.h.  */
36212 _ACEOF
36213 cat confdefs.h >>conftest.$ac_ext
36214 cat >>conftest.$ac_ext <<_ACEOF
36215 /* end confdefs.h.  */
36216 $ac_includes_default
36217 int
36218 main ()
36219 {
36220 static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
36221 test_array [0] = 0
36222
36223   ;
36224   return 0;
36225 }
36226 _ACEOF
36227 rm -f conftest.$ac_objext
36228 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36229   (eval $ac_compile) 2>conftest.er1
36230   ac_status=$?
36231   grep -v '^ *+' conftest.er1 >conftest.err
36232   rm -f conftest.er1
36233   cat conftest.err >&5
36234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36235   (exit $ac_status); } &&
36236          { ac_try='test -z "$ac_c_werror_flag"
36237                          || test ! -s conftest.err'
36238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36239   (eval $ac_try) 2>&5
36240   ac_status=$?
36241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36242   (exit $ac_status); }; } &&
36243          { ac_try='test -s conftest.$ac_objext'
36244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36245   (eval $ac_try) 2>&5
36246   ac_status=$?
36247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36248   (exit $ac_status); }; }; then
36249   ac_hi=-1 ac_mid=-1
36250   while :; do
36251     cat >conftest.$ac_ext <<_ACEOF
36252 /* confdefs.h.  */
36253 _ACEOF
36254 cat confdefs.h >>conftest.$ac_ext
36255 cat >>conftest.$ac_ext <<_ACEOF
36256 /* end confdefs.h.  */
36257 $ac_includes_default
36258 int
36259 main ()
36260 {
36261 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
36262 test_array [0] = 0
36263
36264   ;
36265   return 0;
36266 }
36267 _ACEOF
36268 rm -f conftest.$ac_objext
36269 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36270   (eval $ac_compile) 2>conftest.er1
36271   ac_status=$?
36272   grep -v '^ *+' conftest.er1 >conftest.err
36273   rm -f conftest.er1
36274   cat conftest.err >&5
36275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36276   (exit $ac_status); } &&
36277          { ac_try='test -z "$ac_c_werror_flag"
36278                          || test ! -s conftest.err'
36279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36280   (eval $ac_try) 2>&5
36281   ac_status=$?
36282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36283   (exit $ac_status); }; } &&
36284          { ac_try='test -s conftest.$ac_objext'
36285   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36286   (eval $ac_try) 2>&5
36287   ac_status=$?
36288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36289   (exit $ac_status); }; }; then
36290   ac_lo=$ac_mid; break
36291 else
36292   echo "$as_me: failed program was:" >&5
36293 sed 's/^/| /' conftest.$ac_ext >&5
36294
36295 ac_hi=`expr '(' $ac_mid ')' - 1`
36296                        if test $ac_mid -le $ac_hi; then
36297                          ac_lo= ac_hi=
36298                          break
36299                        fi
36300                        ac_mid=`expr 2 '*' $ac_mid`
36301 fi
36302 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36303   done
36304 else
36305   echo "$as_me: failed program was:" >&5
36306 sed 's/^/| /' conftest.$ac_ext >&5
36307
36308 ac_lo= ac_hi=
36309 fi
36310 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36311 fi
36312 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36313 # Binary search between lo and hi bounds.
36314 while test "x$ac_lo" != "x$ac_hi"; do
36315   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
36316   cat >conftest.$ac_ext <<_ACEOF
36317 /* confdefs.h.  */
36318 _ACEOF
36319 cat confdefs.h >>conftest.$ac_ext
36320 cat >>conftest.$ac_ext <<_ACEOF
36321 /* end confdefs.h.  */
36322 $ac_includes_default
36323 int
36324 main ()
36325 {
36326 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
36327 test_array [0] = 0
36328
36329   ;
36330   return 0;
36331 }
36332 _ACEOF
36333 rm -f conftest.$ac_objext
36334 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36335   (eval $ac_compile) 2>conftest.er1
36336   ac_status=$?
36337   grep -v '^ *+' conftest.er1 >conftest.err
36338   rm -f conftest.er1
36339   cat conftest.err >&5
36340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36341   (exit $ac_status); } &&
36342          { ac_try='test -z "$ac_c_werror_flag"
36343                          || test ! -s conftest.err'
36344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36345   (eval $ac_try) 2>&5
36346   ac_status=$?
36347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36348   (exit $ac_status); }; } &&
36349          { ac_try='test -s conftest.$ac_objext'
36350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36351   (eval $ac_try) 2>&5
36352   ac_status=$?
36353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36354   (exit $ac_status); }; }; then
36355   ac_hi=$ac_mid
36356 else
36357   echo "$as_me: failed program was:" >&5
36358 sed 's/^/| /' conftest.$ac_ext >&5
36359
36360 ac_lo=`expr '(' $ac_mid ')' + 1`
36361 fi
36362 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36363 done
36364 case $ac_lo in
36365 ?*) ac_cv_sizeof_long=$ac_lo;;
36366 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
36367 See \`config.log' for more details." >&5
36368 echo "$as_me: error: cannot compute sizeof (long), 77
36369 See \`config.log' for more details." >&2;}
36370    { (exit 1); exit 1; }; } ;;
36371 esac
36372 else
36373   if test "$cross_compiling" = yes; then
36374   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
36375 See \`config.log' for more details." >&5
36376 echo "$as_me: error: cannot run test program while cross compiling
36377 See \`config.log' for more details." >&2;}
36378    { (exit 1); exit 1; }; }
36379 else
36380   cat >conftest.$ac_ext <<_ACEOF
36381 /* confdefs.h.  */
36382 _ACEOF
36383 cat confdefs.h >>conftest.$ac_ext
36384 cat >>conftest.$ac_ext <<_ACEOF
36385 /* end confdefs.h.  */
36386 $ac_includes_default
36387 long longval () { return (long) (sizeof (long)); }
36388 unsigned long ulongval () { return (long) (sizeof (long)); }
36389 #include <stdio.h>
36390 #include <stdlib.h>
36391 int
36392 main ()
36393 {
36394
36395   FILE *f = fopen ("conftest.val", "w");
36396   if (! f)
36397     exit (1);
36398   if (((long) (sizeof (long))) < 0)
36399     {
36400       long i = longval ();
36401       if (i != ((long) (sizeof (long))))
36402         exit (1);
36403       fprintf (f, "%ld\n", i);
36404     }
36405   else
36406     {
36407       unsigned long i = ulongval ();
36408       if (i != ((long) (sizeof (long))))
36409         exit (1);
36410       fprintf (f, "%lu\n", i);
36411     }
36412   exit (ferror (f) || fclose (f) != 0);
36413
36414   ;
36415   return 0;
36416 }
36417 _ACEOF
36418 rm -f conftest$ac_exeext
36419 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36420   (eval $ac_link) 2>&5
36421   ac_status=$?
36422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36423   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
36424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36425   (eval $ac_try) 2>&5
36426   ac_status=$?
36427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36428   (exit $ac_status); }; }; then
36429   ac_cv_sizeof_long=`cat conftest.val`
36430 else
36431   echo "$as_me: program exited with status $ac_status" >&5
36432 echo "$as_me: failed program was:" >&5
36433 sed 's/^/| /' conftest.$ac_ext >&5
36434
36435 ( exit $ac_status )
36436 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
36437 See \`config.log' for more details." >&5
36438 echo "$as_me: error: cannot compute sizeof (long), 77
36439 See \`config.log' for more details." >&2;}
36440    { (exit 1); exit 1; }; }
36441 fi
36442 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
36443 fi
36444 fi
36445 rm -f conftest.val
36446 else
36447   ac_cv_sizeof_long=0
36448 fi
36449 fi
36450 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
36451 echo "${ECHO_T}$ac_cv_sizeof_long" >&6
36452 cat >>confdefs.h <<_ACEOF
36453 #define SIZEOF_LONG $ac_cv_sizeof_long
36454 _ACEOF
36455
36456
36457 echo "$as_me:$LINENO: checking for long long" >&5
36458 echo $ECHO_N "checking for long long... $ECHO_C" >&6
36459 if test "${ac_cv_type_long_long+set}" = set; then
36460   echo $ECHO_N "(cached) $ECHO_C" >&6
36461 else
36462   cat >conftest.$ac_ext <<_ACEOF
36463 /* confdefs.h.  */
36464 _ACEOF
36465 cat confdefs.h >>conftest.$ac_ext
36466 cat >>conftest.$ac_ext <<_ACEOF
36467 /* end confdefs.h.  */
36468 $ac_includes_default
36469 int
36470 main ()
36471 {
36472 if ((long long *) 0)
36473   return 0;
36474 if (sizeof (long long))
36475   return 0;
36476   ;
36477   return 0;
36478 }
36479 _ACEOF
36480 rm -f conftest.$ac_objext
36481 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36482   (eval $ac_compile) 2>conftest.er1
36483   ac_status=$?
36484   grep -v '^ *+' conftest.er1 >conftest.err
36485   rm -f conftest.er1
36486   cat conftest.err >&5
36487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36488   (exit $ac_status); } &&
36489          { ac_try='test -z "$ac_c_werror_flag"
36490                          || test ! -s conftest.err'
36491   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36492   (eval $ac_try) 2>&5
36493   ac_status=$?
36494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36495   (exit $ac_status); }; } &&
36496          { ac_try='test -s conftest.$ac_objext'
36497   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36498   (eval $ac_try) 2>&5
36499   ac_status=$?
36500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36501   (exit $ac_status); }; }; then
36502   ac_cv_type_long_long=yes
36503 else
36504   echo "$as_me: failed program was:" >&5
36505 sed 's/^/| /' conftest.$ac_ext >&5
36506
36507 ac_cv_type_long_long=no
36508 fi
36509 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36510 fi
36511 echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
36512 echo "${ECHO_T}$ac_cv_type_long_long" >&6
36513
36514 echo "$as_me:$LINENO: checking size of long long" >&5
36515 echo $ECHO_N "checking size of long long... $ECHO_C" >&6
36516 if test "${ac_cv_sizeof_long_long+set}" = set; then
36517   echo $ECHO_N "(cached) $ECHO_C" >&6
36518 else
36519   if test "$ac_cv_type_long_long" = yes; then
36520   # The cast to unsigned long works around a bug in the HP C Compiler
36521   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
36522   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
36523   # This bug is HP SR number 8606223364.
36524   if test "$cross_compiling" = yes; then
36525   # Depending upon the size, compute the lo and hi bounds.
36526 cat >conftest.$ac_ext <<_ACEOF
36527 /* confdefs.h.  */
36528 _ACEOF
36529 cat confdefs.h >>conftest.$ac_ext
36530 cat >>conftest.$ac_ext <<_ACEOF
36531 /* end confdefs.h.  */
36532 $ac_includes_default
36533 int
36534 main ()
36535 {
36536 static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
36537 test_array [0] = 0
36538
36539   ;
36540   return 0;
36541 }
36542 _ACEOF
36543 rm -f conftest.$ac_objext
36544 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36545   (eval $ac_compile) 2>conftest.er1
36546   ac_status=$?
36547   grep -v '^ *+' conftest.er1 >conftest.err
36548   rm -f conftest.er1
36549   cat conftest.err >&5
36550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36551   (exit $ac_status); } &&
36552          { ac_try='test -z "$ac_c_werror_flag"
36553                          || test ! -s conftest.err'
36554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36555   (eval $ac_try) 2>&5
36556   ac_status=$?
36557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36558   (exit $ac_status); }; } &&
36559          { ac_try='test -s conftest.$ac_objext'
36560   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36561   (eval $ac_try) 2>&5
36562   ac_status=$?
36563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36564   (exit $ac_status); }; }; then
36565   ac_lo=0 ac_mid=0
36566   while :; do
36567     cat >conftest.$ac_ext <<_ACEOF
36568 /* confdefs.h.  */
36569 _ACEOF
36570 cat confdefs.h >>conftest.$ac_ext
36571 cat >>conftest.$ac_ext <<_ACEOF
36572 /* end confdefs.h.  */
36573 $ac_includes_default
36574 int
36575 main ()
36576 {
36577 static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
36578 test_array [0] = 0
36579
36580   ;
36581   return 0;
36582 }
36583 _ACEOF
36584 rm -f conftest.$ac_objext
36585 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36586   (eval $ac_compile) 2>conftest.er1
36587   ac_status=$?
36588   grep -v '^ *+' conftest.er1 >conftest.err
36589   rm -f conftest.er1
36590   cat conftest.err >&5
36591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36592   (exit $ac_status); } &&
36593          { ac_try='test -z "$ac_c_werror_flag"
36594                          || test ! -s conftest.err'
36595   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36596   (eval $ac_try) 2>&5
36597   ac_status=$?
36598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36599   (exit $ac_status); }; } &&
36600          { ac_try='test -s conftest.$ac_objext'
36601   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36602   (eval $ac_try) 2>&5
36603   ac_status=$?
36604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36605   (exit $ac_status); }; }; then
36606   ac_hi=$ac_mid; break
36607 else
36608   echo "$as_me: failed program was:" >&5
36609 sed 's/^/| /' conftest.$ac_ext >&5
36610
36611 ac_lo=`expr $ac_mid + 1`
36612                     if test $ac_lo -le $ac_mid; then
36613                       ac_lo= ac_hi=
36614                       break
36615                     fi
36616                     ac_mid=`expr 2 '*' $ac_mid + 1`
36617 fi
36618 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36619   done
36620 else
36621   echo "$as_me: failed program was:" >&5
36622 sed 's/^/| /' conftest.$ac_ext >&5
36623
36624 cat >conftest.$ac_ext <<_ACEOF
36625 /* confdefs.h.  */
36626 _ACEOF
36627 cat confdefs.h >>conftest.$ac_ext
36628 cat >>conftest.$ac_ext <<_ACEOF
36629 /* end confdefs.h.  */
36630 $ac_includes_default
36631 int
36632 main ()
36633 {
36634 static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
36635 test_array [0] = 0
36636
36637   ;
36638   return 0;
36639 }
36640 _ACEOF
36641 rm -f conftest.$ac_objext
36642 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36643   (eval $ac_compile) 2>conftest.er1
36644   ac_status=$?
36645   grep -v '^ *+' conftest.er1 >conftest.err
36646   rm -f conftest.er1
36647   cat conftest.err >&5
36648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36649   (exit $ac_status); } &&
36650          { ac_try='test -z "$ac_c_werror_flag"
36651                          || test ! -s conftest.err'
36652   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36653   (eval $ac_try) 2>&5
36654   ac_status=$?
36655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36656   (exit $ac_status); }; } &&
36657          { ac_try='test -s conftest.$ac_objext'
36658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36659   (eval $ac_try) 2>&5
36660   ac_status=$?
36661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36662   (exit $ac_status); }; }; then
36663   ac_hi=-1 ac_mid=-1
36664   while :; do
36665     cat >conftest.$ac_ext <<_ACEOF
36666 /* confdefs.h.  */
36667 _ACEOF
36668 cat confdefs.h >>conftest.$ac_ext
36669 cat >>conftest.$ac_ext <<_ACEOF
36670 /* end confdefs.h.  */
36671 $ac_includes_default
36672 int
36673 main ()
36674 {
36675 static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
36676 test_array [0] = 0
36677
36678   ;
36679   return 0;
36680 }
36681 _ACEOF
36682 rm -f conftest.$ac_objext
36683 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36684   (eval $ac_compile) 2>conftest.er1
36685   ac_status=$?
36686   grep -v '^ *+' conftest.er1 >conftest.err
36687   rm -f conftest.er1
36688   cat conftest.err >&5
36689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36690   (exit $ac_status); } &&
36691          { ac_try='test -z "$ac_c_werror_flag"
36692                          || test ! -s conftest.err'
36693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36694   (eval $ac_try) 2>&5
36695   ac_status=$?
36696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36697   (exit $ac_status); }; } &&
36698          { ac_try='test -s conftest.$ac_objext'
36699   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36700   (eval $ac_try) 2>&5
36701   ac_status=$?
36702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36703   (exit $ac_status); }; }; then
36704   ac_lo=$ac_mid; break
36705 else
36706   echo "$as_me: failed program was:" >&5
36707 sed 's/^/| /' conftest.$ac_ext >&5
36708
36709 ac_hi=`expr '(' $ac_mid ')' - 1`
36710                        if test $ac_mid -le $ac_hi; then
36711                          ac_lo= ac_hi=
36712                          break
36713                        fi
36714                        ac_mid=`expr 2 '*' $ac_mid`
36715 fi
36716 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36717   done
36718 else
36719   echo "$as_me: failed program was:" >&5
36720 sed 's/^/| /' conftest.$ac_ext >&5
36721
36722 ac_lo= ac_hi=
36723 fi
36724 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36725 fi
36726 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36727 # Binary search between lo and hi bounds.
36728 while test "x$ac_lo" != "x$ac_hi"; do
36729   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
36730   cat >conftest.$ac_ext <<_ACEOF
36731 /* confdefs.h.  */
36732 _ACEOF
36733 cat confdefs.h >>conftest.$ac_ext
36734 cat >>conftest.$ac_ext <<_ACEOF
36735 /* end confdefs.h.  */
36736 $ac_includes_default
36737 int
36738 main ()
36739 {
36740 static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
36741 test_array [0] = 0
36742
36743   ;
36744   return 0;
36745 }
36746 _ACEOF
36747 rm -f conftest.$ac_objext
36748 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36749   (eval $ac_compile) 2>conftest.er1
36750   ac_status=$?
36751   grep -v '^ *+' conftest.er1 >conftest.err
36752   rm -f conftest.er1
36753   cat conftest.err >&5
36754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36755   (exit $ac_status); } &&
36756          { ac_try='test -z "$ac_c_werror_flag"
36757                          || test ! -s conftest.err'
36758   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36759   (eval $ac_try) 2>&5
36760   ac_status=$?
36761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36762   (exit $ac_status); }; } &&
36763          { ac_try='test -s conftest.$ac_objext'
36764   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36765   (eval $ac_try) 2>&5
36766   ac_status=$?
36767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36768   (exit $ac_status); }; }; then
36769   ac_hi=$ac_mid
36770 else
36771   echo "$as_me: failed program was:" >&5
36772 sed 's/^/| /' conftest.$ac_ext >&5
36773
36774 ac_lo=`expr '(' $ac_mid ')' + 1`
36775 fi
36776 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36777 done
36778 case $ac_lo in
36779 ?*) ac_cv_sizeof_long_long=$ac_lo;;
36780 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
36781 See \`config.log' for more details." >&5
36782 echo "$as_me: error: cannot compute sizeof (long long), 77
36783 See \`config.log' for more details." >&2;}
36784    { (exit 1); exit 1; }; } ;;
36785 esac
36786 else
36787   if test "$cross_compiling" = yes; then
36788   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
36789 See \`config.log' for more details." >&5
36790 echo "$as_me: error: cannot run test program while cross compiling
36791 See \`config.log' for more details." >&2;}
36792    { (exit 1); exit 1; }; }
36793 else
36794   cat >conftest.$ac_ext <<_ACEOF
36795 /* confdefs.h.  */
36796 _ACEOF
36797 cat confdefs.h >>conftest.$ac_ext
36798 cat >>conftest.$ac_ext <<_ACEOF
36799 /* end confdefs.h.  */
36800 $ac_includes_default
36801 long longval () { return (long) (sizeof (long long)); }
36802 unsigned long ulongval () { return (long) (sizeof (long long)); }
36803 #include <stdio.h>
36804 #include <stdlib.h>
36805 int
36806 main ()
36807 {
36808
36809   FILE *f = fopen ("conftest.val", "w");
36810   if (! f)
36811     exit (1);
36812   if (((long) (sizeof (long long))) < 0)
36813     {
36814       long i = longval ();
36815       if (i != ((long) (sizeof (long long))))
36816         exit (1);
36817       fprintf (f, "%ld\n", i);
36818     }
36819   else
36820     {
36821       unsigned long i = ulongval ();
36822       if (i != ((long) (sizeof (long long))))
36823         exit (1);
36824       fprintf (f, "%lu\n", i);
36825     }
36826   exit (ferror (f) || fclose (f) != 0);
36827
36828   ;
36829   return 0;
36830 }
36831 _ACEOF
36832 rm -f conftest$ac_exeext
36833 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36834   (eval $ac_link) 2>&5
36835   ac_status=$?
36836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36837   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
36838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36839   (eval $ac_try) 2>&5
36840   ac_status=$?
36841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36842   (exit $ac_status); }; }; then
36843   ac_cv_sizeof_long_long=`cat conftest.val`
36844 else
36845   echo "$as_me: program exited with status $ac_status" >&5
36846 echo "$as_me: failed program was:" >&5
36847 sed 's/^/| /' conftest.$ac_ext >&5
36848
36849 ( exit $ac_status )
36850 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
36851 See \`config.log' for more details." >&5
36852 echo "$as_me: error: cannot compute sizeof (long long), 77
36853 See \`config.log' for more details." >&2;}
36854    { (exit 1); exit 1; }; }
36855 fi
36856 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
36857 fi
36858 fi
36859 rm -f conftest.val
36860 else
36861   ac_cv_sizeof_long_long=0
36862 fi
36863 fi
36864 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
36865 echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
36866 cat >>confdefs.h <<_ACEOF
36867 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
36868 _ACEOF
36869
36870
36871 echo "$as_me:$LINENO: checking for wchar_t" >&5
36872 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
36873 if test "${ac_cv_type_wchar_t+set}" = set; then
36874   echo $ECHO_N "(cached) $ECHO_C" >&6
36875 else
36876   cat >conftest.$ac_ext <<_ACEOF
36877 /* confdefs.h.  */
36878 _ACEOF
36879 cat confdefs.h >>conftest.$ac_ext
36880 cat >>conftest.$ac_ext <<_ACEOF
36881 /* end confdefs.h.  */
36882 $ac_includes_default
36883 int
36884 main ()
36885 {
36886 if ((wchar_t *) 0)
36887   return 0;
36888 if (sizeof (wchar_t))
36889   return 0;
36890   ;
36891   return 0;
36892 }
36893 _ACEOF
36894 rm -f conftest.$ac_objext
36895 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36896   (eval $ac_compile) 2>conftest.er1
36897   ac_status=$?
36898   grep -v '^ *+' conftest.er1 >conftest.err
36899   rm -f conftest.er1
36900   cat conftest.err >&5
36901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36902   (exit $ac_status); } &&
36903          { ac_try='test -z "$ac_c_werror_flag"
36904                          || test ! -s conftest.err'
36905   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36906   (eval $ac_try) 2>&5
36907   ac_status=$?
36908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36909   (exit $ac_status); }; } &&
36910          { ac_try='test -s conftest.$ac_objext'
36911   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36912   (eval $ac_try) 2>&5
36913   ac_status=$?
36914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36915   (exit $ac_status); }; }; then
36916   ac_cv_type_wchar_t=yes
36917 else
36918   echo "$as_me: failed program was:" >&5
36919 sed 's/^/| /' conftest.$ac_ext >&5
36920
36921 ac_cv_type_wchar_t=no
36922 fi
36923 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36924 fi
36925 echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
36926 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
36927
36928 echo "$as_me:$LINENO: checking size of wchar_t" >&5
36929 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
36930 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
36931   echo $ECHO_N "(cached) $ECHO_C" >&6
36932 else
36933   if test "$ac_cv_type_wchar_t" = yes; then
36934   # The cast to unsigned long works around a bug in the HP C Compiler
36935   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
36936   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
36937   # This bug is HP SR number 8606223364.
36938   if test "$cross_compiling" = yes; then
36939   # Depending upon the size, compute the lo and hi bounds.
36940 cat >conftest.$ac_ext <<_ACEOF
36941 /* confdefs.h.  */
36942 _ACEOF
36943 cat confdefs.h >>conftest.$ac_ext
36944 cat >>conftest.$ac_ext <<_ACEOF
36945 /* end confdefs.h.  */
36946 $ac_includes_default
36947 int
36948 main ()
36949 {
36950 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
36951 test_array [0] = 0
36952
36953   ;
36954   return 0;
36955 }
36956 _ACEOF
36957 rm -f conftest.$ac_objext
36958 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36959   (eval $ac_compile) 2>conftest.er1
36960   ac_status=$?
36961   grep -v '^ *+' conftest.er1 >conftest.err
36962   rm -f conftest.er1
36963   cat conftest.err >&5
36964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36965   (exit $ac_status); } &&
36966          { ac_try='test -z "$ac_c_werror_flag"
36967                          || test ! -s conftest.err'
36968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36969   (eval $ac_try) 2>&5
36970   ac_status=$?
36971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36972   (exit $ac_status); }; } &&
36973          { ac_try='test -s conftest.$ac_objext'
36974   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36975   (eval $ac_try) 2>&5
36976   ac_status=$?
36977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36978   (exit $ac_status); }; }; then
36979   ac_lo=0 ac_mid=0
36980   while :; do
36981     cat >conftest.$ac_ext <<_ACEOF
36982 /* confdefs.h.  */
36983 _ACEOF
36984 cat confdefs.h >>conftest.$ac_ext
36985 cat >>conftest.$ac_ext <<_ACEOF
36986 /* end confdefs.h.  */
36987 $ac_includes_default
36988 int
36989 main ()
36990 {
36991 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
36992 test_array [0] = 0
36993
36994   ;
36995   return 0;
36996 }
36997 _ACEOF
36998 rm -f conftest.$ac_objext
36999 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37000   (eval $ac_compile) 2>conftest.er1
37001   ac_status=$?
37002   grep -v '^ *+' conftest.er1 >conftest.err
37003   rm -f conftest.er1
37004   cat conftest.err >&5
37005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37006   (exit $ac_status); } &&
37007          { ac_try='test -z "$ac_c_werror_flag"
37008                          || test ! -s conftest.err'
37009   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37010   (eval $ac_try) 2>&5
37011   ac_status=$?
37012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37013   (exit $ac_status); }; } &&
37014          { ac_try='test -s conftest.$ac_objext'
37015   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37016   (eval $ac_try) 2>&5
37017   ac_status=$?
37018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37019   (exit $ac_status); }; }; then
37020   ac_hi=$ac_mid; break
37021 else
37022   echo "$as_me: failed program was:" >&5
37023 sed 's/^/| /' conftest.$ac_ext >&5
37024
37025 ac_lo=`expr $ac_mid + 1`
37026                     if test $ac_lo -le $ac_mid; then
37027                       ac_lo= ac_hi=
37028                       break
37029                     fi
37030                     ac_mid=`expr 2 '*' $ac_mid + 1`
37031 fi
37032 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37033   done
37034 else
37035   echo "$as_me: failed program was:" >&5
37036 sed 's/^/| /' conftest.$ac_ext >&5
37037
37038 cat >conftest.$ac_ext <<_ACEOF
37039 /* confdefs.h.  */
37040 _ACEOF
37041 cat confdefs.h >>conftest.$ac_ext
37042 cat >>conftest.$ac_ext <<_ACEOF
37043 /* end confdefs.h.  */
37044 $ac_includes_default
37045 int
37046 main ()
37047 {
37048 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
37049 test_array [0] = 0
37050
37051   ;
37052   return 0;
37053 }
37054 _ACEOF
37055 rm -f conftest.$ac_objext
37056 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37057   (eval $ac_compile) 2>conftest.er1
37058   ac_status=$?
37059   grep -v '^ *+' conftest.er1 >conftest.err
37060   rm -f conftest.er1
37061   cat conftest.err >&5
37062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37063   (exit $ac_status); } &&
37064          { ac_try='test -z "$ac_c_werror_flag"
37065                          || test ! -s conftest.err'
37066   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37067   (eval $ac_try) 2>&5
37068   ac_status=$?
37069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37070   (exit $ac_status); }; } &&
37071          { ac_try='test -s conftest.$ac_objext'
37072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37073   (eval $ac_try) 2>&5
37074   ac_status=$?
37075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37076   (exit $ac_status); }; }; then
37077   ac_hi=-1 ac_mid=-1
37078   while :; do
37079     cat >conftest.$ac_ext <<_ACEOF
37080 /* confdefs.h.  */
37081 _ACEOF
37082 cat confdefs.h >>conftest.$ac_ext
37083 cat >>conftest.$ac_ext <<_ACEOF
37084 /* end confdefs.h.  */
37085 $ac_includes_default
37086 int
37087 main ()
37088 {
37089 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
37090 test_array [0] = 0
37091
37092   ;
37093   return 0;
37094 }
37095 _ACEOF
37096 rm -f conftest.$ac_objext
37097 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37098   (eval $ac_compile) 2>conftest.er1
37099   ac_status=$?
37100   grep -v '^ *+' conftest.er1 >conftest.err
37101   rm -f conftest.er1
37102   cat conftest.err >&5
37103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37104   (exit $ac_status); } &&
37105          { ac_try='test -z "$ac_c_werror_flag"
37106                          || test ! -s conftest.err'
37107   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37108   (eval $ac_try) 2>&5
37109   ac_status=$?
37110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37111   (exit $ac_status); }; } &&
37112          { ac_try='test -s conftest.$ac_objext'
37113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37114   (eval $ac_try) 2>&5
37115   ac_status=$?
37116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37117   (exit $ac_status); }; }; then
37118   ac_lo=$ac_mid; break
37119 else
37120   echo "$as_me: failed program was:" >&5
37121 sed 's/^/| /' conftest.$ac_ext >&5
37122
37123 ac_hi=`expr '(' $ac_mid ')' - 1`
37124                        if test $ac_mid -le $ac_hi; then
37125                          ac_lo= ac_hi=
37126                          break
37127                        fi
37128                        ac_mid=`expr 2 '*' $ac_mid`
37129 fi
37130 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37131   done
37132 else
37133   echo "$as_me: failed program was:" >&5
37134 sed 's/^/| /' conftest.$ac_ext >&5
37135
37136 ac_lo= ac_hi=
37137 fi
37138 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37139 fi
37140 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37141 # Binary search between lo and hi bounds.
37142 while test "x$ac_lo" != "x$ac_hi"; do
37143   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
37144   cat >conftest.$ac_ext <<_ACEOF
37145 /* confdefs.h.  */
37146 _ACEOF
37147 cat confdefs.h >>conftest.$ac_ext
37148 cat >>conftest.$ac_ext <<_ACEOF
37149 /* end confdefs.h.  */
37150 $ac_includes_default
37151 int
37152 main ()
37153 {
37154 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
37155 test_array [0] = 0
37156
37157   ;
37158   return 0;
37159 }
37160 _ACEOF
37161 rm -f conftest.$ac_objext
37162 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37163   (eval $ac_compile) 2>conftest.er1
37164   ac_status=$?
37165   grep -v '^ *+' conftest.er1 >conftest.err
37166   rm -f conftest.er1
37167   cat conftest.err >&5
37168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37169   (exit $ac_status); } &&
37170          { ac_try='test -z "$ac_c_werror_flag"
37171                          || test ! -s conftest.err'
37172   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37173   (eval $ac_try) 2>&5
37174   ac_status=$?
37175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37176   (exit $ac_status); }; } &&
37177          { ac_try='test -s conftest.$ac_objext'
37178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37179   (eval $ac_try) 2>&5
37180   ac_status=$?
37181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37182   (exit $ac_status); }; }; then
37183   ac_hi=$ac_mid
37184 else
37185   echo "$as_me: failed program was:" >&5
37186 sed 's/^/| /' conftest.$ac_ext >&5
37187
37188 ac_lo=`expr '(' $ac_mid ')' + 1`
37189 fi
37190 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37191 done
37192 case $ac_lo in
37193 ?*) ac_cv_sizeof_wchar_t=$ac_lo;;
37194 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
37195 See \`config.log' for more details." >&5
37196 echo "$as_me: error: cannot compute sizeof (wchar_t), 77
37197 See \`config.log' for more details." >&2;}
37198    { (exit 1); exit 1; }; } ;;
37199 esac
37200 else
37201   if test "$cross_compiling" = yes; then
37202   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
37203 See \`config.log' for more details." >&5
37204 echo "$as_me: error: cannot run test program while cross compiling
37205 See \`config.log' for more details." >&2;}
37206    { (exit 1); exit 1; }; }
37207 else
37208   cat >conftest.$ac_ext <<_ACEOF
37209 /* confdefs.h.  */
37210 _ACEOF
37211 cat confdefs.h >>conftest.$ac_ext
37212 cat >>conftest.$ac_ext <<_ACEOF
37213 /* end confdefs.h.  */
37214 $ac_includes_default
37215 long longval () { return (long) (sizeof (wchar_t)); }
37216 unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
37217 #include <stdio.h>
37218 #include <stdlib.h>
37219 int
37220 main ()
37221 {
37222
37223   FILE *f = fopen ("conftest.val", "w");
37224   if (! f)
37225     exit (1);
37226   if (((long) (sizeof (wchar_t))) < 0)
37227     {
37228       long i = longval ();
37229       if (i != ((long) (sizeof (wchar_t))))
37230         exit (1);
37231       fprintf (f, "%ld\n", i);
37232     }
37233   else
37234     {
37235       unsigned long i = ulongval ();
37236       if (i != ((long) (sizeof (wchar_t))))
37237         exit (1);
37238       fprintf (f, "%lu\n", i);
37239     }
37240   exit (ferror (f) || fclose (f) != 0);
37241
37242   ;
37243   return 0;
37244 }
37245 _ACEOF
37246 rm -f conftest$ac_exeext
37247 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37248   (eval $ac_link) 2>&5
37249   ac_status=$?
37250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37251   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
37252   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37253   (eval $ac_try) 2>&5
37254   ac_status=$?
37255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37256   (exit $ac_status); }; }; then
37257   ac_cv_sizeof_wchar_t=`cat conftest.val`
37258 else
37259   echo "$as_me: program exited with status $ac_status" >&5
37260 echo "$as_me: failed program was:" >&5
37261 sed 's/^/| /' conftest.$ac_ext >&5
37262
37263 ( exit $ac_status )
37264 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
37265 See \`config.log' for more details." >&5
37266 echo "$as_me: error: cannot compute sizeof (wchar_t), 77
37267 See \`config.log' for more details." >&2;}
37268    { (exit 1); exit 1; }; }
37269 fi
37270 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
37271 fi
37272 fi
37273 rm -f conftest.val
37274 else
37275   ac_cv_sizeof_wchar_t=0
37276 fi
37277 fi
37278 echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
37279 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
37280 cat >>confdefs.h <<_ACEOF
37281 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
37282 _ACEOF
37283
37284
37285
37286 if test "$ac_cv_sizeof_int" -lt 4 ; then
37287         { echo "$as_me:$LINENO: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&5
37288 echo "$as_me: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&2;}
37289
37290
37291 cat >>confdefs.h <<\_ACEOF
37292 #define LBER_INT_T long
37293 _ACEOF
37294
37295 else
37296
37297 cat >>confdefs.h <<\_ACEOF
37298 #define LBER_INT_T int
37299 _ACEOF
37300
37301 fi
37302
37303
37304 cat >>confdefs.h <<\_ACEOF
37305 #define LBER_LEN_T long
37306 _ACEOF
37307
37308
37309 cat >>confdefs.h <<\_ACEOF
37310 #define LBER_SOCKET_T int
37311 _ACEOF
37312
37313
37314 cat >>confdefs.h <<\_ACEOF
37315 #define LBER_TAG_T long
37316 _ACEOF
37317
37318
37319 if test $ol_with_mp = longlong || test $ol_with_mp = auto ; then
37320         if test $ac_cv_sizeof_long_long -gt 4 ; then
37321                 ol_with_mp=longlong
37322
37323 cat >>confdefs.h <<\_ACEOF
37324 #define USE_MP_LONG_LONG 1
37325 _ACEOF
37326
37327         elif test $ol_with_mp = longlong ; then
37328                 { { echo "$as_me:$LINENO: error: long long unusable for multiple precision" >&5
37329 echo "$as_me: error: long long unusable for multiple precision" >&2;}
37330    { (exit 1); exit 1; }; }
37331         fi
37332 fi
37333 if test $ol_with_mp = long || test $ol_with_mp = auto ; then
37334         if test $ac_cv_sizeof_long -gt 4 ; then
37335                 ol_with_mp=long
37336
37337 cat >>confdefs.h <<\_ACEOF
37338 #define USE_MP_LONG 1
37339 _ACEOF
37340
37341         elif test $ol_with_mp = long ; then
37342                 { { echo "$as_me:$LINENO: error: long unusable for multiple precision" >&5
37343 echo "$as_me: error: long unusable for multiple precision" >&2;}
37344    { (exit 1); exit 1; }; }
37345         fi
37346 fi
37347 if test $ol_with_mp = bignum || test $ol_with_mp = auto ; then
37348
37349 for ac_header in openssl/bn.h
37350 do
37351 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
37352 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37353   echo "$as_me:$LINENO: checking for $ac_header" >&5
37354 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37355 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37356   echo $ECHO_N "(cached) $ECHO_C" >&6
37357 fi
37358 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37359 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37360 else
37361   # Is the header compilable?
37362 echo "$as_me:$LINENO: checking $ac_header usability" >&5
37363 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
37364 cat >conftest.$ac_ext <<_ACEOF
37365 /* confdefs.h.  */
37366 _ACEOF
37367 cat confdefs.h >>conftest.$ac_ext
37368 cat >>conftest.$ac_ext <<_ACEOF
37369 /* end confdefs.h.  */
37370 $ac_includes_default
37371 #include <$ac_header>
37372 _ACEOF
37373 rm -f conftest.$ac_objext
37374 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37375   (eval $ac_compile) 2>conftest.er1
37376   ac_status=$?
37377   grep -v '^ *+' conftest.er1 >conftest.err
37378   rm -f conftest.er1
37379   cat conftest.err >&5
37380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37381   (exit $ac_status); } &&
37382          { ac_try='test -z "$ac_c_werror_flag"
37383                          || test ! -s conftest.err'
37384   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37385   (eval $ac_try) 2>&5
37386   ac_status=$?
37387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37388   (exit $ac_status); }; } &&
37389          { ac_try='test -s conftest.$ac_objext'
37390   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37391   (eval $ac_try) 2>&5
37392   ac_status=$?
37393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37394   (exit $ac_status); }; }; then
37395   ac_header_compiler=yes
37396 else
37397   echo "$as_me: failed program was:" >&5
37398 sed 's/^/| /' conftest.$ac_ext >&5
37399
37400 ac_header_compiler=no
37401 fi
37402 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37403 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
37404 echo "${ECHO_T}$ac_header_compiler" >&6
37405
37406 # Is the header present?
37407 echo "$as_me:$LINENO: checking $ac_header presence" >&5
37408 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
37409 cat >conftest.$ac_ext <<_ACEOF
37410 /* confdefs.h.  */
37411 _ACEOF
37412 cat confdefs.h >>conftest.$ac_ext
37413 cat >>conftest.$ac_ext <<_ACEOF
37414 /* end confdefs.h.  */
37415 #include <$ac_header>
37416 _ACEOF
37417 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
37418   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
37419   ac_status=$?
37420   grep -v '^ *+' conftest.er1 >conftest.err
37421   rm -f conftest.er1
37422   cat conftest.err >&5
37423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37424   (exit $ac_status); } >/dev/null; then
37425   if test -s conftest.err; then
37426     ac_cpp_err=$ac_c_preproc_warn_flag
37427     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
37428   else
37429     ac_cpp_err=
37430   fi
37431 else
37432   ac_cpp_err=yes
37433 fi
37434 if test -z "$ac_cpp_err"; then
37435   ac_header_preproc=yes
37436 else
37437   echo "$as_me: failed program was:" >&5
37438 sed 's/^/| /' conftest.$ac_ext >&5
37439
37440   ac_header_preproc=no
37441 fi
37442 rm -f conftest.err conftest.$ac_ext
37443 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
37444 echo "${ECHO_T}$ac_header_preproc" >&6
37445
37446 # So?  What about this header?
37447 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
37448   yes:no: )
37449     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
37450 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
37451     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
37452 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
37453     ac_header_preproc=yes
37454     ;;
37455   no:yes:* )
37456     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
37457 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
37458     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
37459 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
37460     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
37461 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
37462     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
37463 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
37464     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
37465 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
37466     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
37467 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
37468     (
37469       cat <<\_ASBOX
37470 ## --------------------------------------------- ##
37471 ## Report this to <http://www.openldap.org/its/> ##
37472 ## --------------------------------------------- ##
37473 _ASBOX
37474     ) |
37475       sed "s/^/$as_me: WARNING:     /" >&2
37476     ;;
37477 esac
37478 echo "$as_me:$LINENO: checking for $ac_header" >&5
37479 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37480 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37481   echo $ECHO_N "(cached) $ECHO_C" >&6
37482 else
37483   eval "$as_ac_Header=\$ac_header_preproc"
37484 fi
37485 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37486 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37487
37488 fi
37489 if test `eval echo '${'$as_ac_Header'}'` = yes; then
37490   cat >>confdefs.h <<_ACEOF
37491 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
37492 _ACEOF
37493
37494 fi
37495
37496 done
37497
37498
37499 for ac_header in openssl/crypto.h
37500 do
37501 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
37502 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37503   echo "$as_me:$LINENO: checking for $ac_header" >&5
37504 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37505 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37506   echo $ECHO_N "(cached) $ECHO_C" >&6
37507 fi
37508 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37509 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37510 else
37511   # Is the header compilable?
37512 echo "$as_me:$LINENO: checking $ac_header usability" >&5
37513 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
37514 cat >conftest.$ac_ext <<_ACEOF
37515 /* confdefs.h.  */
37516 _ACEOF
37517 cat confdefs.h >>conftest.$ac_ext
37518 cat >>conftest.$ac_ext <<_ACEOF
37519 /* end confdefs.h.  */
37520 $ac_includes_default
37521 #include <$ac_header>
37522 _ACEOF
37523 rm -f conftest.$ac_objext
37524 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37525   (eval $ac_compile) 2>conftest.er1
37526   ac_status=$?
37527   grep -v '^ *+' conftest.er1 >conftest.err
37528   rm -f conftest.er1
37529   cat conftest.err >&5
37530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37531   (exit $ac_status); } &&
37532          { ac_try='test -z "$ac_c_werror_flag"
37533                          || test ! -s conftest.err'
37534   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37535   (eval $ac_try) 2>&5
37536   ac_status=$?
37537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37538   (exit $ac_status); }; } &&
37539          { ac_try='test -s conftest.$ac_objext'
37540   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37541   (eval $ac_try) 2>&5
37542   ac_status=$?
37543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37544   (exit $ac_status); }; }; then
37545   ac_header_compiler=yes
37546 else
37547   echo "$as_me: failed program was:" >&5
37548 sed 's/^/| /' conftest.$ac_ext >&5
37549
37550 ac_header_compiler=no
37551 fi
37552 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37553 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
37554 echo "${ECHO_T}$ac_header_compiler" >&6
37555
37556 # Is the header present?
37557 echo "$as_me:$LINENO: checking $ac_header presence" >&5
37558 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
37559 cat >conftest.$ac_ext <<_ACEOF
37560 /* confdefs.h.  */
37561 _ACEOF
37562 cat confdefs.h >>conftest.$ac_ext
37563 cat >>conftest.$ac_ext <<_ACEOF
37564 /* end confdefs.h.  */
37565 #include <$ac_header>
37566 _ACEOF
37567 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
37568   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
37569   ac_status=$?
37570   grep -v '^ *+' conftest.er1 >conftest.err
37571   rm -f conftest.er1
37572   cat conftest.err >&5
37573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37574   (exit $ac_status); } >/dev/null; then
37575   if test -s conftest.err; then
37576     ac_cpp_err=$ac_c_preproc_warn_flag
37577     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
37578   else
37579     ac_cpp_err=
37580   fi
37581 else
37582   ac_cpp_err=yes
37583 fi
37584 if test -z "$ac_cpp_err"; then
37585   ac_header_preproc=yes
37586 else
37587   echo "$as_me: failed program was:" >&5
37588 sed 's/^/| /' conftest.$ac_ext >&5
37589
37590   ac_header_preproc=no
37591 fi
37592 rm -f conftest.err conftest.$ac_ext
37593 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
37594 echo "${ECHO_T}$ac_header_preproc" >&6
37595
37596 # So?  What about this header?
37597 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
37598   yes:no: )
37599     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
37600 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
37601     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
37602 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
37603     ac_header_preproc=yes
37604     ;;
37605   no:yes:* )
37606     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
37607 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
37608     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
37609 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
37610     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
37611 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
37612     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
37613 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
37614     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
37615 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
37616     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
37617 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
37618     (
37619       cat <<\_ASBOX
37620 ## --------------------------------------------- ##
37621 ## Report this to <http://www.openldap.org/its/> ##
37622 ## --------------------------------------------- ##
37623 _ASBOX
37624     ) |
37625       sed "s/^/$as_me: WARNING:     /" >&2
37626     ;;
37627 esac
37628 echo "$as_me:$LINENO: checking for $ac_header" >&5
37629 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37630 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37631   echo $ECHO_N "(cached) $ECHO_C" >&6
37632 else
37633   eval "$as_ac_Header=\$ac_header_preproc"
37634 fi
37635 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37636 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37637
37638 fi
37639 if test `eval echo '${'$as_ac_Header'}'` = yes; then
37640   cat >>confdefs.h <<_ACEOF
37641 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
37642 _ACEOF
37643
37644 fi
37645
37646 done
37647
37648         if test "$ac_cv_header_openssl_bn_h" = "yes" &&
37649                 test "$ac_cv_header_openssl_crypto_h" = "yes" &&
37650                 test "$ol_with_tls" = "found" ; then
37651                 ol_with_mp=bignum
37652
37653 cat >>confdefs.h <<\_ACEOF
37654 #define USE_MP_BIGNUM 1
37655 _ACEOF
37656
37657         elif test $ol_with_mp = bignum ; then
37658                 { { echo "$as_me:$LINENO: error: bignum not available" >&5
37659 echo "$as_me: error: bignum not available" >&2;}
37660    { (exit 1); exit 1; }; }
37661         fi
37662 fi
37663 if test $ol_with_mp = gmp || test $ol_with_mp = auto ; then
37664
37665 for ac_header in gmp.h
37666 do
37667 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
37668 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37669   echo "$as_me:$LINENO: checking for $ac_header" >&5
37670 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37671 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37672   echo $ECHO_N "(cached) $ECHO_C" >&6
37673 fi
37674 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37675 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37676 else
37677   # Is the header compilable?
37678 echo "$as_me:$LINENO: checking $ac_header usability" >&5
37679 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
37680 cat >conftest.$ac_ext <<_ACEOF
37681 /* confdefs.h.  */
37682 _ACEOF
37683 cat confdefs.h >>conftest.$ac_ext
37684 cat >>conftest.$ac_ext <<_ACEOF
37685 /* end confdefs.h.  */
37686 $ac_includes_default
37687 #include <$ac_header>
37688 _ACEOF
37689 rm -f conftest.$ac_objext
37690 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37691   (eval $ac_compile) 2>conftest.er1
37692   ac_status=$?
37693   grep -v '^ *+' conftest.er1 >conftest.err
37694   rm -f conftest.er1
37695   cat conftest.err >&5
37696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37697   (exit $ac_status); } &&
37698          { ac_try='test -z "$ac_c_werror_flag"
37699                          || test ! -s conftest.err'
37700   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37701   (eval $ac_try) 2>&5
37702   ac_status=$?
37703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37704   (exit $ac_status); }; } &&
37705          { ac_try='test -s conftest.$ac_objext'
37706   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37707   (eval $ac_try) 2>&5
37708   ac_status=$?
37709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37710   (exit $ac_status); }; }; then
37711   ac_header_compiler=yes
37712 else
37713   echo "$as_me: failed program was:" >&5
37714 sed 's/^/| /' conftest.$ac_ext >&5
37715
37716 ac_header_compiler=no
37717 fi
37718 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37719 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
37720 echo "${ECHO_T}$ac_header_compiler" >&6
37721
37722 # Is the header present?
37723 echo "$as_me:$LINENO: checking $ac_header presence" >&5
37724 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
37725 cat >conftest.$ac_ext <<_ACEOF
37726 /* confdefs.h.  */
37727 _ACEOF
37728 cat confdefs.h >>conftest.$ac_ext
37729 cat >>conftest.$ac_ext <<_ACEOF
37730 /* end confdefs.h.  */
37731 #include <$ac_header>
37732 _ACEOF
37733 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
37734   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
37735   ac_status=$?
37736   grep -v '^ *+' conftest.er1 >conftest.err
37737   rm -f conftest.er1
37738   cat conftest.err >&5
37739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37740   (exit $ac_status); } >/dev/null; then
37741   if test -s conftest.err; then
37742     ac_cpp_err=$ac_c_preproc_warn_flag
37743     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
37744   else
37745     ac_cpp_err=
37746   fi
37747 else
37748   ac_cpp_err=yes
37749 fi
37750 if test -z "$ac_cpp_err"; then
37751   ac_header_preproc=yes
37752 else
37753   echo "$as_me: failed program was:" >&5
37754 sed 's/^/| /' conftest.$ac_ext >&5
37755
37756   ac_header_preproc=no
37757 fi
37758 rm -f conftest.err conftest.$ac_ext
37759 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
37760 echo "${ECHO_T}$ac_header_preproc" >&6
37761
37762 # So?  What about this header?
37763 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
37764   yes:no: )
37765     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
37766 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
37767     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
37768 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
37769     ac_header_preproc=yes
37770     ;;
37771   no:yes:* )
37772     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
37773 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
37774     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
37775 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
37776     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
37777 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
37778     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
37779 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
37780     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
37781 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
37782     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
37783 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
37784     (
37785       cat <<\_ASBOX
37786 ## --------------------------------------------- ##
37787 ## Report this to <http://www.openldap.org/its/> ##
37788 ## --------------------------------------------- ##
37789 _ASBOX
37790     ) |
37791       sed "s/^/$as_me: WARNING:     /" >&2
37792     ;;
37793 esac
37794 echo "$as_me:$LINENO: checking for $ac_header" >&5
37795 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37796 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37797   echo $ECHO_N "(cached) $ECHO_C" >&6
37798 else
37799   eval "$as_ac_Header=\$ac_header_preproc"
37800 fi
37801 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37802 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37803
37804 fi
37805 if test `eval echo '${'$as_ac_Header'}'` = yes; then
37806   cat >>confdefs.h <<_ACEOF
37807 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
37808 _ACEOF
37809
37810 fi
37811
37812 done
37813
37814
37815 echo "$as_me:$LINENO: checking for __gmpz_add_ui in -lgmp" >&5
37816 echo $ECHO_N "checking for __gmpz_add_ui in -lgmp... $ECHO_C" >&6
37817 if test "${ac_cv_lib_gmp___gmpz_add_ui+set}" = set; then
37818   echo $ECHO_N "(cached) $ECHO_C" >&6
37819 else
37820   ac_check_lib_save_LIBS=$LIBS
37821 LIBS="-lgmp  $LIBS"
37822 cat >conftest.$ac_ext <<_ACEOF
37823 /* confdefs.h.  */
37824 _ACEOF
37825 cat confdefs.h >>conftest.$ac_ext
37826 cat >>conftest.$ac_ext <<_ACEOF
37827 /* end confdefs.h.  */
37828
37829 /* Override any gcc2 internal prototype to avoid an error.  */
37830 #ifdef __cplusplus
37831 extern "C"
37832 #endif
37833 /* We use char because int might match the return type of a gcc2
37834    builtin and then its argument prototype would still apply.  */
37835 char __gmpz_add_ui ();
37836 int
37837 main ()
37838 {
37839 __gmpz_add_ui ();
37840   ;
37841   return 0;
37842 }
37843 _ACEOF
37844 rm -f conftest.$ac_objext conftest$ac_exeext
37845 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37846   (eval $ac_link) 2>conftest.er1
37847   ac_status=$?
37848   grep -v '^ *+' conftest.er1 >conftest.err
37849   rm -f conftest.er1
37850   cat conftest.err >&5
37851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37852   (exit $ac_status); } &&
37853          { ac_try='test -z "$ac_c_werror_flag"
37854                          || test ! -s conftest.err'
37855   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37856   (eval $ac_try) 2>&5
37857   ac_status=$?
37858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37859   (exit $ac_status); }; } &&
37860          { ac_try='test -s conftest$ac_exeext'
37861   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37862   (eval $ac_try) 2>&5
37863   ac_status=$?
37864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37865   (exit $ac_status); }; }; then
37866   ac_cv_lib_gmp___gmpz_add_ui=yes
37867 else
37868   echo "$as_me: failed program was:" >&5
37869 sed 's/^/| /' conftest.$ac_ext >&5
37870
37871 ac_cv_lib_gmp___gmpz_add_ui=no
37872 fi
37873 rm -f conftest.err conftest.$ac_objext \
37874       conftest$ac_exeext conftest.$ac_ext
37875 LIBS=$ac_check_lib_save_LIBS
37876 fi
37877 echo "$as_me:$LINENO: result: $ac_cv_lib_gmp___gmpz_add_ui" >&5
37878 echo "${ECHO_T}$ac_cv_lib_gmp___gmpz_add_ui" >&6
37879 if test $ac_cv_lib_gmp___gmpz_add_ui = yes; then
37880   cat >>confdefs.h <<_ACEOF
37881 #define HAVE_LIBGMP 1
37882 _ACEOF
37883
37884   LIBS="-lgmp $LIBS"
37885
37886 fi
37887
37888         if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp = yes ; then
37889
37890 cat >>confdefs.h <<\_ACEOF
37891 #define USE_MP_GMP 1
37892 _ACEOF
37893
37894                 ol_with_mp=gmp
37895         elif test $ol_with_mp = gmp ; then
37896                 { { echo "$as_me:$LINENO: error: gmp not available" >&5
37897 echo "$as_me: error: gmp not available" >&2;}
37898    { (exit 1); exit 1; }; }
37899         fi
37900 fi
37901 if test $ol_with_mp = auto ; then
37902         ol_with_mp=no
37903 fi
37904
37905 echo "$as_me:$LINENO: checking for working memcmp" >&5
37906 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
37907 if test "${ac_cv_func_memcmp_working+set}" = set; then
37908   echo $ECHO_N "(cached) $ECHO_C" >&6
37909 else
37910   if test "$cross_compiling" = yes; then
37911   ac_cv_func_memcmp_working=no
37912 else
37913   cat >conftest.$ac_ext <<_ACEOF
37914 /* confdefs.h.  */
37915 _ACEOF
37916 cat confdefs.h >>conftest.$ac_ext
37917 cat >>conftest.$ac_ext <<_ACEOF
37918 /* end confdefs.h.  */
37919 $ac_includes_default
37920 int
37921 main ()
37922 {
37923
37924   /* Some versions of memcmp are not 8-bit clean.  */
37925   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
37926   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
37927     exit (1);
37928
37929   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
37930      or more and with at least one buffer not starting on a 4-byte boundary.
37931      William Lewis provided this test program.   */
37932   {
37933     char foo[21];
37934     char bar[21];
37935     int i;
37936     for (i = 0; i < 4; i++)
37937       {
37938         char *a = foo + i;
37939         char *b = bar + i;
37940         strcpy (a, "--------01111111");
37941         strcpy (b, "--------10000000");
37942         if (memcmp (a, b, 16) >= 0)
37943           exit (1);
37944       }
37945     exit (0);
37946   }
37947
37948   ;
37949   return 0;
37950 }
37951 _ACEOF
37952 rm -f conftest$ac_exeext
37953 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37954   (eval $ac_link) 2>&5
37955   ac_status=$?
37956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37957   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
37958   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37959   (eval $ac_try) 2>&5
37960   ac_status=$?
37961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37962   (exit $ac_status); }; }; then
37963   ac_cv_func_memcmp_working=yes
37964 else
37965   echo "$as_me: program exited with status $ac_status" >&5
37966 echo "$as_me: failed program was:" >&5
37967 sed 's/^/| /' conftest.$ac_ext >&5
37968
37969 ( exit $ac_status )
37970 ac_cv_func_memcmp_working=no
37971 fi
37972 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
37973 fi
37974 fi
37975 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
37976 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
37977 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
37978     "memcmp.$ac_objext"   | \
37979   *" memcmp.$ac_objext"   | \
37980     "memcmp.$ac_objext "* | \
37981   *" memcmp.$ac_objext "* ) ;;
37982   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
37983 esac
37984
37985
37986
37987 if test $ac_cv_func_memcmp_working = no ; then
37988
37989 cat >>confdefs.h <<\_ACEOF
37990 #define NEED_MEMCMP_REPLACEMENT 1
37991 _ACEOF
37992
37993 fi
37994
37995
37996 for ac_func in strftime
37997 do
37998 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
37999 echo "$as_me:$LINENO: checking for $ac_func" >&5
38000 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
38001 if eval "test \"\${$as_ac_var+set}\" = set"; then
38002   echo $ECHO_N "(cached) $ECHO_C" >&6
38003 else
38004   cat >conftest.$ac_ext <<_ACEOF
38005 /* confdefs.h.  */
38006 _ACEOF
38007 cat confdefs.h >>conftest.$ac_ext
38008 cat >>conftest.$ac_ext <<_ACEOF
38009 /* end confdefs.h.  */
38010 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
38011    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
38012 #define $ac_func innocuous_$ac_func
38013
38014 /* System header to define __stub macros and hopefully few prototypes,
38015     which can conflict with char $ac_func (); below.
38016     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
38017     <limits.h> exists even on freestanding compilers.  */
38018
38019 #ifdef __STDC__
38020 # include <limits.h>
38021 #else
38022 # include <assert.h>
38023 #endif
38024
38025 #undef $ac_func
38026
38027 /* Override any gcc2 internal prototype to avoid an error.  */
38028 #ifdef __cplusplus
38029 extern "C"
38030 {
38031 #endif
38032 /* We use char because int might match the return type of a gcc2
38033    builtin and then its argument prototype would still apply.  */
38034 char $ac_func ();
38035 /* The GNU C library defines this for functions which it implements
38036     to always fail with ENOSYS.  Some functions are actually named
38037     something starting with __ and the normal name is an alias.  */
38038 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
38039 choke me
38040 #else
38041 char (*f) () = $ac_func;
38042 #endif
38043 #ifdef __cplusplus
38044 }
38045 #endif
38046
38047 int
38048 main ()
38049 {
38050 return f != $ac_func;
38051   ;
38052   return 0;
38053 }
38054 _ACEOF
38055 rm -f conftest.$ac_objext conftest$ac_exeext
38056 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38057   (eval $ac_link) 2>conftest.er1
38058   ac_status=$?
38059   grep -v '^ *+' conftest.er1 >conftest.err
38060   rm -f conftest.er1
38061   cat conftest.err >&5
38062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38063   (exit $ac_status); } &&
38064          { ac_try='test -z "$ac_c_werror_flag"
38065                          || test ! -s conftest.err'
38066   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38067   (eval $ac_try) 2>&5
38068   ac_status=$?
38069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38070   (exit $ac_status); }; } &&
38071          { ac_try='test -s conftest$ac_exeext'
38072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38073   (eval $ac_try) 2>&5
38074   ac_status=$?
38075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38076   (exit $ac_status); }; }; then
38077   eval "$as_ac_var=yes"
38078 else
38079   echo "$as_me: failed program was:" >&5
38080 sed 's/^/| /' conftest.$ac_ext >&5
38081
38082 eval "$as_ac_var=no"
38083 fi
38084 rm -f conftest.err conftest.$ac_objext \
38085       conftest$ac_exeext conftest.$ac_ext
38086 fi
38087 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
38088 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
38089 if test `eval echo '${'$as_ac_var'}'` = yes; then
38090   cat >>confdefs.h <<_ACEOF
38091 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
38092 _ACEOF
38093
38094 else
38095   # strftime is in -lintl on SCO UNIX.
38096 echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
38097 echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
38098 if test "${ac_cv_lib_intl_strftime+set}" = set; then
38099   echo $ECHO_N "(cached) $ECHO_C" >&6
38100 else
38101   ac_check_lib_save_LIBS=$LIBS
38102 LIBS="-lintl  $LIBS"
38103 cat >conftest.$ac_ext <<_ACEOF
38104 /* confdefs.h.  */
38105 _ACEOF
38106 cat confdefs.h >>conftest.$ac_ext
38107 cat >>conftest.$ac_ext <<_ACEOF
38108 /* end confdefs.h.  */
38109
38110 /* Override any gcc2 internal prototype to avoid an error.  */
38111 #ifdef __cplusplus
38112 extern "C"
38113 #endif
38114 /* We use char because int might match the return type of a gcc2
38115    builtin and then its argument prototype would still apply.  */
38116 char strftime ();
38117 int
38118 main ()
38119 {
38120 strftime ();
38121   ;
38122   return 0;
38123 }
38124 _ACEOF
38125 rm -f conftest.$ac_objext conftest$ac_exeext
38126 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38127   (eval $ac_link) 2>conftest.er1
38128   ac_status=$?
38129   grep -v '^ *+' conftest.er1 >conftest.err
38130   rm -f conftest.er1
38131   cat conftest.err >&5
38132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38133   (exit $ac_status); } &&
38134          { ac_try='test -z "$ac_c_werror_flag"
38135                          || test ! -s conftest.err'
38136   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38137   (eval $ac_try) 2>&5
38138   ac_status=$?
38139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38140   (exit $ac_status); }; } &&
38141          { ac_try='test -s conftest$ac_exeext'
38142   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38143   (eval $ac_try) 2>&5
38144   ac_status=$?
38145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38146   (exit $ac_status); }; }; then
38147   ac_cv_lib_intl_strftime=yes
38148 else
38149   echo "$as_me: failed program was:" >&5
38150 sed 's/^/| /' conftest.$ac_ext >&5
38151
38152 ac_cv_lib_intl_strftime=no
38153 fi
38154 rm -f conftest.err conftest.$ac_objext \
38155       conftest$ac_exeext conftest.$ac_ext
38156 LIBS=$ac_check_lib_save_LIBS
38157 fi
38158 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
38159 echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
38160 if test $ac_cv_lib_intl_strftime = yes; then
38161   cat >>confdefs.h <<\_ACEOF
38162 #define HAVE_STRFTIME 1
38163 _ACEOF
38164
38165 LIBS="-lintl $LIBS"
38166 fi
38167
38168 fi
38169 done
38170
38171
38172 echo "$as_me:$LINENO: checking for inet_aton()" >&5
38173 echo $ECHO_N "checking for inet_aton()... $ECHO_C" >&6
38174 if test "${ol_cv_func_inet_aton+set}" = set; then
38175   echo $ECHO_N "(cached) $ECHO_C" >&6
38176 else
38177   cat >conftest.$ac_ext <<_ACEOF
38178 /* confdefs.h.  */
38179 _ACEOF
38180 cat confdefs.h >>conftest.$ac_ext
38181 cat >>conftest.$ac_ext <<_ACEOF
38182 /* end confdefs.h.  */
38183
38184 #ifdef HAVE_SYS_TYPES_H
38185 #       include <sys/types.h>
38186 #endif
38187 #ifdef HAVE_SYS_SOCKET_H
38188 #       include <sys/socket.h>
38189 #       ifdef HAVE_SYS_SELECT_H
38190 #               include <sys/select.h>
38191 #       endif
38192 #       include <netinet/in.h>
38193 #       ifdef HAVE_ARPA_INET_H
38194 #               include <arpa/inet.h>
38195 #       endif
38196 #endif
38197
38198 int
38199 main ()
38200 {
38201 struct in_addr in;
38202 int rc = inet_aton( "255.255.255.255", &in );
38203   ;
38204   return 0;
38205 }
38206 _ACEOF
38207 rm -f conftest.$ac_objext conftest$ac_exeext
38208 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38209   (eval $ac_link) 2>conftest.er1
38210   ac_status=$?
38211   grep -v '^ *+' conftest.er1 >conftest.err
38212   rm -f conftest.er1
38213   cat conftest.err >&5
38214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38215   (exit $ac_status); } &&
38216          { ac_try='test -z "$ac_c_werror_flag"
38217                          || test ! -s conftest.err'
38218   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38219   (eval $ac_try) 2>&5
38220   ac_status=$?
38221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38222   (exit $ac_status); }; } &&
38223          { ac_try='test -s conftest$ac_exeext'
38224   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38225   (eval $ac_try) 2>&5
38226   ac_status=$?
38227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38228   (exit $ac_status); }; }; then
38229   ol_cv_func_inet_aton=yes
38230 else
38231   echo "$as_me: failed program was:" >&5
38232 sed 's/^/| /' conftest.$ac_ext >&5
38233
38234 ol_cv_func_inet_aton=no
38235 fi
38236 rm -f conftest.err conftest.$ac_objext \
38237       conftest$ac_exeext conftest.$ac_ext
38238 fi
38239 echo "$as_me:$LINENO: result: $ol_cv_func_inet_aton" >&5
38240 echo "${ECHO_T}$ol_cv_func_inet_aton" >&6
38241   if test $ol_cv_func_inet_aton != no; then
38242
38243 cat >>confdefs.h <<\_ACEOF
38244 #define HAVE_INET_ATON 1
38245 _ACEOF
38246
38247   fi
38248
38249
38250 echo "$as_me:$LINENO: checking for _spawnlp" >&5
38251 echo $ECHO_N "checking for _spawnlp... $ECHO_C" >&6
38252 if test "${ac_cv_func__spawnlp+set}" = set; then
38253   echo $ECHO_N "(cached) $ECHO_C" >&6
38254 else
38255   cat >conftest.$ac_ext <<_ACEOF
38256 /* confdefs.h.  */
38257 _ACEOF
38258 cat confdefs.h >>conftest.$ac_ext
38259 cat >>conftest.$ac_ext <<_ACEOF
38260 /* end confdefs.h.  */
38261 /* Define _spawnlp to an innocuous variant, in case <limits.h> declares _spawnlp.
38262    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
38263 #define _spawnlp innocuous__spawnlp
38264
38265 /* System header to define __stub macros and hopefully few prototypes,
38266     which can conflict with char _spawnlp (); below.
38267     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
38268     <limits.h> exists even on freestanding compilers.  */
38269
38270 #ifdef __STDC__
38271 # include <limits.h>
38272 #else
38273 # include <assert.h>
38274 #endif
38275
38276 #undef _spawnlp
38277
38278 /* Override any gcc2 internal prototype to avoid an error.  */
38279 #ifdef __cplusplus
38280 extern "C"
38281 {
38282 #endif
38283 /* We use char because int might match the return type of a gcc2
38284    builtin and then its argument prototype would still apply.  */
38285 char _spawnlp ();
38286 /* The GNU C library defines this for functions which it implements
38287     to always fail with ENOSYS.  Some functions are actually named
38288     something starting with __ and the normal name is an alias.  */
38289 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
38290 choke me
38291 #else
38292 char (*f) () = _spawnlp;
38293 #endif
38294 #ifdef __cplusplus
38295 }
38296 #endif
38297
38298 int
38299 main ()
38300 {
38301 return f != _spawnlp;
38302   ;
38303   return 0;
38304 }
38305 _ACEOF
38306 rm -f conftest.$ac_objext conftest$ac_exeext
38307 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38308   (eval $ac_link) 2>conftest.er1
38309   ac_status=$?
38310   grep -v '^ *+' conftest.er1 >conftest.err
38311   rm -f conftest.er1
38312   cat conftest.err >&5
38313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38314   (exit $ac_status); } &&
38315          { ac_try='test -z "$ac_c_werror_flag"
38316                          || test ! -s conftest.err'
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); }; } &&
38322          { ac_try='test -s conftest$ac_exeext'
38323   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38324   (eval $ac_try) 2>&5
38325   ac_status=$?
38326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38327   (exit $ac_status); }; }; then
38328   ac_cv_func__spawnlp=yes
38329 else
38330   echo "$as_me: failed program was:" >&5
38331 sed 's/^/| /' conftest.$ac_ext >&5
38332
38333 ac_cv_func__spawnlp=no
38334 fi
38335 rm -f conftest.err conftest.$ac_objext \
38336       conftest$ac_exeext conftest.$ac_ext
38337 fi
38338 echo "$as_me:$LINENO: result: $ac_cv_func__spawnlp" >&5
38339 echo "${ECHO_T}$ac_cv_func__spawnlp" >&6
38340 if test $ac_cv_func__spawnlp = yes; then
38341
38342 cat >>confdefs.h <<\_ACEOF
38343 #define HAVE_SPAWNLP 1
38344 _ACEOF
38345
38346 fi
38347
38348
38349 echo "$as_me:$LINENO: checking for _snprintf" >&5
38350 echo $ECHO_N "checking for _snprintf... $ECHO_C" >&6
38351 if test "${ac_cv_func__snprintf+set}" = set; then
38352   echo $ECHO_N "(cached) $ECHO_C" >&6
38353 else
38354   cat >conftest.$ac_ext <<_ACEOF
38355 /* confdefs.h.  */
38356 _ACEOF
38357 cat confdefs.h >>conftest.$ac_ext
38358 cat >>conftest.$ac_ext <<_ACEOF
38359 /* end confdefs.h.  */
38360 /* Define _snprintf to an innocuous variant, in case <limits.h> declares _snprintf.
38361    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
38362 #define _snprintf innocuous__snprintf
38363
38364 /* System header to define __stub macros and hopefully few prototypes,
38365     which can conflict with char _snprintf (); below.
38366     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
38367     <limits.h> exists even on freestanding compilers.  */
38368
38369 #ifdef __STDC__
38370 # include <limits.h>
38371 #else
38372 # include <assert.h>
38373 #endif
38374
38375 #undef _snprintf
38376
38377 /* Override any gcc2 internal prototype to avoid an error.  */
38378 #ifdef __cplusplus
38379 extern "C"
38380 {
38381 #endif
38382 /* We use char because int might match the return type of a gcc2
38383    builtin and then its argument prototype would still apply.  */
38384 char _snprintf ();
38385 /* The GNU C library defines this for functions which it implements
38386     to always fail with ENOSYS.  Some functions are actually named
38387     something starting with __ and the normal name is an alias.  */
38388 #if defined (__stub__snprintf) || defined (__stub____snprintf)
38389 choke me
38390 #else
38391 char (*f) () = _snprintf;
38392 #endif
38393 #ifdef __cplusplus
38394 }
38395 #endif
38396
38397 int
38398 main ()
38399 {
38400 return f != _snprintf;
38401   ;
38402   return 0;
38403 }
38404 _ACEOF
38405 rm -f conftest.$ac_objext conftest$ac_exeext
38406 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38407   (eval $ac_link) 2>conftest.er1
38408   ac_status=$?
38409   grep -v '^ *+' conftest.er1 >conftest.err
38410   rm -f conftest.er1
38411   cat conftest.err >&5
38412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38413   (exit $ac_status); } &&
38414          { ac_try='test -z "$ac_c_werror_flag"
38415                          || test ! -s conftest.err'
38416   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38417   (eval $ac_try) 2>&5
38418   ac_status=$?
38419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38420   (exit $ac_status); }; } &&
38421          { ac_try='test -s conftest$ac_exeext'
38422   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38423   (eval $ac_try) 2>&5
38424   ac_status=$?
38425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38426   (exit $ac_status); }; }; then
38427   ac_cv_func__snprintf=yes
38428 else
38429   echo "$as_me: failed program was:" >&5
38430 sed 's/^/| /' conftest.$ac_ext >&5
38431
38432 ac_cv_func__snprintf=no
38433 fi
38434 rm -f conftest.err conftest.$ac_objext \
38435       conftest$ac_exeext conftest.$ac_ext
38436 fi
38437 echo "$as_me:$LINENO: result: $ac_cv_func__snprintf" >&5
38438 echo "${ECHO_T}$ac_cv_func__snprintf" >&6
38439 if test $ac_cv_func__snprintf = yes; then
38440   ac_cv_func_snprintf=yes
38441
38442 cat >>confdefs.h <<\_ACEOF
38443 #define snprintf _snprintf
38444 _ACEOF
38445
38446
38447 fi
38448
38449
38450 echo "$as_me:$LINENO: checking for _vsnprintf" >&5
38451 echo $ECHO_N "checking for _vsnprintf... $ECHO_C" >&6
38452 if test "${ac_cv_func__vsnprintf+set}" = set; then
38453   echo $ECHO_N "(cached) $ECHO_C" >&6
38454 else
38455   cat >conftest.$ac_ext <<_ACEOF
38456 /* confdefs.h.  */
38457 _ACEOF
38458 cat confdefs.h >>conftest.$ac_ext
38459 cat >>conftest.$ac_ext <<_ACEOF
38460 /* end confdefs.h.  */
38461 /* Define _vsnprintf to an innocuous variant, in case <limits.h> declares _vsnprintf.
38462    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
38463 #define _vsnprintf innocuous__vsnprintf
38464
38465 /* System header to define __stub macros and hopefully few prototypes,
38466     which can conflict with char _vsnprintf (); below.
38467     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
38468     <limits.h> exists even on freestanding compilers.  */
38469
38470 #ifdef __STDC__
38471 # include <limits.h>
38472 #else
38473 # include <assert.h>
38474 #endif
38475
38476 #undef _vsnprintf
38477
38478 /* Override any gcc2 internal prototype to avoid an error.  */
38479 #ifdef __cplusplus
38480 extern "C"
38481 {
38482 #endif
38483 /* We use char because int might match the return type of a gcc2
38484    builtin and then its argument prototype would still apply.  */
38485 char _vsnprintf ();
38486 /* The GNU C library defines this for functions which it implements
38487     to always fail with ENOSYS.  Some functions are actually named
38488     something starting with __ and the normal name is an alias.  */
38489 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
38490 choke me
38491 #else
38492 char (*f) () = _vsnprintf;
38493 #endif
38494 #ifdef __cplusplus
38495 }
38496 #endif
38497
38498 int
38499 main ()
38500 {
38501 return f != _vsnprintf;
38502   ;
38503   return 0;
38504 }
38505 _ACEOF
38506 rm -f conftest.$ac_objext conftest$ac_exeext
38507 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38508   (eval $ac_link) 2>conftest.er1
38509   ac_status=$?
38510   grep -v '^ *+' conftest.er1 >conftest.err
38511   rm -f conftest.er1
38512   cat conftest.err >&5
38513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38514   (exit $ac_status); } &&
38515          { ac_try='test -z "$ac_c_werror_flag"
38516                          || test ! -s conftest.err'
38517   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38518   (eval $ac_try) 2>&5
38519   ac_status=$?
38520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38521   (exit $ac_status); }; } &&
38522          { ac_try='test -s conftest$ac_exeext'
38523   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38524   (eval $ac_try) 2>&5
38525   ac_status=$?
38526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38527   (exit $ac_status); }; }; then
38528   ac_cv_func__vsnprintf=yes
38529 else
38530   echo "$as_me: failed program was:" >&5
38531 sed 's/^/| /' conftest.$ac_ext >&5
38532
38533 ac_cv_func__vsnprintf=no
38534 fi
38535 rm -f conftest.err conftest.$ac_objext \
38536       conftest$ac_exeext conftest.$ac_ext
38537 fi
38538 echo "$as_me:$LINENO: result: $ac_cv_func__vsnprintf" >&5
38539 echo "${ECHO_T}$ac_cv_func__vsnprintf" >&6
38540 if test $ac_cv_func__vsnprintf = yes; then
38541   ac_cv_func_vsnprintf=yes
38542
38543 cat >>confdefs.h <<\_ACEOF
38544 #define vsnprintf _vsnprintf
38545 _ACEOF
38546
38547
38548 fi
38549
38550
38551
38552 for ac_func in vprintf
38553 do
38554 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
38555 echo "$as_me:$LINENO: checking for $ac_func" >&5
38556 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
38557 if eval "test \"\${$as_ac_var+set}\" = set"; then
38558   echo $ECHO_N "(cached) $ECHO_C" >&6
38559 else
38560   cat >conftest.$ac_ext <<_ACEOF
38561 /* confdefs.h.  */
38562 _ACEOF
38563 cat confdefs.h >>conftest.$ac_ext
38564 cat >>conftest.$ac_ext <<_ACEOF
38565 /* end confdefs.h.  */
38566 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
38567    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
38568 #define $ac_func innocuous_$ac_func
38569
38570 /* System header to define __stub macros and hopefully few prototypes,
38571     which can conflict with char $ac_func (); below.
38572     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
38573     <limits.h> exists even on freestanding compilers.  */
38574
38575 #ifdef __STDC__
38576 # include <limits.h>
38577 #else
38578 # include <assert.h>
38579 #endif
38580
38581 #undef $ac_func
38582
38583 /* Override any gcc2 internal prototype to avoid an error.  */
38584 #ifdef __cplusplus
38585 extern "C"
38586 {
38587 #endif
38588 /* We use char because int might match the return type of a gcc2
38589    builtin and then its argument prototype would still apply.  */
38590 char $ac_func ();
38591 /* The GNU C library defines this for functions which it implements
38592     to always fail with ENOSYS.  Some functions are actually named
38593     something starting with __ and the normal name is an alias.  */
38594 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
38595 choke me
38596 #else
38597 char (*f) () = $ac_func;
38598 #endif
38599 #ifdef __cplusplus
38600 }
38601 #endif
38602
38603 int
38604 main ()
38605 {
38606 return f != $ac_func;
38607   ;
38608   return 0;
38609 }
38610 _ACEOF
38611 rm -f conftest.$ac_objext conftest$ac_exeext
38612 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38613   (eval $ac_link) 2>conftest.er1
38614   ac_status=$?
38615   grep -v '^ *+' conftest.er1 >conftest.err
38616   rm -f conftest.er1
38617   cat conftest.err >&5
38618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38619   (exit $ac_status); } &&
38620          { ac_try='test -z "$ac_c_werror_flag"
38621                          || test ! -s conftest.err'
38622   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38623   (eval $ac_try) 2>&5
38624   ac_status=$?
38625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38626   (exit $ac_status); }; } &&
38627          { ac_try='test -s conftest$ac_exeext'
38628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38629   (eval $ac_try) 2>&5
38630   ac_status=$?
38631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38632   (exit $ac_status); }; }; then
38633   eval "$as_ac_var=yes"
38634 else
38635   echo "$as_me: failed program was:" >&5
38636 sed 's/^/| /' conftest.$ac_ext >&5
38637
38638 eval "$as_ac_var=no"
38639 fi
38640 rm -f conftest.err conftest.$ac_objext \
38641       conftest$ac_exeext conftest.$ac_ext
38642 fi
38643 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
38644 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
38645 if test `eval echo '${'$as_ac_var'}'` = yes; then
38646   cat >>confdefs.h <<_ACEOF
38647 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
38648 _ACEOF
38649
38650 echo "$as_me:$LINENO: checking for _doprnt" >&5
38651 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
38652 if test "${ac_cv_func__doprnt+set}" = set; then
38653   echo $ECHO_N "(cached) $ECHO_C" >&6
38654 else
38655   cat >conftest.$ac_ext <<_ACEOF
38656 /* confdefs.h.  */
38657 _ACEOF
38658 cat confdefs.h >>conftest.$ac_ext
38659 cat >>conftest.$ac_ext <<_ACEOF
38660 /* end confdefs.h.  */
38661 /* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
38662    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
38663 #define _doprnt innocuous__doprnt
38664
38665 /* System header to define __stub macros and hopefully few prototypes,
38666     which can conflict with char _doprnt (); below.
38667     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
38668     <limits.h> exists even on freestanding compilers.  */
38669
38670 #ifdef __STDC__
38671 # include <limits.h>
38672 #else
38673 # include <assert.h>
38674 #endif
38675
38676 #undef _doprnt
38677
38678 /* Override any gcc2 internal prototype to avoid an error.  */
38679 #ifdef __cplusplus
38680 extern "C"
38681 {
38682 #endif
38683 /* We use char because int might match the return type of a gcc2
38684    builtin and then its argument prototype would still apply.  */
38685 char _doprnt ();
38686 /* The GNU C library defines this for functions which it implements
38687     to always fail with ENOSYS.  Some functions are actually named
38688     something starting with __ and the normal name is an alias.  */
38689 #if defined (__stub__doprnt) || defined (__stub____doprnt)
38690 choke me
38691 #else
38692 char (*f) () = _doprnt;
38693 #endif
38694 #ifdef __cplusplus
38695 }
38696 #endif
38697
38698 int
38699 main ()
38700 {
38701 return f != _doprnt;
38702   ;
38703   return 0;
38704 }
38705 _ACEOF
38706 rm -f conftest.$ac_objext conftest$ac_exeext
38707 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38708   (eval $ac_link) 2>conftest.er1
38709   ac_status=$?
38710   grep -v '^ *+' conftest.er1 >conftest.err
38711   rm -f conftest.er1
38712   cat conftest.err >&5
38713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38714   (exit $ac_status); } &&
38715          { ac_try='test -z "$ac_c_werror_flag"
38716                          || test ! -s conftest.err'
38717   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38718   (eval $ac_try) 2>&5
38719   ac_status=$?
38720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38721   (exit $ac_status); }; } &&
38722          { ac_try='test -s conftest$ac_exeext'
38723   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38724   (eval $ac_try) 2>&5
38725   ac_status=$?
38726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38727   (exit $ac_status); }; }; then
38728   ac_cv_func__doprnt=yes
38729 else
38730   echo "$as_me: failed program was:" >&5
38731 sed 's/^/| /' conftest.$ac_ext >&5
38732
38733 ac_cv_func__doprnt=no
38734 fi
38735 rm -f conftest.err conftest.$ac_objext \
38736       conftest$ac_exeext conftest.$ac_ext
38737 fi
38738 echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
38739 echo "${ECHO_T}$ac_cv_func__doprnt" >&6
38740 if test $ac_cv_func__doprnt = yes; then
38741
38742 cat >>confdefs.h <<\_ACEOF
38743 #define HAVE_DOPRNT 1
38744 _ACEOF
38745
38746 fi
38747
38748 fi
38749 done
38750
38751
38752
38753 if test $ac_cv_func_vprintf = yes ; then
38754
38755
38756 for ac_func in snprintf vsnprintf
38757 do
38758 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
38759 echo "$as_me:$LINENO: checking for $ac_func" >&5
38760 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
38761 if eval "test \"\${$as_ac_var+set}\" = set"; then
38762   echo $ECHO_N "(cached) $ECHO_C" >&6
38763 else
38764   cat >conftest.$ac_ext <<_ACEOF
38765 /* confdefs.h.  */
38766 _ACEOF
38767 cat confdefs.h >>conftest.$ac_ext
38768 cat >>conftest.$ac_ext <<_ACEOF
38769 /* end confdefs.h.  */
38770 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
38771    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
38772 #define $ac_func innocuous_$ac_func
38773
38774 /* System header to define __stub macros and hopefully few prototypes,
38775     which can conflict with char $ac_func (); below.
38776     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
38777     <limits.h> exists even on freestanding compilers.  */
38778
38779 #ifdef __STDC__
38780 # include <limits.h>
38781 #else
38782 # include <assert.h>
38783 #endif
38784
38785 #undef $ac_func
38786
38787 /* Override any gcc2 internal prototype to avoid an error.  */
38788 #ifdef __cplusplus
38789 extern "C"
38790 {
38791 #endif
38792 /* We use char because int might match the return type of a gcc2
38793    builtin and then its argument prototype would still apply.  */
38794 char $ac_func ();
38795 /* The GNU C library defines this for functions which it implements
38796     to always fail with ENOSYS.  Some functions are actually named
38797     something starting with __ and the normal name is an alias.  */
38798 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
38799 choke me
38800 #else
38801 char (*f) () = $ac_func;
38802 #endif
38803 #ifdef __cplusplus
38804 }
38805 #endif
38806
38807 int
38808 main ()
38809 {
38810 return f != $ac_func;
38811   ;
38812   return 0;
38813 }
38814 _ACEOF
38815 rm -f conftest.$ac_objext conftest$ac_exeext
38816 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38817   (eval $ac_link) 2>conftest.er1
38818   ac_status=$?
38819   grep -v '^ *+' conftest.er1 >conftest.err
38820   rm -f conftest.er1
38821   cat conftest.err >&5
38822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38823   (exit $ac_status); } &&
38824          { ac_try='test -z "$ac_c_werror_flag"
38825                          || test ! -s conftest.err'
38826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38827   (eval $ac_try) 2>&5
38828   ac_status=$?
38829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38830   (exit $ac_status); }; } &&
38831          { ac_try='test -s conftest$ac_exeext'
38832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38833   (eval $ac_try) 2>&5
38834   ac_status=$?
38835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38836   (exit $ac_status); }; }; then
38837   eval "$as_ac_var=yes"
38838 else
38839   echo "$as_me: failed program was:" >&5
38840 sed 's/^/| /' conftest.$ac_ext >&5
38841
38842 eval "$as_ac_var=no"
38843 fi
38844 rm -f conftest.err conftest.$ac_objext \
38845       conftest$ac_exeext conftest.$ac_ext
38846 fi
38847 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
38848 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
38849 if test `eval echo '${'$as_ac_var'}'` = yes; then
38850   cat >>confdefs.h <<_ACEOF
38851 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
38852 _ACEOF
38853
38854 fi
38855 done
38856
38857 fi
38858
38859
38860
38861
38862
38863
38864
38865
38866
38867
38868
38869
38870
38871
38872
38873
38874
38875
38876
38877
38878
38879
38880
38881
38882
38883
38884
38885
38886
38887
38888
38889
38890
38891
38892
38893
38894
38895
38896
38897
38898
38899
38900
38901
38902
38903
38904
38905
38906
38907
38908
38909
38910
38911
38912
38913 for ac_func in \
38914         bcopy                   \
38915         closesocket             \
38916         chroot                  \
38917         endgrent                \
38918         endpwent                \
38919         fcntl                   \
38920         flock                   \
38921         fstat                   \
38922         getdtablesize   \
38923         getgrgid                \
38924         gethostname             \
38925         getpass                 \
38926         getpassphrase   \
38927         getpwuid                \
38928         getpwnam                \
38929         getspnam                \
38930         gettimeofday    \
38931         initgroups              \
38932         inet_ntoa_b             \
38933         lockf                   \
38934         memcpy                  \
38935         memmove                 \
38936         memrchr                 \
38937         mkstemp                 \
38938         mktemp                  \
38939         pipe                    \
38940         read                    \
38941         recv                    \
38942         recvfrom                \
38943         setpwfile               \
38944         setgid                  \
38945         setegid                 \
38946         setsid                  \
38947         setuid                  \
38948         seteuid                 \
38949         signal                  \
38950         strdup                  \
38951         strpbrk                 \
38952         strrchr                 \
38953         strsep                  \
38954         strstr                  \
38955         strtol                  \
38956         strtoul                 \
38957         strtoq                  \
38958         strtouq                 \
38959         strtoll                 \
38960         strspn                  \
38961         sysconf                 \
38962         waitpid                 \
38963         wait4                   \
38964         write                   \
38965         send                    \
38966         sendmsg                 \
38967         sendto                  \
38968
38969 do
38970 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
38971 echo "$as_me:$LINENO: checking for $ac_func" >&5
38972 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
38973 if eval "test \"\${$as_ac_var+set}\" = set"; then
38974   echo $ECHO_N "(cached) $ECHO_C" >&6
38975 else
38976   cat >conftest.$ac_ext <<_ACEOF
38977 /* confdefs.h.  */
38978 _ACEOF
38979 cat confdefs.h >>conftest.$ac_ext
38980 cat >>conftest.$ac_ext <<_ACEOF
38981 /* end confdefs.h.  */
38982 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
38983    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
38984 #define $ac_func innocuous_$ac_func
38985
38986 /* System header to define __stub macros and hopefully few prototypes,
38987     which can conflict with char $ac_func (); below.
38988     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
38989     <limits.h> exists even on freestanding compilers.  */
38990
38991 #ifdef __STDC__
38992 # include <limits.h>
38993 #else
38994 # include <assert.h>
38995 #endif
38996
38997 #undef $ac_func
38998
38999 /* Override any gcc2 internal prototype to avoid an error.  */
39000 #ifdef __cplusplus
39001 extern "C"
39002 {
39003 #endif
39004 /* We use char because int might match the return type of a gcc2
39005    builtin and then its argument prototype would still apply.  */
39006 char $ac_func ();
39007 /* The GNU C library defines this for functions which it implements
39008     to always fail with ENOSYS.  Some functions are actually named
39009     something starting with __ and the normal name is an alias.  */
39010 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
39011 choke me
39012 #else
39013 char (*f) () = $ac_func;
39014 #endif
39015 #ifdef __cplusplus
39016 }
39017 #endif
39018
39019 int
39020 main ()
39021 {
39022 return f != $ac_func;
39023   ;
39024   return 0;
39025 }
39026 _ACEOF
39027 rm -f conftest.$ac_objext conftest$ac_exeext
39028 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
39029   (eval $ac_link) 2>conftest.er1
39030   ac_status=$?
39031   grep -v '^ *+' conftest.er1 >conftest.err
39032   rm -f conftest.er1
39033   cat conftest.err >&5
39034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39035   (exit $ac_status); } &&
39036          { ac_try='test -z "$ac_c_werror_flag"
39037                          || test ! -s conftest.err'
39038   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39039   (eval $ac_try) 2>&5
39040   ac_status=$?
39041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39042   (exit $ac_status); }; } &&
39043          { ac_try='test -s conftest$ac_exeext'
39044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39045   (eval $ac_try) 2>&5
39046   ac_status=$?
39047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39048   (exit $ac_status); }; }; then
39049   eval "$as_ac_var=yes"
39050 else
39051   echo "$as_me: failed program was:" >&5
39052 sed 's/^/| /' conftest.$ac_ext >&5
39053
39054 eval "$as_ac_var=no"
39055 fi
39056 rm -f conftest.err conftest.$ac_objext \
39057       conftest$ac_exeext conftest.$ac_ext
39058 fi
39059 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
39060 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
39061 if test `eval echo '${'$as_ac_var'}'` = yes; then
39062   cat >>confdefs.h <<_ACEOF
39063 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
39064 _ACEOF
39065
39066 fi
39067 done
39068
39069
39070
39071
39072 for ac_func in getopt getpeereid
39073 do
39074 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
39075 echo "$as_me:$LINENO: checking for $ac_func" >&5
39076 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
39077 if eval "test \"\${$as_ac_var+set}\" = set"; then
39078   echo $ECHO_N "(cached) $ECHO_C" >&6
39079 else
39080   cat >conftest.$ac_ext <<_ACEOF
39081 /* confdefs.h.  */
39082 _ACEOF
39083 cat confdefs.h >>conftest.$ac_ext
39084 cat >>conftest.$ac_ext <<_ACEOF
39085 /* end confdefs.h.  */
39086 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
39087    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
39088 #define $ac_func innocuous_$ac_func
39089
39090 /* System header to define __stub macros and hopefully few prototypes,
39091     which can conflict with char $ac_func (); below.
39092     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
39093     <limits.h> exists even on freestanding compilers.  */
39094
39095 #ifdef __STDC__
39096 # include <limits.h>
39097 #else
39098 # include <assert.h>
39099 #endif
39100
39101 #undef $ac_func
39102
39103 /* Override any gcc2 internal prototype to avoid an error.  */
39104 #ifdef __cplusplus
39105 extern "C"
39106 {
39107 #endif
39108 /* We use char because int might match the return type of a gcc2
39109    builtin and then its argument prototype would still apply.  */
39110 char $ac_func ();
39111 /* The GNU C library defines this for functions which it implements
39112     to always fail with ENOSYS.  Some functions are actually named
39113     something starting with __ and the normal name is an alias.  */
39114 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
39115 choke me
39116 #else
39117 char (*f) () = $ac_func;
39118 #endif
39119 #ifdef __cplusplus
39120 }
39121 #endif
39122
39123 int
39124 main ()
39125 {
39126 return f != $ac_func;
39127   ;
39128   return 0;
39129 }
39130 _ACEOF
39131 rm -f conftest.$ac_objext conftest$ac_exeext
39132 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
39133   (eval $ac_link) 2>conftest.er1
39134   ac_status=$?
39135   grep -v '^ *+' conftest.er1 >conftest.err
39136   rm -f conftest.er1
39137   cat conftest.err >&5
39138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39139   (exit $ac_status); } &&
39140          { ac_try='test -z "$ac_c_werror_flag"
39141                          || test ! -s conftest.err'
39142   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39143   (eval $ac_try) 2>&5
39144   ac_status=$?
39145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39146   (exit $ac_status); }; } &&
39147          { ac_try='test -s conftest$ac_exeext'
39148   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39149   (eval $ac_try) 2>&5
39150   ac_status=$?
39151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39152   (exit $ac_status); }; }; then
39153   eval "$as_ac_var=yes"
39154 else
39155   echo "$as_me: failed program was:" >&5
39156 sed 's/^/| /' conftest.$ac_ext >&5
39157
39158 eval "$as_ac_var=no"
39159 fi
39160 rm -f conftest.err conftest.$ac_objext \
39161       conftest$ac_exeext conftest.$ac_ext
39162 fi
39163 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
39164 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
39165 if test `eval echo '${'$as_ac_var'}'` = yes; then
39166   cat >>confdefs.h <<_ACEOF
39167 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
39168 _ACEOF
39169
39170 else
39171   case $LIBOBJS in
39172     "$ac_func.$ac_objext"   | \
39173   *" $ac_func.$ac_objext"   | \
39174     "$ac_func.$ac_objext "* | \
39175   *" $ac_func.$ac_objext "* ) ;;
39176   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
39177 esac
39178
39179 fi
39180 done
39181
39182
39183
39184 if test "$ac_cv_func_getopt" != yes; then
39185         LIBSRCS="$LIBSRCS getopt.c"
39186 fi
39187
39188 if test "$ac_cv_func_getpeereid" != yes; then
39189
39190 for ac_func in getpeerucred
39191 do
39192 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
39193 echo "$as_me:$LINENO: checking for $ac_func" >&5
39194 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
39195 if eval "test \"\${$as_ac_var+set}\" = set"; then
39196   echo $ECHO_N "(cached) $ECHO_C" >&6
39197 else
39198   cat >conftest.$ac_ext <<_ACEOF
39199 /* confdefs.h.  */
39200 _ACEOF
39201 cat confdefs.h >>conftest.$ac_ext
39202 cat >>conftest.$ac_ext <<_ACEOF
39203 /* end confdefs.h.  */
39204 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
39205    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
39206 #define $ac_func innocuous_$ac_func
39207
39208 /* System header to define __stub macros and hopefully few prototypes,
39209     which can conflict with char $ac_func (); below.
39210     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
39211     <limits.h> exists even on freestanding compilers.  */
39212
39213 #ifdef __STDC__
39214 # include <limits.h>
39215 #else
39216 # include <assert.h>
39217 #endif
39218
39219 #undef $ac_func
39220
39221 /* Override any gcc2 internal prototype to avoid an error.  */
39222 #ifdef __cplusplus
39223 extern "C"
39224 {
39225 #endif
39226 /* We use char because int might match the return type of a gcc2
39227    builtin and then its argument prototype would still apply.  */
39228 char $ac_func ();
39229 /* The GNU C library defines this for functions which it implements
39230     to always fail with ENOSYS.  Some functions are actually named
39231     something starting with __ and the normal name is an alias.  */
39232 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
39233 choke me
39234 #else
39235 char (*f) () = $ac_func;
39236 #endif
39237 #ifdef __cplusplus
39238 }
39239 #endif
39240
39241 int
39242 main ()
39243 {
39244 return f != $ac_func;
39245   ;
39246   return 0;
39247 }
39248 _ACEOF
39249 rm -f conftest.$ac_objext conftest$ac_exeext
39250 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
39251   (eval $ac_link) 2>conftest.er1
39252   ac_status=$?
39253   grep -v '^ *+' conftest.er1 >conftest.err
39254   rm -f conftest.er1
39255   cat conftest.err >&5
39256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39257   (exit $ac_status); } &&
39258          { ac_try='test -z "$ac_c_werror_flag"
39259                          || test ! -s conftest.err'
39260   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39261   (eval $ac_try) 2>&5
39262   ac_status=$?
39263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39264   (exit $ac_status); }; } &&
39265          { ac_try='test -s conftest$ac_exeext'
39266   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39267   (eval $ac_try) 2>&5
39268   ac_status=$?
39269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39270   (exit $ac_status); }; }; then
39271   eval "$as_ac_var=yes"
39272 else
39273   echo "$as_me: failed program was:" >&5
39274 sed 's/^/| /' conftest.$ac_ext >&5
39275
39276 eval "$as_ac_var=no"
39277 fi
39278 rm -f conftest.err conftest.$ac_objext \
39279       conftest$ac_exeext conftest.$ac_ext
39280 fi
39281 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
39282 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
39283 if test `eval echo '${'$as_ac_var'}'` = yes; then
39284   cat >>confdefs.h <<_ACEOF
39285 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
39286 _ACEOF
39287
39288 fi
39289 done
39290
39291         if test "$ac_cv_func_getpeerucred" != yes ; then
39292                 echo "$as_me:$LINENO: checking for struct msghdr.msg_accrightslen" >&5
39293 echo $ECHO_N "checking for struct msghdr.msg_accrightslen... $ECHO_C" >&6
39294 if test "${ac_cv_member_struct_msghdr_msg_accrightslen+set}" = set; then
39295   echo $ECHO_N "(cached) $ECHO_C" >&6
39296 else
39297   cat >conftest.$ac_ext <<_ACEOF
39298 /* confdefs.h.  */
39299 _ACEOF
39300 cat confdefs.h >>conftest.$ac_ext
39301 cat >>conftest.$ac_ext <<_ACEOF
39302 /* end confdefs.h.  */
39303 $ac_includes_default
39304 #ifdef HAVE_SYS_SOCKET_H
39305 #include <sys/socket.h>
39306 #endif
39307
39308 int
39309 main ()
39310 {
39311 static struct msghdr ac_aggr;
39312 if (ac_aggr.msg_accrightslen)
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_msghdr_msg_accrightslen=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 #ifdef HAVE_SYS_SOCKET_H
39353 #include <sys/socket.h>
39354 #endif
39355
39356 int
39357 main ()
39358 {
39359 static struct msghdr ac_aggr;
39360 if (sizeof ac_aggr.msg_accrightslen)
39361 return 0;
39362   ;
39363   return 0;
39364 }
39365 _ACEOF
39366 rm -f conftest.$ac_objext
39367 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39368   (eval $ac_compile) 2>conftest.er1
39369   ac_status=$?
39370   grep -v '^ *+' conftest.er1 >conftest.err
39371   rm -f conftest.er1
39372   cat conftest.err >&5
39373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39374   (exit $ac_status); } &&
39375          { ac_try='test -z "$ac_c_werror_flag"
39376                          || test ! -s conftest.err'
39377   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39378   (eval $ac_try) 2>&5
39379   ac_status=$?
39380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39381   (exit $ac_status); }; } &&
39382          { ac_try='test -s conftest.$ac_objext'
39383   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39384   (eval $ac_try) 2>&5
39385   ac_status=$?
39386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39387   (exit $ac_status); }; }; then
39388   ac_cv_member_struct_msghdr_msg_accrightslen=yes
39389 else
39390   echo "$as_me: failed program was:" >&5
39391 sed 's/^/| /' conftest.$ac_ext >&5
39392
39393 ac_cv_member_struct_msghdr_msg_accrightslen=no
39394 fi
39395 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39396 fi
39397 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39398 fi
39399 echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_accrightslen" >&5
39400 echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_accrightslen" >&6
39401 if test $ac_cv_member_struct_msghdr_msg_accrightslen = yes; then
39402
39403 cat >>confdefs.h <<_ACEOF
39404 #define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTSLEN 1
39405 _ACEOF
39406
39407
39408 fi
39409
39410                 if test "$ac_cv_member_struct_msghdr_msg_accrightslen" != yes; then
39411                         echo "$as_me:$LINENO: checking for struct msghdr.msg_control" >&5
39412 echo $ECHO_N "checking for struct msghdr.msg_control... $ECHO_C" >&6
39413 if test "${ac_cv_member_struct_msghdr_msg_control+set}" = set; then
39414   echo $ECHO_N "(cached) $ECHO_C" >&6
39415 else
39416   cat >conftest.$ac_ext <<_ACEOF
39417 /* confdefs.h.  */
39418 _ACEOF
39419 cat confdefs.h >>conftest.$ac_ext
39420 cat >>conftest.$ac_ext <<_ACEOF
39421 /* end confdefs.h.  */
39422 $ac_includes_default
39423 #ifdef HAVE_SYS_SOCKET_H
39424 #include <sys/socket.h>
39425 #endif
39426
39427 int
39428 main ()
39429 {
39430 static struct msghdr ac_aggr;
39431 if (ac_aggr.msg_control)
39432 return 0;
39433   ;
39434   return 0;
39435 }
39436 _ACEOF
39437 rm -f conftest.$ac_objext
39438 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39439   (eval $ac_compile) 2>conftest.er1
39440   ac_status=$?
39441   grep -v '^ *+' conftest.er1 >conftest.err
39442   rm -f conftest.er1
39443   cat conftest.err >&5
39444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39445   (exit $ac_status); } &&
39446          { ac_try='test -z "$ac_c_werror_flag"
39447                          || test ! -s conftest.err'
39448   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39449   (eval $ac_try) 2>&5
39450   ac_status=$?
39451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39452   (exit $ac_status); }; } &&
39453          { ac_try='test -s conftest.$ac_objext'
39454   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39455   (eval $ac_try) 2>&5
39456   ac_status=$?
39457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39458   (exit $ac_status); }; }; then
39459   ac_cv_member_struct_msghdr_msg_control=yes
39460 else
39461   echo "$as_me: failed program was:" >&5
39462 sed 's/^/| /' conftest.$ac_ext >&5
39463
39464 cat >conftest.$ac_ext <<_ACEOF
39465 /* confdefs.h.  */
39466 _ACEOF
39467 cat confdefs.h >>conftest.$ac_ext
39468 cat >>conftest.$ac_ext <<_ACEOF
39469 /* end confdefs.h.  */
39470 $ac_includes_default
39471 #ifdef HAVE_SYS_SOCKET_H
39472 #include <sys/socket.h>
39473 #endif
39474
39475 int
39476 main ()
39477 {
39478 static struct msghdr ac_aggr;
39479 if (sizeof ac_aggr.msg_control)
39480 return 0;
39481   ;
39482   return 0;
39483 }
39484 _ACEOF
39485 rm -f conftest.$ac_objext
39486 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39487   (eval $ac_compile) 2>conftest.er1
39488   ac_status=$?
39489   grep -v '^ *+' conftest.er1 >conftest.err
39490   rm -f conftest.er1
39491   cat conftest.err >&5
39492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39493   (exit $ac_status); } &&
39494          { ac_try='test -z "$ac_c_werror_flag"
39495                          || test ! -s conftest.err'
39496   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39497   (eval $ac_try) 2>&5
39498   ac_status=$?
39499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39500   (exit $ac_status); }; } &&
39501          { ac_try='test -s conftest.$ac_objext'
39502   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39503   (eval $ac_try) 2>&5
39504   ac_status=$?
39505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39506   (exit $ac_status); }; }; then
39507   ac_cv_member_struct_msghdr_msg_control=yes
39508 else
39509   echo "$as_me: failed program was:" >&5
39510 sed 's/^/| /' conftest.$ac_ext >&5
39511
39512 ac_cv_member_struct_msghdr_msg_control=no
39513 fi
39514 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39515 fi
39516 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39517 fi
39518 echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_control" >&5
39519 echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_control" >&6
39520 if test $ac_cv_member_struct_msghdr_msg_control = yes; then
39521
39522 cat >>confdefs.h <<_ACEOF
39523 #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
39524 _ACEOF
39525
39526
39527 fi
39528
39529                 fi
39530         fi
39531         LIBSRCS="$LIBSRCS getpeereid.c"
39532 fi
39533
39534 if test "$ac_cv_func_snprintf" != yes ||
39535    test "$ac_cv_func_vsnprintf" != yes; then
39536         if test "$ac_cv_func_snprintf" != yes; then
39537
39538 cat >>confdefs.h <<\_ACEOF
39539 #define snprintf ber_pvt_snprintf
39540 _ACEOF
39541
39542         fi
39543         if test "$ac_cv_func_vsnprintf" != yes; then
39544
39545 cat >>confdefs.h <<\_ACEOF
39546 #define vsnprintf ber_pvt_vsnprintf
39547 _ACEOF
39548
39549         fi
39550 fi
39551
39552
39553 if test "$ol_enable_slapi" != no ; then
39554
39555 for ac_header in ltdl.h
39556 do
39557 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
39558 if eval "test \"\${$as_ac_Header+set}\" = set"; then
39559   echo "$as_me:$LINENO: checking for $ac_header" >&5
39560 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
39561 if eval "test \"\${$as_ac_Header+set}\" = set"; then
39562   echo $ECHO_N "(cached) $ECHO_C" >&6
39563 fi
39564 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
39565 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
39566 else
39567   # Is the header compilable?
39568 echo "$as_me:$LINENO: checking $ac_header usability" >&5
39569 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
39570 cat >conftest.$ac_ext <<_ACEOF
39571 /* confdefs.h.  */
39572 _ACEOF
39573 cat confdefs.h >>conftest.$ac_ext
39574 cat >>conftest.$ac_ext <<_ACEOF
39575 /* end confdefs.h.  */
39576 $ac_includes_default
39577 #include <$ac_header>
39578 _ACEOF
39579 rm -f conftest.$ac_objext
39580 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39581   (eval $ac_compile) 2>conftest.er1
39582   ac_status=$?
39583   grep -v '^ *+' conftest.er1 >conftest.err
39584   rm -f conftest.er1
39585   cat conftest.err >&5
39586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39587   (exit $ac_status); } &&
39588          { ac_try='test -z "$ac_c_werror_flag"
39589                          || test ! -s conftest.err'
39590   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39591   (eval $ac_try) 2>&5
39592   ac_status=$?
39593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39594   (exit $ac_status); }; } &&
39595          { ac_try='test -s conftest.$ac_objext'
39596   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39597   (eval $ac_try) 2>&5
39598   ac_status=$?
39599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39600   (exit $ac_status); }; }; then
39601   ac_header_compiler=yes
39602 else
39603   echo "$as_me: failed program was:" >&5
39604 sed 's/^/| /' conftest.$ac_ext >&5
39605
39606 ac_header_compiler=no
39607 fi
39608 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39609 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
39610 echo "${ECHO_T}$ac_header_compiler" >&6
39611
39612 # Is the header present?
39613 echo "$as_me:$LINENO: checking $ac_header presence" >&5
39614 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
39615 cat >conftest.$ac_ext <<_ACEOF
39616 /* confdefs.h.  */
39617 _ACEOF
39618 cat confdefs.h >>conftest.$ac_ext
39619 cat >>conftest.$ac_ext <<_ACEOF
39620 /* end confdefs.h.  */
39621 #include <$ac_header>
39622 _ACEOF
39623 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
39624   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
39625   ac_status=$?
39626   grep -v '^ *+' conftest.er1 >conftest.err
39627   rm -f conftest.er1
39628   cat conftest.err >&5
39629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39630   (exit $ac_status); } >/dev/null; then
39631   if test -s conftest.err; then
39632     ac_cpp_err=$ac_c_preproc_warn_flag
39633     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
39634   else
39635     ac_cpp_err=
39636   fi
39637 else
39638   ac_cpp_err=yes
39639 fi
39640 if test -z "$ac_cpp_err"; then
39641   ac_header_preproc=yes
39642 else
39643   echo "$as_me: failed program was:" >&5
39644 sed 's/^/| /' conftest.$ac_ext >&5
39645
39646   ac_header_preproc=no
39647 fi
39648 rm -f conftest.err conftest.$ac_ext
39649 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
39650 echo "${ECHO_T}$ac_header_preproc" >&6
39651
39652 # So?  What about this header?
39653 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
39654   yes:no: )
39655     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
39656 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
39657     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
39658 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
39659     ac_header_preproc=yes
39660     ;;
39661   no:yes:* )
39662     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
39663 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
39664     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
39665 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
39666     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
39667 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
39668     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
39669 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
39670     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
39671 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
39672     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
39673 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
39674     (
39675       cat <<\_ASBOX
39676 ## --------------------------------------------- ##
39677 ## Report this to <http://www.openldap.org/its/> ##
39678 ## --------------------------------------------- ##
39679 _ASBOX
39680     ) |
39681       sed "s/^/$as_me: WARNING:     /" >&2
39682     ;;
39683 esac
39684 echo "$as_me:$LINENO: checking for $ac_header" >&5
39685 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
39686 if eval "test \"\${$as_ac_Header+set}\" = set"; then
39687   echo $ECHO_N "(cached) $ECHO_C" >&6
39688 else
39689   eval "$as_ac_Header=\$ac_header_preproc"
39690 fi
39691 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
39692 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
39693
39694 fi
39695 if test `eval echo '${'$as_ac_Header'}'` = yes; then
39696   cat >>confdefs.h <<_ACEOF
39697 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
39698 _ACEOF
39699
39700 fi
39701
39702 done
39703
39704
39705         if test $ac_cv_header_ltdl_h != yes ; then
39706                 { { echo "$as_me:$LINENO: error: could not locate <ltdl.h>" >&5
39707 echo "$as_me: error: could not locate <ltdl.h>" >&2;}
39708    { (exit 1); exit 1; }; }
39709         fi
39710         echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
39711 echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6
39712 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
39713   echo $ECHO_N "(cached) $ECHO_C" >&6
39714 else
39715   ac_check_lib_save_LIBS=$LIBS
39716 LIBS="-lltdl  $LIBS"
39717 cat >conftest.$ac_ext <<_ACEOF
39718 /* confdefs.h.  */
39719 _ACEOF
39720 cat confdefs.h >>conftest.$ac_ext
39721 cat >>conftest.$ac_ext <<_ACEOF
39722 /* end confdefs.h.  */
39723
39724 /* Override any gcc2 internal prototype to avoid an error.  */
39725 #ifdef __cplusplus
39726 extern "C"
39727 #endif
39728 /* We use char because int might match the return type of a gcc2
39729    builtin and then its argument prototype would still apply.  */
39730 char lt_dlinit ();
39731 int
39732 main ()
39733 {
39734 lt_dlinit ();
39735   ;
39736   return 0;
39737 }
39738 _ACEOF
39739 rm -f conftest.$ac_objext conftest$ac_exeext
39740 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
39741   (eval $ac_link) 2>conftest.er1
39742   ac_status=$?
39743   grep -v '^ *+' conftest.er1 >conftest.err
39744   rm -f conftest.er1
39745   cat conftest.err >&5
39746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39747   (exit $ac_status); } &&
39748          { ac_try='test -z "$ac_c_werror_flag"
39749                          || test ! -s conftest.err'
39750   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39751   (eval $ac_try) 2>&5
39752   ac_status=$?
39753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39754   (exit $ac_status); }; } &&
39755          { ac_try='test -s conftest$ac_exeext'
39756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39757   (eval $ac_try) 2>&5
39758   ac_status=$?
39759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39760   (exit $ac_status); }; }; then
39761   ac_cv_lib_ltdl_lt_dlinit=yes
39762 else
39763   echo "$as_me: failed program was:" >&5
39764 sed 's/^/| /' conftest.$ac_ext >&5
39765
39766 ac_cv_lib_ltdl_lt_dlinit=no
39767 fi
39768 rm -f conftest.err conftest.$ac_objext \
39769       conftest$ac_exeext conftest.$ac_ext
39770 LIBS=$ac_check_lib_save_LIBS
39771 fi
39772 echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
39773 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6
39774 if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
39775
39776                 SLAPI_LIBS=-lltdl
39777                 LIBSLAPI=libslapi.a
39778                 LIBSLAPITOOLS=../libslapi.a
39779
39780 cat >>confdefs.h <<\_ACEOF
39781 #define HAVE_LIBLTDL 1
39782 _ACEOF
39783
39784
39785 else
39786   { { echo "$as_me:$LINENO: error: could not locate libtool -lltdl" >&5
39787 echo "$as_me: error: could not locate libtool -lltdl" >&2;}
39788    { (exit 1); exit 1; }; }
39789 fi
39790
39791
39792
39793 cat >>confdefs.h <<\_ACEOF
39794 #define LDAP_SLAPI 1
39795 _ACEOF
39796
39797 fi
39798
39799 if test "$ol_enable_debug" != no ; then
39800         if test "$ol_enable_debug" = traditional; then
39801
39802 cat >>confdefs.h <<\_ACEOF
39803 #define OLD_DEBUG 1
39804 _ACEOF
39805
39806         fi
39807
39808 cat >>confdefs.h <<\_ACEOF
39809 #define LDAP_DEBUG 1
39810 _ACEOF
39811
39812 fi
39813 if test "$ol_enable_syslog" = yes ; then
39814
39815 cat >>confdefs.h <<\_ACEOF
39816 #define LDAP_SYSLOG 1
39817 _ACEOF
39818
39819 fi
39820 if test "$ol_link_kbind" != no ; then
39821
39822 cat >>confdefs.h <<\_ACEOF
39823 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
39824 _ACEOF
39825
39826 fi
39827 if test "$ol_enable_proctitle" != no ; then
39828
39829 cat >>confdefs.h <<\_ACEOF
39830 #define LDAP_PROCTITLE 1
39831 _ACEOF
39832
39833 fi
39834 if test "$ol_enable_referrals" != no ; then
39835
39836 cat >>confdefs.h <<\_ACEOF
39837 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
39838 _ACEOF
39839
39840 fi
39841 if test "$ol_enable_local" != no; then
39842
39843 cat >>confdefs.h <<\_ACEOF
39844 #define LDAP_PF_LOCAL 1
39845 _ACEOF
39846
39847 fi
39848 if test "$ol_link_ipv6" != no; then
39849
39850 cat >>confdefs.h <<\_ACEOF
39851 #define LDAP_PF_INET6 1
39852 _ACEOF
39853
39854 fi
39855 if test "$ol_enable_cleartext" != no ; then
39856
39857 cat >>confdefs.h <<\_ACEOF
39858 #define SLAPD_CLEARTEXT 1
39859 _ACEOF
39860
39861 fi
39862 if test "$ol_enable_crypt" != no ; then
39863
39864 cat >>confdefs.h <<\_ACEOF
39865 #define SLAPD_CRYPT 1
39866 _ACEOF
39867
39868 fi
39869 if test "$ol_link_spasswd" != no ; then
39870
39871 cat >>confdefs.h <<\_ACEOF
39872 #define SLAPD_SPASSWD 1
39873 _ACEOF
39874
39875 fi
39876 if test "$ol_enable_rlookups" != no ; then
39877
39878 cat >>confdefs.h <<\_ACEOF
39879 #define SLAPD_RLOOKUPS 1
39880 _ACEOF
39881
39882 fi
39883 if test "$ol_enable_aci" != no ; then
39884         if test $ol_enable_dynacl = no ; then
39885                 ol_enable_dynacl=yes
39886                 { echo "$as_me:$LINENO: WARNING: ACIs need dynacl" >&5
39887 echo "$as_me: WARNING: ACIs need dynacl" >&2;}
39888         fi
39889         if test "$ol_enable_aci" = mod ; then
39890                 MFLAG=SLAPD_MOD_DYNAMIC
39891                                 { { echo "$as_me:$LINENO: error: ACI build as dynamic module not supported (yet)" >&5
39892 echo "$as_me: error: ACI build as dynamic module not supported (yet)" >&2;}
39893    { (exit 1); exit 1; }; }
39894         else
39895                 MFLAG=SLAPD_MOD_STATIC
39896         fi
39897         WITH_ACI_ENABLED=$ol_enable_aci
39898
39899 cat >>confdefs.h <<_ACEOF
39900 #define SLAPD_ACI_ENABLED $MFLAG
39901 _ACEOF
39902
39903 else
39904         WITH_ACI_ENABLED=no
39905 fi
39906 if test "$ol_enable_dynacl" != no ; then
39907
39908 cat >>confdefs.h <<\_ACEOF
39909 #define SLAP_DYNACL 1
39910 _ACEOF
39911
39912 fi
39913
39914 if test "$ol_link_modules" != no ; then
39915
39916 cat >>confdefs.h <<\_ACEOF
39917 #define SLAPD_MODULES 1
39918 _ACEOF
39919
39920         BUILD_SLAPD=yes
39921         SLAPD_MODULES_LDFLAGS="-dlopen self"
39922 fi
39923
39924
39925 cat >>confdefs.h <<\_ACEOF
39926 #define SLAPD_MOD_STATIC 1
39927 _ACEOF
39928
39929
39930 cat >>confdefs.h <<\_ACEOF
39931 #define SLAPD_MOD_DYNAMIC 2
39932 _ACEOF
39933
39934
39935 if test "$ol_enable_bdb" != no ; then
39936         BUILD_SLAPD=yes
39937         BUILD_BDB=$ol_enable_bdb
39938         if test "$ol_enable_bdb" = mod ; then
39939                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
39940                 MFLAG=SLAPD_MOD_DYNAMIC
39941         else
39942                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
39943                 MFLAG=SLAPD_MOD_STATIC
39944         fi
39945
39946 cat >>confdefs.h <<_ACEOF
39947 #define SLAPD_BDB $MFLAG
39948 _ACEOF
39949
39950 fi
39951
39952 if test "$ol_enable_dnssrv" != no ; then
39953         BUILD_SLAPD=yes
39954         BUILD_DNSSRV=$ol_enable_dnssrv
39955         if test "$ol_enable_dnssrv" = mod ; then
39956                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
39957                 MFLAG=SLAPD_MOD_DYNAMIC
39958         else
39959                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
39960                 MFLAG=SLAPD_MOD_STATIC
39961         fi
39962
39963 cat >>confdefs.h <<_ACEOF
39964 #define SLAPD_DNSSRV $MFLAG
39965 _ACEOF
39966
39967 fi
39968
39969 if test "$ol_enable_hdb" != no ; then
39970         BUILD_SLAPD=yes
39971         BUILD_HDB=$ol_enable_hdb
39972         if test "$ol_enable_hdb" = mod ; then
39973                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
39974                 MFLAG=SLAPD_MOD_DYNAMIC
39975         else
39976                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
39977                 MFLAG=SLAPD_MOD_STATIC
39978         fi
39979
39980 cat >>confdefs.h <<_ACEOF
39981 #define SLAPD_HDB $MFLAG
39982 _ACEOF
39983
39984 fi
39985
39986 if test "$ol_enable_ldap" != no ; then
39987         BUILD_SLAPD=yes
39988         BUILD_LDAP=$ol_enable_ldap
39989         if test "$ol_enable_ldap" = mod ; then
39990                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
39991                 MFLAG=SLAPD_MOD_DYNAMIC
39992         else
39993                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
39994                 MFLAG=SLAPD_MOD_STATIC
39995         fi
39996
39997 cat >>confdefs.h <<_ACEOF
39998 #define SLAPD_LDAP $MFLAG
39999 _ACEOF
40000
40001 fi
40002
40003 if test "$ol_enable_meta" != no ; then
40004         BUILD_SLAPD=yes
40005         BUILD_META=$ol_enable_meta
40006         BUILD_REWRITE=yes
40007         if test "$ol_enable_meta" = mod ; then
40008                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
40009                 MFLAG=SLAPD_MOD_DYNAMIC
40010         else
40011                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
40012                 MFLAG=SLAPD_MOD_STATIC
40013         fi
40014
40015 cat >>confdefs.h <<_ACEOF
40016 #define SLAPD_META $MFLAG
40017 _ACEOF
40018
40019 fi
40020
40021 if test "$ol_enable_monitor" != no ; then
40022         BUILD_SLAPD=yes
40023         BUILD_MONITOR=$ol_enable_monitor
40024         if test "$ol_enable_monitor" = mod ; then
40025                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
40026                 MFLAG=SLAPD_MOD_DYNAMIC
40027         else
40028                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
40029                 MFLAG=SLAPD_MOD_STATIC
40030         fi
40031
40032 cat >>confdefs.h <<_ACEOF
40033 #define SLAPD_MONITOR $MFLAG
40034 _ACEOF
40035
40036 fi
40037
40038 if test "$ol_enable_null" != no ; then
40039         BUILD_SLAPD=yes
40040         BUILD_NULL=$ol_enable_null
40041         if test "$ol_enable_null" = mod ; then
40042                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
40043                 MFLAG=SLAPD_MOD_DYNAMIC
40044         else
40045                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
40046                 MFLAG=SLAPD_MOD_STATIC
40047         fi
40048
40049 cat >>confdefs.h <<_ACEOF
40050 #define SLAPD_NULL $MFLAG
40051 _ACEOF
40052
40053 fi
40054
40055 if test "$ol_enable_passwd" != no ; then
40056         BUILD_SLAPD=yes
40057         BUILD_PASSWD=$ol_enable_passwd
40058         if test "$ol_enable_passwd" = mod ; then
40059                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
40060                 MFLAG=SLAPD_MOD_DYNAMIC
40061         else
40062                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
40063                 MFLAG=SLAPD_MOD_STATIC
40064         fi
40065
40066 cat >>confdefs.h <<_ACEOF
40067 #define SLAPD_PASSWD $MFLAG
40068 _ACEOF
40069
40070 fi
40071
40072 if test "$ol_link_perl" != no ; then
40073         BUILD_SLAPD=yes
40074         BUILD_PERL=$ol_enable_perl
40075         if test "$ol_enable_perl" = mod ; then
40076                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
40077                 MFLAG=SLAPD_MOD_DYNAMIC
40078         else
40079                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
40080                 MFLAG=SLAPD_MOD_STATIC
40081         fi
40082
40083 cat >>confdefs.h <<_ACEOF
40084 #define SLAPD_PERL $MFLAG
40085 _ACEOF
40086
40087 fi
40088
40089 if test "$ol_enable_relay" != no ; then
40090         BUILD_SLAPD=yes
40091         BUILD_RELAY=$ol_enable_relay
40092         if test "$ol_enable_relay" = mod ; then
40093                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
40094                 MFLAG=SLAPD_MOD_DYNAMIC
40095         else
40096                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
40097                 MFLAG=SLAPD_MOD_STATIC
40098         fi
40099
40100 cat >>confdefs.h <<_ACEOF
40101 #define SLAPD_RELAY $MFLAG
40102 _ACEOF
40103
40104 fi
40105
40106 if test "$ol_enable_shell" != no ; then
40107         if test "$ol_link_threads" != no ; then
40108                 { echo "$as_me:$LINENO: WARNING: Use of --without-threads is recommended with back-shell" >&5
40109 echo "$as_me: WARNING: Use of --without-threads is recommended with back-shell" >&2;}
40110         fi
40111         BUILD_SLAPD=yes
40112         BUILD_SHELL=$ol_enable_shell
40113         if test "$ol_enable_shell" = mod ; then
40114                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
40115                 MFLAG=SLAPD_MOD_DYNAMIC
40116         else
40117                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
40118                 MFLAG=SLAPD_MOD_STATIC
40119         fi
40120
40121 cat >>confdefs.h <<_ACEOF
40122 #define SLAPD_SHELL $MFLAG
40123 _ACEOF
40124
40125 fi
40126
40127 if test "$ol_link_sql" != no ; then
40128         BUILD_SLAPD=yes
40129         BUILD_SQL=$ol_enable_sql
40130         if test "$ol_enable_sql" = mod; then
40131                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
40132                 MFLAG=SLAPD_MOD_DYNAMIC
40133         else
40134                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
40135                 MFLAG=SLAPD_MOD_STATIC
40136         fi
40137
40138 cat >>confdefs.h <<_ACEOF
40139 #define SLAPD_SQL $MFLAG
40140 _ACEOF
40141
40142 fi
40143
40144 if test "$ol_enable_accesslog" != no ; then
40145         BUILD_ACCESSLOG=$ol_enable_accesslog
40146         if test "$ol_enable_accesslog" = mod ; then
40147                 MFLAG=SLAPD_MOD_DYNAMIC
40148                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
40149         else
40150                 MFLAG=SLAPD_MOD_STATIC
40151                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
40152         fi
40153
40154 cat >>confdefs.h <<_ACEOF
40155 #define SLAPD_OVER_ACCESSLOG $MFLAG
40156 _ACEOF
40157
40158 fi
40159
40160 if test "$ol_enable_auditlog" != no ; then
40161         BUILD_AUDITLOG=$ol_enable_auditlog
40162         if test "$ol_enable_auditlog" = mod ; then
40163                 MFLAG=SLAPD_MOD_DYNAMIC
40164                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS auditlog.la"
40165         else
40166                 MFLAG=SLAPD_MOD_STATIC
40167                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS auditlog.o"
40168         fi
40169
40170 cat >>confdefs.h <<_ACEOF
40171 #define SLAPD_OVER_AUDITLOG $MFLAG
40172 _ACEOF
40173
40174 fi
40175
40176 if test "$ol_enable_dds" != no ; then
40177         BUILD_DDS=$ol_enable_dds
40178         if test "$ol_enable_dds" = mod ; then
40179                 MFLAG=SLAPD_MOD_DYNAMIC
40180                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dds.la"
40181         else
40182                 MFLAG=SLAPD_MOD_STATIC
40183                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dds.o"
40184         fi
40185
40186 cat >>confdefs.h <<_ACEOF
40187 #define SLAPD_OVER_DDS $MFLAG
40188 _ACEOF
40189
40190 fi
40191
40192 if test "$ol_enable_denyop" != no ; then
40193         BUILD_DENYOP=$ol_enable_denyop
40194         if test "$ol_enable_denyop" = mod ; then
40195                 MFLAG=SLAPD_MOD_DYNAMIC
40196                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
40197         else
40198                 MFLAG=SLAPD_MOD_STATIC
40199                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS denyop.o"
40200         fi
40201
40202 cat >>confdefs.h <<_ACEOF
40203 #define SLAPD_OVER_DENYOP $MFLAG
40204 _ACEOF
40205
40206 fi
40207
40208 if test "$ol_enable_dyngroup" != no ; then
40209         BUILD_DYNGROUP=$ol_enable_dyngroup
40210         if test "$ol_enable_dyngroup" = mod ; then
40211                 MFLAG=SLAPD_MOD_DYNAMIC
40212                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
40213         else
40214                 MFLAG=SLAPD_MOD_STATIC
40215                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
40216         fi
40217
40218 cat >>confdefs.h <<_ACEOF
40219 #define SLAPD_OVER_DYNGROUP $MFLAG
40220 _ACEOF
40221
40222 fi
40223
40224 if test "$ol_enable_dynlist" != no ; then
40225         BUILD_DYNLIST=$ol_enable_dynlist
40226         if test "$ol_enable_dynlist" = mod ; then
40227                 MFLAG=SLAPD_MOD_DYNAMIC
40228                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
40229         else
40230                 MFLAG=SLAPD_MOD_STATIC
40231                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
40232         fi
40233
40234 cat >>confdefs.h <<_ACEOF
40235 #define SLAPD_OVER_DYNLIST $MFLAG
40236 _ACEOF
40237
40238 fi
40239
40240 if test "$ol_enable_lastmod" != no ; then
40241         BUILD_LASTMOD=$ol_enable_lastmod
40242         if test "$ol_enable_lastmod" = mod ; then
40243                 MFLAG=SLAPD_MOD_DYNAMIC
40244                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
40245         else
40246                 MFLAG=SLAPD_MOD_STATIC
40247                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS lastmod.o"
40248         fi
40249
40250 cat >>confdefs.h <<_ACEOF
40251 #define SLAPD_OVER_LASTMOD $MFLAG
40252 _ACEOF
40253
40254 fi
40255
40256 if test "$ol_enable_ppolicy" != no ; then
40257         BUILD_PPOLICY=$ol_enable_ppolicy
40258         if test "$ol_enable_ppolicy" = mod ; then
40259                 MFLAG=SLAPD_MOD_DYNAMIC
40260                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
40261         else
40262                 MFLAG=SLAPD_MOD_STATIC
40263                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
40264         fi
40265
40266 cat >>confdefs.h <<_ACEOF
40267 #define SLAPD_OVER_PPOLICY $MFLAG
40268 _ACEOF
40269
40270 fi
40271
40272 if test "$ol_enable_proxycache" != no ; then
40273         BUILD_PROXYCACHE=$ol_enable_proxycache
40274         if test "$ol_enable_proxycache" = mod ; then
40275                 MFLAG=SLAPD_MOD_DYNAMIC
40276                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
40277         else
40278                 MFLAG=SLAPD_MOD_STATIC
40279                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
40280         fi
40281
40282 cat >>confdefs.h <<_ACEOF
40283 #define SLAPD_OVER_PROXYCACHE $MFLAG
40284 _ACEOF
40285
40286 fi
40287
40288 if test "$ol_enable_refint" != no ; then
40289         BUILD_REFINT=$ol_enable_refint
40290         if test "$ol_enable_refint" = mod ; then
40291                 MFLAG=SLAPD_MOD_DYNAMIC
40292                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
40293         else
40294                 MFLAG=SLAPD_MOD_STATIC
40295                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
40296         fi
40297
40298 cat >>confdefs.h <<_ACEOF
40299 #define SLAPD_OVER_REFINT $MFLAG
40300 _ACEOF
40301
40302 fi
40303
40304 if test "$ol_enable_retcode" != no ; then
40305         BUILD_RETCODE=$ol_enable_retcode
40306         if test "$ol_enable_retcode" = mod ; then
40307                 MFLAG=SLAPD_MOD_DYNAMIC
40308                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
40309         else
40310                 MFLAG=SLAPD_MOD_STATIC
40311                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
40312         fi
40313
40314 cat >>confdefs.h <<_ACEOF
40315 #define SLAPD_OVER_RETCODE $MFLAG
40316 _ACEOF
40317
40318 fi
40319
40320 if test "$ol_enable_rwm" != no ; then
40321         BUILD_REWRITE=yes
40322         BUILD_RWM=$ol_enable_rwm
40323         if test "$ol_enable_rwm" = mod ; then
40324                 MFLAG=SLAPD_MOD_DYNAMIC
40325                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
40326         else
40327                 MFLAG=SLAPD_MOD_STATIC
40328                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
40329         fi
40330
40331 cat >>confdefs.h <<_ACEOF
40332 #define SLAPD_OVER_RWM $MFLAG
40333 _ACEOF
40334
40335 fi
40336
40337 if test "$ol_enable_seqmod" != no ; then
40338         BUILD_SEQMOD=$ol_enable_seqmod
40339         if test "$ol_enable_seqmod" = mod ; then
40340                 MFLAG=SLAPD_MOD_DYNAMIC
40341                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS seqmod.la"
40342         else
40343                 MFLAG=SLAPD_MOD_STATIC
40344                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS seqmod.o"
40345         fi
40346
40347 cat >>confdefs.h <<_ACEOF
40348 #define SLAPD_OVER_SEQMOD $MFLAG
40349 _ACEOF
40350
40351 fi
40352
40353 if test "$ol_enable_syncprov" != no ; then
40354         BUILD_SYNCPROV=$ol_enable_syncprov
40355         if test "$ol_enable_syncprov" = mod ; then
40356                 MFLAG=SLAPD_MOD_DYNAMIC
40357                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
40358         else
40359                 MFLAG=SLAPD_MOD_STATIC
40360                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
40361         fi
40362
40363 cat >>confdefs.h <<_ACEOF
40364 #define SLAPD_OVER_SYNCPROV $MFLAG
40365 _ACEOF
40366
40367 fi
40368
40369 if test "$ol_enable_translucent" != no ; then
40370         BUILD_TRANSLUCENT=$ol_enable_translucent
40371         if test "$ol_enable_translucent" = mod ; then
40372                 MFLAG=SLAPD_MOD_DYNAMIC
40373                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
40374         else
40375                 MFLAG=SLAPD_MOD_STATIC
40376                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
40377         fi
40378
40379 cat >>confdefs.h <<_ACEOF
40380 #define SLAPD_OVER_TRANSLUCENT $MFLAG
40381 _ACEOF
40382
40383 fi
40384
40385 if test "$ol_enable_unique" != no ; then
40386         BUILD_UNIQUE=$ol_enable_unique
40387         if test "$ol_enable_unique" = mod ; then
40388                 MFLAG=SLAPD_MOD_DYNAMIC
40389                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
40390         else
40391                 MFLAG=SLAPD_MOD_STATIC
40392                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
40393         fi
40394
40395 cat >>confdefs.h <<_ACEOF
40396 #define SLAPD_OVER_UNIQUE $MFLAG
40397 _ACEOF
40398
40399 fi
40400
40401 if test "$ol_enable_valsort" != no ; then
40402         BUILD_VALSORT=$ol_enable_valsort
40403         if test "$ol_enable_valsort" = mod ; then
40404                 MFLAG=SLAPD_MOD_DYNAMIC
40405                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS valsort.la"
40406         else
40407                 MFLAG=SLAPD_MOD_STATIC
40408                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS valsort.o"
40409         fi
40410
40411 cat >>confdefs.h <<_ACEOF
40412 #define SLAPD_OVER_VALSORT $MFLAG
40413 _ACEOF
40414
40415 fi
40416
40417 if test "$ol_enable_slurpd" != no &&
40418    test "$ol_link_threads" != no &&
40419    test $BUILD_SLAPD = yes ; then
40420         BUILD_SLURPD=yes
40421 fi
40422
40423 if test "$ol_enable_rewrite" != no ; then
40424
40425 cat >>confdefs.h <<\_ACEOF
40426 #define ENABLE_REWRITE 1
40427 _ACEOF
40428
40429         BUILD_REWRITE=yes
40430 fi
40431
40432 if test "$ol_enable_slapi" != no ; then
40433
40434 cat >>confdefs.h <<\_ACEOF
40435 #define ENABLE_SLAPI 1
40436 _ACEOF
40437
40438         BUILD_SLAPI=yes
40439         SLAPD_SLAPI_DEPEND=libslapi.a
40440 fi
40441
40442
40443
40444 if test "$ac_cv_mingw32" = yes ; then
40445         PLAT=NT
40446         SLAPD_MODULES_LDFLAGS=
40447 else
40448         PLAT=UNIX
40449 fi
40450
40451
40452
40453
40454
40455
40456
40457
40458
40459
40460
40461
40462
40463
40464
40465
40466
40467
40468
40469
40470
40471
40472
40473
40474
40475
40476
40477
40478
40479
40480
40481
40482
40483
40484
40485
40486
40487
40488
40489
40490
40491
40492
40493
40494
40495
40496
40497
40498
40499
40500
40501
40502
40503
40504
40505
40506
40507
40508
40509
40510
40511
40512
40513
40514
40515
40516
40517
40518
40519
40520
40521
40522
40523
40524
40525
40526
40527
40528
40529
40530
40531
40532
40533
40534 # Check whether --with-xxinstall or --without-xxinstall was given.
40535 if test "${with_xxinstall+set}" = set; then
40536   withval="$with_xxinstall"
40537
40538 fi;
40539
40540
40541                                                                                                                                                                                                                                                                                                                                                                                                       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-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"
40542
40543
40544           ac_config_commands="$ac_config_commands default"
40545
40546
40547
40548 test "x$prefix" = xNONE && prefix=$ac_default_prefix
40549 # Let make expand exec_prefix.
40550 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
40551
40552 # VPATH may cause trouble with some makes, so we remove $(srcdir),
40553 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
40554 # trailing colons and then remove the whole line if VPATH becomes empty
40555 # (actually we leave an empty line to preserve line numbers).
40556 if test "x$srcdir" = x.; then
40557   ac_vpsub='/^[  ]*VPATH[        ]*=/{
40558 s/:*\$(srcdir):*/:/;
40559 s/:*\${srcdir}:*/:/;
40560 s/:*@srcdir@:*/:/;
40561 s/^\([^=]*=[     ]*\):*/\1/;
40562 s/:*$//;
40563 s/^[^=]*=[       ]*$//;
40564 }'
40565 fi
40566
40567 DEFS=-DHAVE_CONFIG_H
40568
40569 ac_libobjs=
40570 ac_ltlibobjs=
40571 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
40572   # 1. Remove the extension, and $U if already installed.
40573   ac_i=`echo "$ac_i" |
40574          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
40575   # 2. Add them.
40576   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
40577   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
40578 done
40579 LIBOBJS=$ac_libobjs
40580
40581 LTLIBOBJS=$ac_ltlibobjs
40582
40583
40584 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
40585   { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
40586 Usually this means the macro was only invoked conditionally." >&5
40587 echo "$as_me: error: conditional \"AMDEP\" was never defined.
40588 Usually this means the macro was only invoked conditionally." >&2;}
40589    { (exit 1); exit 1; }; }
40590 fi
40591 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
40592   { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
40593 Usually this means the macro was only invoked conditionally." >&5
40594 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
40595 Usually this means the macro was only invoked conditionally." >&2;}
40596    { (exit 1); exit 1; }; }
40597 fi
40598 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
40599   { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
40600 Usually this means the macro was only invoked conditionally." >&5
40601 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
40602 Usually this means the macro was only invoked conditionally." >&2;}
40603    { (exit 1); exit 1; }; }
40604 fi
40605
40606 : ${CONFIG_STATUS=./config.status}
40607 ac_clean_files_save=$ac_clean_files
40608 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
40609 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
40610 echo "$as_me: creating $CONFIG_STATUS" >&6;}
40611 cat >$CONFIG_STATUS <<_ACEOF
40612 #! $SHELL
40613 # Generated by $as_me.
40614 # Run this file to recreate the current configuration.
40615 # Compiler output produced by configure, useful for debugging
40616 # configure, is in config.log if it exists.
40617
40618 debug=false
40619 ac_cs_recheck=false
40620 ac_cs_silent=false
40621 SHELL=\${CONFIG_SHELL-$SHELL}
40622 _ACEOF
40623
40624 cat >>$CONFIG_STATUS <<\_ACEOF
40625 ## --------------------- ##
40626 ## M4sh Initialization.  ##
40627 ## --------------------- ##
40628
40629 # Be Bourne compatible
40630 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
40631   emulate sh
40632   NULLCMD=:
40633   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
40634   # is contrary to our usage.  Disable this feature.
40635   alias -g '${1+"$@"}'='"$@"'
40636 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
40637   set -o posix
40638 fi
40639 DUALCASE=1; export DUALCASE # for MKS sh
40640
40641 # Support unset when possible.
40642 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
40643   as_unset=unset
40644 else
40645   as_unset=false
40646 fi
40647
40648
40649 # Work around bugs in pre-3.0 UWIN ksh.
40650 $as_unset ENV MAIL MAILPATH
40651 PS1='$ '
40652 PS2='> '
40653 PS4='+ '
40654
40655 # NLS nuisances.
40656 for as_var in \
40657   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
40658   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
40659   LC_TELEPHONE LC_TIME
40660 do
40661   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
40662     eval $as_var=C; export $as_var
40663   else
40664     $as_unset $as_var
40665   fi
40666 done
40667
40668 # Required to use basename.
40669 if expr a : '\(a\)' >/dev/null 2>&1; then
40670   as_expr=expr
40671 else
40672   as_expr=false
40673 fi
40674
40675 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
40676   as_basename=basename
40677 else
40678   as_basename=false
40679 fi
40680
40681
40682 # Name of the executable.
40683 as_me=`$as_basename "$0" ||
40684 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
40685          X"$0" : 'X\(//\)$' \| \
40686          X"$0" : 'X\(/\)$' \| \
40687          .     : '\(.\)' 2>/dev/null ||
40688 echo X/"$0" |
40689     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
40690           /^X\/\(\/\/\)$/{ s//\1/; q; }
40691           /^X\/\(\/\).*/{ s//\1/; q; }
40692           s/.*/./; q'`
40693
40694
40695 # PATH needs CR, and LINENO needs CR and PATH.
40696 # Avoid depending upon Character Ranges.
40697 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
40698 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
40699 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40700 as_cr_digits='0123456789'
40701 as_cr_alnum=$as_cr_Letters$as_cr_digits
40702
40703 # The user is always right.
40704 if test "${PATH_SEPARATOR+set}" != set; then
40705   echo "#! /bin/sh" >conf$$.sh
40706   echo  "exit 0"   >>conf$$.sh
40707   chmod +x conf$$.sh
40708   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
40709     PATH_SEPARATOR=';'
40710   else
40711     PATH_SEPARATOR=:
40712   fi
40713   rm -f conf$$.sh
40714 fi
40715
40716
40717   as_lineno_1=$LINENO
40718   as_lineno_2=$LINENO
40719   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
40720   test "x$as_lineno_1" != "x$as_lineno_2" &&
40721   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
40722   # Find who we are.  Look in the path if we contain no path at all
40723   # relative or not.
40724   case $0 in
40725     *[\\/]* ) as_myself=$0 ;;
40726     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40727 for as_dir in $PATH
40728 do
40729   IFS=$as_save_IFS
40730   test -z "$as_dir" && as_dir=.
40731   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
40732 done
40733
40734        ;;
40735   esac
40736   # We did not find ourselves, most probably we were run as `sh COMMAND'
40737   # in which case we are not to be found in the path.
40738   if test "x$as_myself" = x; then
40739     as_myself=$0
40740   fi
40741   if test ! -f "$as_myself"; then
40742     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
40743 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
40744    { (exit 1); exit 1; }; }
40745   fi
40746   case $CONFIG_SHELL in
40747   '')
40748     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40749 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
40750 do
40751   IFS=$as_save_IFS
40752   test -z "$as_dir" && as_dir=.
40753   for as_base in sh bash ksh sh5; do
40754          case $as_dir in
40755          /*)
40756            if ("$as_dir/$as_base" -c '
40757   as_lineno_1=$LINENO
40758   as_lineno_2=$LINENO
40759   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
40760   test "x$as_lineno_1" != "x$as_lineno_2" &&
40761   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
40762              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
40763              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
40764              CONFIG_SHELL=$as_dir/$as_base
40765              export CONFIG_SHELL
40766              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
40767            fi;;
40768          esac
40769        done
40770 done
40771 ;;
40772   esac
40773
40774   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
40775   # uniformly replaced by the line number.  The first 'sed' inserts a
40776   # line-number line before each line; the second 'sed' does the real
40777   # work.  The second script uses 'N' to pair each line-number line
40778   # with the numbered line, and appends trailing '-' during
40779   # substitution so that $LINENO is not a special case at line end.
40780   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
40781   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
40782   sed '=' <$as_myself |
40783     sed '
40784       N
40785       s,$,-,
40786       : loop
40787       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
40788       t loop
40789       s,-$,,
40790       s,^['$as_cr_digits']*\n,,
40791     ' >$as_me.lineno &&
40792   chmod +x $as_me.lineno ||
40793     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
40794 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
40795    { (exit 1); exit 1; }; }
40796
40797   # Don't try to exec as it changes $[0], causing all sort of problems
40798   # (the dirname of $[0] is not the place where we might find the
40799   # original and so on.  Autoconf is especially sensible to this).
40800   . ./$as_me.lineno
40801   # Exit status is that of the last command.
40802   exit
40803 }
40804
40805
40806 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
40807   *c*,-n*) ECHO_N= ECHO_C='
40808 ' ECHO_T='      ' ;;
40809   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
40810   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
40811 esac
40812
40813 if expr a : '\(a\)' >/dev/null 2>&1; then
40814   as_expr=expr
40815 else
40816   as_expr=false
40817 fi
40818
40819 rm -f conf$$ conf$$.exe conf$$.file
40820 echo >conf$$.file
40821 if ln -s conf$$.file conf$$ 2>/dev/null; then
40822   # We could just check for DJGPP; but this test a) works b) is more generic
40823   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
40824   if test -f conf$$.exe; then
40825     # Don't use ln at all; we don't have any links
40826     as_ln_s='cp -p'
40827   else
40828     as_ln_s='ln -s'
40829   fi
40830 elif ln conf$$.file conf$$ 2>/dev/null; then
40831   as_ln_s=ln
40832 else
40833   as_ln_s='cp -p'
40834 fi
40835 rm -f conf$$ conf$$.exe conf$$.file
40836
40837 if mkdir -p . 2>/dev/null; then
40838   as_mkdir_p=:
40839 else
40840   test -d ./-p && rmdir ./-p
40841   as_mkdir_p=false
40842 fi
40843
40844 as_executable_p="test -f"
40845
40846 # Sed expression to map a string onto a valid CPP name.
40847 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
40848
40849 # Sed expression to map a string onto a valid variable name.
40850 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
40851
40852
40853 # IFS
40854 # We need space, tab and new line, in precisely that order.
40855 as_nl='
40856 '
40857 IFS="   $as_nl"
40858
40859 # CDPATH.
40860 $as_unset CDPATH
40861
40862 exec 6>&1
40863
40864 # Open the log real soon, to keep \$[0] and so on meaningful, and to
40865 # report actual input values of CONFIG_FILES etc. instead of their
40866 # values after options handling.  Logging --version etc. is OK.
40867 exec 5>>config.log
40868 {
40869   echo
40870   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
40871 ## Running $as_me. ##
40872 _ASBOX
40873 } >&5
40874 cat >&5 <<_CSEOF
40875
40876 This file was extended by $as_me, which was
40877 generated by GNU Autoconf 2.59.  Invocation command line was
40878
40879   CONFIG_FILES    = $CONFIG_FILES
40880   CONFIG_HEADERS  = $CONFIG_HEADERS
40881   CONFIG_LINKS    = $CONFIG_LINKS
40882   CONFIG_COMMANDS = $CONFIG_COMMANDS
40883   $ $0 $@
40884
40885 _CSEOF
40886 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
40887 echo >&5
40888 _ACEOF
40889
40890 # Files that config.status was made for.
40891 if test -n "$ac_config_files"; then
40892   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
40893 fi
40894
40895 if test -n "$ac_config_headers"; then
40896   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
40897 fi
40898
40899 if test -n "$ac_config_links"; then
40900   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
40901 fi
40902
40903 if test -n "$ac_config_commands"; then
40904   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
40905 fi
40906
40907 cat >>$CONFIG_STATUS <<\_ACEOF
40908
40909 ac_cs_usage="\
40910 \`$as_me' instantiates files from templates according to the
40911 current configuration.
40912
40913 Usage: $0 [OPTIONS] [FILE]...
40914
40915   -h, --help       print this help, then exit
40916   -V, --version    print version number, then exit
40917   -q, --quiet      do not print progress messages
40918   -d, --debug      don't remove temporary files
40919       --recheck    update $as_me by reconfiguring in the same conditions
40920   --file=FILE[:TEMPLATE]
40921                    instantiate the configuration file FILE
40922   --header=FILE[:TEMPLATE]
40923                    instantiate the configuration header FILE
40924
40925 Configuration files:
40926 $config_files
40927
40928 Configuration headers:
40929 $config_headers
40930
40931 Configuration commands:
40932 $config_commands
40933
40934 Report bugs to <bug-autoconf@gnu.org>."
40935 _ACEOF
40936
40937 cat >>$CONFIG_STATUS <<_ACEOF
40938 ac_cs_version="\\
40939 config.status
40940 configured by $0, generated by GNU Autoconf 2.59,
40941   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
40942
40943 Copyright (C) 2003 Free Software Foundation, Inc.
40944 This config.status script is free software; the Free Software Foundation
40945 gives unlimited permission to copy, distribute and modify it."
40946 srcdir=$srcdir
40947 INSTALL="$INSTALL"
40948 _ACEOF
40949
40950 cat >>$CONFIG_STATUS <<\_ACEOF
40951 # If no file are specified by the user, then we need to provide default
40952 # value.  By we need to know if files were specified by the user.
40953 ac_need_defaults=:
40954 while test $# != 0
40955 do
40956   case $1 in
40957   --*=*)
40958     ac_option=`expr "x$1" : 'x\([^=]*\)='`
40959     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
40960     ac_shift=:
40961     ;;
40962   -*)
40963     ac_option=$1
40964     ac_optarg=$2
40965     ac_shift=shift
40966     ;;
40967   *) # This is not an option, so the user has probably given explicit
40968      # arguments.
40969      ac_option=$1
40970      ac_need_defaults=false;;
40971   esac
40972
40973   case $ac_option in
40974   # Handling of the options.
40975 _ACEOF
40976 cat >>$CONFIG_STATUS <<\_ACEOF
40977   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
40978     ac_cs_recheck=: ;;
40979   --version | --vers* | -V )
40980     echo "$ac_cs_version"; exit 0 ;;
40981   --he | --h)
40982     # Conflict between --help and --header
40983     { { echo "$as_me:$LINENO: error: ambiguous option: $1
40984 Try \`$0 --help' for more information." >&5
40985 echo "$as_me: error: ambiguous option: $1
40986 Try \`$0 --help' for more information." >&2;}
40987    { (exit 1); exit 1; }; };;
40988   --help | --hel | -h )
40989     echo "$ac_cs_usage"; exit 0 ;;
40990   --debug | --d* | -d )
40991     debug=: ;;
40992   --file | --fil | --fi | --f )
40993     $ac_shift
40994     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
40995     ac_need_defaults=false;;
40996   --header | --heade | --head | --hea )
40997     $ac_shift
40998     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
40999     ac_need_defaults=false;;
41000   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
41001   | -silent | --silent | --silen | --sile | --sil | --si | --s)
41002     ac_cs_silent=: ;;
41003
41004   # This is an error.
41005   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
41006 Try \`$0 --help' for more information." >&5
41007 echo "$as_me: error: unrecognized option: $1
41008 Try \`$0 --help' for more information." >&2;}
41009    { (exit 1); exit 1; }; } ;;
41010
41011   *) ac_config_targets="$ac_config_targets $1" ;;
41012
41013   esac
41014   shift
41015 done
41016
41017 ac_configure_extra_args=
41018
41019 if $ac_cs_silent; then
41020   exec 6>/dev/null
41021   ac_configure_extra_args="$ac_configure_extra_args --silent"
41022 fi
41023
41024 _ACEOF
41025 cat >>$CONFIG_STATUS <<_ACEOF
41026 if \$ac_cs_recheck; then
41027   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
41028   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
41029 fi
41030
41031 _ACEOF
41032
41033 cat >>$CONFIG_STATUS <<_ACEOF
41034 #
41035 # INIT-COMMANDS section.
41036 #
41037
41038 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
41039
41040 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
41041 STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS"
41042
41043
41044 _ACEOF
41045
41046
41047
41048 cat >>$CONFIG_STATUS <<\_ACEOF
41049 for ac_config_target in $ac_config_targets
41050 do
41051   case "$ac_config_target" in
41052   # Handling of arguments.
41053   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:build/top.mk:Makefile.in:build/dir.mk" ;;
41054   "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk" ;;
41055   "doc/man/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk" ;;
41056   "doc/man/man1/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk" ;;
41057   "doc/man/man3/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk" ;;
41058   "doc/man/man5/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk" ;;
41059   "doc/man/man8/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk" ;;
41060   "clients/Makefile" ) CONFIG_FILES="$CONFIG_FILES clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk" ;;
41061   "clients/tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk" ;;
41062   "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile:build/top.mk:include/Makefile.in" ;;
41063   "libraries/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk" ;;
41064   "libraries/liblber/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
41065   "libraries/libldap/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
41066   "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" ;;
41067   "libraries/liblunicode/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
41068   "libraries/liblutil/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
41069   "libraries/librewrite/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
41070   "servers/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk" ;;
41071   "servers/slapd/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk" ;;
41072   "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" ;;
41073   "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" ;;
41074   "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" ;;
41075   "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" ;;
41076   "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" ;;
41077   "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" ;;
41078   "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" ;;
41079   "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" ;;
41080   "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" ;;
41081   "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" ;;
41082   "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" ;;
41083   "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" ;;
41084   "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" ;;
41085   "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" ;;
41086   "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" ;;
41087   "servers/slapd/overlays/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk" ;;
41088   "servers/slurpd/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk" ;;
41089   "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;;
41090   "tests/run" ) CONFIG_FILES="$CONFIG_FILES tests/run" ;;
41091   "tests/progs/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;;
41092   "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
41093   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
41094   "include/portable.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h:include/portable.hin" ;;
41095   "include/ldap_features.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h:include/ldap_features.hin" ;;
41096   "include/lber_types.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h:include/lber_types.hin" ;;
41097   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
41098 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
41099    { (exit 1); exit 1; }; };;
41100   esac
41101 done
41102
41103 # If the user did not use the arguments to specify the items to instantiate,
41104 # then the envvar interface is used.  Set only those that are not.
41105 # We use the long form for the default assignment because of an extremely
41106 # bizarre bug on SunOS 4.1.3.
41107 if $ac_need_defaults; then
41108   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
41109   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
41110   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
41111 fi
41112
41113 # Have a temporary directory for convenience.  Make it in the build tree
41114 # simply because there is no reason to put it here, and in addition,
41115 # creating and moving files from /tmp can sometimes cause problems.
41116 # Create a temporary directory, and hook for its removal unless debugging.
41117 $debug ||
41118 {
41119   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
41120   trap '{ (exit 1); exit 1; }' 1 2 13 15
41121 }
41122
41123 # Create a (secure) tmp directory for tmp files.
41124
41125 {
41126   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
41127   test -n "$tmp" && test -d "$tmp"
41128 }  ||
41129 {
41130   tmp=./confstat$$-$RANDOM
41131   (umask 077 && mkdir $tmp)
41132 } ||
41133 {
41134    echo "$me: cannot create a temporary directory in ." >&2
41135    { (exit 1); exit 1; }
41136 }
41137
41138 _ACEOF
41139
41140 cat >>$CONFIG_STATUS <<_ACEOF
41141
41142 #
41143 # CONFIG_FILES section.
41144 #
41145
41146 # No need to generate the scripts if there are no CONFIG_FILES.
41147 # This happens for instance when ./config.status config.h
41148 if test -n "\$CONFIG_FILES"; then
41149   # Protect against being on the right side of a sed subst in config.status.
41150   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
41151    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
41152 s,@SHELL@,$SHELL,;t t
41153 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
41154 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
41155 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
41156 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
41157 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
41158 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
41159 s,@exec_prefix@,$exec_prefix,;t t
41160 s,@prefix@,$prefix,;t t
41161 s,@program_transform_name@,$program_transform_name,;t t
41162 s,@bindir@,$bindir,;t t
41163 s,@sbindir@,$sbindir,;t t
41164 s,@libexecdir@,$libexecdir,;t t
41165 s,@datadir@,$datadir,;t t
41166 s,@sysconfdir@,$sysconfdir,;t t
41167 s,@sharedstatedir@,$sharedstatedir,;t t
41168 s,@localstatedir@,$localstatedir,;t t
41169 s,@libdir@,$libdir,;t t
41170 s,@includedir@,$includedir,;t t
41171 s,@oldincludedir@,$oldincludedir,;t t
41172 s,@infodir@,$infodir,;t t
41173 s,@mandir@,$mandir,;t t
41174 s,@build_alias@,$build_alias,;t t
41175 s,@host_alias@,$host_alias,;t t
41176 s,@target_alias@,$target_alias,;t t
41177 s,@DEFS@,$DEFS,;t t
41178 s,@ECHO_C@,$ECHO_C,;t t
41179 s,@ECHO_N@,$ECHO_N,;t t
41180 s,@ECHO_T@,$ECHO_T,;t t
41181 s,@LIBS@,$LIBS,;t t
41182 s,@build@,$build,;t t
41183 s,@build_cpu@,$build_cpu,;t t
41184 s,@build_vendor@,$build_vendor,;t t
41185 s,@build_os@,$build_os,;t t
41186 s,@host@,$host,;t t
41187 s,@host_cpu@,$host_cpu,;t t
41188 s,@host_vendor@,$host_vendor,;t t
41189 s,@host_os@,$host_os,;t t
41190 s,@target@,$target,;t t
41191 s,@target_cpu@,$target_cpu,;t t
41192 s,@target_vendor@,$target_vendor,;t t
41193 s,@target_os@,$target_os,;t t
41194 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
41195 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
41196 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
41197 s,@CYGPATH_W@,$CYGPATH_W,;t t
41198 s,@PACKAGE@,$PACKAGE,;t t
41199 s,@VERSION@,$VERSION,;t t
41200 s,@ACLOCAL@,$ACLOCAL,;t t
41201 s,@AUTOCONF@,$AUTOCONF,;t t
41202 s,@AUTOMAKE@,$AUTOMAKE,;t t
41203 s,@AUTOHEADER@,$AUTOHEADER,;t t
41204 s,@MAKEINFO@,$MAKEINFO,;t t
41205 s,@install_sh@,$install_sh,;t t
41206 s,@STRIP@,$STRIP,;t t
41207 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
41208 s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
41209 s,@mkdir_p@,$mkdir_p,;t t
41210 s,@AWK@,$AWK,;t t
41211 s,@SET_MAKE@,$SET_MAKE,;t t
41212 s,@am__leading_dot@,$am__leading_dot,;t t
41213 s,@AMTAR@,$AMTAR,;t t
41214 s,@am__tar@,$am__tar,;t t
41215 s,@am__untar@,$am__untar,;t t
41216 s,@OPENLDAP_LIBRELEASE@,$OPENLDAP_LIBRELEASE,;t t
41217 s,@OPENLDAP_LIBVERSION@,$OPENLDAP_LIBVERSION,;t t
41218 s,@OPENLDAP_RELEASE_DATE@,$OPENLDAP_RELEASE_DATE,;t t
41219 s,@top_builddir@,$top_builddir,;t t
41220 s,@ldap_subdir@,$ldap_subdir,;t t
41221 s,@CC@,$CC,;t t
41222 s,@AR@,$AR,;t t
41223 s,@CFLAGS@,$CFLAGS,;t t
41224 s,@LDFLAGS@,$LDFLAGS,;t t
41225 s,@CPPFLAGS@,$CPPFLAGS,;t t
41226 s,@ac_ct_CC@,$ac_ct_CC,;t t
41227 s,@EXEEXT@,$EXEEXT,;t t
41228 s,@OBJEXT@,$OBJEXT,;t t
41229 s,@DEPDIR@,$DEPDIR,;t t
41230 s,@am__include@,$am__include,;t t
41231 s,@am__quote@,$am__quote,;t t
41232 s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
41233 s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
41234 s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
41235 s,@CCDEPMODE@,$CCDEPMODE,;t t
41236 s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
41237 s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
41238 s,@EGREP@,$EGREP,;t t
41239 s,@LN_S@,$LN_S,;t t
41240 s,@ECHO@,$ECHO,;t t
41241 s,@ac_ct_AR@,$ac_ct_AR,;t t
41242 s,@RANLIB@,$RANLIB,;t t
41243 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
41244 s,@DLLTOOL@,$DLLTOOL,;t t
41245 s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
41246 s,@AS@,$AS,;t t
41247 s,@ac_ct_AS@,$ac_ct_AS,;t t
41248 s,@OBJDUMP@,$OBJDUMP,;t t
41249 s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t
41250 s,@CPP@,$CPP,;t t
41251 s,@LIBTOOL@,$LIBTOOL,;t t
41252 s,@PERLBIN@,$PERLBIN,;t t
41253 s,@OL_MKDEP@,$OL_MKDEP,;t t
41254 s,@OL_MKDEP_FLAGS@,$OL_MKDEP_FLAGS,;t t
41255 s,@LTSTATIC@,$LTSTATIC,;t t
41256 s,@LIBOBJS@,$LIBOBJS,;t t
41257 s,@LIBSRCS@,$LIBSRCS,;t t
41258 s,@PLAT@,$PLAT,;t t
41259 s,@WITH_SASL@,$WITH_SASL,;t t
41260 s,@WITH_TLS@,$WITH_TLS,;t t
41261 s,@WITH_MODULES_ENABLED@,$WITH_MODULES_ENABLED,;t t
41262 s,@WITH_ACI_ENABLED@,$WITH_ACI_ENABLED,;t t
41263 s,@BUILD_THREAD@,$BUILD_THREAD,;t t
41264 s,@BUILD_LIBS_DYNAMIC@,$BUILD_LIBS_DYNAMIC,;t t
41265 s,@BUILD_SLAPD@,$BUILD_SLAPD,;t t
41266 s,@BUILD_SLAPI@,$BUILD_SLAPI,;t t
41267 s,@SLAPD_SLAPI_DEPEND@,$SLAPD_SLAPI_DEPEND,;t t
41268 s,@BUILD_BDB@,$BUILD_BDB,;t t
41269 s,@BUILD_DNSSRV@,$BUILD_DNSSRV,;t t
41270 s,@BUILD_HDB@,$BUILD_HDB,;t t
41271 s,@BUILD_LDAP@,$BUILD_LDAP,;t t
41272 s,@BUILD_META@,$BUILD_META,;t t
41273 s,@BUILD_MONITOR@,$BUILD_MONITOR,;t t
41274 s,@BUILD_NULL@,$BUILD_NULL,;t t
41275 s,@BUILD_PASSWD@,$BUILD_PASSWD,;t t
41276 s,@BUILD_RELAY@,$BUILD_RELAY,;t t
41277 s,@BUILD_PERL@,$BUILD_PERL,;t t
41278 s,@BUILD_SHELL@,$BUILD_SHELL,;t t
41279 s,@BUILD_SQL@,$BUILD_SQL,;t t
41280 s,@BUILD_ACCESSLOG@,$BUILD_ACCESSLOG,;t t
41281 s,@BUILD_AUDITLOG@,$BUILD_AUDITLOG,;t t
41282 s,@BUILD_DDS@,$BUILD_DDS,;t t
41283 s,@BUILD_DENYOP@,$BUILD_DENYOP,;t t
41284 s,@BUILD_DYNGROUP@,$BUILD_DYNGROUP,;t t
41285 s,@BUILD_DYNLIST@,$BUILD_DYNLIST,;t t
41286 s,@BUILD_LASTMOD@,$BUILD_LASTMOD,;t t
41287 s,@BUILD_PPOLICY@,$BUILD_PPOLICY,;t t
41288 s,@BUILD_PROXYCACHE@,$BUILD_PROXYCACHE,;t t
41289 s,@BUILD_REFINT@,$BUILD_REFINT,;t t
41290 s,@BUILD_RETCODE@,$BUILD_RETCODE,;t t
41291 s,@BUILD_RWM@,$BUILD_RWM,;t t
41292 s,@BUILD_SEQMOD@,$BUILD_SEQMOD,;t t
41293 s,@BUILD_SYNCPROV@,$BUILD_SYNCPROV,;t t
41294 s,@BUILD_TRANSLUCENT@,$BUILD_TRANSLUCENT,;t t
41295 s,@BUILD_UNIQUE@,$BUILD_UNIQUE,;t t
41296 s,@BUILD_VALSORT@,$BUILD_VALSORT,;t t
41297 s,@BUILD_SLURPD@,$BUILD_SLURPD,;t t
41298 s,@LDAP_LIBS@,$LDAP_LIBS,;t t
41299 s,@SLAPD_LIBS@,$SLAPD_LIBS,;t t
41300 s,@SLURPD_LIBS@,$SLURPD_LIBS,;t t
41301 s,@BDB_LIBS@,$BDB_LIBS,;t t
41302 s,@LTHREAD_LIBS@,$LTHREAD_LIBS,;t t
41303 s,@LUTIL_LIBS@,$LUTIL_LIBS,;t t
41304 s,@WRAP_LIBS@,$WRAP_LIBS,;t t
41305 s,@SLAPD_MODULES_CPPFLAGS@,$SLAPD_MODULES_CPPFLAGS,;t t
41306 s,@SLAPD_MODULES_LDFLAGS@,$SLAPD_MODULES_LDFLAGS,;t t
41307 s,@SLAPD_NO_STATIC@,$SLAPD_NO_STATIC,;t t
41308 s,@SLAPD_STATIC_BACKENDS@,$SLAPD_STATIC_BACKENDS,;t t
41309 s,@SLAPD_DYNAMIC_BACKENDS@,$SLAPD_DYNAMIC_BACKENDS,;t t
41310 s,@SLAPD_STATIC_OVERLAYS@,$SLAPD_STATIC_OVERLAYS,;t t
41311 s,@SLAPD_DYNAMIC_OVERLAYS@,$SLAPD_DYNAMIC_OVERLAYS,;t t
41312 s,@PERL_CPPFLAGS@,$PERL_CPPFLAGS,;t t
41313 s,@SLAPD_PERL_LDFLAGS@,$SLAPD_PERL_LDFLAGS,;t t
41314 s,@MOD_PERL_LDFLAGS@,$MOD_PERL_LDFLAGS,;t t
41315 s,@KRB4_LIBS@,$KRB4_LIBS,;t t
41316 s,@KRB5_LIBS@,$KRB5_LIBS,;t t
41317 s,@SASL_LIBS@,$SASL_LIBS,;t t
41318 s,@TLS_LIBS@,$TLS_LIBS,;t t
41319 s,@MODULES_LIBS@,$MODULES_LIBS,;t t
41320 s,@SLAPI_LIBS@,$SLAPI_LIBS,;t t
41321 s,@LIBSLAPI@,$LIBSLAPI,;t t
41322 s,@LIBSLAPITOOLS@,$LIBSLAPITOOLS,;t t
41323 s,@AUTH_LIBS@,$AUTH_LIBS,;t t
41324 s,@ICU_LIBS@,$ICU_LIBS,;t t
41325 s,@SLAPD_SLP_LIBS@,$SLAPD_SLP_LIBS,;t t
41326 s,@SLAPD_GMP_LIBS@,$SLAPD_GMP_LIBS,;t t
41327 s,@SLAPD_SQL_LDFLAGS@,$SLAPD_SQL_LDFLAGS,;t t
41328 s,@SLAPD_SQL_LIBS@,$SLAPD_SQL_LIBS,;t t
41329 s,@SLAPD_SQL_INCLUDES@,$SLAPD_SQL_INCLUDES,;t t
41330 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
41331 CEOF
41332
41333 _ACEOF
41334
41335   cat >>$CONFIG_STATUS <<\_ACEOF
41336   # Split the substitutions into bite-sized pieces for seds with
41337   # small command number limits, like on Digital OSF/1 and HP-UX.
41338   ac_max_sed_lines=48
41339   ac_sed_frag=1 # Number of current file.
41340   ac_beg=1 # First line for current file.
41341   ac_end=$ac_max_sed_lines # Line after last line for current file.
41342   ac_more_lines=:
41343   ac_sed_cmds=
41344   while $ac_more_lines; do
41345     if test $ac_beg -gt 1; then
41346       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
41347     else
41348       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
41349     fi
41350     if test ! -s $tmp/subs.frag; then
41351       ac_more_lines=false
41352     else
41353       # The purpose of the label and of the branching condition is to
41354       # speed up the sed processing (if there are no `@' at all, there
41355       # is no need to browse any of the substitutions).
41356       # These are the two extra sed commands mentioned above.
41357       (echo ':t
41358   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
41359       if test -z "$ac_sed_cmds"; then
41360         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
41361       else
41362         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
41363       fi
41364       ac_sed_frag=`expr $ac_sed_frag + 1`
41365       ac_beg=$ac_end
41366       ac_end=`expr $ac_end + $ac_max_sed_lines`
41367     fi
41368   done
41369   if test -z "$ac_sed_cmds"; then
41370     ac_sed_cmds=cat
41371   fi
41372 fi # test -n "$CONFIG_FILES"
41373
41374 _ACEOF
41375 cat >>$CONFIG_STATUS <<\_ACEOF
41376 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
41377   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
41378   case $ac_file in
41379   - | *:- | *:-:* ) # input from stdin
41380         cat >$tmp/stdin
41381         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
41382         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
41383   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
41384         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
41385   * )   ac_file_in=$ac_file.in ;;
41386   esac
41387
41388   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
41389   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
41390 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41391          X"$ac_file" : 'X\(//\)[^/]' \| \
41392          X"$ac_file" : 'X\(//\)$' \| \
41393          X"$ac_file" : 'X\(/\)' \| \
41394          .     : '\(.\)' 2>/dev/null ||
41395 echo X"$ac_file" |
41396     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
41397           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
41398           /^X\(\/\/\)$/{ s//\1/; q; }
41399           /^X\(\/\).*/{ s//\1/; q; }
41400           s/.*/./; q'`
41401   { if $as_mkdir_p; then
41402     mkdir -p "$ac_dir"
41403   else
41404     as_dir="$ac_dir"
41405     as_dirs=
41406     while test ! -d "$as_dir"; do
41407       as_dirs="$as_dir $as_dirs"
41408       as_dir=`(dirname "$as_dir") 2>/dev/null ||
41409 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41410          X"$as_dir" : 'X\(//\)[^/]' \| \
41411          X"$as_dir" : 'X\(//\)$' \| \
41412          X"$as_dir" : 'X\(/\)' \| \
41413          .     : '\(.\)' 2>/dev/null ||
41414 echo X"$as_dir" |
41415     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
41416           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
41417           /^X\(\/\/\)$/{ s//\1/; q; }
41418           /^X\(\/\).*/{ s//\1/; q; }
41419           s/.*/./; q'`
41420     done
41421     test ! -n "$as_dirs" || mkdir $as_dirs
41422   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
41423 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
41424    { (exit 1); exit 1; }; }; }
41425
41426   ac_builddir=.
41427
41428 if test "$ac_dir" != .; then
41429   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
41430   # A "../" for each directory in $ac_dir_suffix.
41431   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
41432 else
41433   ac_dir_suffix= ac_top_builddir=
41434 fi
41435
41436 case $srcdir in
41437   .)  # No --srcdir option.  We are building in place.
41438     ac_srcdir=.
41439     if test -z "$ac_top_builddir"; then
41440        ac_top_srcdir=.
41441     else
41442        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
41443     fi ;;
41444   [\\/]* | ?:[\\/]* )  # Absolute path.
41445     ac_srcdir=$srcdir$ac_dir_suffix;
41446     ac_top_srcdir=$srcdir ;;
41447   *) # Relative path.
41448     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
41449     ac_top_srcdir=$ac_top_builddir$srcdir ;;
41450 esac
41451
41452 # Do not use `cd foo && pwd` to compute absolute paths, because
41453 # the directories may not exist.
41454 case `pwd` in
41455 .) ac_abs_builddir="$ac_dir";;
41456 *)
41457   case "$ac_dir" in
41458   .) ac_abs_builddir=`pwd`;;
41459   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
41460   *) ac_abs_builddir=`pwd`/"$ac_dir";;
41461   esac;;
41462 esac
41463 case $ac_abs_builddir in
41464 .) ac_abs_top_builddir=${ac_top_builddir}.;;
41465 *)
41466   case ${ac_top_builddir}. in
41467   .) ac_abs_top_builddir=$ac_abs_builddir;;
41468   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
41469   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
41470   esac;;
41471 esac
41472 case $ac_abs_builddir in
41473 .) ac_abs_srcdir=$ac_srcdir;;
41474 *)
41475   case $ac_srcdir in
41476   .) ac_abs_srcdir=$ac_abs_builddir;;
41477   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
41478   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
41479   esac;;
41480 esac
41481 case $ac_abs_builddir in
41482 .) ac_abs_top_srcdir=$ac_top_srcdir;;
41483 *)
41484   case $ac_top_srcdir in
41485   .) ac_abs_top_srcdir=$ac_abs_builddir;;
41486   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
41487   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
41488   esac;;
41489 esac
41490
41491
41492   case $INSTALL in
41493   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
41494   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
41495   esac
41496
41497   if test x"$ac_file" != x-; then
41498     { echo "$as_me:$LINENO: creating $ac_file" >&5
41499 echo "$as_me: creating $ac_file" >&6;}
41500     rm -f "$ac_file"
41501   fi
41502   # Let's still pretend it is `configure' which instantiates (i.e., don't
41503   # use $as_me), people would be surprised to read:
41504   #    /* config.h.  Generated by config.status.  */
41505   if test x"$ac_file" = x-; then
41506     configure_input=
41507   else
41508     configure_input="$ac_file.  "
41509   fi
41510   configure_input=$configure_input"Generated from `echo $ac_file_in |
41511                                      sed 's,.*/,,'` by configure."
41512
41513   # First look for the input files in the build tree, otherwise in the
41514   # src tree.
41515   ac_file_inputs=`IFS=:
41516     for f in $ac_file_in; do
41517       case $f in
41518       -) echo $tmp/stdin ;;
41519       [\\/$]*)
41520          # Absolute (can't be DOS-style, as IFS=:)
41521          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
41522 echo "$as_me: error: cannot find input file: $f" >&2;}
41523    { (exit 1); exit 1; }; }
41524          echo "$f";;
41525       *) # Relative
41526          if test -f "$f"; then
41527            # Build tree
41528            echo "$f"
41529          elif test -f "$srcdir/$f"; then
41530            # Source tree
41531            echo "$srcdir/$f"
41532          else
41533            # /dev/null tree
41534            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
41535 echo "$as_me: error: cannot find input file: $f" >&2;}
41536    { (exit 1); exit 1; }; }
41537          fi;;
41538       esac
41539     done` || { (exit 1); exit 1; }
41540 _ACEOF
41541 cat >>$CONFIG_STATUS <<_ACEOF
41542   sed "$ac_vpsub
41543 $extrasub
41544 _ACEOF
41545 cat >>$CONFIG_STATUS <<\_ACEOF
41546 :t
41547 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
41548 s,@configure_input@,$configure_input,;t t
41549 s,@srcdir@,$ac_srcdir,;t t
41550 s,@abs_srcdir@,$ac_abs_srcdir,;t t
41551 s,@top_srcdir@,$ac_top_srcdir,;t t
41552 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
41553 s,@builddir@,$ac_builddir,;t t
41554 s,@abs_builddir@,$ac_abs_builddir,;t t
41555 s,@top_builddir@,$ac_top_builddir,;t t
41556 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
41557 s,@INSTALL@,$ac_INSTALL,;t t
41558 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
41559   rm -f $tmp/stdin
41560   if test x"$ac_file" != x-; then
41561     mv $tmp/out $ac_file
41562   else
41563     cat $tmp/out
41564     rm -f $tmp/out
41565   fi
41566
41567 done
41568 _ACEOF
41569 cat >>$CONFIG_STATUS <<\_ACEOF
41570
41571 #
41572 # CONFIG_HEADER section.
41573 #
41574
41575 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
41576 # NAME is the cpp macro being defined and VALUE is the value it is being given.
41577 #
41578 # ac_d sets the value in "#define NAME VALUE" lines.
41579 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
41580 ac_dB='[         ].*$,\1#\2'
41581 ac_dC=' '
41582 ac_dD=',;t'
41583 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
41584 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
41585 ac_uB='$,\1#\2define\3'
41586 ac_uC=' '
41587 ac_uD=',;t'
41588
41589 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
41590   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
41591   case $ac_file in
41592   - | *:- | *:-:* ) # input from stdin
41593         cat >$tmp/stdin
41594         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
41595         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
41596   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
41597         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
41598   * )   ac_file_in=$ac_file.in ;;
41599   esac
41600
41601   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
41602 echo "$as_me: creating $ac_file" >&6;}
41603
41604   # First look for the input files in the build tree, otherwise in the
41605   # src tree.
41606   ac_file_inputs=`IFS=:
41607     for f in $ac_file_in; do
41608       case $f in
41609       -) echo $tmp/stdin ;;
41610       [\\/$]*)
41611          # Absolute (can't be DOS-style, as IFS=:)
41612          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
41613 echo "$as_me: error: cannot find input file: $f" >&2;}
41614    { (exit 1); exit 1; }; }
41615          # Do quote $f, to prevent DOS paths from being IFS'd.
41616          echo "$f";;
41617       *) # Relative
41618          if test -f "$f"; then
41619            # Build tree
41620            echo "$f"
41621          elif test -f "$srcdir/$f"; then
41622            # Source tree
41623            echo "$srcdir/$f"
41624          else
41625            # /dev/null tree
41626            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
41627 echo "$as_me: error: cannot find input file: $f" >&2;}
41628    { (exit 1); exit 1; }; }
41629          fi;;
41630       esac
41631     done` || { (exit 1); exit 1; }
41632   # Remove the trailing spaces.
41633   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
41634
41635 _ACEOF
41636
41637 # Transform confdefs.h into two sed scripts, `conftest.defines' and
41638 # `conftest.undefs', that substitutes the proper values into
41639 # config.h.in to produce config.h.  The first handles `#define'
41640 # templates, and the second `#undef' templates.
41641 # And first: Protect against being on the right side of a sed subst in
41642 # config.status.  Protect against being in an unquoted here document
41643 # in config.status.
41644 rm -f conftest.defines conftest.undefs
41645 # Using a here document instead of a string reduces the quoting nightmare.
41646 # Putting comments in sed scripts is not portable.
41647 #
41648 # `end' is used to avoid that the second main sed command (meant for
41649 # 0-ary CPP macros) applies to n-ary macro definitions.
41650 # See the Autoconf documentation for `clear'.
41651 cat >confdef2sed.sed <<\_ACEOF
41652 s/[\\&,]/\\&/g
41653 s,[\\$`],\\&,g
41654 t clear
41655 : clear
41656 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
41657 t end
41658 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
41659 : end
41660 _ACEOF
41661 # If some macros were called several times there might be several times
41662 # the same #defines, which is useless.  Nevertheless, we may not want to
41663 # sort them, since we want the *last* AC-DEFINE to be honored.
41664 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
41665 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
41666 rm -f confdef2sed.sed
41667
41668 # This sed command replaces #undef with comments.  This is necessary, for
41669 # example, in the case of _POSIX_SOURCE, which is predefined and required
41670 # on some systems where configure will not decide to define it.
41671 cat >>conftest.undefs <<\_ACEOF
41672 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
41673 _ACEOF
41674
41675 # Break up conftest.defines because some shells have a limit on the size
41676 # of here documents, and old seds have small limits too (100 cmds).
41677 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
41678 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
41679 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
41680 echo '  :' >>$CONFIG_STATUS
41681 rm -f conftest.tail
41682 while grep . conftest.defines >/dev/null
41683 do
41684   # Write a limited-size here document to $tmp/defines.sed.
41685   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
41686   # Speed up: don't consider the non `#define' lines.
41687   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
41688   # Work around the forget-to-reset-the-flag bug.
41689   echo 't clr' >>$CONFIG_STATUS
41690   echo ': clr' >>$CONFIG_STATUS
41691   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
41692   echo 'CEOF
41693   sed -f $tmp/defines.sed $tmp/in >$tmp/out
41694   rm -f $tmp/in
41695   mv $tmp/out $tmp/in
41696 ' >>$CONFIG_STATUS
41697   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
41698   rm -f conftest.defines
41699   mv conftest.tail conftest.defines
41700 done
41701 rm -f conftest.defines
41702 echo '  fi # grep' >>$CONFIG_STATUS
41703 echo >>$CONFIG_STATUS
41704
41705 # Break up conftest.undefs because some shells have a limit on the size
41706 # of here documents, and old seds have small limits too (100 cmds).
41707 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
41708 rm -f conftest.tail
41709 while grep . conftest.undefs >/dev/null
41710 do
41711   # Write a limited-size here document to $tmp/undefs.sed.
41712   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
41713   # Speed up: don't consider the non `#undef'
41714   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
41715   # Work around the forget-to-reset-the-flag bug.
41716   echo 't clr' >>$CONFIG_STATUS
41717   echo ': clr' >>$CONFIG_STATUS
41718   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
41719   echo 'CEOF
41720   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
41721   rm -f $tmp/in
41722   mv $tmp/out $tmp/in
41723 ' >>$CONFIG_STATUS
41724   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
41725   rm -f conftest.undefs
41726   mv conftest.tail conftest.undefs
41727 done
41728 rm -f conftest.undefs
41729
41730 cat >>$CONFIG_STATUS <<\_ACEOF
41731   # Let's still pretend it is `configure' which instantiates (i.e., don't
41732   # use $as_me), people would be surprised to read:
41733   #    /* config.h.  Generated by config.status.  */
41734   if test x"$ac_file" = x-; then
41735     echo "/* Generated by configure.  */" >$tmp/config.h
41736   else
41737     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
41738   fi
41739   cat $tmp/in >>$tmp/config.h
41740   rm -f $tmp/in
41741   if test x"$ac_file" != x-; then
41742     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
41743       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
41744 echo "$as_me: $ac_file is unchanged" >&6;}
41745     else
41746       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
41747 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41748          X"$ac_file" : 'X\(//\)[^/]' \| \
41749          X"$ac_file" : 'X\(//\)$' \| \
41750          X"$ac_file" : 'X\(/\)' \| \
41751          .     : '\(.\)' 2>/dev/null ||
41752 echo X"$ac_file" |
41753     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
41754           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
41755           /^X\(\/\/\)$/{ s//\1/; q; }
41756           /^X\(\/\).*/{ s//\1/; q; }
41757           s/.*/./; q'`
41758       { if $as_mkdir_p; then
41759     mkdir -p "$ac_dir"
41760   else
41761     as_dir="$ac_dir"
41762     as_dirs=
41763     while test ! -d "$as_dir"; do
41764       as_dirs="$as_dir $as_dirs"
41765       as_dir=`(dirname "$as_dir") 2>/dev/null ||
41766 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41767          X"$as_dir" : 'X\(//\)[^/]' \| \
41768          X"$as_dir" : 'X\(//\)$' \| \
41769          X"$as_dir" : 'X\(/\)' \| \
41770          .     : '\(.\)' 2>/dev/null ||
41771 echo X"$as_dir" |
41772     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
41773           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
41774           /^X\(\/\/\)$/{ s//\1/; q; }
41775           /^X\(\/\).*/{ s//\1/; q; }
41776           s/.*/./; q'`
41777     done
41778     test ! -n "$as_dirs" || mkdir $as_dirs
41779   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
41780 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
41781    { (exit 1); exit 1; }; }; }
41782
41783       rm -f $ac_file
41784       mv $tmp/config.h $ac_file
41785     fi
41786   else
41787     cat $tmp/config.h
41788     rm -f $tmp/config.h
41789   fi
41790 # Compute $ac_file's index in $config_headers.
41791 _am_stamp_count=1
41792 for _am_header in $config_headers :; do
41793   case $_am_header in
41794     $ac_file | $ac_file:* )
41795       break ;;
41796     * )
41797       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
41798   esac
41799 done
41800 echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
41801 $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41802          X$ac_file : 'X\(//\)[^/]' \| \
41803          X$ac_file : 'X\(//\)$' \| \
41804          X$ac_file : 'X\(/\)' \| \
41805          .     : '\(.\)' 2>/dev/null ||
41806 echo X$ac_file |
41807     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
41808           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
41809           /^X\(\/\/\)$/{ s//\1/; q; }
41810           /^X\(\/\).*/{ s//\1/; q; }
41811           s/.*/./; q'`/stamp-h$_am_stamp_count
41812 done
41813 _ACEOF
41814 cat >>$CONFIG_STATUS <<\_ACEOF
41815
41816 #
41817 # CONFIG_COMMANDS section.
41818 #
41819 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
41820   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
41821   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
41822   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
41823 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41824          X"$ac_dest" : 'X\(//\)[^/]' \| \
41825          X"$ac_dest" : 'X\(//\)$' \| \
41826          X"$ac_dest" : 'X\(/\)' \| \
41827          .     : '\(.\)' 2>/dev/null ||
41828 echo X"$ac_dest" |
41829     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
41830           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
41831           /^X\(\/\/\)$/{ s//\1/; q; }
41832           /^X\(\/\).*/{ s//\1/; q; }
41833           s/.*/./; q'`
41834   { if $as_mkdir_p; then
41835     mkdir -p "$ac_dir"
41836   else
41837     as_dir="$ac_dir"
41838     as_dirs=
41839     while test ! -d "$as_dir"; do
41840       as_dirs="$as_dir $as_dirs"
41841       as_dir=`(dirname "$as_dir") 2>/dev/null ||
41842 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41843          X"$as_dir" : 'X\(//\)[^/]' \| \
41844          X"$as_dir" : 'X\(//\)$' \| \
41845          X"$as_dir" : 'X\(/\)' \| \
41846          .     : '\(.\)' 2>/dev/null ||
41847 echo X"$as_dir" |
41848     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
41849           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
41850           /^X\(\/\/\)$/{ s//\1/; q; }
41851           /^X\(\/\).*/{ s//\1/; q; }
41852           s/.*/./; q'`
41853     done
41854     test ! -n "$as_dirs" || mkdir $as_dirs
41855   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
41856 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
41857    { (exit 1); exit 1; }; }; }
41858
41859   ac_builddir=.
41860
41861 if test "$ac_dir" != .; then
41862   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
41863   # A "../" for each directory in $ac_dir_suffix.
41864   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
41865 else
41866   ac_dir_suffix= ac_top_builddir=
41867 fi
41868
41869 case $srcdir in
41870   .)  # No --srcdir option.  We are building in place.
41871     ac_srcdir=.
41872     if test -z "$ac_top_builddir"; then
41873        ac_top_srcdir=.
41874     else
41875        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
41876     fi ;;
41877   [\\/]* | ?:[\\/]* )  # Absolute path.
41878     ac_srcdir=$srcdir$ac_dir_suffix;
41879     ac_top_srcdir=$srcdir ;;
41880   *) # Relative path.
41881     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
41882     ac_top_srcdir=$ac_top_builddir$srcdir ;;
41883 esac
41884
41885 # Do not use `cd foo && pwd` to compute absolute paths, because
41886 # the directories may not exist.
41887 case `pwd` in
41888 .) ac_abs_builddir="$ac_dir";;
41889 *)
41890   case "$ac_dir" in
41891   .) ac_abs_builddir=`pwd`;;
41892   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
41893   *) ac_abs_builddir=`pwd`/"$ac_dir";;
41894   esac;;
41895 esac
41896 case $ac_abs_builddir in
41897 .) ac_abs_top_builddir=${ac_top_builddir}.;;
41898 *)
41899   case ${ac_top_builddir}. in
41900   .) ac_abs_top_builddir=$ac_abs_builddir;;
41901   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
41902   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
41903   esac;;
41904 esac
41905 case $ac_abs_builddir in
41906 .) ac_abs_srcdir=$ac_srcdir;;
41907 *)
41908   case $ac_srcdir in
41909   .) ac_abs_srcdir=$ac_abs_builddir;;
41910   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
41911   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
41912   esac;;
41913 esac
41914 case $ac_abs_builddir in
41915 .) ac_abs_top_srcdir=$ac_top_srcdir;;
41916 *)
41917   case $ac_top_srcdir in
41918   .) ac_abs_top_srcdir=$ac_abs_builddir;;
41919   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
41920   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
41921   esac;;
41922 esac
41923
41924
41925   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
41926 echo "$as_me: executing $ac_dest commands" >&6;}
41927   case $ac_dest in
41928     depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
41929   # Strip MF so we end up with the name of the file.
41930   mf=`echo "$mf" | sed -e 's/:.*$//'`
41931   # Check whether this is an Automake generated Makefile or not.
41932   # We used to match only the files named `Makefile.in', but
41933   # some people rename them; so instead we look at the file content.
41934   # Grep'ing the first line is not enough: some people post-process
41935   # each Makefile.in and add a new line on top of each file to say so.
41936   # So let's grep whole file.
41937   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
41938     dirpart=`(dirname "$mf") 2>/dev/null ||
41939 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41940          X"$mf" : 'X\(//\)[^/]' \| \
41941          X"$mf" : 'X\(//\)$' \| \
41942          X"$mf" : 'X\(/\)' \| \
41943          .     : '\(.\)' 2>/dev/null ||
41944 echo X"$mf" |
41945     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
41946           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
41947           /^X\(\/\/\)$/{ s//\1/; q; }
41948           /^X\(\/\).*/{ s//\1/; q; }
41949           s/.*/./; q'`
41950   else
41951     continue
41952   fi
41953   # Extract the definition of DEPDIR, am__include, and am__quote
41954   # from the Makefile without running `make'.
41955   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
41956   test -z "$DEPDIR" && continue
41957   am__include=`sed -n 's/^am__include = //p' < "$mf"`
41958   test -z "am__include" && continue
41959   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
41960   # When using ansi2knr, U may be empty or an underscore; expand it
41961   U=`sed -n 's/^U = //p' < "$mf"`
41962   # Find all dependency output files, they are included files with
41963   # $(DEPDIR) in their names.  We invoke sed twice because it is the
41964   # simplest approach to changing $(DEPDIR) to its actual value in the
41965   # expansion.
41966   for file in `sed -n "
41967     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
41968        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
41969     # Make sure the directory exists.
41970     test -f "$dirpart/$file" && continue
41971     fdir=`(dirname "$file") 2>/dev/null ||
41972 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41973          X"$file" : 'X\(//\)[^/]' \| \
41974          X"$file" : 'X\(//\)$' \| \
41975          X"$file" : 'X\(/\)' \| \
41976          .     : '\(.\)' 2>/dev/null ||
41977 echo X"$file" |
41978     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
41979           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
41980           /^X\(\/\/\)$/{ s//\1/; q; }
41981           /^X\(\/\).*/{ s//\1/; q; }
41982           s/.*/./; q'`
41983     { if $as_mkdir_p; then
41984     mkdir -p $dirpart/$fdir
41985   else
41986     as_dir=$dirpart/$fdir
41987     as_dirs=
41988     while test ! -d "$as_dir"; do
41989       as_dirs="$as_dir $as_dirs"
41990       as_dir=`(dirname "$as_dir") 2>/dev/null ||
41991 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41992          X"$as_dir" : 'X\(//\)[^/]' \| \
41993          X"$as_dir" : 'X\(//\)$' \| \
41994          X"$as_dir" : 'X\(/\)' \| \
41995          .     : '\(.\)' 2>/dev/null ||
41996 echo X"$as_dir" |
41997     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
41998           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
41999           /^X\(\/\/\)$/{ s//\1/; q; }
42000           /^X\(\/\).*/{ s//\1/; q; }
42001           s/.*/./; q'`
42002     done
42003     test ! -n "$as_dirs" || mkdir $as_dirs
42004   fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
42005 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
42006    { (exit 1); exit 1; }; }; }
42007
42008     # echo "creating $dirpart/$file"
42009     echo '# dummy' > "$dirpart/$file"
42010   done
42011 done
42012  ;;
42013     default )
42014 chmod +x tests/run
42015 date > stamp-h
42016 BACKENDSC="servers/slapd/backends.c"
42017 echo "Making $BACKENDSC"
42018 rm -f $BACKENDSC
42019 cat > $BACKENDSC << ENDX
42020 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
42021  *
42022  * Copyright 1998-2006 The OpenLDAP Foundation.
42023  * All rights reserved.
42024  *
42025  * Redistribution and use in source and binary forms, with or without
42026  * modification, are permitted only as authorized by the OpenLDAP
42027  * Public License.
42028  *
42029  * A copy of this license is available in the file LICENSE in the
42030  * top-level directory of the distribution or, alternatively, at
42031  * <http://www.OpenLDAP.org/license.html>.
42032  */
42033 /* This file is automatically generated by configure; please do not edit. */
42034
42035 #include "portable.h"
42036 #include "slap.h"
42037
42038 ENDX
42039 if test "${STATIC_BACKENDS}"; then
42040         for b in config ${STATIC_BACKENDS}; do
42041                 bb=`echo "${b}" | sed -e 's/back-//'`
42042                 cat >> $BACKENDSC << ENDX
42043 extern BI_init ${bb}_back_initialize;
42044 ENDX
42045         done
42046
42047         cat >> $BACKENDSC << ENDX
42048
42049 BackendInfo slap_binfo[] = {
42050 ENDX
42051
42052         for b in config ${STATIC_BACKENDS}; do
42053                 bb=`echo "${b}" | sed -e 's/back-//'`
42054                 echo "    Add ${bb} ..."
42055                 cat >> $BACKENDSC << ENDX
42056         { "${bb}", ${bb}_back_initialize },
42057 ENDX
42058         done
42059
42060         cat >> $BACKENDSC << ENDX
42061         { NULL, NULL },
42062 };
42063
42064 /* end of generated file */
42065 ENDX
42066 fi
42067 OVERLAYSC="servers/slapd/overlays/statover.c"
42068 echo "Making $OVERLAYSC"
42069 rm -f $OVERLAYSC
42070 cat > $OVERLAYSC << ENDX
42071 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
42072  *
42073  * Copyright 1998-2006 The OpenLDAP Foundation.
42074  * All rights reserved.
42075  *
42076  * Redistribution and use in source and binary forms, with or without
42077  * modification, are permitted only as authorized by the OpenLDAP
42078  * Public License.
42079  *
42080  * A copy of this license is available in the file LICENSE in the
42081  * top-level directory of the distribution or, alternatively, at
42082  * <http://www.OpenLDAP.org/license.html>.
42083  */
42084 /* This file is automatically generated by configure; please do not edit. */
42085
42086 #include "portable.h"
42087 #include "slap.h"
42088
42089 ENDX
42090 if test "${STATIC_OVERLAYS}"; then
42091         for o in ${STATIC_OVERLAYS}; do
42092                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
42093                 cat >> $OVERLAYSC << ENDX
42094 extern OV_init ${oo}_initialize;
42095 ENDX
42096         done
42097 fi
42098
42099 cat >> $OVERLAYSC << ENDX
42100
42101 OverlayInit slap_oinfo[] = {
42102 ENDX
42103
42104 if test "${STATIC_OVERLAYS}"; then
42105         for o in ${STATIC_OVERLAYS}; do
42106                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
42107                 echo "    Add ${oo} ..."
42108                 cat >> $OVERLAYSC << ENDX
42109         { "${oo}", ${oo}_initialize },
42110 ENDX
42111         done
42112 fi
42113
42114         cat >> $OVERLAYSC << ENDX
42115         { NULL, NULL },
42116 };
42117
42118 /* end of generated file */
42119 ENDX
42120
42121 echo Please run \"make depend\" to build dependencies
42122  ;;
42123   esac
42124 done
42125 _ACEOF
42126
42127 cat >>$CONFIG_STATUS <<\_ACEOF
42128
42129 { (exit 0); exit 0; }
42130 _ACEOF
42131 chmod +x $CONFIG_STATUS
42132 ac_clean_files=$ac_clean_files_save
42133
42134
42135 # configure is writing to config.log, and then calls config.status.
42136 # config.status does its own redirection, appending to config.log.
42137 # Unfortunately, on DOS this fails, as config.log is still kept open
42138 # by configure, so config.status won't be able to write to it; its
42139 # output is simply discarded.  So we exec the FD to /dev/null,
42140 # effectively closing config.log, so it can be properly (re)opened and
42141 # appended to by config.status.  When coming back to configure, we
42142 # need to make the FD available again.
42143 if test "$no_create" != yes; then
42144   ac_cs_success=:
42145   ac_config_status_args=
42146   test "$silent" = yes &&
42147     ac_config_status_args="$ac_config_status_args --quiet"
42148   exec 5>/dev/null
42149   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
42150   exec 5>>config.log
42151   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
42152   # would make configure fail if this is the last instruction.
42153   $ac_cs_success || { (exit 1); exit 1; }
42154 fi
42155